diff options
author | Peter Ross <pross@xvid.org> | 2010-03-03 09:51:56 +0000 |
---|---|---|
committer | Peter Ross <pross@xvid.org> | 2010-03-03 09:51:56 +0000 |
commit | 54063e37c1cb346e020a054a3e0b4bec0c80cb2c (patch) | |
tree | d322a740941f3c42e65290ca25834213ac638409 | |
parent | a27998010ca3b5eadd59b7c4b9be35fbc70f104f (diff) | |
download | ffmpeg-streaming-54063e37c1cb346e020a054a3e0b4bec0c80cb2c.zip ffmpeg-streaming-54063e37c1cb346e020a054a3e0b4bec0c80cb2c.tar.gz |
Perform coefficient transformations in Bink Audio DCT decoder (issue1770)
Originally committed as revision 22167 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/binkaudio.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c index b3f74d0..fd197a8 100644 --- a/libavcodec/binkaudio.c +++ b/libavcodec/binkaudio.c @@ -125,7 +125,7 @@ static av_cold int decode_init(AVCodecContext *avctx) if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) ff_rdft_init(&s->trans.rdft, frame_len_bits, IRIDFT); else if (CONFIG_BINKAUDIO_DCT_DECODER) - ff_dct_init(&s->trans.dct, frame_len_bits, 0); + ff_dct_init(&s->trans.dct, frame_len_bits, 1); else return -1; @@ -211,8 +211,11 @@ static void decode_block(BinkAudioContext *s, short *out, int use_dct) } } - if (CONFIG_BINKAUDIO_DCT_DECODER && use_dct) + if (CONFIG_BINKAUDIO_DCT_DECODER && use_dct) { + coeffs[0] /= 0.5; ff_dct_calc (&s->trans.dct, coeffs); + s->dsp.vector_fmul_scalar(coeffs, coeffs, s->frame_len / 2, s->frame_len); + } else if (CONFIG_BINKAUDIO_RDFT_DECODER) ff_rdft_calc(&s->trans.rdft, coeffs); } |