Mercurial > libavcodec.hg
comparison fft.c @ 8981:dc19e4d7d0eb libavcodec
Only enable SSE/3DNOW optimizations when they have been enabled at compilation.
Fixes shared build with SSE/3DNOW disabled but MMX and yasm enabled.
| author | diego |
|---|---|
| date | Thu, 19 Feb 2009 00:54:59 +0000 |
| parents | d7968d68b2a5 |
| children | 4b1736ba9f2f |
comparison
equal
deleted
inserted
replaced
| 8980:8ebe84eae835 | 8981:dc19e4d7d0eb |
|---|---|
| 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 && HAVE_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 && HAVE_AMD3DNOWEXT) { |
| 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 && HAVE_AMD3DNOW) { |
| 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 } |
