From patchwork Sun Oct 29 13:13:49 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: 44425 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:dd83:b0:15d:8365:d4b8 with SMTP id kw3csp911842pzb; Sun, 29 Oct 2023 06:14:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH/0RaT84fqPLboBswx/NZd0AqFtakwXVU0EJmpEm6lfIw++TCdeAX1PBbP3IyAe3MtsK5Y X-Received: by 2002:a05:6402:74c:b0:53f:b964:ddb1 with SMTP id p12-20020a056402074c00b0053fb964ddb1mr6483491edy.37.1698585240388; Sun, 29 Oct 2023 06:14:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698585240; cv=none; d=google.com; s=arc-20160816; b=f2BnJKO/DUvCOBIZosOnlNzrBRQ7ZPisQ1GH9qzVW6YzNaTLZ2dj+wCrh0j/n1C21H sKq/oVRonZAekMq7pfnx3uCwIQzlb2fhCw0Uyjdsv4+sJcyXFvFujW/6oE+HYFoAFMzj 5keyvJFzdcur30G8R7IY6sSsnac6kW9reaqRRhdZXUtxMx+FQIG5EC36QgVMq8SYCaO+ eXVbFMQ6C4zJM9mk0iM+fom2hY+iziU2cP4ynhiok/EAy1PRFDSEuW6RMYu7q7lZVjvL CpK8ariBpQh2Zv/qm2jSb38eIfkE+5pYXCvS94/PeL+KTv/LfmWqsA7KxYdEMijHh2Ac 5x2Q== 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=XdSMfKrfEhEw5stMVpPCQT553nQIW96GkB0l5eaZeps=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=f3JIp9HX2LoIhS4PZ+F+DPthm5LJVUWgIHwUFxcy9FZ+TLX8TA4/VNv/vZf5LX/kM3 TnkZISO0FKIVCvAfIiyLoP914gNb+eeuukDEH9TFQeMZDqXZWlc1gepj1+6OlP0In5Z4 heicvnV9HsarnfXz1j4uqESFENA1xxRjsYBCCZkrk/PEmzpDCLvO7f3pD37+vFvaTMEb nwjoS5uIn45eggu6iIJfnLu3CSq8ii10okVk3zpw2Pt6pN0Q+mXwzJZ5OUc9i5oNlX5i +hbO4SKf/RUsyUi5NXXQP+F11gYwLeKQK0gHRIzm2+a1CcfwQ3Go8hBgG4mxnPStOUcf 9z5g== 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 f2-20020a50d542000000b0053e3e916bc1si2556514edj.246.2023.10.29.06.13.59; Sun, 29 Oct 2023 06:14:00 -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 E37CE68CADE; Sun, 29 Oct 2023 15:13:56 +0200 (EET) 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 12C9B68C3E2 for ; Sun, 29 Oct 2023 15:13:50 +0200 (EET) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id 6DA77C006F for ; Sun, 29 Oct 2023 15:13:49 +0200 (EET) From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Oct 2023 15:13:49 +0200 Message-ID: <20231029131349.73027-1-remi@remlab.net> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] lavc/pixblockdsp: remove R-V V get_pixels_16 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: NX5pPW94nUoa In the aligned case, the existing RVI assembler is actually much faster. In the unaligned case, there is nothing much to gain over C. --- libavcodec/riscv/pixblockdsp_init.c | 7 +------ libavcodec/riscv/pixblockdsp_rvv.S | 7 ------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/libavcodec/riscv/pixblockdsp_init.c b/libavcodec/riscv/pixblockdsp_init.c index 7d259a032f..6b1efd16f8 100644 --- a/libavcodec/riscv/pixblockdsp_init.c +++ b/libavcodec/riscv/pixblockdsp_init.c @@ -36,8 +36,6 @@ void ff_get_pixels_8_rvv(int16_t *block, const uint8_t *pixels, ptrdiff_t stride); void ff_get_pixels_unaligned_8_rvv(int16_t *block, const uint8_t *pixels, ptrdiff_t stride); -void ff_get_pixels_unaligned_16_rvv(int16_t *block, const uint8_t *pixels, - ptrdiff_t stride); void ff_diff_pixels_rvv(int16_t *block, const uint8_t *s1, const uint8_t *s2, ptrdiff_t stride); void ff_diff_pixels_unaligned_rvv(int16_t *block, const uint8_t *s1, @@ -58,10 +56,7 @@ av_cold void ff_pixblockdsp_init_riscv(PixblockDSPContext *c, #if HAVE_RVV if ((cpu_flags & AV_CPU_FLAG_RVV_I32) && ff_get_rv_vlenb() >= 16) { - if (high_bit_depth) { - c->get_pixels = ff_get_pixels_unaligned_16_rvv; - c->get_pixels_unaligned = ff_get_pixels_unaligned_16_rvv; - } else { + if (!high_bit_depth) { c->get_pixels = ff_get_pixels_unaligned_8_rvv; c->get_pixels_unaligned = ff_get_pixels_unaligned_8_rvv; } diff --git a/libavcodec/riscv/pixblockdsp_rvv.S b/libavcodec/riscv/pixblockdsp_rvv.S index 80c7415acf..7e35fc5b46 100644 --- a/libavcodec/riscv/pixblockdsp_rvv.S +++ b/libavcodec/riscv/pixblockdsp_rvv.S @@ -45,13 +45,6 @@ func ff_get_pixels_unaligned_8_rvv, zve32x ret endfunc -func ff_get_pixels_unaligned_16_rvv, zve32x - vsetivli zero, 8, e16, m1, ta, ma - vlsseg8e16.v v0, (a1), a2 - vsseg8e16.v v0, (a0) - ret -endfunc - func ff_diff_pixels_rvv, zve64x vsetivli zero, 8, e8, mf2, ta, ma li t0, 8 * 8