Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 5 files). Show all
Unified · Split
| @@ -3481,7 +3481,7 @@ int32_t WelsEncoderEncodeParameterSets (sWelsEncCtx* pCtx, void* pDst) { · 3480 unmodified lines | ||
| 3481 | 3481 | pLayerBsInfo->uiLayerType = NON_VIDEO_CODING_LAYER; |
| 3482 | 3482 | pLayerBsInfo->iNalCount = iCountNal; |
| 3483 | 3483 | |
| 3484 | − pCtx->eLastNalPriority = NRI_PRI_HIGHEST; | |
| 3484 | + //pCtx->eLastNalPriority = NRI_PRI_HIGHEST; | |
| 3485 | 3485 | pFbi->iLayerNum = 1; |
| 3486 | 3486 | pFbi->eFrameType = videoFrameTypeInvalid; |
| 3487 | 3487 | |
| @@ -3712,17 +3712,10 @@ void StackBackEncoderStatus (sWelsEncCtx* pEncCtx, · 224 unmodified lines | ||
| 3712 | 3712 | pEncCtx->iPOC = (1 << pEncCtx->pSps->iLog2MaxPocLsb) - 2; |
| 3713 | 3713 | } |
| 3714 | 3714 | |
| 3715 | − if (pEncCtx->eLastNalPriority != 0) { | |
| 3716 | − if (pEncCtx->iFrameNum != 0) { | |
| 3717 | − pEncCtx->iFrameNum --; | |
| 3718 | − } else { | |
| 3719 | − pEncCtx->iFrameNum = (1 << pEncCtx->pSps->uiLog2MaxFrameNum) - 1; | |
| 3720 | − } | |
| 3721 | − } | |
| 3722 | − | |
| 3715 | + LoadBackFrameNum(pEncCtx); | |
| 3723 | 3716 | pEncCtx->eNalType = NAL_UNIT_CODED_SLICE; |
| 3724 | 3717 | pEncCtx->eSliceType = P_SLICE; |
| 3725 | − pEncCtx->eNalPriority = pEncCtx->eLastNalPriority; | |
| 3718 | + //pEncCtx->eNalPriority = pEncCtx->eLastNalPriority; //not need this since eNalPriority will be updated at the beginning of coding a frame | |
| 3726 | 3719 | } else if (keFrameType == videoFrameTypeIDR) { |
| 3727 | 3720 | pEncCtx->uiIdrPicId --; |
| 3728 | 3721 | |
| @@ -3865,7 +3858,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 136 unmodified lines | ||
| 3865 | 3858 | while (iSpatialIdx < iSpatialNum) { |
| 3866 | 3859 | const int32_t iDidIdx = (pSpatialIndexMap + iSpatialIdx)->iDid; // get iDid |
| 3867 | 3860 | SSpatialLayerConfig* pParam = &pSvcParam->sSpatialLayers[iDidIdx]; |
| 3868 | − int32_t iDecompositionStages = pSvcParam->sDependencyLayers[iSpatialIdx].iDecompositionStages; | |
| 3861 | + int32_t iDecompositionStages = pSvcParam->sDependencyLayers[iDidIdx].iDecompositionStages; | |
| 3869 | 3862 | pCtx->uiDependencyId = iCurDid = (int8_t)iDidIdx; |
| 3870 | 3863 | pCtx->pVpp->AnalyzeSpatialPic (pCtx, iDidIdx); |
| 3871 | 3864 | |
| @@ -4387,6 +4380,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 515 unmodified lines | ||
| 4387 | 4380 | #endif//#if defined(MT_DEBUG) |
| 4388 | 4381 | } |
| 4389 | 4382 | |
| 4383 | + pCtx->eLastNalPriority[iDidIdx] = eNalRefIdc; | |
| 4390 | 4384 | ++ iSpatialIdx; |
| 4391 | 4385 | |
| 4392 | 4386 | if (iCurDid + 1 < pSvcParam->iSpatialLayerNum) { |
| @@ -4447,7 +4441,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 54 unmodified lines | ||
| 4447 | 4441 | } |
| 4448 | 4442 | |
| 4449 | 4443 | ++ pCtx->iCodingIndex; |
| 4450 | − pCtx->eLastNalPriority = eNalRefIdc; | |
| 4451 | 4444 | pFbi->iLayerNum = iLayerNum; |
| 4452 | 4445 | pFbi->iSubSeqId = GetSubSequenceId (pCtx, eFrameType); |
| 4453 | 4446 | |