diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-05-02 02:25:57 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-02 03:12:10 +0400 |
commit | 6d5bf67f0475a54282b755ae21add252efc640b1 (patch) | |
tree | d61dab1a89d713832d8b9c5ff1651c0a44e22dfa /libswresample/rematrix.c | |
parent | 9b42653b22d43b89de96a00abe7fd61f9e048eb2 (diff) |
swr: add lfe_mix_level
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/rematrix.c')
-rw-r--r-- | libswresample/rematrix.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c index 7728445407..1eeb7173b6 100644 --- a/libswresample/rematrix.c +++ b/libswresample/rematrix.c @@ -216,6 +216,17 @@ static int auto_matrix(SwrContext *s) }else av_assert0(0); } + /* mix LFE into front left/right or center */ + if (unaccounted & AV_CH_LOW_FREQUENCY) { + if (s->out_ch_layout & AV_CH_FRONT_CENTER) { + matrix[FRONT_CENTER][LOW_FREQUENCY] += s->lfe_mix_level; + } else if (s->out_ch_layout & AV_CH_FRONT_LEFT) { + matrix[FRONT_LEFT ][LOW_FREQUENCY] += s->lfe_mix_level * M_SQRT1_2; + matrix[FRONT_RIGHT][LOW_FREQUENCY] += s->lfe_mix_level * M_SQRT1_2; + } else + av_assert0(0); + } + for(out_i=i=0; i<64; i++){ double sum=0; int in_i=0; |