Commit graph

3298 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
b1d8c68921 vaapibufferpool: declare parameter display as object
We have neglected to update this code since GstVaapiDisplay turned
into a GstObject descendant.

https://bugzilla.gnome.org/show_bug.cgi?id=796470
2018-06-14 16:41:00 +02:00
Hyunjun Ko
a6881b9b5e libs: display: replace gst_vaapi_display_new() with gst_vaapi_display_config()
Gobjectification for GstVaapiDisplay was almost done by the commit 185da3d1.
But still something breaking GObject code convention remains, which is
calling gst_vaapi_display_new() in each decendants.

This patch replaces it with gst_vaapi_display_config(), defined in private
header.

https://bugzilla.gnome.org/show_bug.cgi?id=796470
2018-06-14 16:41:00 +02:00
Víctor Manuel Jáquez Leal
8de7dcfe3c libs: display: redefine gst_vaapi_display_create()
The function name was gst_vaapi_display_create_unlocked(), nonetheless
it wasn't called unlocked. In order to keep the semantics this patch
renames the gst_vaapi_display_create_unlocked() as
gst_vaapi_display_create(), removing the previous function
gst_vaapi_display_create().

https://bugzilla.gnome.org/show_bug.cgi?id=796470
2018-06-14 16:41:00 +02:00
Víctor Manuel Jáquez Leal
d4843848b5 Revert "build: meson: libva gst-uninstall friendly"
This reverts commit fc3eef9c43.
2018-06-12 15:53:04 +02:00
Víctor Manuel Jáquez Leal
19e4769501 plugins: fix compilation
gstvaapipluginutil.c:171:1: error: old-style function definition [-Werror=old-style-definition]
2018-06-12 15:45:44 +02:00
Víctor Manuel Jáquez Leal
fc3eef9c43 build: meson: libva gst-uninstall friendly
Make gstreamer-vaapi to use libva uninstalled.
2018-06-12 13:05:08 +02:00
Víctor Manuel Jáquez Leal
94709d49c6 plugins: refactor gst_vaapi_create_display_from_gl_context()
gst_vaapi_create_display_from_gl_context() was a spaghetti mess.

This path refactors it, in order to make the code readable and
easy to follow.

https://bugzilla.gnome.org/show_bug.cgi?id=796564
2018-06-12 12:55:15 +02:00
Víctor Manuel Jáquez Leal
b0bebebc01 libs: display: resurrect parent private member
This is, practically, a revert of commit dcf135e2.

The parent logic is useful for the EGL display, which is a decorator
of the real windowing subsystem (X11 or Wayland). Thus it is avoided
calling vaInitialize() and vaTerminate() twice.

https://bugzilla.gnome.org/show_bug.cgi?id=795391
2018-06-12 12:43:27 +02:00
Víctor Manuel Jáquez Leal
ad974b4c82 libs: display: egl: initialize params structure
Statically initialise the internal params structure.

https://bugzilla.gnome.org/show_bug.cgi?id=795391
2018-06-12 12:43:27 +02:00
Víctor Manuel Jáquez Leal
e62f3d75cf plugins: handle EGL when creating VAAPI display from gl
If GstGL reports a EGL platform force to create a EGL display using
the native EGL display.

https://bugzilla.gnome.org/show_bug.cgi?id=795391
2018-06-12 12:42:11 +02:00
Hyunjun Ko
50470ae89f display: egl: create VaapiDisplayEGL with native EGL display
gst_vaapi_display_egl_new_with_native_display() has been broken since
it wasn't used.

Currently it's needed to call this API to create a display providing
the EGL display, so it could avoid duplicated calls to the native
display (eg. eglTerminate).

Signed-off-by: Victor Jaquez <vjaquez@igalia.com>

https://bugzilla.gnome.org/show_bug.cgi?id=795391
2018-06-12 12:35:04 +02:00
Tianhao Liu
bb8894aaf9 libs: decoder: release VA buffers after vaEndPicture
This change is due a problem decoding JPEGs with Intel's media-driver:
no image was generated.

This patch relases the VA buffers after vaEndPicture() is called,
and not before (after vaRenderPicture()).

https://bugzilla.gnome.org/show_bug.cgi?id=796505
2018-06-08 12:39:06 +02:00
Tim-Philipp Müller
e31248dc28 meson: fix build when xrender or xrandr are not available
HAVE_XRENDER are defined to 1 or 0, not defined or undefined.
2018-06-08 00:56:14 +01:00
Michael Olbrich
d79bda3153 vaapipostproc: don't copy the GstParentBufferMeta if use_vpp
Otherwise a reference to a DMABuf input buffer is kept until the output
buffer is deleted.

https://bugzilla.gnome.org/show_bug.cgi?id=796399
2018-06-07 11:55:06 +02:00
Hyunjun Ko
aa77862b62 libs: display: remove unnecessary legacy code since gobjectification
https://bugzilla.gnome.org/show_bug.cgi?id=796470
2018-06-06 19:47:18 +02:00
Hyunjun Ko
3056f06e02 libs: display: remove unused code
https://bugzilla.gnome.org/show_bug.cgi?id=796470
2018-06-06 19:47:18 +02:00
Víctor Manuel Jáquez Leal
28952f534b vaapiencode: h264: log output caps 2018-06-06 11:04:02 +02:00
Víctor Manuel Jáquez Leal
af3e6a8d16 vaapiencode: h264: find profile in available and allowed caps
The commit 67e33d3de2 ("vaapiencode: h264:
find best profile in those available") changed the code to pick a profile
that is actually supported by the hardware. Unfortunately it dropped the
downstream constraints. This can cause negotiation failures under certain
circumstances.

The fix is split in two cases:

1\ the available VA-API caps doesn't intersect with pipeline's allowed
caps:
 * The best allowed profile (pipeline's caps) is set as the encoding
   target profile (it will be adjusted later by the available profiles
   and properties)

2\ the available VA-API caps does intersect with pipeline's allowed
caps:
 * The intersected caps are fixed, and its profile is set as the
   encoding target profile. In this case the is not the best profile,
   but the minimal one (if VA-API reports the profiles in order).
   Setting the minimal profile of the intersected caps is better for
   compatibility.

This patch fixes other tests related with caps negotiation, for
example, it handles baseline profile, even when VA only supports
constrained-baseline.

Original-patch-by: Michael Olbrich <m.olbrich@pengutronix.de>

https://bugzilla.gnome.org/show_bug.cgi?id=794306
2018-06-06 11:04:02 +02:00
Hyunjun Ko
676e558331 libs: encoder: h265: increase log2_max_pic_order_cnt range according to spec
The specification says,
"log2_max_pic_order_cnt_lsb_minus4 shall be in the range of 0 to 12, inclusive."

This patch changes the upper limit from 6 to 12.

https://bugzilla.gnome.org/show_bug.cgi?id=796179
2018-06-04 18:38:54 +02:00
Víctor Manuel Jáquez Leal
705b37844e plugins: guard GstGL code 2018-05-21 13:57:08 +02:00
Víctor Manuel Jáquez Leal
e93232bbf4 libs: decoder: h264: use g_clear_pointer() 2018-05-18 18:42:49 +02:00
Víctor Manuel Jáquez Leal
41ab71a4fa libs: decoder: mpeg4, vc1: remove unused header 2018-05-18 18:42:35 +02:00
Víctor Manuel Jáquez Leal
4233987278 libs: decoder: remove unused forward declaration 2018-05-18 18:42:21 +02:00
U. Artie Eoff
9229780b26 fix configure.ac regression
Fixes regression introduced by 77527d67ab

https://bugzilla.gnome.org/show_bug.cgi?id=795885
2018-05-07 18:36:47 +03:00
Víctor Manuel Jáquez Leal
77527d67ab libs: remove gstbitwriter
Since it is deployed in gstreamer-core, there is no need to use
our custom version.

https://bugzilla.gnome.org/show_bug.cgi?id=795848
2018-05-06 17:29:45 +02:00
Wang,Fei
2d95089a8d vaapih264dec: add constrained and progressive profiles
Those profiles have been added in the version 2012-01
and 2011-06 of the AVC spec (A.2.4.1 and A.2.4.2).

Both are supported by VAProfileH264High

https://bugzilla.gnome.org/show_bug.cgi?id=795624
2018-04-30 12:48:26 +02:00
Víctor Manuel Jáquez Leal
59579a9cb3 plugin: remove custom GstGL context handling
Instead of using our own context handling for looking for GstGL
parameters (display, context and other context), this patch changes
the logic to use the utility function offered by GstGL.

https://bugzilla.gnome.org/show_bug.cgi?id=793643
2018-04-26 19:37:54 +02:00
Víctor Manuel Jáquez Leal
86bf89d16d plugins: GstGL API must use the member variables
This commit basically is a revert of commits 8092537 and fc1c415

https://bugzilla.gnome.org/show_bug.cgi?id=793643
2018-04-26 19:37:54 +02:00
Hyunjun Ko
b9c38a295b plugins: pass members as parameters of gst_gl_ensure_element_data()
The parameters of gst_gl_ensure_element_data() have to be not
local variable since they are going to be used to see if they're
set in gst_element_set_context() inside the API.

This is basically a revert of commit 3d56306c

https://bugzilla.gnome.org/show_bug.cgi?id=793643
2018-04-26 19:35:49 +02:00
Víctor Manuel Jáquez Leal
785efdbc22 meson: fix USE_GLES_VERSION_MASK
1. The macro in the code is USE_GLES_VERSION_MASK
2. glesv3 is provided by glesv2 pkg-config, then it's required to
   check headers

https://bugzilla.gnome.org/show_bug.cgi?id=795391
2018-04-25 18:01:48 +02:00
Hyunjun Ko
4af46f00c2 libs: egl: utils: mark context as wrapped when it is
The returning egl context may be null, so we should check the
return value.

https://bugzilla.gnome.org/show_bug.cgi?id=795391
2018-04-25 18:00:17 +02:00
Víctor Manuel Jáquez Leal
9fde93f80c libs: egl: utils: fix usage of GstGL macros
Include gl.h for the required GstGL symbols.

https://bugzilla.gnome.org/show_bug.cgi?id=795391
2018-04-25 16:29:28 +02:00
Tim-Philipp Müller
bfd4b43c16 meson: use -Wl,-Bsymbolic-functions where supported
Just like the autotools build.
2018-04-25 11:01:45 +01:00
Víctor Manuel Jáquez Leal
b9b696b07b meson: use get_pkgconfig_variable()
Use get_pkgconfig_variable() method, of dependency class, rather
than using run_command().
2018-04-20 16:03:14 +02:00
Tim-Philipp Müller
3900b4b36f meson: fix miscellaneous meson warnings
WARNING: Passed invalid keyword argument "rqeuired".
gst-libs/gst/base/meson.build:11: WARNING: Passed invalid keyword argument "version".
gst-libs/gst/base/meson.build:11: WARNING: Passed invalid keyword argument "soversion".
gst-libs/gst/vaapi/meson.build:223: WARNING: Passed invalid keyword argument "version".
gst-libs/gst/vaapi/meson.build:223: WARNING: Passed invalid keyword argument "soversion".
2018-04-20 11:50:55 +01:00
Paul Kocialkowski
5ee46f6751 display: drm: Allow finding DRM paths out of the PCI subsystem
This removes hard-coded checks on the parent subsystem of potential DRM
devices. These checks were set to exlude devices that do not originate
from the PCI bus, which is only a valid approach on x86 devices.

Other devices may have a DRM device originating from the platform
subsystem, so the checks that were previously restricted to PCI are
extended to cover platform devices as well.

https://bugzilla.gnome.org/show_bug.cgi?id=794840

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-19 17:42:43 +02:00
Hyunjun Ko
bfac678e9a videocontext: support wl-display in "gst.vaapi.app.Display"
Through "gst.vaapi.app.Display" context, users can set their own
VADisplay and native display of their backend.

So far we support only X11 display, from now we also support Wayland
display.

Attributes:
- wl-display : pointer of struct wl_display .

https://bugzilla.gnome.org/show_bug.cgi?id=705821
2018-04-18 18:01:06 +02:00
Hyunjun Ko
1825d939e7 libs: display: wayland: add gst_vaapi_display_wayland_new_with_va_display()
Implements new API function so that users could create GstVaapiDisplay
with their own VADisplay within a native display as backend.

https://bugzilla.gnome.org/show_bug.cgi?id=705821
2018-04-18 18:01:06 +02:00
Michael Olbrich
1f71b5a57d wayland: don't poll if there are no pending frames
Otherwise the following poll may not return for an arbitrary amount of
time. This can happen if another wayland event queue has flushed and read
our events.

https://bugzilla.gnome.org/show_bug.cgi?id=795224
2018-04-18 13:57:53 +02:00
Hyunjun Ko
e19570a8b6 libs: encoder: h265: 16 bit rounding of picture width and height
pic_width_in_luma_samples/pic_height_in_luma_samples can be 16-bit rounded
instead of 32-bit.

In addition, codedbuf_size must be calculated according to this change.

https://bugzilla.gnome.org/show_bug.cgi?id=753229
2018-04-16 15:57:21 +02:00
Tim-Philipp Müller
7fa706f05a Automatic update of common submodule
From 3fa2c9e to ed78bee
2018-04-16 10:53:47 +01:00
Víctor Manuel Jáquez Leal
fa77b2bf60 vaapiencode: h264: find best profile in those available
Instead to look for the best profile in the allowed profiles by
downstream, the encoder should look for the base profile in the
available profile in VA-API.

https://bugzilla.gnome.org/show_bug.cgi?id=794306
2018-03-30 20:44:25 +02:00
Tim-Philipp Müller
966d4d0476 Back to development 2018-03-20 10:49:10 +00:00
Tim-Philipp Müller
67ebe1f45a Release 1.14.0 2018-03-19 20:30:29 +00:00
Julien Isorce
bfa2fbd39b libs: decoder: h264: ensure num_ref_frames is greater than 0
Even if it is the h264parse fault or bad video file, vaapih264dec
should set a proper value for VAPictureParameterBufferH264.num_ref_frames
as the driver might use it.

Also see "info.ref_frames = dpb_size;" in
gstvaapidecoder_h264.c::ensure_context

https://bugzilla.gnome.org/show_bug.cgi?id=793836
2018-03-16 11:14:48 -06:00
Tim-Philipp Müller
01d55f5667 Release 1.13.91 2018-03-13 19:32:05 +00:00
Tim-Philipp Müller
f6f981e371 Release 1.13.90 2018-03-03 22:59:32 +00:00
Víctor Manuel Jáquez Leal
940afd2900 vaapipostproc: change how the metadata is copied
Instead of copying the metada in prepare_output_buffer() vmethod,
it is done in append_output_buffer_metadata() thus deinterlaced
buffers could also have the proper metas.

GstVideoCropMeta now it is copied internally and it is decided via
transform_meta() vmethod.

A new internal method, copy_metadata() was added to handle VPP
transformation where non-GstVideoVaapiMeta metas were lost.
2018-03-01 09:48:38 -06:00
Nicolas Dufresne
fde55003ca postproc: Copy meta data from input to output
This will ensure that meta data without memory tags will be copied. This
was noticed when testing ROI.

https://bugzilla.gnome.org/show_bug.cgi?id=768248
2018-02-27 17:51:02 -05:00
Víctor Manuel Jáquez Leal
e82fafc482 tests: element: rewrite ROI test
Rewrote the ROI test to use GstVideoRegionOfInterest meta rather
than injecting GstEvents. These meta are added as a pad probe in
the queue src pad.

Also

* Use of navigation messages to control de test
* Use signal watch for processing messages
* Change to H265 rather than H264 since current intel-vaapi-driver
  only supports ROI on kabylake.
  TODO: add a parameter to change the encoder/decoder to test.

https://bugzilla.gnome.org/show_bug.cgi?id=768248
2018-02-27 17:51:02 -05:00