From patchwork Mon Mar 18 14:16:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nuo Mi X-Patchwork-Id: 47172 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:958e:b0:1a3:31a3:7958 with SMTP id iu14csp1042536pzb; Mon, 18 Mar 2024 07:18:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUnVMloHI+j7zxrVoivvz+1Y8I+czdYeX/8mz9cgGraEzvfjbP0xvhC7qTWf9FEN9BVCETqT69POyj1vu9yO3OEk9na6zmwUhIuow== X-Google-Smtp-Source: AGHT+IG/oiu/5KtDn0vbmOGyMFqZ6/ELMvsNQxm86+KDrqkDTNeJZX3tRSAl9ofB8TTs2qOvTRlO X-Received: by 2002:a17:907:c1a:b0:a46:4cc9:765 with SMTP id ga26-20020a1709070c1a00b00a464cc90765mr18172675ejc.7.1710771523108; Mon, 18 Mar 2024 07:18:43 -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 u18-20020a1709064ad200b00a46bda1dbf5si1071599ejt.567.2024.03.18.07.18.42; Mon, 18 Mar 2024 07:18:43 -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=mPkIK285; 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 63F2768D2CE; Mon, 18 Mar 2024 16:17:23 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01olkn2037.outbound.protection.outlook.com [40.92.107.37]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B4F8568D2A8 for ; Mon, 18 Mar 2024 16:17:19 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nYTSVsMwkLiMyeNHKYITwM2WGfemn3bwbR6LbZjiCc+5gAxIEaseSGKCwuxE0mKSXQXl8/l8We5QLVXBC2dxYc4mr0kltPKRiigVm4zldPIg7SqYsMKjmhDPpeUit29oRksVZMWv9/cX7Moa/tvojM0xRcH7j9Irnk0dr0XUt6cIEicPTQirD0B2RhouIDwaPXGLnQnJOz9XI42AwNqWJJa2UmBA1Sgcaw+a0O5faJ+DCQsjwixAxNFI1zx1/uhv/X3+XfWvYCzjotKNg1uQppdjkkb10KneFsXjAvOq+AEwrGV6aCaEDofehkGhpg9m89Mxdee7tBy0VSLKyYqGjQ== 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=Nj7is4El7g2B1BA7daduRZzniKW63MUbUaiBrwZbOBY=; b=Ig5Xa6yV3PQpySiI5f8oAXSJq9ObGVNsixRZlZJ/+8x/xFC/DRgy6XBYmBA7Dndq42JCUwIOoWuQ0sPDXMYtVPBlwM6m2s3jqqYSum2l/AVEVGG0LKlEX7Aj95oMQHgG9fCgWrY27Ni6eFJM9i3br8wZeRpVWPb5cNJlq/uWemYlGVddVAI1V0PzyXQjatGFqlwCHenXtjsH1/Cq+TSoDIUNh+OKD89ee3pWTF+qRzBhTNDl6w/qeZ2xvyD4Po40ezjF2lyzk4mlsfGIQDOFOPePHd4RxB/xdzKR7tqN4ZZhTiVls5nfAR7MIF3kQySdVH+goqUkttXBvsN0niddGQ== 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=Nj7is4El7g2B1BA7daduRZzniKW63MUbUaiBrwZbOBY=; b=mPkIK285PXoFuEMOkKSu9zNoxSQasJdwHTYR+SQ/63BqRKQ1/CKzgOL00USmtSAUzmaw6uPjNxRWdClQQB1HRdhn3NvB9heZkHS0qLfRQdPy9NdDJW4yKuXDkNz51PA/nn8BRtH18/XbeuElae0LdXyDRClLmMbDP3MHPKxaVAqkA0cPwjR/6OBg0gPUKDxCu6n9R0qRY2Ifdv/f9DUuMP4eckaBkQBr0yRo7V9rIZwcLtaQgBrKh5gYYKHaa4Tvs2/S/lYxXDHl5MA8+v0QxR69uzTEeuQfUi+cd0LOdEAJKwMDyqU14K476l4YgR7QpZU5w2XmZJwoDs194nitmw== Received: from TYSPR06MB6433.apcprd06.prod.outlook.com (2603:1096:400:47a::6) by JH0PR06MB6604.apcprd06.prod.outlook.com (2603:1096:990:3f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.26; Mon, 18 Mar 2024 14:17:04 +0000 Received: from TYSPR06MB6433.apcprd06.prod.outlook.com ([fe80::d001:da90:518b:ec1c]) by TYSPR06MB6433.apcprd06.prod.outlook.com ([fe80::d001:da90:518b:ec1c%3]) with mapi id 15.20.7386.025; Mon, 18 Mar 2024 14:17:04 +0000 From: Nuo Mi To: ffmpeg-devel@ffmpeg.org Date: Mon, 18 Mar 2024 22:16:20 +0800 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240318141626.3375-1-nuomi2021@gmail.com> References: <20240318141626.3375-1-nuomi2021@gmail.com> X-TMN: [GveelalKBByk7xhmEbA/1iMTvrk41V+N] X-ClientProxiedBy: TYAPR01CA0085.jpnprd01.prod.outlook.com (2603:1096:404:2c::25) To TYSPR06MB6433.apcprd06.prod.outlook.com (2603:1096:400:47a::6) X-Microsoft-Original-Message-ID: <20240318141626.3375-9-nuomi2021@gmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 2 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYSPR06MB6433:EE_|JH0PR06MB6604:EE_ X-MS-Office365-Filtering-Correlation-Id: 4ec1f589-4a58-4012-22e6-08dc475615eb X-MS-Exchange-SLBlob-MailProps: Vs63Iqe4sQndKyqL8642oOb5kiEsziF1YhBK+JJxZES5uW3wqiLmeqBhD6DNMQhBU0ysoggEXVqotW6tNWiExavZ4728XqljOLRx8szv3IuK/fJ6BC0R7EHY97S/lwY2AT0Yi0xu7GXUQ9CxAj8y4ov9lD2SBmn96r+R/qEGwZy6t3a7R6qzmglEKNLG5Rq3S3GwjsPeGSOJFzKKVrNYEC8TA+/PWtlkjXdpASaYsFZASfBf3tGfN/6YdU+2Bd+zvOooz5nF1rFQMcWi9odO4JY54F1Qbat67hTP+6mtowZ4qezfMy/pAeSKK1Cz0coIfv76hUTPuwYEJAfebuu1gSJMq3rq/pVIxgfkLWl8bKp56fPqGxjJazLmk3KORyNMjNF2l/h/p9NjsuhUcCjQ1V50PL69Oa9EiUdx+EM/sThsk5wr9ca1qaB06mmKruBicbYibtvBkYcM4AIXYb/oc2u2q0yj5sw3vwYtvNYugNmxZ++BT54BF+QC8splj5OFBljDQeCncGIE7iE7pFgDRPCPriX8ft2awmpnwRsDy7iO9/SQ3Owrhk13DDpQt0m5wWYPRDnZ2Cu0EAAQHyRo7/MyBKmIr9QPcc6kKl5TNqyCNEvc6NAbJNTJDexq2luXBfr3egdavIZZcBJRJoX67TCVY5xR9jU6NZhW4edPVjSqmO1angcXcGoamaPwknFS/++LNVDFBTePKRo3QNNUplQnnhwDlfeDQfqGF/7iITw= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3xovHxfPnYG+4vmu6/WPhJSi5S6Xwp2I6EheLrq2fHEcFV7ahzevdsAcptt1fJ70tcaH4Ic+gONK34u37EGKVoZVGZg3xbsZwzN5t6wSypUsm3x7k3Ye86z+8qBLcpOfbQwZrlv+sM8967ivMtbe0BOZlpVaQU2X6lCMhFz86uaW7pOMHqRvxqJtCwQ5cuE2m0sYieVYgywCe2n7QepwBoUaXuC1XoL+5coamgkedE4FNzVOTFnl+TK8z3gK4880EKhpPnX/BeP2c55PSXXzspXsNyu73cI1cObVdsWZg083SRexH2UAXgNH9iZf5IgSUJ56EYr8OQkLiQnlUMKpd699J1G203QyA2f2fJ1zbH4388evQWd2s4rqGTsw1KN/L7JkG7SlN5FMkotlFc6mwfpyoRO4lTUS89tdIwnS18R10Sdn5hY6O0QzC64DMM/fHJccglcRw2Bv00psjsp+aZsm1mQ5KUOZxuvjOidlvAq9+VYyAAb2i6au4ztyqD9UHL25qNAUJX835gjt2aqhlVfMZmZc9D/eA/lfGonggtVTgAJNAPv2j09kSPCT2xVnNRLieyQrlxwDifsfcIT9BQViMMb5OGym99sn0oykuTMdlWNd06asTmvouQxAAAAI X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DskNUHfJVh7pirDJECnONXLlx+lKGWm0LIr2rhfObfiGZd/hXp1aEZi6/bAR5FtVa+pNbpdpqnA2wFS2dzWO2Ur0U89IcTCACorzu887faUUSmXVGTMc4fcj/CMpKxvUPllNRfHlL7eADfMTszFPvcS8xKJ1luCiVYGKu7uFg+CJ5UrG/bAKgYXsQPzu/PN+xe5+wvAB9n0ghaFWwGzNQ3sZW7yB9hXt/5O+jQfGNnnLtt0pXA6Md4FjJ1HQz5uEvp6m0uhf3wUtoSQ+7mSKNnbJOILDUMdHSTF0aFLHh9IRRZisr6WhffvS7zy7/PS5dMwZdY51u1f3hOMgFNO5IOjraBtwmP0owgYCndFgvvE2kbu1l8mpmmqTZfH+lr6dHGZpoyi+2H0yVHIC/2S/W2YCIwKuv/Uq0o7Q/mavzwzH0EyjUXRxr8DWQsL+vpNwAf5i7zrUnLg0b3ki/8pTpQi301pM3chruiod1fY2LXGJ3oFjs9YYVOqSfMxUOtWfC3RP3Mv758A31SEnWoEwjt4z0kpkoSMkNNmUzgzy4hBQbaQY+kEKz+tQsDHf9vkpmbBmYlToEF9BHCqnWQShWHXBzeVB74+P2FJ/ekTvMEqB6kolBsbETY8PX5WentK4i6fFyOVsd651P7X89eehZ7Q2PqIemAB3TduP9NYTqwZh6PaPmWV2pzP+02vtmkxIJJDtNDikm5Kp286KdWYxJxTqZdeB1SVQKzKOiaHB1QhyhxKW0GwDR+/ceXia1wg3q4yTzb1nmnZO1N/C/7G08SGApIyezC6uTnTRBGR1Tt4qkaZr+BXz9/XDd4p6N2XjsooiKIH5VHGj2kXKf1XndypmjmInwFh6DKAlIaRSYbwA3cbDkpdS2fRFvqWWT7Thm4fOh+ZJmtsnF7ee5ADBUZnJbPJMGJkeJA4+zInEoQNu/xW5IKE4yYAIHG7B48RprPeYwEM+WhU9vRXW9WZsEv/G+yF7gL7NeDtPuq3WS33sOWjjR5RNgyXFADnmdWH7Z5NbvfGrrfpBzV+HAYNeA4lwgGEimq5DDwTgk23OYjx/7Ia9L7X4QH3p8e6Zn7oloYCJS0uBqaJrDDEpiLVv8K2zblu5TCL/FoOPLTUHDfx+2hcJwKp1uaeCmbx2L4IApcfW21KxaICmRfhmLxcVkZHJbGwelXz0ARyqyXcNfnN5ubhC3ViRPWSW1fTs0UCbx1LIKWH0L5ulH31ughY0r37R6J7huURy610MVpJUS/YFRxwz4DDOMsbXNrhv9pdyxMZQnGR/VbuW5iTlvZRPvA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ec1f589-4a58-4012-22e6-08dc475615eb X-MS-Exchange-CrossTenant-AuthSource: TYSPR06MB6433.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2024 14:17:04.2522 (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: JH0PR06MB6604 Subject: [FFmpeg-devel] [PATCH 08/14] avcodec/vvcdec: deblock, support subpicture 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: 7GkProDBOEUN --- libavcodec/vvc/vvc_filter.c | 52 +++++++++++++++++++++---------------- libavcodec/vvc/vvc_filter.h | 6 +++-- libavcodec/vvc/vvc_thread.c | 4 +-- 3 files changed, 35 insertions(+), 27 deletions(-) diff --git a/libavcodec/vvc/vvc_filter.c b/libavcodec/vvc/vvc_filter.c index 11972bde41..ecb004d245 100644 --- a/libavcodec/vvc/vvc_filter.c +++ b/libavcodec/vvc/vvc_filter.c @@ -529,9 +529,10 @@ static av_always_inline int deblock_bs(const VVCLocalContext *lc, } static int deblock_is_boundary(const VVCLocalContext *lc, const int boundary, - const int pos, const int vertical) + const int pos, const int rs, const int vertical) { const VVCFrameContext *fc = lc->fc; + const H266RawSPS *rsps = fc->ps.sps->r; const H266RawPPS *rpps = fc->ps.pps->r; int flag; if (boundary && (pos % fc->ps.sps->ctb_size_y) == 0) { @@ -544,12 +545,22 @@ static int deblock_is_boundary(const VVCLocalContext *lc, const int boundary, if (lc->boundary_flags & flag && !rpps->pps_loop_filter_across_tiles_enabled_flag) return 0; + + flag = vertical ? BOUNDARY_LEFT_SUBPIC : BOUNDARY_UPPER_SUBPIC; + if (lc->boundary_flags & flag) { + const int q_rs = rs - (vertical ? 1 : fc->ps.pps->ctb_width); + const SliceContext *q_slice = lc->fc->slices[lc->fc->tab.slice_idx[q_rs]]; + + if (!rsps->sps_loop_filter_across_subpic_enabled_flag[q_slice->sh.r->curr_subpic_idx] || + !rsps->sps_loop_filter_across_subpic_enabled_flag[lc->sc->sh.r->curr_subpic_idx]) + return 0; + } } return boundary; } static void vvc_deblock_bs_luma_vertical(const VVCLocalContext *lc, - const int x0, const int y0, const int width, const int height) + const int x0, const int y0, const int width, const int height, const int rs) { const VVCFrameContext *fc = lc->fc; const MvField *tab_mvf = fc->tab.mvf; @@ -574,7 +585,7 @@ static void vvc_deblock_bs_luma_vertical(const VVCLocalContext *lc, } // bs for vertical TU boundaries - boundary_left = deblock_is_boundary(lc, x0 > 0 && !(x0 & 3), x0, 1); + boundary_left = deblock_is_boundary(lc, x0 > 0 && !(x0 & 3), x0, rs, 1); if (boundary_left) { const RefPicList *rpl_left = @@ -598,7 +609,7 @@ static void vvc_deblock_bs_luma_vertical(const VVCLocalContext *lc, } static void vvc_deblock_bs_luma_horizontal(const VVCLocalContext *lc, - const int x0, const int y0, const int width, const int height) + const int x0, const int y0, const int width, const int height, const int rs) { const VVCFrameContext *fc = lc->fc; const MvField *tab_mvf = fc->tab.mvf; @@ -622,7 +633,7 @@ static void vvc_deblock_bs_luma_horizontal(const VVCLocalContext *lc, has_horizontal_sb = cb_height > 8; } - boundary_upper = deblock_is_boundary(lc, y0 > 0 && !(y0 & 3), y0, 0); + boundary_upper = deblock_is_boundary(lc, y0 > 0 && !(y0 & 3), y0, rs, 0); if (boundary_upper) { const RefPicList *rpl_top = @@ -647,12 +658,11 @@ static void vvc_deblock_bs_luma_horizontal(const VVCLocalContext *lc, } static void vvc_deblock_bs_chroma_vertical(const VVCLocalContext *lc, - const int x0, const int y0, const int width, const int height) + const int x0, const int y0, const int width, const int height, const int rs) { const VVCFrameContext *fc = lc->fc; - // bs for vertical TU boundaries const int boundary_left = deblock_is_boundary(lc, - x0 > 0 && !(x0 & ((CHROMA_GRID << fc->ps.sps->hshift[CHROMA]) - 1)), x0, 1); + x0 > 0 && !(x0 & ((CHROMA_GRID << fc->ps.sps->hshift[CHROMA]) - 1)), x0, rs, 1); if (boundary_left) { for (int i = 0; i < height; i += 2) { @@ -666,11 +676,11 @@ static void vvc_deblock_bs_chroma_vertical(const VVCLocalContext *lc, } static void vvc_deblock_bs_chroma_horizontal(const VVCLocalContext *lc, - const int x0, const int y0, const int width, const int height) + const int x0, const int y0, const int width, const int height, const int rs) { const VVCFrameContext *fc = lc->fc; const int boundary_upper = deblock_is_boundary(lc, - y0 > 0 && !(y0 & ((CHROMA_GRID << fc->ps.sps->vshift[CHROMA]) - 1)), y0, 0); + y0 > 0 && !(y0 & ((CHROMA_GRID << fc->ps.sps->vshift[CHROMA]) - 1)), y0, rs, 0); if (boundary_upper) { for (int i = 0; i < width; i += 2) { @@ -684,9 +694,9 @@ static void vvc_deblock_bs_chroma_horizontal(const VVCLocalContext *lc, } typedef void (*deblock_bs_fn)(const VVCLocalContext *lc, const int x0, const int y0, - const int width, const int height); + const int width, const int height, const int rs); -static void vvc_deblock_bs(const VVCLocalContext *lc, const int x0, const int y0, const int vertical) +static void vvc_deblock_bs(const VVCLocalContext *lc, const int x0, const int y0, const int rs, const int vertical) { const VVCFrameContext *fc = lc->fc; const VVCSPS *sps = fc->ps.sps; @@ -707,7 +717,7 @@ static void vvc_deblock_bs(const VVCLocalContext *lc, const int x0, const int y0 const int off = y * fc->ps.pps->min_tu_width + x; if ((fc->tab.tb_pos_x0[is_chroma][off] >> MIN_TU_LOG2) == x && (fc->tab.tb_pos_y0[is_chroma][off] >> MIN_TU_LOG2) == y) { deblock_bs[vertical][is_chroma](lc, x << MIN_TU_LOG2, y << MIN_TU_LOG2, - fc->tab.tb_width[is_chroma][off] << hs, fc->tab.tb_height[is_chroma][off] << vs); + fc->tab.tb_width[is_chroma][off] << hs, fc->tab.tb_height[is_chroma][off] << vs, rs); } } } @@ -791,7 +801,7 @@ static int get_qp(const VVCFrameContext *fc, const uint8_t *src, const int x, co return get_qp_c(fc, x, y, c_idx, vertical); } -void ff_vvc_deblock_vertical(const VVCLocalContext *lc, int x0, int y0) +void ff_vvc_deblock_vertical(const VVCLocalContext *lc, const int x0, const int y0, const int rs) { VVCFrameContext *fc = lc->fc; const VVCSPS *sps = fc->ps.sps; @@ -806,11 +816,9 @@ void ff_vvc_deblock_vertical(const VVCLocalContext *lc, int x0, int y0) const int ctb_log2_size_y = fc->ps.sps->ctb_log2_size_y; int x_end, y_end; const int ctb_size = 1 << ctb_log2_size_y; - const int ctb = (x0 >> ctb_log2_size_y) + - (y0 >> ctb_log2_size_y) * fc->ps.pps->ctb_width; - const DBParams *params = fc->tab.deblock + ctb; + const DBParams *params = fc->tab.deblock + rs; - vvc_deblock_bs(lc, x0, y0, 1); + vvc_deblock_bs(lc, x0, y0, rs, 1); x_end = x0 + ctb_size; if (x_end > fc->ps.pps->width) @@ -861,7 +869,7 @@ void ff_vvc_deblock_vertical(const VVCLocalContext *lc, int x0, int y0) } } -void ff_vvc_deblock_horizontal(const VVCLocalContext *lc, int x0, int y0) +void ff_vvc_deblock_horizontal(const VVCLocalContext *lc, const int x0, const int y0, const int rs) { VVCFrameContext *fc = lc->fc; const VVCSPS *sps = fc->ps.sps; @@ -876,11 +884,9 @@ void ff_vvc_deblock_horizontal(const VVCLocalContext *lc, int x0, int y0) const int ctb_log2_size_y = fc->ps.sps->ctb_log2_size_y; int x_end, y_end; const int ctb_size = 1 << ctb_log2_size_y; - const int ctb = (x0 >> ctb_log2_size_y) + - (y0 >> ctb_log2_size_y) * fc->ps.pps->ctb_width; - const DBParams *params = fc->tab.deblock + ctb; + const DBParams *params = fc->tab.deblock + rs; - vvc_deblock_bs(lc, x0, y0, 0); + vvc_deblock_bs(lc, x0, y0, rs, 0); x_end = x0 + ctb_size; if (x_end > fc->ps.pps->width) diff --git a/libavcodec/vvc/vvc_filter.h b/libavcodec/vvc/vvc_filter.h index 2ae4c33e2d..9597437d83 100644 --- a/libavcodec/vvc/vvc_filter.h +++ b/libavcodec/vvc/vvc_filter.h @@ -38,16 +38,18 @@ void ff_vvc_lmcs_filter(const VVCLocalContext *lc, const int x0, const int y0); * @param lc local context for CTU * @param x0 x position for the CTU * @param y0 y position for the CTU + * @param rs raster position for the CTU */ -void ff_vvc_deblock_vertical(const VVCLocalContext *lc, int x0, int y0); +void ff_vvc_deblock_vertical(const VVCLocalContext *lc, int x0, int y0, int rs); /** * horizontal deblock filter for the CTU * @param lc local context for CTU * @param x0 x position for the CTU * @param y0 y position for the CTU + * @param rs raster position for the CTU */ -void ff_vvc_deblock_horizontal(const VVCLocalContext *lc, int x0, int y0); +void ff_vvc_deblock_horizontal(const VVCLocalContext *lc, int x0, int y0, int rs); /** * sao filter for the CTU diff --git a/libavcodec/vvc/vvc_thread.c b/libavcodec/vvc/vvc_thread.c index 31c931f050..5d2e8c67b9 100644 --- a/libavcodec/vvc/vvc_thread.c +++ b/libavcodec/vvc/vvc_thread.c @@ -494,7 +494,7 @@ static int run_deblock_v(VVCContext *s, VVCLocalContext *lc, VVCTask *t) lc->sc = fc->slices[slice_idx]; if (!lc->sc->sh.r->sh_deblocking_filter_disabled_flag) { ff_vvc_decode_neighbour(lc, x0, y0, t->rx, t->ry, rs); - ff_vvc_deblock_vertical(lc, x0, y0); + ff_vvc_deblock_vertical(lc, x0, y0, rs); } } @@ -515,7 +515,7 @@ static int run_deblock_h(VVCContext *s, VVCLocalContext *lc, VVCTask *t) lc->sc = fc->slices[slice_idx]; if (!lc->sc->sh.r->sh_deblocking_filter_disabled_flag) { ff_vvc_decode_neighbour(lc, x0, y0, t->rx, t->ry, rs); - ff_vvc_deblock_horizontal(lc, x0, y0); + ff_vvc_deblock_horizontal(lc, x0, y0, rs); } if (fc->ps.sps->r->sps_sao_enabled_flag) ff_vvc_sao_copy_ctb_to_hv(lc, t->rx, t->ry, t->ry == ft->ctu_height - 1);