123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- /******************************************************************************/
- /**
- *
- * @file drv_picx.h
- *
- * @brief This file specifies the APIs provided to control PICX(Display Fetch)
- *
- * @note Copyright (c) 2013 S2 Technology Co., Ltd. \n
- * All rights reserved.
- *
- * @author
- *
- ******************************************************************************/
- #ifndef __DRV_PICX_H__
- #define __DRV_PICX_H__
- /*******************************************************************************
- * Header include
- ******************************************************************************/
- #include "drv_types.h"
- #include "drv_pq_external.h"
- typedef enum _DRV_PICX_FLIP_TYPE
- {
- ePICX_FLIP_TYPE_HORIZONTAL = 0,
- ePICX_FLIP_TYPE_VERTICAL,
- } DRV_PICX_FLIP_TYPE;
- typedef enum _DRV_PICX_DATA_TYPE
- {
- ePICX_DATA_TYPE_Y = 0,
- ePICX_DATA_TYPE_Y8,
- ePICX_DATA_TYPE_UV,
- ePICX_DATA_TYPE_UV8,
- ePICX_DATA_TYPE_MO,
- ePICX_DATA_TYPE_MBW,
- } DRV_PICX_DATA_TYPE;
- typedef enum _DRV_PICX_FRAME_START_ADDRESS
- {
- ePICX_FRAME_0_START = 0,
- ePICX_FRAME_1_START,
- ePICX_FRAME_2_START,
- ePICX_FRAME_3_START,
- } DRV_PICX_FRAME_START_ADDRESS;
- typedef enum _DRV_PICX_SKIP_N_LINES
- {
- ePICX_SKIP_NONE = 0,
- ePICX_SKIP_1_LINE = 1,
- ePICX_SKIP_3_LINES = 2,
- ePICX_SKIP_7_LINES = 3,
- } DRV_PICX_SKIP_N_LINES;
- typedef enum _DRV_PICX_REGISTER_UPDATE_MODE
- {
- ePICX_REGISTER_UPDATE_MODE_0 = 0,
- ePICX_REGISTER_UPDATE_MODE_1 = 1,
- } DRV_PICX_REGISTER_UPDATE_MODE;
- /*
- typedef enum _DRV_PICX_RGB_COLOR_FORMAT
- {
- ePICX_RGB_COLOR_FORMAT_DISABLED = 0,
- ePICX_RGB_COLOR_FORMAT_RGB888 = 1,
- ePICX_RGB_COLOR_FORMAT_ARGB888 = 2,
- ePICX_RGB_COLOR_FORMAT_RGB565 = 3,
- } DRV_PICX_RGB_COLOR_FORMAT;
- */
- typedef enum _DRV_PICX_FETCH_PRIORITY
- {
- ePICX_FETCH_PRIORITY_NORMAL = 0,
- ePICX_FETCH_PRIORITY_LOW = 1,
- } DRV_PICX_FETCH_PRIORITY;
- typedef enum _DRV_PICX_DFM
- {
- ePICX_DFM_VIDEO = 0, /* 24/25/30/50/60hz inputs */
- ePICX_DFM_PC = 1, /* > 60hz, need to be progressive */
- } DRV_PICX_DFM;
- typedef enum _DRV_PICX_3D_RGB_ORDER
- {
- ePICX_3D_RGB_ORDER_NORMAL = 0,
- ePICX_3D_RGB_ORDER_R_B_SWAP = 1, /* inverse rgb order (r and b swapped, for imagination GPU core) */
- } DRV_PICX_3D_RGB_ORDER;
- typedef enum _DRV_PICX_YCBCR_RANGE
- {
- ePICX_YCBCR_255=0,
- ePICX_YCBCR_235,
- ePICX_YCBCR_NONE,
- } DRV_PICX_YCBCR_RANGE;
- void DRV_PICX_Reset(BOOL fEnable);
- void DRV_PICX_ReadEn(BOOL fEnable);
- void DRV_PICX_EnableFlip(DRV_PICX_FLIP_TYPE eType, UINT8 fEnable);
- BOOL DRV_PICX_IsFlipEnabled(DRV_PICX_FLIP_TYPE eType);
- #if (CONFIG_CHIPID == 0x330)
- void DRV_PICX_SetFrameStartAddress(DRV_PICX_DATA_TYPE eType, DRV_PICX_FRAME_START_ADDRESS eFrameStart, UINT32 Value);
- #else
- void DRV_PICX_SetFrameStartAddress(DRV_PICX_FRAME_START_ADDRESS eFrameStart, UINT32 Value);
- #endif
- void DRV_PICX_SetPackWidth(UINT32 Value);
- void DRV_PICX_SetLines(UINT32 Value);
- void DRV_PICX_SetOffset(DRV_PICX_DATA_TYPE eType, UINT32 Value);
- void DRV_PICX_SetSize(DRV_PICX_DATA_TYPE eType, UINT32 Value);
- UINT32 DRV_PICX_GetSize(DRV_PICX_DATA_TYPE eType);
- void DRV_PICX_SetYWordOffset(UINT32 Value);
- UINT32 DRV_PICX_GetYWordOffset(void);
- void DRV_PICX_SetY4bitOffset(UINT32 Value);
- UINT32 DRV_PICX_GetY4bitOffset(void);
- void DRV_PICX_SetUVWordOffset(UINT32 Value);
- UINT32 DRV_PICX_GetUVWordOffset(void);
- void DRV_PICX_SetUV4bitOffset(UINT32 Value);
- UINT32 DRV_PICX_GetUV4bitOffset(void);
- void DRV_PICX_SetMOWordOffset(UINT32 Value);
- UINT32 DRV_PICX_GetMOWordOffset(void);
- void DRV_PICX_SetMO2bitOffset(UINT32 Value);
- UINT32 DRV_PICX_GetMO2bitOffset(void);
- //void DRV_PICX_SetMOHalf(BOOL fFlag);
- void DRV_PICX_SetMBWLines(UINT32 Value);
- void DRV_PICX_SetMBWWordOffset(UINT32 Value);
- UINT32 DRV_PICX_GetMBWWordOffset(void);
- void DRV_PICX_SetMBW2bitOffset(UINT32 Value);
- UINT32 DRV_PICX_GetMBW2bitOffset(void);
- void DRV_PICX_SetMBWPackWidth(UINT32 Value);
- UINT32 DRV_PICX_GetMBWPackWidth(void);
- void DRV_PICX_EnableMBWRead(BOOL fEnable);
- //void DRV_PICX_SetMBWxxx(UINT32 Value);
- void DRV_PICX_SetRegisterUpdateMode(DRV_PICX_REGISTER_UPDATE_MODE eMode);
- //void DRV_PICX_SetRGBColorFormat(DRV_PICX_RGB_COLOR_FORMAT eFormat);
- void DRV_PICX_SetFrameBufferIndex(UINT8 Index);
- void DRV_PICX_SetFetchPriority(DRV_PICX_FETCH_PRIORITY ePriority);
- void DRV_PICX_SetDFM(DRV_PICX_DFM eDFM);
- void DRV_PICX_SetDataPipeDelay(UINT32 PixelClockCycleTime);
- void DRV_PICX_SkipLinesInMemory(DRV_PICX_SKIP_N_LINES eSelect);
- UINT32 DRV_PICX_GetSkipLinesInMemory(void);
- void DRV_PICX_EnableInterlaceAddressingMode(BOOL fEnable);
- void DRV_PICX_SetBurstOffset(DRV_PICX_DATA_TYPE eType, UINT32 Value);
- UINT32 DRV_PICX_GetBurstOffset(DRV_PICX_DATA_TYPE eType);
- void DRV_PICX_SetLastNumber(DRV_PICX_DATA_TYPE eType, UINT32 Value);
- void DRV_PICX_Set3DRGBOrder(DRV_PICX_3D_RGB_ORDER eOrder);
- void DRV_PICX_Enable3DInterleaving(BOOL fEnable);
- void DRV_PICX_Split3DLeftRight(BOOL fEnable);
- void DRV_PICX_Swap3DLeftRight(BOOL fEnable);
- void DRV_PICX_Set3DYWordOffset(UINT32 Value);
- void DRV_PICX_Set3DY4bitOffset(UINT32 Value);
- void DRV_PICX_Set3DUVWordOffset(UINT32 Value);
- void DRV_PICX_Set3DUV4bitOffset(UINT32 Value);
- void DRV_PICX_Set3DMOWordOffset(UINT32 Value);
- void DRV_PICX_Set3DMO2bitOffset(UINT32 Value);
- void DRV_PICX_Set3DMBWWordOffset(UINT32 Value);
- void DRV_PICX_Set3DMBW2bitOffset(UINT32 Value);
- void DRV_PICX_SetSkipFirstLine_UV(UINT32 Value);
- void DRV_PICX_Set3DSideBySideSize(DRV_PICX_DATA_TYPE eType, UINT32 Value);
- void DRV_PICX_Set3DSideBySideBurst(DRV_PICX_DATA_TYPE eType, UINT32 Value);
- void DRV_PICX_Set3DFrameBurst(DRV_PICX_DATA_TYPE eType, UINT32 Value);
- void DRV_PICX_SetY8bit(BOOL fEnable);
- void DRV_PICX_SetSelVDI (BOOL fEnable);
- void DRV_PICX_SetPreFetch_Enable(BOOL fEnable);
- /**
- * @brief Set Picx Memory control.
- *
- * This function setup PICX sram control method, decide if release time slot for other channel
- *
- * @param uEnable : value 0 mean as previous design(occupy time slot even not access sram anymore)
- * ,1 for release time slot for other channel
- * @return : n/a
- */
- void DRV_PICX_SetMifOpt(BOOL uEnable);
- /**
- * @brief PIP set RGB value have a nominal range of 0-255 or 16-235.
- *
- * This function setup PICX set RGB value with nominal range of 0-255 or 16-235, mostly used in JPEG source, apply the nominal range
- * while load data from memory.
- *
- * @param eRange : value 0 (ePICX_YCBCR_255) : set RGB range as 0-255, value 1 (ePICX_YCBCR_235) : set RGB range as 16-235
- * @return : n/a
- */
- void DRV_PICX_SetRGB2YCbCrRange(DRV_PICX_YCBCR_RANGE eRange);
- /**
- * @brief Control PICX RGB to YCbCr matrix reference HW orignal 601 matrix or SW setting
- *
- * This function control PICX RGB to YCbCr matrix, if PICX read data from memory, and data format is RGB, enable the Matrix convert RGB data to YCbCr
- *
- * @param uEnable : value 0 mean convert by 601 matrix(HW orignal design), 1 mean PIP matrix will reference PICX_RGB2YCBCR_MAT_A11 ~ PICX_RGB2YCBCR_MAT_A34 setting
- *
- * @return : n/a
- */
- void DRV_PICX_SetRGB2YCbCrMatrixOpt(BOOL uEnable);
- /**
- * @brief Set parameter to the RGB to YCbCr matrix in PIP
- *
- * This function set parameter to the RGB to YCbCr matrix in PIP, mostly applied in the JPEG source with RGB color space
- *
- * @param matrix coefficient
- *
- * @return : n/a
- */
- void DRV_PICX_SetMatrix(CSC_SETTING* pRGB2YCCMatrix);
- #endif
|