From patchwork Fri Oct 27 19:25:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= X-Patchwork-Id: 44395 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:dd83:b0:15d:8365:d4b8 with SMTP id kw3csp69469pzb; Fri, 27 Oct 2023 12:26:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGFhL7eMwRchV6lOstzCS7udI11DetPTBz7aW/j3a1EUtzOBcNqjJTTw58iUPrfI44yUuYZ X-Received: by 2002:a17:907:6d05:b0:9ad:a59f:331a with SMTP id sa5-20020a1709076d0500b009ada59f331amr3273109ejc.57.1698434785809; Fri, 27 Oct 2023 12:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698434785; cv=none; d=google.com; s=arc-20160816; b=UjWnZeG17At/wuBraf0UzUe23L6CXUjUfGoAolqlP3BEFHR6233NnY9txbYSHdSqVs UbFnce+VU+XLSOTekiWlBxtwcd4ZsnBM/c3r7e5L3UmGPu4qKZthzZ9EpcxvoaWHWeNu wYizpnkbn0dcauWaEnspmA92sOu79uWDcj6ABS06sNfderNaaIKhlRB2iS9E0v2OdOSc HFSS+3VSikNu+sO6dyJ77XimCCLloKOdfXmM+6gnfFj+Prp9nTnSaagvvAuU+0gwZeEP pM8nLrWY6Pe7y0fk3AWFZSqw7bbOg4iXKhjUAXuFtX5ux0qKxJ2dpNN8DTcJTom1Lbkb OU7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=0uF53fwFqSA7euM6MVOzhX3jsBkUr+tZPUetyKenxQQ=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=S2W3cJr3J3Ak4hG1PaNfqpWcbwRY2PfjMHarsnNnnJVedR76SuVHXZssjRs6kQjxEL UZAh8t4Lg20YhNXCm9LMSVeFoTCthhfnBC9BWlrruTSWt18KElLLZi+wx8mnKh62Pgz0 4BG/WTqn+El3gbcK3Epn31yKzfahLYpG7mi8Xl7glYFXLFTdrj95BXkiKHP4PhyYjFs3 9xRp40h7ChMxE9QQb89kLbdrPqvFIBTwTV3aJc30QGVJC0GMV5yw4lb6vAxucQurIvOa iPuoNUuNmwEMO1Jt0Hw11hquKycm05jbJBxOIKZlJ3BA7XHEPoIojTWDJb24hqY+C6QN bJ1g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u16-20020a170906109000b009a224eb0935si943233eju.122.2023.10.27.12.26.25; Fri, 27 Oct 2023 12:26:25 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EEFB368CB3B; Fri, 27 Oct 2023 22:25:51 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from ursule.remlab.net (vps-a2bccee9.vps.ovh.net [51.75.19.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 73E2868CACA for ; Fri, 27 Oct 2023 22:25:41 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id 1E2C6C01BD for ; Fri, 27 Oct 2023 22:25:41 +0300 (EEST) From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 27 Oct 2023 22:25:39 +0300 Message-ID: <20231027192540.27373-5-remi@remlab.net> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/6] lavc/idctdsp: improve R-V V add_pixels_clamped 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Ax9hIjhhddbl --- libavcodec/riscv/idctdsp_rvv.S | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/libavcodec/riscv/idctdsp_rvv.S b/libavcodec/riscv/idctdsp_rvv.S index 4ff72f48d2..fafdddb174 100644 --- a/libavcodec/riscv/idctdsp_rvv.S +++ b/libavcodec/riscv/idctdsp_rvv.S @@ -23,7 +23,6 @@ func ff_put_pixels_clamped_rvv, zve32x vsetivli zero, 8, e16, m1, ta, ma vlseg8e16.v v24, (a0) -1: /* RVV only has signed-signed and unsigned-unsigned clipping. * We need two steps for signed-to-unsigned clipping. */ vsetvli t0, zero, e16, m8, ta, ma @@ -54,17 +53,18 @@ func ff_put_signed_pixels_clamped_rvv, zve64x ret endfunc -func ff_add_pixels_clamped_rvv, zve32x - vsetivli zero, 8, e8, mf2, ta, ma - vlseg8e16.v v24, (a0) - vlsseg8e8.v v16, (a1), a2 - vwaddu.wv v24, v24, v16 - vwaddu.wv v25, v25, v17 - vwaddu.wv v26, v26, v18 - vwaddu.wv v27, v27, v19 - vwaddu.wv v28, v28, v20 - vwaddu.wv v29, v29, v21 - vwaddu.wv v30, v30, v22 - vwaddu.wv v31, v31, v23 - j 1b +func ff_add_pixels_clamped_rvv, zve64x + vsetivli zero, 8, e8, mf2, ta, ma + li t0, 8 * 8 + vlse64.v v16, (a1), a2 + vsetvli zero, t0, e8, m4, ta, ma + vle16.v v24, (a0) + vwaddu.wv v24, v24, v16 + vsetvli zero, zero, e16, m8, ta, ma + vmax.vx v24, v24, zero + vsetvli zero, zero, e8, m4, ta, ma + vnclipu.wi v16, v24, 0 + vsetivli zero, 8, e8, mf2, ta, ma + vsse64.v v16, (a1), a2 + ret endfunc