diff options
author | Zuxy Meng <zuxy.meng@gmail.com> | 2008-03-19 06:17:43 +0000 |
---|---|---|
committer | Zuxy Meng <zuxy.meng@gmail.com> | 2008-03-19 06:17:43 +0000 |
commit | 85074d3c9388123d792995c8f98c9b5d807566b4 (patch) | |
tree | 54440eea962c4864599dd5403fc0244becb24875 /libavutil/internal.h | |
parent | d1928ac1296a09c658ba64fe5c503979e280a2e0 (diff) | |
download | ffmpeg-85074d3c9388123d792995c8f98c9b5d807566b4.tar.gz |
Reapply r12489: Add pure, const and malloc attributes to proper functions
in libavutil.
Fix a compilation failure in r12489.
Originally committed as revision 12498 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/internal.h')
-rw-r--r-- | libavutil/internal.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h index ccb0974ad2..66a136de68 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -172,7 +172,7 @@ extern const uint8_t ff_sqrt_tab[256]; static inline int av_log2_16bit(unsigned int v); -static inline unsigned int ff_sqrt(unsigned int a) +static inline av_const unsigned int ff_sqrt(unsigned int a) { unsigned int b; @@ -267,35 +267,35 @@ if((y)<(x)){\ } #ifndef HAVE_LLRINT -static av_always_inline long long llrint(double x) +static av_always_inline av_const long long llrint(double x) { return rint(x); } #endif /* HAVE_LLRINT */ #ifndef HAVE_LRINT -static av_always_inline long int lrint(double x) +static av_always_inline av_const long int lrint(double x) { return rint(x); } #endif /* HAVE_LRINT */ #ifndef HAVE_LRINTF -static av_always_inline long int lrintf(float x) +static av_always_inline av_const long int lrintf(float x) { return (int)(rint(x)); } #endif /* HAVE_LRINTF */ #ifndef HAVE_ROUND -static av_always_inline double round(double x) +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 -static av_always_inline float roundf(float x) +static av_always_inline av_const float roundf(float x) { return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5); } |