---
libavcodec/mathops.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h
index 8a2ce90..349dd00 100644
--- a/libavcodec/mathops.h
+++ b/libavcodec/mathops.h
@@ -224,4 +224,13 @@ 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 = { .u8 = a };
+ return b.s8;
+}
+
#endif /* AVCODEC_MATHOPS_H */
--
1.8.1.2
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel