diff options
author | Måns Rullgård <mans@mansr.com> | 2009-09-10 08:50:03 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2009-09-10 08:50:03 +0000 |
commit | 648d792042cb6d58d032f3ae2518169d91a87274 (patch) | |
tree | a934b90c65f30fede4e46a1e314d7690b354c30b /libavcodec/fft.c | |
parent | 6d9d289e7671df94caba0a1ca1a93c0b12052d32 (diff) | |
download | ffmpeg-648d792042cb6d58d032f3ae2518169d91a87274.tar.gz |
ARM: NEON optimised FFT and MDCT
Vorbis and AC3 ~3x faster.
Parts by Naotoshi Nojiri, naonoj gmail
Originally committed as revision 19806 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/fft.c')
-rw-r--r-- | libavcodec/fft.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/fft.c b/libavcodec/fft.c index ad8d8812d1..c030534e2d 100644 --- a/libavcodec/fft.c +++ b/libavcodec/fft.c @@ -64,6 +64,7 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse) float alpha, c1, s1, s2; int split_radix = 1; int av_unused has_vectors; + int revtab_shift = 0; if (nbits < 2 || nbits > 16) goto fail; @@ -112,6 +113,12 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse) s->fft_calc = ff_fft_calc_altivec; split_radix = 0; } +#elif HAVE_NEON + s->fft_permute = ff_fft_permute_neon; + s->fft_calc = ff_fft_calc_neon; + s->imdct_calc = ff_imdct_calc_neon; + s->imdct_half = ff_imdct_half_neon; + revtab_shift = 3; #endif if (split_radix) { @@ -125,7 +132,8 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse) tab[m/2-i] = tab[i]; } for(i=0; i<n; i++) - s->revtab[-split_radix_permutation(i, n, s->inverse) & (n-1)] = i; + s->revtab[-split_radix_permutation(i, n, s->inverse) & (n-1)] = + i << revtab_shift; s->tmp_buf = av_malloc(n * sizeof(FFTComplex)); } else { int np, nblocks, np2, l; |