comparison fft.c @ 7263:fc843d00867c libavcodec

exploit mdct symmetry 2% faster vorbis on conroe, k8. 7% on celeron.
author lorenm
date Sun, 13 Jul 2008 15:03:58 +0000
parents 978911ca654f
children a8a8205a9081
comparison
equal deleted inserted replaced
7262:e3822c61f2e4 7263:fc843d00867c
57 s->exptab[i].re = c1; 57 s->exptab[i].re = c1;
58 s->exptab[i].im = s1; 58 s->exptab[i].im = s1;
59 } 59 }
60 s->fft_calc = ff_fft_calc_c; 60 s->fft_calc = ff_fft_calc_c;
61 s->imdct_calc = ff_imdct_calc; 61 s->imdct_calc = ff_imdct_calc;
62 s->imdct_half = ff_imdct_half;
62 s->exptab1 = NULL; 63 s->exptab1 = NULL;
63 64
64 #ifdef HAVE_MMX 65 #ifdef HAVE_MMX
65 has_vectors = mm_support(); 66 has_vectors = mm_support();
66 shuffle = 1; 67 shuffle = 1;
67 if (has_vectors & MM_3DNOWEXT) { 68 if (has_vectors & MM_3DNOWEXT) {
68 /* 3DNowEx for K7/K8 */ 69 /* 3DNowEx for K7/K8 */
69 s->imdct_calc = ff_imdct_calc_3dn2; 70 s->imdct_calc = ff_imdct_calc_3dn2;
71 s->imdct_half = ff_imdct_half_3dn2;
70 s->fft_calc = ff_fft_calc_3dn2; 72 s->fft_calc = ff_fft_calc_3dn2;
71 } else if (has_vectors & MM_3DNOW) { 73 } else if (has_vectors & MM_3DNOW) {
72 /* 3DNow! for K6-2/3 */ 74 /* 3DNow! for K6-2/3 */
73 s->fft_calc = ff_fft_calc_3dn; 75 s->fft_calc = ff_fft_calc_3dn;
74 } else if (has_vectors & MM_SSE) { 76 } else if (has_vectors & MM_SSE) {
75 /* SSE for P3/P4 */ 77 /* SSE for P3/P4 */
76 s->imdct_calc = ff_imdct_calc_sse; 78 s->imdct_calc = ff_imdct_calc_sse;
79 s->imdct_half = ff_imdct_half_sse;
77 s->fft_calc = ff_fft_calc_sse; 80 s->fft_calc = ff_fft_calc_sse;
78 } else { 81 } else {
79 shuffle = 0; 82 shuffle = 0;
80 } 83 }
81 #elif defined HAVE_ALTIVEC && !defined ALTIVEC_USE_REFERENCE_C_CODE 84 #elif defined HAVE_ALTIVEC && !defined ALTIVEC_USE_REFERENCE_C_CODE