diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2010-12-29 19:17:22 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2010-12-29 19:17:22 +0000 |
commit | ec44dd5fc2118d5f22c3c504e7d37771383e3a6e (patch) | |
tree | 5cfeebd0c0892436551ee1200411c46c1a774c84 | |
parent | e916acbcd1d80aa114a877d6f479788e270e0cd4 (diff) | |
download | ffmpeg-ec44dd5fc2118d5f22c3c504e7d37771383e3a6e.tar.gz |
Change the default dB-per-bit code from 2 to 3.
This gives slightly better quality in PEAQ tests.
Code 3 gives a dBpb value of 2816 = -132dB (128 psd units = -6dB), which
corresponds to 22 bits. Since the exponents have an offset applied, the
16-bit source looks like 24-bit source to the bit allocation routine.
So using dBpb code=3 is a closer match to the exponent range.
Regression test refs updated for acodec-ac3, lavf-rm, and seek-ac3_rm.
Originally committed as revision 26144 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/ac3enc.c | 2 | ||||
-rw-r--r-- | tests/ref/acodec/ac3 | 2 | ||||
-rw-r--r-- | tests/ref/lavf/rm | 2 | ||||
-rw-r--r-- | tests/ref/seek/ac3_rm | 33 |
4 files changed, 19 insertions, 20 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index 94fafbc314..52cb58fa2b 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -899,7 +899,7 @@ static void bit_alloc_init(AC3EncodeContext *s) s->slow_decay_code = 2; s->fast_decay_code = 1; s->slow_gain_code = 1; - s->db_per_bit_code = 2; + s->db_per_bit_code = 3; s->floor_code = 4; for (ch = 0; ch < s->channels; ch++) s->fast_gain_code[ch] = 4; diff --git a/tests/ref/acodec/ac3 b/tests/ref/acodec/ac3 index 3a673fca0f..3ca8219e63 100644 --- a/tests/ref/acodec/ac3 +++ b/tests/ref/acodec/ac3 @@ -1,2 +1,2 @@ -8ea1ce311247d27dc653f274ed7104cd *./tests/data/acodec/ac3.rm +b315176b519a63a35cb91566e768f62b *./tests/data/acodec/ac3.rm 98751 ./tests/data/acodec/ac3.rm diff --git a/tests/ref/lavf/rm b/tests/ref/lavf/rm index bdb16e8e2e..d9ec51e596 100644 --- a/tests/ref/lavf/rm +++ b/tests/ref/lavf/rm @@ -1,2 +1,2 @@ -03427369521c9ebc2a5408a0e2a163bf *./tests/data/lavf/lavf.rm +e1990def7b195a568340f2c1a89d6587 *./tests/data/lavf/lavf.rm 346706 ./tests/data/lavf/lavf.rm diff --git a/tests/ref/seek/ac3_rm b/tests/ref/seek/ac3_rm index 86a0f757ed..6d47c47281 100644 --- a/tests/ref/seek/ac3_rm +++ b/tests/ref/seek/ac3_rm @@ -1,43 +1,42 @@ ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 ret: 0 st:-1 flags:0 ts:-1.000000 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 -ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 +ret:-1 st:-1 flags:1 ts: 1.894167 ret:-1 st: 0 flags:0 ts: 0.788000 ret: 0 st: 0 flags:1 ts:-0.317000 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 ret: 0 st:-1 flags:0 ts: 2.576668 -ret: 0 st: 0 flags:1 dts: 2.960000 pts: 2.960000 pos: 48659 size: 558 +ret: 0 st: 0 flags:1 dts: 4.179000 pts: 4.179000 pos: 68585 size: 556 ret:-1 st:-1 flags:1 ts: 1.470835 -ret:-1 st: 0 flags:0 ts: 0.365000 +ret: 0 st: 0 flags:0 ts: 0.365000 +ret: 0 st: 0 flags:1 dts: 0.383000 pts: 0.383000 pos: 6533 size: 558 ret: 0 st: 0 flags:1 ts:-0.741000 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 -ret: 0 st:-1 flags:0 ts: 2.153336 -ret: 0 st: 0 flags:1 dts: 2.960000 pts: 2.960000 pos: 48659 size: 558 +ret:-1 st:-1 flags:0 ts: 2.153336 ret:-1 st:-1 flags:1 ts: 1.047503 ret: 0 st: 0 flags:0 ts:-0.058000 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 -ret: 0 st: 0 flags:1 ts: 2.836000 -ret: 0 st: 0 flags:1 dts: 2.333000 pts: 2.333000 pos: 38413 size: 556 +ret:-1 st: 0 flags:1 ts: 2.836000 ret:-1 st:-1 flags:0 ts: 1.730004 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.417000 pts: 0.417000 pos: 7103 size: 556 +ret: 0 st: 0 flags:1 dts: 0.452000 pts: 0.452000 pos: 7671 size: 558 ret: 0 st: 0 flags:0 ts:-0.482000 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 -ret:-1 st: 0 flags:1 ts: 2.413000 +ret: 0 st: 0 flags:1 ts: 2.413000 +ret: 0 st: 0 flags:1 dts: 2.333000 pts: 2.333000 pos: 38413 size: 556 ret:-1 st:-1 flags:0 ts: 1.306672 -ret: 0 st:-1 flags:1 ts: 0.200839 -ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 +ret:-1 st:-1 flags:1 ts: 0.200839 ret: 0 st: 0 flags:0 ts:-0.905000 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 ret: 0 st: 0 flags:1 ts: 1.989000 -ret: 0 st: 0 flags:1 dts: 1.950000 pts: 1.950000 pos: 32151 size: 556 -ret: 0 st:-1 flags:0 ts: 0.883340 -ret: 0 st: 0 flags:1 dts: 2.159000 pts: 2.159000 pos: 35567 size: 556 +ret: 0 st: 0 flags:1 dts: 1.985000 pts: 1.985000 pos: 32719 size: 558 +ret:-1 st:-1 flags:0 ts: 0.883340 ret: 0 st:-1 flags:1 ts:-0.222493 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 -ret:-1 st: 0 flags:0 ts: 2.672000 +ret: 0 st: 0 flags:0 ts: 2.672000 +ret: 0 st: 0 flags:1 dts: 4.179000 pts: 4.179000 pos: 68585 size: 556 ret:-1 st: 0 flags:1 ts: 1.566000 -ret:-1 st:-1 flags:0 ts: 0.460008 +ret: 0 st:-1 flags:0 ts: 0.460008 +ret: 0 st: 0 flags:1 dts: 4.179000 pts: 4.179000 pos: 68585 size: 556 ret: 0 st:-1 flags:1 ts:-0.645825 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556 |