123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324 |
- #ifndef _PQ_IOCTL_H_
- #define _PQ_IOCTL_H_
- #include "drv_pq_external.h"
- /******************************************************************************
- * @ brief input source mapping to PQ input type : CVD2, Video, Others
- * @ CVD2 input type : ATV, AV, SV
- * @ Video input type : YPbPr, HDMI, DTV, BLT type(MEDIA, Android)
- * @ Other input type : PC, DVI
- * @ note : this kind input index should be only used in PQ setting
- ******************************************************************************/
- //input source type only for PQ
- typedef enum _PIC_InputIndex_ByType{
- PIC_InputIdxByType_Start,
- PIC_InputIdxByType_ATV = PIC_InputIdxByType_Start,
- PIC_InputIdxByType_DTV,
- PIC_InputIdxByType_AV,
- PIC_InputIdxByType_SV,
- PIC_InputIdxByType_COMPONENT,
- PIC_InputIdxByType_HDMI,
- PIC_InputIdxByType_DVI,
- PIC_InputIdxByType_PC,
- PIC_InputIdxByType_ANDROID_MEDIA,
- PIC_InputIdxByType_MAX,// 9
- }PIC_InputIndex_ByType;
- typedef enum _PQSrcMainType{
- PicColorSrc_Start,
- PicColorSrc_CVD2=PicColorSrc_Start,
- PicColorSrc_Video,
- PicColorSrc_Other,
- PicColorSrc_End
- }PQSrcMainType;
- // input type index for pic color (Video type)
- typedef enum _PicSrcVideo{
- PicSrcVideo_Start,
- PicSrcVideo_YPbPr = PicSrcVideo_Start,
- PicSrcVideo_HDMI,
- PicSrcVideo_DTV,
- PicSrcVideo_ANDROID_MEDIA,
- PicSrcVideo_End
- }PicSrcVideo;
- // input type index for color temp-Video type
- //yPbPr colortemp need set by resolution level(SD, MD and HD)
- typedef enum _PicColorTempSrcVideo{
- PicColorTempSrcVideo_Start,
- PicColorTempSrcVideo_YPbPr_SD = PicSrcVideo_Start,
- PicColorTempSrcVideo_YPbPr_MD,
- PicColorTempSrcVideo_YPbPr_HD,
- PicColorTempSrcVideo_HDMI,
- PicColorTempSrcVideo_DTV,
- PicColorTempSrcVideo_ANDROID_MEDIA,
- PicColorTempSrcVideo_End
- }PicColorTempSrcVideo;
- typedef enum _PicResource{
- PicResource_Start,
- PicResource_ATV = PicResource_Start,
- PicResource_DTV_SD,
- PicResource_DTV_MD,
- PicResource_DTV_HD,
- PicResource_AV,
- PicResource_SV,
- PicResource_YPbPr_SD, //6
- PicResource_YPbPr_MD,
- PicResource_YPbPr_HD,
- PicResource_HDMI_SD,
- PicResource_HDMI_MD,
- PicResource_HDMI_HD, //11
- PicResource_DVI,
- PicResource_PC,
- PicResource_ANDROID_MEDIA_SD,
- PicResource_ANDROID_MEDIA_MD,
- PicResource_ANDROID_MEDIA_HD,
- PicResource_MAX,// 17
- }PicResource;
- typedef enum _PicResource_NonLineCurve{
- PicResource_NonLineCurve_Start,
- PicResource_NonLineCurve_ATV = PicResource_Start,
- PicResource_NonLineCurve_DTV_SD,
- PicResource_NonLineCurve_DTV_MD,
- PicResource_NonLineCurve_DTV_HD,
- PicResource_NonLineCurve_AV,
- PicResource_NonLineCurve_SV,
- PicResource_NonLineCurve_YPbPr_SD, //6
- PicResource_NonLineCurve_YPbPr_MD,
- PicResource_NonLineCurve_YPbPr_HD,
- PicResource_NonLineCurve_HDMI_SD,
- PicResource_NonLineCurve_HDMI_MD,
- PicResource_NonLineCurve_HDMI_HD, //11
- PicResource_NonLineCurve_DVI,
- PicResource_NonLineCurve_PC,
- PicResource_NonLineCurve_ANDROID_MEDIA_SD,
- PicResource_NonLineCurve_ANDROID_MEDIA_MD,
- PicResource_NonLineCurve_ANDROID_MEDIA_HD,
- PicResource_NonLineCurve_SCART_CVBS_PAL, //17
- PicResource_NonLineCurve_SCART_CVBS_NTSC,
- PicResource_NonLineCurve_SCART_CVBS_SECAM,
- PicResource_NonLineCurve_SCART_RGB,
- PicResource_NonLineCurve_MAX, //21
- }PicResource_NonLineCurve;
- typedef enum _PicSrcOther{
- PicSrcOther_Start,
- PicSrcOther_DVI = PicSrcOther_Start,
- PicSrcOther_PC,
- PicSrcOther_End
- }PicSrcOther;
- typedef struct _PicColorSetting_t{
- unsigned char Brightness;
- unsigned char Contrast;
- unsigned char Sharpness;
- unsigned char Saturation; //Color (weifeng modify old releatd function name from color to saturation)
- char Hue; // Tint (PICCOLOR_TINT)
- char StaticGamma; //Gamma
- unsigned char NoiseReduction;
- unsigned char ColorTempMode; // Tint , for color temp mode effected by picture mode
- unsigned char AdvanceSharpness;
- unsigned char DynamicContrast;
- unsigned char DynamicBacklight;
- unsigned char MPEGNR;
- unsigned char ColorEnhancement; //DCE DynamicSaturation
- char BlackExtend;
- char WhiteExtend;
- }PicColorSetting_t;
- enum {
- PICCOLOR_BRIGHTNESS = 0,
- PICCOLOR_CONSTRAST = 1,
- PICCOLOR_SHARPNESS = 2,
- PICCOLOR_SATURATION = 3,
- PICCOLOR_HUE = 4,
- PICCOLOR_STATICGAMMA = 5,
- PICCOLOR_NR = 6,
- PICCOLOR_COLORTEMPMODE = 7,
- PICCOLOR_ADVANCESHARPNESS = 8,
- PICCOLOR_DYNAMICCONTRAST = 9,
- PICCOLOR_DYNAMICBACKLIGHT = 10,
- PICCOLOR_MPEGNR = 11,
- PICCOLOR_COLORENHANCEMENT = 12,
- PICCOLOR_BLACKEXTEND = 13,
- PICCOLOR_WHITEEXTEND = 14,
- PICCOLOR_BRIGHTNESS_OFFSET = 15,
- PICCOLOR_CONSTRAST_OFFSET = 16,
- PICCOLOR_SHARPNESS_OFFSET = 17,
- PICCOLOR_SATURATION_OFFSET = 18,
- PICCOLOR_HUE_OFFSET = 19,
- };
- typedef struct _PQ_Setting_bySrc_t{
- unsigned char PicMode;
- char Hposition;
- char Vposition;
- unsigned char ColorSpace;
- unsigned char ColorTempMode; //for color temp mode effected by source
- char BrightnessOffset;
- char ContrastOffset;
- char SharpnessOffset;
- char SaturationOffset; //Color
- char HueOffset; // Tint
- }PQ_Setting_bySrc_t;
- // set overscan / aspectratio by source and by resolution level((SD¡BMD¡BHD))
- // for CVD2, please set/get overscan via CVD2VideoDecoderSetting_t
- typedef struct _PQ_Setting_byResource_t{
- unsigned char Hoverscan;
- unsigned char Voverscan;
- unsigned char AspectRatio;
- }PQ_Setting_byResource_t;
- enum {
- PQSetting_PicMode,
- PQSetting_Hposition,
- PQSetting_Vposition,
- PQSetting_ColorSpace,
- PQSetting_Hoverscan,
- PQSetting_Voverscan,
- PQSetting_AspectRatio,
- PQSetting_HDMIRGBRange,
- PQSetting_DitheringLevel,
- PQSetting_DitheringAlgo,
- PQSetting_Backlight,
- PQSetting_ColorTempMode,
- PQSetting_Brightness_Offset,
- PQSetting_Constrast_Offset,
- PQSetting_Sharpness_Offset,
- PQSetting_Saturation_Offset,
- PQSetting_Hue_Offset,
- };
- typedef struct _PicColorTmpSetting_t{
- short Rgain;
- short Ggain;
- short Bgain;
- short Roffset;
- short Goffset;
- short Boffset;
- short GammaTableIndex;
- }PicColorTmpSetting_t;
- enum {
- COLORTMP_RGAIN = 0,
- COLORTMP_GGAIN = 1,
- COLORTMP_BGAIN = 2,
- COLORTMP_ROFFSET = 3,
- COLORTMP_GOFFSET = 4,
- COLORTMP_BOFFSET = 5,
- COLORTMP_GAMMATABLEINDEX = 6,
- };
- enum {
- NonLineCurve_Item_Start,
- NonLineCurve_Brightness = NonLineCurve_Item_Start,
- NonLineCurve_Contrast,
- NonLineCurve_Sharpness,
- NonLineCurve_Saturation,
- NonLineCurve_Hue,
- NonLineCurve_End,
- };
- enum {
- NonLineCurveLevel_0,
- NonLineCurveLevel_25,
- NonLineCurveLevel_50,
- NonLineCurveLevel_75,
- NonLineCurveLevel_100,
- };
- // this is a set can get index information need by PQ setting
- // ex: srcIndex, format, definition, ...
- // these information can be get via PQ_Get_Input_TypeandIndex
- typedef struct _PQIndexInfo{
- unsigned int srcId;
- unsigned int srcType;
- int format;
- unsigned char definition;
- unsigned char dvi;
- unsigned char PQ_SrcIdx;
- unsigned char PQ_MainType;
- unsigned char Piccolor_SubIdx;
- unsigned char Colortemp_SubIdx;
- unsigned char PQResourceIdx;
- unsigned char NonLine_PQResourceIdx;
- #if defined(SISCONFIG_OCEANBLUE)
- unsigned char scartInput;
- #endif
- }PQIndexInfo_t, *pPQIndexInfo_t;
- typedef struct _PQ_Setting_byResource_NonLineCurveLevel_t{
- unsigned char Brightness_Level_0; // 0 ~ 255
- unsigned char Brightness_Level_25;
- unsigned char Brightness_Level_50;
- unsigned char Brightness_Level_75;
- unsigned char Brightness_Level_100;
- unsigned char Contrast_Level_0; // 0 ~ 255
- unsigned char Contrast_Level_25;
- unsigned char Contrast_Level_50;
- unsigned char Contrast_Level_75;
- unsigned char Contrast_Level_100;
- unsigned char Sharpness_Level_0; // 0 ~ 127
- unsigned char Sharpness_Level_25;
- unsigned char Sharpness_Level_50;
- unsigned char Sharpness_Level_75;
- unsigned char Sharpness_Level_100;
- unsigned char Saturation_Level_0; // 0 ~ 255
- unsigned char Saturation_Level_25;
- unsigned char Saturation_Level_50;
- unsigned char Saturation_Level_75;
- unsigned char Saturation_Level_100;
- unsigned char Hue_Level_0; // 100 ~ 0
- unsigned char Hue_Level_25;
- unsigned char Hue_Level_50;
- unsigned char Hue_Level_75;
- unsigned char Hue_Level_100;
- }PQ_Setting_byResource_NonLineCurveLevel_t;
- typedef struct _REG_RANGE
- {
- int min;
- int max;
- int middle;
- } REG_RANGE;
- typedef struct _PQ_REG_RANGE
- {
- REG_RANGE NRRange;
- REG_RANGE GammaRange;
- REG_RANGE BacklightRange;
- }PQ_REG_RANGE, *pPQ_REG_RANGE;
- unsigned char Cmd_PqAdjust(PQ_ADJCMD_t cmd, int value);
- unsigned char Cmd_PqAdjust_ColTemp(PQ_ADJCMD_t cmd,UINT16 bRain,UINT16 bGain,UINT16 bBgain,UINT8 bGammaswitch,UINT8 bGammaIndex);
- unsigned char Cmd_ColorLUT7AxisAdjust(PQ_ADJCMD_t cmd, UINT8 RegionIdx, UINT8 bEnable, INT8 iHueGain, INT8 iSatGain, INT8 iYGain, BOOL bSet);
- unsigned char Cmd_ColorLUT7RangeAdjust(UINT8 RegionIdx, UINT8 bMake, UINT8 HueMin, UINT8 HueMax, UINT8 SatMin, UINT8 SatMax, UINT8 YMin, UINT8 YMax, UINT8 SmoothLevel, BOOL bSet);
- unsigned char Cmd_regionY(UINT8 bRegionIndex,UINT8 bTotalHnum,UINT8 bTotalVnum);
- unsigned char Cmd_PqAdjust_Curve(PQ_ADJCMD_t cmd, UINT8 CurveType, UINT8 CurvePointIndex, INT16 value);
- UINT16 PQ_GetCurrRegionY(void);
- UINT16 PQ_GetCurrHVStartSize(RegionHVStartSize* bvalue);
- UINT32 PQ_Gethistormbin(UINT32* bHistBin );
- unsigned char Cmd_PqAdjust2(PQ_ADJCMD_t cmd, int value, int min, int max);
- unsigned char Cmd_PqGetRegRange(PQ_REG_RANGE *value);
- UINT32 PQ_GetCurrPWMFreq(void);
- UINT32 PQ_GetCurrPWM(void);
- UINT16 PQ_GetCurrDutyPWM(void);
- UINT8 PQ_SetCurrDutyPWM(UINT16 uwDuty);
- UINT8 PQ_GetCurrPolarity(void);
- UINT32 PQ_GetCurrElectricity(void);
- UINT8 PQ_SetHbinINDEX(UINT8 index);
- UINT32 PQ_Getbjpeg(void);
- #endif //#ifndef _PQ_IOCTL_H_
|