| 124 | } |
| 125 | |
| 126 | void CheckProfileSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iLayer, EProfileIdc uiProfileIdc) { |
| 127 | SSpatialLayerConfig* pLayerInfo = &pParam->sSpatialLayers[iLayer]; |
| 128 | pLayerInfo->uiProfileIdc = uiProfileIdc; |
| 129 | if (pParam->bSimulcastAVC) { |
| 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 UNSPECIFIC profile", iLayer, |
| 132 | uiProfileIdc); |
| 133 | pLayerInfo->uiProfileIdc = PRO_UNKNOWN; |
| 134 | } |
| 135 | } else { |
| 136 | if (iLayer == SPATIAL_LAYER_0) { |
| 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 UNSPECIFIC profile", iLayer, |
| 139 | uiProfileIdc); |
| 140 | pLayerInfo->uiProfileIdc = PRO_UNKNOWN; |
| 141 | } |
| 142 | } else { |
| 143 | if ((uiProfileIdc != PRO_SCALABLE_BASELINE) && (uiProfileIdc != PRO_SCALABLE_HIGH)) { |
| 144 | pLayerInfo->uiProfileIdc = PRO_SCALABLE_BASELINE; |
| 145 | WelsLog (pLogCtx, WELS_LOG_WARNING, "layerId(%d) doesn't support profile(%d), change to scalable baseline profile", |
| 146 | iLayer, uiProfileIdc); |
| 147 | } |
| 148 | } |
| 149 | } |
| 150 | } |
| 151 | void CheckLevelSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iLayer, ELevelIdc uiLevelIdc) { |
| 152 | SSpatialLayerConfig* pLayerInfo = &pParam->sSpatialLayers[iLayer]; |
| 153 | pLayerInfo->uiLevelIdc = LEVEL_UNKNOWN; |
no test coverage detected