coda9.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. //--=========================================================================--
  2. // This file is a part of VPU Reference API project
  3. //-----------------------------------------------------------------------------
  4. //
  5. // This confidential and proprietary software may be used only
  6. // as authorized by a licensing agreement from Chips&Media Inc.
  7. // In the event of publication, the following notice is applicable:
  8. //
  9. // (C) COPYRIGHT 2006 - 2011 CHIPS&MEDIA INC.
  10. // ALL RIGHTS RESERVED
  11. //
  12. // The entire notice above must be reproduced on all authorized
  13. // copies.
  14. //
  15. //--=========================================================================--
  16. #ifndef __CODA9_FUNCTION_H__
  17. #define __CODA9_FUNCTION_H__
  18. #include "vpuapi.h"
  19. #include "../product.h"
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif /* __cplusplus */
  23. extern void
  24. Coda9BitIssueCommand(
  25. Uint32 coreIdx,
  26. CodecInst* inst,
  27. int cmd
  28. );
  29. extern Uint32 Coda9VpuGetProductId(
  30. Uint32 coreIdx
  31. );
  32. extern RetCode Coda9VpuGetVersion(
  33. Uint32 coreIdx,
  34. Uint32* versionInfo,
  35. Uint32* revision
  36. );
  37. extern RetCode Coda9VpuInit(
  38. Uint32 coreIdx,
  39. void* firmware,
  40. Uint32 size
  41. );
  42. extern RetCode Coda9VpuReInit(
  43. Uint32 coreIdx,
  44. void* firmware,
  45. Uint32 size
  46. );
  47. extern Uint32 Coda9VpuIsInit(
  48. Uint32 coreIdx
  49. );
  50. extern Int32 Coda9VpuIsBusy(
  51. Uint32 coreIdx
  52. );
  53. extern Int32 Coda9VpuWaitInterrupt(
  54. CodecInst* handle,
  55. Int32 timeout
  56. );
  57. extern RetCode Coda9VpuReset(
  58. Uint32 coreIdx,
  59. SWResetMode resetMode
  60. );
  61. extern RetCode Coda9VpuSleepWake(
  62. Uint32 coreIdx,
  63. int iSleepWake,
  64. const Uint16* code,
  65. Uint32 size
  66. );
  67. extern RetCode Coda9VpuClearInterrupt(
  68. Uint32 coreIdx
  69. );
  70. extern RetCode Coda9VpuFiniSeq(
  71. CodecInst* instance
  72. );
  73. extern RetCode Coda9VpuBuildUpDecParam(
  74. CodecInst* instance,
  75. DecOpenParam* param
  76. );
  77. extern RetCode Coda9VpuDecInitSeq(
  78. DecHandle handle
  79. );
  80. extern RetCode Coda9VpuDecRegisterFramebuffer(
  81. CodecInst* instance
  82. );
  83. extern RetCode Coda9VpuDecSetBitstreamFlag(
  84. CodecInst* instance,
  85. BOOL running,
  86. BOOL eos
  87. );
  88. extern RetCode Coda9VpuDecGetSeqInfo(
  89. CodecInst* instance,
  90. DecInitialInfo* info
  91. );
  92. extern RetCode Coda9VpuDecode(
  93. CodecInst* instance,
  94. DecParam* option
  95. );
  96. extern RetCode Coda9VpuDecGetResult(
  97. CodecInst* instance,
  98. DecOutputInfo* result
  99. );
  100. extern RetCode Coda9VpuDecFlush(
  101. CodecInst* instance,
  102. FramebufferIndex* framebufferIndexes,
  103. Uint32 size
  104. );
  105. /************************************************************************/
  106. /* Encoder */
  107. /************************************************************************/
  108. extern RetCode Coda9VpuEncRegisterFramebuffer(
  109. CodecInst* instance
  110. );
  111. extern RetCode Coda9VpuBuildUpEncParam(
  112. CodecInst* pCodec,
  113. EncOpenParam* param
  114. );
  115. extern RetCode Coda9VpuEncSetup(
  116. CodecInst* instance
  117. );
  118. extern RetCode Coda9VpuEncode(
  119. CodecInst* pCodecInst,
  120. EncParam* param
  121. );
  122. extern RetCode Coda9VpuEncGetResult(
  123. CodecInst* pCodecInst,
  124. EncOutputInfo* info
  125. );
  126. extern RetCode Coda9VpuEncGiveCommand(
  127. CodecInst* pCodecInst,
  128. CodecCommand cmd,
  129. void* param
  130. );
  131. extern RetCode Coda9VpuDecCpbFlush(CodecInst* instance);
  132. #ifdef __cplusplus
  133. }
  134. #endif /* __cplusplus */
  135. #endif /* __CODA9_FUNCTION_H__ */