aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-06 18:19:54 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-06 18:23:59 +0200
commit21f4fc2e400ea9cad1777aaa99b7e19653221a6d (patch)
tree50bb422accd0b4b508096b8609e39a3fe0d31388
parent11774169ae22b2818536551067668141c2f62a0c (diff)
downloadffmpeg-21f4fc2e400ea9cad1777aaa99b7e19653221a6d.tar.gz
avfilter/vf_mp: fix x86 cpu caps
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavfilter/vf_mp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavfilter/vf_mp.c b/libavfilter/vf_mp.c
index 4bb5e40f0f..d992a104c0 100644
--- a/libavfilter/vf_mp.c
+++ b/libavfilter/vf_mp.c
@@ -630,9 +630,22 @@ static int vf_default_query_format(struct vf_instance *vf, unsigned int fmt){
static av_cold int init(AVFilterContext *ctx, const char *args)
{
MPContext *m = ctx->priv;
+ int cpu_flags = av_get_cpu_flags();
char name[256];
int i;
+ ff_gCpuCaps.hasMMX = cpu_flags & AV_CPU_FLAG_MMX;
+ ff_gCpuCaps.hasMMX2 = cpu_flags & AV_CPU_FLAG_MMX2;
+ ff_gCpuCaps.hasSSE = cpu_flags & AV_CPU_FLAG_SSE;
+ ff_gCpuCaps.hasSSE2 = cpu_flags & AV_CPU_FLAG_SSE2;
+ ff_gCpuCaps.hasSSE3 = cpu_flags & AV_CPU_FLAG_SSE3;
+ ff_gCpuCaps.hasSSSE3 = cpu_flags & AV_CPU_FLAG_SSSE3;
+ ff_gCpuCaps.hasSSE4 = cpu_flags & AV_CPU_FLAG_SSE4;
+ ff_gCpuCaps.hasSSE42 = cpu_flags & AV_CPU_FLAG_SSE42;
+ ff_gCpuCaps.hasAVX = cpu_flags & AV_CPU_FLAG_AVX;
+ ff_gCpuCaps.has3DNow = cpu_flags & AV_CPU_FLAG_3DNOW;
+ ff_gCpuCaps.has3DNowExt = cpu_flags & AV_CPU_FLAG_3DNOWEXT;
+
m->avfctx= ctx;
if(!args || 1!=sscanf(args, "%255[^:=]", name)){