shithub: openh264

Download patch

ref: 723044837ab8702c2163334653652c5dea2df41e
parent: 43767cddb6c56c42c651d4b7934f47c8c574ad04
author: Martin Storsjö <martin@martin.st>
date: Wed Jun 3 05:54:03 EDT 2015

Convert tabs to spaces in defines

--- a/codec/common/inc/expand_pic.h
+++ b/codec/common/inc/expand_pic.h
@@ -46,7 +46,7 @@
 extern "C" {
 #endif//__cplusplus
 
-#define PADDING_LENGTH			32 // reference extension
+#define PADDING_LENGTH 32 // reference extension
 
 #if defined(X86_ASM)
 void ExpandPictureLuma_sse2 (uint8_t* pDst,
--- a/codec/common/inc/ls_defines.h
+++ b/codec/common/inc/ls_defines.h
@@ -116,15 +116,15 @@
 #endif /* !__GNUC__ */
 
 #ifndef INTD16
-#define INTD16	LD16
+#define INTD16 LD16
 #endif//INTD16
 
 #ifndef INTD32
-#define INTD32	LD32
+#define INTD32 LD32
 #endif//INTD32
 
 #ifndef INTD64
-#define INTD64	LD64
+#define INTD64 LD64
 #endif//INTD64
 
 #endif//___LD_ST_MACROS___
--- a/codec/common/inc/macros.h
+++ b/codec/common/inc/macros.h
@@ -70,7 +70,7 @@
 #if defined(_MSC_VER)
 
 #if(_MSC_VER < 1700)
-#define inline	__inline
+#define inline __inline
 #endif
 
 #define ALIGNED_DECLARE( type, var, n ) __declspec(align(n)) type var
@@ -82,51 +82,51 @@
 
 
 #ifndef WELS_ALIGN
-#define WELS_ALIGN(x, n)	(((x)+(n)-1)&~((n)-1))
+#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))
+#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
 #endif//WELS_MAX
 
 #ifndef WELS_MIN
-#define WELS_MIN(x, y)	((x) < (y) ? (x) : (y))
+#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
 #endif//WELS_MIN
 #else // Alternative implementation of WELS_MAX and WELS_MIN
 #ifndef WELS_MAX
-#define WELS_MAX(x, y)	((x) - (((x)-(y))&(((x)-(y))>>31)))
+#define WELS_MAX(x, y) ((x) - (((x)-(y))&(((x)-(y))>>31)))
 #endif//WELS_MAX
 
 #ifndef WELS_MIN
-#define WELS_MIN(x, y)	((y) + (((x)-(y))&(((x)-(y))>>31)))
+#define WELS_MIN(x, y) ((y) + (((x)-(y))&(((x)-(y))>>31)))
 #endif//WELS_MIN
 #endif // Alternative implementation of WELS_MAX and WELS_MIN
 
 
 #ifndef WELS_CEIL
-#define WELS_CEIL(x)	ceil(x)	// FIXME: low complexity instead of math library used
+#define WELS_CEIL(x) ceil(x) // FIXME: low complexity instead of math library used
 #endif//WELS_CEIL
 
 #ifndef WELS_FLOOR
-#define WELS_FLOOR(x)	floor(x)	// FIXME: low complexity instead of math library used
+#define WELS_FLOOR(x) floor(x)        // FIXME: low complexity instead of math library used
 #endif//WELS_FLOOR
 
 #ifndef WELS_ROUND
-#define WELS_ROUND(x)	((int32_t)(0.5+(x)))
+#define WELS_ROUND(x) ((int32_t)(0.5+(x)))
 #endif//WELS_ROUND
 
 #ifndef WELS_ROUND64
-#define WELS_ROUND64(x)	((int64_t)(0.5+(x)))
+#define WELS_ROUND64(x) ((int64_t)(0.5+(x)))
 #endif//WELS_ROUND
 
 #ifndef WELS_DIV_ROUND
-#define WELS_DIV_ROUND(x,y)	((int32_t)((y)==0?((x)/((y)+1)):(((y)/2+(x))/(y))))
+#define WELS_DIV_ROUND(x,y) ((int32_t)((y)==0?((x)/((y)+1)):(((y)/2+(x))/(y))))
 #endif//WELS_DIV_ROUND
 
 #ifndef WELS_DIV_ROUND64
-#define WELS_DIV_ROUND64(x,y)	((int64_t)((y)==0?((x)/((y)+1)):(((y)/2+(x))/(y))))
+#define WELS_DIV_ROUND64(x,y) ((int64_t)((y)==0?((x)/((y)+1)):(((y)/2+(x))/(y))))
 #endif//WELS_DIV_ROUND64
 
 #define WELS_NON_ZERO_COUNT_AVERAGE(nC,nA,nB) {         \
@@ -253,7 +253,7 @@
 
 }
 
-#define CLIP3_QP_0_51(q)		WELS_CLIP3(q, 0, 51)	// ((q) < (0) ? (0) : ((q) > (51) ? (51) : (q)))
+#define CLIP3_QP_0_51(q) WELS_CLIP3(q, 0, 51) // ((q) < (0) ? (0) : ((q) > (51) ? (51) : (q)))
 #define   CALC_BI_STRIDE(width,bitcount)  ((((width * bitcount) + 31) & ~31) >> 3)
 
 
--- a/codec/common/inc/typedefs.h
+++ b/codec/common/inc/typedefs.h
@@ -80,7 +80,7 @@
 #ifdef EPSN
 #undef EPSN
 #endif//EPSN
-#define EPSN	  (0.000001f) // (1e-6)	// desired float precision
+#define EPSN (0.000001f) // (1e-6) // desired float precision
 
 #endif //WELS_TYPE_DEFINES_H__
 
--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -42,7 +42,7 @@
 #ifdef ONLY_ENC_FRAMES_NUM
 #undef ONLY_ENC_FRAMES_NUM
 #endif//ONLY_ENC_FRAMES_NUM
-#define ONLY_ENC_FRAMES_NUM		INT_MAX // 2, INT_MAX	// type the num you try to encode here, 2, 10, etc
+#define ONLY_ENC_FRAMES_NUM INT_MAX // 2, INT_MAX // type the num you try to encode here, 2, 10, etc
 
 #if defined (WINDOWS_PHONE)
 float   g_fFPS           = 0.0;
--- a/codec/decoder/core/inc/error_code.h
+++ b/codec/decoder/core/inc/error_code.h
@@ -56,7 +56,7 @@
  * ERR_NO = (ERR_LEVEL_FROM (HIGH WORD) << 16) | (ERR_INFO_FROM (LOW WORD))
  *
  */
-#define GENERATE_ERROR_NO(iErrLevel, iErrInfo)	((iErrLevel << 16) | (iErrInfo & 0xFFFF))
+#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
 #define ERR_INVALID_INTRA4X4_MODE -1
 
 /* ERR_LEVEL */
--- a/codec/decoder/core/inc/fmo.h
+++ b/codec/decoder/core/inc/fmo.h
@@ -47,7 +47,7 @@
 namespace WelsDec {
 
 #ifndef MB_XY_T
-#define MB_XY_T	int16_t
+#define MB_XY_T int16_t
 #endif//MB_XY_T
 
 /*!
--- a/codec/decoder/core/inc/wels_common_basis.h
+++ b/codec/decoder/core/inc/wels_common_basis.h
@@ -86,8 +86,8 @@
 #define LUMA_DC_AC_INTRA_8  17
 #define LUMA_DC_AC_INTER_8  18
 
-#define SHIFT_BUFFER(pBitsCache)	{	pBitsCache->pBuf+=2; pBitsCache->uiRemainBits += 16; pBitsCache->uiCache32Bit |= (((pBitsCache->pBuf[2] << 8) | pBitsCache->pBuf[3]) << (32 - pBitsCache->uiRemainBits));	}
-#define POP_BUFFER(pBitsCache, iCount)	{ pBitsCache->uiCache32Bit <<= iCount;	pBitsCache->uiRemainBits -= iCount;	}
+#define SHIFT_BUFFER(pBitsCache)        { pBitsCache->pBuf+=2; pBitsCache->uiRemainBits += 16; pBitsCache->uiCache32Bit |= (((pBitsCache->pBuf[2] << 8) | pBitsCache->pBuf[3]) << (32 - pBitsCache->uiRemainBits)); }
+#define POP_BUFFER(pBitsCache, iCount)  { pBitsCache->uiCache32Bit <<= iCount;  pBitsCache->uiRemainBits -= iCount; }
 
 static const uint8_t g_kuiZigzagScan[16] = { //4*4block residual zig-zag scan order
     0,  1,  4,  8,
--- a/codec/encoder/core/inc/as264_common.h
+++ b/codec/encoder/core/inc/as264_common.h
@@ -55,8 +55,8 @@
 /****************************************************************************
  * Options for optimization, not change bitrate
  ****************************************************************************/
-//#undef	X86_ASM			// X86_ASM is included in project preprocessor definitions, undef it when need to disable asm code
-#define SINGLE_REF_FRAME		// need to disable it when use multi-reference
+//#undef        X86_ASM             // X86_ASM is included in project preprocessor definitions, undef it when need to disable asm code
+#define SINGLE_REF_FRAME            // need to disable it when use multi-reference
 
 
 #if defined(WELS_TESTBED)	    // for SGE testing
--- a/codec/encoder/core/src/encode_mb_aux.cpp
+++ b/codec/encoder/core/src/encode_mb_aux.cpp
@@ -160,7 +160,7 @@
  ****************************************************************************/
 #define WELS_ABS_LC(a) ((iSign ^ (int32_t)(a)) - iSign)
 #define NEW_QUANT(pDct, iFF, iMF) (((iFF)+ WELS_ABS_LC(pDct))*(iMF)) >>16
-#define WELS_NEW_QUANT(pDct,iFF,iMF)	WELS_ABS_LC(NEW_QUANT(pDct, iFF, iMF))
+#define WELS_NEW_QUANT(pDct,iFF,iMF) WELS_ABS_LC(NEW_QUANT(pDct, iFF, iMF))
 void WelsQuant4x4_c (int16_t* pDct, const int16_t* pFF,  const int16_t* pMF) {
   int32_t i, j, iSign;
   for (i = 0; i < 16; i += 4) {
--- a/codec/processing/src/common/util.h
+++ b/codec/processing/src/common/util.h
@@ -70,15 +70,15 @@
 #define MB_TYPE_INTRA                     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA_PCM)
 #define IS_INTRA(type) ((type)&MB_TYPE_INTRA)
 
-#define WELS_MAX(x, y)	((x) > (y) ? (x) : (y))
-#define WELS_MIN(x, y)	((x) < (y) ? (x) : (y))
+#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
+#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
 
 #ifndef WELS_SIGN
-#define WELS_SIGN(a)	((int32_t)(a) >> 31)
+#define WELS_SIGN(a) ((int32_t)(a) >> 31)
 #endif
 
 #ifndef WELS_ABS
-#define WELS_ABS(a)		((WELS_SIGN(a) ^ (int32_t)(a)) - WELS_SIGN(a))
+#define WELS_ABS(a) ((WELS_SIGN(a) ^ (int32_t)(a)) - WELS_SIGN(a))
 #endif
 
 #define WELS_CLAMP(x, minv, maxv)  WELS_MIN(WELS_MAX(x, minv), maxv)
--- a/codec/processing/src/denoise/denoise_filter.cpp
+++ b/codec/processing/src/denoise/denoise_filter.cpp
@@ -83,9 +83,9 @@
 1   2   4   2   1
 1   1   2   1   1
 ***************************************************************************/
-#define SUM_LINE1(pSample)	(pSample[0] +(pSample[1]) +(pSample[2]<<1)  + pSample[3] + pSample[4])
-#define SUM_LINE2(pSample)	(pSample[0] +(pSample[1]<<1) +(pSample[2]<<2)  +(pSample[3]<<1) +pSample[4])
-#define SUM_LINE3(pSample)	((pSample[0]<<1) +(pSample[1]<<2) +(pSample[2]*20)  +(pSample[3]<<2) +(pSample[4]<<1))
+#define SUM_LINE1(pSample)       (pSample[0]     +(pSample[1])    +(pSample[2]<<1)  + pSample[3]     + pSample[4])
+#define SUM_LINE2(pSample)       (pSample[0]     +(pSample[1]<<1) +(pSample[2]<<2)  +(pSample[3]<<1) + pSample[4])
+#define SUM_LINE3(pSample)      ((pSample[0]<<1) +(pSample[1]<<2) +(pSample[2]*20)  +(pSample[3]<<2) +(pSample[4]<<1))
 void WaverageChromaFilter8_c (uint8_t* pSample, int32_t iStride) {
   int32_t sum;
   uint8_t* pStartPixels = pSample - UV_WINDOWS_RADIUS * iStride - UV_WINDOWS_RADIUS;
--- a/test/encoder/EncUT_EncoderMbAux.cpp
+++ b/test/encoder/EncUT_EncoderMbAux.cpp
@@ -277,7 +277,7 @@
 #endif
 #define WELS_ABS_LC(a) ((sign ^ (int32_t)(a)) - sign)
 #define NEW_QUANT(pDct, ff, mf) (((ff)+ WELS_ABS_LC(pDct))*(mf)) >>16
-#define WELS_NEW_QUANT(pDct,ff,mf)	WELS_ABS_LC(NEW_QUANT(pDct, ff, mf))
+#define WELS_NEW_QUANT(pDct,ff,mf) WELS_ABS_LC(NEW_QUANT(pDct, ff, mf))
 void WelsQuantFour4x4MaxAnchor (int16_t* pDct, int16_t* ff,  int16_t* mf, int16_t* max) {
   int32_t i, j, k, sign;
   int16_t max_abs;