From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id AD0AA4EE77 for ; Wed, 14 May 2025 13:43:53 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BD3FA68C74E; Wed, 14 May 2025 16:41:16 +0300 (EEST) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6887968C687 for ; Wed, 14 May 2025 16:41:08 +0300 (EEST) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-7424ccbef4eso4192910b3a.2 for ; Wed, 14 May 2025 06:41:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747230066; x=1747834866; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5Jh0Dz6olnq4pYgVDsKZ6ZpdzDdEHVVV49Kt/D8Sx7s=; b=Lhp3HYB/yQ5ObuqqNmUdtGuD9yGeofu+Xg1lgcVREBU31o7aExWI1XmChyEnDP5BJx eB1iTEy2zp1JtFTAstQXXST+bv0/5V1bAwoNU6mX/M9LBPmv07CiQ+vHS58b7iiTnkWV kPkJLvCtPsbIF0cQnEaXSzYrYKlfU6JJSYvDC5rUxquFSgIx+gvEQ0v4gCXPq/83vTIP rBx/Fu11FytFATeEQHWj3PQKWuHCEgjeHTB1Zwrwow84FvzlHiHv3xlo1/szKDnkkp66 K06pNSKBcWCHrXcCg3RnpDsIgSSKUMNeIy7KM0ZL3w5C+b5EAfBfsxx/qVQRTbkJfr9n c4yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747230066; x=1747834866; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5Jh0Dz6olnq4pYgVDsKZ6ZpdzDdEHVVV49Kt/D8Sx7s=; b=niVPrMUv3jDTL9aaKWVltKCFbEvIJ4TQF1pEpwe8RizAW/KxUfg4c4i1Dl8kTlGc6P Qz//UuAxLbIASJeVjGT179obVvZr0NUcBQcIHCPtsuJ2aj5C5x34SvdqVkq8LT8aXvyr OjCJDYz0A62EVjuiby32I8r0M8xGPR0tPtWmtVFI9mWfkRyRIJGbr4zN6RjHdF8inmBD 4K2sb41LUYg/B6RVT/jREhG+disH1KnZblBfHsZfBBo5QN7vyhx+/UcxANxO3PTghqM/ sG+HhdUZVfTLxxtrR4UVXu3pLwThkAnii9fbPS8ZkVUqcQecVpHveuJ/xAoogJZAxOcw ATqA== X-Gm-Message-State: AOJu0YzBonUFjmdeshxVAperRgJlJn0VCp5MwjL88d9PragwT68owl4P Ml9NiZ96rKAblVwp3FkhOV0ZUwL3wD7CmT3SKYl1qHMsBBvFjXU56ccer9oN X-Gm-Gg: ASbGncvRaHNUkx2ROygfrjzj6UVNVWqUbnugkEdXmU8+p1BQnIaoFaPARgOqTMENAm/ bo0Tmg+wPFeuBOO1Zfowqq8QJfmSvxi+XOSSu1z31ZJIlIjUvs0xcxur07zSWOH4XdcvrP2l86E vtSMWaxFkOAnPInpo6+1gZmQfVAu9UDpz1AHjd89qJevEGy1pFac8KuLMYMI1uY+IPiqh+yc2NN qsJGuq//DdMR4AGoe8zb1joV1qyJJEpGsNS5ee9j5uXdYglA4agnCUgUbHlZJL1WxX0MKv+4Q+3 yCQuim1/zBE8HmxC1QFuKvIcCRJH3fqOyTtuejKvD3np30ydJzRGPFCKl69xIkookGHykVxz X-Google-Smtp-Source: AGHT+IELmXbZZlLcW/7CGioqObXXdJfKfaN8U1J9YQl9swCq6e0cO3yBR5G9qQLgb8ZPMAGreaINMA== X-Received: by 2002:a05:6a00:88e:b0:736:3979:369e with SMTP id d2e1a72fcca58-74289290341mr4442400b3a.9.1747230066523; Wed, 14 May 2025 06:41:06 -0700 (PDT) Received: from localhost.localdomain ([124.79.129.75]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237a8f7edsm9310669b3a.167.2025.05.14.06.41.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 May 2025 06:41:06 -0700 (PDT) From: toqsxw@gmail.com X-Google-Original-From: toqsxw@outlook.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 14 May 2025 21:40:23 +0800 Message-ID: <20250514134031.1584-16-toqsxw@outlook.com> X-Mailer: git-send-email 2.44.0.windows.1 In-Reply-To: <20250514134031.1584-1-toqsxw@outlook.com> References: <20250514134031.1584-1-toqsxw@outlook.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v1 16/23] avcodec/vvc/dsp: update the interface of pred_residual_joint for joint cbcr residual functionality 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Wu Jianhua Signed-off-by: Wu Jianhua --- libavcodec/vvc/dsp.h | 2 +- libavcodec/vvc/dsp_template.c | 11 ++++------- libavcodec/vvc/intra.c | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/libavcodec/vvc/dsp.h b/libavcodec/vvc/dsp.h index fc4c3a6799..25b7755109 100644 --- a/libavcodec/vvc/dsp.h +++ b/libavcodec/vvc/dsp.h @@ -123,7 +123,7 @@ typedef struct VVCIntraDSPContext { typedef struct VVCItxDSPContext { void (*add_residual)(uint8_t *dst, const int *res, int width, int height, ptrdiff_t stride); void (*add_residual_joint)(uint8_t *dst, const int *res, int width, int height, ptrdiff_t stride, int c_sign, int shift); - void (*pred_residual_joint)(int *buf, int width, int height, int c_sign, int shift); + void (*pred_residual_joint)(int *dst, const int *src, int width, int height, int c_sign, int shift); void (*itx[VVC_N_TX_TYPE][VVC_N_TX_SIZE])(int *coeffs, ptrdiff_t step, size_t nz); void (*transform_bdpcm)(int *coeffs, int width, int height, int vertical, int log2_transform_range); diff --git a/libavcodec/vvc/dsp_template.c b/libavcodec/vvc/dsp_template.c index 1aa1e027bd..c6dc6e22a7 100644 --- a/libavcodec/vvc/dsp_template.c +++ b/libavcodec/vvc/dsp_template.c @@ -62,15 +62,12 @@ static void FUNC(add_residual_joint)(uint8_t *_dst, const int *res, } } -static void FUNC(pred_residual_joint)(int *buf, const int w, const int h, +static void FUNC(pred_residual_joint)(int *dst, const int *src, const int w, const int h, const int c_sign, const int shift) { - for (int y = 0; y < h; y++) { - for (int x = 0; x < w; x++) { - *buf = ((*buf) * c_sign) >> shift; - buf++; - } - } + const int size = w * h; + for (int i = 0; i < size; i++) + dst[i] = (src[i] * c_sign) >> shift; } static void FUNC(transform_bdpcm)(int *coeffs, const int width, const int height, diff --git a/libavcodec/vvc/intra.c b/libavcodec/vvc/intra.c index 7f772fa4ae..bdcb193077 100644 --- a/libavcodec/vvc/intra.c +++ b/libavcodec/vvc/intra.c @@ -178,7 +178,7 @@ static void add_residual_for_joint_coding_chroma(VVCLocalContext *lc, uint8_t *dst = &fc->frame->data[c_idx][(tb->y0 >> vs) * stride + ((tb->x0 >> hs) << fc->ps.sps->pixel_shift)]; if (chroma_scale) { - fc->vvcdsp.itx.pred_residual_joint(tb->coeffs, tb->tb_width, tb->tb_height, c_sign, shift); + fc->vvcdsp.itx.pred_residual_joint(tb->coeffs, tb->coeffs, tb->tb_width, tb->tb_height, c_sign, shift); fc->vvcdsp.intra.lmcs_scale_chroma(lc, tb->coeffs, tb->coeffs, tb->tb_width, tb->tb_height, cu->x0, cu->y0); fc->vvcdsp.itx.add_residual(dst, tb->coeffs, tb->tb_width, tb->tb_height, stride); } else { -- 2.44.0.windows.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".