History

fix a param checking for profile_idc reviewed at: https://rbcommons.com/s/OpenH264/r/1163/

Sijia Chen committed 11 years ago

Commit 91b186d1 parent dd1d9791 file · +20 −10Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+20−10
@@ -123,17 +123,27 @@ int32_t WelsBitRateVerification (SLogContext* pLogCtx, SSpatialLayerConfig* pLay · 122 unmodified lines
123 123
124void CheckProfileSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iLayer, EProfileIdc uiProfileIdc) {124void 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}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t