From patchwork Mon Apr 15 17:35:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 48078 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:670b:b0:1a9:af23:56c1 with SMTP id wh11csp1995283pzb; Mon, 15 Apr 2024 10:36:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXdz5EvnynwvsGutzqWdNPsM28HZiXq8YlFNc4/u12R7I5yHrM/YX0cEP7Bvnc/wAhCQeog4Hji3ZMWpKH2bQ+7jCPjM7D6/jw4wA== X-Google-Smtp-Source: AGHT+IGgdqKCyWVEWcmttVnn+LIu23RjFHJWEQW62NMBYqESfFr/YBOiHqVLLZ4/08ZBW/8z2alW X-Received: by 2002:a17:907:764c:b0:a52:57ad:63d0 with SMTP id kj12-20020a170907764c00b00a5257ad63d0mr3268917ejc.20.1713202583616; Mon, 15 Apr 2024 10:36:23 -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 h21-20020a170906719500b00a523b7153e5si3393602ejk.815.2024.04.15.10.36.22; Mon, 15 Apr 2024 10:36:23 -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=PeIEYKjv; 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 DD22168CE20; Mon, 15 Apr 2024 20:36:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01olkn2018.outbound.protection.outlook.com [40.92.99.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AE05468CC49 for ; Mon, 15 Apr 2024 20:36:13 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FfAYHNDjMZ/5GixB5sfIL/0f34qKMUwHfF4LPUzHR7zLKblhGs9GVEZi9lXc31yBPgfFLUl6SHlgq7uwPmvaIXYI/WWid9BS4Nc6uzkGHW6G4rTYW3WHP8znRTA1T2xQsXsMczcjuP7DaG9YLtkC9OTuKUSvWCeA+rYBZTFQz9xs8BFPP+fZraAxVo9/SXoRTU4yfwDAQ26kg561QnrIG1Rnk3YxwiQrc68B+q4sgTfLwEmkncueZGeKhRA+AYG46HckOxfk4EhqOT3Y9PEleTJ0uLisio3HWTJBXGqfpTjIiW3qSHsRvAZWpWIk5AY6mSb1httWhU9MpHfOac/hBA== 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=hQ0IBx8wc4+fbJuuy5/WfFdDjArv7d7hKFDORjcCjVk=; b=DVabPrKRctTTSCEs8js5Ib8NZUv/C7MsRdIweamo8A5n8/HlrTb/maG0AwO9yMa6JkAhVakKT9LWaq+YLMJesRMVKSGZ0MR6Khg3vAkeLaIZNa/nrJ/roapCyUjZRjGoHE8gHKntyh5gQSlk4rrlb3Vei6mwxId3qHa0/3B6tUDcH2w8mXKPUQ5qme0jdQqVP4T4z6dXIh7fVmwm/SiqbOEbN1Hxnm8FBguwIOU3XkqyMsGH6zUggM6viSpiT+bTZR+YKNJ2SE7DPUDNhZl5D4FHYsiyieie/DqdgGbWrA2QOZjXPZcE+/MYsFsQE1arbbF66Hk1qfYNV4sf+DQZsg== 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=hQ0IBx8wc4+fbJuuy5/WfFdDjArv7d7hKFDORjcCjVk=; b=PeIEYKjvEyELuTXdFxirgPD9WR/XMhHWXIQlLLWqJEeJFmsPdWiC/98TgC9K1HiH8yGMMkxrue2E2C4wLRugMNSg4gq9ms2nZTko1E6o1X9W8gWxYGHbFa77oI4IMranhtG3S9VOmPEgrDpnkMZsadmc+Ik5ZauZKqiliSmv4NlXYFaAvXiZ4uLG/jEL/XgTxAnb2U+RzpXlDqqVRtSF6d0n1td5NVLUcVaAHPugso9Bx/fSDinMnErAin6MtiPysvGOVwxiG94l/IoxVeiR5pUpN/uAbQLszqsuGCExdcnDuv5OCpk0JhyMfHUCyq4AyL0ZfwlnRiRlFMkenBapmg== Received: from OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:186::5) by TY3P286MB3030.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:319::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.50; Mon, 15 Apr 2024 17:36:10 +0000 Received: from OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM ([fe80::c2ed:24ae:fd4c:fee7]) by OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM ([fe80::c2ed:24ae:fd4c:fee7%5]) with mapi id 15.20.7452.049; Mon, 15 Apr 2024 17:36:10 +0000 From: toqsxw@outlook.com To: ffmpeg-devel@ffmpeg.org Date: Tue, 16 Apr 2024 01:35:48 +0800 Message-ID: X-Mailer: git-send-email 2.44.0.windows.1 X-TMN: [y4HFQ0r5rK1zVnSIKCtSjAl/SAzGCmGA] X-ClientProxiedBy: PU1PR06CA0014.apcprd06.prod.outlook.com (2603:1096:803:2a::26) To OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:186::5) X-Microsoft-Original-Message-ID: <20240415173550.657-1-toqsxw@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OSZP286MB2173:EE_|TY3P286MB3030:EE_ X-MS-Office365-Filtering-Correlation-Id: 76829d78-5b05-4c9f-d209-08dc5d7289ac X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +0xS7o1pZK1O0NXQLhIQnd7Ol9ME9Hp+WAbpOiM9QQB3E85vVWbTlfT9bAfX2DFMCyt1WsflUV/e73gWIkDLyalW9QB0ZUjZgm50Icsvf8x1Tjq5QcB5HYqG+GaB3HmSLObRs9fMptC1LFN/YTkSumQA8v/1RMR/mhfk+ss2qkuDeXWEOPEoXIzvHu7zRq6sFbPQRIsRhApviaxymgJoMBpINNREHN7DY0WXlzXqD7uh2I02PFFy0EkNWxy0xj50Xf02LrjIL2udE0E3GD/hEl4Yp9x6wOkD6/OfN5SioUTs3ZcWdmTpXdHR6juio/tCbD21vA0Un7ZlKeQ2ElS2GN4yA5nAWRLhJDp9L8AQ076GPUKnwcUhHWbqZT/ZICOXsP8sAdey+hkB7AzcvSC6JE5260jJ1/xNMHakPa4EfsIjRLTalpC3qgKgk8smCijgoPY/AM5d/O4L3J+b/+bSAjCUzqYicWUTkpK7Y/gsl1Iwv3ak733jYCeOLu/uFxjtRvEmXkdLjPSk/dSvfPKeYKb4c02+1/Lp07ZvPz974MuKGt9rxGke6C+hQnAkGu8mexLO/l08MSE4PIqgajxcQUg9xP7b6Zl9o9yuAMuv9XWJEkb76HIweGNpzKH9YW9u X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X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ApnHOZfm8fR+gNGngGoYcximuo/DElOgpsXwAdp7O161ogDlfpzW+JDVwwB41DB54ulKSUqJPUR3NvSYL2tgeCaOSb1sq5Ik4gTJAOB3hW9XS4fIFIGZiw7Y/W4U5kne0EiEqm1BFq28DLG54LpZV4NUBHzE4Ja7GkiqGvirLu07KITEdjxJ/nPLN7WwTnyBj03EYq7uZJeGzB/a+HhO60= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76829d78-5b05-4c9f-d209-08dc5d7289ac X-MS-Exchange-CrossTenant-AuthSource: OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2024 17:36:09.9401 (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: TY3P286MB3030 Subject: [FFmpeg-devel] [PATCH v2 1/3] avcodec/x86/vvc/vvcdsp_init: add put prototypes 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: AI/AF0B4w7Ux From: Wu Jianhua Signed-off-by: Wu Jianhua --- libavcodec/x86/vvc/vvcdsp_init.c | 35 +++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/libavcodec/x86/vvc/vvcdsp_init.c b/libavcodec/x86/vvc/vvcdsp_init.c index 23a3172c45..d9203f4d5f 100644 --- a/libavcodec/x86/vvc/vvcdsp_init.c +++ b/libavcodec/x86/vvc/vvcdsp_init.c @@ -30,9 +30,42 @@ #include "libavcodec/vvc/dsp.h" #include "libavcodec/x86/h26x/h2656dsp.h" +#define PUT_PROTOTYPE(name, depth, opt) \ +void ff_vvc_put_ ## name ## _ ## depth ## _##opt(int16_t *dst, const uint8_t *src, ptrdiff_t srcstride, int height, const int8_t *hf, const int8_t *vf, int width); + +#define PUT_PROTOTYPES(name, bitd, opt) \ + PUT_PROTOTYPE(name##2, bitd, opt) \ + PUT_PROTOTYPE(name##4, bitd, opt) \ + PUT_PROTOTYPE(name##8, bitd, opt) \ + PUT_PROTOTYPE(name##12, bitd, opt) \ + PUT_PROTOTYPE(name##16, bitd, opt) \ + PUT_PROTOTYPE(name##24, bitd, opt) \ + PUT_PROTOTYPE(name##32, bitd, opt) \ + PUT_PROTOTYPE(name##48, bitd, opt) \ + PUT_PROTOTYPE(name##64, bitd, opt) \ + PUT_PROTOTYPE(name##128, bitd, opt) + +#define PUT_BPC_PROTOTYPES(name, opt) \ + PUT_PROTOTYPES(name, 8, opt) \ + PUT_PROTOTYPES(name, 10, opt) \ + PUT_PROTOTYPES(name, 12, opt) + +#define PUT_TAP_PROTOTYPES(n, opt) \ + PUT_BPC_PROTOTYPES(n##tap_h, opt) \ + PUT_BPC_PROTOTYPES(n##tap_v, opt) \ + PUT_BPC_PROTOTYPES(n##tap_hv, opt) + +PUT_BPC_PROTOTYPES(pixels, sse4) +PUT_BPC_PROTOTYPES(pixels, avx2) + +PUT_TAP_PROTOTYPES(4, sse4) +PUT_TAP_PROTOTYPES(8, sse4) +PUT_TAP_PROTOTYPES(4, avx2) +PUT_TAP_PROTOTYPES(8, avx2) + #if ARCH_X86_64 #define FW_PUT(name, depth, opt) \ -static void ff_vvc_put_ ## name ## _ ## depth ## _##opt(int16_t *dst, const uint8_t *src, ptrdiff_t srcstride, \ +void ff_vvc_put_ ## name ## _ ## depth ## _##opt(int16_t *dst, const uint8_t *src, ptrdiff_t srcstride, \ int height, const int8_t *hf, const int8_t *vf, int width) \ { \ ff_h2656_put_## name ## _ ## depth ## _##opt(dst, 2 * MAX_PB_SIZE, src, srcstride, height, hf, vf, width); \ From patchwork Mon Apr 15 17:35:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 48079 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:670b:b0:1a9:af23:56c1 with SMTP id wh11csp1995369pzb; Mon, 15 Apr 2024 10:36:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWg1319Nsx8bvxcUGtsBCa8Q+6HfZgzpWCVkCmgcDQyTQy720AjMLZo9oy8M83a5X7rAWTxipiVUE9dxZDmuTKe7y79bg9Vgl3KXg== X-Google-Smtp-Source: AGHT+IHZHdb0f0wKLTQsuqA7x0v7g1nkYX0k1vs4VWr16PsfisGIeockDinERLxSehx6LDIXQGim X-Received: by 2002:a2e:7d15:0:b0:2d4:49d1:38e with SMTP id y21-20020a2e7d15000000b002d449d1038emr8320666ljc.28.1713202591732; Mon, 15 Apr 2024 10:36:31 -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 nc35-20020a1709071c2300b00a51d7627d64si4810947ejc.101.2024.04.15.10.36.31; Mon, 15 Apr 2024 10:36:31 -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=Z63hWJpj; 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 02B7268CF0F; Mon, 15 Apr 2024 20:36:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01olkn2018.outbound.protection.outlook.com [40.92.99.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 35EBC68CD53 for ; Mon, 15 Apr 2024 20:36:19 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BBkFyPt+7OvabLegROth+rrJH/j4rxpYKWZ/bM/VK7DJt/LFnGwgRnHV4xcGRqJcRJMnGVNQT8GFb8WTjUiq13jm0GGa8kvvzi/n9nqLefC91E/bUNUkN4XYcWjSLovDIiEVW0p2jSNEAZ68PnrrCsnYzIBieomgzZIatWvkf2sFgXIlSKu7DRpvp2aj5ayTZGwr6E1OmCDCyqNdruDegLmYlCyombrMlgvYMGeFPJ9OG+wibl0H9osCK/SC46iDSibzBUEIhn9MJQ2MIf2q/en8GzuGBd3XeX8HlWOBB6IZjESPECsavEfhLvytTnXkNDUzjRDV++gtXi/FAepJSQ== 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=Qp2PRp0EC1YfAHy7PO1CXrAXscHKwalqUBtUIvuw6Bg=; b=gQpRPCPrrBwEuCx85yT5tEDUa5/W/S3GKrbcGLEOlUX5fRmNao93iNiKnJW8xCacnCx7bD/AkCa94WlxNGYq+bK69jOnAABncFVE2ok/z/2nWiREro6bVLDpYAlsUjonimVlRZCLOojf6Uadg41Q5IqikQsDx7YmC85sVx4UUCnSgq+eUwoPhSOJqpQCZEg6ll05vBk+UgKTH2PFz3+hl0Aus01cZxsdJK8ItXHHnTtN20y20QwL97sRSiEl9NlA5PE9CiTS+PcIaEBngW3zUeEXG8inQGx3tzyH+UnTVpaqW1zj45Snk0bejl3HlftkXdGEB0U8LmvFYgIInlEt9Q== 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=Qp2PRp0EC1YfAHy7PO1CXrAXscHKwalqUBtUIvuw6Bg=; b=Z63hWJpjpz2R55W70XRahntNA//3xeajavh5H092MHv1FUzviA2dL8HSR/S4EkSKogJxuq6A7knKHCT80ufQhyG9q8z2tfQuRm+whMflUISd7XIFV0nneYloONOsZdCC4sTohNm+A6vWDXK6gB/4lbui9L/3v1XVTphLLXWRPGNUk+srXu8gRdfkyzWomlzH5KoT7bwH+g70ReNPm/uzFy42LU4NtpIDlJQzIjgWx/vetYS99K9Qzk/79Ig5WPwJk/Wn3hKdOeWPLl2H9eVtB8nq/Jwo8gqjmdH8/PipF3s1qwpOonRfMtH92lHQYLIFjtWaneul8b9vA2KlKMqCoQ== Received: from OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:186::5) by TY3P286MB3030.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:319::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.50; Mon, 15 Apr 2024 17:36:11 +0000 Received: from OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM ([fe80::c2ed:24ae:fd4c:fee7]) by OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM ([fe80::c2ed:24ae:fd4c:fee7%5]) with mapi id 15.20.7452.049; Mon, 15 Apr 2024 17:36:11 +0000 From: toqsxw@outlook.com To: ffmpeg-devel@ffmpeg.org Date: Tue, 16 Apr 2024 01:35:49 +0800 Message-ID: X-Mailer: git-send-email 2.44.0.windows.1 In-Reply-To: <20240415173550.657-1-toqsxw@outlook.com> References: <20240415173550.657-1-toqsxw@outlook.com> X-TMN: [4vW1UQPuTdNeMtEOXcoesWbdcx5+5kBl] X-ClientProxiedBy: PU1PR06CA0014.apcprd06.prod.outlook.com (2603:1096:803:2a::26) To OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:186::5) X-Microsoft-Original-Message-ID: <20240415173550.657-2-toqsxw@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OSZP286MB2173:EE_|TY3P286MB3030:EE_ X-MS-Office365-Filtering-Correlation-Id: d36ac7fb-d48c-458c-5870-08dc5d728a20 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qOFL5Bgx2r/Jc1ln4UZlkNy7ypjvou+d2dmyM6yCRTXj7qlbe1VGYb0OW3LE3af+RZmX2a3HbO9bEgYjKm+uMfTRlZRtpVaXWMYUazy36KRkZQNiMp6xAvm+SvYhm60LnLjHvPy3Nx+bpk2zyz6aN2NT+jBPgLb7nQcekhG548OFBkyW/Z31sZG4D3FGNZGYAFXSV0S+gUuPiV2AaLqA5NcOfYqji9J3d6bSaT4iVCt5F9s2aHQ66TcEK3rHPn4xXCHWF51qhMcsX2CA12O+RE0XhS3p4cwx7ZcoSeds4ZpL2SPJ4Usd5ZwlrRhfsYiTH57GzNsxU0e1p69W2T1QFS7ezBQjVw7Z+dTw9sXFK/r3OjrHdqRRgaapBkJ5g1NqvuVVXLqT4uNv1LZAvNPsESXY3zJ3BGrYcB+tCvxnL08OM0//EPU7nY3jHYbCqilVC97eGBPdRioFXsLI5ClzF2bQRQtTaIk2w8BnsC1PaEL6uq92u9OPTim9w5S8u+Xw1gFVR8gGOuHOEjGTR+QLEA8tsGkroKgAezzN3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NyrjMmd0JyQaAt4HO5/bNp4pCWro2Swe1PZYYiQQzG1iotDc39OEbFlEkjC04qWlpvXYD/dKjcRd1vfVn8osMr8r3N8Z8E+6xkS1At3Ank+Mgmcs2J7/eCoXcIbHSkoby2I+F5BKjKixA3MBlSc4IltAOJOy+onGznVUmc4FFovlJIHl3rqdK1d+Ii93gVOv4kwh77e4Qvg88h566a7JfiAi604RNSe+TLBjyqyig7w5chnBjAbn7AZ/qarSxXyMNh/y4DthOl3A184agXe0e5heREiD1ewFTnopWth8K0SLzJHlufsdB9WPvm0YLQ8QkZjRXuUz90r2U= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d36ac7fb-d48c-458c-5870-08dc5d728a20 X-MS-Exchange-CrossTenant-AuthSource: OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2024 17:36:11.1214 (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: TY3P286MB3030 Subject: [FFmpeg-devel] [PATCH v2 2/3] avcodec/x86/vvc/vvcdsp_init: add avg prototypes 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: 9oaK8ylSECMS From: Wu Jianhua Signed-off-by: Wu Jianhua --- libavcodec/x86/vvc/vvcdsp_init.c | 45 ++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/libavcodec/x86/vvc/vvcdsp_init.c b/libavcodec/x86/vvc/vvcdsp_init.c index d9203f4d5f..aef6699c35 100644 --- a/libavcodec/x86/vvc/vvcdsp_init.c +++ b/libavcodec/x86/vvc/vvcdsp_init.c @@ -63,6 +63,30 @@ PUT_TAP_PROTOTYPES(8, sse4) PUT_TAP_PROTOTYPES(4, avx2) PUT_TAP_PROTOTYPES(8, avx2) +#define bf(fn, bd, opt) fn##_##bd##_##opt +#define BF(fn, bpc, opt) fn##_##bpc##bpc_##opt + +#define AVG_BPC_PROTOTYPES(bpc, opt) \ +void BF(ff_vvc_avg, bpc, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ + const int16_t *src0, const int16_t *src1, intptr_t width, intptr_t height, intptr_t pixel_max); \ +void BF(ff_vvc_w_avg, bpc, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ + const int16_t *src0, const int16_t *src1, intptr_t width, intptr_t height, \ + intptr_t denom, intptr_t w0, intptr_t w1, intptr_t o0, intptr_t o1, intptr_t pixel_max); + +#define AVG_PROTOTYPES(bd, opt) \ +void bf(ff_vvc_avg, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ + const int16_t *src0, const int16_t *src1, int width, int height); \ +void bf(ff_vvc_w_avg, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ + const int16_t *src0, const int16_t *src1, int width, int height, \ + int denom, int w0, int w1, int o0, int o1); + +AVG_BPC_PROTOTYPES( 8, avx2) +AVG_BPC_PROTOTYPES(16, avx2) + +AVG_PROTOTYPES( 8, avx2) +AVG_PROTOTYPES(10, avx2) +AVG_PROTOTYPES(12, avx2) + #if ARCH_X86_64 #define FW_PUT(name, depth, opt) \ void ff_vvc_put_ ## name ## _ ## depth ## _##opt(int16_t *dst, const uint8_t *src, ptrdiff_t srcstride, \ @@ -202,23 +226,13 @@ FW_PUT_16BPC_AVX2(12) MC_TAP_LINKS_16BPC_AVX2(LUMA, 8, bd); \ MC_TAP_LINKS_16BPC_AVX2(CHROMA, 4, bd); -#define bf(fn, bd, opt) fn##_##bd##_##opt -#define BF(fn, bpc, opt) fn##_##bpc##bpc_##opt - -#define AVG_BPC_FUNC(bpc, opt) \ -void BF(ff_vvc_avg, bpc, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ - const int16_t *src0, const int16_t *src1, intptr_t width, intptr_t height, intptr_t pixel_max); \ -void BF(ff_vvc_w_avg, bpc, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ - const int16_t *src0, const int16_t *src1, intptr_t width, intptr_t height, \ - intptr_t denom, intptr_t w0, intptr_t w1, intptr_t o0, intptr_t o1, intptr_t pixel_max); - #define AVG_FUNCS(bpc, bd, opt) \ -static void bf(avg, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ +void bf(ff_vvc_avg, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ const int16_t *src0, const int16_t *src1, int width, int height) \ { \ BF(ff_vvc_avg, bpc, opt)(dst, dst_stride, src0, src1, width, height, (1 << bd) - 1); \ } \ -static void bf(w_avg, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ +void bf(ff_vvc_w_avg, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ const int16_t *src0, const int16_t *src1, int width, int height, \ int denom, int w0, int w1, int o0, int o1) \ { \ @@ -226,16 +240,13 @@ static void bf(w_avg, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, denom, w0, w1, o0, o1, (1 << bd) - 1); \ } -AVG_BPC_FUNC(8, avx2) -AVG_BPC_FUNC(16, avx2) - AVG_FUNCS(8, 8, avx2) AVG_FUNCS(16, 10, avx2) AVG_FUNCS(16, 12, avx2) #define AVG_INIT(bd, opt) do { \ - c->inter.avg = bf(avg, bd, opt); \ - c->inter.w_avg = bf(w_avg, bd, opt); \ + c->inter.avg = bf(ff_vvc_avg, bd, opt); \ + c->inter.w_avg = bf(ff_vvc_w_avg, bd, opt); \ } while (0) #endif From patchwork Mon Apr 15 17:35:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 48080 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:670b:b0:1a9:af23:56c1 with SMTP id wh11csp1995428pzb; Mon, 15 Apr 2024 10:36:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV4gQDMOrnorXTXhrCwkzJoXWgYxif4H6sTkQ4irPj2TNqcnzkhnkbIj5r0hJNRfiFiY8NPgv8tG7S/9fI15TnQ1hDU5rRjhFGDeA== X-Google-Smtp-Source: AGHT+IG2NMMEG8Mwg1lmd3RWAmQx7yV6Iq2enafpyJA4SIe+8KN1601nIkua68ycQ+rAWOvrYReX X-Received: by 2002:a05:6512:3083:b0:518:cfd1:cd4c with SMTP id z3-20020a056512308300b00518cfd1cd4cmr4508525lfd.10.1713202600010; Mon, 15 Apr 2024 10:36:40 -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 m19-20020a17090607d300b00a519d2e5bf2si4630826ejc.547.2024.04.15.10.36.39; Mon, 15 Apr 2024 10:36:39 -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=R4d2kThN; 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 02EA168CFC8; Mon, 15 Apr 2024 20:36:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01olkn2018.outbound.protection.outlook.com [40.92.99.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B4CB568CF40 for ; Mon, 15 Apr 2024 20:36:24 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=av0lQPD0XAul1QxyMiZBGnLtv6SIk4uKI8HytJLLv5pj/RrObJz7LF0jgz5BT9EUZIlbdZaoCcV40JGH1xg3tm9/2WzZhx3S7TXECS7KjghNn1j2Li3Oke66PfZSAUI+2GyVmyDE+1FMfMKfCuXUzqUu4GlX7Xtyg64012eWl051NDrgc5gAzWW/QDMxxE5xhbF0tmvCkX17mkluPQVFIlSI5dD5MxMFlqbbt6gBbJoBl7CiXD6/2G4AKcQLcRYsHngCQ62tuHd60FURiyf1QpIvFumFQZB9sS8uPTjqkOdfzBscv4BKSgMpdJZ1b6x0Sm+266s8Wch9RoljiGhKhw== 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=ytSWoxXd4K+M4KaER0obonqyDkukqEgYGoE1Y33KnPc=; b=oghlO1vx35TYhChO2p0RceatBD9JFc63UUg36Abfj6llaLmm0eo0W7nvPmZEkbZrC4Qj1uBcYXMwv99w7xFg6tcW3qT5XKATDBJJv81OIOT/e9awtDum6hFM4IW7R979qs9ZMeSV273Xgyw0GiFXFu5G5zpO6UKh8HAaqGXf/6tE+XUyAVewH9Ra7FWScpam5r+gH3dOcDtMAc2fiHEEHZjTjTwFxmTFGRa8c2efmHDTCj2bn49OEHrMKaQ/VYCNeYvdjbkHev3qbY8DMYurx09xmDrXkAtcZS2b4Gb0EIRahuldO1lS54HtFhpwCcaFuOs9a11EzDXGWj/HI2RygA== 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=ytSWoxXd4K+M4KaER0obonqyDkukqEgYGoE1Y33KnPc=; b=R4d2kThNC+qMIhHyVOy0oHw8hy0r4DoIzBDSUNVbJlqSpIFn8d9e5mESB0sSwgN8dDFleouVsvaf1ozX3dqYXw2blQeeELzdIA8oKbl6pU1VHdPmqkcNGhS7QAM1JSb+CemuXrJUvlsuoUIm9QxJ9id5uB1KGYSz00wN1mcdkdnSTXPqXnFVk1rzAgFWOjrN/NxByoAuhtxEvAaYnDdOO7I86Jze5FWA5hgtpIBV83+hhT6s/saQ5KrOoFZTRrLCrtc65f6dGnsUrXRfA+bEWBKT8VVHMLZtMFhnZoLeDbnH2vdombpwYPTnCtstn6/qoRcCpuI3yVIVEJMjyngoKA== Received: from OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:186::5) by TY3P286MB3030.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:319::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.50; Mon, 15 Apr 2024 17:36:11 +0000 Received: from OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM ([fe80::c2ed:24ae:fd4c:fee7]) by OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM ([fe80::c2ed:24ae:fd4c:fee7%5]) with mapi id 15.20.7452.049; Mon, 15 Apr 2024 17:36:11 +0000 From: toqsxw@outlook.com To: ffmpeg-devel@ffmpeg.org Date: Tue, 16 Apr 2024 01:35:50 +0800 Message-ID: X-Mailer: git-send-email 2.44.0.windows.1 In-Reply-To: <20240415173550.657-1-toqsxw@outlook.com> References: <20240415173550.657-1-toqsxw@outlook.com> X-TMN: [/wUj1jHl7aiTT+lsDeGlq0Ata6pxreh+] X-ClientProxiedBy: PU1PR06CA0014.apcprd06.prod.outlook.com (2603:1096:803:2a::26) To OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:186::5) X-Microsoft-Original-Message-ID: <20240415173550.657-3-toqsxw@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OSZP286MB2173:EE_|TY3P286MB3030:EE_ X-MS-Office365-Filtering-Correlation-Id: 260e4bc4-8947-41d7-06fc-08dc5d728ad3 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: q91stQbXiQsfaFrM49Y/LAouQuK+6jfM+wh3GthMd1AFUUaJT5YlvaugfuuLilooT9XrMo2g/SB4uQVBchh5VaHHQEZXpohRPJKDCLm5dKiaZ1TKG7qFt9LGKm3CM/D0rncxzCSps5vhl1A43dFV22sk+mvV2y41X4MsRUj4TJn4oZjvOi7AGla4XRRMBPGbkf4tZ0dmHJG1TY0XySmUBOFChONDdTqRrO0SUAJDxbHfqzeKVu6njsncO9oMz92lFQ7Mx+O4rO3wPHg/Ns7S9E5nEpFS8IqIKol6ymkKnTMWhiN/nbX8y8WOXth+OWcaTq5/rT3fzELIn/pQSJtQDekSiA6UsLb6cKoNN/24LhHqBT7PZyAJssYlxkp/jVhD9sf5ypu6XRzkFgWLoqBzgYdGKMG/bCSJy3hpy1+89/cDfyzfmu4J333OgJbvQWFOmFGCOJWW47QVlKNT1Pdxp4rE+ErHvroQOZM2z781MMyYRNpqiKSTsopsIpKISjs/OucnOqLwmtw7Jdu8s8H7tMJNEZO/45PFlvgQJ6RvYqQioImKtbfy4CPSgOgE5WPtuKEa7fPemEoZg0vC0r3XoMrJzdR7EwFx0jHegr+/dhZES0CMsLQxaBo1/Bht2xtJ X-MS-Exchange-AntiSpam-MessageData-Chun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zKFiWQYg01e614MMQ7sF+m3kxEKCpEBQOsgKAMk9sj0pXhvdpwZ2xDNtrxp1AOWpHL3SLJwcE/3X2tOWABitw6eXxZ9LLBB/dPQXpU7UlKJxiid7zJfApqSwb6+6ukRYeIK0Kq6z5Jre6PCuMUlcsb44PIWaN+t3DEFzTQ4+sGxYFhUTudP7JIeWK3BpCUBQcxuJCJaUhSg= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 260e4bc4-8947-41d7-06fc-08dc5d728ad3 X-MS-Exchange-CrossTenant-AuthSource: OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2024 17:36:11.8564 (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: TY3P286MB3030 Subject: [FFmpeg-devel] [PATCH v2 3/3] avcodec/x86/vvc/vvcdsp_init: fix linking error when configuring with --disable-ssse3 --disable-optimizations options 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: vCsjXObCWJB0 From: Wu Jianhua Signed-off-by: Wu Jianhua --- libavcodec/x86/vvc/vvcdsp_init.c | 46 +++++++++++++++++--------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/libavcodec/x86/vvc/vvcdsp_init.c b/libavcodec/x86/vvc/vvcdsp_init.c index aef6699c35..985d750472 100644 --- a/libavcodec/x86/vvc/vvcdsp_init.c +++ b/libavcodec/x86/vvc/vvcdsp_init.c @@ -88,6 +88,7 @@ AVG_PROTOTYPES(10, avx2) AVG_PROTOTYPES(12, avx2) #if ARCH_X86_64 +#if HAVE_SSE4_EXTERNAL #define FW_PUT(name, depth, opt) \ void ff_vvc_put_ ## name ## _ ## depth ## _##opt(int16_t *dst, const uint8_t *src, ptrdiff_t srcstride, \ int height, const int8_t *hf, const int8_t *vf, int width) \ @@ -125,7 +126,9 @@ void ff_vvc_put_ ## name ## _ ## depth ## _##opt(int16_t *dst, const uint8_t *sr FW_PUT_SSE4( 8) FW_PUT_SSE4(10) FW_PUT_SSE4(12) +#endif +#if HAVE_AVX2_EXTERNAL #define FW_PUT_TAP_AVX2(n, bitd) \ FW_PUT(n ## tap_h32, bitd, avx2) \ FW_PUT(n ## tap_h64, bitd, avx2) \ @@ -161,6 +164,25 @@ FW_PUT_AVX2(12) FW_PUT_16BPC_AVX2(10) FW_PUT_16BPC_AVX2(12) +#define AVG_FUNCS(bpc, bd, opt) \ +void bf(ff_vvc_avg, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ + const int16_t *src0, const int16_t *src1, int width, int height) \ +{ \ + BF(ff_vvc_avg, bpc, opt)(dst, dst_stride, src0, src1, width, height, (1 << bd) - 1); \ +} \ +void bf(ff_vvc_w_avg, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ + const int16_t *src0, const int16_t *src1, int width, int height, \ + int denom, int w0, int w1, int o0, int o1) \ +{ \ + BF(ff_vvc_w_avg, bpc, opt)(dst, dst_stride, src0, src1, width, height, \ + denom, w0, w1, o0, o1, (1 << bd) - 1); \ +} + +AVG_FUNCS(8, 8, avx2) +AVG_FUNCS(16, 10, avx2) +AVG_FUNCS(16, 12, avx2) +#endif + #define PEL_LINK(dst, C, W, idx1, idx2, name, D, opt) \ dst[C][W][idx1][idx2] = ff_vvc_put_## name ## _ ## D ## _##opt; \ dst ## _uni[C][W][idx1][idx2] = ff_h2656_put_uni_ ## name ## _ ## D ## _##opt; \ @@ -226,27 +248,9 @@ FW_PUT_16BPC_AVX2(12) MC_TAP_LINKS_16BPC_AVX2(LUMA, 8, bd); \ MC_TAP_LINKS_16BPC_AVX2(CHROMA, 4, bd); -#define AVG_FUNCS(bpc, bd, opt) \ -void bf(ff_vvc_avg, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ - const int16_t *src0, const int16_t *src1, int width, int height) \ -{ \ - BF(ff_vvc_avg, bpc, opt)(dst, dst_stride, src0, src1, width, height, (1 << bd) - 1); \ -} \ -void bf(ff_vvc_w_avg, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ - const int16_t *src0, const int16_t *src1, int width, int height, \ - int denom, int w0, int w1, int o0, int o1) \ -{ \ - BF(ff_vvc_w_avg, bpc, opt)(dst, dst_stride, src0, src1, width, height, \ - denom, w0, w1, o0, o1, (1 << bd) - 1); \ -} - -AVG_FUNCS(8, 8, avx2) -AVG_FUNCS(16, 10, avx2) -AVG_FUNCS(16, 12, avx2) - -#define AVG_INIT(bd, opt) do { \ - c->inter.avg = bf(ff_vvc_avg, bd, opt); \ - c->inter.w_avg = bf(ff_vvc_w_avg, bd, opt); \ +#define AVG_INIT(bd, opt) do { \ + c->inter.avg = bf(ff_vvc_avg, bd, opt); \ + c->inter.w_avg = bf(ff_vvc_w_avg, bd, opt); \ } while (0) #endif