Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 10 files). Show all
Unified · Split
| @@ -139,12 +139,9 @@ void CheckProfileSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int · 138 unmodified lines | |||
| 139 | void CheckLevelSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iLayer, ELevelIdc uiLevelIdc) { | 139 | void CheckLevelSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iLayer, ELevelIdc uiLevelIdc) { |
| 140 | SSpatialLayerConfig* pLayerInfo = &pParam->sSpatialLayers[iLayer]; | 140 | SSpatialLayerConfig* pLayerInfo = &pParam->sSpatialLayers[iLayer]; |
| 141 | pLayerInfo->uiLevelIdc = uiLevelIdc; | 141 | pLayerInfo->uiLevelIdc = uiLevelIdc; |
| 142 | if (uiLevelIdc == LEVEL_UNKNOWN) { | 142 | if (uiLevelIdc > LEVEL_5_2) { |
| 143 | pLayerInfo->uiLevelIdc = LEVEL_1_0; | 143 | WelsLog (pLogCtx, WELS_LOG_INFO, "change unexpected levelidc(%d) setting to LEVEL_UNKNOWN", pLayerInfo->uiLevelIdc ); |
| 144 | WelsLog (pLogCtx, WELS_LOG_INFO, "change LEVEL_UNKNOWN to LEVEL_1_0"); | 144 | pLayerInfo->uiLevelIdc = LEVEL_UNKNOWN; |
| 145 | } else if ((uiLevelIdc < LEVEL_1_0) || (uiLevelIdc > LEVEL_5_2)) { | ||
| 146 | pLayerInfo->uiLevelIdc = LEVEL_1_0; | ||
| 147 | WelsLog (pLogCtx, WELS_LOG_WARNING, "doesn't support level(%d) change to LEVEL_1_0", uiLevelIdc); | ||
| 148 | } | 145 | } |
| 149 | } | 146 | } |
| 150 | void CheckReferenceNumSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iNumRef) { | 147 | void CheckReferenceNumSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iNumRef) { |