shithub: openh264

Download patch

ref: b6af402b178c61fffeb4e6a52c42e559cde5b968
parent: 3d532fff80597d355cb9939623447ed709425bed
author: ycqian <[email protected]>
date: Tue Dec 20 07:25:09 EST 2016

abs method change for speedup

--- a/codec/common/inc/macros.h
+++ b/codec/common/inc/macros.h
@@ -189,7 +189,11 @@
 #define WELS_SIGN(iX) ((int32_t)(iX) >> 31)
 #endif //WELS_SIGN
 #ifndef WELS_ABS
+#if 1
+#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
+#else
 #define WELS_ABS(iX) ((WELS_SIGN(iX) ^ (int32_t)(iX)) - WELS_SIGN(iX))
+#endif
 #endif //WELS_ABS
 
 // WELS_CLIP3