Commit graph

1563 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
9132090182 libs: replace g_warning with GST_WARNING 2018-10-09 17:23:30 +02:00
Matteo Valdina
5567a3d2cd libs: Move from g_debug to GST_DEBUG.
https://bugzilla.gnome.org/show_bug.cgi?id=797202
2018-10-09 16:58:43 +02:00
Matteo Valdina
b1b36a44a4 libs: h264: Update level table to "Recommendation H.264 (04/17)".
Added level 6, 6.1 and 6.2. Reference Table A-1 – Level limits
from T-REC-H.264-201704.

https://bugzilla.gnome.org/show_bug.cgi?id=797202
2018-09-27 12:29:10 +02:00
Wangfei
619abbdeb4 libs: dec: h265: add 422 chroma format support.
Add main-422-10 profile which support 422 chroma format stream.
Currently, this feature is only supported by media-driver in Icelake.

https://bugzilla.gnome.org/show_bug.cgi?id=797143
2018-09-27 11:55:04 +02:00
Víctor Manuel Jáquez Leal
cfbe7cbc44 libs: utils: no need of include config.h 2018-09-25 18:22:51 +02:00
Víctor Manuel Jáquez Leal
ae2fbf951a libs: remove already include string.h
Since sysdeps.h includes string.h there's no need to include it again.
2018-09-25 18:22:35 +02:00
Víctor Manuel Jáquez Leal
0152410c97 libs: object: separation of internal API and plugins
Removed exposed macros GST_VAAPI_OBJECT_DISPLAY() and
GST_VAAPI_OBJECT_ID() to plugins, keeping them only for internal
library usage.

The purpose is readability.

https://bugzilla.gnome.org/show_bug.cgi?id=797139
2018-09-25 17:41:55 +02:00
Víctor Manuel Jáquez Leal
9970e15f67 libs: parser_frame: change macros for inlined functions
https://bugzilla.gnome.org/show_bug.cgi?id=797139
2018-09-25 17:41:55 +02:00
Víctor Manuel Jáquez Leal
0e16691b09 libs: videopool: remove unneeded code
The removed code comes frome the bad practice of copy&paste. Better
move it as internal function.

https://bugzilla.gnome.org/show_bug.cgi?id=797139
2018-09-25 17:41:55 +02:00
Víctor Manuel Jáquez Leal
4505acc522 libs: remove dependency on IN_LIBGSTVAAPI_CORE
This conditional code was when libgstvaapi was intended to be library
used outside GStreamer. This not the case anymore, thus removing it.

https://bugzilla.gnome.org/show_bug.cgi?id=797139
2018-09-25 17:41:55 +02:00
Wangfei
f4f935b6f4 libs: dec: h265: fix the macros used for IDC profile
profile_idc flag in SPS only indicate the IDC profile, which may
need some other flags together to get the real profile.

https://bugzilla.gnome.org/show_bug.cgi?id=797160
2018-09-18 13:16:43 +02:00
Jimmy Ohn
7b077cdcb9 libs: use g_clear_pointer() when possible
https://bugzilla.gnome.org/show_bug.cgi?id=797131
2018-09-13 11:35:27 +02:00
Víctor Manuel Jáquez Leal
148d75c8af libs: filter: add gobject's cleanup function 2018-09-03 17:54:19 +02:00
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