aboutsummaryrefslogtreecommitdiffstats
path: root/libswresample
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2020-08-07 00:35:55 +0300
committerJan Ekström <jeebjp@gmail.com>2020-08-18 22:47:35 +0300
commit1c7e55dd504245d71444fac1a73e5370cc76fede (patch)
treef22fcddd9951ec546a9d624de29140e37fd59178 /libswresample
parentc820c2d4bfb7e2573f7bf8e2a3544a98e5a11343 (diff)
downloadffmpeg-1c7e55dd504245d71444fac1a73e5370cc76fede.tar.gz
swresample/rematrix: handle 22.2 as a 9 channel layout
This is as far as 22.2 follows the same channel order as WaveFormatExtensible's channel mask (and the AV_CH_* defines). After LFE2 the side channels would follow, but that offset of one stops us from utilizing them without further tweaks. This change was verified by using swresample to downmix to 5.1, and then feeding that to WASAPI.
Diffstat (limited to 'libswresample')
-rw-r--r--libswresample/rematrix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c
index d0c4a212b3..94b3de88f6 100644
--- a/libswresample/rematrix.c
+++ b/libswresample/rematrix.c
@@ -143,7 +143,7 @@ av_cold int swr_build_matrix(uint64_t in_ch_layout_param, uint64_t out_ch_layout
if (in_ch_layout == AV_CH_LAYOUT_22POINT2 &&
out_ch_layout != AV_CH_LAYOUT_22POINT2) {
- in_ch_layout = AV_CH_LAYOUT_5POINT1_BACK;
+ in_ch_layout = (AV_CH_LAYOUT_7POINT1_WIDE_BACK|AV_CH_BACK_CENTER);
av_get_channel_layout_string(buf, sizeof(buf), -1, in_ch_layout);
av_log(log_context, AV_LOG_WARNING,
"Full-on remixing from 22.2 has not yet been implemented! "