g722: Fix the QMF scaling
authorMartin Storsjö <martin@martin.st>
Fri, 2 Mar 2012 15:03:06 +0000 (17:03 +0200)
committerMartin Storsjö <martin@martin.st>
Fri, 2 Mar 2012 16:58:19 +0000 (18:58 +0200)
commitb087ce2bee81db8cc5caffb8f0a4f6c7c92a30fe
tree33d6290462f3f1f41bf18ed00403a7a176ba6697
parent56bf24ad7821974bc92a2d02a120165ee61efb90
g722: Fix the QMF scaling

This fixes clipping if the encoder input used the full 16 bit
input range (samples with a magnitude below 16383 worked fine).
The filtered subband samples should be 15 bit maximum, while
the code earlier produced them scaled to 16 bit.

This makes the decoder output have double the magnitude
compared to before.

The spec reference samples doesn't test the QMF at all, which
was why this part slipped past initially.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/g722dec.c
libavcodec/g722enc.c
tests/ref/acodec/g722
tests/ref/fate/g722dec-1
tests/ref/fate/g722enc