diff options
author | Mashiat Sarker Shakkhar <shahriman_ams@yahoo.com> | 2012-01-01 14:32:10 +0600 |
---|---|---|
committer | Mashiat Sarker Shakkhar <shahriman_ams@yahoo.com> | 2012-01-01 14:32:40 +0600 |
commit | 3d8449512840215ab48d1b2e337bbd0841635300 (patch) | |
tree | e29717a26bb7863fe05c2aeeadc438b973558ba0 /libavcodec | |
parent | a6da23f1467122ac2d52edd406870128339dc88a (diff) | |
download | ffmpeg-3d8449512840215ab48d1b2e337bbd0841635300.tar.gz |
Use quantizer value read from bitstream
Currently the code initializes quantizer even
before reading it from bitstream and uses that
to dequantize samples.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/wmalosslessdec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index da8bb59c8b..ce845f1e55 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -1067,7 +1067,6 @@ static int decode_subframe(WmallDecodeCtx *s) int total_samples = s->samples_per_frame * s->num_channels; int rawpcm_tile; int padding_zeroes; - int quant_stepsize = s->quant_stepsize; s->subframe_offset = get_bits_count(&s->gb); @@ -1194,9 +1193,10 @@ static int decode_subframe(WmallDecodeCtx *s) revert_acfilter(s, subframe_len); /* Dequantize */ - for (i = 0; i < s->num_channels; i++) - for (j = 0; j < subframe_len; j++) - s->channel_residues[i][j] *= quant_stepsize; + if (s->quant_stepsize != 1) + for (i = 0; i < s->num_channels; i++) + for (j = 0; j < subframe_len; j++) + s->channel_residues[i][j] *= s->quant_stepsize; /** handled one subframe */ |