Showing the changes to codec/encoder/core/src/encoder.cpp (1 of 20 files). Show all
Unified · Split
| @@ -287,15 +287,15 @@ EFrameType DecideFrameType (sWelsEncCtx* pEncCtx, const int8_t kiSpatialNum) { · 286 unmodified lines | ||
| 287 | 287 | |
| 288 | 288 | // perform scene change detection |
| 289 | 289 | if ((!pSvcParam->bEnableSceneChangeDetect) || pEncCtx->pVaa->bIdrPeriodFlag || |
| 290 | − (kiSpatialNum < pSvcParam->iNumDependencyLayer) | |
| 290 | + (kiSpatialNum < pSvcParam->iSpatialLayerNum) | |
| 291 | 291 | || (pEncCtx->uiFrameIdxRc < (VGOP_SIZE << 1))) { // avoid too frequent I frame coding, rc control |
| 292 | 292 | bSceneChangeFlag = false; |
| 293 | 293 | } else { |
| 294 | 294 | bSceneChangeFlag = pEncCtx->pVaa->bSceneChangeFlag; |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | − //scene_changed_flag: RC enable && iSpatialNum == pSvcParam->iNumDependencyLayer | |
| 298 | − //bIdrPeriodFlag: RC disable || iSpatialNum != pSvcParam->iNumDependencyLayer | |
| 297 | + //scene_changed_flag: RC enable && iSpatialNum == pSvcParam->iSpatialLayerNum | |
| 298 | + //bIdrPeriodFlag: RC disable || iSpatialNum != pSvcParam->iSpatialLayerNum | |
| 299 | 299 | //pEncCtx->bEncCurFrmAsIdrFlag: 1. first frame should be IDR; 2. idr pause; 3. idr request |
| 300 | 300 | iFrameType = (pEncCtx->pVaa->bIdrPeriodFlag || bSceneChangeFlag |
| 301 | 301 | || pEncCtx->bEncCurFrmAsIdrFlag) ? WELS_FRAME_TYPE_IDR : WELS_FRAME_TYPE_P; |