__s32 DEU_ALG(__u32 sel) { static __disp_frame_info_t frameinfo; __u32 lpmode, dctimode; __u32 scalefact, filtertype = 0; __u32 deuwidth, deuheight; { static __u32 count = 0; count++; if(count == 300) { count = 0; if(gdeu[sel].frameinfo.in_size.width == 0) { DE_WRN("DEU_ALG, input width is ZERO\n"); } //pr_warn("<<deu-I>>\n"); //pr_warn("frameinfo.disp_size: <%dx%d>\n", gdeu[sel].frameinfo.disp_size.width, gdeu[sel].frameinfo.disp_size.height); } } if((frameinfo.disp_size.width != gdeu[sel].frameinfo.disp_size.width) || (frameinfo.disp_size.height != gdeu[sel].frameinfo.disp_size.height)) { //pr_warn("frameinfo.disp_size: <%dx%d>\n", gdeu[sel].frameinfo.disp_size.width, gdeu[sel].frameinfo.disp_size.height); } memcpy(&frameinfo, &gdeu[sel].frameinfo, sizeof(__disp_frame_info_t)); if(frameinfo.b_trd_out == 1 && frameinfo.trd_out_mode == DISP_3D_OUT_MODE_LIRGB) { deuwidth = frameinfo.disp_size.width*2; deuheight = frameinfo.disp_size.height/2; } /* else if(frameinfo.b_interlace_out) { deuwidth = frameinfo.disp_size.width; deuheight = frameinfo.disp_size.height/2; } */ else { deuwidth = frameinfo.disp_size.width; deuheight = frameinfo.disp_size.height; } //1D/2D/DISABLE of LP and ENABLE/DISABLE DCTI if((frameinfo.trd_out_mode == DISP_3D_OUT_MODE_CI_1 || frameinfo.trd_out_mode == DISP_3D_OUT_MODE_CI_2 || frameinfo.trd_out_mode == DISP_3D_OUT_MODE_CI_3 || frameinfo.trd_out_mode == DISP_3D_OUT_MODE_CI_4) && frameinfo.b_trd_out == 1) { lpmode = 0; //disable dctimode = 0; //disable } else if((( frameinfo.trd_out_mode == DISP_3D_OUT_MODE_FA ) && frameinfo.b_trd_out == 1)|| frameinfo.b_interlace_out == 1 || deuwidth > 2048) { lpmode = 1; //1d lp dctimode = 1; //1d dcti } else { lpmode = 2; //2d lp dctimode = 1; //1d dcti } if(frameinfo.in_size.width == 0) { frameinfo.in_size.width = 2; //DE_WRN("DEU_ALG, input width is ZERO\n"); } scalefact = (frameinfo.out_size.width<<2)/frameinfo.in_size.width; //scale factor X4 if (scalefact<5) { filtertype = 0; } else if(scalefact>=5 && scalefact<7) { filtertype = 1; } else if(scalefact>=7 && scalefact<9) { filtertype = 2; } else if(scalefact>=9 && scalefact<11) { filtertype = 3; } else if(scalefact>=11) { filtertype = 4; } /* set reg */ DEU_EBIOS_Set_Display_Size(sel, deuwidth, deuheight); DEU_EBIOS_LP_Enable(sel, ((lpmode==0)||(gdeu[sel].lumashplvl==0))?0:1); DEU_EBIOS_LP_Set_Mode(sel, lpmode-1); DEU_EBIOS_DCTI_Enable(sel, ((dctimode==0)||(gdeu[sel].chromashplvl==0))?0:1); DEU_EBIOS_LP_Set_Para(sel, gdeu[sel].lumashplvl, filtertype, plptab); DEU_EBIOS_DCTI_Set_Para(sel, gdeu[sel].chromashplvl); return DIS_SUCCESS; }
__s32 DEU_ALG(__u32 sel) { __disp_frame_info_t frameinfo; __u32 lpmode, dctimode; __u32 scalefact, filtertype = 0; __u32 deuwidth, deuheight; memcpy(&frameinfo, &gdeu[sel].frameinfo, sizeof(__disp_frame_info_t)); if(frameinfo.b_trd_out == 1 && frameinfo.trd_out_mode == DISP_3D_OUT_MODE_LIRGB) { deuwidth = frameinfo.disp_size.width*2; deuheight = frameinfo.disp_size.height/2; } /* else if(frameinfo.b_interlace_out) { deuwidth = frameinfo.disp_size.width; deuheight = frameinfo.disp_size.height/2; } */ else { deuwidth = frameinfo.disp_size.width; deuheight = frameinfo.disp_size.height; } //1D/2D/DISABLE of LP and ENABLE/DISABLE DCTI if((frameinfo.trd_out_mode == DISP_3D_OUT_MODE_CI_1 || frameinfo.trd_out_mode == DISP_3D_OUT_MODE_CI_2 || frameinfo.trd_out_mode == DISP_3D_OUT_MODE_CI_3 || frameinfo.trd_out_mode == DISP_3D_OUT_MODE_CI_4) && frameinfo.b_trd_out == 1) { lpmode = 0; //disable dctimode = 0; //disable } else if((( frameinfo.trd_out_mode == DISP_3D_OUT_MODE_FA ) && frameinfo.b_trd_out == 1)|| frameinfo.b_interlace_out == 1 || deuwidth > 2048) { lpmode = 1; //1d lp dctimode = 1; //1d dcti } else { lpmode = 2; //2d lp dctimode = 1; //1d dcti } scalefact = (frameinfo.out_size.width<<2)/frameinfo.in_size.width; //scale factor X4 if (scalefact<5) { filtertype = 0; } else if(scalefact>=5 && scalefact<7) { filtertype = 1; } else if(scalefact>=7 && scalefact<9) { filtertype = 2; } else if(scalefact>=9 && scalefact<11) { filtertype = 3; } else if(scalefact>=15) { filtertype = 4; } //set reg DEU_EBIOS_Set_Display_Size(sel, deuwidth, deuheight); DEU_EBIOS_LP_Enable(sel, ((lpmode==0)||(gdeu[sel].lumashplvl==0))?0:1); DEU_EBIOS_LP_Set_Mode(sel, lpmode-1); DEU_EBIOS_DCTI_Enable(sel, ((dctimode==0)||(gdeu[sel].chromashplvl==0))?0:1); DEU_EBIOS_LP_Set_Para(sel, gdeu[sel].lumashplvl, filtertype, plptab); DEU_EBIOS_DCTI_Set_Para(sel, gdeu[sel].chromashplvl); return DIS_SUCCESS; }