Mercurial > libavcodec.hg
comparison fft.c @ 6504:978911ca654f libavcodec
indentation
author | mru |
---|---|
date | Mon, 17 Mar 2008 19:22:31 +0000 |
parents | 311c95dddb16 |
children | fc843d00867c |
comparison
equal
deleted
inserted
replaced
6503:311c95dddb16 | 6504:978911ca654f |
---|---|
85 shuffle = 1; | 85 shuffle = 1; |
86 } | 86 } |
87 #endif | 87 #endif |
88 | 88 |
89 /* compute constant table for HAVE_SSE version */ | 89 /* compute constant table for HAVE_SSE version */ |
90 if (shuffle) { | 90 if (shuffle) { |
91 int np, nblocks, np2, l; | 91 int np, nblocks, np2, l; |
92 FFTComplex *q; | 92 FFTComplex *q; |
93 | 93 |
94 np = 1 << nbits; | 94 np = 1 << nbits; |
95 nblocks = np >> 3; | 95 nblocks = np >> 3; |
96 np2 = np >> 1; | 96 np2 = np >> 1; |
97 s->exptab1 = av_malloc(np * 2 * sizeof(FFTComplex)); | 97 s->exptab1 = av_malloc(np * 2 * sizeof(FFTComplex)); |
98 if (!s->exptab1) | 98 if (!s->exptab1) |
99 goto fail; | 99 goto fail; |
100 q = s->exptab1; | 100 q = s->exptab1; |
101 do { | 101 do { |
102 for(l = 0; l < np2; l += 2 * nblocks) { | 102 for(l = 0; l < np2; l += 2 * nblocks) { |
103 *q++ = s->exptab[l]; | 103 *q++ = s->exptab[l]; |
104 *q++ = s->exptab[l + nblocks]; | 104 *q++ = s->exptab[l + nblocks]; |
105 | 105 |
106 q->re = -s->exptab[l].im; | 106 q->re = -s->exptab[l].im; |
107 q->im = s->exptab[l].re; | 107 q->im = s->exptab[l].re; |
108 q++; | 108 q++; |
109 q->re = -s->exptab[l + nblocks].im; | 109 q->re = -s->exptab[l + nblocks].im; |
110 q->im = s->exptab[l + nblocks].re; | 110 q->im = s->exptab[l + nblocks].re; |
111 q++; | 111 q++; |
112 } | 112 } |
113 nblocks = nblocks >> 1; | 113 nblocks = nblocks >> 1; |
114 } while (nblocks != 0); | 114 } while (nblocks != 0); |
115 av_freep(&s->exptab); | 115 av_freep(&s->exptab); |
116 } | 116 } |
117 | 117 |
118 /* compute bit reverse table */ | 118 /* compute bit reverse table */ |
119 | 119 |
120 for(i=0;i<n;i++) { | 120 for(i=0;i<n;i++) { |
121 m=0; | 121 m=0; |