shithub: openh264

Download patch

ref: d932509994efbd4dd9e2d07a3117b531ab51ce98
parent: 232ba77a1e9942aa51a95d122cc50eb47f43093c
author: Martin Storsjö <[email protected]>
date: Fri Jan 24 10:23:26 EST 2014

Move the definition of WELS_ALIGN out from the #if

Both versions of WELS_ALIGN are identical, so there's no need to
be able to switch between the two.

--- a/codec/common/macros.h
+++ b/codec/common/macros.h
@@ -99,11 +99,12 @@
 #endif
 
 
-#if 1
 #ifndef	WELS_ALIGN
 #define WELS_ALIGN(x, n)	(((x)+(n)-1)&~((n)-1))
 #endif//WELS_ALIGN
 
+
+#if 1 // Alternative implementation of WELS_MAX and WELS_MIN
 #ifndef WELS_MAX
 #define WELS_MAX(x, y)	((x) > (y) ? (x) : (y))
 #endif//WELS_MAX
@@ -111,12 +112,7 @@
 #ifndef WELS_MIN
 #define WELS_MIN(x, y)	((x) < (y) ? (x) : (y))
 #endif//WELS_MIN
-#else
-
-#ifndef	WELS_ALIGN
-#define WELS_ALIGN(x, n)	(((x)+(n)-1)&~((n)-1))
-#endif//WELS_ALIGN
-
+#else // Alternative implementation of WELS_MAX and WELS_MIN
 #ifndef WELS_MAX
 #define WELS_MAX(x, y)	((x) - (((x)-(y))&(((x)-(y))>>31)))
 #endif//WELS_MAX
@@ -124,8 +120,8 @@
 #ifndef WELS_MIN
 #define WELS_MIN(x, y)	((y) + (((x)-(y))&(((x)-(y))>>31)))
 #endif//WELS_MIN
+#endif // Alternative implementation of WELS_MAX and WELS_MIN
 
-#endif
 
 #ifndef WELS_CEIL
 #define WELS_CEIL(x)	ceil(x)	// FIXME: low complexity instead of math library used