From f1f7807abd46e4fa77f929eaedc044d3ec593cc5 Mon Sep 17 00:00:00 2001 From: Benjamin Larsson Date: Mon, 10 Apr 2006 12:12:26 +0000 Subject: [PATCH] AC3 encoding volume fix, by Justin Ruggles jruggle earthlink net. Originally committed as revision 5281 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/ac3enc.c | 2 +- tests/ffmpeg.regression.ref | 2 +- tests/libav.regression.ref | 2 +- tests/rotozoom.regression.ref | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index 5be791c1d3..5ec8b4f5ac 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -1377,7 +1377,7 @@ static int AC3_encode_frame(AVCodecContext *avctx, v = 14 - log2_tab(input_samples, N); if (v < 0) v = 0; - exp_samples[i][ch] = v - 8; + exp_samples[i][ch] = v - 9; lshift_tab(input_samples, N, v); /* do the MDCT */ diff --git a/tests/ffmpeg.regression.ref b/tests/ffmpeg.regression.ref index ec3441c5d3..703ac10d72 100644 --- a/tests/ffmpeg.regression.ref +++ b/tests/ffmpeg.regression.ref @@ -150,7 +150,7 @@ stddev: 10.99 PSNR:27.30 bytes:7602176 6956f2c5185c4edbae648c614992a14b *./data/out.wav stddev:9330.70 PSNR:16.92 bytes:527360 stddev:4396.13 PSNR:23.46 bytes:526336 -4292b4f8e930e386e9c00799197615e5 *./data/a-ac3.rm +aefe11ab5067621a1c674859d6413891 *./data/a-ac3.rm 98203 ./data/a-ac3.rm 9e6e66847a568ef4f1f229b0939d2aae *./data/a-g726.wav 24268 ./data/a-g726.wav diff --git a/tests/libav.regression.ref b/tests/libav.regression.ref index 49f26ff1bf..88bb54b67e 100644 --- a/tests/libav.regression.ref +++ b/tests/libav.regression.ref @@ -5,7 +5,7 @@ ffmpeg regression test 6f4dca897d9a009009798e434fe5f651 *./data/b-libav.asf 342967 ./data/b-libav.asf ./data/b-libav.asf CRC=0x41af1ed9 -4509d6cc5523484d4557b2e5f06f5157 *./data/b-libav.rm +5275686385346789108ec4fdf06ecef8 *./data/b-libav.rm 360269 ./data/b-libav.rm 90784a1b9589095f20fc6bcc0cc23cc4 *./data/b-libav.mpg 387072 ./data/b-libav.mpg diff --git a/tests/rotozoom.regression.ref b/tests/rotozoom.regression.ref index 65dc8c30c2..725ea6d7c5 100644 --- a/tests/rotozoom.regression.ref +++ b/tests/rotozoom.regression.ref @@ -150,7 +150,7 @@ stddev: 3.44 PSNR:37.38 bytes:7602176 6956f2c5185c4edbae648c614992a14b *./data/out.wav stddev:9330.70 PSNR:16.92 bytes:527360 stddev:4396.13 PSNR:23.46 bytes:526336 -4292b4f8e930e386e9c00799197615e5 *./data/a-ac3.rm +aefe11ab5067621a1c674859d6413891 *./data/a-ac3.rm 98203 ./data/a-ac3.rm 9e6e66847a568ef4f1f229b0939d2aae *./data/a-g726.wav 24268 ./data/a-g726.wav