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.

184 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. 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. /**
  73. * VAPictureParameterBuffer ID
  74. *
  75. * - encoding: unused
  76. * - decoding: Set by libavcodec
  77. */
  78. uint32_t pic_param_buf_id;
  79. /**
  80. * VAIQMatrixBuffer ID
  81. *
  82. * - encoding: unused
  83. * - decoding: Set by libavcodec
  84. */
  85. uint32_t iq_matrix_buf_id;
  86. /**
  87. * VABitPlaneBuffer ID (for VC-1 decoding)
  88. *
  89. * - encoding: unused
  90. * - decoding: Set by libavcodec
  91. */
  92. uint32_t bitplane_buf_id;
  93. /**
  94. * Slice parameter/data buffer IDs
  95. *
  96. * - encoding: unused
  97. * - decoding: Set by libavcodec
  98. */
  99. uint32_t *slice_buf_ids;
  100. /**
  101. * Number of effective slice buffer IDs to send to the HW
  102. *
  103. * - encoding: unused
  104. * - decoding: Set by libavcodec
  105. */
  106. unsigned int n_slice_buf_ids;
  107. /**
  108. * Size of pre-allocated slice_buf_ids
  109. *
  110. * - encoding: unused
  111. * - decoding: Set by libavcodec
  112. */
  113. unsigned int slice_buf_ids_alloc;
  114. /**
  115. * Pointer to VASliceParameterBuffers
  116. *
  117. * - encoding: unused
  118. * - decoding: Set by libavcodec
  119. */
  120. void *slice_params;
  121. /**
  122. * Size of a VASliceParameterBuffer element
  123. *
  124. * - encoding: unused
  125. * - decoding: Set by libavcodec
  126. */
  127. unsigned int slice_param_size;
  128. /**
  129. * Size of pre-allocated slice_params
  130. *
  131. * - encoding: unused
  132. * - decoding: Set by libavcodec
  133. */
  134. unsigned int slice_params_alloc;
  135. /**
  136. * Number of slices currently filled in
  137. *
  138. * - encoding: unused
  139. * - decoding: Set by libavcodec
  140. */
  141. unsigned int slice_count;
  142. /**
  143. * Pointer to slice data buffer base
  144. * - encoding: unused
  145. * - decoding: Set by libavcodec
  146. */
  147. const uint8_t *slice_data;
  148. /**
  149. * Current size of slice data
  150. *
  151. * - encoding: unused
  152. * - decoding: Set by libavcodec
  153. */
  154. uint32_t slice_data_size;
  155. };
  156. /* @} */
  157. #endif /* FF_API_VAAPI_CONTEXT */
  158. #endif /* AVCODEC_VAAPI_H */