FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vaapi.h
Go to the documentation of this file.
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 
24 #ifndef AVCODEC_VAAPI_H
25 #define AVCODEC_VAAPI_H
26 
27 /**
28  * @file
29  * @ingroup lavc_codec_hwaccel_vaapi
30  * Public libavcodec VA API header.
31  */
32 
33 #include <stdint.h>
34 #include "libavutil/attributes.h"
35 #include "version.h"
36 
37 #if FF_API_STRUCT_VAAPI_CONTEXT
38 
39 /**
40  * @defgroup lavc_codec_hwaccel_vaapi VA API Decoding
41  * @ingroup lavc_codec_hwaccel
42  * @{
43  */
44 
45 /**
46  * This structure is used to share data between the FFmpeg library and
47  * the client video application.
48  * This shall be zero-allocated and available as
49  * AVCodecContext.hwaccel_context. All user members can be set once
50  * during initialization or through each AVCodecContext.get_buffer()
51  * function call. In any case, they must be valid prior to calling
52  * decoding functions.
53  *
54  * Deprecated: use AVCodecContext.hw_frames_ctx instead.
55  */
57  /**
58  * Window system dependent data
59  *
60  * - encoding: unused
61  * - decoding: Set by user
62  */
63  void *display;
64 
65  /**
66  * Configuration ID
67  *
68  * - encoding: unused
69  * - decoding: Set by user
70  */
71  uint32_t config_id;
72 
73  /**
74  * Context ID (video decode pipeline)
75  *
76  * - encoding: unused
77  * - decoding: Set by user
78  */
79  uint32_t context_id;
80 
81 #if FF_API_VAAPI_CONTEXT
82  /**
83  * VAPictureParameterBuffer ID
84  *
85  * - encoding: unused
86  * - decoding: Set by libavcodec
87  */
89  uint32_t pic_param_buf_id;
90 
91  /**
92  * VAIQMatrixBuffer ID
93  *
94  * - encoding: unused
95  * - decoding: Set by libavcodec
96  */
98  uint32_t iq_matrix_buf_id;
99 
100  /**
101  * VABitPlaneBuffer ID (for VC-1 decoding)
102  *
103  * - encoding: unused
104  * - decoding: Set by libavcodec
105  */
107  uint32_t bitplane_buf_id;
108 
109  /**
110  * Slice parameter/data buffer IDs
111  *
112  * - encoding: unused
113  * - decoding: Set by libavcodec
114  */
116  uint32_t *slice_buf_ids;
117 
118  /**
119  * Number of effective slice buffer IDs to send to the HW
120  *
121  * - encoding: unused
122  * - decoding: Set by libavcodec
123  */
125  unsigned int n_slice_buf_ids;
126 
127  /**
128  * Size of pre-allocated slice_buf_ids
129  *
130  * - encoding: unused
131  * - decoding: Set by libavcodec
132  */
134  unsigned int slice_buf_ids_alloc;
135 
136  /**
137  * Pointer to VASliceParameterBuffers
138  *
139  * - encoding: unused
140  * - decoding: Set by libavcodec
141  */
144 
145  /**
146  * Size of a VASliceParameterBuffer element
147  *
148  * - encoding: unused
149  * - decoding: Set by libavcodec
150  */
152  unsigned int slice_param_size;
153 
154  /**
155  * Size of pre-allocated slice_params
156  *
157  * - encoding: unused
158  * - decoding: Set by libavcodec
159  */
161  unsigned int slice_params_alloc;
162 
163  /**
164  * Number of slices currently filled in
165  *
166  * - encoding: unused
167  * - decoding: Set by libavcodec
168  */
170  unsigned int slice_count;
171 
172  /**
173  * Pointer to slice data buffer base
174  * - encoding: unused
175  * - decoding: Set by libavcodec
176  */
179 
180  /**
181  * Current size of slice data
182  *
183  * - encoding: unused
184  * - decoding: Set by libavcodec
185  */
187  uint32_t slice_data_size;
188 #endif
189 };
190 
191 /* @} */
192 
193 #endif /* FF_API_STRUCT_VAAPI_CONTEXT */
194 
195 #endif /* AVCODEC_VAAPI_H */
attribute_deprecated unsigned int slice_params_alloc
Size of pre-allocated slice_params.
Definition: vaapi.h:161
attribute_deprecated unsigned int slice_param_size
Size of a VASliceParameterBuffer element.
Definition: vaapi.h:152
uint32_t context_id
Context ID (video decode pipeline)
Definition: vaapi.h:79
This structure is used to share data between the FFmpeg library and the client video application...
Definition: vaapi.h:56
Macro definitions for various function/variable attributes.
uint8_t
Libavcodec version macros.
attribute_deprecated uint32_t iq_matrix_buf_id
VAIQMatrixBuffer ID.
Definition: vaapi.h:98
attribute_deprecated uint32_t bitplane_buf_id
VABitPlaneBuffer ID (for VC-1 decoding)
Definition: vaapi.h:107
attribute_deprecated uint32_t pic_param_buf_id
VAPictureParameterBuffer ID.
Definition: vaapi.h:89
attribute_deprecated uint32_t slice_data_size
Current size of slice data.
Definition: vaapi.h:187
attribute_deprecated unsigned int n_slice_buf_ids
Number of effective slice buffer IDs to send to the HW.
Definition: vaapi.h:125
void * display
Window system dependent data.
Definition: vaapi.h:63
attribute_deprecated uint32_t * slice_buf_ids
Slice parameter/data buffer IDs.
Definition: vaapi.h:116
#define attribute_deprecated
Definition: attributes.h:94
attribute_deprecated void * slice_params
Pointer to VASliceParameterBuffers.
Definition: vaapi.h:143
attribute_deprecated unsigned int slice_buf_ids_alloc
Size of pre-allocated slice_buf_ids.
Definition: vaapi.h:134
attribute_deprecated unsigned int slice_count
Number of slices currently filled in.
Definition: vaapi.h:170
attribute_deprecated const uint8_t * slice_data
Pointer to slice data buffer base.
Definition: vaapi.h:178
uint32_t config_id
Configuration ID.
Definition: vaapi.h:71