shithub: openh264

Download patch

ref: b555404fe1652d7a22a896bb6ccb91988aae2502
parent: fd3fde62d9c97dd1aa204d26f427b18184cc2b9e
parent: b6af402b178c61fffeb4e6a52c42e559cde5b968
author: huili2 <[email protected]>
date: Tue Jan 10 04:11:13 EST 2017

Merge pull request #2636 from ycqian/Abs_method_speedup

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