|
|
|
@ -119,7 +119,7 @@ static inline av_const int av_clip(int a, int amin, int amax) |
|
|
|
|
static inline av_const uint8_t av_clip_uint8(int a) |
|
|
|
|
{ |
|
|
|
|
if (a&(~0xFF)) return (-a)>>31; |
|
|
|
|
else return a; |
|
|
|
|
else return a; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -130,7 +130,7 @@ static inline av_const uint8_t av_clip_uint8(int a) |
|
|
|
|
static inline av_const uint16_t av_clip_uint16(int a) |
|
|
|
|
{ |
|
|
|
|
if (a&(~0xFFFF)) return (-a)>>31; |
|
|
|
|
else return a; |
|
|
|
|
else return a; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -141,7 +141,7 @@ static inline av_const uint16_t av_clip_uint16(int a) |
|
|
|
|
static inline av_const int16_t av_clip_int16(int a) |
|
|
|
|
{ |
|
|
|
|
if ((a+0x8000) & ~0xFFFF) return (a>>31) ^ 0x7FFF; |
|
|
|
|
else return a; |
|
|
|
|
else return a; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -152,7 +152,7 @@ static inline av_const int16_t av_clip_int16(int a) |
|
|
|
|
static inline av_const int32_t av_clipl_int32(int64_t a) |
|
|
|
|
{ |
|
|
|
|
if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (a>>63) ^ 0x7FFFFFFF; |
|
|
|
|
else return a; |
|
|
|
|
else return a; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|