From patchwork Fri Jul 14 16:34:47 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: 42676 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6da1:b0:131:a7d0:bc6d with SMTP id gl33csp3795434pzb; Fri, 14 Jul 2023 09:34:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlGH0B6X8WzBIVonuZhdMv0/7dAqwDjRul7aXhcx6L6Pj4ECPtU2eiP/GDS91kQWubna7Iqs X-Received: by 2002:a17:907:162a:b0:988:d841:7f90 with SMTP id hb42-20020a170907162a00b00988d8417f90mr3897039ejc.27.1689352499583; Fri, 14 Jul 2023 09:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689352499; cv=none; d=google.com; s=arc-20160816; b=y4TQN4/SGBR/9XyOt8AOow7RpQ4NBLPjZ0MKs/vGs4sGRpul8QnzeGe5yrG68VLMZi qlVCs4lAFcmLcGxkDnDmqT4DQyOPjoSP9GXcC5hVs0lgTCaGg0XXe1imXWcAzVc+jBNA LsdiNAmYW9oyF2+qL17ENDa7Px88TrRfyB9qF9vQzbznsDwGTyDbH+N+Sw26nhrcoGtg KpAfmEvDEs413mrihRdoalSNpx/mYpCJDgT6vdzGnJ5OjZNBEw+Y0YAxkDA4BkhFXn3I aTuQJT0dz7Xzl8IckdLDAo8EhN9xFS+Y0btgNlpBi0/Gil2Gv9x5zZsCfMbmlWGbSDLU UubQ== 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=yW29gy2hwUmhXrvnZeW/kbxWzaLcv5ouclRnnthQnG8=; fh=hQcp50obTJ8bXC1it5NuEN23RGKfx0/zZ3s2gmreL+A=; b=SuKm7Q/Qg7NU1oRE3BjLhcfg6WYN8J4fAjuFHGSemjc7kb9grl79jOXA9vK1mY+Ea2 kDBPu3pPqdgAZMK6aF58H620j4yIOOYuAYELBA17foLeY936F8vbs+RpfStFzMdDZIBX mZxCVR8ft5TF7grWEPkVZykDJcIF41lkl0wJcz9pyfETJxq68+7NS1j7qSgly3EdDw/V 3JzAhM2kjt/Vs5WtidBKPNNScgeHxC1a7eQFJYmlzOs/nzcNDcjeNB+f3/3EjEmyDjww Syv21/mwEOxV/E0rna6IPE4a1gOq3yYUBo7Q7mC4/bL2CnCrLb0T8eHMoXyH29kjgK9N FggQ== 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 gl7-20020a170906e0c700b00988919c8a70si9791551ejb.59.2023.07.14.09.34.58; Fri, 14 Jul 2023 09:34:59 -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 3B51068C617; Fri, 14 Jul 2023 19:34:55 +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 1DB2A68C2D7 for ; Fri, 14 Jul 2023 19:34:49 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id AD1C1C000E for ; Fri, 14 Jul 2023 19:34:48 +0300 (EEST) From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 14 Jul 2023 19:34:47 +0300 Message-Id: <20230714163448.31727-1-remi@remlab.net> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] lavc/aarch64: remove bogus HAVE_VFP guard 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: PL7zCwr7/+T3 The IMDCT offset is only relevant for NEON optimisations. There are no VFP optimisations here that would justify the HAVE_VFP flag. In practice, this makes no difference because HAVE_NEON is practically always true for standard Armv8 platforms. --- libavcodec/aarch64/synth_filter_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aarch64/synth_filter_init.c b/libavcodec/aarch64/synth_filter_init.c index 801b46e217..6b6da35b54 100644 --- a/libavcodec/aarch64/synth_filter_init.c +++ b/libavcodec/aarch64/synth_filter_init.c @@ -28,7 +28,7 @@ #include "asm-offsets.h" -#if HAVE_NEON || HAVE_VFP +#if HAVE_NEON AV_CHECK_OFFSET(FFTContext, imdct_half, IMDCT_HALF); #endif From patchwork Fri Jul 14 16:34:48 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: 42677 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6da1:b0:131:a7d0:bc6d with SMTP id gl33csp3795504pzb; Fri, 14 Jul 2023 09:35:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlFjfEsnUNl00e1UJceH151WkK21cjO0mf8xwexU9bXCOB/S/3gjRjwEz2SCdZE3x5laKy6Q X-Received: by 2002:a05:6512:3f10:b0:4f7:6976:2070 with SMTP id y16-20020a0565123f1000b004f769762070mr4326201lfa.40.1689352508126; Fri, 14 Jul 2023 09:35:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689352508; cv=none; d=google.com; s=arc-20160816; b=Nr168TK6XgWQqezJq96MoSyfdeh+6gQuQsbtyrVTjxmN1JNXeK3byi+InHKXkfKsq/ JD8AiEBNFmKgQwCUWV4Yli7q698n8saDYnqn5dH+TOZwNCJts2Di+U4MZeBIkOHhjJ4l FCrv7dmcKATFhWV2uLQJT6Px1+K8IeGs5t9sbZ/yC2Mm0JlWyR1PXucY5zoyfJuCXFzK oFIV7E58MK9RypXu/6YhBH1w7wJf6kvy9PIfrcYNXT8HqyQQZ8fkjgVGwvURANYzbOlR v+L6f/8Nx4xoZzKLl7yPaLOx6L2GwdMi8DTktnPrYaq5owyEinD9XRDokUhzikTmCYhf 5RAw== 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=nGwYcChxbqTWUMXC+xp4iC4l5GYUs4sqiKOojj/pBv4=; fh=hQcp50obTJ8bXC1it5NuEN23RGKfx0/zZ3s2gmreL+A=; b=bjNpFsNpAxJ6m1KZDVdtncXLz6qXDDbosgh7ZPiWxfFFO7iCjVb0l2+u1OZUsWCZpZ Thi0clMPpX8HnfF1D4f2uuMKi+r5FjNInBxPfksirsmSHLR/JBrcpxstIlm6qXXqOD9j UM6cESYlm8loUvjOtl7BKVziNuGyxYDK9KZgO2t6w/P5C8g8uY+NbAevjewhgfilPrwb BxLRQ0bUaUMxmuODDtNXt/6Xy3xhEn0ZKdZNjOQ/j3M6N4hFtQNwOjce5o9jRCaIS6fb oPWDbOUmJvECo3JVqA7iKlo2erMepmIfoN97T1iYtxiWLsRKMcaDWzOvEMGoDZWp2HFQ K9Vw== 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 a17-20020a170906469100b00992a9c402cbsi9431816ejr.20.2023.07.14.09.35.07; Fri, 14 Jul 2023 09:35:08 -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 389A368C62E; Fri, 14 Jul 2023 19:34:58 +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 9609568C2D7 for ; Fri, 14 Jul 2023 19:34:49 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id E2A66C00AE for ; Fri, 14 Jul 2023 19:34:48 +0300 (EEST) From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 14 Jul 2023 19:34:48 +0300 Message-Id: <20230714163448.31727-2-remi@remlab.net> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] aarch64: remove VFP feature check 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: VLUiglN45rlg This is not actually used for anything. The configure check causes the CPU feature flag to be set, but nothing consumes it at all. While AArch64 does have VFP, it is only used for the scalar C code. Conversely, it is still possible to disable VFP, by changing the C compiler flags as before (though that only makes sense for an hypothetical non-standard Armv8 platform without VFP). Note that this retains the "vfp" option flag, for backward compatibility and on the very remote but theoretically possible chance that FFmpeg actually makes use of it in the future. AV_CPU_FLAG_VFP is retained as it is actually used by AArch32. --- configure | 4 +--- libavutil/aarch64/cpu.c | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 0ab0761011..dab3fb9036 100755 --- a/configure +++ b/configure @@ -2668,7 +2668,7 @@ armv6t2_deps="arm" armv8_deps="aarch64" neon_deps_any="aarch64 arm" intrinsics_neon_deps="neon" -vfp_deps_any="aarch64 arm" +vfp_deps="arm" vfpv3_deps="vfp" setend_deps="arm" dotprod_deps="aarch64 neon" @@ -6058,7 +6058,6 @@ if enabled aarch64; then enabled armv8 && check_insn armv8 'prfm pldl1strm, [x0]' # internal assembler in clang 3.3 does not support this instruction enabled neon && check_insn neon 'ext v0.8B, v0.8B, v1.8B, #1' - enabled vfp && check_insn vfp 'fmadd d0, d0, d1, d2' archext_list="dotprod i8mm" enabled dotprod && check_archext_insn dotprod 'udot v0.4s, v0.16b, v0.16b' @@ -7705,7 +7704,6 @@ if enabled x86; then fi if enabled aarch64; then echo "NEON enabled ${neon-no}" - echo "VFP enabled ${vfp-no}" echo "DOTPROD enabled ${dotprod-no}" echo "I8MM enabled ${i8mm-no}" fi diff --git a/libavutil/aarch64/cpu.c b/libavutil/aarch64/cpu.c index a8cb301dd7..2803b31443 100644 --- a/libavutil/aarch64/cpu.c +++ b/libavutil/aarch64/cpu.c @@ -107,8 +107,7 @@ static int detect_flags(void) int ff_get_cpu_flags_aarch64(void) { int flags = AV_CPU_FLAG_ARMV8 * HAVE_ARMV8 | - AV_CPU_FLAG_NEON * HAVE_NEON | - AV_CPU_FLAG_VFP * HAVE_VFP; + AV_CPU_FLAG_NEON * HAVE_NEON; #ifdef __ARM_FEATURE_DOTPROD flags |= AV_CPU_FLAG_DOTPROD;