comparison fft.c @ 10172:eda985c53dba libavcodec

ARM: 10l: fix large FFTs
author mru
date Mon, 14 Sep 2009 21:37:41 +0000
parents 8d369aee733f
children 5cf49858179a
comparison
equal deleted inserted replaced
10171:39a7bdbf0d40 10172:eda985c53dba
62 { 62 {
63 int i, j, m, n; 63 int i, j, m, n;
64 float alpha, c1, s1, s2; 64 float alpha, c1, s1, s2;
65 int split_radix = 1; 65 int split_radix = 1;
66 int av_unused has_vectors; 66 int av_unused has_vectors;
67 int revtab_shift = 0;
68 67
69 if (nbits < 2 || nbits > 16) 68 if (nbits < 2 || nbits > 16)
70 goto fail; 69 goto fail;
71 s->nbits = nbits; 70 s->nbits = nbits;
72 n = 1 << nbits; 71 n = 1 << nbits;
118 s->fft_permute = ff_fft_permute_neon; 117 s->fft_permute = ff_fft_permute_neon;
119 s->fft_calc = ff_fft_calc_neon; 118 s->fft_calc = ff_fft_calc_neon;
120 s->imdct_calc = ff_imdct_calc_neon; 119 s->imdct_calc = ff_imdct_calc_neon;
121 s->imdct_half = ff_imdct_half_neon; 120 s->imdct_half = ff_imdct_half_neon;
122 s->mdct_calc = ff_mdct_calc_neon; 121 s->mdct_calc = ff_mdct_calc_neon;
123 revtab_shift = 3;
124 #endif 122 #endif
125 123
126 if (split_radix) { 124 if (split_radix) {
127 for(j=4; j<=nbits; j++) { 125 for(j=4; j<=nbits; j++) {
128 int m = 1<<j; 126 int m = 1<<j;
132 tab[i] = cos(i*freq); 130 tab[i] = cos(i*freq);
133 for(i=1; i<m/4; i++) 131 for(i=1; i<m/4; i++)
134 tab[m/2-i] = tab[i]; 132 tab[m/2-i] = tab[i];
135 } 133 }
136 for(i=0; i<n; i++) 134 for(i=0; i<n; i++)
137 s->revtab[-split_radix_permutation(i, n, s->inverse) & (n-1)] = 135 s->revtab[-split_radix_permutation(i, n, s->inverse) & (n-1)] = i;
138 i << revtab_shift;
139 s->tmp_buf = av_malloc(n * sizeof(FFTComplex)); 136 s->tmp_buf = av_malloc(n * sizeof(FFTComplex));
140 } else { 137 } else {
141 int np, nblocks, np2, l; 138 int np, nblocks, np2, l;
142 FFTComplex *q; 139 FFTComplex *q;
143 140