diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-06 22:32:39 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-07 00:29:06 +0200 |
commit | 2dd2e429517d98b3bc97a432a699835ccc62e720 (patch) | |
tree | 0124c1142df7dd0f58b317bd80d2ffd510e89076 /libswresample/rematrix.c | |
parent | 323d9120104650891fd7cec83c93cdbdbbfb5af9 (diff) | |
download | ffmpeg-2dd2e429517d98b3bc97a432a699835ccc62e720.tar.gz |
swr: update rematrix coeffs to match AC-3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/rematrix.c')
-rw-r--r-- | libswresample/rematrix.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c index 26e76a2ed8..7652fd8a32 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); } |