# HG changeset patch # User diego # Date 1235004899 0 # Node ID dc19e4d7d0eb00263838cdcf94272aa0537031d1 # Parent 8ebe84eae8355097bd51f067bb392c6f3d9594bc Only enable SSE/3DNOW optimizations when they have been enabled at compilation. Fixes shared build with SSE/3DNOW disabled but MMX and yasm enabled. diff -r 8ebe84eae835 -r dc19e4d7d0eb fft.c --- a/fft.c Thu Feb 19 00:47:11 2009 +0000 +++ b/fft.c Thu Feb 19 00:54:59 2009 +0000 @@ -89,18 +89,18 @@ #if HAVE_MMX && HAVE_YASM has_vectors = mm_support(); - if (has_vectors & FF_MM_SSE) { + if (has_vectors & FF_MM_SSE && HAVE_SSE) { /* SSE for P3/P4/K8 */ s->imdct_calc = ff_imdct_calc_sse; s->imdct_half = ff_imdct_half_sse; s->fft_permute = ff_fft_permute_sse; s->fft_calc = ff_fft_calc_sse; - } else if (has_vectors & FF_MM_3DNOWEXT) { + } else if (has_vectors & FF_MM_3DNOWEXT && HAVE_AMD3DNOWEXT) { /* 3DNowEx for K7 */ s->imdct_calc = ff_imdct_calc_3dn2; s->imdct_half = ff_imdct_half_3dn2; s->fft_calc = ff_fft_calc_3dn2; - } else if (has_vectors & FF_MM_3DNOW) { + } else if (has_vectors & FF_MM_3DNOW && HAVE_AMD3DNOW) { /* 3DNow! for K6-2/3 */ s->imdct_calc = ff_imdct_calc_3dn; s->imdct_half = ff_imdct_half_3dn;