27 #define c1 1.38703984532214752434
28 #define c2 1.30656296487637657577
29 #define c3 1.17587560241935884520
30 #define c4 1.00000000000000000000
31 #define c5 0.78569495838710234903
32 #define c6 0.54119610014619712324
33 #define c7 0.27589937928294311353
35 static const float even_table[] __attribute__ ((aligned(8))) = {
42 static const float odd_table[] __attribute__ ((aligned(8))) = {
57 #define load_matrix(table) \
59 const float *t = table; \
76 __asm__ volatile("ftrv xmtrx,fv0" \
77 : "+f"(fr0),"+f"(fr1),"+f"(fr2),"+f"(fr3));
80 register float fr0 __asm__("fr0"); \
81 register float fr1 __asm__("fr1"); \
82 register float fr2 __asm__("fr2"); \
83 register float fr3 __asm__("fr3")
85 #define DESCALE(x,n) (x)*(1.0f/(1<<(n)))
97 float tblock[8*8],*fblock;
143 *--fblock = t0 - fr0;
144 *--fblock = t1 - fr1;
145 *--fblock = t2 - fr2;
146 *--fblock = t3 - fr3;
147 *--fblock = t3 + fr3;
148 *--fblock = t2 + fr2;
149 *--fblock = t1 + fr1;
150 *--fblock = t0 + fr0;
161 ofs1 =
sizeof(float)*2*8;
162 ofs2 =
sizeof(float)*4*8;
163 ofs3 =
sizeof(float)*6*8;
167 #define OA(fblock,ofs) *(float*)((char*)fblock + ofs)
171 fr1 =
OA(fblock,ofs1);
172 fr2 =
OA(fblock,ofs2);
173 fr3 =
OA(fblock,ofs3);
176 OA(fblock,ofs1) = fr1;
177 OA(fblock,ofs2) = fr2;
178 OA(fblock,ofs3) = fr3;
189 t1 =
OA(fblock,ofs1);
190 t2 =
OA(fblock,ofs2);
191 t3 =
OA(fblock,ofs3);
194 fr1 =
OA(fblock,ofs1);
195 fr2 =
OA(fblock,ofs2);
196 fr3 =
OA(fblock,ofs3);
199 block[8*0] =
DESCALE(t0 + fr0,3);
200 block[8*7] =
DESCALE(t0 - fr0,3);
201 block[8*1] =
DESCALE(t1 + fr1,3);
202 block[8*6] =
DESCALE(t1 - fr1,3);
203 block[8*2] =
DESCALE(t2 + fr2,3);
204 block[8*5] =
DESCALE(t2 - fr2,3);
205 block[8*3] =
DESCALE(t3 + fr3,3);
206 block[8*4] =
DESCALE(t3 - fr3,3);