From patchwork Wed Aug 25 08:35:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Storsj=C3=B6?= X-Patchwork-Id: 29767 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp354584iov; Wed, 25 Aug 2021 01:36:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3gHp0KIaDlA8v2d/MYBnr5VOFAY2676VadcPcUb4sjLnkHSKye4ux3jAHYCuaHyENYR1s X-Received: by 2002:a17:906:2bcf:: with SMTP id n15mr45869803ejg.414.1629880577569; Wed, 25 Aug 2021 01:36:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629880577; cv=none; d=google.com; s=arc-20160816; b=Dfo1zcnJddonuu4no7XVtW3MW5vh+bGiOrDti8qwO1OEE6OZU58Ckmwc6ISjxdwm1g 9LnGBm3B6ow2nyDw7Q0fkbLJvVFBLHJiPeHiALW7RKnLjfyQtCRBo/EaTv3MEf2sIQan 1OHJ6hS5lOCyPRtxq1o15RT8FX9u39fhuxd+W5gHL1o9PdG/XnxnW34rgwqosKRzy9Lo 223uytTY1XObrpk/o9t0VVklU/98fiwSxpzRhHMtLg14+of+xJ2nlMraw8HgF1o6alV2 XZgYkEMX8nhX5qMIN+WWTg+chumB/lxGALr5Wz9MjtpGV00vmfVRpG8VVmml+prmglBZ Iftg== 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:message-id:date:to:from :dkim-signature:delivered-to; bh=XR8j/rCjMsQY5ESzE914ZCY1BpJFosC1WrWw1aZ/K8E=; b=Nsmw4Nyr5DLIeq+yXLRxYASCXXuPo6d5bCMBOW3Zo9JWj2Ush8iVSFYpmEjIa9UdRm YGw2XLBdKSx6jlr8KngDawgRBwiSwUhH+fAdqMTjCGWplvy+x1y/PpJHVdxDsm+hCtd7 YZn4o6ARGRUgtN31OjjsQ5A9GuyUUfiDyWVbxXBkUW8kNWnNVnK73eVYqpUBxMZjXE/s 6pfLYmGGgk2N8zUaR8Vl6ltJaY5lyaJntX0dZkyCMOg1P7BnFnCskLY2xNYA0KDLJVaL gP8sYPJH9oUNZPQOr6B9DHzeR4ilvDPCHOAiLpo0VcbRi1AFkU2F7T/OEPeH0ymQavIM ea7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@martin-st.20150623.gappssmtp.com header.s=20150623 header.b=Sm2oAN1q; 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 k13si2906178eds.370.2021.08.25.01.36.09; Wed, 25 Aug 2021 01:36:17 -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=@martin-st.20150623.gappssmtp.com header.s=20150623 header.b=Sm2oAN1q; 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 C9FD268A1B9; Wed, 25 Aug 2021 11:36:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 64D4D6807AA for ; Wed, 25 Aug 2021 11:35:58 +0300 (EEST) Received: by mail-lf1-f47.google.com with SMTP id k5so51269604lfu.4 for ; Wed, 25 Aug 2021 01:35:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BO1Js0lFSHsknAo4gv+CaNsmSNDL4V8jajMXC0yzrJk=; b=Sm2oAN1qX0MAk/kg0jK7rPBH917wwTQGmKP+R2z0EU+oDorA0Q3ClrnfIMwr8D02Eu mPVNLcrlLNoyueBHZu8CW4AfG7FCfCRbnKP5fx0KI9BiDPRG4cqE83pxiieQ2+tbXgBu Ua12pEo8RQfa12Su2Urpisc/26FXPlN3tGireIvvavdNE78+wvIL+kJwePcpqCANBexo sOOy0cd6PihXIKovOH1EonsxXM84kS4q56U2DFcIneG0Js2qq1/sbFOMcaPOvLj0A72a J7rz6Buh36El4KWEAaA5Do9xb2/0Nn088SqxUdqtiMrQAMJ5wARNlSmO8gyK1tufy2Yl Th2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BO1Js0lFSHsknAo4gv+CaNsmSNDL4V8jajMXC0yzrJk=; b=qedMA6rrejm58SMMYHVmPjJtHMpLF1CcI6u/Lr53dE5lDWwbcMg1O3BpGemEV1i4qR icCFUTSA0ZzVMAUsokmzN2q8fIe/Hq3zFnRurONBpnQ+khvlxyGVxC3vqMzo78FnAV8D TXvPDcLanWOvliO83bDXahRvLhbzSLFkXd6N1ME++bC0doU0kb5TCUDfd5RiECMhYxYV cfPMjtsqW56CdnlUyNX8D207t7Nc8doCPVYh7Qxg3NeI8mCJ0eg4H9P1+LYgCW2jULmh CZJmuyWFzf6Rp9ee8JR7Tg/mCcdfr9FfnK0DKFcvh8YQx68krMmFHPpEK2jWbIkHLoqi Dz+g== X-Gm-Message-State: AOAM531V75U//z7eUpr0KrmrC2yHHKDqyTEu3UUM1DR8UYSkKTiOr8lf Gpg5DJ2V4mvJDPj/QBXerbHWB452VFU9xnyq X-Received: by 2002:ac2:4119:: with SMTP id b25mr33260389lfi.284.1629880557004; Wed, 25 Aug 2021 01:35:57 -0700 (PDT) Received: from localhost.localdomain (dsl-tkubng21-58c01c-243.dhcp.inet.fi. [88.192.28.243]) by smtp.gmail.com with ESMTPSA id z1sm1295727lfg.216.2021.08.25.01.35.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Aug 2021 01:35:56 -0700 (PDT) From: =?utf-8?q?Martin_Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Wed, 25 Aug 2021 11:35:55 +0300 Message-Id: <20210825083555.1634717-1-martin@martin.st> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] arm: hevc_qpel: Fix the assembly to work with non-multiple of 8 widths 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: =?utf-8?q?Martin_Storsj=C3=B6?= , "J . Dekker" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: hjfs6+pAYF4X This unbreaks the fate-checkasm-hevc_pel test on arm targets. The assembly assumed that the width passed to the DSP functions is a multiple of 8, while the checkasm test used other widths too. This wasn't noticed before, because the hevc_pel checkasm tests (that were added in 9c513edb7999a35ddcc6e3a8d984a96c8fb492a3 in January) weren't run as part of fate until in b492cacffd36ad4cb251ba1f13ac398318ee639a in August. As this hasn't been an issue in practice with actual full decoding tests, it seems like the actual decoder doesn't call these functions with such widths. Therefore, we could alternatively fix the test to only test things that the real decoder does, and this modification could be reverted. Signed-off-by: Martin Storsjö --- libavcodec/arm/hevcdsp_qpel_neon.S | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavcodec/arm/hevcdsp_qpel_neon.S b/libavcodec/arm/hevcdsp_qpel_neon.S index caa6efa766..f71bec05ed 100644 --- a/libavcodec/arm/hevcdsp_qpel_neon.S +++ b/libavcodec/arm/hevcdsp_qpel_neon.S @@ -237,7 +237,7 @@ vld1.8 {d23}, [r2], r3 bne 8b subs r5, #8 - beq 99f + ble 99f mov r4, r12 add r6, #16 mov r0, r6 @@ -280,7 +280,7 @@ vld1.8 {d23}, [r2], r3 bne 8b subs r5, #8 - beq 99f + ble 99f mov r4, r12 add r6, #8 mov r0, r6 @@ -310,7 +310,7 @@ vld1.8 {d23}, [r2], r3 bne 8b subs r5, #8 - beq 99f + ble 99f mov r4, r12 add r6, #8 mov r0, r6 @@ -377,7 +377,7 @@ endfunc vst1.16 {q7}, [r0], r1 bne 8b subs r5, #8 - beq 99f + ble 99f mov r4, r12 add r6, #16 mov r0, r6 @@ -417,7 +417,7 @@ endfunc vst1.8 d0, [r0], r1 bne 8b subs r5, #8 - beq 99f + ble 99f mov r4, r12 add r6, #8 mov r0, r6 @@ -446,7 +446,7 @@ endfunc vst1.8 d0, [r0], r1 bne 8b subs r5, #8 - beq 99f + ble 99f mov r4, r12 add r6, #8 add r10, #16 @@ -533,7 +533,7 @@ endfunc \filterh q7 bne 8b subs r5, #8 - beq 99f + ble 99f mov r4, r12 add r6, #16 mov r0, r6 @@ -594,7 +594,7 @@ endfunc \filterh q7 bne 8b subs r5, #8 - beq 99f + ble 99f mov r4, r12 add r6, #8 mov r0, r6 @@ -641,7 +641,7 @@ endfunc \filterh q7 bne 8b subs r5, #8 - beq 99f + ble 99f mov r4, r12 add r6, #8 mov r0, r6