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