]> git.sesse.net Git - ffmpeg/blob - libavcodec/vaapi.h
avcodec/dnxhddec: fix decoding of DNxHR HQX 10-bit
[ffmpeg] / libavcodec / vaapi.h
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  */
56 attribute_deprecated
57 struct vaapi_context {
58     /**
59      * Window system dependent data
60      *
61      * - encoding: unused
62      * - decoding: Set by user
63      */
64     void *display;
65
66     /**
67      * Configuration ID
68      *
69      * - encoding: unused
70      * - decoding: Set by user
71      */
72     uint32_t config_id;
73
74     /**
75      * Context ID (video decode pipeline)
76      *
77      * - encoding: unused
78      * - decoding: Set by user
79      */
80     uint32_t context_id;
81
82 #if FF_API_VAAPI_CONTEXT
83     /**
84      * VAPictureParameterBuffer ID
85      *
86      * - encoding: unused
87      * - decoding: Set by libavcodec
88      */
89     attribute_deprecated
90     uint32_t pic_param_buf_id;
91
92     /**
93      * VAIQMatrixBuffer ID
94      *
95      * - encoding: unused
96      * - decoding: Set by libavcodec
97      */
98     attribute_deprecated
99     uint32_t iq_matrix_buf_id;
100
101     /**
102      * VABitPlaneBuffer ID (for VC-1 decoding)
103      *
104      * - encoding: unused
105      * - decoding: Set by libavcodec
106      */
107     attribute_deprecated
108     uint32_t bitplane_buf_id;
109
110     /**
111      * Slice parameter/data buffer IDs
112      *
113      * - encoding: unused
114      * - decoding: Set by libavcodec
115      */
116     attribute_deprecated
117     uint32_t *slice_buf_ids;
118
119     /**
120      * Number of effective slice buffer IDs to send to the HW
121      *
122      * - encoding: unused
123      * - decoding: Set by libavcodec
124      */
125     attribute_deprecated
126     unsigned int n_slice_buf_ids;
127
128     /**
129      * Size of pre-allocated slice_buf_ids
130      *
131      * - encoding: unused
132      * - decoding: Set by libavcodec
133      */
134     attribute_deprecated
135     unsigned int slice_buf_ids_alloc;
136
137     /**
138      * Pointer to VASliceParameterBuffers
139      *
140      * - encoding: unused
141      * - decoding: Set by libavcodec
142      */
143     attribute_deprecated
144     void *slice_params;
145
146     /**
147      * Size of a VASliceParameterBuffer element
148      *
149      * - encoding: unused
150      * - decoding: Set by libavcodec
151      */
152     attribute_deprecated
153     unsigned int slice_param_size;
154
155     /**
156      * Size of pre-allocated slice_params
157      *
158      * - encoding: unused
159      * - decoding: Set by libavcodec
160      */
161     attribute_deprecated
162     unsigned int slice_params_alloc;
163
164     /**
165      * Number of slices currently filled in
166      *
167      * - encoding: unused
168      * - decoding: Set by libavcodec
169      */
170     attribute_deprecated
171     unsigned int slice_count;
172
173     /**
174      * Pointer to slice data buffer base
175      * - encoding: unused
176      * - decoding: Set by libavcodec
177      */
178     attribute_deprecated
179     const uint8_t *slice_data;
180
181     /**
182      * Current size of slice data
183      *
184      * - encoding: unused
185      * - decoding: Set by libavcodec
186      */
187     attribute_deprecated
188     uint32_t slice_data_size;
189 #endif
190 };
191
192 /* @} */
193
194 #endif /* FF_API_STRUCT_VAAPI_CONTEXT */
195
196 #endif /* AVCODEC_VAAPI_H */