swr: update rematrix coeffs to match AC-3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-09-06 22:32:39 +02:00
parent 323d912010
commit 2dd2e42951

View File

@ -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);
}