annotate lib/libavcodec/vaapi.h @ 2319:9987f93d7e1f

stuff.h
author Ritor1
date Thu, 20 Mar 2014 18:44:27 +0600
parents 992d2e6f907d
children
rev   line source
2134
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
1 /*
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
2 * Video Acceleration API (shared data between FFmpeg and the video player)
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
3 * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
4 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
5 * Copyright (C) 2008-2009 Splitted-Desktop Systems
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
6 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
7 * This file is part of FFmpeg.
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
8 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
9 * FFmpeg is free software; you can redistribute it and/or
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
10 * modify it under the terms of the GNU Lesser General Public
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
11 * License as published by the Free Software Foundation; either
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
12 * version 2.1 of the License, or (at your option) any later version.
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
13 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
14 * FFmpeg is distributed in the hope that it will be useful,
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
17 * Lesser General Public License for more details.
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
18 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
19 * You should have received a copy of the GNU Lesser General Public
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
20 * License along with FFmpeg; if not, write to the Free Software
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
22 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
23
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
24 #ifndef AVCODEC_VAAPI_H
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
25 #define AVCODEC_VAAPI_H
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
26
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
27 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
28 * @file
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
29 * @ingroup lavc_codec_hwaccel_vaapi
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
30 * Public libavcodec VA API header.
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
31 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
32
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
33 #include <stdint.h>
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
34
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
35 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
36 * @defgroup lavc_codec_hwaccel_vaapi VA API Decoding
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
37 * @ingroup lavc_codec_hwaccel
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
38 * @{
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
39 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
40
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
41 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
42 * This structure is used to share data between the FFmpeg library and
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
43 * the client video application.
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
44 * This shall be zero-allocated and available as
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
45 * AVCodecContext.hwaccel_context. All user members can be set once
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
46 * during initialization or through each AVCodecContext.get_buffer()
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
47 * function call. In any case, they must be valid prior to calling
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
48 * decoding functions.
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
49 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
50 struct vaapi_context {
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
51 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
52 * Window system dependent data
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
53 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
54 * - encoding: unused
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
55 * - decoding: Set by user
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
56 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
57 void *display;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
58
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
59 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
60 * Configuration ID
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
61 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
62 * - encoding: unused
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
63 * - decoding: Set by user
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
64 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
65 uint32_t config_id;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
66
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
67 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
68 * Context ID (video decode pipeline)
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
69 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
70 * - encoding: unused
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
71 * - decoding: Set by user
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
72 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
73 uint32_t context_id;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
74
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
75 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
76 * VAPictureParameterBuffer ID
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
77 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
78 * - encoding: unused
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
79 * - decoding: Set by libavcodec
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
80 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
81 uint32_t pic_param_buf_id;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
82
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
83 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
84 * VAIQMatrixBuffer ID
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
85 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
86 * - encoding: unused
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
87 * - decoding: Set by libavcodec
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
88 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
89 uint32_t iq_matrix_buf_id;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
90
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
91 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
92 * VABitPlaneBuffer ID (for VC-1 decoding)
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
93 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
94 * - encoding: unused
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
95 * - decoding: Set by libavcodec
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
96 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
97 uint32_t bitplane_buf_id;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
98
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
99 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
100 * Slice parameter/data buffer IDs
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
101 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
102 * - encoding: unused
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
103 * - decoding: Set by libavcodec
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
104 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
105 uint32_t *slice_buf_ids;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
106
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
107 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
108 * Number of effective slice buffer IDs to send to the HW
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
109 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
110 * - encoding: unused
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
111 * - decoding: Set by libavcodec
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
112 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
113 unsigned int n_slice_buf_ids;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
114
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
115 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
116 * Size of pre-allocated slice_buf_ids
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
117 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
118 * - encoding: unused
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
119 * - decoding: Set by libavcodec
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
120 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
121 unsigned int slice_buf_ids_alloc;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
122
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
123 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
124 * Pointer to VASliceParameterBuffers
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
125 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
126 * - encoding: unused
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
127 * - decoding: Set by libavcodec
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
128 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
129 void *slice_params;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
130
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
131 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
132 * Size of a VASliceParameterBuffer element
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
133 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
134 * - encoding: unused
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
135 * - decoding: Set by libavcodec
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
136 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
137 unsigned int slice_param_size;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
138
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
139 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
140 * Size of pre-allocated slice_params
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
141 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
142 * - encoding: unused
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
143 * - decoding: Set by libavcodec
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
144 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
145 unsigned int slice_params_alloc;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
146
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
147 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
148 * Number of slices currently filled in
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
149 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
150 * - encoding: unused
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
151 * - decoding: Set by libavcodec
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
152 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
153 unsigned int slice_count;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
154
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
155 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
156 * Pointer to slice data buffer base
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
157 * - encoding: unused
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
158 * - decoding: Set by libavcodec
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
159 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
160 const uint8_t *slice_data;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
161
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
162 /**
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
163 * Current size of slice data
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
164 *
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
165 * - encoding: unused
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
166 * - decoding: Set by libavcodec
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
167 */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
168 uint32_t slice_data_size;
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
169 };
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
170
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
171 /* @} */
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
172
992d2e6f907d preparation for libavcodec
zipi
parents:
diff changeset
173 #endif /* AVCODEC_VAAPI_H */