summaryrefslogtreecommitdiff
path: root/libavutil/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/common.h')
-rw-r--r--libavutil/common.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/libavutil/common.h b/libavutil/common.h
index 6404076a13..5814297cf2 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -64,7 +64,7 @@ extern const uint8_t ff_log2_tab[256];
extern const uint8_t av_reverse[256];
-static inline av_const int av_log2_c(unsigned int v)
+static av_always_inline av_const int av_log2_c(unsigned int v)
{
int n = 0;
if (v & 0xffff0000) {
@@ -80,7 +80,7 @@ static inline av_const int av_log2_c(unsigned int v)
return n;
}
-static inline av_const int av_log2_16bit_c(unsigned int v)
+static av_always_inline av_const int av_log2_16bit_c(unsigned int v)
{
int n = 0;
if (v & 0xff00) {
@@ -107,7 +107,7 @@ static inline av_const int av_log2_16bit_c(unsigned int v)
* @param amax maximum value of the clip range
* @return clipped value
*/
-static inline av_const int av_clip_c(int a, int amin, int amax)
+static av_always_inline av_const int av_clip_c(int a, int amin, int amax)
{
if (a < amin) return amin;
else if (a > amax) return amax;
@@ -119,7 +119,7 @@ static inline av_const int av_clip_c(int a, int amin, int amax)
* @param a value to clip
* @return clipped value
*/
-static inline av_const uint8_t av_clip_uint8_c(int a)
+static av_always_inline av_const uint8_t av_clip_uint8_c(int a)
{
if (a&(~0xFF)) return (-a)>>31;
else return a;
@@ -130,7 +130,7 @@ static inline av_const uint8_t av_clip_uint8_c(int a)
* @param a value to clip
* @return clipped value
*/
-static inline av_const int8_t av_clip_int8_c(int a)
+static av_always_inline av_const int8_t av_clip_int8_c(int a)
{
if ((a+0x80) & ~0xFF) return (a>>31) ^ 0x7F;
else return a;
@@ -141,7 +141,7 @@ static inline av_const int8_t av_clip_int8_c(int a)
* @param a value to clip
* @return clipped value
*/
-static inline av_const uint16_t av_clip_uint16_c(int a)
+static av_always_inline av_const uint16_t av_clip_uint16_c(int a)
{
if (a&(~0xFFFF)) return (-a)>>31;
else return a;
@@ -152,7 +152,7 @@ static inline av_const uint16_t av_clip_uint16_c(int a)
* @param a value to clip
* @return clipped value
*/
-static inline av_const int16_t av_clip_int16_c(int a)
+static av_always_inline av_const int16_t av_clip_int16_c(int a)
{
if ((a+0x8000) & ~0xFFFF) return (a>>31) ^ 0x7FFF;
else return a;
@@ -163,7 +163,7 @@ static inline av_const int16_t av_clip_int16_c(int a)
* @param a value to clip
* @return clipped value
*/
-static inline av_const int32_t av_clipl_int32_c(int64_t a)
+static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a)
{
if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (a>>63) ^ 0x7FFFFFFF;
else return a;
@@ -176,7 +176,7 @@ static inline av_const int32_t av_clipl_int32_c(int64_t a)
* @param amax maximum value of the clip range
* @return clipped value
*/
-static inline av_const float av_clipf_c(float a, float amin, float amax)
+static av_always_inline av_const float av_clipf_c(float a, float amin, float amax)
{
if (a < amin) return amin;
else if (a > amax) return amax;
@@ -187,7 +187,7 @@ static inline av_const float av_clipf_c(float a, float amin, float amax)
* @param x value used to compute ceil(log2(x))
* @return computed ceiling of log2(x)
*/
-static inline av_const int av_ceil_log2_c(int x)
+static av_always_inline av_const int av_ceil_log2_c(int x)
{
return av_log2((x - 1) << 1);
}
@@ -197,7 +197,7 @@ static inline av_const int av_ceil_log2_c(int x)
* @param x value to count bits of
* @return the number of bits set to one in x
*/
-static inline av_const int av_popcount_c(uint32_t x)
+static av_always_inline av_const int av_popcount_c(uint32_t x)
{
x -= (x >> 1) & 0x55555555;
x = (x & 0x33333333) + ((x >> 2) & 0x33333333);