Commit graph

1583 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
ae46b1a91a libs: filter: remove custom ref() and unref()
Replacing them by gst_object_ref() and gst_object_unref()

https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
99183e0184 libs: filter: refactor filter as gobject
https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
a2f923f9e9 libs: decoder: remove destoy() and create() callbacks
They were all replaced by reset()

https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
60dad9fa02 libs: decoder: vp9: implement reset() callback
remove destroy() and create() callback

https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
e493420375 libs: decoder: vp8: implement reset() callback
remove create() and destroy() callbacks

https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
2b207a47cb libs: decoder: vc1: implement reset() callback
remove destroy() and create() callbacks

use g_clear_pointer for rbdu_buffer

no cast for enum

https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
5b3f6eb285 libs: decoder: mpeg4: implement reset() callback
remove destroy() and create() callback

https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
0374a8c0a5 libs: decoder: mpeg2: implement reset() callback
remove create() and destroy() callbacks

https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
c1d65cf1a4 libs: decoder: jpeg: implement reset() callback
and remove create() and destroy() callbacks.

https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
3dbddfa682 libs: decoder: h265: implement reset() callback
and remove create() and destroy()
and use g_clear_pointer for dpb structure

https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
7a9f7f09c7 libs: decoder: h264: remove create() and destroy() callbacks
https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
4649ac1c38 libs: decoder: remove gst_vaapi_decoder_unref()
Replaced by gst_object_unref() in tests

https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
ad5eb75187 libs: decoder: remove gst_vaapi_decoder_ref()
https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
a75329ca94 libs: decoder: remove gst_vaapi_decoder_new()
https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
0ca49a10f8 libs: decoder: refactor decoders as gobject
https://bugzilla.gnome.org/show_bug.cgi?id=796308
2018-09-03 17:54:19 +02:00
Víctor Manuel Jáquez Leal
1f0b2fb952 libs: display: lock at extracting available image formates
When running several vaapi elements at the concurrently, at
initialization, there is a race condition when extractin the avaible
formats for images and subpictures.

This patch add a lock when the those arrays are filled.

https://bugzilla.gnome.org/show_bug.cgi?id=797039
2018-08-31 13:41:58 +02:00
Víctor Manuel Jáquez Leal
5f718b4f93 libs: encoder: h265: trivial documentation fix 2018-08-29 14:49:49 +02:00
Wangfei
2fce126cc7 libs: encoder: h265: add low delay B frame support.
Low delay B frame provide the function of transforming
P frame into low delay B frame which frame type is B, but
only reference predictive frames. This can be used when P
frame unsupported. Especially for P and B both unsupported,
in this case, I and low delay B frame can be encoded in a
stream.

https://bugzilla.gnome.org/show_bug.cgi?id=796984
2018-08-29 14:49:41 +02:00
Nicolas Dufresne
2922439bc2 libs: decoder: h264: Avoid using picture after it has been free
In some cases, the found_picture ended up being evicted and freed, which
would lead to a use after free when accessing picture->base.poc. In this
fix, we take a ref on the picture before calling dpb_evict.

https://bugzilla.gnome.org/show_bug.cgi?id=787124
2018-08-28 18:05:12 -04:00
Nicolas Dufresne
7a120c7a72 h264decoder: Fail decoding slice with missing inter-view reference
Similarly to previous patch, we have no error concealment. As a side
effect, it's better to skip slices with missing references then passing
NULL pointers to the accelerator. Passing NULL pointer would lead to
major visual artifact, a behaviour that is likely undefined.

https://bugzilla.gnome.org/show_bug.cgi?id=787124
2018-08-01 19:43:58 -04:00
Hyunjun Ko
038c62011f libs: decoder: h264: reset context when the number of view is increased
Usually in case of MVC decoding, dpb size is increasedi if subset sps.
That's why it resets context without this patch.
But for some media it doesn't increase dpb size. Even in this case we
should reset context to deal with MVC decoding.
Otherwise, it leads to assert.

https://bugzilla.gnome.org/show_bug.cgi?id=787124
2018-08-01 19:43:58 -04:00
Nicolas Dufresne
06aa82f989 vaapidecode: Skip unparsable units from adapter
If the unit could not be parsed, just skip this nal and keep parsing
what is left in the adapter. We need to flush the broken unit in the
decoder specific parser because the generic code does not know about
units boundary. This increases error resilliance.

Before this, the broken unit would stay in the adapter and EOS would be
returned. Which stopped the streaming. Just removing the EOS would have
lead to the adapter size growing indefinitely.

https://bugzilla.gnome.org/show_bug.cgi?id=796863
2018-07-25 15:52:54 -04:00
Nicolas Dufresne
b9ecf3b40d h265decoder: Don't scan empty buffer
Same as what we did for H264 decoder, this is to avoid an assertion
in the adapter.

https://bugzilla.gnome.org/show_bug.cgi?id=796832
2018-07-25 15:49:51 -04:00
Víctor Manuel Jáquez Leal
9eaff17c30 libs: h264: renable the vaapi category for logging
h264 log messages were logged in default category because a regression
in code. This patch renable the usage of vaapi logging category.

This regression was introduced in commit 7c365bdd.
2018-07-25 20:28:03 +02:00
Nicolas Dufresne
7c365bdddc h264decoder: Fail decoding slice if modification process failed
This patch chains up failure to executing the modification process. The
end result is that we now fail decoding the slice if this process fails.
This avoid sending a corrupted state to the accelerator. In some special
cases, this could lead to unrecoverable errors.

https://bugzilla.gnome.org/show_bug.cgi?id=796832
2018-07-19 16:37:39 -04:00
Nicolas Dufresne
927536b791 h264decoder: Don't scan empty buffer
gst_adapter_masked_scan_uint32_peek() asserts if size is 0. Don't
try and scan in that case. This fixes assertion that would some times
happen when the stream is corrupted.

https://bugzilla.gnome.org/show_bug.cgi?id=796832
2018-07-19 16:37:39 -04:00
Tianhao Liu
f5eb4faa59 libs: encoder: jpeg: set component id and Tqi
This change is due a problem encoding JPEGs with Intel's
media-driver: green/black image when playback jpeg

This patch sets component identifier and quantization table
destination selector in frame header to support packing headers
by Intel's media-driver that does not accept packed header
in AP level.

https://bugzilla.gnome.org/show_bug.cgi?id=796705
2018-07-04 12:10:10 +02:00
Nicolas Dufresne
72ea2a5bc3 h264dec: Remove false assumption about parity order
The decoder was trying to detect earlier that a field was lost base
on guessing the parity order. This breaks in streams were the parity
order changes.

This patch reverts the field order prediction code added by commit
8dd93e9c8.

https://bugzilla.gnome.org/show_bug.cgi?id=796169
2018-06-18 11:43:01 -04:00
Nicolas Dufresne
076af84654 h264dec: Properly set sentinel in ref frame list
This ensure that we always have sentinels set in the reference
pictures arrays. The code wasn't unsafe, this simply improve the
tracing, so instead of printing 32 lines of zeros, va tracer
prints proper empty lists.

https://bugzilla.gnome.org/show_bug.cgi?id=796169
2018-06-14 13:32:12 -04:00
Víctor Manuel Jáquez Leal
6ccd5d6fb2 libs: display: remove gst_vaapi_display_ref()
Replace it with gst_object_ref()

https://bugzilla.gnome.org/show_bug.cgi?id=796470
2018-06-14 16:41:00 +02:00
Víctor Manuel Jáquez Leal
fb1c4c52cc libs: display: remove gst_vaapi_display_unref()
Use gst_object_unref() instead.

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
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
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
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
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
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
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
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
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
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