Showing the changes to codec/encoder/core/src/encoder.cpp (1 of 1 file). Show all
Unified · Split
| @@ -325,10 +325,14 @@ EVideoFrameType DecideFrameType (sWelsEncCtx* pEncCtx, const int8_t kiSpatialNum · 324 unmodified lines | |||
| 325 | } else { | 325 | } else { |
| 326 | iFrameType = videoFrameTypeP; | 326 | iFrameType = videoFrameTypeP; |
| 327 | } | 327 | } |
| 328 | if (videoFrameTypeIDR == iFrameType) { | 328 | if (videoFrameTypeP == iFrameType && pEncCtx->iSkipFrameFlag > 0) { |
| 329 | -- pEncCtx->iSkipFrameFlag; | ||
| 330 | iFrameType = videoFrameTypeSkip; | ||
| 331 | } else if (videoFrameTypeIDR == iFrameType) { | ||
| 329 | pEncCtx->iCodingIndex = 0; | 332 | pEncCtx->iCodingIndex = 0; |
| 330 | pEncCtx->bCurFrameMarkedAsSceneLtr = true; | 333 | pEncCtx->bCurFrameMarkedAsSceneLtr = true; |
| 331 | } | 334 | } |
| 335 | |||
| 332 | } else { | 336 | } else { |
| 333 | // perform scene change detection | 337 | // perform scene change detection |
| 334 | if ((!pSvcParam->bEnableSceneChangeDetect) || pEncCtx->pVaa->bIdrPeriodFlag || | 338 | if ((!pSvcParam->bEnableSceneChangeDetect) || pEncCtx->pVaa->bIdrPeriodFlag || |