History

add a param adjustment

sijchen@cisco.com committed 8 years ago

Commit 1d91f021 parent bbfc8401 file · +15 −4Browse 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+15−4
@@ -488,13 +488,24 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 487 unmodified lines
488 488
489 for (i = 0; i < pCodingParam->iSpatialLayerNum; ++ i) {489 for (i = 0; i < pCodingParam->iSpatialLayerNum; ++ i) {
490 SSpatialLayerConfig* pSpatialLayer = &pCodingParam->sSpatialLayers[i];490 SSpatialLayerConfig* pSpatialLayer = &pCodingParam->sSpatialLayers[i];
491 const int32_t kiPicWidth = pSpatialLayer->iVideoWidth;491 int32_t kiPicWidth = pSpatialLayer->iVideoWidth;
492 const int32_t kiPicHeight = pSpatialLayer->iVideoHeight;492 int32_t kiPicHeight = pSpatialLayer->iVideoHeight;
493 uint32_t iMbWidth = 0;493 uint32_t iMbWidth = 0;
494 uint32_t iMbHeight = 0;494 uint32_t iMbHeight = 0;
495 int32_t iMbNumInFrame = 0;495 int32_t iMbNumInFrame = 0;
496 uint32_t iMaxSliceNum = MAX_SLICES_NUM;496 uint32_t iMaxSliceNum = MAX_SLICES_NUM;
497 int32_t iReturn = 0;497 int32_t iReturn = 0;
498
499 if ((pCodingParam->iPicWidth > 0) && (pCodingParam->iPicHeight > 0)
500 && (kiPicWidth == 0) && (kiPicHeight == 0)
501 && (pCodingParam->iSpatialLayerNum == 1)) {
502 kiPicWidth = pSpatialLayer->iVideoWidth = pCodingParam->iPicWidth;
503 kiPicHeight = pSpatialLayer->iVideoHeight = pCodingParam->iPicHeight;
504 WelsLog (pLogCtx, WELS_LOG_DEBUG,
505 "ParamValidationExt(), layer resolution is not set, set to general resolution %d x %d",
506 pSpatialLayer->iVideoWidth, pSpatialLayer->iVideoHeight);
507 }
508
498 if ((kiPicWidth <= 0) || (kiPicHeight <= 0) || (kiPicWidth * kiPicHeight > (MAX_MBS_PER_FRAME << 8))) {509 if ((kiPicWidth <= 0) || (kiPicHeight <= 0) || (kiPicWidth * kiPicHeight > (MAX_MBS_PER_FRAME << 8))) {
499 WelsLog (pLogCtx, WELS_LOG_ERROR,510 WelsLog (pLogCtx, WELS_LOG_ERROR,
500 "ParamValidationExt(), width > 0, height > 0, width * height <= %d, invalid %d x %d in dependency layer settings!",511 "ParamValidationExt(), width > 0, height > 0, width * height <= %d, invalid %d x %d in dependency layer settings!",
@@ -641,8 +652,8 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 140 unmodified lines
641 WelsLog (pLogCtx, WELS_LOG_WARNING, "layerId(%d) Profile is baseline, Change CABAC to CAVLC", i);652 WelsLog (pLogCtx, WELS_LOG_WARNING, "layerId(%d) Profile is baseline, Change CABAC to CAVLC", i);
642 }653 }
643 } else if (pLayerInfo->uiProfileIdc == PRO_UNKNOWN) {654 } else if (pLayerInfo->uiProfileIdc == PRO_UNKNOWN) {
644 if ((i==0) || pCodingParam->bSimulcastAVC) {655 if ((i == 0) || pCodingParam->bSimulcastAVC) {
645 pLayerInfo->uiProfileIdc = (pCodingParam->iEntropyCodingModeFlag)?PRO_HIGH:PRO_BASELINE;656 pLayerInfo->uiProfileIdc = (pCodingParam->iEntropyCodingModeFlag) ? PRO_HIGH : PRO_BASELINE;
646 } else {657 } else {
647 pLayerInfo->uiProfileIdc = PRO_SCALABLE_BASELINE;658 pLayerInfo->uiProfileIdc = PRO_SCALABLE_BASELINE;
648 }659 }

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