From patchwork Sun Aug 18 01:48:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nuo Mi X-Patchwork-Id: 51061 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b6ca:0:b0:48e:c0f8:d0de with SMTP id s10csp1228864vqj; Sat, 17 Aug 2024 18:48:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXfFmKDtLahxd7ZNUpuF+xC2U9qO7z63ImjQqdKGH6q6bw3RvPygvJK0P4GtISavowbAQuBHxI289+we7deGlJj@gmail.com X-Google-Smtp-Source: AGHT+IFAfTeqHlhsovV+VVIIPt/y4DTWiQqA0xls238Cu2f+/aEralAsv9td0nddd1+fNf/j6Ja3 X-Received: by 2002:a05:6402:430b:b0:5a1:cf25:75a6 with SMTP id 4fb4d7f45d1cf-5beca4d7c50mr2959286a12.1.1723945724715; Sat, 17 Aug 2024 18:48:44 -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-5bebcf5ccddsi3947120a12.118.2024.08.17.18.48.44; Sat, 17 Aug 2024 18:48:44 -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="Zjf98/Ju"; 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 B4B1368DD5D; Sun, 18 Aug 2024 04:48:40 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01olkn2023.outbound.protection.outlook.com [40.92.52.23]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0A4C468DD32 for ; Sun, 18 Aug 2024 04:48:32 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JiGrDFc2AADgmozSd0MgQn2yqs03HnbP4aG40/+AzxvPlrA2QHNbb7vBzIuTzTYpeTmS03kFCJ4zqzhBzR0un/WcCsLtPvR+6pFwYUqozAwGtuSAiRNGYWgtxf4vc3sxlD9W9D3S+qmUDYLqmHvdL2I+s6BJWJdgsbRfITbkzInVyiO9ZAdymQ6++EJ62SJfmBKNXsUZ8cblnluDIP0GDo5TZTk1nlf5DltC18GwKH4/PLOlseeX4ZcUB22DB8SGUO4hAB7QC2vX+lWTOkmlc3IrqJIiUDDZ63j5p4ssjnDlahG9+CrlgJga1gDFyhKKnC6QqRSGBWuywmm0xwiChw== 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=s6BwlZOp63bf6o3hqFwgxSlZ/r5zML6jTzpk6Nbk9r8=; b=QSelthW4Als/gFJ6XSQc/MGwYYGJSihW2ksrTlCWyh7p1LmXGAblaTp+EvnuwJbxjfbAd47ydhYMNGqG5oVAeNu9MxkZocVVGoeYvjCDEOIjqUYeG9z2jLhXiLiFEg16oiRrljPyibqLyGzsR8XQvy4YuVN7URpiCl1f/ZpU8AKwx3fI4Zu9Po5g3zBSwvlRUsAP+ozDXEv8RRZffLhfE5jpm5VaukBd08MPZYD9eAfWTaGqa7QHxmLGjrbQGidniqTWrPdRLUM08VBsBiYI06jOPoE1PanP8QLXVm5q9qOzG+3ERMF7W6SdJqO9boqAiUZ4COQhS+gY2IbDpKprfg== 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=s6BwlZOp63bf6o3hqFwgxSlZ/r5zML6jTzpk6Nbk9r8=; b=Zjf98/JuWt0VxTHm++/H8HzNuF3RUM8xXrOapAx7wQ5VIQGlev6uhLVIHnoucLWffOXeyzGi3a+SC8EHKridSqe13YCmzAYxjggj5zP59Pq5Y+mMIp+OZRp3Fbhfau4dHtwj8x1YU6WN8zdH3XZFq67OrkQgHrDfH9gSdvUgnAAYBqnT7HnRFLQPd3SKHrAonOmUZQBBdM24FxdGG0rMkKqyQpTYfpcehZ7IOsMKJKd5AMpyKOJ8gSA2Xk6mwP5DT1XDgiMUCHfLaCJDZohU0zo8aWrlQbXHwJ/JKc+5SXwItbHvbnsB6ZgYJArqjPWm5IFndC8+6OGkCylvfdb5DQ== Received: from TYSPR06MB6433.apcprd06.prod.outlook.com (2603:1096:400:47a::6) by SEYPR06MB5208.apcprd06.prod.outlook.com (2603:1096:101:88::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.20; Sun, 18 Aug 2024 01:48:26 +0000 Received: from TYSPR06MB6433.apcprd06.prod.outlook.com ([fe80::81f7:9125:583a:1cca]) by TYSPR06MB6433.apcprd06.prod.outlook.com ([fe80::81f7:9125:583a:1cca%5]) with mapi id 15.20.7875.019; Sun, 18 Aug 2024 01:48:26 +0000 From: Nuo Mi To: ffmpeg-devel@ffmpeg.org Date: Sun, 18 Aug 2024 09:48:04 +0800 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [sChajViA8ghl60XZV7o4TBslihwbLMV2] X-ClientProxiedBy: TY2PR0101CA0034.apcprd01.prod.exchangelabs.com (2603:1096:404:8000::20) To TYSPR06MB6433.apcprd06.prod.outlook.com (2603:1096:400:47a::6) X-Microsoft-Original-Message-ID: <20240818014807.47423-1-nuomi2021@gmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 2 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYSPR06MB6433:EE_|SEYPR06MB5208:EE_ X-MS-Office365-Filtering-Correlation-Id: a221adaf-bb20-4f25-a6a4-08dcbf27d9ef X-Microsoft-Antispam: BCL:0; ARA:14566002|5072599009|19110799003|15080799003|8060799006|461199028|3412199025|440099028|1710799026; X-Microsoft-Antispam-Message-Info: y2BxjumdS3BFdUHvW6fM+FJa99pnPl9sko6A5acxLAL5aHQkIYezkKh7mLbRFxI9+LImna4pmg1pIrEbtRo+kTr/MdfsPEPqW29aSh26/+ASR3/tzwFdWI/KfSjacfMLvaPQXlaB86cn9H08p6MFcKJJuMfFWKsWe3Tc5vqte6SVUgMpOwBAIguhmIr+XBrpi/4mnz3CWF6Th4GLjP1hcFjh9ZJVjDS3fAS7NBYeNujeU10xjOjK3c7f1LOVY0gHoaC8EfjUjUzkOk8fTGAC6oP62iXdOBffkh3wFa6l87FKsMcN+dA5fK25epZ6OlKoz8Zolf6EkL5bUIIqUoIT8f9nP3NImfnioTFbbEz9mz2FCC5IP+L7AAsu02a/IJCrThOQ/v/83tGa40LOWjd1pBKIDnz7RMdrITXmaVn1cINaT0O6HrQOVEIRirgItc3g7TNhxXs4OQ4SHR5euOujpU/ToKQD6CLRzP9HGrhT0XekLwRkQREGoIRlt7jrIQSwkb6DwVAZ5OrQWGVEPuSVSBTANn9mjoJXoTWJa6SLp2ViJXnjThw1gWYB3ryBN48d8WWwkOUWgxgmGpCgM1GNKehSbmcYOEqLRsacfMeSTPR9KG0LOV4il6eFxgtIJ4mcoZg18cYZCyIYM8xZITmPhbXGt+A3vH4zxCaU6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430J3dExszEY0Yg4PGY6FDH6P5b3EbMvYUidRVC/PIjMHf7CfUs7upSU7uz8Y4XXuBUUGqoj8kTzWKpg1zlpmnvu5Jzo1ERNDdhQmpBcDtz/6gOc+7NjlKquVxI8df10MgBxHFsQTwmEnWs9KFx81p2OR/7g31P+LlZMcdE2P03V3f5ukuhci9VrKWF4/qzpyfed9K4d/EQf2D5qopIl921DhxYJ0qrkEONrBP9YkzKaGcnRqRbuLVgzuEwhB6GpOa5XPXLXTuTWaPSI3XTmE5QpMTx8Tfs0fW65NlL88I1wuFyVJBIAwf62NPZSWfGlQjq6/Lq7gblHC6Yt7T4aowNNj991E+T78XQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a221adaf-bb20-4f25-a6a4-08dcbf27d9ef X-MS-Exchange-CrossTenant-AuthSource: TYSPR06MB6433.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Aug 2024 01:48:26.6319 (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: SEYPR06MB5208 Subject: [FFmpeg-devel] [PATCH 1/4] avcodec/vvcdec: misc, rename BDOF_BLOCK_SIZE to BDOF_MIN_BLOCK_SIZE 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: flmBUW7e73YX --- libavcodec/vvc/dsp.c | 4 ++-- libavcodec/vvc/inter_template.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/vvc/dsp.c b/libavcodec/vvc/dsp.c index 648d54ebb2..7463d8c9de 100644 --- a/libavcodec/vvc/dsp.c +++ b/libavcodec/vvc/dsp.c @@ -80,8 +80,8 @@ typedef struct IntraEdgeParams { #define BDOF_BORDER_EXT 1 #define BDOF_PADDED_SIZE (16 + BDOF_BORDER_EXT * 2) -#define BDOF_BLOCK_SIZE 4 -#define BDOF_GRADIENT_SIZE (BDOF_BLOCK_SIZE + BDOF_BORDER_EXT * 2) +#define BDOF_MIN_BLOCK_SIZE 4 +#define BDOF_GRADIENT_SIZE (BDOF_MIN_BLOCK_SIZE + BDOF_BORDER_EXT * 2) #define BIT_DEPTH 8 #include "dsp_template.c" diff --git a/libavcodec/vvc/inter_template.c b/libavcodec/vvc/inter_template.c index afcee2e360..0f1712e337 100644 --- a/libavcodec/vvc/inter_template.c +++ b/libavcodec/vvc/inter_template.c @@ -433,8 +433,8 @@ static void FUNC(apply_bdof_min_block)(pixel* dst, const ptrdiff_t dst_stride, c const int16_t* gh[] = { gradient_h[0] + 1 + BDOF_PADDED_SIZE, gradient_h[1] + 1 + BDOF_PADDED_SIZE }; const int16_t* gv[] = { gradient_v[0] + 1 + BDOF_PADDED_SIZE, gradient_v[1] + 1 + BDOF_PADDED_SIZE }; - for (int y = 0; y < BDOF_BLOCK_SIZE; y++) { - for (int x = 0; x < BDOF_BLOCK_SIZE; x++) { + for (int y = 0; y < BDOF_MIN_BLOCK_SIZE; y++) { + for (int x = 0; x < BDOF_MIN_BLOCK_SIZE; x++) { const int idx = y * BDOF_PADDED_SIZE + x; const int bdof_offset = vx * (gh[0][idx] - gh[1][idx]) + vy * (gv[0][idx] - gv[1][idx]); dst[x] = av_clip_pixel((src0[x] + offset4 + src1[x] + bdof_offset) >> shift4); @@ -461,8 +461,8 @@ static void FUNC(apply_bdof)(uint8_t *_dst, const ptrdiff_t _dst_stride, int16_t _src1, MAX_PB_SIZE, block_w, block_h, 1); pad_int16(_src1, MAX_PB_SIZE, block_w, block_h); - for (int y = 0; y < block_h; y += BDOF_BLOCK_SIZE) { - for (int x = 0; x < block_w; x += BDOF_BLOCK_SIZE) { + for (int y = 0; y < block_h; y += BDOF_MIN_BLOCK_SIZE) { + for (int x = 0; x < block_w; x += BDOF_MIN_BLOCK_SIZE) { const int16_t* src0 = _src0 + y * MAX_PB_SIZE + x; const int16_t* src1 = _src1 + y * MAX_PB_SIZE + x; pixel *d = dst + x; @@ -472,7 +472,7 @@ static void FUNC(apply_bdof)(uint8_t *_dst, const ptrdiff_t _dst_stride, int16_t FUNC(derive_bdof_vx_vy)(src0, src1, gh, gv, BDOF_PADDED_SIZE, &vx, &vy); FUNC(apply_bdof_min_block)(d, dst_stride, src0, src1, gh, gv, vx, vy); } - dst += BDOF_BLOCK_SIZE * dst_stride; + dst += BDOF_MIN_BLOCK_SIZE * dst_stride; } }