Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- saved from url=(0057)http://www.prettyprinter.de/module.php?name=PrettyPrinter -->
- <HTML><HEAD><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></HEAD><BODY>extern void mdct_backward(int n, int *in, int *out);
- extern int ff_mdct_init(MDCTContext *s, int nbits, int inverse);
- extern void ff_imdct_calc(MDCTContext *s, int *output, int *input);
- extern int mdct_init_global(void);
- # 85 "/home/mike/rockbox/mdct/apps/codecs/lib/codeclib.h"
- extern const unsigned char bs_log2_tab[256] ;
- extern const unsigned char bs_clz_tab[256] ;
- # 96 "/home/mike/rockbox/mdct/apps/codecs/lib/codeclib.h"
- static inline unsigned int bs_generic(unsigned int v, int mode)
- {
- # 111 "/home/mike/rockbox/mdct/apps/codecs/lib/codeclib.h"
- const unsigned char *bs_tab;
- unsigned int r;
- unsigned int n = v;
- int inc;
- if (mode & 1)
- {
- bs_tab = bs_clz_tab;
- r = 24;
- inc = -16;
- }
- else {
- bs_tab = bs_log2_tab;
- r = 0;
- inc = 16;
- }
- if (!(mode & 2) && n >
- = 0x10000) {
- n >
- >
- = 16;
- r += inc;
- }
- if (n >
- 0xff) {
- n >
- >
- = 8;
- r += inc / 2;
- }
- # 145 "/home/mike/rockbox/mdct/apps/codecs/lib/codeclib.h"
- n = bs_tab[n];
- r += n;
- if (mode & 1 && mode & 4 && v == 0)
- r = 0;
- return r;
- }
- int codec_init(void);
- void codec_set_replaygain(struct mp3entry* id3);
- # 36 "/home/mike/rockbox/mdct/apps/codecs/lib/fft-ffmpeg.c" 2
- # 44 "/home/mike/rockbox/mdct/apps/codecs/lib/fft-ffmpeg.c"
- static void ff_fft_permute_c(FFTContext *s, FFTComplex *z);
- # 55 "/home/mike/rockbox/mdct/apps/codecs/lib/fft-ffmpeg.c"
- int flattabs[8+16+32+64+128+256+512+1024+2048];
- int * tabstabstabs[] = {
- flattabs, flattabs+8, flattabs+8+16,flattabs+8+16+32, flattabs+8+16+32+64,
- flattabs+8+16+32+64+128, flattabs+8+16+32+64+128+256,
- flattabs+8+16+32+64+128+256+512, flattabs+8+16+32+64+128+256+512+1024
- }
- ;
- int muls, adds;
- # 84 "/home/mike/rockbox/mdct/apps/codecs/lib/fft-ffmpeg.c"
- static FFTSample * ff_cos_16 = ((void *)0);
- static FFTSample * ff_cos_32 = ((void *)0);
- static FFTSample * ff_cos_64 = ((void *)0);
- static FFTSample * ff_cos_128 = ((void *)0);
- static FFTSample * ff_cos_256 = ((void *)0);
- static FFTSample * ff_cos_512 = ((void *)0);
- static FFTSample * ff_cos_1024 = ((void *)0);
- static FFTSample * ff_cos_2048 = ((void *)0);
- static FFTSample * ff_cos_4096 = ((void *)0);
- # 101 "/home/mike/rockbox/mdct/apps/codecs/lib/fft-ffmpeg.c"
- static FFTSample ** const ff_cos_tabs[] = {
- &ff_cos_16, &ff_cos_32, &ff_cos_64, &ff_cos_128, &ff_cos_256, &ff_cos_512, &ff_cos_1024,
- &ff_cos_2048, &ff_cos_4096
- }
- ;
- unsigned short revtab[1<
- <
- 12];
- FFTComplex exptab[1<
- <
- 11], tmp_buf[1<
- <
- 12];
- static int split_radix_permutation(int i, int n, int inverse)
- {
- int m;
- if(n <
- = 2) return i&1;
- m = n >
- >
- 1;
- if(!(i&m)) return split_radix_permutation(i, m, inverse)*2;
- m >
- >
- = 1;
- if(inverse == !(i&m)) return split_radix_permutation(i, m, inverse)*4 + 1;
- else return split_radix_permutation(i, m, inverse)*4 - 1;
- }
- int ff_fft_init(void *arg_s, int nbits, int inverse)
- {
- int i, j, n;
- FFTContext *s = (FFTContext *)(arg_s);
- fixed32 temp, phase;
- if (nbits <
- 2 || nbits >
- 12)
- return -1;
- s->
- nbits = nbits;
- n = 1 <
- <
- nbits;
- s->
- tmp_buf = ((void *)0);
- s->
- exptab = exptab;
- s->
- revtab = revtab;
- s->
- inverse = inverse;
- s->
- fft_permute = ff_fft_permute_c;
- s->
- fft_calc = ff_fft_calc_c;
- s->
- split_radix = 1;
- # 152 "/home/mike/rockbox/mdct/apps/codecs/lib/fft-ffmpeg.c"
- for(j=4; j<=nbits; j++) {
- int m = 1<
- <
- j;
- FFTSample *tab = *(ff_cos_tabs[j-4]);
- if(((void *)0)==tab)
- {
- tab = tabstabstabs[j-4];
- *(ff_cos_tabs[j-4]) = tab;
- for(i=0; i<=m/4; i++) {
- phase = ((i<
- <
- 16) / m)<
- <
- 16;
- fsincos(phase, &temp);
- tab[i] = temp>
- >
- 15;
- }
- for(i=1; i<m/4; i++)
- 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->
- tmp_buf = tmp_buf;
- return 0;
- }
- static void ff_fft_permute_c(FFTContext *s, FFTComplex *z)
- {
- int j, k, np;
- FFTComplex tmp;
- const unsigned short *revtab = s->
- revtab;
- np = 1 <
- <
- s->
- nbits;
- if (s->
- tmp_buf) {
- for(j=0;j<np;j++) s->tmp_buf[revtab[j]] = z[j];
- memcpy(z, s->
- tmp_buf, np * sizeof(FFTComplex));
- return;
- }
- for(j=0;j<np;j++) {
- k = revtab[j];
- if (k <
- j) {
- tmp = z[k];
- z[k] = z[j];
- z[j] = tmp;
- }
- }
- }
- # 292 "/home/mike/rockbox/mdct/apps/codecs/lib/fft-ffmpeg.c"
- static void pass(FFTComplex *z, const FFTSample *wre, unsigned int n){
- FFTSample t1, t2, t3, t4, t5, t6;
- int o1 = 2*n;
- int o2 = 4*n;
- int o3 = 6*n;
- muls += 3;
- const FFTSample *wim = wre+o1;
- n--;
- adds += 2;
- {
- t1 = z[o2].re;
- t2 = z[o2].im;
- t5 = z[o3].re;
- t6 = z[o3].im;
- {
- {
- t3 = t5 - t1;
- t5 = t5 + t1;
- adds += 2;
- }
- ;
- {
- z[o2].re = z[0].re - t5;
- z[0].re = z[0].re + t5;
- adds += 2;
- }
- ;
- {
- z[o3].im = z[o1].im - t3;
- z[o1].im = z[o1].im + t3;
- adds += 2;
- }
- ;
- {
- t4 = t2 - t6;
- t6 = t2 + t6;
- adds += 2;
- }
- ;
- {
- z[o3].re = z[o1].re - t4;
- z[o1].re = z[o1].re + t4;
- adds += 2;
- }
- ;
- {
- z[o2].im = z[0].im - t6;
- z[0].im = z[0].im + t6;
- adds += 2;
- }
- ;
- }
- }
- ;
- {
- t1 = fixmul32(z[o2+1].re, wre[1]) + fixmul32(z[o2+1].im, wim[-1]);
- t2 = fixmul32(z[o2+1].im, wre[1]) - fixmul32(z[o2+1].re, wim[-1]);
- t5 = fixmul32(z[o3+1].re, wre[1]) - fixmul32(z[o3+1].im, wim[-1]);
- t6 = fixmul32(z[o3+1].im, wre[1]) + fixmul32(z[o3+1].re, wim[-1]);
- muls += 8;
- {
- {
- t3 = t5 - t1;
- t5 = t5 + t1;
- adds += 2;
- }
- ;
- {
- z[o2+1].re = z[1].re - t5;
- z[1].re = z[1].re + t5;
- adds += 2;
- }
- ;
- {
- z[o3+1].im = z[o1+1].im - t3;
- z[o1+1].im = z[o1+1].im + t3;
- adds += 2;
- }
- ;
- {
- t4 = t2 - t6;
- t6 = t2 + t6;
- adds += 2;
- }
- ;
- {
- z[o3+1].re = z[o1+1].re - t4;
- z[o1+1].re = z[o1+1].re + t4;
- adds += 2;
- }
- ;
- {
- z[o2+1].im = z[1].im - t6;
- z[1].im = z[1].im + t6;
- adds += 2;
- }
- ;
- }
- }
- ;
- do {
- z += 2;
- wre += 2;
- wim -= 2;
- {
- t1 = fixmul32(z[o2].re, wre[0]) + fixmul32(z[o2].im, wim[0]);
- t2 = fixmul32(z[o2].im, wre[0]) - fixmul32(z[o2].re, wim[0]);
- t5 = fixmul32(z[o3].re, wre[0]) - fixmul32(z[o3].im, wim[0]);
- t6 = fixmul32(z[o3].im, wre[0]) + fixmul32(z[o3].re, wim[0]);
- muls += 8;
- {
- {
- t3 = t5 - t1;
- t5 = t5 + t1;
- adds += 2;
- }
- ;
- {
- z[o2].re = z[0].re - t5;
- z[0].re = z[0].re + t5;
- adds += 2;
- }
- ;
- {
- z[o3].im = z[o1].im - t3;
- z[o1].im = z[o1].im + t3;
- adds += 2;
- }
- ;
- {
- t4 = t2 - t6;
- t6 = t2 + t6;
- adds += 2;
- }
- ;
- {
- z[o3].re = z[o1].re - t4;
- z[o1].re = z[o1].re + t4;
- adds += 2;
- }
- ;
- {
- z[o2].im = z[0].im - t6;
- z[0].im = z[0].im + t6;
- adds += 2;
- }
- ;
- }
- }
- ;
- {
- t1 = fixmul32(z[o2+1].re, wre[1]) + fixmul32(z[o2+1].im, wim[-1]);
- t2 = fixmul32(z[o2+1].im, wre[1]) - fixmul32(z[o2+1].re, wim[-1]);
- t5 = fixmul32(z[o3+1].re, wre[1]) - fixmul32(z[o3+1].im, wim[-1]);
- t6 = fixmul32(z[o3+1].im, wre[1]) + fixmul32(z[o3+1].re, wim[-1]);
- muls += 8;
- {
- {
- t3 = t5 - t1;
- t5 = t5 + t1;
- adds += 2;
- }
- ;
- {
- z[o2+1].re = z[1].re - t5;
- z[1].re = z[1].re + t5;
- adds += 2;
- }
- ;
- {
- z[o3+1].im = z[o1+1].im - t3;
- z[o1+1].im = z[o1+1].im + t3;
- adds += 2;
- }
- ;
- {
- t4 = t2 - t6;
- t6 = t2 + t6;
- adds += 2;
- }
- ;
- {
- z[o3+1].re = z[o1+1].re - t4;
- z[o1+1].re = z[o1+1].re + t4;
- adds += 2;
- }
- ;
- {
- z[o2+1].im = z[1].im - t6;
- z[1].im = z[1].im + t6;
- adds += 2;
- }
- ;
- }
- }
- ;
- adds += 4;
- }
- while(--n);
- }
- static void pass_big(FFTComplex *z, const FFTSample *wre, unsigned int n){
- FFTSample t1, t2, t3, t4, t5, t6;
- int o1 = 2*n;
- int o2 = 4*n;
- int o3 = 6*n;
- muls += 3;
- const FFTSample *wim = wre+o1;
- n--;
- adds += 2;
- {
- t1 = z[o2].re;
- t2 = z[o2].im;
- t5 = z[o3].re;
- t6 = z[o3].im;
- {
- FFTSample r0=z[0].re, i0=z[0].im, r1=z[o1].re, i1=z[o1].im;
- {
- t3 = t5 - t1;
- t5 = t5 + t1;
- adds += 2;
- }
- ;
- {
- z[o2].re = r0 - t5;
- z[0].re = r0 + t5;
- adds += 2;
- }
- ;
- {
- z[o3].im = i1 - t3;
- z[o1].im = i1 + t3;
- adds += 2;
- }
- ;
- {
- t4 = t2 - t6;
- t6 = t2 + t6;
- adds += 2;
- }
- ;
- {
- z[o3].re = r1 - t4;
- z[o1].re = r1 + t4;
- adds += 2;
- }
- ;
- {
- z[o2].im = i0 - t6;
- z[0].im = i0 + t6;
- adds += 2;
- }
- ;
- }
- }
- ;
- {
- t1 = fixmul32(z[o2+1].re, wre[1]) + fixmul32(z[o2+1].im, wim[-1]);
- t2 = fixmul32(z[o2+1].im, wre[1]) - fixmul32(z[o2+1].re, wim[-1]);
- t5 = fixmul32(z[o3+1].re, wre[1]) - fixmul32(z[o3+1].im, wim[-1]);
- t6 = fixmul32(z[o3+1].im, wre[1]) + fixmul32(z[o3+1].re, wim[-1]);
- muls += 8;
- {
- FFTSample r0=z[1].re, i0=z[1].im, r1=z[o1+1].re, i1=z[o1+1].im;
- {
- t3 = t5 - t1;
- t5 = t5 + t1;
- adds += 2;
- }
- ;
- {
- z[o2+1].re = r0 - t5;
- z[1].re = r0 + t5;
- adds += 2;
- }
- ;
- {
- z[o3+1].im = i1 - t3;
- z[o1+1].im = i1 + t3;
- adds += 2;
- }
- ;
- {
- t4 = t2 - t6;
- t6 = t2 + t6;
- adds += 2;
- }
- ;
- {
- z[o3+1].re = r1 - t4;
- z[o1+1].re = r1 + t4;
- adds += 2;
- }
- ;
- {
- z[o2+1].im = i0 - t6;
- z[1].im = i0 + t6;
- adds += 2;
- }
- ;
- }
- }
- ;
- do {
- z += 2;
- wre += 2;
- wim -= 2;
- {
- t1 = fixmul32(z[o2].re, wre[0]) + fixmul32(z[o2].im, wim[0]);
- t2 = fixmul32(z[o2].im, wre[0]) - fixmul32(z[o2].re, wim[0]);
- t5 = fixmul32(z[o3].re, wre[0]) - fixmul32(z[o3].im, wim[0]);
- t6 = fixmul32(z[o3].im, wre[0]) + fixmul32(z[o3].re, wim[0]);
- muls += 8;
- {
- FFTSample r0=z[0].re, i0=z[0].im, r1=z[o1].re, i1=z[o1].im;
- {
- t3 = t5 - t1;
- t5 = t5 + t1;
- adds += 2;
- }
- ;
- {
- z[o2].re = r0 - t5;
- z[0].re = r0 + t5;
- adds += 2;
- }
- ;
- {
- z[o3].im = i1 - t3;
- z[o1].im = i1 + t3;
- adds += 2;
- }
- ;
- {
- t4 = t2 - t6;
- t6 = t2 + t6;
- adds += 2;
- }
- ;
- {
- z[o3].re = r1 - t4;
- z[o1].re = r1 + t4;
- adds += 2;
- }
- ;
- {
- z[o2].im = i0 - t6;
- z[0].im = i0 + t6;
- adds += 2;
- }
- ;
- }
- }
- ;
- {
- t1 = fixmul32(z[o2+1].re, wre[1]) + fixmul32(z[o2+1].im, wim[-1]);
- t2 = fixmul32(z[o2+1].im, wre[1]) - fixmul32(z[o2+1].re, wim[-1]);
- t5 = fixmul32(z[o3+1].re, wre[1]) - fixmul32(z[o3+1].im, wim[-1]);
- t6 = fixmul32(z[o3+1].im, wre[1]) + fixmul32(z[o3+1].re, wim[-1]);
- muls += 8;
- {
- FFTSample r0=z[1].re, i0=z[1].im, r1=z[o1+1].re, i1=z[o1+1].im;
- {
- t3 = t5 - t1;
- t5 = t5 + t1;
- adds += 2;
- }
- ;
- {
- z[o2+1].re = r0 - t5;
- z[1].re = r0 + t5;
- adds += 2;
- }
- ;
- {
- z[o3+1].im = i1 - t3;
- z[o1+1].im = i1 + t3;
- adds += 2;
- }
- ;
- {
- t4 = t2 - t6;
- t6 = t2 + t6;
- adds += 2;
- }
- ;
- {
- z[o3+1].re = r1 - t4;
- z[o1+1].re = r1 + t4;
- adds += 2;
- }
- ;
- {
- z[o2+1].im = i0 - t6;
- z[1].im = i0 + t6;
- adds += 2;
- }
- ;
- }
- }
- ;
- adds += 4;
- }
- while(--n);
- }
- # 306 "/home/mike/rockbox/mdct/apps/codecs/lib/fft-ffmpeg.c"
- static void fft4(FFTComplex *z)
- {
- FFTSample t1, t2, t3, t4, t5, t6, t7, t8;
- {
- t3 = z[0].re - z[1].re;
- t1 = z[0].re + z[1].re;
- adds += 2;
- }
- ;
- {
- t8 = z[3].re - z[2].re;
- t6 = z[3].re + z[2].re;
- adds += 2;
- }
- ;
- {
- z[2].re = t1 - t6;
- z[0].re = t1 + t6;
- adds += 2;
- }
- ;
- {
- t4 = z[0].im - z[1].im;
- t2 = z[0].im + z[1].im;
- adds += 2;
- }
- ;
- {
- t7 = z[2].im - z[3].im;
- t5 = z[2].im + z[3].im;
- adds += 2;
- }
- ;
- {
- z[3].im = t4 - t8;
- z[1].im = t4 + t8;
- adds += 2;
- }
- ;
- {
- z[3].re = t3 - t7;
- z[1].re = t3 + t7;
- adds += 2;
- }
- ;
- {
- z[2].im = t2 - t5;
- z[0].im = t2 + t5;
- adds += 2;
- }
- ;
- }
- static void fft8(FFTComplex *z)
- {
- FFTSample t1, t2, t3, t4, t5, t6, t7, t8;
- fft4(z);
- {
- t1 = z[4].re - -z[5].re;
- z[5].re = z[4].re + -z[5].re;
- adds += 2;
- }
- ;
- {
- t2 = z[4].im - -z[5].im;
- z[5].im = z[4].im + -z[5].im;
- adds += 2;
- }
- ;
- {
- t3 = z[6].re - -z[7].re;
- z[7].re = z[6].re + -z[7].re;
- adds += 2;
- }
- ;
- {
- t4 = z[6].im - -z[7].im;
- z[7].im = z[6].im + -z[7].im;
- adds += 2;
- }
- ;
- {
- t8 = t3 - t1;
- t1 = t3 + t1;
- adds += 2;
- }
- ;
- {
- t7 = t2 - t4;
- t2 = t2 + t4;
- adds += 2;
- }
- ;
- {
- z[4].re = z[0].re - t1;
- z[0].re = z[0].re + t1;
- adds += 2;
- }
- ;
- {
- z[4].im = z[0].im - t2;
- z[0].im = z[0].im + t2;
- adds += 2;
- }
- ;
- {
- z[6].re = z[2].re - t7;
- z[2].re = z[2].re + t7;
- adds += 2;
- }
- ;
- {
- z[6].im = z[2].im - t8;
- z[2].im = z[2].im + t8;
- adds += 2;
- }
- ;
- {
- t3 = fixmul32(z[5].re, 0x0000b505);
- t4 = fixmul32(z[5].im, 0x0000b505);
- t7 = fixmul32(z[7].re, 0x0000b505);
- t8 = fixmul32(z[7].im, 0x0000b505);
- t1 = t3 + t4;
- t2 = t4 - t3;
- t5 = t7 - t8;
- t6 = t8 + t7;
- {
- FFTSample r0=z[1].re, i0=z[1].im, r1=z[3].re, i1=z[3].im;
- {
- t3 = t5 - t1;
- t5 = t5 + t1;
- adds += 2;
- }
- ;
- {
- z[5].re = r0 - t5;
- z[1].re = r0 + t5;
- adds += 2;
- }
- ;
- {
- z[7].im = i1 - t3;
- z[3].im = i1 + t3;
- adds += 2;
- }
- ;
- {
- t4 = t2 - t6;
- t6 = t2 + t6;
- adds += 2;
- }
- ;
- {
- z[7].re = r1 - t4;
- z[3].re = r1 + t4;
- adds += 2;
- }
- ;
- {
- z[5].im = i0 - t6;
- z[1].im = i0 + t6;
- adds += 2;
- }
- ;
- }
- }
- }
- static void fft16(FFTComplex *z)
- {
- FFTSample t1, t2, t3, t4, t5, t6, t7, t8;
- fft8(z);
- fft4(z+8);
- fft4(z+12);
- {
- t1 = z[8].re;
- t2 = z[8].im;
- t5 = z[12].re;
- t6 = z[12].im;
- {
- FFTSample r0=z[0].re, i0=z[0].im, r1=z[4].re, i1=z[4].im;
- {
- t3 = t5 - t1;
- t5 = t5 + t1;
- adds += 2;
- }
- ;
- {
- z[8].re = r0 - t5;
- z[0].re = r0 + t5;
- adds += 2;
- }
- ;
- {
- z[12].im = i1 - t3;
- z[4].im = i1 + t3;
- adds += 2;
- }
- ;
- {
- t4 = t2 - t6;
- t6 = t2 + t6;
- adds += 2;
- }
- ;
- {
- z[12].re = r1 - t4;
- z[4].re = r1 + t4;
- adds += 2;
- }
- ;
- {
- z[8].im = i0 - t6;
- z[0].im = i0 + t6;
- adds += 2;
- }
- ;
- }
- }
- ;
- {
- t3 = fixmul32(z[10].re, 0x0000b505);
- t4 = fixmul32(z[10].im, 0x0000b505);
- t7 = fixmul32(z[14].re, 0x0000b505);
- t8 = fixmul32(z[14].im, 0x0000b505);
- t1 = t3 + t4;
- t2 = t4 - t3;
- t5 = t7 - t8;
- t6 = t8 + t7;
- {
- FFTSample r0=z[2].re, i0=z[2].im, r1=z[6].re, i1=z[6].im;
- {
- t3 = t5 - t1;
- t5 = t5 + t1;
- adds += 2;
- }
- ;
- {
- z[10].re = r0 - t5;
- z[2].re = r0 + t5;
- adds += 2;
- }
- ;
- {
- z[14].im = i1 - t3;
- z[6].im = i1 + t3;
- adds += 2;
- }
- ;
- {
- t4 = t2 - t6;
- t6 = t2 + t6;
- adds += 2;
- }
- ;
- {
- z[14].re = r1 - t4;
- z[6].re = r1 + t4;
- adds += 2;
- }
- ;
- {
- z[10].im = i0 - t6;
- z[2].im = i0 + t6;
- adds += 2;
- }
- ;
- }
- }
- ;
- {
- t1 = fixmul32(z[9].re, ff_cos_16[1]) + fixmul32(z[9].im, ff_cos_16[3]);
- t2 = fixmul32(z[9].im, ff_cos_16[1]) - fixmul32(z[9].re, ff_cos_16[3]);
- t5 = fixmul32(z[13].re, ff_cos_16[1]) - fixmul32(z[13].im, ff_cos_16[3]);
- t6 = fixmul32(z[13].im, ff_cos_16[1]) + fixmul32(z[13].re, ff_cos_16[3]);
- muls += 8;
- {
- FFTSample r0=z[1].re, i0=z[1].im, r1=z[5].re, i1=z[5].im;
- {
- t3 = t5 - t1;
- t5 = t5 + t1;
- adds += 2;
- }
- ;
- {
- z[9].re = r0 - t5;
- z[1].re = r0 + t5;
- adds += 2;
- }
- ;
- {
- z[13].im = i1 - t3;
- z[5].im = i1 + t3;
- adds += 2;
- }
- ;
- {
- t4 = t2 - t6;
- t6 = t2 + t6;
- adds += 2;
- }
- ;
- {
- z[13].re = r1 - t4;
- z[5].re = r1 + t4;
- adds += 2;
- }
- ;
- {
- z[9].im = i0 - t6;
- z[1].im = i0 + t6;
- adds += 2;
- }
- ;
- }
- }
- ;
- {
- t1 = fixmul32(z[11].re, ff_cos_16[3]) + fixmul32(z[11].im, ff_cos_16[1]);
- t2 = fixmul32(z[11].im, ff_cos_16[3]) - fixmul32(z[11].re, ff_cos_16[1]);
- t5 = fixmul32(z[15].re, ff_cos_16[3]) - fixmul32(z[15].im, ff_cos_16[1]);
- t6 = fixmul32(z[15].im, ff_cos_16[3]) + fixmul32(z[15].re, ff_cos_16[1]);
- muls += 8;
- {
- FFTSample r0=z[3].re, i0=z[3].im, r1=z[7].re, i1=z[7].im;
- {
- t3 = t5 - t1;
- t5 = t5 + t1;
- adds += 2;
- }
- ;
- {
- z[11].re = r0 - t5;
- z[3].re = r0 + t5;
- adds += 2;
- }
- ;
- {
- z[15].im = i1 - t3;
- z[7].im = i1 + t3;
- adds += 2;
- }
- ;
- {
- t4 = t2 - t6;
- t6 = t2 + t6;
- adds += 2;
- }
- ;
- {
- z[15].re = r1 - t4;
- z[7].re = r1 + t4;
- adds += 2;
- }
- ;
- {
- z[11].im = i0 - t6;
- z[3].im = i0 + t6;
- adds += 2;
- }
- ;
- }
- }
- ;
- }
- static void fft32(FFTComplex *z){
- fft16(z);
- fft8(z+8*2);
- fft8(z+8*3);
- pass(z,ff_cos_32,8/2);
- }
- static void fft64(FFTComplex *z){
- fft32(z);
- fft16(z+16*2);
- fft16(z+16*3);
- pass(z,ff_cos_64,16/2);
- }
- static void fft128(FFTComplex *z){
- fft64(z);
- fft32(z+32*2);
- fft32(z+32*3);
- pass(z,ff_cos_128,32/2);
- }
- static void fft256(FFTComplex *z){
- fft128(z);
- fft64(z+64*2);
- fft64(z+64*3);
- pass(z,ff_cos_256,64/2);
- }
- static void fft512(FFTComplex *z){
- fft256(z);
- fft128(z+128*2);
- fft128(z+128*3);
- pass(z,ff_cos_512,128/2);
- }
- static void fft1024(FFTComplex *z){
- fft512(z);
- fft256(z+256*2);
- fft256(z+256*3);
- pass_big(z,ff_cos_1024,256/2);
- }
- static void fft2048(FFTComplex *z){
- fft1024(z);
- fft512(z+512*2);
- fft512(z+512*3);
- pass_big(z,ff_cos_2048,512/2);
- }
- static void fft4096(FFTComplex *z){
- fft2048(z);
- fft1024(z+1024*2);
- fft1024(z+1024*3);
- pass_big(z,ff_cos_4096,1024/2);
- }
- static void (*fft_dispatch[])(FFTComplex*) = {
- fft4, fft8, fft16, fft32, fft64, fft128, fft256, fft512, fft1024,
- fft2048, fft4096
- }
- ;
- void ff_fft_calc_c(FFTContext *s, FFTComplex *z)
- {
- fft_dispatch[s->
- nbits-2](z);
- }</BODY></HTML>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement