aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorGuillaume Poirier <gpoirier@mplayerhq.hu>2006-10-20 17:53:19 +0000
committerGuillaume Poirier <gpoirier@mplayerhq.hu>2006-10-20 17:53:19 +0000
commit94e4c3a333c50170c6645bc5ea43578270249644 (patch)
tree81525c5539104e97b4987d37cb67fe3064ee4f55 /libavutil
parent4c8d81fa2d21ec9d21a5ab6dbbdeded9be140a17 (diff)
downloadffmpeg-94e4c3a333c50170c6645bc5ea43578270249644.tar.gz
Protect code that uses CMOV instructions with HAVE_CMOV,
Make configure set CMOV_IS_FAST on arches on which cmov has a low latency (typically non-Netburst based processor) Originally committed as revision 6749 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/common.h2
-rw-r--r--libavutil/internal.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/common.h b/libavutil/common.h
index 9a836f1b57..3ae59716e4 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -238,7 +238,7 @@ static inline int av_log2_16bit(unsigned int v)
/* median of 3 */
static inline int mid_pred(int a, int b, int c)
{
-#if (defined(ARCH_X86) && __CPU__ >= 686 || defined(ARCH_X86_64)) && !defined(RUNTIME_CPUDETECT)
+#if HAVE_CMOV
int i=b;
asm volatile(
"cmp %2, %1 \n\t"
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 29e4cc8fff..285d30457f 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -168,7 +168,7 @@ static inline int ff_sqrt(int a)
level= (level^mask)-mask;
#endif
-#if __CPU__ >= 686 && !defined(RUNTIME_CPUDETECT)
+#ifdef HAVE_CMOV
#define COPY3_IF_LT(x,y,a,b,c,d)\
asm volatile (\
"cmpl %0, %3 \n\t"\