mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavr: mix front center channel as indicated in the ATSC A/52 specification.
When mixing 3 front channels into 2, the center channel is mixed into left and right with the center mix level, not -3dB.
This commit is contained in:
parent
c0c45188e5
commit
76a75c523c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user