decapicommon.h 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. /*------------------------------------------------------------------------------
  2. -- --
  3. -- This software is confidential and proprietary and may be used --
  4. -- only as expressly authorized by a licensing agreement from --
  5. -- --
  6. -- Hantro Products Oy. --
  7. -- --
  8. -- (C) COPYRIGHT 2007 HANTRO PRODUCTS OY --
  9. -- ALL RIGHTS RESERVED --
  10. -- --
  11. -- The entire notice above must be reproduced --
  12. -- on all copies and should not be removed. --
  13. -- --
  14. --------------------------------------------------------------------------------
  15. --
  16. -- Description : Common Decoder API definitions
  17. --
  18. --------------------------------------------------------------------------------
  19. --
  20. -- Version control information, please leave untouched.
  21. --
  22. -- $RCSfile: decapicommon.h,v $
  23. -- $Date: 2011/05/26 13:14:23 $
  24. -- $Revision: 1.25 $
  25. --
  26. ------------------------------------------------------------------------------*/
  27. #ifndef __DECAPICOMMON_H__
  28. #define __DECAPICOMMON_H__
  29. #include "basetype.h"
  30. #define MAX_ASIC_CORES 1
  31. #define MPEG4_NOT_SUPPORTED (u32)(0x00)
  32. #define MPEG4_SIMPLE_PROFILE (u32)(0x01)
  33. #define MPEG4_ADVANCED_SIMPLE_PROFILE (u32)(0x02)
  34. #define MPEG4_CUSTOM_NOT_SUPPORTED (u32)(0x00)
  35. #define MPEG4_CUSTOM_FEATURE_1 (u32)(0x01)
  36. #define H264_NOT_SUPPORTED (u32)(0x00)
  37. #define H264_BASELINE_PROFILE (u32)(0x01)
  38. #define H264_MAIN_PROFILE (u32)(0x02)
  39. #define H264_HIGH_PROFILE (u32)(0x03)
  40. #define VC1_NOT_SUPPORTED (u32)(0x00)
  41. #define VC1_SIMPLE_PROFILE (u32)(0x01)
  42. #define VC1_MAIN_PROFILE (u32)(0x02)
  43. #define VC1_ADVANCED_PROFILE (u32)(0x03)
  44. #define MPEG2_NOT_SUPPORTED (u32)(0x00)
  45. #define MPEG2_MAIN_PROFILE (u32)(0x01)
  46. #define JPEG_NOT_SUPPORTED (u32)(0x00)
  47. #define JPEG_BASELINE (u32)(0x01)
  48. #define JPEG_PROGRESSIVE (u32)(0x02)
  49. #define PP_NOT_SUPPORTED (u32)(0x00)
  50. #define PP_SUPPORTED (u32)(0x01)
  51. #define PP_TILED_4X4 (u32)(0x20000000)
  52. #define PP_DITHERING (u32)(0x10000000)
  53. #define PP_SCALING (u32)(0x0C000000)
  54. #define PP_DEINTERLACING (u32)(0x02000000)
  55. #define PP_ALPHA_BLENDING (u32)(0x01000000)
  56. #define PP_OUTP_ENDIAN (u32)(0x00040000)
  57. #define PP_TILED_INPUT (u32)(0x0000C000)
  58. #define PP_PIX_ACC_OUTPUT (u32)(0x40000000)
  59. #define PP_ABLEND_CROP (u32)(0x80000000)
  60. #define SORENSON_SPARK_NOT_SUPPORTED (u32)(0x00)
  61. #define SORENSON_SPARK_SUPPORTED (u32)(0x01)
  62. #define VP6_NOT_SUPPORTED (u32)(0x00)
  63. #define VP6_SUPPORTED (u32)(0x01)
  64. #define VP7_NOT_SUPPORTED (u32)(0x00)
  65. #define VP7_SUPPORTED (u32)(0x01)
  66. #define VP8_NOT_SUPPORTED (u32)(0x00)
  67. #define VP8_SUPPORTED (u32)(0x01)
  68. #define REF_BUF_NOT_SUPPORTED (u32)(0x00)
  69. #define REF_BUF_SUPPORTED (u32)(0x01)
  70. #define REF_BUF_INTERLACED (u32)(0x02)
  71. #define REF_BUF_DOUBLE (u32)(0x04)
  72. #define TILED_NOT_SUPPORTED (u32)(0x00)
  73. #define TILED_8x4_SUPPORTED (u32)(0x01)
  74. #define AVS_NOT_SUPPORTED (u32)(0x00)
  75. #define AVS_SUPPORTED (u32)(0x01)
  76. #define JPEG_EXT_NOT_SUPPORTED (u32)(0x00)
  77. #define JPEG_EXT_SUPPORTED (u32)(0x01)
  78. #define RV_NOT_SUPPORTED (u32)(0x00)
  79. #define RV_SUPPORTED (u32)(0x01)
  80. #define MVC_NOT_SUPPORTED (u32)(0x00)
  81. #define MVC_SUPPORTED (u32)(0x01)
  82. #define WEBP_NOT_SUPPORTED (u32)(0x00)
  83. #define WEBP_SUPPORTED (u32)(0x01)
  84. #define EC_NOT_SUPPORTED (u32)(0x00)
  85. #define EC_SUPPORTED (u32)(0x01)
  86. #define H264_NOT_SUPPORTED_FUSE (u32)(0x00)
  87. #define H264_FUSE_ENABLED (u32)(0x01)
  88. #define MPEG4_NOT_SUPPORTED_FUSE (u32)(0x00)
  89. #define MPEG4_FUSE_ENABLED (u32)(0x01)
  90. #define MPEG2_NOT_SUPPORTED_FUSE (u32)(0x00)
  91. #define MPEG2_FUSE_ENABLED (u32)(0x01)
  92. #define SORENSON_SPARK_NOT_SUPPORTED_FUSE (u32)(0x00)
  93. #define SORENSON_SPARK_ENABLED (u32)(0x01)
  94. #define JPEG_NOT_SUPPORTED_FUSE (u32)(0x00)
  95. #define JPEG_FUSE_ENABLED (u32)(0x01)
  96. #define VP6_NOT_SUPPORTED_FUSE (u32)(0x00)
  97. #define VP6_FUSE_ENABLED (u32)(0x01)
  98. #define VP7_NOT_SUPPORTED_FUSE (u32)(0x00)
  99. #define VP7_FUSE_ENABLED (u32)(0x01)
  100. #define VP8_NOT_SUPPORTED_FUSE (u32)(0x00)
  101. #define VP8_FUSE_ENABLED (u32)(0x01)
  102. #define VC1_NOT_SUPPORTED_FUSE (u32)(0x00)
  103. #define VC1_FUSE_ENABLED (u32)(0x01)
  104. #define JPEG_PROGRESSIVE_NOT_SUPPORTED_FUSE (u32)(0x00)
  105. #define JPEG_PROGRESSIVE_FUSE_ENABLED (u32)(0x01)
  106. #define REF_BUF_NOT_SUPPORTED_FUSE (u32)(0x00)
  107. #define REF_BUF_FUSE_ENABLED (u32)(0x01)
  108. #define AVS_NOT_SUPPORTED_FUSE (u32)(0x00)
  109. #define AVS_FUSE_ENABLED (u32)(0x01)
  110. #define RV_NOT_SUPPORTED_FUSE (u32)(0x00)
  111. #define RV_FUSE_ENABLED (u32)(0x01)
  112. #define MVC_NOT_SUPPORTED_FUSE (u32)(0x00)
  113. #define MVC_FUSE_ENABLED (u32)(0x01)
  114. #define PP_NOT_SUPPORTED_FUSE (u32)(0x00)
  115. #define PP_FUSE_ENABLED (u32)(0x01)
  116. #define PP_FUSE_DEINTERLACING_ENABLED (u32)(0x40000000)
  117. #define PP_FUSE_ALPHA_BLENDING_ENABLED (u32)(0x20000000)
  118. #define MAX_PP_OUT_WIDHT_1920_FUSE_ENABLED (u32)(0x00008000)
  119. #define MAX_PP_OUT_WIDHT_1280_FUSE_ENABLED (u32)(0x00004000)
  120. #define MAX_PP_OUT_WIDHT_720_FUSE_ENABLED (u32)(0x00002000)
  121. #define MAX_PP_OUT_WIDHT_352_FUSE_ENABLED (u32)(0x00001000)
  122. /* Macro to copy support flags and picture max width from DWL HW config
  123. * to Decoder HW config */
  124. #define SET_DEC_BUILD_SUPPORT(decHwCfg, dwlHwCfg) \
  125. decHwCfg.maxDecPicWidth = dwlHwCfg.maxDecPicWidth; \
  126. decHwCfg.maxPpOutPicWidth = dwlHwCfg.maxPpOutPicWidth; \
  127. decHwCfg.h264Support = dwlHwCfg.h264Support; \
  128. decHwCfg.jpegSupport = dwlHwCfg.jpegSupport; \
  129. decHwCfg.jpegESupport = dwlHwCfg.jpegESupport; \
  130. decHwCfg.mpeg2Support = dwlHwCfg.mpeg2Support; \
  131. decHwCfg.mpeg4Support = dwlHwCfg.mpeg4Support; \
  132. decHwCfg.vc1Support = dwlHwCfg.vc1Support; \
  133. decHwCfg.ppSupport = dwlHwCfg.ppSupport; \
  134. decHwCfg.ppConfig = dwlHwCfg.ppConfig; \
  135. decHwCfg.sorensonSparkSupport = dwlHwCfg.sorensonSparkSupport; \
  136. decHwCfg.vp6Support = dwlHwCfg.vp6Support; \
  137. decHwCfg.vp7Support = dwlHwCfg.vp7Support; \
  138. decHwCfg.vp8Support = dwlHwCfg.vp8Support; \
  139. decHwCfg.refBufSupport = dwlHwCfg.refBufSupport; \
  140. decHwCfg.tiledModeSupport = dwlHwCfg.tiledModeSupport; \
  141. decHwCfg.avsSupport = dwlHwCfg.avsSupport; \
  142. decHwCfg.rvSupport = dwlHwCfg.rvSupport; \
  143. decHwCfg.customMpeg4Support = dwlHwCfg.customMpeg4Support; \
  144. decHwCfg.mvcSupport = dwlHwCfg.mvcSupport; \
  145. decHwCfg.webpSupport = dwlHwCfg.webpSupport; \
  146. decHwCfg.ecSupport = dwlHwCfg.ecSupport;
  147. typedef struct DecHwConfig_
  148. {
  149. u32 mpeg4Support; /* one of the MPEG4 values defined above */
  150. u32 customMpeg4Support; /* one of the MPEG4 custom values defined above */
  151. u32 h264Support; /* one of the H264 values defined above */
  152. u32 vc1Support; /* one of the VC1 values defined above */
  153. u32 mpeg2Support; /* one of the MPEG2 values defined above */
  154. u32 jpegSupport; /* one of the JPEG values defined above */
  155. u32 jpegProgSupport; /* one of the Progressive JPEG values defined above */
  156. u32 maxDecPicWidth; /* maximum picture width in decoder */
  157. u32 ppSupport; /* PP_SUPPORTED or PP_NOT_SUPPORTED */
  158. u32 ppConfig; /* Bitwise list of PP function */
  159. u32 maxPpOutPicWidth; /* maximum post-processor output picture width */
  160. u32 sorensonSparkSupport; /* one of the SORENSON_SPARK values defined above */
  161. u32 refBufSupport; /* one of the REF_BUF values defined above */
  162. u32 tiledModeSupport; /* one of the TILED values defined above */
  163. u32 vp6Support; /* one of the VP6 values defined above */
  164. u32 vp7Support; /* one of the VP7 values defined above */
  165. u32 vp8Support; /* one of the VP8 values defined above */
  166. u32 avsSupport; /* one of the AVS values defined above */
  167. u32 jpegESupport; /* one of the JPEG EXT values defined above */
  168. u32 rvSupport; /* one of the HUKKA values defined above */
  169. u32 mvcSupport; /* one of the MVC values defined above */
  170. u32 webpSupport; /* one of the WEBP values defined above */
  171. u32 ecSupport; /* one of the EC values defined above */
  172. u32 strideSupport; /* HW supports separate Y and C strides */
  173. u32 fieldDpbSupport;
  174. } DecHwConfig;
  175. /* Reference picture format types */
  176. typedef enum
  177. {
  178. DEC_REF_FRM_RASTER_SCAN = 0,
  179. DEC_REF_FRM_TILED_DEFAULT = 1
  180. } DecRefFrmFormat;
  181. /* Output picture format types */
  182. typedef enum
  183. {
  184. DEC_OUT_FRM_RASTER_SCAN = 0,
  185. DEC_OUT_FRM_TILED_8X4 = 1
  186. } DecOutFrmFormat;
  187. #endif /* __DECAPICOMMON_H__ */