comparison ppc/fft_altivec.c @ 7333:a8a79f5385f6 libavcodec

cosmetics: Reformat PPC code in libavcodec according to style guidelines. This includes indentation changes, comment reformatting, consistent brace placement and some prettyprinting.
author diego
date Sun, 20 Jul 2008 18:58:30 +0000
parents f7cbb7733146
children 3e0b4e4b7074
comparison
equal deleted inserted replaced
7332:b1003e468c3d 7333:a8a79f5385f6
31 and are required for the reference C code 31 and are required for the reference C code
32 */ 32 */
33 /* butter fly op */ 33 /* butter fly op */
34 #define BF(pre, pim, qre, qim, pre1, pim1, qre1, qim1) \ 34 #define BF(pre, pim, qre, qim, pre1, pim1, qre1, qim1) \
35 {\ 35 {\
36 FFTSample ax, ay, bx, by;\ 36 FFTSample ax, ay, bx, by;\
37 bx=pre1;\ 37 bx=pre1;\
38 by=pim1;\ 38 by=pim1;\
39 ax=qre1;\ 39 ax=qre1;\
40 ay=qim1;\ 40 ay=qim1;\
41 pre = (bx + ax);\ 41 pre = (bx + ax);\
42 pim = (by + ay);\ 42 pim = (by + ay);\
43 qre = (bx - ax);\ 43 qre = (bx - ax);\
44 qim = (by - ay);\ 44 qim = (by - ay);\
45 } 45 }
46 #define MUL16(a,b) ((a) * (b)) 46 #define MUL16(a,b) ((a) * (b))
47 #define CMUL(pre, pim, are, aim, bre, bim) \ 47 #define CMUL(pre, pim, are, aim, bre, bim) \
48 {\ 48 {\
49 pre = (MUL16(are, bre) - MUL16(aim, bim));\ 49 pre = (MUL16(are, bre) - MUL16(aim, bim));\
50 pim = (MUL16(are, bim) + MUL16(bre, aim));\ 50 pim = (MUL16(are, bim) + MUL16(bre, aim));\
51 } 51 }
52 52
53 53
54 /** 54 /**
55 * Do a complex FFT with the parameters defined in ff_fft_init(). The 55 * Do a complex FFT with the parameters defined in ff_fft_init(). The
83 83
84 r = (vector float *)&z[0]; 84 r = (vector float *)&z[0];
85 85
86 c1 = vcii(p,p,n,n); 86 c1 = vcii(p,p,n,n);
87 87
88 if (s->inverse) 88 if (s->inverse) {
89 { 89 c2 = vcii(p,p,n,p);
90 c2 = vcii(p,p,n,p); 90 } else {
91 } 91 c2 = vcii(p,p,p,n);
92 else 92 }
93 {
94 c2 = vcii(p,p,p,n);
95 }
96 93
97 j = (np >> 2); 94 j = (np >> 2);
98 do { 95 do {
99 a = vec_ld(0, r); 96 a = vec_ld(0, r);
100 a1 = vec_ld(sizeof(vector float), r); 97 a1 = vec_ld(sizeof(vector float), r);