diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2009-01-18 22:57:40 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2009-01-18 22:57:40 +0000 |
commit | 199436b952c198e14d53a389438e232ef60f1982 (patch) | |
tree | a4f1f4426da39f1af73f474f8df7c430025a2044 /libavutil | |
parent | 48a81c0ff591347e58b9402534c5cf596ddf0072 (diff) | |
download | ffmpeg-199436b952c198e14d53a389438e232ef60f1982.tar.gz |
moves mid_pred() into mathops.h (with arch specific code split by directory)
Originally committed as revision 16681 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/common.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/libavutil/common.h b/libavutil/common.h index f9ab84417a..f701d233ca 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -151,47 +151,6 @@ static inline av_const int av_log2_16bit(unsigned int v) return n; } -/* median of 3 */ -static inline av_const int mid_pred(int a, int b, int c) -{ -#if HAVE_CMOV - int i=b; - __asm__ volatile( - "cmp %2, %1 \n\t" - "cmovg %1, %0 \n\t" - "cmovg %2, %1 \n\t" - "cmp %3, %1 \n\t" - "cmovl %3, %1 \n\t" - "cmp %1, %0 \n\t" - "cmovg %1, %0 \n\t" - :"+&r"(i), "+&r"(a) - :"r"(b), "r"(c) - ); - return i; -#elif 0 - int t= (a-b)&((a-b)>>31); - a-=t; - b+=t; - b-= (b-c)&((b-c)>>31); - b+= (a-b)&((a-b)>>31); - - return b; -#else - if(a>b){ - if(c>b){ - if(c>a) b=a; - else b=c; - } - }else{ - if(b>c){ - if(c>a) b=c; - else b=a; - } - } - return b; -#endif -} - /** * clip a signed integer value into the amin-amax range * @param a value to clip |