From patchwork Mon Mar 18 14:16:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nuo Mi X-Patchwork-Id: 47169 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:958e:b0:1a3:31a3:7958 with SMTP id iu14csp1042219pzb; Mon, 18 Mar 2024 07:18:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU3crf4re+cJqar5vCvjHXQ1N3aD1nbelj80NjRt/BauGj0dwpnUqEz+WEe+98nPDzjloIz2O8iV4+eEMP98wkzEx2r1/CIwHpsXg== X-Google-Smtp-Source: AGHT+IFAv62KqQC/2bbSTPQMJxo3JNDS8Lxq6KctTY2cDquJrylX6WEzx6vmZnUulha/5B17Qgu2 X-Received: by 2002:a17:907:d40f:b0:a46:7210:b46f with SMTP id vi15-20020a170907d40f00b00a467210b46fmr10243774ejc.34.1710771493497; Mon, 18 Mar 2024 07:18:13 -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 b14-20020a170906038e00b00a46a8fd1b4fsi2293408eja.1007.2024.03.18.07.18.13; Mon, 18 Mar 2024 07:18:13 -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=ifjmCfqp; 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 0E47468D2AB; Mon, 18 Mar 2024 16:17:20 +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 19ACA68D29F for ; Mon, 18 Mar 2024 16:17:13 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RZznFnZy/CLxvvh7CM9EYjy6V4vfIvkeuE8D9w/7+EbdKuQISybaDGlMJBsRHIaVAbpO/ZDxBMCz+ti+yBoGuZTHUCPBrwHa4lT+QhxNinnWTBejB0J5nr6Oi130fadDA2d/64kNtusQ8zPhZn4L6CrV/wL5jVo5BGnsy57qU01tyNP+WLobh3LBvXm0FL5phr8pRZx5N9NSDU2FQuXLKz2oYZfwi4QVn1e8SuoU0a8DOf4kPtgYQTCnAUAGyfCwbD5kOy6cH4hVi+SNSQuAUPwLa9pRBYyW3eVR9hh9WRBD6yiYohuxZt0za0vFTso9zb9RCI+A6BEFCFhD8m1x4w== 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=6LWw13vuwSxrXBNrqlnI8Mq8o3HpZv8p1bezJZ1kZzo=; b=KdEAKej13XaAk9W1ggTCogiimznU816qBve3MIVu0UKeYkNww8yfcYzWppAHkpPn84pnKCRkWN1r9VyoNp4/pGv/V8iZDLGEQTk5NF1/Sbhs00NR/NuZ8ivg2h+cZKret/bH7NQHl/Bt7GesCFn8EgJukG1SVJNdr8pRlDOillY1Ybi2USIl8kY1hJtpUgFtD2+5NbzYFQe/qobfyLsZQE+UxuJfbh0yq3P/Ui+jrgLloZWPZwSS5JCEJ5Ux8ccbx+ZkKmAftnN6GzQ70UY9qbBgVJRl0WfbLVQgBfiTv+wz8gnnCsAG4hE/8rAjjMuB3DVqfm7Mg8cfBv/foqRSNw== 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=6LWw13vuwSxrXBNrqlnI8Mq8o3HpZv8p1bezJZ1kZzo=; b=ifjmCfqp5xqk1RnGDgJamjmlLWna58iZNdT0/W7ty4+UnR4LDtkh+FAkgWJJAOHO2hcu9MJQ5Z7oovb4PLIMd8Lc/W7oD+EwPLUqM74Vw4fIWsGq9TXebdCIvEKqRCZmj5h7Sn7J7/iEzoln+ntCtw+EP7d0Z9Q4772x+ZBpzT0CISxRWVbhrMsFPREeouxI1IA21H8CVKePP2Qmsl+/bfxzjNCjvAg0OGoPvi1lK31M8bVA0PGocESSPnzyXv/P6JDR4jFV514YEql7R3K2L+KcU96hj8xvqM9jsJcZ8a2ZxUJa5ryHshARGb9+2KPxKvwRIM/Kh5LY8/y7Rqry+g== 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:01 +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:01 +0000 From: Nuo Mi To: ffmpeg-devel@ffmpeg.org Date: Mon, 18 Mar 2024 22:16:17 +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: [JTJh/IfHy7A22ecy/mS5bpK0xJ31JM3Z] 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-6-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: 5c597ceb-be91-4bc3-50b7-08dc47561467 X-MS-Exchange-SLBlob-MailProps: CLk2x5OX5VbP4DIzMIdqbAoMZfh5EivPUlbCLlYpelHOMx9qWpy87SoWh+86BWE67zp61vDL3IhT4cxI0CSB9OI9G4pdgnRgBZlrWp3y323qOPCRaI2iuZXG1FN/+xSDmf45MYLwQJ/4w1/6MIyEFjOXR31cpLWqV6pShowvIT9FeprWNmcSAr2dB1CXdquFuFqRdewBysrPfrnBnwYJe18AEiRFffLU84anaf4lGx5NSoUTExY+w4FhOqidsCpAi/BCaNw1mlbAD1BZVamvZgA62e/YPGvbbr4RTAeXdeRv6Lxslw4KUWsze2sbgAPzx2ELpJwIsQW2QK6LjuB9pE3CaOn2AWgEagGshddhGGlqMb3TK6p8VQGum0o9cEWSAAqeURFcPXtknxslKFv37lii7Z4B8V0nbDWNOL2fiOOIvsOIAZRWb3Q1//TqZoJcaFPLCZ5ni8ENrzkgRa4wYRy0LmvSsUnisucpV4oBMaKZx51g8aYLve6m/boNSxmYyDSzRJgWcQMENXeKCWnls7rspSLu7k3cxdSN3RkS+pN+tkIV84LDkHH7KCAZQVqpeMJxUzRrqbHmuR+616Epj4919Ts+/JsQj/W2A5dJ32zDDHphp9dFzIMNBgYSwiOjVkovX4dwYGg9VUvoRaOvGeOZu3JY5qXcp0ZM3xga0PIRSbWNHvCkgphBJFaqcfcllFpq5YM8tRgMO9VbaDABiQ== X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xUisTFm9lOnCXFnr8ByKU8xmeYZe94iDGxcbZj14n+sc1TXoRbxvrmqhWiIUGK4cFJ0meObOwCzOvhyZp/NkeCQk6XkjmQCsgbsQ+kzo9bX6+O9jRE5l3CM+uwIsoGfDyIObzH6UhGqquFyvwXNrIuAYn5GtKK6nT2RCGLh4gDSvxt2yVZCXlpxJgjxElM2insvx6d5rwwl8oxzf6vXGH+ACHZrdlxPd/uvPTMPRaVmjj21rPMKz/gSelvyv482m3KgdgUc9e7hcV9z86NDw6i+ReVKn6TxJ8ntV7w23TVEV16UbQ6BSddzIItWPDBQF17g9OAfXWz14ZlCVcfQmSBWRHkBwuqJyYTADONHDH93hEHOX3TNlVuEKCqrVznGRaLd0aFIzjVAwqvziPhLQwRL+6PcUWkmjQOe5LzrgA9jwYLDbHPUlPDroMZ/SUxu0onMdohcNSH+epO0buBnsn991C+tDJiKTSwmBt1pU3LBqWiGb7QxWn1V62/b7se/CcngywrAbPDm7gf5IeSLP3Hjp2tmBb7XVgFfeCiGj9i9HsE+pqE1JwLLGpyTugeX7GMl+Yaavn1Ff/+WmtKSriuidQeGu+J9Wut0NHqnzIJYhal3PFD67Us/6lrKGrJit X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BPdhk1wTkyNAsInOZZLR6nY9RwYATcZNpzgV2yjSwZQXowi0Jk69MJiUjq730pvtCNgLeT67moH1IhQaNM64jTC0AJmgUN5CJZiybFeveRWEQ1of7EYGf31HR7IPvEUTPjbVKR0ysplkH9c8S6fxc1PyK0PqiE2nvFPx90egv5eWi1i8JyK5O4xEaW9L6cCikI8DSw1qHWWTadBuzA6yBCYPWrmq7xlIee3Zd3F4x/F/GKEAhShS3hI9PhoOApizyDOoZjSZya/Q+/06cHXRMZjBBUblP2uddna6txZQxj1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Exchange-CrossTenant-AuthSource: TYSPR06MB6433.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2024 14:17:01.6972 (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 05/14] avcodec/vvcdec: ff_vvc_decode_neighbour, 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: HzXpApEI4Rea --- libavcodec/vvc/vvc_ctu.c | 4 ++++ libavcodec/vvc/vvc_ctu.h | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/vvc/vvc_ctu.c b/libavcodec/vvc/vvc_ctu.c index 75b9e73ae3..75d9f07143 100644 --- a/libavcodec/vvc/vvc_ctu.c +++ b/libavcodec/vvc/vvc_ctu.c @@ -2493,6 +2493,10 @@ void ff_vvc_decode_neighbour(VVCLocalContext *lc, const int x_ctb, const int y_c lc->boundary_flags |= BOUNDARY_UPPER_TILE; if (ry > 0 && fc->tab.slice_idx[rs] != fc->tab.slice_idx[rs - fc->ps.pps->ctb_width]) lc->boundary_flags |= BOUNDARY_UPPER_SLICE; + if (fc->ps.sps->r->sps_subpic_ctu_top_left_x[lc->sc->sh.r->curr_subpic_idx] == rx) + lc->boundary_flags |= BOUNDARY_LEFT_SUBPIC; + if (fc->ps.sps->r->sps_subpic_ctu_top_left_y[lc->sc->sh.r->curr_subpic_idx] == ry) + lc->boundary_flags |= BOUNDARY_UPPER_SUBPIC; lc->ctb_left_flag = rx > 0 && !(lc->boundary_flags & BOUNDARY_LEFT_TILE); lc->ctb_up_flag = ry > 0 && !(lc->boundary_flags & BOUNDARY_UPPER_TILE) && !(lc->boundary_flags & BOUNDARY_UPPER_SLICE); lc->ctb_up_right_flag = lc->ctb_up_flag && (fc->ps.pps->ctb_to_col_bd[rx] == fc->ps.pps->ctb_to_col_bd[rx + 1]) && diff --git a/libavcodec/vvc/vvc_ctu.h b/libavcodec/vvc/vvc_ctu.h index 8020e184c5..460dbdba59 100644 --- a/libavcodec/vvc/vvc_ctu.h +++ b/libavcodec/vvc/vvc_ctu.h @@ -421,8 +421,10 @@ typedef struct VVCLocalContext { #define BOUNDARY_LEFT_SLICE (1 << 0) #define BOUNDARY_LEFT_TILE (1 << 1) -#define BOUNDARY_UPPER_SLICE (1 << 2) -#define BOUNDARY_UPPER_TILE (1 << 3) +#define BOUNDARY_LEFT_SUBPIC (1 << 2) +#define BOUNDARY_UPPER_SLICE (1 << 3) +#define BOUNDARY_UPPER_TILE (1 << 4) +#define BOUNDARY_UPPER_SUBPIC (1 << 5) /* properties of the boundary of the current CTB for the purposes * of the deblocking filter */ int boundary_flags;