drv_cvd2_external.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. #ifndef _DRV_CVD2_EXTERNAL_H_
  2. #define _DRV_CVD2_EXTERNAL_H_
  3. #include <drv_types.h>
  4. #include "plf_timing_id.h"
  5. /* Detected standard. */
  6. enum
  7. {
  8. CVD2_STD_NONE , //0
  9. CVD2_STD_NTSC_M , //1
  10. CVD2_STD_NTSC_443 , //2
  11. CVD2_STD_PAL_IBGDK , //3
  12. CVD2_STD_PAL_M , //4
  13. CVD2_STD_PAL_CN , //5
  14. CVD2_STD_PAL_60 , //6
  15. CVD2_STD_SECAM , //7
  16. CVD2_STD_END , //8
  17. CVD2_STD_AUTO = CVD2_STD_END, //8 //For ATV Scanning
  18. CVD2_STD_SwitchModulation , //9 //For ATV scan mode to detect SECAM L/L' signal.
  19. };
  20. /* Select input channel in ADC175 IC */
  21. enum
  22. {
  23. S1_INPUT_CHANNEL,
  24. S2_INPUT_CHANNEL,
  25. S3_INPUT_CHANNEL,
  26. AV1_INPUT_CHANNEL,
  27. AV2_INPUT_CHANNEL,
  28. AV3_INPUT_CHANNEL,
  29. TV_INPUT_CHANNEL,
  30. RGB_INPUT_CHANNEL,
  31. };
  32. //20120511 Add for CVBS out options in factory mode
  33. typedef enum
  34. {
  35. ALL_DISABLE, // Disable CVBS out for all sources
  36. ALL_ENABLE, // Enable CVBS out for all sources (ATV-in to ATV-out, AV-in to AV-out and SV-in to SV(Y)-out)
  37. AV_ONLY, // Enable CVBS out for AV only (AV-in to AV-out)
  38. ATV_ONLY, // Enable CVBS out for ATV only (ATV-in to ATV-out)
  39. ATV_AV_ONLY, // Enable CVBS out for ATV and AV (ATV-in to ATV-out and AV-in to AV-out)
  40. SCART_MODE1, // Enable CVBS out for SCART out (ATV-in to ATV-out, AV-in to AV-out and SV-in to SV(Y)-out)
  41. SCART_MODE2 // Enable CVBS out for SCART out (AV-in, ATV-in and SV-in are all ATV-out)
  42. }cvd2_TypeCVBSOMode;
  43. typedef enum {
  44. CVD2_FormatStart,
  45. CVD2_NTSC_M = CVD2_FormatStart,
  46. CVD2_NTSC_443,
  47. CVD2_PAL_IBGHD,
  48. CVD2_PAL_M,
  49. CVD2_PAL_N,
  50. CVD2_PAL_60,
  51. CVD2_SECAM,
  52. CVD2_FormatEnd
  53. }CVD2_FORMAT;
  54. typedef enum _PicSrcCVD2{
  55. PicSrcCVD2_Start,
  56. PicSrcCVD2_ATV = PicSrcCVD2_Start,
  57. PicSrcCVD2_AV,
  58. PicSrcCVD2_SV,
  59. PicSrcCVD2_End // 3
  60. }PicSrcCVD2;
  61. typedef enum
  62. {
  63. DRV_TvDecOUTPUT_SOURCE_TYPE_NULL,
  64. DRV_TvDecOUTPUT_SOURCE_TYPE_CVBS,
  65. DRV_TvDecOUTPUT_SOURCE_TYPE_SVIDEO,
  66. DRV_TvDecOUTPUT_SOURCE_TYPE_DTV,
  67. DRV_TvDecOUTPUT_SOURCE_TYPE_DVIF,
  68. DRV_TvDecOUTPUT_SOURCE_TYPE_CHROMA
  69. } DRV_TvDecOutputSrcType_t;
  70. /*!
  71. * @brief input pins definition, need to sync with DRV_VAFELSInputPin_t
  72. */
  73. typedef enum
  74. {
  75. DRV_TvDecCVBS_0 =(0x01<<1),
  76. DRV_TvDecCVBS_1 =(0x01<<2),
  77. DRV_TvDecCVBS_2 =(0x01<<3),
  78. DRV_TvDecCVBS_3 =(0x01<<4),
  79. DRV_TvDecCVBS_4 =(0x01<<5),
  80. DRV_TvDecCHROMA_1 =(0x01<<6),
  81. DRV_TvDecCHROMA_2 =(0x01<<7),
  82. DRV_TvDecY1 =(0x01<<8),
  83. DRV_TvDecPB1 =(0x01<<9),
  84. DRV_TvDecPR1 =(0x01<<10),
  85. DRV_TvDecDVIF =(0x01<<11),
  86. DRV_TvDecNULL =(0x01<<12)
  87. } DRV_TvDecInputPin_t;
  88. typedef enum
  89. {
  90. DRV_TvDecTTEccHamming,
  91. DRV_TvDecTTEccParity
  92. } DRV_TvDecTTEcc_t;
  93. /**
  94. * \brief General Driver return status
  95. */
  96. #ifndef DRV_STATUS_TYPE
  97. #define DRV_STATUS_TYPE
  98. typedef enum
  99. {
  100. /* common status values */
  101. DRV_SUCCESS, /*!< successful outcome */
  102. DRV_ERR_FAILURE, /*!< operation failed */
  103. DRV_ERR_INVALID_HANDLE, /*!< invalid handle */
  104. DRV_ERR_INVALID_ID, /*!< invalid identifier */
  105. DRV_ERR_INVALID_PARAM, /*!< invalid parameter */
  106. DRV_ERR_INVALID_OP, /*!< requested operation is invalid */
  107. DRV_ERR_MEMORY_ALLOC, /*!< problem allocating memory */
  108. DRV_ERR_MEMORY_SIZE, /*!< problem with the size of memory */
  109. /* < supplied */
  110. DRV_ERR_RESOURCE_UNAVAILABLE,
  111. DRV_ERR_TIMEOUT, /*!< timeout */
  112. DRV_WARN_NO_ACTION, /* < the function completed successfully,*/
  113. /* < but no action was taken */
  114. DRV_WARN_PARAM_CLIPPED, /*!< the function has completed */
  115. /*!< successfully, though a parameter was */
  116. /*!< clipped to within a valid range. */
  117. DRV_WARN_BUFFER_EMPTY,
  118. DRV_WARN_BUFFER_FULL,
  119. DRV_WARN_UNINITED, /*!< driver has not been initialized yet */
  120. DRV_WARN_INITED, /*!< driver has been initialized already */
  121. DRV_ERR_MODE_MISMATCH, /*!< deinterlacer off*/
  122. DRV_ERR_MAX /*!< Max error number*/
  123. } DRV_Status_t;
  124. #endif
  125. typedef struct _CVD2VideoDecoderSetting_t{
  126. UINT8 Brightness;
  127. UINT8 Contrast;
  128. UINT8 Saturation;
  129. INT8 Ldly;
  130. UINT8 Filter;
  131. }CVD2VideoDecoderSetting_t;
  132. typedef enum {
  133. CVD2_CMD_START,
  134. CVD2_CMD_BRIGHTNESS = CVD2_CMD_START,
  135. CVD2_CMD_CONTRAST,
  136. CVD2_CMD_SATURATION,
  137. CVD2_CMD_LDLY,
  138. CVD2_CMD_FILTER,
  139. CVD2_CMD_HACTIVE_START,
  140. CVD2_CMD_HACTIVE_END,
  141. CVD2_CMD_HACTIVE_DELAY,
  142. CVD2_CMD_CBCR_SWAP,
  143. CVD2_CMD_VACTIVE_START,
  144. CVD2_CMD_VACTIVE_HEIGHT,
  145. CVD2_CMD_ODDEVEN_SWAP,
  146. CVD2_CMD_CVBSO,//GAHU
  147. CVD2_CMD_TTECC_MODE,
  148. CVD2_CMD_END
  149. }CVD2_CMD;
  150. /* CVD2 Timing Table Setting */
  151. typedef struct _CVD2_Timing_Param_t{
  152. PLF_VideoID_t eVideoID;
  153. UINT16 HactiveStart;
  154. UINT16 HactiveEnd;
  155. UINT8 CbCrSwap;
  156. UINT8 VactiveStart;
  157. UINT8 VactiveHeight;
  158. UINT8 OddEvenSwap;
  159. }CVD2_TIMING_PARAM_t;
  160. typedef struct _CVD2_WssData_t{
  161. UINT8 WSS_byte2;
  162. UINT8 WSS_byte1;
  163. UINT8 WSS_byte0;
  164. }CVD2_WSSDATA_t;
  165. #endif