diff options
author | Zuxy Meng <zuxy.meng@gmail.com> | 2008-03-18 15:27:15 +0000 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2008-03-18 15:27:15 +0000 |
commit | 6544f48f038552973a552401cea5d4e8f1fc9c0a (patch) | |
tree | df001b9633d7c0cd7407cc0566e21917edf73d7b /libavutil/internal.h | |
parent | 38c669d853dfa60a73bf59695ff03e7104650623 (diff) | |
download | ffmpeg-6544f48f038552973a552401cea5d4e8f1fc9c0a.tar.gz |
Pure, const and malloc attributes to libavutil.
Patch by Zuxy Meng: zuxy meng gmail com
Original thread:
[FFmpeg-devel] [PATCH] Pure, const and malloc attributes to libavutil
Date: 03/18/2008 6:09 AM
Originally committed as revision 12489 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); } |