Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 2/2] aarch64: remove VFP feature check
@ 2023-07-14 16:34 Rémi Denis-Courmont
  2023-07-14 18:18 ` Martin Storsjö
  0 siblings, 1 reply; 2+ messages in thread
From: Rémi Denis-Courmont @ 2023-07-14 16:34 UTC (permalink / raw)
  To: ffmpeg-devel

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;
-- 
2.40.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [FFmpeg-devel] [PATCH 2/2] aarch64: remove VFP feature check
  2023-07-14 16:34 [FFmpeg-devel] [PATCH 2/2] aarch64: remove VFP feature check Rémi Denis-Courmont
@ 2023-07-14 18:18 ` Martin Storsjö
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Storsjö @ 2023-07-14 18:18 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Fri, 14 Jul 2023, Rémi Denis-Courmont wrote:

> 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(-)

LGTM for both patches.

// Martin
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-14 18:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-14 16:34 [FFmpeg-devel] [PATCH 2/2] aarch64: remove VFP feature check Rémi Denis-Courmont
2023-07-14 18:18 ` Martin Storsjö

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git