summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-20 17:16:20 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-20 17:20:16 +0200
commitd82d11397f613f8881328585b7442f29aec462c1 (patch)
tree4a4a62863a560c5906b85950cb1768cb89917a1f
parentf85bc147fb87de048ccc5767e186ac59ec0284ef (diff)
downloadffmpeg-streaming-d82d11397f613f8881328585b7442f29aec462c1.zip
ffmpeg-streaming-d82d11397f613f8881328585b7442f29aec462c1.tar.gz
avutil/arm/intmath: return int for uint8 / uint16 clip
The C functions return uint8/16_t but that is effectively int not unsigned int Fixes fate-filter-tblend We do not return uint8/16_t as that would require the compiler to truncate the values, slowing it down. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavutil/arm/intmath.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavutil/arm/intmath.h b/libavutil/arm/intmath.h
index 3216af0..65e42c5 100644
--- a/libavutil/arm/intmath.h
+++ b/libavutil/arm/intmath.h
@@ -31,9 +31,9 @@
#if HAVE_ARMV6_INLINE
#define av_clip_uint8 av_clip_uint8_arm
-static av_always_inline av_const unsigned av_clip_uint8_arm(int a)
+static av_always_inline av_const int av_clip_uint8_arm(int a)
{
- unsigned x;
+ int x;
__asm__ ("usat %0, #8, %1" : "=r"(x) : "r"(a));
return x;
}
@@ -47,9 +47,9 @@ static av_always_inline av_const int av_clip_int8_arm(int a)
}
#define av_clip_uint16 av_clip_uint16_arm
-static av_always_inline av_const unsigned av_clip_uint16_arm(int a)
+static av_always_inline av_const int av_clip_uint16_arm(int a)
{
- unsigned x;
+ int x;
__asm__ ("usat %0, #16, %1" : "=r"(x) : "r"(a));
return x;
}
OpenPOWER on IntegriCloud