shithub: openh264

Download patch

ref: ca51ee0f442a12113630faa2514be609ca6730aa
parent: 51efa57a3d29f0e513bd7714a4bff9b755ae383d
author: Martin Storsjö <[email protected]>
date: Fri May 15 07:45:34 EDT 2015

Remove tabs where a simple space is just enough

--- a/codec/common/inc/macros.h
+++ b/codec/common/inc/macros.h
@@ -152,14 +152,14 @@
   int32_t iMin = iX, iMax = iX;
 
   if (iY < iMin)
-    iMin	= iY;
+    iMin = iY;
   else
     iMax = iY;
 
   if (iZ < iMin)
-    iMin	= iZ;
+    iMin = iZ;
   else if (iZ > iMax)
-    iMax	= iZ;
+    iMax = iZ;
 
   return (iX + iY + iZ) - (iMin + iMax);
 }
--- a/codec/common/src/WelsThreadLib.cpp
+++ b/codec/common/src/WelsThreadLib.cpp
@@ -417,7 +417,7 @@
     WELS_EVENT* event_list, WELS_EVENT* master_event) {
   uint32_t nIdx = 0;
   uint32_t uiCountSignals = 0;
-  uint32_t uiSignalFlag	= 0;	// UGLY: suppose maximal event number up to 32
+  uint32_t uiSignalFlag = 0;    // UGLY: suppose maximal event number up to 32
 
   if (nCount == 0 || nCount > (sizeof (uint32_t) << 3))
     return WELS_THREAD_ERROR_WAIT_FAILED;
--- a/codec/common/src/memory_align.cpp
+++ b/codec/common/src/memory_align.cpp
@@ -49,9 +49,9 @@
 #endif//MEMORY_MONITOR
 {
   if ((kuiCacheLineSize == 0) || (kuiCacheLineSize & 0x0f))
-    m_nCacheLineSize	= 0x10;
+    m_nCacheLineSize = 0x10;
   else
-    m_nCacheLineSize	= kuiCacheLineSize;
+    m_nCacheLineSize = kuiCacheLineSize;
 }
 
 CMemoryAlign::~CMemoryAlign() {
--- a/codec/common/src/utils.cpp
+++ b/codec/common/src/utils.cpp
@@ -115,7 +115,7 @@
   for (y = 0; y < kiHeight; ++ y) {	// OPTable !!
     for (x = 0; x < kiWidth; ++ x) {
       const int32_t kiT = pTar[y * kiTarStride + x] - pRef[y * kiRefStride + x];
-      iSqe	+= kiT * kiT;
+      iSqe += kiT * kiT;
     }
   }
   if (0 == iSqe) {
--- a/codec/common/src/welsCodecTrace.cpp
+++ b/codec/common/src/welsCodecTrace.cpp
@@ -90,7 +90,7 @@
 
 void welsCodecTrace::SetTraceLevel (const int32_t iLevel) {
   if (iLevel >= 0)
-    m_iTraceLevel	= iLevel;
+    m_iTraceLevel = iLevel;
 }
 
 void welsCodecTrace::SetTraceCallback (WelsTraceCallback func) {
--- a/codec/console/common/src/read_config.cpp
+++ b/codec/console/common/src/read_config.cpp
@@ -90,7 +90,7 @@
   bool bCommentFlag = false;
 
   while (n < kiValSize) {
-    pVal[n]	= "";
+    pVal[n] = "";
     ++ n;
   }
 
@@ -109,7 +109,7 @@
           break;
         if (! (*strTags).empty()) {
           ++ nTagNum;
-          strTags	= &pVal[nTagNum];
+          strTags = &pVal[nTagNum];
         }
       } else
         *strTags += kCh;
--- a/codec/console/dec/src/h264dec.cpp
+++ b/codec/console/dec/src/h264dec.cpp
@@ -362,13 +362,13 @@
         long nRd = cReadCfg.ReadLine (&strTag[0]);
         if (nRd > 0) {
           if (strTag[0].compare ("InputFile") == 0) {
-            strInputFile	= strTag[1];
+            strInputFile = strTag[1];
           } else if (strTag[0].compare ("OutputFile") == 0) {
-            strOutputFile	= strTag[1];
+            strOutputFile = strTag[1];
           } else if (strTag[0].compare ("RestructionFile") == 0) {
-            strReconFile	= strTag[1];
+            strReconFile = strTag[1];
             int32_t iLen = (int32_t)strReconFile.length();
-            sDecParam.pFileNameRestructed	= new char[iLen + 1];
+            sDecParam.pFileNameRestructed = new char[iLen + 1];
             if (sDecParam.pFileNameRestructed != NULL) {
               sDecParam.pFileNameRestructed[iLen] = 0;
             }
@@ -375,13 +375,13 @@
 
             strncpy (sDecParam.pFileNameRestructed, strReconFile.c_str(), iLen); //confirmed_safe_unsafe_usage
           } else if (strTag[0].compare ("TargetDQID") == 0) {
-            sDecParam.uiTargetDqLayer	= (uint8_t)atol (strTag[1].c_str());
+            sDecParam.uiTargetDqLayer = (uint8_t)atol (strTag[1].c_str());
           } else if (strTag[0].compare ("OutColorFormat") == 0) {
             sDecParam.eOutputColorFormat = (EVideoFormatType) atoi (strTag[1].c_str());
           } else if (strTag[0].compare ("ErrorConcealmentIdc") == 0) {
             sDecParam.eEcActiveIdc = (ERROR_CON_IDC)atol (strTag[1].c_str());
           } else if (strTag[0].compare ("CPULoad") == 0) {
-            sDecParam.uiCpuLoad	= (uint32_t)atol (strTag[1].c_str());
+            sDecParam.uiCpuLoad = (uint32_t)atol (strTag[1].c_str());
           } else if (strTag[0].compare ("VideoBitstreamType") == 0) {
             sDecParam.sVideoProperty.eVideoBsType = (VIDEO_BITSTREAM_TYPE)atol (strTag[1].c_str());
           }
@@ -393,17 +393,17 @@
       }
     } else if (strstr (pArgV[1],
                        ".264")) { // no output dump yuv file, just try to render the decoded pictures //confirmed_safe_unsafe_usage
-      strInputFile	= pArgV[1];
-      sDecParam.eOutputColorFormat          = videoFormatI420;
-      sDecParam.uiTargetDqLayer	          = (uint8_t) - 1;
+      strInputFile = pArgV[1];
+      sDecParam.eOutputColorFormat = videoFormatI420;
+      sDecParam.uiTargetDqLayer = (uint8_t) - 1;
       sDecParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
       sDecParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
     }
   } else { //iArgC > 2
-    strInputFile	= pArgV[1];
-    strOutputFile	= pArgV[2];
-    sDecParam.eOutputColorFormat	= videoFormatI420;
-    sDecParam.uiTargetDqLayer	= (uint8_t) - 1;
+    strInputFile = pArgV[1];
+    strOutputFile = pArgV[2];
+    sDecParam.eOutputColorFormat = videoFormatI420;
+    sDecParam.uiTargetDqLayer = (uint8_t) - 1;
     sDecParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
     sDecParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
     if (iArgC > 3) {
--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -138,9 +138,9 @@
       if (strTag[0].empty())
         continue;
       if (strTag[0].compare ("FrameWidth") == 0) {
-        pDLayer->iVideoWidth	= atoi (strTag[1].c_str());
+        pDLayer->iVideoWidth = atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("FrameHeight") == 0) {
-        pDLayer->iVideoHeight	= atoi (strTag[1].c_str());
+        pDLayer->iVideoHeight = atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("FrameRateOut") == 0) {
         pDLayer->fFrameRate = (float)atof (strTag[1].c_str());
       } else if (strTag[0].compare ("ReconFile") == 0) {
@@ -150,11 +150,11 @@
         sFileSet.sRecFileName[iLayer][kiLen] = '\0';
         strncpy (sFileSet.sRecFileName[iLayer], strTag[1].c_str(), kiLen);	// confirmed_safe_unsafe_usage
       } else if (strTag[0].compare ("ProfileIdc") == 0) {
-        pDLayer->uiProfileIdc	= (EProfileIdc)atoi (strTag[1].c_str());
+        pDLayer->uiProfileIdc = (EProfileIdc)atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("FRExt") == 0) {
 //        pDLayer->frext_mode = (bool)atoi(strTag[1].c_str());
       } else if (strTag[0].compare ("SpatialBitrate") == 0) {
-        pDLayer->iSpatialBitrate	= 1000 * atoi (strTag[1].c_str());
+        pDLayer->iSpatialBitrate = 1000 * atoi (strTag[1].c_str());
         if (pSvcParam.iRCMode != RC_OFF_MODE) {
           if (pDLayer->iSpatialBitrate <= 0) {
             fprintf (stderr, "Invalid spatial bitrate(%d) in dependency layer #%d.\n", pDLayer->iSpatialBitrate, iLayer);
@@ -181,11 +181,11 @@
           }
         }
       } else if (strTag[0].compare ("InitialQP") == 0) {
-        sLayerCtx.iDLayerQp	= atoi (strTag[1].c_str());
+        sLayerCtx.iDLayerQp = atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("SliceMode") == 0) {
-        sLayerCtx.sSliceCfg.uiSliceMode	= (SliceModeEnum)atoi (strTag[1].c_str());
+        sLayerCtx.sSliceCfg.uiSliceMode = (SliceModeEnum)atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("SliceSize") == 0) { //SM_DYN_SLICE
-        sLayerCtx.sSliceCfg.sSliceArgument.uiSliceSizeConstraint	= atoi (strTag[1].c_str());
+        sLayerCtx.sSliceCfg.sSliceArgument.uiSliceSizeConstraint = atoi (strTag[1].c_str());
         continue;
       } else if (strTag[0].compare ("SliceNum") == 0) {
         sLayerCtx.sSliceCfg.sSliceArgument.uiSliceNum = atoi (strTag[1].c_str());
@@ -225,21 +225,21 @@
         pSrcPic->iPicHeight = atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("InputFile") == 0) {
         if (strTag[1].length() > 0)
-          sFileSet.strSeqFile	= strTag[1];
+          sFileSet.strSeqFile = strTag[1];
       } else if (strTag[0].compare ("OutputFile") == 0) {
-        sFileSet.strBsFile	= strTag[1];
+        sFileSet.strBsFile = strTag[1];
       } else if (strTag[0].compare ("MaxFrameRate") == 0) {
-        pSvcParam.fMaxFrameRate	= (float)atof (strTag[1].c_str());
+        pSvcParam.fMaxFrameRate = (float)atof (strTag[1].c_str());
       } else if (strTag[0].compare ("FramesToBeEncoded") == 0) {
-        sFileSet.uiFrameToBeCoded	= atoi (strTag[1].c_str());
+        sFileSet.uiFrameToBeCoded = atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("TemporalLayerNum") == 0) {
-        pSvcParam.iTemporalLayerNum	= atoi (strTag[1].c_str());
+        pSvcParam.iTemporalLayerNum = atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("IntraPeriod") == 0) {
-        pSvcParam.uiIntraPeriod	= atoi (strTag[1].c_str());
+        pSvcParam.uiIntraPeriod = atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("MaxNalSize") == 0) {
         pSvcParam.uiMaxNalSize = atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("SpsPpsIDStrategy") == 0) {
-        int32_t iValue	= atoi (strTag[1].c_str());
+        int32_t iValue = atoi (strTag[1].c_str());
         switch (iValue) {
           case 0:
             pSvcParam.eSpsPpsIdStrategy  = CONSTANT_ID;
@@ -261,13 +261,13 @@
             break;
         }
       } else if (strTag[0].compare ("EnableScalableSEI") == 0) {
-        pSvcParam.bEnableSSEI	= atoi (strTag[1].c_str()) ? true : false;
+        pSvcParam.bEnableSSEI = atoi (strTag[1].c_str()) ? true : false;
       } else if (strTag[0].compare ("EnableFrameCropping") == 0) {
         pSvcParam.bEnableFrameCroppingFlag = (atoi (strTag[1].c_str()) != 0);
       } else if (strTag[0].compare ("EntropyCodingModeFlag") == 0) {
         pSvcParam.iEntropyCodingModeFlag = (atoi (strTag[1].c_str()) != 0);
       } else if (strTag[0].compare ("LoopFilterDisableIDC") == 0) {
-        pSvcParam.iLoopFilterDisableIdc	= (int8_t)atoi (strTag[1].c_str());
+        pSvcParam.iLoopFilterDisableIdc = (int8_t)atoi (strTag[1].c_str());
         if (pSvcParam.iLoopFilterDisableIdc > 6 || pSvcParam.iLoopFilterDisableIdc < 0) {
           fprintf (stderr, "Invalid parameter in iLoopFilterDisableIdc: %d.\n", pSvcParam.iLoopFilterDisableIdc);
           iRet = 1;
@@ -274,58 +274,58 @@
           break;
         }
       } else if (strTag[0].compare ("LoopFilterAlphaC0Offset") == 0) {
-        pSvcParam.iLoopFilterAlphaC0Offset	= (int8_t)atoi (strTag[1].c_str());
+        pSvcParam.iLoopFilterAlphaC0Offset = (int8_t)atoi (strTag[1].c_str());
         if (pSvcParam.iLoopFilterAlphaC0Offset < -6)
-          pSvcParam.iLoopFilterAlphaC0Offset	= -6;
+          pSvcParam.iLoopFilterAlphaC0Offset = -6;
         else if (pSvcParam.iLoopFilterAlphaC0Offset > 6)
-          pSvcParam.iLoopFilterAlphaC0Offset	= 6;
+          pSvcParam.iLoopFilterAlphaC0Offset = 6;
       } else if (strTag[0].compare ("LoopFilterBetaOffset") == 0) {
-        pSvcParam.iLoopFilterBetaOffset	= (int8_t)atoi (strTag[1].c_str());
+        pSvcParam.iLoopFilterBetaOffset = (int8_t)atoi (strTag[1].c_str());
         if (pSvcParam.iLoopFilterBetaOffset < -6)
-          pSvcParam.iLoopFilterBetaOffset	= -6;
+          pSvcParam.iLoopFilterBetaOffset = -6;
         else if (pSvcParam.iLoopFilterBetaOffset > 6)
-          pSvcParam.iLoopFilterBetaOffset	= 6;
+          pSvcParam.iLoopFilterBetaOffset = 6;
       } else if (strTag[0].compare ("MultipleThreadIdc") == 0) {
         // # 0: auto(dynamic imp. internal encoder); 1: multiple threads imp. disabled; > 1: count number of threads;
-        pSvcParam.iMultipleThreadIdc	= atoi (strTag[1].c_str());
+        pSvcParam.iMultipleThreadIdc = atoi (strTag[1].c_str());
         if (pSvcParam.iMultipleThreadIdc < 0)
           pSvcParam.iMultipleThreadIdc = 0;
         else if (pSvcParam.iMultipleThreadIdc > MAX_THREADS_NUM)
           pSvcParam.iMultipleThreadIdc = MAX_THREADS_NUM;
       } else if (strTag[0].compare ("RCMode") == 0) {
-        pSvcParam.iRCMode	= (RC_MODES) atoi (strTag[1].c_str());
+        pSvcParam.iRCMode = (RC_MODES) atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("TargetBitrate") == 0) {
-        pSvcParam.iTargetBitrate	= 1000 * atoi (strTag[1].c_str());
+        pSvcParam.iTargetBitrate = 1000 * atoi (strTag[1].c_str());
         if ((pSvcParam.iRCMode != RC_OFF_MODE) && pSvcParam.iTargetBitrate <= 0) {
           fprintf (stderr, "Invalid target bitrate setting due to RC enabled. Check TargetBitrate field please!\n");
           return 1;
         }
       } else if (strTag[0].compare ("MaxOverallBitrate") == 0) {
-        pSvcParam.iMaxBitrate	= 1000 * atoi (strTag[1].c_str());
+        pSvcParam.iMaxBitrate = 1000 * atoi (strTag[1].c_str());
         if ((pSvcParam.iRCMode != RC_OFF_MODE) && pSvcParam.iMaxBitrate < 0) {
           fprintf (stderr, "Invalid max overall bitrate setting due to RC enabled. Check MaxOverallBitrate field please!\n");
           return 1;
         }
       } else if (strTag[0].compare ("EnableDenoise") == 0) {
-        pSvcParam.bEnableDenoise	= atoi (strTag[1].c_str()) ? true : false;
+        pSvcParam.bEnableDenoise = atoi (strTag[1].c_str()) ? true : false;
       } else if (strTag[0].compare ("EnableSceneChangeDetection") == 0) {
-        pSvcParam.bEnableSceneChangeDetect	= atoi (strTag[1].c_str()) ? true : false;
+        pSvcParam.bEnableSceneChangeDetect = atoi (strTag[1].c_str()) ? true : false;
       } else if (strTag[0].compare ("EnableBackgroundDetection") == 0) {
-        pSvcParam.bEnableBackgroundDetection	= atoi (strTag[1].c_str()) ? true : false;
+        pSvcParam.bEnableBackgroundDetection = atoi (strTag[1].c_str()) ? true : false;
       } else if (strTag[0].compare ("EnableAdaptiveQuantization") == 0) {
-        pSvcParam.bEnableAdaptiveQuant	= atoi (strTag[1].c_str()) ? true : false;
+        pSvcParam.bEnableAdaptiveQuant = atoi (strTag[1].c_str()) ? true : false;
       } else if (strTag[0].compare ("EnableFrameSkip") == 0) {
-        pSvcParam.bEnableFrameSkip	= atoi (strTag[1].c_str()) ? true : false;
+        pSvcParam.bEnableFrameSkip = atoi (strTag[1].c_str()) ? true : false;
       } else if (strTag[0].compare ("EnableLongTermReference") == 0) {
-        pSvcParam.bEnableLongTermReference	= atoi (strTag[1].c_str()) ? true : false;
+        pSvcParam.bEnableLongTermReference = atoi (strTag[1].c_str()) ? true : false;
       } else if (strTag[0].compare ("LongTermReferenceNumber") == 0) {
         pSvcParam.iLTRRefNum = atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("LtrMarkPeriod") == 0) {
-        pSvcParam.iLtrMarkPeriod	= (uint32_t)atoi (strTag[1].c_str());
+        pSvcParam.iLtrMarkPeriod = (uint32_t)atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("LosslessLink") == 0) {
-        pSvcParam.bIsLosslessLink	= atoi (strTag[1].c_str()) ? true : false;
+        pSvcParam.bIsLosslessLink = atoi (strTag[1].c_str()) ? true : false;
       } else if (strTag[0].compare ("NumLayers") == 0) {
-        pSvcParam.iSpatialLayerNum	= (int8_t)atoi (strTag[1].c_str());
+        pSvcParam.iSpatialLayerNum = (int8_t)atoi (strTag[1].c_str());
         if (pSvcParam.iSpatialLayerNum > MAX_DEPENDENCY_LAYER || pSvcParam.iSpatialLayerNum <= 0) {
           fprintf (stderr, "Invalid parameter in iSpatialLayerNum: %d.\n", pSvcParam.iSpatialLayerNum);
           iRet = 1;
@@ -333,16 +333,16 @@
         }
       } else if (strTag[0].compare ("LayerCfg") == 0) {
         if (strTag[1].length() > 0)
-          sFileSet.strLayerCfgFile[iLayerCount]	= strTag[1];
-//				pSvcParam.sDependencyLayers[iLayerCount].uiDependencyId	= iLayerCount;
+          sFileSet.strLayerCfgFile[iLayerCount] = strTag[1];
+//          pSvcParam.sDependencyLayers[iLayerCount].uiDependencyId = iLayerCount;
         ++ iLayerCount;
       } else if (strTag[0].compare ("PrefixNALAddingCtrl") == 0) {
         int ctrl_flag = atoi (strTag[1].c_str());
         if (ctrl_flag > 1)
-          ctrl_flag	= 1;
+          ctrl_flag = 1;
         else if (ctrl_flag < 0)
-          ctrl_flag	= 0;
-        pSvcParam.bPrefixNalAddingCtrl	= ctrl_flag ? true : false;
+          ctrl_flag = 0;
+        pSvcParam.bPrefixNalAddingCtrl = ctrl_flag ? true : false;
       }
     }
   }
@@ -349,8 +349,8 @@
 
   const int8_t kiActualLayerNum = WELS_MIN (pSvcParam.iSpatialLayerNum, iLayerCount);
   if (pSvcParam.iSpatialLayerNum >
-      kiActualLayerNum) {	// fixed number of dependency layer due to parameter error in settings
-    pSvcParam.iSpatialLayerNum	= kiActualLayerNum;
+      kiActualLayerNum) { // fixed number of dependency layer due to parameter error in settings
+    pSvcParam.iSpatialLayerNum = kiActualLayerNum;
   }
 
   assert (kiActualLayerNum <= MAX_DEPENDENCY_LAYER);
@@ -527,7 +527,7 @@
     else if (!strcmp (pCommand, "-numl") && (n < argc)) {
       pSvcParam.iSpatialLayerNum = atoi (argv[n++]);
     } else if (!strcmp (pCommand, "-lconfig") && (n < argc)) {
-      unsigned int	iLayer = atoi (argv[n++]);
+      unsigned int iLayer = atoi (argv[n++]);
       sFileSet.strLayerCfgFile[iLayer].assign (argv[n++]);
       CReadConfig cRdLayerCfg (sFileSet.strLayerCfgFile[iLayer]);
       if (-1 == ParseLayerConfig (cRdLayerCfg, iLayer, pSvcParam, sFileSet)) {
@@ -534,7 +534,7 @@
         return 1;
       }
     } else if (!strcmp (pCommand, "-drec") && (n + 1 < argc)) {
-      unsigned int	iLayer = atoi (argv[n++]);
+      unsigned int iLayer = atoi (argv[n++]);
       const unsigned int iLen = (int) strlen (argv[n]);
       if (iLen >= sizeof (sFileSet.sRecFileName[iLayer]))
         return 1;
@@ -541,25 +541,25 @@
       sFileSet.sRecFileName[iLayer][iLen] = '\0';
       strncpy (sFileSet.sRecFileName[iLayer], argv[n++], iLen);	// confirmed_safe_unsafe_usage
     } else if (!strcmp (pCommand, "-dw") && (n + 1 < argc)) {
-      unsigned int	iLayer = atoi (argv[n++]);
+      unsigned int iLayer = atoi (argv[n++]);
       SSpatialLayerConfig* pDLayer = &pSvcParam.sSpatialLayers[iLayer];
-      pDLayer->iVideoWidth =  atoi (argv[n++]);
+      pDLayer->iVideoWidth = atoi (argv[n++]);
     }
 
     else if (!strcmp (pCommand, "-dh") && (n + 1 < argc)) {
-      unsigned int	iLayer = atoi (argv[n++]);
+      unsigned int iLayer = atoi (argv[n++]);
       SSpatialLayerConfig* pDLayer = &pSvcParam.sSpatialLayers[iLayer];
-      pDLayer->iVideoHeight =  atoi (argv[n++]);
+      pDLayer->iVideoHeight = atoi (argv[n++]);
     }
 
     else if (!strcmp (pCommand, "-frout") && (n + 1 < argc)) {
-      unsigned int	iLayer = atoi (argv[n++]);
+      unsigned int iLayer = atoi (argv[n++]);
       SSpatialLayerConfig* pDLayer = &pSvcParam.sSpatialLayers[iLayer];
       pDLayer->fFrameRate = (float)atof (argv[n++]);
     }
 
     else if (!strcmp (pCommand, "-lqp") && (n + 1 < argc)) {
-      unsigned int	iLayer = atoi (argv[n++]);
+      unsigned int iLayer = atoi (argv[n++]);
       SSpatialLayerConfig* pDLayer = &pSvcParam.sSpatialLayers[iLayer];
       pDLayer->iDLayerQp = sLayerCtx[iLayer].iDLayerQp =  atoi (argv[n++]);
     }
@@ -566,19 +566,19 @@
     //sLayerCtx[iLayer].num_quality_layers = pDLayer->num_quality_layers = 1;
 
     else if (!strcmp (pCommand, "-ltarb") && (n + 1 < argc)) {
-      unsigned int	iLayer = atoi (argv[n++]);
+      unsigned int iLayer = atoi (argv[n++]);
       SSpatialLayerConfig* pDLayer = &pSvcParam.sSpatialLayers[iLayer];
-      pDLayer->iSpatialBitrate	= 1000 * atoi (argv[n++]);
+      pDLayer->iSpatialBitrate = 1000 * atoi (argv[n++]);
     }
 
     else if (!strcmp (pCommand, "-lmaxb") && (n + 1 < argc)) {
-      unsigned int	iLayer = atoi (argv[n++]);
+      unsigned int iLayer = atoi (argv[n++]);
       SSpatialLayerConfig* pDLayer = &pSvcParam.sSpatialLayers[iLayer];
-      pDLayer->iMaxSpatialBitrate	= 1000 * atoi (argv[n++]);
+      pDLayer->iMaxSpatialBitrate = 1000 * atoi (argv[n++]);
     }
 
     else if (!strcmp (pCommand, "-slcmd") && (n + 1 < argc)) {
-      unsigned int	iLayer = atoi (argv[n++]);
+      unsigned int iLayer = atoi (argv[n++]);
       SSpatialLayerConfig* pDLayer = &pSvcParam.sSpatialLayers[iLayer];
 
       switch (atoi (argv[n++])) {
@@ -607,13 +607,13 @@
     }
 
     else if (!strcmp (pCommand, "-slcsize") && (n + 1 < argc)) {
-      unsigned int	iLayer = atoi (argv[n++]);
+      unsigned int iLayer = atoi (argv[n++]);
       SSpatialLayerConfig* pDLayer = &pSvcParam.sSpatialLayers[iLayer];
       pDLayer->sSliceCfg.sSliceArgument.uiSliceSizeConstraint = atoi (argv[n++]);
     }
 
     else if (!strcmp (pCommand, "-slcnum") && (n + 1 < argc)) {
-      unsigned int	iLayer = atoi (argv[n++]);
+      unsigned int iLayer = atoi (argv[n++]);
       SSpatialLayerConfig* pDLayer = &pSvcParam.sSpatialLayers[iLayer];
       pDLayer->sSliceCfg.sSliceArgument.uiSliceNum = atoi (argv[n++]);
     }
@@ -693,7 +693,7 @@
 }
 
 int ProcessEncoding (ISVCEncoder* pPtrEnc, int argc, char** argv, bool bConfigFile) {
-  int iRet				= 0;
+  int iRet = 0;
 
   if (pPtrEnc == NULL)
     return 1;
@@ -860,7 +860,7 @@
     if (!bCanBeRead)
       break;
     // To encoder this frame
-    iStart	= WelsTime();
+    iStart = WelsTime();
     pSrcPic->uiTimeStamp = WELS_ROUND (iFrameIdx * (1000 / sSvcParam.fMaxFrameRate));
     int iEncFrames = pPtrEnc->EncodeFrame (pSrcPic, &sFbi);
     iTotal += WelsTime() - iStart;
@@ -1008,8 +1008,8 @@
 int main (int argc, char** argv)
 #endif
 {
-  ISVCEncoder* pSVCEncoder	= NULL;
-  int iRet					= 0;
+  ISVCEncoder* pSVCEncoder = NULL;
+  int iRet = 0;
 
 #ifdef _MSC_VER
   _setmode (_fileno (stdin), _O_BINARY);  /* thanks to Marcoss Morais <morais at dee.ufcg.edu.br> */
--- a/codec/decoder/core/src/au_parser.cpp
+++ b/codec/decoder/core/src/au_parser.cpp
@@ -110,7 +110,7 @@
   int32_t iNalSize  = iSrcRbspLen;
   PBitStringAux pBs = NULL;
   bool bExtensionFlag = false;
-  int32_t iErr	= ERR_NONE;
+  int32_t iErr = ERR_NONE;
   int32_t iBitSize = 0;
   SDataBuffer* pSavedData = &pCtx->sSavedData;
   SLogContext* pLogCtx = & (pCtx->sLogCtx);
@@ -132,7 +132,7 @@
     }
   }
 
-  pNalUnitHeader->uiForbiddenZeroBit	= (uint8_t) (pNal[0] >> 7);			// uiForbiddenZeroBit
+  pNalUnitHeader->uiForbiddenZeroBit = (uint8_t) (pNal[0] >> 7); // uiForbiddenZeroBit
   if (pNalUnitHeader->uiForbiddenZeroBit) { //2010.4.14
     pCtx->iErrorCode |= dsBitstreamError;
     return NULL; //uiForbiddenZeroBit should always equal to 0
@@ -155,7 +155,7 @@
       pCtx->iSpsErrorIgnored++;
     }
     pCtx->sDecoderStatistics.iSpsNoExistNalNum++;
-    pCtx->iErrorCode	= dsNoParamSets;
+    pCtx->iErrorCode = dsNoParamSets;
     return NULL;
   }
   pCtx->iSpsErrorIgnored = 0;
@@ -169,7 +169,7 @@
       pCtx->iPpsErrorIgnored++;
     }
     pCtx->sDecoderStatistics.iPpsNoExistNalNum++;
-    pCtx->iErrorCode	= dsNoParamSets;
+    pCtx->iErrorCode = dsNoParamSets;
     return NULL;
   }
   pCtx->iPpsErrorIgnored = 0;
@@ -184,7 +184,7 @@
       pCtx->iSubSpsErrorIgnored++;
     }
     pCtx->sDecoderStatistics.iSubSpsNoExistNalNum++;
-    pCtx->iErrorCode	|= dsNoParamSets;
+    pCtx->iErrorCode    |= dsNoParamSets;
     return NULL;
   }
   pCtx->iSubSpsErrorIgnored = 0;
@@ -203,7 +203,7 @@
     pCurNal->uiTimeStamp = pCtx->uiTimeStamp;
 
     if (iNalSize < NAL_UNIT_HEADER_EXT_SIZE) {
-      PAccessUnit pCurAu	   = pCtx->pAccessUnitList;
+      PAccessUnit pCurAu = pCtx->pAccessUnitList;
       uint32_t uiAvailNalNum = pCurAu->uiAvailUnitsNum;
 
       if (uiAvailNalNum > 0) {
@@ -222,7 +222,7 @@
       WelsLog (pLogCtx, WELS_LOG_WARNING,
                "ParseNalHeader() in Prefix Nal Unit:uiQualityId (%d) != 0, bUseRefBasePicFlag (%d) != 0, not supported!",
                pCurNal->sNalHeaderExt.uiQualityId, pCurNal->sNalHeaderExt.bUseRefBasePicFlag);
-      PAccessUnit pCurAu	   = pCtx->pAccessUnitList;
+      PAccessUnit pCurAu = pCtx->pAccessUnitList;
       uint32_t uiAvailNalNum = pCurAu->uiAvailUnitsNum;
 
       if (uiAvailNalNum > 0) {
@@ -250,7 +250,7 @@
       iErr = DecInitBits (pBs, pNal, iBitSize);
       if (iErr) {
         WelsLog (pLogCtx, WELS_LOG_ERROR, "NAL_UNIT_PREFIX: DecInitBits() fail due invalid access.");
-        pCtx->iErrorCode	|= dsBitstreamError;
+        pCtx->iErrorCode |= dsBitstreamError;
         return NULL;
       }
       ParsePrefixNalUnit (pCtx, pBs);
@@ -262,12 +262,12 @@
     bExtensionFlag = true;
   case NAL_UNIT_CODED_SLICE:
   case NAL_UNIT_CODED_SLICE_IDR: {
-    PAccessUnit pCurAu		= NULL;
+    PAccessUnit pCurAu = NULL;
     uint32_t uiAvailNalNum;
     pCurNal = MemGetNextNal (&pCtx->pAccessUnitList);
     if (NULL == pCurNal) {
       WelsLog (pLogCtx, WELS_LOG_ERROR, "MemGetNextNal() fail due out of memory.");
-      pCtx->iErrorCode	|= dsOutOfMemory;
+      pCtx->iErrorCode |= dsOutOfMemory;
       return NULL;
     }
     pCurNal->uiTimeStamp = pCtx->uiTimeStamp;
@@ -386,7 +386,7 @@
         }
       }
       WelsLog (pLogCtx, WELS_LOG_ERROR, "NAL_UNIT_CODED_SLICE: DecInitBits() fail due invalid access.");
-      pCtx->iErrorCode	|= dsBitstreamError;
+      pCtx->iErrorCode |= dsBitstreamError;
       return NULL;
     }
     iErr = ParseSliceHeaderSyntaxs (pCtx, pBs, bExtensionFlag);
@@ -585,7 +585,7 @@
   if (kiSrcLen <= 0)
     return iErr;
 
-  pBs	     = &pCtx->sBs;	// SBitStringAux instance for non VCL NALs decoding
+  pBs = &pCtx->sBs; // SBitStringAux instance for non VCL NALs decoding
   iBitSize = (kiSrcLen << 3) - BsGetTrailingBits (pRbsp + kiSrcLen - 1); // convert into bit
   eNalType = pCtx->sCurNalHead.eNalUnitType;
 
@@ -633,7 +633,7 @@
       return iErr;
     }
 
-    pCtx->bPpsExistAheadFlag	= true;
+    pCtx->bPpsExistAheadFlag = true;
 
     break;
 
@@ -667,7 +667,7 @@
       WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //MMCO_base
       const uint32_t kuiMmco = uiCode;
 
-      pRefBasePicMarking->mmco_base[iIdx].uiMmcoType	= kuiMmco;
+      pRefBasePicMarking->mmco_base[iIdx].uiMmcoType = kuiMmco;
 
       if (kuiMmco == MMCO_END)
         break;
@@ -678,7 +678,7 @@
         pRefBasePicMarking->mmco_base[iIdx].iShortFrameNum  = 0;
       } else if (kuiMmco == MMCO_LONG2UNUSED) {
         WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //long_term_base_pic_num
-        pRefBasePicMarking->mmco_base[iIdx].uiLongTermPicNum	= uiCode;
+        pRefBasePicMarking->mmco_base[iIdx].uiLongTermPicNum = uiCode;
       }
       ++ iIdx;
     } while (iIdx < MAX_MMCO_COUNT);
@@ -694,7 +694,7 @@
     PNalUnitHeaderExt head_ext = &pCurNal->sNalHeaderExt;
     PPrefixNalUnit sPrefixNal = &pCurNal->sNalData.sPrefixNal;
     WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //store_ref_base_pic_flag
-    sPrefixNal->bStoreRefBasePicFlag	= !!uiCode;
+    sPrefixNal->bStoreRefBasePicFlag = !!uiCode;
     if ((head_ext->bUseRefBasePicFlag || sPrefixNal->bStoreRefBasePicFlag) && !head_ext->bIdrFlag) {
       WELS_READ_VERIFY (ParseRefBasePicMarking (pBs, &sPrefixNal->sRefPicBaseMarking));
     }
@@ -702,7 +702,7 @@
     sPrefixNal->bPrefixNalUnitAdditionalExtFlag = !!uiCode;
     if (sPrefixNal->bPrefixNalUnitAdditionalExtFlag) {
       WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //additional_prefix_nal_unit_extension_data_flag
-      sPrefixNal->bPrefixNalUnitExtFlag	= !!uiCode;
+      sPrefixNal->bPrefixNalUnitExtFlag = !!uiCode;
     }
   }
   return ERR_NONE;
@@ -721,16 +721,16 @@
 
 
 int32_t DecodeSpsSvcExt (PWelsDecoderContext pCtx, PSubsetSps pSpsExt, PBitStringAux pBs) {
-  PSpsSvcExt  pExt			= NULL;
+  PSpsSvcExt  pExt = NULL;
   uint32_t uiCode;
   int32_t iCode;
 
-  pExt	= &pSpsExt->sSpsSvcExt;
+  pExt = &pSpsExt->sSpsSvcExt;
 
   WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //inter_layer_deblocking_filter_control_present_flag
-  pExt->bInterLayerDeblockingFilterCtrlPresentFlag	= !!uiCode;
+  pExt->bInterLayerDeblockingFilterCtrlPresentFlag = !!uiCode;
   WELS_READ_VERIFY (BsGetBits (pBs, 2, &uiCode)); //extended_spatial_scalability_idc
-  pExt->uiExtendedSpatialScalability						= uiCode;
+  pExt->uiExtendedSpatialScalability = uiCode;
   if (pExt->uiExtendedSpatialScalability > 2) {
     WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
              "DecodeSpsSvcExt():extended_spatial_scalability (%d) != 0, ESS not supported!",
@@ -738,14 +738,14 @@
     return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_ESS);
   }
 
-  pExt->uiChromaPhaseXPlus1Flag	=
-    0;	// FIXME: Incoherent with JVT X201 standard (= 1), but conformance to JSVM (= 0) implementation.
-  pExt->uiChromaPhaseYPlus1		= 1;
+  pExt->uiChromaPhaseXPlus1Flag =
+    0;  // FIXME: Incoherent with JVT X201 standard (= 1), but conformance to JSVM (= 0) implementation.
+  pExt->uiChromaPhaseYPlus1 = 1;
 
   WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //chroma_phase_x_plus1_flag
-  pExt->uiChromaPhaseXPlus1Flag	= uiCode;
+  pExt->uiChromaPhaseXPlus1Flag = uiCode;
   WELS_READ_VERIFY (BsGetBits (pBs, 2, &uiCode)); //chroma_phase_y_plus1
-  pExt->uiChromaPhaseYPlus1		= uiCode;
+  pExt->uiChromaPhaseYPlus1 = uiCode;
 
   pExt->uiSeqRefLayerChromaPhaseXPlus1Flag = pExt->uiChromaPhaseXPlus1Flag;
   pExt->uiSeqRefLayerChromaPhaseYPlus1     = pExt->uiChromaPhaseYPlus1;
@@ -754,20 +754,20 @@
   if (pExt->uiExtendedSpatialScalability == 1) {
     SPosOffset* const kpPos = &pExt->sSeqScaledRefLayer;
     WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //seq_ref_layer_chroma_phase_x_plus1_flag
-    pExt->uiSeqRefLayerChromaPhaseXPlus1Flag	= uiCode;
+    pExt->uiSeqRefLayerChromaPhaseXPlus1Flag = uiCode;
     WELS_READ_VERIFY (BsGetBits (pBs, 2, &uiCode)); //seq_ref_layer_chroma_phase_y_plus1
-    pExt->uiSeqRefLayerChromaPhaseYPlus1		= uiCode;
+    pExt->uiSeqRefLayerChromaPhaseYPlus1 = uiCode;
 
     WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //seq_scaled_ref_layer_left_offset
-    kpPos->iLeftOffset	= iCode;
+    kpPos->iLeftOffset = iCode;
     WELS_CHECK_SE_BOTH_WARNING (kpPos->iLeftOffset, SUBSET_SPS_SEQ_SCALED_REF_LAYER_LEFT_OFFSET_MIN,
                                 SUBSET_SPS_SEQ_SCALED_REF_LAYER_LEFT_OFFSET_MAX, "seq_scaled_ref_layer_left_offset");
     WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //seq_scaled_ref_layer_top_offset
-    kpPos->iTopOffset	= iCode;
+    kpPos->iTopOffset = iCode;
     WELS_CHECK_SE_BOTH_WARNING (kpPos->iTopOffset, SUBSET_SPS_SEQ_SCALED_REF_LAYER_TOP_OFFSET_MIN,
                                 SUBSET_SPS_SEQ_SCALED_REF_LAYER_TOP_OFFSET_MAX, "seq_scaled_ref_layer_top_offset");
     WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //seq_scaled_ref_layer_right_offset
-    kpPos->iRightOffset	= iCode;
+    kpPos->iRightOffset = iCode;
     WELS_CHECK_SE_BOTH_WARNING (kpPos->iRightOffset, SUBSET_SPS_SEQ_SCALED_REF_LAYER_RIGHT_OFFSET_MIN,
                                 SUBSET_SPS_SEQ_SCALED_REF_LAYER_RIGHT_OFFSET_MAX, "seq_scaled_ref_layer_right_offset");
     WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //seq_scaled_ref_layer_bottom_offset
@@ -777,14 +777,14 @@
   }
 
   WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //seq_tcoeff_level_prediction_flag
-  pExt->bSeqTCoeffLevelPredFlag	= !!uiCode;
-  pExt->bAdaptiveTCoeffLevelPredFlag	= false;
+  pExt->bSeqTCoeffLevelPredFlag = !!uiCode;
+  pExt->bAdaptiveTCoeffLevelPredFlag = false;
   if (pExt->bSeqTCoeffLevelPredFlag) {
     WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_tcoeff_level_prediction_flag
-    pExt->bAdaptiveTCoeffLevelPredFlag	= !!uiCode;
+    pExt->bAdaptiveTCoeffLevelPredFlag = !!uiCode;
   }
   WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //slice_header_restriction_flag
-  pExt->bSliceHeaderRestrictionFlag	= !!uiCode;
+  pExt->bSliceHeaderRestrictionFlag = !!uiCode;
 
 
 
@@ -903,10 +903,10 @@
 
 int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicWidth, int32_t* pPicHeight,
                   uint8_t* pSrcNal, const int32_t kSrcNalLen) {
-  PBitStringAux pBs		= pBsAux;
+  PBitStringAux pBs = pBsAux;
   SSubsetSps sTempSubsetSps;
-  PSps pSps				= NULL;
-  PSubsetSps pSubsetSps	= NULL;
+  PSps pSps = NULL;
+  PSubsetSps pSubsetSps = NULL;
   SNalUnitHeader* pNalHead = &pCtx->sCurNalHead;
   ProfileIdc uiProfileIdc;
   uint8_t uiLevelIdc;
@@ -917,28 +917,28 @@
   const bool kbUseSubsetFlag   = IS_SUBSET_SPS_NAL (pNalHead->eNalUnitType);
 
   WELS_READ_VERIFY (BsGetBits (pBs, 8, &uiCode)); //profile_idc
-  uiProfileIdc	= uiCode;
+  uiProfileIdc = uiCode;
   WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set0_flag
-  bConstraintSetFlags[0]	= !!uiCode;
+  bConstraintSetFlags[0] = !!uiCode;
   WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set1_flag
-  bConstraintSetFlags[1]	= !!uiCode;
+  bConstraintSetFlags[1] = !!uiCode;
   WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set2_flag
-  bConstraintSetFlags[2]	= !!uiCode;
+  bConstraintSetFlags[2] = !!uiCode;
   WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set3_flag
-  bConstraintSetFlags[3]	= !!uiCode;
+  bConstraintSetFlags[3] = !!uiCode;
   WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set4_flag
-  bConstraintSetFlags[4]	= !!uiCode;
+  bConstraintSetFlags[4] = !!uiCode;
   WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set5_flag
-  bConstraintSetFlags[5]	= !!uiCode;
+  bConstraintSetFlags[5] = !!uiCode;
   WELS_READ_VERIFY (BsGetBits (pBs, 2, &uiCode)); // reserved_zero_2bits, equal to 0
   WELS_READ_VERIFY (BsGetBits (pBs, 8, &uiCode)); // level_idc
-  uiLevelIdc	= uiCode;
+  uiLevelIdc = uiCode;
   WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //seq_parameter_set_id
   if (uiCode >= MAX_SPS_COUNT) {	// Modified to check invalid negative iSpsId, 12/1/2009
     WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " iSpsId is out of range! \n");
     return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_SPS_ID_OVERFLOW);
   }
-  iSpsId		= uiCode;
+  iSpsId = uiCode;
   pSubsetSps = &sTempSubsetSps;
   pSps = &sTempSubsetSps.sSps;
   memset (pSubsetSps, 0, sizeof (SSubsetSps));
@@ -978,7 +978,7 @@
       WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): bit_depth_luma (%d) Only 8 bit supported.", 8 + uiCode);
       return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
     }
-    pSps->uiBitDepthLuma		= 8;
+    pSps->uiBitDepthLuma = 8;
 
     WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //bit_depth_chroma_minus8
     if (uiCode != 0) {
@@ -985,12 +985,12 @@
       WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): bit_depth_chroma (%d). Only 8 bit supported.", 8 + uiCode);
       return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
     }
-    pSps->uiBitDepthChroma	= 8;
+    pSps->uiBitDepthChroma = 8;
 
     WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //qpprime_y_zero_transform_bypass_flag
-    pSps->bQpPrimeYZeroTransfBypassFlag	= !!uiCode;
+    pSps->bQpPrimeYZeroTransfBypassFlag = !!uiCode;
     WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //seq_scaling_matrix_present_flag
-    pSps->bSeqScalingMatrixPresentFlag	= !!uiCode;
+    pSps->bSeqScalingMatrixPresentFlag = !!uiCode;
 
     if (pSps->bSeqScalingMatrixPresentFlag) {
       WELS_READ_VERIFY (ParseScalingList (pSps, pBs, 0, pSps->bSeqScalingListPresentFlag, pSps->iScalingList4x4,
@@ -1000,9 +1000,9 @@
   WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //log2_max_frame_num_minus4
   WELS_CHECK_SE_UPPER_ERROR (uiCode, SPS_LOG2_MAX_FRAME_NUM_MINUS4_MAX, "log2_max_frame_num_minus4",
                              GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_LOG2_MAX_FRAME_NUM_MINUS4));
-  pSps->uiLog2MaxFrameNum	= LOG2_MAX_FRAME_NUM_OFFSET + uiCode;
+  pSps->uiLog2MaxFrameNum = LOG2_MAX_FRAME_NUM_OFFSET + uiCode;
   WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_order_cnt_type
-  pSps->uiPocType			= uiCode;
+  pSps->uiPocType = uiCode;
 
   if (0 == pSps->uiPocType) {
     WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //log2_max_pic_order_cnt_lsb_minus4
@@ -1009,24 +1009,24 @@
     // log2_max_pic_order_cnt_lsb_minus4 should be in range 0 to 12, inclusive. (sec. 7.4.3)
     WELS_CHECK_SE_UPPER_ERROR (uiCode, SPS_LOG2_MAX_PIC_ORDER_CNT_LSB_MINUS4_MAX, "log2_max_pic_order_cnt_lsb_minus4",
                                GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_LOG2_MAX_PIC_ORDER_CNT_LSB_MINUS4));
-    pSps->iLog2MaxPocLsb	= LOG2_MAX_PIC_ORDER_CNT_LSB_OFFSET + uiCode;	// log2_max_pic_order_cnt_lsb_minus4
+    pSps->iLog2MaxPocLsb = LOG2_MAX_PIC_ORDER_CNT_LSB_OFFSET + uiCode; // log2_max_pic_order_cnt_lsb_minus4
 
   } else if (1 == pSps->uiPocType) {
     int32_t i;
     WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //delta_pic_order_always_zero_flag
-    pSps->bDeltaPicOrderAlwaysZeroFlag	= !!uiCode;
+    pSps->bDeltaPicOrderAlwaysZeroFlag = !!uiCode;
     WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //offset_for_non_ref_pic
-    pSps->iOffsetForNonRefPic			= iCode;
+    pSps->iOffsetForNonRefPic = iCode;
     WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //offset_for_top_to_bottom_field
-    pSps->iOffsetForTopToBottomField	= iCode;
+    pSps->iOffsetForTopToBottomField = iCode;
     WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //num_ref_frames_in_pic_order_cnt_cycle
     WELS_CHECK_SE_UPPER_ERROR (uiCode, SPS_NUM_REF_FRAMES_IN_PIC_ORDER_CNT_CYCLE_MAX,
                                "num_ref_frames_in_pic_order_cnt_cycle", GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS,
                                    ERR_INFO_INVALID_NUM_REF_FRAME_IN_PIC_ORDER_CNT_CYCLE));
-    pSps->iNumRefFramesInPocCycle		= uiCode;
+    pSps->iNumRefFramesInPocCycle = uiCode;
     for (i = 0; i < pSps->iNumRefFramesInPocCycle; i++) {
       WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //offset_for_ref_frame[ i ]
-      pSps->iOffsetForRefFrame[ i ]	= iCode;
+      pSps->iOffsetForRefFrame[ i ] = iCode;
     }
   }
   if (pSps->uiPocType > 2) {
@@ -1035,11 +1035,11 @@
   }
 
   WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //max_num_ref_frames
-  pSps->iNumRefFrames	= uiCode;
+  pSps->iNumRefFrames = uiCode;
   WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //gaps_in_frame_num_value_allowed_flag
-  pSps->bGapsInFrameNumValueAllowedFlag	= !!uiCode;
+  pSps->bGapsInFrameNumValueAllowedFlag = !!uiCode;
   WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_width_in_mbs_minus1
-  pSps->iMbWidth		= PIC_WIDTH_IN_MBS_OFFSET + uiCode;
+  pSps->iMbWidth = PIC_WIDTH_IN_MBS_OFFSET + uiCode;
   if (pSps->iMbWidth > MAX_MB_SIZE) {
     WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "pic_width_in_mbs(%d) exceeds the maximum allowed!", pSps->iMbWidth);
     return  GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_MAX_MB_SIZE);
@@ -1048,7 +1048,7 @@
     WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " the pic_width_in_mbs exceeds the level limits!");
   }
   WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_height_in_map_units_minus1
-  pSps->iMbHeight		= PIC_HEIGHT_IN_MAP_UNITS_OFFSET + uiCode;
+  pSps->iMbHeight = PIC_HEIGHT_IN_MAP_UNITS_OFFSET + uiCode;
   if (pSps->iMbHeight > MAX_MB_SIZE) {
     WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "pic_height_in_mbs(%d) exceeds the maximum allowed!", pSps->iMbHeight);
     return  GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_MAX_MB_SIZE);
@@ -1060,7 +1060,7 @@
   if (uiTmp32 > (uint32_t)pSLevelLimits->uiMaxFS) {
     WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " the total count of mb exceeds the level limits!");
   }
-  pSps->uiTotalMbCount	= uiTmp32;
+  pSps->uiTotalMbCount = uiTmp32;
   WELS_CHECK_SE_UPPER_ERROR (pSps->iNumRefFrames, SPS_MAX_NUM_REF_FRAMES_MAX, "max_num_ref_frames",
                              GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_MAX_NUM_REF_FRAMES));
   // here we check max_num_ref_frames
@@ -1072,7 +1072,7 @@
     WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " max_num_ref_frames exceeds level limits!");
   }
   WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //frame_mbs_only_flag
-  pSps->bFrameMbsOnlyFlag	= !!uiCode;
+  pSps->bFrameMbsOnlyFlag = !!uiCode;
   if (!pSps->bFrameMbsOnlyFlag) {
     WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): frame_mbs_only_flag (%d) not supported.",
              pSps->bFrameMbsOnlyFlag);
@@ -1079,22 +1079,22 @@
     return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_MBAFF);
   }
   WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //direct_8x8_inference_flag
-  pSps->bDirect8x8InferenceFlag	= !!uiCode;
+  pSps->bDirect8x8InferenceFlag = !!uiCode;
   WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //frame_cropping_flag
-  pSps->bFrameCroppingFlag		= !!uiCode;
+  pSps->bFrameCroppingFlag = !!uiCode;
   if (pSps->bFrameCroppingFlag) {
     WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_left_offset
-    pSps->sFrameCrop.iLeftOffset	= uiCode;
+    pSps->sFrameCrop.iLeftOffset = uiCode;
     WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_right_offset
-    pSps->sFrameCrop.iRightOffset	= uiCode;
+    pSps->sFrameCrop.iRightOffset = uiCode;
     if ((pSps->sFrameCrop.iLeftOffset + pSps->sFrameCrop.iRightOffset) > ((int32_t)pSps->iMbWidth * 16 / 2)) {
       WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "frame_crop_left_offset + frame_crop_right_offset exceeds limits!");
       return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_CROPPING_DATA);
     }
     WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_top_offset
-    pSps->sFrameCrop.iTopOffset		= uiCode;
+    pSps->sFrameCrop.iTopOffset = uiCode;
     WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_bottom_offset
-    pSps->sFrameCrop.iBottomOffset	= uiCode;
+    pSps->sFrameCrop.iBottomOffset = uiCode;
     if ((pSps->sFrameCrop.iTopOffset + pSps->sFrameCrop.iBottomOffset) > ((int32_t)pSps->iMbHeight * 16 / 2)) {
       WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "frame_crop_top_offset + frame_crop_right_offset exceeds limits!");
       return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_CROPPING_DATA);
@@ -1106,7 +1106,7 @@
     pSps->sFrameCrop.iBottomOffset = 0; // frame_crop_bottom_offset
   }
   WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //vui_parameters_present_flag
-  pSps->bVuiParamPresentFlag			= !!uiCode;
+  pSps->bVuiParamPresentFlag = !!uiCode;
 
   if (pCtx->bParseOnly) {
     if (kSrcNalLen >= SPS_PPS_BS_SIZE - 4) { //sps bs exceeds!
@@ -1206,7 +1206,7 @@
 
 
   if (PRO_SCALABLE_BASELINE == uiProfileIdc || PRO_SCALABLE_HIGH == uiProfileIdc)
-    pCtx->bAvcBasedFlag	= false;
+    pCtx->bAvcBasedFlag = false;
 
   *pPicWidth  = pSps->iMbWidth << 4;
   *pPicHeight = pSps->iMbHeight << 4;
@@ -1251,12 +1251,12 @@
   // Not overwrite active sps, just copy to final place
   else if (kbUseSubsetFlag) {
     memcpy (&pCtx->sSubsetSpsBuffer[iSpsId], pSubsetSps, sizeof (SSubsetSps));
-    pCtx->bSubspsAvailFlags[iSpsId]	= true;
-    pCtx->bSubspsExistAheadFlag	= true;
+    pCtx->bSubspsAvailFlags[iSpsId] = true;
+    pCtx->bSubspsExistAheadFlag = true;
   } else {
     memcpy (&pCtx->sSpsBuffer[iSpsId], pSps, sizeof (SSps));
     pCtx->bSpsAvailFlags[iSpsId] = true;
-    pCtx->bSpsExistAheadFlag		= true;
+    pCtx->bSpsExistAheadFlag = true;
   }
   return 0;
 }
@@ -1573,8 +1573,8 @@
   if (NULL != pCtx) {
     // Fixed memory leak due to PPS_ID might not be continuous sometimes, 1/5/2010
     UninitFmoList (&pCtx->sFmoList[0], MAX_PPS_COUNT, pCtx->iActiveFmoNum);
-    iCountNum	= pCtx->iActiveFmoNum;
-    pCtx->iActiveFmoNum	= 0;
+    iCountNum = pCtx->iActiveFmoNum;
+    pCtx->iActiveFmoNum = 0;
   }
   return iCountNum;
 }
--- a/codec/decoder/core/src/decode_mb_aux.cpp
+++ b/codec/decoder/core/src/decode_mb_aux.cpp
@@ -157,7 +157,7 @@
     iRes[ (7 << 3) + i] = b[0] - b[7];
   }
 
-  uint8_t* pDst			= pPred;
+  uint8_t* pDst = pPred;
   for (int i = 0; i < 8; i++) {
     for (int j = 0; j < 8; j++) {
       pDst[i * kiStride + j] = WelsClip1 (((32 + iRes[ (i << 3) + j]) >> 6) + pDst[i * kiStride + j]);
@@ -167,7 +167,7 @@
 }
 
 void GetI4LumaIChromaAddrTable (int32_t* pBlockOffset, const int32_t kiYStride, const int32_t kiUVStride) {
-  int32_t* pOffset	   = pBlockOffset;
+  int32_t* pOffset = pBlockOffset;
   int32_t i;
   const uint8_t kuiScan0 = g_kuiScan8[0];
 
--- a/codec/decoder/core/src/decoder.cpp
+++ b/codec/decoder/core/src/decoder.cpp
@@ -67,7 +67,7 @@
     return 1;
   }
 
-  pPicBuf	= (PPicBuff)WelsMallocz (sizeof (SPicBuff), "PPicBuff");
+  pPicBuf = (PPicBuff)WelsMallocz (sizeof (SPicBuff), "PPicBuff");
 
   if (NULL == pPicBuf) {
     return 1;
@@ -109,7 +109,7 @@
     return 1;
   }
 
-  pPicNewBuf	= (PPicBuff)WelsMallocz (sizeof (SPicBuff), "PPicBuff");
+  pPicNewBuf = (PPicBuff)WelsMallocz (sizeof (SPicBuff), "PPicBuff");
 
   if (NULL == pPicNewBuf) {
     return 1;
@@ -153,9 +153,9 @@
 // remove old PicBuf
   if (pPicOldBuf->ppPic != NULL) {
     WelsFree (pPicOldBuf->ppPic, "pPicOldBuf->queue");
-    pPicOldBuf->ppPic	= NULL;
+    pPicOldBuf->ppPic = NULL;
   }
-  pPicOldBuf->iCapacity	= 0;
+  pPicOldBuf->iCapacity = 0;
   pPicOldBuf->iCurrentIdx = 0;
   WelsFree (pPicOldBuf, "pPicOldBuf");
   pPicOldBuf = NULL;
@@ -171,7 +171,7 @@
     return 1;
   }
 
-  pPicNewBuf	= (PPicBuff)WelsMallocz (sizeof (SPicBuff), "PPicBuff");
+  pPicNewBuf = (PPicBuff)WelsMallocz (sizeof (SPicBuff), "PPicBuff");
 
   if (NULL == pPicNewBuf) {
     return 1;
@@ -180,7 +180,7 @@
   pPicNewBuf->ppPic = (PPicture*)WelsMallocz (kiNewSize * sizeof (PPicture), "PPicture*");
 
   if (NULL == pPicNewBuf->ppPic) {
-    pPicNewBuf->iCapacity	 = 0;
+    pPicNewBuf->iCapacity = 0;
     DestroyPicBuff (&pPicNewBuf);
     return 1;
   }
@@ -227,9 +227,9 @@
   // remove old PicBuf
   if (pPicOldBuf->ppPic != NULL) {
     WelsFree (pPicOldBuf->ppPic, "pPicOldBuf->queue");
-    pPicOldBuf->ppPic	= NULL;
+    pPicOldBuf->ppPic = NULL;
   }
-  pPicOldBuf->iCapacity	= 0;
+  pPicOldBuf->iCapacity = 0;
   pPicOldBuf->iCurrentIdx = 0;
   WelsFree (pPicOldBuf, "pPicOldBuf");
   pPicOldBuf = NULL;
@@ -257,9 +257,9 @@
 
     WelsFree (pPicBuf->ppPic, "pPicBuf->queue");
 
-    pPicBuf->ppPic	= NULL;
+    pPicBuf->ppPic = NULL;
   }
-  pPicBuf->iCapacity	= 0;
+  pPicBuf->iCapacity = 0;
   pPicBuf->iCurrentIdx = 0;
 
   WelsFree (pPicBuf, "pPicBuf");
@@ -331,7 +331,7 @@
  *  get size of reference picture list in target layer incoming, = (iNumRefFrames
  */
 static inline int32_t GetTargetRefListSize (PWelsDecoderContext pCtx) {
-  int32_t iNumRefFrames	= 0;
+  int32_t iNumRefFrames = 0;
   // +2 for EC MV Copy buffer exchange
   if ((pCtx == NULL) || (pCtx->pSps == NULL)) {
     iNumRefFrames = MAX_REF_PIC_COUNT + 2;
@@ -365,7 +365,7 @@
 
   // Fixed the issue about different gop size over last, 5/17/2010
   // get picture queue size currently
-  iPicQueueSize	= GetTargetRefListSize (pCtx);	// adaptive size of picture queue, = (pSps->iNumRefFrames x 2)
+  iPicQueueSize = GetTargetRefListSize (pCtx);  // adaptive size of picture queue, = (pSps->iNumRefFrames x 2)
   pCtx->iPicQueueNumber = iPicQueueSize;
   if (pCtx->pPicBuff[LIST_0] != NULL
       && pCtx->pPicBuff[LIST_0]->iCapacity ==
@@ -482,7 +482,7 @@
 #ifdef LONG_TERM_REF
   pCtx->bParamSetsLostFlag = true;
 #else
-  pCtx->bReferenceLostAtT0Flag	= true;	// should be true to waiting IDR at incoming AU bits following, 6/4/2010
+  pCtx->bReferenceLostAtT0Flag = true; // should be true to waiting IDR at incoming AU bits following, 6/4/2010
 #endif //LONG_TERM_REF
   pCtx->bNewSeqBegin = true;
   pCtx->bPrintFrameErrorTraceFlag = true;
@@ -517,13 +517,13 @@
   if (NULL == pCtx || NULL == kpParam)
     return 1;
 
-  pCtx->pParam	= (SDecodingParam*)WelsMallocz (sizeof (SDecodingParam), "SDecodingParam");
+  pCtx->pParam = (SDecodingParam*)WelsMallocz (sizeof (SDecodingParam), "SDecodingParam");
 
   if (NULL == pCtx->pParam)
     return 1;
 
   memcpy (pCtx->pParam, kpParam, sizeof (SDecodingParam));
-  pCtx->eOutputColorFormat	= pCtx->pParam->eOutputColorFormat;
+  pCtx->eOutputColorFormat = pCtx->pParam->eOutputColorFormat;
   if (!pCtx->bParseOnly) {
     int32_t iRet = DecoderSetCsp (pCtx, pCtx->pParam->eOutputColorFormat);
     if (iRet)
@@ -668,7 +668,7 @@
           iConsumedBytes = 0;
           pDstNal[iDstIdx] = pDstNal[iDstIdx + 1] = pDstNal[iDstIdx + 2] = pDstNal[iDstIdx + 3] =
                                0; // set 4 reserved bytes to zero
-          pNalPayload	= ParseNalHeader (pCtx, &pCtx->sCurNalHead, pDstNal, iDstIdx, pSrcNal - 3, iSrcIdx + 3, &iConsumedBytes);
+          pNalPayload = ParseNalHeader (pCtx, &pCtx->sCurNalHead, pDstNal, iDstIdx, pSrcNal - 3, iSrcIdx + 3, &iConsumedBytes);
           if (pNalPayload) { //parse correct
             if (IS_PARAM_SETS_NALS (pCtx->sCurNalHead.eNalUnitType)) {
               iRet = ParseNonVclNal (pCtx, pNalPayload, iDstIdx - iConsumedBytes, pSrcNal - 3, iSrcIdx + 3);
@@ -758,8 +758,8 @@
       return pCtx->iErrorCode;
     }
   } else { /* no supplementary picture payload input, but stored a picture */
-    PAccessUnit pCurAu	=
-      pCtx->pAccessUnitList;	// current access unit, it will never point to NULL after decode's successful initialization
+    PAccessUnit pCurAu =
+      pCtx->pAccessUnitList; // current access unit, it will never point to NULL after decode's successful initialization
 
     if (pCurAu->uiAvailUnitsNum == 0) {
       return pCtx->iErrorCode;
@@ -789,9 +789,9 @@
 int32_t DecoderSetCsp (PWelsDecoderContext pCtx, const int32_t kiColorFormat) {
   WELS_VERIFY_RETURN_IF (1, (NULL == pCtx));
 
-  pCtx->eOutputColorFormat	= (EVideoFormatType) kiColorFormat;
+  pCtx->eOutputColorFormat = (EVideoFormatType) kiColorFormat;
   if (pCtx->pParam != NULL) {
-    pCtx->pParam->eOutputColorFormat	= (EVideoFormatType) kiColorFormat;
+    pCtx->pParam->eOutputColorFormat = (EVideoFormatType) kiColorFormat;
   }
 
   //For now, support only videoFormatI420!
--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -329,7 +329,7 @@
   // Common syntaxs for P or B slices: list0, list1 followed if B slices used.
   do {
     WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //ref_pic_list_modification_flag_l0
-    pRefPicListReordering->bRefPicListReorderingFlag[iList]	= !!uiCode;
+    pRefPicListReordering->bRefPicListReorderingFlag[iList] = !!uiCode;
 
     if (pRefPicListReordering->bRefPicListReorderingFlag[iList]) {
       int32_t iIdx = 0;
@@ -341,7 +341,7 @@
         if ((iIdx >= MAX_REF_PIC_COUNT) || (kuiIdc > 3)) {
           return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_REF_REORDERING);
         }
-        pRefPicListReordering->sReorderingSyn[iList][iIdx].uiReorderingOfPicNumsIdc	= kuiIdc;
+        pRefPicListReordering->sReorderingSyn[iList][iIdx].uiReorderingOfPicNumsIdc = kuiIdc;
         if (kuiIdc == 3)
           break;
 
@@ -377,12 +377,12 @@
   uint32_t uiCode;
   if (kbIdrFlag) {
     WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //no_output_of_prior_pics_flag
-    kpRefMarking->bNoOutputOfPriorPicsFlag	= !!uiCode;
+    kpRefMarking->bNoOutputOfPriorPicsFlag = !!uiCode;
     WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //long_term_reference_flag
-    kpRefMarking->bLongTermRefFlag			= !!uiCode;
+    kpRefMarking->bLongTermRefFlag = !!uiCode;
   } else {
     WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_ref_pic_marking_mode_flag
-    kpRefMarking->bAdaptiveRefPicMarkingModeFlag	= !!uiCode;
+    kpRefMarking->bAdaptiveRefPicMarkingModeFlag = !!uiCode;
     if (kpRefMarking->bAdaptiveRefPicMarkingModeFlag) {
       int32_t iIdx = 0;
       do {
@@ -423,9 +423,9 @@
     return false;
 
   if (pNalExt->iNoInterLayerPredFlag || pNalExt->uiQualityId > 0)
-    pShExt->bBasePredWeightTableFlag	= false;
+    pShExt->bBasePredWeightTableFlag = false;
   else
-    pShExt->bBasePredWeightTableFlag	= true;
+    pShExt->bBasePredWeightTableFlag = true;
   pShExt->uiRefLayerDqId = (uint8_t) - 1;
   pShExt->uiDisableInterLayerDeblockingFilterIdc        = 0;
   pShExt->iInterLayerSliceAlphaC0Offset                 = 0;
@@ -674,15 +674,15 @@
     const bool kbStoreRefBaseFlag = pSliceHeadExt->bStoreRefBasePicFlag;
     memcpy (&sBaseMarking, &pSliceHeadExt->sRefBasePicMarking, sizeof (SRefBasePicMarking)); //confirmed_safe_unsafe_usage
     memset (pSliceHeadExt, 0, sizeof (SSliceHeaderExt));
-    pSliceHeadExt->bStoreRefBasePicFlag	= kbStoreRefBaseFlag;
+    pSliceHeadExt->bStoreRefBasePicFlag = kbStoreRefBaseFlag;
     memcpy (&pSliceHeadExt->sRefBasePicMarking, &sBaseMarking, sizeof (SRefBasePicMarking)); //confirmed_safe_unsafe_usage
   }
 
-  kpCurNal->sNalData.sVclNal.bSliceHeaderExtFlag	= kbExtensionFlag;
+  kpCurNal->sNalData.sVclNal.bSliceHeaderExtFlag = kbExtensionFlag;
 
   // first_mb_in_slice
   WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //first_mb_in_slice
-  pSliceHead->iFirstMbInSlice	= uiCode;
+  pSliceHead->iFirstMbInSlice = uiCode;
 
   WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //slice_type
   uiSliceType = uiCode;
@@ -710,7 +710,7 @@
     }
   }
 
-  pSliceHead->eSliceType	= static_cast <EWelsSliceType> (uiSliceType);
+  pSliceHead->eSliceType = static_cast <EWelsSliceType> (uiSliceType);
 
   WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_parameter_set_id
   iPpsId = uiCode;
@@ -776,7 +776,7 @@
       return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);
     }
     pCtx->iSPSLastInvalidId = -1;
-    pSps		= &pCtx->sSpsBuffer[pPps->iSpsId];
+    pSps = &pCtx->sSpsBuffer[pPps->iSpsId];
   }
   pSliceHead->iPpsId = iPpsId;
   pSliceHead->iSpsId = pPps->iSpsId;
@@ -819,9 +819,9 @@
     // standard 7.4.3 idr_pic_id should be in range 0 to 65535, inclusive.
     WELS_CHECK_SE_UPPER_ERROR (uiCode, SLICE_HEADER_IDR_PIC_ID_MAX, "idr_pic_id", GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER,
                                ERR_INFO_INVALID_IDR_PIC_ID));
-    pSliceHead->uiIdrPicId	= uiCode; /* uiIdrPicId */
+    pSliceHead->uiIdrPicId = uiCode; /* uiIdrPicId */
 #ifdef LONG_TERM_REF
-    pCtx->uiCurIdrPicId      = pSliceHead->uiIdrPicId;
+    pCtx->uiCurIdrPicId = pSliceHead->uiIdrPicId;
 #endif
   }
 
@@ -830,14 +830,14 @@
     pSliceHead->iDeltaPicOrderCnt[1] = 0;
   if (pSps->uiPocType == 0) {
     WELS_READ_VERIFY (BsGetBits (pBs, pSps->iLog2MaxPocLsb, &uiCode)); //pic_order_cnt_lsb
-    pSliceHead->iPicOrderCntLsb	= uiCode;
+    pSliceHead->iPicOrderCntLsb = uiCode;
     if (pPps->bPicOrderPresentFlag && !pSliceHead->bFieldPicFlag) {
       WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //delta_pic_order_cnt_bottom
-      pSliceHead->iDeltaPicOrderCntBottom	= iCode;
+      pSliceHead->iDeltaPicOrderCntBottom = iCode;
     }
   } else if (pSps->uiPocType == 1 && !pSps->bDeltaPicOrderAlwaysZeroFlag) {
     WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //delta_pic_order_cnt[ 0 ]
-    pSliceHead->iDeltaPicOrderCnt[0]	= iCode;
+    pSliceHead->iDeltaPicOrderCnt[0] = iCode;
     if (pPps->bPicOrderPresentFlag && !pSliceHead->bFieldPicFlag) {
       WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //delta_pic_order_cnt[ 1 ]
       pSliceHead->iDeltaPicOrderCnt[1] = iCode;
@@ -844,7 +844,7 @@
     }
   }
 
-  pSliceHead->iRedundantPicCnt	= 0;
+  pSliceHead->iRedundantPicCnt = 0;
   if (pPps->bRedundantPicCntPresentFlag) {
     WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //redundant_pic_cnt
     // standard section 7.4.3, redundant_pic_cnt should be in range 0 to 127, inclusive.
@@ -863,12 +863,12 @@
   }
   if (bReadNumRefFlag) {
     WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //num_ref_idx_active_override_flag
-    pSliceHead->bNumRefIdxActiveOverrideFlag	= !!uiCode;
+    pSliceHead->bNumRefIdxActiveOverrideFlag = !!uiCode;
     if (pSliceHead->bNumRefIdxActiveOverrideFlag) {
       WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //num_ref_idx_l0_active_minus1
       WELS_CHECK_SE_UPPER_ERROR (uiCode, MAX_NUM_REF_IDX_L0_ACTIVE_MINUS1, "num_ref_idx_l0_active_minus1",
                                  GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_NUM_REF_IDX_L0_ACTIVE_MINUS1));
-      pSliceHead->uiRefCount[0]	= 1 + uiCode;
+      pSliceHead->uiRefCount[0] = 1 + uiCode;
     }
   }
 
@@ -894,9 +894,9 @@
 
     if (kbExtensionFlag) {
       if (pNalHeaderExt->iNoInterLayerPredFlag || pNalHeaderExt->uiQualityId > 0)
-        pSliceHeadExt->bBasePredWeightTableFlag	= false;
+        pSliceHeadExt->bBasePredWeightTableFlag = false;
       else
-        pSliceHeadExt->bBasePredWeightTableFlag	= true;
+        pSliceHeadExt->bBasePredWeightTableFlag = true;
     }
 
     if (kpCurNal->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc != 0) {
@@ -907,7 +907,7 @@
 
       if (kbExtensionFlag && !pSubsetSps->sSpsSvcExt.bSliceHeaderRestrictionFlag) {
         WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //store_ref_base_pic_flag
-        pSliceHeadExt->bStoreRefBasePicFlag	= !!uiCode;
+        pSliceHeadExt->bStoreRefBasePicFlag = !!uiCode;
         if ((pNalHeaderExt->bUseRefBasePicFlag || pSliceHeadExt->bStoreRefBasePicFlag) && !bIdrFlag) {
           WelsLog (pLogCtx, WELS_LOG_WARNING,
                    "ParseSliceHeaderSyntaxs(): bUseRefBasePicFlag or bStoreRefBasePicFlag = 1 not supported.");
@@ -948,7 +948,7 @@
   pSliceHead->iSliceBetaOffset             = 0;
   if (pPps->bDeblockingFilterControlPresentFlag) {
     WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //disable_deblocking_filter_idc
-    pSliceHead->uiDisableDeblockingFilterIdc	= uiCode;
+    pSliceHead->uiDisableDeblockingFilterIdc = uiCode;
     //refer to JVT-X201wcm1.doc G.7.4.3.4--2010.4.20
     if (pSliceHead->uiDisableDeblockingFilterIdc > 6) {
       WelsLog (pLogCtx, WELS_LOG_WARNING, "disable_deblock_filter_idc (%d) out of range [0, 6]",
@@ -957,12 +957,12 @@
     }
     if (pSliceHead->uiDisableDeblockingFilterIdc != 1) {
       WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //slice_alpha_c0_offset_div2
-      pSliceHead->iSliceAlphaC0Offset	= iCode * 2;
+      pSliceHead->iSliceAlphaC0Offset = iCode * 2;
       WELS_CHECK_SE_BOTH_ERROR (pSliceHead->iSliceAlphaC0Offset, SLICE_HEADER_ALPHAC0_BETA_OFFSET_MIN,
                                 SLICE_HEADER_ALPHAC0_BETA_OFFSET_MAX, "slice_alpha_c0_offset_div2 * 2", GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER,
                                     ERR_INFO_INVALID_SLICE_ALPHA_C0_OFFSET_DIV2));
       WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //slice_beta_offset_div2
-      pSliceHead->iSliceBetaOffset		= iCode * 2;
+      pSliceHead->iSliceBetaOffset = iCode * 2;
       WELS_CHECK_SE_BOTH_ERROR (pSliceHead->iSliceBetaOffset, SLICE_HEADER_ALPHAC0_BETA_OFFSET_MIN,
                                 SLICE_HEADER_ALPHAC0_BETA_OFFSET_MAX, "slice_beta_offset_div2 * 2", GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER,
                                     ERR_INFO_INVALID_SLICE_BETA_OFFSET_DIV2));
@@ -969,7 +969,7 @@
     }
   }
 
-  bSgChangeCycleInvolved	= (pPps->uiNumSliceGroups > 1 && pPps->uiSliceGroupMapType >= 3
+  bSgChangeCycleInvolved = (pPps->uiNumSliceGroups > 1 && pPps->uiSliceGroupMapType >= 3
                              && pPps->uiSliceGroupMapType <= 5);
   if (kbExtensionFlag && bSgChangeCycleInvolved)
     bSgChangeCycleInvolved = (bSgChangeCycleInvolved && (uiQualityId == BASE_QUALITY_ID));
@@ -978,9 +978,9 @@
       const int32_t kiNumBits = (int32_t)WELS_CEIL (log (static_cast<double> (1 + pPps->uiPicSizeInMapUnits /
                                 pPps->uiSliceGroupChangeRate)));
       WELS_READ_VERIFY (BsGetBits (pBs, kiNumBits, &uiCode)); //lice_group_change_cycle
-      pSliceHead->iSliceGroupChangeCycle	= uiCode;
+      pSliceHead->iSliceGroupChangeCycle = uiCode;
     } else
-      pSliceHead->iSliceGroupChangeCycle	= 0;
+      pSliceHead->iSliceGroupChangeCycle = 0;
   }
 
   if (!kbExtensionFlag) {
@@ -987,15 +987,15 @@
     FillDefaultSliceHeaderExt (pSliceHeadExt, pNalHeaderExt);
   } else {
     /* Extra syntax elements newly introduced */
-    pSliceHeadExt->pSubsetSps	= pSubsetSps;
+    pSliceHeadExt->pSubsetSps = pSubsetSps;
 
     if (!pNalHeaderExt->iNoInterLayerPredFlag && BASE_QUALITY_ID == uiQualityId) {
       //the following should be deleted for CODE_CLEAN
       WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //ref_layer_dq_id
-      pSliceHeadExt->uiRefLayerDqId	= uiCode;
+      pSliceHeadExt->uiRefLayerDqId = uiCode;
       if (pSubsetSps->sSpsSvcExt.bInterLayerDeblockingFilterCtrlPresentFlag) {
         WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //disable_inter_layer_deblocking_filter_idc
-        pSliceHeadExt->uiDisableInterLayerDeblockingFilterIdc	= uiCode;
+        pSliceHeadExt->uiDisableInterLayerDeblockingFilterIdc = uiCode;
         //refer to JVT-X201wcm1.doc G.7.4.3.4--2010.4.20
         if (pSliceHeadExt->uiDisableInterLayerDeblockingFilterIdc > 6) {
           WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "disable_inter_layer_deblock_filter_idc (%d) out of range [0, 6]",
@@ -1004,13 +1004,13 @@
         }
         if (pSliceHeadExt->uiDisableInterLayerDeblockingFilterIdc != 1) {
           WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //inter_layer_slice_alpha_c0_offset_div2
-          pSliceHeadExt->iInterLayerSliceAlphaC0Offset	= iCode * 2;
+          pSliceHeadExt->iInterLayerSliceAlphaC0Offset = iCode * 2;
           WELS_CHECK_SE_BOTH_ERROR (pSliceHeadExt->iInterLayerSliceAlphaC0Offset,
                                     SLICE_HEADER_INTER_LAYER_ALPHAC0_BETA_OFFSET_MIN, SLICE_HEADER_INTER_LAYER_ALPHAC0_BETA_OFFSET_MAX,
                                     "inter_layer_alpha_c0_offset_div2 * 2", GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER,
                                         ERR_INFO_INVALID_SLICE_ALPHA_C0_OFFSET_DIV2));
           WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //inter_layer_slice_beta_offset_div2
-          pSliceHeadExt->iInterLayerSliceBetaOffset		= iCode * 2;
+          pSliceHeadExt->iInterLayerSliceBetaOffset = iCode * 2;
           WELS_CHECK_SE_BOTH_ERROR (pSliceHeadExt->iInterLayerSliceBetaOffset, SLICE_HEADER_INTER_LAYER_ALPHAC0_BETA_OFFSET_MIN,
                                     SLICE_HEADER_INTER_LAYER_ALPHAC0_BETA_OFFSET_MAX, "inter_layer_slice_beta_offset_div2 * 2",
                                     GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_BETA_OFFSET_DIV2));
@@ -1021,7 +1021,7 @@
       pSliceHeadExt->uiRefLayerChromaPhaseYPlus1     = pSubsetSps->sSpsSvcExt.uiSeqRefLayerChromaPhaseYPlus1;
 
       WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constrained_intra_resampling_flag
-      pSliceHeadExt->bConstrainedIntraResamplingFlag	= !!uiCode;
+      pSliceHeadExt->bConstrainedIntraResamplingFlag = !!uiCode;
 
       {
         SPosOffset pos;
@@ -1038,7 +1038,7 @@
       WelsLog (pLogCtx, WELS_LOG_WARNING, "MGS not supported.");
       return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_MGS);
     } else {
-      pSliceHeadExt->uiRefLayerDqId	= (uint8_t) - 1;
+      pSliceHeadExt->uiRefLayerDqId = (uint8_t) - 1;
     }
 
     pSliceHeadExt->bSliceSkipFlag            = false;
@@ -1055,28 +1055,28 @@
 
     if (!pNalHeaderExt->iNoInterLayerPredFlag) {
       WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //slice_skip_flag
-      pSliceHeadExt->bSliceSkipFlag	= !!uiCode;
+      pSliceHeadExt->bSliceSkipFlag = !!uiCode;
       if (pSliceHeadExt->bSliceSkipFlag) {
         WelsLog (pLogCtx, WELS_LOG_WARNING, "bSliceSkipFlag == 1 not supported.");
         return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_SLICESKIP);
       } else {
         WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_base_mode_flag
-        pSliceHeadExt->bAdaptiveBaseModeFlag	= !!uiCode;
+        pSliceHeadExt->bAdaptiveBaseModeFlag = !!uiCode;
         if (!pSliceHeadExt->bAdaptiveBaseModeFlag) {
           WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //default_base_mode_flag
-          pSliceHeadExt->bDefaultBaseModeFlag	= !!uiCode;
+          pSliceHeadExt->bDefaultBaseModeFlag = !!uiCode;
         }
         if (!pSliceHeadExt->bDefaultBaseModeFlag) {
           WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_motion_prediction_flag
-          pSliceHeadExt->bAdaptiveMotionPredFlag	= !!uiCode;
+          pSliceHeadExt->bAdaptiveMotionPredFlag = !!uiCode;
           if (!pSliceHeadExt->bAdaptiveMotionPredFlag) {
             WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //default_motion_prediction_flag
-            pSliceHeadExt->bDefaultMotionPredFlag	= !!uiCode;
+            pSliceHeadExt->bDefaultMotionPredFlag = !!uiCode;
           }
         }
 
         WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_residual_prediction_flag
-        pSliceHeadExt->bAdaptiveResidualPredFlag	= !!uiCode;
+        pSliceHeadExt->bAdaptiveResidualPredFlag = !!uiCode;
         if (!pSliceHeadExt->bAdaptiveResidualPredFlag) {
           WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //default_residual_prediction_flag
           pSliceHeadExt->bDefaultResidualPredFlag = !!uiCode;
@@ -1084,15 +1084,15 @@
       }
       if (pSubsetSps->sSpsSvcExt.bAdaptiveTCoeffLevelPredFlag) {
         WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //tcoeff_level_prediction_flag
-        pSliceHeadExt->bTCoeffLevelPredFlag	= !!uiCode;
+        pSliceHeadExt->bTCoeffLevelPredFlag = !!uiCode;
       }
     }
 
     if (!pSubsetSps->sSpsSvcExt.bSliceHeaderRestrictionFlag) {
       WELS_READ_VERIFY (BsGetBits (pBs, 4, &uiCode)); //scan_idx_start
-      pSliceHeadExt->uiScanIdxStart	= uiCode;
+      pSliceHeadExt->uiScanIdxStart = uiCode;
       WELS_READ_VERIFY (BsGetBits (pBs, 4, &uiCode)); //scan_idx_end
-      pSliceHeadExt->uiScanIdxEnd	= uiCode;
+      pSliceHeadExt->uiScanIdxEnd = uiCode;
       if (pSliceHeadExt->uiScanIdxStart != 0 || pSliceHeadExt->uiScanIdxEnd != 15) {
         WelsLog (pLogCtx, WELS_LOG_WARNING, "uiScanIdxStart (%d) != 0 and uiScanIdxEnd (%d) !=15 not supported here",
                  pSliceHeadExt->uiScanIdxStart, pSliceHeadExt->uiScanIdxEnd);
@@ -1113,7 +1113,7 @@
  *  ppDst:  succeeded VCL NAL based AVC (I/P Slice)
  */
 bool PrefetchNalHeaderExtSyntax (PWelsDecoderContext pCtx, PNalUnit const kppDst, PNalUnit const kpSrc) {
-  PNalUnitHeaderExt pNalHdrExtD	= NULL, pNalHdrExtS = NULL;
+  PNalUnitHeaderExt pNalHdrExtD = NULL, pNalHdrExtS = NULL;
   PSliceHeaderExt pShExtD = NULL;
   PPrefixNalUnit pPrefixS = NULL;
   PSps pSps = NULL;
@@ -1502,7 +1502,7 @@
       pCurAu->pNalUnitsList[iIdx] = t;
       ++ iIdx;
     }
-    pCurAu->uiActualUnitsNum = pCurAu->uiAvailUnitsNum	= kuiLeftNum;
+    pCurAu->uiActualUnitsNum = pCurAu->uiAvailUnitsNum = kuiLeftNum;
   }
 }
 
@@ -2098,12 +2098,12 @@
   int16_t iLastIdD = -1, iLastIdQ = -1;
   int16_t iCurrIdD = 0, iCurrIdQ = 0;
   uint8_t uiNalRefIdc = 0;
-  bool	bFreshSliceAvailable =
-    true;	// Another fresh slice comingup for given dq layer, for multiple slices in case of header parts of slices sometimes loss over error-prone channels, 8/14/2008
+  bool bFreshSliceAvailable =
+    true; // Another fresh slice comingup for given dq layer, for multiple slices in case of header parts of slices sometimes loss over error-prone channels, 8/14/2008
 
   //update pCurDqLayer at the starting of AU decoding
   if (pCtx->bInitialDqLayersMem) {
-    pCtx->pCurDqLayer				= pCtx->pDqLayersList[0];
+    pCtx->pCurDqLayer = pCtx->pDqLayersList[0];
   }
 
   InitCurDqLayerData (pCtx, pCtx->pCurDqLayer);
@@ -2110,10 +2110,10 @@
 
   pNalCur = pCurAu->pNalUnitsList[iIdx];
   while (iIdx <= iEndIdx) {
-    PDqLayer dq_cur							= pCtx->pCurDqLayer;
+    PDqLayer dq_cur = pCtx->pCurDqLayer;
     SLayerInfo pLayerInfo;
-    PSliceHeaderExt pShExt					= NULL;
-    PSliceHeader pSh							= NULL;
+    PSliceHeaderExt pShExt = NULL;
+    PSliceHeader pSh = NULL;
 
     if (pCtx->pDec == NULL) {
       pCtx->pDec = PrefetchPic (pCtx->pPicBuff[0]);
@@ -2191,8 +2191,8 @@
         return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_FMO_INIT_FAIL);
       }
 
-      bFreshSliceAvailable	= (iCurrIdD != iLastIdD
-                               || iCurrIdQ != iLastIdQ);	// do not need condition of (first_mb == 0) due multiple slices might be disorder
+      bFreshSliceAvailable = (iCurrIdD != iLastIdD
+                               || iCurrIdQ != iLastIdQ);        // do not need condition of (first_mb == 0) due multiple slices might be disorder
 
       WelsDqLayerDecodeStart (pCtx, pNalCur, pLayerInfo.pSps, pLayerInfo.pPps);
 
@@ -2279,15 +2279,15 @@
       fprintf (stderr, "cur_frame : %d\tiCurrIdD : %d\n ",
                dq_cur->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.iFrameNum, iCurrIdD);
 #endif//#if !CODEC_FOR_TESTBED
-      iLastIdD	= iCurrIdD;
-      iLastIdQ	= iCurrIdQ;
+      iLastIdD = iCurrIdD;
+      iLastIdQ = iCurrIdQ;
 
       //pNalUnitsList overflow.
       ++ iIdx;
       if (iIdx <= iEndIdx) {
-        pNalCur	= pCurAu->pNalUnitsList[iIdx];
+        pNalCur = pCurAu->pNalUnitsList[iIdx];
       } else {
-        pNalCur	= NULL;
+        pNalCur = NULL;
       }
 
       if (pNalCur == NULL ||
@@ -2346,7 +2346,7 @@
 
     // need update frame_num due current frame is well decoded
     if (pCurAu->pNalUnitsList[pCurAu->uiStartPos]->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc > 0)
-      pCtx->iPrevFrameNum	= pSh->iFrameNum;
+      pCtx->iPrevFrameNum = pSh->iFrameNum;
     if (pCtx->bLastHasMmco5)
       pCtx->iPrevFrameNum = 0;
   }
--- a/codec/decoder/core/src/fmo.cpp
+++ b/codec/decoder/core/src/fmo.cpp
@@ -93,7 +93,7 @@
   int32_t i = 0;
   WELS_VERIFY_RETURN_IF (1, (NULL == pFmo || NULL == pPps))
   uiNumSliceGroups = pPps->uiNumSliceGroups;
-  iMbNum			 = pFmo->iCountMbNum;
+  iMbNum = pFmo->iCountMbNum;
   WELS_VERIFY_RETURN_IF (1, (NULL == pFmo->pMbAllocMap || iMbNum <= 0 || kiMbWidth == 0
                              || uiNumSliceGroups >= MAX_SLICEGROUP_IDS))
 
@@ -124,7 +124,7 @@
   // the cases we would not like
   WELS_VERIFY_RETURN_IF (1, (NULL == pFmo || NULL == kpPps))
 
-  iNumMb	= pFmo->iCountMbNum;
+  iNumMb        = pFmo->iCountMbNum;
 
   iNumMb = kiMbWidth * kiMbHeight;
 
@@ -133,15 +133,15 @@
 
 
   WelsFree (pFmo->pMbAllocMap, "_fmo->pMbAllocMap");
-  pFmo->pMbAllocMap	= (uint8_t*)WelsMallocz (iNumMb * sizeof (uint8_t), "_fmo->pMbAllocMap");
-  WELS_VERIFY_RETURN_IF (1, (NULL == pFmo->pMbAllocMap))	// out of memory
+  pFmo->pMbAllocMap = (uint8_t*)WelsMallocz (iNumMb * sizeof (uint8_t), "_fmo->pMbAllocMap");
+  WELS_VERIFY_RETURN_IF (1, (NULL == pFmo->pMbAllocMap)) // out of memory
 
-  pFmo->iCountMbNum	= iNumMb;
+  pFmo->iCountMbNum = iNumMb;
 
   if (kpPps->uiNumSliceGroups < 2 && iNumMb > 0) { // only one slice group, exactly it is single slice based
     memset (pFmo->pMbAllocMap, 0,  iNumMb * sizeof (int8_t));	// for safe
 
-    pFmo->iSliceGroupCount		= 1;
+    pFmo->iSliceGroupCount = 1;
 
     return 0;
   }
@@ -150,7 +150,7 @@
       || ((int32_t)kpPps->uiNumSliceGroups != pFmo->iSliceGroupCount)) {
     switch (kpPps->uiSliceGroupMapType) {
     case 0:
-      iErr	= FmoGenerateMbAllocMapType0 (pFmo, kpPps);
+      iErr = FmoGenerateMbAllocMapType0 (pFmo, kpPps);
       break;
     case 1:
       iErr = FmoGenerateMbAllocMapType1 (pFmo, kpPps, kiMbWidth);
@@ -161,7 +161,7 @@
     case 5:
     case 6:
       // Reserve for others slice group type
-      iErr	= 1;
+      iErr = 1;
       break;
     default:
       return 1;
@@ -213,7 +213,7 @@
       if (NULL != pIter->pMbAllocMap) {
         WelsFree (pIter->pMbAllocMap, "pIter->pMbAllocMap");
 
-        pIter->pMbAllocMap	= NULL;
+        pIter->pMbAllocMap = NULL;
       }
       pIter->iSliceGroupCount   = 0;
       pIter->iSliceGroupType    = -1;
@@ -272,7 +272,7 @@
     } else {
       if (!pFmo->bActiveFlag && *pActiveFmoNum < MAX_PPS_COUNT) {
         ++ (*pActiveFmoNum);
-        pFmo->bActiveFlag	= true;
+        pFmo->bActiveFlag = true;
       }
     }
   }
@@ -318,7 +318,7 @@
   do {
     ++ iNextMb;
     if (iNextMb >= kiTotalMb) {
-      iNextMb	= -1;
+      iNextMb = -1;
       break;
     }
     if (kpMbMap[iNextMb] == kuiSliceGroupIdc) {
--- a/codec/decoder/core/src/get_intra_predictor.cpp
+++ b/codec/decoder/core/src/get_intra_predictor.cpp
@@ -112,7 +112,7 @@
 }
 
 void WelsI4x4LumaPredDcNA_c (uint8_t* pPred, const int32_t kiStride) {
-  const uint32_t kuiDC32		= 0x80808080U;
+  const uint32_t kuiDC32 = 0x80808080U;
 
   ST32A4 (pPred                             , kuiDC32);
   ST32A4 (pPred + kiStride                  , kuiDC32);
@@ -534,7 +534,7 @@
 
 void WelsI8x8LumaPredDcNA_c (uint8_t* pPred, const int32_t kiStride, bool bTLAvail, bool bTRAvail) {
   // for normal 8 bit depth, 8-94
-  const uint64_t kuiDC64		= 0x8080808080808080ULL;
+  const uint64_t kuiDC64 = 0x8080808080808080ULL;
 
   int32_t iStride[8];
   int32_t i;
--- a/codec/decoder/core/src/manage_dec_ref.cpp
+++ b/codec/decoder/core/src/manage_dec_ref.cpp
@@ -87,7 +87,7 @@
   PRefPic pRefPic = &pCtx->sRefPic;
   pCtx->sRefPic.uiLongRefCount[LIST_0] = pCtx->sRefPic.uiShortRefCount[LIST_0] = 0;
 
-  pRefPic->uiRefCount[LIST_0]	= 0;
+  pRefPic->uiRefCount[LIST_0] = 0;
 
   for (i = 0; i < MAX_SHORT_REF_COUNT; i++) {
     if (pRefPic->pShortRefList[LIST_0][i] != NULL) {
--- a/codec/decoder/core/src/memmgr_nal_unit.cpp
+++ b/codec/decoder/core/src/memmgr_nal_unit.cpp
@@ -64,7 +64,7 @@
   pPtr = pBase;
   *ppAu = (PAccessUnit)pPtr;
   pPtr += kuiSizeAu;
-  (*ppAu)->pNalUnitsList	= (PNalUnit*)pPtr;
+  (*ppAu)->pNalUnitsList = (PNalUnit*)pPtr;
   pPtr += kuiSizeNalUnitPtr;
   do {
     (*ppAu)->pNalUnitsList[uiIdx] = (PNalUnit)pPtr;
--- a/codec/decoder/core/src/parse_mb_syn_cavlc.cpp
+++ b/codec/decoder/core/src/parse_mb_syn_cavlc.cpp
@@ -1133,8 +1133,8 @@
     uint32_t uiSubMbType;
 
     if (MB_TYPE_8x8_REF0 == pCurDqLayer->pMbType[iMbXy]) {
-      iRefCount[0]	=
-        iRefCount[1]	= 1;
+      iRefCount[0] =
+        iRefCount[1] = 1;
     }
 
     //uiSubMbType, partition
--- a/codec/decoder/core/src/pic_queue.cpp
+++ b/codec/decoder/core/src/pic_queue.cpp
@@ -69,7 +69,7 @@
   int32_t iLumaSize         = 0;
   int32_t iChromaSize       = 0;
 
-  pPic	= (PPicture) WelsMallocz (sizeof (SPicture), "PPicture");
+  pPic = (PPicture) WelsMallocz (sizeof (SPicture), "PPicture");
   WELS_VERIFY_RETURN_IF (NULL, NULL == pPic);
 
   memset (pPic, 0, sizeof (SPicture));
@@ -88,7 +88,7 @@
     pPic->iLinesize[0] = iPicWidth;
     pPic->iLinesize[1] = pPic->iLinesize[2] = iPicChromaWidth;
   } else {
-    pPic->pBuffer[0]	= static_cast<uint8_t*> (WelsMallocz (iLumaSize /* luma */
+    pPic->pBuffer[0] = static_cast<uint8_t*> (WelsMallocz (iLumaSize /* luma */
                         + (iChromaSize << 1) /* Cb,Cr */, "_pic->buffer[0]"));
     WELS_VERIFY_RETURN_PROC_IF (NULL, NULL == pPic->pBuffer[0], FreePicture (pPic));
 
--- a/codec/decoder/core/src/rec_mb.cpp
+++ b/codec/decoder/core/src/rec_mb.cpp
@@ -79,7 +79,7 @@
   int8_t* pIntra8x8PredMode = pDqLayer->pIntra4x4FinalMode[iMbXy]; // I_NxN
   int16_t* pRS = pScoeffLevel;
   /*itransform info*/
-  PIdctResAddPredFunc	pIdctResAddPredFunc = pCtx->pIdctResAddPredFunc8x8;
+  PIdctResAddPredFunc pIdctResAddPredFunc = pCtx->pIdctResAddPredFunc8x8;
 
   /*************local variable********************/
   uint8_t i = 0;
@@ -133,7 +133,7 @@
   int8_t* pIntra4x4PredMode = pDqLayer->pIntra4x4FinalMode[iMBXY];
   int16_t* pRS = pScoeffLevel;
   /*itransform info*/
-  PIdctResAddPredFunc	pIdctResAddPredFunc = pCtx->pIdctResAddPredFunc;
+  PIdctResAddPredFunc pIdctResAddPredFunc = pCtx->pIdctResAddPredFunc;
 
 
   /*************local variable********************/
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -102,7 +102,7 @@
 #endif//OUTPUT_BIT_STREAM
 
 
-  m_pWelsTrace	= new welsCodecTrace();
+  m_pWelsTrace = new welsCodecTrace();
   if (m_pWelsTrace != NULL) {
     m_pWelsTrace->SetCodecInstance (this);
     m_pWelsTrace->SetTraceLevel (WELS_LOG_ERROR);
@@ -227,7 +227,7 @@
   if (NULL != m_pDecContext) {
     WelsFree (m_pDecContext, "m_pDecContext");
 
-    m_pDecContext	= NULL;
+    m_pDecContext = NULL;
   }
 
 }
@@ -240,7 +240,7 @@
 
   if (m_pDecContext) //free
     UninitDecoder();
-  m_pDecContext	= (PWelsDecoderContext)WelsMallocz (sizeof (SWelsDecoderContext), "m_pDecContext");
+  m_pDecContext = (PWelsDecoderContext)WelsMallocz (sizeof (SWelsDecoderContext), "m_pDecContext");
   if (NULL == m_pDecContext)
     return cmMallocMemeError;
 
@@ -266,7 +266,7 @@
     if (pOption == NULL)
       return cmInitParaError;
 
-    iVal = * ((int*)pOption);	// is_rgb
+    iVal = * ((int*)pOption); // is_rgb
 
     return DecoderSetCsp (m_pDecContext, iVal);
   } else if (eOptID == DECODER_OPTION_END_OF_STREAM) { // Indicate bit-stream of the final frame to be decoded
@@ -273,9 +273,9 @@
     if (pOption == NULL)
       return cmInitParaError;
 
-    iVal	= * ((int*)pOption);	// boolean value for whether enabled End Of Stream flag
+    iVal = * ((int*)pOption); // boolean value for whether enabled End Of Stream flag
 
-    m_pDecContext->bEndOfStreamFlag	= iVal ? true : false;
+    m_pDecContext->bEndOfStreamFlag = iVal ? true : false;
 
     return cmResultSuccess;
   } else if (eOptID == DECODER_OPTION_ERROR_CON_IDC) { // Indicate error concealment status
@@ -282,7 +282,7 @@
     if (pOption == NULL)
       return cmInitParaError;
 
-    iVal	= * ((int*)pOption);	// int value for error concealment idc
+    iVal = * ((int*)pOption); // int value for error concealment idc
     iVal = WELS_CLIP3 (iVal, (int32_t) ERROR_CON_DISABLE, (int32_t) ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE);
     m_pDecContext->eErrorConMethod = (ERROR_CON_IDC) iVal;
     if ((m_pDecContext->bParseOnly) && (m_pDecContext->eErrorConMethod != ERROR_CON_DISABLE)) {
@@ -340,11 +340,11 @@
 
   if (DECODER_OPTION_DATAFORMAT == eOptID) {
     iVal = (int32_t) m_pDecContext->eOutputColorFormat;
-    * ((int*)pOption)	= iVal;
+    * ((int*)pOption) = iVal;
     return cmResultSuccess;
   } else if (DECODER_OPTION_END_OF_STREAM == eOptID) {
-    iVal	= m_pDecContext->bEndOfStreamFlag;
-    * ((int*)pOption)	= iVal;
+    iVal = m_pDecContext->bEndOfStreamFlag;
+    * ((int*)pOption) = iVal;
     return cmResultSuccess;
   }
 #ifdef LONG_TERM_REF
@@ -473,7 +473,7 @@
     EWelsNalUnitType eNalType =
       NAL_UNIT_UNSPEC_0;	//for NBR, IDR frames are expected to decode as followed if error decoding an IDR currently
 
-    eNalType	= m_pDecContext->sCurNalHead.eNalUnitType;
+    eNalType = m_pDecContext->sCurNalHead.eNalUnitType;
 
     if (m_pDecContext->iErrorCode & dsOutOfMemory) {
       ForceResetParaSetStatusAndAUList (m_pDecContext);
@@ -638,7 +638,7 @@
     int& iWidth,
     int& iHeight,
     int& iColorFormat) {
-  DECODING_STATE	 state = dsErrorFree;
+  DECODING_STATE state = dsErrorFree;
 
   return state;
 }
@@ -678,7 +678,7 @@
     return ERR_INVALID_PARAMETERS;
   }
 
-  *ppDecoder	= new CWelsDecoder();
+  *ppDecoder = new CWelsDecoder();
 
   if (NULL == *ppDecoder) {
     return ERR_MALLOC_FAILED;
--- a/codec/encoder/core/inc/param_svc.h
+++ b/codec/encoder/core/inc/param_svc.h
@@ -264,7 +264,7 @@
     pCodingParam->fMaxFrameRate  = fMaxFrameRate;
   }
   int32_t ParamTranscode (const SEncParamExt& pCodingParam) {
-    float fParamMaxFrameRate		= WELS_CLIP3 (pCodingParam.fMaxFrameRate, MIN_FRAME_RATE, MAX_FRAME_RATE);
+    float fParamMaxFrameRate = WELS_CLIP3 (pCodingParam.fMaxFrameRate, MIN_FRAME_RATE, MAX_FRAME_RATE);
 
     iUsageType = pCodingParam.iUsageType;
     iPicWidth   = pCodingParam.iPicWidth;
@@ -326,9 +326,9 @@
     bSimulcastAVC       = pCodingParam.bSimulcastAVC;
 
     /* Layer definition */
-    iSpatialLayerNum	= (int8_t)WELS_CLIP3 (pCodingParam.iSpatialLayerNum, 1,
+    iSpatialLayerNum = (int8_t)WELS_CLIP3 (pCodingParam.iSpatialLayerNum, 1,
                                             MAX_DEPENDENCY_LAYER); // number of dependency(Spatial/CGS) layers used to be encoded
-    iTemporalLayerNum		= (int8_t)WELS_CLIP3 (pCodingParam.iTemporalLayerNum, 1,
+    iTemporalLayerNum = (int8_t)WELS_CLIP3 (pCodingParam.iTemporalLayerNum, 1,
                           MAX_TEMPORAL_LEVEL); // number of temporal layer specified
 
     uiGopSize           = 1 << (iTemporalLayerNum - 1); // Override GOP size based temporal layer
@@ -350,7 +350,7 @@
     iLTRRefNum  = (pCodingParam.bEnableLongTermReference ? pCodingParam.iLTRRefNum : 0);
     iLtrMarkPeriod  = pCodingParam.iLtrMarkPeriod;
 
-    bPrefixNalAddingCtrl	= pCodingParam.bPrefixNalAddingCtrl;
+    bPrefixNalAddingCtrl = pCodingParam.bPrefixNalAddingCtrl;
 
     if ( (CONSTANT_ID == pCodingParam.eSpsPpsIdStrategy)
         || (INCREASING_ID == pCodingParam.eSpsPpsIdStrategy)
@@ -405,7 +405,7 @@
 
       pSpatialLayer->iDLayerQp = pCodingParam.sSpatialLayers[iIdxSpatial].iDLayerQp;
 
-      uiProfileIdc	= (!bSimulcastAVC) ? PRO_SCALABLE_BASELINE : PRO_BASELINE;
+      uiProfileIdc = (!bSimulcastAVC) ? PRO_SCALABLE_BASELINE : PRO_BASELINE;
       ++ pDlp;
       ++ pSpatialLayer;
       ++ iIdxSpatial;
@@ -419,9 +419,9 @@
 // assuming that the width/height ratio of all spatial layers are the same
 
   void SetActualPicResolution() {
-    int32_t iSpatialIdx			= iSpatialLayerNum - 1;
+    int32_t iSpatialIdx = iSpatialLayerNum - 1;
     for (; iSpatialIdx >= 0; iSpatialIdx --) {
-      SSpatialLayerInternal* pDlayerInternal		= &sDependencyLayers[iSpatialIdx];
+      SSpatialLayerInternal* pDlayerInternal = &sDependencyLayers[iSpatialIdx];
       SSpatialLayerConfig* pDlayer =  &sSpatialLayers[iSpatialIdx];
 
       pDlayerInternal->iActualWidth = pDlayer->iVideoWidth;
@@ -456,7 +456,7 @@
       memset (pDlp->uiCodingIdx2TemporalId, INVALID_TEMPORAL_ID, sizeof (pDlp->uiCodingIdx2TemporalId));
       pSpatialLayer->uiProfileIdc = uiProfileIdc;	// PRO_BASELINE, PRO_SCALABLE_BASELINE;
 
-      iNotCodedMask	= (1 << (kuiLogFactorInOutRate + kuiLogFactorMaxInRate)) - 1;
+      iNotCodedMask = (1 << (kuiLogFactorInOutRate + kuiLogFactorMaxInRate)) - 1;
       for (uint32_t uiFrameIdx = 0; uiFrameIdx <= uiGopSize; ++ uiFrameIdx) {
         if (0 == (uiFrameIdx & iNotCodedMask)) {
           const int8_t kiTemporalId = pTemporalIdList[uiFrameIdx];
@@ -474,7 +474,7 @@
         return ENC_RETURN_INVALIDINPUT;
       }
 
-      uiProfileIdc	= bSimulcastAVC ? (iEntropyCodingModeFlag ? PRO_HIGH : PRO_BASELINE) :
+      uiProfileIdc = bSimulcastAVC ? (iEntropyCodingModeFlag ? PRO_HIGH : PRO_BASELINE) :
                       (iEntropyCodingModeFlag ? PRO_SCALABLE_HIGH : PRO_SCALABLE_BASELINE);
       ++ pDlp;
       ++ pSpatialLayer;
--- a/codec/encoder/core/inc/vlc_encoder.h
+++ b/codec/encoder/core/inc/vlc_encoder.h
@@ -64,7 +64,7 @@
 
 static inline int32_t WriteTotalcoeffTrailingonesChroma (SBitStringAux* pBs, uint8_t uiTotalCoeff,
     uint8_t uiTrailingOnes) {
-const uint8_t* kpCoeffToken	= &g_kuiVlcCoeffToken[4][uiTotalCoeff][uiTrailingOnes][0];
+const uint8_t* kpCoeffToken = &g_kuiVlcCoeffToken[4][uiTotalCoeff][uiTrailingOnes][0];
 return BsWriteBits (pBs, kpCoeffToken[1], kpCoeffToken[0]);
 }
 
@@ -75,7 +75,7 @@
 }
 
 static inline int32_t WriteTotalZeros (SBitStringAux* pBs, uint32_t uiTotalCoeff, uint32_t uiTotalZeros) {
-const uint8_t* kpTotalZeros	= &g_kuiVlcTotalZeros[uiTotalCoeff][uiTotalZeros][0];
+const uint8_t* kpTotalZeros = &g_kuiVlcTotalZeros[uiTotalCoeff][uiTotalZeros][0];
 return BsWriteBits (pBs, kpTotalZeros[1], kpTotalZeros[0]);
 }
 
--- a/codec/encoder/core/src/au_set.cpp
+++ b/codec/encoder/core/src/au_set.cpp
@@ -107,7 +107,7 @@
                             : (WELS_MAX (1, (pParam->uiGopSize >> 1))));
   int32_t iNeededRefNum = (pParam->uiIntraPeriod != 1) ? (iCurrentStrNum + pParam->iLTRRefNum) : 0;
 
-  iNeededRefNum		= WELS_CLIP3 (iNeededRefNum,
+  iNeededRefNum = WELS_CLIP3 (iNeededRefNum,
                                 MIN_REF_PIC_COUNT,
                                 (pParam->iUsageType == CAMERA_VIDEO_REAL_TIME) ? MAX_REFERENCE_PICTURE_COUNT_NUM_CAMERA :
                                 MAX_REFERENCE_PICTURE_COUNT_NUM_SCREEN);
@@ -474,9 +474,9 @@
 
   //max value of both iFrameNum and POC are 2^16-1, in our encoder, iPOC=2*iFrameNum, so max of iFrameNum should be 2^15-1.--
   pSps->uiLog2MaxFrameNum = 15;//16;
-  pSps->iLog2MaxPocLsb	= 1 + pSps->uiLog2MaxFrameNum;
+  pSps->iLog2MaxPocLsb = 1 + pSps->uiLog2MaxFrameNum;
 
-  pSps->iNumRefFrames	= kiNumRefFrame;	/* min pRef size when fifo pRef operation*/
+  pSps->iNumRefFrames = kiNumRefFrame;        /* min pRef size when fifo pRef operation*/
 
   if (kbEnableFrameCropping) {
     // TODO: get frame_crop_left_offset, frame_crop_right_offset, frame_crop_top_offset, frame_crop_bottom_offset
@@ -483,9 +483,9 @@
     pSps->bFrameCroppingFlag = WelsGetPaddingOffset (pLayerParamInternal->iActualWidth, pLayerParamInternal->iActualHeight,
                                pLayerParam->iVideoWidth, pLayerParam->iVideoHeight, pSps->sFrameCrop);
   } else {
-    pSps->bFrameCroppingFlag	= false;
+    pSps->bFrameCroppingFlag = false;
   }
-  pSps->uiProfileIdc	= pLayerParam->uiProfileIdc ? pLayerParam->uiProfileIdc : PRO_BASELINE;
+  pSps->uiProfileIdc = pLayerParam->uiProfileIdc ? pLayerParam->uiProfileIdc : PRO_BASELINE;
   if (pLayerParam->uiProfileIdc == PRO_BASELINE) {
     pSps->bConstraintSet0Flag = true;
   }
@@ -496,7 +496,7 @@
     pSps->bConstraintSet2Flag = true;
   }
 
-  ELevelIdc uiLevel	= WelsGetLevelIdc (pSps, pLayerParamInternal->fOutputFrameRate, pLayerParam->iSpatialBitrate);
+  ELevelIdc uiLevel = WelsGetLevelIdc (pSps, pLayerParamInternal->fOutputFrameRate, pLayerParam->iSpatialBitrate);
   //update level
   //for Scalable Baseline, Scalable High, and Scalable High Intra profiles.If level_idc is equal to 9, the indicated level is level 1b.
   //for the Baseline, Constrained Baseline, Main, and Extended profiles,If level_idc is equal to 11 and constraint_set3_flag is equal to 1, the indicated level is level 1b.
@@ -533,7 +533,7 @@
   WelsInitSps (pSps, pLayerParam, pLayerParamInternal, kuiIntraPeriod, kiNumRefFrame, kuiSpsId, kbEnableFrameCropping,
                bEnableRc, kiDlayerCount, false);
 
-  pSps->uiProfileIdc	= (pLayerParam->uiProfileIdc >= PRO_SCALABLE_BASELINE) ? pLayerParam->uiProfileIdc :
+  pSps->uiProfileIdc = (pLayerParam->uiProfileIdc >= PRO_SCALABLE_BASELINE) ? pLayerParam->uiProfileIdc :
                         PRO_SCALABLE_BASELINE;
 
   pSubsetSps->sSpsSvcExt.iExtendedSpatialScalability    = 0;    /* ESS is 0 in default */
@@ -558,26 +558,26 @@
     assert (pSps != NULL);
     if (NULL == pSps)
       return 1;
-    pUsedSps	= pSps;
+    pUsedSps = pSps;
   } else {
     assert (pSubsetSps != NULL);
     if (NULL == pSubsetSps)
       return 1;
-    pUsedSps	= &pSubsetSps->pSps;
+    pUsedSps = &pSubsetSps->pSps;
   }
 
   /* fill picture parameter set syntax */
-  pPps->iPpsId		= kuiPpsId;
-  pPps->iSpsId		= pUsedSps->uiSpsId;
+  pPps->iPpsId = kuiPpsId;
+  pPps->iSpsId = pUsedSps->uiSpsId;
   pPps->bEntropyCodingModeFlag = kbEntropyCodingModeFlag;
 #if !defined(DISABLE_FMO_FEATURE)
-  pPps->uiNumSliceGroups =  1;	//param->qos_param.sliceGroupCount;
+  pPps->uiNumSliceGroups = 1; //param->qos_param.sliceGroupCount;
   if (pPps->uiNumSliceGroups > 1) {
-    pPps->uiSliceGroupMapType = 0;	//param->qos_param.sliceGroupType;
+    pPps->uiSliceGroupMapType = 0; //param->qos_param.sliceGroupType;
     if (pPps->uiSliceGroupMapType == 0) {
       uint32_t uiGroup = 0;
       while (uiGroup < pPps->uiNumSliceGroups) {
-        pPps->uiRunLength[uiGroup]	= 25;
+        pPps->uiRunLength[uiGroup] = 25;
         ++ uiGroup;
       }
     } else if (pPps->uiSliceGroupMapType == 2) {
--- a/codec/encoder/core/src/decode_mb_aux.cpp
+++ b/codec/encoder/core/src/decode_mb_aux.cpp
@@ -39,7 +39,7 @@
  ****************************************************************************/
 void WelsIHadamard4x4Dc (int16_t* pRes) { //pBuffer size : 4x4
   int16_t iTemp[4];
-  int32_t i	= 4;
+  int32_t i = 4;
 
   while (--i >= 0) {
     const int32_t kiIdx  = i << 2;
--- a/codec/encoder/core/src/encoder.cpp
+++ b/codec/encoder/core/src/encoder.cpp
@@ -240,7 +240,7 @@
     ++pEncCtx->iFrameIndex;
 
     if (pEncCtx->iPOC < (1 << pEncCtx->pSps->iLog2MaxPocLsb) - 2)     // if iPOC type is no 0, this need be modification
-      pEncCtx->iPOC			+= 2;	// for POC type 0
+      pEncCtx->iPOC += 2;   // for POC type 0
     else
       pEncCtx->iPOC = 0;
 
@@ -248,7 +248,7 @@
       if (pEncCtx->iFrameNum < (1 << pEncCtx->pSps->uiLog2MaxFrameNum) - 1)
         ++ pEncCtx->iFrameNum;
       else
-        pEncCtx->iFrameNum	= 0;	// if iFrameNum overflow
+        pEncCtx->iFrameNum = 0;    // if iFrameNum overflow
     }
     pEncCtx->eNalType           = NAL_UNIT_CODED_SLICE;
     pEncCtx->eSliceType         = P_SLICE;
@@ -270,7 +270,7 @@
     // rc_init_gop
   } else if (keFrameType == videoFrameTypeI) {
     if (pEncCtx->iPOC < (1 << pEncCtx->pSps->iLog2MaxPocLsb) - 2)     // if iPOC type is no 0, this need be modification
-      pEncCtx->iPOC			+= 2;	// for POC type 0
+      pEncCtx->iPOC += 2;   // for POC type 0
     else
       pEncCtx->iPOC = 0;
 
@@ -278,7 +278,7 @@
       if (pEncCtx->iFrameNum < (1 << pEncCtx->pSps->uiLog2MaxFrameNum) - 1)
         ++ pEncCtx->iFrameNum;
       else
-        pEncCtx->iFrameNum	= 0;	// if iFrameNum overflow
+        pEncCtx->iFrameNum = 0;    // if iFrameNum overflow
     }
 
     pEncCtx->eNalType     = NAL_UNIT_CODED_SLICE;
@@ -296,7 +296,7 @@
 }
 
 EVideoFrameType DecideFrameType (sWelsEncCtx* pEncCtx, const int8_t kiSpatialNum) {
-  SWelsSvcCodingParam* pSvcParam	= pEncCtx->pSvcParam;
+  SWelsSvcCodingParam* pSvcParam = pEncCtx->pSvcParam;
   EVideoFrameType iFrameType = videoFrameTypeInvalid;
   bool bSceneChangeFlag = false;
 
@@ -370,7 +370,7 @@
 extern "C" void DumpDependencyRec (SPicture* pCurPicture, const char* kpFileName, const int8_t kiDid, bool bAppend,
                                    SDqLayer* pDqLayer) {
   WelsFileHandle* pDumpRecFile = NULL;
-  int32_t iWrittenSize											= 0;
+  int32_t iWrittenSize = 0;
   const char* openMode = bAppend ? "ab" : "wb";
   SWelsSPS* pSpsTmp = (kiDid > BASE_DEPENDENCY_ID) ? & (pDqLayer->sLayerInfo.pSubsetSpsP->pSps) :
                       pDqLayer->sLayerInfo.pSpsP;
@@ -384,8 +384,8 @@
     pDumpRecFile = WelsFopen (kpFileName, openMode);
   else {
     char sDependencyRecFileName[16] = {0};
-    WelsSnprintf (sDependencyRecFileName, 16, "rec%d.yuv", kiDid);	// confirmed_safe_unsafe_usage
-    pDumpRecFile	= WelsFopen (sDependencyRecFileName, openMode);
+    WelsSnprintf (sDependencyRecFileName, 16, "rec%d.yuv", kiDid); // confirmed_safe_unsafe_usage
+    pDumpRecFile = WelsFopen (sDependencyRecFileName, openMode);
   }
   if (NULL != pDumpRecFile && bAppend)
     WelsFseek (pDumpRecFile, 0, SEEK_END);
@@ -437,22 +437,22 @@
 
 void DumpRecFrame (SPicture* pCurPicture, const char* kpFileName, const int8_t kiDid, bool bAppend,
                    SDqLayer* pDqLayer) {
-  WelsFileHandle* pDumpRecFile				= NULL;
+  WelsFileHandle* pDumpRecFile = NULL;
   SWelsSPS* pSpsTmp = (kiDid > BASE_DEPENDENCY_ID) ? & (pDqLayer->sLayerInfo.pSubsetSpsP->pSps) :
                       pDqLayer->sLayerInfo.pSpsP;
   bool bFrameCroppingFlag = pSpsTmp->bFrameCroppingFlag;
   SCropOffset* pFrameCrop = &pSpsTmp->sFrameCrop;
 
-  int32_t iWrittenSize			= 0;
+  int32_t iWrittenSize = 0;
   const char* openMode = bAppend ? "ab" : "wb";
 
   if (NULL == pCurPicture || NULL == kpFileName)
     return;
 
-  if (strlen (kpFileName) > 0) {	// confirmed_safe_unsafe_usage
-    pDumpRecFile	= WelsFopen (kpFileName, openMode);
+  if (strlen (kpFileName) > 0) { // confirmed_safe_unsafe_usage
+    pDumpRecFile = WelsFopen (kpFileName, openMode);
   } else {
-    pDumpRecFile	= WelsFopen ("rec.yuv", openMode);
+    pDumpRecFile = WelsFopen ("rec.yuv", openMode);
   }
   if (NULL != pDumpRecFile && bAppend)
     WelsFseek (pDumpRecFile, 0, SEEK_END);
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -450,7 +450,7 @@
         WelsLog (pLogCtx, WELS_LOG_DEBUG,
                  "ParamValidationExt(), uiSliceNum(%d) you set for SM_FIXEDSLCNUM_SLICE, now turn to SM_SINGLE_SLICE type!",
                  pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum);
-        pSpatialLayer->sSliceCfg.uiSliceMode	= SM_SINGLE_SLICE;
+        pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
         break;
       }
       if (pCodingParam->iRCMode != RC_OFF_MODE) {	// multiple slices verify with gom
@@ -477,8 +477,8 @@
       }
       // considering the coding efficient and performance, iCountMbNum constraint by MIN_NUM_MB_PER_SLICE condition of multi-pSlice mode settting
       if (iMbNumInFrame <= MIN_NUM_MB_PER_SLICE) {
-        pSpatialLayer->sSliceCfg.uiSliceMode	= SM_SINGLE_SLICE;
-        pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum	= 1;
+        pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
+        pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum = 1;
         break;
       }
     }
@@ -515,7 +515,7 @@
       if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum == 1) {
         WelsLog (pLogCtx, WELS_LOG_WARNING,
                  "ParamValidationExt(), pSlice setting for SM_RASTER_SLICE now turn to SM_SINGLE_SLICE!");
-        pSpatialLayer->sSliceCfg.uiSliceMode	= SM_SINGLE_SLICE;
+        pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
         break;
       }
       if ((pCodingParam->iRCMode != RC_OFF_MODE) && pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum > 1) {
@@ -523,8 +523,8 @@
       }
       // considering the coding efficient and performance, iCountMbNum constraint by MIN_NUM_MB_PER_SLICE condition of multi-pSlice mode settting
       if (iMbNumInFrame <= MIN_NUM_MB_PER_SLICE) {
-        pSpatialLayer->sSliceCfg.uiSliceMode	= SM_SINGLE_SLICE;
-        pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum	= 1;
+        pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
+        pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum = 1;
         break;
       }
     }
@@ -540,7 +540,7 @@
                  iMbHeight, MAX_SLICES_NUM);
         return ENC_RETURN_UNSUPPORTED_PARA;
       }
-      pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum	= iMbHeight;
+      pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum = iMbHeight;
 
       if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum <= 0) {
         WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) settings!",
@@ -682,7 +682,7 @@
   if (NULL == pParam || NULL == ppCtx || NULL == *ppCtx)
     return 1;
 
-  iNumDependencyLayers	= pParam->iSpatialLayerNum;
+  iNumDependencyLayers = pParam->iSpatialLayerNum;
 
   do {
     SSpatialLayerConfig* pDLayer = &pParam->sSpatialLayers[iDIndex];
@@ -748,7 +748,7 @@
   if (NULL != pCountLayers)
     *pCountLayers = iCountNumLayers;
   if (NULL != pCountNals)
-    *pCountNals	= iCountNumNals;
+    *pCountNals = iCountNumNals;
   return 0;
 }
 
@@ -874,7 +874,7 @@
   pMbCache->pPrevIntra4x4PredModeFlag = (bool*)pMa->WelsMalloc (16 * sizeof (bool),
                                         "pMbCache->pPrevIntra4x4PredModeFlag");
   WELS_VERIFY_RETURN_IF (1, (NULL == pMbCache->pPrevIntra4x4PredModeFlag));
-  pMbCache->pRemIntra4x4PredModeFlag	= (int8_t*)pMa->WelsMalloc (16 * sizeof (int8_t),
+  pMbCache->pRemIntra4x4PredModeFlag = (int8_t*)pMa->WelsMalloc (16 * sizeof (int8_t),
                                         "pMbCache->pRemIntra4x4PredModeFlag");
   WELS_VERIFY_RETURN_IF (1, (NULL == pMbCache->pRemIntra4x4PredModeFlag));
   pMbCache->pDct = (SDCTCoeff*)pMa->WelsMalloc (sizeof (SDCTCoeff), "pMbCache->pDct");
@@ -1001,7 +1001,7 @@
                          const int32_t iDlayerCount, const int32_t iSpsNumInUse,
                          SWelsSPS* pSpsArray,
                          SSubsetSps* pSubsetArray, bool bSVCBaseLayer) {
-  SSpatialLayerConfig* pDlayerParam	= &pParam->sSpatialLayers[iDlayerIndex];
+  SSpatialLayerConfig* pDlayerParam = &pParam->sSpatialLayers[iDlayerIndex];
 
   assert (iSpsNumInUse <= MAX_SPS_COUNT);
   if (!kbUseSubsetSps) {
@@ -1096,7 +1096,7 @@
   const int32_t kiNeedFeatureStorage = (pParam->iUsageType != SCREEN_CONTENT_REAL_TIME) ? 0 :
                                        ((kiFeatureStrategyIndex << 16) + ((kiMe16x16 & 0x00FF) << 8) + (kiMe8x8 & 0x00FF));
 
-  iDlayerIndex			= 0;
+  iDlayerIndex = 0;
   while (iDlayerIndex < iDlayerCount) {
     SRefList* pRefList          = NULL;
     uint32_t i                  = 0;
@@ -1111,21 +1111,21 @@
     WelsGetEncBlockStrideOffset ((*ppCtx)->pStrideTab->pStrideEncBlockOffset[iDlayerIndex], iPicWidth, iPicChromaWidth);
 
     // pRef list
-    pRefList		= (SRefList*)pMa->WelsMallocz (sizeof (SRefList), "pRefList");
+    pRefList = (SRefList*)pMa->WelsMallocz (sizeof (SRefList), "pRefList");
     WELS_VERIFY_RETURN_PROC_IF (1, (NULL == pRefList), FreeMemorySvc (ppCtx))
     do {
-      pRefList->pRef[i]	= AllocPicture (pMa, kiWidth, kiHeight, true,
-                                        (iDlayerIndex == iDlayerCount - 1) ? kiNeedFeatureStorage : 0);	// to use actual size of current layer
+      pRefList->pRef[i] = AllocPicture (pMa, kiWidth, kiHeight, true,
+                                        (iDlayerIndex == iDlayerCount - 1) ? kiNeedFeatureStorage : 0); // to use actual size of current layer
       WELS_VERIFY_RETURN_PROC_IF (1, (NULL == pRefList->pRef[i]), FreeMemorySvc (ppCtx))
       ++ i;
     } while (i < 1 + iNumRef);
 
     pRefList->pNextBuffer = pRefList->pRef[0];
-    (*ppCtx)->ppRefPicListExt[iDlayerIndex]	= pRefList;
+    (*ppCtx)->ppRefPicListExt[iDlayerIndex] = pRefList;
     ++ iDlayerIndex;
   }
 
-  iDlayerIndex	= 0;
+  iDlayerIndex = 0;
   while (iDlayerIndex < iDlayerCount) {
     SDqLayer* pDqLayer              = NULL;
     SSpatialLayerConfig* pDlayer    = &pParam->sSpatialLayers[iDlayerIndex];
@@ -1158,8 +1158,8 @@
     pDqLayer->iMbWidth  = kiMbW;
     pDqLayer->iMbHeight = kiMbH;
     {
-      int32_t iSliceIdx		= 0;
-      pDqLayer->sLayerInfo.pSliceInLayer	= (SSlice*)pMa->WelsMallocz (sizeof (SSlice) * iMaxSliceNum, "pSliceInLayer");
+      int32_t iSliceIdx = 0;
+      pDqLayer->sLayerInfo.pSliceInLayer = (SSlice*)pMa->WelsMallocz (sizeof (SSlice) * iMaxSliceNum, "pSliceInLayer");
 
       WELS_VERIFY_RETURN_PROC_IF (1, (NULL == pDqLayer->sLayerInfo.pSliceInLayer), FreeMemorySvc (ppCtx))
       if (iMaxSliceNum > 1) {
@@ -1201,7 +1201,7 @@
     if (SM_SINGLE_SLICE == pDlayer->sSliceCfg.uiSliceMode) {
       //iLoopFilterDisableIdc: will be 0 or 1 under single_slice
       if (2 == pParam->iLoopFilterDisableIdc) {
-        pDqLayer->iLoopFilterDisableIdc	= 0;
+        pDqLayer->iLoopFilterDisableIdc = 0;
       }
       //bDeblockingParallelFlag
       pDqLayer->bDeblockingParallelFlag = false;
@@ -1208,13 +1208,13 @@
     } else {
       //multi-pSlice
       if (0 == pDqLayer->iLoopFilterDisableIdc) {
-        pDqLayer->bDeblockingParallelFlag	= false;
+        pDqLayer->bDeblockingParallelFlag = false;
       }
     }
 
     //
     if (kiNeedFeatureStorage && iDlayerIndex == iDlayerCount - 1) {
-      pDqLayer->pFeatureSearchPreparation	= static_cast<SFeatureSearchPreparation*> (pMa->WelsMallocz (sizeof (
+      pDqLayer->pFeatureSearchPreparation = static_cast<SFeatureSearchPreparation*> (pMa->WelsMallocz (sizeof (
                                               SFeatureSearchPreparation), "pFeatureSearchPreparation"));
       WELS_VERIFY_RETURN_PROC_IF (1, NULL == pDqLayer->pFeatureSearchPreparation, FreeMemorySvc (ppCtx));
       int32_t iReturn = RequestFeatureSearchPreparation (pMa, pDlayer->iVideoWidth, pDlayer->iVideoHeight,
@@ -1225,7 +1225,7 @@
       pDqLayer->pFeatureSearchPreparation = NULL;
     }
 
-    (*ppCtx)->ppDqLayerList[iDlayerIndex]	= pDqLayer;
+    (*ppCtx)->ppDqLayerList[iDlayerIndex] = pDqLayer;
 
     ++ iDlayerIndex;
   }
@@ -1233,10 +1233,10 @@
   // for dynamically malloc for parameter sets memory instead of maximal items for standard to reduce size, 3/18/2010
   const int32_t kiNeededSpsNum = (*ppCtx)->GetNeededSpsNum();
   const int32_t kiNeededSubsetSpsNum = (*ppCtx)->GetNeededSubsetSpsNum();
-  (*ppCtx)->pSpsArray	= (SWelsSPS*)pMa->WelsMalloc (kiNeededSpsNum * sizeof (SWelsSPS), "pSpsArray");
+  (*ppCtx)->pSpsArray = (SWelsSPS*)pMa->WelsMalloc (kiNeededSpsNum * sizeof (SWelsSPS), "pSpsArray");
   WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pSpsArray), FreeMemorySvc (ppCtx))
   if (kiNeededSubsetSpsNum > 0) {
-    (*ppCtx)->pSubsetArray	= (SSubsetSps*)pMa->WelsMalloc (kiNeededSubsetSpsNum * sizeof (SSubsetSps), "pSubsetArray");
+    (*ppCtx)->pSubsetArray = (SSubsetSps*)pMa->WelsMalloc (kiNeededSubsetSpsNum * sizeof (SSubsetSps), "pSubsetArray");
     WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pSubsetArray), FreeMemorySvc (ppCtx))
   } else {
     (*ppCtx)->pSubsetArray = NULL;
@@ -1256,7 +1256,7 @@
 
   // PPS
   const int32_t kiNeededPpsNum = (*ppCtx)->GetNeededPpsNum();
-  (*ppCtx)->pPPSArray	= (SWelsPPS*)pMa->WelsMalloc (kiNeededPpsNum * sizeof (SWelsPPS), "pPPSArray");
+  (*ppCtx)->pPPSArray = (SWelsPPS*)pMa->WelsMalloc (kiNeededPpsNum * sizeof (SWelsPPS), "pPPSArray");
   WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pPPSArray), FreeMemorySvc (ppCtx))
 
   // copy from existing if the pointer exists
@@ -1272,10 +1272,10 @@
     (*ppCtx)->pPSOVector = NULL;
   }
 
-  (*ppCtx)->pDqIdcMap	= (SDqIdc*)pMa->WelsMallocz (iDlayerCount * sizeof (SDqIdc), "pDqIdcMap");
+  (*ppCtx)->pDqIdcMap = (SDqIdc*)pMa->WelsMallocz (iDlayerCount * sizeof (SDqIdc), "pDqIdcMap");
   WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pDqIdcMap), FreeMemorySvc (ppCtx))
 
-  iDlayerIndex	= 0;
+  iDlayerIndex = 0;
   while (iDlayerIndex < iDlayerCount) {
     SDqIdc* pDqIdc                      = & (*ppCtx)->pDqIdcMap[iDlayerIndex];
     const bool bUseSubsetSps            = (!pParam->bSimulcastAVC) && (iDlayerIndex > BASE_DEPENDENCY_ID);
@@ -1282,7 +1282,7 @@
     SSpatialLayerConfig* pDlayerParam   = &pParam->sSpatialLayers[iDlayerIndex];
     bool bSvcBaselayer = (!pParam->bSimulcastAVC) && (iDlayerCount > BASE_DEPENDENCY_ID)
                          && (iDlayerIndex == BASE_DEPENDENCY_ID);
-    pDqIdc->uiSpatialId	= iDlayerIndex;
+    pDqIdc->uiSpatialId = iDlayerIndex;
 
     if (! (SPS_LISTING & pParam->eSpsPpsIdStrategy)) {
       WelsGenerateNewSps (*ppCtx, bUseSubsetSps, iDlayerIndex,
@@ -1337,7 +1337,7 @@
     }
 
     if (! (SPS_PPS_LISTING == pParam->eSpsPpsIdStrategy)) {
-      pPps	= & (*ppCtx)->pPPSArray[iPpsId];
+      pPps = & (*ppCtx)->pPPSArray[iPpsId];
       // initialize pPps
       WelsInitPps (pPps, pSps, pSubsetSps, iPpsId, true, bUseSubsetSps, pParam->iEntropyCodingModeFlag != 0);
     } else {
@@ -1353,7 +1353,7 @@
         pPps = & ((*ppCtx)->pPPSArray[kiFoundPpsId]);
       } else {
         iPpsId = ((*ppCtx)->sPSOVector.uiInUsePpsNum++);
-        pPps	= & (*ppCtx)->pPPSArray[iPpsId];
+        pPps    = & (*ppCtx)->pPPSArray[iPpsId];
         WelsInitPps (pPps, pSps, pSubsetSps, iPpsId, true, bUseSubsetSps, pParam->iEntropyCodingModeFlag != 0);
       }
     }
@@ -1372,10 +1372,10 @@
         FreeMemorySvc (ppCtx);
         return iResult;
       }
-      (*ppCtx)->ppDqLayerList[iDlayerIndex]->pSliceEncCtx	= & (*ppCtx)->pSliceCtxList[iDlayerIndex];
+      (*ppCtx)->ppDqLayerList[iDlayerIndex]->pSliceEncCtx = & (*ppCtx)->pSliceCtxList[iDlayerIndex];
     }
-    pDqIdc->iSpsId	= iSpsId;
-    pDqIdc->iPpsId	= iPpsId;
+    pDqIdc->iSpsId = iSpsId;
+    pDqIdc->iPpsId = iPpsId;
 
     (*ppCtx)->sPSOVector.bPpsIdMappingIntoSubsetsps[iPpsId] = bUseSubsetSps;
 
@@ -1438,7 +1438,7 @@
     return 1;
   (*ppCtx)->pStrideTab = pPtr;
 
-  iCntTid	= pParam->iTemporalLayerNum > 1 ? 2 : 1;
+  iCntTid = pParam->iTemporalLayerNum > 1 ? 2 : 1;
 
   iSpatialIdx = 0;
   while (iSpatialIdx < kiNumSpatialLayers) {
@@ -1459,11 +1459,11 @@
   // Adaptive size_cs, size_fdec by implementation dependency
   iTemporalIdx = 0;
   while (iTemporalIdx < iCntTid) {
-    const bool kbBaseTemporalFlag	= (iTemporalIdx == 0);
+    const bool kbBaseTemporalFlag = (iTemporalIdx == 0);
 
     iSpatialIdx = 0;
     while (iSpatialIdx < kiNumSpatialLayers) {
-      SSpatialLayerConfig* fDlp					= &pParam->sSpatialLayers[iSpatialIdx];
+      SSpatialLayerConfig* fDlp = &pParam->sSpatialLayers[iSpatialIdx];
 
       const int32_t kiWidthPad = WELS_ALIGN (fDlp->iVideoWidth, 16) + (PADDING_LENGTH << 1);
       iLineSizeY[iSpatialIdx][kbBaseTemporalFlag]  = WELS_ALIGN (kiWidthPad, 32);
@@ -1492,7 +1492,7 @@
 
   iTemporalIdx = 0;
   while (iTemporalIdx < iCntTid) {
-    const bool kbBaseTemporalFlag	= (iTemporalIdx == 0);
+    const bool kbBaseTemporalFlag = (iTemporalIdx == 0);
 
     iSpatialIdx = 0;
     while (iSpatialIdx < iCountLayersNeedCs[kbBaseTemporalFlag]) {
@@ -1502,7 +1502,7 @@
 
       WelsGetEncBlockStrideOffset ((int32_t*)pBaseDec, kiLumaWidth, kiChromaWidth);
 
-      pPtr->pStrideDecBlockOffset[kiActualSpatialIdx][kbBaseTemporalFlag]	= (int32_t*)pBaseDec;
+      pPtr->pStrideDecBlockOffset[kiActualSpatialIdx][kbBaseTemporalFlag] = (int32_t*)pBaseDec;
       pBaseDec += kiUnit1Size;
 
       ++ iSpatialIdx;
@@ -1511,7 +1511,7 @@
   }
   iTemporalIdx = 0;
   while (iTemporalIdx < iCntTid) {
-    const bool kbBaseTemporalFlag	= (iTemporalIdx == 0);
+    const bool kbBaseTemporalFlag = (iTemporalIdx == 0);
 
     iSpatialIdx = 0;
     while (iSpatialIdx < kiNumSpatialLayers) {
@@ -1523,12 +1523,12 @@
       while (i < iCountLayersNeedCs[kbBaseTemporalFlag]) {
         const int32_t kiActualIdx = iMapSpatialIdx[i][kbBaseTemporalFlag];
         if (kiActualIdx == iSpatialIdx) {
-          bInMap	= true;
+          bInMap = true;
           break;
         }
         if (!bMatchFlag) {
-          iMatchIndex	= kiActualIdx;
-          bMatchFlag	= true;
+          iMatchIndex = kiActualIdx;
+          bMatchFlag = true;
         }
         ++ i;
       }
@@ -1539,7 +1539,7 @@
       }
 
       // not in spatial map and assign match one to it
-      pPtr->pStrideDecBlockOffset[iSpatialIdx][kbBaseTemporalFlag]	=
+      pPtr->pStrideDecBlockOffset[iSpatialIdx][kbBaseTemporalFlag] =
         pPtr->pStrideDecBlockOffset[iMatchIndex][kbBaseTemporalFlag];
 
       ++ iSpatialIdx;
@@ -1615,7 +1615,7 @@
   }
 
   memset (pRowY, 0, iRowSize);
-  iMaxMbHeight	= sMbSizeMap[kiNumSpatialLayers - 1].iCountMbNum / sMbSizeMap[kiNumSpatialLayers - 1].iMbWidth;
+  iMaxMbHeight = sMbSizeMap[kiNumSpatialLayers - 1].iCountMbNum / sMbSizeMap[kiNumSpatialLayers - 1].iMbWidth;
   i = 0;
   for (;;) {
     ENFORCE_STACK_ALIGN_1D (int16_t, t, 4, 16)
@@ -1761,11 +1761,11 @@
   while (iIndex < pParam->iSpatialLayerNum) {
     SSpatialLayerConfig* fDlp = &pParam->sSpatialLayers[iIndex];
 
-    fCompressRatioThr	= COMPRESS_RATIO_THR;
+    fCompressRatioThr = COMPRESS_RATIO_THR;
 
     iLayerBsSize = WELS_ROUND (((3 * fDlp->iVideoWidth * fDlp->iVideoHeight) >> 1) * fCompressRatioThr) +
                    MAX_MACROBLOCK_SIZE_IN_BYTE_x2;
-    iLayerBsSize	= WELS_ALIGN (iLayerBsSize, 4);			// 4 bytes alinged
+    iLayerBsSize = WELS_ALIGN (iLayerBsSize, 4); // 4 bytes alinged
     iVclLayersBsSizeCount += iLayerBsSize;
     ++ iIndex;
   }
@@ -1772,7 +1772,7 @@
   iTargetSpatialBsSize = iLayerBsSize;
   iCountBsLen = iNonVclLayersBsSizeCount + iVclLayersBsSizeCount;
 
-  pParam->iNumRefFrame	= WELS_CLIP3 (pParam->iNumRefFrame, MIN_REF_PIC_COUNT,
+  pParam->iNumRefFrame = WELS_CLIP3 (pParam->iNumRefFrame, MIN_REF_PIC_COUNT,
                                       (pParam->iUsageType == CAMERA_VIDEO_REAL_TIME ? MAX_REFERENCE_PICTURE_COUNT_NUM_CAMERA :
                                        MAX_REFERENCE_PICTURE_COUNT_NUM_SCREEN));
 
@@ -1791,15 +1791,15 @@
 
   if (pParam->iMultipleThreadIdc > 1) {
     const int32_t iTotalLength = iCountBsLen + (iTargetSpatialBsSize * ((*ppCtx)->iMaxSliceCount - 1));
-    (*ppCtx)->pFrameBs			= (uint8_t*)pMa->WelsMalloc (iTotalLength, "pFrameBs");
+    (*ppCtx)->pFrameBs = (uint8_t*)pMa->WelsMalloc (iTotalLength, "pFrameBs");
     WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pFrameBs), FreeMemorySvc (ppCtx))
     (*ppCtx)->iFrameBsSize = iTotalLength;
   } else {
-    (*ppCtx)->pFrameBs			= (uint8_t*)pMa->WelsMalloc (iCountBsLen, "pFrameBs");
+    (*ppCtx)->pFrameBs = (uint8_t*)pMa->WelsMalloc (iCountBsLen, "pFrameBs");
     WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pFrameBs), FreeMemorySvc (ppCtx))
-    (*ppCtx)->iFrameBsSize		= iCountBsLen;
+    (*ppCtx)->iFrameBsSize = iCountBsLen;
   }
-  (*ppCtx)->iPosBsBuffer		= 0;
+  (*ppCtx)->iPosBsBuffer = 0;
 
   // for pSlice bs buffers
   if (pParam->iMultipleThreadIdc > 1 && RequestMtResource (ppCtx, pParam, iCountBsLen, iTargetSpatialBsSize)) {
@@ -1824,12 +1824,12 @@
                                 (pMa->WelsMallocz (iCountMaxMbNum * 2 * MB_BLOCK8x8_NUM * sizeof (int8_t), "pRefIndexBlock4x4"));
   WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pRefIndexBlock4x4), FreeMemorySvc (ppCtx))
 
-  (*ppCtx)->pSadCostMb	= static_cast<int32_t*>
+  (*ppCtx)->pSadCostMb = static_cast<int32_t*>
                           (pMa->WelsMallocz (iCountMaxMbNum * sizeof (int32_t), "pSadCostMb"));
   WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pSadCostMb), FreeMemorySvc (ppCtx))
 
   (*ppCtx)->bEncCurFrmAsIdrFlag = true;  // make sure first frame is IDR
-  (*ppCtx)->iGlobalQp				= 26;	// global qp in default
+  (*ppCtx)->iGlobalQp = 26;   // global qp in default
 
   (*ppCtx)->pLtr = (SLTRState*)pMa->WelsMalloc (kiNumDependencyLayers * sizeof (SLTRState), "SLTRState");
   WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pLtr), FreeMemorySvc (ppCtx))
@@ -1838,14 +1838,14 @@
     ResetLtrState (& (*ppCtx)->pLtr[i]);
   }
 
-  (*ppCtx)->ppRefPicListExt	= (SRefList**)pMa->WelsMalloc (kiNumDependencyLayers * sizeof (SRefList*), "ppRefPicListExt");
+  (*ppCtx)->ppRefPicListExt = (SRefList**)pMa->WelsMalloc (kiNumDependencyLayers * sizeof (SRefList*), "ppRefPicListExt");
   WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->ppRefPicListExt), FreeMemorySvc (ppCtx))
 
   // pSlice context list
-  (*ppCtx)->pSliceCtxList	= (SSliceCtx*)pMa->WelsMallocz (kiNumDependencyLayers * sizeof (SSliceCtx), "pSliceCtxList");
+  (*ppCtx)->pSliceCtxList = (SSliceCtx*)pMa->WelsMallocz (kiNumDependencyLayers * sizeof (SSliceCtx), "pSliceCtxList");
   WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pSliceCtxList), FreeMemorySvc (ppCtx))
 
-  (*ppCtx)->ppDqLayerList	= (SDqLayer**)pMa->WelsMalloc (kiNumDependencyLayers * sizeof (SDqLayer*), "ppDqLayerList");
+  (*ppCtx)->ppDqLayerList = (SDqLayer**)pMa->WelsMalloc (kiNumDependencyLayers * sizeof (SDqLayer*), "ppDqLayerList");
   WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->ppDqLayerList), FreeMemorySvc (ppCtx))
 
   // stride tables
@@ -1863,7 +1863,7 @@
 
   //pVaa memory allocation
   if (pParam->iUsageType == SCREEN_CONTENT_REAL_TIME) {
-    (*ppCtx)->pVaa	= (SVAAFrameInfoExt*)pMa->WelsMallocz (sizeof (SVAAFrameInfoExt), "pVaa");
+    (*ppCtx)->pVaa = (SVAAFrameInfoExt*)pMa->WelsMallocz (sizeof (SVAAFrameInfoExt), "pVaa");
     WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pVaa), FreeMemorySvc (ppCtx))
     if (RequestMemoryVaaScreen ((*ppCtx)->pVaa, pMa, (*ppCtx)->pSvcParam->iMaxNumRefFrame, iCountMaxMbNum << 2)) {
       WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), RequestMemoryVaaScreen failed!");
@@ -1871,7 +1871,7 @@
       return 1;
     }
   } else {
-    (*ppCtx)->pVaa	= (SVAAFrameInfo*)pMa->WelsMallocz (sizeof (SVAAFrameInfo), "pVaa");
+    (*ppCtx)->pVaa = (SVAAFrameInfo*)pMa->WelsMallocz (sizeof (SVAAFrameInfo), "pVaa");
     WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pVaa), FreeMemorySvc (ppCtx))
   }
 
@@ -1939,12 +1939,12 @@
   MvdCostInit ((*ppCtx)->pMvdCostTable, kuiMvdInterTableStride);  //should put to a better place?
 
   if ((*ppCtx)->ppRefPicListExt[0] != NULL && (*ppCtx)->ppRefPicListExt[0]->pRef[0] != NULL)
-    (*ppCtx)->pDecPic				= (*ppCtx)->ppRefPicListExt[0]->pRef[0];
+    (*ppCtx)->pDecPic = (*ppCtx)->ppRefPicListExt[0]->pRef[0];
   else
-    (*ppCtx)->pDecPic				= NULL;	// error here
+    (*ppCtx)->pDecPic = NULL; // error here
 
-  (*ppCtx)->pSps				= & (*ppCtx)->pSpsArray[0];
-  (*ppCtx)->pPps				= & (*ppCtx)->pPPSArray[0];
+  (*ppCtx)->pSps = & (*ppCtx)->pSpsArray[0];
+  (*ppCtx)->pPps = & (*ppCtx)->pPPSArray[0];
 
   return 0;
 }
@@ -1957,10 +1957,10 @@
  */
 void FreeMemorySvc (sWelsEncCtx** ppCtx) {
   if (NULL != *ppCtx) {
-    sWelsEncCtx* pCtx	= *ppCtx;
-    CMemoryAlign* pMa			= pCtx->pMemAlign;
+    sWelsEncCtx* pCtx = *ppCtx;
+    CMemoryAlign* pMa = pCtx->pMemAlign;
     SWelsSvcCodingParam* pParam = pCtx->pSvcParam;
-    int32_t ilayer				= 0;
+    int32_t ilayer = 0;
 
     // SStrideTables
     if (NULL != pCtx->pStrideTab) {
@@ -2034,12 +2034,12 @@
 
     if (NULL != pCtx->pMvUnitBlock4x4) {
       pMa->WelsFree (pCtx->pMvUnitBlock4x4, "pMvUnitBlock4x4");
-      pCtx->pMvUnitBlock4x4	= NULL;
+      pCtx->pMvUnitBlock4x4 = NULL;
     }
 
     if (NULL != pCtx->pRefIndexBlock4x4) {
       pMa->WelsFree (pCtx->pRefIndexBlock4x4, "pRefIndexBlock4x4");
-      pCtx->pRefIndexBlock4x4	= NULL;
+      pCtx->pRefIndexBlock4x4 = NULL;
     }
 
     if (NULL != pCtx->ppMbListD) {
@@ -2066,7 +2066,7 @@
     ilayer = 0;
     if (NULL != pCtx->ppDqLayerList && pParam != NULL) {
       while (ilayer < pParam->iSpatialLayerNum) {
-        SDqLayer* pDq	= pCtx->ppDqLayerList[ilayer];
+        SDqLayer* pDq = pCtx->ppDqLayerList[ilayer];
         SSpatialLayerConfig* pDlp = &pCtx->pSvcParam->sSpatialLayers[ilayer];
 
         const bool kbIsDynamicSlicing = (SM_DYN_SLICE == pDlp->sSliceCfg.uiSliceMode);
@@ -2093,9 +2093,9 @@
           }
           if (kbIsDynamicSlicing) {
             pMa->WelsFree (pDq->pNumSliceCodedOfPartition, "pNumSliceCodedOfPartition");
-            pDq->pNumSliceCodedOfPartition	= NULL;
+            pDq->pNumSliceCodedOfPartition = NULL;
             pMa->WelsFree (pDq->pLastCodedMbIdxOfPartition, "pLastCodedMbIdxOfPartition");
-            pDq->pLastCodedMbIdxOfPartition	= NULL;
+            pDq->pLastCodedMbIdxOfPartition = NULL;
             pMa->WelsFree (pDq->pLastMbIdxOfPartition, "pLastMbIdxOfPartition");
             pDq->pLastMbIdxOfPartition = NULL;
           }
@@ -2119,7 +2119,7 @@
     if (NULL != pCtx->ppRefPicListExt && pParam != NULL) {
       ilayer = 0;
       while (ilayer < pParam->iSpatialLayerNum) {
-        SRefList* pRefList		= pCtx->ppRefPicListExt[ilayer];
+        SRefList* pRefList = pCtx->ppRefPicListExt[ilayer];
         if (NULL != pRefList) {
           int32_t iRef = 0;
           do {
@@ -2143,7 +2143,7 @@
     if (NULL != pCtx->pSliceCtxList && pParam != NULL) {
       ilayer = 0;
       while (ilayer < pParam->iSpatialLayerNum) {
-        SSliceCtx* pSliceCtx	= &pCtx->pSliceCtxList[ilayer];
+        SSliceCtx* pSliceCtx = &pCtx->pSliceCtxList[ilayer];
         if (NULL != pSliceCtx)
           UninitSlicePEncCtx (pSliceCtx, pMa);
         ++ ilayer;
@@ -2163,21 +2163,21 @@
       }
 
       pMa->WelsFree (pCtx->pVaa->pVaaBackgroundMbFlag, "pVaa->pVaaBackgroundMbFlag");
-      pCtx->pVaa->pVaaBackgroundMbFlag	= NULL;
+      pCtx->pVaa->pVaaBackgroundMbFlag = NULL;
       pMa->WelsFree (pCtx->pVaa->sVaaCalcInfo.pSad8x8, "pVaa->sVaaCalcInfo.sad8x8");
-      pCtx->pVaa->sVaaCalcInfo.pSad8x8		= NULL;
+      pCtx->pVaa->sVaaCalcInfo.pSad8x8 = NULL;
       pMa->WelsFree (pCtx->pVaa->sVaaCalcInfo.pSsd16x16, "pVaa->sVaaCalcInfo.pSsd16x16");
-      pCtx->pVaa->sVaaCalcInfo.pSsd16x16	= NULL;
+      pCtx->pVaa->sVaaCalcInfo.pSsd16x16 = NULL;
       pMa->WelsFree (pCtx->pVaa->sVaaCalcInfo.pSum16x16, "pVaa->sVaaCalcInfo.pSum16x16");
-      pCtx->pVaa->sVaaCalcInfo.pSum16x16	= NULL;
+      pCtx->pVaa->sVaaCalcInfo.pSum16x16 = NULL;
       pMa->WelsFree (pCtx->pVaa->sVaaCalcInfo.pSumOfSquare16x16, "pVaa->sVaaCalcInfo.pSumOfSquare16x16");
-      pCtx->pVaa->sVaaCalcInfo.pSumOfSquare16x16		= NULL;
+      pCtx->pVaa->sVaaCalcInfo.pSumOfSquare16x16 = NULL;
 
       if (pCtx->pSvcParam->bEnableBackgroundDetection) { //BGD control
         pMa->WelsFree (pCtx->pVaa->sVaaCalcInfo.pSumOfDiff8x8, "pVaa->sVaaCalcInfo.pSumOfDiff8x8");
-        pCtx->pVaa->sVaaCalcInfo.pSumOfDiff8x8	= NULL;
+        pCtx->pVaa->sVaaCalcInfo.pSumOfDiff8x8 = NULL;
         pMa->WelsFree (pCtx->pVaa->sVaaCalcInfo.pMad8x8, "pVaa->sVaaCalcInfo.pMad8x8");
-        pCtx->pVaa->sVaaCalcInfo.pMad8x8	= NULL;
+        pCtx->pVaa->sVaaCalcInfo.pMad8x8 = NULL;
       }
       if (pCtx->pSvcParam->iUsageType == SCREEN_CONTENT_REAL_TIME)
         ReleaseMemoryVaaScreen (pCtx->pVaa, pMa, pCtx->pSvcParam->iMaxNumRefFrame);
@@ -2236,12 +2236,12 @@
     // NOTE: Per design, in case MT/DYNAMIC_SLICE_ASSIGN enabled, for SM_FIXEDSLCNUM_SLICE mode,
     // uiSliceNum of current spatial layer settings equals to uiCpuCores number; SM_DYN_SLICE mode,
     // uiSliceNum intials as uiCpuCores also, stay tuned dynamically slicing in future
-    pSlcArg->uiSliceNum	= iSliceNum;	// used fixed one
+    pSlcArg->uiSliceNum = iSliceNum;    // used fixed one
 
     switch (pMso->uiSliceMode) {
     case SM_DYN_SLICE:
-      iMaxSliceCount	= AVERSLICENUM_CONSTRAINT;
-      break;	// go through for SM_DYN_SLICE?
+      iMaxSliceCount = AVERSLICENUM_CONSTRAINT;
+      break; // go through for SM_DYN_SLICE?
     case SM_FIXEDSLCNUM_SLICE:
       if (iSliceNum > iMaxSliceCount)
         iMaxSliceCount = iSliceNum;
@@ -2274,7 +2274,7 @@
         WelsLog (pLogCtx, WELS_LOG_DEBUG,
                  "InitSliceSettings(), uiSliceNum(%d) you set for SM_AUTO_SLICE, now turn to SM_SINGLE_SLICE type!",
                  pDlp->sSliceCfg.sSliceArgument.uiSliceNum);
-        pDlp->sSliceCfg.uiSliceMode	= SM_SINGLE_SLICE;
+        pDlp->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
         break;
       }
       if (pCodingParam->iRCMode != RC_OFF_MODE) {	// multiple slices verify with gom
@@ -2297,13 +2297,13 @@
         WelsLog (pLogCtx, WELS_LOG_ERROR,
                  "InitSliceSettings(), invalid uiSliceMbNum (%d) settings!,now turn to SM_SINGLE_SLICE type",
                  pDlp->sSliceCfg.sSliceArgument.uiSliceMbNum[0]);
-        pDlp->sSliceCfg.uiSliceMode	= SM_SINGLE_SLICE;
-        pDlp->sSliceCfg.sSliceArgument.uiSliceNum	= 1;
+        pDlp->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
+        pDlp->sSliceCfg.sSliceArgument.uiSliceNum = 1;
       }
       // considering the coding efficient and performance, iCountMbNum constraint by MIN_NUM_MB_PER_SLICE condition of multi-pSlice mode settting
       if (kiMbNumInFrame <= MIN_NUM_MB_PER_SLICE) {
-        pDlp->sSliceCfg.uiSliceMode	= SM_SINGLE_SLICE;
-        pDlp->sSliceCfg.sSliceArgument.uiSliceNum	= 1;
+        pDlp->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
+        pDlp->sSliceCfg.sSliceArgument.uiSliceNum = 1;
         break;
       }
       break;
@@ -2314,13 +2314,13 @@
     ++ iSpatialIdx;
   } while (iSpatialIdx < iSpatialNum);
 
-  pCodingParam->iCountThreadsNum				= WELS_MIN (kiCpuCores, iMaxSliceCount);
-  pCodingParam->iMultipleThreadIdc	= pCodingParam->iCountThreadsNum;
+  pCodingParam->iCountThreadsNum = WELS_MIN (kiCpuCores, iMaxSliceCount);
+  pCodingParam->iMultipleThreadIdc = pCodingParam->iCountThreadsNum;
   if (pCodingParam->iLoopFilterDisableIdc == 0
       && pCodingParam->iMultipleThreadIdc != 1) // Loop filter requested to be enabled, with threading enabled
     pCodingParam->iLoopFilterDisableIdc =
       2; // Disable loop filter on slice boundaries since that's not allowed with multithreading
-  *pMaxSliceCount					= iMaxSliceCount;
+  *pMaxSliceCount = iMaxSliceCount;
 
   return ENC_RETURN_SUCCESS;
 }
@@ -2378,9 +2378,8 @@
 int32_t GetMultipleThreadIdc (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingParam, int16_t& iSliceNum,
                               int32_t& iCacheLineSize, uint32_t& uiCpuFeatureFlags) {
   // for cpu features detection, Only detect once??
-  int32_t uiCpuCores				=
-    0;	// number of logic processors on physical processor package, zero logic processors means HTT not supported
-  uiCpuFeatureFlags	= WelsCPUFeatureDetect (&uiCpuCores);	// detect cpu capacity features
+  int32_t uiCpuCores = 0; // number of logic processors on physical processor package, zero logic processors means HTT not supported
+  uiCpuFeatureFlags = WelsCPUFeatureDetect (&uiCpuCores); // detect cpu capacity features
 
 #ifdef X86_ASM
   if (uiCpuFeatureFlags & WELS_CPU_CACHELINE_128)
@@ -2388,12 +2387,12 @@
   else if (uiCpuFeatureFlags & WELS_CPU_CACHELINE_64)
     iCacheLineSize = 64;
   else if (uiCpuFeatureFlags & WELS_CPU_CACHELINE_32)
-    iCacheLineSize	= 32;
+    iCacheLineSize = 32;
   else if (uiCpuFeatureFlags & WELS_CPU_CACHELINE_16)
-    iCacheLineSize	= 16;
+    iCacheLineSize = 16;
   OutputCpuFeaturesLog (pLogCtx, uiCpuFeatureFlags, uiCpuCores, iCacheLineSize);
 #else
-  iCacheLineSize	= 16;	// 16 bytes aligned in default
+  iCacheLineSize = 16; // 16 bytes aligned in default
 #endif//X86_ASM
 
 #if defined(DYNAMIC_DETECT_CPU_CORES)
@@ -2405,14 +2404,14 @@
       uiCpuCores = DynamicDetectCpuCores();
     // So far so many cpu cores up to MAX_THREADS_NUM mean for server platforms,
     // for client application here it is constrained by maximal to MAX_THREADS_NUM
-    if (uiCpuCores > MAX_THREADS_NUM)	// MAX_THREADS_NUM
-      uiCpuCores	= MAX_THREADS_NUM;	// MAX_THREADS_NUM
-    else if (uiCpuCores < 1)	// just for safe
-      uiCpuCores	= 1;
+    if (uiCpuCores > MAX_THREADS_NUM) // MAX_THREADS_NUM
+      uiCpuCores = MAX_THREADS_NUM; // MAX_THREADS_NUM
+    else if (uiCpuCores < 1) // just for safe
+      uiCpuCores = 1;
   }
 #endif//DYNAMIC_DETECT_CPU_CORES
 
-  uiCpuCores	= WELS_CLIP3 (uiCpuCores, 1, MAX_THREADS_NUM);
+  uiCpuCores = WELS_CLIP3 (uiCpuCores, 1, MAX_THREADS_NUM);
 
   if (InitSliceSettings (pLogCtx, pCodingParam, uiCpuCores, &iSliceNum)) {
     WelsLog (pLogCtx, WELS_LOG_ERROR, "GetMultipleThreadIdc(), InitSliceSettings failed.");
@@ -2440,12 +2439,12 @@
     return 1;
   }
 
-  iRet	=	ParamValidationExt (pLogCtx, pCodingParam);
+  iRet = ParamValidationExt (pLogCtx, pCodingParam);
   if (iRet != 0) {
     WelsLog (pLogCtx, WELS_LOG_ERROR, "WelsInitEncoderExt(), ParamValidationExt failed return %d.", iRet);
     return iRet;
   }
-  iRet	=	pCodingParam->DetermineTemporalSettings();
+  iRet = pCodingParam->DetermineTemporalSettings();
   if (iRet != ENC_RETURN_SUCCESS) {
     WelsLog (pLogCtx, WELS_LOG_ERROR,
              "WelsInitEncoderExt(), DetermineTemporalSettings failed return %d (check in/out frame rate and temporal layer setting! -- in/out = 2^x, x <= temppral_layer_num)",
@@ -2459,9 +2458,9 @@
   }
 
 
-  *ppCtx	= NULL;
+  *ppCtx = NULL;
 
-  pCtx	= static_cast<sWelsEncCtx*> (malloc (sizeof (sWelsEncCtx)));
+  pCtx = static_cast<sWelsEncCtx*> (malloc (sizeof (sWelsEncCtx)));
 
   WELS_VERIFY_RETURN_IF (1, (NULL == pCtx))
   memset (pCtx, 0, sizeof (sWelsEncCtx));
@@ -2485,8 +2484,8 @@
   }
   InitFunctionPointers (pCtx, pCtx->pSvcParam, uiCpuFeatureFlags);
 
-  pCtx->iActiveThreadsNum	= pCodingParam->iCountThreadsNum;
-  pCtx->iMaxSliceCount	= iSliceNum;
+  pCtx->iActiveThreadsNum = pCodingParam->iCountThreadsNum;
+  pCtx->iMaxSliceCount = iSliceNum;
   iRet = RequestMemorySvc (&pCtx, pExistingParasetList);
   if (iRet != 0) {
     WelsLog (pLogCtx, WELS_LOG_ERROR, "WelsInitEncoderExt(), RequestMemorySvc failed return %d.", iRet);
@@ -2528,7 +2527,7 @@
 
   pCtx->iStatisticsLogInterval = STATISTICS_LOG_INTERVAL_MS;
 
-  *ppCtx	= pCtx;
+  *ppCtx = pCtx;
 
   WelsLog (pLogCtx, WELS_LOG_DEBUG, "WelsInitEncoderExt(), pCtx= 0x%p.", (void*)pCtx);
 
@@ -2663,7 +2662,7 @@
  * \brief   get temporal level due to configuration and coding context
  */
 int32_t GetTemporalLevel (SSpatialLayerInternal* fDlp, const int32_t kiFrameNum, const int32_t kiGopSize) {
-  const int32_t kiCodingIdx	= kiFrameNum & (kiGopSize - 1);
+  const int32_t kiCodingIdx = kiFrameNum & (kiGopSize - 1);
 
   return fDlp->uiCodingIdx2TemporalId[kiCodingIdx];
 }
@@ -2687,7 +2686,7 @@
     int32_t   iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;
 
     uiSliceIdc = WelsMbToSliceIdc (pSliceCtx, kiMbXY);
-    pMb->uiSliceIdc	= uiSliceIdc;
+    pMb->uiSliceIdc = uiSliceIdc;
     iLeftXY = kiMbXY - 1;
     iTopXY = kiMbXY - kiMbWidth;
     iLeftTopXY = iTopXY - 1;
@@ -2710,7 +2709,7 @@
     if (bRightTop) {
       uiNeighborAvailFlag |= TOPRIGHT_MB_POS;
     }
-    pMb->uiNeighborAvail	= (uint8_t)uiNeighborAvailFlag;
+    pMb->uiNeighborAvail = (uint8_t)uiNeighborAvailFlag;
 
     ++ iIdx;
   } while (iIdx <= kiEndMbInSlice);
@@ -2720,9 +2719,9 @@
  * TUNE back if number of picture partition decision algorithm based on past if available
  */
 int32_t PicPartitionNumDecision (sWelsEncCtx* pCtx) {
-  int32_t iPartitionNum	= 1;
+  int32_t iPartitionNum = 1;
   if (pCtx->pSvcParam->iMultipleThreadIdc > 1) {
-    iPartitionNum	= pCtx->pSvcParam->iCountThreadsNum;
+    iPartitionNum = pCtx->pSvcParam->iCountThreadsNum;
   }
   return iPartitionNum;
 }
@@ -2744,25 +2743,25 @@
   int32_t i/*, j*/;
 
   if (iPartitionNum <= 0)
-    iPartitionNum	= 1;
+    iPartitionNum = 1;
   else if (iPartitionNum > AVERSLICENUM_CONSTRAINT)
-    iPartitionNum	= AVERSLICENUM_CONSTRAINT;	// AVERSLICENUM_CONSTRAINT might be variable, however not fixed by MACRO
-  iCountMbNumPerPartition	/= iPartitionNum;
-  pSliceCtx->iSliceNumInFrame	= iPartitionNum;
+    iPartitionNum = AVERSLICENUM_CONSTRAINT; // AVERSLICENUM_CONSTRAINT might be variable, however not fixed by MACRO
+  iCountMbNumPerPartition /= iPartitionNum;
+  pSliceCtx->iSliceNumInFrame = iPartitionNum;
   i = 0;
   while (i < iPartitionNum) {
     if (i + 1 == iPartitionNum) {
-      pSliceCtx->pCountMbNumInSlice[i]	= iAssignableMbLeft;
+      pSliceCtx->pCountMbNumInSlice[i] = iAssignableMbLeft;
     } else {
-      pSliceCtx->pCountMbNumInSlice[i]	= iCountMbNumPerPartition;
+      pSliceCtx->pCountMbNumInSlice[i] = iCountMbNumPerPartition;
     }
-    pSliceCtx->pFirstMbInSlice[i]	=	iFirstMbIdx;
+    pSliceCtx->pFirstMbInSlice[i] = iFirstMbIdx;
 
     WelsSetMemMultiplebytes_c (pSliceCtx->pOverallMbMap + iFirstMbIdx, i,
                                pSliceCtx->pCountMbNumInSlice[i], sizeof (uint16_t));
 
     // for next partition(or pSlice)
-    iFirstMbIdx	+= pSliceCtx->pCountMbNumInSlice[i];
+    iFirstMbIdx += pSliceCtx->pCountMbNumInSlice[i];
     iAssignableMbLeft -= pSliceCtx->pCountMbNumInSlice[i];
     ++ i;
   }
@@ -2843,7 +2842,7 @@
   if (NULL == pCurDq)
     return;
 
-  pCurDq->pDecPic	= pDecPic;
+  pCurDq->pDecPic = pDecPic;
 
   if (fDlp->sSliceCfg.uiSliceMode == SM_DYN_SLICE)	// need get extra slices for update
     iSliceCount = GetInitialSliceNum (pCurDq->iMbWidth, pCurDq->iMbHeight, &fDlp->sSliceCfg);
@@ -2900,7 +2899,7 @@
   iIdx = 1;
   while (iIdx < iSliceCount) {
     ++ pSlice;
-    pSlice->bSliceHeaderExtFlag			= pBaseSlice->bSliceHeaderExtFlag;
+    pSlice->bSliceHeaderExtFlag = pBaseSlice->bSliceHeaderExtFlag;
     ++ iIdx;
   }
 
@@ -2920,9 +2919,9 @@
   pCurDq->iCsStride[2]  = pDecPic->iLineSize[2];
 
   if (pCurDq->pRefLayer != NULL) {
-    pCurDq->bBaseLayerAvailableFlag	= true;
+    pCurDq->bBaseLayerAvailableFlag = true;
   } else {
-    pCurDq->bBaseLayerAvailableFlag	= false;
+    pCurDq->bBaseLayerAvailableFlag = false;
   }
 }
 
@@ -3018,7 +3017,7 @@
       pFuncList->pfInterFineMd = WelsMdInterFinePartitionVaaOnScreen;
 
       //ME related func pointers
-      SVAAFrameInfoExt* pVaaExt		= static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
+      SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
       if (pVaaExt->sScrollDetectInfo.bScrollDetectFlag
           && (pVaaExt->sScrollDetectInfo.iScrollMvX | pVaaExt->sScrollDetectInfo.iScrollMvY)) {
         pFuncList->pfSetScrollingMv = SetScrollingMvToMd;
@@ -3039,7 +3038,7 @@
         pFeatureSearchPreparation->iHighFreMbCount = 0;
 
         //calculate bFMESwitchFlag
-        SVAAFrameInfoExt* pVaaExt		= static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
+        SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
         const int32_t kiMbSize = pCurLayer->iMbHeight * pCurLayer->iMbWidth;
         pFeatureSearchPreparation->bFMESwitchFlag = CalcFMESwitchFlag (pFeatureSearchPreparation->uiFMEGoodFrameCount,
             pFeatureSearchPreparation->iHighFreMbCount * 100 / kiMbSize, pCtx->pVaa->sVaaCalcInfo.iFrameSad / kiMbSize,
@@ -3120,7 +3119,7 @@
 
   iIdx = 0;
   while (iIdx < kiSliceCount) {
-    pSliceBase->sSliceHeaderExt.sSliceHeader.uiRefIndex	= uiRefIdx;
+    pSliceBase->sSliceHeaderExt.sSliceHeader.uiRefIndex = uiRefIdx;
     ++ pSliceBase;
     ++ iIdx;
   }
@@ -3144,7 +3143,7 @@
   uint32_t uiNextIdInBs = sParaSetOffsetVariable->uiNextParaSetIdToUseInBs;
 
   //update current layer's pCodingParam
-  sParaSetOffsetVariable->iParaSetIdDelta[kiEncId]	= uiNextIdInBs -
+  sParaSetOffsetVariable->iParaSetIdDelta[kiEncId] = uiNextIdInBs -
       kiEncId;  //for current parameter set, change its id_delta
   //write pso pData for next update:
   sParaSetOffsetVariable->bUsedParaSetIdInBs[uiNextIdInBs] = true;		//   update current used_id
@@ -3160,7 +3159,7 @@
 }
 
 int32_t WelsWriteOneSPS (sWelsEncCtx* pCtx, const int32_t kiSpsIdx, int32_t& iNalSize) {
-  int    iNal	= pCtx->pOut->iNalIndex;
+  int iNal = pCtx->pOut->iNalIndex;
   WelsLoadNal (pCtx->pOut, NAL_UNIT_SPS, NRI_PRI_HIGHEST);
 
   WelsWriteSpsNal (&pCtx->pSpsArray[kiSpsIdx], &pCtx->pOut->sBsWrite,
@@ -3173,13 +3172,13 @@
                                    &iNalSize);
   WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS)
 
-  pCtx->iPosBsBuffer	+= iNalSize;
+  pCtx->iPosBsBuffer += iNalSize;
   return ENC_RETURN_SUCCESS;
 }
 
 int32_t WelsWriteOnePPS (sWelsEncCtx* pCtx, const int32_t kiPpsIdx, int32_t& iNalSize) {
   //TODO
-  int32_t iNal	= pCtx->pOut->iNalIndex;
+  int32_t iNal = pCtx->pOut->iNalIndex;
   /* generate picture parameter set */
   WelsLoadNal (pCtx->pOut, NAL_UNIT_PPS, NRI_PRI_HIGHEST);
   WelsWritePpsSyntax (&pCtx->pPPSArray[kiPpsIdx], &pCtx->pOut->sBsWrite,
@@ -3192,7 +3191,7 @@
                                    &iNalSize);
   WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS)
 
-  pCtx->iPosBsBuffer	+= iNalSize;
+  pCtx->iPosBsBuffer += iNalSize;
   return ENC_RETURN_SUCCESS;
 }
 
@@ -3254,12 +3253,12 @@
     }
 
     /* generate sequence parameters set */
-    iId	= (SPS_LISTING & pCtx->pSvcParam->eSpsPpsIdStrategy) ? iIdx : 0;
+    iId = (SPS_LISTING & pCtx->pSvcParam->eSpsPpsIdStrategy) ? iIdx : 0;
 
     WelsWriteOneSPS (pCtx, iId, iNalLength);
 
     pNalLen[iCountNal] = iNalLength;
-    iSize				+= iNalLength;
+    iSize += iNalLength;
 
     ++ iIdx;
     ++ iCountNal;
@@ -3268,7 +3267,7 @@
   /* write all Subset SPS */
   iIdx = 0;
   while (iIdx < pCtx->iSubsetSpsNum) {
-    iNal	= pCtx->pOut->iNalIndex;
+    iNal = pCtx->pOut->iNalIndex;
 
     if (INCREASING_ID == pCtx->pSvcParam->eSpsPpsIdStrategy) {
 #if _DEBUG
@@ -3281,7 +3280,7 @@
                                  MAX_SPS_COUNT);
     }
 
-    iId	= iIdx;
+    iId = iIdx;
 
     /* generate Subset SPS */
     WelsLoadNal (pCtx->pOut, NAL_UNIT_SUBSET_SPS, NRI_PRI_HIGHEST);
@@ -3320,7 +3319,7 @@
     WelsWriteOnePPS (pCtx, iIdx, iNalLength);
 
     pNalLen[iCountNal] = iNalLength;
-    iSize				+= iNalLength;
+    iSize += iNalLength;
 
     ++ iIdx;
     ++ iCountNal;
@@ -3357,7 +3356,7 @@
     WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS)
     iPayloadSize = pNalLen[*pNalIdxInLayer];
 
-    pCtx->iPosBsBuffer							+= iPayloadSize;
+    pCtx->iPosBsBuffer += iPayloadSize;
 
     (*pNalIdxInLayer) ++;
   } else { // No Prefix NAL Unit RBSP syntax here, but need add NAL Unit Header extension
@@ -3373,7 +3372,7 @@
     WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS)
     iPayloadSize = pNalLen[*pNalIdxInLayer];
 
-    pCtx->iPosBsBuffer							+= iPayloadSize;
+    pCtx->iPosBsBuffer += iPayloadSize;
 
     (*pNalIdxInLayer) ++;
   }
@@ -3429,7 +3428,7 @@
     return 1;
 
   pCtx->bEncCurFrmAsIdrFlag = true;
-  pCtx->iCodingIndex	= 0;
+  pCtx->iCodingIndex = 0;
   pCtx->bCheckWindowStatusRefreshFlag = false;
   return 0;
 }
@@ -3707,9 +3706,9 @@
   int32_t i = 0, j = 0, k = 0;
 #endif//_DEBUG
 
-  pCtx->iEncoderError						= ENC_RETURN_SUCCESS;
-  pCtx->bCurFrameMarkedAsSceneLtr   = false;
-  pFbi->iLayerNum	= 0;	// for initialization
+  pCtx->iEncoderError = ENC_RETURN_SUCCESS;
+  pCtx->bCurFrameMarkedAsSceneLtr = false;
+  pFbi->iLayerNum = 0; // for initialization
   pFbi->uiTimeStamp = pSrcPic->uiTimeStamp;
   // perform csc/denoise/downsample/padding, generate spatial layers
   iSpatialNum = pCtx->pVpp->BuildSpatialPicList (pCtx, pSrcPic);
@@ -3753,11 +3752,11 @@
   pCtx->iContinualSkipFrames = 0;
   InitFrameCoding (pCtx, eFrameType);
 
-  iCurTid	= GetTemporalLevel (&pSvcParam->sDependencyLayers[pSpatialIndexMap->iDid], pCtx->iCodingIndex,
+  iCurTid = GetTemporalLevel (&pSvcParam->sDependencyLayers[pSpatialIndexMap->iDid], pCtx->iCodingIndex,
                               pSvcParam->uiGopSize);
-  pCtx->uiTemporalId	= iCurTid;
+  pCtx->uiTemporalId = iCurTid;
 
-  pLayerBsInfo->pBsBuf	= pCtx->pFrameBs ;
+  pLayerBsInfo->pBsBuf = pCtx->pFrameBs ;
   pLayerBsInfo->pNalLengthInByte = pCtx->pOut->pNalLen;
 
   if (eFrameType == videoFrameTypeIDR) {
@@ -3807,8 +3806,8 @@
     case SM_DYN_SLICE: {
       int32_t iPicIPartitionNum = PicPartitionNumDecision (pCtx);
       // MT compatibility
-      pCtx->iActiveThreadsNum	=
-        iPicIPartitionNum;	// we try to active number of threads, equal to number of picture partitions
+      pCtx->iActiveThreadsNum =
+        iPicIPartitionNum; // we try to active number of threads, equal to number of picture partitions
       WelsInitCurrentDlayerMltslc (pCtx, iPicIPartitionNum);
       break;
     }
@@ -3818,8 +3817,8 @@
     }
 
     /* coding each spatial layer, only one sQualityStat layer within spatial support */
-    int32_t iSliceCount	= 1;
-    if (iLayerNum >= MAX_LAYER_NUM_OF_FRAME) {	// check available layer_bs_info writing as follows
+    int32_t iSliceCount = 1;
+    if (iLayerNum >= MAX_LAYER_NUM_OF_FRAME) { // check available layer_bs_info writing as follows
       WelsLog (pLogCtx, WELS_LOG_ERROR, "WelsEncoderEncodeExt(), iLayerNum(%d) overflow(max:%d)!", iLayerNum,
                MAX_LAYER_NUM_OF_FRAME);
       return ENC_RETURN_UNSUPPORTED_PARA;
@@ -3832,20 +3831,20 @@
                                   (pSvcParam->iSpatialLayerNum > 1))));
 
     if (eFrameType == videoFrameTypeP) {
-      eNalType	= bAvcBased ? NAL_UNIT_CODED_SLICE : NAL_UNIT_CODED_SLICE_EXT;
+      eNalType = bAvcBased ? NAL_UNIT_CODED_SLICE : NAL_UNIT_CODED_SLICE_EXT;
     } else if (eFrameType == videoFrameTypeIDR) {
-      eNalType	= bAvcBased ? NAL_UNIT_CODED_SLICE_IDR : NAL_UNIT_CODED_SLICE_EXT;
+      eNalType = bAvcBased ? NAL_UNIT_CODED_SLICE_IDR : NAL_UNIT_CODED_SLICE_EXT;
     }
     if (iCurTid == 0 || pCtx->eSliceType == I_SLICE)
-      eNalRefIdc	= NRI_PRI_HIGHEST;
+      eNalRefIdc = NRI_PRI_HIGHEST;
     else if (iCurTid == pSvcParam->iDecompStages)
-      eNalRefIdc	= NRI_PRI_LOWEST;
+      eNalRefIdc = NRI_PRI_LOWEST;
     else if (1 + iCurTid == pSvcParam->iDecompStages)
-      eNalRefIdc	= NRI_PRI_LOW;
-    else	// more details for other temporal layers?
-      eNalRefIdc	= NRI_PRI_HIGHEST;
-    pCtx->eNalType		= eNalType;
-    pCtx->eNalPriority	= eNalRefIdc;
+      eNalRefIdc = NRI_PRI_LOW;
+    else // more details for other temporal layers?
+      eNalRefIdc = NRI_PRI_HIGHEST;
+    pCtx->eNalType = eNalType;
+    pCtx->eNalPriority = eNalRefIdc;
 
     pCtx->pDecPic               = pCtx->ppRefPicListExt[iCurDid]->pNextBuffer;
 #if defined(ENABLE_FRAME_DUMP) || defined(ENABLE_PSNR_CALC)
@@ -3887,11 +3886,11 @@
     PreprocessSliceCoding (pCtx);	// MUST be called after pfWelsRcPictureInit() and WelsInitCurrentLayer()
 
     //TODO Complexity Calculation here for screen content
-    iLayerSize	= 0;
+    iLayerSize = 0;
 
     if (SM_SINGLE_SLICE == pParam->sSliceCfg.uiSliceMode) {	// only one slice within a sQualityStat layer
       int32_t iSliceSize = 0;
-      int32_t iPayloadSize	= 0;
+      int32_t iPayloadSize = 0;
 
       if (pCtx->bNeedPrefixNalFlag) {
         pCtx->iEncoderError = AddPrefixNal (pCtx, pLayerBsInfo, &pLayerBsInfo->pNalLengthInByte[0], &iNalIdxInLayer, eNalType,
@@ -3935,8 +3934,8 @@
       int32_t iRet = 0;
       // THREAD_FULLY_FIRE_MODE/THREAD_PICK_UP_MODE for any mode of non-SM_DYN_SLICE
       if ((SM_DYN_SLICE != pParam->sSliceCfg.uiSliceMode) && (pSvcParam->iMultipleThreadIdc > 1)) {
-        iSliceCount	= GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx);
-        if (iLayerNum + 1 >= MAX_LAYER_NUM_OF_FRAME) {	// check available layer_bs_info for further writing as followed
+        iSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx);
+        if (iLayerNum + 1 >= MAX_LAYER_NUM_OF_FRAME) { // check available layer_bs_info for further writing as followed
           WelsLog (pLogCtx, WELS_LOG_ERROR,
                    "WelsEncoderEncodeExt(), iLayerNum(%d) overflow(max:%d) at iDid= %d uiSliceMode= %d, iSliceCount= %d!",
                    iLayerNum, MAX_LAYER_NUM_OF_FRAME, iCurDid, pParam->sSliceCfg.uiSliceMode, iSliceCount);
@@ -3954,7 +3953,7 @@
           int64_t t_bs_append = 0;
 #endif
 
-          pCtx->iActiveThreadsNum	= iSliceCount;
+          pCtx->iActiveThreadsNum = iSliceCount;
           // to fire slice coding threads
           iRet = FiredSliceThreads (pCtx, &pCtx->pSliceThreading->pThreadPEncCtx[0],
                                     &pCtx->pSliceThreading->pReadySliceCodingEvent[0],
@@ -4011,8 +4010,8 @@
           while (1) {
             if (iIndexOfSliceToBeCoded >= iSliceCount && iNumThreadsRunning <= 0)
               break;
-            WELS_THREAD_ERROR_CODE lwait	= 0;
-            int32_t iEventId				= -1;
+            WELS_THREAD_ERROR_CODE lwait = 0;
+            int32_t iEventId = -1;
 
             lwait = WelsMultipleEventsWaitSingleBlocking (iNumThreadsScheduled,
                     &pCtx->pSliceThreading->pSliceCodedEvent[0],
@@ -4022,7 +4021,7 @@
               if (iIndexOfSliceToBeCoded < iSliceCount) {
                 // pick up succeeding slice for threading
                 // thread_id equal to iEventId per implementation here
-                pCtx->pSliceThreading->pThreadPEncCtx[iEventId].iSliceIndex	= iIndexOfSliceToBeCoded;
+                pCtx->pSliceThreading->pThreadPEncCtx[iEventId].iSliceIndex = iIndexOfSliceToBeCoded;
                 WelsEventSignal (&pCtx->pSliceThreading->pReadySliceCodingEvent[iEventId]);
                 WelsEventSignal (&pCtx->pSliceThreading->pThreadMasterEvent[iEventId]);
 
@@ -4040,7 +4039,7 @@
       }
       // THREAD_FULLY_FIRE_MODE && SM_DYN_SLICE
       else if ((SM_DYN_SLICE == pParam->sSliceCfg.uiSliceMode) && (pSvcParam->iMultipleThreadIdc > 1)) {
-        const int32_t kiPartitionCnt	= pCtx->iActiveThreadsNum; //pSvcParam->iCountThreadsNum;
+        const int32_t kiPartitionCnt = pCtx->iActiveThreadsNum; //pSvcParam->iCountThreadsNum;
 
         // to fire slice coding threads
         iRet = FiredSliceThreads (pCtx, &pCtx->pSliceThreading->pThreadPEncCtx[0],
@@ -4059,11 +4058,11 @@
         WELS_VERIFY_RETURN_IFNEQ (pCtx->iEncoderError, ENC_RETURN_SUCCESS)
 
         iLayerSize = AppendSliceToFrameBs (pCtx, pLayerBsInfo, kiPartitionCnt);
-      } else {	// for non-dynamic-slicing mode single threading branch..
-        const bool bNeedPrefix	= pCtx->bNeedPrefixNalFlag;
-        int32_t iSliceIdx			= 0;
+      } else { // for non-dynamic-slicing mode single threading branch..
+        const bool bNeedPrefix = pCtx->bNeedPrefixNalFlag;
+        int32_t iSliceIdx = 0;
 
-        iSliceCount	= GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx);
+        iSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx);
         while (iSliceIdx < iSliceCount) {
           int32_t iSliceSize    = 0;
           int32_t iPayloadSize  = 0;
@@ -4161,19 +4160,19 @@
 #endif//ENABLE_FRAME_DUMP
 
 #if defined(ENABLE_PSNR_CALC)
-    fSnrY	= WelsCalcPsnr (fsnr->pData[0],
+    fSnrY = WelsCalcPsnr (fsnr->pData[0],
                           fsnr->iLineSize[0],
                           pEncPic->pData[0],
                           pEncPic->iLineSize[0],
                           iCurWidth,
                           iCurHeight);
-    fSnrU	= WelsCalcPsnr (fsnr->pData[1],
+    fSnrU = WelsCalcPsnr (fsnr->pData[1],
                           fsnr->iLineSize[1],
                           pEncPic->pData[1],
                           pEncPic->iLineSize[1],
                           (iCurWidth >> 1),
                           (iCurHeight >> 1));
-    fSnrV	= WelsCalcPsnr (fsnr->pData[2],
+    fSnrV = WelsCalcPsnr (fsnr->pData[2],
                           fsnr->iLineSize[2],
                           pEncPic->pData[2],
                           pEncPic->iLineSize[2],
@@ -4231,8 +4230,8 @@
 
 #endif//MB_TYPES_CHECK
     {
-      ++ pCtx->sStatData[iCurDid][0].sSliceData.iSliceCount[pCtx->eSliceType];	// for multiple slices coding
-      pCtx->sStatData[iCurDid][0].sSliceData.iSliceSize[pCtx->eSliceType]	+= (iLayerSize << 3);	// bits
+      ++ pCtx->sStatData[iCurDid][0].sSliceData.iSliceCount[pCtx->eSliceType]; // for multiple slices coding
+      pCtx->sStatData[iCurDid][0].sSliceData.iSliceSize[pCtx->eSliceType] += (iLayerSize << 3); // bits
     }
 #endif//STAT_OUTPUT
 
@@ -4240,7 +4239,7 @@
     ++ iLayerNum;
     ++ pLayerBsInfo;
 
-    pLayerBsInfo->pBsBuf	= pCtx->pFrameBs + pCtx->iPosBsBuffer;
+    pLayerBsInfo->pBsBuf = pCtx->pFrameBs + pCtx->iPosBsBuffer;
     pLayerBsInfo->pNalLengthInByte = (pLayerBsInfo - 1)->pNalLengthInByte + iCountNal;
 
     if (pSvcParam->iPaddingFlag && pCtx->pWelsSvcRc[pCtx->uiDependencyId].iPaddingSize > 0) {
@@ -4334,8 +4333,8 @@
   }
 
   ++ pCtx->iCodingIndex;
-  pCtx->eLastNalPriority	= eNalRefIdc;
-  pFbi->iLayerNum			= iLayerNum;
+  pCtx->eLastNalPriority = eNalRefIdc;
+  pFbi->iLayerNum = iLayerNum;
   pFbi->iSubSeqId = GetSubSequenceId (pCtx, eFrameType);
 
   WelsLog (pLogCtx, WELS_LOG_DEBUG, "WelsEncoderEncodeExt() OutputInfo iLayerNum = %d,iSubSeqId = %d,iFrameSize = %d",
@@ -4383,19 +4382,19 @@
  *          SVC adjustment results in new requirement in memory blocks adjustment
  */
 int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewParam) {
-  SWelsSvcCodingParam* pOldParam		= NULL;
+  SWelsSvcCodingParam* pOldParam = NULL;
   int32_t iReturn = ENC_RETURN_SUCCESS;
   int8_t iIndexD = 0;
   bool bNeedReset = false;
-  int16_t iSliceNum				= 1;	// number of slices used
-  int32_t iCacheLineSize			= 16;	// on chip cache line size in byte
+  int16_t iSliceNum = 1; // number of slices used
+  int32_t iCacheLineSize = 16; // on chip cache line size in byte
   uint32_t uiCpuFeatureFlags = 0;
 
-  if (NULL == ppCtx || NULL == *ppCtx || NULL == pNewParam)	return 1;
+  if (NULL == ppCtx || NULL == *ppCtx || NULL == pNewParam) return 1;
 
   /* Check validation in new parameters */
-  iReturn	= ParamValidationExt (& (*ppCtx)->sLogCtx, pNewParam);
-  if (iReturn != ENC_RETURN_SUCCESS)	return iReturn;
+  iReturn = ParamValidationExt (& (*ppCtx)->sLogCtx, pNewParam);
+  if (iReturn != ENC_RETURN_SUCCESS) return iReturn;
 
   iReturn = GetMultipleThreadIdc (& (*ppCtx)->sLogCtx, pNewParam, iSliceNum, iCacheLineSize, uiCpuFeatureFlags);
   if (iReturn != ENC_RETURN_SUCCESS) {
@@ -4404,7 +4403,7 @@
     return iReturn;
   }
 
-  pOldParam	= (*ppCtx)->pSvcParam;
+  pOldParam = (*ppCtx)->pSvcParam;
 
   if (pOldParam->iUsageType != pNewParam->iUsageType) {
     WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_ERROR,
@@ -4446,7 +4445,7 @@
           pOldParam->sSpatialLayers[iIndexD].iVideoHeight != pNewParam->sSpatialLayers[iIndexD].iVideoHeight ||
           kpOldDlp->iActualWidth != kpNewDlp->iActualWidth ||
           kpOldDlp->iActualHeight != kpNewDlp->iActualHeight) {
-        bNeedReset	= true;
+        bNeedReset = true;
         break;
       }
 
@@ -4454,7 +4453,7 @@
           ||
           pOldParam->sSpatialLayers[iIndexD].sSliceCfg.sSliceArgument.uiSliceNum !=
           pNewParam->sSpatialLayers[iIndexD].sSliceCfg.sSliceArgument.uiSliceNum) {
-        bNeedReset	= true;
+        bNeedReset = true;
         break;
       }
 
@@ -4576,17 +4575,17 @@
     }
     pOldParam->iDecompStages = pNewParam->iDecompStages;
     /* denoise control */
-    pOldParam->bEnableDenoise	= pNewParam->bEnableDenoise;
+    pOldParam->bEnableDenoise = pNewParam->bEnableDenoise;
 
     /* background detection control */
-    pOldParam->bEnableBackgroundDetection		= pNewParam->bEnableBackgroundDetection;
+    pOldParam->bEnableBackgroundDetection = pNewParam->bEnableBackgroundDetection;
 
     /* adaptive quantization control */
-    pOldParam->bEnableAdaptiveQuant	= pNewParam->bEnableAdaptiveQuant;
+    pOldParam->bEnableAdaptiveQuant = pNewParam->bEnableAdaptiveQuant;
 
     /* int32_t term reference control */
-    pOldParam->bEnableLongTermReference	= pNewParam->bEnableLongTermReference;
-    pOldParam->iLtrMarkPeriod	= pNewParam->iLtrMarkPeriod;
+    pOldParam->bEnableLongTermReference = pNewParam->bEnableLongTermReference;
+    pOldParam->iLtrMarkPeriod = pNewParam->iLtrMarkPeriod;
 
     // keep below values unchanged as before
     pOldParam->bEnableSSEI              = pNewParam->bEnableSSEI;
@@ -4606,7 +4605,7 @@
     pOldParam->iPaddingFlag     = pNewParam->iPaddingFlag;
 
     /* Layer definition */
-    pOldParam->bPrefixNalAddingCtrl	= pNewParam->bPrefixNalAddingCtrl;
+    pOldParam->bPrefixNalAddingCtrl = pNewParam->bPrefixNalAddingCtrl;
 
     // d
     iIndexD = 0;
@@ -4641,13 +4640,13 @@
 }
 
 int32_t WelsEncoderApplyLTR (SLogContext* pLogCtx, sWelsEncCtx** ppCtx, SLTRConfig* pLTRValue) {
-  SWelsSvcCodingParam	sConfig;
+  SWelsSvcCodingParam sConfig;
   int32_t iNumRefFrame = 1;
   int32_t iRet = 0;
   memcpy (&sConfig, (*ppCtx)->pSvcParam, sizeof (SWelsSvcCodingParam));
   sConfig.bEnableLongTermReference = pLTRValue->bEnableLongTermReference;
   sConfig.iLTRRefNum = pLTRValue->iLTRRefNum;
-  int32_t uiGopSize			= 1 << (sConfig.iTemporalLayerNum - 1);
+  int32_t uiGopSize = 1 << (sConfig.iTemporalLayerNum - 1);
   if (sConfig.iUsageType == SCREEN_CONTENT_REAL_TIME) {
     if (sConfig.bEnableLongTermReference) {
       sConfig.iLTRRefNum = LONG_TERM_REF_NUM_SCREEN;//WELS_CLIP3 (sConfig.iLTRRefNum, 1, LONG_TERM_REF_NUM_SCREEN);
@@ -4662,9 +4661,9 @@
     } else {
       sConfig.iLTRRefNum = 0;
     }
-    iNumRefFrame		= ((uiGopSize >> 1) > 1) ? ((uiGopSize >> 1) + sConfig.iLTRRefNum) : (MIN_REF_PIC_COUNT +
+    iNumRefFrame = ((uiGopSize >> 1) > 1) ? ((uiGopSize >> 1) + sConfig.iLTRRefNum) : (MIN_REF_PIC_COUNT +
                       sConfig.iLTRRefNum);
-    iNumRefFrame		= WELS_CLIP3 (iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM_CAMERA);
+    iNumRefFrame = WELS_CLIP3 (iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM_CAMERA);
 
   }
   if (iNumRefFrame > sConfig.iMaxNumRefFrame) {
@@ -4803,7 +4802,7 @@
   memcpy (pSlcingOverRc, pCtx->pWelsSvcRc[kiCurDid].pSlicingOverRc, sizeof (SRCSlicing) * iMaxSliceNumOld);
   uiSliceIdx = iMaxSliceNumOld;
   SRCSlicing* pSORC = &pSlcingOverRc[uiSliceIdx];
-  const int32_t kiBitsPerMb		= WELS_DIV_ROUND (pCtx->pWelsSvcRc[kiCurDid].iTargetBits * INT_MULTIPLY,
+  const int32_t kiBitsPerMb = WELS_DIV_ROUND (pCtx->pWelsSvcRc[kiCurDid].iTargetBits * INT_MULTIPLY,
                                 pCtx->pWelsSvcRc[kiCurDid].iNumberMbFrame);
   while (uiSliceIdx < iMaxSliceNum) {
     pSORC->iComplexityIndexSlice = 0;
--- a/codec/encoder/core/src/get_intra_predictor.cpp
+++ b/codec/encoder/core/src/get_intra_predictor.cpp
@@ -104,8 +104,7 @@
   WelsFillingPred8x2to16 (pPred, uiSrc);
 }
 void WelsI4x4LumaPredDc_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
-  const uint8_t kuiDcValue	= (pRef[-1] + pRef[kiStride - 1] + pRef[ (kiStride << 1) - 1] + pRef[ (kiStride << 1) +
-                               kiStride - 1] +
+  const uint8_t kuiDcValue = (pRef[-1] + pRef[kiStride - 1] + pRef[ (kiStride << 1) - 1] + pRef[ (kiStride << 1) + kiStride - 1] +
                                pRef[-kiStride] + pRef[1 - kiStride] + pRef[2 - kiStride] + pRef[3 - kiStride] + 4) >> 3;
 
   WelsFillingPred1to16 (pPred, kuiDcValue);
@@ -112,7 +111,7 @@
 }
 
 void WelsI4x4LumaPredDcLeft_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
-  const uint8_t kuiDcValue	= (pRef[-1] + pRef[kiStride - 1] + pRef[ (kiStride << 1) - 1] + pRef[ (kiStride << 1) +
+  const uint8_t kuiDcValue = (pRef[-1] + pRef[kiStride - 1] + pRef[ (kiStride << 1) - 1] + pRef[ (kiStride << 1) +
                                kiStride - 1] + 2) >> 2;
 
   WelsFillingPred1to16 (pPred, kuiDcValue);
@@ -119,7 +118,7 @@
 }
 
 void WelsI4x4LumaPredDcTop_c (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride) {
-  const uint8_t kuiDcValue	= (pRef[-kiStride] + pRef[1 - kiStride] + pRef[2 - kiStride] + pRef[3 - kiStride] + 2) >> 2;
+  const uint8_t kuiDcValue = (pRef[-kiStride] + pRef[1 - kiStride] + pRef[2 - kiStride] + pRef[3 - kiStride] + 2) >> 2;
 
   WelsFillingPred1to16 (pPred, kuiDcValue);
 }
@@ -463,8 +462,8 @@
   const int32_t kuiL6 = kuiL5 + kiStride;
   const int32_t kuiL7 = kuiL6 + kiStride;
   /*caculate the iMean value*/
-  const uint8_t kuiMean1	= (pRef[-kiStride] + pRef[1 - kiStride] + pRef[2 - kiStride] + pRef[3 - kiStride] +
-                             pRef[-1] + pRef[kuiL1] + pRef[kuiL2] + pRef[kuiL3] + 4) >> 3;
+  const uint8_t kuiMean1 = (pRef[-kiStride] + pRef[1 - kiStride] + pRef[2 - kiStride] + pRef[3 - kiStride] +
+                            pRef[-1] + pRef[kuiL1] + pRef[kuiL2] + pRef[kuiL3] + 4) >> 3;
   const uint32_t kuiSum2 = pRef[4 - kiStride] + pRef[5 - kiStride] + pRef[6 - kiStride] + pRef[7 - kiStride];
   const uint32_t kuiSum3 = pRef[kuiL4] + pRef[kuiL5] + pRef[kuiL6] + pRef[kuiL7];
   const uint8_t kuiMean2 = (kuiSum2 + 2) >> 2;
--- a/codec/encoder/core/src/md.cpp
+++ b/codec/encoder/core/src/md.cpp
@@ -538,7 +538,7 @@
 
   iCurCost = CALC_COST (pMeRefine->pQuarPixTmp, pParams->iLms[0]);
   if (iCurCost < pParams->iBestCost) {
-    pParams->iBestQuarPix =	ME_QUAR_PIXEL_TOP;
+    pParams->iBestQuarPix = ME_QUAR_PIXEL_TOP;
     SWITCH_BEST_TMP_BUF (pMeRefine->pQuarPixBest, pMeRefine->pQuarPixTmp);
   }
   //=========================(0, 1)=======================//
--- a/codec/encoder/core/src/nal_encap.cpp
+++ b/codec/encoder/core/src/nal_encap.cpp
@@ -124,7 +124,7 @@
                        int32_t* pDstLen) {
   const bool kbNALExt = pRawNal->sNalExt.sNalUnitHeader.eNalUnitType == NAL_UNIT_PREFIX
                         || pRawNal->sNalExt.sNalUnitHeader.eNalUnitType == NAL_UNIT_CODED_SLICE_EXT;
-  int32_t iAssumedNeededLength		= NAL_HEADER_SIZE + (kbNALExt ? 3 : 0) + pRawNal->iPayloadSize + 1;
+  int32_t iAssumedNeededLength = NAL_HEADER_SIZE + (kbNALExt ? 3 : 0) + pRawNal->iPayloadSize + 1;
   WELS_VERIFY_RETURN_IF (ENC_RETURN_UNEXPECTED, (iAssumedNeededLength <= 0))
 
   //since for each 0x000 need a 0x03, so the needed length will not exceed (iAssumeNeedLenth + iAssumeNeedLength/3), here adjust to >>1 to omit division
@@ -145,20 +145,20 @@
   pDstPointer += 4;
 
   /* NAL Unit Header */
-  *pDstPointer++	= (pRawNal->sNalExt.sNalUnitHeader.uiNalRefIdc << 5) | (pRawNal->sNalExt.sNalUnitHeader.eNalUnitType &
+  *pDstPointer++ = (pRawNal->sNalExt.sNalUnitHeader.uiNalRefIdc << 5) | (pRawNal->sNalExt.sNalUnitHeader.eNalUnitType &
                     0x1f);
 
   if (kbNALExt) {
-    SNalUnitHeaderExt* sNalExt	= (SNalUnitHeaderExt*)pNalHeaderExt;
+    SNalUnitHeaderExt* sNalExt = (SNalUnitHeaderExt*)pNalHeaderExt;
 
     /* NAL UNIT Extension Header */
-    *pDstPointer++ =	(0x80) |
+    *pDstPointer++ = (0x80) |
                       (sNalExt->bIdrFlag << 6);
 
-    *pDstPointer++ =	(0x80) |
+    *pDstPointer++ = (0x80) |
                       (sNalExt->uiDependencyId << 4);
 
-    *pDstPointer++ =	(sNalExt->uiTemporalId << 5) |
+    *pDstPointer++ = (sNalExt->uiTemporalId << 5) |
                       (sNalExt->bDiscardableFlag << 3) |
                       (0x07);
   }
@@ -166,21 +166,21 @@
   while (pSrcPointer < pSrcEnd) {
     if (iZeroCount == 2 && *pSrcPointer <= 3) {
       //add the code 03
-      *pDstPointer++	= 3;
-      iZeroCount		= 0;
+      *pDstPointer++ = 3;
+      iZeroCount = 0;
     }
     if (*pSrcPointer == 0) {
       ++ iZeroCount;
     } else {
-      iZeroCount		= 0;
+      iZeroCount = 0;
     }
     *pDstPointer++ = *pSrcPointer++;
   }
 
   /* count length of NAL Unit */
-  iNalLength	= (int32_t) (pDstPointer - pDstStart);
+  iNalLength = (int32_t) (pDstPointer - pDstStart);
   if (NULL != pDstLen)
-    *pDstLen	= iNalLength;
+    *pDstLen = iNalLength;
 
   return ENC_RETURN_SUCCESS;
 }
--- a/codec/encoder/core/src/picture_handle.cpp
+++ b/codec/encoder/core/src/picture_handle.cpp
@@ -59,7 +59,7 @@
   int32_t iLumaSize             = 0;
   int32_t iChromaSize           = 0;
 
-  pPic	= static_cast<SPicture*> (pMa->WelsMallocz (sizeof (SPicture), "pPic"));
+  pPic = static_cast<SPicture*> (pMa->WelsMallocz (sizeof (SPicture), "pPic"));
 
   WELS_VERIFY_RETURN_IF (NULL, NULL == pPic);
 
@@ -95,10 +95,10 @@
   if (bNeedMbInfo) {
     const uint32_t kuiCountMbNum = ((15 + kiWidth) >> 4) * ((15 + kiHeight) >> 4);
 
-    pPic->uiRefMbType	= (uint32_t*)pMa->WelsMallocz (kuiCountMbNum * sizeof (uint32_t), "pPic->uiRefMbType");
+    pPic->uiRefMbType = (uint32_t*)pMa->WelsMallocz (kuiCountMbNum * sizeof (uint32_t), "pPic->uiRefMbType");
     WELS_VERIFY_RETURN_PROC_IF (NULL, NULL == pPic->uiRefMbType, FreePicture (pMa, &pPic));
 
-    pPic->pRefMbQp	= (uint8_t*)pMa->WelsMallocz (kuiCountMbNum * sizeof (uint8_t), "pPic->pRefMbQp");
+    pPic->pRefMbQp = (uint8_t*)pMa->WelsMallocz (kuiCountMbNum * sizeof (uint8_t), "pPic->pRefMbQp");
     WELS_VERIFY_RETURN_PROC_IF (NULL, NULL == pPic->pRefMbQp, FreePicture (pMa, &pPic));
 
     pPic->sMvList           = static_cast<SMVUnitXY*> (pMa->WelsMallocz (kuiCountMbNum * sizeof (SMVUnitXY),
--- a/codec/encoder/core/src/property.cpp
+++ b/codec/encoder/core/src/property.cpp
@@ -85,7 +85,7 @@
   if (NULL == pBuf)
     return 0;
 
-  iLen	= (int32_t)strlen (WELS_LIB_NAME);	// confirmed_safe_unsafe_usage
+  iLen = (int32_t)strlen (WELS_LIB_NAME); // confirmed_safe_unsafe_usage
   if (iSize <= iLen)
     return 0;
 
@@ -106,7 +106,7 @@
   if (NULL == pBuf)
     return 0;
 
-  iLen	= (int32_t)strlen (WELS_VERSION_STR);	// confirmed_safe_unsafe_usage
+  iLen = (int32_t)strlen (WELS_VERSION_STR); // confirmed_safe_unsafe_usage
   if (iSize <= iLen)
     return 0;
 
@@ -127,7 +127,7 @@
   if (NULL == pBuf)
     return 0;
 
-  iLen	= (int32_t)strlen (WELS_IDENT);	// confirmed_safe_unsafe_usage
+  iLen = (int32_t)strlen (WELS_IDENT); // confirmed_safe_unsafe_usage
   if (iSize <= iLen)
     return 0;
 
--- a/codec/encoder/core/src/ratectl.cpp
+++ b/codec/encoder/core/src/ratectl.cpp
@@ -180,7 +180,7 @@
 
 void RcInitTlWeight (sWelsEncCtx* pEncCtx) {
   SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];
-  SRCTemporal* pTOverRc	= pWelsSvcRc->pTemporalOverRc;
+  SRCTemporal* pTOverRc = pWelsSvcRc->pTemporalOverRc;
   SSpatialLayerInternal* pDLayerParam =  &pEncCtx->pSvcParam->sDependencyLayers[pEncCtx->uiDependencyId];
   const int32_t kiDecompositionStages = pDLayerParam->iDecompositionStages;
   const int32_t kiHighestTid = pDLayerParam->iHighestTemporalId;
@@ -193,7 +193,7 @@
 
   n = 0;
   while (n <= kiHighestTid) {
-    pTOverRc[n].iTlayerWeight	= iWeightArray[kiDecompositionStages][n];
+    pTOverRc[n].iTlayerWeight = iWeightArray[kiDecompositionStages][n];
     ++ n;
   }
 //Calculate the frame index for the current frame and its reference frame
@@ -296,7 +296,7 @@
 
   pWelsSvcRc->iGopIndexInVGop = 0;
   pWelsSvcRc->iRemainingBits = 0;
-  pWelsSvcRc->iBitsPerFrame	= 0;
+  pWelsSvcRc->iBitsPerFrame = 0;
 
 //Backup the initial bitrate and fps
   pWelsSvcRc->iPreviousBitrate  = pDLayerParam->iSpatialBitrate;
@@ -422,7 +422,7 @@
 }
 
 void RcCalculateIdrQp (sWelsEncCtx* pEncCtx) {
-  SWelsSvcRc* pWelsSvcRc			= &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];
+  SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];
 //obtain the idr qp using previous idr complexity
   if (pWelsSvcRc->iNumberMbFrame != pWelsSvcRc->iIntraMbCount) {
     pWelsSvcRc->iIntraComplexity = pWelsSvcRc->iIntraComplexity * pWelsSvcRc->iNumberMbFrame /
@@ -687,7 +687,7 @@
 
 void   RcVBufferCalculationSkip (sWelsEncCtx* pEncCtx) {
   SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];
-  SRCTemporal* pTOverRc		= pWelsSvcRc->pTemporalOverRc;
+  SRCTemporal* pTOverRc = pWelsSvcRc->pTemporalOverRc;
   const int32_t kiOutputBits = pWelsSvcRc->iBitsPerFrame;
   const int32_t kiOutputMaxBits = pWelsSvcRc->iMaxBitsPerFrame;
 //condition 1: whole pBuffer fullness
@@ -803,7 +803,7 @@
   SSpatialPicIndex* pSpatialIndexMap = &pEncCtx->sSpatialIndexMap[0];
 
   for (int32_t i = 0; i < iSpatialNum; i++) {
-    int32_t iCurDid	= (pSpatialIndexMap + i)->iDid;
+    int32_t iCurDid = (pSpatialIndexMap + i)->iDid;
     SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[iCurDid];
     const int32_t kiOutputBits = pWelsSvcRc->iBitsPerFrame;
     const int32_t kiOutputMaxBits = pWelsSvcRc->iMaxBitsPerFrame;
@@ -831,7 +831,7 @@
     pEncCtx->iCheckWindowCurrentTs = pEncCtx->iCheckWindowStartTs = uiTimeStamp;
     pEncCtx->bCheckWindowStatusRefreshFlag = true;
     for (int32_t i = 0; i < iSpatialNum; i++) {
-      int32_t iCurDid	= (pSpatialIndexMap + i)->iDid;
+      int32_t iCurDid = (pSpatialIndexMap + i)->iDid;
       pEncCtx->pWelsSvcRc[iCurDid].iBufferFullnessSkip = 0;
       pEncCtx->pWelsSvcRc[iCurDid].iBufferMaxBRFullness[ODD_TIME_WINDOW] = 0;
       pEncCtx->pWelsSvcRc[iCurDid].iBufferMaxBRFullness[EVEN_TIME_WINDOW] = 0;
@@ -844,7 +844,7 @@
   if (pEncCtx->iCheckWindowInterval >= (TIME_CHECK_WINDOW >> 1) && !pEncCtx->bCheckWindowShiftResetFlag) {
     pEncCtx->bCheckWindowShiftResetFlag = true;
     for (int32_t i = 0; i < iSpatialNum; i++) {
-      int32_t iCurDid	= (pSpatialIndexMap + i)->iDid;
+      int32_t iCurDid = (pSpatialIndexMap + i)->iDid;
       if (pEncCtx->pWelsSvcRc[iCurDid].iBufferMaxBRFullness[ODD_TIME_WINDOW] > 0
           && pEncCtx->pWelsSvcRc[iCurDid].iBufferMaxBRFullness[ODD_TIME_WINDOW] !=
           pEncCtx->pWelsSvcRc[iCurDid].iBufferMaxBRFullness[0]) {
@@ -863,7 +863,7 @@
     pEncCtx->iCheckWindowInterval = 0;
     pEncCtx->bCheckWindowShiftResetFlag = false;
     for (int32_t i = 0; i < iSpatialNum; i++) {
-      int32_t iCurDid	= (pSpatialIndexMap + i)->iDid;
+      int32_t iCurDid = (pSpatialIndexMap + i)->iDid;
       if (pEncCtx->pWelsSvcRc[iCurDid].iBufferMaxBRFullness[EVEN_TIME_WINDOW] > 0) {
         pEncCtx->pWelsSvcRc[iCurDid].bNeedShiftWindowCheck[ODD_TIME_WINDOW] = true;
       } else {
@@ -912,7 +912,7 @@
 
 void RcUpdatePictureQpBits (sWelsEncCtx* pEncCtx, int32_t iCodedBits) {
   SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];
-  SRCSlicing* pSOverRc		= &pWelsSvcRc->pSlicingOverRc[0];
+  SRCSlicing* pSOverRc = &pWelsSvcRc->pSlicingOverRc[0];
   SSliceCtx* pCurSliceCtx = pEncCtx->pCurDqLayer->pSliceEncCtx;
   int32_t iTotalQp = 0, iTotalMb = 0;
   int32_t i;
@@ -1095,10 +1095,10 @@
 
 void  WelsRcPictureInitDisable (sWelsEncCtx* pEncCtx, long long uiTimeStamp) {
   SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];
-  SSpatialLayerConfig* pDLayerParam		= &pEncCtx->pSvcParam->sSpatialLayers[pEncCtx->uiDependencyId];
+  SSpatialLayerConfig* pDLayerParam = &pEncCtx->pSvcParam->sSpatialLayers[pEncCtx->uiDependencyId];
   const int32_t kiQp = pDLayerParam->iDLayerQp;
 
-  pEncCtx->iGlobalQp	= RcCalculateCascadingQp (pEncCtx, kiQp);
+  pEncCtx->iGlobalQp = RcCalculateCascadingQp (pEncCtx, kiQp);
 
   if (pEncCtx->pSvcParam->bEnableAdaptiveQuant && (pEncCtx->eSliceType == P_SLICE)) {
     pEncCtx->iGlobalQp = WELS_CLIP3 ((pEncCtx->iGlobalQp * INT_MULTIPLY -
@@ -1114,9 +1114,9 @@
 }
 
 void  WelsRcMbInitDisable (sWelsEncCtx* pEncCtx, SMB* pCurMb, SSlice* pSlice) {
-  int32_t iLumaQp					= pEncCtx->iGlobalQp;
+  int32_t iLumaQp = pEncCtx->iGlobalQp;
 
-  SDqLayer* pCurLayer				= pEncCtx->pCurDqLayer;
+  SDqLayer* pCurLayer = pEncCtx->pCurDqLayer;
   const uint8_t kuiChromaQpIndexOffset = pCurLayer->sLayerInfo.pPpsP->uiChromaQpIndexOffset;
 
 
@@ -1134,7 +1134,7 @@
 }
 
 void WelRcPictureInitBufferBasedQp (sWelsEncCtx* pEncCtx, long long uiTimeStamp) {
-  SVAAFrameInfo* pVaa			= static_cast<SVAAFrameInfo*> (pEncCtx->pVaa);
+  SVAAFrameInfo* pVaa = static_cast<SVAAFrameInfo*> (pEncCtx->pVaa);
 
   int32_t iMinQp = MIN_SCREEN_QP;
   if (pVaa->eSceneChangeIdc == LARGE_CHANGED_SCENE)
@@ -1292,7 +1292,7 @@
 }
 void  WelsRcPictureInitGomTimeStamp (sWelsEncCtx* pEncCtx, long long uiTimeStamp) {
   SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];
-  SSpatialLayerConfig* pDLayerParam			= &pEncCtx->pSvcParam->sSpatialLayers[pEncCtx->uiDependencyId];
+  SSpatialLayerConfig* pDLayerParam = &pEncCtx->pSvcParam->sSpatialLayers[pEncCtx->uiDependencyId];
   int32_t iLumaQp = pWelsSvcRc->iLastCalculatedQScale;
   //decide one frame bits allocated
   if (pEncCtx->eSliceType == I_SLICE) {
--- a/codec/encoder/core/src/ref_list_mgr_svc.cpp
+++ b/codec/encoder/core/src/ref_list_mgr_svc.cpp
@@ -40,7 +40,7 @@
 *   reset LTR marking , recovery ,feedback state to default
 */
 void ResetLtrState (SLTRState* pLtr) {
-  pLtr->bReceivedT0LostFlag	= false;
+  pLtr->bReceivedT0LostFlag = false;
   pLtr->iLastRecoverFrameNum = 0;
   pLtr->iLastCorFrameNumDec = -1;
   pLtr->iCurFrameNumInDec = -1;
@@ -149,7 +149,7 @@
 *   delete failed mark according LTR recovery pRequest
 */
 static inline void DeleteInvalidLTR (sWelsEncCtx* pCtx) {
-  SRefList* pRefList		= pCtx->ppRefPicListExt[pCtx->uiDependencyId];
+  SRefList* pRefList = pCtx->ppRefPicListExt[pCtx->uiDependencyId];
   SPicture** pLongRefList = pRefList->pLongRefList;
   SLTRState* pLtr = &pCtx->pLtr[pCtx->uiDependencyId];
   int32_t iMaxFrameNumPlus1 = (1 << pCtx->pSps->uiLog2MaxFrameNum);
@@ -246,7 +246,7 @@
  *  LTR mark process
  */
 static inline void LTRMarkProcess (sWelsEncCtx* pCtx) {
-  SRefList* pRefList		= pCtx->ppRefPicListExt[pCtx->uiDependencyId];
+  SRefList* pRefList = pCtx->ppRefPicListExt[pCtx->uiDependencyId];
   SPicture** pLongRefList = pRefList->pLongRefList;
   SPicture** pShortRefList = pRefList->pShortRefList;
   SLTRState* pLtr = &pCtx->pLtr[pCtx->uiDependencyId];
@@ -297,7 +297,7 @@
       memmove (&pRefList->pLongRefList[1], &pRefList->pLongRefList[0],
                pRefList->uiLongRefCount * sizeof (SPicture*));	// confirmed_safe_unsafe_usage
     }
-    pLongRefList[0]	 = pShortRefList[i];
+    pLongRefList[0] = pShortRefList[i];
     pRefList->uiLongRefCount++;
     if (pRefList->uiLongRefCount > pCtx->pSvcParam->iLTRRefNum) {
       pRefList->pLongRefList[pRefList->uiLongRefCount - 1]->SetUnref();
@@ -308,7 +308,7 @@
 }
 
 static inline void LTRMarkProcessScreen (sWelsEncCtx* pCtx) {
-  SRefList* pRefList		= pCtx->ppRefPicListExt[pCtx->uiDependencyId];
+  SRefList* pRefList = pCtx->ppRefPicListExt[pCtx->uiDependencyId];
   SPicture** pLongRefList = pRefList->pLongRefList;
   int32_t iLtrIdx =  pCtx->pDecPic->iLongTermPicNum;
   pCtx->pVaa->uiMarkLongTermPicIdx = pCtx->pDecPic->iLongTermPicNum;
@@ -428,7 +428,7 @@
 
 bool CheckCurMarkFrameNumUsed (sWelsEncCtx* pCtx) {
   SLTRState* pLtr = &pCtx->pLtr[pCtx->uiDependencyId];
-  SRefList* pRefList	= pCtx->ppRefPicListExt[pCtx->uiDependencyId];
+  SRefList* pRefList = pCtx->ppRefPicListExt[pCtx->uiDependencyId];
   SPicture** pLongRefList = pRefList->pLongRefList;
   int32_t iGoPFrameNumInterval = ((pCtx->pSvcParam->uiGopSize >> 1) > 1) ? (pCtx->pSvcParam->uiGopSize >> 1) : (1);
   int32_t iMaxFrameNumPlus1 = (1 << pCtx->pSps->uiLog2MaxFrameNum);
@@ -446,7 +446,7 @@
 }
 void WelsMarkPic (sWelsEncCtx* pCtx) {
   SLTRState* pLtr = &pCtx->pLtr[pCtx->uiDependencyId];
-  const int32_t kiCountSliceNum			= GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx);
+  const int32_t kiCountSliceNum = GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx);
   int32_t iGoPFrameNumInterval = ((pCtx->pSvcParam->uiGopSize >> 1) > 1) ? (pCtx->pSvcParam->uiGopSize >> 1) : (1);
   int32_t iSliceIdx = 0;
 
@@ -568,7 +568,7 @@
 
   // build reference list 0/1 if applicable
 
-  pCtx->iNumRef0	= 0;
+  pCtx->iNumRef0 = 0;
 
   if (pCtx->eSliceType != I_SLICE) {
     if (pCtx->pSvcParam->bEnableLongTermReference && pLtr->bReceivedT0LostFlag && pCtx->uiTemporalId == 0) {
@@ -586,7 +586,7 @@
       for (i = 0; i < pRefList->uiShortRefCount; ++ i) {
         SPicture* pRef = pRefList->pShortRefList[i];
         if (pRef != NULL && pRef->bUsedAsRef && pRef->iFramePoc >= 0 && pRef->uiTemporalId <= kuiTid) {
-          pCtx->pRefList0[pCtx->iNumRef0++]	= pRef;
+          pCtx->pRefList0[pCtx->iNumRef0++] = pRef;
           WelsLog (& (pCtx->sLogCtx), WELS_LOG_DETAIL,
                    "WelsBuildRefList pCtx->uiTemporalId = %d,pRef->iFrameNum = %d,pRef->uiTemporalId = %d",
                    pCtx->uiTemporalId, pRef->iFrameNum, pRef->uiTemporalId);
@@ -600,7 +600,7 @@
     for (int32_t k = 0; k < MAX_TEMPORAL_LEVEL; k++) {
       pCtx->bRefOfCurTidIsLtr[pCtx->uiDependencyId][k] = false;
     }
-    pCtx->pRefList0[0]	= NULL;
+    pCtx->pRefList0[0] = NULL;
   }
 
   if (pCtx->iNumRef0 > kiNumRef)
@@ -609,7 +609,7 @@
 }
 
 static void UpdateBlockStatic (sWelsEncCtx* pCtx) {
-  SVAAFrameInfoExt* pVaaExt			= static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
+  SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
   assert (pCtx->iNumRef0 == 1); //multi-ref is not support yet?
   for (int32_t idx = 0; idx < pCtx->iNumRef0; idx++) {
     //TODO: we need to re-factor the source picture storage first,
@@ -761,10 +761,10 @@
   return true;
 }
 bool WelsBuildRefListScreen (sWelsEncCtx* pCtx, const int32_t iPOC, int32_t iBestLtrRefIdx) {
-  SRefList* pRefList		=  pCtx->ppRefPicListExt[pCtx->uiDependencyId];
+  SRefList* pRefList = pCtx->ppRefPicListExt[pCtx->uiDependencyId];
   SWelsSvcCodingParam* pParam = pCtx->pSvcParam;
   SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
-  const int32_t iNumRef	= pParam->iNumRefFrame;
+  const int32_t iNumRef = pParam->iNumRefFrame;
   pCtx->iNumRef0 = 0;
 
   if (pCtx->eSliceType != I_SLICE) {
@@ -805,7 +805,7 @@
     WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,
              "WelsBuildRefListScreen(), CurrentFramePoc=%d, isLTR=%d", iPOC, pCtx->bCurFrameMarkedAsSceneLtr);
     for (int j = 0; j < iNumRef; j++) {
-      SPicture*	 pARefPicture = pRefList->pLongRefList[j];
+      SPicture* pARefPicture = pRefList->pLongRefList[j];
       if (pARefPicture != NULL) {
         WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,
                  "WelsBuildRefListScreen()\tRefLot[%d]: iPoc=%d, iPictureType=%d, bUsedAsRef=%d, bIsLongRef=%d, bIsSceneLTR=%d, uiTemporalId=%d, iFrameNum=%d, iMarkFrameNum=%d, iLongTermPicNum=%d, uiRecieveConfirmed=%d",
@@ -828,7 +828,7 @@
     // dealing with IDR
     WelsResetRefList (pCtx);  //for IDR, SHOULD reset pRef list.
     ResetLtrState (&pCtx->pLtr[pCtx->uiDependencyId]); //SHOULD update it when IDR.
-    pCtx->pRefList0[0]	= NULL;
+    pCtx->pRefList0[0] = NULL;
   }
   if (pCtx->iNumRef0 > iNumRef) {
     pCtx->iNumRef0 = iNumRef;
@@ -850,8 +850,8 @@
     iMaxActualLtrIdx = pCtx->pSvcParam->iNumRefFrame - STR_ROOM - 1 -  WELS_MAX (iMaxTid , 1);
 
   SRefList* pRefList =  pCtx->ppRefPicListExt[pCtx->uiDependencyId];
-  SPicture** ppLongRefList		=  pRefList->pLongRefList;
-  const int32_t iNumRef	= pCtx->pSvcParam->iNumRefFrame;
+  SPicture** ppLongRefList = pRefList->pLongRefList;
+  const int32_t iNumRef = pCtx->pSvcParam->iNumRefFrame;
   int32_t i;
   const int32_t iLongRefNum = iNumRef - STR_ROOM;
   const bool bIsRefListNotFull = pRefList->uiLongRefCount < iLongRefNum;
@@ -876,7 +876,7 @@
           }
         }
       } else {
-        int32_t iRefNum_t[MAX_TEMPORAL_LAYER_NUM] =	 {0};
+        int32_t iRefNum_t[MAX_TEMPORAL_LAYER_NUM] = {0};
         for (i = 0 ; i < pRefList->uiLongRefCount ; ++i) {
           if (ppLongRefList[i]->bUsedAsRef && ppLongRefList[i]->bIsLongRef && (!ppLongRefList[i]->bIsSceneLTR)) {
             ++iRefNum_t[ ppLongRefList[i]->uiTemporalId ];
--- a/codec/encoder/core/src/sample.cpp
+++ b/codec/encoder/core/src/sample.cpp
@@ -220,7 +220,7 @@
     iBestCost = iCurCost;
   }
 
-  *pBestMode	= iBestMode;
+  *pBestMode = iBestMode;
 
   return iBestCost;
 
--- a/codec/encoder/core/src/slice_multi_threading.cpp
+++ b/codec/encoder/core/src/slice_multi_threading.cpp
@@ -131,7 +131,7 @@
   WelsEmms();
 
   while (iSliceIdx < kiSliceCount) {
-    iAvI[iSliceIdx]	= WELS_DIV_ROUND (INT_MULTIPLY * pCountMbInSlice[iSliceIdx], pSliceTime[iSliceIdx]);
+    iAvI[iSliceIdx] = WELS_DIV_ROUND (INT_MULTIPLY * pCountMbInSlice[iSliceIdx], pSliceTime[iSliceIdx]);
     MT_TRACE_LOG (NULL, WELS_LOG_DEBUG, "[MT] CalcSliceComplexRatio(), pSliceConsumeTime[%d]= %d us, slice_run= %d",
                   iSliceIdx,
                   pSliceTime[iSliceIdx], pCountMbInSlice[iSliceIdx]);
@@ -183,7 +183,7 @@
   } else
     fThr = 1.0f;
   if (fRmse > fThr)
-    iNeedAdj	= true;
+    iNeedAdj = true;
   MT_TRACE_LOG (NULL, WELS_LOG_DEBUG,
                 "[MT] NeedDynamicAdjust(), herein adjustment decision is made (iNeedAdj= %d) by: fRmse of pSlice complexity ratios %.6f, the corresponding threshold %.6f, iCountSliceNum %d",
                 iNeedAdj, fRmse, fThr, iSliceNum);
@@ -222,19 +222,19 @@
     if (iNumMbInEachGom * kiCountSliceNum >= kiCountNumMb) {
       return;
     }
-    iMinimalMbNum	= iNumMbInEachGom;
+    iMinimalMbNum = iNumMbInEachGom;
   }
 
   if (kiCountSliceNum < 2 || (kiCountSliceNum & 0x01))	// we need suppose uiSliceNum is even for multiple threading
     return;
 
-  iMaximalMbNum	= kiCountNumMb - (kiCountSliceNum - 1) * iMinimalMbNum;
+  iMaximalMbNum = kiCountNumMb - (kiCountSliceNum - 1) * iMinimalMbNum;
 
   WelsEmms();
 
   MT_TRACE_LOG (pCtx, WELS_LOG_DEBUG, "[MT] DynamicAdjustSlicing(), iDid= %d, iCountNumMb= %d", iCurDid, kiCountNumMb);
 
-  iSliceIdx	= 0;
+  iSliceIdx = 0;
   while (iSliceIdx + 1 < kiCountSliceNum) {
     int32_t iNumMbAssigning = WELS_DIV_ROUND (kiCountNumMb * pSliceComplexRatio[iSliceIdx], INT_MULTIPLY);
 
@@ -245,9 +245,9 @@
 
     // make sure one GOM at least in each pSlice for safe
     if (iNumMbAssigning < iMinimalMbNum)
-      iNumMbAssigning	= iMinimalMbNum;
+      iNumMbAssigning = iMinimalMbNum;
     else if (iNumMbAssigning > iMaximalMbNum)
-      iNumMbAssigning	= iMaximalMbNum;
+      iNumMbAssigning = iMaximalMbNum;
 
     assert (iNumMbAssigning > 0);
 
@@ -256,13 +256,13 @@
       assert (0);
       return;
     }
-    iRunLen[iSliceIdx]	= iNumMbAssigning;
+    iRunLen[iSliceIdx] = iNumMbAssigning;
     MT_TRACE_LOG (pCtx, WELS_LOG_DEBUG,
                   "[MT] DynamicAdjustSlicing(), uiSliceIdx= %d, pSliceComplexRatio= %.2f, slice_run_org= %d, slice_run_adj= %d",
                   iSliceIdx, pSliceComplexRatio[iSliceIdx] * 1.0f / INT_MULTIPLY, pSliceCtx->pCountMbNumInSlice[iSliceIdx],
                   iNumMbAssigning);
     ++ iSliceIdx;
-    iMaximalMbNum	= iMbNumLeft - (kiCountSliceNum - iSliceIdx - 1) * iMinimalMbNum;	// get maximal num_mb in left parts
+    iMaximalMbNum = iMbNumLeft - (kiCountSliceNum - iSliceIdx - 1) * iMinimalMbNum; // get maximal num_mb in left parts
   }
   iRunLen[iSliceIdx] = iMbNumLeft;
   MT_TRACE_LOG (pCtx, WELS_LOG_DEBUG,
@@ -301,16 +301,16 @@
   if (NULL == ppCtx || NULL == pCodingParam || NULL == *ppCtx || iCountBsLen <= 0)
     return 1;
 
-  pMa	= (*ppCtx)->pMemAlign;
+  pMa = (*ppCtx)->pMemAlign;
   pPara = pCodingParam;
-  iNumSpatialLayers	= pPara->iSpatialLayerNum;
-  iThreadNum	= pPara->iCountThreadsNum;
+  iNumSpatialLayers = pPara->iSpatialLayerNum;
+  iThreadNum = pPara->iCountThreadsNum;
   iMaxSliceNum = (*ppCtx)->iMaxSliceCount;
 
-  pSmt	= (SSliceThreading*)pMa->WelsMalloc (sizeof (SSliceThreading), "SSliceThreading");
+  pSmt = (SSliceThreading*)pMa->WelsMalloc (sizeof (SSliceThreading), "SSliceThreading");
   WELS_VERIFY_RETURN_PROC_IF (1, (NULL == pSmt), FreeMemorySvc (ppCtx))
-  (*ppCtx)->pSliceThreading	= pSmt;
-  pSmt->pThreadPEncCtx	= (SSliceThreadPrivateData*)pMa->WelsMalloc (sizeof (SSliceThreadPrivateData) * iThreadNum,
+  (*ppCtx)->pSliceThreading = pSmt;
+  pSmt->pThreadPEncCtx = (SSliceThreadPrivateData*)pMa->WelsMalloc (sizeof (SSliceThreadPrivateData) * iThreadNum,
                           "pThreadPEncCtx");
   WELS_VERIFY_RETURN_PROC_IF (1, (NULL == pSmt->pThreadPEncCtx), FreeMemorySvc (ppCtx))
 
@@ -323,14 +323,14 @@
 
   iIdx = 0;
   while (iIdx < iNumSpatialLayers) {
-    SSliceConfig* pMso	= &pPara->sSpatialLayers[iIdx].sSliceCfg;
+    SSliceConfig* pMso = &pPara->sSpatialLayers[iIdx].sSliceCfg;
     const int32_t kiSliceNum = pMso->sSliceArgument.uiSliceNum;
     if (((pMso->uiSliceMode == SM_FIXEDSLCNUM_SLICE) || (pMso->uiSliceMode == SM_AUTO_SLICE))
         && pPara->iMultipleThreadIdc > 1
         && pPara->iMultipleThreadIdc >= kiSliceNum) {
-      pSmt->pSliceConsumeTime[iIdx]	= (uint32_t*)pMa->WelsMallocz (kiSliceNum * sizeof (uint32_t), "pSliceConsumeTime[]");
+      pSmt->pSliceConsumeTime[iIdx] = (uint32_t*)pMa->WelsMallocz (kiSliceNum * sizeof (uint32_t), "pSliceConsumeTime[]");
       WELS_VERIFY_RETURN_PROC_IF (1, (NULL == pSmt->pSliceConsumeTime[iIdx]), FreeMemorySvc (ppCtx))
-      pSmt->pSliceComplexRatio[iIdx]	= (int32_t*)pMa->WelsMalloc (kiSliceNum * sizeof (int32_t), "pSliceComplexRatio[]");
+      pSmt->pSliceComplexRatio[iIdx] = (int32_t*)pMa->WelsMalloc (kiSliceNum * sizeof (int32_t), "pSliceComplexRatio[]");
       WELS_VERIFY_RETURN_PROC_IF (1, (NULL == pSmt->pSliceComplexRatio[iIdx]), FreeMemorySvc (ppCtx))
     } else {
       pSmt->pSliceConsumeTime[iIdx]     = NULL;
@@ -348,7 +348,7 @@
     fclose (pSmt->pFSliceDiff);
     pSmt->pFSliceDiff = NULL;
   }
-  pSmt->pFSliceDiff	= fopen ("slice_time.txt", "wt+");
+  pSmt->pFSliceDiff = fopen ("slice_time.txt", "wt+");
 #endif//MT_DEBUG
 
   MT_TRACE_LOG (*ppCtx, WELS_LOG_INFO, "encpEncCtx= 0x%p", (void*) *ppCtx);
@@ -392,7 +392,7 @@
   err = WelsEventOpen (&pSmt->pSliceCodedMasterEvent, name);
   MT_TRACE_LOG (*ppCtx, WELS_LOG_INFO, "[MT] Open pSliceCodedMasterEvent named(%s) ret%d err%d", name, err, errno);
 
-  (*ppCtx)->pSliceBs	= (SWelsSliceBs*)pMa->WelsMalloc (sizeof (SWelsSliceBs) * iMaxSliceNum, "pSliceBs");
+  (*ppCtx)->pSliceBs = (SWelsSliceBs*)pMa->WelsMalloc (sizeof (SWelsSliceBs) * iMaxSliceNum, "pSliceBs");
   WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pSliceBs), FreeMemorySvc (ppCtx))
 
   pBsBase               = (*ppCtx)->pFrameBs + iCountBsLen;
@@ -403,7 +403,7 @@
     pSliceB->pBsBuffer  = (uint8_t*)pMa->WelsMalloc (iSliceBsBufferSize, "pSliceB->pBsBuffer");
 
     WELS_VERIFY_RETURN_PROC_IF (1, (NULL == pSliceB->pBsBuffer), FreeMemorySvc (ppCtx))
-    pSliceB->uiSize	= iSliceBsBufferSize;
+    pSliceB->uiSize = iSliceBsBufferSize;
 
     if (iIdx > 0) {
       pSliceB->pBs      = pBsBase;
@@ -537,7 +537,7 @@
       ++ pSliceBs;
       if (pSliceBs != NULL && pSliceBs->uiBsPos > 0) {
         int32_t iNalIdx = 0;
-        const int32_t iCountNal	= pSliceBs->iNalIndex;
+        const int32_t iCountNal = pSliceBs->iNalIndex;
 
 #if MT_DEBUG_BS_WR
         assert (pSliceBs->bSliceCodedFlag);
@@ -549,7 +549,7 @@
         iLayerSize += pSliceBs->uiBsPos;
 
         while (iNalIdx < iCountNal) {
-          pLbi->pNalLengthInByte[iNalIdxBase + iNalIdx]	= pSliceBs->iNalLen[iNalIdx];
+          pLbi->pNalLengthInByte[iNalIdxBase + iNalIdx] = pSliceBs->iNalLen[iNalIdx];
           ++ iNalIdx;
         }
         pLbi->iNalCount += iCountNal;
@@ -567,13 +567,13 @@
       const int32_t kiCountSlicesCoded = pCtx->pCurDqLayer->pNumSliceCodedOfPartition[iPartitionIdx];
       int32_t iIdx = 0;
 
-      iSliceIdx	= iPartitionIdx;
+      iSliceIdx = iPartitionIdx;
       while (iIdx < kiCountSlicesCoded) {
-        pSliceBs	= &pCtx->pSliceBs[iSliceIdx];
+        pSliceBs = &pCtx->pSliceBs[iSliceIdx];
         if (pSliceBs != NULL && pSliceBs->uiBsPos > 0) {
           if (iPartitionIdx > 0) {
             int32_t iNalIdx = 0;
-            const int32_t iCountNal	= pSliceBs->iNalIndex;
+            const int32_t iCountNal = pSliceBs->iNalIndex;
 
             memmove (pCtx->pFrameBs + pCtx->iPosBsBuffer, pSliceBs->pBs, pSliceBs->uiBsPos);	// confirmed_safe_unsafe_usage
             pCtx->iPosBsBuffer += pSliceBs->uiBsPos;
@@ -581,13 +581,13 @@
             iLayerSize += pSliceBs->uiBsPos;
 
             while (iNalIdx < iCountNal) {
-              pLbi->pNalLengthInByte[iNalIdxBase + iNalIdx]	= pSliceBs->iNalLen[iNalIdx];
+              pLbi->pNalLengthInByte[iNalIdxBase + iNalIdx] = pSliceBs->iNalLen[iNalIdx];
               ++ iNalIdx;
             }
             pLbi->iNalCount += iCountNal;
             iNalIdxBase     += iCountNal;
           } else {
-            iLayerSize	+= pSliceBs->uiBsPos;
+            iLayerSize += pSliceBs->uiBsPos;
           }
         }
 
@@ -622,12 +622,12 @@
     WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS)
     iSliceSize += iNalSize;
     pDst += iNalSize;
-    pLbi->pNalLengthInByte[iNalBase + iNalIdx]	= iNalSize;
+    pLbi->pNalLengthInByte[iNalBase + iNalIdx] = iNalSize;
 
     ++ iNalIdx;
   }
 
-  pSliceBs->uiBsPos	= iSliceSize;
+  pSliceBs->uiBsPos = iSliceSize;
   if (iFirstSlice) {
     // pBsBuffer has been updated at coding_slice_0_in_encoder_mother_thread()
     pLbi->uiLayerType   = VIDEO_CODING_LAYER;
@@ -653,7 +653,7 @@
   int32_t iReturn = ENC_RETURN_SUCCESS;
   const int32_t kiWrittenLength = (int32_t) (pSliceBs->sBsWrite.pCurBuf - pSliceBs->sBsWrite.pStartBuf);
 
-  iSliceSize				= 0;
+  iSliceSize = 0;
   assert (kiNalCnt <= 2);
   if (kiNalCnt > 2)
     return 0;
@@ -668,7 +668,7 @@
     pDst += iNalSize;
     ++ iNalIdx;
   }
-  pSliceBs->uiBsPos	= iSliceSize;
+  pSliceBs->uiBsPos = iSliceSize;
 
   return iReturn;
 }
@@ -727,7 +727,7 @@
       bNeedPrefix       = pEncPEncCtx->bNeedPrefixNalFlag;
 
       if (pParamD->sSliceCfg.uiSliceMode != SM_DYN_SLICE) {
-        int64_t iSliceStart	= 0;
+        int64_t iSliceStart = 0;
         bool bDsaFlag = false;
         iSliceIdx               = pPrivateData->iSliceIndex;
         pSlice                  = &pCurDq->sLayerInfo.pSliceInLayer[iSliceIdx];
@@ -746,7 +746,7 @@
         InitBits (&pSliceBs->sBsWrite, pSliceBs->pBsBuffer, pSliceBs->uiSize);
 
 #if MT_DEBUG_BS_WR
-        pSliceBs->bSliceCodedFlag	= false;
+        pSliceBs->bSliceCodedFlag = false;
 #endif//MT_DEBUG_BS_WR
 
         if (bNeedPrefix) {
@@ -772,7 +772,7 @@
         WelsUnloadNalForSlice (pSliceBs);
 
         if (0 == iSliceIdx) {
-          pLbi->pBsBuf	= pEncPEncCtx->pFrameBs + pEncPEncCtx->iPosBsBuffer;
+          pLbi->pBsBuf = pEncPEncCtx->pFrameBs + pEncPEncCtx->iPosBsBuffer;
           iReturn = WriteSliceToFrameBs (pEncPEncCtx, pLbi, pLbi->pBsBuf, iSliceIdx, iSliceSize);
           if (ENC_RETURN_SUCCESS != iReturn) {
             uiThrdRet = iReturn;
@@ -818,7 +818,7 @@
 #endif//SLICE_INFO_OUTPUT
 
 #if MT_DEBUG_BS_WR
-        pSliceBs->bSliceCodedFlag	= true;
+        pSliceBs->bSliceCodedFlag = true;
 #endif//MT_DEBUG_BS_WR
 
         WelsEventSignal (
@@ -833,7 +833,7 @@
         const int32_t kiEndMbInPartition        = pPrivateData->iEndMbIndex;            // exclusive
         int32_t iAnyMbLeftInPartition           = kiEndMbInPartition - kiFirstMbInPartition;
 
-        iSliceIdx		= pPrivateData->iSliceIndex;
+        iSliceIdx = pPrivateData->iSliceIndex;
 
         pSliceCtx->pFirstMbInSlice[iSliceIdx]                   = kiFirstMbInPartition;
         pCurDq->pNumSliceCodedOfPartition[kiPartitionId]        = 1;    // one pSlice per partition intialized, dynamic slicing inside
@@ -845,7 +845,7 @@
           if (iSliceIdx >= pSliceCtx->iMaxSliceNumConstraint) {
             // TODO: need exception handler for not large enough of MAX_SLICES_NUM related memory usage
             // No idea about its solution due MAX_SLICES_NUM is fixed lenght in relevent pData structure
-            uiThrdRet	= 1;
+            uiThrdRet = 1;
             break;
           }
 
@@ -880,7 +880,7 @@
 
           if (0 == kiPartitionId) {
             if (0 == iSliceIdx)
-              pLbi->pBsBuf	= pEncPEncCtx->pFrameBs + pEncPEncCtx->iPosBsBuffer;
+              pLbi->pBsBuf = pEncPEncCtx->pFrameBs + pEncPEncCtx->iPosBsBuffer;
             iReturn = WriteSliceToFrameBs (pEncPEncCtx, pLbi, pEncPEncCtx->pFrameBs + pEncPEncCtx->iPosBsBuffer, iSliceIdx,
                                            iSliceSize);
             if (ENC_RETURN_SUCCESS != iReturn) {
@@ -931,13 +931,13 @@
         WelsEventSignal (&pEncPEncCtx->pSliceThreading->pSliceCodedEvent[iEventIdx]);	// mean finished coding current pSlice
         WelsEventSignal (&pEncPEncCtx->pSliceThreading->pSliceCodedMasterEvent);
       }
-    } else if (WELS_THREAD_ERROR_WAIT_OBJECT_0 + 1 == iWaitRet) {	// exit thread signal
-      uiThrdRet	= 0;
+    } else if (WELS_THREAD_ERROR_WAIT_OBJECT_0 + 1 == iWaitRet) { // exit thread signal
+      uiThrdRet = 0;
       break;
-    } else if (WELS_THREAD_ERROR_WAIT_OBJECT_0 + 2 == iWaitRet) {	// update pMb list singal
-      iSliceIdx		=
-        iEventIdx;	// pPrivateData->iSliceIndex; old threads can not be terminated, pPrivateData is not correct for applicable
-      pCurDq			= pEncPEncCtx->pCurDqLayer;
+    } else if (WELS_THREAD_ERROR_WAIT_OBJECT_0 + 2 == iWaitRet) { // update pMb list singal
+      iSliceIdx =
+        iEventIdx; // pPrivateData->iSliceIndex; old threads can not be terminated, pPrivateData is not correct for applicable
+      pCurDq = pEncPEncCtx->pCurDqLayer;
       UpdateMbListNeighborParallel (pCurDq->pSliceEncCtx, pCurDq->sMbDataP, iSliceIdx);
       WelsEventSignal (
         &pEncPEncCtx->pSliceThreading->pFinUpdateMbListEvent[iEventIdx]);	// mean finished update pMb list for this pSlice
@@ -945,7 +945,7 @@
       WelsLog (& (pEncPEncCtx->sLogCtx), WELS_LOG_WARNING,
                "[MT] CodingSliceThreadProc(), waiting pReadySliceCodingEvent[%d] failed(%d) and thread%d terminated!", iEventIdx,
                iWaitRet, iThreadIdx);
-      uiThrdRet	= 1;
+      uiThrdRet = 1;
       break;
     }
   } while (1);
@@ -991,7 +991,7 @@
 
   ////////////////////////////////////////
   if (bIsDynamicSlicingMode) {
-    iEndMbIdx	= pSliceCtx->iMbNumInFrame;
+    iEndMbIdx = pSliceCtx->iMbNumInFrame;
     for (iIdx = kiEventCnt - 1; iIdx >= 0; --iIdx) {
       const int32_t iFirstMbIdx         = pSliceCtx->pFirstMbInSlice[iIdx];
       pPriData[iIdx].iStartMbIndex      = iFirstMbIdx;
@@ -1003,7 +1003,7 @@
   iIdx = 0;
   while (iIdx < kiEventCnt) {
     pPriData[iIdx].pLayerBs = pLbi;
-    pPriData[iIdx].iSliceIndex	= iIdx;
+    pPriData[iIdx].iSliceIndex = iIdx;
     if (pEventsList[iIdx])
       WelsEventSignal (&pEventsList[iIdx]);
     if (pMasterEventsList[iIdx])
@@ -1027,10 +1027,10 @@
   int64_t iT0 = WelsTime();
 #endif//MT_DEBUG
 
-  pCtx->pCurDqLayer	= pCurDq;
+  pCtx->pCurDqLayer = pCurDq;
 
   // do not need adjust due to not different at both slices of consumed time
-  iNeedAdj	= NeedDynamicAdjust (pCtx->pSliceThreading->pSliceConsumeTime[0], pCurDq->pSliceEncCtx->iSliceNumInFrame);
+  iNeedAdj = NeedDynamicAdjust (pCtx->pSliceThreading->pSliceConsumeTime[0], pCurDq->pSliceEncCtx->iSliceNumInFrame);
   if (iNeedAdj)
     DynamicAdjustSlicing (pCtx,
                           pCurDq,
@@ -1056,7 +1056,7 @@
   // uiSliceMode of referencing spatial should be SM_FIXEDSLCNUM_SLICE
   // if using spatial base layer for complexity estimation
 
-  const bool kbModelingFromSpatial =	(pCtx->pCurDqLayer->pRefLayer != NULL && iCurDid > 0)
+  const bool kbModelingFromSpatial = (pCtx->pCurDqLayer->pRefLayer != NULL && iCurDid > 0)
                                       && (pCtx->pSvcParam->sSpatialLayers[iCurDid - 1].sSliceCfg.uiSliceMode == SM_FIXEDSLCNUM_SLICE
                                           && pCtx->pSvcParam->iMultipleThreadIdc >= pCtx->pSvcParam->sSpatialLayers[iCurDid -
                                               1].sSliceCfg.sSliceArgument.uiSliceNum);
@@ -1119,7 +1119,7 @@
   if (iSpatialNum > MAX_DEPENDENCY_LAYER)
     return;
 
-  pPara	= pCtx->pSvcParam;
+  pPara = pCtx->pSvcParam;
   while (iSpatialIdx < iSpatialNum) {
     const int32_t kiDid         = pDidList[iSpatialIdx];
     SSpatialLayerInternal* pDlp = &pPara->sDependencyLayers[kiDid];
--- a/codec/encoder/core/src/svc_base_layer_md.cpp
+++ b/codec/encoder/core/src/svc_base_layer_md.cpp
@@ -307,7 +307,7 @@
   }
 
   //step 2. initial pWelsMd
-  pCurMb->uiCbp			= 0;
+  pCurMb->uiCbp = 0;
 
   //step 4: locating scaled_tcoeff
 
@@ -327,7 +327,7 @@
   const int32_t kiMbWidth = pCurLayer->iMbWidth;
   const int32_t kiMbHeight = pCurLayer->iMbHeight;
 
-  pMbCache->pEncSad		= &pCurLayer->pDecPic->pMbSkipSad[kiMbXY];
+  pMbCache->pEncSad = &pCurLayer->pDecPic->pMbSkipSad[kiMbXY];
 
   //step 1. load neighbor cache
   pEncCtx->pFuncList->pfFillInterNeighborCache (pMbCache, pCurMb, kiMbWidth,
@@ -351,7 +351,7 @@
     pMbCache->SPicData.pRefMb[2]        += MB_WIDTH_CHROMA;
   }
 
-  pMbCache->uiRefMbType	= pCurLayer->pRefPic->uiRefMbType[kiMbXY];
+  pMbCache->uiRefMbType = pCurLayer->pRefPic->uiRefMbType[kiMbXY];
   pMbCache->bCollocatedPredFlag = false;
 
   //comment: sometimes, mode decision process may skip the md_p16x16 and md_pskip function,
@@ -449,7 +449,7 @@
 #endif//X86_ASM
 
   for (i = 0; i < 16; i++) {
-    const int32_t kiOffset	= kpNeighborIntraToI4x4[i];
+    const int32_t kiOffset = kpNeighborIntraToI4x4[i];
 
     //step 1: locating current 4x4 block position in pEnc and pDecMb
     iCoordinateX = kpCoordinateIdxX[i];
@@ -866,7 +866,7 @@
 
 int32_t WelsMdIntraChroma (SWelsFuncPtrList* pFunc, SDqLayer* pCurDqLayer, SMbCache* pMbCache, int32_t iLambda) {
   const int8_t* kpAvailMode;
-  int32_t iAvailCount				= 0;
+  int32_t iAvailCount = 0;
   int32_t iChmaIdx = 0;
   uint8_t* pPredIntraChma[2]    = {pMbCache->pMemPredChroma, pMbCache->pMemPredChroma + 128};
   uint8_t* pDstChma             = pPredIntraChma[0];
@@ -920,12 +920,12 @@
         iBestMode = iCurMode;
         iBestCost = iCurCost;
         iChmaIdx = iChmaIdx ^ 0x01;
-        pDstChma	= pPredIntraChma[iChmaIdx];
+        pDstChma = pPredIntraChma[iChmaIdx];
       }
     }
   }
 
-  pMbCache->pBestPredIntraChroma	= pPredIntraChma[iChmaIdx ^ 0x01];
+  pMbCache->pBestPredIntraChroma = pPredIntraChma[iChmaIdx ^ 0x01];
   pMbCache->uiChmaI8x8Mode = iBestMode;
   return iBestCost;
 }
@@ -1039,7 +1039,7 @@
     sMe16x8->iCurMeBlockPixY = pWelsMd->iMbPixY + iPixelY;
     sMe16x8->uSadPredISatd.uiSadPred = pWelsMd->iSadPredMb >> 1;
 
-    pSlice->sMvc[0]	= sMe16x8->sMvBase;
+    pSlice->sMvc[0] = sMe16x8->sMvBase;
     pSlice->uiMvcNum = 1;
 
     PredInter16x8Mv (pMbCache, i << 3, 0, & (sMe16x8->sMvp));
@@ -1583,7 +1583,7 @@
 
 }
 bool WelsMdFirstIntraMode (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb, SMbCache* pMbCache) {
-  SWelsFuncPtrList* pFunc	= pEncCtx->pFuncList;
+  SWelsFuncPtrList* pFunc = pEncCtx->pFuncList;
 
   int32_t iCostI16x16 = WelsMdI16x16 (pFunc, pEncCtx->pCurDqLayer, pMbCache, pWelsMd->iLambda);
 
@@ -1719,7 +1719,7 @@
 //////
 void WelsMdInterEncode (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurMb, SMbCache* pMbCache) {
   SWelsFuncPtrList* pFunc = pEncCtx->pFuncList;
-  SDqLayer* pCurDqLayer	= pEncCtx->pCurDqLayer;
+  SDqLayer* pCurDqLayer = pEncCtx->pCurDqLayer;
 
   //add pEnc&rec to MD--2010.3.15
   const int32_t kiCsStrideY = pCurDqLayer->iCsStride[0];
--- a/codec/encoder/core/src/svc_enc_slice_segment.cpp
+++ b/codec/encoder/core/src/svc_enc_slice_segment.cpp
@@ -71,7 +71,7 @@
     return 1;
 
   if (SM_ROWMB_SLICE == pSliceSeg->uiSliceMode) {
-    const int32_t kiMbWidth	= pSliceSeg->iMbWidth;
+    const int32_t kiMbWidth = pSliceSeg->iMbWidth;
     int32_t iSliceNum = pSliceSeg->iSliceNumInFrame, uiSliceIdx = 0;
 
     while (uiSliceIdx < iSliceNum) {
@@ -102,7 +102,7 @@
 
       // due here need check validate mb_assign_map for input pData, can not use memset
       do {
-        pSliceSeg->pOverallMbMap[iMbIdx + iRunIdx]	= iSliceIdx;
+        pSliceSeg->pOverallMbMap[iMbIdx + iRunIdx] = iSliceIdx;
         ++ iRunIdx;
       } while (iRunIdx < kiCurRunLength && iMbIdx + iRunIdx < kiCountNumMbInFrame);
 
@@ -143,7 +143,7 @@
 
   for (; uiSliceIdx + 1 < kuiSliceNum; ++ uiSliceIdx) {
     pSlicesAssignList[uiSliceIdx] = kiMbNumPerSlice;
-    iNumMbLeft	-= kiMbNumPerSlice;
+    iNumMbLeft -= kiMbNumPerSlice;
   }
   pSlicesAssignList[uiSliceIdx] = iNumMbLeft;
 
@@ -160,7 +160,7 @@
     return false;
 
   while (uiSliceIdx < kuiSliceNum) {
-    pSlicesAssignList[uiSliceIdx]	= kiMbWidth;
+    pSlicesAssignList[uiSliceIdx] = kiMbWidth;
     ++ uiSliceIdx;
   }
   return true;
@@ -267,7 +267,7 @@
   int32_t iMaximalMbNum         = 0;    // dynamically assign later
   int32_t iGomSize;
 
-  uint32_t uiSliceIdx	= 0;	// for test
+  uint32_t uiSliceIdx = 0; // for test
 
   // The default RC is Bit-rate mode [Yi], but need consider as below:
   // Tuned to use max of mode0 and mode1 due can not refresh on this from rc mode changed outside, 8/16/2011
@@ -284,15 +284,15 @@
   int32_t iNumMbAssigning = WELS_DIV_ROUND (INT_MULTIPLY * kiMbNumPerSlice, iGomSize * INT_MULTIPLY) * iGomSize;
   int32_t iCurNumMbAssigning = 0;
 
-  iMinimalMbNum	= iGomSize;
+  iMinimalMbNum = iGomSize;
   while (uiSliceIdx + 1 < kuiSliceNum) {
-    iMaximalMbNum	= iNumMbLeft - (kuiSliceNum - uiSliceIdx - 1) * iMinimalMbNum;	// get maximal num_mb in left parts
+    iMaximalMbNum = iNumMbLeft - (kuiSliceNum - uiSliceIdx - 1) * iMinimalMbNum; // get maximal num_mb in left parts
 
     // make sure one GOM at least in each slice for safe
     if (iNumMbAssigning < iMinimalMbNum)
-      iCurNumMbAssigning	= iMinimalMbNum;
+      iCurNumMbAssigning = iMinimalMbNum;
     else if (iNumMbAssigning > iMaximalMbNum)
-      iCurNumMbAssigning	= ( iMaximalMbNum / iGomSize ) * iGomSize;
+      iCurNumMbAssigning = ( iMaximalMbNum / iGomSize ) * iGomSize;
     else
       iCurNumMbAssigning = iNumMbAssigning;
 
@@ -305,7 +305,7 @@
       return false;
     }
 
-    pSlicesAssignList[uiSliceIdx]	= iCurNumMbAssigning;
+    pSlicesAssignList[uiSliceIdx] = iCurNumMbAssigning;
     ++ uiSliceIdx;
   }
   pSlicesAssignList[uiSliceIdx] = iNumMbLeft;
@@ -382,7 +382,7 @@
     if (NULL != pSliceSeg->pCountMbNumInSlice) {
       pMa->WelsFree (pSliceSeg->pCountMbNumInSlice, "pSliceSeg->pCountMbNumInSlice");
 
-      pSliceSeg->pCountMbNumInSlice	= NULL;
+      pSliceSeg->pCountMbNumInSlice = NULL;
     }
     // just for safe
     pSliceSeg->iSliceNumInFrame = 0;
@@ -393,12 +393,12 @@
   }
 
   if (SM_SINGLE_SLICE == uiSliceMode) {
-    pSliceSeg->pOverallMbMap	= (uint16_t*)pMa->WelsMalloc (kiCountMbNum * sizeof (uint16_t), "pSliceSeg->pOverallMbMap");
+    pSliceSeg->pOverallMbMap = (uint16_t*)pMa->WelsMalloc (kiCountMbNum * sizeof (uint16_t), "pSliceSeg->pOverallMbMap");
 
     WELS_VERIFY_RETURN_IF (1, NULL == pSliceSeg->pOverallMbMap)
-    pSliceSeg->iSliceNumInFrame	= 1;
+    pSliceSeg->iSliceNumInFrame = 1;
 
-    pSliceSeg->pFirstMbInSlice	= (int32_t*)pMa->WelsMalloc (pSliceSeg->iSliceNumInFrame * sizeof (int32_t),
+    pSliceSeg->pFirstMbInSlice = (int32_t*)pMa->WelsMalloc (pSliceSeg->iSliceNumInFrame * sizeof (int32_t),
                                   "pSliceSeg->pFirstMbInSlice");
 
     WELS_VERIFY_RETURN_IF (1, NULL == pSliceSeg->pFirstMbInSlice)
@@ -420,7 +420,7 @@
         && uiSliceMode != SM_DYN_SLICE && uiSliceMode != SM_AUTO_SLICE)
       return 1;
 
-    pSliceSeg->pOverallMbMap	= (uint16_t*)pMa->WelsMalloc (kiCountMbNum * sizeof (uint16_t), "pSliceSeg->pOverallMbMap");
+    pSliceSeg->pOverallMbMap = (uint16_t*)pMa->WelsMalloc (kiCountMbNum * sizeof (uint16_t), "pSliceSeg->pOverallMbMap");
 
     WELS_VERIFY_RETURN_IF (1, NULL == pSliceSeg->pOverallMbMap)
 
@@ -432,12 +432,12 @@
     if (-1 == pSliceSeg->iSliceNumInFrame)
       return 1;
 
-    pSliceSeg->pCountMbNumInSlice	= (int32_t*)pMa->WelsMalloc (pSliceSeg->iSliceNumInFrame * sizeof (int32_t),
+    pSliceSeg->pCountMbNumInSlice = (int32_t*)pMa->WelsMalloc (pSliceSeg->iSliceNumInFrame * sizeof (int32_t),
                                     "pSliceSeg->pCountMbNumInSlice");
 
     WELS_VERIFY_RETURN_IF (1, NULL == pSliceSeg->pCountMbNumInSlice)
 
-    pSliceSeg->pFirstMbInSlice		= (int32_t*)pMa->WelsMalloc (pSliceSeg->iSliceNumInFrame * sizeof (int32_t),
+    pSliceSeg->pFirstMbInSlice = (int32_t*)pMa->WelsMalloc (pSliceSeg->iSliceNumInFrame * sizeof (int32_t),
                                     "pSliceSeg->pFirstMbInSlice");
 
     WELS_VERIFY_RETURN_IF (1, NULL == pSliceSeg->pFirstMbInSlice)
@@ -587,7 +587,7 @@
       int32_t iNextMbIdx = kiMbXY;
       ++ iNextMbIdx;
       if (iNextMbIdx >= pSliceSeg->iMbNumInFrame)
-        iNextMbIdx	= -1;
+        iNextMbIdx = -1;
       return iNextMbIdx;
     } else { /*if ( SM_MULTIPLE_SLICE == pSliceSeg->uiSliceMode )*/
       if (SM_RESERVED != pSliceSeg->uiSliceMode) {
@@ -685,7 +685,7 @@
 
   iSliceIdx = 0;
   do {
-    const int32_t kiSliceRun	= pRunLength[iSliceIdx];
+    const int32_t kiSliceRun = pRunLength[iSliceIdx];
 
     pSliceCtx->pFirstMbInSlice[iSliceIdx]    = iFirstMbIdx;
     pSliceCtx->pCountMbNumInSlice[iSliceIdx] = kiSliceRun;
--- a/codec/encoder/core/src/svc_encode_mb.cpp
+++ b/codec/encoder/core/src/svc_encode_mb.cpp
@@ -192,7 +192,7 @@
   const int16_t* pMF = g_kiQuantMF[uiQp];
   const int16_t* pFF = g_kiQuantInterFF[uiQp];
   int16_t aMax[16];
-  int32_t i, j, iNoneZeroCountMbDcAc	= 0, iNoneZeroCount = 0;
+  int32_t i, j, iNoneZeroCountMbDcAc = 0, iNoneZeroCount = 0;
 
   for (i = 0; i < 4; i++) {
     pfQuantizationFour4x4Max (pRes, pFF,  pMF, aMax + (i << 2));
@@ -259,7 +259,7 @@
   uint8_t uiSubMbIdx                                    = 16 + ((iUV - 1) << 2); //uiSubMbIdx == 16 or 20
   int16_t* iChromaDc = pMbCache->pDct->iChromaDc[iUV - 1], *pBlock = pMbCache->pDct->iChromaBlock[ (iUV - 1) << 2];
   int16_t aDct2x2[4], j, aMax[4];
-  int32_t iSingleCtr8x8		= 0;
+  int32_t iSingleCtr8x8 = 0;
   const int16_t* pMF = g_kiQuantMF[kiQp];
   const int16_t* pFF = g_kiQuantInterFF[ (!kiInterFlag) * 6 + kiQp];
 
@@ -326,7 +326,7 @@
 }
 
 bool WelsTryPYskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache) {
-  int32_t iSingleCtrMb	= 0;
+  int32_t iSingleCtrMb = 0;
   int16_t* pRes = pMbCache->pCoeffLevel;
   const uint8_t kuiQp = pCurMb->uiLumaQp;
 
--- a/codec/encoder/core/src/svc_encode_slice.cpp
+++ b/codec/encoder/core/src/svc_encode_slice.cpp
@@ -67,10 +67,10 @@
 }
 
 void WelsSliceHeaderScalExtInit (SDqLayer* pCurLayer, SSlice* pSlice) {
-  SSliceHeaderExt* pSliceHeadExt	= &pSlice->sSliceHeaderExt;
+  SSliceHeaderExt* pSliceHeadExt = &pSlice->sSliceHeaderExt;
   SNalUnitHeaderExt* pNalHeadExt = &pCurLayer->sLayerInfo.sNalHeaderExt;
 
-  uint8_t uiDependencyId	= pNalHeadExt->uiDependencyId;
+  uint8_t uiDependencyId = pNalHeadExt->uiDependencyId;
 
   pSliceHeadExt->bSliceSkipFlag = false;
 
@@ -90,7 +90,7 @@
   SSliceHeaderExt* pCurSliceExt = &pSlice->sSliceHeaderExt;
   SSliceHeader* pCurSliceHeader  = &pCurSliceExt->sSliceHeader;
 
-  pCurSliceHeader->eSliceType	= pEncCtx->eSliceType;
+  pCurSliceHeader->eSliceType = pEncCtx->eSliceType;
 
   pCurSliceExt->bStoreRefBasePicFlag = false;
 
@@ -99,14 +99,14 @@
   pCurSliceHeader->iFrameNum      = pEncCtx->iFrameNum;
   pCurSliceHeader->uiIdrPicId     = pEncCtx->uiIdrPicId;
 
-  pCurSliceHeader->iPicOrderCntLsb          = pEncCtx->pEncPic->iFramePoc;	// 0
+  pCurSliceHeader->iPicOrderCntLsb = pEncCtx->pEncPic->iFramePoc;      // 0
 
   if (P_SLICE == pEncCtx->eSliceType) {
-    pCurSliceHeader->uiNumRefIdxL0Active	= 1;
+    pCurSliceHeader->uiNumRefIdxL0Active = 1;
     if (pCurSliceHeader->uiRefCount > 0 &&
         pCurSliceHeader->uiRefCount < pCurLayer->sLayerInfo.pSpsP->iNumRefFrames) {
       pCurSliceHeader->bNumRefIdxActiveOverrideFlag = true;
-      pCurSliceHeader->uiNumRefIdxL0Active	= pCurSliceHeader->uiRefCount;
+      pCurSliceHeader->uiNumRefIdxL0Active = pCurSliceHeader->uiRefCount;
     }
     //to solve mismatch between debug&release
     else {
@@ -117,10 +117,10 @@
   pCurSliceHeader->iSliceQpDelta = pEncCtx->iGlobalQp - pCurLayer->sLayerInfo.pPpsP->iPicInitQp;
 
   //for deblocking initial
-  pCurSliceHeader->uiDisableDeblockingFilterIdc			= pCurLayer->iLoopFilterDisableIdc;
-  pCurSliceHeader->iSliceAlphaC0Offset					=
-    pCurLayer->iLoopFilterAlphaC0Offset;	//	need update iSliceAlphaC0Offset & iSliceBetaOffset for pSlice-header if loop_filter_idc != 1
-  pCurSliceHeader->iSliceBetaOffset						= pCurLayer->iLoopFilterBetaOffset;
+  pCurSliceHeader->uiDisableDeblockingFilterIdc = pCurLayer->iLoopFilterDisableIdc;
+  pCurSliceHeader->iSliceAlphaC0Offset =
+    pCurLayer->iLoopFilterAlphaC0Offset; // need update iSliceAlphaC0Offset & iSliceBetaOffset for pSlice-header if loop_filter_idc != 1
+  pCurSliceHeader->iSliceBetaOffset = pCurLayer->iLoopFilterBetaOffset;
   pCurSliceExt->uiDisableInterLayerDeblockingFilterIdc = pCurLayer->uiDisableInterLayerDeblockingFilterIdc;
 
   if (pSlice->bSliceHeaderExtFlag) {
@@ -127,13 +127,13 @@
     WelsSliceHeaderScalExtInit (pCurLayer, pSlice);
   } else {
     //both adaptive and default flags should equal to 0.
-    pCurSliceExt->bAdaptiveBaseModeFlag		=
-      pCurSliceExt->bAdaptiveMotionPredFlag		=
-        pCurSliceExt->bAdaptiveResidualPredFlag	= false;
+    pCurSliceExt->bAdaptiveBaseModeFlag =
+      pCurSliceExt->bAdaptiveMotionPredFlag =
+        pCurSliceExt->bAdaptiveResidualPredFlag = false;
 
-    pCurSliceExt->bDefaultBaseModeFlag		=
-      pCurSliceExt->bDefaultMotionPredFlag		=
-        pCurSliceExt->bDefaultResidualPredFlag	= false;
+    pCurSliceExt->bDefaultBaseModeFlag =
+      pCurSliceExt->bDefaultMotionPredFlag =
+        pCurSliceExt->bDefaultResidualPredFlag  = false;
   }
 }
 
@@ -204,7 +204,7 @@
 * \brief    write reference picture marking syntax in pSlice header
 */
 void WriteRefPicMarking (SBitStringAux* pBs, SSliceHeader* pSliceHeader, SNalUnitHeaderExt* pNalHdrExt) {
-  SRefPicMarking* sRefMarking	= &pSliceHeader->sRefMarking;
+  SRefPicMarking* sRefMarking = &pSliceHeader->sRefMarking;
   int16_t n = 0;
 
   if (pNalHdrExt->bIdrFlag) {
@@ -503,7 +503,7 @@
   }
   for (; ;) {
     pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, 0);
-    iCurMbIdx	= iNextMbIdx;
+    iCurMbIdx = iNextMbIdx;
     pCurMb = &pMbList[ iCurMbIdx ];
 
     pEncCtx->pFuncList->pfRc.pfWelsRcMbInit (pEncCtx, pCurMb, pSlice);
@@ -567,7 +567,7 @@
     WelsInitSliceCabac (pEncCtx, pSlice);
   }
   for (; ;) {
-    iCurMbIdx	= iNextMbIdx;
+    iCurMbIdx = iNextMbIdx;
     pCurMb = &pMbList[ iCurMbIdx ];
 
     pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, 0);
@@ -618,7 +618,7 @@
     iNextMbIdx = WelsGetNextMbOfSlice (pSliceCtx, iCurMbIdx);
     //whether all of MB in current pSlice encoded or not
     if (iNextMbIdx == -1 || iNextMbIdx >= kiTotalNumMb || iNumMbCoded >= kiTotalNumMb) {
-      pSliceCtx->pCountMbNumInSlice[kiSliceIdx]	= iCurMbIdx - pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId];
+      pSliceCtx->pCountMbNumInSlice[kiSliceIdx] = iCurMbIdx - pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId];
       pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId] =
         iCurMbIdx;	// update pLastCodedMbIdxOfPartition, finish coding, use iCurMbIdx directly
       break;
@@ -662,9 +662,9 @@
 
 int32_t WelsCodePSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice) {
   //pSlice-level init should be outside and before this function
-  SDqLayer* pCurLayer			= pEncCtx->pCurDqLayer;
+  SDqLayer* pCurLayer = pEncCtx->pCurDqLayer;
 
-  const bool kbBaseAvail		= pCurLayer->bBaseLayerAvailableFlag;
+  const bool kbBaseAvail = pCurLayer->bBaseLayerAvailableFlag;
   const bool kbHighestSpatial = pEncCtx->pSvcParam->iSpatialLayerNum ==
                                 (pCurLayer->sLayerInfo.sNalHeaderExt.uiDependencyId + 1);
 
@@ -671,10 +671,10 @@
   //MD switch
   if (kbBaseAvail && kbHighestSpatial) {
     //initial pMd pointer
-    pEncCtx->pFuncList->pfInterMd			= WelsMdInterMbEnhancelayer;
+    pEncCtx->pFuncList->pfInterMd = WelsMdInterMbEnhancelayer;
   } else {
     //initial pMd pointer
-    pEncCtx->pFuncList->pfInterMd            = WelsMdInterMb;
+    pEncCtx->pFuncList->pfInterMd = WelsMdInterMb;
   }
   return WelsPSliceMdEnc (pEncCtx, pSlice, kbHighestSpatial);
 }
@@ -681,9 +681,9 @@
 
 int32_t WelsCodePOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice) {
   //pSlice-level init should be outside and before this function
-  SDqLayer* pCurLayer			= pEncCtx->pCurDqLayer;
+  SDqLayer* pCurLayer = pEncCtx->pCurDqLayer;
 
-  const bool kbBaseAvail		= pCurLayer->bBaseLayerAvailableFlag;
+  const bool kbBaseAvail = pCurLayer->bBaseLayerAvailableFlag;
   const bool kbHighestSpatial = pEncCtx->pSvcParam->iSpatialLayerNum ==
                                 (pCurLayer->sLayerInfo.sNalHeaderExt.uiDependencyId + 1);
 
@@ -690,10 +690,10 @@
   //MD switch
   if (kbBaseAvail && kbHighestSpatial) {
     //initial pMd pointer
-    pEncCtx->pFuncList->pfInterMd			= WelsMdInterMbEnhancelayer;
+    pEncCtx->pFuncList->pfInterMd = WelsMdInterMbEnhancelayer;
   } else {
     //initial pMd pointer
-    pEncCtx->pFuncList->pfInterMd            = WelsMdInterMb;
+    pEncCtx->pFuncList->pfInterMd = WelsMdInterMb;
   }
   return WelsPSliceMdEncDynamic (pEncCtx, pSlice, kbHighestSpatial);
 }
@@ -781,9 +781,9 @@
     bool     bLeftTop;
     bool     bRightTop;
     int32_t   iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;
-    const uint16_t  kuiSliceIdc		= WelsMbToSliceIdc (pSliceCtx, kiMbXY);
+    const uint16_t kuiSliceIdc = WelsMbToSliceIdc (pSliceCtx, kiMbXY);
 
-    pMb->uiSliceIdc	= kuiSliceIdc;
+    pMb->uiSliceIdc = kuiSliceIdc;
     iLeftXY = kiMbXY - 1;
     iTopXY = kiMbXY - kiMbWidth;
     iLeftTopXY = iTopXY - 1;
@@ -806,7 +806,7 @@
     if (bRightTop) {
       uiNeighborAvailFlag |= TOPRIGHT_MB_POS;
     }
-    pMb->uiNeighborAvail	= (uint8_t)uiNeighborAvailFlag;
+    pMb->uiNeighborAvail = (uint8_t)uiNeighborAvailFlag;
 
     ++ pMb;
     ++ iIdx;
@@ -824,10 +824,10 @@
   uint16_t      iNextSliceIdc   = iCurSliceIdc + kiSliceIdxStep;
   SSlice*       pNextSlice      = NULL;
 
-  SMB* pMbList					= pCurLayer->sMbDataP;
+  SMB* pMbList = pCurLayer->sMbDataP;
 
   //update cur pSlice info
-  pCurSlice->sSliceHeaderExt.uiNumMbsInSlice	= 1 + iCurMbIdx - pCurSlice->sSliceHeaderExt.sSliceHeader.iFirstMbInSlice;
+  pCurSlice->sSliceHeaderExt.uiNumMbsInSlice = 1 + iCurMbIdx - pCurSlice->sSliceHeaderExt.sSliceHeader.iFirstMbInSlice;
 
   //pNextSlice pointer/initialization
   pNextSlice = & (pCurLayer->sLayerInfo.pSliceInLayer[ iNextSliceIdc ]);
@@ -860,7 +860,7 @@
   int32_t iPosBitOffset = 0;
   const int32_t  kiActiveThreadsNum = pEncCtx->iActiveThreadsNum;
   const int32_t  kiPartitaionId = pCurSlice->uiSliceIdx % kiActiveThreadsNum;
-  const int32_t  kiLastMbIdxInPartition	= pEncCtx->pCurDqLayer->pLastMbIdxOfPartition[kiPartitaionId];
+  const int32_t  kiLastMbIdxInPartition = pEncCtx->pCurDqLayer->pLastMbIdxOfPartition[kiPartitaionId];
 
   const bool    kbCurMbNotFirstMbOfCurSlice      = (pSliceCtx->pOverallMbMap[iCurMbIdx] ==
       pSliceCtx->pOverallMbMap[iCurMbIdx - 1]);
@@ -963,7 +963,7 @@
   for (;;) {
     pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, pSlice->iMbSkipRun);
     //point to current pMb
-    iCurMbIdx	= iNextMbIdx;
+    iCurMbIdx = iNextMbIdx;
     pCurMb = &pMbList[ iCurMbIdx ];
 
 
@@ -1060,7 +1060,7 @@
     pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, pSlice->iMbSkipRun);
 
     //point to current pMb
-    iCurMbIdx	= iNextMbIdx;
+    iCurMbIdx = iNextMbIdx;
     pCurMb = &pMbList[ iCurMbIdx ];
 
     //step(1): set QP for the current MB
--- a/codec/encoder/core/src/svc_mode_decision.cpp
+++ b/codec/encoder/core/src/svc_mode_decision.cpp
@@ -120,7 +120,7 @@
 
 // do initiation for noILP (needed by ILFMD)
 SMB* GetRefMb (SDqLayer* pCurLayer, SMB* pCurMb) {
-  const SDqLayer*  kpRefLayer		= pCurLayer->pRefLayer;
+  const SDqLayer*  kpRefLayer = pCurLayer->pRefLayer;
   const int32_t  kiRefMbIdx = (pCurMb->iMbY >> 1) * kpRefLayer->iMbWidth + (pCurMb->iMbX >>
                               1); //because current lower layer is half size on both vertical and horizontal
   return (&kpRefLayer->sMbDataP[kiRefMbIdx]);
@@ -244,7 +244,7 @@
     //TODO: consider reusing this result of ChromaCheck when SCDSkip needs this as well
 
     if (CheckChromaCost (pEncCtx, pWelsMd, pMbCache, pCurMb->iMbXY)) {
-      SMVUnitXY	sVaaPredSkipMv = { 0 };
+      SMVUnitXY sVaaPredSkipMv = { 0 };
       PredSkipMv (pMbCache, &sVaaPredSkipMv);
       WelsMdBackgroundMbEnc (pEncCtx, pWelsMd, pCurMb, pMbCache, pSlice, (LD32 (&sVaaPredSkipMv) == 0));
       return true;
@@ -320,7 +320,7 @@
 
 
 bool JudgeStaticSkip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache, SWelsMD* pWelsMd) {
-  SDqLayer* pCurDqLayer			= pEncCtx->pCurDqLayer;
+  SDqLayer* pCurDqLayer = pEncCtx->pCurDqLayer;
   const int32_t kiMbX = pCurMb->iMbX;
   const int32_t kiMbY = pCurMb->iMbY;
 
@@ -347,7 +347,7 @@
 }
 
 bool JudgeScrollSkip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache, SWelsMD* pWelsMd) {
-  SDqLayer* pCurDqLayer			= pEncCtx->pCurDqLayer;
+  SDqLayer* pCurDqLayer = pEncCtx->pCurDqLayer;
   const int32_t kiMbX = pCurMb->iMbX;
   const int32_t kiMbY = pCurMb->iMbY;
   const int32_t kiMbWidth = pCurDqLayer->iMbWidth;
@@ -516,7 +516,7 @@
 // Scene Change Detection (SCD) PSkip Decision for screen content
 ////////////////////////
 bool WelsMdInterJudgeSCDPskip (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* slice, SMB* pCurMb, SMbCache* pMbCache) {
-  SDqLayer* pCurDqLayer			= pEncCtx->pCurDqLayer;
+  SDqLayer* pCurDqLayer = pEncCtx->pCurDqLayer;
 
   SetBlockStaticIdcToMd (pEncCtx->pVaa, pWelsMd, pCurMb, pCurDqLayer);
 
@@ -634,7 +634,7 @@
 // SetScrollingMvToMd
 //
 void SetScrollingMvToMd (SVAAFrameInfo* pVaa, SWelsMD* pWelsMd) {
-  SVAAFrameInfoExt* pVaaExt		= static_cast<SVAAFrameInfoExt*> (pVaa);
+  SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (pVaa);
 
   SMVUnitXY          sTempMv;
   sTempMv.iMvX = pVaaExt->sScrollDetectInfo.iScrollMvX;
--- a/codec/encoder/core/src/svc_set_mb_syn_cabac.cpp
+++ b/codec/encoder/core/src/svc_set_mb_syn_cabac.cpp
@@ -372,7 +372,7 @@
 int16_t WelsGetMbCtxCabac (SMbCache* pMbCache, SMB* pCurMb, uint32_t iMbWidth, ECtxBlockCat eCtxBlockCat,
                            int16_t iIdx) {
   int16_t iNzA = -1, iNzB = -1;
-  int8_t* pNonZeroCoeffCount	= pMbCache->iNonZeroCoeffCount;
+  int8_t* pNonZeroCoeffCount = pMbCache->iNonZeroCoeffCount;
   int32_t bIntra = IS_INTRA (pCurMb->uiMbType);
   int32_t iCtxInc = 0;
   switch (eCtxBlockCat) {
@@ -479,11 +479,11 @@
                                   int16_t iMbWidth, uint32_t uiChromaQpIndexOffset) {
 
   const uint16_t uiMbType = pCurMb->uiMbType;
-  SMbCache* pMbCache	= &pSlice->sMbCacheInfo;
+  SMbCache* pMbCache = &pSlice->sMbCacheInfo;
   int16_t i = 0;
-  int8_t* pNonZeroCoeffCount	= pMbCache->iNonZeroCoeffCount;
+  int8_t* pNonZeroCoeffCount = pMbCache->iNonZeroCoeffCount;
   SSliceHeaderExt* pSliceHeadExt = &pSlice->sSliceHeaderExt;
-  const int32_t iSliceFirstMbXY	= pSliceHeadExt->sSliceHeader.iFirstMbInSlice;
+  const int32_t iSliceFirstMbXY = pSliceHeadExt->sSliceHeader.iFirstMbInSlice;
 
 
   pCurMb->iCbpDc = 0;
@@ -560,7 +560,7 @@
     }
   } else {
     pCurMb->iLumaDQp = 0;
-    pCurMb->uiLumaQp	= pSlice->uiLastMbQp;
+    pCurMb->uiLumaQp = pSlice->uiLastMbQp;
     pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + uiChromaQpIndexOffset)];
   }
   return 0;
@@ -578,11 +578,11 @@
 
 int32_t WelsSpatialWriteMbSynCabac (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurMb) {
   SCabacCtx* pCabacCtx = &pSlice->sCabacCtx;
-  SMbCache* pMbCache	= &pSlice->sMbCacheInfo;
+  SMbCache* pMbCache = &pSlice->sMbCacheInfo;
   const uint16_t uiMbType = pCurMb->uiMbType;
   SSliceHeaderExt* pSliceHeadExt = &pSlice->sSliceHeaderExt;
   uint32_t uiNumRefIdxL0Active = pSliceHeadExt->sSliceHeader.uiNumRefIdxL0Active - 1;
-  const int32_t iSliceFirstMbXY	= pSliceHeadExt->sSliceHeader.iFirstMbInSlice;
+  const int32_t iSliceFirstMbXY = pSliceHeadExt->sSliceHeader.iFirstMbInSlice;
   int16_t i = 0;
   int16_t iMbWidth = pEncCtx->pCurDqLayer->iMbWidth;
   uint32_t uiChromaQpIndexOffset = pEncCtx->pCurDqLayer->sLayerInfo.pPpsP->uiChromaQpIndexOffset;
@@ -592,7 +592,7 @@
     WelsCabacEncodeTerminate (&pSlice->sCabacCtx, 0);
 
   if (IS_SKIP (pCurMb->uiMbType)) {
-    pCurMb->uiLumaQp	= pSlice->uiLastMbQp;
+    pCurMb->uiLumaQp = pSlice->uiLastMbQp;
     pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + uiChromaQpIndexOffset)];
     WelsMbSkipCabac (&pSlice->sCabacCtx, pCurMb, iMbWidth, pEncCtx->eSliceType, 1);
 
--- a/codec/encoder/core/src/svc_set_mb_syn_cavlc.cpp
+++ b/codec/encoder/core/src/svc_set_mb_syn_cavlc.cpp
@@ -226,7 +226,7 @@
   const uint8_t kuiChromaQpIndexOffset = pEncCtx->pCurDqLayer->sLayerInfo.pPpsP->uiChromaQpIndexOffset;
 
   if (IS_SKIP (pCurMb->uiMbType)) {
-    pCurMb->uiLumaQp	= pSlice->uiLastMbQp;
+    pCurMb->uiLumaQp = pSlice->uiLastMbQp;
     pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + kuiChromaQpIndexOffset)];
 
     pSlice->iMbSkipRun++;
--- a/codec/encoder/core/src/wels_preprocess.cpp
+++ b/codec/encoder/core/src/wels_preprocess.cpp
@@ -155,7 +155,7 @@
 }
 
 void CWelsPreProcess::FreeSpatialPictures (sWelsEncCtx* pCtx) {
-  CMemoryAlign* pMa	= pCtx->pMemAlign;
+  CMemoryAlign* pMa = pCtx->pMemAlign;
   int32_t j = 0;
   while (j < pCtx->pSvcParam->iSpatialLayerNum) {
     uint8_t i = 0;
@@ -221,7 +221,7 @@
   bool bCalculateVar = (pSvcParam->iRCMode >= RC_BITRATE_MODE && pCtx->eSliceType == I_SLICE);
 
   if (pSvcParam->iUsageType == SCREEN_CONTENT_REAL_TIME) {
-    SVAAFrameInfoExt* pVaaExt			= static_cast<SVAAFrameInfoExt*> (m_pEncCtx->pVaa);
+    SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (m_pEncCtx->pVaa);
     SRefInfoParam* BestRefCandidateParam = (pCtx->bCurFrameMarkedAsSceneLtr) ? (& (pVaaExt->sVaaLtrBestRefCandidate[0])) :
                                            (& (pVaaExt->sVaaStrBestRefCandidate[0]));
     SPicture* pRefPic = m_pSpatialPic[0][BestRefCandidateParam->iSrcListIdx];
@@ -328,7 +328,7 @@
   pDstPic = pSrcPic;
   if (pScaledPicture->pScaledInputPicture) {
     // for highest downsampling
-    pDstPic		= m_pSpatialPic[iDependencyId][iPicturePos];
+    pDstPic = m_pSpatialPic[iDependencyId][iPicturePos];
     iShrinkWidth = pScaledPicture->iScaledWidth[iDependencyId];
     iShrinkHeight = pScaledPicture->iScaledHeight[iDependencyId];
   }
@@ -363,7 +363,7 @@
     -- iActualSpatialLayerNum;
   }
 
-  m_pLastSpatialPicture[iDependencyId][1]	= m_pSpatialPic[iDependencyId][iPicturePos];
+  m_pLastSpatialPicture[iDependencyId][1] = m_pSpatialPic[iDependencyId][iPicturePos];
   -- iDependencyId;
 
   // generate other spacial layer
@@ -384,7 +384,7 @@
       if ((iTemporalId != INVALID_TEMPORAL_ID)) {
         // down sampling performed
 
-        pDstPic	= m_pSpatialPic[iDependencyId][iPicturePos];	// small
+        pDstPic = m_pSpatialPic[iDependencyId][iPicturePos]; // small
         iShrinkWidth = pScaledPicture->iScaledWidth[iDependencyId];
         iShrinkHeight = pScaledPicture->iScaledHeight[iDependencyId];
         DownsamplePadding (pSrcPic, pDstPic, iSrcWidth, iSrcHeight, iShrinkWidth, iShrinkHeight, iTargetWidth, iTargetHeight, true);
@@ -394,7 +394,7 @@
         -- iActualSpatialLayerNum;
         ++ iSpatialNum;
 
-        m_pLastSpatialPicture[iDependencyId][1]	= m_pSpatialPic[iDependencyId][iPicturePos];
+        m_pLastSpatialPicture[iDependencyId][1] = m_pSpatialPic[iDependencyId][iPicturePos];
       }
       -- iDependencyId;
     }
@@ -464,7 +464,7 @@
   int32_t iDlayerIndex          = 0;
   if (pParam->iUsageType == SCREEN_CONTENT_REAL_TIME) {
     for (; iDlayerIndex < MAX_DEPENDENCY_LAYER; iDlayerIndex++) {
-      m_pLastSpatialPicture[iDlayerIndex][0]	= m_pLastSpatialPicture[iDlayerIndex][1] = NULL;
+      m_pLastSpatialPicture[iDlayerIndex][0] = m_pLastSpatialPicture[iDlayerIndex][1] = NULL;
     }
   } else {
     for (; iDlayerIndex < kiDlayerCount; iDlayerIndex++) {
@@ -745,8 +745,8 @@
   int32_t iComplexityAnalysisMode = 0;
 
   if (pSvcParam->iUsageType == SCREEN_CONTENT_REAL_TIME) {
-    SVAAFrameInfoExt* pVaaExt		= static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
-    SComplexityAnalysisScreenParam* sComplexityAnalysisParam	= &pVaaExt->sComplexityScreenParam;
+    SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
+    SComplexityAnalysisScreenParam* sComplexityAnalysisParam = &pVaaExt->sComplexityScreenParam;
     SWelsSvcRc* pWelsSvcRc = &pCtx->pWelsSvcRc[kiDependencyId];
 
     if (pCtx->eSliceType == P_SLICE)
@@ -797,7 +797,7 @@
       m_pInterfaceVp->Get (iMethodIdx, (void*)sComplexityAnalysisParam);
 
   } else {
-    SVAAFrameInfo* pVaaInfo	 = pCtx->pVaa;
+    SVAAFrameInfo* pVaaInfo = pCtx->pVaa;
     SComplexityAnalysisParam* sComplexityAnalysisParam = & (pVaaInfo->sComplexityAnalysisParam);
     SWelsSvcRc* SWelsSvcRc = &pCtx->pWelsSvcRc[kiDependencyId];
 
@@ -990,7 +990,7 @@
 ESceneChangeIdc CWelsPreProcess::DetectSceneChangeScreen (sWelsEncCtx* pCtx, SPicture* pCurPicture) {
 #define STATIC_SCENE_MOTION_RATIO 0.01f
   SWelsSvcCodingParam* pSvcParam = pCtx->pSvcParam;
-  SVAAFrameInfoExt* pVaaExt			= static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
+  SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
   if (NULL == pCtx || NULL == pVaaExt || NULL == pCurPicture) {
     return LARGE_CHANGED_SCENE;
   }
@@ -1140,7 +1140,7 @@
 
 int32_t CWelsPreProcess::GetRefFrameInfo (int32_t iRefIdx, bool bCurrentFrameIsSceneLtr, SPicture*& pRefOri) {
   const int32_t iTargetDid = m_pEncCtx->pSvcParam->iSpatialLayerNum - 1;
-  SVAAFrameInfoExt* pVaaExt			= static_cast<SVAAFrameInfoExt*> (m_pEncCtx->pVaa);
+  SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (m_pEncCtx->pVaa);
   SRefInfoParam* pBestRefCandidateParam = (bCurrentFrameIsSceneLtr) ? (& (pVaaExt->sVaaLtrBestRefCandidate[iRefIdx])) :
                                           (& (pVaaExt->sVaaStrBestRefCandidate[iRefIdx]));
   pRefOri = m_pSpatialPic[iTargetDid][pBestRefCandidateParam->iSrcListIdx];
@@ -1201,7 +1201,7 @@
 * \return   none
 */
 void CWelsPreProcess::WelsExchangeSpatialPictures (SPicture** ppPic1, SPicture** ppPic2) {
-  SPicture* tmp	= *ppPic1;
+  SPicture* tmp = *ppPic1;
 
   assert (*ppPic1 != *ppPic2);
 
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -163,7 +163,7 @@
 
 void CWelsH264SVCEncoder::InitEncoder (void) {
 
-  m_pWelsTrace	= new welsCodecTrace();
+  m_pWelsTrace = new welsCodecTrace();
   if (m_pWelsTrace == NULL) {
     return;
   }
@@ -257,7 +257,7 @@
     return cmInitParaError;
   }
   if (pCfg->iTemporalLayerNum < 1)
-    pCfg->iTemporalLayerNum	= 1;
+    pCfg->iTemporalLayerNum = 1;
   if (pCfg->iTemporalLayerNum > MAX_TEMPORAL_LEVEL) {
     WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR,
              "CWelsH264SVCEncoder::Initialize(), invalid iTemporalLayerNum= %d, valid at range of [1, %d].",
@@ -312,9 +312,9 @@
   } else {
     pCfg->iLTRRefNum = pCfg->bEnableLongTermReference ? LONG_TERM_REF_NUM : 0;
     if (pCfg->iNumRefFrame == AUTO_REF_PIC_COUNT) {
-      pCfg->iNumRefFrame		= ((pCfg->uiGopSize >> 1) > 1) ? ((pCfg->uiGopSize >> 1) + pCfg->iLTRRefNum) :
+      pCfg->iNumRefFrame = ((pCfg->uiGopSize >> 1) > 1) ? ((pCfg->uiGopSize >> 1) + pCfg->iLTRRefNum) :
                               (MIN_REF_PIC_COUNT + pCfg->iLTRRefNum);
-      pCfg->iNumRefFrame		= WELS_CLIP3 (pCfg->iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM_CAMERA);
+      pCfg->iNumRefFrame = WELS_CLIP3 (pCfg->iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM_CAMERA);
     }
   }
 
@@ -360,7 +360,7 @@
 
   if (NULL != m_pEncContext) {
     WelsUninitEncoderExt (&m_pEncContext);
-    m_pEncContext	= NULL;
+    m_pEncContext = NULL;
   }
 
   m_bInitialFlag = false;
@@ -671,8 +671,8 @@
              "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_DATAFORMAT, m_iCspInternal= 0x%x", m_iCspInternal);
   }
   break;
-  case ENCODER_OPTION_IDR_INTERVAL: {	// IDR Interval
-    int32_t iValue	= * ((int32_t*)pOption);
+  case ENCODER_OPTION_IDR_INTERVAL: { // IDR Interval
+    int32_t iValue = * ((int32_t*)pOption);
     WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
              "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_IDR_INTERVAL iValue= %d", iValue);
     if (iValue < -1 || iValue == 0)
@@ -680,7 +680,7 @@
     if (iValue == (int32_t)m_pEncContext->pSvcParam->uiIntraPeriod) {
       return cmResultSuccess;
     }
-    m_pEncContext->pSvcParam->uiIntraPeriod	= (uint32_t)iValue;
+    m_pEncContext->pSvcParam->uiIntraPeriod = (uint32_t)iValue;
   }
   break;
   case ENCODER_OPTION_SVC_ENCODE_PARAM_BASE: { // SVC Encoding Parameter
@@ -769,8 +769,8 @@
     }
   }
   break;
-  case ENCODER_OPTION_FRAME_RATE: {	// Maximal input frame rate
-    float iValue	= * ((float*)pOption);
+  case ENCODER_OPTION_FRAME_RATE: { // Maximal input frame rate
+    float iValue = * ((float*)pOption);
     if (iValue <= 0) {
       return cmInitParaError;
     }
@@ -791,7 +791,7 @@
                iBitrate);
       return cmInitParaError;
     }
-    iBitrate	= WELS_CLIP3 (iBitrate, MIN_BIT_RATE, MAX_BIT_RATE);
+    iBitrate = WELS_CLIP3 (iBitrate, MIN_BIT_RATE, MAX_BIT_RATE);
     switch (pInfo->iLayer) {
     case SPATIAL_LAYER_ALL:
       m_pEncContext->pSvcParam->iTargetBitrate = iBitrate;
@@ -837,7 +837,7 @@
                iBitrate);
       return cmInitParaError;
     }
-    iBitrate	= WELS_CLIP3 (iBitrate, MIN_BIT_RATE, MAX_BIT_RATE);
+    iBitrate = WELS_CLIP3 (iBitrate, MIN_BIT_RATE, MAX_BIT_RATE);
     switch (pInfo->iLayer) {
     case SPATIAL_LAYER_ALL:
       m_pEncContext->pSvcParam->iMaxBitrate = iBitrate;
@@ -875,7 +875,7 @@
   break;
   case ENCODER_OPTION_RC_MODE: {	// 0:quality mode;1:bit-rate mode;2:bitrate limited mode
     int32_t iValue = * ((int32_t*)pOption);
-    m_pEncContext->pSvcParam->iRCMode	= (RC_MODES) iValue;
+    m_pEncContext->pSvcParam->iRCMode = (RC_MODES) iValue;
     WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
              "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_RC_MODE iRCMode= %d ",
              iValue);
@@ -883,7 +883,7 @@
   break;
   case ENCODER_PADDING_PADDING: {	// 0:disable padding;1:padding
     int32_t iValue = * ((int32_t*)pOption);
-    m_pEncContext->pSvcParam->iPaddingFlag	= iValue;
+    m_pEncContext->pSvcParam->iPaddingFlag = iValue;
     WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
              "CWelsH264SVCEncoder::SetOption():ENCODER_PADDING_PADDING iPaddingFlag= %d ",
              iValue);
@@ -1114,7 +1114,7 @@
   case ENCODER_OPTION_DATAFORMAT: {	// Input color space
     WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
              "CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_DATAFORMAT, m_iCspInternal= 0x%x", m_iCspInternal);
-    * ((int32_t*)pOption)	= m_iCspInternal;
+    * ((int32_t*)pOption) = m_iCspInternal;
   }
   break;
   case ENCODER_OPTION_IDR_INTERVAL: {	// IDR Interval
@@ -1141,7 +1141,7 @@
     WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
              "CWelsH264SVCEncoder::GetOption():ENCODER_OPTION_FRAME_RATE, fMaxFrameRate = %.6ff",
              m_pEncContext->pSvcParam->fMaxFrameRate);
-    * ((float*)pOption)	= m_pEncContext->pSvcParam->fMaxFrameRate;
+    * ((float*)pOption) = m_pEncContext->pSvcParam->fMaxFrameRate;
   }
   break;
   case ENCODER_OPTION_BITRATE: {	// Target bit-rate
@@ -1196,7 +1196,7 @@
   }
   break;
   case ENCODER_OPTION_STATISTICS_LOG_INTERVAL: {
-    * ((int32_t*)pOption)	= m_pEncContext->iStatisticsLogInterval;
+    * ((int32_t*)pOption) = m_pEncContext->iStatisticsLogInterval;
   }
   break;
   case ENCODER_OPTION_COMPLEXITY: {
--- a/codec/processing/src/backgrounddetection/BackgroundDetection.cpp
+++ b/codec/processing/src/backgrounddetection/BackgroundDetection.cpp
@@ -278,7 +278,7 @@
 
       // chroma component check
       if (pBackgroundOU->iBackgroundFlag == 1) {
-        int8_t	iNeighbourForegroundFlags = !pOUNeighbours[0]->iBackgroundFlag | ((!pOUNeighbours[1]->iBackgroundFlag) << 1)
+        int8_t iNeighbourForegroundFlags = !pOUNeighbours[0]->iBackgroundFlag | ((!pOUNeighbours[1]->iBackgroundFlag) << 1)
                                             | ((!pOUNeighbours[2]->iBackgroundFlag) << 2) | ((!pOUNeighbours[3]->iBackgroundFlag) << 3);
         pBackgroundOU->iBackgroundFlag = !ForegroundDilation23Chroma (iNeighbourForegroundFlags, iChromaSampleStartPos,
                                          iPicStrideUV, pBgdParam);
@@ -291,9 +291,9 @@
 }
 inline void CBackgroundDetection::BackgroundErosion (SBackgroundOU* pBackgroundOU, SBackgroundOU* pOUNeighbours[]) {
   if (pBackgroundOU->iMaxDiffSubSd <= (BGD_OU_SIZE * Q_FACTOR)) { //BGD_OU_SIZE*BGD_OU_SIZE>>2
-    int32_t	iSumNeighBackgroundFlags = pOUNeighbours[0]->iBackgroundFlag + pOUNeighbours[1]->iBackgroundFlag +
+    int32_t iSumNeighBackgroundFlags = pOUNeighbours[0]->iBackgroundFlag + pOUNeighbours[1]->iBackgroundFlag +
                                        pOUNeighbours[2]->iBackgroundFlag + pOUNeighbours[3]->iBackgroundFlag;
-    int32_t	sumNbrBGsad = (pOUNeighbours[0]->iSAD & (-pOUNeighbours[0]->iBackgroundFlag)) + (pOUNeighbours[2]->iSAD &
+    int32_t sumNbrBGsad = (pOUNeighbours[0]->iSAD & (-pOUNeighbours[0]->iBackgroundFlag)) + (pOUNeighbours[2]->iSAD &
                           (-pOUNeighbours[2]->iBackgroundFlag))
                           + (pOUNeighbours[1]->iSAD & (-pOUNeighbours[1]->iBackgroundFlag)) + (pOUNeighbours[3]->iSAD &
                               (-pOUNeighbours[3]->iBackgroundFlag));
--- a/codec/processing/src/common/memory.cpp
+++ b/codec/processing/src/common/memory.cpp
@@ -105,7 +105,7 @@
 
   pLocalPointer = InternalReallocate (pPointer, kuiNewSize, pTag);
   if (NULL != pLocalPointer) {
-    *pRealSize	= kuiNewSize;
+    *pRealSize = kuiNewSize;
     return (pLocalPointer);
   } else {
     return NULL;
--- a/codec/processing/src/downsample/downsample.cpp
+++ b/codec/processing/src/downsample/downsample.cpp
@@ -139,14 +139,14 @@
 
 int32_t CDownsampling::GetAlignedIndex (const int32_t kiSrcWidth) {
   int32_t iAlignIndex;
-  if ((kiSrcWidth & 0x1f) == 0)	// x32
-    iAlignIndex	= 0;
-  else if ((kiSrcWidth & 0x0f) == 0)	// x16
-    iAlignIndex	= 1;
-  else if ((kiSrcWidth & 0x07) == 0)	// x8
-    iAlignIndex	= 2;
+  if ((kiSrcWidth & 0x1f) == 0)         // x32
+    iAlignIndex = 0;
+  else if ((kiSrcWidth & 0x0f) == 0)    // x16
+    iAlignIndex = 1;
+  else if ((kiSrcWidth & 0x07) == 0)    // x8
+    iAlignIndex = 2;
   else
-    iAlignIndex	= 3;
+    iAlignIndex = 3;
   return iAlignIndex;
 }
 
--- a/codec/processing/src/scenechangedetection/SceneChangeDetection.h
+++ b/codec/processing/src/scenechangedetection/SceneChangeDetection.h
@@ -104,7 +104,7 @@
     iCurRowStride  = sLocalParam.iCurStride << 3;
 
     for (int32_t j = 0; j < sLocalParam.iBlock8x8Height; j++) {
-      pRefTmp	= pRefY;
+      pRefTmp = pRefY;
       pCurTmp = pCurY;
       for (int32_t i = 0; i < sLocalParam.iBlock8x8Width; i++) {
         int32_t iSad = m_pfSad (pCurTmp, sLocalParam.iCurStride, pRefTmp, sLocalParam.iRefStride);
@@ -154,7 +154,7 @@
     iCurRowStride  = sLocalParam.iCurStride << 3;
 
     for (int32_t j = 0; j < sLocalParam.iBlock8x8Height; j++) {
-      pRefTmp	= pRefY;
+      pRefTmp = pRefY;
       pCurTmp = pCurY;
       for (int32_t i = 0; i < sLocalParam.iBlock8x8Width; i++) {
         int32_t iBlockPointX = i << 3;
@@ -216,7 +216,7 @@
     int32_t iBlock8x8Num = m_sLocalParam.iBlock8x8Width * m_sLocalParam.iBlock8x8Height;
     int32_t iSceneChangeThresholdLarge = WelsStaticCast (int32_t,
                                          m_cDetector.GetSceneChangeMotionRatioLarge() * iBlock8x8Num + 0.5f + PESN);
-    int32_t iSceneChangeThresholdMedium	= WelsStaticCast (int32_t,
+    int32_t iSceneChangeThresholdMedium = WelsStaticCast (int32_t,
                                           m_cDetector.GetSceneChangeMotionRatioMedium() * iBlock8x8Num + 0.5f + PESN);
 
     m_sSceneChangeParam.iMotionBlockNum = 0;
--- a/test/api/encode_decode_api_test.cpp
+++ b/test/api/encode_decode_api_test.cpp
@@ -575,7 +575,7 @@
 
   unsigned int uiMbHeight         = 0;
 
-  uiMbHeight	 = (param_.iPicHeight + 15) >> 4;
+  uiMbHeight = (param_.iPicHeight + 15) >> 4;
 
   //change slice mode to SM_SINGLE_SLICE
   if (uiMbHeight >  MAX_SLICES_NUM) {
--- a/test/decoder/DecUT_IntraPrediction.cpp
+++ b/test/decoder/DecUT_IntraPrediction.cpp
@@ -488,12 +488,11 @@
 }
 
 void WelsIChromaPredDcTop_ref (uint8_t* pPred, const int32_t kiStride) {
-  int32_t iTmp			= (kiStride << 3) - kiStride;
+  int32_t iTmp = (kiStride << 3) - kiStride;
   /*caculate the kMean value*/
-  const uint8_t kuiM1	    = (pPred[-kiStride] + pPred[1 - kiStride] + pPred[2 - kiStride] + pPred[3 - kiStride] + 2) >> 2;
-  const uint8_t kuiM2	    = (pPred[4 - kiStride] + pPred[5 - kiStride] + pPred[6 - kiStride] + pPred[7 - kiStride] + 2) >>
-                            2;
-  const uint8_t kuiM[8]	= {kuiM1, kuiM1, kuiM1, kuiM1, kuiM2, kuiM2, kuiM2, kuiM2};
+  const uint8_t kuiM1 = (pPred[-kiStride] + pPred[1 - kiStride] + pPred[2 - kiStride] + pPred[3 - kiStride] + 2) >> 2;
+  const uint8_t kuiM2 = (pPred[4 - kiStride] + pPred[5 - kiStride] + pPred[6 - kiStride] + pPred[7 - kiStride] + 2) >> 2;
+  const uint8_t kuiM[8] = {kuiM1, kuiM1, kuiM1, kuiM1, kuiM2, kuiM2, kuiM2, kuiM2};
 
   uint8_t i = 7;
 
--- a/test/decoder/DecUT_ParseSyntax.cpp
+++ b/test/decoder/DecUT_ParseSyntax.cpp
@@ -94,7 +94,7 @@
   WelsEndDecoder (pCtx);
   if (NULL != pCtx) {
     free (pCtx);
-    pCtx	= NULL;
+    pCtx = NULL;
   }
 
 }
@@ -160,7 +160,7 @@
   //
   m_pCtx = (PWelsDecoderContext)malloc (sizeof (SWelsDecoderContext));
 
-  m_pWelsTrace	= new welsCodecTrace();
+  m_pWelsTrace = new welsCodecTrace();
   if (m_pWelsTrace != NULL) {
     m_pWelsTrace->SetTraceLevel (WELS_LOG_ERROR);
   }
--- a/test/encoder/EncUT_MotionEstimate.cpp
+++ b/test/encoder/EncUT_MotionEstimate.cpp
@@ -41,7 +41,7 @@
     m_iWidth = 64;//size of search window
     m_iHeight = 64;//size of search window
     m_iMaxSearchBlock = 16;
-    m_uiMvdTableSize	= (1 + (648 << 1));
+    m_uiMvdTableSize = (1 + (648 << 1));
 
     pMa = new CMemoryAlign (0);
     m_pRefData = static_cast<uint8_t*>
@@ -405,7 +405,7 @@
     m_iWidth = 64;//size of search window
     m_iHeight = 64;//size of search window
     m_iMaxSearchBlock = 8;
-    m_uiMvdTableSize	= (1 + (648 << 1));
+    m_uiMvdTableSize = (1 + (648 << 1));
 
     m_pMa = new CMemoryAlign (16);
     ASSERT_TRUE (NULL != m_pMa);
--- a/test/encoder/EncUT_ParameterSetStrategy.cpp
+++ b/test/encoder/EncUT_ParameterSetStrategy.cpp
@@ -16,9 +16,9 @@
     m_pSubsetArray = NULL;
 
     pMa = new CMemoryAlign (0);
-    m_pSpsArray	= (SWelsSPS*)pMa->WelsMalloc (MAX_SPS_COUNT * sizeof (SWelsSPS), "m_pSpsArray");
+    m_pSpsArray = (SWelsSPS*)pMa->WelsMalloc (MAX_SPS_COUNT * sizeof (SWelsSPS), "m_pSpsArray");
     ASSERT_TRUE (NULL != m_pSpsArray);
-    m_pSubsetArray	= (SSubsetSps*)pMa->WelsMalloc (MAX_SPS_COUNT * sizeof (SSubsetSps), "m_pSubsetArray");
+    m_pSubsetArray = (SSubsetSps*)pMa->WelsMalloc (MAX_SPS_COUNT * sizeof (SSubsetSps), "m_pSubsetArray");
     ASSERT_TRUE (NULL != m_pSubsetArray);
 
     m_pSpsArrayPointer = &m_pSpsArray[0];
@@ -70,7 +70,7 @@
   int iCurSpsInUse = 1;
   m_pSpsArrayPointer = &m_pSpsArray[iCurSpsId];
 
-  pDlayerParam	= & (sParam1.sSpatialLayers[iDlayerIndex]);
+  pDlayerParam = & (sParam1.sSpatialLayers[iDlayerIndex]);
   iRet = WelsInitSps (m_pSpsArrayPointer, pDlayerParam, &sParam1.sDependencyLayers[iDlayerIndex], sParam1.uiIntraPeriod,
                       sParam1.iMaxNumRefFrame,
                       iCurSpsId, sParam1.bEnableFrameCroppingFlag, sParam1.iRCMode != RC_OFF_MODE, iDlayerCount, false);
@@ -90,7 +90,7 @@
   // add new sps
   iCurSpsId = 1;
   m_pSpsArrayPointer = &m_pSpsArray[iCurSpsId];
-  pDlayerParam	= & (sParam2.sSpatialLayers[iDlayerIndex]);
+  pDlayerParam = & (sParam2.sSpatialLayers[iDlayerIndex]);
   iRet = WelsInitSps (m_pSpsArrayPointer, pDlayerParam, &sParam2.sDependencyLayers[iDlayerIndex], sParam2.uiIntraPeriod,
                       sParam2.iMaxNumRefFrame,
                       iCurSpsId, sParam2.bEnableFrameCroppingFlag, sParam2.iRCMode != RC_OFF_MODE, iDlayerCount, false);
--- a/test/encoder/EncUT_Sample.cpp
+++ b/test/encoder/EncUT_Sample.cpp
@@ -42,7 +42,7 @@
   const int32_t iLineSizeEnc = 32; \
   int32_t tmpa, tmpb; \
   int32_t iBestMode_c, iBestMode_a, iLambda = 50; \
-  int32_t lambda[2]						= {iLambda << 2, iLambda}; \
+  int32_t lambda[2] = {iLambda << 2, iLambda}; \
   int32_t iPredMode = rand() % 3; \
   if (ASM) {\
     int32_t iCpuCores = 0; \