Skip to content

Commit

Permalink
swresample/rematrix: handle 22.2 as a 9 channel layout
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jeeb committed Aug 18, 2020
1 parent c820c2d commit 1c7e55d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libswresample/rematrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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! "
Expand Down

0 comments on commit 1c7e55d

Please sign in to comment.