diff options
author | Måns Rullgård <mans@mansr.com> | 2010-01-20 06:01:54 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2010-01-20 06:01:54 +0000 |
commit | 5e7dfb7de11dab3cbf8663d4fcb682935bd3a80b (patch) | |
tree | 13de579124ef323ace42fec078a1f6b9c611be57 /libavcodec/x86 | |
parent | bec358d683954738488a7ea529a340e9b11931ef (diff) | |
download | ffmpeg-5e7dfb7de11dab3cbf8663d4fcb682935bd3a80b.tar.gz |
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
Originally committed as revision 21346 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/x86')
-rw-r--r-- | libavcodec/x86/mathops.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h index a66c601878..691a200fd4 100644 --- a/libavcodec/x86/mathops.h +++ b/libavcodec/x86/mathops.h @@ -66,4 +66,16 @@ static inline av_const int mid_pred(int a, int b, int c) } #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 */ |