Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all
Unified · Split
| @@ -123,17 +123,27 @@ int32_t WelsBitRateVerification (SLogContext* pLogCtx, SSpatialLayerConfig* pLay · 122 unmodified lines | |||
| 123 | 123 | ||
| 124 | void CheckProfileSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iLayer, EProfileIdc uiProfileIdc) { | 124 | void CheckProfileSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iLayer, EProfileIdc uiProfileIdc) { |
| 125 | SSpatialLayerConfig* pLayerInfo = &pParam->sSpatialLayers[iLayer]; | 125 | SSpatialLayerConfig* pLayerInfo = &pParam->sSpatialLayers[iLayer]; |
| 126 | pLayerInfo->uiProfileIdc = uiProfileIdc; | 126 | if (PRO_UNKNOWN == uiProfileIdc) { |
| 127 | if ((iLayer == SPATIAL_LAYER_0) && (uiProfileIdc != PRO_BASELINE)) { | 127 | pLayerInfo->uiProfileIdc = (((iLayer == SPATIAL_LAYER_0) |
| 128 | pLayerInfo->uiProfileIdc = PRO_BASELINE; | 128 | || pParam->bSimulcastAVC) ? PRO_BASELINE : PRO_SCALABLE_BASELINE); |
| 129 | WelsLog (pLogCtx, WELS_LOG_WARNING, "doesn't support profile(%d),change to baseline profile", | 129 | } else { |
| 130 | uiProfileIdc); | 130 | pLayerInfo->uiProfileIdc = uiProfileIdc; |
| 131 | } | 131 | if ((iLayer == SPATIAL_LAYER_0) && (uiProfileIdc != PRO_BASELINE)) { |
| 132 | if (iLayer > SPATIAL_LAYER_0) { | 132 | WelsLog (pLogCtx, WELS_LOG_WARNING, "doesn't support profile(%d), change to baseline profile", |
| 133 | if ((uiProfileIdc != PRO_BASELINE) || (uiProfileIdc != PRO_SCALABLE_BASELINE)) { | ||
| 134 | pLayerInfo->uiProfileIdc = PRO_BASELINE; | ||
| 135 | WelsLog (pLogCtx, WELS_LOG_WARNING, "doesn't support profile(%d),change to baseline profile", | ||
| 136 | uiProfileIdc); | 133 | uiProfileIdc); |
| 134 | pLayerInfo->uiProfileIdc = PRO_BASELINE; | ||
| 135 | } | ||
| 136 | if (iLayer > SPATIAL_LAYER_0) { | ||
| 137 | if (pParam->bSimulcastAVC && (uiProfileIdc != PRO_BASELINE)) { | ||
| 138 | pLayerInfo->uiProfileIdc = PRO_BASELINE; | ||
| 139 | WelsLog (pLogCtx, WELS_LOG_WARNING, "doesn't support profile(%d) with bSimulcastAVC, change to baseline profile", | ||
| 140 | uiProfileIdc); | ||
| 141 | } | ||
| 142 | if ((uiProfileIdc != PRO_BASELINE) || (uiProfileIdc != PRO_SCALABLE_BASELINE)) { | ||
| 143 | pLayerInfo->uiProfileIdc = PRO_BASELINE; | ||
| 144 | WelsLog (pLogCtx, WELS_LOG_WARNING, "doesn't support profile(%d), change to baseline profile", | ||
| 145 | uiProfileIdc); | ||
| 146 | } | ||
| 137 | } | 147 | } |
| 138 | } | 148 | } |
| 139 | } | 149 | } |