hdmi_video.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #ifndef __HDMI_VIDEO_H__
  2. #define __HDMI_VIDEO_H__
  3. #include <drv_vip_internal.h>
  4. #define AVI_C_NODATA (0)
  5. #define AVI_C_ITU601 (1)
  6. #define AVI_C_ITU709 (2)
  7. #define AVI_Y_RGB (0)
  8. #define AVI_Y_YCC422 (1)
  9. #define AVI_Y_YCC444 (2)
  10. #define AVI_M_NODATA (0)
  11. #define AVI_M_4_3 (1)
  12. #define AVI_M_16_9 (2)
  13. #define AVI_R_CHECK_AVI_M (8)
  14. #define AVI_R_4_3_CENTER (9)
  15. #define AVI_R_16_9_CENTER (10)
  16. #define AVI_R_14_9_CENTER (11)
  17. #define HDMI_HVAILD_TOLERANCE_PERMILE (10) //unit: 0.1%
  18. #define HDMI_VVAILD_TOLERANCE_PERMILE (10) //unit: 0.1%
  19. #define HDMI_HTOTAL_TOLERANCE_PERMILE (20)
  20. #define HDMI_VTOTAL_TOLERANCE_PERMILE (20)
  21. #define HDMI_VFREQ_TOLERANCE_PERMILE (5) //unit: 1%
  22. /*!
  23. * @brief HDMI Video Type of Vendor Specific InfoFrame Packet
  24. */
  25. typedef enum
  26. {
  27. DRV_HDMI_VSI_TYPE_NONE = 0x00, //no additional HDMI format is presented in this packet
  28. DRV_HDMI_VSI_TYPE_EXT_RES, //extended resolution format (e.g. used for 4K x 2K video) present
  29. DRV_HDMI_VSI_TYEP_3D, // 3D format indication present
  30. } DRV_HDMIVSITYPE_e;
  31. /*!
  32. * @brief HDMI 3D Structure
  33. */
  34. typedef enum
  35. {
  36. DRV_HDMI_3D_STRUCT_FP = 0x00, //frame packing
  37. DRV_HDMI_3D_STRUCT_FA, //field alternative
  38. DRV_HDMI_3D_STRUCT_LA, //line alternative
  39. DRV_HDMI_3D_STRUCT_SS_F, //side by side full
  40. DRV_HDMI_3D_STRUCT_L_D, //L + depth
  41. DRV_HDMI_3D_STRUCT_L_D_G, //L + depth + graphic + graphics-depth
  42. DRV_HDMI_3D_STRUCT_TB, //Top and Bottom
  43. DRV_HDMI_3D_STRUCT_RESV7, //reserved
  44. DRV_HDMI_3D_STRUCT_SS_H, //side by side half
  45. DRV_HDMI_3D_STRUCT_RESV9, //reserved
  46. DRV_HDMI_3D_STRUCT_RESV10, //reserved
  47. DRV_HDMI_3D_STRUCT_RESV11, //reserved
  48. DRV_HDMI_3D_STRUCT_RESV12, //reserved
  49. DRV_HDMI_3D_STRUCT_RESV13, //reserved
  50. DRV_HDMI_3D_STRUCT_RESV14, //reserved
  51. DRV_HDMI_3D_STRUCT_NOTUSE, //not use
  52. } DRV_HDMI3DStructure_e;
  53. /*!
  54. * @brief HDMI 3D Extened Data
  55. */
  56. typedef enum
  57. {
  58. DRV_HDMI_3D_EXDATA_H_SUBSMP = 0x00, //Horizontal sub-sampling
  59. DRV_HDMI_3D_EXDATA_Q_OLOR = 0x04, //Quincunx matix - Odd/Left picture, Odd/Right picture
  60. DRV_HDMI_3D_EXDATA_Q_OLER = 0x05, //Quincunx matix - Odd/Left picture, Even/Right picture
  61. DRV_HDMI_3D_EXDATA_Q_ELOR = 0x06, //Quincunx matix - Even/Left picture, Odd/Right picture
  62. DRV_HDMI_3D_EXDATA_Q_ELER = 0x07, //Quincunx matix - Even/Left picture, Even/Right picture
  63. DRV_HDMI_3D_EXDATA_RESV, //reserved
  64. DRV_HDMI_3D_EXDATA_NOEXDATA = 0xFF, //no extended data
  65. } DRV_HDMI3DExtData_e;
  66. UINT8 HDMI_GetInputInformation(VIP_InterfaceKIC *pstKic);
  67. void HDMI_VSI_handler(void);
  68. BOOL HDMI_IsAviChanged(VIP_InterfaceKIC *pstKic);
  69. void HDMI_SetSupportMaxHz(UINT8 bSupportMaxHz);
  70. UINT8 HDMI_CheckSupportResolutionMode(VIP_InterfaceKIC *pstKic);
  71. UINT32 get_pixel_clock(void);
  72. #endif /* __HDMI_VIDEO_H__ */