[FFmpeg-cvslog] avcodec/dcaenc: fix lfe fir coefficients
Paul B Mahol
git at videolan.org
Fri Sep 18 14:26:34 CEST 2015
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Sep 17 21:13:37 2015 +0000| [32e1af77ec128518a880ae6a5e3d17546ee10714] | committer: Paul B Mahol
avcodec/dcaenc: fix lfe fir coefficients
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=32e1af77ec128518a880ae6a5e3d17546ee10714
---
libavcodec/dcaenc.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c
index 07ddae8..5a6bdac 100644
--- a/libavcodec/dcaenc.c
+++ b/libavcodec/dcaenc.c
@@ -174,10 +174,11 @@ static int encode_init(AVCodecContext *avctx)
cb_to_level[i] = (int32_t)(0x7fffffff * pow(10, -0.005 * i));
}
- /* FIXME: probably incorrect */
- for (i = 0; i < 256; i++) {
- lfe_fir_64i[i] = (int32_t)(0x01ffffff * ff_dca_lfe_fir_64[i]);
- lfe_fir_64i[511 - i] = (int32_t)(0x01ffffff * ff_dca_lfe_fir_64[i]);
+ for (k = 0; k < 32; k++) {
+ for (j = 0; j < 8; j++) {
+ lfe_fir_64i[64 * j + k] = (int32_t)(0xffffff800000ULL * ff_dca_lfe_fir_64[8 * k + j]);
+ lfe_fir_64i[64 * (7-j) + (63 - k)] = (int32_t)(0xffffff800000ULL * ff_dca_lfe_fir_64[8 * k + j]);
+ }
}
for (i = 0; i < 512; i++) {
More information about the ffmpeg-cvslog
mailing list