wave5.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. /* SPDX-License-Identifier: LGPL-2.1 OR BSD-3-Clause */
  2. //--=========================================================================--
  3. // This file is a part of VPU Reference API project
  4. //-----------------------------------------------------------------------------
  5. //
  6. // This confidential and proprietary software may be used only
  7. // as authorized by a licensing agreement from Chips&Media Inc.
  8. // In the event of publication, the following notice is applicable:
  9. //
  10. // (C) COPYRIGHT 2006 - 2011 CHIPS&MEDIA INC.
  11. // ALL RIGHTS RESERVED
  12. //
  13. // The entire notice above must be reproduced on all authorized
  14. // copies.
  15. //
  16. //--=========================================================================--
  17. #ifndef __WAVE510_FUNCTION_H__
  18. #define __WAVE510_FUNCTION_H__
  19. #include "vpuapi.h"
  20. #include "product.h"
  21. #define WAVE5_TEMPBUF_OFFSET (1024*1024)
  22. #define WAVE5_TEMPBUF_SIZE (1024*1024)
  23. #define WAVE5_TASK_BUF_OFFSET (2*1024*1024) // common mem = | codebuf(1M) | tempBuf(1M) | taskbuf0x0 ~ 0xF |
  24. #define WAVE5ENC_WORKBUF_SIZE (128*1024) // fix me
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif /* __cplusplus */
  28. extern void Wave5BitIssueCommand(
  29. CodecInst* instance,
  30. Uint32 cmd
  31. );
  32. extern RetCode Wave5VpuGetVersion(
  33. Uint32 coreIdx,
  34. Uint32* versionInfo,
  35. Uint32* revision
  36. );
  37. extern RetCode Wave5VpuInit(
  38. Uint32 coreIdx,
  39. void* firmware,
  40. Uint32 size
  41. );
  42. extern RetCode Wave5VpuSleepWake(
  43. Uint32 coreIdx,
  44. int iSleepWake,
  45. const Uint16* code,
  46. Uint32 size,
  47. BOOL reset
  48. );
  49. extern RetCode Wave5VpuReset(
  50. Uint32 coreIdx,
  51. SWResetMode resetMode
  52. );
  53. extern RetCode Wave5VpuBuildUpDecParam(
  54. CodecInst* instance,
  55. DecOpenParam* param
  56. );
  57. extern RetCode Wave5VpuDecSetBitstreamFlag(
  58. CodecInst* instance,
  59. BOOL running,
  60. BOOL eos,
  61. BOOL explictEnd
  62. );
  63. extern RetCode Wave5VpuDecRegisterFramebuffer(
  64. CodecInst* inst,
  65. FrameBuffer* fbArr,
  66. TiledMapType mapType,
  67. Uint32 count
  68. );
  69. extern RetCode Wave5VpuDecUpdateFramebuffer(
  70. CodecInst* inst,
  71. FrameBuffer* fbcFb,
  72. FrameBuffer* linearFb,
  73. Int32 mvIndex,
  74. Int32 picWidth,
  75. Int32 picHeight
  76. );
  77. extern RetCode Wave5VpuDecFlush(
  78. CodecInst* instance,
  79. FramebufferIndex* framebufferIndexes,
  80. Uint32 size
  81. );
  82. extern RetCode Wave5VpuReInit(
  83. Uint32 coreIdx,
  84. void* firmware,
  85. Uint32 size
  86. );
  87. extern RetCode Wave5VpuDecInitSeq(
  88. CodecInst* instance
  89. );
  90. extern RetCode Wave5VpuDecGetSeqInfo(
  91. CodecInst* instance,
  92. DecInitialInfo* info
  93. );
  94. extern RetCode Wave5VpuDecode(
  95. CodecInst* instance,
  96. DecParam* option
  97. );
  98. extern RetCode Wave5VpuDecGetResult(
  99. CodecInst* instance,
  100. DecOutputInfo* result
  101. );
  102. extern RetCode Wave5VpuDecFiniSeq(
  103. CodecInst* instance
  104. );
  105. extern RetCode Wave5DecWriteProtect(
  106. CodecInst* instance
  107. );
  108. extern RetCode Wave5DecClrDispFlag(
  109. CodecInst* instance,
  110. Uint32 index
  111. );
  112. extern RetCode Wave5DecSetDispFlag(
  113. CodecInst* instance,
  114. Uint32 index
  115. );
  116. extern Int32 Wave5VpuWaitInterrupt(
  117. CodecInst* instance,
  118. Int32 timeout,
  119. BOOL pending
  120. );
  121. extern RetCode Wave5VpuClearInterrupt(
  122. Uint32 coreIdx,
  123. Uint32 flags
  124. );
  125. extern RetCode Wave5VpuGetProductInfo(
  126. Uint32 coreIdx,
  127. ProductInfo* productInfo
  128. );
  129. /***< WAVE5 Encoder >******/
  130. extern RetCode Wave5VpuBuildUpEncParam(
  131. CodecInst* instance,
  132. EncOpenParam* param
  133. );
  134. extern RetCode Wave5VpuEncInitSeq(
  135. CodecInst*instance
  136. );
  137. extern RetCode Wave5VpuEncGetSeqInfo(
  138. CodecInst* instance,
  139. EncInitialInfo* info
  140. );
  141. extern RetCode Wave5VpuEncRegisterFramebuffer(
  142. CodecInst* inst,
  143. FrameBuffer* fbArr,
  144. TiledMapType mapType,
  145. Uint32 count
  146. );
  147. extern RetCode Wave5EncWriteProtect(
  148. CodecInst* instance
  149. );
  150. extern RetCode Wave5VpuEncode(
  151. CodecInst* instance,
  152. EncParam* option
  153. );
  154. extern RetCode Wave5VpuEncGetResult(
  155. CodecInst* instance,
  156. EncOutputInfo* result
  157. );
  158. extern RetCode Wave5VpuEncGetHeader(
  159. EncHandle instance,
  160. EncHeaderParam * encHeaderParam
  161. );
  162. extern RetCode Wave5VpuEncFiniSeq(
  163. CodecInst* instance
  164. );
  165. extern RetCode Wave5VpuEncParaChange(
  166. EncHandle instance,
  167. EncChangeParam* param
  168. );
  169. #ifdef SUPPORT_W5ENC_BW_REPORT
  170. extern RetCode Wave5VpuEncGetBwReport(
  171. EncHandle instance,
  172. EncBwMonitor* bwMon
  173. );
  174. #endif
  175. #ifdef __cplusplus
  176. }
  177. #endif /* __cplusplus */
  178. #endif /* __WAVE510_FUNCTION_H__ */