diff --git a/codec/common/src/deblocking_common.cpp b/codec/common/src/deblocking_common.cpp index 66b0f759..81f41ef4 100644 --- a/codec/common/src/deblocking_common.cpp +++ b/codec/common/src/deblocking_common.cpp @@ -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' */ diff --git a/codec/common/src/utils.cpp b/codec/common/src/utils.cpp index d3c9e244..086d5938 100644 --- a/codec/common/src/utils.cpp +++ b/codec/common/src/utils.cpp @@ -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; diff --git a/codec/console/enc/src/welsenc.cpp b/codec/console/enc/src/welsenc.cpp index 440ff952..345fd262 100644 --- a/codec/console/enc/src/welsenc.cpp +++ b/codec/console/enc/src/welsenc.cpp @@ -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; diff --git a/codec/decoder/core/inc/fmo.h b/codec/decoder/core/inc/fmo.h index 463c074d..45975961 100644 --- a/codec/decoder/core/inc/fmo.h +++ b/codec/decoder/core/inc/fmo.h @@ -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 diff --git a/codec/decoder/core/src/au_parser.cpp b/codec/decoder/core/src/au_parser.cpp index 0e15c0d0..5f0f627a 100644 --- a/codec/decoder/core/src/au_parser.cpp +++ b/codec/decoder/core/src/au_parser.cpp @@ -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; diff --git a/codec/decoder/core/src/decode_slice.cpp b/codec/decoder/core/src/decode_slice.cpp index f7e8168c..a5c6b981 100644 --- a/codec/decoder/core/src/decode_slice.cpp +++ b/codec/decoder/core/src/decode_slice.cpp @@ -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); diff --git a/codec/decoder/core/src/fmo.cpp b/codec/decoder/core/src/fmo.cpp index 80670aa1..c3724a92 100644 --- a/codec/decoder/core/src/fmo.cpp +++ b/codec/decoder/core/src/fmo.cpp @@ -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); } diff --git a/codec/decoder/core/src/manage_dec_ref.cpp b/codec/decoder/core/src/manage_dec_ref.cpp index 1d10d6f0..b15ddd87 100644 --- a/codec/decoder/core/src/manage_dec_ref.cpp +++ b/codec/decoder/core/src/manage_dec_ref.cpp @@ -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; } diff --git a/codec/decoder/core/src/parse_mb_syn_cavlc.cpp b/codec/decoder/core/src/parse_mb_syn_cavlc.cpp index f3adb0a5..a7b7dd64 100644 --- a/codec/decoder/core/src/parse_mb_syn_cavlc.cpp +++ b/codec/decoder/core/src/parse_mb_syn_cavlc.cpp @@ -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; diff --git a/codec/encoder/core/inc/mb_cache.h b/codec/encoder/core/inc/mb_cache.h index 685e73ef..8423229c 100644 --- a/codec/encoder/core/inc/mb_cache.h +++ b/codec/encoder/core/inc/mb_cache.h @@ -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 diff --git a/codec/encoder/core/inc/svc_enc_frame.h b/codec/encoder/core/inc/svc_enc_frame.h index 8047558b..caf96fea 100644 --- a/codec/encoder/core/inc/svc_enc_frame.h +++ b/codec/encoder/core/inc/svc_enc_frame.h @@ -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__ diff --git a/codec/encoder/core/inc/wels_preprocess.h b/codec/encoder/core/inc/wels_preprocess.h index aae7adbd..c4b90c2a 100644 --- a/codec/encoder/core/inc/wels_preprocess.h +++ b/codec/encoder/core/inc/wels_preprocess.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: diff --git a/codec/encoder/core/src/encoder_ext.cpp b/codec/encoder/core/src/encoder_ext.cpp index ffd187ac..9cda6d0a 100644 --- a/codec/encoder/core/src/encoder_ext.cpp +++ b/codec/encoder/core/src/encoder_ext.cpp @@ -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; diff --git a/codec/encoder/core/src/md.cpp b/codec/encoder/core/src/md.cpp index ca7cf004..88a06f87 100644 --- a/codec/encoder/core/src/md.cpp +++ b/codec/encoder/core/src/md.cpp @@ -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) { diff --git a/codec/encoder/core/src/ratectl.cpp b/codec/encoder/core/src/ratectl.cpp index e9b4727c..3113e996 100644 --- a/codec/encoder/core/src/ratectl.cpp +++ b/codec/encoder/core/src/ratectl.cpp @@ -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; } diff --git a/codec/encoder/core/src/svc_base_layer_md.cpp b/codec/encoder/core/src/svc_base_layer_md.cpp index 875bf480..03bb810b 100644 --- a/codec/encoder/core/src/svc_base_layer_md.cpp +++ b/codec/encoder/core/src/svc_base_layer_md.cpp @@ -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; diff --git a/codec/encoder/core/src/svc_enc_slice_segment.cpp b/codec/encoder/core/src/svc_enc_slice_segment.cpp index 672d6d00..2f64ae18 100644 --- a/codec/encoder/core/src/svc_enc_slice_segment.cpp +++ b/codec/encoder/core/src/svc_enc_slice_segment.cpp @@ -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; diff --git a/codec/encoder/core/src/svc_encode_mb.cpp b/codec/encoder/core/src/svc_encode_mb.cpp index 39e2d7b7..0743a0e9 100644 --- a/codec/encoder/core/src/svc_encode_mb.cpp +++ b/codec/encoder/core/src/svc_encode_mb.cpp @@ -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); diff --git a/codec/encoder/core/src/svc_encode_slice.cpp b/codec/encoder/core/src/svc_encode_slice.cpp index 09d9250c..3e734979 100644 --- a/codec/encoder/core/src/svc_encode_slice.cpp +++ b/codec/encoder/core/src/svc_encode_slice.cpp @@ -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 )) diff --git a/codec/encoder/core/src/svc_motion_estimate.cpp b/codec/encoder/core/src/svc_motion_estimate.cpp index 6b926a10..49f346bb 100644 --- a/codec/encoder/core/src/svc_motion_estimate.cpp +++ b/codec/encoder/core/src/svc_motion_estimate.cpp @@ -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, diff --git a/codec/encoder/core/src/svc_set_mb_syn_cavlc.cpp b/codec/encoder/core/src/svc_set_mb_syn_cavlc.cpp index 70d89bce..9b45cded 100644 --- a/codec/encoder/core/src/svc_set_mb_syn_cavlc.cpp +++ b/codec/encoder/core/src/svc_set_mb_syn_cavlc.cpp @@ -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); diff --git a/codec/encoder/core/src/wels_preprocess.cpp b/codec/encoder/core/src/wels_preprocess.cpp index 9acb3129..08f4140e 100644 --- a/codec/encoder/core/src/wels_preprocess.cpp +++ b/codec/encoder/core/src/wels_preprocess.cpp @@ -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]; diff --git a/codec/encoder/plus/src/welsEncoderExt.cpp b/codec/encoder/plus/src/welsEncoderExt.cpp index 05fa3140..869dab06 100644 --- a/codec/encoder/plus/src/welsEncoderExt.cpp +++ b/codec/encoder/plus/src/welsEncoderExt.cpp @@ -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, diff --git a/codec/processing/src/backgrounddetection/BackgroundDetection.cpp b/codec/processing/src/backgrounddetection/BackgroundDetection.cpp index b1d09bba..98e93740 100644 --- a/codec/processing/src/backgrounddetection/BackgroundDetection.cpp +++ b/codec/processing/src/backgrounddetection/BackgroundDetection.cpp @@ -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; diff --git a/codec/processing/src/backgrounddetection/BackgroundDetection.h b/codec/processing/src/backgrounddetection/BackgroundDetection.h index 7ffae495..a442a625 100644 --- a/codec/processing/src/backgrounddetection/BackgroundDetection.h +++ b/codec/processing/src/backgrounddetection/BackgroundDetection.h @@ -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, diff --git a/codec/processing/src/denoise/denoise_filter.cpp b/codec/processing/src/denoise/denoise_filter.cpp index 8a507a91..0d7793fe 100644 --- a/codec/processing/src/denoise/denoise_filter.cpp +++ b/codec/processing/src/denoise/denoise_filter.cpp @@ -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; diff --git a/codec/processing/src/imagerotate/imagerotate.h b/codec/processing/src/imagerotate/imagerotate.h index ead10a4d..6e159b99 100644 --- a/codec/processing/src/imagerotate/imagerotate.h +++ b/codec/processing/src/imagerotate/imagerotate.h @@ -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; diff --git a/test/common/ExpandPicture.cpp b/test/common/ExpandPicture.cpp index 99bb58d6..50aca164 100644 --- a/test/common/ExpandPicture.cpp +++ b/test/common/ExpandPicture.cpp @@ -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++) {