History

adjust output order in log for readability add UT and log

sijchen@cisco.com committed 8 years ago

Commit f42cbac1 parent cd1991a2 files · +98 −19Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+22−14
@@ -641,8 +641,8 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 640 unmodified lines
641641 WelsLog (pLogCtx, WELS_LOG_WARNING, "layerId(%d) Profile is baseline, Change CABAC to CAVLC", i);
642642 }
643643 } 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;
646646 } else {
647647 pLayerInfo->uiProfileIdc = PRO_SCALABLE_BASELINE;
648648 }
@@ -4188,17 +4188,23 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 3539 unmodified lines
41884188 if (bNeedReset) {
41894189 WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO,
41904190 "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);
41954197
41964198 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);
42024208 }
42034209 if (!bNeedReset) { // Check its picture resolutions/quality settings respectively in each dependency layer
42044210 iIndexD = 0;
@@ -4218,8 +4224,9 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 13 unmodified lines
42184224 WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO,
42194225 "WelsEncoderParamAdjust(),iIndexD = %d,sSpatialLayers.wxh_old(%d,%d),sSpatialLayers.wxh_new(%d,%d),iActualwxh_old(%d,%d),iActualwxh_new(%d,%d)",
42204226 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);
42234230 break;
42244231 }
42254232
@@ -4251,7 +4258,8 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 25 unmodified lines
42514258 bNeedReset = true;
42524259 WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO,
42534260 "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,
42554263 pOldParam->fMaxFrameRate, pNewParam->fMaxFrameRate);
42564264 break;
42574265 }

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