From patchwork Sat May 25 15:38:38 2024 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: 49257 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:542:0:b0:460:55fa:d5ed with SMTP id 63csp2371742vqf; Sat, 25 May 2024 08:39:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWNO7kTxWPY6bpY94qcgNIJKm9DQ1zM0c0C4klGLGt9gAIUt2nyWLK2rICcvmoXLlRCvdMc/U0tkH1KxXAr5mTAKVDtpcdsKld9ag== X-Google-Smtp-Source: AGHT+IEpbkbDKCoxGxCHYKr0+rKdG9i6rT35xcqn7vgC5jdkQfOGLqid5Qk4twiQ3jFkuNx0ifR6 X-Received: by 2002:a17:906:27c4:b0:a59:c46b:c529 with SMTP id a640c23a62f3a-a62630a3c93mr337966266b.0.1716651562010; Sat, 25 May 2024 08:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716651561; cv=none; d=google.com; s=arc-20160816; b=WDlFEshGtA1QW+K2gH/FhYqZxGQNFfYgF4R1Ue+h7LapKjoYOdpzYW5abMwe04QOfQ PsoT7+k7AXKQcwb8FGhRHVfOcwjo4uBsf831Acik1aCrh/bTuvwHC8LQzMWmU5vJrEtR g+1EKE+9U/RRzox6OtL64X6BQFqdiiDaCPUYl9rqNXa9r1u5wjKvYepl0leK4YZZuXDb VBN1zwH2Hbb781vv22MyD7QMDg+GaWgCzF7hTxzqf2n0SYXvqucCE1wDNbTujhETBAul tyzca2wBesGT2uNiSW7ml12PldBKrwQCrlDr/HOwultANmHerBZ+D0hS0lLHUnyqaRQS XxSA== 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:references:in-reply-to:message-id :date:to:from:delivered-to; bh=PBdAwvfBUFeDa/F4IOrSUi/OeHN7ImO3FArX5fYy4dI=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=QMScbs3HXB7R3g1YVneMy94GNcylnntnlt7MvMpG83f9RNC4DjpWO2rGTJoZu2CoVg 5QM28Xeuh1h6ZhzPUPIJAYypZqfkNgD9GO0WhBrFVvWyR2XcUl4zsOG4fkd8Ry4Gq/cN Kq+wthugXvhV/wSQJcAf88exwt2mZswWVWb1HD2oiG5/lj08F1BVRqTu8/a91y084KTs C1xUMxenpviU6LxBKf2wV728gikNjtCXwxBovQwwbxieotWi2MDxY9oEXU4JiN/pau1W vDeLqiPVk0cxOW+OfsqYN5cOSlgRsdiRaTgOs1sR9TFIqHdeiKvtTi2zdBnSQ8B2ntVz ditg==; dara=google.com 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 a640c23a62f3a-a626cd9182csi190422266b.732.2024.05.25.08.39.21; Sat, 25 May 2024 08:39:21 -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 0B8C868D4DC; Sat, 25 May 2024 18:38: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 8325768D499 for ; Sat, 25 May 2024 18:38:41 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id AA236C0214 for ; Sat, 25 May 2024 18:38:40 +0300 (EEST) From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Sat, 25 May 2024 18:38:38 +0300 Message-ID: <20240525153840.78147-3-remi@remlab.net> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240525153840.78147-1-remi@remlab.net> References: <20240525153840.78147-1-remi@remlab.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/5] lavc/vp8dsp: factor R-V V bilin functions 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: KY77TAo8o8FD For a given type, only the first VSETVLI instruction varies depending on the size. --- libavcodec/riscv/vp8dsp_rvv.S | 37 +++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/libavcodec/riscv/vp8dsp_rvv.S b/libavcodec/riscv/vp8dsp_rvv.S index bb0c7bf02a..545c2e9728 100644 --- a/libavcodec/riscv/vp8dsp_rvv.S +++ b/libavcodec/riscv/vp8dsp_rvv.S @@ -108,9 +108,10 @@ endfunc vnsra.wi \dst, v24, 3 .endm -.macro put_vp8_bilin_h_v len type mn -func ff_put_vp8_bilin\len\()_\type\()_rvv, zve32x - vsetvlstatic8 \len +.macro put_vp8_bilin_h_v type mn +func ff_put_vp8_bilin4_\type\()_rvv, zve32x + vsetvlstatic8 4 +.Lbilin_\type: li t1, 8 li t4, 4 sub t1, t1, \mn @@ -126,9 +127,12 @@ func ff_put_vp8_bilin\len\()_\type\()_rvv, zve32x endfunc .endm -.macro put_vp8_bilin_hv len -func ff_put_vp8_bilin\len\()_hv_rvv, zve32x - vsetvlstatic8 \len +put_vp8_bilin_h_v h a5 +put_vp8_bilin_h_v v a6 + +func ff_put_vp8_bilin4_hv_rvv, zve32x + vsetvlstatic8 4 +.Lbilin_hv: li t3, 8 sub t1, t3, a5 sub t2, t3, a6 @@ -149,7 +153,23 @@ func ff_put_vp8_bilin\len\()_hv_rvv, zve32x ret endfunc -.endm + +.irp len,16,8 +func ff_put_vp8_bilin\len\()_h_rvv, zve32x + vsetvlstatic8 \len + j .Lbilin_h +endfunc + +func ff_put_vp8_bilin\len\()_v_rvv, zve32x + vsetvlstatic8 \len + j .Lbilin_v +endfunc + +func ff_put_vp8_bilin\len\()_hv_rvv, zve32x + vsetvlstatic8 \len + j .Lbilin_hv +endfunc +.endr const subpel_filters .byte 0, -6, 123, 12, -1, 0 @@ -224,9 +244,6 @@ endfunc .endm .irp len,16,8,4 -put_vp8_bilin_h_v \len h a5 -put_vp8_bilin_h_v \len v a6 -put_vp8_bilin_hv \len epel \len 6 h epel \len 4 h epel \len 6 v