Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all
Unified · Split
| @@ -175,7 +175,11 @@ int32_t ParamValidation (SLogContext* pLogCtx, SWelsSvcCodingParam* pCfg) { · 174 unmodified lines | |||
| 175 | iTotalBitrate, pCfg->iTargetBitrate); | 175 | iTotalBitrate, pCfg->iTargetBitrate); |
| 176 | return ENC_RETURN_INVALIDINPUT; | 176 | return ENC_RETURN_INVALIDINPUT; |
| 177 | } | 177 | } |
| 178 | 178 | if ((pCfg->iRCMode == RC_QUALITY_MODE) || (pCfg->iRCMode == RC_BITRATE_MODE)) | |
| 179 | if (!pCfg->bEnableFrameSkip) | ||
| 180 | WelsLog (pLogCtx, WELS_LOG_WARNING, | ||
| 181 | "bEnableFrameSkip = %d,bitrate can't be controlled for RC_QUALITY_MODE and RC_BITRATE_MODE without enabling skip frame.", | ||
| 182 | pCfg->bEnableFrameSkip); | ||
| 179 | } | 183 | } |
| 180 | return WelsCheckRefFrameLimitation (pLogCtx, pCfg); | 184 | return WelsCheckRefFrameLimitation (pLogCtx, pCfg); |
| 181 | } | 185 | } |
| @@ -1510,8 +1514,8 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 1328 unmodified lines | |||
| 1510 | (*ppCtx)->iMvdCostTableSize = kuiMvdInterTableSize; | 1514 | (*ppCtx)->iMvdCostTableSize = kuiMvdInterTableSize; |
| 1511 | (*ppCtx)->iMvdCostTableStride = kuiMvdInterTableStride; | 1515 | (*ppCtx)->iMvdCostTableStride = kuiMvdInterTableStride; |
| 1512 | (*ppCtx)->pMvdCostTable = (uint16_t*)pMa->WelsMallocz (52 * kuiMvdCacheAlignedSize, "pMvdCostTable"); | 1516 | (*ppCtx)->pMvdCostTable = (uint16_t*)pMa->WelsMallocz (52 * kuiMvdCacheAlignedSize, "pMvdCostTable"); |
| 1513 | WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pMvdCostTable), FreeMemorySvc (ppCtx)) | 1517 | WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pMvdCostTable), FreeMemorySvc (ppCtx)) |
| 1514 | MvdCostInit ((*ppCtx)->pMvdCostTable, kuiMvdInterTableStride); //should put to a better place? | 1518 | MvdCostInit ((*ppCtx)->pMvdCostTable, kuiMvdInterTableStride); //should put to a better place? |
| 1515 | 1519 | ||
| 1516 | if ((*ppCtx)->ppRefPicListExt[0] != NULL && (*ppCtx)->ppRefPicListExt[0]->pRef[0] != NULL) | 1520 | if ((*ppCtx)->ppRefPicListExt[0] != NULL && (*ppCtx)->ppRefPicListExt[0]->pRef[0] != NULL) |
| 1517 | (*ppCtx)->pDecPic = (*ppCtx)->ppRefPicListExt[0]->pRef[0]; | 1521 | (*ppCtx)->pDecPic = (*ppCtx)->ppRefPicListExt[0]->pRef[0]; |
| @@ -3695,8 +3699,8 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 2177 unmodified lines | |||
| 3695 | SParaSetOffsetVariable sTmpPsoVariable[PARA_SET_TYPE]; | 3699 | SParaSetOffsetVariable sTmpPsoVariable[PARA_SET_TYPE]; |
| 3696 | uint16_t uiTmpIdrPicId;//this is for LTR! | 3700 | uint16_t uiTmpIdrPicId;//this is for LTR! |
| 3697 | SLogContext sLogCtx = (*ppCtx)->sLogCtx; | 3701 | SLogContext sLogCtx = (*ppCtx)->sLogCtx; |
| 3698 | for (int32_t k=0;k<PARA_SET_TYPE;k++) | 3702 | for (int32_t k = 0; k < PARA_SET_TYPE; k++) |
| 3699 | memset(((*ppCtx)->sPSOVector.sParaSetOffsetVariable[k].bUsedParaSetIdInBs), 0, MAX_PPS_COUNT*sizeof(bool)); | 3703 | memset (((*ppCtx)->sPSOVector.sParaSetOffsetVariable[k].bUsedParaSetIdInBs), 0, MAX_PPS_COUNT * sizeof (bool)); |
| 3700 | memcpy (sTmpPsoVariable, (*ppCtx)->sPSOVector.sParaSetOffsetVariable, | 3704 | memcpy (sTmpPsoVariable, (*ppCtx)->sPSOVector.sParaSetOffsetVariable, |
| 3701 | (PARA_SET_TYPE)*sizeof (SParaSetOffsetVariable)); // confirmed_safe_unsafe_usage | 3705 | (PARA_SET_TYPE)*sizeof (SParaSetOffsetVariable)); // confirmed_safe_unsafe_usage |
| 3702 | uiTmpIdrPicId = (*ppCtx)->sPSOVector.uiIdrPicId; | 3706 | uiTmpIdrPicId = (*ppCtx)->sPSOVector.uiIdrPicId; |