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
1349 if (pParam->sSpatialLayers[iLayer].uiLevelIdc < iMinLevelIdc)1349 if (pParam->sSpatialLayers[iLayer].uiLevelIdc < iMinLevelIdc)
1350 iMinLevelIdc = pParam->sSpatialLayers[iLayer].uiLevelIdc;1350 iMinLevelIdc = pParam->sSpatialLayers[iLayer].uiLevelIdc;
1351 }1351 }
1352
1353 iMinMv = (g_ksLevelLimits[iMinLevelIdc - 1].iMinVmv) >> 2;1352 iMinMv = (g_ksLevelLimits[iMinLevelIdc - 1].iMinVmv) >> 2;
1354 iMaxMv = (g_ksLevelLimits[iMinLevelIdc - 1].iMaxVmv) >> 2;1353 iMaxMv = (g_ksLevelLimits[iMinLevelIdc - 1].iMaxVmv) >> 2;
1355 1354
@@ -1375,11 +1374,6 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 19 unmodified lines
1375 int32_t iResult = 0;1374 int32_t iResult = 0;
1376 float fCompressRatioThr = .5f;1375 float fCompressRatioThr = .5f;
1377 const int32_t kiNumDependencyLayers = pParam->iSpatialLayerNum;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 int32_t iVclLayersBsSizeCount = 0;1377 int32_t iVclLayersBsSizeCount = 0;
1384 int32_t iNonVclLayersBsSizeCount = 0;1378 int32_t iNonVclLayersBsSizeCount = 0;
1385 int32_t iTargetSpatialBsSize = 0;1379 int32_t iTargetSpatialBsSize = 0;
@@ -1584,6 +1578,12 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 198 unmodified lines
1584 return 1;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 (*ppCtx)->iMvdCostTableSize = kuiMvdInterTableSize;1587 (*ppCtx)->iMvdCostTableSize = kuiMvdInterTableSize;
1588 (*ppCtx)->iMvdCostTableStride = kuiMvdInterTableStride;1588 (*ppCtx)->iMvdCostTableStride = kuiMvdInterTableStride;
1589 (*ppCtx)->pMvdCostTable = (uint16_t*)pMa->WelsMallocz (52 * kuiMvdCacheAlignedSize, "pMvdCostTable");1589 (*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