Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 3 files). Show all
Unified · Split
| @@ -3695,22 +3695,10 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, void* pDst, const SSourcePictur · 3694 unmodified lines | |||
| 3695 | } | 3695 | } |
| 3696 | 3696 | ||
| 3697 | if (iCurTid < pCtx->uiSpatialLayersInTemporal[d_idx] - 1 || pSvcParam->iDecompStages == 0) { | 3697 | if (iCurTid < pCtx->uiSpatialLayersInTemporal[d_idx] - 1 || pSvcParam->iDecompStages == 0) { |
| 3698 | if ((iCurTid >= MAX_TEMPORAL_LEVEL) || (pCtx->uiSpatialLayersInTemporal[d_idx] - 1 > MAX_TEMPORAL_LEVEL)) { | 3698 | if( pCtx->pVpp->UpdateSpatialPictures(pCtx, pSvcParam, iCurTid, d_idx) != 0 ){ |
| 3699 | ForceCodingIDR (pCtx); // some logic error | 3699 | ForceCodingIDR(pCtx); |
| 3700 | return -1; | 3700 | return -1; |
| 3701 | } | 3701 | } |
| 3702 | |||
| 3703 | if (pSvcParam->bEnableLongTermReference && pCtx->bLongTermRefFlag[d_idx][iCurTid]) { | ||
| 3704 | SPicture* tmp = pCtx->pSpatialPic[d_idx][pCtx->uiSpatialLayersInTemporal[d_idx] + pCtx->pVaa->uiMarkLongTermPicIdx]; | ||
| 3705 | pCtx->pSpatialPic[d_idx][pCtx->uiSpatialLayersInTemporal[d_idx] + pCtx->pVaa->uiMarkLongTermPicIdx] = | ||
| 3706 | pCtx->pSpatialPic[d_idx][iCurTid]; | ||
| 3707 | pCtx->pSpatialPic[d_idx][iCurTid] = pCtx->pSpatialPic[d_idx][pCtx->uiSpatialLayersInTemporal[d_idx] - 1]; | ||
| 3708 | pCtx->pSpatialPic[d_idx][pCtx->uiSpatialLayersInTemporal[d_idx] - 1] = tmp; | ||
| 3709 | pCtx->bLongTermRefFlag[d_idx][iCurTid] = false; | ||
| 3710 | } else { | ||
| 3711 | WelsExchangeSpatialPictures (&pCtx->pSpatialPic[d_idx][pCtx->uiSpatialLayersInTemporal[d_idx] - 1], | ||
| 3712 | &pCtx->pSpatialPic[d_idx][iCurTid]); | ||
| 3713 | } | ||
| 3714 | } | 3702 | } |
| 3715 | 3703 | ||
| 3716 | if (pSvcParam->bEnableLongTermReference && ((pCtx->pLtr[pCtx->uiDependencyId].bLTRMarkingFlag | 3704 | if (pSvcParam->bEnableLongTermReference && ((pCtx->pLtr[pCtx->uiDependencyId].bLTRMarkingFlag |