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
5 * Copyright (C) 2008-2009 Splitted-Desktop Systems
7 * This file is part of FFmpeg.
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.
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.
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
24 #ifndef AVCODEC_VAAPI_H
25 #define AVCODEC_VAAPI_H
29 * @ingroup lavc_codec_hwaccel_vaapi
30 * Public libavcodec VA API header.
34 #include "libavutil/attributes.h"
38 * @defgroup lavc_codec_hwaccel_vaapi VA API Decoding
39 * @ingroup lavc_codec_hwaccel
44 * This structure is used to share data between the FFmpeg library and
45 * the client video application.
46 * This shall be zero-allocated and available as
47 * AVCodecContext.hwaccel_context. All user members can be set once
48 * during initialization or through each AVCodecContext.get_buffer()
49 * function call. In any case, they must be valid prior to calling
52 struct vaapi_context {
54 * Window system dependent data
57 * - decoding: Set by user
65 * - decoding: Set by user
70 * Context ID (video decode pipeline)
73 * - decoding: Set by user
77 #if FF_API_VAAPI_CONTEXT
79 * VAPictureParameterBuffer ID
82 * - decoding: Set by libavcodec
85 uint32_t pic_param_buf_id;
91 * - decoding: Set by libavcodec
94 uint32_t iq_matrix_buf_id;
97 * VABitPlaneBuffer ID (for VC-1 decoding)
100 * - decoding: Set by libavcodec
103 uint32_t bitplane_buf_id;
106 * Slice parameter/data buffer IDs
109 * - decoding: Set by libavcodec
112 uint32_t *slice_buf_ids;
115 * Number of effective slice buffer IDs to send to the HW
118 * - decoding: Set by libavcodec
121 unsigned int n_slice_buf_ids;
124 * Size of pre-allocated slice_buf_ids
127 * - decoding: Set by libavcodec
130 unsigned int slice_buf_ids_alloc;
133 * Pointer to VASliceParameterBuffers
136 * - decoding: Set by libavcodec
142 * Size of a VASliceParameterBuffer element
145 * - decoding: Set by libavcodec
148 unsigned int slice_param_size;
151 * Size of pre-allocated slice_params
154 * - decoding: Set by libavcodec
157 unsigned int slice_params_alloc;
160 * Number of slices currently filled in
163 * - decoding: Set by libavcodec
166 unsigned int slice_count;
169 * Pointer to slice data buffer base
171 * - decoding: Set by libavcodec
174 const uint8_t *slice_data;
177 * Current size of slice data
180 * - decoding: Set by libavcodec
183 uint32_t slice_data_size;
189 #endif /* AVCODEC_VAAPI_H */