History

add input checking and fix a bs length under new strategy

Sijia Chen committed 11 years ago

Commit 45e34241 parent de68ec61 file · +10 −3Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+10−3
@@ -336,9 +336,15 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 335 unmodified lines
336 pCodingParam->bDeblockingParallelFlag = true;336 pCodingParam->bDeblockingParallelFlag = true;
337 }337 }
338 338
339 // eSpsPpsIdStrategy checkings
339 if (pCodingParam->iSpatialLayerNum > 1 && (SPS_LISTING & pCodingParam->eSpsPpsIdStrategy)) {340 if (pCodingParam->iSpatialLayerNum > 1 && (SPS_LISTING & pCodingParam->eSpsPpsIdStrategy)) {
340 WelsLog (pLogCtx, WELS_LOG_INFO,341 WelsLog (pLogCtx, WELS_LOG_INFO,
341 "ParamValidationExt(), eSpsPpsIdStrategy adjusted to CONSTANT_ID");342 "ParamValidationExt(), eSpsPpsIdStrategy setting (%d) with multiple SpatialLayers (%d) not supported! eSpsPpsIdStrategy adjusted to CONSTANT_ID", pCodingParam->eSpsPpsIdStrategy, pCodingParam->iSpatialLayerNum);
343 pCodingParam->eSpsPpsIdStrategy = CONSTANT_ID;
344 }
345 if (pCodingParam->iUsageType == SCREEN_CONTENT_REAL_TIME && (SPS_LISTING & pCodingParam->eSpsPpsIdStrategy)) {
346 WelsLog (pLogCtx, WELS_LOG_INFO,
347 "ParamValidationExt(), eSpsPpsIdStrategy setting (%d) with iUsageType (%d) not supported! eSpsPpsIdStrategy adjusted to CONSTANT_ID", pCodingParam->eSpsPpsIdStrategy, pCodingParam->iUsageType);
342 pCodingParam->eSpsPpsIdStrategy = CONSTANT_ID;348 pCodingParam->eSpsPpsIdStrategy = CONSTANT_ID;
343 }349 }
344 350
@@ -1710,8 +1716,9 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx, SExistingParasetList* pExistingPa · 1365 unmodified lines
1710 return 1;1716 return 1;
1711 }1717 }
1712 1718
1713 iNonVclLayersBsSizeCount = SSEI_BUFFER_SIZE + pParam->iSpatialLayerNum * SPS_BUFFER_SIZE +1719 const int32_t kiSpsSize = (pParam->eSpsPpsIdStrategy & SPS_LISTING) ? (MAX_SPS_COUNT * SPS_BUFFER_SIZE): (pParam->iSpatialLayerNum * SPS_BUFFER_SIZE);
1714 (1 + pParam->iSpatialLayerNum) * PPS_BUFFER_SIZE;1720 const int32_t kiPpsSize = (pParam->eSpsPpsIdStrategy & SPS_PPS_LISTING) ? (MAX_PPS_COUNT * SPS_BUFFER_SIZE) : ((1 + pParam->iSpatialLayerNum) * PPS_BUFFER_SIZE);
1721 iNonVclLayersBsSizeCount = SSEI_BUFFER_SIZE + kiSpsSize + kiPpsSize;
1715 1722
1716 int32_t iLayerBsSize = 0;1723 int32_t iLayerBsSize = 0;
1717 iIndex = 0;1724 iIndex = 0;

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