diff --git a/amp/src/service/display/src/disp_prv.c b/amp/src/service/display/src/disp_prv.c index b75deb4..6ed2108 100755 --- a/amp/src/service/display/src/disp_prv.c +++ b/amp/src/service/display/src/disp_prv.c @@ -1825,24 +1825,22 @@ void check_scale_ratio(VPP_WIN *pWinSrc, VPP_WIN *pWinDst) #if SKB_AISTB2_ASPECT_RATIO_WAR extern int ratio_mode; //0 : Full ratio , 1: Original ratio. //float g_virtual_output_ratio = (16.0f/9.0f) ; //default to 16:9 -float video_par = 0; void adjust_aspectRatio(DISP_PLANE *pPlane, VPP_WIN *pWinSrc, VPP_WIN *pWinDst, BOOL bIsBuildInFrame, VDEC_VID_BUF_DESC *pVbufDesc) { - if(ratio_mode && bIsBuildInFrame==false)// && (pPlane->uiPlaneID==1 || pPlane->uiPlaneID==0)) // If ratio mode is Original ratio + if(pPlane == NULL) { + DISP_INFO("pPlane == NULL !!!"); + return ; + } - if(pPlane == NULL) - { - DISP_INFO("pPlane == NULL !!!"); - return ; - } - - DISP_INFO("func:%s , line:%d", __func__, __LINE__); - if((pPlane->uiPlaneID != AMP_DISP_PLANE_MAIN) && (pPlane->uiPlaneID != AMP_DISP_PLANE_PIP)) - return ; + if(ratio_mode && bIsBuildInFrame==false && pPlane->uiPlaneID == AMP_DISP_PLANE_MAIN) // If ratio mode is Original ratio + { if (pWinSrc->height == 0 || pWinDst->height == 0) + { + DISP_INFO("height is null: pWinSrc->height = %d, pWinDst->height = %d", pWinSrc->height, pWinDst->height); return; - + } + float SourceRatio = (float)pWinSrc->width / (float)pWinSrc->height; float video_par_signal = 0.0f; if(pVbufDesc != NULL){