Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/mathops.h')
-rw-r--r--libavcodec/mathops.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h
index 1d573424f4..bad25afd45 100644
--- a/libavcodec/mathops.h
+++ b/libavcodec/mathops.h
@@ -224,4 +224,14 @@ static inline av_const unsigned int ff_sqrt(unsigned int a)
return b - (a < b * b);
}
+static inline int8_t ff_u8_to_s8(uint8_t a)
+{
+ union {
+ uint8_t u8;
+ int8_t s8;
+ } b;
+ b.u8 = a;
+ return b.s8;
+}
+
#endif /* AVCODEC_MATHOPS_H */