History

adjust PROFILE param validation change default profile/level to UNKNOWN

sijchen@cisco.com committed 8 years ago

Commit c0ef1bf1 parent 01068cc10 files · +4662 −4652Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+10−8
@@ -128,16 +128,16 @@ void CheckProfileSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int · 127 unmodified lines
128128 pLayerInfo->uiProfileIdc = uiProfileIdc;
129129 if (pParam->bSimulcastAVC) {
130130 if ((uiProfileIdc != PRO_BASELINE) && (uiProfileIdc != PRO_MAIN) && (uiProfileIdc != PRO_HIGH)) {
131− WelsLog (pLogCtx, WELS_LOG_WARNING, "layerId(%d) doesn't support profile(%d), change to baseline profile", iLayer,
131+ WelsLog (pLogCtx, WELS_LOG_WARNING, "layerId(%d) doesn't support profile(%d), change to UNSPECIFIC profile", iLayer,
132132 uiProfileIdc);
133− pLayerInfo->uiProfileIdc = PRO_BASELINE;
133+ pLayerInfo->uiProfileIdc = PRO_UNKNOWN;
134134 }
135135 } else {
136136 if (iLayer == SPATIAL_LAYER_0) {
137137 if ((uiProfileIdc != PRO_BASELINE) && (uiProfileIdc != PRO_MAIN) && (uiProfileIdc != PRO_HIGH)) {
138− WelsLog (pLogCtx, WELS_LOG_WARNING, "layerId(%d) doesn't support profile(%d), change to baseline profile", iLayer,
138+ WelsLog (pLogCtx, WELS_LOG_WARNING, "layerId(%d) doesn't support profile(%d), change to UNSPECIFIC profile", iLayer,
139139 uiProfileIdc);
140− pLayerInfo->uiProfileIdc = PRO_BASELINE;
140+ pLayerInfo->uiProfileIdc = PRO_UNKNOWN;
141141 }
142142 } else {
143143 if ((uiProfileIdc != PRO_SCALABLE_BASELINE) && (uiProfileIdc != PRO_SCALABLE_HIGH)) {
@@ -159,10 +159,6 @@ void CheckLevelSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32 · 15 unmodified lines
159159 }
160160 iLevelIdx--;
161161 } while (iLevelIdx >= 0);
162− if (pLayerInfo->uiLevelIdc == LEVEL_UNKNOWN) {
163− WelsLog (pLogCtx, WELS_LOG_INFO, "change unexpected levelidc(%d) setting to LEVEL_5_2", pLayerInfo->uiLevelIdc);
164− pLayerInfo->uiLevelIdc = LEVEL_5_2;
165− }
166162 }
167163 void CheckReferenceNumSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iNumRef) {
168164 int32_t iRefUpperBound = (pParam->iUsageType == CAMERA_VIDEO_REAL_TIME) ?
@@ -644,6 +640,12 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 475 unmodified lines
644640 pCodingParam->iEntropyCodingModeFlag = 0;
645641 WelsLog (pLogCtx, WELS_LOG_WARNING, "layerId(%d) Profile is baseline, Change CABAC to CAVLC", i);
646642 }
643+ } else if (pLayerInfo->uiProfileIdc == PRO_UNKNOWN) {
644+ if ((i==0) || pCodingParam->bSimulcastAVC) {
645+ pLayerInfo->uiProfileIdc = (pCodingParam->iEntropyCodingModeFlag)?PRO_HIGH:PRO_BASELINE;
646+ } else {
647+ pLayerInfo->uiProfileIdc = PRO_SCALABLE_BASELINE;
648+ }
647649 }
648650 }
649651 return ParamValidation (pLogCtx, pCodingParam);

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