Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 6 files). Show all
Unified · Split
| @@ -1201,8 +1201,10 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 1200 unmodified lines | |||
| 1201 | int32_t iResult = 0; | 1201 | int32_t iResult = 0; |
| 1202 | float fCompressRatioThr = .5f; | 1202 | float fCompressRatioThr = .5f; |
| 1203 | const int32_t kiNumDependencyLayers = pParam->iSpatialLayerNum; | 1203 | const int32_t kiNumDependencyLayers = pParam->iSpatialLayerNum; |
| 1204 | const uint32_t kuiMvdInterTableSize = (kiNumDependencyLayers == 1 ? (1 + (648 << 1)) : (1 + (972 << 1))); | 1204 | (*ppCtx)->iMvRange = pParam->iUsageType?EXPANDED_MV_RANGE:CAMERA_STARTMV_RANGE; |
| 1205 | const uint32_t kuiMvdCacheAlginedSize = kuiMvdInterTableSize * sizeof (uint16_t); | 1205 | const int32_t kiMvdRange = (pParam->iUsageType?EXPANDED_MVD_RANGE:((kiNumDependencyLayers == 1)?CAMERA_MVD_RANGE:CAMERA_HIGHLAYER_MVD_RANGE)); |
| 1206 | const uint32_t kuiMvdInterTableSize = 1 + (kiMvdRange << 3);//intepel*4=qpel; qpel_mv_range*2=(+/-); | ||
| 1207 | const uint32_t kuiMvdCacheAlignedSize = kuiMvdInterTableSize * sizeof (uint16_t); | ||
| 1206 | int32_t iVclLayersBsSizeCount = 0; | 1208 | int32_t iVclLayersBsSizeCount = 0; |
| 1207 | int32_t iNonVclLayersBsSizeCount = 0; | 1209 | int32_t iNonVclLayersBsSizeCount = 0; |
| 1208 | #if defined(MT_ENABLED) | 1210 | #if defined(MT_ENABLED) |
| @@ -1401,7 +1403,7 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 192 unmodified lines | |||
| 1401 | return 1; | 1403 | return 1; |
| 1402 | } | 1404 | } |
| 1403 | 1405 | ||
| 1404 | (*ppCtx)->pMvdCostTableInter = (uint16_t*)pMa->WelsMallocz (52 * kuiMvdCacheAlginedSize, "pMvdCostTableInter"); | 1406 | (*ppCtx)->pMvdCostTableInter = (uint16_t*)pMa->WelsMallocz (52 * kuiMvdCacheAlignedSize, "pMvdCostTableInter"); |
| 1405 | WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pMvdCostTableInter), FreeMemorySvc (ppCtx)) | 1407 | WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pMvdCostTableInter), FreeMemorySvc (ppCtx)) |
| 1406 | MvdCostInit ((*ppCtx)->pMvdCostTableInter, kuiMvdInterTableSize); //should put to a better place? | 1408 | MvdCostInit ((*ppCtx)->pMvdCostTableInter, kuiMvdInterTableSize); //should put to a better place? |
| 1407 | 1409 | ||