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 1D2124BA0B for ; Thu, 1 May 2025 14:46:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A8DB968BB7E; Thu, 1 May 2025 17:44:13 +0300 (EEST) Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1B28468BA25 for ; Thu, 1 May 2025 17:44:06 +0300 (EEST) Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-af59c920d32so716192a12.0 for ; Thu, 01 May 2025 07:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746110645; x=1746715445; 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=TX9OAqeIi6zuVk1Z4Jce/s2vckz2Dgi1f3EX0ty1l0Voez/SotmjKQei/Zojo1yOiA iB8BsxiGIxTqgfpjsI8GDmFCmHtD9DdJ+hrhquNvxH0GhjX1Kgyr8hc7/e2ntUohfmzZ vQ/Ro7fujCnGOOah1wIENsEyx64eKZRcxoNT0n+W4uJ9U6Y3niKc9d9hgtyUHMD2X7s/ Sp+HephlsTfuoj3SYPZWXr9v/AubFJN84tUfeD88/OJx4R/ibjQ/U8wbVr0Uf6ixaLKn Gy7m8eas28XWoWQ8x1Ml6WWc5F65EgPuSJd+mD24oYLiyyTzDXXWYRumAufLxfYWYlMX 79CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746110645; x=1746715445; 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=EP9S5ntxzo0tfWY9unoebvYvZvG0Y2dPcGcaW67O7udQp13NoikH+MM8M/HC1jwsM2 dchfqH6NJu8amd/Jbr0Pfbwc8lM7IdUsxNOaSSBhMSqvC6PN6D/MJEhUzG9qvtsTGFND W0ps/ke2d8ytiphYQkrNCnfQVvNh3A8QEipltODbnpw5k19AZlr6nhF4kmq8ocpvX9HV MWViEe5JV2DTDTGPVP7NUiUkD6xzI0C9zCryrdHF0oZFn3gWw2LjChJU2iXYN8ra93/2 007Kaic2ia7KgrO84jvX8lOP2bMFV21TuiChIBDd/1nwx5gmHBQrl6EKnU0iLuZFnmTV RZSg== X-Gm-Message-State: AOJu0YwRlu4ipQ2EkfV+++/S+KkNieMXTyjhjFXYdaydCQq5hjBbDfCN ojyEqGrh5PrZSqkMnxz58uuIJt/QUDTtAGLf9EquaTCO9KhHjFtYNlhL+g== X-Gm-Gg: ASbGnct22FpiY472g97KIu4gJaQPh4mFhmoAlSUOIwF5hGMKaw+pu18x2ZWD7sYZRBb 5OscMqX2JIeO1Q90IXBeBd/3pMR7JzlUk1CvASYZrO8vIa3zyUOCdmqiyz1xEnok0cKY5t0UTN6 AtIWHBzSQAMtLNSt+qFkvBlSUJrh2wBZxaUiMW/7F6WpDkE/P5MAZ9tpbaENBBWgd8+PHFUtxcn 2o0ywCqDWXyeG1or+C5y5gvCXnRwEOLcs7ml4LKYrbQSy0EOH4TzeotUWYM6RGsU2eA3VNNZZtP Sr3ocO+LoP3Q50/69RszqI3dmQ0HgdMdFqpF/Jk+R1NF+NXQcGTN7YdJ4qXj6yhSnDm6sMMH X-Google-Smtp-Source: AGHT+IH39vCC3fgXOdO6e7kTFl73NKiBbqDE8jSy7Iq8k6fDugMdsR2/st4wEvzbWIwISFRtSLDWGQ== X-Received: by 2002:a05:6a21:1585:b0:1f5:889c:3cdb with SMTP id adf61e73a8af0-20bd65580a0mr4076590637.8.1746110645032; Thu, 01 May 2025 07:44:05 -0700 (PDT) Received: from localhost.localdomain ([124.79.129.75]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b1f9d4b68e8sm807271a12.27.2025.05.01.07.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 May 2025 07:44:04 -0700 (PDT) From: toqsxw@gmail.com X-Google-Original-From: toqsxw@outlook.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 1 May 2025 22:43:14 +0800 Message-ID: <20250501144324.958-16-toqsxw@outlook.com> X-Mailer: git-send-email 2.44.0.windows.1 In-Reply-To: <20250501144324.958-1-toqsxw@outlook.com> References: <20250501144324.958-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".