changeset 610:f0e1ca6528d2 libavutil

moves mid_pred() into mathops.h (with arch specific code split by directory)
author aurel
date Sun, 18 Jan 2009 22:57:40 +0000
parents 70367460f323
children a837b715e7d6
files common.h
diffstat 1 files changed, 0 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/common.h	Sun Jan 18 22:50:57 2009 +0000
+++ b/common.h	Sun Jan 18 22:57:40 2009 +0000
@@ -151,47 +151,6 @@
     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