[FFmpeg-cvslog] arm/fft: disable NEON optimizations for 131072pt transforms

Lynne git at videolan.org
Mon Aug 29 08:13:51 EEST 2022


ffmpeg | branch: master | Lynne <dev at lynne.ee> | Mon Aug 29 07:09:03 2022 +0200| [f99d15cca0f6ceedb4f2f38d67a52dacc9556fc7] | committer: Lynne

arm/fft: disable NEON optimizations for 131072pt transforms

This has been broken since the start, and it was only discovered
when I started testing my replacement for the FFT.
Disable it, since there's no point in fixing slower code that's about
to be removed anyway.

The vfp version is not affected.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f99d15cca0f6ceedb4f2f38d67a52dacc9556fc7
---

 libavcodec/aarch64/fft_init_aarch64.c | 6 ++++--
 libavcodec/arm/fft_init_arm.c         | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/libavcodec/aarch64/fft_init_aarch64.c b/libavcodec/aarch64/fft_init_aarch64.c
index db285205ab..77f5607960 100644
--- a/libavcodec/aarch64/fft_init_aarch64.c
+++ b/libavcodec/aarch64/fft_init_aarch64.c
@@ -38,8 +38,10 @@ av_cold void ff_fft_init_aarch64(FFTContext *s)
     int cpu_flags = av_get_cpu_flags();
 
     if (have_neon(cpu_flags)) {
-        s->fft_permute  = ff_fft_permute_neon;
-        s->fft_calc     = ff_fft_calc_neon;
+        if (s->nbits < 17) {
+            s->fft_permute = ff_fft_permute_neon;
+            s->fft_calc    = ff_fft_calc_neon;
+        }
 #if CONFIG_MDCT
         s->imdct_calc   = ff_imdct_calc_neon;
         s->imdct_half   = ff_imdct_half_neon;
diff --git a/libavcodec/arm/fft_init_arm.c b/libavcodec/arm/fft_init_arm.c
index 331bd65e5c..8ae22dfb4e 100644
--- a/libavcodec/arm/fft_init_arm.c
+++ b/libavcodec/arm/fft_init_arm.c
@@ -48,8 +48,10 @@ av_cold void ff_fft_init_arm(FFTContext *s)
 
     if (have_neon(cpu_flags)) {
 #if CONFIG_FFT
-        s->fft_permute  = ff_fft_permute_neon;
-        s->fft_calc     = ff_fft_calc_neon;
+        if (s->nbits < 17) {
+            s->fft_permute = ff_fft_permute_neon;
+            s->fft_calc    = ff_fft_calc_neon;
+        }
 #endif
 #if CONFIG_MDCT
         s->imdct_calc   = ff_imdct_calc_neon;



More information about the ffmpeg-cvslog mailing list