annotate vaapi.h @ 11308:06e2ff1295bd libavcodec

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