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 | 325 | } else { |
| 326 | 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 | 332 | pEncCtx->iCodingIndex = 0; |
| 330 | 333 | pEncCtx->bCurFrameMarkedAsSceneLtr = true; |
| 331 | 334 | } |
| 335 | + | |
| 332 | 336 | } else { |
| 333 | 337 | // perform scene change detection |
| 334 | 338 | if ((!pSvcParam->bEnableSceneChangeDetect) || pEncCtx->pVaa->bIdrPeriodFlag || |