diff options
author | Benoit Fouet <benoit.fouet@free.fr> | 2008-03-18 16:29:47 +0000 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2008-03-18 16:29:47 +0000 |
commit | 2119bb8f51d5cbf946d8e87974a2d95016133942 (patch) | |
tree | a4cfee50d5b37ab8020f1292b4041b4a26b857c9 /libavutil/common.h | |
parent | 6544f48f038552973a552401cea5d4e8f1fc9c0a (diff) | |
download | ffmpeg-2119bb8f51d5cbf946d8e87974a2d95016133942.tar.gz |
revert r12489.
Originally committed as revision 12490 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/common.h')
-rw-r--r-- | libavutil/common.h | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/libavutil/common.h b/libavutil/common.h index d2489e3f32..fd1d00c7b3 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -57,22 +57,6 @@ #endif #endif -#ifndef av_pure -#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0) -# define av_pure __attribute__((pure)) -#else -# define av_pure -#endif -#endif - -#ifndef av_const -#if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 5) -# define av_const __attribute__((const)) -#else -# define av_const -#endif -#endif - #ifdef HAVE_AV_CONFIG_H # include "internal.h" #endif /* HAVE_AV_CONFIG_H */ @@ -110,7 +94,7 @@ /* misc math functions */ extern const uint8_t ff_log2_tab[256]; -static inline av_const int av_log2(unsigned int v) +static inline int av_log2(unsigned int v) { int n = 0; if (v & 0xffff0000) { @@ -126,7 +110,7 @@ static inline av_const int av_log2(unsigned int v) return n; } -static inline av_const int av_log2_16bit(unsigned int v) +static inline int av_log2_16bit(unsigned int v) { int n = 0; if (v & 0xff00) { @@ -139,7 +123,7 @@ static inline av_const int av_log2_16bit(unsigned int v) } /* median of 3 */ -static inline av_const int mid_pred(int a, int b, int c) +static inline int mid_pred(int a, int b, int c) { #ifdef HAVE_CMOV int i=b; @@ -186,7 +170,7 @@ static inline av_const int mid_pred(int a, int b, int c) * @param amax maximum value of the clip range * @return clipped value */ -static inline av_const int av_clip(int a, int amin, int amax) +static inline int av_clip(int a, int amin, int amax) { if (a < amin) return amin; else if (a > amax) return amax; @@ -198,7 +182,7 @@ static inline av_const int av_clip(int a, int amin, int amax) * @param a value to clip * @return clipped value */ -static inline av_const uint8_t av_clip_uint8(int a) +static inline uint8_t av_clip_uint8(int a) { if (a&(~255)) return (-a)>>31; else return a; @@ -209,19 +193,19 @@ static inline av_const uint8_t av_clip_uint8(int a) * @param a value to clip * @return clipped value */ -static inline av_const int16_t av_clip_int16(int a) +static inline int16_t av_clip_int16(int a) { if ((a+32768) & ~65535) return (a>>31) ^ 32767; else return a; } /* math */ -int64_t av_const ff_gcd(int64_t a, int64_t b); +int64_t ff_gcd(int64_t a, int64_t b); /** * converts fourcc string to int */ -static inline av_pure int ff_get_fourcc(const char *s){ +static inline int ff_get_fourcc(const char *s){ #ifdef HAVE_AV_CONFIG_H assert( strlen(s)==4 ); #endif |