History

fix wrong setting at encoder SetOption ENCODER_OPTION_IDR_INTERVAL

sijchen@cisco.com committed 8 years ago

Commit cb346fe1 parent b578def3 files · +23 −5Browse files

Showing the changes to codec/encoder/core/src (2 of 3 files). Show all

Unified · Split

2 files
  1. codec/encoder/core/src/encoder.cpp +7 −0
  2. codec/encoder/core/src/wels_preprocess.cpp +9 −1
codec/encoder/core/src/encoder.cpp+7−0
@@ -387,6 +387,13 @@ EVideoFrameType DecideFrameType (sWelsEncCtx* pEncCtx, const int8_t kiSpatialNum · 386 unmodified lines
387387 //pEncCtx->bEncCurFrmAsIdrFlag: 1. first frame should be IDR; 2. idr pause; 3. idr request
388388 iFrameType = (pEncCtx->pVaa->bIdrPeriodFlag || bSceneChangeFlag
389389 || pParamInternal->bEncCurFrmAsIdrFlag) ? videoFrameTypeIDR : videoFrameTypeP;
390+ if ( videoFrameTypeIDR == iFrameType ) {
391+ WelsLog (& (pEncCtx->sLogCtx), WELS_LOG_DEBUG,
392+ "encoding videoFrameTypeIDR due to ( bIdrPeriodFlag %d, bSceneChangeFlag %d, bEncCurFrmAsIdrFlag %d )",
393+ pEncCtx->pVaa->bIdrPeriodFlag,
394+ bSceneChangeFlag,
395+ pParamInternal->bEncCurFrmAsIdrFlag);
396+ }
390397
391398 if (videoFrameTypeP == iFrameType && bSkipFrameFlag) { // for frame skip, 1/5/2010
392399 iFrameType = videoFrameTypeSkip;
codec/encoder/core/src/wels_preprocess.cpp+9−1
@@ -366,9 +366,17 @@ int32_t CWelsPreProcess::SingleLayerPreprocess (sWelsEncCtx* pCtx, const SSource · 365 unmodified lines
366366
367367 iSrcWidth = pSvcParam->SUsedPicRect.iWidth;
368368 iSrcHeight = pSvcParam->SUsedPicRect.iHeight;
369− if (pSvcParam->uiIntraPeriod)
369+ if (pSvcParam->uiIntraPeriod) {
370370 pCtx->pVaa->bIdrPeriodFlag = (1 + pDlayerParamInternal->iFrameIndex >= (int32_t)pSvcParam->uiIntraPeriod) ? true :
371371 false;
372+ if (pCtx->pVaa->bIdrPeriodFlag) {
373+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,
374+ "pSvcParam->uiIntraPeriod=%d, pCtx->pVaa->bIdrPeriodFlag=%d",
375+ pSvcParam->uiIntraPeriod,
376+ pCtx->pVaa->bIdrPeriodFlag);
377+ }
378+ }
379+
372380 pSrcPic = pScaledPicture->pScaledInputPicture ? pScaledPicture->pScaledInputPicture : GetCurrentOrigFrame (
373381 iDependencyId);
374382

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t