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 8C9A8411C6 for ; Tue, 15 Feb 2022 12:35:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D6A1B68B1BA; Tue, 15 Feb 2022 14:35:05 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2CA1168AE7C for ; Tue, 15 Feb 2022 14:35:00 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id C1C3A240179 for ; Tue, 15 Feb 2022 13:34:59 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id vGkZQ7UsZTih for ; Tue, 15 Feb 2022 13:34:58 +0100 (CET) Received: from lain.red.khirnov.net (lain.red.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.red.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 284EE240175 for ; Tue, 15 Feb 2022 13:34:58 +0100 (CET) Received: by lain.red.khirnov.net (Postfix, from userid 1000) id 251691601AD; Tue, 15 Feb 2022 13:34:58 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <832026c0-e14b-e09d-02e2-d5cd2d24c560@gmail.com> References: <20220113015101.4-1-jamrial@gmail.com> <20220113020913.870-6-jamrial@gmail.com> <164492580482.19727.5709579514076305797@lain.red.khirnov.net> <832026c0-e14b-e09d-02e2-d5cd2d24c560@gmail.com> Mail-Followup-To: FFmpeg development discussions and patches Date: Tue, 15 Feb 2022 13:34:58 +0100 Message-ID: <164492849812.9519.11290235629692641793@lain.red.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 275/281] avfilter: convert to new channel layout API 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Quoting James Almer (2022-02-15 13:27:37) > On 2/15/2022 8:50 AM, Anton Khirnov wrote: > > Quoting James Almer (2022-01-13 03:09:07) > >> @@ -212,31 +212,31 @@ static int config_input(AVFilterLink *inlink) > >> return AVERROR(ENOMEM); > >> for (ch = 0; ch < s->nb_in_channels; ch++) > >> s->input_levels[ch] = s->level_in; > >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_FRONT_CENTER); > >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_FRONT_CENTER); > >> if (ch >= 0) > >> s->input_levels[ch] *= s->fc_in; > >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_FRONT_LEFT); > >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_FRONT_LEFT); > >> if (ch >= 0) > >> s->input_levels[ch] *= s->fl_in; > >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_FRONT_RIGHT); > >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_FRONT_RIGHT); > >> if (ch >= 0) > >> s->input_levels[ch] *= s->fr_in; > >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_SIDE_LEFT); > >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_SIDE_LEFT); > >> if (ch >= 0) > >> s->input_levels[ch] *= s->sl_in; > >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_SIDE_RIGHT); > >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_SIDE_RIGHT); > >> if (ch >= 0) > >> s->input_levels[ch] *= s->sr_in; > >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_BACK_LEFT); > >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_BACK_LEFT); > >> if (ch >= 0) > >> s->input_levels[ch] *= s->bl_in; > >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_BACK_RIGHT); > >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_BACK_RIGHT); > >> if (ch >= 0) > >> s->input_levels[ch] *= s->br_in; > >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_BACK_CENTER); > >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_BACK_CENTER); > >> if (ch >= 0) > >> s->input_levels[ch] *= s->bc_in; > >> - ch = av_get_channel_layout_channel_index(inlink->channel_layout, AV_CH_LOW_FREQUENCY); > >> + ch = av_channel_layout_index_from_channel(&inlink->ch_layout, AV_CHAN_LOW_FREQUENCY); > >> if (ch >= 0) > > > > Make all those compare to AV_CHAN_NONE > > ch is an index, so either >= 0, or EINVAL. right, nevermind then -- Anton Khirnov _______________________________________________ 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".