From patchwork Thu Feb 22 07:13:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nuo Mi X-Patchwork-Id: 46440 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:26a3:b0:19e:cdac:8cce with SMTP id h35csp184702pze; Wed, 21 Feb 2024 23:48:19 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWexNINa4r8P5lpebD0nPkAWDPWqCLTx+H0bv8mLMIobBeIQME4bE5Sq9hs8lGtkCSflTpKX9VIiWOImraxJwOfnxr3mvuh5JeIGg== X-Google-Smtp-Source: AGHT+IEHLw3A09OKEH48ZCr6elJNWY0WILnV5dVPqgT1PfRvA69YagNkhdrK69JAKcwcYhs9Kh6a X-Received: by 2002:a05:6402:2812:b0:563:c54e:ee with SMTP id h18-20020a056402281200b00563c54e00eemr19611626ede.2.1708588099121; Wed, 21 Feb 2024 23:48:19 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id o15-20020a056402038f00b005647d398b85si3352892edv.85.2024.02.21.23.48.18; Wed, 21 Feb 2024 23:48:19 -0800 (PST) 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=RPtOdtZI; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B93AB68D1CC; Thu, 22 Feb 2024 09:48:16 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01olkn2086.outbound.protection.outlook.com [40.92.53.86]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 66D6868D1CC for ; Thu, 22 Feb 2024 09:48:14 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W1sWn/R7lQfbL09Q6+gvuLhvowKEu+mPfsChV3gaHyRhOpGEh96lsyW7HXHEbjR7wpLkBLNQY1ASd47huncud5tXSxNghtbQNtx/K/VKiSULwN4HJh7hh6TYHmV4SEIlB4+ZaHtkZJEWScaaFi54zpdxoDeGds5fdxYN8nCbSQNw5tjAIulQk7AFpYrg8h5vYmRQ1RxiySqNL48pjmlF+uMmYG/+FsLUUcIbzFZ7bEzhHrj3T/rj7b7oZdAWyOy0mS3J1MAp+5WefIt9x64KY6EWUHWuj/sI/MAOjFycAMVLfYby6tcQtUp+dWMIxmN5p6cXkRbpOVEvJdgGSG9zfg== 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=TMQPyQQ/bgPVJPI2iCRJdG8G2GKpUhomdinBdvW+LHM=; b=edskazrDI7u+ZJRKhxGI5vxoUygjOwOElPExlWN/zTmfL4qM7tVO08AX+nePthIIKEqesmUfaGfPatC6CngsHdavQAxYI3NSDEFsaTOUbCezMt6sdJSgJrSoJyjiYz5lThUraBb4tqRAPofk3xeE+LE0CiP2eNol6u2tn6sJY8mMN6e2V2ODLbf+VRRx8VLKTKBcCGWgyRYQQdbYwTCgJCV9gY/z/tPBToMVaoOSE9rmwAZHhasq22/uSaRmmVWS+bMUanVLnitbH7I4DandpMqydmX++dAwIRKNXVgmseN0F+cPVrLIt67Q4Qc4+raxO66IkJgmhpxLZiyz2lIO7w== 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=TMQPyQQ/bgPVJPI2iCRJdG8G2GKpUhomdinBdvW+LHM=; b=RPtOdtZIsyFdoOKivTwnLissL9mKWdLrMl9i03G/7YhFIRmU+GiEFVDzNlClPSTtXmLyvukvpZJweZQmddla8FGz+9Qyexd9PRhptfQXSKOQqWfkKOXRIZApnMftQgxcoKDK63bg7ZL5LcedXvVf8uZzR8i21TrMhbVnztfkKNo4LB2tOWMYI6eqAukUOpoADdNQeCDta6W7OUBVgyGLrkzNgwUkXuXouEhT+JtSrJd7h+fVU1VBsK3iYRWwHpzbC8uf3Z39iLIlQCISTFJU2DBTjwpj+iL1AE+s7fD7Xv381zFrUdRWJC5oYKT2yq3XfwneNtmKJJL+NC7mXBxjNg== Received: from TYSPR06MB6433.apcprd06.prod.outlook.com (2603:1096:400:47a::6) by TYUPR06MB6241.apcprd06.prod.outlook.com (2603:1096:400:358::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.38; Thu, 22 Feb 2024 07:14:48 +0000 Received: from TYSPR06MB6433.apcprd06.prod.outlook.com ([fe80::e139:fd7a:1b66:a3f7]) by TYSPR06MB6433.apcprd06.prod.outlook.com ([fe80::e139:fd7a:1b66:a3f7%7]) with mapi id 15.20.7292.036; Thu, 22 Feb 2024 07:14:48 +0000 From: Nuo Mi To: ffmpeg-devel@ffmpeg.org Date: Thu, 22 Feb 2024 15:13:58 +0800 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240222071406.5714-1-nuomi2021@gmail.com> References: <20240222071406.5714-1-nuomi2021@gmail.com> X-TMN: [V8uY+Bi9Z1IfzvsDogug7YJo3qvIq7E9] X-ClientProxiedBy: TYCP286CA0049.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b5::7) To TYSPR06MB6433.apcprd06.prod.outlook.com (2603:1096:400:47a::6) X-Microsoft-Original-Message-ID: <20240222071406.5714-4-nuomi2021@gmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 2 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYSPR06MB6433:EE_|TYUPR06MB6241:EE_ X-MS-Office365-Filtering-Correlation-Id: d572d21e-f569-417b-6a28-08dc3375f3fc X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vcwBoieggBGp7Iwakc+b95SmmFh+e7ZPjSQD3aMwJXHYVERT3HalXIo/9VO2FeezZKzh5lhisYZmzcC9KwMyiSi9y819Ejz5Qy+1lyFdH1KGYsBJ8297jI5iLoSv5KwJ7kywEUQU0NNy+ep1DCniw1jLaHVH35gWNYMQZLukAV3aSPvdKRZolUUQq8zWk0QousX9xpTPWbObNhyCk5MKbjnIu1ZJT+Szs0Rwg7t+nZO5HNWZJepsw2ob2lqCJKT3L7ODiwFDdsDrimhcXAY2VJrzjSGiX2dGA5JuompsyrkWYEIWfOOFBsvyRpdjrQPb9Zyw+iaa8E+RLeIZ7oK0EEZX33xOGzxjvL7lyON7iT6MmZpLYDI4MxdD8lIvbVaFpsZlo/a4IDYn7TqSJH4eGl7BZ8AewsmMZKEnNTQrnj4/wJpe/e7NyvXP+o/3z30wOyjCTeRCt41XD/tWbmI6w+sd6RXAeIe7qnQMZkrwhSQZG3+dejV3urNxLYG9d2wUkIgbZSzqyCNRMA2QC07KRQTG/DKhGGUSByUMQkaULTuwLJOPHrPMzAW131bByidJwj2yQ7krz6eHgPvi3dMr7pObyyPEkb8GRkXwmdE1DZY= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: E0TUg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HD1WKKkQRFxFP1VdhL2HE6p6jHEyXl7KTqSvzH7zH4SGADJFjsJWp8ln0Q1pqf0cA8kB8CP2SIV+RlKxWRweljGlmFsB6vwHkVXz58dockZW0iL2pb/biwsubZNfXCP2YEahxnDIq6kzD1STf7L6/0ETfddBVvBIElSHECs/JHKa3tCyI68rRPpbFWOvGNAniW78AvLVqKWvtAKjOMQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d572d21e-f569-417b-6a28-08dc3375f3fc X-MS-Exchange-CrossTenant-AuthSource: TYSPR06MB6433.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2024 07:14:47.9796 (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: TYUPR06MB6241 Subject: [FFmpeg-devel] [PATCH 03/11] avcodec/vvcdec: deblock_bs, fix intra check for IBC 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: Nuo Mi Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 8sMLPhVgkZ9A An Intra Block Copy clip may use different modes for luma and chroma. For example, MODE_IBC for luma and MODE_INTRA for chroma. We have to check luma and chroma CuPredMode (cpm) separately. --- libavcodec/vvc/vvc_filter.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/vvc/vvc_filter.c b/libavcodec/vvc/vvc_filter.c index ca541fd997..379d90d02b 100644 --- a/libavcodec/vvc/vvc_filter.c +++ b/libavcodec/vvc/vvc_filter.c @@ -482,8 +482,10 @@ static av_always_inline int deblock_bs(const VVCLocalContext *lc, const MvField *tab_mvf = fc->tab.mvf; const int log2_min_pu_size = MIN_PU_LOG2; const int log2_min_tu_size = MIN_TU_LOG2; + const int log2_min_cb_size = fc->ps.sps->min_cb_log2_size_y; const int min_pu_width = fc->ps.pps->min_pu_width; const int min_tu_width = fc->ps.pps->min_tu_width; + const int min_cb_width = fc->ps.pps->min_cb_width; const int pu_p = (y_p >> log2_min_pu_size) * min_pu_width + (x_p >> log2_min_pu_size); const int pu_q = (y_q >> log2_min_pu_size) * min_pu_width + (x_q >> log2_min_pu_size); const MvField *mvf_p = &tab_mvf[pu_p]; @@ -492,11 +494,14 @@ static av_always_inline int deblock_bs(const VVCLocalContext *lc, const int tu_p = (y_p >> log2_min_tu_size) * min_tu_width + (x_p >> log2_min_tu_size); const int tu_q = (y_q >> log2_min_tu_size) * min_tu_width + (x_q >> log2_min_tu_size); const uint8_t pcmf = fc->tab.pcmf[chroma][tu_p] && fc->tab.pcmf[chroma][tu_q]; + const int cb_p = (y_p >> log2_min_cb_size) * min_cb_width + (x_p >> log2_min_cb_size); + const int cb_q = (y_q >> log2_min_cb_size) * min_cb_width + (x_q >> log2_min_cb_size); + const uint8_t intra = fc->tab.cpm[chroma][cb_p] == MODE_INTRA || fc->tab.cpm[chroma][cb_q] == MODE_INTRA; if (pcmf) return 0; - if (mvf_p->pred_flag == PF_INTRA || mvf_q->pred_flag == PF_INTRA || mvf_p->ciip_flag || mvf_q->ciip_flag) + if (intra || mvf_p->ciip_flag || mvf_q->ciip_flag) return 2; if (chroma) {