Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all
Unified · Split
| @@ -4238,19 +4238,6 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 4237 unmodified lines | |||
| 4238 | 4238 | ||
| 4239 | break; | 4239 | break; |
| 4240 | } | 4240 | } |
| 4241 | if (pOldParam->sSpatialLayers[iIndexD].uiProfileIdc != | ||
| 4242 | pNewParam->sSpatialLayers[iIndexD].uiProfileIdc | ||
| 4243 | || | ||
| 4244 | pOldParam->sSpatialLayers[iIndexD].uiLevelIdc != | ||
| 4245 | pNewParam->sSpatialLayers[iIndexD].uiLevelIdc) { | ||
| 4246 | bNeedReset = true; | ||
| 4247 | WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, | ||
| 4248 | "WelsEncoderParamAdjust(),iIndexD = %d,uiProfileIdc(%d,%d),uiLevelIdc(%d,%d)", iIndexD, | ||
| 4249 | pOldParam->sSpatialLayers[iIndexD].uiProfileIdc, pNewParam->sSpatialLayers[iIndexD].uiProfileIdc, | ||
| 4250 | pOldParam->sSpatialLayers[iIndexD].uiLevelIdc, pNewParam->sSpatialLayers[iIndexD].uiLevelIdc); | ||
| 4251 | |||
| 4252 | break; | ||
| 4253 | } | ||
| 4254 | 4241 | ||
| 4255 | // check frame rate | 4242 | // check frame rate |
| 4256 | // we can not check whether corresponding fFrameRate is equal or not, | 4243 | // we can not check whether corresponding fFrameRate is equal or not, |
| @@ -4267,6 +4254,22 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 10 unmodified lines | |||
| 4267 | pOldParam->fMaxFrameRate, pNewParam->fMaxFrameRate); | 4254 | pOldParam->fMaxFrameRate, pNewParam->fMaxFrameRate); |
| 4268 | break; | 4255 | break; |
| 4269 | } | 4256 | } |
| 4257 | if (pOldParam->sSpatialLayers[iIndexD].uiProfileIdc != pNewParam->sSpatialLayers[iIndexD].uiProfileIdc) { | ||
| 4258 | bNeedReset = true; | ||
| 4259 | WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, | ||
| 4260 | "WelsEncoderParamAdjust(),iIndexD = %d,uiProfileIdc(%d,%d)", iIndexD, | ||
| 4261 | pOldParam->sSpatialLayers[iIndexD].uiProfileIdc, pNewParam->sSpatialLayers[iIndexD].uiProfileIdc); | ||
| 4262 | break; | ||
| 4263 | } | ||
| 4264 | //check level change,if new level is smaller than old level,don't reset encoder. still use old level. | ||
| 4265 | |||
| 4266 | if (pNewParam->sSpatialLayers[iIndexD].uiLevelIdc > pOldParam->sSpatialLayers[iIndexD].uiLevelIdc) { | ||
| 4267 | bNeedReset = true; | ||
| 4268 | WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, | ||
| 4269 | "WelsEncoderParamAdjust(),iIndexD = %d,uiLevelIdc(%d,%d)", iIndexD, | ||
| 4270 | pOldParam->sSpatialLayers[iIndexD].uiLevelIdc, pNewParam->sSpatialLayers[iIndexD].uiLevelIdc); | ||
| 4271 | break; | ||
| 4272 | } | ||
| 4270 | ++ iIndexD; | 4273 | ++ iIndexD; |
| 4271 | } while (iIndexD < pOldParam->iSpatialLayerNum); | 4274 | } while (iIndexD < pOldParam->iSpatialLayerNum); |
| 4272 | } | 4275 | } |