Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all
Unified · Split
| @@ -92,10 +92,17 @@ int32_t ParamValidation (SLogContext* pLogCtx, SWelsSvcCodingParam* pCfg) { · 91 unmodified lines | ||
| 92 | 92 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 93 | 93 | } |
| 94 | 94 | 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", | |
| 96 | 97 | pCfg->bEnableAdaptiveQuant); |
| 97 | 98 | pCfg->bEnableAdaptiveQuant = false; |
| 98 | 99 | } |
| 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 | + | |
| 99 | 106 | } |
| 100 | 107 | if (pCfg->iSpatialLayerNum > 1) { |
| 101 | 108 | int32_t iFinalWidth = pCfg->sSpatialLayers[pCfg->iSpatialLayerNum - 1].iVideoWidth; |
| @@ -2931,13 +2938,13 @@ int32_t GetSubSequenceId (sWelsEncCtx* pCtx, EVideoFrameType eFrameType) { · 2829 unmodified lines | ||
| 2931 | 2938 | } |
| 2932 | 2939 | |
| 2933 | 2940 | //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) { | |
| 2935 | 2942 | SSpatialPicIndex* pSpatialIndexMap = &pCtx->sSpatialIndexMap[0]; |
| 2936 | 2943 | bool bSkipMustFlag = false; |
| 2937 | 2944 | |
| 2938 | 2945 | if (RC_OFF_MODE != pCtx->pSvcParam->iRCMode && true == pCtx->pSvcParam->bEnableFrameSkip) { |
| 2939 | 2946 | for (int32_t i = 0; i < iSpatialNum; i++) { |
| 2940 | − if(0 == pCtx->pSvcParam->sSpatialLayers[i].iMaxSpatialBitrate) { | |
| 2947 | + if (0 == pCtx->pSvcParam->sSpatialLayers[i].iMaxSpatialBitrate) { | |
| 2941 | 2948 | break; |
| 2942 | 2949 | } |
| 2943 | 2950 | pCtx->uiDependencyId = (uint8_t) (pSpatialIndexMap + i)->iDid; |
| @@ -3011,7 +3018,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 67 unmodified lines | ||
| 3011 | 3018 | } |
| 3012 | 3019 | |
| 3013 | 3020 | //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)) { | |
| 3015 | 3022 | pFbi->eFrameType = videoFrameTypeSkip; |
| 3016 | 3023 | return ENC_RETURN_SUCCESS; |
| 3017 | 3024 | } |