]> git.sesse.net Git - ffmpeg/blob - libavcodec/vaapi.h
lavc: Remove old vaapi decode infrastructure
[ffmpeg] / libavcodec / vaapi.h
1 /*
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
4  *
5  * Copyright (C) 2008-2009 Splitted-Desktop Systems
6  *
7  * This file is part of Libav.
8  *
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.
13  *
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.
18  *
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
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
35 #include "libavutil/attributes.h"
36
37 #include "version.h"
38
39 #if FF_API_VAAPI_CONTEXT
40
41 /**
42  * @defgroup lavc_codec_hwaccel_vaapi VA API Decoding
43  * @ingroup lavc_codec_hwaccel
44  * @{
45  */
46
47 /**
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
54  * decoding functions.
55  *
56  * Deprecated: use AVCodecContext.hw_frames_ctx instead.
57  */
58 attribute_deprecated
59 struct vaapi_context {
60     /**
61      * Window system dependent data
62      *
63      * - encoding: unused
64      * - decoding: Set by user
65      */
66     void *display;
67
68     /**
69      * Configuration ID
70      *
71      * - encoding: unused
72      * - decoding: Set by user
73      */
74     uint32_t config_id;
75
76     /**
77      * Context ID (video decode pipeline)
78      *
79      * - encoding: unused
80      * - decoding: Set by user
81      */
82     uint32_t context_id;
83
84     /**
85      * VAPictureParameterBuffer ID
86      *
87      * - encoding: unused
88      * - decoding: Set by libavcodec
89      */
90     uint32_t pic_param_buf_id;
91
92     /**
93      * VAIQMatrixBuffer ID
94      *
95      * - encoding: unused
96      * - decoding: Set by libavcodec
97      */
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      */
106     uint32_t bitplane_buf_id;
107
108     /**
109      * Slice parameter/data buffer IDs
110      *
111      * - encoding: unused
112      * - decoding: Set by libavcodec
113      */
114     uint32_t *slice_buf_ids;
115
116     /**
117      * Number of effective slice buffer IDs to send to the HW
118      *
119      * - encoding: unused
120      * - decoding: Set by libavcodec
121      */
122     unsigned int n_slice_buf_ids;
123
124     /**
125      * Size of pre-allocated slice_buf_ids
126      *
127      * - encoding: unused
128      * - decoding: Set by libavcodec
129      */
130     unsigned int slice_buf_ids_alloc;
131
132     /**
133      * Pointer to VASliceParameterBuffers
134      *
135      * - encoding: unused
136      * - decoding: Set by libavcodec
137      */
138     void *slice_params;
139
140     /**
141      * Size of a VASliceParameterBuffer element
142      *
143      * - encoding: unused
144      * - decoding: Set by libavcodec
145      */
146     unsigned int slice_param_size;
147
148     /**
149      * Size of pre-allocated slice_params
150      *
151      * - encoding: unused
152      * - decoding: Set by libavcodec
153      */
154     unsigned int slice_params_alloc;
155
156     /**
157      * Number of slices currently filled in
158      *
159      * - encoding: unused
160      * - decoding: Set by libavcodec
161      */
162     unsigned int slice_count;
163
164     /**
165      * Pointer to slice data buffer base
166      * - encoding: unused
167      * - decoding: Set by libavcodec
168      */
169     const uint8_t *slice_data;
170
171     /**
172      * Current size of slice data
173      *
174      * - encoding: unused
175      * - decoding: Set by libavcodec
176      */
177     uint32_t slice_data_size;
178 };
179
180 /* @} */
181
182 #endif /* FF_API_VAAPI_CONTEXT */
183
184 #endif /* AVCODEC_VAAPI_H */