coda9.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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 __CODA9_FUNCTION_H__
  18. #define __CODA9_FUNCTION_H__
  19. #include "vpuapi.h"
  20. #include "../product.h"
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif /* __cplusplus */
  24. extern void
  25. Coda9BitIssueCommand(
  26. Uint32 coreIdx,
  27. CodecInst* inst,
  28. int cmd
  29. );
  30. extern Uint32 Coda9VpuGetProductId(
  31. Uint32 coreIdx
  32. );
  33. extern RetCode Coda9VpuGetVersion(
  34. Uint32 coreIdx,
  35. Uint32* versionInfo,
  36. Uint32* revision
  37. );
  38. extern RetCode Coda9VpuInit(
  39. Uint32 coreIdx,
  40. void* firmware,
  41. Uint32 size
  42. );
  43. extern RetCode Coda9VpuReInit(
  44. Uint32 coreIdx,
  45. void* firmware,
  46. Uint32 size
  47. );
  48. extern Uint32 Coda9VpuIsInit(
  49. Uint32 coreIdx
  50. );
  51. extern Int32 Coda9VpuIsBusy(
  52. Uint32 coreIdx
  53. );
  54. extern Int32 Coda9VpuWaitInterrupt(
  55. CodecInst* handle,
  56. Int32 timeout
  57. );
  58. extern RetCode Coda9VpuReset(
  59. Uint32 coreIdx,
  60. SWResetMode resetMode
  61. );
  62. extern RetCode Coda9VpuSleepWake(
  63. Uint32 coreIdx,
  64. int iSleepWake,
  65. const Uint16* code,
  66. Uint32 size
  67. );
  68. extern RetCode Coda9VpuClearInterrupt(
  69. Uint32 coreIdx
  70. );
  71. extern RetCode Coda9VpuFiniSeq(
  72. CodecInst* instance
  73. );
  74. extern RetCode Coda9VpuBuildUpDecParam(
  75. CodecInst* instance,
  76. DecOpenParam* param
  77. );
  78. extern RetCode Coda9VpuDecInitSeq(
  79. DecHandle handle
  80. );
  81. extern RetCode Coda9VpuDecRegisterFramebuffer(
  82. CodecInst* instance
  83. );
  84. extern RetCode Coda9VpuDecSetBitstreamFlag(
  85. CodecInst* instance,
  86. BOOL running,
  87. BOOL eos
  88. );
  89. extern RetCode Coda9VpuDecGetSeqInfo(
  90. CodecInst* instance,
  91. DecInitialInfo* info
  92. );
  93. extern RetCode Coda9VpuDecode(
  94. CodecInst* instance,
  95. DecParam* option
  96. );
  97. extern RetCode Coda9VpuDecGetResult(
  98. CodecInst* instance,
  99. DecOutputInfo* result
  100. );
  101. extern RetCode Coda9VpuDecFlush(
  102. CodecInst* instance,
  103. FramebufferIndex* framebufferIndexes,
  104. Uint32 size
  105. );
  106. /************************************************************************/
  107. /* Encoder */
  108. /************************************************************************/
  109. extern RetCode Coda9VpuEncRegisterFramebuffer(
  110. CodecInst* instance
  111. );
  112. extern RetCode Coda9VpuBuildUpEncParam(
  113. CodecInst* pCodec,
  114. EncOpenParam* param
  115. );
  116. extern RetCode Coda9VpuEncSetup(
  117. CodecInst* instance
  118. );
  119. extern RetCode Coda9VpuEncode(
  120. CodecInst* pCodecInst,
  121. EncParam* param
  122. );
  123. extern RetCode Coda9VpuEncGetResult(
  124. CodecInst* pCodecInst,
  125. EncOutputInfo* info
  126. );
  127. extern RetCode Coda9VpuEncGiveCommand(
  128. CodecInst* pCodecInst,
  129. CodecCommand cmd,
  130. void* param
  131. );
  132. extern RetCode Coda9VpuDecCpbFlush(CodecInst* instance);
  133. #ifdef __cplusplus
  134. }
  135. #endif /* __cplusplus */
  136. #endif /* __CODA9_FUNCTION_H__ */