Mercurial > libavcodec.hg
diff fft.c @ 10153:7a63015e4627 libavcodec
ARM: NEON optimised FFT and MDCT
Vorbis and AC3 ~3x faster.
Parts by Naotoshi Nojiri, naonoj gmail
author | mru |
---|---|
date | Thu, 10 Sep 2009 08:50:03 +0000 |
parents | c5e8a5a044c3 |
children | a349795e8dca |
line wrap: on
line diff
--- a/fft.c Thu Sep 10 08:49:59 2009 +0000 +++ b/fft.c Thu Sep 10 08:50:03 2009 +0000 @@ -64,6 +64,7 @@ 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 @@ 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 @@ 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;