Remove unnecessary/pointless/accidental tabs from the middle of lines of code
This commit is contained in:
@@ -106,7 +106,7 @@ void DeblockChromaLt4_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStrideX, int
|
||||
bDetaP0Q0 = WELS_ABS (p0 - q0) < iAlpha;
|
||||
bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
|
||||
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
||||
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
||||
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
||||
iDeta = WELS_CLIP3 ((((q0 - p0) << 2) + (p1 - q1) + 4) >> 3, -iTc0, iTc0);
|
||||
pPixCb[-iStrideX] = WelsClip1 (p0 + iDeta); /* p0' */
|
||||
pPixCb[0] = WelsClip1 (q0 - iDeta); /* q0' */
|
||||
@@ -122,7 +122,7 @@ void DeblockChromaLt4_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStrideX, int
|
||||
bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
|
||||
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
||||
|
||||
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
||||
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
||||
iDeta = WELS_CLIP3 ((((q0 - p0) << 2) + (p1 - q1) + 4) >> 3, -iTc0, iTc0);
|
||||
pPixCr[-iStrideX] = WelsClip1 (p0 + iDeta); /* p0' */
|
||||
pPixCr[0] = WelsClip1 (q0 - iDeta); /* q0' */
|
||||
@@ -197,7 +197,7 @@ void DeblockChromaLt42_c (uint8_t* pPixCbCr, int32_t iStrideX, int32_t iStrideY,
|
||||
bDetaP0Q0 = WELS_ABS (p0 - q0) < iAlpha;
|
||||
bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
|
||||
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
||||
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
||||
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
||||
iDeta = WELS_CLIP3 ((((q0 - p0) << 2) + (p1 - q1) + 4) >> 3, -iTc0, iTc0);
|
||||
pPixCbCr[-iStrideX] = WelsClip1 (p0 + iDeta); /* p0' */
|
||||
pPixCbCr[0] = WelsClip1 (q0 - iDeta); /* q0' */
|
||||
|
||||
@@ -104,7 +104,7 @@ float WelsCalcPsnr (const void* kpTarPic,
|
||||
const int32_t kiRefStride,
|
||||
const int32_t kiWidth,
|
||||
const int32_t kiHeight) {
|
||||
int64_t iSqe = 0;
|
||||
int64_t iSqe = 0;
|
||||
int32_t x, y;
|
||||
uint8_t* pTar = (uint8_t*)kpTarPic;
|
||||
uint8_t* pRef = (uint8_t*)kpRefPic;
|
||||
|
||||
@@ -706,7 +706,7 @@ int ProcessEncoding (ISVCEncoder* pPtrEnc, int argc, char** argv, bool bConfigFi
|
||||
FILE* pFileYUV = NULL;
|
||||
int32_t iActualFrameEncodedCount = 0;
|
||||
int32_t iFrameIdx = 0;
|
||||
int32_t iTotalFrameMax = -1;
|
||||
int32_t iTotalFrameMax = -1;
|
||||
uint8_t* pYUV = NULL;
|
||||
SSourcePicture* pSrcPic = NULL;
|
||||
uint32_t iSourceWidth, iSourceHeight, kiPicResSize;
|
||||
|
||||
@@ -73,7 +73,7 @@ uint8_t uiReserved[3]; // reserved padding bytes
|
||||
*
|
||||
* \return 0 - successful; none 0 - failed;
|
||||
*/
|
||||
int32_t InitFmo (PFmo pFmo, PPps pPps, const int32_t kiMbWidth, const int32_t kiMbHeight);
|
||||
int32_t InitFmo (PFmo pFmo, PPps pPps, const int32_t kiMbWidth, const int32_t kiMbHeight);
|
||||
|
||||
/*!
|
||||
* \brief Uninitialize Wels Flexible Macroblock Ordering (FMO) list
|
||||
|
||||
@@ -908,8 +908,8 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW
|
||||
PSps pSps = NULL;
|
||||
PSubsetSps pSubsetSps = NULL;
|
||||
SNalUnitHeader* pNalHead = &pCtx->sCurNalHead;
|
||||
ProfileIdc uiProfileIdc;
|
||||
uint8_t uiLevelIdc;
|
||||
ProfileIdc uiProfileIdc;
|
||||
uint8_t uiLevelIdc;
|
||||
int32_t iSpsId;
|
||||
uint32_t uiCode;
|
||||
int32_t iCode;
|
||||
|
||||
@@ -833,7 +833,7 @@ int32_t WelsDecodeMbCabacPSliceBaseMode0 (PWelsDecoderContext pCtx, PWelsNeighAv
|
||||
if (uiMbType < 4) { //Inter mode
|
||||
int16_t pMotionVector[LIST_A][30][MV_A];
|
||||
int16_t pMvdCache[LIST_A][30][MV_A];
|
||||
int8_t pRefIndex[LIST_A][30];
|
||||
int8_t pRefIndex[LIST_A][30];
|
||||
pCurLayer->pMbType[iMbXy] = g_ksInterMbTypeInfo[uiMbType].iType;
|
||||
WelsFillCacheInterCabac (pNeighAvail, pNonZeroCount, pMotionVector, pMvdCache, pRefIndex, pCurLayer);
|
||||
WELS_READ_VERIFY (ParseInterMotionInfoCabac (pCtx, pNeighAvail, pNonZeroCount, pMotionVector, pMvdCache, pRefIndex));
|
||||
@@ -1605,7 +1605,7 @@ int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx) {
|
||||
uiMbType = uiCode;
|
||||
if (uiMbType < 5) { //inter MB type
|
||||
int16_t iMotionVector[LIST_A][30][MV_A];
|
||||
int8_t iRefIndex[LIST_A][30];
|
||||
int8_t iRefIndex[LIST_A][30];
|
||||
pCurLayer->pMbType[iMbXy] = g_ksInterMbTypeInfo[uiMbType].iType;
|
||||
WelsFillCacheInter (&sNeighAvail, pNonZeroCount, iMotionVector, iRefIndex, pCurLayer);
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ static inline int32_t FmoGenerateSliceGroup (PFmo pFmo, const PPps kpPps, const
|
||||
*
|
||||
* \return 0 - successful; none 0 - failed;
|
||||
*/
|
||||
int32_t InitFmo (PFmo pFmo, PPps pPps, const int32_t kiMbWidth, const int32_t kiMbHeight) {
|
||||
int32_t InitFmo (PFmo pFmo, PPps pPps, const int32_t kiMbWidth, const int32_t kiMbHeight) {
|
||||
return FmoGenerateSliceGroup (pFmo, pPps, kiMbWidth, kiMbHeight);
|
||||
}
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ int32_t WelsMarkAsRef (PWelsDecoderContext pCtx) {
|
||||
|
||||
for (j = pCurAU->uiStartPos; j <= pCurAU->uiEndPos; j++) {
|
||||
if (pCurAU->pNalUnitsList[j]->sNalHeaderExt.sNalUnitHeader.eNalUnitType == NAL_UNIT_CODED_SLICE_IDR
|
||||
|| pCurAU->pNalUnitsList[j]->sNalHeaderExt.bIdrFlag) {
|
||||
|| pCurAU->pNalUnitsList[j]->sNalHeaderExt.bIdrFlag) {
|
||||
bIsIDRAU = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -682,7 +682,7 @@ static int32_t CavlcGetLevelVal (int32_t iLevel[16], SReadBitsCache* pBitsCache,
|
||||
iSuffixLength = (uiTotalCoeff > 10 && uiTrailingOnes < 3);
|
||||
|
||||
for (; i < uiTotalCoeff; i++) {
|
||||
if (pBitsCache->uiRemainBits <= 16) SHIFT_BUFFER (pBitsCache);
|
||||
if (pBitsCache->uiRemainBits <= 16) SHIFT_BUFFER (pBitsCache);
|
||||
WELS_GET_PREFIX_BITS (pBitsCache->uiCache32Bit, iPrefixBits);
|
||||
if (iPrefixBits > MAX_LEVEL_PREFIX + 1) //iPrefixBits includes leading "0"s and first "1", should +1
|
||||
return -1;
|
||||
@@ -753,8 +753,8 @@ static int32_t CavlcGetTotalZeros (int32_t& iZerosLeft, SReadBitsCache* pBitsCac
|
||||
|
||||
return iUsedBits;
|
||||
}
|
||||
static int32_t CavlcGetRunBefore (int32_t iRun[16], SReadBitsCache* pBitsCache, uint8_t uiTotalCoeff,
|
||||
SVlcTable* pVlcTable, int32_t iZerosLeft) {
|
||||
static int32_t CavlcGetRunBefore (int32_t iRun[16], SReadBitsCache* pBitsCache, uint8_t uiTotalCoeff,
|
||||
SVlcTable* pVlcTable, int32_t iZerosLeft) {
|
||||
int32_t i, iUsedBits = 0;
|
||||
uint32_t uiCount, uiValue, iPrefixBits;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace WelsEnc {
|
||||
extern const uint8_t g_kuiSmb4AddrIn256[16];
|
||||
extern const uint8_t g_kuiCache12_8x8RefIdx[4];
|
||||
|
||||
typedef struct TagDCTCoeff {
|
||||
typedef struct TagDCTCoeff {
|
||||
//ALIGNED_DECLARE( int16_t, residual_ac[16], 16 ); //I_16x16
|
||||
int16_t iLumaBlock[16][16]; //based on block4x4 luma DC/AC
|
||||
//ALIGNED_DECLARE( int16_t, iLumaI16x16Dc[16], 16 ); //I_16x16 DC
|
||||
|
||||
@@ -120,6 +120,6 @@ SDqLayer* pRefLayer; // pointer to referencing dq_layer of current layer to
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
// frame structure for svc
|
||||
typedef SDqLayer SWelsSvcFrame;
|
||||
typedef SDqLayer SWelsSvcFrame;
|
||||
}
|
||||
#endif//WELS_SVC_EXTENSION_LAYER_H__
|
||||
|
||||
@@ -136,9 +136,9 @@ class CWelsPreProcess {
|
||||
SPicture* GetCurrentFrameFromOrigList (int32_t iDIdx) {
|
||||
return m_pSpatialPic[iDIdx][0];
|
||||
}
|
||||
void UpdateSrcList (SPicture* pCurPicture, const int32_t kiCurDid, SPicture** pShortRefList,
|
||||
void UpdateSrcList (SPicture* pCurPicture, const int32_t kiCurDid, SPicture** pShortRefList,
|
||||
const uint32_t kuiShortRefCount);
|
||||
void UpdateSrcListLosslessScreenRefSelectionWithLtr (SPicture* pCurPicture, const int32_t kiCurDid,
|
||||
void UpdateSrcListLosslessScreenRefSelectionWithLtr (SPicture* pCurPicture, const int32_t kiCurDid,
|
||||
const int32_t kuiMarkLongTermPicIdx, SPicture** pLongRefList);
|
||||
|
||||
private:
|
||||
|
||||
@@ -935,12 +935,12 @@ static int32_t WelsGenerateNewSps (sWelsEncCtx* pCtx, const bool kbUseSubsetSps,
|
||||
|
||||
static bool CheckMatchedSps (SWelsSPS* const pSps1, SWelsSPS* const pSps2) {
|
||||
|
||||
if ((pSps1->iMbWidth != pSps2->iMbWidth)
|
||||
if ((pSps1->iMbWidth != pSps2->iMbWidth)
|
||||
|| (pSps1->iMbHeight != pSps2->iMbHeight)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((pSps1->uiLog2MaxFrameNum != pSps2->uiLog2MaxFrameNum)
|
||||
if ((pSps1->uiLog2MaxFrameNum != pSps2->uiLog2MaxFrameNum)
|
||||
|| (pSps1->iLog2MaxPocLsb != pSps2->iLog2MaxPocLsb)) {
|
||||
return false;
|
||||
}
|
||||
@@ -949,7 +949,7 @@ static bool CheckMatchedSps (SWelsSPS* const pSps1, SWelsSPS* const pSps2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((pSps1->bFrameCroppingFlag != pSps2->bFrameCroppingFlag)
|
||||
if ((pSps1->bFrameCroppingFlag != pSps2->bFrameCroppingFlag)
|
||||
|| (pSps1->sFrameCrop.iCropLeft != pSps2->sFrameCrop.iCropLeft)
|
||||
|| (pSps1->sFrameCrop.iCropRight != pSps2->sFrameCrop.iCropRight)
|
||||
|| (pSps1->sFrameCrop.iCropTop != pSps2->sFrameCrop.iCropTop)
|
||||
@@ -975,8 +975,8 @@ static bool CheckMatchedSubsetSps (SSubsetSps* const pSubsetSps1, SSubsetSps* co
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((pSubsetSps1->sSpsSvcExt.iExtendedSpatialScalability != pSubsetSps2->sSpsSvcExt.iExtendedSpatialScalability)
|
||||
|| (pSubsetSps1->sSpsSvcExt.bAdaptiveTcoeffLevelPredFlag != pSubsetSps2->sSpsSvcExt.bAdaptiveTcoeffLevelPredFlag)
|
||||
if ((pSubsetSps1->sSpsSvcExt.iExtendedSpatialScalability != pSubsetSps2->sSpsSvcExt.iExtendedSpatialScalability)
|
||||
|| (pSubsetSps1->sSpsSvcExt.bAdaptiveTcoeffLevelPredFlag != pSubsetSps2->sSpsSvcExt.bAdaptiveTcoeffLevelPredFlag)
|
||||
|| (pSubsetSps1->sSpsSvcExt.bSeqTcoeffLevelPredFlag != pSubsetSps2->sSpsSvcExt.bSeqTcoeffLevelPredFlag)
|
||||
|| (pSubsetSps1->sSpsSvcExt.bSliceHeaderRestrictionFlag != pSubsetSps2->sSpsSvcExt.bSliceHeaderRestrictionFlag)) {
|
||||
return false;
|
||||
|
||||
@@ -559,7 +559,7 @@ inline void MeRefineQuarPixel (SWelsFuncPtrList* pFunc, SWelsME* pMe, SMeRefineP
|
||||
}
|
||||
//==========================(1, 0)=========================//
|
||||
pSampleAvg (pMeRefine->pQuarPixTmp, ME_REFINE_BUF_STRIDE, pParams->pSrcA[3],
|
||||
ME_REFINE_BUF_STRIDE, pParams->pSrcB[3], pParams->iStrideB, kiWidth, kiHeight);
|
||||
ME_REFINE_BUF_STRIDE, pParams->pSrcB[3], pParams->iStrideB, kiWidth, kiHeight);
|
||||
|
||||
iCurCost = CALC_COST (pMeRefine->pQuarPixTmp, pParams->iLms[3]);
|
||||
if (iCurCost < pParams->iBestCost) {
|
||||
|
||||
@@ -552,7 +552,7 @@ void RcDecideTargetBits (sWelsEncCtx* pEncCtx) {
|
||||
&& (pEncCtx->pSvcParam->bEnableFrameSkip == false))) {
|
||||
pWelsSvcRc->iCurrentBitsLevel = BITS_EXCEEDED;
|
||||
}
|
||||
pWelsSvcRc->iTargetBits = WELS_CLIP3 (pWelsSvcRc->iTargetBits, pTOverRc->iMinBitsTl, pTOverRc->iMaxBitsTl);
|
||||
pWelsSvcRc->iTargetBits = WELS_CLIP3 (pWelsSvcRc->iTargetBits, pTOverRc->iMinBitsTl, pTOverRc->iMaxBitsTl);
|
||||
}
|
||||
pWelsSvcRc->iRemainingWeights -= pTOverRc->iTlayerWeight;
|
||||
}
|
||||
@@ -706,7 +706,7 @@ void RcVBufferCalculationSkip (sWelsEncCtx* pEncCtx) {
|
||||
(double)VGOP_BITS_PERCENTAGE_DIFF;
|
||||
|
||||
if ((pWelsSvcRc->iBufferFullnessSkip > pWelsSvcRc->iBufferSizeSkip
|
||||
&& pWelsSvcRc->iAverageFrameQp > pWelsSvcRc->iSkipQpValue)
|
||||
&& pWelsSvcRc->iAverageFrameQp > pWelsSvcRc->iSkipQpValue)
|
||||
|| (dIncPercent > pWelsSvcRc->iRcVaryPercentage)) {
|
||||
pEncCtx->iSkipFrameFlag = 1;
|
||||
}
|
||||
|
||||
@@ -1392,11 +1392,11 @@ bool WelsMdPSkipEnc (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb, SMbCac
|
||||
iEncStride = pEncCtx->pCurDqLayer->iEncStride[1];
|
||||
pEncMb = pMbCache->SPicData.pEncMb[1];
|
||||
pEncBlockOffset = pStrideEncBlockOffset + 16;
|
||||
pFunc->pfDctFourT4 (pMbCache->pCoeffLevel + 256, & (pEncMb[*pEncBlockOffset]), iEncStride, pMbCache->pSkipMb + 256, 8);
|
||||
pFunc->pfDctFourT4 (pMbCache->pCoeffLevel + 256, & (pEncMb[*pEncBlockOffset]), iEncStride, pMbCache->pSkipMb + 256, 8);
|
||||
if (WelsTryPUVskip (pEncCtx, pCurMb, pMbCache, 1)) {
|
||||
pEncMb = pMbCache->SPicData.pEncMb[2];
|
||||
pEncBlockOffset = pStrideEncBlockOffset + 20;
|
||||
pFunc->pfDctFourT4 (pMbCache->pCoeffLevel + 320, & (pEncMb[*pEncBlockOffset]), iEncStride, pMbCache->pSkipMb + 320, 8);
|
||||
pFunc->pfDctFourT4 (pMbCache->pCoeffLevel + 320, & (pEncMb[*pEncBlockOffset]), iEncStride, pMbCache->pSkipMb + 320, 8);
|
||||
if (WelsTryPUVskip (pEncCtx, pCurMb, pMbCache, 2)) {
|
||||
//update motion info to current MB
|
||||
ST32 (pCurMb->pRefIndex, 0);
|
||||
@@ -1539,7 +1539,7 @@ void WelsMdInterMbRefinement (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurM
|
||||
sMeRefine.pfCopyBlockByMode = pFunc->pfCopy8x8Aligned;
|
||||
for (i = 0; i < 4; i++) {
|
||||
int32_t iBlk8Idx = i << 2; //0, 4, 8, 12
|
||||
int32_t iBlk4X, iBlk4Y;
|
||||
int32_t iBlk4X, iBlk4Y;
|
||||
|
||||
pCurMb->pRefIndex[i] = pWelsMd->uiRef;
|
||||
|
||||
|
||||
@@ -247,8 +247,8 @@ bool GomValidCheckSliceNum (const int32_t kiMbWidth, const int32_t kiMbHeight, u
|
||||
break;
|
||||
}
|
||||
|
||||
if (*pSliceNum != iSliceNum) {
|
||||
*pSliceNum = (0 != iSliceNum) ? iSliceNum : 1;
|
||||
if (*pSliceNum != iSliceNum) {
|
||||
*pSliceNum = (0 != iSliceNum) ? iSliceNum : 1;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -344,7 +344,7 @@ bool WelsTryPYskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache) {
|
||||
pEncCtx->pFuncList->pfScan4x4 (pBlock, pRes); //
|
||||
iSingleCtrMb += pEncCtx->pFuncList->pfCalculateSingleCtr4x4 (pBlock);
|
||||
}
|
||||
if (iSingleCtrMb >= 6) return false; //from JVT-O079
|
||||
if (iSingleCtrMb >= 6) return false; //from JVT-O079
|
||||
pRes += 16;
|
||||
pBlock += 16;
|
||||
}
|
||||
@@ -370,7 +370,7 @@ bool WelsTryPUVskip (sWelsEncCtx* pEncCtx, SMB* pCurMb, SMbCache* pMbCache, i
|
||||
pEncCtx->pFuncList->pfQuantizationFour4x4Max (pRes, pFF, pMF, (int16_t*)aMax);
|
||||
|
||||
for (j = 0; j < 4; j++) {
|
||||
if (aMax[j] > 1) return false; // iSingleCtrMb += 9, can't be P_SKIP
|
||||
if (aMax[j] > 1) return false; // iSingleCtrMb += 9, can't be P_SKIP
|
||||
else if (aMax[j] == 1) {
|
||||
pEncCtx->pFuncList->pfScan4x4Ac (pBlock, pRes);
|
||||
iSingleCtrMb += pEncCtx->pFuncList->pfCalculateSingleCtr4x4 (pBlock);
|
||||
|
||||
@@ -700,11 +700,11 @@ int32_t WelsCodePOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice) {
|
||||
|
||||
// 1st index: 0: for P pSlice; 1: for I pSlice;
|
||||
// 2nd index: 0: for non-dynamic pSlice; 1: for dynamic I pSlice;
|
||||
static const PWelsCodingSliceFunc g_pWelsSliceCoding[2][2] = {
|
||||
{ WelsCodePSlice, WelsCodePOverDynamicSlice }, // P SSlice
|
||||
{ WelsISliceMdEnc, WelsISliceMdEncDynamic } // I SSlice
|
||||
static const PWelsCodingSliceFunc g_pWelsSliceCoding[2][2] = {
|
||||
{ WelsCodePSlice, WelsCodePOverDynamicSlice }, // P SSlice
|
||||
{ WelsISliceMdEnc, WelsISliceMdEncDynamic } // I SSlice
|
||||
};
|
||||
static const PWelsSliceHeaderWriteFunc g_pWelsWriteSliceHeader[2] = { // 0: for base; 1: for ext;
|
||||
static const PWelsSliceHeaderWriteFunc g_pWelsWriteSliceHeader[2] = { // 0: for base; 1: for ext;
|
||||
WelsSliceHeaderWrite,
|
||||
WelsSliceHeaderExtWrite
|
||||
};
|
||||
@@ -913,7 +913,7 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli
|
||||
|
||||
if ((kbSliceNumReachConstraint || !kbSliceIdxNotExceedConstraint)
|
||||
&& kbCurMbNotLastMbOfCurPartition
|
||||
&& JUMPPACKETSIZE_JUDGE (uiLen, iCurMbIdx,
|
||||
&& JUMPPACKETSIZE_JUDGE (uiLen, iCurMbIdx,
|
||||
pSliceCtx->uiSliceSizeConstraint - ((kiLastMbIdxInPartition - iCurMbIdx) <<
|
||||
(pCurSlice->uiAssumeLog2BytePerMb) //assume each MB consumes these byte under largest QP
|
||||
))
|
||||
|
||||
@@ -864,7 +864,7 @@ bool CalculateFeatureOfBlock (SWelsFuncPtrList* pFunc, SPicture* pRef,
|
||||
return true;
|
||||
}
|
||||
|
||||
void PerformFMEPreprocess (SWelsFuncPtrList* pFunc, SPicture* pRef, uint16_t* pFeatureOfBlock,
|
||||
void PerformFMEPreprocess (SWelsFuncPtrList* pFunc, SPicture* pRef, uint16_t* pFeatureOfBlock,
|
||||
SScreenBlockFeatureStorage* pScreenBlockFeatureStorage) {
|
||||
pScreenBlockFeatureStorage->pFeatureOfBlockPointer = pFeatureOfBlock;
|
||||
pScreenBlockFeatureStorage->bRefBlockFeatureCalculated = CalculateFeatureOfBlock (pFunc, pRef,
|
||||
|
||||
@@ -208,7 +208,7 @@ void WelsSpatialWriteSubMbPred (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurM
|
||||
}
|
||||
}
|
||||
|
||||
int32_t CheckBitstreamBuffer (const uint32_t kuiSliceIdx, sWelsEncCtx* pEncCtx, SBitStringAux* pBs) {
|
||||
int32_t CheckBitstreamBuffer (const uint32_t kuiSliceIdx, sWelsEncCtx* pEncCtx, SBitStringAux* pBs) {
|
||||
const intX_t iLeftLength = pBs->pEndBuf - pBs->pCurBuf - 1;
|
||||
assert (iLeftLength > 0);
|
||||
|
||||
|
||||
@@ -582,7 +582,7 @@ int32_t CWelsPreProcess::DownsamplePadding (SPicture* pSrc, SPicture* pDstPic,
|
||||
iShrinkWidth -= (iShrinkWidth & 1);
|
||||
iShrinkHeight -= (iShrinkHeight & 1);
|
||||
Padding ((uint8_t*)sDstPicMap.pPixel[0], (uint8_t*)sDstPicMap.pPixel[1], (uint8_t*)sDstPicMap.pPixel[2],
|
||||
sDstPicMap.iStride[0], sDstPicMap.iStride[1], iShrinkWidth, iTargetWidth, iShrinkHeight, iTargetHeight);
|
||||
sDstPicMap.iStride[0], sDstPicMap.iStride[1], iShrinkWidth, iTargetWidth, iShrinkHeight, iTargetHeight);
|
||||
|
||||
return iRet;
|
||||
}
|
||||
@@ -1209,7 +1209,7 @@ void CWelsPreProcess::WelsExchangeSpatialPictures (SPicture** ppPic1, SPicture**
|
||||
*ppPic2 = tmp;
|
||||
}
|
||||
|
||||
void CWelsPreProcess::UpdateSrcListLosslessScreenRefSelectionWithLtr (SPicture* pCurPicture, const int32_t kiCurDid,
|
||||
void CWelsPreProcess::UpdateSrcListLosslessScreenRefSelectionWithLtr (SPicture* pCurPicture, const int32_t kiCurDid,
|
||||
const int32_t kuiMarkLongTermPicIdx, SPicture** pLongRefList) {
|
||||
SPicture** pLongRefSrcList = &m_pSpatialPic[kiCurDid][0];
|
||||
for (int32_t i = 0; i < MAX_REF_PIC_COUNT; ++i) {
|
||||
@@ -1225,7 +1225,7 @@ void CWelsPreProcess::UpdateSrcListLosslessScreenRefSelectionWithLtr (SPicture*
|
||||
m_iAvaliableRefInSpatialPicList = MAX_REF_PIC_COUNT;
|
||||
(GetCurrentFrameFromOrigList (kiCurDid))->SetUnref();
|
||||
}
|
||||
void CWelsPreProcess::UpdateSrcList (SPicture* pCurPicture, const int32_t kiCurDid, SPicture** pShortRefList,
|
||||
void CWelsPreProcess::UpdateSrcList (SPicture* pCurPicture, const int32_t kiCurDid, SPicture** pShortRefList,
|
||||
const uint32_t kuiShortRefCount) {
|
||||
SPicture** pRefSrcList = &m_pSpatialPic[kiCurDid][0];
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ int CWelsH264SVCEncoder::Initialize (const SEncParamBase* argv) {
|
||||
return cmInitParaError;
|
||||
}
|
||||
|
||||
SWelsSvcCodingParam sConfig;
|
||||
SWelsSvcCodingParam sConfig;
|
||||
// Convert SEncParamBase into WelsSVCParamConfig here..
|
||||
if (sConfig.ParamBaseTranscode (*argv)) {
|
||||
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR,
|
||||
@@ -221,7 +221,7 @@ int CWelsH264SVCEncoder::InitializeExt (const SEncParamExt* argv) {
|
||||
return cmInitParaError;
|
||||
}
|
||||
|
||||
SWelsSvcCodingParam sConfig;
|
||||
SWelsSvcCodingParam sConfig;
|
||||
// Convert SEncParamExt into WelsSVCParamConfig here..
|
||||
if (sConfig.ParamTranscode (*argv)) {
|
||||
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR,
|
||||
|
||||
@@ -261,7 +261,7 @@ inline bool CBackgroundDetection::ForegroundDilation23Chroma (int8_t iNeighbourF
|
||||
}
|
||||
|
||||
inline void CBackgroundDetection::ForegroundDilation (SBackgroundOU* pBackgroundOU, SBackgroundOU* pOUNeighbours[],
|
||||
vBGDParam* pBgdParam, int32_t iChromaSampleStartPos) {
|
||||
vBGDParam* pBgdParam, int32_t iChromaSampleStartPos) {
|
||||
int32_t iPicStrideUV = pBgdParam->iStride[1];
|
||||
int32_t iSumNeighBackgroundFlags = pOUNeighbours[0]->iBackgroundFlag + pOUNeighbours[1]->iBackgroundFlag +
|
||||
pOUNeighbours[2]->iBackgroundFlag + pOUNeighbours[3]->iBackgroundFlag;
|
||||
|
||||
@@ -87,7 +87,7 @@ class CBackgroundDetection : public IStrategy {
|
||||
inline bool ForegroundDilation23Chroma (int8_t iNeighbourForegroundFlags, int32_t iStartSamplePos,
|
||||
int32_t iPicStrideUV, vBGDParam* pBgdParam);//Foreground_Dilation_2_3_Chroma
|
||||
inline void ForegroundDilation (SBackgroundOU* pBackgroundOU, SBackgroundOU* pOUNeighbours[], vBGDParam* pBgdParam,
|
||||
int32_t iChromaSampleStartPos);
|
||||
int32_t iChromaSampleStartPos);
|
||||
inline void BackgroundErosion (SBackgroundOU* pBackgroundOU, SBackgroundOU* pOUNeighbours[]);
|
||||
inline void SetBackgroundMbFlag (int8_t* pBackgroundMbFlag, int32_t iPicWidthInMb, int32_t iBackgroundMbFlag);
|
||||
inline void UpperOUForegroundCheck (SBackgroundOU* pCurOU, int8_t* pBackgroundMbFlag, int32_t iPicWidthInOU,
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
WELSVP_NAMESPACE_BEGIN
|
||||
|
||||
void BilateralLumaFilter8_c (uint8_t* pSample, int32_t iStride) {
|
||||
void BilateralLumaFilter8_c (uint8_t* pSample, int32_t iStride) {
|
||||
int32_t nSum = 0, nTotWeight = 0;
|
||||
int32_t iCenterSample = *pSample;
|
||||
uint8_t* pCurLine = pSample - iStride - DENOISE_GRAY_RADIUS;
|
||||
@@ -59,7 +59,7 @@ void BilateralLumaFilter8_c (uint8_t* pSample, int32_t iStride) {
|
||||
iCurSample = pCurLine[x];
|
||||
iCurWeight = WELS_ABS (iCurSample - iCenterSample);
|
||||
iGreyDiff = 32 - iCurWeight;
|
||||
if (iGreyDiff < 0) continue;
|
||||
if (iGreyDiff < 0) continue;
|
||||
else iCurWeight = (iGreyDiff * iGreyDiff) >> 5;
|
||||
nSum += iCurSample * iCurWeight;
|
||||
nTotWeight += iCurWeight;
|
||||
@@ -86,7 +86,7 @@ void BilateralLumaFilter8_c (uint8_t* pSample, int32_t iStride) {
|
||||
#define SUM_LINE1(pSample) (pSample[0] +(pSample[1]) +(pSample[2]<<1) + pSample[3] + pSample[4])
|
||||
#define SUM_LINE2(pSample) (pSample[0] +(pSample[1]<<1) +(pSample[2]<<2) +(pSample[3]<<1) +pSample[4])
|
||||
#define SUM_LINE3(pSample) ((pSample[0]<<1) +(pSample[1]<<2) +(pSample[2]*20) +(pSample[3]<<2) +(pSample[4]<<1))
|
||||
void WaverageChromaFilter8_c (uint8_t* pSample, int32_t iStride) {
|
||||
void WaverageChromaFilter8_c (uint8_t* pSample, int32_t iStride) {
|
||||
int32_t sum;
|
||||
uint8_t* pStartPixels = pSample - UV_WINDOWS_RADIUS * iStride - UV_WINDOWS_RADIUS;
|
||||
uint8_t* pCurLine1 = pStartPixels;
|
||||
@@ -111,7 +111,7 @@ edge of y/uv use a 3x3 Gauss filter, radius = 1:
|
||||
2 4 2
|
||||
1 2 1
|
||||
***************************************************************************/
|
||||
void Gauss3x3Filter (uint8_t* pSrc, int32_t iStride) {
|
||||
void Gauss3x3Filter (uint8_t* pSrc, int32_t iStride) {
|
||||
int32_t nSum = 0;
|
||||
uint8_t* pCurLine1 = pSrc - iStride - 1;
|
||||
uint8_t* pCurLine2 = pCurLine1 + iStride;
|
||||
|
||||
@@ -51,7 +51,7 @@ WELSVP_NAMESPACE_BEGIN
|
||||
typedef void (ImageRotateFunc) (uint8_t* pSrc, uint32_t uiBytesPerPixel, uint32_t iWidth, uint32_t iHeight,
|
||||
uint8_t* pDst);
|
||||
|
||||
typedef ImageRotateFunc* ImageRotateFuncPtr;
|
||||
typedef ImageRotateFunc* ImageRotateFuncPtr;
|
||||
|
||||
ImageRotateFunc ImageRotate90D_c;
|
||||
ImageRotateFunc ImageRotate180D_c;
|
||||
|
||||
@@ -109,7 +109,7 @@ bool CompareImage (uint8_t* pSrc0, uint8_t* pSrc1, int32_t iSize) {
|
||||
}
|
||||
|
||||
TEST (ExpandPicture, ExpandPictureLuma) {
|
||||
SExpandPicFunc sExpandPicFunc;
|
||||
SExpandPicFunc sExpandPicFunc;
|
||||
int32_t iCpuCores = 1;
|
||||
uint32_t uiCpuFlag = 0;
|
||||
for (int32_t k = 0; k < 2; k++) {
|
||||
@@ -151,7 +151,7 @@ TEST (ExpandPicture, ExpandPictureLuma) {
|
||||
}
|
||||
|
||||
TEST (ExpandPicture, ExpandPictureChroma) {
|
||||
SExpandPicFunc sExpandPicFunc;
|
||||
SExpandPicFunc sExpandPicFunc;
|
||||
int32_t iCpuCores = 1;
|
||||
uint32_t uiCpuFlag = 0;
|
||||
for (int32_t k = 0; k < 2; k++) {
|
||||
@@ -197,7 +197,7 @@ TEST (ExpandPicture, ExpandPictureChroma) {
|
||||
}
|
||||
|
||||
TEST (ExpandPicture, ExpandPicForMotion) {
|
||||
SExpandPicFunc sExpandPicFunc;
|
||||
SExpandPicFunc sExpandPicFunc;
|
||||
int32_t iCpuCores = 1;
|
||||
uint32_t uiCpuFlag = 0;
|
||||
for (int32_t k = 0; k < 2; k++) {
|
||||
|
||||
Reference in New Issue
Block a user