vaapi.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. /*
  2. * Video Acceleration API (shared data between FFmpeg 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 FFmpeg.
  8. *
  9. * FFmpeg 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. * FFmpeg 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 FFmpeg; 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_STRUCT_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 FFmpeg 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. struct attribute_deprecated vaapi_context {
  51. /**
  52. * Window system dependent data
  53. *
  54. * - encoding: unused
  55. * - decoding: Set by user
  56. */
  57. void *display;
  58. /**
  59. * Configuration ID
  60. *
  61. * - encoding: unused
  62. * - decoding: Set by user
  63. */
  64. uint32_t config_id;
  65. /**
  66. * Context ID (video decode pipeline)
  67. *
  68. * - encoding: unused
  69. * - decoding: Set by user
  70. */
  71. uint32_t context_id;
  72. #if FF_API_VAAPI_CONTEXT
  73. /**
  74. * VAPictureParameterBuffer ID
  75. *
  76. * - encoding: unused
  77. * - decoding: Set by libavcodec
  78. */
  79. attribute_deprecated
  80. uint32_t pic_param_buf_id;
  81. /**
  82. * VAIQMatrixBuffer ID
  83. *
  84. * - encoding: unused
  85. * - decoding: Set by libavcodec
  86. */
  87. attribute_deprecated
  88. uint32_t iq_matrix_buf_id;
  89. /**
  90. * VABitPlaneBuffer ID (for VC-1 decoding)
  91. *
  92. * - encoding: unused
  93. * - decoding: Set by libavcodec
  94. */
  95. attribute_deprecated
  96. uint32_t bitplane_buf_id;
  97. /**
  98. * Slice parameter/data buffer IDs
  99. *
  100. * - encoding: unused
  101. * - decoding: Set by libavcodec
  102. */
  103. attribute_deprecated
  104. uint32_t *slice_buf_ids;
  105. /**
  106. * Number of effective slice buffer IDs to send to the HW
  107. *
  108. * - encoding: unused
  109. * - decoding: Set by libavcodec
  110. */
  111. attribute_deprecated
  112. unsigned int n_slice_buf_ids;
  113. /**
  114. * Size of pre-allocated slice_buf_ids
  115. *
  116. * - encoding: unused
  117. * - decoding: Set by libavcodec
  118. */
  119. attribute_deprecated
  120. unsigned int slice_buf_ids_alloc;
  121. /**
  122. * Pointer to VASliceParameterBuffers
  123. *
  124. * - encoding: unused
  125. * - decoding: Set by libavcodec
  126. */
  127. attribute_deprecated
  128. void *slice_params;
  129. /**
  130. * Size of a VASliceParameterBuffer element
  131. *
  132. * - encoding: unused
  133. * - decoding: Set by libavcodec
  134. */
  135. attribute_deprecated
  136. unsigned int slice_param_size;
  137. /**
  138. * Size of pre-allocated slice_params
  139. *
  140. * - encoding: unused
  141. * - decoding: Set by libavcodec
  142. */
  143. attribute_deprecated
  144. unsigned int slice_params_alloc;
  145. /**
  146. * Number of slices currently filled in
  147. *
  148. * - encoding: unused
  149. * - decoding: Set by libavcodec
  150. */
  151. attribute_deprecated
  152. unsigned int slice_count;
  153. /**
  154. * Pointer to slice data buffer base
  155. * - encoding: unused
  156. * - decoding: Set by libavcodec
  157. */
  158. attribute_deprecated
  159. const uint8_t *slice_data;
  160. /**
  161. * Current size of slice data
  162. *
  163. * - encoding: unused
  164. * - decoding: Set by libavcodec
  165. */
  166. attribute_deprecated
  167. uint32_t slice_data_size;
  168. #endif
  169. };
  170. /* @} */
  171. #endif /* FF_API_STRUCT_VAAPI_CONTEXT */
  172. #endif /* AVCODEC_VAAPI_H */