On Thu, Jun 21, 2012 at 01:18:34PM +0100, Måns Rullgård wrote: > Diego Biurrun <di...@biurrun.de> writes: > > > > --- a/libavutil/cpu.c > > +++ b/libavutil/cpu.c > > @@ -82,6 +82,7 @@ int av_parse_cpu_flags(const char *s) > > { "3dnowext", NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_3DNOWEXT > > }, .unit = "flags" }, > > + { "cmov", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_CMOV > > }, .unit = "flags" }, > > #elif ARCH_ARM > > { "armv5te", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_ARMV5TE > > }, .unit = "flags" }, > > { "armv6", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_ARMV6 > > }, .unit = "flags" }, > > Maybe cmov should be implicitly included in sse (or whatever level > guarantees cmov) just like lesser simd variants are implied by later > ones.
I think mmxext/mmx2 guarantees cmov, since cmov is available with i686 and upwards. Updated patch coming up. > > --- a/libavutil/x86/cpu.c > > +++ b/libavutil/x86/cpu.c > > @@ -83,6 +83,8 @@ int ff_get_cpu_flags_x86(void) > > family = ((eax>>8)&0xf) + ((eax>>20)&0xff); > > model = ((eax>>4)&0xf) + ((eax>>12)&0xf0); > > + if (std_caps & (1 << 15)) > > + rval |= AV_CPU_FLAG_CMOV; > > if (std_caps & (1<<23)) > > rval |= AV_CPU_FLAG_MMX; > > if (std_caps & (1<<25)) > > Otherwise OK, assuming the cpuid flag is correct. Courtesy of Wikipedia; tested on my K6-III (no cmov) and my x86_64 compile host (cmov available). Diego _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel