From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 2FE6A4562B for ; Wed, 8 Feb 2023 21:54:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 319E168BDB7; Wed, 8 Feb 2023 23:54:03 +0200 (EET) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 40E9D68BA58 for ; Wed, 8 Feb 2023 23:53:55 +0200 (EET) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 318LrswD020048-318LrswE020048 for ; Wed, 8 Feb 2023 23:53:54 +0200 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id 9E434A1527 for ; Wed, 8 Feb 2023 23:53:54 +0200 (EET) Date: Wed, 8 Feb 2023 23:53:52 +0200 (EET) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: Message-ID: <74f2769f-e219-62b5-2c70-557752f5926@martin.st> References: MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM Subject: Re: [FFmpeg-devel] [PATCH] swresample: try to fix regression X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Wed, 8 Feb 2023, Paul B Mahol wrote: > This one should pass FATE. > > diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c > index 80c194b066..067f646805 100644 > --- a/libavfilter/af_pan.c > +++ b/libavfilter/af_pan.c > @@ -313,9 +313,7 @@ static int config_props(AVFilterLink *link) > pan->channel_map[i] = ch_id; > } > > - av_opt_set_chlayout(pan->swr, "ichl", &link->ch_layout, 0); > - av_opt_set_chlayout(pan->swr, "ochl", &pan->out_channel_layout, 0); > - av_opt_set_int(pan->swr, "uch", link->ch_layout.nb_channels, 0); > + av_opt_set_int(pan->swr, "uch", pan->nb_output_channels, 0); > swr_set_channel_mapping(pan->swr, pan->channel_map); > } else { > // renormalize > @@ -335,8 +333,6 @@ static int config_props(AVFilterLink *link) > for (j = 0; j < link->ch_layout.nb_channels; j++) > pan->gain[i][j] /= t; > } > - av_opt_set_chlayout(pan->swr, "ichl", &link->ch_layout, 0); > - av_opt_set_chlayout(pan->swr, "ochl", &pan->out_channel_layout, 0); > swr_set_matrix(pan->swr, pan->gain[0], pan->gain[1] - pan->gain[0]); > } > This bit looks like a straight revert of the commit that broke fate, so that's probably ok. > diff --git a/libswresample/swresample.c b/libswresample/swresample.c > index 5884f8d533..7c8d9bfc97 100644 > --- a/libswresample/swresample.c > +++ b/libswresample/swresample.c > @@ -312,9 +312,9 @@ av_cold int swr_init(struct SwrContext *s){ > if (s->out_ch_layout.order == AV_CHANNEL_ORDER_UNSPEC) > av_channel_layout_default(&s->out_ch_layout, s->out.ch_count); > > - s->rematrix = av_channel_layout_compare(&s->out_ch_layout, &s->in_ch_layout) || > + s->rematrix = !s->channel_map && (av_channel_layout_compare(&s->out_ch_layout, &s->in_ch_layout) || > s->rematrix_volume!=1.0 || > - s->rematrix_custom; > + s->rematrix_custom); > > if(s->int_sample_fmt == AV_SAMPLE_FMT_NONE){ > if( av_get_bytes_per_sample(s-> in_sample_fmt) <= 2 I really can't say about this part of the patch though... Can we maybe just do it in two parts - revert the patch that broke fate and find someone other than me to comment on the swresample bit? // Martin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".