[FFmpeg-cvslog] r21346 - in trunk: libavcodec/mathops.h libavcodec/x86/mathops.h libavutil/internal.h
mru
subversion
Wed Jan 20 07:01:54 CET 2010
Author: mru
Date: Wed Jan 20 07:01:54 2010
New Revision: 21346
Log:
Move COPY3_IF_LT to lavc/mathops.h
This obscure macro is only used in motion_est.c so having it in lavc
makes more sense. See discussion here:
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-November/056561.html
Modified:
trunk/libavcodec/mathops.h
trunk/libavcodec/x86/mathops.h
trunk/libavutil/internal.h
Modified: trunk/libavcodec/mathops.h
==============================================================================
--- trunk/libavcodec/mathops.h Wed Jan 20 04:28:57 2010 (r21345)
+++ trunk/libavcodec/mathops.h Wed Jan 20 07:01:54 2010 (r21346)
@@ -116,5 +116,14 @@ static inline av_const int sign_extend(i
}
#endif
+#ifndef COPY3_IF_LT
+#define COPY3_IF_LT(x, y, a, b, c, d)\
+if ((y) < (x)) {\
+ (x) = (y);\
+ (a) = (b);\
+ (c) = (d);\
+}
+#endif
+
#endif /* AVCODEC_MATHOPS_H */
Modified: trunk/libavcodec/x86/mathops.h
==============================================================================
--- trunk/libavcodec/x86/mathops.h Wed Jan 20 04:28:57 2010 (r21345)
+++ trunk/libavcodec/x86/mathops.h Wed Jan 20 07:01:54 2010 (r21346)
@@ -66,4 +66,16 @@ static inline av_const int mid_pred(int
}
#endif
+#if HAVE_CMOV
+#define COPY3_IF_LT(x, y, a, b, c, d)\
+__asm__ volatile(\
+ "cmpl %0, %3 \n\t"\
+ "cmovl %3, %0 \n\t"\
+ "cmovl %4, %1 \n\t"\
+ "cmovl %5, %2 \n\t"\
+ : "+&r" (x), "+&r" (a), "+r" (c)\
+ : "r" (y), "r" (b), "r" (d)\
+);
+#endif
+
#endif /* AVCODEC_X86_MATHOPS_H */
Modified: trunk/libavutil/internal.h
==============================================================================
--- trunk/libavutil/internal.h Wed Jan 20 04:28:57 2010 (r21345)
+++ trunk/libavutil/internal.h Wed Jan 20 07:01:54 2010 (r21346)
@@ -156,25 +156,6 @@ static inline av_const unsigned int ff_s
level = (level ^ mask) - mask;
#endif
-#if HAVE_CMOV
-#define COPY3_IF_LT(x, y, a, b, c, d)\
-__asm__ volatile(\
- "cmpl %0, %3 \n\t"\
- "cmovl %3, %0 \n\t"\
- "cmovl %4, %1 \n\t"\
- "cmovl %5, %2 \n\t"\
- : "+&r" (x), "+&r" (a), "+r" (c)\
- : "r" (y), "r" (b), "r" (d)\
-);
-#else
-#define COPY3_IF_LT(x, y, a, b, c, d)\
-if ((y) < (x)) {\
- (x) = (y);\
- (a) = (b);\
- (c) = (d);\
-}
-#endif
-
/* avoid usage of dangerous/inappropriate system functions */
#undef malloc
#define malloc please_use_av_malloc
More information about the ffmpeg-cvslog
mailing list