From patchwork Sun Mar 31 05:30:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 47676 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9f96:b0:1a3:b6bb:3029 with SMTP id mm22csp94124pzb; Sat, 30 Mar 2024 22:30:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW1uUh5nn8JYAFJQdUAXcHobe74kWUL4xq6GfTk/oulv3H/4NYYcH55nsejBiDFA/r1Y3/xqZ8BEZeYTDxNjBuABAeZSTwQ7olSWA== X-Google-Smtp-Source: AGHT+IHEBpCzhpmDX/KSvbsDlA0EVkvDjtaVf6UfgLbbuHHkXQWd/Za01YLdrByuJWb/w2CkkhQH X-Received: by 2002:a17:906:7251:b0:a4d:f682:50cd with SMTP id n17-20020a170906725100b00a4df68250cdmr3478629ejk.4.1711863057850; Sat, 30 Mar 2024 22:30:57 -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 h13-20020a170906110d00b00a4671c9ae68si3295192eja.489.2024.03.30.22.30.57; Sat, 30 Mar 2024 22:30:57 -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=FQKzOixL; 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 5515368C444; Sun, 31 Mar 2024 08:30:53 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2035.outbound.protection.outlook.com [40.92.89.35]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5230A68BF41 for ; Sun, 31 Mar 2024 08:30:46 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AhzNoaOscmSrC1XA+oNml1k0Gi2chtCe8yGPXrpFGb3/RM1s1PeDmDgWqzL04FukkdVVN30hz0ZUukhNOFt92leST8NqbjUZtzs23DddbWpnYBWnIVm/jUftX1xtsqBHxosr3ZdJfTRpUajTT5f5MHRpXYJCzGvP2OwYBQDdeUdu3AOnhgaAN5sRAEJ9hZV2H/R08RFy665qy6hruxBW8DwwWBnzxQk2zWNcsspEQ5h4RMYvBXZEVwDlCJgaeXgmemgRAp2hO8oowo8szsXiNWMlwEGIx2YHyEizAqyMfbsSHC10GO2kf1dizlnkHHZX0ZoMWWSWHJKWws9Do5w1mg== 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=78qlzlA5YuLks/DWBNzdgdOERBV1UhaGIH/UK/+vfqo=; b=W6Ejs6PtWMO9Q2ggQHu5m6WLcP29y2CiEgS45wngRIN8qV7o7Du4C44XTsLZuxsCIRLUtU+liss2kE0M6FldHahlP8+YYP+lKijQHjhC2tKcZ1IF0NUQ6St0d7kAJ4qxCyJzvnimnWr7ddP16JBtPzj4970jMudYe/EHIxyDvVKnCOp9jv3T4Bz7OuhfDS2K1u6SGLbmAG+myfeG86PpLnMiP1XnqCDkAyt4OyXLoUIP9iQBPhaD28H+p10N5lg1UT4b+nAu+WEqCUASSHAs/IB28J3cb3PAWV5A3kskOCmMwbdALLOHBsZa1tym39hC0oYsZsfRPwmULY+syIifLg== 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=78qlzlA5YuLks/DWBNzdgdOERBV1UhaGIH/UK/+vfqo=; b=FQKzOixLgryXhKmmBb+f7pfiO+F/sIXiO+ltJjkqgkeg7rYDLxDMsZPWIGVe3y4I46joGRyohMbfhjk9W5GYbJ4F/Kf9gIc7nGNY4fcr2txUln+bs3ltDxddSSMByXXz1zxkebel5lyBlEsYUhjC4W9rDW7VrHLfkLysg7xnF4s4J7vv+JNs0vjiQOUrba+UMRAk9PPg8xg8Xjt8jHachXxdiriP2xYcqG2cC6tk9julDJ7IwPGksIQw3pFtZjr4IIYj2u0up+pjs/Kb7eDCrx77aVlayLGh1V0XB0qfIyEXtUPCGcOsIYUGuJ+xzV1kc3YSssxOWswJsdalVsREiQ== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AS4P250MB0416.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:4c3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.43; Sun, 31 Mar 2024 05:30:43 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::4a3b:cf76:cddc:c68d%4]) with mapi id 15.20.7409.042; Sun, 31 Mar 2024 05:30:43 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 31 Mar 2024 07:30:26 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 X-TMN: [e0xAvUrGEPDIeRHmfbVrX6FUzTWJtrYpapCj2UvpzrE=] X-ClientProxiedBy: ZR0P278CA0126.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:20::23) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240331053035.293689-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AS4P250MB0416:EE_ X-MS-Office365-Filtering-Correlation-Id: 72513bb4-ae83-4232-116c-08dc5143b5ad X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /JTTFyuB+xGsgIl3GB1YXVmdnFkc5D/6ijpJ+9r9k4yeewIt2Rl8A54avBGGKl3T4JlWZT22mddMNQFM60JIU0i9iJ1XscfeWD7RpJ2iy9zKMihIsFvGUkcXj2FRB+ybXLB3ARon6fh35K8dEKub9kEdTqNRBtOoE5sxbIU0fI5QKXAuepkipHAQr8WbsfYWLp2Un9TOUPIQssYGNXMek46luuqpnSddLJnYpcX6417GbW1s/hJkrz34rsxusLatex/+fV5k2BYVTpiPKG/Cm9EIioN4+FmlXc5Gd+c/cUMHE2M7VpR8MV8bM24xqFtHAUN+E/aUwJZ80FhKsDqmf6FZrFtWV9OP3Q3w0HiVtzrBXye9pxGZmhhwJ8Ay4UFV8aOLK1+MEgGpdBk4i+wBVfiWaOENhn4jtYIlTnErAinB+MlmiehMQHDJzSOBUo1v/I2c61U7XAwPVmL3Bmym3g+kvdOxP7udMtuYdwYlex+GgYQdzNvYJWmEXGroNCmYEAhK+N/VCfNWvcuWwSJFx6eygeftIu7H4zX1+4Dt5sHCTyJLSEsKsUCyu9v2UXu5ir4/X01O0TUjxhrTSksehgoelKcg4h0PDb+aAXVxq39F7z1QrVFWIgxCPLN+Thys X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange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YADrhTsCUEu4owmaPcycTpw7igXMcr0S9LnXBNESl3l7K1Uc7nPBrhPjmylzWzm+hEfW4ryduqKMNlIHJIsqQ8WOlk+UWsFYPvH6glzcI+HQByzjmYeqs45Wv6D875nPMqznb1iredFFKcwOzQBDNSDeLBEzqlTNDFSamZu1Kue/SbNmXcNdI4rF/zJZsf1MQC8GG2my7YmG3D7kvP0xiLviAUy4wi1QltzVAmpGClEPg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72513bb4-ae83-4232-116c-08dc5143b5ad X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2024 05:30:43.5355 (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: AS4P250MB0416 Subject: [FFmpeg-devel] [PATCH 01/10] avcodec/libvpxenc: Avoid unused-variable warning if VP9 enc is disabled 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: 2e0HLlshnr5/ Signed-off-by: Andreas Rheinhardt --- libavcodec/libvpxenc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 635cdf7a0e..bcbdc4981e 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -49,6 +49,9 @@ #include "libavutil/opt.h" #include "libavutil/pixdesc.h" +#define IS_VP9(avctx) (CONFIG_LIBVPX_VP9_ENCODER && avctx->codec_id == AV_CODEC_ID_VP9) +#define IS_VP8(avctx) (CONFIG_LIBVPX_VP8_ENCODER && avctx->codec_id == AV_CODEC_ID_VP8) + /** * Portion of struct vpx_codec_cx_pkt from vpx_encoder.h. * One encoded frame returned from the library. @@ -359,8 +362,7 @@ static int frame_data_submit(AVCodecContext *avctx, AVFifo *fifo, FrameData fd = { .pts = frame->pts }; int ret; -#if CONFIG_LIBVPX_VP9_ENCODER - if (avctx->codec_id == AV_CODEC_ID_VP9 && + if (IS_VP9(avctx) && // Keep HDR10+ if it has bit depth higher than 8 and // it has PQ trc (SMPTE2084). enccfg->g_bit_depth > 8 && avctx->color_trc == AVCOL_TRC_SMPTE2084) { @@ -372,7 +374,6 @@ static int frame_data_submit(AVCodecContext *avctx, AVFifo *fifo, return AVERROR(ENOMEM); } } -#endif fd.duration = frame->duration; fd.frame_opaque = frame->opaque;