diff options
author | James Almer <jamrial@gmail.com> | 2021-08-27 00:37:53 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:46 -0300 |
commit | 8a5896ec1f635ccf0d726f7ba7a06649ebeebf25 (patch) | |
tree | 0bacc18f14f855caa2e4b9155cec9f6953d36fc3 /libswresample/rematrix_template.c | |
parent | b2d6e7a2892445ceb14947ae7c959d55e34aba1f (diff) | |
download | ffmpeg-8a5896ec1f635ccf0d726f7ba7a06649ebeebf25.tar.gz |
swresample: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libswresample/rematrix_template.c')
-rw-r--r-- | libswresample/rematrix_template.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libswresample/rematrix_template.c b/libswresample/rematrix_template.c index add65e3155..d4726c4dbb 100644 --- a/libswresample/rematrix_template.c +++ b/libswresample/rematrix_template.c @@ -88,13 +88,16 @@ static void RENAME(mix8to2)(SAMPLE **out, const SAMPLE **in, COEFF *coeffp, inte } static RENAME(mix_any_func_type) *RENAME(get_mix_any_func)(SwrContext *s){ - if( s->out_ch_layout == AV_CH_LAYOUT_STEREO && (s->in_ch_layout == AV_CH_LAYOUT_5POINT1 || s->in_ch_layout == AV_CH_LAYOUT_5POINT1_BACK) + if ( !av_channel_layout_compare(&s->out_ch_layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO) + && ( !av_channel_layout_compare(&s->in_ch_layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_5POINT1) + || !av_channel_layout_compare(&s->in_ch_layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_5POINT1_BACK)) && s->matrix[0][2] == s->matrix[1][2] && s->matrix[0][3] == s->matrix[1][3] && !s->matrix[0][1] && !s->matrix[0][5] && !s->matrix[1][0] && !s->matrix[1][4] ) return RENAME(mix6to2); - if( s->out_ch_layout == AV_CH_LAYOUT_STEREO && s->in_ch_layout == AV_CH_LAYOUT_7POINT1 + if ( !av_channel_layout_compare(&s->out_ch_layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO) + && !av_channel_layout_compare(&s->in_ch_layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_7POINT1) && s->matrix[0][2] == s->matrix[1][2] && s->matrix[0][3] == s->matrix[1][3] && !s->matrix[0][1] && !s->matrix[0][5] && !s->matrix[1][0] && !s->matrix[1][4] && !s->matrix[0][7] && !s->matrix[1][6] |