[FFmpeg-cvslog] x86: Add CPU flag for the i686 cmov instruction

Diego Biurrun git at videolan.org
Wed Mar 11 22:15:02 CET 2015


ffmpeg | branch: release/0.10 | Diego Biurrun <diego at biurrun.de> | Tue Jun 19 22:55:26 2012 +0200| [8637f4edeee1a6bd18bc90740fafadd3e1b412aa] | committer: Diego Biurrun

x86: Add CPU flag for the i686 cmov instruction

(cherry picked from commit 65345a5a30a0e866b6944c0e6184be3feca04335)
Signed-off-by: Diego Biurrun <diego at biurrun.de>

Conflicts:
	libavutil/cpu.c
	libavutil/cpu.h

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8637f4edeee1a6bd18bc90740fafadd3e1b412aa
---

 doc/APIchanges      |    3 +++
 libavutil/avutil.h  |    2 +-
 libavutil/cpu.c     |    1 +
 libavutil/cpu.h     |    1 +
 libavutil/x86/cpu.c |    2 ++
 5 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 0b9cdac..a9524cc 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,9 @@ libavutil:   2011-04-18
 
 API changes, most recent first:
 
+2014-09-16 - xxxxxxx - lavu 51.22.3 - cpu.h
+  Add AV_CPU_FLAG_CMOV.
+
 2012-03-04 - 7f3f855 - lavu 51.22.1 - error.h
   Add AVERROR_UNKNOWN
 
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index 605be62..0d30538 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -155,7 +155,7 @@
 
 #define LIBAVUTIL_VERSION_MAJOR 51
 #define LIBAVUTIL_VERSION_MINOR 22
-#define LIBAVUTIL_VERSION_MICRO  2
+#define LIBAVUTIL_VERSION_MICRO  3
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
                                                LIBAVUTIL_VERSION_MINOR, \
diff --git a/libavutil/cpu.c b/libavutil/cpu.c
index 25895d6..60d0e14 100644
--- a/libavutil/cpu.c
+++ b/libavutil/cpu.c
@@ -64,6 +64,7 @@ static const struct {
     { AV_CPU_FLAG_FMA4,      "fma4"       },
     { AV_CPU_FLAG_3DNOW,     "3dnow"      },
     { AV_CPU_FLAG_3DNOWEXT,  "3dnowext"   },
+    { AV_CPU_FLAG_CMOV,      "cmov"       },
 #endif
     { 0 }
 };
diff --git a/libavutil/cpu.h b/libavutil/cpu.h
index df7bf44..e535580 100644
--- a/libavutil/cpu.h
+++ b/libavutil/cpu.h
@@ -41,6 +41,7 @@
 #define AV_CPU_FLAG_XOP          0x0400 ///< Bulldozer XOP functions
 #define AV_CPU_FLAG_FMA4         0x0800 ///< Bulldozer FMA4 functions
 #define AV_CPU_FLAG_IWMMXT       0x0100 ///< XScale IWMMXT
+#define AV_CPU_FLAG_CMOV         0x1000 ///< i686 cmov
 #define AV_CPU_FLAG_ALTIVEC      0x0001 ///< standard
 
 /**
diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c
index 2424fe4..b87d3a3 100644
--- a/libavutil/x86/cpu.c
+++ b/libavutil/x86/cpu.c
@@ -83,6 +83,8 @@ int ff_get_cpu_flags_x86(void)
         cpuid(1, eax, ebx, ecx, std_caps);
         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))



More information about the ffmpeg-cvslog mailing list