Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 57 files). Show all
Unified · Split
| @@ -51,7 +51,7 @@ · 50 unmodified lines | ||
| 51 | 51 | #include "deblocking.h" |
| 52 | 52 | #include "ref_list_mgr_svc.h" |
| 53 | 53 | #include "ls_defines.h" |
| 54 | −#include "crt_util_safe_x.h" // Safe CRT routines like utils for cross platforms | |
| 54 | +#include "crt_util_safe_x.h" // Safe CRT routines like utils for cross platforms | |
| 55 | 55 | #include "slice_multi_threading.h" |
| 56 | 56 | #include "measure_time.h" |
| 57 | 57 | #include "svc_set_mb_syn.h" |
| @@ -64,8 +64,8 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 6 unmodified lines | ||
| 64 | 64 | SLayerBSInfo* pLayerBsInfo, |
| 65 | 65 | int32_t* pNalIdxInLayer, |
| 66 | 66 | int32_t* pLayerSize, |
| 67 | − int32_t iFirstMbInPartition, // first mb inclusive in partition | |
| 68 | − int32_t iEndMbInPartition, // end mb exclusive in partition | |
| 67 | + int32_t iFirstMbInPartition, // first mb inclusive in partition | |
| 68 | + int32_t iEndMbInPartition, // end mb exclusive in partition | |
| 69 | 69 | int32_t iStartSliceIdx |
| 70 | 70 | ); |
| 71 | 71 | |
| @@ -453,7 +453,7 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 381 unmodified lines | ||
| 453 | 453 | pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE; |
| 454 | 454 | break; |
| 455 | 455 | } |
| 456 | − if (pCodingParam->iRCMode != RC_OFF_MODE) { // multiple slices verify with gom | |
| 456 | + if (pCodingParam->iRCMode != RC_OFF_MODE) { // multiple slices verify with gom | |
| 457 | 457 | //check uiSliceNum and set uiSliceMbNum with current uiSliceNum |
| 458 | 458 | if (!GomValidCheckSliceNum (iMbWidth, iMbHeight, &pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum)) { |
| 459 | 459 | WelsLog (pLogCtx, WELS_LOG_WARNING, |
| @@ -469,7 +469,7 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 9 unmodified lines | ||
| 469 | 469 | } |
| 470 | 470 | assert (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum > 1); |
| 471 | 471 | } else if (!CheckFixedSliceNumMultiSliceSetting (iMbNumInFrame, |
| 472 | − &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings | |
| 472 | + &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings | |
| 473 | 473 | //check uiSliceMbNum with current uiSliceNum |
| 474 | 474 | WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!", |
| 475 | 475 | pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0]); |
| @@ -501,13 +501,13 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 25 unmodified lines | ||
| 501 | 501 | } |
| 502 | 502 | |
| 503 | 503 | if (!CheckRasterMultiSliceSetting (iMbNumInFrame, |
| 504 | − &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings | |
| 504 | + &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings | |
| 505 | 505 | WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!", |
| 506 | 506 | pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0]); |
| 507 | 507 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 508 | 508 | } |
| 509 | 509 | if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum <= 0 |
| 510 | − || pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum > iMaxSliceNum) { // verify interleave mode settings | |
| 510 | + || pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum > iMaxSliceNum) { // verify interleave mode settings | |
| 511 | 511 | WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) in SM_RASTER_SLICE settings!", |
| 512 | 512 | pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum); |
| 513 | 513 | return ENC_RETURN_UNSUPPORTED_PARA; |
| @@ -548,7 +548,7 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 34 unmodified lines | ||
| 548 | 548 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 549 | 549 | } |
| 550 | 550 | if (!CheckRowMbMultiSliceSetting (iMbWidth, |
| 551 | − &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings | |
| 551 | + &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings | |
| 552 | 552 | WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!", |
| 553 | 553 | pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0]); |
| 554 | 554 | return ENC_RETURN_UNSUPPORTED_PARA; |
| @@ -1178,7 +1178,7 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx, SExistingParasetList* p · 623 unmodified lines | ||
| 1178 | 1178 | } |
| 1179 | 1179 | } |
| 1180 | 1180 | // fix issue in case single pSlice coding might be inclusive exist in variant spatial layer setting, also introducing multi-pSlice modes |
| 1181 | − else { // only one pSlice | |
| 1181 | + else { // only one pSlice | |
| 1182 | 1182 | SSlice* pSlice = &pDqLayer->sLayerInfo.pSliceInLayer[0]; |
| 1183 | 1183 | pSlice->uiSliceIdx = 0; |
| 1184 | 1184 | pSlice->pSliceBsa = & (*ppCtx)->pOut->sBsWrite; |
| @@ -1410,8 +1410,8 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers · 225 unmodified lines | ||
| 1410 | 1410 | uint8_t* pBaseDec = NULL, *pBaseEnc = NULL, *pBaseMbX = NULL, *pBaseMbY = NULL; |
| 1411 | 1411 | struct { |
| 1412 | 1412 | int32_t iMbWidth; |
| 1413 | − int32_t iCountMbNum; // count number of SMB in each spatial | |
| 1414 | − int32_t iSizeAllMbAlignCache; // cache line size aligned in each spatial | |
| 1413 | + int32_t iCountMbNum; // count number of SMB in each spatial | |
| 1414 | + int32_t iSizeAllMbAlignCache; // cache line size aligned in each spatial | |
| 1415 | 1415 | } sMbSizeMap[MAX_DEPENDENCY_LAYER] = {{ 0 }}; |
| 1416 | 1416 | int32_t iLineSizeY[MAX_DEPENDENCY_LAYER][2] = {{ 0 }}; |
| 1417 | 1417 | int32_t iLineSizeUV[MAX_DEPENDENCY_LAYER][2] = {{ 0 }}; |
| @@ -1607,7 +1607,7 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers · 189 unmodified lines | ||
| 1607 | 1607 | |
| 1608 | 1608 | i = 0; |
| 1609 | 1609 | while (i < kiMbHeight) { |
| 1610 | − memcpy (pMbIndexX, pRowX, kiLineSize); // confirmed_safe_unsafe_usage | |
| 1610 | + memcpy (pMbIndexX, pRowX, kiLineSize); // confirmed_safe_unsafe_usage | |
| 1611 | 1611 | |
| 1612 | 1612 | pMbIndexX += kiMbWidth; |
| 1613 | 1613 | ++ i; |
| @@ -1630,7 +1630,7 @@ int32_t AllocStrideTables (sWelsEncCtx** ppCtx, const int32_t kiNumSpatialLayers · 16 unmodified lines | ||
| 1630 | 1630 | int16_t* pMbIndexY = pPtr->pMbIndexY[iSpatialIdx] + i * kiMbWidth; |
| 1631 | 1631 | |
| 1632 | 1632 | if (i < kiMbHeight) { |
| 1633 | − memcpy (pMbIndexY, pRowY, kiLineSize); // confirmed_safe_unsafe_usage | |
| 1633 | + memcpy (pMbIndexY, pRowY, kiLineSize); // confirmed_safe_unsafe_usage | |
| 1634 | 1634 | } |
| 1635 | 1635 | } |
| 1636 | 1636 | ++ i; |
| @@ -2205,7 +2205,7 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 568 unmodified lines | ||
| 2205 | 2205 | } |
| 2206 | 2206 | |
| 2207 | 2207 | #if defined(MEMORY_MONITOR) |
| 2208 | − assert (pMa->WelsGetMemoryUsage() == 0); // ensure all memory free well | |
| 2208 | + assert (pMa->WelsGetMemoryUsage() == 0); // ensure all memory free well | |
| 2209 | 2209 | #endif//MEMORY_MONITOR |
| 2210 | 2210 | |
| 2211 | 2211 | if ((*ppCtx)->pMemAlign != NULL) { |
| @@ -2277,7 +2277,7 @@ int32_t InitSliceSettings (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPar · 65 unmodified lines | ||
| 2277 | 2277 | pDlp->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE; |
| 2278 | 2278 | break; |
| 2279 | 2279 | } |
| 2280 | − if (pCodingParam->iRCMode != RC_OFF_MODE) { // multiple slices verify with gom | |
| 2280 | + if (pCodingParam->iRCMode != RC_OFF_MODE) { // multiple slices verify with gom | |
| 2281 | 2281 | //check uiSliceNum and set uiSliceMbNum with current uiSliceNum |
| 2282 | 2282 | if (!GomValidCheckSliceNum (kiMbWidth, kiMbHeight, &pDlp->sSliceCfg.sSliceArgument.uiSliceNum)) { |
| 2283 | 2283 | WelsLog (pLogCtx, WELS_LOG_WARNING, |
| @@ -2292,7 +2292,7 @@ int32_t InitSliceSettings (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPar · 8 unmodified lines | ||
| 2292 | 2292 | return ENC_RETURN_INVALIDINPUT; |
| 2293 | 2293 | } |
| 2294 | 2294 | } else if (!CheckFixedSliceNumMultiSliceSetting (kiMbNumInFrame, |
| 2295 | − &pDlp->sSliceCfg.sSliceArgument)) { // verify interleave mode settings | |
| 2295 | + &pDlp->sSliceCfg.sSliceArgument)) { // verify interleave mode settings | |
| 2296 | 2296 | //check uiSliceMbNum with current uiSliceNum |
| 2297 | 2297 | WelsLog (pLogCtx, WELS_LOG_ERROR, |
| 2298 | 2298 | "InitSliceSettings(), invalid uiSliceMbNum (%d) settings!,now turn to SM_SINGLE_SLICE type", |
| @@ -2400,7 +2400,7 @@ int32_t GetMultipleThreadIdc (SLogContext* pLogCtx, SWelsSvcCodingParam* pCoding · 101 unmodified lines | ||
| 2400 | 2400 | uiCpuCores = pCodingParam->iMultipleThreadIdc; |
| 2401 | 2401 | else { |
| 2402 | 2402 | if (uiCpuCores == |
| 2403 | − 0) // cpuid not supported or doesn't expose the number of cores, use high level system API as followed to detect number of pysical/logic processor | |
| 2403 | + 0) // cpuid not supported or doesn't expose the number of cores, use high level system API as followed to detect number of pysical/logic processor | |
| 2404 | 2404 | uiCpuCores = DynamicDetectCpuCores(); |
| 2405 | 2405 | // So far so many cpu cores up to MAX_THREADS_NUM mean for server platforms, |
| 2406 | 2406 | // for client application here it is constrained by maximal to MAX_THREADS_NUM |
| @@ -2475,7 +2475,7 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 68 unmodified lines | ||
| 2475 | 2475 | FreeMemorySvc (&pCtx); |
| 2476 | 2476 | return iRet; |
| 2477 | 2477 | } |
| 2478 | − memcpy (pCtx->pSvcParam, pCodingParam, sizeof (SWelsSvcCodingParam)); // confirmed_safe_unsafe_usage | |
| 2478 | + memcpy (pCtx->pSvcParam, pCodingParam, sizeof (SWelsSvcCodingParam)); // confirmed_safe_unsafe_usage | |
| 2479 | 2479 | |
| 2480 | 2480 | pCtx->pFuncList = (SWelsFuncPtrList*)pCtx->pMemAlign->WelsMalloc (sizeof (SWelsFuncPtrList), "SWelsFuncPtrList"); |
| 2481 | 2481 | if (NULL == pCtx->pFuncList) { |
| @@ -2639,7 +2639,7 @@ void WelsUninitEncoderExt (sWelsEncCtx** ppCtx) { · 157 unmodified lines | ||
| 2639 | 2639 | if ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]) { |
| 2640 | 2640 | WelsEventSignal (& (*ppCtx)->pSliceThreading->pExitEncodeEvent[iThreadIdx]); |
| 2641 | 2641 | WelsEventSignal (& (*ppCtx)->pSliceThreading->pThreadMasterEvent[iThreadIdx]); |
| 2642 | − res = WelsThreadJoin ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]); // waiting thread exit | |
| 2642 | + res = WelsThreadJoin ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]); // waiting thread exit | |
| 2643 | 2643 | WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pthread_join(pThreadHandles%d) return %d..", |
| 2644 | 2644 | iThreadIdx, |
| 2645 | 2645 | res); |
| @@ -2844,7 +2844,7 @@ void WelsInitCurrentLayer (sWelsEncCtx* pCtx, · 198 unmodified lines | ||
| 2844 | 2844 | |
| 2845 | 2845 | pCurDq->pDecPic = pDecPic; |
| 2846 | 2846 | |
| 2847 | − if (fDlp->sSliceCfg.uiSliceMode == SM_DYN_SLICE) // need get extra slices for update | |
| 2847 | + if (fDlp->sSliceCfg.uiSliceMode == SM_DYN_SLICE) // need get extra slices for update | |
| 2848 | 2848 | iSliceCount = GetInitialSliceNum (pCurDq->iMbWidth, pCurDq->iMbHeight, &fDlp->sSliceCfg); |
| 2849 | 2849 | else |
| 2850 | 2850 | iSliceCount = GetCurrentSliceNum (pCurDq->pSliceEncCtx); |
| @@ -3146,7 +3146,7 @@ void ParasetIdAdditionIdAdjust (SParaSetOffsetVariable* sParaSetOffsetVariable, · 295 unmodified lines | ||
| 3146 | 3146 | sParaSetOffsetVariable->iParaSetIdDelta[kiEncId] = uiNextIdInBs - |
| 3147 | 3147 | kiEncId; //for current parameter set, change its id_delta |
| 3148 | 3148 | //write pso pData for next update: |
| 3149 | − sParaSetOffsetVariable->bUsedParaSetIdInBs[uiNextIdInBs] = true; // update current used_id | |
| 3149 | + sParaSetOffsetVariable->bUsedParaSetIdInBs[uiNextIdInBs] = true; // update current used_id | |
| 3150 | 3150 | |
| 3151 | 3151 | //prepare for next update: |
| 3152 | 3152 | // find the next avaibable iId |
| @@ -3716,7 +3716,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 563 unmodified lines | ||
| 3716 | 3716 | pCtx->pFuncList->pfRc.pfWelsUpdateMaxBrWindowStatus (pCtx, iSpatialNum, pSrcPic->uiTimeStamp); |
| 3717 | 3717 | } |
| 3718 | 3718 | |
| 3719 | − if (iSpatialNum < 1) { // skip due to temporal layer settings (different frame rate) | |
| 3719 | + if (iSpatialNum < 1) { // skip due to temporal layer settings (different frame rate) | |
| 3720 | 3720 | ++ pCtx->iCodingIndex; |
| 3721 | 3721 | pFbi->eFrameType = videoFrameTypeSkip; |
| 3722 | 3722 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, |
| @@ -3879,16 +3879,16 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 156 unmodified lines | ||
| 3879 | 3879 | && (pCtx->iNumRef0 > 0)) ? pCtx->pRefList0[0] : NULL, |
| 3880 | 3880 | iCurDid, (pCtx->eSliceType == P_SLICE) && pSvcParam->bEnableBackgroundDetection); |
| 3881 | 3881 | WelsUpdateRefSyntax (pCtx, pCtx->iPOC, |
| 3882 | − eFrameType); //get reordering syntax used for writing slice header and transmit to encoder. | |
| 3883 | − PrefetchReferencePicture (pCtx, eFrameType); // update reference picture for current pDq layer | |
| 3882 | + eFrameType); //get reordering syntax used for writing slice header and transmit to encoder. | |
| 3883 | + PrefetchReferencePicture (pCtx, eFrameType); // update reference picture for current pDq layer | |
| 3884 | 3884 | |
| 3885 | 3885 | pCtx->pFuncList->pfRc.pfWelsRcPictureInit (pCtx, pSrcPic->uiTimeStamp); |
| 3886 | − PreprocessSliceCoding (pCtx); // MUST be called after pfWelsRcPictureInit() and WelsInitCurrentLayer() | |
| 3886 | + PreprocessSliceCoding (pCtx); // MUST be called after pfWelsRcPictureInit() and WelsInitCurrentLayer() | |
| 3887 | 3887 | |
| 3888 | 3888 | //TODO Complexity Calculation here for screen content |
| 3889 | 3889 | iLayerSize = 0; |
| 3890 | 3890 | |
| 3891 | − if (SM_SINGLE_SLICE == pParam->sSliceCfg.uiSliceMode) { // only one slice within a sQualityStat layer | |
| 3891 | + if (SM_SINGLE_SLICE == pParam->sSliceCfg.uiSliceMode) { // only one slice within a sQualityStat layer | |
| 3892 | 3892 | int32_t iSliceSize = 0; |
| 3893 | 3893 | int32_t iPayloadSize = 0; |
| 3894 | 3894 | |
| @@ -3948,7 +3948,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 53 unmodified lines | ||
| 3948 | 3948 | return ENC_RETURN_UNEXPECTED; |
| 3949 | 3949 | } |
| 3950 | 3950 | |
| 3951 | − if (pSvcParam->iCountThreadsNum >= iSliceCount) { //THREAD_FULLY_FIRE_MODE | |
| 3951 | + if (pSvcParam->iCountThreadsNum >= iSliceCount) { //THREAD_FULLY_FIRE_MODE | |
| 3952 | 3952 | #if defined(MT_DEBUG) |
| 3953 | 3953 | int64_t t_bs_append = 0; |
| 3954 | 3954 | #endif |
| @@ -3986,7 +3986,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 31 unmodified lines | ||
| 3986 | 3986 | t_bs_append, pCtx->iCodingIndex, iCurDid, 0); |
| 3987 | 3987 | } |
| 3988 | 3988 | #endif//MT_DEBUG |
| 3989 | − } else { //THREAD_PICK_UP_MODE | |
| 3989 | + } else { //THREAD_PICK_UP_MODE | |
| 3990 | 3990 | int32_t iNumThreadsRunning = 0; |
| 3991 | 3991 | int32_t iNumThreadsScheduled = 0; |
| 3992 | 3992 | int32_t iIndexOfSliceToBeCoded = 0; |
| @@ -4026,7 +4026,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 33 unmodified lines | ||
| 4026 | 4026 | WelsEventSignal (&pCtx->pSliceThreading->pThreadMasterEvent[iEventId]); |
| 4027 | 4027 | |
| 4028 | 4028 | ++ iIndexOfSliceToBeCoded; |
| 4029 | − } else { // no other slices left for coding | |
| 4029 | + } else { // no other slices left for coding | |
| 4030 | 4030 | -- iNumThreadsRunning; |
| 4031 | 4031 | } |
| 4032 | 4032 | } |
| @@ -4320,7 +4320,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 287 unmodified lines | ||
| 4320 | 4320 | |
| 4321 | 4321 | #ifdef ENABLE_FRAME_DUMP |
| 4322 | 4322 | DumpRecFrame (fsnr, &pSvcParam->sDependencyLayers[pSvcParam->iSpatialLayerNum - 1].sRecFileName[0], |
| 4323 | − pSvcParam->iSpatialLayerNum - 1, pCtx->bRecFlag, pCtx->pCurDqLayer); // pDecPic: final reconstruction output | |
| 4323 | + pSvcParam->iSpatialLayerNum - 1, pCtx->bRecFlag, pCtx->pCurDqLayer); // pDecPic: final reconstruction output | |
| 4324 | 4324 | pCtx->bRecFlag = true; |
| 4325 | 4325 | |
| 4326 | 4326 | #endif//ENABLE_FRAME_DUMP |
| @@ -4431,7 +4431,7 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 104 unmodified lines | ||
| 4431 | 4431 | bNeedReset = true; |
| 4432 | 4432 | } |
| 4433 | 4433 | |
| 4434 | − if (!bNeedReset) { // Check its picture resolutions/quality settings respectively in each dependency layer | |
| 4434 | + if (!bNeedReset) { // Check its picture resolutions/quality settings respectively in each dependency layer | |
| 4435 | 4435 | iIndexD = 0; |
| 4436 | 4436 | assert (pOldParam->iSpatialLayerNum == pNewParam->iSpatialLayerNum); |
| 4437 | 4437 | do { |
| @@ -4628,7 +4628,7 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 190 unmodified lines | ||
| 4628 | 4628 | pOldDlpInternal->iDecompositionStages = pNewDlpInternal->iDecompositionStages; |
| 4629 | 4629 | |
| 4630 | 4630 | memcpy (pOldDlpInternal->uiCodingIdx2TemporalId, pNewDlpInternal->uiCodingIdx2TemporalId, |
| 4631 | − sizeof (pOldDlpInternal->uiCodingIdx2TemporalId)); // confirmed_safe_unsafe_usage | |
| 4631 | + sizeof (pOldDlpInternal->uiCodingIdx2TemporalId)); // confirmed_safe_unsafe_usage | |
| 4632 | 4632 | |
| 4633 | 4633 | ++ iIndexD; |
| 4634 | 4634 | } while (iIndexD < pOldParam->iSpatialLayerNum); |
| @@ -4829,8 +4829,8 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 194 unmodified lines | ||
| 4829 | 4829 | SLayerBSInfo* pLayerBsInfo, |
| 4830 | 4830 | int32_t* pNalIdxInLayer, |
| 4831 | 4831 | int32_t* pLayerSize, |
| 4832 | − int32_t iFirstMbInPartition, // first mb inclusive in partition | |
| 4833 | − int32_t iEndMbInPartition, // end mb exclusive in partition | |
| 4832 | + int32_t iFirstMbInPartition, // first mb inclusive in partition | |
| 4833 | + int32_t iEndMbInPartition, // end mb exclusive in partition | |
| 4834 | 4834 | int32_t iStartSliceIdx |
| 4835 | 4835 | ) { |
| 4836 | 4836 | |
| @@ -4860,7 +4860,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 23 unmodified lines | ||
| 4860 | 4860 | int32_t iSliceSize = 0; |
| 4861 | 4861 | int32_t iPayloadSize = 0; |
| 4862 | 4862 | |
| 4863 | − if (iSliceIdx >= (pSliceCtx->iMaxSliceNumConstraint - kiSliceIdxStep)) { // insufficient memory in pSliceInLayer[] | |
| 4863 | + if (iSliceIdx >= (pSliceCtx->iMaxSliceNumConstraint - kiSliceIdxStep)) { // insufficient memory in pSliceInLayer[] | |
| 4864 | 4864 | if (pCtx->iActiveThreadsNum == 1) { |
| 4865 | 4865 | //only single thread support re-alloc now |
| 4866 | 4866 | if (DynSliceRealloc (pCtx, pFrameBSInfo, pLayerBsInfo)) { |
| @@ -4909,7 +4909,7 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 42 unmodified lines | ||
| 4909 | 4909 | #endif//SLICE_INFO_OUTPUT |
| 4910 | 4910 | |
| 4911 | 4911 | ++ iNalIdxInLayer; |
| 4912 | − iSliceIdx += kiSliceStep; //if uiSliceIdx is not continuous | |
| 4912 | + iSliceIdx += kiSliceStep; //if uiSliceIdx is not continuous | |
| 4913 | 4913 | iAnyMbLeftInPartition = iEndMbInPartition - (1 + pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId]); |
| 4914 | 4914 | } |
| 4915 | 4915 | |