From patchwork Mon Mar 18 14:16:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nuo Mi X-Patchwork-Id: 47170 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:958e:b0:1a3:31a3:7958 with SMTP id iu14csp1042326pzb; Mon, 18 Mar 2024 07:18:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWhfPVIGtyhUaF56YIaYTUpK3gNz4BtPsPFF7IK3ZFP5ZBf8+ra+ql5eTNugSNjoAWFAGeNXGw8TpBtrI33KhPBoV9bpf2I6LLW+Q== X-Google-Smtp-Source: AGHT+IF6MV3LdXWjNaUqScGFAc8wm8hrzrc9saky4YdeiVq1nz/qEho5vz0Du2gDDXwehAU8o/Z5 X-Received: by 2002:a17:906:ecfc:b0:a46:6557:716f with SMTP id qt28-20020a170906ecfc00b00a466557716fmr7430394ejb.20.1710771503869; Mon, 18 Mar 2024 07:18: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 j13-20020a170906410d00b00a46d2e93cd8si139172ejk.674.2024.03.18.07.18.23; Mon, 18 Mar 2024 07:18: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=Gka9V7Ce; 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 28B0068D2B7; Mon, 18 Mar 2024 16:17:21 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01olkn2060.outbound.protection.outlook.com [40.92.52.60]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 61FB668D2A2 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=ZQgBj+2A/sG1Y2xDMExOKcFrOEzSz8iv2JY10i+8R2ULHBKjaWPZ4evyaWat8DuZ/eIQzx9VKbIZgahNL+BRVz05VAzAIq//A5OCNNSyeNhmUHO+HSCbz2CuyMafy59rsk/sSyYee42+iEQjPh4LuMeMK5Fr/hQ9KzPGFZLYBXF6khpWbD86vDt8mu7eJ9UKNIu9yTEINosih6ahzly7MvjhvKsTCoqOdwjF8AKjFuxbY1cuwcOtOF7Hs9VXHOb3gwt3XfFAaqOQQTGUjjs+gPIHycd8YC0Z9Rep1wR0zgLVVZIvRZ3LM1XNUEIVv0A1LCPYs7KXvcA1H2O+lLEAIQ== 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=FevQ7MTKHt2ooXzRP+427BUgnG1uUcWkTYi+18DCLas=; b=EZP0Hg9MW44anNXphklIdSOItbJfYneaq2EEPUYFBxu8j+3EJtiqN0/wM9aeI3oW0sPM+KE6KGc97djXzXoKJFynWCTkBVmTnnTOArIidGZXV94/tHeUDdlv5UZclw+zdVS5pp7SRuiWSLDd6/cpPgSbjqjw5uNpZSvQrIAhB4VmzUJiG6f0hDaXPRw1742dSioK7AMrRW6N1IJNYIaZv4WGhb2V4DTUiPutvCuJz+jgFp/U+YaXrfzWBTSIU0yCnI5yRFTQKyU8Wf3ioObW9L8VbCCwsbTHWbzHoLPmJjN4n2yVTkHhDURabLAIzQDn/KZdsgigxGaG9mSl9t+HHw== 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=FevQ7MTKHt2ooXzRP+427BUgnG1uUcWkTYi+18DCLas=; b=Gka9V7CeYJhfZ1xKDEAhyzFj0gSV6OGiOHAJNZeBv1S9kL0qwtK9r6rpbJpE3ciVkBFTYyk+36t4O7LSgDVgA1dLjOQku3yxO/xSPlBkqNcLUzrkuzkv1SX5BEjyiVosU5V0RUYC/m/0TVw3V1OEsFGuq++keiatclUjB84Y9ZWjM6+CbcIT/g7TQ1H40v614a62P4vjH8KcsOOGW2z3Qiq9nXzTpHDA1l20HNioMvyumpr5IQ9bT5UW+W7e4F9VA0XOoop+kkJveyAncH2FcVFThW96yKwWe0eL5zYpFf8JY57/uojMetH/MNR1Kxu6qOMLlwhAlZPdpuypOOHApQ== Received: from TYSPR06MB6433.apcprd06.prod.outlook.com (2603:1096:400:47a::6) by JH0PR06MB7327.apcprd06.prod.outlook.com (2603:1096:990:a5::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.25; Mon, 18 Mar 2024 14:17:09 +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:09 +0000 From: Nuo Mi To: ffmpeg-devel@ffmpeg.org Date: Mon, 18 Mar 2024 22:16:26 +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: [JHB5LR8VI0unPi4SR2EWmByc8Mz9/83D] 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-15-nuomi2021@gmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 2 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYSPR06MB6433:EE_|JH0PR06MB7327:EE_ X-MS-Office365-Filtering-Correlation-Id: ed8b30d5-57de-484e-8d8b-08dc475618f7 X-MS-Exchange-SLBlob-MailProps: qdrM8TqeFBtQM6LyuMuRQGpfKJqciaiF2muBooqnR7VI3gos38OmbjZ78mZLdpo6CohfXe/arF4/xCJrp9lRA3jxmdhZitw0Z2kpLdghr9nikvNeSGARExsvHfu4YKJaha7hcJBdMSz3ZEGzdQu2BNzxAOkMprhAtRxFeuWouO3eED/WgLYs8rrsLlR19V0eETl3q0V0bOg8RjE586SK1Y2/pzv6mKy2EZiww1UiauSLINa8KPiQEn/Ne1Cvg4p/K+w/3PJG1gecZ+crf4n5INLw6rBhWfCxqrVYOm4EaWQX6xeyvhpFOgOsXoTXJ/UpjDN8obX8ShTjYKBMECBg6KFY52JXkXXZxew9ArdpLsQHp6mZCh9I2Uu7miRa/Ee7qlKT2tjoAhkwgOMfS71elYhvAeocDZlr1IpukL2U4Bnjv9oagz+npM5xvEDnhFWMFpdTCpW7Lm8OWZo/kwnphUyMHOMXVfPnegPw02lq2bb5Di9RYmXrDr79/z++d6Xn6FEFA5iwfHRAWh1LACNhlLX4r68z07RcB3oydJoYXL4V7DRYu4Aq7E5gY20pvvGkZ83NrMc3rdxYnVzNFVE64VmmjhiA9CynY0/W/56hzfVTC1xyqXOd3xC1+IV8jaJUp+5GLkDnssHEoANaJcsllQVo8XaxZKAjtxptQA5KHcyE2XEQKGw0Wt6JGscE2f06F9WAojvLFLTLGV+hBzromVooz0CPXvG25qYdmwVqr2n/VMptCalvFAPHE3r8HwnqEavDljZh/L4gE+HARI0XdJYSygq7Fu8K X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: klGi9ZiZ0g9hvIIp8r3r6hIA+sA1ph4N/lEtNi9v/Smbl8yR7yNfX3IUYy/RDxIkz+JzsaGPYbsnUvj7I6Ao8xvl214ANksucOSRLIvW0UcRmKIOyA7LbbkE5jZYmqclyhSz1xORRvHBEAmwx/jdNtAMnY/2BQ76E1qtVONrBdYCqb5EHYDA+LtzQtGAsMMWrOMl82m2nNXAG+f0V2SLJyJm47bldk0fuBD03YUKv4gDGzR7gQIpq7BnruT22+5S/Kb8Nfr+bU6LM11VG7SVHyU9CprvFGhtnYIBEAXetnznjVJOJoeOA+3u4XmrwWaAHGbcz+YakRWhXFDx+MULnhbxnsxIM0BVUhb0fnnAEUMbPlO4YMg6koc6gfzcw+twlEtWG50ad5DzC7w7HMolDoso1ENIO1OLEmign1gdQXlywzubdh6h23jyBS1COpp+uzpMOoYzwjY6owXanoIj9u+7v37YnUMvjhRtiDjeRyT9IV3qmaD4yIUq7OE59qBm8VhTmLVK6ZYiUsQ09YEjbT+uG1dREXMyV4WZ4CLm4nUx1b2wkYASrrtIDDe1kl/vJfDYWsJwk5jzwXIZlzfdAhy53AsjR40Kmgdjj5wNRERrH96DI5BNg2dGJKJIn/YrhCJeqQKmQAl9ElMOYbgPMyCCR1ew2frDupJA1+4HKZJh6kjMTyh20IYVSPYCyJh8 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: es3pS6d/zYC+tgjFjwsSEwAT1z+Ymhe0taxcmiFJYIuEPDJ+Ty37eWMVEKfupcdQQTX920JBknvBwk6rVBM4bYmrVZzTvZvvKkfkyLBNIo+jSA0wp4MA/zmDUAb5di5aBc+0pogYD5Hnyj94rhzqYdLDRiHIUB104iUDke8XyNOzRJGeUTwV1HTGSuiwUaMoLoWCukAs7BqxAvYjTXTVM8E3plYXtvamNlfcPvq8zkS/e2VAaxgF8gSCp8z9i3gLmuqW5Rr9YgW7fReqJFsnAkTih8zEiSaWXEndz4p2z9F+4pKyjRs3CIQgHCgkk4gWb2RDwD1HEBuHdH4XtOcUXCIWURdw/AVXzuJ9R96bF4IXfMg+rQkyW/Ra2bA3OOLlf19/om9G9Tm8r+byGiuLnMP2wcGP1UqC9S5suX3UrqfV6myp6VEX4JFfPQOtOglrdUh3j3rvkj8BfvxXMMMIxtvqDrOGbvxkoub0fKc7XBJRvasNGBC6Z8m3eEG5C5GVGq7y5gwyzc4GdQZ3XtpdmjDUSOO0noWyjO2NpI7qZDeFO0+vg1/yWzp2nrHIU189JtLhlMgAJlWcrPjmJwsJe1bZjWhfskz+aCRReSSFdqYoEWVVM2ZH3TyNFxNhK5TLTGtHKFP9MRrNSUQ+UNCc7b0eqwa6rQlVz8KwNqacDwBQk9ecnlH+FmESxgA755BbAOpM1yutcm1eaxY8u7dk6sKnv2sen+alQ/uLHaNUMx1/mshqawhd0+FWami0lPPSk4vHra5r9XDJ52Yhmpe+ov9Jf5Pcxx4CKJQHzDDYakubWkD8r9iuiNcUbu83NmJOqox3GfbFyX87yy4HkKBrd5+GltjxQYEb8jQ9KGNSQtFf5EC/XmyBNenUQnI6qOeK7uTTGlH/U/2RKCwFtrBAXOy8psTt44UpFTEBTHfwynistOZ2iaD/v1dRUdXY4oK+YoylhYuc/CTxHX9HMM2bsES3cO+OwYsZePBzLL9n9aLfs4VBLs+jE/p2wP5GTwqMWDMuc6DSG7HDZ5cvc1vs3rVbomWGChgn8grjIFesKjlgxSZd5juMrr8fFLQlKs2IscRkVUCX5HvDQFhN9cxxeBUTyaifG1rA6PiGfQe3oDVMekUz/gEniimZrqssInu2+qd9e0b3FenjQx2guJ1/6whlkrD/0eb8s2PARQrp6ouX+0egOsaPznwZj9E92nX8zIWh1/jLbO/JU6p/JMm5gaydgBwEJ0noV6fcwY6OqRz/fRIl5gzv50cG/daZBRVPokKWPKmjxXlIda/M48dwoA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed8b30d5-57de-484e-8d8b-08dc475618f7 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:09.3688 (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: JH0PR06MB7327 Subject: [FFmpeg-devel] [PATCH 14/14] avcodec/vvcdec: inter prediction, 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: /cpwgeklBmp7 passed files: CodingToolsSets_E_Tencent_1.bit SUBPIC_A_HUAWEI_3.bit SUBPIC_B_HUAWEI_3.bit SUBPIC_C_ERICSSON_1.bit SUBPIC_D_ERICSSON_1.bit SUBPIC_E_MediaTek_1.bit passed dvb conformance files (https://dvb.org/specifications/verification-validation/vvc-test-content): VVC_HDR_UHDTV1_OpenGOP_3840x2160_50fps_HLG10_mosaic.bit VVC_HDR_UHDTV1_OpenGOP_3840x2160_50fps_HLG10_PiP.bit --- libavcodec/vvc/vvc_inter.c | 79 +++++++++++++++++++++++++++----------- 1 file changed, 56 insertions(+), 23 deletions(-) diff --git a/libavcodec/vvc/vvc_inter.c b/libavcodec/vvc/vvc_inter.c index c5629f7f6f..1a87cb71cf 100644 --- a/libavcodec/vvc/vvc_inter.c +++ b/libavcodec/vvc/vvc_inter.c @@ -30,14 +30,34 @@ #define PROF_TEMP_OFFSET (MAX_PB_SIZE + 32) static const int bcw_w_lut[] = {4, 5, 3, 10, -2}; -static int emulated_edge(const VVCFrameContext *fc, uint8_t *dst, const uint8_t **src, ptrdiff_t *src_stride, - const int x_off, const int y_off, const int block_w, const int block_h, const int is_luma) +static void subpic_offset(int *x_off, int *y_off, + const VVCSPS *sps, const VVCPPS *pps, const int subpic_idx, const int is_luma) { - const int extra_before = is_luma ? LUMA_EXTRA_BEFORE : CHROMA_EXTRA_BEFORE; - const int extra_after = is_luma ? LUMA_EXTRA_AFTER : CHROMA_EXTRA_AFTER; - const int extra = is_luma ? LUMA_EXTRA : CHROMA_EXTRA; - const int pic_width = is_luma ? fc->ps.pps->width : (fc->ps.pps->width >> fc->ps.sps->hshift[1]); - const int pic_height = is_luma ? fc->ps.pps->height : (fc->ps.pps->height >> fc->ps.sps->vshift[1]); + *x_off -= pps->subpic_x[subpic_idx] >> sps->hshift[!is_luma]; + *y_off -= pps->subpic_y[subpic_idx] >> sps->vshift[!is_luma]; +} + +static void subpic_width_height(int *pic_width, int *pic_height, + const VVCSPS *sps, const VVCPPS *pps, const int subpic_idx, const int is_luma) +{ + *pic_width = pps->subpic_width[subpic_idx] >> sps->hshift[!is_luma]; + *pic_height = pps->subpic_height[subpic_idx] >> sps->vshift[!is_luma]; +} + +static int emulated_edge(const VVCLocalContext *lc, uint8_t *dst, const uint8_t **src, ptrdiff_t *src_stride, + int x_off, int y_off, const int block_w, const int block_h, const int is_luma) +{ + const VVCFrameContext *fc = lc->fc; + const VVCSPS *sps = fc->ps.sps; + const VVCPPS *pps = fc->ps.pps; + const int subpic_idx = lc->sc->sh.r->curr_subpic_idx; + const int extra_before = is_luma ? LUMA_EXTRA_BEFORE : CHROMA_EXTRA_BEFORE; + const int extra_after = is_luma ? LUMA_EXTRA_AFTER : CHROMA_EXTRA_AFTER; + const int extra = is_luma ? LUMA_EXTRA : CHROMA_EXTRA; + int pic_width, pic_height; + + subpic_offset(&x_off, &y_off, sps, pps, subpic_idx, is_luma); + subpic_width_height(&pic_width, &pic_height, sps, pps, subpic_idx, is_luma); if (x_off < extra_before || y_off < extra_before || x_off >= pic_width - block_w - extra_after || @@ -57,14 +77,21 @@ static int emulated_edge(const VVCFrameContext *fc, uint8_t *dst, const uint8_t return 0; } -static void emulated_edge_dmvr(const VVCFrameContext *fc, uint8_t *dst, const uint8_t **src, ptrdiff_t *src_stride, - const int x_sb, const int y_sb, const int x_off, const int y_off, const int block_w, const int block_h, const int is_luma) +static void emulated_edge_dmvr(const VVCLocalContext *lc, uint8_t *dst, const uint8_t **src, ptrdiff_t *src_stride, + int x_sb, int y_sb, int x_off, int y_off, const int block_w, const int block_h, const int is_luma) { - const int extra_before = is_luma ? LUMA_EXTRA_BEFORE : CHROMA_EXTRA_BEFORE; - const int extra_after = is_luma ? LUMA_EXTRA_AFTER : CHROMA_EXTRA_AFTER; - const int extra = is_luma ? LUMA_EXTRA : CHROMA_EXTRA; - const int pic_width = is_luma ? fc->ps.pps->width : (fc->ps.pps->width >> fc->ps.sps->hshift[1]); - const int pic_height = is_luma ? fc->ps.pps->height : (fc->ps.pps->height >> fc->ps.sps->vshift[1]); + const VVCFrameContext *fc = lc->fc; + const VVCSPS *sps = fc->ps.sps; + const VVCPPS *pps = fc->ps.pps; + const int subpic_idx = lc->sc->sh.r->curr_subpic_idx; + const int extra_before = is_luma ? LUMA_EXTRA_BEFORE : CHROMA_EXTRA_BEFORE; + const int extra_after = is_luma ? LUMA_EXTRA_AFTER : CHROMA_EXTRA_AFTER; + const int extra = is_luma ? LUMA_EXTRA : CHROMA_EXTRA; + int pic_width, pic_height; + + subpic_offset(&x_off, &y_off, sps, pps, subpic_idx, is_luma); + subpic_offset(&x_sb, &y_sb, sps, pps, subpic_idx, is_luma); + subpic_width_height(&pic_width, &pic_height, sps, pps, subpic_idx, is_luma); if (x_off < extra_before || y_off < extra_before || x_off >= pic_width - block_w - extra_after || @@ -88,11 +115,17 @@ static void emulated_edge_dmvr(const VVCFrameContext *fc, uint8_t *dst, const ui } } -static void emulated_edge_bilinear(const VVCFrameContext *fc, uint8_t *dst, const uint8_t **src, ptrdiff_t *src_stride, - const int x_off, const int y_off, const int block_w, const int block_h) +static void emulated_edge_bilinear(const VVCLocalContext *lc, uint8_t *dst, const uint8_t **src, ptrdiff_t *src_stride, + int x_off, int y_off, const int block_w, const int block_h) { - int pic_width = fc->ps.pps->width; - int pic_height = fc->ps.pps->height; + const VVCFrameContext *fc = lc->fc; + const VVCSPS *sps = fc->ps.sps; + const VVCPPS *pps = fc->ps.pps; + const int subpic_idx = lc->sc->sh.r->curr_subpic_idx; + int pic_width, pic_height; + + subpic_offset(&x_off, &y_off, sps, pps, subpic_idx, 1); + subpic_width_height(&pic_width, &pic_height, sps, pps, subpic_idx, 1); if (x_off < BILINEAR_EXTRA_BEFORE || y_off < BILINEAR_EXTRA_BEFORE || x_off >= pic_width - block_w - BILINEAR_EXTRA_AFTER || @@ -111,19 +144,19 @@ static void emulated_edge_bilinear(const VVCFrameContext *fc, uint8_t *dst, cons #define EMULATED_EDGE_LUMA(dst, src, src_stride, x_off, y_off) \ - emulated_edge(fc, dst, src, src_stride, x_off, y_off, block_w, block_h, 1) + emulated_edge(lc, dst, src, src_stride, x_off, y_off, block_w, block_h, 1) #define EMULATED_EDGE_CHROMA(dst, src, src_stride, x_off, y_off) \ - emulated_edge(fc, dst, src, src_stride, x_off, y_off, block_w, block_h, 0) + emulated_edge(lc, dst, src, src_stride, x_off, y_off, block_w, block_h, 0) #define EMULATED_EDGE_DMVR_LUMA(dst, src, src_stride, x_sb, y_sb, x_off, y_off) \ - emulated_edge_dmvr(fc, dst, src, src_stride, x_sb, y_sb, x_off, y_off, block_w, block_h, 1) + emulated_edge_dmvr(lc, dst, src, src_stride, x_sb, y_sb, x_off, y_off, block_w, block_h, 1) #define EMULATED_EDGE_DMVR_CHROMA(dst, src, src_stride, x_sb, y_sb, x_off, y_off) \ - emulated_edge_dmvr(fc, dst, src, src_stride, x_sb, y_sb, x_off, y_off, block_w, block_h, 0) + emulated_edge_dmvr(lc, dst, src, src_stride, x_sb, y_sb, x_off, y_off, block_w, block_h, 0) #define EMULATED_EDGE_BILINEAR(dst, src, src_stride, x_off, y_off) \ - emulated_edge_bilinear(fc, dst, src, src_stride, x_off, y_off, pred_w, pred_h) + emulated_edge_bilinear(lc, dst, src, src_stride, x_off, y_off, pred_w, pred_h) // part of 8.5.6.6 Weighted sample prediction process static int derive_weight_uni(int *denom, int *wx, int *ox,