From patchwork Sun May 19 13:27:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nuo Mi X-Patchwork-Id: 49028 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:3a48:b0:1af:fc2d:ff5a with SMTP id zu8csp3947592pzb; Sun, 19 May 2024 07:35:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUvVS00lOWfz0QdjsU6EvPDbBkGONQhmI1cUQl7ZagmVKipRBwA6bS4yIK+kVnKnNU8jExh7pCjqZCmXE1kZfRvPSkmZBjOvnt7VQ== X-Google-Smtp-Source: AGHT+IFQ1AfxLZH3MlA7NIzgMahvjcY6UZHN/MxEXOqK5rguHt1SJQxgNJp8BHmdPrfSlJiZU7os X-Received: by 2002:a2e:7a0e:0:b0:2e2:466b:1a56 with SMTP id 38308e7fff4ca-2e52039e2c3mr208175611fa.53.1716129304615; Sun, 19 May 2024 07:35:04 -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 a640c23a62f3a-a5a1b7907f7si1297565366b.772.2024.05.19.07.35.04; Sun, 19 May 2024 07:35:04 -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=NxZRuFOg; 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 2A3DB68D24D; Sun, 19 May 2024 16:40:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from HK2PR02CU002.outbound.protection.outlook.com (mail-eastasiaazolkn19010000.outbound.protection.outlook.com [52.103.64.0]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4ED9168CFFE for ; Sun, 19 May 2024 16:39:57 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=duwR6hjYvo5jQHMUpTY7AvjEQW+o2jpPeK6NdTnH3YqqtPD0yJcm056HB2bDMo9Je5BKAlCCMbPxTVaACmwSlb1FiQBpCVvs41qPIRSqfFzg+ry2lr5prQbuAdUap+cpuDqA9qTPb43otMfHm2krcwd1DCzmoD2Ldu/bwFm4aCS+pgDWWgvjxk9xBmbK+08o7/POD711t463kR0xb6g3TM1BjbHTMaCVsV5G6nrf8VOZ9X/OJQH25vLXrHDN1adM4lrK7w0gS8XqYWS1Cs+a5gU4ScMfM7y2Tfk7gILkP94od9MVhkB7YcICtxN/McCeol7mNm4A9g9jjUyRx8T/Iw== 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=iVo4t9gdgQhUK6feX+T64fDu6IU1faEOdS9lPC4IEGw=; b=T0RHF7lN/ruW0i6ElM9BCEBJZYY8SC5Lap4gtEMoMv74B7N0aRKKVrfHh0RsmvrHfqPDv/wr9GWaBajApvZXf+ERoRb2lIySu9KzQUHbsR2yHeiQuSfo079Oxw3ZtJPQOG6Io0vgjHn1PoHIsbFLCT7pytDgIKQYm6DEu0yGmIyir1Yo2BN0J2YnbzLS0v5Gu5eVhgbZwjJCUS3JBgpl3AM5cArCi+NPJjfywykB7EzuTXDeM9ypIna77qi+2tJXJS47Vju7aJxxXhHPXE9XPCZ3d+OaaBTx3wJfNMAwMYp6QBUBr/667YuRDFR4HBh7OsJiBV+57gwbi+qpqNocXw== 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=iVo4t9gdgQhUK6feX+T64fDu6IU1faEOdS9lPC4IEGw=; b=NxZRuFOgyqsDKFM5Eck5gzUVOZwg1h5FP3e8PiRpRqkkpv/hkSIY80hWChEO6t9epWXyFRPbe8dBn2hjenqy80ehoAl2u/vp5E3MWi7MaxTIvtEedLO9XNrZtrQyyykTOBJotpUNWio/QUx+pyC2jhIPPw02KbmYSB7Ig6NWgsdBluROiU3EPZaI+q1TZEi9r2AXQGEfSY2Dk3AYKQsvOBflYtYjlO5TQHr4cU6pc4f+O2xJef2lIQbF//+nJDAXtslO5xlh54KYfSLBMTTIjNFodCDTr9xuZX989VfU5VP42sG8yd8aXBhOckR2h4q3r0I1Z6k8XHohe1fBTFXhHA== Received: from TYSPR06MB6433.apcprd06.prod.outlook.com (2603:1096:400:47a::6) by TYUPR06MB6098.apcprd06.prod.outlook.com (2603:1096:400:358::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.34; Sun, 19 May 2024 13:39:41 +0000 Received: from TYSPR06MB6433.apcprd06.prod.outlook.com ([fe80::81f7:9125:583a:1cca]) by TYSPR06MB6433.apcprd06.prod.outlook.com ([fe80::81f7:9125:583a:1cca%4]) with mapi id 15.20.7587.030; Sun, 19 May 2024 13:39:41 +0000 From: Nuo Mi To: ffmpeg-devel@ffmpeg.org Date: Sun, 19 May 2024 21:27:42 +0800 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240519132749.790832-1-nuomi2021@gmail.com> References: <20240519132749.790832-1-nuomi2021@gmail.com> X-TMN: [lYdLG70bc9uBjSCR5cRMd+cqVWUk05lv] X-ClientProxiedBy: TYCP301CA0017.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:381::8) To TYSPR06MB6433.apcprd06.prod.outlook.com (2603:1096:400:47a::6) X-Microsoft-Original-Message-ID: <20240519132749.790832-11-nuomi2021@gmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 2 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYSPR06MB6433:EE_|TYUPR06MB6098:EE_ X-MS-Office365-Filtering-Correlation-Id: fd0667d5-d087-4b7b-4982-08dc78092271 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: nP4OyfaLaAkO/HcWEvKMWhzKJWRKw8x9u+D5EFXZgSzyhroYIywf3MI+JR+khfi/LwQwHUNrsFmYsyt/mGAevLDSyCb9LRRxG6CB71Vvm8HORZhbdD9I+XIZ4jYJe5360jaHPUPJgWM20hyJTZMOqkzYKRAkdPRNLWC+HPh9OPgOfuLRH+64QjGBlth11Wc5Cbp1qB5+NfEDiyRfhrZ2E7dljzOq1gWmmY1vJ5tXYqoUKUH72PxAATEmrT60uswgLwxjxEMjY8DJgSeyh1GhTKCt7JSQjuooydxK7Uhhxp2zZq4c5pBBmpOARUr0iHdrsLRVagFRdfH1IV6UbqQ8nBAJiS19+3ZNhN7ftWCTaURzvolR7Rb2aGRXPH4uVVBSJHW+9q1XcL3KzVVh8Pln1IUNYcugxO2N/tg00O4zt4x9B5b3esZYgbcRuJDSHImhHXuBWK2cjesj9iHCjddo/FIc9yI+A8bafkwD643UASpFMI8y0p8M0JVsHguJ5W4vMxVqE53N7DgfxE3NUEHRwouvR8p46uQkG0Egf1fvWi/j+let35+lGNs28Plr45e/KHjwRhfOGaRbEnsrDbPSUZUptghKRdjyxWO51xmg2ZkTyaXQrKB16iUTLSfAkwdm X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nngE1mNVNawNr/odjZrfomdPBFiYtxB/s3lHVH05KDpbFCUOgVjAGIeoj0tBhhCchX9EknukMcs9G+G1N9RPUfqmBtUP9Dejp3zjL6KBf8dfa9zoGPffk6pGFz9Z4oL8gAKH/xxDHhinGIqwVKRIWl7uGwV4QNPmKhPCRZ5dButPyDStIL4z2Pld6IkxwWuPeFjD/zdBHHewpUlhwNdm3VZzObBXuktE8UsyWAAP95zKJ5Y1sv5qDVlB45WsSsomdaasofdoXKnvIg+TwhgBJ8MeC3N5OSIC8oUDJYAIoyJBI5l1RPyXeNaabCc9jSeSMvk/EQ0/80kVUM4AIiV1DGJf3/pdDqGtiUeavlV5fqQy4vc9SsWejzaTLZdZa8UJ5z+55aJQZPLJHHQAL6zr0jcvuEa5eugYNsUyazOehJ+StqZQWSdywLgqBZ0Qd3OctzEZfY8gZTdC1xuw6CBCsslyM5yyijZpbEkyX3GJYl9Vt5CZw4KtvhHwasmIc7k0xORwLJ/HemMgjwsxbWkSpro30qzI8+a8xDuTZiQEScdWKMX+eAw/6RK8Vi4hQDz3e/MT7Dyz3RBOq9WBlB3NWUCqromynbpI2aqiE7YcJ4INtJJE02wmF5y8w1lP94p5kI4FzSTtSRbiNzRsfxvfAhDZ+uATkd7SL9UD1kSV+jOE7WUu/2QNRbtVlX6IX/7nzEancySQI7VKmYLqoIYk17dDiUBufvCzxUavqenwvg5Tj3OEB1k5j5aCob/IF2lu3TuDs7obo/2W0ItEebSgDY3qTWogwRlSn6/ReQ8QScEHSaKHR1LqbB52wn2gNGYu/PUbTKuuk0gN9H4ojGZuqAezASbQzaRYLDijtum5ps7+p7H7rADLDiFSasN2rKCLCW1pAXBAmnUxhCAXqKk41WbkfsSJ0THg039h/l7d7Y4MDli+5X6rbtPUGes7QIefT6WKvAjYDgFc+eOs4SXyQMgDM7SOW6G0dwkNuFSpCXhZcrwsRkAkwnBdm5yMztZl/VoQl9bIzj26DOtUGvETIdV+f+8NsjB22QntM/vZSQdETrozcTdQm82c47dLQnMNCRtkVlFJ/HEmdTvVf18Id3RUXQCVpK/pH5vyrzNz/D2PXZhdV8pj62wlt55FLSh39vaK/H/+Y0iBm0JLRkBOofNlY5896HBdk611kdrVeLo+mkOsEz2hsb1c+jfYfCkhtbmtqR5xtqQEKWqHlaBFKWO7kCcJaxU731jjgMafZ8qJVfcPvAChzsEKu59Q/cikkPP0Y1WBvFOuoqDap99jwQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fd0667d5-d087-4b7b-4982-08dc78092271 X-MS-Exchange-CrossTenant-AuthSource: TYSPR06MB6433.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2024 13:39:40.9692 (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: TYUPR06MB6098 Subject: [FFmpeg-devel] [PATCH 11/18] avcodec/vvcdec: add RPR dsp 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: 7+7UpQ1uWzvX --- libavcodec/vvc/ctu.h | 2 + libavcodec/vvc/dsp.h | 13 +++ libavcodec/vvc/inter_template.c | 168 ++++++++++++++++++++++++++++++++ 3 files changed, 183 insertions(+) diff --git a/libavcodec/vvc/ctu.h b/libavcodec/vvc/ctu.h index 337d0e7c28..50109154aa 100644 --- a/libavcodec/vvc/ctu.h +++ b/libavcodec/vvc/ctu.h @@ -58,6 +58,8 @@ #define BILINEAR_EXTRA_AFTER 1 #define BILINEAR_EXTRA 1 +#define SCALED_INT(pos) ((pos) >> 10) + #define MAX_CONTROL_POINTS 3 #define AFFINE_MIN_BLOCK_SIZE 4 diff --git a/libavcodec/vvc/dsp.h b/libavcodec/vvc/dsp.h index 9810ac314c..1f14096c41 100644 --- a/libavcodec/vvc/dsp.h +++ b/libavcodec/vvc/dsp.h @@ -57,6 +57,19 @@ typedef struct VVCInterDSPContext { uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int denom, int wx, int ox, const int8_t *hf, const int8_t *vf, int width); + void (*put_scaled[2 /* luma, chroma */][7 /* log2(width) - 1 */])( + int16_t *dst, const uint8_t *src, ptrdiff_t src_stride, int src_height, + int x, int y, int dx, int dy, int height, const int8_t *hf, const int8_t *vf, int width); + + void (*put_uni_scaled[2 /* luma, chroma */][7 /* log2(width) - 1 */])( + uint8_t *dst, const ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int src_height, + int x, int y, int dx, int dy, int height, const int8_t *hf, const int8_t *vf, int width); + + void (*put_uni_w_scaled[2 /* luma, chroma */][7 /* log2(width) - 1 */])( + uint8_t *dst, const ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int src_height, + int x, int y, int dx, int dy, int height, int denom, int wx, int ox, const int8_t *hf, const int8_t *vf, + int width); + void (*avg)(uint8_t *dst, ptrdiff_t dst_stride, const int16_t *src0, const int16_t *src1, int width, int height); diff --git a/libavcodec/vvc/inter_template.c b/libavcodec/vvc/inter_template.c index e2fbfd4fc0..a8068f4ba8 100644 --- a/libavcodec/vvc/inter_template.c +++ b/libavcodec/vvc/inter_template.c @@ -22,6 +22,165 @@ #include "libavcodec/h26x/h2656_inter_template.c" +#define TMP_STRIDE EDGE_EMU_BUFFER_STRIDE +static void av_always_inline FUNC(put_scaled)(uint8_t *_dst, const ptrdiff_t _dst_stride, + const uint8_t *const _src, ptrdiff_t _src_stride, const int src_height, + const int _x, const int _y, const int dx, const int dy, + const int height, const int8_t *hf, const int8_t *vf, const int width, const int is_uni, const int is_chroma) +{ + int16_t tmp_array[TMP_STRIDE * MAX_PB_SIZE]; + int16_t *tmp = tmp_array; + pixel *dst = (pixel*)_dst; + int16_t *dst16 = (int16_t*)_dst; + const ptrdiff_t dst_stride = _dst_stride / sizeof(pixel); + const ptrdiff_t src_stride = _src_stride / sizeof(pixel); + const int shift = FFMAX(2, 14 - BIT_DEPTH); + const int offset = 1 << (shift - 1); + const int taps = is_chroma ? VVC_INTER_CHROMA_TAPS : VVC_INTER_LUMA_TAPS; + const int extra = is_chroma ? CHROMA_EXTRA : LUMA_EXTRA; + const int extra_before = is_chroma ? CHROMA_EXTRA_BEFORE : LUMA_EXTRA_BEFORE; + const int shift1 = 6 - is_chroma; + const int shift2 = 4 + is_chroma; + const int x0 = SCALED_INT(_x); + const int y0 = SCALED_INT(_y); + + for (int i = 0; i < width; i++) { + const int tx = _x + dx * i; + const int x = SCALED_INT(tx) - x0; + const int mx = av_mod_uintp2(tx >> shift1, shift2); + const int8_t *filter = hf + mx * taps; + const pixel *src = (pixel*)_src - extra_before * src_stride; + + for (int j = 0; j < src_height + extra; j++) { + tmp[j] = (is_chroma ? CHROMA_FILTER(src, 1) : LUMA_FILTER(src, 1)) >> (BIT_DEPTH - 8); + src += src_stride; + } + tmp += TMP_STRIDE; + } + + for (int i = 0; i < height; i++) { + const int ty = _y + dy * i; + const int x = SCALED_INT(ty) - y0; + const int mx = av_mod_uintp2(ty >> shift1, shift2); + const int8_t *filter = vf + mx * taps; + + tmp = tmp_array + extra_before; + for (int j = 0; j < width; j++) { + const int val = (is_chroma ? CHROMA_FILTER(tmp, 1) : LUMA_FILTER(tmp, 1)) >> 6; + if (is_uni) + dst[j] = av_clip_pixel((val + offset) >> shift); + else + dst16[j] = val; + tmp += TMP_STRIDE; + } + if (is_uni) + dst += dst_stride; + else + dst16 += dst_stride; + } +} + +static void FUNC(put_luma_scaled)(int16_t *_dst, + const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, + const int x, const int y, const int dx, const int dy, + const int height, const int8_t *hf, const int8_t *vf, const int width) +{ + FUNC(put_scaled)((uint8_t *)_dst, MAX_PB_SIZE * sizeof(pixel), _src, _src_stride, src_height, x, y, dx, dy, height, hf, vf, width, 0, 0); +} + +static void FUNC(put_chroma_scaled)(int16_t *_dst, + const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, + const int x, const int y, const int dx, const int dy, + const int height, const int8_t *hf, const int8_t *vf, const int width) +{ + FUNC(put_scaled)((uint8_t *)_dst, MAX_PB_SIZE * sizeof(pixel), _src, _src_stride, src_height, x, y, dx, dy, height, hf, vf, width, 0, 1); +} + +static void FUNC(put_uni_luma_scaled)(uint8_t *_dst, const ptrdiff_t _dst_stride, + const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, + const int x, const int y, const int dx, const int dy, + const int height, const int8_t *hf, const int8_t *vf, const int width) +{ + FUNC(put_scaled)(_dst, _dst_stride, _src, _src_stride, src_height, x, y, dx, dy, height, hf, vf, width, 1, 0); +} + +static void FUNC(put_uni_chroma_scaled)(uint8_t *_dst, const ptrdiff_t _dst_stride, + const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, + const int x, const int y, const int dx, const int dy, + const int height, const int8_t *hf, const int8_t *vf, const int width) +{ + FUNC(put_scaled)(_dst, _dst_stride, _src, _src_stride, src_height, x, y, dx, dy, height, hf, vf, width, 1, 1); +} + +static void av_always_inline FUNC(put_uni_w_scaled)(uint8_t *_dst, const ptrdiff_t _dst_stride, + const uint8_t *const _src, ptrdiff_t _src_stride, const int src_height, + const int _x, const int _y, const int dx, const int dy, const int denom, const int wx, const int _ox, + const int height, const int8_t *hf, const int8_t *vf, const int width, const int is_chroma) +{ + int16_t tmp_array[TMP_STRIDE * MAX_PB_SIZE]; + int16_t *tmp = tmp_array; + pixel *dst = (pixel*)_dst; + const ptrdiff_t dst_stride = _dst_stride / sizeof(pixel); + const ptrdiff_t src_stride = _src_stride / sizeof(pixel); + const int shift = FFMAX(2, 14 - BIT_DEPTH); + const int offset = 1 << (shift - 1); + const int ox = _ox * (1 << (BIT_DEPTH - 8)); + const int taps = is_chroma ? VVC_INTER_CHROMA_TAPS : VVC_INTER_LUMA_TAPS; + const int extra = is_chroma ? CHROMA_EXTRA : LUMA_EXTRA; + const int extra_before = is_chroma ? CHROMA_EXTRA_BEFORE : LUMA_EXTRA_BEFORE; + const int shift1 = 6 - is_chroma; + const int shift2 = 4 + is_chroma; + const int x0 = SCALED_INT(_x); + const int y0 = SCALED_INT(_y); + + for (int i = 0; i < width; i++) { + const int tx = _x + dx * i; + const int x = SCALED_INT(tx) - x0; + const int mx = av_mod_uintp2(tx >> shift1, shift2); + const int8_t *filter = hf + mx * taps; + const pixel *src = (pixel*)_src - extra_before * src_stride; + + for (int j = 0; j < src_height + extra; j++) { + tmp[j] = (is_chroma ? CHROMA_FILTER(src, 1) : LUMA_FILTER(src, 1)) >> (BIT_DEPTH - 8); + src += src_stride; + } + tmp += TMP_STRIDE; + } + + for (int i = 0; i < height; i++) { + const int ty = _y + dy * i; + const int x = SCALED_INT(ty) - y0; + const int mx = av_mod_uintp2(ty >> shift1, shift2); + const int8_t *filter = vf + mx * taps; + + tmp = tmp_array + extra_before; + for (int j = 0; j < width; j++) { + const int val = (is_chroma ? CHROMA_FILTER(tmp, 1) : LUMA_FILTER(tmp, 1)) >> 6; + dst[j] = av_clip_pixel(((wx * val + offset) >> shift) + ox); + tmp += TMP_STRIDE; + } + dst += dst_stride; + } +} + +static void FUNC(put_uni_luma_w_scaled)(uint8_t *_dst, const ptrdiff_t _dst_stride, + const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, + const int x, const int y, const int dx, const int dy, const int denom, const int wx, const int ox, + const int height, const int8_t *hf, const int8_t *vf, const int width) +{ + FUNC(put_uni_w_scaled)(_dst, _dst_stride, _src, _src_stride, src_height, x, y, dx, dy, denom, wx, ox, height, hf, vf, width, 0); +} + +static void FUNC(put_uni_chroma_w_scaled)(uint8_t *_dst, const ptrdiff_t _dst_stride, + const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, + const int x, const int y, const int dx, const int dy, const int denom, const int wx, const int ox, + const int height, const int8_t *hf, const int8_t *vf, const int width) +{ + FUNC(put_uni_w_scaled)(_dst, _dst_stride, _src, _src_stride, src_height, x, y, dx, dy, denom, wx, ox, height, hf, vf, width, 1); +} + +#undef TMP_STRIDE + static void FUNC(avg)(uint8_t *_dst, const ptrdiff_t _dst_stride, const int16_t *src0, const int16_t *src1, const int width, const int height) { @@ -440,6 +599,15 @@ static void FUNC(ff_vvc_inter_dsp_init)(VVCInterDSPContext *const inter) FUNCS(LUMA, luma); FUNCS(CHROMA, chroma); + for (int i = 0; i < FF_ARRAY_ELEMS(inter->put_scaled[LUMA]); i++) { + inter->put_scaled[LUMA][i] = FUNC(put_luma_scaled); + inter->put_scaled[CHROMA][i] = FUNC(put_chroma_scaled); + inter->put_uni_scaled[LUMA][i] = FUNC(put_uni_luma_scaled); + inter->put_uni_scaled[CHROMA][i] = FUNC(put_uni_chroma_scaled); + inter->put_uni_w_scaled[LUMA][i] = FUNC(put_uni_luma_w_scaled); + inter->put_uni_w_scaled[CHROMA][i] = FUNC(put_uni_chroma_w_scaled); + } + inter->avg = FUNC(avg); inter->w_avg = FUNC(w_avg);