Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 10 files). Show all
Unified · Split
| @@ -128,16 +128,16 @@ void CheckProfileSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int · 127 unmodified lines | |||
| 128 | pLayerInfo->uiProfileIdc = uiProfileIdc; | 128 | pLayerInfo->uiProfileIdc = uiProfileIdc; |
| 129 | if (pParam->bSimulcastAVC) { | 129 | if (pParam->bSimulcastAVC) { |
| 130 | if ((uiProfileIdc != PRO_BASELINE) && (uiProfileIdc != PRO_MAIN) && (uiProfileIdc != PRO_HIGH)) { | 130 | 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, |
| 132 | uiProfileIdc); | 132 | uiProfileIdc); |
| 133 | pLayerInfo->uiProfileIdc = PRO_BASELINE; | 133 | pLayerInfo->uiProfileIdc = PRO_UNKNOWN; |
| 134 | } | 134 | } |
| 135 | } else { | 135 | } else { |
| 136 | if (iLayer == SPATIAL_LAYER_0) { | 136 | if (iLayer == SPATIAL_LAYER_0) { |
| 137 | if ((uiProfileIdc != PRO_BASELINE) && (uiProfileIdc != PRO_MAIN) && (uiProfileIdc != PRO_HIGH)) { | 137 | 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, |
| 139 | uiProfileIdc); | 139 | uiProfileIdc); |
| 140 | pLayerInfo->uiProfileIdc = PRO_BASELINE; | 140 | pLayerInfo->uiProfileIdc = PRO_UNKNOWN; |
| 141 | } | 141 | } |
| 142 | } else { | 142 | } else { |
| 143 | if ((uiProfileIdc != PRO_SCALABLE_BASELINE) && (uiProfileIdc != PRO_SCALABLE_HIGH)) { | 143 | if ((uiProfileIdc != PRO_SCALABLE_BASELINE) && (uiProfileIdc != PRO_SCALABLE_HIGH)) { |
| @@ -159,10 +159,6 @@ void CheckLevelSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32 · 15 unmodified lines | |||
| 159 | } | 159 | } |
| 160 | iLevelIdx--; | 160 | iLevelIdx--; |
| 161 | } while (iLevelIdx >= 0); | 161 | } 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 | } | ||
| 166 | } | 162 | } |
| 167 | void CheckReferenceNumSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iNumRef) { | 163 | void CheckReferenceNumSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iNumRef) { |
| 168 | int32_t iRefUpperBound = (pParam->iUsageType == CAMERA_VIDEO_REAL_TIME) ? | 164 | int32_t iRefUpperBound = (pParam->iUsageType == CAMERA_VIDEO_REAL_TIME) ? |
| @@ -644,6 +640,12 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 475 unmodified lines | |||
| 644 | pCodingParam->iEntropyCodingModeFlag = 0; | 640 | pCodingParam->iEntropyCodingModeFlag = 0; |
| 645 | WelsLog (pLogCtx, WELS_LOG_WARNING, "layerId(%d) Profile is baseline, Change CABAC to CAVLC", i); | 641 | WelsLog (pLogCtx, WELS_LOG_WARNING, "layerId(%d) Profile is baseline, Change CABAC to CAVLC", i); |
| 646 | } | 642 | } |
| 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 | } | ||
| 647 | } | 649 | } |
| 648 | } | 650 | } |
| 649 | return ParamValidation (pLogCtx, pCodingParam); | 651 | return ParamValidation (pLogCtx, pCodingParam); |