Showing the changes to codec/encoder/core/src/wels_preprocess.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1037,7 +1037,10 @@ ESceneChangeIdc CWelsPreProcess::DetectSceneChangeScreen (sWelsEncCtx* pCtx, SPi · 1036 unmodified lines | ||
| 1037 | 1037 | (pCurPicture->iHeightInPixel >> 3) * STATIC_SCENE_MOTION_RATIO)); |
| 1038 | 1038 | const uint8_t iCurTid = GetTemporalLevel (&pSvcParam->sDependencyLayers[m_pEncCtx->sSpatialIndexMap[0].iDid], |
| 1039 | 1039 | m_pEncCtx->iCodingIndex, pSvcParam->uiGopSize); |
| 1040 | − const int32_t iClosestLtrFrameNum = (iCurTid != INVALID_TEMPORAL_ID ? pCtx->pLtr[iTargetDid].iLastLtrIdx[iCurTid] : -1);//TBD | |
| 1040 | + if (iCurTid == INVALID_TEMPORAL_ID) { | |
| 1041 | + return LARGE_CHANGED_SCENE; | |
| 1042 | + } | |
| 1043 | + const int32_t iClosestLtrFrameNum = pCtx->pLtr[iTargetDid].iLastLtrIdx[iCurTid]; | |
| 1041 | 1044 | if (pSvcParam->bEnableLongTermReference) { |
| 1042 | 1045 | GetAvailableRefListLosslessScreenRefSelection (pSrcPicList, iCurTid, iClosestLtrFrameNum, &sAvailableRefList[0], |
| 1043 | 1046 | iAvailableRefNum, |