You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

185 lines
4.1KB

  1. /*
  2. * Video Acceleration API (shared data between Libav and the video player)
  3. * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1
  4. *
  5. * Copyright (C) 2008-2009 Splitted-Desktop Systems
  6. *
  7. * This file is part of Libav.
  8. *
  9. * Libav is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation; either
  12. * version 2.1 of the License, or (at your option) any later version.
  13. *
  14. * Libav is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with Libav; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. */
  23. #ifndef AVCODEC_VAAPI_H
  24. #define AVCODEC_VAAPI_H
  25. /**
  26. * @file
  27. * @ingroup lavc_codec_hwaccel_vaapi
  28. * Public libavcodec VA API header.
  29. */
  30. #include <stdint.h>
  31. #include "libavutil/attributes.h"
  32. #include "version.h"
  33. #if FF_API_VAAPI_CONTEXT
  34. /**
  35. * @defgroup lavc_codec_hwaccel_vaapi VA API Decoding
  36. * @ingroup lavc_codec_hwaccel
  37. * @{
  38. */
  39. /**
  40. * This structure is used to share data between the Libav library and
  41. * the client video application.
  42. * This shall be zero-allocated and available as
  43. * AVCodecContext.hwaccel_context. All user members can be set once
  44. * during initialization or through each AVCodecContext.get_buffer()
  45. * function call. In any case, they must be valid prior to calling
  46. * decoding functions.
  47. *
  48. * Deprecated: use AVCodecContext.hw_frames_ctx instead.
  49. */
  50. attribute_deprecated
  51. struct vaapi_context {
  52. /**
  53. * Window system dependent data
  54. *
  55. * - encoding: unused
  56. * - decoding: Set by user
  57. */
  58. void *display;
  59. /**
  60. * Configuration ID
  61. *
  62. * - encoding: unused
  63. * - decoding: Set by user
  64. */
  65. uint32_t config_id;
  66. /**
  67. * Context ID (video decode pipeline)
  68. *
  69. * - encoding: unused
  70. * - decoding: Set by user
  71. */
  72. uint32_t context_id;
  73. /**
  74. * VAPictureParameterBuffer ID
  75. *
  76. * - encoding: unused
  77. * - decoding: Set by libavcodec
  78. */
  79. uint32_t pic_param_buf_id;
  80. /**
  81. * VAIQMatrixBuffer ID
  82. *
  83. * - encoding: unused
  84. * - decoding: Set by libavcodec
  85. */
  86. uint32_t iq_matrix_buf_id;
  87. /**
  88. * VABitPlaneBuffer ID (for VC-1 decoding)
  89. *
  90. * - encoding: unused
  91. * - decoding: Set by libavcodec
  92. */
  93. uint32_t bitplane_buf_id;
  94. /**
  95. * Slice parameter/data buffer IDs
  96. *
  97. * - encoding: unused
  98. * - decoding: Set by libavcodec
  99. */
  100. uint32_t *slice_buf_ids;
  101. /**
  102. * Number of effective slice buffer IDs to send to the HW
  103. *
  104. * - encoding: unused
  105. * - decoding: Set by libavcodec
  106. */
  107. unsigned int n_slice_buf_ids;
  108. /**
  109. * Size of pre-allocated slice_buf_ids
  110. *
  111. * - encoding: unused
  112. * - decoding: Set by libavcodec
  113. */
  114. unsigned int slice_buf_ids_alloc;
  115. /**
  116. * Pointer to VASliceParameterBuffers
  117. *
  118. * - encoding: unused
  119. * - decoding: Set by libavcodec
  120. */
  121. void *slice_params;
  122. /**
  123. * Size of a VASliceParameterBuffer element
  124. *
  125. * - encoding: unused
  126. * - decoding: Set by libavcodec
  127. */
  128. unsigned int slice_param_size;
  129. /**
  130. * Size of pre-allocated slice_params
  131. *
  132. * - encoding: unused
  133. * - decoding: Set by libavcodec
  134. */
  135. unsigned int slice_params_alloc;
  136. /**
  137. * Number of slices currently filled in
  138. *
  139. * - encoding: unused
  140. * - decoding: Set by libavcodec
  141. */
  142. unsigned int slice_count;
  143. /**
  144. * Pointer to slice data buffer base
  145. * - encoding: unused
  146. * - decoding: Set by libavcodec
  147. */
  148. const uint8_t *slice_data;
  149. /**
  150. * Current size of slice data
  151. *
  152. * - encoding: unused
  153. * - decoding: Set by libavcodec
  154. */
  155. uint32_t slice_data_size;
  156. };
  157. /* @} */
  158. #endif /* FF_API_VAAPI_CONTEXT */
  159. #endif /* AVCODEC_VAAPI_H */