MCPcopy Create free account
hub / github.com/cisco/openh264 / CheckProfileSetting

Function CheckProfileSetting

codec/encoder/core/src/encoder_ext.cpp:126–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126void 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}
151void CheckLevelSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iLayer, ELevelIdc uiLevelIdc) {
152 SSpatialLayerConfig* pLayerInfo = &pParam->sSpatialLayers[iLayer];
153 pLayerInfo->uiLevelIdc = LEVEL_UNKNOWN;

Callers 2

SetOptionMethod · 0.85
ParamValidationExtFunction · 0.85

Calls 1

WelsLogFunction · 0.85

Tested by

no test coverage detected