Commit graph

3156 commits

Author SHA1 Message Date
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
Víctor Manuel Jáquez Leal
c49a17ed15 libs: encoder: reimplement ROI using meta
Check input buffers for ROI metas and pass them to VA. Also added a
new "default-roi-delta-qp" property in order to tell the encoder what
delta QP should be applied to ROI by default.

Enabled it for H264 and H265 encoders.

https://bugzilla.gnome.org/show_bug.cgi?id=768248
2018-02-27 17:51:02 -05:00
Víctor Manuel Jáquez Leal
d3110713b8 Revert "libs: encoder: add api gst_vaapi_encoder_add/del_roi"
This reverts commit 7a6f690340.

https://bugzilla.gnome.org/show_bug.cgi?id=768248
2018-02-27 17:51:02 -05:00
Víctor Manuel Jáquez Leal
35226dba88 Revert "tests: simple-encoder: add an option to set ROI"
This reverts commit c21345c478.

https://bugzilla.gnome.org/show_bug.cgi?id=768248
2018-02-27 17:51:02 -05:00
Víctor Manuel Jáquez Leal
25c2a0d353 Revert "vaapiencode: handle custom event GstVaapiEncoderRegionOfInterest"
This reverts commit 8f1b88dac0.

https://bugzilla.gnome.org/show_bug.cgi?id=768248
2018-02-27 17:51:02 -05:00
Víctor Manuel Jáquez Leal
ba28c6cff2 plugins: copy input buffer metas
When importing buffers to a VA-base buffer, it is required to copy
the metas in the original buffer, otherwise information will be
lost, such as GstVideoRegionOfInterestMeta.

https://bugzilla.gnome.org/show_bug.cgi?id=768248
2018-02-27 10:02:14 -06:00
Víctor Manuel Jáquez Leal
863b7fa6e0 libs: surface: cast to uintptr_t pointer
According to Debian package auto-building, uintptr_t is not an
unsigned long in i386 arch, raising an "incompatible pointer type"
error.

This patch adds a casting for compiler's satisfaction in i386.
2018-02-27 10:02:14 -06:00
Matteo Valdina
02c7c1bc17 libs: encoder: add zero as valid value for periodic keyframe.
Enabled zero as valid value for keyframe-period property.

https://bugzilla.gnome.org/show_bug.cgi?id=793829
2018-02-26 10:04:29 -06:00
Víctor Manuel Jáquez Leal
d18d6a8bd0 libs: encoder: code-style fix 2018-02-22 08:24:12 -06:00
Víctor Manuel Jáquez Leal
9827ab0f3f vaapidecode: generate system allocated buffers
Generate system allocated output buffers when downstream doesn't
support GstVideoMeta.

The VA buffer content is copied to the new output buffer, and it
replaces the VA buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=785054
2018-02-20 10:58:08 -06:00
Víctor Manuel Jáquez Leal
188434f251 vaapipostproc: handle system allocated buffers when required
When downstream can't handle GstVideoMeta it is required to send
system allocated buffers.

The system allocated buffers are produced in prepare_output_buffer()
vmethod if downstream can't handl GstVideoMeta.

At transform() vmethod if the buffer is a system allocated buffer,
a VA buffer is instanciated and replaces the out buffer. Later
the VA buffer is copied to the system allocate buffer and it
replaces the output buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=785054
2018-02-20 10:58:08 -06:00
Víctor Manuel Jáquez Leal
2c36610748 plugins: add gst_vaapi_copy_va_buffer()
This helper function aims to copy buffers with VA memory to dumb
buffers, when GstVideoMeta is not available dowstream.

https://bugzilla.gnome.org/show_bug.cgi?id=785054
2018-02-20 10:57:12 -06:00
Víctor Manuel Jáquez Leal
5842e9cf87 plugins: add COPY_OUTPUT_FRAME flag
This patch add the member copy_output_frame and set it TRUE when
when downstream didn't request GstVideoMeta API, the caps are raw
and the internal allocator is the VA-API one.

https://bugzilla.gnome.org/show_bug.cgi?id=785054
2018-02-20 10:57:12 -06:00
Víctor Manuel Jáquez Leal
f0fd2aeb04 plugins: store the first downstream allocator if available
The allocator will be required if we need to allocate a buffer
to store the frame with the expected strides.

https://bugzilla.gnome.org/show_bug.cgi?id=785054
2018-02-20 10:57:12 -06:00
Víctor Manuel Jáquez Leal
bcc480b70e vaapibufferpool: add gst_vaapi_video_buffer_pool_copy_buffer()
This function will inform the element if it shall copy the generated
buffer by the pool to a system allocated buffer before pushing it
to downstream.

https://bugzilla.gnome.org/show_bug.cgi?id=785054
2018-02-20 10:57:12 -06:00
Víctor Manuel Jáquez Leal
ad705cc5a3 vaapibufferpool: don't change config when forcing video meta
VA-API based buffer might need a video meta because of different
strides. But when donwstream doesn't support video meta we need to
force the usage of video meta.

Before we changed the buffer pool configuration, but actually this
is a hack and we cannot rely on that for downstream.

This patch add a check fo raw video caps and allocator is VA-API,
then the option is enabled without changing the pool configuration.
In this case the element is responsible to copy the frame to a
simple buffer with the expected strides.

https://bugzilla.gnome.org/show_bug.cgi?id=785054
2018-02-20 10:57:12 -06:00
Víctor Manuel Jáquez Leal
516d6bb3e2 vaapipostproc: set discont flag at vpp deinterlacing
When deinterlacing with VPP the discont flag was not forwarded to
the new created buffer. This patch sets the discont flag if input
buffer has it.
2018-02-20 10:55:49 -06:00
Víctor Manuel Jáquez Leal
1ca2c78c7a vaapibufferpool: remove wrong gcc annotation 2018-02-20 06:27:30 -06:00
Matteo Valdina
83886ced66 libs: encoder: h264,h265: extend max periodic keyframe.
Increased max values of periodic key frame for h26x codecs.
This allow more fine tunning of encoder that in certian scenario
want higher periodic key frame.

For example: it doesn't want a key frame each 10 seconds but
each 120 seconds.

https://bugzilla.gnome.org/show_bug.cgi?id=786320
2018-02-19 22:34:53 +01:00
Tim-Philipp Müller
a9b61f22f9 Back to development 2018-02-15 19:44:35 +00:00
Tim-Philipp Müller
a8f5e135bf Release 1.13.1 2018-02-15 18:29:04 +00:00
Tim-Philipp Müller
a0b0728b6b vaapi: dist new header 2018-02-15 18:29:04 +00:00
Víctor Manuel Jáquez Leal
c653cb55f9 vaapi: register vaapisink as marginal on wayland
vaapsink, when used with the Intel VA-API driver, tries to display
surfaces with format NV12, which are handled correctly by
Weston. Nonetheless, COGL cannot display YUV surfaces, making fail
pipelines on mutter.

This shall be solved either by COGL or by making the driver to paint
RGB surfaces. In the meanwhile, let's just demote vaapisink as
marginal when the Wayland environment is detected, no matter if it is
Weston.

https://bugzilla.gnome.org/show_bug.cgi?id=775698
2018-02-13 17:13:20 +01:00
Víctor Manuel Jáquez Leal
19fe5c4d07 plugins: update mesa's vendor string in whitelist
Mesa has updated its VA-API Gallium driver vendor string:

https://cgit.freedesktop.org/mesa/mesa/commit/?id=5db29d62ce1fefa3f2ee6e4a4688576fde4bde4a

This patch tries to cover both, the old and the new one.

https://bugzilla.gnome.org/show_bug.cgi?id=793386
2018-02-13 16:57:57 +01:00
Tim-Philipp Müller
7e28f45550 meson: make version numbers ints and fix int/string comparison
WARNING: Trying to compare values of different types (str, int).
The result of this is undefined and will become a hard error
in a future Meson release.
2018-02-08 19:22:17 +00:00
Víctor Manuel Jáquez Leal
448105578b plugins: handle vaapi allocator in allocation query
In propose_allocation() if the numer of allocation params is zero, the
system's allocator is added first, and lastly the native VA-API
allocator.

In decide_allocation(), the allocations params in query are travered,
looking for a native VA-API allocator. If it is found, it is reused as
src pad allocator. Otherwise, a new allocator is instantiated and
appended in the query.

https://bugzilla.gnome.org/show_bug.cgi?id=789476
2018-02-08 09:57:28 +01:00
Víctor Manuel Jáquez Leal
8855a926be vaapivideomemory: remove unused macro
GST_VAAPI_VIDEO_ALLOCATOR_NAME was added in commit 5b11b8332 but it
was never used, since the native VA-API allocator name has been
GST_VAAPI_VIDEO_MEMORY_NAME.

This patch removes GST_VAAPI_VIDEO_ALLOCATOR_NAME macro.

https://bugzilla.gnome.org/show_bug.cgi?id=789476
2018-02-07 09:22:29 +01:00
VaL Doroshchuk
76dbc3e971 vaapisink: don't mask button events for foreign windows
Don't subscribe to button press events when using a foreing window,
because the user created window would trap those events, preveting the
show of frames.

https://bugzilla.gnome.org/show_bug.cgi?id=791615
2018-02-05 11:36:35 +01:00
Tim-Philipp Müller
58043ff62c autotools: use -fno-strict-aliasing where supported
https://bugzilla.gnome.org/show_bug.cgi?id=769183
2018-02-05 08:55:05 +01:00
Tim-Philipp Müller
abd65bfff8 meson: use -fno-strict-aliasing where supported
https://bugzilla.gnome.org/show_bug.cgi?id=769183
2018-01-30 20:38:41 +00:00
Philippe Normand
d897de9738 vaapi: add NULL-sentinel to kernel_names
The array needs to be NULL-terminated according to the
gst_plugin_add_dependency() documentation.
2018-01-30 12:56:49 +00:00
Víctor Manuel Jáquez Leal
da77fd5e2e vaapipostproc: remove spurious code
This assignation is dead code, since gst_video_info_from_caps() set
to 1 by default.

https://bugzilla.gnome.org/show_bug.cgi?id=790149
2018-01-18 20:46:22 +01:00
Víctor Manuel Jáquez Leal
ea9c52ea8f vaapipostproc: if no p-a-r in out caps define a range
Instead of copying the pixel-aspect-ratio from the sink caps, define
an open range for the src caps pixel-aspect-ratio. Later it will be
defined.

https://bugzilla.gnome.org/show_bug.cgi?id=790149
2018-01-18 20:46:22 +01:00
Víctor Manuel Jáquez Leal
f3650381c3 vaapisink: check for display's color-balance properties
Check for display's color-balance properties, available by the VA-API
driver, before setting them.

Also logs an info message of those unavailable properties.

https://bugzilla.gnome.org/show_bug.cgi?id=792638
2018-01-18 13:18:27 +01:00
Víctor Manuel Jáquez Leal
6efce291f6 plugins: re-using buffer pool breaks renegotiation
at propose_allocation() we should not reuse the proposed buffer,
because it could break renegotiation.

https://bugzilla.gnome.org/show_bug.cgi?id=792620
2018-01-17 22:07:36 +01:00
Víctor Manuel Jáquez Leal
9933dcb218 plugins: use g_clear_object() to unref sinkpad_buffer_pool
https://bugzilla.gnome.org/show_bug.cgi?id=792620
2018-01-17 22:07:35 +01:00
Víctor Manuel Jáquez Leal
d26dc92021 build: meson: add missing GstGL dependency 2018-01-17 13:00:45 +01:00
Víctor Manuel Jáquez Leal
7418d4e954 libs: utils: egl: add missing guards for GstGL 2018-01-17 12:41:54 +01:00
Víctor Manuel Jáquez Leal
8688e81d42 plugins: remove dmabuf-import hack
Remove the hack to check if an upstream element has enabled the
property io-mode enabled as dmabuf-import.

https://bugzilla.gnome.org/show_bug.cgi?id=792034
2018-01-16 19:27:27 +01:00
Víctor Manuel Jáquez Leal
7e05160aaa libs: egl: utils: use eglGetPlatformDisplay()
eglGetDisplay() is currently broken in Mesa for Wayland.  Also using
eglGetDisplay() is rather fragile, and it is recommended to use
eglGetPlatformDisplay() when possible.

In order to do that, this patch uses the helper in GstGL. If
gstreamer-vaapi is not compiled with GstGL support, eglGetDisplay()
will be used.

https://bugzilla.gnome.org/show_bug.cgi?id=790493
2018-01-12 20:19:59 +01:00
Michael Tretter
aed4088967 vaapipostproc: lock ensure_filter with postproc_lock
gst_vaapipostproc_ensure_filter might free the allowed_srcpad_caps
and allowed_sinkpad_caps. This can race with copying these caps in
gst_vaapipostproc_transform_caps and lead to segfaults.

The gst_vaapipostproc_transform_caps function already locks
postproc_lock before copying the caps. Make sure that calls to
gst_vaapipostproc_ensure_filter also acquire this lock.

https://bugzilla.gnome.org/show_bug.cgi?id=791404
2018-01-12 19:10:35 +01:00
Víctor Manuel Jáquez Leal
089b8982e9 tests: test-filter: fix dereference before null check
Null-checking op_info suggests that it may be null, but it has already
been dereferenced on all paths leading to the check.

There may be a null pointer dereference, or else the comparison
against null is unnecessary.
2018-01-10 17:10:28 +01:00
Víctor Manuel Jáquez Leal
66794c9bc9 tests: y4mreader: fix string state checkup
str cannot be null in that moment, but it may be the end of string.
2018-01-10 17:06:53 +01:00