From b250f9c66d3ddd84652d158fb979a5f21e3f2c71 Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Tue, 13 Jan 2009 23:44:16 +0000 Subject: 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 --- libavutil/internal.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'libavutil/internal.h') 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 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); -- cgit v1.2.3