aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-01-14 17:09:07 +0100
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-01-14 23:09:39 +0100
commit7a1723086a9cc72c2f3e1e682b002ed3d81990d3 (patch)
tree8eec8b9a3713c89a566627af2c9b0e2da56127ce /libavcodec
parentc48883163d6c7ff0806687bf3ee33ca9f8e7dede (diff)
downloadffmpeg-7a1723086a9cc72c2f3e1e682b002ed3d81990d3.tar.gz
Fix compilation without HAVE_AVX, HAVE_YASM etc.
At the very least this should fix warnings about unused static functions if one or more of these is not defined. However even compilation might be broken if the compiler does not optimize the function away completely. This actually happens in case of the AVX function, since the function pointer is used in an assignment that is not under an #if and thus probably only optimized away after the function was already marked as used. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/x86/mpegaudiodec_mmx.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/x86/mpegaudiodec_mmx.c b/libavcodec/x86/mpegaudiodec_mmx.c
index b1fa6573b8..b85b8a5548 100644
--- a/libavcodec/x86/mpegaudiodec_mmx.c
+++ b/libavcodec/x86/mpegaudiodec_mmx.c
@@ -192,11 +192,17 @@ static void imdct36_blocks_ ## CPU1(float *out, float *buf, float *in, \
} \
}
+#if HAVE_YASM
+#if HAVE_SSE
DECL_IMDCT_BLOCKS(sse,sse)
DECL_IMDCT_BLOCKS(sse2,sse)
DECL_IMDCT_BLOCKS(sse3,sse)
DECL_IMDCT_BLOCKS(ssse3,sse)
+#endif
+#if HAVE_AVX
DECL_IMDCT_BLOCKS(avx,avx)
+#endif
+#endif
void ff_mpadsp_init_mmx(MPADSPContext *s)
{
@@ -220,8 +226,11 @@ void ff_mpadsp_init_mmx(MPADSPContext *s)
s->apply_window_float = apply_window_mp3;
}
#if HAVE_YASM
- if (mm_flags & AV_CPU_FLAG_AVX && HAVE_AVX) {
+ if (0) {
+#if HAVE_AVX
+ } else if (mm_flags & AV_CPU_FLAG_AVX && HAVE_AVX) {
s->imdct36_blocks_float = imdct36_blocks_avx;
+#endif
#if HAVE_SSE
} else if (mm_flags & AV_CPU_FLAG_SSSE3) {
s->imdct36_blocks_float = imdct36_blocks_ssse3;