Message ID | AS8P250MB0744430AC8A280C1524F4E0D8F1B2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM |
---|---|
State | Superseded |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1509:b0:1a9:af23:56c1 with SMTP id nq9csp2270838pzb; Mon, 29 Apr 2024 14:16:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXFhvYlo6kpiDxiIndtxJjDk+csAe3Yo0fK9RFWszbGxKKiX6+EbdlXEoAjmU3Ign/9z9qxrt2Wne6mZCSfXAPa6kyfBOsrDLXiaQ== X-Google-Smtp-Source: AGHT+IHdcZTwZSLckc+9SSM6w5rCdzgn7kvs+MiEM3EdAKFjOpeQQqzFDzHCF55HM9UTuoGvIuXz X-Received: by 2002:a17:907:31c2:b0:a58:a102:14c9 with SMTP id xf2-20020a17090731c200b00a58a10214c9mr8527814ejb.1.1714425361849; Mon, 29 Apr 2024 14:16:01 -0700 (PDT) Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id o20-20020a1709062e9400b00a587d7985f1si8502907eji.535.2024.04.29.14.16.01; Mon, 29 Apr 2024 14:16:01 -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=NTiU5Qrx; 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 6950368D542; Tue, 30 Apr 2024 00:15:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02olkn2107.outbound.protection.outlook.com [40.92.50.107]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8204068D537 for <ffmpeg-devel@ffmpeg.org>; Tue, 30 Apr 2024 00:15:39 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WGHau6j8eUYttUiw0Lx2qY180Unj/1IEexIOPZgZXFO/S5yyY5VJv+SCHgTdoIyOHPo+nLscG7d/vin7qkSt+OKnQt3YFDPo10TxFNPY269tIrS5+djjxqWW7SWY7o1rm4ueSQbdxsnnYP9LtFsPmy22MDyw0UMZINUgwOIxrVtY0mBd4MZxgm7xvSHNORpOVWGN/2Gtr3wuH01it79190TFM/VTZPwexJRBSyvuD3kVxlqGrbm7TLc1r3Bk9Fapz2JUyvSxH7QEhuTxSun+BI7sPLYjDy0BUe13+Je9O/FVAhewqYNxhJPPBmRhXDEX2YQsLQFLqcVCBLQ3Z4i9BA== 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=TTkN6Xwy86gjfD221gPqNJwN1mlaZ5elfW90ZzJqHnA=; b=CZew1Sbt5jpZrNmakNPTCWFlwQVZfC86bs3rlWDqmBesFylXlbVQXahEsNKqtW1g0ILgXonzoQUYiR3QK8bZytnA4GauA0eyNaK34dZL7TbAklqUzzX8RfI167KKgy8HCmbIFWnsnep0jGNFhJ31CQKly9Glz/wD84SCSNR5yA3Jc2oYX5fCPQjpCsrrZDmuOBTe/J6MBkKRgQcWu8cukwUAz2ntzJp4mLWCoCaWuliclNSNoV/mR389zpBdA0SE//GbZoiZyenGYWBo3uCOyRTOjHs/QDHHZUjEkUk0zGzgJfe6V3G38tbWjaXguYqfAT+23ovDfKE8NQ1uyCVz1A== 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=TTkN6Xwy86gjfD221gPqNJwN1mlaZ5elfW90ZzJqHnA=; b=NTiU5QrxwjgWoz+JT5flD3P85fBbdK9uBo5XdZhEqbmUkxRwFFuu2jGXAA6ebcnatm56a35+7pHv9G7OgzzlqKzPZWV8f07BE0wb9twZ7VracoHgXKnqmdTpabx1IirNabS6MM5Ptk194UTyKrhiVmK0YkFhDXyicfpJTTFSCyRbhlgytDjuH2+J+eifnIQKcdyy8HApMNa3Cc0/RKJKw4fVvp6dZEqxuJ48yvtBhVCTJ4sfWpC1hyuFzh4stM90HT8ONxo4XMKxQAfMLxy82ndmTKP9cXwc9ZP4Gctaz6v4XYqTqQL/3A8IHxoaDItNHMQQYx5pijEEOuapmrZhvA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0372.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Mon, 29 Apr 2024 21:15:37 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::1f29:8206:b8c3:45bb]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::1f29:8206:b8c3:45bb%3]) with mapi id 15.20.7519.031; Mon, 29 Apr 2024 21:15:37 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Mon, 29 Apr 2024 23:14:02 +0200 Message-ID: <AS8P250MB0744430AC8A280C1524F4E0D8F1B2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> X-Mailer: git-send-email 2.40.1 In-Reply-To: <GV1SPRMB0021759DDCCEFEB3B9609B808F1B2@GV1SPRMB0021.EURP250.PROD.OUTLOOK.COM> References: <GV1SPRMB0021759DDCCEFEB3B9609B808F1B2@GV1SPRMB0021.EURP250.PROD.OUTLOOK.COM> X-TMN: [g7QLGvt3+978ne/Wh4DTAdP/g7yPKHkc9YqQKU9XpOo=] X-ClientProxiedBy: ZR0P278CA0199.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:6a::21) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20240429211438.3274834-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0372:EE_ X-MS-Office365-Filtering-Correlation-Id: 67ef797c-42cf-4f39-ebd1-08dc68918417 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|3412199016|440099019|1710799017; X-Microsoft-Antispam-Message-Info: zcv6uDVvzP9k7aG6FTUJxYc3cD/EXGvgTvfE4k/NWBkBmqnWZ/fJtQsQlyJZbQREHJlrNbabHVHgxw0QqRduUYqWNNdrUFM9SqVuNYFelAqd/PTTP1g9SCe5qn4mDHhPVL5FN/Fp65MBoVZ4TPqzfkChr4L28hv9wF7/JmmdnEs31Jx9oK5P4pflskwLO+7lSqiGd/vAzJS38BAU44AqSYRRHqCXGiO7pl8ubpnU8AKQLY13n/xh5rrcNTQnNhaR7/eUWCjnsGlGAOV3RO1S+tCPGMcxodGBffJxW3cLm+LAK4XJtSzLI9Hpu8mnqEt7xdKmdgcSGjpAKtqCaGDl5BDL9jqcBr1iFY+1loxmvHm22IVC3YVUS5MgB/dwI6ZCHd8q/sBJS3kv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wI2KYbq7MkRF03We4ap8wPIugxbrenVWb6E4XBeeGygm1rjnpz8Bu96DvIwKc3rTRT23TNblbczCsgahZ04HpIX8ZDEMKc8AEB3JfV9ToEADs7P2kEo6p/iG78ACEw21qq6tShdGJ/EvL6XCiFU08VkZOhehVGjWOz5+gw5SwCTVkQZzGsCN2Do1iug+HgKRGeo3tMst2Db84TqFSjtaRpRuG8RJubg9yMGWOgCJ57hltOt16rLFyh1EpWdiV8E8h7sixoT+WMOJCFHDTgQ1vxx9C8GdLFQ8fk/W2K0JI+tK/SU8fcgGjmqKclFd79eUDuaBkrRgONP9mA7S1d2+KxiQsTIj2JRmdXeEjMFHRq2/g4k18mhac2u06S/goaSaqLFYvFNMVl1t6pVlOU/nw3ubhHOCuApgAaZTjY0EV+JxzoDMJH7RuAmbG13N1ZTPFXEweFY1uloYaqywQ2lokx/ffuGuOi+bKhqQxihMEJNXDjPOyPWV2QrJnFd5VL/oqOt0giw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 67ef797c-42cf-4f39-ebd1-08dc68918417 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2024 21:15:37.7598 (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: PR3P250MB0372 Subject: [FFmpeg-devel] [PATCH 21/57] avcodec/mpegpicture: Reduce value of MAX_PLANES define X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: cP4L3EWxbB6Q |
Series |
[FFmpeg-devel,01/14] avcodec/get_buffer: Remove redundant check
|
expand
|
diff --git a/libavcodec/mpegpicture.h b/libavcodec/mpegpicture.h index 363732910a..8e3c119acc 100644 --- a/libavcodec/mpegpicture.h +++ b/libavcodec/mpegpicture.h @@ -27,7 +27,7 @@ #include "motion_est.h" #include "threadframe.h" -#define MPEGVIDEO_MAX_PLANES 4 +#define MPV_MAX_PLANES 3 #define MAX_PICTURE_COUNT 36 #define EDGE_WIDTH 16 diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 57c1f7e423..bef7c399c2 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -256,7 +256,7 @@ typedef struct MpegEncContext { uint8_t *mb_mean; ///< Table for MB luminance int64_t mb_var_sum; ///< sum of MB variance for current frame int64_t mc_mb_var_sum; ///< motion compensated MB variance for current frame - uint64_t encoding_error[MPEGVIDEO_MAX_PLANES]; + uint64_t encoding_error[MPV_MAX_PLANES]; int motion_est; ///< ME algorithm int me_penalty_compensation; diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 63c280c2ba..47e97999af 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1634,7 +1634,7 @@ no_output_pic: } else { // input is not a shared pix -> reuse buffer for current_pix s->cur_pic_ptr = s->reordered_input_picture[0]; - for (i = 0; i < 4; i++) { + for (int i = 0; i < MPV_MAX_PLANES; i++) { if (s->new_pic->data[i]) s->new_pic->data[i] += INPLACE_OFFSET; } @@ -1861,12 +1861,11 @@ vbv_retry: if (avctx->flags & AV_CODEC_FLAG_PASS1) ff_write_pass1_stats(s); - for (i = 0; i < 4; i++) { + for (int i = 0; i < MPV_MAX_PLANES; i++) avctx->error[i] += s->encoding_error[i]; - } ff_side_data_set_encoder_stats(pkt, s->cur_pic.f->quality, s->encoding_error, - (avctx->flags&AV_CODEC_FLAG_PSNR) ? MPEGVIDEO_MAX_PLANES : 0, + (avctx->flags&AV_CODEC_FLAG_PSNR) ? MPV_MAX_PLANES : 0, s->pict_type); if (avctx->flags & AV_CODEC_FLAG_PASS1)
No mpegvideo based codec supports alpha. While just at it, also make the define shorter. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/mpegpicture.h | 2 +- libavcodec/mpegvideo.h | 2 +- libavcodec/mpegvideo_enc.c | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-)