summaryrefslogtreecommitdiff
path: root/libavutil/internal.h
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2009-01-13 23:44:16 +0000
committerAurelien Jacobs <aurel@gnuage.org>2009-01-13 23:44:16 +0000
commitb250f9c66d3ddd84652d158fb979a5f21e3f2c71 (patch)
treeef84366029d6f8af6ed82e90c5f188bb7dfc844d /libavutil/internal.h
parent959da985b03570cfe7d239c0ba6d550ecb04c460 (diff)
Change semantic of CONFIG_*, HAVE_* and ARCH_*.
They are now always defined to either 0 or 1. Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/internal.h')
-rw-r--r--libavutil/internal.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 957566026d..52fa7e8c97 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -102,7 +102,7 @@
#endif
// Use rip-relative addressing if compiling PIC code on x86-64.
-#if defined(ARCH_X86_64) && defined(PIC)
+#if ARCH_X86_64 && defined(PIC)
# define LOCAL_MANGLE(a) #a "(%%rip)"
#else
# define LOCAL_MANGLE(a) #a
@@ -125,7 +125,7 @@
extern const uint32_t ff_inverse[256];
-#if defined(ARCH_X86)
+#if ARCH_X86
# define FASTDIV(a,b) \
({\
int ret,dmy;\
@@ -136,7 +136,7 @@ extern const uint32_t ff_inverse[256];
);\
ret;\
})
-#elif defined(HAVE_ARMV6)
+#elif HAVE_ARMV6
static inline av_const int FASTDIV(int a, int b)
{
int r, t;
@@ -147,7 +147,7 @@ static inline av_const int FASTDIV(int a, int b)
: "=&r"(r), "=&r"(t) : "r"(a), "r"(b), "r"(ff_inverse));
return r;
}
-#elif defined(ARCH_ARM)
+#elif ARCH_ARM
static inline av_const int FASTDIV(int a, int b)
{
int r, t;
@@ -155,7 +155,7 @@ static inline av_const int FASTDIV(int a, int b)
: "=&r"(r), "=&r"(t) : "r"(a), "r"(ff_inverse[b]));
return r;
}
-#elif defined(CONFIG_FASTDIV)
+#elif CONFIG_FASTDIV
# define FASTDIV(a,b) ((uint32_t)((((uint64_t)a)*ff_inverse[b])>>32))
#else
# define FASTDIV(a,b) ((a)/(b))
@@ -171,7 +171,7 @@ static inline av_const unsigned int ff_sqrt(unsigned int a)
if(a<255) return (ff_sqrt_tab[a+1]-1)>>4;
else if(a<(1<<12)) b= ff_sqrt_tab[a>>4 ]>>2;
-#ifndef CONFIG_SMALL
+#if !CONFIG_SMALL
else if(a<(1<<14)) b= ff_sqrt_tab[a>>6 ]>>1;
else if(a<(1<<16)) b= ff_sqrt_tab[a>>8 ] ;
#endif
@@ -185,7 +185,7 @@ static inline av_const unsigned int ff_sqrt(unsigned int a)
return b - (a<b*b);
}
-#if defined(ARCH_X86)
+#if ARCH_X86
#define MASK_ABS(mask, level)\
__asm__ volatile(\
"cltd \n\t"\
@@ -199,7 +199,7 @@ static inline av_const unsigned int ff_sqrt(unsigned int a)
level= (level^mask)-mask;
#endif
-#ifdef HAVE_CMOV
+#if HAVE_CMOV
#define COPY3_IF_LT(x,y,a,b,c,d)\
__asm__ volatile (\
"cmpl %0, %3 \n\t"\
@@ -259,42 +259,42 @@ if((y)<(x)){\
}\
}
-#ifndef HAVE_LLRINT
+#if !HAVE_LLRINT
static av_always_inline av_const long long llrint(double x)
{
return rint(x);
}
#endif /* HAVE_LLRINT */
-#ifndef HAVE_LRINT
+#if !HAVE_LRINT
static av_always_inline av_const long int lrint(double x)
{
return rint(x);
}
#endif /* HAVE_LRINT */
-#ifndef HAVE_LRINTF
+#if !HAVE_LRINTF
static av_always_inline av_const long int lrintf(float x)
{
return (int)(rint(x));
}
#endif /* HAVE_LRINTF */
-#ifndef HAVE_ROUND
+#if !HAVE_ROUND
static av_always_inline av_const double round(double x)
{
return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
}
#endif /* HAVE_ROUND */
-#ifndef HAVE_ROUNDF
+#if !HAVE_ROUNDF
static av_always_inline av_const float roundf(float x)
{
return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
}
#endif /* HAVE_ROUNDF */
-#ifndef HAVE_TRUNCF
+#if !HAVE_TRUNCF
static av_always_inline av_const float truncf(float x)
{
return (x > 0) ? floor(x) : ceil(x);