History

bEnableSceneChangeDetect should be true for screen content

ruil2 committed 12 years ago

Commit b52aff71 parent f22a9e81 file · +11 −4Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+11−4
@@ -92,10 +92,17 @@ int32_t ParamValidation (SLogContext* pLogCtx, SWelsSvcCodingParam* pCfg) { · 91 unmodified lines
9292 return ENC_RETURN_UNSUPPORTED_PARA;
9393 }
9494 if (pCfg->bEnableAdaptiveQuant) {
95− WelsLog (pLogCtx, WELS_LOG_WARNING, "ParamValidation(), AdaptiveQuant(%d) is not supported yet for screen content, auto turned off\n",
95+ WelsLog (pLogCtx, WELS_LOG_WARNING,
96+ "ParamValidation(), AdaptiveQuant(%d) is not supported yet for screen content, auto turned off\n",
9697 pCfg->bEnableAdaptiveQuant);
9798 pCfg->bEnableAdaptiveQuant = false;
9899 }
100+ if (pCfg->bEnableSceneChangeDetect == false) {
101+ pCfg->bEnableSceneChangeDetect = true;
102+ WelsLog (pLogCtx, WELS_LOG_WARNING,
103+ "ParamValidation(), screen change detection should be turned on,change bEnableSceneChangeDetect as true\n");
104+ }
105+
99106 }
100107 if (pCfg->iSpatialLayerNum > 1) {
101108 int32_t iFinalWidth = pCfg->sSpatialLayers[pCfg->iSpatialLayerNum - 1].iVideoWidth;
@@ -2931,13 +2938,13 @@ int32_t GetSubSequenceId (sWelsEncCtx* pCtx, EVideoFrameType eFrameType) { · 2829 unmodified lines
29312938 }
29322939
29332940 //loop each layer to check if have skip frame when RC and frame skip enable (maxbr>0)
2934−bool CheckFrameSkipBasedMaxbr(sWelsEncCtx* pCtx, int32_t iSpatialNum) {
2941+bool CheckFrameSkipBasedMaxbr (sWelsEncCtx* pCtx, int32_t iSpatialNum) {
29352942 SSpatialPicIndex* pSpatialIndexMap = &pCtx->sSpatialIndexMap[0];
29362943 bool bSkipMustFlag = false;
29372944
29382945 if (RC_OFF_MODE != pCtx->pSvcParam->iRCMode && true == pCtx->pSvcParam->bEnableFrameSkip) {
29392946 for (int32_t i = 0; i < iSpatialNum; i++) {
2940− if(0 == pCtx->pSvcParam->sSpatialLayers[i].iMaxSpatialBitrate) {
2947+ if (0 == pCtx->pSvcParam->sSpatialLayers[i].iMaxSpatialBitrate) {
29412948 break;
29422949 }
29432950 pCtx->uiDependencyId = (uint8_t) (pSpatialIndexMap + i)->iDid;
@@ -3011,7 +3018,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 67 unmodified lines
30113018 }
30123019
30133020 //loop each layer to check if have skip frame when RC and frame skip enable
3014− if (CheckFrameSkipBasedMaxbr(pCtx, iSpatialNum)) {
3021+ if (CheckFrameSkipBasedMaxbr (pCtx, iSpatialNum)) {
30153022 pFbi->eFrameType = videoFrameTypeSkip;
30163023 return ENC_RETURN_SUCCESS;
30173024 }

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