aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2013-07-10 03:18:14 +0200
committerLuca Barbato <lu_zero@gentoo.org>2013-07-12 04:34:49 +0200
commit2b379a925162b6783bd9a81dc03e647e8b65494c (patch)
treec07e9025a56db2d5ba7e3b698d58222d1da17ae7 /libavcodec
parent3abde1a3b49cf299f2aae4eaae6b6cb5270bdc22 (diff)
downloadffmpeg-2b379a925162b6783bd9a81dc03e647e8b65494c.tar.gz
mlpdsp: x86: Respect cpuflags
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/x86/mlpdsp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/x86/mlpdsp.c b/libavcodec/x86/mlpdsp.c
index 7bd2c12a9e..72fc637764 100644
--- a/libavcodec/x86/mlpdsp.c
+++ b/libavcodec/x86/mlpdsp.c
@@ -21,7 +21,9 @@
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
+#include "libavutil/cpu.h"
#include "libavutil/x86/asm.h"
+#include "libavutil/x86/cpu.h"
#include "libavcodec/mlpdsp.h"
#include "libavcodec/mlp.h"
@@ -178,6 +180,8 @@ static void mlp_filter_channel_x86(int32_t *state, const int32_t *coeff,
av_cold void ff_mlpdsp_init_x86(MLPDSPContext *c)
{
#if HAVE_7REGS && HAVE_INLINE_ASM
- c->mlp_filter_channel = mlp_filter_channel_x86;
+ int cpu_flags = av_get_cpu_flags();
+ if (INLINE_MMX(cpu_flags))
+ c->mlp_filter_channel = mlp_filter_channel_x86;
#endif
}