📄 generic_osddisp.c
字号:
//**********************************************************************************************************
// The Software is proprietary, confidential, and valuable to Realtek Semiconductor
// Corporation ("Realtek"). All rights, including but not limited to copyrights,
// patents, trademarks, trade secrets, mask work rights, and other similar rights and interests,
// are reserved to Realtek. Without prior written consent from Realtek, copying, reproduction,
// modification, distribution, or otherwise is strictly prohibited. The Software shall be
// kept strictly in confidence, and shall not be disclosed to or otherwise accessed by
// any third party. @ <2003> - <2008> The Software is provided "AS IS" without any warranty of any kind,
// express, implied, statutory or otherwise.
//**********************************************************************************************************
//----------------------------------------------------------------------------------------------------
// ID Code : OsdDisp.c No.0000
// Update Note :
//----------------------------------------------------------------------------------------------------
#define __GENERIC_OSDDISP__
#include "Common\Header\Include.h"
#if(_OSD_TYPE == _GENERIC_OSD)
//--------------------------------------------------
// Description :
// Input Value :
// Output Value :
//--------------------------------------------------
void COsdDispInitial(void)
{
SET_POWERSTATUS();
if(stGlobalData4.BurnIn==_BURNIN_ON)
{
SET_FACTORY_MODE(_ON);
}
else if(stGlobalData4.BurnIn==_BURNIN_OFF)
{
SET_FACTORY_MODE(_OFF);
}
if(GET_LASTPOWER_STATUS() == _OFF)
CLR_POWERSTATUS();
}
//--------------------------------------------------
// Description :
// Input Value :
// Output Value :
//--------------------------------------------------
void DisplayColorProcessGeneric(void)
{
if(GET_INPUTSOURCE_TYPE() == _SOURCE_VGA)
CEepromLoadAdcData(); //V403 modify
CEepromLoadGlobalData1();
CEepromLoadColorTempData();
CAdjustBrightness();
DisplayBacklightChangeCurveGeneric();
}
#define _CONTRAST80PERCENT (((((WORD)_CONTRAST_MAX-_CONTRAST_MIN)*80)/100)+_CONTRAST_MIN)
#define _CONTRAST_CHANGE_POINT 128 //SLOPE
void DisplayContrastChangeCurveGeneric(void)
{
BYTE i, Offset;
WORD Temp;
if(stPictureData.Contrast <= _CONTRAST80PERCENT)
Offset=(((DWORD)(stPictureData.Contrast - _CONTRAST_MIN)*(_CONTRAST_CHANGE_POINT-_CONTRAST_MIN)) / (_CONTRAST80PERCENT - _CONTRAST_MIN)) + _CONTRAST_MIN;
else
Offset=(((DWORD)(stPictureData.Contrast - _CONTRAST80PERCENT)*(_CONTRAST_MAX-_CONTRAST_CHANGE_POINT)) / (_CONTRAST_MAX - _CONTRAST80PERCENT)) + _CONTRAST_CHANGE_POINT;
CTimerWaitForEvent(_EVENT_DEN_STOP);
for(i=0;i<3;i++)
{
Temp=((WORD)stColorData.Contrast[i]*Offset)/128;
if(Temp>255)
pData[i]=255;
else
pData[i]=Temp;
}
CScalerSetBit(_CB_ACCESS_PORT_64, ~(_BIT7 | _BIT3 | _BIT2 | _BIT1 | _BIT0), _BIT7 | 0x09);
CScalerWrite(_CB_DATA_PORT_65, 3, pData, _NON_AUTOINC);
CScalerSetByte(_CB_ACCESS_PORT_64, 0x00);
CScalerSetByte(_CB_ACCESS_PORT_64, 0x83);
CScalerWrite(_CB_DATA_PORT_65, 3, pData, _NON_AUTOINC);
CScalerSetByte(_CB_ACCESS_PORT_64, 0x00);
/*
if(stGlobalData0.ColorTemp==_6500_COLOR)
CScalerSetByte(_GAMMA_CTRL_67, 0x40);
else
CScalerSetByte(_GAMMA_CTRL_67, 0x00);*/
//*******************ryan add new osd func***************************//
if((stGlobalData4.PictureMode==_MOVIE_PICTURE)||(stGlobalData4.PictureMode==_GAME_PICTURE))//jared
CScalerSetByte(_GAMMA_CTRL_67, 0x40);
else
CScalerSetByte(_GAMMA_CTRL_67, 0x00);
//*******************ryan add new osd func***************************//
}
void DisplayBacklightChangeCurveGeneric(void)
{
BYTE RealBright=0;
RealBright=((WORD)(stPictureData.BackLight-_BACKLIGHT_MIN)*_BACKLIGHT_MAX)/_BACKLIGHT_MAX+_BACKLIGHT_MIN;//0912 sephinroth
if(stSystemData.DcrSetting == _OFF)
{
#if(_MCU_TYPE == _REALTEK_EMBEDDED)
MCU_PWM0H_DUT_FF4A = RealBright;
#else
MCU_PWM2_DUTY_WIDTH_FF34 = RealBright;
#endif
}
DisplayContrastChangeCurveGeneric();
}
//----------------------------------------------------------------------------------------------------
// OSD Display Functions
//----------------------------------------------------------------------------------------------------
void DisplayAutoAndNonpresetGeneric(void)
{
COsdFxOsdTimerGeneric();
if(bUndoFirstAuto==_FALSE) //FISRT TIMING ON
{
if(!GET_FACTORY_MODE() && (GET_INPUTSOURCE_TYPE() == _SOURCE_VGA))
{
ucOsdState = _MenuNoneGeneric;
DisplayAutoAdjustingGeneric();
COsdFxEnableOsdGeneric();
CAutoDoAutoConfig();
COsdFxOsdTimerGeneric();
}
else
CEepromSaveNewModeData();
}
bUndoFirstAuto=_TRUE;
//ARKIN 0606 START
if((GET_INPUTSOURCE_TYPE() == _SOURCE_DVI) || (GET_INPUTSOURCE_TYPE() == _SOURCE_HDMI))
{
if(((tINPUTMODE_PRESET_TABLE[stModeInfo.ModeCurr].PolarityFlag & 0x80) != _PRESET_TIMING) || (stModeInfo.IHWidth!=tINPUTMODE_PRESET_TABLE[stModeInfo.ModeCurr].IHWidth) || (stModeInfo.IVHeight!=tINPUTMODE_PRESET_TABLE[stModeInfo.ModeCurr].IVHeight)) //ARKIN 0605 ISSUE 5
{
DisplayHintMessageGeneric(OSD_NONPRESET_STR_LAN_GENERIC);
CTimerActiveTimerEvent(SEC(3),COsdFxOsdTimerGeneric);
ucOsdState=_MenuShowNonPresetModeGeneric;//DPMS 陪ボNONPRESET MODE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -