Codebase list gstreamer-vaapi / 33d009e
New upstream version 1.11.90 Sebastian Dröge 7 years ago
39 changed file(s) with 1096 addition(s) and 359 deletion(s). Raw diff Collapse all Expand all
0 === release 1.11.90 ===
1
2 2017-04-07 Sebastian Dröge <slomo@coaxion.net>
3
4 * configure.ac:
5 releasing 1.11.90
6
7 2017-04-03 14:52:41 +0200 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
8
9 * gst/vaapi/gstvaapiencode_h265.c:
10 vaapiencode: h265: add main-10 in caps template
11 This patch adds h265's main-10 profile in encoder src caps template.
12 https://bugzilla.gnome.org/show_bug.cgi?id=771291
13
14 2017-04-03 15:34:51 +0200 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
15
16 * gst-libs/gst/vaapi/gstvaapiencoder_h265.c:
17 libs: encoder: h265: chroma and luma with format
18 If the profile is main-10 the bit_depth_luma_minus8, in the sequence
19 parameter buffer, shall be the color format bit depth minus 8, 10-8
20 which is 2. Also for bit_depth_chroma_minus8.
21 This patch gets the negotiated sink caps format and queries its
22 luma's depth and uses that value to fill the mentioned parameters.
23 https://bugzilla.gnome.org/show_bug.cgi?id=771291
24
25 2017-03-29 19:20:26 +0200 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
26
27 * gst-libs/gst/vaapi/gstvaapiencoder.c:
28 libs: encoder: admit YUV420_10BPP as valid chroma
29 Accepts as supported the GST_VAAPI_CHROMA_TYPE_YUV420_10BPP chroma
30 type.
31 https://bugzilla.gnome.org/show_bug.cgi?id=771291
32
33 2017-03-29 19:16:50 +0200 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
34
35 * gst-libs/gst/vaapi/gstvaapiencoder_h265.c:
36 libs: encoder: h265: ensures profile given format
37 Set the VA profile as GST_VAAPI_PROFILE_H265_MAIN10 if the
38 configured color format is P010_10LE.
39 Otherwise, keep GST_VAAPI_PROFILE_H265_MAIN
40 https://bugzilla.gnome.org/show_bug.cgi?id=771291
41
42 2017-04-06 17:21:21 +0200 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
43
44 * gst-libs/gst/vaapi/gstvaapiencoder.c:
45 libs: encode: merge all possible surface formats
46 When the function gst_vaapi_encoder_get_surface_formats() was added
47 it was under the assumption that any VA profile of the specific codec
48 supported the same format colors. But it is not, for example the
49 profiles that support 10bit formats.
50 In other words, different VA profiles of a same codec may support
51 different color formats in their upload surfaces.
52 In order to expose all the possible color formats, if no profile is
53 specified via source caps, or if the encoder doesn't have yet a
54 context, all the possible VA profiles for the specific codec are
55 iterated and their color formats are merged.
56 https://bugzilla.gnome.org/show_bug.cgi?id=771291
57
58 2017-04-06 16:28:12 +0200 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
59
60 * gst/vaapi/gstvaapiencode.c:
61 * gst/vaapi/gstvaapiencode.h:
62 * gst/vaapi/gstvaapiencode_h264.c:
63 * gst/vaapi/gstvaapiencode_h265.c:
64 vaapiencode: add get_profile() vmethod
65 This new virtual method, get_profile(), if implemented by specific
66 encoders, will return the VA profile potentially determined by the
67 source caps.
68 Also it is implemented by h264 and h265 encoders, which are the main
69 users of this vmethod.
70 https://bugzilla.gnome.org/show_bug.cgi?id=771291
71
72 2017-04-06 12:49:24 +0200 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
73
74 * gst-libs/gst/vaapi/gstvaapiencoder.c:
75 * gst-libs/gst/vaapi/gstvaapiencoder.h:
76 * gst/vaapi/gstvaapiencode.c:
77 libs: encoder: pass profile to get_surface_formats()
78 In order to get the supported surface formats within a specific
79 profile this patch adds the GstVaapiProfile as property to
80 gst_vaapi_encoder_get_surface_formats().
81 Currently the extracted formats are only those related with the
82 default profile of the element's codec.
83 https://bugzilla.gnome.org/show_bug.cgi?id=771291
84
85 2017-04-06 12:28:51 +0200 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
86
87 * gst-libs/gst/vaapi/gstvaapiencoder.c:
88 libs: encoder: dummy context for get_surface_formats()
89 Instead of creating (if it doesn't exist, yet) the encoder's context
90 the method gst_vaapi_encoder_get_surface_formats() now it creates
91 dummy contexts, unless the encoder has it already created.
92 The purpose of this is to avoid setting a encoder's context with a
93 wrong profile.
94 https://bugzilla.gnome.org/show_bug.cgi?id=771291
95
96 2017-04-04 14:39:59 +0200 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
97
98 * gst-libs/gst/vaapi/gstvaapiencoder.c:
99 libs: encoder: refactor init_context_info()
100 In order to generate vaapi contexts iterative, the function
101 init_context_info() is refactored to pass, as parameters the
102 GstVaapiContextInfo and the GstVaapiProfile.
103 https://bugzilla.gnome.org/show_bug.cgi?id=771291
104
105 2017-04-04 14:21:43 +0200 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
106
107 * gst-libs/gst/vaapi/gstvaapiencoder.c:
108 * gst-libs/gst/vaapi/gstvaapiutils.c:
109 * gst-libs/gst/vaapi/gstvaapiutils.h:
110 libs: encoder: initialize chroma_type
111 Instead of initialize the chroma_type with a undefined value, which
112 will be converted to GST_VAAPI_CHROMA_TYPE_YUV420 by GstVaapiContext,
113 this patch queries the VA config, given the received
114 GstVaapiContextInfo's parameters, and gets the first response.
115 In order to get the GstVaapiChromaType value, also it was needed to
116 add a new utility function: to_GstVaapiChromaType(), which, given a
117 VA_RT_FORMAT_* will return the associated GstVaapiChromaType.
118 https://bugzilla.gnome.org/show_bug.cgi?id=771291
119
120 2017-03-31 11:21:21 +0200 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
121
122 * gst/vaapi/gstvaapiencode.c:
123 vaapiencode: enhance logs of negotiated caps
124 https://bugzilla.gnome.org/show_bug.cgi?id=771291
125
126 2017-04-05 11:15:41 -0700 Scott D Phillips <scott.d.phillips@intel.com>
127
128 * gst-libs/gst/vaapi/gstvaapiencoder_vp9.c:
129 libs: encoder: vp9: Fix initialization of ref_list
130 gcc 7.0.1 gives a memset-elt-size warning in gst_vaapi_encoder_vp9_init:
131 'memset' used with length equal to number of elements without
132 multiplication by element size [-Werror=memset-elt-size]
133 https://bugzilla.gnome.org/show_bug.cgi?id=780947
134
135 2017-03-31 14:12:43 -0700 Sreerenj Balachandran <sreerenj.balachandran@intel.com>
136
137 * gst-libs/gst/vaapi/gstvaapiencoder_h264.c:
138 encoder: h264: Fix Backward ReferencePicture flag setting
139 This is a regression introduced by e829b62 which
140 override the reference flags and caused issues with
141 latest intel-vaapi-driver.
142
143 2017-03-29 13:22:47 +0200 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
144
145 * gst-libs/gst/vaapi/gstvaapiencoder_h265.c:
146 libs: encoder: h265: fix code style
147 Trivial patch to remove a double ';' as end of instruction.
148
149 2017-03-28 10:53:20 -0700 Sreerenj Balachandran <sreerenj.balachandran@intel.com>
150
151 * gst-libs/gst/vaapi/gstvaapiencoder_h264.c:
152 encoder: h264: Fix B frame encoding artifacts
153 The current implementation is updating the POC values only
154 in Slice parameter Buffer.But we are not filling the
155 picture order count and reference flags in VAPictureH264
156 while populating VA Picture/Slice structures.The latest
157 intel-vaapi-driver is directly accessing the above fields
158 from VAPicutreH264 provided as RefPicLists, which resulted
159 some wrong maths and prediction errors in driver.
160 https://bugzilla.gnome.org/show_bug.cgi?id=780620
161
162 2017-03-21 16:13:56 +0100 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
163
164 * gst-libs/gst/vaapi/gstvaapiencoder_h265.c:
165 libs: encoder: h265: remove unused macro definition
166 Since the h265 encoder doesn't use GValueArray, there is no need to
167 disable the Glib deprecation warnings, thus removing the macro
168 definition.
169
170 2017-03-20 16:45:01 +0100 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
171
172 * gst/vaapi/gstvaapidecode.c:
173 * gst/vaapi/gstvaapiencode.c:
174 * gst/vaapi/gstvaapipostproc.c:
175 * gst/vaapi/gstvaapisink.c:
176 plugins: when debug disabled, default category is NULL
177 As in gstreamer-vaapi a common base class is used, the specific
178 default category is passed to the base-plugin initializator, thus
179 the log messages are categorized with the used plugin.
180 Nonetheless, when the gst-debug is disabled in compilation time,
181 it is needed to pass NULL to the base-plugin initializator. This
182 patch does that.
183 https://bugzilla.gnome.org/show_bug.cgi?id=780302
184
185 2017-03-17 17:14:01 +0900 Hyunjun Ko <zzoon@igalia.com>
186
187 * gst-libs/gst/vaapi/gstvaapiencoder_h264.c:
188 * gst-libs/gst/vaapi/gstvaapiencoder_h265.c:
189 * gst-libs/gst/vaapi/gstvaapiutils_h26x.c:
190 * gst-libs/gst/vaapi/gstvaapiutils_h26x_priv.h:
191 libs: h26x: adds gst_vaapi_utils_h26x_write_nal_unit()
192 Implements gst_vaapi_utils_h26x_write_nal_unit(), which writes NAL
193 unit length and data to a bitwriter.
194 Note that this helper function applies EPB (Emulation Prevention
195 Bytes), since otherwise produced codec_data might be broken when
196 decoder/parser considering EPB, starts parsing.
197 See sections 7.3 and 7.4 of the H264 and H264 specifications, which
198 describes the emulation_prevention_three_byte.
199 https://bugzilla.gnome.org/show_bug.cgi?id=778750
200 Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
201
202 2017-03-17 16:49:41 +0900 Hyunjun Ko <zzoon@igalia.com>
203
204 * gst-libs/gst/vaapi/Makefile.am:
205 * gst-libs/gst/vaapi/gstvaapiencoder_h264.c:
206 * gst-libs/gst/vaapi/gstvaapiencoder_h265.c:
207 * gst-libs/gst/vaapi/gstvaapiutils_h26x.c:
208 * gst-libs/gst/vaapi/gstvaapiutils_h26x_priv.h:
209 * gst-libs/gst/vaapi/meson.build:
210 libs: utils: h26x: create vaapiutils_h26x
211 Since there is duplicated code in h264/265 encoder, we could
212 refactor it to avoid duplicated code.
213 https://bugzilla.gnome.org/show_bug.cgi?id=778750
214 Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
215
216 2017-03-17 16:32:36 +0900 Hyunjun Ko <zzoon@igalia.com>
217
218 * gst-libs/gst/vaapi/gstvaapiencoder_h264.c:
219 * gst-libs/gst/vaapi/gstvaapiencoder_h265.c:
220 libs: encoder: h264/5: fix wrong return value
221 https://bugzilla.gnome.org/show_bug.cgi?id=778750
222
223 2017-03-13 17:29:59 +0900 Hyunjun Ko <zzoon@igalia.com>
224
225 * gst/vaapi/gstvaapiencode_h264.c:
226 * gst/vaapi/gstvaapiencode_h265.c:
227 docs: h264/h265: put parser to the example pipeline
228 https://bugzilla.gnome.org/show_bug.cgi?id=778749
229
230 2017-03-13 16:20:59 +0900 Hyunjun Ko <zzoon@igalia.com>
231
232 * gst-libs/gst/vaapi/gstvaapiencoder_h265.c:
233 libs: encoder: h265: fix reserved length of bits
234 Fix reserved length of bits for bit_depth_luma_minus8 and bit_depth_chroma_minus8
235 https://bugzilla.gnome.org/show_bug.cgi?id=778749
236
237 2017-03-12 18:59:42 +0100 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
238
239 * gst-libs/gst/vaapi/gstvaapidisplay_drm.c:
240 * tests/test-display.c:
241 O_CLOEXEC needs _GNU_SOURCE defined
242 From man open(2):
243 The O_CLOEXEC, O_DIRECTORY, and O_NOFOLLOW flags are not specified
244 in POSIX.1-2001, but are specified in POSIX.1-2008. Since glibc
245 2.12, one can obtain their definitions by defining either
246 _POSIX_C_SOURCE with a value greater than or equal to 200809L or
247 _XOPEN_SOURCE with a value greater than or equal to 700. In glibc
248 2.11 and earlier, one obtains the definitions by defining
249 _GNU_SOURCE.
250 And indeed, with the uClibc C library, O_CLOEXEC is not exposed if
251 _GNU_SOURCE is not defined. Therefore, this commit fixes the build of
252 gstreamer-vaapi with the uClibc C library.
253 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
254 https://bugzilla.gnome.org/show_bug.cgi?id=779953
255
256 2017-03-14 16:07:08 +0100 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
257
258 * README:
259 README: fix "Sources" section
260 Update the URL where the release source tarballs can be downloaded.
261
262 2017-03-12 21:39:53 +0100 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
263
264 * README:
265 README: fix "Reporting bugs" section
266 The "Reporting bugs" section gives
267 https://bugzilla.gnome.org/enter_bug.cgi?product=gstreamer-vaapi as the
268 link to report a bug, but this link says "Sorry, entering a bug into the
269 product gstreamer-vaapi has been disabled.".
270 This commit fixes the URL to point to the proper location, and also
271 removes the following paragraph that is no longer correct.
272 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
273 https://bugzilla.gnome.org/show_bug.cgi?id=779954
274
275 2017-03-03 19:55:00 +0100 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
276
277 * gst/vaapi/gstvaapipluginutil.c:
278 plugins: retry to create the VA display
279 Particularly in GNOME Wayland, the negotiated or created GL context
280 defines a GLX environment, but VAAPI fails to create a GLX VA
281 display because there is no a DRI2 connection.
282 This patch retries to create the VA display if VA cannot create one
283 with the GL context parameters. Now using the old list of display
284 types.
285 This should also work in the case of systems with two GPU, when the
286 non-VAAPI has the graphics environment, and the VAAPI-enabled one
287 shall work headless.
288 https://bugzilla.gnome.org/show_bug.cgi?id=772838
289
290 2016-10-19 15:33:41 +0100 Julien Isorce <j.isorce@samsung.com>
291
292 * gst/vaapi/gstvaapipostproc.c:
293 vaapipostproc: texture upload if driver supports GL
294 Removes GstVideoGLTextureUploadMeta caps feature if the driver
295 doesn't support opengl.
296 Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
297 https://bugzilla.gnome.org/show_bug.cgi?id=772838
298
299 2016-10-25 17:48:47 +0200 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
300
301 * gst/vaapi/gstvaapidecode.c:
302 vaapidecode: texture upload if driver supports GL
303 When the allowed source pad caps are generated, the GLTextureUpload caps are
304 only inserted if the driver support OpenGL.
305 https://bugzilla.gnome.org/show_bug.cgi?id=772838
306
307 2017-02-22 15:02:01 -0800 Sreerenj Balachandran <sreerenj.balachandran@intel.com>
308
309 * configure.ac:
310 configure: Add missing compiler flags
311 The AC_CHECK_HEADERS macro was failing to locate some headers, in
312 particular the va_enc_* headers due to missing compiler flags.
313 https://bugzilla.gnome.org/show_bug.cgi?id=779101
314 Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
315
316 2017-03-01 14:48:46 +0900 Hyunjun Ko <zzoon@igalia.com>
317
318 * gst-libs/gst/vaapi/gstvaapiwindow_wayland.c:
319 libs: window: wayland: handle more VAStatus to use vpp
320 Since the commit landed https://github.com/01org/intel-vaapi-driver/pull/55,
321 we should consider more returned VAStatus to use vpp.
322 https://bugzilla.gnome.org/show_bug.cgi?id=779400
323
324 2017-02-23 15:16:06 +0900 Hyunjun Ko <zzoon@igalia.com>
325
326 * gst-libs/gst/vaapi/gstvaapiencoder.c:
327 libs: encoder: ensure profile when context initialization
328 We can't be sure that encoder's profile is assgined already or not
329 at context initialization.
330 https://bugzilla.gnome.org/show_bug.cgi?id=779120
331
332 2017-02-23 15:13:59 +0900 Hyunjun Ko <zzoon@igalia.com>
333
334 * gst-libs/gst/vaapi/gstvaapiencoder.c:
335 libs: encoder: set rate control info only when query succeed
336 Currently, it set rate control information even when query fails.
337 In addition, it doesn't update any more since the flag
338 got_rate_control_mask is set to TRUE.
339 https://bugzilla.gnome.org/show_bug.cgi?id=779120
340
341 2017-02-24 16:00:23 +0200 Sebastian Dröge <sebastian@centricular.com>
342
343 * meson.build:
344 meson: Update version
345
346 2017-02-24 15:38:22 +0200 Sebastian Dröge <sebastian@centricular.com>
347
348 * configure.ac:
349 Back to development
350
0351 === release 1.11.2 ===
1352
2 2017-02-24 Sebastian Dröge <slomo@coaxion.net>
3
4 * configure.ac:
5 releasing 1.11.2
353 2017-02-24 15:10:21 +0200 Sebastian Dröge <sebastian@centricular.com>
354
355 * ChangeLog:
356 * NEWS:
357 * configure.ac:
358 * gstreamer-vaapi.doap:
359 Release 1.11.2
6360
7361 2017-02-16 18:37:59 +0100 Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
8362
0 This is GStreamer 1.11.2.
0 This is GStreamer 1.11.90.
124124 framework are really easy to get.
125125
126126 Stable source code releases can be found at:
127 <http://www.freedesktop.org/software/vaapi/releases/gstreamer-vaapi/>
127 <https://gstreamer.freedesktop.org/src/gstreamer-vaapi/>
128128
129129 Git repository for work-in-progress changes is available at:
130130 <https://cgit.freedesktop.org/gstreamer/gstreamer-vaapi>
134134 --------------
135135
136136 Bugs can be reported in the GNOME Bugzilla system at:
137 <https://bugzilla.gnome.org/enter_bug.cgi?product=gstreamer-vaapi>
138
139 From the main page, new bugs can be reported through New -> Other ->
140 gstreamer-vaapi product.
137 <https://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer&component=gstreamer-vaapi>
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for GStreamer VA-API Plug-ins 1.11.2.
2 # Generated by GNU Autoconf 2.69 for GStreamer VA-API Plug-ins 1.11.90.
33 #
44 # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer>.
55 #
590590 # Identity of this package.
591591 PACKAGE_NAME='GStreamer VA-API Plug-ins'
592592 PACKAGE_TARNAME='gstreamer-vaapi'
593 PACKAGE_VERSION='1.11.2'
594 PACKAGE_STRING='GStreamer VA-API Plug-ins 1.11.2'
593 PACKAGE_VERSION='1.11.90'
594 PACKAGE_STRING='GStreamer VA-API Plug-ins 1.11.90'
595595 PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer'
596596 PACKAGE_URL=''
597597
15751575 # Omit some internal or obsolete options to make the list less imposing.
15761576 # This message is too long to be a string in the A/UX 3.1 sh.
15771577 cat <<_ACEOF
1578 \`configure' configures GStreamer VA-API Plug-ins 1.11.2 to adapt to many kinds of systems.
1578 \`configure' configures GStreamer VA-API Plug-ins 1.11.90 to adapt to many kinds of systems.
15791579
15801580 Usage: $0 [OPTION]... [VAR=VALUE]...
15811581
16471647
16481648 if test -n "$ac_init_help"; then
16491649 case $ac_init_help in
1650 short | recursive ) echo "Configuration of GStreamer VA-API Plug-ins 1.11.2:";;
1650 short | recursive ) echo "Configuration of GStreamer VA-API Plug-ins 1.11.90:";;
16511651 esac
16521652 cat <<\_ACEOF
16531653
18691869 test -n "$ac_init_help" && exit $ac_status
18701870 if $ac_init_version; then
18711871 cat <<\_ACEOF
1872 GStreamer VA-API Plug-ins configure 1.11.2
1872 GStreamer VA-API Plug-ins configure 1.11.90
18731873 generated by GNU Autoconf 2.69
18741874
18751875 Copyright (C) 2012 Free Software Foundation, Inc.
22842284 This file contains any messages produced by compilers while
22852285 running configure, to aid debugging if configure makes a mistake.
22862286
2287 It was created by GStreamer VA-API Plug-ins $as_me 1.11.2, which was
2287 It was created by GStreamer VA-API Plug-ins $as_me 1.11.90, which was
22882288 generated by GNU Autoconf 2.69. Invocation command line was
22892289
22902290 $ $0 $@
32673267
32683268 # Define the identity of the package.
32693269 PACKAGE='gstreamer-vaapi'
3270 VERSION='1.11.2'
3270 VERSION='1.11.90'
32713271
32723272
32733273 cat >>confdefs.h <<_ACEOF
34783478
34793479
34803480
3481 PACKAGE_VERSION_MAJOR=$(echo 1.11.2 | cut -d'.' -f1)
3482 PACKAGE_VERSION_MINOR=$(echo 1.11.2 | cut -d'.' -f2)
3483 PACKAGE_VERSION_MICRO=$(echo 1.11.2 | cut -d'.' -f3)
3481 PACKAGE_VERSION_MAJOR=$(echo 1.11.90 | cut -d'.' -f1)
3482 PACKAGE_VERSION_MINOR=$(echo 1.11.90 | cut -d'.' -f2)
3483 PACKAGE_VERSION_MICRO=$(echo 1.11.90 | cut -d'.' -f3)
34843484
34853485
34863486
34913491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking nano version" >&5
34923492 $as_echo_n "checking nano version... " >&6; }
34933493
3494 NANO=$(echo 1.11.2 | cut -d'.' -f4)
3494 NANO=$(echo 1.11.90 | cut -d'.' -f4)
34953495
34963496 if test x"$NANO" = x || test "x$NANO" = "x0" ; then
34973497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 0 (release)" >&5
83268326 done
83278327
83288328
8329 GST_CURRENT=1102
8329 GST_CURRENT=1190
83308330 GST_REVISION=0
8331 GST_AGE=1102
8332 GST_LIBVERSION=1102:0:1102
8331 GST_AGE=1190
8332 GST_LIBVERSION=1190:0:1190
83338333
83348334
83358335
1295812958
1295912959
1296012960 GLIB_REQ=2.40
12961 GST_REQ=1.11.2
12962 GST_PBREQ=1.11.2
12963 GST_PBADREQ=1.11.2
12961 GST_REQ=1.11.90
12962 GST_PBREQ=1.11.90
12963 GST_PBADREQ=1.11.90
1296412964 WAYLAND_REQ=1.0.2
1296512965 GTKDOC_REQ=1.12
1296612966
1714917149 HAVE_XRENDER=0
1715017150 if test $USE_X11 -eq 1; then
1715117151 HAVE_XKBLIB=1
17152 saved_CPPFLAGS="$CPPFLAGS"
17153 CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
1715217154 for ac_header in X11/XKBlib.h
1715317155 do :
1715417156 ac_fn_c_check_header_mongrel "$LINENO" "X11/XKBlib.h" "ac_cv_header_X11_XKBlib_h" "$ac_includes_default"
1716317165
1716417166 done
1716517167
17168 CPPFLAGS="$saved_CPPFLAGS"
1716617169
1716717170
1716817171 pkg_failed=no
1783017833
1783117834 saved_CPPFLAGS="$CPPFLAGS"
1783217835 saved_LIBS="$LIBS"
17836 CPPFLAGS="$CPPFLAGS $EGL_CFLAGS"
17837 LIBS="$LIBS $EGL_LIBS"
1783317838 for ac_header in EGL/egl.h
1783417839 do :
1783517840 ac_fn_c_check_header_mongrel "$LINENO" "EGL/egl.h" "ac_cv_header_EGL_egl_h" "$ac_includes_default"
1816218167 $as_echo "yes" >&6; }
1816318168
1816418169 saved_CPPFLAGS="$CPPFLAGS"
18165 CPPFLAGS="$LIBVA_DRM_CFLAGS"
18170 CPPFLAGS="$CPPFLAGS $LIBVA_DRM_CFLAGS"
1816618171 for ac_header in va/va_drm.h
1816718172 do :
1816818173 ac_fn_c_check_header_mongrel "$LINENO" "va/va_drm.h" "ac_cv_header_va_va_drm_h" "$ac_includes_default"
1865918664
1866018665 USE_ENCODERS=1
1866118666 saved_CPPFLAGS="$CPPFLAGS"
18662 CPPFLAGS="$LIBVA_CFLAGS"
18667 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
1866318668 for ac_header in va/va_enc_mpeg2.h va/va_enc_h264.h
1866418669 do :
1866518670 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1868918694 USE_VP9_ENCODER=0
1869018695
1869118696 if test $USE_ENCODERS -eq 1; then
18697 saved_CPPFLAGS="$CPPFLAGS"
18698 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
18699
1869218700 for ac_header in va/va_enc_jpeg.h
1869318701 do :
1869418702 ac_fn_c_check_header_compile "$LINENO" "va/va_enc_jpeg.h" "ac_cv_header_va_va_enc_jpeg_h" "
1871018718 $as_echo_n "(cached) " >&6
1871118719 else
1871218720
18713 saved_CPPFLAGS="$CPPFLAGS"
18714 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
1871518721 saved_LIBS="$LIBS"
1871618722 LIBS="$LIBS $LIBVA_LIBS"
1871718723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1874218748 ac_cv_have_jpeg_encoding_api="no"
1874318749 fi
1874418750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18745 CPPFLAGS="$saved_CPPFLAGS"
1874618751 LIBS="$saved_LIBS"
1874718752
1874818753 fi
1877318778 $as_echo_n "(cached) " >&6
1877418779 else
1877518780
18776 saved_CPPFLAGS="$CPPFLAGS"
18777 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
1877818781 saved_LIBS="$LIBS"
1877918782 LIBS="$LIBS $LIBVA_LIBS"
1878018783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1880518808 ac_cv_have_vp8_encoding_api="no"
1880618809 fi
1880718810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18808 CPPFLAGS="$saved_CPPFLAGS"
1880918811 LIBS="$saved_LIBS"
1881018812
1881118813 fi
1883618838 $as_echo_n "(cached) " >&6
1883718839 else
1883818840
18839 saved_CPPFLAGS="$CPPFLAGS"
18840 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
1884118841 saved_LIBS="$LIBS"
1884218842 LIBS="$LIBS $LIBVA_LIBS"
1884318843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1886918869 ac_cv_have_hevc_encoding_api="no"
1887018870 fi
1887118871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18872 CPPFLAGS="$saved_CPPFLAGS"
1887318872 LIBS="$saved_LIBS"
1887418873
1887518874 fi
1890018899 $as_echo_n "(cached) " >&6
1890118900 else
1890218901
18903 saved_CPPFLAGS="$CPPFLAGS"
18904 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
1890518902 saved_LIBS="$LIBS"
1890618903 LIBS="$LIBS $LIBVA_LIBS"
1890718904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893318930 ac_cv_have_vp9_encoding_api="no"
1893418931 fi
1893518932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18936 CPPFLAGS="$saved_CPPFLAGS"
1893718933 LIBS="$saved_LIBS"
1893818934
1893918935 fi
1894218938 if test "x$ac_cv_have_vp9_encoding_api" = "xyes"; then :
1894318939 USE_VP9_ENCODER=1
1894418940 fi
18941
18942 CPPFLAGS="$saved_CPPFLAGS"
1894518943 fi
1894618944
1894718945 if test $USE_WAYLAND -eq 1; then
2031920317 # report actual input values of CONFIG_FILES etc. instead of their
2032020318 # values after options handling.
2032120319 ac_log="
20322 This file was extended by GStreamer VA-API Plug-ins $as_me 1.11.2, which was
20320 This file was extended by GStreamer VA-API Plug-ins $as_me 1.11.90, which was
2032320321 generated by GNU Autoconf 2.69. Invocation command line was
2032420322
2032520323 CONFIG_FILES = $CONFIG_FILES
2038520383 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2038620384 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
2038720385 ac_cs_version="\\
20388 GStreamer VA-API Plug-ins config.status 1.11.2
20386 GStreamer VA-API Plug-ins config.status 1.11.90
2038920387 configured by $0, generated by GNU Autoconf 2.69,
2039020388 with options \\"\$ac_cs_config\\"
2039120389
00 # gstreamer-vaapi package version number
11 m4_define([gst_vaapi_major_version], [1])
22 m4_define([gst_vaapi_minor_version], [11])
3 m4_define([gst_vaapi_micro_version], [2])
3 m4_define([gst_vaapi_micro_version], [90])
44 m4_define([gst_vaapi_nano_version], [0])
55 m4_define([gst_vaapi_version],
66 [gst_vaapi_major_version.gst_vaapi_minor_version.gst_vaapi_micro_version])
1515 dnl - interfaces added -> increment AGE
1616 dnl - interfaces removed -> AGE = 0
1717 # gstreamer-vaapi library (libtool) version number
18 m4_define([gst_vaapi_lt_current], [1102])
18 m4_define([gst_vaapi_lt_current], [1190])
1919 m4_define([gst_vaapi_lt_revision], [0])
20 m4_define([gst_vaapi_lt_age], [1102])
20 m4_define([gst_vaapi_lt_age], [1190])
2121
2222 # glib version number
2323 m4_define([glib_version], [2.40])
2424
2525 # gstreamer version number
26 m4_define([gst_version], [1.11.2])
27 m4_define([gst_plugins_base_version], [1.11.2])
28 m4_define([gst_plugins_bad_version], [1.11.2])
26 m4_define([gst_version], [1.11.90])
27 m4_define([gst_plugins_base_version], [1.11.90])
28 m4_define([gst_plugins_bad_version], [1.11.90])
2929
3030 # Wayland minimum version number
3131 m4_define([wayland_api_version], [1.0.2])
325325 if test $USE_X11 -eq 1; then
326326 dnl Check for XKB library
327327 HAVE_XKBLIB=1
328 saved_CPPFLAGS="$CPPFLAGS"
329 CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
328330 AC_CHECK_HEADERS([X11/XKBlib.h], [], [HAVE_XKBLIB=0])
331 CPPFLAGS="$saved_CPPFLAGS"
329332
330333 dnl Check for XRandR
331334 PKG_CHECK_MODULES([XRANDR], [xrandr],
453456
454457 saved_CPPFLAGS="$CPPFLAGS"
455458 saved_LIBS="$LIBS"
459 CPPFLAGS="$CPPFLAGS $EGL_CFLAGS"
460 LIBS="$LIBS $EGL_LIBS"
456461 AC_CHECK_HEADERS([EGL/egl.h], [], [USE_EGL=0])
457462 AC_CHECK_LIB([EGL], [eglGetDisplay], [], [USE_EGL=0])
458463 CPPFLAGS="$saved_CPPFLAGS"
489494 PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm >= $VAAPI_DRM_REQ],
490495 [
491496 saved_CPPFLAGS="$CPPFLAGS"
492 CPPFLAGS="$LIBVA_DRM_CFLAGS"
497 CPPFLAGS="$CPPFLAGS $LIBVA_DRM_CFLAGS"
493498 AC_CHECK_HEADERS([va/va_drm.h], [], [USE_DRM=0])
494499 CPPFLAGS="$saved_CPPFLAGS"
495500 ], [USE_DRM=0])
707712 [
708713 USE_ENCODERS=1
709714 saved_CPPFLAGS="$CPPFLAGS"
710 CPPFLAGS="$LIBVA_CFLAGS"
715 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
711716 AC_CHECK_HEADERS([va/va_enc_mpeg2.h va/va_enc_h264.h], [],
712717 [USE_ENCODERS=0],
713718 [
723728 USE_VP9_ENCODER=0
724729
725730 if test $USE_ENCODERS -eq 1; then
731 saved_CPPFLAGS="$CPPFLAGS"
732 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
733
726734 dnl Check for JPEG Encoding API (0.37.0+)
727735 AC_CHECK_HEADERS([va/va_enc_jpeg.h], [], [],
728736 [
731739 AC_CACHE_CHECK([for JPEG encoding API],
732740 [ac_cv_have_jpeg_encoding_api],
733741 [
734 saved_CPPFLAGS="$CPPFLAGS"
735 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
736742 saved_LIBS="$LIBS"
737743 LIBS="$LIBS $LIBVA_LIBS"
738744 AC_COMPILE_IFELSE(
752758 ],
753759 [ac_cv_have_jpeg_encoding_api="yes"],
754760 [ac_cv_have_jpeg_encoding_api="no"])
755 CPPFLAGS="$saved_CPPFLAGS"
756761 LIBS="$saved_LIBS"
757762 ])
758763 AS_IF([test "x$ac_cv_have_jpeg_encoding_api" = "xyes"], [USE_JPEG_ENCODER=1])
765770 AC_CACHE_CHECK([for VP8 encoding API],
766771 [ac_cv_have_vp8_encoding_api],
767772 [
768 saved_CPPFLAGS="$CPPFLAGS"
769 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
770773 saved_LIBS="$LIBS"
771774 LIBS="$LIBS $LIBVA_LIBS"
772775 AC_COMPILE_IFELSE(
786789 ],
787790 [ac_cv_have_vp8_encoding_api="yes"],
788791 [ac_cv_have_vp8_encoding_api="no"])
789 CPPFLAGS="$saved_CPPFLAGS"
790792 LIBS="$saved_LIBS"
791793 ])
792794 AS_IF([test "x$ac_cv_have_vp8_encoding_api" = "xyes"], [USE_VP8_ENCODER=1])
799801 AC_CACHE_CHECK([for HEVC encoding API],
800802 [ac_cv_have_hevc_encoding_api],
801803 [
802 saved_CPPFLAGS="$CPPFLAGS"
803 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
804804 saved_LIBS="$LIBS"
805805 LIBS="$LIBS $LIBVA_LIBS"
806806 AC_COMPILE_IFELSE(
821821 ],
822822 [ac_cv_have_hevc_encoding_api="yes"],
823823 [ac_cv_have_hevc_encoding_api="no"])
824 CPPFLAGS="$saved_CPPFLAGS"
825824 LIBS="$saved_LIBS"
826825 ])
827826 AS_IF([test "x$ac_cv_have_hevc_encoding_api" = "xyes"], [USE_H265_ENCODER=1])
834833 AC_CACHE_CHECK([for VP9 encoding API],
835834 [ac_cv_have_vp9_encoding_api],
836835 [
837 saved_CPPFLAGS="$CPPFLAGS"
838 CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
839836 saved_LIBS="$LIBS"
840837 LIBS="$LIBS $LIBVA_LIBS"
841838 AC_COMPILE_IFELSE(
856853 ],
857854 [ac_cv_have_vp9_encoding_api="yes"],
858855 [ac_cv_have_vp9_encoding_api="no"])
859 CPPFLAGS="$saved_CPPFLAGS"
860856 LIBS="$saved_LIBS"
861857 ])
862858 AS_IF([test "x$ac_cv_have_vp9_encoding_api" = "xyes"], [USE_VP9_ENCODER=1])
859
860 CPPFLAGS="$saved_CPPFLAGS"
863861 fi
864862
865863 dnl VA/Wayland API
2424 <a name="api-index-full"></a>API Index</h1></div></div></div>
2525 <a name="idx"></a><a name="idx"></a><h3 class="title"></h3>
2626 <dt>
27 <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html#GstVaapiEncodeH264--max-bframes" title="The “max-bframes” property">GstVaapiEncodeH264:max-bframes</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html" title="vaapih264enc">vaapih264enc</a>
28 </dt>
29 <dd></dd>
30 <a name="idxG"></a><h3 class="title">G</h3>
31 <dt>
32 <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html#GstVaapiDecodeBin--deinterlace-method" title="The “deinterlace-method” property">GstVaapiDecodeBin:deinterlace-method</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html" title="vaapidecodebin">vaapidecodebin</a>
33 </dt>
34 <dd></dd>
35 <dt>
36 <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html#GstVaapiDecodeBin--disable-vpp" title="The “disable-vpp” property">GstVaapiDecodeBin:disable-vpp</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html" title="vaapidecodebin">vaapidecodebin</a>
37 </dt>
38 <dd></dd>
39 <dt>
40 <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html#GstVaapiDecodeBin--max-size-buffers" title="The “max-size-buffers” property">GstVaapiDecodeBin:max-size-buffers</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html" title="vaapidecodebin">vaapidecodebin</a>
41 </dt>
42 <dd></dd>
43 <dt>
44 <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html#GstVaapiDecodeBin--max-size-bytes" title="The “max-size-bytes” property">GstVaapiDecodeBin:max-size-bytes</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html" title="vaapidecodebin">vaapidecodebin</a>
45 </dt>
46 <dd></dd>
47 <dt>
48 <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html#GstVaapiDecodeBin--max-size-time" title="The “max-size-time” property">GstVaapiDecodeBin:max-size-time</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html" title="vaapidecodebin">vaapidecodebin</a>
49 </dt>
50 <dd></dd>
51 <dt>
52 <a class="link" href="gstreamer-vaapi-plugins-vaapipostproc.html#GstVaapiDeinterlaceMode" title="enum GstVaapiDeinterlaceMode">GstVaapiDeinterlaceMode</a>, enum in <a class="link" href="gstreamer-vaapi-plugins-vaapipostproc.html" title="vaapipostproc">vaapipostproc</a>
53 </dt>
54 <dd></dd>
55 <dt>
56 <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html#GstVaapiEncodeH264--bitrate" title="The “bitrate” property">GstVaapiEncodeH264:bitrate</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html" title="vaapih264enc">vaapih264enc</a>
57 </dt>
58 <dd></dd>
59 <dt>
60 <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html#GstVaapiEncodeH264--cabac" title="The “cabac” property">GstVaapiEncodeH264:cabac</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html" title="vaapih264enc">vaapih264enc</a>
61 </dt>
62 <dd></dd>
63 <dt>
2764 <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html#GstVaapiEncodeH264--cpb-length" title="The “cpb-length” property">GstVaapiEncodeH264:cpb-length</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html" title="vaapih264enc">vaapih264enc</a>
2865 </dt>
2966 <dd></dd>
30 <a name="idxG"></a><h3 class="title">G</h3>
31 <dt>
32 <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html#GstVaapiDecodeBin--deinterlace-method" title="The “deinterlace-method” property">GstVaapiDecodeBin:deinterlace-method</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html" title="vaapidecodebin">vaapidecodebin</a>
33 </dt>
34 <dd></dd>
35 <dt>
36 <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html#GstVaapiDecodeBin--disable-vpp" title="The “disable-vpp” property">GstVaapiDecodeBin:disable-vpp</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html" title="vaapidecodebin">vaapidecodebin</a>
37 </dt>
38 <dd></dd>
39 <dt>
40 <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html#GstVaapiDecodeBin--max-size-buffers" title="The “max-size-buffers” property">GstVaapiDecodeBin:max-size-buffers</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html" title="vaapidecodebin">vaapidecodebin</a>
41 </dt>
42 <dd></dd>
43 <dt>
44 <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html#GstVaapiDecodeBin--max-size-bytes" title="The “max-size-bytes” property">GstVaapiDecodeBin:max-size-bytes</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html" title="vaapidecodebin">vaapidecodebin</a>
45 </dt>
46 <dd></dd>
47 <dt>
48 <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html#GstVaapiDecodeBin--max-size-time" title="The “max-size-time” property">GstVaapiDecodeBin:max-size-time</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapidecodebin.html" title="vaapidecodebin">vaapidecodebin</a>
49 </dt>
50 <dd></dd>
51 <dt>
52 <a class="link" href="gstreamer-vaapi-plugins-vaapipostproc.html#GstVaapiDeinterlaceMode" title="enum GstVaapiDeinterlaceMode">GstVaapiDeinterlaceMode</a>, enum in <a class="link" href="gstreamer-vaapi-plugins-vaapipostproc.html" title="vaapipostproc">vaapipostproc</a>
53 </dt>
54 <dd></dd>
55 <dt>
56 <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html#GstVaapiEncodeH264--bitrate" title="The “bitrate” property">GstVaapiEncodeH264:bitrate</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html" title="vaapih264enc">vaapih264enc</a>
57 </dt>
58 <dd></dd>
59 <dt>
60 <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html#GstVaapiEncodeH264--cabac" title="The “cabac” property">GstVaapiEncodeH264:cabac</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html" title="vaapih264enc">vaapih264enc</a>
61 </dt>
62 <dd></dd>
6367 <dt>
6468 <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html#GstVaapiEncodeH264--dct8x8" title="The “dct8x8” property">GstVaapiEncodeH264:dct8x8</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html" title="vaapih264enc">vaapih264enc</a>
6569 </dt>
7074 <dd></dd>
7175 <dt>
7276 <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html#GstVaapiEncodeH264--keyframe-period" title="The “keyframe-period” property">GstVaapiEncodeH264:keyframe-period</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html" title="vaapih264enc">vaapih264enc</a>
73 </dt>
74 <dd></dd>
75 <dt>
76 <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html#GstVaapiEncodeH264--max-bframes" title="The “max-bframes” property">GstVaapiEncodeH264:max-bframes</a>, object property in <a class="link" href="gstreamer-vaapi-plugins-vaapih264enc.html" title="vaapih264enc">vaapih264enc</a>
7777 </dt>
7878 <dd></dd>
7979 <dt>
4141 </tr>
4242 <tr>
4343 <td><p><span class="term">version</span></p></td>
44 <td>1.11.2</td>
44 <td>1.11.90</td>
4545 </tr>
4646 <tr>
4747 <td><p><span class="term">run-time license</span></p></td>
219219 </tr>
220220 <tr>
221221 <td><p><span class="term"></span></p></td>
222 <td> video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, VYUY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</td>
222 <td> video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</td>
223223 </tr>
224224 </tbody>
225225 </table></div>
131131 <tbody>
132132 <tr>
133133 <td class="listing_lines" align="right"><pre>1</pre></td>
134 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>ev videotestsrc num<span class="gtkdoc opt">-</span>buffers<span class="gtkdoc opt">=</span><span class="number">60</span> <span class="gtkdoc opt">!</span> timeoverlay <span class="gtkdoc opt">!</span> vaapih264enc <span class="gtkdoc opt">!</span> mp4mux <span class="gtkdoc opt">!</span> filesink location<span class="gtkdoc opt">=</span>test<span class="gtkdoc opt">.</span>mp4</pre></td>
134 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>ev videotestsrc num<span class="gtkdoc opt">-</span>buffers<span class="gtkdoc opt">=</span><span class="number">60</span> <span class="gtkdoc opt">!</span> timeoverlay <span class="gtkdoc opt">!</span> vaapih264enc <span class="gtkdoc opt">!</span> h264parse <span class="gtkdoc opt">!</span> mp4mux <span class="gtkdoc opt">!</span> filesink location<span class="gtkdoc opt">=</span>test<span class="gtkdoc opt">.</span>mp4</pre></td>
135135 </tr>
136136 </tbody>
137137 </table>
192192 </tr>
193193 <tr>
194194 <td><p><span class="term"></span></p></td>
195 <td> video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, VYUY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</td>
195 <td> video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</td>
196196 </tr>
197197 </tbody>
198198 </table></div>
9898 <tbody>
9999 <tr>
100100 <td class="listing_lines" align="right"><pre>1</pre></td>
101 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>ev videotestsrc num<span class="gtkdoc opt">-</span>buffers<span class="gtkdoc opt">=</span><span class="number">60</span> <span class="gtkdoc opt">!</span> timeoverlay <span class="gtkdoc opt">!</span> vaapih265enc <span class="gtkdoc opt">!</span> matroskamux <span class="gtkdoc opt">!</span> filesink location<span class="gtkdoc opt">=</span>test<span class="gtkdoc opt">.</span>mkv</pre></td>
101 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> <span class="gtkdoc opt">-</span>ev videotestsrc num<span class="gtkdoc opt">-</span>buffers<span class="gtkdoc opt">=</span><span class="number">60</span> <span class="gtkdoc opt">!</span> timeoverlay <span class="gtkdoc opt">!</span> vaapih265enc <span class="gtkdoc opt">!</span> h265parse <span class="gtkdoc opt">!</span> matroskamux <span class="gtkdoc opt">!</span> filesink location<span class="gtkdoc opt">=</span>test<span class="gtkdoc opt">.</span>mkv</pre></td>
102102 </tr>
103103 </tbody>
104104 </table>
156156 </tr>
157157 <tr>
158158 <td><p><span class="term"></span></p></td>
159 <td> video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, VYUY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</td>
159 <td> video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</td>
160160 </tr>
161161 </tbody>
162162 </table></div>
209209 </tr>
210210 <tr>
211211 <td><p><span class="term"></span></p></td>
212 <td> video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, VYUY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }</td>
212 <td> video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }</td>
213213 </tr>
214214 </tbody>
215215 </table></div>
241241 </tr>
242242 <tr>
243243 <td><p><span class="term"></span></p></td>
244 <td> video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, VYUY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }</td>
244 <td> video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }</td>
245245 </tr>
246246 </tbody>
247247 </table></div>
204204 </tr>
205205 <tr>
206206 <td><p><span class="term"></span></p></td>
207 <td> video/x-raw(meta:GstVideoOverlayComposition), format=(string){ I420, YV12, YUY2, UYVY, VYUY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
207 <td> video/x-raw(meta:GstVideoOverlayComposition), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
208208 </tr>
209209 <tr>
210210 <td><p><span class="term"></span></p></td>
211 <td> video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, VYUY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
211 <td> video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td>
212212 </tr>
213213 </tbody>
214214 </table></div>
22 <description>VA-API based elements</description>
33 <filename>../../gst/vaapi/.libs/libgstvaapi.so</filename>
44 <basename>libgstvaapi.so</basename>
5 <version>1.11.2</version>
5 <version>1.11.90</version>
66 <license>LGPL</license>
77 <source>gstreamer-vaapi</source>
88 <package>gstreamer-vaapi</package>
2525 <name>src</name>
2626 <direction>source</direction>
2727 <presence>always</presence>
28 <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, VYUY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</details>
28 <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</details>
2929 </caps>
3030 </pads>
3131 </element>
6161 <name>sink</name>
6262 <direction>sink</direction>
6363 <presence>always</presence>
64 <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, VYUY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</details>
64 <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</details>
6565 </caps>
6666 <caps>
6767 <name>src</name>
124124 <name>sink</name>
125125 <direction>sink</direction>
126126 <presence>always</presence>
127 <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, VYUY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</details>
127 <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive</details>
128128 </caps>
129129 <caps>
130130 <name>src</name>
145145 <name>sink</name>
146146 <direction>sink</direction>
147147 <presence>always</presence>
148 <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, VYUY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }</details>
148 <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }</details>
149149 </caps>
150150 <caps>
151151 <name>src</name>
152152 <direction>source</direction>
153153 <presence>always</presence>
154 <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, VYUY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }</details>
154 <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string)progressive; video/x-raw(meta:GstVideoGLTextureUploadMeta), format=(string){ RGBA, BGRA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], interlace-mode=(string){ progressive, interleaved, mixed }</details>
155155 </caps>
156156 </pads>
157157 </element>
166166 <name>sink</name>
167167 <direction>sink</direction>
168168 <presence>always</presence>
169 <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:VASurface, meta:GstVideoOverlayComposition), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoOverlayComposition), format=(string){ I420, YV12, YUY2, UYVY, VYUY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, VYUY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV61, NV24, GRAY8, GRAY16_BE, GRAY16_LE, v308, IYU2, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE, NV12_64Z32, A420_10LE, A420_10BE, A422_10LE, A422_10BE, A444_10LE, A444_10BE, P010_10LE, P010_10BE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
169 <details>video/x-raw(memory:VASurface), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(memory:VASurface, meta:GstVideoOverlayComposition), format=(string){ ENCODED, NV12, I420, YV12, P010_10LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw(meta:GstVideoOverlayComposition), format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</details>
170170 </caps>
171171 </pads>
172172 </element>
4848 #define GST_VAAPI_DECODE_FLOW_PARSE_DATA GST_FLOW_CUSTOM_SUCCESS_2
4949
5050 GST_DEBUG_CATEGORY_STATIC (gst_debug_vaapidecode);
51 #ifndef GST_DISABLE_GST_DEBUG
5152 #define GST_CAT_DEFAULT gst_debug_vaapidecode
53 #else
54 #define GST_CAT_DEFAULT NULL
55 #endif
5256
5357 #define GST_VAAPI_DECODE_PARAMS_QDATA \
5458 g_quark_from_static_string("vaapidec-params")
218222 return FALSE;
219223 }
220224 #if (USE_GLX || USE_EGL)
221 if (!GST_VAAPI_PLUGIN_BASE_SRC_PAD_CAN_DMABUF (decode)) {
225 if (!GST_VAAPI_PLUGIN_BASE_SRC_PAD_CAN_DMABUF (decode) &&
226 gst_vaapi_display_has_opengl (GST_VAAPI_PLUGIN_BASE_DISPLAY (decode))) {
222227 out_caps = gst_caps_make_writable (out_caps);
223228 gst_caps_append (out_caps,
224229 gst_caps_from_string (GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS));
3737 #define GST_VAAPI_ENCODE_FLOW_CONVERT_ERROR GST_FLOW_CUSTOM_ERROR_1
3838
3939 GST_DEBUG_CATEGORY_STATIC (gst_vaapiencode_debug);
40 #ifndef GST_DISABLE_GST_DEBUG
4041 #define GST_CAT_DEFAULT gst_vaapiencode_debug
42 #else
43 #define GST_CAT_DEFAULT NULL
44 #endif
4145
4246 G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstVaapiEncode,
4347 gst_vaapiencode, GST_TYPE_VIDEO_ENCODER,
344348 static gboolean
345349 ensure_allowed_sinkpad_caps (GstVaapiEncode * encode)
346350 {
351 GstVaapiEncodeClass *klass = GST_VAAPIENCODE_GET_CLASS (encode);
347352 GstCaps *out_caps, *raw_caps = NULL;
348353 GArray *formats = NULL;
349354 gboolean ret = FALSE;
355 GstVaapiProfile profile = GST_VAAPI_PROFILE_UNKNOWN;
350356
351357 if (encode->allowed_sinkpad_caps)
352358 return TRUE;
357363 if (!out_caps)
358364 goto failed_create_va_caps;
359365
360 formats = gst_vaapi_encoder_get_surface_formats (encode->encoder);
366 if (klass->get_profile) {
367 GstCaps *allowed =
368 gst_pad_get_allowed_caps (GST_VAAPI_PLUGIN_BASE_SRC_PAD (encode));
369 if (allowed) {
370 if (!gst_caps_is_empty (allowed) && !gst_caps_is_any (allowed))
371 profile = klass->get_profile (allowed);
372 gst_caps_unref (allowed);
373 }
374 }
375
376 formats = gst_vaapi_encoder_get_surface_formats (encode->encoder, profile);
361377 if (!formats)
362378 goto failed_get_formats;
363379
368384 out_caps = gst_caps_make_writable (out_caps);
369385 gst_caps_append (out_caps, gst_caps_copy (raw_caps));
370386 gst_caps_replace (&encode->allowed_sinkpad_caps, out_caps);
387 GST_INFO_OBJECT (encode, "Allowed sink caps %" GST_PTR_FORMAT,
388 encode->allowed_sinkpad_caps);
389
371390 ret = TRUE;
372391
373392 bail:
406425 result = gst_video_encoder_proxy_getcaps (venc, encode->allowed_sinkpad_caps,
407426 filter);
408427
409 GST_DEBUG_OBJECT (venc, "Returning sink caps %" GST_PTR_FORMAT, result);
428 GST_DEBUG_OBJECT (venc, "Negotiated sink caps %" GST_PTR_FORMAT, result);
410429 return result;
411430 }
412431
7979 GstFlowReturn (*alloc_buffer) (GstVaapiEncode * encode,
8080 GstVaapiCodedBuffer * coded_buf,
8181 GstBuffer ** outbuf_ptr);
82 GstVaapiProfile (*get_profile) (GstCaps * caps);
8283 };
8384
8485 GType
2929 * <refsect2>
3030 * <title>Example launch line</title>
3131 * |[
32 * gst-launch-1.0 -ev videotestsrc num-buffers=60 ! timeoverlay ! vaapih264enc ! mp4mux ! filesink location=test.mp4
32 * gst-launch-1.0 -ev videotestsrc num-buffers=60 ! timeoverlay ! vaapih264enc ! h264parse ! mp4mux ! filesink location=test.mp4
3333 * ]|
3434 * </refsect2>
3535 */
126126 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
127127 break;
128128 }
129 }
130
131 static GstVaapiProfile
132 gst_vaapiencode_h264_get_profile (GstCaps * caps)
133 {
134 guint i;
135
136 for (i = 0; i < gst_caps_get_size (caps); i++) {
137 GstStructure *const structure = gst_caps_get_structure (caps, i);
138 const GValue *const value = gst_structure_get_value (structure, "profile");
139
140 if (value && G_VALUE_HOLDS_STRING (value)) {
141 const gchar *str = g_value_get_string (value);
142 if (str)
143 return gst_vaapi_utils_h264_get_profile_from_string (str);
144 }
145 }
146
147 return GST_VAAPI_PROFILE_UNKNOWN;
129148 }
130149
131150 typedef struct
396415 object_class->get_property = gst_vaapiencode_h264_get_property;
397416
398417 encode_class->get_properties = gst_vaapi_encoder_h264_get_default_properties;
418 encode_class->get_profile = gst_vaapiencode_h264_get_profile;
399419 encode_class->set_config = gst_vaapiencode_h264_set_config;
400420 encode_class->get_caps = gst_vaapiencode_h264_get_caps;
401421 encode_class->alloc_encoder = gst_vaapiencode_h264_alloc_encoder;
2828 * <refsect2>
2929 * <title>Example launch line</title>
3030 * |[
31 * gst-launch-1.0 -ev videotestsrc num-buffers=60 ! timeoverlay ! vaapih265enc ! matroskamux ! filesink location=test.mkv
31 * gst-launch-1.0 -ev videotestsrc num-buffers=60 ! timeoverlay ! vaapih265enc ! h265parse ! matroskamux ! filesink location=test.mkv
3232 * ]|
3333 * </refsect2>
3434 */
6363 /* *INDENT-OFF* */
6464 static const char gst_vaapiencode_h265_src_caps_str[] =
6565 GST_CODEC_CAPS ", "
66 "profile = (string) { main }";
66 "profile = (string) { main, main-10 }";
6767 /* *INDENT-ON* */
6868
6969 /* *INDENT-OFF* */
125125 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
126126 break;
127127 }
128 }
129
130 static GstVaapiProfile
131 gst_vaapiencode_h265_get_profile (GstCaps * caps)
132 {
133 guint i;
134
135 for (i = 0; i < gst_caps_get_size (caps); i++) {
136 GstStructure *const structure = gst_caps_get_structure (caps, i);
137 const GValue *const value = gst_structure_get_value (structure, "profile");
138
139 if (value && G_VALUE_HOLDS_STRING (value)) {
140 const gchar *str = g_value_get_string (value);
141 if (str)
142 return gst_vaapi_utils_h265_get_profile_from_string (str);
143 }
144 }
145
146 return GST_VAAPI_PROFILE_UNKNOWN;
128147 }
129148
130149 typedef struct
395414 object_class->get_property = gst_vaapiencode_h265_get_property;
396415
397416 encode_class->get_properties = gst_vaapi_encoder_h265_get_default_properties;
417 encode_class->get_profile = gst_vaapiencode_h265_get_profile;
398418 encode_class->set_config = gst_vaapiencode_h265_set_config;
399419 encode_class->get_caps = gst_vaapiencode_h265_get_caps;
400420 encode_class->alloc_encoder = gst_vaapiencode_h265_alloc_encoder;
267267 gst_vaapi_ensure_display (GstElement * element, GstVaapiDisplayType type)
268268 {
269269 GstVaapiPluginBase *const plugin = GST_VAAPI_PLUGIN_BASE (element);
270 GstVaapiDisplay *display;
270 GstVaapiDisplay *display = NULL;
271271
272272 g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
273273
283283 gst_vaapi_find_gl_context (element);
284284
285285 /* If no neighboor, or application not interested, use system default */
286 if (plugin->gl_context)
286 if (plugin->gl_context) {
287287 display = gst_vaapi_create_display_from_gl_context (plugin->gl_context);
288 else
288 /* Cannot instantiate VA display based on GL context. Reset the
289 * requested display type to ANY to try again */
290 if (!display)
291 gst_vaapi_plugin_base_set_display_type (plugin,
292 GST_VAAPI_DISPLAY_TYPE_ANY);
293 }
294 if (!display)
289295 display = gst_vaapi_create_display (type, plugin->display_name);
290296 if (!display)
291297 return FALSE;
4848 #define GST_PLUGIN_DESC "A VA-API video postprocessing filter"
4949
5050 GST_DEBUG_CATEGORY_STATIC (gst_debug_vaapipostproc);
51 #ifndef GST_DISABLE_GST_DEBUG
5152 #define GST_CAT_DEFAULT gst_debug_vaapipostproc
53 #else
54 #define GST_CAT_DEFAULT NULL
55 #endif
5256
5357 /* Default templates */
5458 /* *INDENT-OFF* */
10641068 }
10651069 g_value_unset (&value);
10661070
1067 if (GST_VAAPI_PLUGIN_BASE_SRC_PAD_CAN_DMABUF (postproc)
1071 if ((GST_VAAPI_PLUGIN_BASE_SRC_PAD_CAN_DMABUF (postproc)
1072 || !gst_vaapi_display_has_opengl (GST_VAAPI_PLUGIN_BASE_DISPLAY
1073 (postproc)))
10681074 && gl_upload_meta_idx > -1) {
10691075 gst_caps_remove_structure (caps, gl_upload_meta_idx);
10701076 }
5858 #define GST_PLUGIN_DESC "A VA-API based videosink"
5959
6060 GST_DEBUG_CATEGORY_STATIC (gst_debug_vaapisink);
61 #ifndef GST_DISABLE_GST_DEBUG
6162 #define GST_CAT_DEFAULT gst_debug_vaapisink
63 #else
64 #define GST_CAT_DEFAULT NULL
65 #endif
6266
6367 /* Default template */
6468 /* *INDENT-OFF* */
7777 gstvaapiutils_core.c \
7878 gstvaapiutils_h264.c \
7979 gstvaapiutils_h265.c \
80 gstvaapiutils_h26x.c \
8081 gstvaapiutils_mpeg2.c \
8182 gstvaapivalue.c \
8283 gstvaapivideopool.c \
141142 gstvaapiutils_core.h \
142143 gstvaapiutils_h264_priv.h \
143144 gstvaapiutils_h265_priv.h \
145 gstvaapiutils_h26x_priv.h \
144146 gstvaapiutils_mpeg2_priv.h \
145147 gstvaapivideopool_priv.h \
146148 gstvaapiwindow_priv.h \
242242 gstvaapisurface.c gstvaapisurface_drm.c gstvaapisurfacepool.c \
243243 gstvaapisurfaceproxy.c gstvaapitexture.c gstvaapitexturemap.c \
244244 gstvaapiutils.c gstvaapiutils_core.c gstvaapiutils_h264.c \
245 gstvaapiutils_h265.c gstvaapiutils_mpeg2.c gstvaapivalue.c \
246 gstvaapivideopool.c gstvaapiwindow.c video-format.c \
247 gstvaapidecoder_jpeg.c gstvaapidecoder_vp8.c \
248 gstvaapidecoder_h265.c gstvaapidecoder_vp9.c \
249 gstvaapicodedbuffer.c gstvaapicodedbufferpool.c \
250 gstvaapicodedbufferproxy.c gstvaapiencoder.c \
251 gstvaapiencoder_h264.c gstvaapiencoder_mpeg2.c \
252 gstvaapiencoder_objects.c gstvaapiencoder_jpeg.c \
253 gstvaapiencoder_vp8.c gstvaapiencoder_h265.c \
254 gstvaapiencoder_vp9.c gstvaapibufferproxy_priv.h \
255 gstvaapicodec_objects.h gstvaapicompat.h gstvaapicontext.h \
256 gstvaapicontext_overlay.h gstvaapidebug.h \
257 gstvaapidecoder_dpb.h gstvaapidecoder_objects.h \
258 gstvaapidecoder_priv.h gstvaapidecoder_unit.h \
259 gstvaapidisplay_priv.h gstvaapidisplaycache.h \
260 gstvaapiimage_priv.h gstvaapiminiobject.h \
261 gstvaapiobject_priv.h gstvaapiparser_frame.h \
262 gstvaapipixmap_priv.h gstvaapisurface_priv.h \
263 gstvaapisurfaceproxy_priv.h gstvaapitexture_priv.h \
264 gstvaapiutils.h gstvaapiutils_core.h gstvaapiutils_h264_priv.h \
265 gstvaapiutils_h265_priv.h gstvaapiutils_mpeg2_priv.h \
245 gstvaapiutils_h265.c gstvaapiutils_h26x.c \
246 gstvaapiutils_mpeg2.c gstvaapivalue.c gstvaapivideopool.c \
247 gstvaapiwindow.c video-format.c gstvaapidecoder_jpeg.c \
248 gstvaapidecoder_vp8.c gstvaapidecoder_h265.c \
249 gstvaapidecoder_vp9.c gstvaapicodedbuffer.c \
250 gstvaapicodedbufferpool.c gstvaapicodedbufferproxy.c \
251 gstvaapiencoder.c gstvaapiencoder_h264.c \
252 gstvaapiencoder_mpeg2.c gstvaapiencoder_objects.c \
253 gstvaapiencoder_jpeg.c gstvaapiencoder_vp8.c \
254 gstvaapiencoder_h265.c gstvaapiencoder_vp9.c \
255 gstvaapibufferproxy_priv.h gstvaapicodec_objects.h \
256 gstvaapicompat.h gstvaapicontext.h gstvaapicontext_overlay.h \
257 gstvaapidebug.h gstvaapidecoder_dpb.h \
258 gstvaapidecoder_objects.h gstvaapidecoder_priv.h \
259 gstvaapidecoder_unit.h gstvaapidisplay_priv.h \
260 gstvaapidisplaycache.h gstvaapiimage_priv.h \
261 gstvaapiminiobject.h gstvaapiobject_priv.h \
262 gstvaapiparser_frame.h gstvaapipixmap_priv.h \
263 gstvaapisurface_priv.h gstvaapisurfaceproxy_priv.h \
264 gstvaapitexture_priv.h gstvaapiutils.h gstvaapiutils_core.h \
265 gstvaapiutils_h264_priv.h gstvaapiutils_h265_priv.h \
266 gstvaapiutils_h26x_priv.h gstvaapiutils_mpeg2_priv.h \
266267 gstvaapivideopool_priv.h gstvaapiwindow_priv.h \
267268 gstvaapiworkarounds.h libgstvaapi_priv_check.h sysdeps.h \
268269 gstvaapicodedbuffer_priv.h gstvaapicodedbufferproxy_priv.h \
341342 libgstvaapi_la-gstvaapiutils_core.lo \
342343 libgstvaapi_la-gstvaapiutils_h264.lo \
343344 libgstvaapi_la-gstvaapiutils_h265.lo \
345 libgstvaapi_la-gstvaapiutils_h26x.lo \
344346 libgstvaapi_la-gstvaapiutils_mpeg2.lo \
345347 libgstvaapi_la-gstvaapivalue.lo \
346348 libgstvaapi_la-gstvaapivideopool.lo \
695697 gstvaapisurface.c gstvaapisurface_drm.c gstvaapisurfacepool.c \
696698 gstvaapisurfaceproxy.c gstvaapitexture.c gstvaapitexturemap.c \
697699 gstvaapiutils.c gstvaapiutils_core.c gstvaapiutils_h264.c \
698 gstvaapiutils_h265.c gstvaapiutils_mpeg2.c gstvaapivalue.c \
699 gstvaapivideopool.c gstvaapiwindow.c video-format.c $(NULL) \
700 $(am__append_6) $(am__append_8) $(am__append_10) \
701 $(am__append_12) $(am__append_14) $(am__append_17) \
702 $(am__append_19) $(am__append_21) $(am__append_23)
700 gstvaapiutils_h265.c gstvaapiutils_h26x.c \
701 gstvaapiutils_mpeg2.c gstvaapivalue.c gstvaapivideopool.c \
702 gstvaapiwindow.c video-format.c $(NULL) $(am__append_6) \
703 $(am__append_8) $(am__append_10) $(am__append_12) \
704 $(am__append_14) $(am__append_17) $(am__append_19) \
705 $(am__append_21) $(am__append_23)
703706 libgstvaapi_source_h = gstvaapibufferproxy.h gstvaapidecoder.h \
704707 gstvaapidecoder_h264.h gstvaapidecoder_h265.h \
705708 gstvaapidecoder_mpeg2.h gstvaapidecoder_mpeg4.h \
725728 gstvaapipixmap_priv.h gstvaapisurface_priv.h \
726729 gstvaapisurfaceproxy_priv.h gstvaapitexture_priv.h \
727730 gstvaapiutils.h gstvaapiutils_core.h gstvaapiutils_h264_priv.h \
728 gstvaapiutils_h265_priv.h gstvaapiutils_mpeg2_priv.h \
729 gstvaapivideopool_priv.h gstvaapiwindow_priv.h \
730 gstvaapiworkarounds.h libgstvaapi_priv_check.h sysdeps.h \
731 $(NULL) $(am__append_16)
731 gstvaapiutils_h265_priv.h gstvaapiutils_h26x_priv.h \
732 gstvaapiutils_mpeg2_priv.h gstvaapivideopool_priv.h \
733 gstvaapiwindow_priv.h gstvaapiworkarounds.h \
734 libgstvaapi_priv_check.h sysdeps.h $(NULL) $(am__append_16)
732735 libgstvaapi_jpegdec_source_c = gstvaapidecoder_jpeg.c
733736 libgstvaapi_jpegdec_source_h = gstvaapidecoder_jpeg.h
734737 libgstvaapi_vp8dec_source_c = gstvaapidecoder_vp8.c
11931196 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvaapi_la-gstvaapiutils_core.Plo@am__quote@
11941197 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvaapi_la-gstvaapiutils_h264.Plo@am__quote@
11951198 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvaapi_la-gstvaapiutils_h265.Plo@am__quote@
1199 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvaapi_la-gstvaapiutils_h26x.Plo@am__quote@
11961200 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvaapi_la-gstvaapiutils_mpeg2.Plo@am__quote@
11971201 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvaapi_la-gstvaapivalue.Plo@am__quote@
11981202 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvaapi_la-gstvaapivideopool.Plo@am__quote@
15781582 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstvaapiutils_h265.c' object='libgstvaapi_la-gstvaapiutils_h265.lo' libtool=yes @AMDEPBACKSLASH@
15791583 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
15801584 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstvaapi_la_CFLAGS) $(CFLAGS) -c -o libgstvaapi_la-gstvaapiutils_h265.lo `test -f 'gstvaapiutils_h265.c' || echo '$(srcdir)/'`gstvaapiutils_h265.c
1585
1586 libgstvaapi_la-gstvaapiutils_h26x.lo: gstvaapiutils_h26x.c
1587 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstvaapi_la_CFLAGS) $(CFLAGS) -MT libgstvaapi_la-gstvaapiutils_h26x.lo -MD -MP -MF $(DEPDIR)/libgstvaapi_la-gstvaapiutils_h26x.Tpo -c -o libgstvaapi_la-gstvaapiutils_h26x.lo `test -f 'gstvaapiutils_h26x.c' || echo '$(srcdir)/'`gstvaapiutils_h26x.c
1588 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstvaapi_la-gstvaapiutils_h26x.Tpo $(DEPDIR)/libgstvaapi_la-gstvaapiutils_h26x.Plo
1589 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstvaapiutils_h26x.c' object='libgstvaapi_la-gstvaapiutils_h26x.lo' libtool=yes @AMDEPBACKSLASH@
1590 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1591 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstvaapi_la_CFLAGS) $(CFLAGS) -c -o libgstvaapi_la-gstvaapiutils_h26x.lo `test -f 'gstvaapiutils_h26x.c' || echo '$(srcdir)/'`gstvaapiutils_h26x.c
15811592
15821593 libgstvaapi_la-gstvaapiutils_mpeg2.lo: gstvaapiutils_mpeg2.c
15831594 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstvaapi_la_CFLAGS) $(CFLAGS) -MT libgstvaapi_la-gstvaapiutils_mpeg2.lo -MD -MP -MF $(DEPDIR)/libgstvaapi_la-gstvaapiutils_mpeg2.Tpo -c -o libgstvaapi_la-gstvaapiutils_mpeg2.lo `test -f 'gstvaapiutils_mpeg2.c' || echo '$(srcdir)/'`gstvaapiutils_mpeg2.c
2424 * @short_description: VA/DRM display abstraction
2525 */
2626
27 #define _GNU_SOURCE
2728 #include "sysdeps.h"
2829 #include <string.h>
2930 #include <unistd.h>
567567 return TRUE;
568568
569569 if (cip->chroma_type != GST_VAAPI_CHROMA_TYPE_YUV420 &&
570 cip->chroma_type != GST_VAAPI_CHROMA_TYPE_YUV422)
570 cip->chroma_type != GST_VAAPI_CHROMA_TYPE_YUV422 &&
571 cip->chroma_type != GST_VAAPI_CHROMA_TYPE_YUV420_10BPP)
571572 goto unsupported;
572573
573574 if (!get_config_attribute (encoder, VAConfigAttribRTFormat, &format))
587588 }
588589 }
589590
591 static guint
592 get_default_chroma_type (GstVaapiEncoder * encoder,
593 const GstVaapiContextInfo * cip)
594 {
595 guint value;
596
597 if (!gst_vaapi_get_config_attribute (encoder->display,
598 gst_vaapi_profile_get_va_profile (cip->profile),
599 gst_vaapi_entrypoint_get_va_entrypoint (cip->entrypoint),
600 VAConfigAttribRTFormat, &value))
601 return 0;
602
603 return to_GstVaapiChromaType (value);
604 }
605
590606 static void
591 init_context_info (GstVaapiEncoder * encoder)
592 {
593 GstVaapiContextInfo *const cip = &encoder->context_info;
607 init_context_info (GstVaapiEncoder * encoder, GstVaapiContextInfo * cip,
608 GstVaapiProfile profile)
609 {
594610 const GstVaapiEncoderClassData *const cdata =
595611 GST_VAAPI_ENCODER_GET_CLASS (encoder)->class_data;
596612
597613 cip->usage = GST_VAAPI_CONTEXT_USAGE_ENCODE;
598 cip->profile = encoder->profile;
614 cip->profile = profile;
599615 if (cdata->codec == GST_VAAPI_CODEC_JPEG) {
600616 cip->entrypoint = GST_VAAPI_ENTRYPOINT_PICTURE_ENCODE;
601617 } else {
602618 if (cip->entrypoint != GST_VAAPI_ENTRYPOINT_SLICE_ENCODE_LP)
603619 cip->entrypoint = GST_VAAPI_ENTRYPOINT_SLICE_ENCODE;
604620 }
621 cip->chroma_type = get_default_chroma_type (encoder, cip);
605622 cip->width = 0;
606623 cip->height = 0;
607624 cip->ref_frames = encoder->num_ref_frames;
616633 const GstVideoFormat format =
617634 GST_VIDEO_INFO_FORMAT (GST_VAAPI_ENCODER_VIDEO_INFO (encoder));
618635
619 init_context_info (encoder);
636 init_context_info (encoder, cip, get_profile (encoder));
620637
621638 cip->chroma_type = gst_vaapi_video_format_get_chroma_type (format);
622639 cip->width = GST_VAAPI_ENCODER_WIDTH (encoder);
854871 continue;
855872 rate_control_mask |= 1 << to_GstVaapiRateControl (1 << i);
856873 }
857 }
858 GST_INFO ("supported rate controls: 0x%08x", rate_control_mask);
859
860 encoder->got_rate_control_mask = TRUE;
861 encoder->rate_control_mask = cdata->rate_control_mask & rate_control_mask;
874 GST_INFO ("supported rate controls: 0x%08x", rate_control_mask);
875
876 encoder->got_rate_control_mask = TRUE;
877 encoder->rate_control_mask = cdata->rate_control_mask & rate_control_mask;
878 }
879
862880 return encoder->rate_control_mask;
863881 }
864882
11421160 }
11431161 }
11441162
1163 static GstVaapiContext *
1164 create_test_context_config (GstVaapiEncoder * encoder, GstVaapiProfile profile)
1165 {
1166 GstVaapiContextInfo cip = { 0, };
1167 GstVaapiContext *ctxt;
1168
1169 if (encoder->context)
1170 return gst_vaapi_object_ref (encoder->context);
1171
1172 /* if there is no profile, let's figure out one */
1173 if (profile == GST_VAAPI_PROFILE_UNKNOWN)
1174 profile = get_profile (encoder);
1175
1176 init_context_info (encoder, &cip, profile);
1177 ctxt = gst_vaapi_context_new (encoder->display, &cip);
1178 return ctxt;
1179 }
1180
1181 static GArray *
1182 get_profile_surface_formats (GstVaapiEncoder * encoder, GstVaapiProfile profile)
1183 {
1184 GstVaapiContext *ctxt;
1185 GArray *formats;
1186
1187 ctxt = create_test_context_config (encoder, profile);
1188 if (!ctxt)
1189 return NULL;
1190 formats = gst_vaapi_context_get_surface_formats (ctxt);
1191 gst_vaapi_object_unref (ctxt);
1192 return formats;
1193 }
1194
11451195 static gboolean
1146 gst_vaapi_encoder_ensure_context_config (GstVaapiEncoder * encoder)
1147 {
1148 GstVaapiContextInfo *const cip = &encoder->context_info;
1149
1150 if (encoder->context)
1151 return TRUE;
1152
1153 init_context_info (encoder);
1154 encoder->context = gst_vaapi_context_new (encoder->display, cip);
1155 return (encoder->context != NULL);
1196 merge_profile_surface_formats (GstVaapiEncoder * encoder,
1197 GstVaapiProfile profile, GArray * formats)
1198 {
1199 GArray *surface_fmts;
1200 guint i, j;
1201 GstVideoFormat fmt, sfmt;
1202
1203 if (profile == GST_VAAPI_PROFILE_UNKNOWN)
1204 return FALSE;
1205
1206 surface_fmts = get_profile_surface_formats (encoder, profile);
1207 if (!surface_fmts)
1208 return FALSE;
1209
1210 for (i = 0; i < surface_fmts->len; i++) {
1211 sfmt = g_array_index (surface_fmts, GstVideoFormat, i);
1212 for (j = 0; j < formats->len; j++) {
1213 fmt = g_array_index (formats, GstVideoFormat, j);
1214 if (fmt == sfmt)
1215 break;
1216 }
1217 if (j >= formats->len)
1218 g_array_append_val (formats, sfmt);
1219 }
1220
1221 g_array_unref (surface_fmts);
1222 return TRUE;
11561223 }
11571224
11581225 /**
11641231 * Returns: a #GArray of valid formats for the current VAConfig
11651232 **/
11661233 GArray *
1167 gst_vaapi_encoder_get_surface_formats (GstVaapiEncoder * encoder)
1168 {
1169 if (!gst_vaapi_encoder_ensure_context_config (encoder))
1234 gst_vaapi_encoder_get_surface_formats (GstVaapiEncoder * encoder,
1235 GstVaapiProfile profile)
1236 {
1237 const GstVaapiEncoderClassData *const cdata =
1238 GST_VAAPI_ENCODER_GET_CLASS (encoder)->class_data;
1239 GArray *profiles, *formats;
1240 guint i;
1241
1242 if (profile || encoder->context)
1243 return get_profile_surface_formats (encoder, profile);
1244
1245 /* no specific context neither specific profile, let's iterate among
1246 * the codec's profiles */
1247 profiles = gst_vaapi_display_get_encode_profiles (encoder->display);
1248 if (!profiles)
11701249 return NULL;
1171 return gst_vaapi_context_get_surface_formats (encoder->context);
1250
1251 formats = g_array_new (FALSE, FALSE, sizeof (GstVideoFormat));
1252 for (i = 0; i < profiles->len; i++) {
1253 profile = g_array_index (profiles, GstVaapiProfile, i);
1254 if (gst_vaapi_profile_get_codec (profile) == cdata->codec) {
1255 if (!merge_profile_surface_formats (encoder, profile, formats)) {
1256 g_array_unref (formats);
1257 formats = NULL;
1258 break;
1259 }
1260 }
1261 }
1262
1263 g_array_unref (profiles);
1264
1265 return formats;
11721266 }
11731267
11741268 /** Returns a GType for the #GstVaapiEncoderTune set */
173173 gst_vaapi_encoder_flush (GstVaapiEncoder * encoder);
174174
175175 GArray *
176 gst_vaapi_encoder_get_surface_formats (GstVaapiEncoder * encoder);
176 gst_vaapi_encoder_get_surface_formats (GstVaapiEncoder * encoder,
177 GstVaapiProfile profile);
177178 G_END_DECLS
178179
179180 #endif /* GST_VAAPI_ENCODER_H */
3535 #include "gstvaapiencoder_h264.h"
3636 #include "gstvaapiutils_h264.h"
3737 #include "gstvaapiutils_h264_priv.h"
38 #include "gstvaapiutils_h26x_priv.h"
3839 #include "gstvaapicodedbufferproxy_priv.h"
3940 #include "gstvaapisurface.h"
4041
4748
4849 /* Define the maximum value for view-id */
4950 #define MAX_VIEW_ID 1023
50
51 /* Define the maximum IDR period */
52 #define MAX_IDR_PERIOD 512
53
54 /* Default CPB length (in milliseconds) */
55 #define DEFAULT_CPB_LENGTH 1500
56
57 /* Scale factor for CPB size (HRD cpb_size_scale: min = 4) */
58 #define SX_CPB_SIZE 4
59
60 /* Scale factor for bitrate (HRD bit_rate_scale: min = 6) */
61 #define SX_BITRATE 6
62
63 /* Define default rate control mode ("constant-qp") */
64 #define DEFAULT_RATECONTROL GST_VAAPI_RATECONTROL_CQP
6551
6652 /* Supported set of VA rate controls, within this implementation */
6753 #define SUPPORTED_RATECONTROLS \
199185 return f;
200186 }
201187
202 /* ------------------------------------------------------------------------- */
203 /* --- H.264 Bitstream Writer --- */
204 /* ------------------------------------------------------------------------- */
205
206 #define WRITE_UINT32(bs, val, nbits) do { \
207 if (!gst_bit_writer_put_bits_uint32 (bs, val, nbits)) { \
208 GST_WARNING ("failed to write uint32, nbits: %d", nbits); \
209 goto bs_error; \
210 } \
211 } while (0)
212
213 #define WRITE_UE(bs, val) do { \
214 if (!bs_write_ue (bs, val)) { \
215 GST_WARNING ("failed to write ue(v)"); \
216 goto bs_error; \
217 } \
218 } while (0)
219
220 #define WRITE_SE(bs, val) do { \
221 if (!bs_write_se (bs, val)) { \
222 GST_WARNING ("failed to write se(v)"); \
223 goto bs_error; \
224 } \
225 } while (0)
226
227 /* Write an unsigned integer Exp-Golomb-coded syntax element. i.e. ue(v) */
228 static gboolean
229 bs_write_ue (GstBitWriter * bs, guint32 value)
230 {
231 guint32 size_in_bits = 0;
232 guint32 tmp_value = ++value;
233
234 while (tmp_value) {
235 ++size_in_bits;
236 tmp_value >>= 1;
237 }
238 if (size_in_bits > 1
239 && !gst_bit_writer_put_bits_uint32 (bs, 0, size_in_bits - 1))
240 return FALSE;
241 if (!gst_bit_writer_put_bits_uint32 (bs, value, size_in_bits))
242 return FALSE;
243 return TRUE;
244 }
245
246 /* Write a signed integer Exp-Golomb-coded syntax element. i.e. se(v) */
247 static gboolean
248 bs_write_se (GstBitWriter * bs, gint32 value)
249 {
250 guint32 new_val;
251
252 if (value <= 0)
253 new_val = -(value << 1);
254 else
255 new_val = (value << 1) - 1;
256
257 if (!bs_write_ue (bs, new_val))
258 return FALSE;
259 return TRUE;
260 }
261
262188 /* Write the NAL unit header */
263189 static gboolean
264190 bs_write_nal_header (GstBitWriter * bs, guint32 nal_ref_idc,
19671893
19681894 pic_param->ReferenceFrames[i].picture_id =
19691895 GST_VAAPI_SURFACE_PROXY_SURFACE_ID (ref_pic->pic);
1896 pic_param->ReferenceFrames[i].TopFieldOrderCnt = ref_pic->poc;
1897 pic_param->ReferenceFrames[i].flags |=
1898 VA_PICTURE_H264_SHORT_TERM_REFERENCE;
1899 pic_param->ReferenceFrames[i].frame_idx = ref_pic->frame_num;
19701900 ++i;
19711901 }
19721902 g_assert (i <= 16 && i <= ref_pool->max_ref_frames);
20752005 for (; i_ref < reflist_0_count; ++i_ref) {
20762006 slice_param->RefPicList0[i_ref].picture_id =
20772007 GST_VAAPI_SURFACE_PROXY_SURFACE_ID (reflist_0[i_ref]->pic);
2008 slice_param->RefPicList0[i_ref].TopFieldOrderCnt =
2009 reflist_0[i_ref]->poc;
2010 slice_param->RefPicList0[i_ref].flags |=
2011 VA_PICTURE_H264_SHORT_TERM_REFERENCE;
2012 slice_param->RefPicList0[i_ref].frame_idx = reflist_0[i_ref]->frame_num;
20782013 }
20792014 g_assert (i_ref == 1);
20802015 }
20872022 for (; i_ref < reflist_1_count; ++i_ref) {
20882023 slice_param->RefPicList1[i_ref].picture_id =
20892024 GST_VAAPI_SURFACE_PROXY_SURFACE_ID (reflist_1[i_ref]->pic);
2025 slice_param->RefPicList1[i_ref].TopFieldOrderCnt =
2026 reflist_1[i_ref]->poc;
2027 slice_param->RefPicList1[i_ref].flags |=
2028 VA_PICTURE_H264_SHORT_TERM_REFERENCE;
2029 slice_param->RefPicList1[i_ref].frame_idx |=
2030 reflist_1[i_ref]->frame_num;
20902031 }
20912032 g_assert (i_ref == 1);
20922033 }
26052546 /* Write SPS */
26062547 WRITE_UINT32 (&bs, 1, 5); /* SPS count = 1 */
26072548 g_assert (GST_BIT_WRITER_BIT_SIZE (&bs) % 8 == 0);
2608 WRITE_UINT32 (&bs, sps_info.size, 16);
2609 gst_bit_writer_put_bytes (&bs, sps_info.data, sps_info.size);
2549 /* Write Nal unit length and data of SPS */
2550 if (!gst_vaapi_utils_h26x_write_nal_unit (&bs, sps_info.data, sps_info.size))
2551 goto nal_to_byte_stream_error;
26102552
26112553 /* Write PPS */
26122554 WRITE_UINT32 (&bs, 1, 8); /* PPS count = 1 */
2613 WRITE_UINT32 (&bs, pps_info.size, 16);
2614 gst_bit_writer_put_bytes (&bs, pps_info.data, pps_info.size);
2555 /* Write Nal unit length and data of PPS */
2556 if (!gst_vaapi_utils_h26x_write_nal_unit (&bs, pps_info.data, pps_info.size))
2557 goto nal_to_byte_stream_error;
26152558
26162559 gst_buffer_unmap (encoder->pps_data, &pps_info);
26172560 gst_buffer_unmap (encoder->sps_data, &sps_info);
26322575 gst_buffer_unmap (encoder->sps_data, &sps_info);
26332576 gst_buffer_unmap (encoder->pps_data, &pps_info);
26342577 gst_bit_writer_clear (&bs, TRUE);
2635 return FALSE;
2578 return GST_VAAPI_ENCODER_STATUS_ERROR_OPERATION_FAILED;
2579 }
2580 nal_to_byte_stream_error:
2581 {
2582 GST_ERROR ("failed to write nal unit");
2583 gst_buffer_unmap (encoder->sps_data, &sps_info);
2584 gst_buffer_unmap (encoder->pps_data, &pps_info);
2585 gst_bit_writer_clear (&bs, TRUE);
2586 return GST_VAAPI_ENCODER_STATUS_ERROR_OPERATION_FAILED;
26362587 }
26372588 error_map_sps_buffer:
26382589 {
1919 * Boston, MA 02110-1301 USA
2020 */
2121
22 /* GValueArray has deprecated without providing an alternative in glib >= 2.32
23 * See https://bugzilla.gnome.org/show_bug.cgi?id=667228
24 */
25 #define GLIB_DISABLE_DEPRECATION_WARNINGS
26
2722 #include "sysdeps.h"
2823 #include <math.h>
2924 #include <va/va.h>
3530 #include "gstvaapiencoder_h265.h"
3631 #include "gstvaapiutils_h265.h"
3732 #include "gstvaapiutils_h265_priv.h"
33 #include "gstvaapiutils_h26x_priv.h"
3834 #include "gstvaapicodedbufferproxy_priv.h"
3935 #include "gstvaapisurface.h"
4036
4137 #define DEBUG 1
4238 #include "gstvaapidebug.h"
43
44 /* Define the maximum IDR period */
45 #define MAX_IDR_PERIOD 512
46
47 /* Default CPB length (in milliseconds) */
48 #define DEFAULT_CPB_LENGTH 1500
49
50 /* Scale factor for bitrate (HRD bit_rate_scale: min = 6) */
51 #define SX_BITRATE 6
52
53 /* Scale factor for CPB size (HRD cpb_size_scale: min = 4) */
54 #define SX_CPB_SIZE 4
55
56 /* Define default rate control mode ("constant-qp") */
57 #define DEFAULT_RATECONTROL GST_VAAPI_RATECONTROL_CQP
5839
5940 /* Supported set of VA rate controls, within this implementation */
6041 #define SUPPORTED_RATECONTROLS \
202183 ret = 10;
203184 /* must be greater than 4 */
204185 return ret;
205 }
206
207 /* ------------------------------------------------------------------------- */
208 /* --- H.265 Bitstream Writer --- */
209 /* ------------------------------------------------------------------------- */
210
211 #define WRITE_UINT32(bs, val, nbits) do { \
212 if (!gst_bit_writer_put_bits_uint32 (bs, val, nbits)) { \
213 GST_WARNING ("failed to write uint32, nbits: %d", nbits); \
214 goto bs_error; \
215 } \
216 } while (0)
217
218 #define WRITE_UE(bs, val) do { \
219 if (!bs_write_ue (bs, val)) { \
220 GST_WARNING ("failed to write ue(v)"); \
221 goto bs_error; \
222 } \
223 } while (0)
224
225 #define WRITE_SE(bs, val) do { \
226 if (!bs_write_se (bs, val)) { \
227 GST_WARNING ("failed to write se(v)"); \
228 goto bs_error; \
229 } \
230 } while (0)
231
232 /* Write an unsigned integer Exp-Golomb-coded syntax element. i.e. ue(v) */
233 static gboolean
234 bs_write_ue (GstBitWriter * bs, guint32 value)
235 {
236 guint32 size_in_bits = 0;
237 guint32 tmp_value = ++value;
238
239 while (tmp_value) {
240 ++size_in_bits;
241 tmp_value >>= 1;
242 }
243 if (size_in_bits > 1
244 && !gst_bit_writer_put_bits_uint32 (bs, 0, size_in_bits - 1))
245 return FALSE;
246 if (!gst_bit_writer_put_bits_uint32 (bs, value, size_in_bits))
247 return FALSE;
248 return TRUE;
249 }
250
251 /* Write a signed integer Exp-Golomb-coded syntax element. i.e. se(v) */
252 static gboolean
253 bs_write_se (GstBitWriter * bs, gint32 value)
254 {
255 guint32 new_val;
256
257 if (value <= 0)
258 new_val = -(value << 1);
259 else
260 new_val = (value << 1) - 1;
261
262 if (!bs_write_ue (bs, new_val))
263 return FALSE;
264 return TRUE;
265186 }
266187
267188 /* Write the NAL unit header */
1002923 ("Needs to lower coding tools to meet target decoder constraints");
1003924 GST_WARNING ("Only supporting Main profile, reset profile to Main");
1004925
1005 encoder->profile = GST_VAAPI_PROFILE_H265_MAIN;;
926 encoder->profile = GST_VAAPI_PROFILE_H265_MAIN;
1006927 encoder->profile_idc =
1007928 gst_vaapi_utils_h265_get_profile_idc (encoder->profile);
1008929
1014935 ensure_profile (GstVaapiEncoderH265 * encoder)
1015936 {
1016937 GstVaapiProfile profile;
938 const GstVideoFormat format =
939 GST_VIDEO_INFO_FORMAT (GST_VAAPI_ENCODER_VIDEO_INFO (encoder));
1017940
1018941 /* Always start from "Main" profile for maximum
1019942 compatibility */
1020943 profile = GST_VAAPI_PROFILE_H265_MAIN;
944
945 if (format == GST_VIDEO_FORMAT_P010_10LE)
946 profile = GST_VAAPI_PROFILE_H265_MAIN10;
1021947
1022948 encoder->profile = profile;
1023949 encoder->profile_idc = gst_vaapi_utils_h265_get_profile_idc (profile);
15091435 fill_sequence (GstVaapiEncoderH265 * encoder, GstVaapiEncSequence * sequence)
15101436 {
15111437 VAEncSequenceParameterBufferHEVC *const seq_param = sequence->param;
1438 const GstVideoFormat format =
1439 GST_VIDEO_INFO_FORMAT (GST_VAAPI_ENCODER_VIDEO_INFO (encoder));
1440 guint bits_depth_luma_minus8 =
1441 GST_VIDEO_FORMAT_INFO_DEPTH (gst_video_format_get_info (format), 0);
1442 if (bits_depth_luma_minus8 < 8)
1443 return FALSE;
1444 bits_depth_luma_minus8 -= 8;
15121445
15131446 memset (seq_param, 0, sizeof (VAEncSequenceParameterBufferHEVC));
15141447
15301463 seq_param->seq_fields.value = 0;
15311464 seq_param->seq_fields.bits.chroma_format_idc = 1;
15321465 seq_param->seq_fields.bits.separate_colour_plane_flag = 0;
1533 seq_param->seq_fields.bits.bit_depth_luma_minus8 = 0;
1534 seq_param->seq_fields.bits.bit_depth_chroma_minus8 = 0;
1466 seq_param->seq_fields.bits.bit_depth_luma_minus8 = bits_depth_luma_minus8;
1467 seq_param->seq_fields.bits.bit_depth_chroma_minus8 = bits_depth_luma_minus8;
15351468 seq_param->seq_fields.bits.scaling_list_enabled_flag = FALSE;
15361469 seq_param->seq_fields.bits.strong_intra_smoothing_enabled_flag = TRUE;
15371470 seq_param->seq_fields.bits.amp_enabled_flag = TRUE;
21702103 WRITE_UINT32 (&bs, 0x00, 2); /* parallelismType */
21712104 WRITE_UINT32 (&bs, 0x3f, 6); /* 111111 */
21722105 WRITE_UINT32 (&bs, 0x01, 2); /* chroma_format_idc */
2173 WRITE_UINT32 (&bs, 0x3f, 6); /* 111111 */
2106 WRITE_UINT32 (&bs, 0x1f, 5); /* 11111 */
21742107 WRITE_UINT32 (&bs, 0x01, 3); /* bit_depth_luma_minus8 */
2175 WRITE_UINT32 (&bs, 0x3f, 6); /* 111111 */
2108 WRITE_UINT32 (&bs, 0x1f, 5); /* 11111 */
21762109 WRITE_UINT32 (&bs, 0x01, 3); /* bit_depth_chroma_minus8 */
21772110 WRITE_UINT32 (&bs, 0x00, 16); /* avgFramerate */
21782111 WRITE_UINT32 (&bs, 0x00, 2); /* constatnFramerate */
21892122 WRITE_UINT32 (&bs, GST_H265_NAL_VPS, 6); /* Nal_unit_type */
21902123 WRITE_UINT32 (&bs, 0x01, 16); /* numNalus, VPS count = 1 */
21912124 g_assert (GST_BIT_WRITER_BIT_SIZE (&bs) % 8 == 0);
2192 WRITE_UINT32 (&bs, vps_info.size, 16); /* VPS nalUnitLength */
2193 gst_bit_writer_put_bytes (&bs, vps_info.data, vps_info.size);
2125 /* Write Nal unit length and data of VPS */
2126 if (!gst_vaapi_utils_h26x_write_nal_unit (&bs, vps_info.data, vps_info.size))
2127 goto nal_to_byte_stream_error;
21942128
21952129 /* Write SPS */
21962130 WRITE_UINT32 (&bs, 0x00, 1); /* array_completeness */
21982132 WRITE_UINT32 (&bs, GST_H265_NAL_SPS, 6); /* Nal_unit_type */
21992133 WRITE_UINT32 (&bs, 0x01, 16); /* numNalus, SPS count = 1 */
22002134 g_assert (GST_BIT_WRITER_BIT_SIZE (&bs) % 8 == 0);
2201 WRITE_UINT32 (&bs, sps_info.size, 16); /* SPS nalUnitLength */
2202 gst_bit_writer_put_bytes (&bs, sps_info.data, sps_info.size);
2135 /* Write Nal unit length and data of SPS */
2136 if (!gst_vaapi_utils_h26x_write_nal_unit (&bs, sps_info.data, sps_info.size))
2137 goto nal_to_byte_stream_error;
22032138
22042139 /* Write PPS */
22052140 WRITE_UINT32 (&bs, 0x00, 1); /* array_completeness */
22062141 WRITE_UINT32 (&bs, 0x00, 1); /* reserved zero */
22072142 WRITE_UINT32 (&bs, GST_H265_NAL_PPS, 6); /* Nal_unit_type */
22082143 WRITE_UINT32 (&bs, 0x01, 16); /* numNalus, PPS count = 1 */
2209 WRITE_UINT32 (&bs, pps_info.size, 16); /* PPS nalUnitLength */
2210 gst_bit_writer_put_bytes (&bs, pps_info.data, pps_info.size);
2144 /* Write Nal unit length and data of PPS */
2145 if (!gst_vaapi_utils_h26x_write_nal_unit (&bs, pps_info.data, pps_info.size))
2146 goto nal_to_byte_stream_error;
22112147
22122148 gst_buffer_unmap (encoder->pps_data, &pps_info);
22132149 gst_buffer_unmap (encoder->sps_data, &sps_info);
22302166 gst_buffer_unmap (encoder->sps_data, &sps_info);
22312167 gst_buffer_unmap (encoder->pps_data, &pps_info);
22322168 gst_bit_writer_clear (&bs, TRUE);
2233 return FALSE;
2169 return GST_VAAPI_ENCODER_STATUS_ERROR_OPERATION_FAILED;
2170 }
2171 nal_to_byte_stream_error:
2172 {
2173 GST_ERROR ("failed to write nal unit");
2174 gst_buffer_unmap (encoder->vps_data, &vps_info);
2175 gst_buffer_unmap (encoder->sps_data, &sps_info);
2176 gst_buffer_unmap (encoder->pps_data, &pps_info);
2177 gst_bit_writer_clear (&bs, TRUE);
2178 return GST_VAAPI_ENCODER_STATUS_ERROR_OPERATION_FAILED;
22342179 }
22352180 error_map_vps_buffer:
22362181 {
439439 encoder->sharpness_level = DEFAULT_SHARPNESS_LEVEL;
440440 encoder->yac_qi = DEFAULT_YAC_QINDEX;
441441
442 memset (encoder->ref_list, 0, G_N_ELEMENTS (encoder->ref_list));
442 memset (encoder->ref_list, 0,
443 G_N_ELEMENTS (encoder->ref_list) * sizeof (encoder->ref_list[0]));
443444 encoder->ref_list_idx = 0;
444445
445446 return TRUE;
315315 }
316316
317317 /**
318 * to_GstVaapiChromaType:
319 * @va_rt_format: the value of VAConfigAttribRTFormat
320 *
321 * Converts the VA_RT_FORMAT_* to #GstVaapiChromaType
322 *
323 * Returns: the #GstVaapiChromaType associated to @va_rt_format or
324 * zero.
325 **/
326 guint
327 to_GstVaapiChromaType (guint va_rt_format)
328 {
329 guint chroma_type;
330
331 switch (va_rt_format) {
332 case VA_RT_FORMAT_YUV420:
333 chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
334 break;
335 case VA_RT_FORMAT_YUV422:
336 chroma_type = GST_VAAPI_CHROMA_TYPE_YUV422;
337 break;
338 case VA_RT_FORMAT_YUV444:
339 chroma_type = GST_VAAPI_CHROMA_TYPE_YUV444;
340 break;
341 #if VA_CHECK_VERSION(0,34,0)
342 case VA_RT_FORMAT_YUV411:
343 chroma_type = GST_VAAPI_CHROMA_TYPE_YUV411;
344 break;
345 case VA_RT_FORMAT_YUV400:
346 chroma_type = GST_VAAPI_CHROMA_TYPE_YUV400;
347 break;
348 case VA_RT_FORMAT_RGB32:
349 chroma_type = GST_VAAPI_CHROMA_TYPE_RGB32;
350 break;
351 case VA_RT_FORMAT_RGB16:
352 chroma_type = GST_VAAPI_CHROMA_TYPE_RGB16;
353 break;
354 #endif
355 #if VA_CHECK_VERSION(0,38,1)
356 case VA_RT_FORMAT_YUV420_10BPP:
357 chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420_10BPP;
358 break;
359 #endif
360 default:
361 chroma_type = 0;
362 break;
363 }
364 return chroma_type;
365 }
366
367 /**
318368 * from_GstVaapiChromaType:
319369 * @chroma_type: the #GstVaapiChromaType
320370 *
8686
8787 G_GNUC_INTERNAL
8888 guint
89 to_GstVaapiChromaType (guint va_rt_format);
90
91 G_GNUC_INTERNAL
92 guint
8993 from_GstVaapiChromaType (guint chroma_type);
9094
9195 G_GNUC_INTERNAL
0 /*
1 * gstvaapiutils_h26x.c - H.26x related utilities
2 *
3 * Copyright (C) 2011-2014 Intel Corporation
4 * Author: Gwenole Beauchesne
5 * Copyright (C) 2017 Intel Corporation
6 * Author: Hyunjun Ko <zzoon@igalia.com>
7 * Author: Mark Thompson <sw@jkqxz.net>
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1
12 * of the License, or (at your option) any later version.
13 *
14 * This library 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 this library; if not, write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301 USA
23 */
24
25 #include "gstvaapiutils_h26x_priv.h"
26
27 /* Write an unsigned integer Exp-Golomb-coded syntax element. i.e. ue(v) */
28 gboolean
29 bs_write_ue (GstBitWriter * bs, guint32 value)
30 {
31 guint32 size_in_bits = 0;
32 guint32 tmp_value = ++value;
33
34 while (tmp_value) {
35 ++size_in_bits;
36 tmp_value >>= 1;
37 }
38 if (size_in_bits > 1
39 && !gst_bit_writer_put_bits_uint32 (bs, 0, size_in_bits - 1))
40 return FALSE;
41 if (!gst_bit_writer_put_bits_uint32 (bs, value, size_in_bits))
42 return FALSE;
43 return TRUE;
44 }
45
46 /* Write a signed integer Exp-Golomb-coded syntax element. i.e. se(v) */
47 gboolean
48 bs_write_se (GstBitWriter * bs, gint32 value)
49 {
50 guint32 new_val;
51
52 if (value <= 0)
53 new_val = -(value << 1);
54 else
55 new_val = (value << 1) - 1;
56
57 if (!bs_write_ue (bs, new_val))
58 return FALSE;
59 return TRUE;
60 }
61
62 /* Copy from src to dst, applying emulation prevention bytes.
63 *
64 * This is copied from libavcodec written by Mark Thompson
65 * <sw@jkqxz.net> from
66 * http://git.videolan.org/?p=ffmpeg.git;a=commit;h=2c62fcdf5d617791a653d7957d449f75569eede0
67 */
68 static gboolean
69 gst_vaapi_utils_h26x_nal_unit_to_byte_stream (guint8 * dst, guint * dst_len,
70 guint8 * src, guint src_len)
71 {
72 guint dp = 0, sp;
73 guint zero_run = 0;
74
75 for (sp = 0; sp < src_len; sp++) {
76 if (dp >= *dst_len)
77 goto fail;
78 if (zero_run < 2) {
79 if (src[sp] == 0)
80 ++zero_run;
81 else
82 zero_run = 0;
83 } else {
84 if ((src[sp] & ~3) == 0) {
85 /* emulation_prevention_byte: 0x03 */
86 dst[dp++] = 3;
87 if (dp >= *dst_len)
88 goto fail;
89 }
90 zero_run = src[sp] == 0;
91 }
92 dst[dp++] = src[sp];
93 }
94
95 *dst_len = dp;
96 return TRUE;
97
98 fail:
99 *dst_len = 0;
100 return FALSE;
101 }
102
103 /**
104 * gst_vaapi_utils_h26x_write_nal_unit:
105 * @bs: a #GstBitWriter instance
106 * @nal: the NAL (Network Abstraction Layer) unit to write
107 * @nal_size: the size, in bytes, of @nal
108 *
109 * Writes in the @bs the @nal rewritten with the "emulation prevention
110 * bytes" if required.
111 *
112 * Returns: TRUE if the NAL unit could be coded applying the
113 * "emulation prevention bytes"; otherwise FALSE.
114 **/
115 gboolean
116 gst_vaapi_utils_h26x_write_nal_unit (GstBitWriter * bs, guint8 * nal,
117 guint nal_size)
118 {
119 guint8 *byte_stream = NULL;
120 guint byte_stream_len;
121
122 byte_stream_len = nal_size + 10;
123 byte_stream = g_malloc (byte_stream_len);
124
125 if (!byte_stream)
126 return FALSE;
127
128 if (!gst_vaapi_utils_h26x_nal_unit_to_byte_stream (byte_stream,
129 &byte_stream_len, nal, nal_size)) {
130 g_free (byte_stream);
131 return FALSE;
132 }
133
134 WRITE_UINT32 (bs, byte_stream_len, 16);
135 gst_bit_writer_put_bytes (bs, byte_stream, byte_stream_len);
136 g_free (byte_stream);
137
138 return TRUE;
139
140 bs_error:
141 {
142 GST_ERROR ("failed to write codec-data");
143 g_free (byte_stream);
144 return FALSE;
145 }
146 }
0 /*
1 * gstvaapiutils_h26x_priv.h - H.26x related utilities
2 *
3 * Copyright (C) 2011-2014 Intel Corporation
4 * Author: Gwenole Beauchesne
5 * Copyright (C) 2017 Intel Corporation
6 * Author: Hyunjun Ko <zzoon@igalia.com>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 2.1
11 * of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301 USA
22 */
23
24 #ifndef GST_VAAPI_UTILS_H26X_PRIV_H
25 #define GST_VAAPI_UTILS_H26X_PRIV_H
26
27 #include <gst/base/gstbitwriter.h>
28
29 G_BEGIN_DECLS
30
31 /* Define the maximum IDR period */
32 #define MAX_IDR_PERIOD 512
33
34 /* Default CPB length (in milliseconds) */
35 #define DEFAULT_CPB_LENGTH 1500
36
37 /* Scale factor for CPB size (HRD cpb_size_scale: min = 4) */
38 #define SX_CPB_SIZE 4
39
40 /* Scale factor for bitrate (HRD bit_rate_scale: min = 6) */
41 #define SX_BITRATE 6
42
43 /* Define default rate control mode ("constant-qp") */
44 #define DEFAULT_RATECONTROL GST_VAAPI_RATECONTROL_CQP
45
46 /* ------------------------------------------------------------------------- */
47 /* --- H.264/265 Bitstream Writer --- */
48 /* ------------------------------------------------------------------------- */
49
50 #define WRITE_UINT32(bs, val, nbits) \
51 G_STMT_START { \
52 if (!gst_bit_writer_put_bits_uint32 (bs, val, nbits)) { \
53 GST_WARNING ("failed to write uint32, nbits: %d", nbits); \
54 goto bs_error; \
55 } \
56 } G_STMT_END
57
58 #define WRITE_UE(bs, val) \
59 G_STMT_START { \
60 if (!bs_write_ue (bs, val)) { \
61 GST_WARNING ("failed to write ue(v)"); \
62 goto bs_error; \
63 } \
64 } G_STMT_END
65
66 #define WRITE_SE(bs, val) \
67 G_STMT_START { \
68 if (!bs_write_se (bs, val)) { \
69 GST_WARNING ("failed to write se(v)"); \
70 goto bs_error; \
71 } \
72 } G_STMT_END
73
74
75 gboolean
76 bs_write_ue (GstBitWriter * bs, guint32 value);
77
78 gboolean
79 bs_write_se (GstBitWriter * bs, gint32 value);
80
81 /* Write nal unit, applying emulation prevention bytes */
82 gboolean
83 gst_vaapi_utils_h26x_write_nal_unit (GstBitWriter * bs, guint8 * nal, guint nal_size);
84
85 G_END_DECLS
86
87 #endif /* GST_VAAPI_UTILS_H26X_PRIV_H */
494494 GST_VAAPI_OBJECT_ID (surface),
495495 va_flags & (VA_TOP_FIELD | VA_BOTTOM_FIELD), &buffer);
496496 GST_VAAPI_OBJECT_UNLOCK_DISPLAY (window);
497 if (status == VA_STATUS_ERROR_FLAG_NOT_SUPPORTED)
497 if (status == VA_STATUS_ERROR_FLAG_NOT_SUPPORTED ||
498 status == VA_STATUS_ERROR_UNIMPLEMENTED ||
499 status == VA_STATUS_ERROR_INVALID_IMAGE_FORMAT)
498500 need_vpp = TRUE;
499501 else if (!vaapi_check_status (status, "vaGetSurfaceBufferWl()"))
500502 return FALSE;
3131 'gstvaapiutils_core.c',
3232 'gstvaapiutils_h264.c',
3333 'gstvaapiutils_h265.c',
34 'gstvaapiutils_h26x.c',
3435 'gstvaapiutils_mpeg2.c',
3536 'gstvaapivalue.c',
3637 'gstvaapivideopool.c',
2323 <browse rdf:resource="http://cgit.freedesktop.org/gstreamer/gstreamer-vaapi"/>
2424 </GitRepository>
2525 </repository>
26
27 <release>
28 <Version>
29 <revision>1.11.90</revision>
30 <branch>master</branch>
31 <name></name>
32 <created>2017-04-07</created>
33 <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-1.11.90.tar.xz" />
34 </Version>
35 </release>
2636
2737 <release>
2838 <Version>
00 project('gstreamer-vaapi', 'c',
1 version : '1.11.1.1',
1 version : '1.11.90',
22 meson_version : '>= 0.36.0',
33 default_options : [ 'warning_level=1',
44 'buildtype=debugoptimized' ])
2121 * Boston, MA 02110-1301 USA
2222 */
2323
24 #define _GNU_SOURCE
2425 #include "gst/vaapi/sysdeps.h"
2526 #include <gst/video/video.h>
2627 #if USE_DRM