diff options
author | Mans Rullgard <mans@mansr.com> | 2012-08-11 04:08:15 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-08-13 14:51:52 +0100 |
commit | 87fa05a0dae629cdad390adaa1054db3f4ecc3c7 (patch) | |
tree | fd81961f3f158c968ee5a98c656d2db650bfc206 | |
parent | 69665bd6f40f02ecf822f80c05dd2765da2dfa7b (diff) | |
download | ffmpeg-87fa05a0dae629cdad390adaa1054db3f4ecc3c7.tar.gz |
ARM: intmath: use native-size return types for clipping functions
This avoids having the compiler redundantly mask the values to
the smaller size.
Signed-off-by: Mans Rullgard <mans@mansr.com>
-rw-r--r-- | libavutil/arm/intmath.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavutil/arm/intmath.h b/libavutil/arm/intmath.h index d5a343c95f..88e9c26b11 100644 --- a/libavutil/arm/intmath.h +++ b/libavutil/arm/intmath.h @@ -44,7 +44,7 @@ static av_always_inline av_const int FASTDIV(int a, int b) } #define av_clip_uint8 av_clip_uint8_arm -static av_always_inline av_const uint8_t av_clip_uint8_arm(int a) +static av_always_inline av_const unsigned av_clip_uint8_arm(int a) { unsigned x; __asm__ ("usat %0, #8, %1" : "=r"(x) : "r"(a)); @@ -52,15 +52,15 @@ static av_always_inline av_const uint8_t av_clip_uint8_arm(int a) } #define av_clip_int8 av_clip_int8_arm -static av_always_inline av_const uint8_t av_clip_int8_arm(int a) +static av_always_inline av_const int av_clip_int8_arm(int a) { - unsigned x; + int x; __asm__ ("ssat %0, #8, %1" : "=r"(x) : "r"(a)); return x; } #define av_clip_uint16 av_clip_uint16_arm -static av_always_inline av_const uint16_t av_clip_uint16_arm(int a) +static av_always_inline av_const unsigned av_clip_uint16_arm(int a) { unsigned x; __asm__ ("usat %0, #16, %1" : "=r"(x) : "r"(a)); @@ -68,7 +68,7 @@ static av_always_inline av_const uint16_t av_clip_uint16_arm(int a) } #define av_clip_int16 av_clip_int16_arm -static av_always_inline av_const int16_t av_clip_int16_arm(int a) +static av_always_inline av_const int av_clip_int16_arm(int a) { int x; __asm__ ("ssat %0, #16, %1" : "=r"(x) : "r"(a)); |