From patchwork Tue Oct 5 20:53:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30905 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp5776335iob; Tue, 5 Oct 2021 13:54:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsO09J+J+lInpjg3/NazpBGjxjIrNysOmik65cPqWaFxD76bxxM7B2bbC85WBbSlQ2+Gbu X-Received: by 2002:a05:6402:5194:: with SMTP id q20mr28723802edd.245.1633467276355; Tue, 05 Oct 2021 13:54:36 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id mp6si33686541ejc.384.2021.10.05.13.54.34; Tue, 05 Oct 2021 13:54:36 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=q55CXZfL; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A968F68AA26; Tue, 5 Oct 2021 23:54:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-oln040092072058.outbound.protection.outlook.com [40.92.72.58]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4BF8568A9CA for ; Tue, 5 Oct 2021 23:54:13 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cHGEKCPxXZKfJuyw8HLdw7hRlCLxE/dks+pbWFkKWn0jYTcSEfzrID3YLi/BwOMF1TX88DfuCi/AjEvx7GVXxnnaUFiiewrvSx4677yoqM9RBONfz5MrU61QNy/lhLDsxJQIMOa9cvIzDxDQGKINWEyzqRM//LNozBy3OSuIEqrbXhXl06MIUlass+xgeceEmsLAiyKzJyd4R/hh2yyUfYX6tZaG1iJ5ethpuNcO5tkPtHDBcCLJAO5uLcvlkPu3X6oL6SNn8B4Y7Xj3TQGF/74/Rp6ImoIvJeTKXgAMzdN1JCvTQa9xyWQonGMmX8RrNnp7VWDNpgIvT2O/cTZigg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wYgs6EEH+84iGS91gj/jwEKDAeIymc7zm0PV4F4ER94=; b=QvmShM5SdqcVLi/u9ietD/lx31THwzdEGKXzkQe+doWjXsj7hnwXbiFGyONdc13nj7y9n/djYWWqoeRpEgYdxWrVSjEwWgx4NlnLkOzQg8Jb0WAxcoXXOxH/FO9xxaCZm0yF5xjt5fv7jHCflsvFmV+qPgqtWGwNu52tTSgIdy1YLajADf5FXIl+RNz3s9IXGTha7b10bVc/DbZ5/ZtDV5pNXrh1kN8nbXkSc8mo0ID+IV3sw5Xuv56o2uAvs18k4aCNFl1EBWbDDxCay+fO6b3fbRZ2F+vQ6VlblTBd4ednuiHpSuwrHNtQzWoJd0my69dYCM6j7AEaueysy3L+lA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wYgs6EEH+84iGS91gj/jwEKDAeIymc7zm0PV4F4ER94=; b=q55CXZfLCpNx+Hok0stII0aBEDTmTH8r+ud+Tbb1jgrJjpCJS4k5q/++GNU82MXd4SOulKpJfjTyIQXiJ9x5zn2H/hqY8mR3EmO9BfnWXpMAepqagK46/7lUmRWs/Qid0Idp/2jy9ruDHpxki/t3G5gHA5qGE7rvnEAoy2V6RCRxo2xvf3B1Ob2XIp0W6lrigPZcHtwFoMCmPeKzLoWGd+PTa6wFUeEItYTU8LEpbXaW6i/Nu1OsYBIqxF4QRd2GhiGxPPheQrN5v3IzPYSY7CyjU56aX8qDmsTdPvltLvSs8HhWl/k+InSDomXn1NAs9l9Er2LxI39yEpwnkmJYhQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM7PR03MB6184.eurprd03.prod.outlook.com (2603:10a6:20b:141::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.17; Tue, 5 Oct 2021 20:54:03 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51%7]) with mapi id 15.20.4566.022; Tue, 5 Oct 2021 20:54:03 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 5 Oct 2021 22:53:45 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [eBNg1CpDpjB+5HuoS+M3ekNUVDPNCNb1] X-ClientProxiedBy: AM4PR0701CA0040.eurprd07.prod.outlook.com (2603:10a6:200:42::50) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211005205348.519944-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM4PR0701CA0040.eurprd07.prod.outlook.com (2603:10a6:200:42::50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.8 via Frontend Transport; Tue, 5 Oct 2021 20:54:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fcffdf5e-ec65-475d-47cc-08d98842438a X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiS+KSxcjYi+gKEA6YP+MkHewkA9U743nFgooSScvIGDDKl3mbvz1oJLy0uEBAOHA2DFNT9gOd7y0niQNRNPhW8pjWXL9XQ0NQJAGuJIKEuTIn2KHi86N0iRn1l0/VkzckDBa5C2EXXEaGPIzdUdr/gX+NVxIR4hpXQ09RMxyL2RmvASo2d7Ys04DEzoFjlDx1NmV1XugKqm5AKTt2ukuDdmUmlrld7H9eXDBYo6dPXnq0n9cJoboXDr7z6Wj+DVouq2lMyoJk9Uk9LupSp08zjLJqNGG/YutRq/cw7COzvOFHqbz094Jj7AmNZcABVJL8y3azbBokrQOFhLwR3cyoU/OkCIy/mYyM5hHMN5z2jIH8CycNOXRnf+gY05WT3waY9HA7AASEWL1txuUVp3VXe1uXa+WciHuW0L3I/BIZEnKBwEuk1pzymWmVVhG9tR0n7zxAdB5JcwY7pjX0FK0FbWYZyziG/9LnJGjrivspGTKDazOgqNNjPASSK75c4DKPMYNSA1CLx8kYWcyXsmVrfZ4nu8La5rUUE5410ImHud39w/djilarcC3pf7Xg37Ye/npJEu75utK4tL9Km0Fzxmbyrd7m22QxqFtxtbOHIOK5xmAKw1RITVEVIES8p0gjy7gGuiprrOA6yWGoU7iHdzLz+wVrl6lRzAIUqk3M8/CFyuRujtA1XDbQrKINRaH4G1gxC/qKrHANXQZJo8nD0E9Ss6A0LjnYj6/hNSoY198o7nSbciGYTQH7NTC5VSQGI= X-MS-TrafficTypeDiagnostic: AM7PR03MB6184: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fDHLFqMiUiDJBZfEPgPf4Akag/fAYfj9mKO64geeECsC3MyEkI2hYF755nkSr+RGIl79i79efncPO4a9evRd0X2UKmnJFHhDaAevZgX0jADz1dqew0F94bxHNpSOOmJRtkWphKag6B+GGRCye85X64j4SNCL6CpgrkiEn6S7xLScH3GdoS3+ZUt6eEDJU+sL7o2tjFnw9DzWUXFWWsSBWkrH2zElc1YbXr3ihZmK0ka8oTtPcsu6di2tkf4ac6t+0qdPLji+itTb2I2w/yFw3MHTSUPWMUqUWGuZ+xLHqlWHqGyuUaVcz5WBF7hb1oBRTDHvF5aib3irf375en/WimpwVY8JiN9e396ruhUzaEccYwLT0hc+mMKdTVeYK3rBB7SeSzsbYzEo+KrktNEMOKX6xlUwhQIvyq56+gHENqa1oBmm6bSVg18ODkn+g3cl X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4v0m2bwYyjOA6mU4Gw7SV3rGfZg6wytJGzkfFkwqLawC1UBLNpt7HHyap49rlwtPe8TSfqovlX+IKOzgvnw8AcDRfN1H5CWOIE38H+X+CgcTM5laFKD9rZdpBrvum48W7YN685vifWQZr6G8fNCueg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fcffdf5e-ec65-475d-47cc-08d98842438a X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2021 20:54:03.3982 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR03MB6184 Subject: [FFmpeg-devel] [PATCH 5/8] avfilter/vf_scale: Reindentation 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: sbHtAd7niH+8 Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_scale.c | 45 +++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 993fd18620..44f85cb019 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -341,34 +341,35 @@ static av_cold void uninit(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { AVFilterFormats *formats; + const AVPixFmtDescriptor *desc; enum AVPixelFormat pix_fmt; int ret; - const AVPixFmtDescriptor *desc = NULL; - formats = NULL; - while ((desc = av_pix_fmt_desc_next(desc))) { - pix_fmt = av_pix_fmt_desc_get_id(desc); - if ((sws_isSupportedInput(pix_fmt) || - sws_isSupportedEndiannessConversion(pix_fmt)) - && (ret = ff_add_format(&formats, pix_fmt)) < 0) { - return ret; - } - } - if ((ret = ff_formats_ref(formats, &ctx->inputs[0]->outcfg.formats)) < 0) + desc = NULL; + formats = NULL; + while ((desc = av_pix_fmt_desc_next(desc))) { + pix_fmt = av_pix_fmt_desc_get_id(desc); + if ((sws_isSupportedInput(pix_fmt) || + sws_isSupportedEndiannessConversion(pix_fmt)) + && (ret = ff_add_format(&formats, pix_fmt)) < 0) { return ret; - - desc = NULL; - formats = NULL; - while ((desc = av_pix_fmt_desc_next(desc))) { - pix_fmt = av_pix_fmt_desc_get_id(desc); - if ((sws_isSupportedOutput(pix_fmt) || pix_fmt == AV_PIX_FMT_PAL8 || - sws_isSupportedEndiannessConversion(pix_fmt)) - && (ret = ff_add_format(&formats, pix_fmt)) < 0) { - return ret; - } } - if ((ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0) + } + if ((ret = ff_formats_ref(formats, &ctx->inputs[0]->outcfg.formats)) < 0) + return ret; + + desc = NULL; + formats = NULL; + while ((desc = av_pix_fmt_desc_next(desc))) { + pix_fmt = av_pix_fmt_desc_get_id(desc); + if ((sws_isSupportedOutput(pix_fmt) || pix_fmt == AV_PIX_FMT_PAL8 || + sws_isSupportedEndiannessConversion(pix_fmt)) + && (ret = ff_add_format(&formats, pix_fmt)) < 0) { return ret; + } + } + if ((ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0) + return ret; return 0; }