/** Header file for Display library Header file for Display library. @file ide.h @ingroup mIDrvDisp_IDE @note Nothing. Copyright Novatek Microelectronics Corp. 2010. All rights reserved. */ #ifndef _IDE_H #define _IDE_H #if defined __KERNEL__ #include "kwrap/type.h" #include "kdrv_type.h" #elif defined __FREERTOS #include "kwrap/type.h" #include "kdrv_type.h" #else #include "Type.h" #endif /** @addtogroup mIDrvDisp_IDE */ //@{ /** Display plane(Osd/Video) Enable These definitions are used for ide_set_all_window_en()/ide_get_window_en() to enable/disable the osd/video layers. @name Display plane(Osd/Video) Enable */ //@{ #define DISPLAY_OSD1_EN 0x02 #define DISPLAY_OSD2_EN 0x04 #define DISPLAY_VIDEO1_EN 0x08 #define DISPLAY_VIDEO2_EN 0x10 //@} /** Display device type. select display device. \n The ide engine could output various type of interface format as specified in ide_set_device(). */ //@{ typedef enum { //DISPLAY_DEVICE_CASIO1G = 0x0, DISPLAY_DEVICE_CASIO2G = 0x1, DISPLAY_DEVICE_AU = 0x2, DISPLAY_DEVICE_TOPPOLY = 0x3, DISPLAY_DEVICE_CCIR656 = 0x4, DISPLAY_DEVICE_CCIR601 = 0x5, DISPLAY_DEVICE_TV = 0x6, DISPLAY_DEVICE_HDMI_24BIT = 0x7, DISPLAY_DEVICE_HDMI_16BIT = 0x8, DISPALY_DEVICE_PARALLEL = 0x9, DISPLAY_DEVICE_CCIR656_16BIT = 0xA, DISPLAY_DEVICE_CCIR601_16BIT = 0xB, DISPLAY_DEVICE_MI = 0xC, DISPLAY_DEVICE_MIPIDSI = 0xD, DISPLAY_DEVICE_RGB_16BIT = 0xE, DISPLAY_DEVICE_OUTPUT_DRAM = 0xF, ENUM_DUMMY4WORD(IDE_DEVICE_TYPE) } IDE_DEVICE_TYPE; //@} /** Video buffer operation mode select video buffer operation mode. Used in ide_set_v1_buf_op()/ide_set_v2_buf_op(). */ //@{ typedef enum { IDE_VIDEO_BJMODE_CANT_CROSS_WRITE = 0, ///> Automatically change buffer according to IPE/IME signal IDE_VIDEO_BJMODE_RW_INDEPENDENT = 1, ///> Automatically change buffer according to ide's VSync signal IDE_VIDEO_BJMODE_BUFFER_REPEAT = 2, ///> Repeat the same buffer until user change buffer ENUM_DUMMY4WORD(IDE_BJMODE) } IDE_BJMODE; //@} /** Total video buffer number select the total video buffer number in ide_set_v1_buf_op()/ide_set_v2_buf_op(). */ //@{ typedef enum { IDE_VIDEO_BUFFER_NUM_1 = 0, ///> Only 1 buffer (Buffer 0) IDE_VIDEO_BUFFER_NUM_2 = 1, ///> Total 2 buffers (Buffer 0, 1) IDE_VIDEO_BUFFER_NUM_3 = 2, ///> Total 3 buffers (Buffer 0, 1, 2) IDE_VIDEO_BUFFER_NUM_4 = 3, ///> Total 4 buffers (Buffer 0, 1, 2, 3) ENUM_DUMMY4WORD(IDE_BUF_NUM) } IDE_BUF_NUM; //@} /** Video buffer in operation select the active buffer in current usage. \n These definitions are used in ide_set_v1_buf_op()/ ide_set_v2_buf_op()/ ide_ch_v1_buf()/ ide_ch_v2_buf(). */ //@{ typedef enum { IDE_VIDEO_BUFFER_OPT_0 = 0, ///> Buffer 0 in operation IDE_VIDEO_BUFFER_OPT_1 = 1, ///> Buffer 1 in operation IDE_VIDEO_BUFFER_OPT_2 = 2, ///> Buffer 2 in operation IDE_VIDEO_BUFFER_OPT_3 = 3, ///> Buffer 3 in operation ENUM_DUMMY4WORD(IDE_OP_BUF) } IDE_OP_BUF; //@} /** Video/OSD buffer horizontal read mode ide can flip the image on the LCD screen without changing the buffer content. These definitions select the screen show of horizontal direction from RIGHT or from LEFT. \n These definitions are used in ide_set_v1_read_order()/ ide_set_v2_read_order()/ ide_set_o1_read_order()/ ide_set_o2_read_order(). */ //@{ typedef enum { IDE_BUFFER_READ_L2R = 0, ///> Read from left to right IDE_BUFFER_READ_R2L = 1, ///> Read from right to left ENUM_DUMMY4WORD(IDE_HOR_READ) } IDE_HOR_READ; //@} /** Video/OSD buffer vertical read mode ide can flip the image on the LCD screen without changing the buffer content. These definitions select the screen show of vertical direction from TOP or from BOTTOM. \n These definitions are used in ide_set_v1_read_order()/ ide_set_v2_read_order()/ ide_set_o1_read_order()/ ide_set_o2_read_order(). */ //@{ typedef enum { IDE_BUFFER_READ_T2B = 0, ///> Read from top to bottom IDE_BUFFER_READ_B2T = 1, ///> Read from bottom to top ENUM_DUMMY4WORD(IDE_VER_READ) } IDE_VER_READ; //@} /** Video hardware auto handshake sync source select. \n These definitions are used in ide_set_v1_src(). */ //@{ typedef enum { IDE_SYNC_IME_PATH1 = 0, ///> sync with ime path1 IDE_SYNC_IME_PATH2 = 1, ///> sync with ime path2 IDE_SYNC_IME_PATH3 = 2, ///> sync with ime path3 ENUM_DUMMY4WORD(IDE_SYNC_SRC) } IDE_SYNC_SRC; //@} /** Video buffer selection for buffer adddress setting This definition is used to dedicate which buffer address is selected to set in ide_set_video_buf_addr(). @name Video buffer selection for buffer adddress setting */ //@{ #define IDE_VIDEO_ADDR_SEL_ALL (0x00) ///< select Video buffer All (0/1/2) #define IDE_VIDEO_ADDR_SEL_BUFFER0 (0x01 << 0) ///< select Video buffer 0 #define IDE_VIDEO_ADDR_SEL_BUFFER1 (0x01 << 1) ///< select Video buffer 1 #define IDE_VIDEO_ADDR_SEL_BUFFER2 (0x01 << 2) ///< select Video buffer 2 //@} /** Video window ID select. This is selection ID to dedicate which video is selcted to change the settings. \n This definition is used in ide_set_video_buf_addr()/ ide_configVideoCst()/ ide_enable_video()/ ... etc. */ //@{ typedef enum { IDE_VIDEOID_1 = 1, ///< ide VIDEO plane 1 IDE_VIDEOID_2 = 2, ///< ide VIDEO plane 2 ENUM_DUMMY4WORD(IDE_VIDEOID) } IDE_VIDEOID; //@} /** OSD window ID select. This is selection ID to dedicate which osd is selcted to change the settings. \n This definition is used in ide_set_osd_buf_addr()()/ ide_enable_osd()/ ide_configOsdCst() ... etc. */ //@{ typedef enum { IDE_OSDID_1 = 1, ///< OSD plane 1 IDE_OSDID_2 = 2, ///< OSD plane 2, some chip revision may not have second OSD plane IDE_OSDID_3 = 3, ///< OSD plane 3, might same as IDE_VIDEOID_1 IDE_OSDID_4 = 4, ///< OSD plane 4, might same as IDE_VIDEOID_2 ENUM_DUMMY4WORD(IDE_OSDID) } IDE_OSDID; //@} /** Video blending with Video Key operation select. Video1/Video2 blends with VideoKey definitions. \n This is for argument of ide_set_video_blend() and return value of ide_get_video_blend(); */ //@{ typedef enum { IDE_VIDEO_BLEND_VIDEOCK = 0x00, ///< VideoCK IDE_VIDEO_BLEND_VIDEOCK7_8 = 0x01, ///< VideoCK * (7/8) + Video * (1/8) IDE_VIDEO_BLEND_VIDEOCK3_4 = 0x02, ///< VideoCK * (3/4) + Video * (1/4) IDE_VIDEO_BLEND_VIDEOCK1_2 = 0x03, ///< VideoCK * (1/2) + Video * (1/2) IDE_VIDEO_BLEND_VIDEOCK1_4 = 0x04, ///< VideoCK * (1/4) + Video * (3/4) IDE_VIDEO_BLEND_VIDEOCK1_8 = 0x05, ///< VideoCK * (1/8) + Video * (7/8) IDE_VIDEO_BLEND_VIDEO1OR2 = 0x06, ///< Video1 or Video2 ENUM_DUMMY4WORD(IDE_VIDEO_BLEND_OP) } IDE_VIDEO_BLEND_OP; //@} #if 1 /** Video1 blending with Video2 operation select. Video1 blends with Video2 definitions. */ //@{ typedef enum { IDE_VIDEO_BLEND_VIDEO2 = 0x00, ///< Video2 IDE_VIDEO_BLEND_VIDEO2_7_8 = 0x01, ///< Video2 * (7/8) + Video1 * (1/8) IDE_VIDEO_BLEND_VIDEO2_3_4 = 0x02, ///< Video2 * (3/4) + Video1 * (1/4) IDE_VIDEO_BLEND_VIDEO2_1_2 = 0x03, ///< Video2 * (1/2) + Video1 * (1/2) IDE_VIDEO_BLEND_VIDEO2_1_4 = 0x04, ///< Video2 * (1/4) + Video1 * (3/4) IDE_VIDEO_BLEND_VIDEO2_1_8 = 0x05, ///< Video2 * (1/8) + Video1 * (7/8) IDE_VIDEO_BLEND_VIDEO1 = 0x06, ///< Video1 ENUM_DUMMY4WORD(IDE_V1_V2_BLEND_OP) } IDE_V1_V2_BLEND_OP; //@} #endif /** Video color key select. This is for argument of ide_set_video_colorkey_op() and return value of ide_get_video_colorkey_op(). */ //@{ typedef enum { IDE_VIDEO_COLORKEY_VIDEO1OR2 = 0x00, ///< videock = video1 or video2; IDE_VIDEO_COLORKEY_YSMALLKEY = 0x01, ///< videock = (video_Y < VDO_YKEY) ? IDE_VIDEO_COLORKEY_YEQUKEY = 0x02, ///< videock = (video_Y == VDO_KEY && video_CB == VDO_CBKEY && video_CR == VDO_CRKEY) ? IDE_VIDEO_COLORKEY_YBIGKEY = 0x03, ///< videock = (video_Y > VDO_YKEY) ? ENUM_DUMMY4WORD(IDE_VIDEO_COLORKEY_OP) } IDE_VIDEO_COLORKEY_OP; //@} /** OSD color key select. This is for argument of ide_setOsd1ColorKeyOp() and ide_setOsd2ColorKeyOp return value of ide_getOsd1ColorKeyOp() or ide_getOsd2ColorKeyOp() */ //@{ typedef enum { IDE_OSD_COLORKEY_EQUAL = 0x00, ///< osdck = (osd_R == OSD_RKEY && osd_G == OSD_GKEY && osd_B == OSD_BKEY) ? IDE_OSD_COLORKEY_EQUAL_A = 0x4, ///< osdck = (osd_R == OSD_RKEY && osd_G == OSD_GKEY && osd_B == OSD_BKEY && osd_alpha == OSD_AKEY) ? ENUM_DUMMY4WORD(IDE_OSD_COLORKEY_OP) } IDE_OSD_COLORKEY_OP; //@} /** Video color key compare source select. This is for argument of ide_set_video_colorkey_sel() and return value of ide_get_video_colorkey_sel() */ //@{ typedef enum { IDE_VIDEO_COLORKEY_COMPAREVIDEO2 = 0x00, ///< Colorkey will compare with video2 IDE_VIDEO_COLORKEY_COMPAREVIDEO1 = 0x01, ///< Colorkey will compare with video1 ENUM_DUMMY4WORD(IDE_VIDEO_COLORKEY_SEL) } IDE_VIDEO_COLORKEY_SEL; //@} /** OSD blending operation select. This is definition for osd1/osd2 blending operation usage in ide_setOsdBlendOp(). */ //@{ typedef enum { IDE_OSD_BLEND_OSD2 = 0x00, ///< OSD2 only IDE_OSD_BLEND_OSD2_7_8 = 0x01, ///< OSD2 * (7/8) + OSD1 * (1/8) IDE_OSD_BLEND_OSD2_3_4 = 0x02, ///< OSD2 * (3/4) + OSD1 * (1/4) IDE_OSD_BLEND_OSD2_1_2 = 0x03, ///< OSD2 * (1/2) + OSD1 * (1/2) IDE_OSD_BLEND_OSD2_1_4 = 0x04, ///< OSD2 * (1/4) + OSD1 * (3/4) IDE_OSD_BLEND_OSD2_1_8 = 0x05, ///< OSD2 * (1/8) + OSD1 * (7/8) IDE_OSD_BLEND_OSD1 = 0x06, ///< OSD1 only ENUM_DUMMY4WORD(IDE_OSD_BLEND_OP) } IDE_OSD_BLEND_OP; //@} /** OSD palette set select. OSD's palette has two banks. This definition is used to select osd to use the lower/higher 256 entities as palette. Two osd can not use the same bank of palette. */ //@{ typedef enum { IDE_PALETTE_LOW256 = 0x00, ///< ide Palette will use lower 256 IDE_PALETTE_HIGH256 = 0x01, ///< ide palette will use higher 256 ENUM_DUMMY4WORD(IDE_PALETTE_SEL) } IDE_PALETTE_SEL; //@} /** OSD & Video blending operation select. This definition is used to select the blending relation between the osd and video layer. */ //@{ typedef enum { IDE_OV_BLEND_VIDEO = 0x00, ///< Video only IDE_OV_BLEND_VIDEO_7_8 = 0x01, ///< Video * (7/8) + OSD * (1/8) IDE_OV_BLEND_VIDEO_3_4 = 0x02, ///< Video * (3/4) + OSD * (1/4) IDE_OV_BLEND_VIDEO_1_2 = 0x03, ///< Video * (1/2) + OSD * (1/2) IDE_OV_BLEND_VIDEO_1_4 = 0x04, ///< Video * (1/4) + OSD * (3/4) IDE_OV_BLEND_VIDEO_1_8 = 0x05, ///< Video * (1/8) + OSD * (7/8) IDE_OV_BLEND_OSD = 0x06, ///< OSD only IDE_OV_BLEND_VIDEO_AND_OSD = 0x07, ///< Video & OSD IDE_OV_BLEND_VIDEO_OR_OSD = 0x08, ///< Video | OSD IDE_OV_BLEND_VIDEO_XOR_OSD = 0x09, ///< Video ^ OSD IDE_OV_BLEND_NOT_VIDEO = 0x0A, ///< !Video ENUM_DUMMY4WORD(IDE_OV_BLEND_OP) } IDE_OV_BLEND_OP; //@} /** @name Display ICST output type select. */ //@{ typedef enum { ICST_CCIR601 = 0, ///< ICST type 601 ICST_ITU_BT_709 = 1, ///< ICST type 709 ENUM_DUMMY4WORD(ICST_TYPE) } ICST_TYPE; //@} /** Display ICST output type select. Not available in this chip version, just for backward compatible usage. */ //@{ typedef enum { CST_RGB2YCBCR = 0, ///< CST RGB to YCBCR CST_YCBCR2RGB = 1, ///< CST YCBCR to RGB ENUM_DUMMY4WORD(CST_SEL) } CST_SEL; //@} /** CST accuracy select. color space transform accuracy selecion. Used in ide_set_icst_coef()/ ide_setV1CstCoef()/ ... etc. */ //@{ typedef enum { ACCRCY_1_2_8 = 0, ///< CST accuracy 1_2_8 ACCRCY_1_3_7 = 1, ///< CST accuracy 1_3_7 ENUM_DUMMY4WORD(ACCRCY_SEL) } ACCRCY_SEL; //@} /** ide frame buffer pixel format. ide input frame buffer format selection for video and osd. */ //@{ typedef enum { COLOR_1_BIT = 0, // color format 1 bit COLOR_2_BIT = 1, // color format 2 bit COLOR_4_BIT = 2, // color format 4 bit COLOR_8_BIT = 3, // color format 8 bit COLOR_YCBCR444 = 4, // color format YCBCR444 COLOR_YCBCR422 = 5, // color format YCBCR422 COLOR_YCBCR420 = 6, // color format YCBCR420 COLOR_ARGB4565 = 7, // color format ARGB4565 COLOR_ARGB8565 = 8, // color format ARGB8565 COLOR_YCC422P = 9, // color format YCBCR422Pack COLOR_YCC420P = 10, // color format YCBCR420Pack COLOR_ARGB8888 = 11, // color format ARGB8888 COLOR_ARGB4444 = 12, // color format ARGB4444 COLOR_ARGB1555 = 13, // color format ARGB1555 ENUM_DUMMY4WORD(IDE_COLOR_FORMAT) } IDE_COLOR_FORMAT; //@} /** Determine which buffer is selected. Used in ide_set_video_buffer_content() to set video buffer content. */ //@{ typedef enum { IDE_VIDEO_BUFFERID_0, ///< Buffer0 will be selected IDE_VIDEO_BUFFERID_1, ///< Buffer1 will be selected IDE_VIDEO_BUFFERID_2, ///< Buffer2 will be selected IDE_VIDEO_BUFFERID_3, ///< Buffer3 will be selected IDE_VIDEO_BUFFERID_CURRENT, ///< Current Operating buffer will be selected ENUM_DUMMY4WORD(IDE_BUFFERID) } IDE_BUFFERID; //@} /** ide LCD pixel direction. Set the output pixel RGB direction. */ //@{ typedef enum { IDE_PDIR_RGB = 0, ///< R...G...B... IDE_PDIR_RBG = 1, ///< R...B...G... ENUM_DUMMY4WORD(IDE_PDIR) } IDE_PDIR; //@} /** ide RGB format begin color. Used in ide_set_odd()/ ide_set_even() to set the interlaced mode odd/even begin color. */ //@{ typedef enum { IDE_LCD_R = 0, ///< color begin from R IDE_LCD_G = 1, ///< color begin from G IDE_LCD_B = 2, ///< color begin from B ENUM_DUMMY4WORD(IDE_PORDER) } IDE_PORDER; //@} /** ide dithering valid bits. select the dithering function valid bits. */ //@{ typedef enum { IDE_DITHER_4BITS = 0, ///< Dithering 4 valid bits. IDE_DITHER_5BITS = 1, ///< Dithering 5 valid bits. IDE_DITHER_6BITS = 2, ///< Dithering 6 valid bits. IDE_DITHER_7BITS = 3, ///< Dithering 7 valid bits. ENUM_DUMMY4WORD(IDE_DITHER_VBITS) } IDE_DITHER_VBITS; //@} /** ide output component selection. Output component selection when parallel interface is selected. */ //@{ typedef enum { IDE_COMPONENT_R = 0, ///< select output component as R IDE_COMPONENT_G = 1, ///< select output component as G IDE_COMPONENT_B = 2, ///< select output component as B IDE_COMPONENT_Y = 0, ///< select output component as Y IDE_COMPONENT_CB = 1, ///< select output component as Cb IDE_COMPONENT_CR = 2, ///< select output component as Cr ENUM_DUMMY4WORD(IDE_OUT_COMP) } IDE_OUT_COMP; //@} /** TV src select. select the TV src. */ //@{ typedef enum { IDE_TV_SRC_IDE = 0, ///< TV source is IDE1 IDE_TV_SRC_IDE2 = 1, ///< TV source is IDE2 ENUM_DUMMY4WORD(IDE_TV_SRC) } IDE_TV_SRC; //@} /** TV mode select. select the TV mode. */ //@{ typedef enum { IDE_TV_NTSC_M = 0, ///< TV mode is NTSC(M) IDE_TV_PAL_BDGHI = 1, ///< TV mode is PAL(BDGHI) IDE_TV_PAL_M = 2, ///< TV mode is PAL(M) IDE_TV_PAL_NC = 3, ///< TV mode is PAL(NC) ENUM_DUMMY4WORD(IDE_TV_MODE) } IDE_TV_MODE; //@} /** Defines ide palette capability. Defines the current palette capability of this chip version. */ //@{ typedef enum { IDE_PAL_CAP_16X2 = 0, ///< palette support 16 entities and 2 banks. IDE_PAL_CAP_256X1 = 1, ///< palette support 256 entities and 1 bank. IDE_PAL_CAP_256X2 = 2, ///< palette support 256 entities and 2 banks. ENUM_DUMMY4WORD(IDE_PAL_CAP) } IDE_PAL_CAP; //@} /** Defines ide alpha blending layer ID Defines ide alpha blending layer ID */ //@{ typedef enum { IDE_BLEND_V1 = 0, ///< layer V1 IDE_BLEND_V2 = 1, ///< layer V2 IDE_BLEND_FD = 2, ///< layer FD IDE_BLEND_O1 = 3, ///< layer O1 (if fmt = ARGB1555 => source alpha = 1) IDE_BLEND_O1_GLBALPHA5 = 4, ///< layer O1 & fmt=ARGB1555&source alpha = 0 ENUM_DUMMY4WORD(IDE_BLEND_LAYER) } IDE_BLEND_LAYER; //@} /** Defines ide alpha blending type. Defines ide alpha blending type. */ //@{ typedef enum { IDE_NO_ALPHA = 0, ///< Disable alpha blending IDE_GLOBAL_ALPHA = 1, ///< select Global alpha blending IDE_GLOBAL_ALPHA_BACK = 2, ///< select Global alpha blending with background IDE_SOURCE_ALPHA = 3, ///< select Source alpha blending IDE_SOURCE_ALPHA_BACK = 4, ///< select Source alpha blending with background ENUM_DUMMY4WORD(IDE_ALPHA_TYPE) } IDE_ALPHA_TYPE; //@} /** Defines ide scaling method Defines ide scaling method */ //@{ typedef enum { IDE_SCALEMETHOD_DROP = 0, ///< scaling method drop IDE_SCALEMETHOD_BILINEAR = 1, ///< scaling method bilinear ENUM_DUMMY4WORD(IDE_SCALE_METHOD) } IDE_SCALE_METHOD; //@} /** Defines ide FD number Defines ide FD number */ //@{ typedef enum { IDE_FD_0 = 0x00000001, ///< FD 0 IDE_FD_1 = 0x00000002, ///< FD 1 IDE_FD_2 = 0x00000004, ///< FD 2 IDE_FD_3 = 0x00000008, ///< FD 3 IDE_FD_4 = 0x00000010, ///< FD 4 IDE_FD_5 = 0x00000020, ///< FD 5 IDE_FD_6 = 0x00000040, ///< FD 6 IDE_FD_7 = 0x00000080, ///< FD 7 IDE_FD_8 = 0x00000100, ///< FD 8 IDE_FD_9 = 0x00000200, ///< FD 9 IDE_FD_10 = 0x00000400, ///< FD 10 IDE_FD_11 = 0x00000800, ///< FD 11 IDE_FD_12 = 0x00001000, ///< FD 12 IDE_FD_13 = 0x00002000, ///< FD 13 IDE_FD_14 = 0x00004000, ///< FD 14 IDE_FD_15 = 0x00008000, ///< FD 15 ENUM_DUMMY4WORD(IDE_FD_NUM) } IDE_FD_NUM; //@} /** Defines ide Line number Defines ide Line number */ //@{ typedef enum { IDE_LINE_0 = 0x00000001, ///< LINE 0 IDE_LINE_1 = 0x00000002, ///< LINE 1 IDE_LINE_2 = 0x00000004, ///< LINE 2 IDE_LINE_3 = 0x00000008, ///< LINE 3 IDE_LINE_4 = 0x00000010, ///< LINE 4 IDE_LINE_5 = 0x00000020, ///< LINE 5 IDE_LINE_6 = 0x00000040, ///< LINE 6 IDE_LINE_7 = 0x00000080, ///< LINE 7 IDE_LINE_8 = 0x00000100, ///< LINE 8 IDE_LINE_9 = 0x00000200, ///< LINE 9 IDE_LINE_10 = 0x00000400, ///< LINE 10 IDE_LINE_11 = 0x00000800, ///< LINE 11 IDE_LINE_12 = 0x00001000, ///< LINE 12 IDE_LINE_13 = 0x00002000, ///< LINE 13 IDE_LINE_14 = 0x00004000, ///< LINE 14 IDE_LINE_15 = 0x00008000, ///< LINE 15 ENUM_DUMMY4WORD(IDE_LINE_NUM) } IDE_LINE_NUM; //@} /** ide channel ID @note For ide_setConfig() */ //@{ typedef enum { IDE_ID_1, ///< ide Controller IDE_ID_2, ///< IDE2 Controller ENUM_DUMMY4WORD(IDE_ID) } IDE_ID; //@} /** Define YCC Clamp Define YCC Clamp */ //@{ typedef enum { IDE_YCCCLAMP_NOCLAMP, ///< YCC no clamp IDE_YCCCLAMP_1_254, ///< YCC clamp to 1 to 254 IDE_YCCCLAMP_16_235, ///< YCC clamp to 16 to 235 ENUM_DUMMY4WORD(IDE_YCCCLAMP) } IDE_YCCCLAMP; //@} /** Defines TV Test mode Defines TV Test mode */ //@{ typedef enum { IDETV_DAC_TESTMODE_SEL_COLORBAR = 0, ///< TV test mode color bar IDETV_DAC_TESTMODE_SEL_RAMP, ///< TV test mode ramp IDETV_DAC_TESTMODE_SEL_FIX, ///< TV test mode fix value ENUM_DUMMY4WORD(IDETV_DAC_TESTMODE_SEL) } IDETV_DAC_TESTMODE_SEL; //@} typedef enum { IDETV_CONFIG_ID_TVMODE, IDETV_CONFIG_ID_TESTMODE_EN, IDETV_CONFIG_ID_TESTMODE_SEL, IDETV_CONFIG_ID_BRL, IDETV_CONFIG_ID_CKPN_POL, IDETV_CONFIG_ID_BLL, IDETV_CONFIG_ID_LLVEL_CLAMP, IDETV_CONFIG_ID_YLPS_BYPASS, IDETV_CONFIG_ID_IRE_SETUP, IDETV_CONFIG_ID_Y_SCALE, IDETV_CONFIG_ID_CB_SCALE, IDETV_CONFIG_ID_CR_SCALE, //DAC relative IDETV_CONFIG_ID_DAC_PD, ENUM_DUMMY4WORD(IDETV_CONFIG_ID) } IDETV_CONFIG_ID; typedef enum { IDETV_CONFIGCOEF_ID_CHROMA_FILTER, IDETV_CONFIGCOEF_ID_Y_FILTER, ENUM_DUMMY4WORD(IDETV_CONFIGCOEF_ID) } IDETV_CONFIGCOEF_ID; /** ide configuration ID @note For IDE_setConfig() */ typedef enum { // IDE_CONFIG_DITHER_EN, ///< IDE_CONFIG_DITHER_FREERUN, ///< IDE_CONFIG_DISPDEV, IDE_CONFIG_PDIR, IDE_CONFIG_LCDL0, IDE_CONFIG_LCDL1, IDE_CONFIG_HSINV, IDE_CONFIG_VSINV, IDE_CONFIG_HVLDINV, IDE_CONFIG_VVLDINV, IDE_CONFIG_CLKINV, IDE_CONFIG_FLDINV, IDE_CONFIG_RGBDSEL, IDE_CONFIG_DEINV, IDE_CONFIG_OUTDDR, IDE_CONFIG_THROUGHSEL, // IDE_CONFIG_IDEEN, IDE_CONFIG_LAYEREN, //TG IDE_CONFIG_TG_HSYNC, IDE_CONFIG_TG_HTOTAL, IDE_CONFIG_TG_HSYNCDLY, IDE_CONFIG_TG_HVALIDST, IDE_CONFIG_TG_HVALIDED, IDE_CONFIG_TG_VSYNC, IDE_CONFIG_TG_VTOTAL, IDE_CONFIG_TG_VSYNCDLY, IDE_CONFIG_TG_FLD0_VVALIDST, IDE_CONFIG_TG_FLD0_VVALIDED, IDE_CONFIG_TG_FLD1_VVALIDST, IDE_CONFIG_TG_FLD1_VVALIDED, IDE_CONFIG_TG_INTERLACE_EN, IDE_CONFIG_TG_FLD0_CBLKST, IDE_CONFIG_TG_FLD0_CBLKED, IDE_CONFIG_TG_FLD1_CBLKST, IDE_CONFIG_TG_FLD1_CBLKED, IDE_CONFIG_TG_CFIDST, IDE_CONFIG_TG_CFIDED, IDE_CONFIG_LINE_COMPARATIVE_METHOD, // ENUM_DUMMY4WORD(IDE_CONFIG_ID) } IDE_CONFIG_ID; /** Display buffer and window size. Main structure to dedicate the frame buffer size and the display window size. */ //@{ typedef struct { UINT32 ui_width; ///< Display buffer width UINT32 ui_height; ///< Display buffer height UINT32 ui_win_width; ///< Display window width UINT32 ui_win_height; ///< Display window height } LCDSIZE, *PLCDSIZE; //@} /** Video buffer address. Main structure to dedicate the frame buffer starting address. */ //@{ typedef struct { UINT32 b0_y; /// removed //#define ide_setO1PaletteSel(ui_psel) idec_set_o1_palette_sel(IDE_ID_1, ui_psel) #define ide_set_o1_palette_high_addr(ui_hi_addr) idec_set_o1_palette_high_addr(IDE_ID_1, ui_hi_addr) #define ide_set_o1_fmt(ui_fmt) idec_set_o1_fmt(IDE_ID_1, ui_fmt) #if 0 #define ide_set_o2_scale_ctrl(b_hscaleup, b_vscaleup) idec_set_o2_scale_ctrl(IDE_ID_1, b_hscaleup, b_vscaleup) #define ide_set_o2_scale_factor(ui_hsf, b_sub, ui_vsf, b_vsub) idec_set_o2_scale_factor(IDE_ID_1, ui_hsf, b_sub, ui_vsf, b_vsub) #define ide_set_o2_vsf_init(ui_init0, ui_init1) idec_set_o2_vsf_init(IDE_ID_1, ui_init0, ui_init1) #define ide_set_o2_win_dim(ui_win_w, ui_win_h) idec_set_o2_win_dim(IDE_ID_1, ui_win_w, ui_win_h) #define ide_set_o2_win_pos(ui_x, ui_y) idec_set_o2_win_pos(IDE_ID_1, ui_x, ui_y) #define ide_set_o2_palette_sel(ui_psel) idec_set_o2_palette_sel(IDE_ID_1, ui_psel) #define ide_set_o2_palette_high_addr(ui_hi_addr) idec_set_o2_palette_high_addr(IDE_ID_1, ui_hi_addr) #define ide_set_o2_fmt(ui_fmt) idec_set_o2_fmt(IDE_ID_1, ui_fmt) #define ide_set_osd_layer_swap(b_swap) idec_set_osd_layer_swap(IDE_ID_1, b_swap) #endif //#define ide_setFDLineLayerSwap(b_swap) idec_set_fd_line_layer_swap(IDE_ID_1,b_swap) #define ide_get_o1_scale_factor(ui_hsf, b_sub, ui_vsf, b_vsub) idec_get_o1_scale_factor(IDE_ID_1, ui_hsf, b_sub, ui_vsf, b_vsub) #define ide_get_o1_win_dim(ui_win_w, ui_win_h) idec_get_o1_win_dim(IDE_ID_1, ui_win_w, ui_win_h) #define ide_get_o1_win_pos(ui_x, ui_y) idec_get_o1_win_pos(IDE_ID_1, ui_x, ui_y) #define ide_get_o1_palette_sel(ui_psel) idec_get_o1_palette_sel(IDE_ID_1, ui_psel) #define ide_get_o1_palette_high_addr(ui_hi_addr) idec_get_o1_palette_high_addr(IDE_ID_1, ui_hi_addr) #define ide_get_o1_fmt(ui_fmt) idec_get_o1_fmt(IDE_ID_1, ui_fmt) #if 0 #define ide_get_o2_scale_factor(ui_hsf, b_sub, ui_vsf, b_vsub) idec_get_o2_scale_factor(IDE_ID_1, ui_hsf, b_sub, ui_vsf, b_vsub) #define ide_get_o2_win_dim(ui_win_w, ui_win_h) idec_get_o2_win_dim(IDE_ID_1, ui_win_w, ui_win_h) #define ide_get_o2_win_pos(ui_x, ui_y) idec_get_o2_win_pos(IDE_ID_1, ui_x, ui_y) #define ide_get_o2_palette_sel(ui_psel) idec_get_o2_palette_sel(IDE_ID_1, ui_psel) #define ide_get_o2_palette_high_addr(ui_hi_addr) idec_get_o2_palette_high_addr(IDE_ID_1, ui_hi_addr) #define ide_get_o2_fmt(ui_fmt) idec_get_o2_fmt(IDE_ID_1, ui_fmt) #define ide_get_osd_layer_swap() idec_get_osd_layer_swap(IDE_ID_1) #endif // OSD color key and Blending #define ide_set_osd_colorkey_en(b_en) idec_set_osd_colorkey_en(IDE_ID_1, b_en) #define ide_set_osd_colorkey(ui_ck) ide_set_osd_colorkey(IDE_ID_1, ui_ck) //void ide_setOsdBlendOp(IDE_OSD_BLEND_OP uiOp); #define ide_get_osd_colorkey(ui_ck) idec_get_osd_colorkey(IDE_ID_1, ui_ck) #define ide_get_osd_colorkey_en(b_en) idec_get_osd_colorkey_en(IDE_ID_1, b_en) //void ide_getOsdBlendOp(IDE_OSD_BLEND_OP *uiOp); // OSD color Space Transform //void ide_setO1CstPreOffset(UINT32 ui_y, UINT32 ui_cb, UINT32 ui_cr); //void ide_setO1CstPostOffst(UINT32 ui_y, UINT32 ui_cb, UINT32 ui_cr); //void ide_setO1CstCoef(ACCRCY_SEL b_accuracy, UINT32 *ui_pcoef); //void ide_setO2CstPreOffset(UINT32 ui_y, UINT32 ui_cb, UINT32 ui_cr); //void ide_setO2CstPostOffst(UINT32 ui_y, UINT32 ui_cb, UINT32 ui_cr); //void ide_setO2CstCoef(ACCRCY_SEL b_accuracy, UINT32 *ui_pcoef); #if 0 //------------------------------------------------- // TV Encoder register programm APIs //------------------------------------------------- //*These api will be remove begin --> add idetv_set_config to config ER tv_open(void); ER tv_close(void); BOOL tv_is_opened(void); void ide_set_tv_use_post_icst(BOOL b_sel); void ide_set_tv_use_post_gamma(BOOL b_sel); void ide_set_tv_out_offset(UINT32 ui_y, UINT32 ui_cb, UINT32 ui_cr); void ide_set_tv_out_limit(UINT8 ui_y_low, UINT8 ui_y_up, UINT8 ui_cb_low, UINT8 ui_cb_up, UINT8 ui_cr_low, UINT8 ui_cr_up); void ide_set_tv_mode(IDE_TV_MODE ui_tvmode); void ide_set_tv_test_mode(BOOL b_en); void ide_set_tv_test_mode_sel(UINT8 uisel); void ide_set_tv_test_mode_fix_value(UINT32 ui_val); void ide_set_tv_slave_mode(BOOL b_en); void ide_set_tv_sacle_swap(BOOL b_en); void ide_set_tv_data_swap(BOOL b_en); void ide_set_tv_sin_cos_swap(BOOL b_en); void ide_set_tv_search_en(BOOL b_en); void ide_set_tv_ckpn_pol(BOOL b_sel); void ide_set_tv_burst(UINT8 ui_burst); void ide_set_tv_bll(UINT8 ui_bll); void ide_set_tv_brl(UINT8 ui_brl); void ide_set_tv_ntsc_setup_level(UINT8 ui_ntsc_setup); void ide_set_tv_src(IDE_TV_SRC src); void ide_set_tv_scale(UINT8 ui_y, UINT8 ui_cb, UINT8 ui_cr); void ide_set_tv_power_down(BOOL b_pd); BOOL ide_get_tv_power_down(void); void ide_set_tv_sela(UINT8 ui_sela); void ide_set_tv_low_level(UINT32 ui_level); void ide_set_tv_trim(UINT8 ui_trim); void ide_get_tv_trim(UINT8 *ui_trim); UINT8 ide_get_tv_bll(void); UINT8 ide_get_tv_brl(void); UINT8 ide_get_tv_ntsc_setup_level(void); void ide_get_tv_scale(UINT8 *ui_y, UINT8 *ui_cb, UINT8 *ui_cr); void ide_set_tv_bypass_lpf(BOOL b_en); BOOL ide_get_tv_bypass_lpf(void); void ide_set_tv_bypass_notch(BOOL b_en); BOOL ide_get_tv_bypass_notch(void); void ide_set_tv_chroma_filter(BOOL b_prag, UINT8 *ui_taps); void ide_set_tv_y_filter(BOOL b_prag, UINT8 *ui_taps); //*These api will be remove end --> add idetv_set_config to config void idetv_set_config(IDETV_CONFIG_ID config_id, UINT32 ui_config); UINT32 idetv_get_config(IDETV_CONFIG_ID config_id); void idetv_set_coef(IDETV_CONFIGCOEF_ID config_id, UINT8 *ui_coef); void idetv_get_coef(IDETV_CONFIGCOEF_ID config_id, UINT8 *ui_coef); #endif //------------------------------------------------- // ide Public Functions //------------------------------------------------- #define ide_set_video_buf_addr(video_id, pv_buf_addr) idec_set_video_buf_addr(IDE_ID_1, video_id, pv_buf_addr) #define ide_get_video_buf_addr(video_id, pv_buf_addr) idec_get_video_buf_addr(IDE_ID_1, video_id, pv_buf_addr) #define ide_set_video_buf_attr(video_id, pv_buf_attr) idec_set_video_buf_attr(IDE_ID_1, video_id, pv_buf_attr) #define ide_get_video_buf_attr(video_id, pv_buf_attr) idec_get_video_buf_attr(IDE_ID_1, video_id, pv_buf_attr) #define ide_set_video_win_attr_ex(video_id, pv_win_attr, b_load) idec_set_video_win_attr_ex(IDE_ID_1, video_id, pv_win_attr, b_load) #define ide_set_video_win_attr(video_id, pv_win_attr) idec_set_video_win_attr(IDE_ID_1, video_id, pv_win_attr) #define ide_set_video_vsf_init(video_id, ui_init0, ui_init1) idec_set_video_vsf_init(IDE_ID_1, video_id, ui_init0, ui_init1) #define ide_set_osd_buf_addr(osd_id, ui_osd_addr) idec_set_osd_buf_addr(IDE_ID_1, osd_id, ui_osd_addr) #define ide_get_osd_buf_addr(osd_id, pui_osd_addr) idec_get_osd_buf_addr(IDE_ID_1, osd_id, pui_osd_addr) #define ide_set_osd_buf_attr(osd_id, p_osd_buf_attr) idec_set_osd_buf_attr(IDE_ID_1, osd_id, p_osd_buf_attr) #define ide_get_osd_buf_attr(osd_id, p_osd_buf_attr) idec_get_osd_buf_attr(IDE_ID_1, osd_id, p_osd_buf_attr) #define ide_set_osd_win_attr_ex(osd_id, p_osd_win_attr, b_load) idec_set_osd_win_attr_ex(IDE_ID_1, osd_id, p_osd_win_attr, b_load) #define ide_set_osd_win_attr(osd_id, p_osd_win_attr) idec_set_osd_win_attr(IDE_ID_1, osd_id, p_osd_win_attr) #define ide_set_osd_vsf_init(osd_id, ui_init0, ui_init1) idec_set_osd_vsf_init(IDE_ID_1, osd_id, ui_init0, ui_init1) #define ide_set_palette_entry(p_palette_entry) idec_set_palette_entry(IDE_ID_1, p_palette_entry) #define ide_get_palette_entry(p_palette_entry) idec_get_palette_entry(IDE_ID_1, p_palette_entry) #define ide_set_palette_group(ui_start, ui_number, p_palette_entry) idec_set_palette_group(IDE_ID_1, ui_start, ui_number, p_palette_entry) #define ide_get_palette_group(ui_start, ui_number, p_palette_entry) idec_get_palette_group(IDE_ID_1, ui_start, ui_number, p_palette_entry) #define ide_get_shadow_palette_group(ui_start, ui_number, p_palette_entry) //idec_get_shadow_palette_group(IDE_ID_1, ui_start, ui_number, p_palette_entry) #define ide_set_palette_group_a_cr_cb_y(ui_start, ui_number, p_palette_entry) idec_set_palette_group_a_cr_cb_y(IDE_ID_1, ui_start, ui_number, p_palette_entry) #define ide_get_palette_group_a_cr_cb_y(ui_start, ui_number, p_palette_entry) idec_get_palette_group_a_cr_cb_y(IDE_ID_1, ui_start, ui_number, p_palette_entry) #define ide_wait_frame_end(wait) idec_wait_frame_end(IDE_ID_1, wait) #define ide_wait_yuv_output_done() idec_wait_yuv_output_done(IDE_ID_1) #define ide_disable_video(video_id) idec_disable_video(IDE_ID_1, video_id) #define ide_enable_video(video_id) idec_enable_video(IDE_ID_1, video_id) #define ide_get_video_enable(video_id) idec_get_video_enable(IDE_ID_1, video_id) #define ide_disable_osd(osd_id) idec_disable_osd(IDE_ID_1, osd_id) #define ide_enable_osd(osd_id) idec_enable_osd(IDE_ID_1, osd_id) #define ide_get_osd_enable(osd_id) idec_get_osd_enable(IDE_ID_1, osd_id) #define ide_get_pal_capability() idec_get_pal_capability(IDE_ID_1) #define ide_set_video_buffer_content(video_id, buffer_id, p_ycbcr) idec_set_video_buffer_content(IDE_ID_1, video_id, buffer_id, p_ycbcr) #define ide_convert_rgb2ycbcr(p_rgb, p_ycbcr) idec_convert_rgb2ycbcrr(IDE_ID_1, p_rgb, p_ycbcr) //void ide_configVideoCst(IDE_VIDEOID video_id, BOOL b_en, CST_SEL SEL); //void ide_configOsdCst(IDE_OSDID osd_id, BOOL b_en, CST_SEL SEL); //void ide_config_icst(BOOL b_en, CST_SEL SEL); #define ide_config_icst(b_en, SEL) idec_config_icst(IDE_ID_1, b_en, SEL) #define ide_getconfig_icst(b_en, SEL) idec_getconfig_icst(IDE_ID_1, b_en, SEL) #define ide_config_output_limit(b_sel) idec_config_output_limit(IDE_ID_1, b_sel) #define ide_set_constant_window_offset(ui_x, ui_y) idec_set_constant_window_offset(IDE_ID_1, ui_x, ui_y) #define ide_get_constant_window_offset(ui_x, ui_y) idec_get_constant_window_offset(IDE_ID_1, ui_x, ui_y) //------------------------------------------------- // ide OS Level Functions //------------------------------------------------- //ID ide_getLockStatus(void); #if 0 void ide_attach(void); void ide_detach(void); void ide_init(void); #endif #define ide_open() idec_open(IDE_ID_1) #define ide_close() idec_close(IDE_ID_1) #define ide_is_opened() idec_is_opened(IDE_ID_1) //void ide_registerMiInterruptHandler(fp_ide_interrupt_callback IntrHdl); #define IDE1_OSD2_EXIST 0 //@} ER ide_platform_set_clksrc(IDE_ID id, UINT32 src); void ide_platform_set_freq(IDE_ID id, UINT32 freq); void ide_platform_set_iffreq(IDE_ID id, UINT32 freq); UINT32 ide_platform_get_freq(IDE_ID id); UINT32 ide_platform_get_iffreq(IDE_ID id); void ide_platform_clk_en(IDE_ID id); void ide_platform_clk_dis(IDE_ID id); //#include "ide_compat.h" #endif //_IDE_H