From patchwork Tue Jul 23 18:48:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 50716 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:a742:0:b0:482:c625:d099 with SMTP id f2csp2815102vqm; Tue, 23 Jul 2024 11:48:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVm+X0qA/Fk9DMLTf+JK5XIbi6l7XlqYjEQwf+bsG+s1wkqTTwhico9d50G3EQmJDL2AKvURpiSASDK4CC+Hrk++ckRJuRLTfBoxA== X-Google-Smtp-Source: AGHT+IEe//Icpt6OPTsKydoyAK8OSGwtTm4soeKY6c6u7FFuXJQZkiAjbiR71QEIF7zr3ifsj/BG X-Received: by 2002:a2e:2e09:0:b0:2ef:2b45:b71d with SMTP id 38308e7fff4ca-2f02b741b1cmr5124521fa.24.1721760526409; Tue, 23 Jul 2024 11:48:46 -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 4fb4d7f45d1cf-5a30ce93beesi5799767a12.690.2024.07.23.11.48.45; Tue, 23 Jul 2024 11:48:46 -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=iwJgjpZH; 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 E252A68C8B6; Tue, 23 Jul 2024 21:48:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from TYVP286CU001.outbound.protection.outlook.com (mail-japaneastazolkn19011027.outbound.protection.outlook.com [52.103.43.27]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0477D68C8B6 for ; Tue, 23 Jul 2024 21:48:36 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eYmTuGcDklAmbBeA4odnIKe5aRV7ET2JEkvGcQgcRObfr1d1ZM4ThvLCiHYHeHKx9jAPqFcn65v4yaDHSkJRmXEm8PnJcD5TupEM2jQdpiGFyZlF0KH+2c7aoRM0kTTfF6cDEUESq0BdlkM/IR/NSLeDA9o6CXplXfUSYcFbx9kt2RjyUz+G5OvaziF2/uJ9l7Hv2KgjZ+0R0aBWRLiSJDSHExbIX8ujBNB0CIYIyDsqq40LEhl9d91WUA1ScISQQV5ryhPVMbhcGUoM0+luUYwUkvTJO2d8iAGenfPTI3SzI3RadJEGDia6vaWa0SIm1dR7yFHmTQUC9HWordie2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=6/pz2H7o7vhaDBvMWmW9Rsu5+c/PYwXdlwMZoIGL8tQ=; b=nzBa5eBHsmpDM+Bf4nItm4sZeFcj4uHBdUv3TWKnsHpvC4OSTMn/Q530eBXqIUjayU8mX8J2eBjjDZQ8XJFPWEtKdsOYyC1eorMmbU8nbCrnaSa+AoUuHFYGItRz3TW73zKcc5TtfrJzREmWf4YpXP/2dd5jPSGHUub/lbZFL+YahM0+QOoBGTHAkjp6LTAxLNKbal4e5370bfiwSVM2AEx+JFAisN0k/0ku6syRMOmkYFVwHB7MprqJCJ+Ih7Q9tLELLZQxImT6VxDNODH0e0KsPC4gKlWANxvVEOwg6JwPNQBY/DmWihLOBsfNdMaUL496nosZQbQSZNW120XELQ== 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=6/pz2H7o7vhaDBvMWmW9Rsu5+c/PYwXdlwMZoIGL8tQ=; b=iwJgjpZHEE0m90EZN4z/wd8XgV9BWs46f1qt9zwP+4tVDpg+k0bUXNfCJJpl60Z4u+/bkdnO4h+2wgUa3lZEdFtNy5PbQckG40rLFEDZ75jC0x4Sbkx/wPg9Ny+virZG8lhKXey6mCaTOlTkDP3KLuYbnMM5fED9dElXUiZaoLD1ijmz0j5ILTYdcZbm/OmPIit+eKp8nG3yx5nupoFxviqBI8OHE1vWj+KsY4Q5Sw8S+zTAb+uXgpBSv6OC2/rIwpmod/NSAuNWL0TDADv6YvoO4HiluJXpH/jQC3mzhJ/XaVTNXmlX3ggBfFxc7MftwgKpECjvFAYvEKIP/OKuGA== Received: from OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:186::5) by OS3P286MB2213.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:198::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.17; Tue, 23 Jul 2024 18:48:29 +0000 Received: from OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM ([fe80::451b:2fa4:87f7:14a9]) by OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM ([fe80::451b:2fa4:87f7:14a9%6]) with mapi id 15.20.7784.017; Tue, 23 Jul 2024 18:48:29 +0000 From: toqsxw@outlook.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 24 Jul 2024 02:48:06 +0800 Message-ID: X-Mailer: git-send-email 2.44.0.windows.1 X-TMN: [h96omim4LV7rZkg/icXNpDBU+6Txcr70] X-ClientProxiedBy: TY2PR01CA0011.jpnprd01.prod.outlook.com (2603:1096:404:a::23) To OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:186::5) X-Microsoft-Original-Message-ID: <20240723184808.1764-1-toqsxw@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OSZP286MB2173:EE_|OS3P286MB2213:EE_ X-MS-Office365-Filtering-Correlation-Id: 20ef924a-49e5-48de-b64a-08dcab480adf X-Microsoft-Antispam: BCL:0; ARA:14566002|8060799006|19110799003|461199028|440099028|3412199025|1710799026; X-Microsoft-Antispam-Message-Info: Rsk5uOvw4+SVxFFy+bXypf5Z64VC7oLhQj2TlyGPTK8R/FJqMZHuzeZVrzZZNg91k42Z5VYjlr95H0dZWgyRNj/06HF4Rpcr1eyQEXte0pTUzfV2wJfOhQAg4ok+RzSODxiMdusKlFuDQAbSnCYkR7XwEwOfIQ/qUIK6bJ2+sJegr3jG2ZPycWsEFzSH/DMdxRz7QOSLhjEWlvhg/M/6Vyf6ndQ47bYRRG46nWyYzsdBwjhzezP7TybCsvmcaODEZOkpFuRtGliwNVzu0WhlV6vxr7ns428O86dIu6firQhu77ZdzmfsFcFIggr/y9k57ITEwcWUPxtfodqefsyT/naMgDVRodkDvFeOQJXzhZZKn3u4nPtno4C4tr3RXefAmP1ArgYoi7NZNvxVPqaSLykvKyG7PIVe9L0blVV5tu7Z2Mw/DyMeEcN/MTFuXDgc2SjS+agIg9Rd/AAO+sDaXldjMTGZecAGa2dMj/HisoaYXtebBtIAyJhs6wO+z5PjxDbeW9eLA2t1bAJEii9F9jMIqqKRUHzmJmr2T1vkeN/7UJDq9O36xekgGu6vyKlyVlMifqaR4jyUu4S7GcYeUFCNSZ7I3N/OajNdUk87ibcUcDTwYm6NPkHZQYZDdt4BCwpKaS+pW/pCl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j1onL/4rYYotSMhDIVU36lR04Kpy06LkfWhgUCr2FARJCIOtEVA4wQR8UjQDyTNgnrV1HCswwISHQOdrl/QKWRshve/Ewa+EKgpZS82m+D5eOJur+f25hmdrMQDbDrDQhspxDkPz/nfu2754rQVRG8dDk5Ax8rQ+rqW0VLDqFFOcENhwBzT7UuHLspuD/w2mn9+qh8MzyrEgrLzXY0AicHsuOByNyFwMgeb945Kf1FL8cvXqPg7efWZxKlndsBLgQz8TD9i31PcBeLN1Kbb9+fem5sj2a6OM+B6AmqDDE7XYcVYk= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 20ef924a-49e5-48de-b64a-08dcab480adf X-MS-Exchange-CrossTenant-AuthSource: OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2024 18:48:29.0484 (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: OS3P286MB2213 Subject: [FFmpeg-devel] [PATCH 1/3] avcodec/vvc_parser: move avctx->has_b_frames initialization to dec 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: Wu Jianhua Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: /uOhCZK7IIpf From: Wu Jianhua From Jun Zhao : > Should we relocate this to the decoder? Other codecs typically set this > parameter in the decoder. Signed-off-by: Wu Jianhua --- libavcodec/vvc/dec.c | 1 + libavcodec/vvc_parser.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c index d04f68e4cf..6e225d278a 100644 --- a/libavcodec/vvc/dec.c +++ b/libavcodec/vvc/dec.c @@ -748,6 +748,7 @@ static void export_frame_params(VVCContext *s, const VVCFrameContext *fc) c->coded_height = pps->height; c->width = pps->width - ((pps->r->pps_conf_win_left_offset + pps->r->pps_conf_win_right_offset) << sps->hshift[CHROMA]); c->height = pps->height - ((pps->r->pps_conf_win_top_offset + pps->r->pps_conf_win_bottom_offset) << sps->vshift[CHROMA]); + c->has_b_frames = sps->r->sps_dpb_params.dpb_max_num_reorder_pics[sps->r->sps_max_sublayers_minus1]; } static int frame_setup(VVCFrameContext *fc, VVCContext *s) diff --git a/libavcodec/vvc_parser.c b/libavcodec/vvc_parser.c index 5373875aae..8d32d66573 100644 --- a/libavcodec/vvc_parser.c +++ b/libavcodec/vvc_parser.c @@ -185,9 +185,6 @@ static void set_parser_ctx(AVCodecParserContext *s, AVCodecContext *avctx, avctx->color_range = sps->vui.vui_full_range_flag ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; - avctx->has_b_frames = - sps->sps_dpb_params.dpb_max_num_reorder_pics[sps->sps_max_sublayers_minus1]; - if (sps->sps_ptl_dpb_hrd_params_present_flag && sps->sps_timing_hrd_params_present_flag) { uint32_t num = sps->sps_general_timing_hrd_parameters.num_units_in_tick;