From patchwork Tue Jul 16 02:49:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 50551 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:c9c6:0:b0:482:c625:d099 with SMTP id o6csp142648vqt; Mon, 15 Jul 2024 19:57:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUYMkz99XnvfkDY5VlPGLlfO7wbDDVO/2X7TYPiuRwc4Bn0rODiXATmN7z17FQT61ZlTc04PYQ/03cbiNEGuvX4dKynv39dDktHrQ== X-Google-Smtp-Source: AGHT+IEugyzEC12ZyBR1vbljD0uTRD9FWU3QQxWtt/VpJCJr1y2+tk0NmYqP9I0T+EWXGN9SGWWG X-Received: by 2002:a05:6512:690:b0:52c:dac0:7993 with SMTP id 2adb3069b0e04-52edf0181bdmr463932e87.8.1721098627625; Mon, 15 Jul 2024 19:57:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721098627; cv=none; d=google.com; s=arc-20160816; b=Ihk6fmVEyH1s3BCrEOLN96HvQy5o8aM1iOSsSOURGSdSKRqASPTWQZ6DK3LcrhVLHO 8I4xKH6+6PExci4yjrQbitQUiHy+Db7+aWWAMAt1AJGu5/t8TXACofn63dloray4TMxj H1g660SBd9VgYpIK0TugJHhdJdpva3U+lRIJCsLaJVpkXNz1rENsltTNZao9ZCCWPm1u FQROF3mWEpwUSOVh83ZFiCtaec4zKjH3D1+A32vM2TDllzzD5r6iqEFUSbe80EHIw0P/ VV7z1ej/+PB97da0nFYPW10aHoaNfekREGceZYhacQDgwRgOimOqnbxf+bnrSKpSyAQN Uo9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to:date :to:from:message-id:dkim-signature:delivered-to; bh=W05L2UcrEn3ifeqD1abEI7DpCQRrxUI0tbloT6JFFZQ=; fh=HnHYuZ9XgUo86ZRXTLWWmQxhslYEI9B9taZ5X1DLFfc=; b=MODgs2coY3jeEbHkz3EWRyukaO8nwmc6uBOc4bdVYmEMyGbthwlTw23ESd49kbJx9o AOuc97e1Hxtqfmi9akpfFjrmts6m/A8KhhrcIHlhdWza1uIq8GeiyTNskOek8XJC6B3z DEpe1QwhjXJa93+dA72LTXRhigEcZYXwUtJ7nRcdbkbz2wslGYx3js+hJ/kS5bHd8Ac7 UAUp+JyzwythkCgQFio6Snu6p0jvVSAfx5LwhfZUxly6C2n1dezdTRqIxdcD/x/RgVT3 80HBjUClUVUBOlaMXfhxTXIomNPgkaflZO4ugsjDZUa9dymPv9cQ8yTtNUxVcEP7EgKL /WHQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@foxmail.com header.s=s201512 header.b="CZSyKk/M"; 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=NONE dis=NONE) header.from=foxmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-52ed2528c88si1735184e87.113.2024.07.15.19.57.05; Mon, 15 Jul 2024 19:57:07 -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=@foxmail.com header.s=s201512 header.b="CZSyKk/M"; 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=NONE dis=NONE) header.from=foxmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A6EB068D9B9; Tue, 16 Jul 2024 05:50:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out203-205-251-73.mail.qq.com (out203-205-251-73.mail.qq.com [203.205.251.73]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0415F68D995 for ; Tue, 16 Jul 2024 05:50:11 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1721098201; bh=3ag+whoh4g60BIfri9G2w92oVw9AjDgDEVkT02MX6GU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=CZSyKk/MfBVDeSLsHE2yvzFUZuHRV7kBi2HwwPZes8AorJXLOjHxYXTPNMdb39TXk VA4QWgyEFKOaTZFvlyBnF4373GbqMMUtUNwunkoqAGP+h1PHY8GcS4Chd0Rel3Idtm V2KUq0l5su0qf0RFNRzwY78NDES1Dr3wz/387mx4= Received: from ZHILIZHAO-MB1.tencent.com ([119.147.10.193]) by newxmesmtplogicsvrsza29-0.qq.com (NewEsmtp) with SMTP id C7B91C67; Tue, 16 Jul 2024 10:49:59 +0800 X-QQ-mid: xmsmtpt1721098201tdpbj8mlv Message-ID: X-QQ-XMAILINFO: Md0EpfRTqfgWtUHfJQmXvPwBzouyp0Ap1WBataVUmmcoptZuW7c78RGxCQpN3y dPRjMqpOCNX2H6AEZsXS2IHhRdhv8zlEvgUZgDfhzIXKncNAX+dCaV10JqONAc728B9qcFGDxiOx /h6842StJA5jtmV96nfHN+0JF5QPrjFQa7Pk6BXLZ6kSLzppYMgiTrJB/7ksAvL18idmKTymWSJw u2J0SdDneH4HEffB4JuhXSwhAvIt7va29I34azHFSmFcPBha82Nrt/GyJYKTEjwkrBKPd9lyfxWS LdbeGA3ciVRct04XGH/Mv/5xWKnu6x/RCX+HPIjnca9dqHjVsliC+4CXggw8FjThTbNdQPy6exdj XaISNRuDoy2A77x3kjAmZBm48/ci75AlSY7RDpVNkAbXAviH6Ut5O2Yaow2gDWhRAgeTOIGc5FCh Z1eLL7tjUBXxpNUZt+f31hWIlK6ZY9s7eJ0SLPNcMTsM5m1Ow9neir7ARfyAdxtecD8H+P1K06Z7 H2I6iFWYdz1dnYTy+uTP6aphDX6Vxz0uzd0/LYbZGWTxv4zzE0/ijKgsBjYrNYbuIgS+YfEVD7CY jrTMbyIYz5Be6RKZBGLS93lqmyrHuB4h7WNk46Vo0iBwg2yeueighYtbAgxSHzUwD8s1iYeSSgFi RcqpR81AOoxC6vmkJ9QOyInD001z2mO2B6rrPOBvMxt5zkupakNIPywHg+Sst3/EyTtNHKDIaVMn sFi6TSINubLmvGCXuyaifSkhdG6yJFozgoAhG4yFlij01muqQiVM8VqFIIqxSHiULglWCFFXaQNH ChlAmbEAm7GrVW9gaYjutdoTrpaEfOOUYBzHInwNVX7gp/Us0jbv1sbXitR+EW+jBqRTgcF+JqBv FySIcd+2ATu81vaCvcBn9Qyl8VVOlDKP6c4SAJP+oVduguVnyz8RNMDrSVtL9CYRvoGvPAre7B5y FIv3J4OvuILItiQS+DnSbsToyVAG6B/oupWja80/p6X9f7SYdeHrCR26Ryvq2B9Ap76xt82ZX7Ho xpHQZWi+e2O/jxLyVB X-QQ-XMRINFO: M/715EihBoGSf6IYSX1iLFg= From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Tue, 16 Jul 2024 10:49:57 +0800 X-OQ-MSGID: <20240716024957.41421-2-quinkblack@foxmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240716024957.41421-1-quinkblack@foxmail.com> References: <20240716024957.41421-1-quinkblack@foxmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/vvc: Remove write-only assignments in alf_filter_chroma 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: Zhao Zhili Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: cPzs/4hl/A9V From: Zhao Zhili --- libavcodec/vvc/filter_template.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/libavcodec/vvc/filter_template.c b/libavcodec/vvc/filter_template.c index 32777452b7..6dd7310089 100644 --- a/libavcodec/vvc/filter_template.c +++ b/libavcodec/vvc/filter_template.c @@ -153,8 +153,6 @@ static void FUNC(alf_filter_chroma)(uint8_t* _dst, ptrdiff_t dst_stride, const u const pixel *s2 = s0 - src_stride; const pixel *s3 = s1 + src_stride; const pixel *s4 = s2 - src_stride; - const pixel *s5 = s3 + src_stride; - const pixel *s6 = s4 - src_stride; for (int i = 0; i < ALF_BLOCK_SIZE; i++) { pixel *dst = (pixel *)_dst + (y + i) * dst_stride + x; @@ -164,8 +162,6 @@ static void FUNC(alf_filter_chroma)(uint8_t* _dst, ptrdiff_t dst_stride, const u const pixel *p2 = s2 + i * src_stride; const pixel *p3 = s3 + i * src_stride; const pixel *p4 = s4 + i * src_stride; - const pixel *p5 = s5 + i * src_stride; - const pixel *p6 = s6 + i * src_stride; const int is_near_vb_above = (y + i < vb_pos) && (y + i >= vb_pos - 1); const int is_near_vb_below = (y + i >= vb_pos) && (y + i <= vb_pos); @@ -174,19 +170,15 @@ static void FUNC(alf_filter_chroma)(uint8_t* _dst, ptrdiff_t dst_stride, const u if ((y + i < vb_pos) && ((y + i) >= vb_above)) { p1 = (y + i == vb_pos - 1) ? p0 : p1; p3 = (y + i >= vb_pos - 2) ? p1 : p3; - p5 = (y + i >= vb_pos - 3) ? p3 : p5; p2 = (y + i == vb_pos - 1) ? p0 : p2; p4 = (y + i >= vb_pos - 2) ? p2 : p4; - p6 = (y + i >= vb_pos - 3) ? p4 : p6; } else if ((y + i >= vb_pos) && ((y + i) <= vb_below)) { p2 = (y + i == vb_pos ) ? p0 : p2; p4 = (y + i <= vb_pos + 1) ? p2 : p4; - p6 = (y + i <= vb_pos + 2) ? p4 : p6; p1 = (y + i == vb_pos ) ? p0 : p1; p3 = (y + i <= vb_pos + 1) ? p1 : p3; - p5 = (y + i <= vb_pos + 2) ? p3 : p5; } for (int j = 0; j < ALF_BLOCK_SIZE; j++) { @@ -212,8 +204,6 @@ static void FUNC(alf_filter_chroma)(uint8_t* _dst, ptrdiff_t dst_stride, const u p2++; p3++; p4++; - p5++; - p6++; } } }