Mercurial > libavcodec.hg
annotate vaapi.h @ 9289:238dd89b7ac3 libavcodec
Add required va/va.h header, should fix 'make checkheaders'.
| author | diego |
|---|---|
| date | Mon, 30 Mar 2009 15:36:59 +0000 |
| parents | 85c7a028316d |
| children | f0732d44f655 |
| rev | line source |
|---|---|
| 9225 | 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 #include <stdint.h> | |
|
9289
238dd89b7ac3
Add required va/va.h header, should fix 'make checkheaders'.
diego
parents:
9225
diff
changeset
|
28 #include <va/va.h> |
| 9225 | 29 |
| 30 /** | |
| 31 * \defgroup VAAPI_Decoding VA API Decoding | |
| 32 * \ingroup Decoder | |
| 33 * @{ | |
| 34 */ | |
| 35 | |
| 36 /** | |
| 37 * This structure is used to share data between the FFmpeg library and | |
| 38 * the client video application. | |
| 39 * This shall be zero-allocated and available as | |
| 40 * AVCodecContext.hwaccel_context. All user members can be set once | |
| 41 * during initialization or through each AVCodecContext.get_buffer() | |
| 42 * function call. In any case, they must be valid prior to calling | |
| 43 * decoding functions. | |
| 44 */ | |
| 45 struct vaapi_context { | |
| 46 /** | |
| 47 * Window system dependent data | |
| 48 * | |
| 49 * - encoding: unused | |
| 50 * - decoding: Set by user | |
| 51 */ | |
| 52 void *display; | |
| 53 | |
| 54 /** | |
| 55 * Configuration ID | |
| 56 * | |
| 57 * - encoding: unused | |
| 58 * - decoding: Set by user | |
| 59 */ | |
| 60 uint32_t config_id; | |
| 61 | |
| 62 /** | |
| 63 * Context ID (video decode pipeline) | |
| 64 * | |
| 65 * - encoding: unused | |
| 66 * - decoding: Set by user | |
| 67 */ | |
| 68 uint32_t context_id; | |
| 69 | |
| 70 /** | |
| 71 * VAPictureParameterBuffer ID | |
| 72 * | |
| 73 * - encoding: unused | |
| 74 * - decoding: Set by libavcodec | |
| 75 */ | |
| 76 VABufferID pic_param_buf_id; | |
| 77 | |
| 78 /** | |
| 79 * VAIQMatrixBuffer ID | |
| 80 * | |
| 81 * - encoding: unused | |
| 82 * - decoding: Set by libavcodec | |
| 83 */ | |
| 84 VABufferID iq_matrix_buf_id; | |
| 85 | |
| 86 /** | |
| 87 * VABitPlaneBuffer ID (for VC-1 decoding) | |
| 88 * | |
| 89 * - encoding: unused | |
| 90 * - decoding: Set by libavcodec | |
| 91 */ | |
| 92 VABufferID bitplane_buf_id; | |
| 93 | |
| 94 /** | |
| 95 * Slice parameter/data buffer IDs | |
| 96 * | |
| 97 * - encoding: unused | |
| 98 * - decoding: Set by libavcodec | |
| 99 */ | |
| 100 VABufferID *slice_buf_ids; | |
| 101 | |
| 102 /** | |
| 103 * Number of effective slice buffer IDs to send to the HW | |
| 104 * | |
| 105 * - encoding: unused | |
| 106 * - decoding: Set by libavcodec | |
| 107 */ | |
| 108 unsigned int n_slice_buf_ids; | |
| 109 | |
| 110 /** | |
| 111 * Size of pre-allocated slice_buf_ids | |
| 112 * | |
| 113 * - encoding: unused | |
| 114 * - decoding: Set by libavcodec | |
| 115 */ | |
| 116 unsigned int slice_buf_ids_alloc; | |
| 117 | |
| 118 /** | |
| 119 * Picture parameter buffer | |
| 120 * | |
| 121 * - encoding: unused | |
| 122 * - decoding: Set by libavcodec | |
| 123 */ | |
| 124 union { | |
| 125 VAPictureParameterBufferMPEG2 mpeg2; | |
| 126 VAPictureParameterBufferMPEG4 mpeg4; | |
| 127 VAPictureParameterBufferH264 h264; | |
| 128 VAPictureParameterBufferVC1 vc1; | |
| 129 } pic_param; | |
| 130 | |
| 131 /** | |
| 132 * Size of a VAPictureParameterBuffer element | |
| 133 * | |
| 134 * - encoding: unused | |
| 135 * - decoding: Set by libavcodec | |
| 136 */ | |
| 137 unsigned int pic_param_size; | |
| 138 | |
| 139 /** | |
| 140 * Inverse quantization matrix buffer | |
| 141 * | |
| 142 * - encoding: unused | |
| 143 * - decoding: Set by libavcodec | |
| 144 */ | |
| 145 union { | |
| 146 VAIQMatrixBufferMPEG2 mpeg2; | |
| 147 VAIQMatrixBufferMPEG4 mpeg4; | |
| 148 VAIQMatrixBufferH264 h264; | |
| 149 } iq_matrix; | |
| 150 | |
| 151 /** | |
| 152 * Size of a VAIQMatrixBuffer element | |
| 153 * | |
| 154 * - encoding: unused | |
| 155 * - decoding: Set by libavcodec | |
| 156 */ | |
| 157 unsigned int iq_matrix_size; | |
| 158 | |
| 159 /** | |
| 160 * Flag: is quantization matrix present? | |
| 161 * | |
| 162 * - encoding: unused | |
| 163 * - decoding: Set by libavcodec | |
| 164 */ | |
| 165 uint8_t iq_matrix_present; | |
| 166 | |
| 167 /** | |
| 168 * VC-1 bitplane buffer | |
| 169 * | |
| 170 * - encoding: unused | |
| 171 * - decoding: Set by libavcodec | |
| 172 */ | |
| 173 uint8_t *bitplane_buffer; | |
| 174 | |
| 175 /** | |
| 176 * Size of VC-1 bitplane buffer | |
| 177 * | |
| 178 * - encoding: unused | |
| 179 * - decoding: Set by libavcodec | |
| 180 */ | |
| 181 unsigned int bitplane_buffer_size; | |
| 182 | |
| 183 /** | |
| 184 * Pointer to VASliceParameterBuffers | |
| 185 * | |
| 186 * - encoding: unused | |
| 187 * - decoding: Set by libavcodec | |
| 188 */ | |
| 189 void *slice_params; | |
| 190 | |
| 191 /** | |
| 192 * Size of a VASliceParameterBuffer element | |
| 193 * | |
| 194 * - encoding: unused | |
| 195 * - decoding: Set by libavcodec | |
| 196 */ | |
| 197 unsigned int slice_param_size; | |
| 198 | |
| 199 /** | |
| 200 * Size of pre-allocated slice_params | |
| 201 * | |
| 202 * - encoding: unused | |
| 203 * - decoding: Set by libavcodec | |
| 204 */ | |
| 205 unsigned int slice_params_alloc; | |
| 206 | |
| 207 /** | |
| 208 * Number of slices currently filled in | |
| 209 * | |
| 210 * - encoding: unused | |
| 211 * - decoding: Set by libavcodec | |
| 212 */ | |
| 213 unsigned int slice_count; | |
| 214 | |
| 215 /** | |
| 216 * Pointer to slice data buffer base | |
| 217 * - encoding: unused | |
| 218 * - decoding: Set by libavcodec | |
| 219 */ | |
| 220 const uint8_t *slice_data; | |
| 221 | |
| 222 /** | |
| 223 * Current size of slice data | |
| 224 * | |
| 225 * - encoding: unused | |
| 226 * - decoding: Set by libavcodec | |
| 227 */ | |
| 228 uint32_t slice_data_size; | |
| 229 }; | |
| 230 | |
| 231 /* @} */ | |
| 232 | |
| 233 #endif /* AVCODEC_VAAPI_H */ |
