annotate liba52/imdct.c @ 368:1db6950d81ea libavcodec

- Segfault fixed when liba52 dynamic library isn't found.
author pulento
date Mon, 06 May 2002 21:34:50 +0000
parents 207cc56d18f8
children dd4f4c3d7171
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
332
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
1 /*
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
2 * imdct.c
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
3 * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org>
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
4 * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
5 *
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
6 * The ifft algorithms in this file have been largely inspired by Dan
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
7 * Bernstein's work, djbfft, available at http://cr.yp.to/djbfft.html
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
8 *
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
9 * This file is part of a52dec, a free ATSC A-52 stream decoder.
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
10 * See http://liba52.sourceforge.net/ for updates.
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
11 *
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
12 * a52dec is free software; you can redistribute it and/or modify
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
15 * (at your option) any later version.
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
16 *
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
17 * a52dec is distributed in the hope that it will be useful,
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
20 * GNU General Public License for more details.
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
21 *
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
25 */
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
26
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
27 #include "config.h"
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
28
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
29 #include <math.h>
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
30 #include <stdio.h>
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
31 #ifdef LIBA52_DJBFFT
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
32 #include <fftc4.h>
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
33 #endif
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
34 #ifndef M_PI
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
35 #define M_PI 3.1415926535897932384626433832795029
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
36 #endif
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
37 #include <inttypes.h>
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
38
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
39 #include "a52.h"
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
40 #include "a52_internal.h"
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
41 #include "mm_accel.h"
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
42
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
43 typedef struct complex_s {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
44 sample_t real;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
45 sample_t imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
46 } complex_t;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
47
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
48 static complex_t buf[128];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
49
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
50 static uint8_t fftorder[] = {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
51 0,128, 64,192, 32,160,224, 96, 16,144, 80,208,240,112, 48,176,
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
52 8,136, 72,200, 40,168,232,104,248,120, 56,184, 24,152,216, 88,
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
53 4,132, 68,196, 36,164,228,100, 20,148, 84,212,244,116, 52,180,
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
54 252,124, 60,188, 28,156,220, 92, 12,140, 76,204,236,108, 44,172,
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
55 2,130, 66,194, 34,162,226, 98, 18,146, 82,210,242,114, 50,178,
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
56 10,138, 74,202, 42,170,234,106,250,122, 58,186, 26,154,218, 90,
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
57 254,126, 62,190, 30,158,222, 94, 14,142, 78,206,238,110, 46,174,
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
58 6,134, 70,198, 38,166,230,102,246,118, 54,182, 22,150,214, 86
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
59 };
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
60
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
61 /* Root values for IFFT */
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
62 static sample_t roots16[3];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
63 static sample_t roots32[7];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
64 static sample_t roots64[15];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
65 static sample_t roots128[31];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
66
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
67 /* Twiddle factors for IMDCT */
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
68 static complex_t pre1[128];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
69 static complex_t post1[64];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
70 static complex_t pre2[64];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
71 static complex_t post2[32];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
72
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
73 static sample_t a52_imdct_window[256];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
74
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
75 static void (* ifft128) (complex_t * buf);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
76 static void (* ifft64) (complex_t * buf);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
77
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
78 static inline void ifft2 (complex_t * buf)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
79 {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
80 double r, i;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
81
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
82 r = buf[0].real;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
83 i = buf[0].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
84 buf[0].real += buf[1].real;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
85 buf[0].imag += buf[1].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
86 buf[1].real = r - buf[1].real;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
87 buf[1].imag = i - buf[1].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
88 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
89
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
90 static inline void ifft4 (complex_t * buf)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
91 {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
92 double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
93
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
94 tmp1 = buf[0].real + buf[1].real;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
95 tmp2 = buf[3].real + buf[2].real;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
96 tmp3 = buf[0].imag + buf[1].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
97 tmp4 = buf[2].imag + buf[3].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
98 tmp5 = buf[0].real - buf[1].real;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
99 tmp6 = buf[0].imag - buf[1].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
100 tmp7 = buf[2].imag - buf[3].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
101 tmp8 = buf[3].real - buf[2].real;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
102
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
103 buf[0].real = tmp1 + tmp2;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
104 buf[0].imag = tmp3 + tmp4;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
105 buf[2].real = tmp1 - tmp2;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
106 buf[2].imag = tmp3 - tmp4;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
107 buf[1].real = tmp5 + tmp7;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
108 buf[1].imag = tmp6 + tmp8;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
109 buf[3].real = tmp5 - tmp7;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
110 buf[3].imag = tmp6 - tmp8;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
111 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
112
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
113 /* the basic split-radix ifft butterfly */
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
114
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
115 #define BUTTERFLY(a0,a1,a2,a3,wr,wi) do { \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
116 tmp5 = a2.real * wr + a2.imag * wi; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
117 tmp6 = a2.imag * wr - a2.real * wi; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
118 tmp7 = a3.real * wr - a3.imag * wi; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
119 tmp8 = a3.imag * wr + a3.real * wi; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
120 tmp1 = tmp5 + tmp7; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
121 tmp2 = tmp6 + tmp8; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
122 tmp3 = tmp6 - tmp8; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
123 tmp4 = tmp7 - tmp5; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
124 a2.real = a0.real - tmp1; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
125 a2.imag = a0.imag - tmp2; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
126 a3.real = a1.real - tmp3; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
127 a3.imag = a1.imag - tmp4; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
128 a0.real += tmp1; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
129 a0.imag += tmp2; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
130 a1.real += tmp3; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
131 a1.imag += tmp4; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
132 } while (0)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
133
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
134 /* split-radix ifft butterfly, specialized for wr=1 wi=0 */
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
135
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
136 #define BUTTERFLY_ZERO(a0,a1,a2,a3) do { \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
137 tmp1 = a2.real + a3.real; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
138 tmp2 = a2.imag + a3.imag; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
139 tmp3 = a2.imag - a3.imag; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
140 tmp4 = a3.real - a2.real; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
141 a2.real = a0.real - tmp1; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
142 a2.imag = a0.imag - tmp2; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
143 a3.real = a1.real - tmp3; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
144 a3.imag = a1.imag - tmp4; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
145 a0.real += tmp1; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
146 a0.imag += tmp2; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
147 a1.real += tmp3; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
148 a1.imag += tmp4; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
149 } while (0)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
150
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
151 /* split-radix ifft butterfly, specialized for wr=wi */
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
152
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
153 #define BUTTERFLY_HALF(a0,a1,a2,a3,w) do { \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
154 tmp5 = (a2.real + a2.imag) * w; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
155 tmp6 = (a2.imag - a2.real) * w; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
156 tmp7 = (a3.real - a3.imag) * w; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
157 tmp8 = (a3.imag + a3.real) * w; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
158 tmp1 = tmp5 + tmp7; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
159 tmp2 = tmp6 + tmp8; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
160 tmp3 = tmp6 - tmp8; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
161 tmp4 = tmp7 - tmp5; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
162 a2.real = a0.real - tmp1; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
163 a2.imag = a0.imag - tmp2; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
164 a3.real = a1.real - tmp3; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
165 a3.imag = a1.imag - tmp4; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
166 a0.real += tmp1; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
167 a0.imag += tmp2; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
168 a1.real += tmp3; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
169 a1.imag += tmp4; \
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
170 } while (0)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
171
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
172 static inline void ifft8 (complex_t * buf)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
173 {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
174 double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
175
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
176 ifft4 (buf);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
177 ifft2 (buf + 4);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
178 ifft2 (buf + 6);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
179 BUTTERFLY_ZERO (buf[0], buf[2], buf[4], buf[6]);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
180 BUTTERFLY_HALF (buf[1], buf[3], buf[5], buf[7], roots16[1]);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
181 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
182
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
183 static void ifft_pass (complex_t * buf, sample_t * weight, int n)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
184 {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
185 complex_t * buf1;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
186 complex_t * buf2;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
187 complex_t * buf3;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
188 double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
189 int i;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
190
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
191 buf++;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
192 buf1 = buf + n;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
193 buf2 = buf + 2 * n;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
194 buf3 = buf + 3 * n;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
195
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
196 BUTTERFLY_ZERO (buf[-1], buf1[-1], buf2[-1], buf3[-1]);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
197
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
198 i = n - 1;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
199
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
200 do {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
201 BUTTERFLY (buf[0], buf1[0], buf2[0], buf3[0], weight[n], weight[2*i]);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
202 buf++;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
203 buf1++;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
204 buf2++;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
205 buf3++;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
206 weight++;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
207 } while (--i);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
208 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
209
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
210 static void ifft16 (complex_t * buf)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
211 {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
212 ifft8 (buf);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
213 ifft4 (buf + 8);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
214 ifft4 (buf + 12);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
215 ifft_pass (buf, roots16 - 4, 4);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
216 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
217
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
218 static void ifft32 (complex_t * buf)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
219 {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
220 ifft16 (buf);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
221 ifft8 (buf + 16);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
222 ifft8 (buf + 24);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
223 ifft_pass (buf, roots32 - 8, 8);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
224 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
225
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
226 static void ifft64_c (complex_t * buf)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
227 {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
228 ifft32 (buf);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
229 ifft16 (buf + 32);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
230 ifft16 (buf + 48);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
231 ifft_pass (buf, roots64 - 16, 16);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
232 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
233
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
234 static void ifft128_c (complex_t * buf)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
235 {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
236 ifft32 (buf);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
237 ifft16 (buf + 32);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
238 ifft16 (buf + 48);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
239 ifft_pass (buf, roots64 - 16, 16);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
240
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
241 ifft32 (buf + 64);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
242 ifft32 (buf + 96);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
243 ifft_pass (buf, roots128 - 32, 32);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
244 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
245
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
246 void a52_imdct_512 (sample_t * data, sample_t * delay, sample_t bias)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
247 {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
248 int i, k;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
249 sample_t t_r, t_i, a_r, a_i, b_r, b_i, w_1, w_2;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
250 const sample_t * window = a52_imdct_window;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
251
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
252 for (i = 0; i < 128; i++) {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
253 k = fftorder[i];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
254 t_r = pre1[i].real;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
255 t_i = pre1[i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
256
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
257 buf[i].real = t_i * data[255-k] + t_r * data[k];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
258 buf[i].imag = t_r * data[255-k] - t_i * data[k];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
259 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
260
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
261 ifft128 (buf);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
262
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
263 /* Post IFFT complex multiply plus IFFT complex conjugate*/
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
264 /* Window and convert to real valued signal */
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
265 for (i = 0; i < 64; i++) {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
266 /* y[n] = z[n] * (xcos1[n] + j * xsin1[n]) ; */
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
267 t_r = post1[i].real;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
268 t_i = post1[i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
269
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
270 a_r = t_r * buf[i].real + t_i * buf[i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
271 a_i = t_i * buf[i].real - t_r * buf[i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
272 b_r = t_i * buf[127-i].real + t_r * buf[127-i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
273 b_i = t_r * buf[127-i].real - t_i * buf[127-i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
274
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
275 w_1 = window[2*i];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
276 w_2 = window[255-2*i];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
277 data[2*i] = delay[2*i] * w_2 - a_r * w_1 + bias;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
278 data[255-2*i] = delay[2*i] * w_1 + a_r * w_2 + bias;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
279 delay[2*i] = a_i;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
280
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
281 w_1 = window[2*i+1];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
282 w_2 = window[254-2*i];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
283 data[2*i+1] = delay[2*i+1] * w_2 + b_r * w_1 + bias;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
284 data[254-2*i] = delay[2*i+1] * w_1 - b_r * w_2 + bias;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
285 delay[2*i+1] = b_i;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
286 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
287 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
288
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
289 void a52_imdct_256(sample_t data[],sample_t delay[],sample_t bias)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
290 {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
291 int i, k;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
292 sample_t t_r, t_i, a_r, a_i, b_r, b_i, c_r, c_i, d_r, d_i, w_1, w_2;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
293 complex_t * buf1, * buf2;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
294 const sample_t * window = a52_imdct_window;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
295
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
296 buf1 = &buf[0];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
297 buf2 = &buf[64];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
298
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
299 /* Pre IFFT complex multiply plus IFFT cmplx conjugate */
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
300 for (i = 0; i < 64; i++) {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
301 k = fftorder[i];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
302 t_r = pre2[i].real;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
303 t_i = pre2[i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
304
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
305 buf1[i].real = t_i * data[254-k] + t_r * data[k];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
306 buf1[i].imag = t_r * data[254-k] - t_i * data[k];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
307
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
308 buf2[i].real = t_i * data[255-k] + t_r * data[k+1];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
309 buf2[i].imag = t_r * data[255-k] - t_i * data[k+1];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
310 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
311
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
312 ifft64 (buf1);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
313 ifft64 (buf2);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
314
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
315 /* Post IFFT complex multiply */
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
316 /* Window and convert to real valued signal */
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
317 for (i = 0; i < 32; i++) {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
318 /* y1[n] = z1[n] * (xcos2[n] + j * xs in2[n]) ; */
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
319 t_r = post2[i].real;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
320 t_i = post2[i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
321
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
322 a_r = t_r * buf1[i].real + t_i * buf1[i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
323 a_i = t_i * buf1[i].real - t_r * buf1[i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
324 b_r = t_i * buf1[63-i].real + t_r * buf1[63-i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
325 b_i = t_r * buf1[63-i].real - t_i * buf1[63-i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
326
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
327 c_r = t_r * buf2[i].real + t_i * buf2[i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
328 c_i = t_i * buf2[i].real - t_r * buf2[i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
329 d_r = t_i * buf2[63-i].real + t_r * buf2[63-i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
330 d_i = t_r * buf2[63-i].real - t_i * buf2[63-i].imag;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
331
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
332 w_1 = window[2*i];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
333 w_2 = window[255-2*i];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
334 data[2*i] = delay[2*i] * w_2 - a_r * w_1 + bias;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
335 data[255-2*i] = delay[2*i] * w_1 + a_r * w_2 + bias;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
336 delay[2*i] = c_i;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
337
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
338 w_1 = window[128+2*i];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
339 w_2 = window[127-2*i];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
340 data[128+2*i] = delay[127-2*i] * w_2 + a_i * w_1 + bias;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
341 data[127-2*i] = delay[127-2*i] * w_1 - a_i * w_2 + bias;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
342 delay[127-2*i] = c_r;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
343
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
344 w_1 = window[2*i+1];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
345 w_2 = window[254-2*i];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
346 data[2*i+1] = delay[2*i+1] * w_2 - b_i * w_1 + bias;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
347 data[254-2*i] = delay[2*i+1] * w_1 + b_i * w_2 + bias;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
348 delay[2*i+1] = d_r;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
349
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
350 w_1 = window[129+2*i];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
351 w_2 = window[126-2*i];
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
352 data[129+2*i] = delay[126-2*i] * w_2 + b_r * w_1 + bias;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
353 data[126-2*i] = delay[126-2*i] * w_1 - b_r * w_2 + bias;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
354 delay[126-2*i] = d_i;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
355 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
356 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
357
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
358 static double besselI0 (double x)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
359 {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
360 double bessel = 1;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
361 int i = 100;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
362
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
363 do
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
364 bessel = bessel * x / (i * i) + 1;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
365 while (--i);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
366 return bessel;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
367 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
368
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
369 void a52_imdct_init (uint32_t mm_accel)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
370 {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
371 int i, k;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
372 double sum;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
373
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
374 /* compute imdct window - kaiser-bessel derived window, alpha = 5.0 */
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
375 sum = 0;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
376 for (i = 0; i < 256; i++) {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
377 sum += besselI0 (i * (256 - i) * (5 * M_PI / 256) * (5 * M_PI / 256));
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
378 a52_imdct_window[i] = sum;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
379 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
380 sum++;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
381 for (i = 0; i < 256; i++)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
382 a52_imdct_window[i] = sqrt (a52_imdct_window[i] / sum);
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
383
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
384 for (i = 0; i < 3; i++)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
385 roots16[i] = cos ((M_PI / 8) * (i + 1));
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
386
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
387 for (i = 0; i < 7; i++)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
388 roots32[i] = cos ((M_PI / 16) * (i + 1));
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
389
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
390 for (i = 0; i < 15; i++)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
391 roots64[i] = cos ((M_PI / 32) * (i + 1));
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
392
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
393 for (i = 0; i < 31; i++)
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
394 roots128[i] = cos ((M_PI / 64) * (i + 1));
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
395
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
396 for (i = 0; i < 64; i++) {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
397 k = fftorder[i] / 2 + 64;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
398 pre1[i].real = cos ((M_PI / 256) * (k - 0.25));
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
399 pre1[i].imag = sin ((M_PI / 256) * (k - 0.25));
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
400 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
401
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
402 for (i = 64; i < 128; i++) {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
403 k = fftorder[i] / 2 + 64;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
404 pre1[i].real = -cos ((M_PI / 256) * (k - 0.25));
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
405 pre1[i].imag = -sin ((M_PI / 256) * (k - 0.25));
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
406 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
407
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
408 for (i = 0; i < 64; i++) {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
409 post1[i].real = cos ((M_PI / 256) * (i + 0.5));
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
410 post1[i].imag = sin ((M_PI / 256) * (i + 0.5));
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
411 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
412
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
413 for (i = 0; i < 64; i++) {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
414 k = fftorder[i] / 4;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
415 pre2[i].real = cos ((M_PI / 128) * (k - 0.25));
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
416 pre2[i].imag = sin ((M_PI / 128) * (k - 0.25));
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
417 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
418
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
419 for (i = 0; i < 32; i++) {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
420 post2[i].real = cos ((M_PI / 128) * (i + 0.5));
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
421 post2[i].imag = sin ((M_PI / 128) * (i + 0.5));
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
422 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
423
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
424 #ifdef LIBA52_DJBFFT
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
425 if (mm_accel & MM_ACCEL_DJBFFT) {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
426 fprintf (stderr, "Using djbfft for IMDCT transform\n");
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
427 ifft128 = (void (*) (complex_t *)) fftc4_un128;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
428 ifft64 = (void (*) (complex_t *)) fftc4_un64;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
429 } else
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
430 #endif
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
431 {
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
432 fprintf (stderr, "No accelerated IMDCT transform found\n");
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
433 ifft128 = ifft128_c;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
434 ifft64 = ifft64_c;
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
435 }
207cc56d18f8 * add support for liba52
kabi
parents:
diff changeset
436 }