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
5 * Copyright (C) 2008-2009 Splitted-Desktop Systems
7 * This file is part of Libav.
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.
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.
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
24 #ifndef AVCODEC_VAAPI_H
25 #define AVCODEC_VAAPI_H
29 * @ingroup lavc_codec_hwaccel_vaapi
30 * Public libavcodec VA API header.
35 #include "libavutil/attributes.h"
39 #if FF_API_VAAPI_CONTEXT
42 * @defgroup lavc_codec_hwaccel_vaapi VA API Decoding
43 * @ingroup lavc_codec_hwaccel
48 * This structure is used to share data between the Libav library and
49 * the client video application.
50 * This shall be zero-allocated and available as
51 * AVCodecContext.hwaccel_context. All user members can be set once
52 * during initialization or through each AVCodecContext.get_buffer()
53 * function call. In any case, they must be valid prior to calling
56 * Deprecated: use AVCodecContext.hw_frames_ctx instead.
59 struct vaapi_context {
61 * Window system dependent data
64 * - decoding: Set by user
72 * - decoding: Set by user
77 * Context ID (video decode pipeline)
80 * - decoding: Set by user
85 * VAPictureParameterBuffer ID
88 * - decoding: Set by libavcodec
90 uint32_t pic_param_buf_id;
96 * - decoding: Set by libavcodec
98 uint32_t iq_matrix_buf_id;
101 * VABitPlaneBuffer ID (for VC-1 decoding)
104 * - decoding: Set by libavcodec
106 uint32_t bitplane_buf_id;
109 * Slice parameter/data buffer IDs
112 * - decoding: Set by libavcodec
114 uint32_t *slice_buf_ids;
117 * Number of effective slice buffer IDs to send to the HW
120 * - decoding: Set by libavcodec
122 unsigned int n_slice_buf_ids;
125 * Size of pre-allocated slice_buf_ids
128 * - decoding: Set by libavcodec
130 unsigned int slice_buf_ids_alloc;
133 * Pointer to VASliceParameterBuffers
136 * - decoding: Set by libavcodec
141 * Size of a VASliceParameterBuffer element
144 * - decoding: Set by libavcodec
146 unsigned int slice_param_size;
149 * Size of pre-allocated slice_params
152 * - decoding: Set by libavcodec
154 unsigned int slice_params_alloc;
157 * Number of slices currently filled in
160 * - decoding: Set by libavcodec
162 unsigned int slice_count;
165 * Pointer to slice data buffer base
167 * - decoding: Set by libavcodec
169 const uint8_t *slice_data;
172 * Current size of slice data
175 * - decoding: Set by libavcodec
177 uint32_t slice_data_size;
182 #endif /* FF_API_VAAPI_CONTEXT */
184 #endif /* AVCODEC_VAAPI_H */