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

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