+typedef struct {
+ VADisplay display; ///< Windowing system dependent handle
+ VAConfigID config_id; ///< Configuration ID
+ VAContextID context_id; ///< Context ID (video decode pipeline)
+ VABufferID pic_param_buf_id; ///< Picture parameter buffer
+ VABufferID iq_matrix_buf_id; ///< Inverse quantiser matrix buffer
+ VABufferID bitplane_buf_id; ///< Bitplane buffer (for VC-1 decoding)
+ VABufferID *slice_buf_ids; ///< Slice parameter/data buffers
+ unsigned int n_slice_buf_ids; ///< Number of effective slice buffers
+ unsigned int slice_buf_ids_alloc; ///< Number of allocated slice buffers
+ void *slice_params; ///< Pointer to slice parameter buffers
+ unsigned int slice_param_size; ///< Size of a slice parameter element
+ unsigned int slice_params_alloc; ///< Number of allocated slice parameters
+ unsigned int slice_count; ///< Number of slices currently filled in
+ const uint8_t *slice_data; ///< Pointer to slice data buffer base
+ unsigned int slice_data_size; ///< Current size of slice data
+} FFVAContext;
+
+/** Extract vaapi_context from an AVCodecContext */
+static inline FFVAContext *ff_vaapi_get_context(AVCodecContext *avctx)
+{
+ return avctx->internal->hwaccel_priv_data;
+}
+