History

expand MVD table and rename some macros

sijchen committed 12 years ago

Commit 0ea48031 parent 9d73d276 files · +22 −14Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 6 files). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+5−3
@@ -1201,8 +1201,10 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 1200 unmodified lines
12011201 int32_t iResult = 0;
12021202 float fCompressRatioThr = .5f;
12031203 const int32_t kiNumDependencyLayers = pParam->iSpatialLayerNum;
1204− const uint32_t kuiMvdInterTableSize = (kiNumDependencyLayers == 1 ? (1 + (648 << 1)) : (1 + (972 << 1)));
1205− const uint32_t kuiMvdCacheAlginedSize = kuiMvdInterTableSize * sizeof (uint16_t);
1204+ (*ppCtx)->iMvRange = pParam->iUsageType?EXPANDED_MV_RANGE:CAMERA_STARTMV_RANGE;
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);
12061208 int32_t iVclLayersBsSizeCount = 0;
12071209 int32_t iNonVclLayersBsSizeCount = 0;
12081210 #if defined(MT_ENABLED)
@@ -1401,7 +1403,7 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 192 unmodified lines
14011403 return 1;
14021404 }
14031405
1404− (*ppCtx)->pMvdCostTableInter = (uint16_t*)pMa->WelsMallocz (52 * kuiMvdCacheAlginedSize, "pMvdCostTableInter");
1406+ (*ppCtx)->pMvdCostTableInter = (uint16_t*)pMa->WelsMallocz (52 * kuiMvdCacheAlignedSize, "pMvdCostTableInter");
14051407 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pMvdCostTableInter), FreeMemorySvc (ppCtx))
14061408 MvdCostInit ((*ppCtx)->pMvdCostTableInter, kuiMvdInterTableSize); //should put to a better place?
14071409

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t