Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 2 files). Show all
Unified · Split
| @@ -641,8 +641,8 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 640 unmodified lines | ||
| 641 | 641 | WelsLog (pLogCtx, WELS_LOG_WARNING, "layerId(%d) Profile is baseline, Change CABAC to CAVLC", i); |
| 642 | 642 | } |
| 643 | 643 | } else if (pLayerInfo->uiProfileIdc == PRO_UNKNOWN) { |
| 644 | − if ((i==0) || pCodingParam->bSimulcastAVC) { | |
| 645 | − pLayerInfo->uiProfileIdc = (pCodingParam->iEntropyCodingModeFlag)?PRO_HIGH:PRO_BASELINE; | |
| 644 | + if ((i == 0) || pCodingParam->bSimulcastAVC) { | |
| 645 | + pLayerInfo->uiProfileIdc = (pCodingParam->iEntropyCodingModeFlag) ? PRO_HIGH : PRO_BASELINE; | |
| 646 | 646 | } else { |
| 647 | 647 | pLayerInfo->uiProfileIdc = PRO_SCALABLE_BASELINE; |
| 648 | 648 | } |
| @@ -4188,17 +4188,23 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 3539 unmodified lines | ||
| 4188 | 4188 | if (bNeedReset) { |
| 4189 | 4189 | WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, |
| 4190 | 4190 | "WelsEncoderParamAdjust(),bSimulcastAVC(%d,%d),iSpatialLayerNum(%d,%d),iPicWidth(%d,%d),iPicHeight(%d,%d),Rect.iWidth(%d,%d),Rect.iHeight(%d,%d)", |
| 4191 | − pOldParam->bSimulcastAVC, pNewParam->bSimulcastAVC, pOldParam->iSpatialLayerNum, pNewParam->iSpatialLayerNum, | |
| 4192 | − pOldParam->iPicWidth, pNewParam->iPicWidth, pOldParam->iPicHeight, pNewParam->iPicHeight, | |
| 4193 | − pOldParam->SUsedPicRect.iWidth, pNewParam->SUsedPicRect.iWidth, pOldParam->SUsedPicRect.iHeight, | |
| 4194 | − pNewParam->SUsedPicRect.iHeight); | |
| 4191 | + pOldParam->bSimulcastAVC, pNewParam->bSimulcastAVC, | |
| 4192 | + pOldParam->iSpatialLayerNum, pNewParam->iSpatialLayerNum, | |
| 4193 | + pOldParam->iPicWidth, pNewParam->iPicWidth, | |
| 4194 | + pOldParam->iPicHeight, pNewParam->iPicHeight, | |
| 4195 | + pOldParam->SUsedPicRect.iWidth, pNewParam->SUsedPicRect.iWidth, | |
| 4196 | + pOldParam->SUsedPicRect.iHeight, pNewParam->SUsedPicRect.iHeight); | |
| 4195 | 4197 | |
| 4196 | 4198 | WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, |
| 4197 | − "WelsEncoderParamAdjust(),bEnableLongTermReference(%d,%d),iLTRRefNum(%d,%d),iMultipleThreadIdc(%d,%d),bEnableBackgroundDetection(%d,%d),bEnableAdaptiveQuant(%d,%d),eSpsPpsIdStrategy(%d,%d),iMaxNumRefFrame(%d,%d)", | |
| 4198 | − pOldParam->bEnableLongTermReference, pNewParam->bEnableLongTermReference, pOldParam->iLTRRefNum, pNewParam->iLTRRefNum, | |
| 4199 | − pOldParam->iMultipleThreadIdc, pNewParam->iMultipleThreadIdc, pOldParam->bEnableBackgroundDetection, | |
| 4200 | − pNewParam->bEnableBackgroundDetection, pOldParam->bEnableAdaptiveQuant, pNewParam->bEnableAdaptiveQuant, | |
| 4201 | − pOldParam->eSpsPpsIdStrategy, pNewParam->eSpsPpsIdStrategy, pNewParam->iMaxNumRefFrame, pOldParam->iMaxNumRefFrame); | |
| 4199 | + "WelsEncoderParamAdjust(),bEnableLongTermReference(%d,%d),iLTRRefNum(%d,%d),iMultipleThreadIdc(%d,%d),bEnableBackgroundDetection(%d,%d),bEnableAdaptiveQuant(%d,%d),eSpsPpsIdStrategy(%d,%d),iMaxNumRefFrame(%d,%d),iTemporalLayerNum(%d,%d)", | |
| 4200 | + pOldParam->bEnableLongTermReference, pNewParam->bEnableLongTermReference, | |
| 4201 | + pOldParam->iLTRRefNum, pNewParam->iLTRRefNum, | |
| 4202 | + pOldParam->iMultipleThreadIdc, pNewParam->iMultipleThreadIdc, | |
| 4203 | + pOldParam->bEnableBackgroundDetection, pNewParam->bEnableBackgroundDetection, | |
| 4204 | + pOldParam->bEnableAdaptiveQuant, pNewParam->bEnableAdaptiveQuant, | |
| 4205 | + pOldParam->eSpsPpsIdStrategy, pNewParam->eSpsPpsIdStrategy, | |
| 4206 | + pOldParam->iMaxNumRefFrame, pNewParam->iMaxNumRefFrame, | |
| 4207 | + pOldParam->iTemporalLayerNum, pNewParam->iTemporalLayerNum); | |
| 4202 | 4208 | } |
| 4203 | 4209 | if (!bNeedReset) { // Check its picture resolutions/quality settings respectively in each dependency layer |
| 4204 | 4210 | iIndexD = 0; |
| @@ -4218,8 +4224,9 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 13 unmodified lines | ||
| 4218 | 4224 | WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, |
| 4219 | 4225 | "WelsEncoderParamAdjust(),iIndexD = %d,sSpatialLayers.wxh_old(%d,%d),sSpatialLayers.wxh_new(%d,%d),iActualwxh_old(%d,%d),iActualwxh_new(%d,%d)", |
| 4220 | 4226 | iIndexD, pOldParam->sSpatialLayers[iIndexD].iVideoWidth, pOldParam->sSpatialLayers[iIndexD].iVideoHeight, |
| 4221 | − pNewParam->sSpatialLayers[iIndexD].iVideoWidth, pNewParam->sSpatialLayers[iIndexD].iVideoHeight, kpOldDlp->iActualWidth, | |
| 4222 | − kpOldDlp->iActualHeight, kpNewDlp->iActualWidth, kpNewDlp->iActualHeight); | |
| 4227 | + pNewParam->sSpatialLayers[iIndexD].iVideoWidth, pNewParam->sSpatialLayers[iIndexD].iVideoHeight, | |
| 4228 | + kpOldDlp->iActualWidth, kpOldDlp->iActualHeight, | |
| 4229 | + kpNewDlp->iActualWidth, kpNewDlp->iActualHeight); | |
| 4223 | 4230 | break; |
| 4224 | 4231 | } |
| 4225 | 4232 | |
| @@ -4251,7 +4258,8 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 25 unmodified lines | ||
| 4251 | 4258 | bNeedReset = true; |
| 4252 | 4259 | WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, |
| 4253 | 4260 | "WelsEncoderParamAdjust() iIndexD = %d,fInputFrameRate(%f,%f),fOutputFrameRate(%f,%f),fMaxFrameRate(%f,%f)", iIndexD, |
| 4254 | − kpOldDlp->fInputFrameRate, kpNewDlp->fInputFrameRate, kpOldDlp->fOutputFrameRate, kpNewDlp->fOutputFrameRate, | |
| 4261 | + kpOldDlp->fInputFrameRate, kpNewDlp->fInputFrameRate, | |
| 4262 | + kpOldDlp->fOutputFrameRate, kpNewDlp->fOutputFrameRate, | |
| 4255 | 4263 | pOldParam->fMaxFrameRate, pNewParam->fMaxFrameRate); |
| 4256 | 4264 | break; |
| 4257 | 4265 | } |