[FFmpeg-cvslog] dca: improve default stereo downmix coefficients.

Tim Walker git at videolan.org
Fri Nov 29 03:56:26 CET 2013


ffmpeg | branch: master | Tim Walker <tdskywalker at gmail.com> | Fri Nov 22 22:11:47 2013 +0100| [149438cfe5d233c46bb18341b7c574fe643dd5f2] | committer: Anton Khirnov

dca: improve default stereo downmix coefficients.

Previous coefficients were producing a non-normalized, incorrect Lt/Rt downmix.

The new coefficients produce a standard Lo/Ro downmix with 3dB attenuation.

This should match the typical default coefficients used by DTS encoders.

Signed-off-by: Anton Khirnov <anton at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=149438cfe5d233c46bb18341b7c574fe643dd5f2
---

 libavcodec/dcadata.h |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavcodec/dcadata.h b/libavcodec/dcadata.h
index 156a2c3..e6997bc 100644
--- a/libavcodec/dcadata.h
+++ b/libavcodec/dcadata.h
@@ -7552,16 +7552,16 @@ static const float dca_dmixtable[241] = {
 };
 
 static const float dca_default_coeffs[10][5][2] = {
-    { { 0.707946, 0.707946 },                                                                                                 }, // A
+    { { 0.707107, 0.707107 },                                                                                                 }, // A
     { { 1.000000, 0.000000 }, { 0.000000, 1.000000 },                                                                         }, // A + B (dual mono)
     { { 1.000000, 0.000000 }, { 0.000000, 1.000000 },                                                                         }, // L + R (stereo)
     { { 1.000000, 0.000000 }, { 0.000000, 1.000000 },                                                                         }, // (L+R) + (L-R) (sum-difference)
     { { 1.000000, 0.000000 }, { 0.000000, 1.000000 },                                                                         }, // LT + RT (left and right total)
-    { { 0.865964, 0.865964 }, { 1.000000, 0.501187 }, { 0.501187, 1.000000 },                                                 }, // C + L + R
-    { { 1.000000, 0.501187 }, { 0.501187, 1.000000 }, { 0.707946, 0.707946 },                                                 }, // L + R + S
-    { { 0.865964, 0.865964 }, { 1.000000, 0.501187 }, { 0.501187, 1.000000 }, { 0.707946, 0.707946 },                         }, // C + L + R + S
-    { { 1.000000, 0.501187 }, { 0.501187, 1.000000 }, { 1.000000, 0.707946 }, { 0.707946, 1.000000 },                         }, // L + R + SL + SR
-    { { 0.865964, 0.865964 }, { 1.000000, 0.501187 }, { 0.501187, 1.000000 }, { 1.000000, 0.707946 }, { 0.707946, 1.000000 }, }, // C + L + R + SL + SR
+    { { 0.501187, 0.501187 }, { 0.707107, 0.000000 }, { 0.000000, 0.707107 },                                                 }, // C + L + R
+    { { 0.707107, 0.000000 }, { 0.000000, 0.707107 }, { 0.501187, 0.501187 },                                                 }, // L + R + S
+    { { 0.501187, 0.501187 }, { 0.707107, 0.000000 }, { 0.000000, 0.707107 }, { 0.501187, 0.501187 },                         }, // C + L + R + S
+    { { 0.707107, 0.000000 }, { 0.000000, 0.707107 }, { 0.501187, 0.000000 }, { 0.000000, 0.501187 },                         }, // L + R + SL + SR
+    { { 0.501187, 0.501187 }, { 0.707107, 0.000000 }, { 0.000000, 0.707107 }, { 0.501187, 0.000000 }, { 0.000000, 0.501187 }, }, // C + L + R + SL + SR
 };
 
 /* downmix coeffs



More information about the ffmpeg-cvslog mailing list