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
123123
124124 void CheckProfileSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iLayer, EProfileIdc uiProfileIdc) {
125125 SSpatialLayerConfig* pLayerInfo = &pParam->sSpatialLayers[iLayer];
126− pLayerInfo->uiProfileIdc = uiProfileIdc;
127− if ((iLayer == SPATIAL_LAYER_0) && (uiProfileIdc != PRO_BASELINE)) {
128− pLayerInfo->uiProfileIdc = PRO_BASELINE;
129− WelsLog (pLogCtx, WELS_LOG_WARNING, "doesn't support profile(%d),change to baseline profile",
130− uiProfileIdc);
131− }
132− if (iLayer > SPATIAL_LAYER_0) {
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",
126+ if (PRO_UNKNOWN == uiProfileIdc) {
127+ pLayerInfo->uiProfileIdc = (((iLayer == SPATIAL_LAYER_0)
128+ || pParam->bSimulcastAVC) ? PRO_BASELINE : PRO_SCALABLE_BASELINE);
129+ } else {
130+ pLayerInfo->uiProfileIdc = uiProfileIdc;
131+ if ((iLayer == SPATIAL_LAYER_0) && (uiProfileIdc != PRO_BASELINE)) {
132+ WelsLog (pLogCtx, WELS_LOG_WARNING, "doesn't support profile(%d), change to baseline profile",
136133 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+ }
137147 }
138148 }
139149 }

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