Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 9 files). Show all
Unified · Split
| @@ -2042,7 +2042,7 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 2041 unmodified lines | ||
| 2042 | 2042 | if (pCodingParam->iMultipleThreadIdc > 1) |
| 2043 | 2043 | iRet = CreateSliceThreads (pCtx); |
| 2044 | 2044 | |
| 2045 | − WelsRcInitModule (pCtx, pCtx->pSvcParam->iRCMode != RC_OFF_MODE ? WELS_RC_GOM : WELS_RC_DISABLE); | |
| 2045 | + WelsRcInitModule (pCtx, pCtx->pSvcParam->iRCMode); | |
| 2046 | 2046 | |
| 2047 | 2047 | pCtx->pVpp = new CWelsPreProcess (pCtx); |
| 2048 | 2048 | if (pCtx->pVpp == NULL) { |
| @@ -2948,17 +2948,19 @@ int32_t GetSubSequenceId (sWelsEncCtx* pCtx, EVideoFrameType eFrameType) { · 899 unmodified lines | ||
| 2948 | 2948 | bool CheckFrameSkipBasedMaxbr (sWelsEncCtx* pCtx, int32_t iSpatialNum) { |
| 2949 | 2949 | SSpatialPicIndex* pSpatialIndexMap = &pCtx->sSpatialIndexMap[0]; |
| 2950 | 2950 | bool bSkipMustFlag = false; |
| 2951 | − | |
| 2952 | − if (RC_OFF_MODE != pCtx->pSvcParam->iRCMode && true == pCtx->pSvcParam->bEnableFrameSkip) { | |
| 2953 | − for (int32_t i = 0; i < iSpatialNum; i++) { | |
| 2954 | − if (0 == pCtx->pSvcParam->sSpatialLayers[i].iMaxSpatialBitrate) { | |
| 2955 | − break; | |
| 2956 | − } | |
| 2957 | − pCtx->uiDependencyId = (uint8_t) (pSpatialIndexMap + i)->iDid; | |
| 2958 | − pCtx->pFuncList->pfRc.pfWelsRcPicDelayJudge (pCtx); | |
| 2959 | − if (true == pCtx->pWelsSvcRc[pCtx->uiDependencyId].bSkipFlag) { | |
| 2960 | − bSkipMustFlag = true; | |
| 2961 | − break; | |
| 2951 | + if (pCtx->pSvcParam->bEnableFrameSkip) { | |
| 2952 | + if ((RC_QUALITY_MODE == pCtx->pSvcParam->iRCMode) || (RC_BITRATE_MODE == pCtx->pSvcParam->iRCMode) | |
| 2953 | + || (RC_LOW_BW_MODE == pCtx->pSvcParam->iRCMode)) { | |
| 2954 | + for (int32_t i = 0; i < iSpatialNum; i++) { | |
| 2955 | + if (0 == pCtx->pSvcParam->sSpatialLayers[i].iMaxSpatialBitrate) { | |
| 2956 | + break; | |
| 2957 | + } | |
| 2958 | + pCtx->uiDependencyId = (uint8_t) (pSpatialIndexMap + i)->iDid; | |
| 2959 | + pCtx->pFuncList->pfRc.pfWelsRcPicDelayJudge (pCtx); | |
| 2960 | + if (true == pCtx->pWelsSvcRc[pCtx->uiDependencyId].bSkipFlag) { | |
| 2961 | + bSkipMustFlag = true; | |
| 2962 | + break; | |
| 2963 | + } | |
| 2962 | 2964 | } |
| 2963 | 2965 | } |
| 2964 | 2966 | } |