drv_gfx.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /******************************************************************************/
  2. /**
  3. *
  4. * @file drv_gfx.h
  5. *
  6. * @brief This file specifies the APIs provided to control GFX(Graphics Input)
  7. *
  8. * @note Copyright (c) 2013 S2 Technology Co., Ltd. \n
  9. * All rights reserved.
  10. *
  11. * @author
  12. *
  13. ******************************************************************************/
  14. #ifndef __DRV_GFX_H__
  15. #define __DRV_GFX_H__
  16. /*******************************************************************************
  17. * Header include
  18. ******************************************************************************/
  19. #include "drv_types.h"
  20. #include "drv_pq_external.h"
  21. typedef enum _DRV_GFX_YUV_TYPE
  22. {
  23. eGFX_YUV_444_10bit=0,
  24. eGFX_YUV_444_8bit,
  25. eGFX_YUV_422_10bit,
  26. eGFX_YUV_422_8bit,
  27. } DRV_GFX_YUV_TYPE;
  28. typedef enum _DRV_GFX_YCBCR_RANGE
  29. {
  30. eGFX_YCBCR_235=0,
  31. eGFX_YCBCR_255,
  32. eGFX_YCBCR_NONE,
  33. } DRV_GFX_YCBCR_RANGE;
  34. void DRV_GFX_Enable(BOOL fEnable);
  35. void DRV_GFX_Reset(BOOL fEnable);
  36. void DRV_GFX_SetYUVTypeAndChromaFilter(DRV_GFX_YUV_TYPE eType, BOOL fEnable);
  37. UINT8 DRV_GFX_GetYUVType(DRV_GFX_YUV_TYPE eType);
  38. void DRV_GFX_SetMem_Y_Offset(UINT32 offset);
  39. UINT32 DRV_GFX_GetMem_Y_Offset(void);
  40. void DRV_GFX_SetMem_Y_Size(UINT32 size);
  41. void DRV_GFX_SetMem_UV_Offset(UINT32 offset);
  42. void DRV_GFX_SetMem_UV_Size(UINT32 size);
  43. void DRV_GFX_SetMem_Motion_Offset(UINT32 offset);
  44. void DRV_GFX_SetMem_Motion_Size(UINT32 size);
  45. void DRV_GFX_SetMem_MBW_Offset(UINT32 offset);
  46. void DRV_GFX_SetMem_MBW_Size(UINT32 size);
  47. void DRV_GFX_SetMem_Pack_Width(UINT32 y_width,UINT32 uv_width, UINT32 mo_width, UINT32 mbw_width);
  48. void DRV_GFX_SetMem_Y_StartAddress(UINT32 f0, UINT32 f1, UINT32 f2, UINT32 f3);
  49. void DRV_GFX_SetMem_UV_StartAddress(UINT32 f0, UINT32 f1, UINT32 f2, UINT32 f3);
  50. void DRV_GFX_SetMem_MotionMBW_StartAddress(UINT32 f0);
  51. void DRV_GFX_SetRGB2YCbCrRange(DRV_GFX_YCBCR_RANGE eRange);
  52. void DRV_GFX_SetDither(BOOL fEnable);
  53. void DRV_GFX_SetMem_YUV888SizeAndPackwidth(UINT32 y_size, UINT32 uv_size, UINT32 y_width, UINT32 uv_width);
  54. void DRV_GFX_SetMem_LastNum(UINT32 y_lastnum, UINT32 uv_lastnum, UINT32 mo_lastnum, UINT32 mbw_lastnum);
  55. void DRV_GFX_SetMem_LastNum_8bit(UINT32 y_lastnum, UINT32 uv_lastnum);
  56. void DRV_GFX_SetMotionDataWrite(BOOL fEnable);
  57. void DRV_GFX_SetDoubleFrameBuffer(BOOL fEnable);
  58. void DRV_GFX_SetUseVDIAddressing(BOOL fEnable);
  59. void DRV_GFX_SetMem_420Format(BOOL fEnable);
  60. void DRV_GFX_SetY8bit(BOOL fEnable);
  61. void DRV_GFX_SetMem_Pack_LastPopOperaMode(BOOL fEnable);
  62. void DRV_GFX_SetMQThr(UINT32 nValue);
  63. void DRV_GFX_SetColorCross_Offset(UINT32 y_dat_offset, UINT32 y_cnt_offset, UINT32 c_dat_offset, UINT32 c_cnt_offset);
  64. void DRV_GFX_SetColorCross_Size(UINT32 y_dat_size, UINT32 y_cnt_size, UINT32 c_dat_size, UINT32 c_cnt_size);
  65. void DRV_GFX_SetColorCross_Width(UINT32 y_dat_width, UINT32 y_cnt_width, UINT32 c_dat_width, UINT32 c_cnt_width);
  66. void DRV_GFX_SetHsyncMode(UINT8 cMode);
  67. /**
  68. * @brief Control GFX RGB to YCbCr matrix reference HW orignal 601 matrix or SW setting
  69. *
  70. * This function control GFX RGB to YCbCr matrix
  71. *
  72. * @param uEnable : value 0 mean convert by 601 matrix(HW orignal design), 1 mean GFX matrix will reference GFX_RGB2YCBCR_MAT_A11 ~ GFX_RGB2YCBCR_MAT_A34 setting
  73. *
  74. * @return : n/a
  75. */
  76. void DRV_GFX_SetRGB2YCbCrMatrixOpt(BOOL uEnable);
  77. /**
  78. * @brief Set parameter to the RGB to YCbCr matrix in GFX
  79. *
  80. * This function set parameter to the RGB to YCbCr matrix in GFX
  81. *
  82. * @param matrix coefficient
  83. *
  84. * @return : n/a
  85. */
  86. void DRV_GFX_SetMatrix(CSC_SETTING* pRGB2YCCMatrix);
  87. /**
  88. * @brief Set GFX memory request opteration
  89. *
  90. * This function design to prevent current lint send request before previos line send last request
  91. *
  92. * @param uEnable = 0 to disable function, 1 to prevent current lint send request before previos line send last request
  93. *
  94. * @return : n/a
  95. */
  96. void DRV_GFX_MemRequestOpt(BOOL uEnable);
  97. /**
  98. * @brief Set GFX Read/Write memory enable/disable
  99. *
  100. * This function design to control GFX read/write memory operation
  101. *
  102. * @param uEnable = 0 to disable GFX read/write memory operation, 0x3f to enable GFX read/write memory operation
  103. *
  104. * @return : n/a
  105. */
  106. void DRV_GFX_MemReadWriteEnable(BOOL uEnable);
  107. #endif