comparison fft.c @ 8974:d7968d68b2a5 libavcodec

prettyprinting whitespace cosmetics
author diego
date Thu, 19 Feb 2009 00:06:17 +0000
parents e9d9d946f213
children dc19e4d7d0eb
comparison
equal deleted inserted replaced
8973:34f2c7189710 8974:d7968d68b2a5
69 goto fail; 69 goto fail;
70 s->nbits = nbits; 70 s->nbits = nbits;
71 n = 1 << nbits; 71 n = 1 << nbits;
72 72
73 s->tmp_buf = NULL; 73 s->tmp_buf = NULL;
74 s->exptab = av_malloc((n / 2) * sizeof(FFTComplex)); 74 s->exptab = av_malloc((n / 2) * sizeof(FFTComplex));
75 if (!s->exptab) 75 if (!s->exptab)
76 goto fail; 76 goto fail;
77 s->revtab = av_malloc(n * sizeof(uint16_t)); 77 s->revtab = av_malloc(n * sizeof(uint16_t));
78 if (!s->revtab) 78 if (!s->revtab)
79 goto fail; 79 goto fail;
80 s->inverse = inverse; 80 s->inverse = inverse;
81 81
82 s2 = inverse ? 1.0 : -1.0; 82 s2 = inverse ? 1.0 : -1.0;
83 83
84 s->fft_permute = ff_fft_permute_c; 84 s->fft_permute = ff_fft_permute_c;
85 s->fft_calc = ff_fft_calc_c; 85 s->fft_calc = ff_fft_calc_c;
86 s->imdct_calc = ff_imdct_calc_c; 86 s->imdct_calc = ff_imdct_calc_c;
87 s->imdct_half = ff_imdct_half_c; 87 s->imdct_half = ff_imdct_half_c;
88 s->exptab1 = NULL; 88 s->exptab1 = NULL;
89 89
90 #if HAVE_MMX && HAVE_YASM 90 #if HAVE_MMX && HAVE_YASM
91 has_vectors = mm_support(); 91 has_vectors = mm_support();
92 if (has_vectors & FF_MM_SSE) { 92 if (has_vectors & FF_MM_SSE) {
93 /* SSE for P3/P4/K8 */ 93 /* SSE for P3/P4/K8 */
94 s->imdct_calc = ff_imdct_calc_sse; 94 s->imdct_calc = ff_imdct_calc_sse;
95 s->imdct_half = ff_imdct_half_sse; 95 s->imdct_half = ff_imdct_half_sse;
96 s->fft_permute = ff_fft_permute_sse; 96 s->fft_permute = ff_fft_permute_sse;
97 s->fft_calc = ff_fft_calc_sse; 97 s->fft_calc = ff_fft_calc_sse;
98 } else if (has_vectors & FF_MM_3DNOWEXT) { 98 } else if (has_vectors & FF_MM_3DNOWEXT) {
99 /* 3DNowEx for K7 */ 99 /* 3DNowEx for K7 */
100 s->imdct_calc = ff_imdct_calc_3dn2; 100 s->imdct_calc = ff_imdct_calc_3dn2;
101 s->imdct_half = ff_imdct_half_3dn2; 101 s->imdct_half = ff_imdct_half_3dn2;
102 s->fft_calc = ff_fft_calc_3dn2; 102 s->fft_calc = ff_fft_calc_3dn2;
103 } else if (has_vectors & FF_MM_3DNOW) { 103 } else if (has_vectors & FF_MM_3DNOW) {
104 /* 3DNow! for K6-2/3 */ 104 /* 3DNow! for K6-2/3 */
105 s->imdct_calc = ff_imdct_calc_3dn; 105 s->imdct_calc = ff_imdct_calc_3dn;
106 s->imdct_half = ff_imdct_half_3dn; 106 s->imdct_half = ff_imdct_half_3dn;
107 s->fft_calc = ff_fft_calc_3dn; 107 s->fft_calc = ff_fft_calc_3dn;
108 } 108 }
109 #elif HAVE_ALTIVEC && !defined ALTIVEC_USE_REFERENCE_C_CODE 109 #elif HAVE_ALTIVEC && !defined ALTIVEC_USE_REFERENCE_C_CODE
110 has_vectors = mm_support(); 110 has_vectors = mm_support();
111 if (has_vectors & FF_MM_ALTIVEC) { 111 if (has_vectors & FF_MM_ALTIVEC) {
112 s->fft_calc = ff_fft_calc_altivec; 112 s->fft_calc = ff_fft_calc_altivec;