diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-02-08 21:20:16 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-08 21:38:17 +0400 |
commit | b08f554fdc0886ab9815b2e3db3ae8a93baa57c8 (patch) | |
tree | 61c635d6564d23604f8de5dabe990315a9edc787 /libavresample/audio_mix_matrix.c | |
parent | 7f0f47b3df9d92eea0d1de94df29971b49f10777 (diff) | |
parent | 76a75c523cd3c63560185394a0a5cd7249db962a (diff) |
Merge commit '76a75c523cd3c63560185394a0a5cd7249db962a'
* commit '76a75c523cd3c63560185394a0a5cd7249db962a':
lavr: mix front center channel as indicated in the ATSC A/52 specification.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavresample/audio_mix_matrix.c')
-rw-r--r-- | libavresample/audio_mix_matrix.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavresample/audio_mix_matrix.c b/libavresample/audio_mix_matrix.c index 935ed5ad46..bcbe181a80 100644 --- a/libavresample/audio_mix_matrix.c +++ b/libavresample/audio_mix_matrix.c @@ -126,8 +126,13 @@ int avresample_build_matrix(uint64_t in_layout, uint64_t out_layout, /* mix front center to front left/right */ if (unaccounted & AV_CH_FRONT_CENTER) { if ((out_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 ((in_layout & AV_CH_LAYOUT_STEREO) == AV_CH_LAYOUT_STEREO) { + matrix[FRONT_LEFT ][FRONT_CENTER] += center_mix_level; + matrix[FRONT_RIGHT][FRONT_CENTER] += center_mix_level; + } else { + matrix[FRONT_LEFT ][FRONT_CENTER] += M_SQRT1_2; + matrix[FRONT_RIGHT][FRONT_CENTER] += M_SQRT1_2; + } } else return AVERROR_PATCHWELCOME; } |