From 6544f48f038552973a552401cea5d4e8f1fc9c0a Mon Sep 17 00:00:00 2001 From: Zuxy Meng Date: Tue, 18 Mar 2008 15:27:15 +0000 Subject: 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 --- libavutil/internal.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libavutil/internal.h') 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); } -- cgit v1.2.3