ref: a9c6a9d76030e2e24272592620410b09851c2113
parent: baf93a340e066cb0223f79b53c974df1da2f9f79
author: Martin Storsjö <martin@martin.st>
date: Mon Apr 27 10:37:14 EDT 2015
Remove tabs from the end of lines like ") {"
--- a/codec/common/src/cpu.cpp
+++ b/codec/common/src/cpu.cpp
@@ -214,7 +214,7 @@
AndroidCpuFamily cpuFamily = ANDROID_CPU_FAMILY_UNKNOWN;
uint64_t uiFeatures = 0;
cpuFamily = android_getCpuFamily();
- if (cpuFamily == ANDROID_CPU_FAMILY_ARM) {+ if (cpuFamily == ANDROID_CPU_FAMILY_ARM) {uiFeatures = android_getCpuFeatures();
if (uiFeatures & ANDROID_CPU_ARM_FEATURE_ARMv7) {uiCPU |= WELS_CPU_ARMv7;
--- a/codec/decoder/core/src/manage_dec_ref.cpp
+++ b/codec/decoder/core/src/manage_dec_ref.cpp
@@ -89,7 +89,7 @@
pRefPic->uiRefCount[LIST_0] = 0;
- for (i = 0; i < MAX_SHORT_REF_COUNT; i++) {+ for (i = 0; i < MAX_SHORT_REF_COUNT; i++) { if (pRefPic->pShortRefList[LIST_0][i] != NULL) {SetUnRef (pRefPic->pShortRefList[LIST_0][i]);
pRefPic->pShortRefList[LIST_0][i] = NULL;
@@ -98,7 +98,7 @@
pRefPic->uiShortRefCount[LIST_0] = 0;
for (i = 0; i < MAX_LONG_REF_COUNT; i++) {- if (pRefPic->pLongRefList[LIST_0][i] != NULL) {+ if (pRefPic->pLongRefList[LIST_0][i] != NULL) {SetUnRef (pRefPic->pLongRefList[LIST_0][i]);
pRefPic->pLongRefList[LIST_0][i] = NULL;
}
@@ -184,7 +184,7 @@
int32_t iReorderingIndex = 0;
int32_t i = 0;
- if (pCtx->eSliceType == I_SLICE || pCtx->eSliceType == SI_SLICE) {+ if (pCtx->eSliceType == I_SLICE || pCtx->eSliceType == SI_SLICE) {return ERR_NONE;
}
@@ -238,7 +238,7 @@
}
}
}
- if (i < iReorderingIndex) {+ if (i < iReorderingIndex) {return ERR_INFO_REFERENCE_PIC_LOST;
}
pPic = ppRefList[i];
@@ -332,7 +332,7 @@
uint32_t uiLongTermPicNum = pRefPicMarking->sMmcoRef[i].uiLongTermPicNum;
int32_t iLongTermFrameIdx = pRefPicMarking->sMmcoRef[i].iLongTermFrameIdx;
int32_t iMaxLongTermFrameIdx = pRefPicMarking->sMmcoRef[i].iMaxLongTermFrameIdx;
- if (uiMmcoType > MMCO_LONG) {+ if (uiMmcoType > MMCO_LONG) {return ERR_INFO_INVALID_MMCO_OPCODE_BASE;
}
iRet = MMCOProcess (pCtx, uiMmcoType, iShortFrameNum, uiLongTermPicNum, iLongTermFrameIdx, iMaxLongTermFrameIdx);
@@ -505,7 +505,7 @@
pPic->bUsedAsRef = true;
pPic->bIsLongRef = false;
pPic->iLongTermFrameIdx = -1;
- if (pRefPic->uiShortRefCount[LIST_0] > 0) {+ if (pRefPic->uiShortRefCount[LIST_0] > 0) {memmove (&pRefPic->pShortRefList[LIST_0][1], &pRefPic->pShortRefList[LIST_0][0],
pRefPic->uiShortRefCount[LIST_0]*sizeof (PPicture));//confirmed_safe_unsafe_usage
}
@@ -524,7 +524,7 @@
pRefPic->pLongRefList[LIST_0][pRefPic->uiLongRefCount[LIST_0]] = pPic;
} else { for (i = 0; i < pRefPic->uiLongRefCount[LIST_0]; i++) {- if (pRefPic->pLongRefList[LIST_0][i]->iLongTermFrameIdx > pPic->iLongTermFrameIdx) {+ if (pRefPic->pLongRefList[LIST_0][i]->iLongTermFrameIdx > pPic->iLongTermFrameIdx) {break;
}
}
@@ -543,7 +543,7 @@
int32_t iRet = ERR_NONE;
WelsDelLongFromListSetUnref (pRefPic, iLongTermFrameIdx);
- for (i = 0; i < pRefPic->uiRefCount[LIST_0]; i++) {+ for (i = 0; i < pRefPic->uiRefCount[LIST_0]; i++) {pPic = pRefPic->pRefList[LIST_0][i];
if (pPic->iFrameNum == iFrameNum && !pPic->bIsLongRef) {iRet = AddLongTermToList (pRefPic, pPic, iLongTermFrameIdx);
--- a/codec/encoder/core/inc/param_svc.h
+++ b/codec/encoder/core/inc/param_svc.h
@@ -121,7 +121,7 @@
TagWelsSvcCodingParam() {FillDefault();
}
- ~TagWelsSvcCodingParam() {}+ ~TagWelsSvcCodingParam() {} static void FillDefault (SEncParamExt& param) {memset (¶m, 0, sizeof (param));
--- a/codec/encoder/core/src/ref_list_mgr_svc.cpp
+++ b/codec/encoder/core/src/ref_list_mgr_svc.cpp
@@ -82,7 +82,7 @@
SRefList* pRefList = pCtx->ppRefPicListExt[pCtx->uiDependencyId];
int32_t k ;
- for (k = iIdx; k < pRefList->uiLongRefCount - 1; k++) {+ for (k = iIdx; k < pRefList->uiLongRefCount - 1; k++) {pRefList->pLongRefList[k] = pRefList->pLongRefList[k + 1];
}
pRefList->pLongRefList[k] = NULL;
@@ -93,7 +93,7 @@
SRefList* pRefList = pCtx->ppRefPicListExt[pCtx->uiDependencyId];
int32_t k ;
- for (k = iIdx; k < pRefList->uiShortRefCount - 1; k++) {+ for (k = iIdx; k < pRefList->uiShortRefCount - 1; k++) {pRefList->pShortRefList[k] = pRefList->pShortRefList[k + 1];
}
pRefList->pShortRefList[k] = NULL;
@@ -131,7 +131,7 @@
iNumA = WelsAbsDiffInt64 ((int64_t) (iFrameNumA + iMaxFrameNumPlus1), (int64_t) (iFrameNumB));
if (iNumA == 0) {return FRAME_NUM_EQUAL;
- } else if (iDiffMin > iNumA) {+ } else if (iDiffMin > iNumA) {return FRAME_NUM_BIGGER;
}
@@ -138,7 +138,7 @@
iNumB = WelsAbsDiffInt64 ((int64_t) (iFrameNumB + iMaxFrameNumPlus1), (int64_t) (iFrameNumA));
if (iNumB == 0) {return FRAME_NUM_EQUAL;
- } else if (iDiffMin > iNumB) {+ } else if (iDiffMin > iNumB) {return FRAME_NUM_SMALLER;
}
@@ -157,7 +157,7 @@
SLogContext* pLogCtx = & (pCtx->sLogCtx);
for (i = 0; i < LONG_TERM_REF_NUM; i++) {- if (pLongRefList[i] != NULL) {+ if (pLongRefList[i] != NULL) {if (CompareFrameNum (pLongRefList[i]->iFrameNum , pLtr->iLastCorFrameNumDec, iMaxFrameNumPlus1) == FRAME_NUM_BIGGER
&& (CompareFrameNum (pLongRefList[i]->iFrameNum , pLtr->iCurFrameNumInDec,
iMaxFrameNumPlus1) & (FRAME_NUM_EQUAL | FRAME_NUM_SMALLER))) {@@ -173,7 +173,7 @@
iMaxFrameNumPlus1) == FRAME_NUM_BIGGER
&& (CompareFrameNum (pLongRefList[i]->iMarkFrameNum, pLtr->iCurFrameNumInDec ,
iMaxFrameNumPlus1) & (FRAME_NUM_EQUAL | FRAME_NUM_SMALLER))
- && pLtr->iLTRMarkMode == LTR_DELAY_MARK) {+ && pLtr->iLTRMarkMode == LTR_DELAY_MARK) {WelsLog (pLogCtx, WELS_LOG_WARNING, "LTR ,iMarkFrameNum invalid LTR delete ,long_term_idx = %d , iFrameNum =%d ",
pLongRefList[i]->iLongTermPicNum, pLongRefList[i]->iFrameNum);
pLongRefList[i]->SetUnref();
@@ -200,7 +200,7 @@
WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
"pLtr->uiLtrMarkState = %d, pLtr.iCurLtrIdx = %d , pLtr->iLtrMarkFbFrameNum = %d ,pCtx->iFrameNum = %d ",
pLtr->uiLtrMarkState, pLtr->iCurLtrIdx, pLtr->iLtrMarkFbFrameNum, pCtx->iFrameNum);
- for (i = 0; i < pRefList->uiLongRefCount; i++) {+ for (i = 0; i < pRefList->uiLongRefCount; i++) { if (pLongRefList[i]->iFrameNum == pLtr->iLtrMarkFbFrameNum && pLongRefList[i]->uiRecieveConfirmed != RECIEVE_SUCCESS) {pLongRefList[i]->uiRecieveConfirmed = RECIEVE_SUCCESS;
@@ -210,8 +210,8 @@
pLtr->iLastRecoverFrameNum =
pLtr->iLastCorFrameNumDec = pLtr->iLtrMarkFbFrameNum;
- for (j = 0; j < pRefList->uiLongRefCount; j++) {- if (pLongRefList[j]->iLongTermPicNum != pLtr->iCurLtrIdx) {+ for (j = 0; j < pRefList->uiLongRefCount; j++) {+ if (pLongRefList[j]->iLongTermPicNum != pLtr->iCurLtrIdx) {pLongRefList[j]->SetUnref();
DeleteLTRFromLongList (pCtx, j);
}
@@ -227,8 +227,8 @@
}
pLtr->uiLtrMarkState = NO_LTR_MARKING_FEEDBACK;
} else if (pLtr->uiLtrMarkState == LTR_MARKING_FAILED) {- for (i = 0; i < pRefList->uiLongRefCount; i++) {- if (pLongRefList[i]->iFrameNum == pLtr->iLtrMarkFbFrameNum) {+ for (i = 0; i < pRefList->uiLongRefCount; i++) {+ if (pLongRefList[i]->iFrameNum == pLtr->iLtrMarkFbFrameNum) {pLongRefList[i]->SetUnref();
DeleteLTRFromLongList (pCtx, i);
break;
@@ -256,14 +256,14 @@
int32_t j = 0;
bool bMoveLtrFromShortToLong = false;
- if (pCtx->eSliceType == I_SLICE) {+ if (pCtx->eSliceType == I_SLICE) {i = 0;
pShortRefList[i]->uiRecieveConfirmed = RECIEVE_SUCCESS;
} else if (pLtr->bLTRMarkingFlag) {pCtx->pVaa->uiMarkLongTermPicIdx = pLtr->iCurLtrIdx;
- if (pLtr->iLTRMarkMode == LTR_DELAY_MARK) {- for (i = 0; i < pRefList->uiShortRefCount; i++) {+ if (pLtr->iLTRMarkMode == LTR_DELAY_MARK) {+ for (i = 0; i < pRefList->uiShortRefCount; i++) {if (CompareFrameNum (pCtx->iFrameNum, pShortRefList[i]->iFrameNum + iGoPFrameNumInterval,
iMaxFrameNumPlus1) == FRAME_NUM_EQUAL) {break;
@@ -281,7 +281,7 @@
// delay one gop to move LTR from int16_t list to int32_t list
if (pLtr->iLTRMarkMode == LTR_DIRECT_MARK && pCtx->eSliceType != I_SLICE && !pLtr->bLTRMarkingFlag) { for (j = 0; j < pRefList->uiShortRefCount; j++) {- if (pRefList->pShortRefList[j]->bIsLongRef) {+ if (pRefList->pShortRefList[j]->bIsLongRef) {i = j;
bMoveLtrFromShortToLong = true;
break;
@@ -380,7 +380,7 @@
pCtx->pDecPic->uiRecieveConfirmed = RECIEVE_UNKOWN;
pCtx->pDecPic->bUsedAsRef = true;
- for (iRefIdx = pRefList->uiShortRefCount - 1; iRefIdx >= 0; --iRefIdx) {+ for (iRefIdx = pRefList->uiShortRefCount - 1; iRefIdx >= 0; --iRefIdx) {pRefList->pShortRefList[iRefIdx + 1] = pRefList->pShortRefList[iRefIdx];
}
pRefList->pShortRefList[0] = pCtx->pDecPic;
@@ -389,7 +389,7 @@
if (keSliceType == P_SLICE) { if (pCtx->uiTemporalId == 0) {- if (pCtx->pSvcParam->bEnableLongTermReference) {+ if (pCtx->pSvcParam->bEnableLongTermReference) {LTRMarkProcess (pCtx);
DeleteInvalidLTR (pCtx);
HandleLTRMarkFeedback (pCtx);
@@ -410,7 +410,7 @@
}
}
} else { // in case IDR currently coding- if (pCtx->pSvcParam->bEnableLongTermReference) {+ if (pCtx->pSvcParam->bEnableLongTermReference) {LTRMarkProcess (pCtx);
pLtr->iCurLtrIdx = (pLtr->iCurLtrIdx + 1) % LONG_TERM_REF_NUM;
@@ -466,7 +466,7 @@
}
}
- for (iSliceIdx = 0; iSliceIdx < kiCountSliceNum; iSliceIdx++) {+ for (iSliceIdx = 0; iSliceIdx < kiCountSliceNum; iSliceIdx++) {SSliceHeaderExt* pSliceHdrExt = &pCtx->pCurDqLayer->sLayerInfo.pSliceInLayer[iSliceIdx].sSliceHeaderExt;
SSliceHeader* pSliceHdr = &pSliceHdrExt->sSliceHeader;
SRefPicMarking* pRefPicMark = &pSliceHdr->sRefMarking;
@@ -474,7 +474,7 @@
memset (pRefPicMark, 0, sizeof (SRefPicMarking));
if (pCtx->pSvcParam->bEnableLongTermReference && pLtr->bLTRMarkingFlag) {- if (pLtr->iLTRMarkMode == LTR_DIRECT_MARK) {+ if (pLtr->iLTRMarkMode == LTR_DIRECT_MARK) {pRefPicMark->SMmcoRef[pRefPicMark->uiMmcoCount].iMaxLongTermFrameIdx = LONG_TERM_REF_NUM - 1;
pRefPicMark->SMmcoRef[pRefPicMark->uiMmcoCount++].iMmcoType = MMCO_SET_MAX_LONG;
@@ -483,7 +483,7 @@
pRefPicMark->SMmcoRef[pRefPicMark->uiMmcoCount].iLongTermFrameIdx = pLtr->iCurLtrIdx;
pRefPicMark->SMmcoRef[pRefPicMark->uiMmcoCount++].iMmcoType = MMCO_LONG;
- } else if (pLtr->iLTRMarkMode == LTR_DELAY_MARK) {+ } else if (pLtr->iLTRMarkMode == LTR_DELAY_MARK) {pRefPicMark->SMmcoRef[pRefPicMark->uiMmcoCount].iDiffOfPicNum = iGoPFrameNumInterval;
pRefPicMark->SMmcoRef[pRefPicMark->uiMmcoCount].iLongTermFrameIdx = pLtr->iCurLtrIdx;
pRefPicMark->SMmcoRef[pRefPicMark->uiMmcoCount++].iMmcoType = MMCO_SHORT2LONG;
@@ -531,7 +531,7 @@
void FilterLTRMarkingFeedback (sWelsEncCtx* pCtx, SLTRMarkingFeedback* pLTRMarkingFeedback) {SLTRState* pLtr = &pCtx->pLtr[pCtx->uiDependencyId];
assert (pLTRMarkingFeedback);
- if (pCtx->pSvcParam->bEnableLongTermReference) {+ if (pCtx->pSvcParam->bEnableLongTermReference) {if (pLTRMarkingFeedback->uiIDRPicId == pCtx->uiIdrPicId
&& (pLTRMarkingFeedback->uiFeedbackType == LTR_MARKING_SUCCESS
|| pLTRMarkingFeedback->uiFeedbackType == LTR_MARKING_FAILED)) { // avoid error pData@@ -572,8 +572,8 @@
if (pCtx->eSliceType != I_SLICE) { if (pCtx->pSvcParam->bEnableLongTermReference && pLtr->bReceivedT0LostFlag && pCtx->uiTemporalId == 0) {- for (i = 0; i < pRefList->uiLongRefCount; i++) {- if (pRefList->pLongRefList[i]->uiRecieveConfirmed == RECIEVE_SUCCESS) {+ for (i = 0; i < pRefList->uiLongRefCount; i++) {+ if (pRefList->pLongRefList[i]->uiRecieveConfirmed == RECIEVE_SUCCESS) {pCtx->pRefList0[pCtx->iNumRef0++] = pRefList->pLongRefList[i];
pLtr->iLastRecoverFrameNum = pCtx->iFrameNum;
WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO,
@@ -665,7 +665,7 @@
}
/*syntax for dec_ref_pic_marking()*/
- if (videoFrameTypeIDR == uiFrameType) {+ if (videoFrameTypeIDR == uiFrameType) {pRefPicMark->bNoOutputOfPriorPicsFlag = false;
pRefPicMark->bLongTermRefFlag = pCtx->pSvcParam->bEnableLongTermReference;
} else {@@ -786,11 +786,11 @@
}
}
} else {- for (int32_t i = iNumRef ; i >= 0 ; --i) {+ for (int32_t i = iNumRef ; i >= 0 ; --i) { if (pRefList->pLongRefList[i] == NULL) {continue;
} else if (pRefList->pLongRefList[i]->uiTemporalId == 0
- || pRefList->pLongRefList[i]->uiTemporalId < pCtx->uiTemporalId) {+ || pRefList->pLongRefList[i]->uiTemporalId < pCtx->uiTemporalId) {pCtx->pCurDqLayer->pRefOri[pCtx->iNumRef0] = pRefOri;
pCtx->pRefList0[pCtx->iNumRef0++] = pRefList->pLongRefList[i];
WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,
@@ -870,7 +870,7 @@
//for other LTR
if (bIsRefListNotFull) { for (int32_t i = 0; i < iLongRefNum; ++i) {- if (pRefList->pLongRefList[i] == NULL) {+ if (pRefList->pLongRefList[i] == NULL) {pLtr->iCurLtrIdx = i ;
break;
}
@@ -878,7 +878,7 @@
} else { 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)) {+ if (ppLongRefList[i]->bUsedAsRef && ppLongRefList[i]->bIsLongRef && (!ppLongRefList[i]->bIsSceneLTR)) {++iRefNum_t[ ppLongRefList[i]->uiTemporalId ];
}
}
@@ -894,7 +894,7 @@
for (i = 0 ; i < pRefList->uiLongRefCount ; ++i) {if (ppLongRefList[i]->bUsedAsRef && ppLongRefList[i]->bIsLongRef && (!ppLongRefList[i]->bIsSceneLTR)
- && iMaxMultiRefTid == ppLongRefList[i]->uiTemporalId) {+ && iMaxMultiRefTid == ppLongRefList[i]->uiTemporalId) {assert (IsValidFrameNum (ppLongRefList[i]->iFrameNum)); // pLtr->iCurLtrIdx must have a value
int32_t iDeltaFrameNum = (pCtx->iFrameNum >= ppLongRefList[i]->iFrameNum)
? (pCtx->iFrameNum - ppLongRefList[i]->iFrameNum)
--- a/codec/encoder/core/src/svc_encode_mb.cpp
+++ b/codec/encoder/core/src/svc_encode_mb.cpp
@@ -87,7 +87,7 @@
pRes -= 256;
pBlock -= 256;
- for (i = 0; i < 16; i++) {+ for (i = 0; i < 16; i++) {uiNoneZeroCount = pFuncList->pfGetNoneZeroCount (pBlock);
pCurMb->pNonZeroCount[*kpNoneZeroCountIdx++] = uiNoneZeroCount;
uiNoneZeroCountMbAc += uiNoneZeroCount;
--- a/codec/encoder/core/src/wels_preprocess.cpp
+++ b/codec/encoder/core/src/wels_preprocess.cpp
@@ -1232,7 +1232,7 @@
//pRefSrcList[0] is for current frame
if (pCurPicture->bUsedAsRef || pCurPicture->bIsLongRef) { if (pCurPicture->iPictureType == P_SLICE && pCurPicture->uiTemporalId != 0) {- for (int iRefIdx = kuiShortRefCount - 1; iRefIdx >= 0; --iRefIdx) {+ for (int iRefIdx = kuiShortRefCount - 1; iRefIdx >= 0; --iRefIdx) {WelsExchangeSpatialPictures (&pRefSrcList[iRefIdx + 1],
&pRefSrcList[iRefIdx]);
}
--- a/test/api/encode_decode_api_test.cpp
+++ b/test/api/encode_decode_api_test.cpp
@@ -745,7 +745,7 @@
bLost = NO_RECOVERY_REQUSET;
} else if (hr & dsNoParamSets) {bLost = IDR_RECOVERY_REQUEST;
- } else if (((hr & dsRefLost) && (1 == temple_id)) || ((dsErrorFree != hr) && (0 == temple_id))) {+ } else if (((hr & dsRefLost) && (1 == temple_id)) || ((dsErrorFree != hr) && (0 == temple_id))) {bLost = LTR_RECOVERY_REQUEST;
} else {bLost = NO_RECOVERY_REQUSET;
@@ -765,7 +765,7 @@
if (m_P2PmodeFlag) { if (bKLost == IDR_RECOVERY_REQUEST) {pEncoder->ForceIntraFrame (true);
- } else if (bKLost == LTR_RECOVERY_REQUEST) {+ } else if (bKLost == LTR_RECOVERY_REQUEST) {p_LTR_Recover_Request->uiFeedbackType = LTR_RECOVERY_REQUEST;
pDecoder->GetOption (DECODER_OPTION_FRAME_NUM, &p_LTR_Recover_Request->iCurrentFrameNum);
pDecoder->GetOption (DECODER_OPTION_IDR_PIC_ID, &p_LTR_Recover_Request->uiIDRPicId);
@@ -772,7 +772,7 @@
pEncoder->SetOption (ENCODER_LTR_RECOVERY_REQUEST, p_LTR_Recover_Request);
}
} else {- if (bKLost == IDR_RECOVERY_REQUEST || bKLost == LTR_RECOVERY_REQUEST) {+ if (bKLost == IDR_RECOVERY_REQUEST || bKLost == LTR_RECOVERY_REQUEST) {p_LTR_Recover_Request->uiFeedbackType = IDR_RECOVERY_REQUEST;
pEncoder->ForceIntraFrame (true);
}
--
⑨