diff options
Diffstat (limited to 'apps/codecs/lib/mdct.c')
-rw-r--r-- | apps/codecs/lib/mdct.c | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/apps/codecs/lib/mdct.c b/apps/codecs/lib/mdct.c index 8382a7213d..621b9cbbb8 100644 --- a/apps/codecs/lib/mdct.c +++ b/apps/codecs/lib/mdct.c | |||
@@ -134,12 +134,50 @@ void ff_imdct_half(unsigned int nbits, fixed32 *output, const fixed32 *input) | |||
134 | } | 134 | } |
135 | else | 135 | else |
136 | { | 136 | { |
137 | T = sincos_lookup1; | 137 | T = sincos_lookup1; |
138 | newstep = 2; | 138 | newstep = 2; |
139 | } | 139 | } |
140 | 140 | ||
141 | while(z1<z2) | 141 | while(z1<z2) |
142 | { | 142 | { |
143 | #ifdef CPU_COLDFIRE | ||
144 | asm volatile ("movem.l (%[z1]), %%d0-%%d1\n\t" | ||
145 | "movem.l (%[T]), %%d2-%%d3\n\t" | ||
146 | "mac.l %%d1, %%d2, %%acc0\n\t" | ||
147 | "msac.l %%d0, %%d3, %%acc0\n\t" | ||
148 | "mac.l %%d0, %%d2, %%acc1\n\t" | ||
149 | "mac.l %%d1, %%d3, %%acc1\n\t" | ||
150 | |||
151 | "lea (%[newstep]*4, %[T]), %[T]\n\t" | ||
152 | |||
153 | "movem.l (%[z2]), %%d0-%%d1\n\t" | ||
154 | "movem.l (%[T]), %%d2-%%d3\n\t" | ||
155 | "mac.l %%d1, %%d3, %%acc2\n\t" | ||
156 | "msac.l %%d0, %%d2, %%acc2\n\t" | ||
157 | "mac.l %%d0, %%d3, %%acc3\n\t" | ||
158 | "mac.l %%d1, %%d2, %%acc3\n\t" | ||
159 | |||
160 | "lea (%[newstep]*4, %[T]), %[T]\n\t" | ||
161 | |||
162 | "movclr.l %%acc0, %%d0\n\t" | ||
163 | "movclr.l %%acc1, %%d2\n\t" | ||
164 | "movclr.l %%acc2, %%d1\n\t" | ||
165 | "movclr.l %%acc3, %%d3\n\t" | ||
166 | |||
167 | "neg.l %%d0\n\t" | ||
168 | "neg.l %%d1\n\t" | ||
169 | "neg.l %%d2\n\t" | ||
170 | "neg.l %%d3\n\t" | ||
171 | |||
172 | "movem.l %%d0/%%d3, (%[z1])\n\t" | ||
173 | "movem.l %%d1/%%d2, (%[z2])\n\t" | ||
174 | |||
175 | "addq.l #8, %[z1]\n\t" | ||
176 | "subq.l #8, %[z2]\n\t" | ||
177 | : [z1] "+a" (z1), [z2] "+a" (z2), [T] "+a" (T) | ||
178 | : [newstep] "d" (newstep) | ||
179 | : "d0", "d1", "d2", "d3", "cc", "memory"); | ||
180 | #else | ||
143 | fixed32 r0,i0,r1,i1; | 181 | fixed32 r0,i0,r1,i1; |
144 | XNPROD31_R(z1[1], z1[0], T[0], T[1], r0, i1 ); T+=newstep; | 182 | XNPROD31_R(z1[1], z1[0], T[0], T[1], r0, i1 ); T+=newstep; |
145 | XNPROD31_R(z2[1], z2[0], T[1], T[0], r1, i0 ); T+=newstep; | 183 | XNPROD31_R(z2[1], z2[0], T[1], T[0], r1, i0 ); T+=newstep; |
@@ -149,6 +187,7 @@ void ff_imdct_half(unsigned int nbits, fixed32 *output, const fixed32 *input) | |||
149 | z2[1] = -i1; | 187 | z2[1] = -i1; |
150 | z1+=2; | 188 | z1+=2; |
151 | z2-=2; | 189 | z2-=2; |
190 | #endif | ||
152 | } | 191 | } |
153 | 192 | ||
154 | break; | 193 | break; |