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 | pLayerBsInfo->uiLayerType = NON_VIDEO_CODING_LAYER; | 3481 | pLayerBsInfo->uiLayerType = NON_VIDEO_CODING_LAYER; |
| 3482 | pLayerBsInfo->iNalCount = iCountNal; | 3482 | pLayerBsInfo->iNalCount = iCountNal; |
| 3483 | 3483 | ||
| 3484 | pCtx->eLastNalPriority = NRI_PRI_HIGHEST; | 3484 | //pCtx->eLastNalPriority = NRI_PRI_HIGHEST; |
| 3485 | pFbi->iLayerNum = 1; | 3485 | pFbi->iLayerNum = 1; |
| 3486 | pFbi->eFrameType = videoFrameTypeInvalid; | 3486 | pFbi->eFrameType = videoFrameTypeInvalid; |
| 3487 | 3487 | ||
| @@ -3712,17 +3712,10 @@ void StackBackEncoderStatus (sWelsEncCtx* pEncCtx, · 224 unmodified lines | |||
| 3712 | pEncCtx->iPOC = (1 << pEncCtx->pSps->iLog2MaxPocLsb) - 2; | 3712 | pEncCtx->iPOC = (1 << pEncCtx->pSps->iLog2MaxPocLsb) - 2; |
| 3713 | } | 3713 | } |
| 3714 | 3714 | ||
| 3715 | if (pEncCtx->eLastNalPriority != 0) { | 3715 | LoadBackFrameNum(pEncCtx); |
| 3716 | if (pEncCtx->iFrameNum != 0) { | ||
| 3717 | pEncCtx->iFrameNum --; | ||
| 3718 | } else { | ||
| 3719 | pEncCtx->iFrameNum = (1 << pEncCtx->pSps->uiLog2MaxFrameNum) - 1; | ||
| 3720 | } | ||
| 3721 | } | ||
| 3722 | |||
| 3723 | pEncCtx->eNalType = NAL_UNIT_CODED_SLICE; | 3716 | pEncCtx->eNalType = NAL_UNIT_CODED_SLICE; |
| 3724 | pEncCtx->eSliceType = P_SLICE; | 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 | } else if (keFrameType == videoFrameTypeIDR) { | 3719 | } else if (keFrameType == videoFrameTypeIDR) { |
| 3727 | pEncCtx->uiIdrPicId --; | 3720 | pEncCtx->uiIdrPicId --; |
| 3728 | 3721 | ||
| @@ -3865,7 +3858,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 136 unmodified lines | |||
| 3865 | while (iSpatialIdx < iSpatialNum) { | 3858 | while (iSpatialIdx < iSpatialNum) { |
| 3866 | const int32_t iDidIdx = (pSpatialIndexMap + iSpatialIdx)->iDid; // get iDid | 3859 | const int32_t iDidIdx = (pSpatialIndexMap + iSpatialIdx)->iDid; // get iDid |
| 3867 | SSpatialLayerConfig* pParam = &pSvcParam->sSpatialLayers[iDidIdx]; | 3860 | SSpatialLayerConfig* pParam = &pSvcParam->sSpatialLayers[iDidIdx]; |
| 3868 | int32_t iDecompositionStages = pSvcParam->sDependencyLayers[iSpatialIdx].iDecompositionStages; | 3861 | int32_t iDecompositionStages = pSvcParam->sDependencyLayers[iDidIdx].iDecompositionStages; |
| 3869 | pCtx->uiDependencyId = iCurDid = (int8_t)iDidIdx; | 3862 | pCtx->uiDependencyId = iCurDid = (int8_t)iDidIdx; |
| 3870 | pCtx->pVpp->AnalyzeSpatialPic (pCtx, iDidIdx); | 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 | #endif//#if defined(MT_DEBUG) | 4380 | #endif//#if defined(MT_DEBUG) |
| 4388 | } | 4381 | } |
| 4389 | 4382 | ||
| 4383 | pCtx->eLastNalPriority[iDidIdx] = eNalRefIdc; | ||
| 4390 | ++ iSpatialIdx; | 4384 | ++ iSpatialIdx; |
| 4391 | 4385 | ||
| 4392 | if (iCurDid + 1 < pSvcParam->iSpatialLayerNum) { | 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 | ++ pCtx->iCodingIndex; | 4443 | ++ pCtx->iCodingIndex; |
| 4450 | pCtx->eLastNalPriority = eNalRefIdc; | ||
| 4451 | pFbi->iLayerNum = iLayerNum; | 4444 | pFbi->iLayerNum = iLayerNum; |
| 4452 | pFbi->iSubSeqId = GetSubSequenceId (pCtx, eFrameType); | 4445 | pFbi->iSubSeqId = GetSubSequenceId (pCtx, eFrameType); |
| 4453 | 4446 | ||