video_custom_sp.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. #ifndef VIDEO_CUSTOM_SP_H
  2. #define VIDEO_CUSTOM_SP_H
  3. /* #include "video_codec_if_sp.h" */
  4. #include "vcodec_if_v2.h"
  5. #define ASSERT(expr) \
  6. do { \
  7. if (!(expr)) \
  8. AssertionFailed(__func__, __FILE__, __LINE__); \
  9. } while (0) /* /< ASSERT definition */
  10. /******************************************************************************
  11. *
  12. *
  13. * decode
  14. *
  15. *
  16. ******************************************************************************/
  17. /**
  18. * @par Enumeration
  19. * VIDEO_DECODER_T
  20. * @par Description
  21. * This is the item for video decoder format
  22. */
  23. typedef enum _VIDEO_DECODER_T {
  24. CODEC_DEC_NONE = 0, /* /< NONE */
  25. CODEC_DEC_H263 = (0x1 << 0), /* /< H263 */
  26. CODEC_DEC_MPEG4 = (0x1 << 1), /* /< MPEG4 */
  27. CODEC_DEC_H264 = (0x1 << 2), /* /< H264 */
  28. CODEC_DEC_RV = (0x1 << 3), /* /< RV */
  29. CODEC_DEC_VC1 = (0x1 << 4), /* /< VC1 */
  30. CODEC_DEC_VP8 = (0x1 << 5), /* /< VP8 */
  31. CODEC_DEC_VP9 = (0x1 << 6), /* /< VP9 */
  32. CODEC_DEC_HEVC = (0x1 << 7), /* /< HEVC */
  33. CODEC_DEC_MPEG2 = (0x1 << 8), /* /< MPEG2 */
  34. CODEC_DEC_MAX = (0x1 << 9) /* /< MAX */
  35. } VIDEO_DECODER_T;
  36. #if 1 /* defined(MT6572) //VCODEC_MULTI_THREAD */
  37. /**
  38. * @par Function
  39. * GetDecoderAPI
  40. * @par Description
  41. * The function used to get decoder API for codec library
  42. * @param
  43. * eDecType [IN] decoder type
  44. * @param
  45. * hWrapper [IN] wrapper
  46. * @param
  47. * ppDrvModule [IN/OUT] driver module
  48. * @param
  49. * bUseMultiCoreCodec [IN] multi core codec flag
  50. * @par Returns
  51. * VIDEO_DEC_API_T, the decoder API
  52. */
  53. VIDEO_DEC_API_T *GetDecoderAPI(
  54. VIDEO_DECODER_T eDecType,
  55. HANDLE hWrapper,
  56. void **ppDrvModule,
  57. unsigned int bUseMultiCoreCodec
  58. );
  59. #else
  60. VIDEO_DEC_API_T *GetDecoderAPI(VIDEO_DECODER_T, HANDLE); /* HANDLE : wrapper's handle */
  61. #endif
  62. /* VCODEC_DEC_API_T *GetMPEG4DecoderAPI(void); */
  63. /* VCODEC_DEC_API_T *GetH264DecoderAPI(void); */
  64. /* VCODEC_DEC_API_T *GetRVDecoderAPI(void); */
  65. /* VCODEC_DEC_API_T *GetVP8DecoderAPI(void); */
  66. /* VCODEC_DEC_API_T *GetVC1DecoderAPI(void); */
  67. /******************************************************************************
  68. *
  69. *
  70. * encode
  71. *
  72. *
  73. ******************************************************************************/
  74. /**
  75. * @par Enumeration
  76. * VIDEO_ENCODER_T
  77. * @par Description
  78. * This is the item for video decoder format
  79. */
  80. typedef enum _VIDEO_ENCODER_T {
  81. CODEC_ENC_NONE = 0, /* /< NONE */
  82. CODEC_ENC_H263 = (0x1 << 0), /* /< H263 */
  83. CODEC_ENC_MPEG4 = (0x1 << 1), /* /< MPEG4 */
  84. CODEC_ENC_H264 = (0x1 << 2), /* /< H264 */
  85. CODEC_ENC_HEVC = (0x1 << 3), /* /< HEVC */
  86. CODEC_ENC_VP8 = (0x1 << 5), /* /< VP8 */
  87. CODEC_ENC_VP9 = (0x1 << 6), /* /< VP9 */
  88. CODEC_ENC_MAX = (0x1 << 7) /* /< MAX */
  89. } VIDEO_ENCODER_T;
  90. /**
  91. * @par Function
  92. * GetEncoderAPI
  93. * @par Description
  94. * The function used to get encoder API for codec library
  95. * @param
  96. * eEncType [IN] encoder type
  97. * @param
  98. * hWrapper [IN] wrapper
  99. * @param
  100. * ppDrvModule [IN/OUT] driver module
  101. * @param
  102. * bUseMultiCoreCodec [IN] multi core codec flag
  103. * @par Returns
  104. * VIDEO_DEC_API_T, the encoder API
  105. */
  106. VIDEO_ENC_API_T *GetEncoderAPI(
  107. VIDEO_ENCODER_T eEncType,
  108. HANDLE hWrapper,
  109. void **ppDrvModule,
  110. unsigned int bUseMultiCoreCodec
  111. );
  112. /* VCODEC_ENC_API_T *GetMPEG4EncoderAPI(void); */
  113. /* VCODEC_ENC_API_T* GetH264EncoderAPI(void); */
  114. /* VIDEO_ENCODER_API_T *GetVP8EncoderAPI(void); */
  115. #endif /* VIDEO_CUSTOM_SP_H */