History

keep the consistency between sps level and parameter level

ruil2 committed 11 years ago

Commit 5ab5fe11 parent 7dcaaf511 files · +77 −7748Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+6−6
@@ -1349,7 +1349,6 @@ void GetMvMvdRange (SWelsSvcCodingParam* pParam, int32_t& iMvRange, int32_t& iMv · 1348 unmodified lines
13491349 if (pParam->sSpatialLayers[iLayer].uiLevelIdc < iMinLevelIdc)
13501350 iMinLevelIdc = pParam->sSpatialLayers[iLayer].uiLevelIdc;
13511351 }
1352−
13531352 iMinMv = (g_ksLevelLimits[iMinLevelIdc - 1].iMinVmv) >> 2;
13541353 iMaxMv = (g_ksLevelLimits[iMinLevelIdc - 1].iMaxVmv) >> 2;
13551354
@@ -1375,11 +1374,6 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 19 unmodified lines
13751374 int32_t iResult = 0;
13761375 float fCompressRatioThr = .5f;
13771376 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);
13831377 int32_t iVclLayersBsSizeCount = 0;
13841378 int32_t iNonVclLayersBsSizeCount = 0;
13851379 int32_t iTargetSpatialBsSize = 0;
@@ -1584,6 +1578,12 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 198 unmodified lines
15841578 return 1;
15851579 }
15861580
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+
15871587 (*ppCtx)->iMvdCostTableSize = kuiMvdInterTableSize;
15881588 (*ppCtx)->iMvdCostTableStride = kuiMvdInterTableStride;
15891589 (*ppCtx)->pMvdCostTable = (uint16_t*)pMa->WelsMallocz (52 * kuiMvdCacheAlignedSize, "pMvdCostTable");

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