ref: 43767cddb6c56c42c651d4b7934f47c8c574ad04
parent: e1840a0ed6e5d093343ec67df0cb286b77c4b1d7
author: Martin Storsjö <martin@martin.st>
date: Wed Jun 3 05:53:26 EDT 2015
Remove tabs from commented out code
--- a/codec/common/inc/ls_defines.h
+++ b/codec/common/inc/ls_defines.h
@@ -62,7 +62,7 @@
STRUCTA (64, 4);
STRUCTA (64, 8);
//#define _USE_STRUCT_INT_CVT
-// #ifdef _USE_STRUCT_INT_CVT
+//#ifdef _USE_STRUCT_INT_CVT
#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
@@ -81,11 +81,11 @@
#define ST64A2(a, b) STA(a, b, 64, 2)
#define ST64A4(a, b) STA(a, b, 64, 4)
#define ST64A8(a, b) STA(a, b, 64, 8)
-// #else
-// inline void __ST16(void *dst, uint16_t v) { memcpy(dst, &v, 2); }
-// inline void __ST32(void *dst, uint32_t v) { memcpy(dst, &v, 4); }
+//#else
+//inline void __ST16(void *dst, uint16_t v) { memcpy(dst, &v, 2); }
+//inline void __ST32(void *dst, uint32_t v) { memcpy(dst, &v, 4); }
//inline void __ST64(void *dst, uint64_t v) { memcpy(dst, &v, 8); }
-// #endif
+//#endif
#else
--- a/codec/common/src/WelsThreadLib.cpp
+++ b/codec/common/src/WelsThreadLib.cpp
@@ -312,12 +312,12 @@
WELS_THREAD_ERROR_CODE WelsEventSignal (WELS_EVENT* event) {
WELS_THREAD_ERROR_CODE err = 0;
-// int32_t val = 0;
-// sem_getvalue(event, &val);
-// fprintf( stderr, "before signal it, val= %d..\n",val );
+// int32_t val = 0;
+// sem_getvalue(event, &val);
+// fprintf( stderr, "before signal it, val= %d..\n",val );
err = sem_post (*event);
-// sem_getvalue(event, &val);
-// fprintf( stderr, "after signal it, val= %d..\n",val );
+// sem_getvalue(event, &val);
+// fprintf( stderr, "after signal it, val= %d..\n",val );
return err;
}
@@ -429,7 +429,7 @@
if ((uiSignalFlag & kuiBitwiseFlag) != kuiBitwiseFlag) { // non-blocking mode
int32_t err = 0;
-// fprintf( stderr, "sem_wait(): start to wait event %d..\n", nIdx );
+// fprintf( stderr, "sem_wait(): start to wait event %d..\n", nIdx );
if (master_event == NULL) {
err = sem_wait (event_list[nIdx]);
} else {
@@ -445,11 +445,11 @@
}
}
}
-// fprintf( stderr, "sem_wait(): wait event %d result %d errno %d..\n", nIdx, err, errno );
+// fprintf( stderr, "sem_wait(): wait event %d result %d errno %d..\n", nIdx, err, errno );
if (WELS_THREAD_ERROR_OK == err) {
-// int32_t val = 0;
-// sem_getvalue(&event_list[nIdx], &val);
-// fprintf( stderr, "after sem_timedwait(), event_list[%d] semaphore value= %d..\n", nIdx, val);
+// int32_t val = 0;
+// sem_getvalue(&event_list[nIdx], &val);
+// fprintf( stderr, "after sem_timedwait(), event_list[%d] semaphore value= %d..\n", nIdx, val);
uiSignalFlag |= kuiBitwiseFlag;
++ uiCountSignals;
--- a/codec/common/src/mc.cpp
+++ b/codec/common/src/mc.cpp
@@ -965,7 +965,7 @@
{McHorVer20_neon, McHorVer21_neon, McHorVer22_neon, McHorVer23_neon},
{McHorVer30_neon, McHorVer31_neon, McHorVer32_neon, McHorVer33_neon},
};
- // pSrc += (iMvY >> 2) * iSrcStride + (iMvX >> 2);
+ // pSrc += (iMvY >> 2) * iSrcStride + (iMvX >> 2);
pWelsMcFunc[iMvX & 0x03][iMvY & 0x03] (pSrc, iSrcStride, pDst, iDstStride, iWidth, iHeight);
}
void McChroma_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
@@ -1248,7 +1248,7 @@
{McHorVer20_AArch64_neon, McHorVer21_AArch64_neon, McHorVer22_AArch64_neon, McHorVer23_AArch64_neon},
{McHorVer30_AArch64_neon, McHorVer31_AArch64_neon, McHorVer32_AArch64_neon, McHorVer33_AArch64_neon},
};
- // pSrc += (iMvY >> 2) * iSrcStride + (iMvX >> 2);
+ // pSrc += (iMvY >> 2) * iSrcStride + (iMvX >> 2);
pWelsMcFunc[iMvX & 0x03][iMvY & 0x03] (pSrc, iSrcStride, pDst, iDstStride, iWidth, iHeight);
}
void McChroma_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -152,7 +152,7 @@
} else if (strTag[0].compare ("ProfileIdc") == 0) {
pDLayer->uiProfileIdc = (EProfileIdc)atoi (strTag[1].c_str());
} else if (strTag[0].compare ("FRExt") == 0) {
- // pDLayer->frext_mode = (bool)atoi(strTag[1].c_str());
+// pDLayer->frext_mode = (bool)atoi(strTag[1].c_str());
} else if (strTag[0].compare ("SpatialBitrate") == 0) {
pDLayer->iSpatialBitrate = 1000 * atoi (strTag[1].c_str());
if (pSvcParam.iRCMode != RC_OFF_MODE) {
--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -1432,9 +1432,9 @@
// if (pCtx->sMb.pMotionPredFlag[i])
//{
- // WelsFree( pCtx->sMb.pMotionPredFlag[i], "pCtx->sMb.pMotionPredFlag[]" );
+ // WelsFree( pCtx->sMb.pMotionPredFlag[i], "pCtx->sMb.pMotionPredFlag[]" );
- // pCtx->sMb.pMotionPredFlag[i] = NULL;
+ // pCtx->sMb.pMotionPredFlag[i] = NULL;
//}
if (pCtx->sMb.pSubMbType[i]) {
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -686,7 +686,7 @@
do {
SSpatialLayerConfig* pDLayer = &pParam->sSpatialLayers[iDIndex];
-// pDLayer->ptr_cfg = pParam;
+// pDLayer->ptr_cfg = pParam;
int32_t iOrgNumNals = iCountNumNals;
//Note: Sep. 2010
--- a/codec/encoder/core/src/md.cpp
+++ b/codec/encoder/core/src/md.cpp
@@ -442,7 +442,7 @@
int32_t i = 0, j = 0, num = 0;
int32_t iSumAvg = 0, iSumSqr = 0;
-// analysis_vaa_info_intra_core_c( pDataY, iLineSize, pBlock );
+// analysis_vaa_info_intra_core_c( pDataY, iLineSize, pBlock );
for (; j < 16; j += 4) {
num = 0;
for (i = 0; i < 16; i += 4, num ++) {
--- a/codec/encoder/core/src/svc_base_layer_md.cpp
+++ b/codec/encoder/core/src/svc_base_layer_md.cpp
@@ -531,7 +531,7 @@
*pRemIntra4x4PredModeFlag = (iFinalMode < iPredMode ? iFinalMode : (iFinalMode - 1));
}
pRemIntra4x4PredModeFlag++;
- // pCurMb->pIntra4x4PredMode[g_kuiMbCountScan4Idx[i]] = iFinalMode;
+ // pCurMb->pIntra4x4PredMode[g_kuiMbCountScan4Idx[i]] = iFinalMode;
pMbCache->iIntraPredMode[kpCache48CountScan4[i]] = iFinalMode;
//step 6: encoding I_4x4
@@ -578,9 +578,9 @@
#endif//X86_ASM
for (i = 0; i < 16; i++) {
- const int32_t kiOffset = kpNeighborIntraToI4x4[i];
-// const int32_t i_next = (1+i) & 15; // next loop
-// const uint8_t dummy_byte= pIntra4x4AvailCount[pNeighborIntraToI4x4[i_next]]; // prefetch pIntra4x4AvailCount of next loop to avoid cache missed
+ const int32_t kiOffset = kpNeighborIntraToI4x4[i];
+// const int32_t i_next = (1+i) & 15; // next loop
+// const uint8_t dummy_byte= pIntra4x4AvailCount[pNeighborIntraToI4x4[i_next]]; // prefetch pIntra4x4AvailCount of next loop to avoid cache missed
//step 1: locating current 4x4 block position in pEnc and pDecMb
iCoordinateX = kpCoordinateIdxX[i];
@@ -851,7 +851,7 @@
*pRemIntra4x4PredModeFlag = (iFinalMode < iPredMode ? iFinalMode : (iFinalMode - 1));
}
pRemIntra4x4PredModeFlag++;
- // pCurMb->pIntra4x4PredMode[scan4[i]] = iFinalMode;
+ // pCurMb->pIntra4x4PredMode[scan4[i]] = iFinalMode;
pMbCache->iIntraPredMode[kpCache48CountScan4[i]] = iFinalMode;
//step 6: encoding I_4x4
WelsEncRecI4x4Y (pEncCtx, pCurMb, pMbCache, i);
@@ -908,8 +908,8 @@
assert (iCurMode >= 0 && iCurMode < 7);
- // pDstCb = &pMbCache->mem_pred_intra_cb[iCurMode<<6];
- // pDstCr = &pMbCache->mem_pred_intra_cr[iCurMode<<6];
+ // pDstCb = &pMbCache->mem_pred_intra_cb[iCurMode<<6];
+ // pDstCr = &pMbCache->mem_pred_intra_cr[iCurMode<<6];
pFunc->pfGetChromaPred[iCurMode] (pDstChma, pDecCb, kiLineSizeDec); //Cb
iCurCost = pFunc->sSampleDealingFuncs.pfMdCost[BLOCK_8x8] (pDstChma, 8, pEncCb, kiLineSizeEnc);
@@ -1112,7 +1112,7 @@
pFunc->pfMotionSearch[pWelsMd->iBlock8x8StaticIdc[i]] (pFunc, pCurDqLayer, sMe8x8, pSlice);
UpdateP8x8Motion2Cache (pMbCache, i << 2, pWelsMd->uiRef, & (sMe8x8->sMv));
iCostP8x8 += sMe8x8->uiSatdCost;
-// sMe8x8++;
+// sMe8x8++;
}
return iCostP8x8;
}
@@ -1119,10 +1119,10 @@
void WelsMdInterFinePartition (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb, int32_t iBestCost) {
SDqLayer* pCurDqLayer = pEncCtx->pCurDqLayer;
-// SMbCache *pMbCache = &pSlice->sMbCacheInfo;
+// SMbCache *pMbCache = &pSlice->sMbCacheInfo;
int32_t iCost = 0;
-// WelsLog( pEncCtx, WELS_LOG_INFO, "WelsMdP8x8, p_ref[0]= 0x%p", pMbCache->SPicData.pRefMb[0]);
+// WelsLog( pEncCtx, WELS_LOG_INFO, "WelsMdP8x8, p_ref[0]= 0x%p", pMbCache->SPicData.pRefMb[0]);
iCost = WelsMdP8x8 (pEncCtx->pFuncList, pCurDqLayer, pWelsMd, pSlice);
@@ -1130,7 +1130,7 @@
int32_t iCostPart;
pCurMb->uiMbType = MB_TYPE_8x8;
-// WelsLog( pEncCtx, WELS_LOG_INFO, "WelsMdP16x8, p_ref[0]= 0x%p", pMbCache->SPicData.pRefMb[0]);
+// WelsLog( pEncCtx, WELS_LOG_INFO, "WelsMdP16x8, p_ref[0]= 0x%p", pMbCache->SPicData.pRefMb[0]);
iCostPart = WelsMdP16x8 (pEncCtx->pFuncList, pCurDqLayer, pWelsMd, pSlice);
if (iCostPart <= iCost) {
iCost = iCostPart;
@@ -1138,7 +1138,7 @@
//pCurMb->mb_partition = 2;
}
-// WelsLog( pEncCtx, WELS_LOG_INFO, "WelsMdP8x16, p_ref[0]= 0x%p", pMbCache->SPicData.pRefMb[0]);
+// WelsLog( pEncCtx, WELS_LOG_INFO, "WelsMdP8x16, p_ref[0]= 0x%p", pMbCache->SPicData.pRefMb[0]);
iCostPart = WelsMdP8x16 (pEncCtx->pFuncList, pCurDqLayer, pWelsMd, pSlice);
if (iCostPart <= iCost) {
iCost = iCostPart;
@@ -1151,7 +1151,7 @@
void WelsMdInterFinePartitionVaa (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb,
int32_t iBestCost) {
SDqLayer* pCurDqLayer = pEncCtx->pCurDqLayer;
-// SMbCache *pMbCache = &pSlice->sMbCacheInfo;
+// SMbCache *pMbCache = &pSlice->sMbCacheInfo;
int32_t iCostP8x16, iCostP16x8, iCostP8x8;
uint8_t uiMbSign = pEncCtx->pFuncList->pfGetMbSignFromInterVaa (&pEncCtx->pVaa->sVaaCalcInfo.pSad8x8[pCurMb->iMbXY][0]);
@@ -1159,12 +1159,12 @@
return;
}
-// iCost = pWelsMd->sMe16x16.uiSatdCost;
+// iCost = pWelsMd->sMe16x16.uiSatdCost;
switch (uiMbSign) {
case 3:
case 12:
-// WelsLog( pEncCtx, WELS_LOG_INFO, "WelsMdP16x8, p_ref[0]= 0x%p", pMbCache->SPicData.pRefMb[0]);
+// WelsLog( pEncCtx, WELS_LOG_INFO, "WelsMdP16x8, p_ref[0]= 0x%p", pMbCache->SPicData.pRefMb[0]);
iCostP16x8 = WelsMdP16x8 (pEncCtx->pFuncList, pCurDqLayer, pWelsMd, pSlice);
if (iCostP16x8 < iBestCost) {
iBestCost = iCostP16x8;
@@ -1175,7 +1175,7 @@
case 5:
case 10:
-// WelsLog( pEncCtx, WELS_LOG_INFO, "WelsMdP8x16, p_ref[0]= 0x%p", pMbCache->SPicData.pRefMb[0]);
+// WelsLog( pEncCtx, WELS_LOG_INFO, "WelsMdP8x16, p_ref[0]= 0x%p", pMbCache->SPicData.pRefMb[0]);
iCostP8x16 = WelsMdP8x16 (pEncCtx->pFuncList, pCurDqLayer, pWelsMd, pSlice);
if (iCostP8x16 < iBestCost) {
iBestCost = iCostP8x16;
--- a/codec/encoder/core/src/svc_encode_slice.cpp
+++ b/codec/encoder/core/src/svc_encode_slice.cpp
@@ -184,7 +184,7 @@
if (I_SLICE != eSliceType && SI_SLICE != eSliceType) { // !I && !SI
BsWriteOneBit (pBs, true);
-// {
+// {
uint16_t uiReorderingOfPicNumsIdc;
do {
uiReorderingOfPicNumsIdc = pRefOrdering->SReorderingSyntax[n].uiReorderingOfPicNumsIdc;
@@ -196,7 +196,7 @@
n ++;
} while (3 != uiReorderingOfPicNumsIdc);
-// }
+// }
}
}
@@ -324,7 +324,7 @@
}
BsWriteBits (pBs, pSps->iLog2MaxPocLsb, pSliceHeader->iPicOrderCntLsb);
-// {
+// {
if (P_SLICE == pSliceHeader->eSliceType) {
BsWriteOneBit (pBs, pSliceHeader->bNumRefIdxActiveOverrideFlag);
if (pSliceHeader->bNumRefIdxActiveOverrideFlag) {
@@ -342,7 +342,7 @@
BsWriteOneBit (pBs, pSliceHeadExt->bStoreRefBasePicFlag);
}
}
-// }
+// }
if (pPps->bEntropyCodingModeFlag && pSliceHeader->eSliceType != I_SLICE) {
--- a/codec/encoder/core/src/svc_mode_decision.cpp
+++ b/codec/encoder/core/src/svc_mode_decision.cpp
@@ -353,7 +353,7 @@
const int32_t kiMbY = pCurMb->iMbY;
const int32_t kiMbWidth = pCurDqLayer->iMbWidth;
const int32_t kiMbHeight = pCurDqLayer->iMbHeight;
- // const int32_t block_width = mb_width << 1;
+ // const int32_t block_width = mb_width << 1;
SVAAFrameInfoExt_t* pVaaExt = static_cast<SVAAFrameInfoExt_t*> (pEncCtx->pVaa);
bool bTryScrollSkip = false;
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -266,7 +266,7 @@
return cmInitParaError;
}
- // assert( cfg.uiGopSize >= 1 && ( cfg.uiIntraPeriod && (cfg.uiIntraPeriod % cfg.uiGopSize) == 0) );
+ // assert( cfg.uiGopSize >= 1 && ( cfg.uiIntraPeriod && (cfg.uiIntraPeriod % cfg.uiGopSize) == 0) );
if (pCfg->uiGopSize < 1 || pCfg->uiGopSize > MAX_GOP_SIZE) {
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR,
@@ -1231,7 +1231,7 @@
case videoFormatYV12:
WelsStrcat (strFileName, 256, "yuv"); // confirmed_safe_unsafe_usage
pFile = WelsFopen (strFileName, "ab+");
- // WelsLog( &m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "WELS_CSP_I420, m_iCspInternal= 0x%x", m_iCspInternal);
+ // WelsLog( &m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "WELS_CSP_I420, m_iCspInternal= 0x%x", m_iCspInternal);
if (NULL != pFile) {
fwrite (pSrc, sizeof (uint8_t), (iDataLength * 3) >> 1, pFile);
fflush (pFile);
@@ -1249,7 +1249,7 @@
case videoFormatBGR:
WelsStrcat (strFileName, 256, "bgr"); // confirmed_safe_unsafe_usage
pFile = WelsFopen (strFileName, "ab+");
- // WelsLog( &m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "WELS_CSP_BGR, m_iCspInternal= 0x%x", m_iCspInternal);
+ // WelsLog( &m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "WELS_CSP_BGR, m_iCspInternal= 0x%x", m_iCspInternal);
if (NULL != pFile) {
fwrite (pSrc, sizeof (uint8_t), iDataLength * 3, pFile);
fflush (pFile);
--- a/codec/processing/src/downsample/downsamplefuncs.cpp
+++ b/codec/processing/src/downsample/downsamplefuncs.cpp
@@ -110,7 +110,7 @@
x += 1;
x >>= 1;
//x = (((__int64)(SCALE_BIG - 1 - iFu))*(SCALE_BIG - 1 - fv)*a + ((__int64)iFu)*(SCALE_BIG - 1 -fv)*b + ((__int64)(SCALE_BIG - 1 -iFu))*fv*c +
- // ((__int64)iFu)*fv*d + (1 << (2*SCALE_BIT_BIG-1)) ) >> (2*SCALE_BIT_BIG);
+ // ((__int64)iFu)*fv*d + (1 << (2*SCALE_BIT_BIG-1)) ) >> (2*SCALE_BIT_BIG);
x = WELS_CLAMP (x, 0, 255);
*pByDst++ = (uint8_t)x;
--- a/test/processing/ProcessUT_DownSample.cpp
+++ b/test/processing/ProcessUT_DownSample.cpp
@@ -72,7 +72,7 @@
x += 1;
x >>= 1;
//x = (((__int64)(SCALE_BIG - 1 - iFu))*(SCALE_BIG - 1 - fv)*a + ((__int64)iFu)*(SCALE_BIG - 1 -fv)*b + ((__int64)(SCALE_BIG - 1 -iFu))*fv*c +
- // ((__int64)iFu)*fv*d + (1 << (2*SCALE_BIT_BIG-1)) ) >> (2*SCALE_BIT_BIG);
+ // ((__int64)iFu)*fv*d + (1 << (2*SCALE_BIT_BIG-1)) ) >> (2*SCALE_BIT_BIG);
x = WELS_CLAMP (x, 0, 255);
*pByDst++ = (uint8_t)x;