Use quantizer value read from bitstream

Currently the code initializes quantizer even
before reading it from bitstream and uses that
to dequantize samples.
parent a6da23f1
...@@ -1067,7 +1067,6 @@ static int decode_subframe(WmallDecodeCtx *s) ...@@ -1067,7 +1067,6 @@ static int decode_subframe(WmallDecodeCtx *s)
int total_samples = s->samples_per_frame * s->num_channels; int total_samples = s->samples_per_frame * s->num_channels;
int rawpcm_tile; int rawpcm_tile;
int padding_zeroes; int padding_zeroes;
int quant_stepsize = s->quant_stepsize;
s->subframe_offset = get_bits_count(&s->gb); s->subframe_offset = get_bits_count(&s->gb);
...@@ -1194,9 +1193,10 @@ static int decode_subframe(WmallDecodeCtx *s) ...@@ -1194,9 +1193,10 @@ static int decode_subframe(WmallDecodeCtx *s)
revert_acfilter(s, subframe_len); revert_acfilter(s, subframe_len);
/* Dequantize */ /* Dequantize */
for (i = 0; i < s->num_channels; i++) if (s->quant_stepsize != 1)
for (j = 0; j < subframe_len; j++) for (i = 0; i < s->num_channels; i++)
s->channel_residues[i][j] *= quant_stepsize; for (j = 0; j < subframe_len; j++)
s->channel_residues[i][j] *= s->quant_stepsize;
/** handled one subframe */ /** handled one subframe */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment