Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 11 files). Show all
Unified · Split
| @@ -1349,7 +1349,6 @@ void GetMvMvdRange (SWelsSvcCodingParam* pParam, int32_t& iMvRange, int32_t& iMv · 1348 unmodified lines | ||
| 1349 | 1349 | if (pParam->sSpatialLayers[iLayer].uiLevelIdc < iMinLevelIdc) |
| 1350 | 1350 | iMinLevelIdc = pParam->sSpatialLayers[iLayer].uiLevelIdc; |
| 1351 | 1351 | } |
| 1352 | − | |
| 1353 | 1352 | iMinMv = (g_ksLevelLimits[iMinLevelIdc - 1].iMinVmv) >> 2; |
| 1354 | 1353 | iMaxMv = (g_ksLevelLimits[iMinLevelIdc - 1].iMaxVmv) >> 2; |
| 1355 | 1354 | |
| @@ -1375,11 +1374,6 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 19 unmodified lines | ||
| 1375 | 1374 | int32_t iResult = 0; |
| 1376 | 1375 | float fCompressRatioThr = .5f; |
| 1377 | 1376 | const int32_t kiNumDependencyLayers = pParam->iSpatialLayerNum; |
| 1378 | − int32_t iMvdRange = 0; | |
| 1379 | − GetMvMvdRange (pParam, (*ppCtx)->iMvRange, iMvdRange); | |
| 1380 | − const uint32_t kuiMvdInterTableSize = (iMvdRange << 2); //intepel*4=qpel | |
| 1381 | − const uint32_t kuiMvdInterTableStride = 1 + (kuiMvdInterTableSize << 1);//qpel_mv_range*2=(+/-); | |
| 1382 | − const uint32_t kuiMvdCacheAlignedSize = kuiMvdInterTableStride * sizeof (uint16_t); | |
| 1383 | 1377 | int32_t iVclLayersBsSizeCount = 0; |
| 1384 | 1378 | int32_t iNonVclLayersBsSizeCount = 0; |
| 1385 | 1379 | int32_t iTargetSpatialBsSize = 0; |
| @@ -1584,6 +1578,12 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 198 unmodified lines | ||
| 1584 | 1578 | return 1; |
| 1585 | 1579 | } |
| 1586 | 1580 | |
| 1581 | + int32_t iMvdRange = 0; | |
| 1582 | + GetMvMvdRange (pParam, (*ppCtx)->iMvRange, iMvdRange); | |
| 1583 | + const uint32_t kuiMvdInterTableSize = (iMvdRange << 2); //intepel*4=qpel | |
| 1584 | + const uint32_t kuiMvdInterTableStride = 1 + (kuiMvdInterTableSize << 1);//qpel_mv_range*2=(+/-); | |
| 1585 | + const uint32_t kuiMvdCacheAlignedSize = kuiMvdInterTableStride * sizeof (uint16_t); | |
| 1586 | + | |
| 1587 | 1587 | (*ppCtx)->iMvdCostTableSize = kuiMvdInterTableSize; |
| 1588 | 1588 | (*ppCtx)->iMvdCostTableStride = kuiMvdInterTableStride; |
| 1589 | 1589 | (*ppCtx)->pMvdCostTable = (uint16_t*)pMa->WelsMallocz (52 * kuiMvdCacheAlignedSize, "pMvdCostTable"); |