[FFmpeg-cvslog] swr: update rematrix coeffs to match AC-3

Michael Niedermayer git at videolan.org
Fri Sep 7 00:43:38 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Sep  6 22:32:39 2012 +0200| [2dd2e429517d98b3bc97a432a699835ccc62e720] | committer: Michael Niedermayer

swr: update rematrix coeffs to match AC-3

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libswresample/rematrix.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c
index 26e76a2..7652fd8 100644
--- a/libswresample/rematrix.c
+++ b/libswresample/rematrix.c
@@ -150,8 +150,13 @@ static int auto_matrix(SwrContext *s)
 
     if(unaccounted & AV_CH_FRONT_CENTER){
         if((s->out_ch_layout & AV_CH_LAYOUT_STEREO) == AV_CH_LAYOUT_STEREO){
-            matrix[ FRONT_LEFT][FRONT_CENTER]+= M_SQRT1_2;
-            matrix[FRONT_RIGHT][FRONT_CENTER]+= M_SQRT1_2;
+            if(s->in_ch_layout & AV_CH_LAYOUT_STEREO) {
+                matrix[ FRONT_LEFT][FRONT_CENTER]+= s->clev;
+                matrix[FRONT_RIGHT][FRONT_CENTER]+= s->clev;
+            } else {
+                matrix[ FRONT_LEFT][FRONT_CENTER]+= M_SQRT1_2;
+                matrix[FRONT_RIGHT][FRONT_CENTER]+= M_SQRT1_2;
+            }
         }else
             av_assert0(0);
     }



More information about the ffmpeg-cvslog mailing list