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; From patchwork Thu Aug 8 19:13:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 50949 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d7b2:0:b0:489:2eb3:e4c4 with SMTP id dc18csp1244544vqb; Thu, 8 Aug 2024 12:21:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWX6vkLA3Cigo0GNlkim1aLArp91GKlzqumU7ToKkPMFivbGRhlyW8uud/nciPRN0Gx40Yvu4DYDDOYJVVVZ91y13nMMS+yoNzCdA== X-Google-Smtp-Source: AGHT+IEDyMDQIejGm9+RMSlIebU2w1NQbsJGXrmiF+Rgz8kjT6e6FnYfrLSkyhv8x5r+fueptiAw X-Received: by 2002:a05:6402:3581:b0:5a2:350d:dfb9 with SMTP id 4fb4d7f45d1cf-5bbb21f4286mr2512205a12.2.1723144869064; Thu, 08 Aug 2024 12:21:09 -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-5bbb2cfe852si1107784a12.308.2024.08.08.12.21.08; Thu, 08 Aug 2024 12:21:09 -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=EtJjFPVc; 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 0E40368D954; Thu, 8 Aug 2024 22:14:18 +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 9849668D98A for ; Thu, 8 Aug 2024 22:14:11 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RgZxLMC5DOZxRWUdpT4l8mrqK8J2eGTAqM58vjI99ooPFdQ7wib5T9+HYo9GVXqVS3MLyxTtHaR6qB/ebaK2VZQqyVqIGqUo4djmGSJcr2eqMDLg/1nvgAmNkRB0M2+h+XA5z4PYOqkLLB7OVswFGMkZC1GT6NbhTqD6nBHPxeMpc9chcN5OVwvr/rw6vjm5nYV2HtJRvRJMZ+NafFYFpdYy586ejcdq/hClpxm4iBKCO4QgL10y7ZgOOEt3ZMppvB8AmrknT7c06ZUzvPI7EYkiHCH4oAnZvxwLGGMeBEb4WzsZyYF3VG+BksnP3K1pb2IfACAEW5GwAfUeXXsW4A== 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=hbujibG5oyW6KmGmDOq3CV46FrT/iTlW07rSA+fhDjI=; b=DsThvZmhkmWCyOKiJ7nlfnfD2F9DLOXVWcy0bHMY5/BO/1MnQJrQokzIEMEB+gTyG1I/Qa7ih8IZYku3dOtSdWWUCp3CV3Ljn4nkVFJzCvM7K7R/dR7Q9J+0aIre+4YS0bhQJMxzqUeXPtHchQX+3ADdzvLzulTtjw0SGLxITvkSBPQyi6SgoKhFg/2BchD+f6J6IRuT/eHkqUq31kELqAtcfzGXVZby1qW7fcWJKYF5d5c3DRljm8HbhU2vJSC3L4DpPgVpWHaOsa1NjkcXzJIa2/QNI65iBZU49h3rOHz8XFlce2qdv+pkdq9GFYaXixmRuhCODc9YFsV6irDncQ== 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=hbujibG5oyW6KmGmDOq3CV46FrT/iTlW07rSA+fhDjI=; b=EtJjFPVc3L3/p0ehEC1ujz+MeJrIRIzg4Pj1s0IxNk7IPhbDhFY/YS1i4yGZbyGi6zVPNugQ1R7fX9rVPPmyI/tnXRkY4lliKKhxqPT05EdkU/BC/2jvWhFbZDeDl+fANTFCp3Ij323KsfJet0IJjUqlN6l2dvcrJUquhADY4oRmkZvsWNx58T5FBwPN9KRj0UHNurjVfuqub3JNivIeNh0/pJM0Ewjtyjle/S5O9AFuNyGBos86eSH4LwrgDBa7s1ix0gPG7PK6yLGVqY4ZgFWQbfkWEewmm4hwkczEABCgLyk3/Gmy4FfxzAYnwD/y9yNI78farsgYWphw3M0U8g== 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:02 +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:02 +0000 From: toqsxw@outlook.com To: ffmpeg-devel@ffmpeg.org Date: Fri, 9 Aug 2024 03:13:42 +0800 Message-ID: X-Mailer: git-send-email 2.44.0.windows.1 In-Reply-To: <20240808191344.1017-1-toqsxw@outlook.com> References: <20240808191344.1017-1-toqsxw@outlook.com> X-TMN: [A1q1pLUyHsAb1v4UX6TUTmEFxsoHdhn1] 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-2-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: 6e2d7418-f6df-4ddf-698c-08dcb7de433c X-Microsoft-Antispam: BCL:0; ARA:14566002|15080799003|461199028|8060799006|5072599009|19110799003|3412199025|4302099013|440099028|1602099012|1710799026; X-Microsoft-Antispam-Message-Info: pdD2NfSMy27eiH8KtTpBfYng3qSKG740yDh+a1B3fNaOH3H+/OtOHjBsFLWe9YboepVXP8Czcx31ORrpekZAtkOj8wgIhZiwuBg1voXN0nVYwzAaqwHFyq3/XQ85UWagKQfRQth1LPtonQdZdoA4CQpdaZIPi6aYnncQwJNYLmqLr1NIBXDQvy8HQ879ulBGbosF2a0VDRjXXXZXQUc+hVQwr206f8feoA6kU5Y9QzMPZjHgKLzUjOw5ZY3tg9S0oFygfvsXuMbE9uJaLbklMrfCKeXMOeoRsarwM+XWMVLGUW8gS/nsunQdxU1vcVYT+E3BHzvLDC0Og5qRxJiV/7QDxxfV+imKADrEw4ZsPrOjY7DUt3hudvSRoh4uKiBGYC81DEBbVgnHfVV/tmjLdiYfKvrpc6I85keclj6Of0uMX1dsxEtIbv4VlyFEf2vu9gbgScZGpFWESAXnKc+/wpWxykmvlGw+CJ9V0GV/vOZUkEToVD4N7/7XljiLbCyPywFcUS52vKNkZWn3DGHV6oEC3jYutIgP8TzBthW3msQ1K5yWmy3w6rixnYL58IVEaAm/mIEX1cknGO90FNN5KtNN7PcUIxRGalbfj/Vh/SQA8c5putbMfuP3T6LLGCrTQ2LPBc0fKe6R9pNNOdp3tPxhMAlFP8Ll/o7PxI+M/7TYSGF04KJgI4qTvFlhXTFK1eP8MGi36Lh6ZHGPujWp4evJUmU2pvisUlF4qcOaGUWdX0Kj6cBMmNSVKA2OcY7Abjh3Mtw9ybCTpjCNhSluOZlgg1Sv6cFPOM1OdxcOUtMekpgoouuZX+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FHAZjMTNa9tUqwTdfxgeDHMxpkxCm4kcUMB9fjtughpm99yuuc685hSb41lSGWLHp1UCQIjznRWe7OQ08y0Xddel8grdbSb3hvdPI7MTwR6i5Yj/zoIQahJJBIQMahV4bcRhmpy0WJjOog9ODZREKCri2kbFJ3H65sOxj4jVSSk66VaWSGg46VAdCp6voMpL64eul9SYfEZIPWbDxAmRuuv72lmhHu+9DKV3ZxAMGiY4G/cdm/B1X7zyWev1ZdIfKggVX2QSUGllgDTyY= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e2d7418-f6df-4ddf-698c-08dcb7de433c 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:02.0713 (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 2/3] avcodec/vvc/cabac: remove vvc_refill2 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: 9KMgLAVObtgc From: Wu Jianhua See https://github.com/ffvvc/FFmpeg/issues/178 Signed-off-by: Wu Jianhua --- libavcodec/cabac_functions.h | 2 +- libavcodec/vvc/cabac.c | 28 +--------------------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/libavcodec/cabac_functions.h b/libavcodec/cabac_functions.h index c3f08d3410..9bee401f2c 100644 --- a/libavcodec/cabac_functions.h +++ b/libavcodec/cabac_functions.h @@ -85,7 +85,7 @@ static inline void renorm_cabac_decoder_once(CABACContext *c){ } #endif -#ifndef get_cabac_inline +#if !defined(get_cabac_inline) || !defined(refill2) static void refill2(CABACContext *c){ int i; unsigned x; diff --git a/libavcodec/vvc/cabac.c b/libavcodec/vvc/cabac.c index 0d45eec751..c9b6f9bf3e 100644 --- a/libavcodec/vvc/cabac.c +++ b/libavcodec/vvc/cabac.c @@ -856,32 +856,6 @@ int ff_vvc_cabac_init(VVCLocalContext *lc, return ret; } -//fixme -static void vvc_refill2(CABACContext* c) { - int i; - unsigned x; -#if !HAVE_FAST_CLZ - x = c->low ^ (c->low - 1); - i = 7 - ff_h264_norm_shift[x >> (CABAC_BITS - 1)]; -#else - i = ff_ctz(c->low) - CABAC_BITS; -#endif - - x = -CABAC_MASK; - -#if CABAC_BITS == 16 - x += (c->bytestream[0] << 9) + (c->bytestream[1] << 1); -#else - x += c->bytestream[0] << 1; -#endif - - c->low += x << i; -#if !UNCHECKED_BITSTREAM_READER - if (c->bytestream < c->bytestream_end) -#endif - c->bytestream += CABAC_BITS / 8; -} - static int inline vvc_get_cabac(CABACContext *c, VVCCabacState* base, const int ctx) { VVCCabacState *s = base + ctx; @@ -904,7 +878,7 @@ static int inline vvc_get_cabac(CABACContext *c, VVCCabacState* base, const int c->low <<= lps_mask; if (!(c->low & CABAC_MASK)) - vvc_refill2(c); + refill2(c); s->state[0] = s->state[0] - (s->state[0] >> s->shift[0]) + (1023 * bit >> s->shift[0]); s->state[1] = s->state[1] - (s->state[1] >> s->shift[1]) + (16383 * bit >> s->shift[1]); return bit; From patchwork Thu Aug 8 19:13:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 50947 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d7b2:0:b0:489:2eb3:e4c4 with SMTP id dc18csp1244525vqb; Thu, 8 Aug 2024 12:21:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUoT0SEvtThQfNzD+Zoap+uahx+OmvCMagw3/b8qb3U18YoqGqq/q7dXIFVqro5dCqnXeJTrE4kjHeVtFyuUFiXMSafJiO2DYxASg== X-Google-Smtp-Source: AGHT+IH2gUeSRJaUpXn7RAaKbaAZxiWlmxm19POObl0JToC6mdQ/5er9PI0RpQrmdqF49r0Qk05R X-Received: by 2002:a2e:a450:0:b0:2ee:87c1:3c94 with SMTP id 38308e7fff4ca-2f19de85765mr17033701fa.40.1723144867795; Thu, 08 Aug 2024 12:21:07 -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 38308e7fff4ca-2f15e13c8dbsi42476721fa.158.2024.08.08.12.21.07; Thu, 08 Aug 2024 12:21:07 -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=aHxpzdxp; 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 5A2F068D9FD; Thu, 8 Aug 2024 22:14:20 +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 2177C68D98A for ; Thu, 8 Aug 2024 22:14:17 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mLzPeUNDSagBFurKvaqfdmDMIhoJfZqiiwdjkDpjvqzfVHJWFYnCzJ39QeMWBFlZlQVl5NrNbDDfIV8n/crYxDUA+SWraI0Ri1PB778nLUwFWuBQUJv7k4MnWDNaUG5pRiHGYCKFA4gxRiPzT7m95iUf4q/qLVWSj4LfOjZGtzUfxp9RKp5tn/yShyYcEvT8g4h8J5SZ8AUHeMY6qaKOAodk80x6wy/0//6a+HegWxSG53DBJDARuaUI9reTJBdFHaSgUHka4PdO/unOmOlky2S8vVoe0C33WA6TidZxk9XSsaYWk6u4yJth5ez2NjdVDPpoHKoIdbLI+hudwB8QSg== 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=MOUgpZrQq/jiIzW+dvJzUmfuDqCHToRNzXjnmd2IsD8=; b=B4kb8UVESxPrP7HyNHff4jUocXaUjCjKv+jztAaiY+/HoDKYeM7nWRs9Exd6r55bUySO+fDoFK09Kfg8NVyR4t3uty1AXxF/EsoDP9tMKn0cbecknzhVo8eEOsmyZJc79NqWMKoIYCkkMjvG4pqrVQ1bRITrYrWesvwcx9K4uR6Ykf/W+zJf6HNRrYdk1fil5nwNiAL2XWscN1qjK6vwsOJ/vK2D0uLrUqhRJNfPg5Zsx++M/rkNclSG4g/5rwlufWT0bNcX0wIWG2aKDiQ9p/ztfGEEpOw9vkBlC3UvH6Tno/jdvCLcxcE7HIngAgUYirz49Y46AE1NVmJPOlWjFw== 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=MOUgpZrQq/jiIzW+dvJzUmfuDqCHToRNzXjnmd2IsD8=; b=aHxpzdxpTrE47ReiAnE5ytm1WOJ9whTJSyQ5xdvtUpH2yLLQvzux+KTd6GpTkq+lebFwt8fLNwsuI9g3jICE3w/hBabvHfEpPm8BLQJN+z5Vb8k32WizqeLNtuUvJ4e2wv5Caj+ZATCH2A4+28n8xBEpjgSRkRuGPfQCujy6Wc7+ajwAdfCWn2XjVl82R2YwmE13hCwLHKf/o8zVlsmKxmh8I97Gqw8gC7A9qnceXx5KJuXH+vf554mIl5l9Yi+6qmGyxfQzamhq8vHpHjpaIfXUq0PaQC7eKnLYKBJC0EMyD2yXkxb1m2yzpEDYbgi3YmhxbjNR2v/FGPgO4uQC+A== 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:05 +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:05 +0000 From: toqsxw@outlook.com To: ffmpeg-devel@ffmpeg.org Date: Fri, 9 Aug 2024 03:13:43 +0800 Message-ID: X-Mailer: git-send-email 2.44.0.windows.1 In-Reply-To: <20240808191344.1017-1-toqsxw@outlook.com> References: <20240808191344.1017-1-toqsxw@outlook.com> X-TMN: [UOUx1AbiECPVNjHJbJh4YDSGV3OBODqo] 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-3-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: 49522e57-6b6f-4d54-8a03-08dcb7de43b1 X-Microsoft-Antispam: BCL:0; ARA:14566002|15080799003|461199028|8060799006|5072599009|19110799003|3412199025|4302099013|440099028|1602099012|1710799026; X-Microsoft-Antispam-Message-Info: EwTuO4VuNx0MCMAFudVwuZBscjyqGItl6jvsisE1hdSYzixdBdBxS5LufUvda6y0W8NgzCOqYhHVmAJilTZZHJ//vkZeh4Xf0P2ffNI8+BfFob17eq0JwRiaFNxar1RC/wM0LqYUyk6K9QPG8dYSEex1vSQnlZOPhqCG3wHHdufs9S9ZMnHCuK8x7CUASWLBwGHn6dhnYbK3Zb9aQP+YYF6Es0Ebe6goy+3bkY1v9YdBNYcmrh1LorGU9cyimdY+sMA8mJE6o3ZHRTOAMrqVXiytBBAYrG48INl84o3jAiVH8KJmOpabdJEo7d/Z2xljkVNEpWUbsd1GAuMRSc5RTvBWa85f6qafkkxDLwvghhrqVpmpm2DBjxhXXVYco6wpfGJxCwEbRUoNAO1binkbxJByj+rkAtvVUvqzkisbtCM0MxThwYAUSsclJfE7gsV7vT6QxhOkXcBkaZ/HUdQ+tWPwiGgDG5vB73aCBHai6mBiENei7OSqPrjy1UAknU/cBPxZ5TPUDle3EW1KQsx+E4E0YGOL36fGi/Zt2mBf6WWER8GEpd30VAqCQjnqeqB6LqaZQfuYvGXV+v2wYRyNxKcxNy6oRp2DracKNXcSFLwj7kjxbW+Des+AMoQ8RjKZyExIxCXOlhgzXvj/0C3at62p+MMmeXtXU8RW30Za1RADeoqqfZIcfM1Nrc2oDv8Z4+hY33OdUEc1elzBvqUDmPdZVleE39r5wVWmanaI6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HrsZRdVpoqi0M+PbajdpNn35bOz+JUV40J3VhO6fkafV+Irm7FA7s/ahFD/PsIBVNn+pIgaFNF4yvQDuPsgjLwL+OBw7fX1X8BbPFqiqYnufHcnWpUsX3FFHScN/IVfsLJMdXYmxh39o6nmzTcTLO/+gDi8rXGrZv304ytm7hAw28+sytg4LFHQcjrvF3dwGOketAkuM6tBl0jHe90WI7xtkmUNZlB+FncYwMUMVRTbiYoBQfEYmyiV20gCKqAv9ol4P46oNaDvnsRUxUgZPLCw2iZB4jvv36Vtb0Tm7wEclRUIOLB5QsuS1G+cw0aVOMaGEy6A56kwKRpYBAZs2BcItnBKL2bcy4S6FLIwVwOMJtgq9FUhibzoGOqnKZKCGE= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49522e57-6b6f-4d54-8a03-08dcb7de43b1 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:02.8375 (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 3/3] avcodec/vvc/dsp: prefix TxType and TxSize with VVC 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: YPrxmyzuR6Dk From: Wu Jianhua See https://github.com/ffvvc/FFmpeg/issues/180 Signed-off-by: Wu Jianhua --- libavcodec/vvc/dsp.h | 28 ++++++++++++++-------------- libavcodec/vvc/dsp_template.c | 2 +- libavcodec/vvc/intra.c | 26 +++++++++++++------------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/libavcodec/vvc/dsp.h b/libavcodec/vvc/dsp.h index 0b49b97021..38ff492a23 100644 --- a/libavcodec/vvc/dsp.h +++ b/libavcodec/vvc/dsp.h @@ -27,21 +27,21 @@ #include #include -enum TxType { - DCT2, - DST7, - DCT8, - N_TX_TYPE, +enum VVCTxType { + VVC_DCT2, + VVC_DST7, + VVC_DCT8, + VVC_N_TX_TYPE, }; -enum TxSize { - TX_SIZE_2, - TX_SIZE_4, - TX_SIZE_8, - TX_SIZE_16, - TX_SIZE_32, - TX_SIZE_64, - N_TX_SIZE, +enum VVCTxSize { + VVC_TX_SIZE_2, + VVC_TX_SIZE_4, + VVC_TX_SIZE_8, + VVC_TX_SIZE_16, + VVC_TX_SIZE_32, + VVC_TX_SIZE_64, + VVC_N_TX_SIZE, }; typedef struct VVCInterDSPContext { @@ -127,7 +127,7 @@ typedef struct VVCItxDSPContext { void (*add_residual_joint)(uint8_t *dst, const int *res, int width, int height, ptrdiff_t stride, int c_sign, int shift); void (*pred_residual_joint)(int *buf, int width, int height, int c_sign, int shift); - void (*itx[N_TX_TYPE][N_TX_SIZE])(int *coeffs, ptrdiff_t step, size_t nz); + void (*itx[VVC_N_TX_TYPE][VVC_N_TX_SIZE])(int *coeffs, ptrdiff_t step, size_t nz); void (*transform_bdpcm)(int *coeffs, int width, int height, int vertical, int log2_transform_range); } VVCItxDSPContext; diff --git a/libavcodec/vvc/dsp_template.c b/libavcodec/vvc/dsp_template.c index 8130abbccf..1aa1e027bd 100644 --- a/libavcodec/vvc/dsp_template.c +++ b/libavcodec/vvc/dsp_template.c @@ -97,7 +97,7 @@ static void FUNC(transform_bdpcm)(int *coeffs, const int width, const int height static void FUNC(ff_vvc_itx_dsp_init)(VVCItxDSPContext *const itx) { #define VVC_ITX(TYPE, type, s) \ - itx->itx[TYPE][TX_SIZE_##s] = ff_vvc_inv_##type##_##s; \ + itx->itx[VVC_##TYPE][VVC_##TX_SIZE_##s] = ff_vvc_inv_##type##_##s; \ #define VVC_ITX_COMMON(TYPE, type) \ VVC_ITX(TYPE, type, 4); \ diff --git a/libavcodec/vvc/intra.c b/libavcodec/vvc/intra.c index f77a012f09..73dca6dc85 100644 --- a/libavcodec/vvc/intra.c +++ b/libavcodec/vvc/intra.c @@ -128,15 +128,15 @@ static void ilfnst_transform(const VVCLocalContext *lc, TransformBlock *tb) } //part of 8.7.4 Transformation process for scaled transform coefficients -static void derive_transform_type(const VVCFrameContext *fc, const VVCLocalContext *lc, const TransformBlock *tb, enum TxType *trh, enum TxType *trv) +static void derive_transform_type(const VVCFrameContext *fc, const VVCLocalContext *lc, const TransformBlock *tb, enum VVCTxType *trh, enum VVCTxType *trv) { const CodingUnit *cu = lc->cu; - static const enum TxType mts_to_trh[] = {DCT2, DST7, DCT8, DST7, DCT8}; - static const enum TxType mts_to_trv[] = {DCT2, DST7, DST7, DCT8, DCT8}; + static const enum VVCTxType mts_to_trh[] = { VVC_DCT2, VVC_DST7, VVC_DCT8, VVC_DST7, VVC_DCT8 }; + static const enum VVCTxType mts_to_trv[] = { VVC_DCT2, VVC_DST7, VVC_DST7, VVC_DCT8, VVC_DCT8 }; const VVCSPS *sps = fc->ps.sps; int implicit_mts_enabled = 0; if (tb->c_idx || (cu->isp_split_type != ISP_NO_SPLIT && cu->lfnst_idx)) { - *trh = *trv = DCT2; + *trh = *trv = VVC_DCT2; return; } @@ -152,11 +152,11 @@ static void derive_transform_type(const VVCFrameContext *fc, const VVCLocalConte const int w = tb->tb_width; const int h = tb->tb_height; if (cu->sbt_flag) { - *trh = (cu->sbt_horizontal_flag || cu->sbt_pos_flag) ? DST7 : DCT8; - *trv = (!cu->sbt_horizontal_flag || cu->sbt_pos_flag) ? DST7 : DCT8; + *trh = (cu->sbt_horizontal_flag || cu->sbt_pos_flag) ? VVC_DST7 : VVC_DCT8; + *trv = (!cu->sbt_horizontal_flag || cu->sbt_pos_flag) ? VVC_DST7 : VVC_DCT8; } else { - *trh = (w >= 4 && w <= 16) ? DST7 : DCT2; - *trv = (h >= 4 && h <= 16) ? DST7 : DCT2; + *trh = (w >= 4 && w <= 16) ? VVC_DST7 : VVC_DCT2; + *trv = (h >= 4 && h <= 16) ? VVC_DST7 : VVC_DCT2; } return; } @@ -447,7 +447,7 @@ static void dequant(const VVCLocalContext *lc, const TransformUnit *tu, Transfor //transmatrix[0][0] #define DCT_A 64 -static void itx_2d(const VVCFrameContext *fc, TransformBlock *tb, const enum TxType trh, const enum TxType trv) +static void itx_2d(const VVCFrameContext *fc, TransformBlock *tb, const enum VVCTxType trh, const enum VVCTxType trv) { const VVCSPS *sps = fc->ps.sps; const int w = tb->tb_width; @@ -456,7 +456,7 @@ static void itx_2d(const VVCFrameContext *fc, TransformBlock *tb, const enum TxT const size_t nzh = tb->max_scan_y + 1; const int shift[] = { 7, 5 + sps->log2_transform_range - sps->bit_depth }; - if (w == h && nzw == 1 && nzh == 1 && trh == DCT2 && trv == DCT2) { + if (w == h && nzw == 1 && nzh == 1 && trh == VVC_DCT2 && trv == VVC_DCT2) { const int add[] = { 1 << (shift[0] - 1), 1 << (shift[1] - 1) }; const int t = (tb->coeffs[0] * DCT_A + add[0]) >> shift[0]; const int dc = (t * DCT_A + add[1]) >> shift[1]; @@ -476,7 +476,7 @@ static void itx_2d(const VVCFrameContext *fc, TransformBlock *tb, const enum TxT scale(tb->coeffs, tb->coeffs, w, h, shift[1]); } -static void itx_1d(const VVCFrameContext *fc, TransformBlock *tb, const enum TxType trh, const enum TxType trv) +static void itx_1d(const VVCFrameContext *fc, TransformBlock *tb, const enum VVCTxType trh, const enum VVCTxType trv) { const VVCSPS *sps = fc->ps.sps; const int w = tb->tb_width; @@ -484,7 +484,7 @@ static void itx_1d(const VVCFrameContext *fc, TransformBlock *tb, const enum TxT const size_t nzw = tb->max_scan_x + 1; const size_t nzh = tb->max_scan_y + 1; - if ((w > 1 && nzw == 1 && trh == DCT2) || (h > 1 && nzh == 1 && trv == DCT2)) { + if ((w > 1 && nzw == 1 && trh == VVC_DCT2) || (h > 1 && nzh == 1 && trv == VVC_DCT2)) { const int shift = 6 + sps->log2_transform_range - sps->bit_depth; const int add = 1 << (shift - 1); const int dc = (tb->coeffs[0] * DCT_A + add) >> shift; @@ -542,7 +542,7 @@ static void itransform(VVCLocalContext *lc, TransformUnit *tu, const int tu_idx, transform_bdpcm(tb, lc, cu); dequant(lc, tu, tb); if (!tb->ts) { - enum TxType trh, trv; + enum VVCTxType trh, trv; if (cu->apply_lfnst_flag[c_idx]) ilfnst_transform(lc, tb);