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