shithub: openh264

Download patch

ref: cc4507462b21e615a6328e99855bd8e5f659b065
parent: 0339cd51c59367f6d4ae37e22ad2b8388efe0e80
author: Martin Storsjö <martin@martin.st>
date: Thu Jan 23 13:57:00 EST 2014

Use int32_t instead of long_t in WELS_SIGN/WELS_ABS in the processing lib

This makes them match the same macros in the main decoder/encoder
libraries. long_t (which is typedeffed to long) actually is 64
bit on 64 bit unix platforms, which might not be what was
intended.

--- a/codec/processing/src/common/util.h
+++ b/codec/processing/src/common/util.h
@@ -67,8 +67,8 @@
 
 #define WELS_MAX(x, y)	((x) > (y) ? (x) : (y))
 #define WELS_MIN(x, y)	((x) < (y) ? (x) : (y))
-#define WELS_SIGN(a)	((long_t)(a) >> 31)
-#define WELS_ABS(a)		((WELS_SIGN(a) ^ (long_t)(a)) - WELS_SIGN(a))
+#define WELS_SIGN(a)	((int32_t)(a) >> 31)
+#define WELS_ABS(a)		((WELS_SIGN(a) ^ (int32_t)(a)) - WELS_SIGN(a))
 #define WELS_CLAMP(x, minv, maxv)  WELS_MIN(WELS_MAX(x, minv), maxv)
 
 #define ALIGNBYTES         (16)       /* Worst case is requiring alignment to an 16 byte boundary */