From patchwork Thu Aug 8 19:13:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 50948 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d7b2:0:b0:489:2eb3:e4c4 with SMTP id dc18csp1244536vqb; Thu, 8 Aug 2024 12:21:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW0+u6oW/BZP3h0HIUn5wkzr95USgY/9LhOYRw7wywMxXBxrLVcxfsQG09BKfdYgM9pxrV2LSbhB2zdBb9PhP6/t1C2CA+hLXyBCw== X-Google-Smtp-Source: AGHT+IHPkQ61Qy9M4rkEq/BjAAUfZVB8al8JI6HSH1aTLaeXyt7YHkbcCayZP7i39/RxHS3eU1/x X-Received: by 2002:a05:6402:5110:b0:5a0:e4a6:b3c9 with SMTP id 4fb4d7f45d1cf-5bbb21f522amr2112495a12.7.1723144868520; Thu, 08 Aug 2024 12:21:08 -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-5bbb2cfec2fsi1059257a12.331.2024.08.08.12.21.08; Thu, 08 Aug 2024 12:21:08 -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=ST2AnXf9; 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 D87A268D9DB; Thu, 8 Aug 2024 22:14:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from TYVP286CU001.outbound.protection.outlook.com (mail-japaneastazolkn19011031.outbound.protection.outlook.com [52.103.43.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1FAEF68D935 for ; Thu, 8 Aug 2024 22:14:06 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NAohBRPutiex5MTYUYjZEiuP1MEF62DlMS+SYgKDmKVgqX7EV+h3cp4nBmv81ciulq+eY8KeJUQJN9+9FJVh0Ne0iClO3UFKQannkJbLZ3KOWZLdrtYqK2Y+sq07WdpdaUQhgydo1UKlkDqYKQ99WRFpSLn2ifYeT2ZSBHM8FsXQuJEYkYwvq5QynC3rTTNvUgzMWrtqw/XkMoQ7kFkOq21rIVmWg70ZHqoeD1/4VmK4EH16cUKzQsAJKOCdUcR/bnI6AwYP/dEX78OKditpJevsHlSqxjQXzROc2BMTNYnwSe3QWSvpODjb9NV+xeUg/7EooTfTxe9lycf5ZgACsw== 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=y4sUgKjpYoP4wFFn3hmX1KRKo0Lm2O4KaLRqv/Jm8XblbgxGhLd7yTWYKEt1qfIVdoudQWt4J6r8/WWCtXUhJtopVW88j4IxP+4MsimdZuk06e0egdv6XbW/LX9dKPviIAw79Hoes4LI/bHjSQd9M8Cv8NFU/5pDSGbOrwXfxjGwQ9SGO8Hk5SzHPj+4i+VAuyGHbsbf7/gcdxGhPgCJe6fGjxbnGitK//oP/WzKTsG3XprV2iP1aR86LTo6pIAjeLbzfNTvNCDrfBE87qcgN9Wq7ZuQcM8XKq9YD/jnLq95nkTUyMom/hJSJ7VjnuoMBq9iw5ovB2Jot20WSEb9mw== 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=ST2AnXf97xgHvZeN4suduJfukr87A653Jtd8Vg9mdYTZ/CYmVUswYek2GmouhEwj7P0slakYrYdtrV37pmPWmRd5Q0usaWHuU3SFfXlsfBoe/o9N2Ku5k8Cp1/E+BSR45iiVPyixTMTonEp1Ep6cOpWXs7h9UJOd753E6Ke7s3oU4eAiT1WGg7BYGB3PHW1GScaSllIRjihAk8b8r6hPO+f4ZnUBnG+79s31cmF3VgBtmwOaXaZ8ZpsPSzfHvBG77nzpvG2G0KEfl7s9RDxQrAJL2uJvR5B/5hBqs40sYtv+AwgWVysaXwn+QSywUzYEl6FQ5xo4HcWo8PlzI0dReg== Received: from OS3PR01MB9944.jpnprd01.prod.outlook.com (2603:1096:604:1e0::10) by TYYPR01MB12466.jpnprd01.prod.outlook.com (2603:1096:405:f8::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.26; Thu, 8 Aug 2024 19:14:01 +0000 Received: from OS3PR01MB9944.jpnprd01.prod.outlook.com ([fe80::7b06:78cc:adb3:903c]) by OS3PR01MB9944.jpnprd01.prod.outlook.com ([fe80::7b06:78cc:adb3:903c%6]) with mapi id 15.20.7828.023; Thu, 8 Aug 2024 19:14:01 +0000 From: toqsxw@outlook.com To: ffmpeg-devel@ffmpeg.org Date: Fri, 9 Aug 2024 03:13:41 +0800 Message-ID: X-Mailer: git-send-email 2.44.0.windows.1 X-TMN: [U/VGZHJ8R1QOHutSC5rrMRYMq3JKKf3C] X-ClientProxiedBy: TY2PR0101CA0018.apcprd01.prod.exchangelabs.com (2603:1096:404:92::30) To OS3PR01MB9944.jpnprd01.prod.outlook.com (2603:1096:604:1e0::10) X-Microsoft-Original-Message-ID: <20240808191344.1017-1-toqsxw@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB9944:EE_|TYYPR01MB12466:EE_ X-MS-Office365-Filtering-Correlation-Id: 0a4305ee-519d-4114-ee83-08dcb7de42c8 X-Microsoft-Antispam: BCL:0; ARA:14566002|15080799003|461199028|8060799006|5072599009|19110799003|3412199025|440099028|1710799026; X-Microsoft-Antispam-Message-Info: HUos51kbZ00yJUUupzZ0DxJof7dIeXbfl8OpjvrWFfjIEjWeDBWPe0DShvAg4/3rnLS7DUsaOx87AE3p47uZFaXPn3pcJGWeIgngEvtfUX8ZOSxVYcQ90XVY4vezfF8eT4ymm/ZM1omcVLDrbSXBvVnYJFNScdXzvYM6qDB/Os705xbQPJRvFwDxO0HECT6TV7gkmUfqbOXw0UhjM9O3OLIo+sJFH4ie1zqQtSAH/XDrtx8vru3DCKIk+/IbV6nCFpFRhnPKdet3I6rBrjaEuoenNScU+nuaD09Ylh+KvNY/C2aEjuVd/2dSvczWI4M2AGI5d5D8u05zoi1Rh+Dv6NIHbANPNjHxrUbRwUck9Ba2TSVTi1oriCPal2BA1xdSKI0O6ElhHQNDVY3gfZfPKb9GDFN7AEa94o7/l4nT7rXJithc7pLSgWNoJ1jKzHknemOXhHOnjZR5dWsjgzUgYUiki2SZJ91Jf978r/FXWTqFFPHoDkINOccOk6jCnVaqUeBwfxaXBSy+zHqAEdRBwqGO8Is0Ywh/2s62Lg6WbtVdyofn/PTWWrMbc4k6Zyxq2EOgGLT1/7S93ZoPcYQCy4Xm95E2lQDS/jYCLOevJPzNKIL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jpXuMHOkiYYDLagGHNIdXJ3LCPsHySAL5bVUy6xRU7ud8Kt34h6omNukNs0m//TWaH9K7MZOvSY3gHrPwIEjP4d5O2+sEqLVg0CFxHrFw9+fkDubY+PiCOGXwOtnBPrCMXwbjKceLdglOupTWvWXyjFUHebip3PwIBAJHwu0aRWdqNwz9T8nloZbl2ZZYLFtxcChhx8qoL85OPcpmbFV9SYxOeTrgWJP2fKLt899Ph31YHUSpGS4DB+IuBwC4/1nse/EfvknnslAEglDbLK6qfj83VmmAKOtSwEs712cGXBdjLgmOuJ5rtSL5j34SPpKXlmR8YarOVwAYZBk5OLfzU5FCSBTi3MByGzzIN+KzZEOe2MFG5mx5jpJNvE= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a4305ee-519d-4114-ee83-08dcb7de42c8 X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB9944.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2024 19:14:01.3127 (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: TYYPR01MB12466 Subject: [FFmpeg-devel] [PATCH v2 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: //MmZoSp8dI0 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;