Víctor Manuel Jáquez Leal [Tue, 12 Jul 2016 17:56:02 +0000 (19:56 +0200)]
vaapi: instantiate a VA display when registering
This patch tries to instantiate a GstVaapiDisplay when registering the plugin
features, if it fails, no gstreamer-vaapi element is registering.
The purpose of this patch is to avoid a situation where the user has
gstreamer-vaapi installed but their VA-API setup is not functional, which may
lead to unexpected behavior.
https://bugzilla.gnome.org/show_bug.cgi?id=724352
Víctor Manuel Jáquez Leal [Tue, 28 Jun 2016 09:33:18 +0000 (11:33 +0200)]
vaapi: declare external dependencies
There are two main external dependencies that define the feature set of this
plugin: a) the kernel and b) the VA driver
This patch tracks both dependencies, if any of them change, GStreamer will
re-inspect the plugin.
The kernel is tracked through the device files /dev/dri/card*
The VA driver is tracked through the files VA_DRIVERS_PATH/*_drv_video.so,
where VA_DRIVERS_PATH is the one defined in libva package configuration. Also,
the environment variables LIBVA_DRIVERS_PATH and LIBVA_DRIVER_NAME are tracked
since they modify the driver lookup.
Additionally, the environment variable GST_VAAPI_ALL_DRIVERS is tracked too.
https://bugzilla.gnome.org/show_bug.cgi?id=724352
Víctor Manuel Jáquez Leal [Tue, 19 Jul 2016 14:02:27 +0000 (16:02 +0200)]
vaapidecode: remove unneeded initializations
GObject's memory is set to zero, so there is no need to initialize to zero or
NULL it's class variables.
Víctor Manuel Jáquez Leal [Tue, 19 Jul 2016 16:28:28 +0000 (18:28 +0200)]
plugins: remove undefined macros
Víctor Manuel Jáquez Leal [Tue, 19 Jul 2016 15:43:28 +0000 (17:43 +0200)]
Revert "gstvaapisurface_drm: release image when done"
This reverts commit
1dbcc8a0e199f2da6a0ab8e949f13341916128a3 and commit
372a03a9e38acbf435eb80bf31d9a9844069e504.
While the dmabuf handle is exported, the derive image must exist, otherwise
the image's VA buffer is invalid, thus the dmabuf handle is never released,
leading into a file descriptors leak.
Víctor Manuel Jáquez Leal [Thu, 21 Jul 2016 15:38:17 +0000 (17:38 +0200)]
encoder: h265: fix code-style
Víctor Manuel Jáquez Leal [Fri, 22 Jul 2016 14:55:59 +0000 (16:55 +0200)]
vaapipostproc: update filters at color balance
This is a fix for a regression of previous commit, which updates the filters
only when the property is set, because it is also required to update the
filter when the color balance interface change its values.
Hyunjun Ko [Fri, 22 Jul 2016 03:10:23 +0000 (12:10 +0900)]
vaapipostproc: make it enable/disable pass-through mode
In case that sink caps and src caps are same, and no filtering parameter set,
pass-through mode is enabled.
If new filtering parameter is set during playback, it makes it reconfiguring,
so that pass-through mode is changed
In addition, updating filter is performed during reconfiguration, if needed.
https://bugzilla.gnome.org/show_bug.cgi?id=751876
Hyunjun Ko [Fri, 22 Jul 2016 02:51:26 +0000 (11:51 +0900)]
vaapipostproc: checking and updating filter parameter only when it's set
This patch is to avoid checking filter value at every frame.
https://bugzilla.gnome.org/show_bug.cgi?id=751876
Allen Zhang [Thu, 21 Jul 2016 08:24:31 +0000 (11:24 +0300)]
decoder: h265: handle the SEI NAL units included in codec_data
The prefix/suffix SEI nal units can appear in codec_data too
which weren't handled before. Parse these SEI headers to
fix the segfault.
https://bugzilla.gnome.org/show_bug.cgi?id=768544
Víctor Manuel Jáquez Leal [Fri, 15 Jul 2016 14:32:26 +0000 (16:32 +0200)]
build: doc: do not redefine MAINTAINERCLEANFILES
MAINTAINERCLEANFILES is defined in gtk-doc-plugins.mak, thus instead of
overload it, the files should be added.
Sreerenj Balachandran [Fri, 15 Jul 2016 11:41:27 +0000 (14:41 +0300)]
encoder: h264: Fix MVC encode while enabling dct8x8
Pack the transform_8x8_mode_flag and other necessary rbsp data
in packed_pps header for MVC encode.
https://bugzilla.gnome.org/show_bug.cgi?id=768647
Víctor Manuel Jáquez Leal [Tue, 12 Jul 2016 21:58:55 +0000 (23:58 +0200)]
vaapisink: demote a debug message to trace
Reduces noise when debugging.
Jagyum Koo [Wed, 13 Jul 2016 08:21:01 +0000 (17:21 +0900)]
wayland: Error check before using cached wl_display
A planar(or some other) buffer allocation may fail on the driver, then
the wayland connection becomes invalid, not able to send request or
receive any event. So we need to set up a new wayland connection if
there's an error detected on the cached wl_display.
https://bugzilla.gnome.org/show_bug.cgi?id=768761
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Stefan Sauer [Mon, 11 Jul 2016 19:15:57 +0000 (21:15 +0200)]
Automatic update of common submodule
From ac2f647 to f49c55e
Víctor Manuel Jáquez Leal [Tue, 5 Jul 2016 16:23:22 +0000 (18:23 +0200)]
vaapiencode: demote a log to trace level
Removes noise when debugging.
Hyunjun Ko [Wed, 6 Jul 2016 02:17:23 +0000 (11:17 +0900)]
vaapiencode: implement flush() vmethod
In order to handle correctly seek and other operations, vaapiencode should
flush all the remaining data from the encoder without pushing it downstream.
This patch implements the flush() vmethod, only after of pausing the
source pad task, and restarting it again after the flush stop.
https://bugzilla.gnome.org/show_bug.cgi?id=767176
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Mon, 11 Jul 2016 06:43:04 +0000 (08:43 +0200)]
decoder: vc1: flush dpb only if opened
Flush the decode picture buffer, if and only if, the decoder is
started. Otherwise the dpb structure might be NULL.
https://bugzilla.gnome.org/show_bug.cgi?id=742922
Hyunjun Ko [Fri, 1 Jul 2016 05:42:20 +0000 (14:42 +0900)]
vaapidecode: drop non-keyframe in reverse playback
To avoid surface-exhausted situation during reverse playback,
drop frames except for key frame.
Also, to avoid the corruption of the parser state, flush() vmethod
doesn't destroy the VA decoder when playing in reverse.
https://bugzilla.gnome.org/show_bug.cgi?id=742922
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Sun, 10 Jul 2016 17:33:14 +0000 (19:33 +0200)]
vaapidecode: unref output frame earlier
The queue in GstVaapiDecode adds an extra reference to the frames. This patch
unref that extra reference earlier making the code simpler to follow.
https://bugzilla.gnome.org/show_bug.cgi?id=768652
Víctor Manuel Jáquez Leal [Sun, 10 Jul 2016 17:01:17 +0000 (19:01 +0200)]
vaapidecode: remove gst_vaapidecode_internal_flush()
As gst_vaapidecode_finish() is the only callee of
gst_vaapidecode_internal_flush(), it is better to inline it.
https://bugzilla.gnome.org/show_bug.cgi?id=768652
Víctor Manuel Jáquez Leal [Sun, 10 Jul 2016 16:18:57 +0000 (18:18 +0200)]
vaapidecode: flush output adapter at drain()
Calling drain() vmethod means "decode any data it can at this point, but that
more data may arrive after". Hence, vaapidecode should check if there is data
in the output adapter and process them, without destroying the decoded picture
buffer (dpb).
Since this operation is done by gst_vaapidecode_internal_flush(), the operation
was refactored into a new function gst_vaapidecode_flush_output_adapter().
https://bugzilla.gnome.org/show_bug.cgi?id=768652
Víctor Manuel Jáquez Leal [Sun, 10 Jul 2016 11:46:25 +0000 (13:46 +0200)]
vaapidecode: call purge at flush()
Calling flush() vmethod means "to flush all remaining data from the decoder
without pushing it downstream".
Nonetheless flush() is calling gst_vaapidecode_internal_flush(), which calls
gst_video_decoder_have_frame() if there is still something in the input
adapter, which may push buffers to downstream by calling handle_frame().
This patch changes this behavior by calling gst_vaapidecode_purge() rather
than gst_vaapidecode_internal_flush(), which does what we want: flushes the VA
decoder and releases all the rest of decoded frames.
https://bugzilla.gnome.org/show_bug.cgi?id=768652
Víctor Manuel Jáquez Leal [Wed, 6 Jul 2016 16:38:37 +0000 (18:38 +0200)]
test: elements: remove spurious linkage
Element tests only need to link against gstreamer libraries.
Sebastian Dröge [Wed, 6 Jul 2016 11:41:21 +0000 (14:41 +0300)]
configure: Require GLib >= 2.40 like everywhere else
Sebastian Dröge [Wed, 6 Jul 2016 10:51:21 +0000 (13:51 +0300)]
Back to development
Sebastian Dröge [Wed, 6 Jul 2016 10:48:07 +0000 (13:48 +0300)]
Release 1.9.1
Víctor Manuel Jáquez Leal [Tue, 5 Jul 2016 18:59:49 +0000 (20:59 +0200)]
tests: elements: rotate orientation event
Hyunjun Ko [Fri, 1 Jul 2016 07:01:54 +0000 (16:01 +0900)]
tests: elements: Add testsuite for vaapisink
https://bugzilla.gnome.org/show_bug.cgi?id=765798
Hyunjun Ko [Fri, 1 Jul 2016 07:00:46 +0000 (16:00 +0900)]
vaapisink: add support for GST_TAG_IMAGE_ORIENTATION
https://bugzilla.gnome.org/show_bug.cgi?id=765798
Víctor Manuel Jáquez Leal [Wed, 29 Jun 2016 11:57:02 +0000 (13:57 +0200)]
vaapipostproc: return caps template if no display
This patch is a fix for my bad review of commit
6d73ca8d. The element should
be able to return the available raw caps handled by the VA display, but that
only should happen when there a VA display. If there's none, the element
should use the caps template.
https://bugzilla.gnome.org/show_bug.cgi?id=768161
Matthew Waters [Wed, 29 Jun 2016 06:42:18 +0000 (16:42 +1000)]
vaapipostproc: don't require a vaapi display for all caps queries
This delays the requirement of having a GstVaapiDisplay until later
https://bugzilla.gnome.org/show_bug.cgi?id=768161
Víctor Manuel Jáquez Leal [Tue, 28 Jun 2016 13:48:39 +0000 (15:48 +0200)]
utils: report VP9 profiles
Add VP9Profile0-3 name mapping.
Víctor Manuel Jáquez Leal [Tue, 28 Jun 2016 12:05:51 +0000 (14:05 +0200)]
vaapi: nest includes under USE_ENCODER macro
This is a missed changeset from commit 1c05c53, since also header includes
should be nested.
Víctor Manuel Jáquez Leal [Tue, 28 Jun 2016 09:54:33 +0000 (11:54 +0200)]
vaapi: nest encoders under USE_ENCODER macro
Though USE_{JPEG,VP8,VP9,H265}_ENCODER macros definition depend on USE_ENCODER
macro, it is clearer to nest them, showing explicitly the dependency relation.
Víctor Manuel Jáquez Leal [Fri, 24 Jun 2016 10:05:24 +0000 (12:05 +0200)]
vaapivideocontext: check if query context is NULL
Under certain conditions the element might receive a positive context query
but without a context instance. This situation will lead to a segmentation
fault when traversing the context list in the pipeline.
https://bugzilla.gnome.org/show_bug.cgi?id=767946
Scott D Phillips [Mon, 20 Jun 2016 20:22:36 +0000 (13:22 -0700)]
remove unused glibcompat.h
glibcompat.h is no longer doing anything. Remove it.
Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=767886
Scott D Phillips [Wed, 22 Jun 2016 21:28:44 +0000 (14:28 -0700)]
encoder: h264: Use high profile by default
Change defaults for max-bframes, cabac, and dct8x8 to be enabled
by default. This will cause the default profile to be high instead
of baseline. In most situations this is the right decision, and
the profile can still be lowered in the case of caps restrictions.
Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757941
Víctor Manuel Jáquez Leal [Wed, 22 Jun 2016 10:15:29 +0000 (12:15 +0200)]
vaapidecodebin: element warning if missing element
Raise an element warning if a required element is not available, thus the
pipeline will post a warning message and the application will be informed.
Hyunjun Ko [Wed, 22 Jun 2016 12:11:56 +0000 (15:11 +0300)]
decoder: h265: fix to release all dpb pictures
Without this, all dpb pictures are not released during flush,
because we used the global dpb_count variable for checking the
dpb fullness which get decremented in dpb_remove_index()
routine during each loop iteration.
https://bugzilla.gnome.org/show_bug.cgi?id=767934
Nicolas Dufresne [Tue, 21 Jun 2016 15:48:54 +0000 (11:48 -0400)]
Automatic update of common submodule
From ac2f647 to f363b32
Hyunjun Ko [Mon, 20 Jun 2016 10:53:26 +0000 (19:53 +0900)]
vaapi: fix minor leaks
https://bugzilla.gnome.org/show_bug.cgi?id=767868
Víctor Manuel Jáquez Leal [Fri, 17 Jun 2016 15:00:03 +0000 (17:00 +0200)]
vaapi: remove an already included header
gst/gst.h is already included in gstcompat.h
Víctor Manuel Jáquez Leal [Fri, 17 Jun 2016 14:53:26 +0000 (16:53 +0200)]
vaapidecodebin: add vp9 in sink pad template
Víctor Manuel Jáquez Leal [Wed, 15 Jun 2016 18:19:27 +0000 (20:19 +0200)]
vaapisink: return caps template if no display
If vaapisink received a caps query before getting a VA display, it returned
only the surfaces related caps. This behavior broke the autovideosink
negotiation.
This patch returns the pad's template caps if no VA display, otherwise the
caps are crafted as before.
https://bugzilla.gnome.org/show_bug.cgi?id=767699
Scott D Phillips [Wed, 15 Jun 2016 18:25:23 +0000 (11:25 -0700)]
decoder: vp9: Update comment about context resets
Clarify that vaapi context resets are never needed for vp9, but
that ensure_context() needs called when the size increases so that
new surfaces can be allocated.
Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=767474
Scott D Phillips [Tue, 17 May 2016 22:34:23 +0000 (15:34 -0700)]
gstvaapicontext: control reset_on_resize with option
Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=767474
Scott D Phillips [Tue, 14 Jun 2016 16:45:22 +0000 (09:45 -0700)]
vaapivideobufferpool: add video meta to config when needed
In cases where we know the video meta must be present, add it to
the pool configuration.
Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=766184
Scott D Phillips [Mon, 13 Jun 2016 17:48:41 +0000 (10:48 -0700)]
plugins: retry pool config
if gst_buffer_pool_set_config returns FALSE, check the modified
config and retry set_config if the config is still acceptable.
Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=766184
Víctor Manuel Jáquez Leal [Wed, 8 Jun 2016 16:42:43 +0000 (18:42 +0200)]
vaapivideomemory: internal attributes to methods
Mark as internal the functions used by VA-API dmabuf allocator.
Víctor Manuel Jáquez Leal [Thu, 2 Jun 2016 13:41:22 +0000 (15:41 +0200)]
plugins: remove precondition for decide_allocation()
There's no need to check for the display in the plugin object when
decide_allocation() vmethod is called, because the display will created or
re-created along the method execution.
Víctor Manuel Jáquez Leal [Wed, 8 Jun 2016 16:44:34 +0000 (18:44 +0200)]
plugins: avoid possible memory leaks
Get the pool config just before use it, to avoid a memory leak if the
allocator cannot be instantiated. Similarly, return FALSE if the configuration
cannot be set, avoid keep a not used allocator in the pool.
Víctor Manuel Jáquez Leal [Tue, 31 May 2016 09:52:57 +0000 (11:52 +0200)]
plugins: use GstParentBufferMeta
Instead of using the VASurface proxy's notify, which is internal gstvaapi API,
use the GStreamer's GstParentBufferMeta.
https://bugzilla.gnome.org/show_bug.cgi?id=765435
Víctor Manuel Jáquez Leal [Tue, 31 May 2016 06:26:33 +0000 (08:26 +0200)]
plugins: cache VASurfaces from dmabufs
This patch avoids the creation of a VASurface each time a new input buffer is
processed, caching them in the input buffer itself.
https://bugzilla.gnome.org/show_bug.cgi?id=765435
Víctor Manuel Jáquez Leal [Mon, 30 May 2016 21:55:43 +0000 (23:55 +0200)]
libs: change gst_vaapi_surface_new_with_dma_buf_handle()
Instead of passing the data already in GstVideoInfo, let's just pass the
GstVideoInfo structure.
https://bugzilla.gnome.org/show_bug.cgi?id=765435
Víctor Manuel Jáquez Leal [Wed, 25 May 2016 10:31:15 +0000 (12:31 +0200)]
plugins: use an unique allocator per pad
Instead of instantiating an allocator per vaapivideobufferpool, only one
allocator is instantiated per element's pad and shared among future pools.
If the pad's caps changes, the allocator is reset.
https://bugzilla.gnome.org/show_bug.cgi?id=765435
Víctor Manuel Jáquez Leal [Wed, 25 May 2016 08:58:01 +0000 (10:58 +0200)]
vaapivideobufferpool: share options flag with pluginbase
Originally, vaapivideobufferpool has a set of boolean variables for the
buffer configuration options.
This pach changes these boolean variables for a single bitwise, just as
it is used in pluginbase. Hence, the internal enum was moved to
vaapivideobufferpool header.
https://bugzilla.gnome.org/show_bug.cgi?id=765435
Víctor Manuel Jáquez Leal [Tue, 10 May 2016 13:57:06 +0000 (15:57 +0200)]
plugins: add gst_vaapi_plugin_base_create_pool()
This patch refactors the code in pluginbase in order to centralize the buffer
pool instantiation. As the buffer pool config may have different options, these
are gathered using a bitwise flag.
https://bugzilla.gnome.org/show_bug.cgi?id=765435
Víctor Manuel Jáquez Leal [Fri, 20 May 2016 16:46:14 +0000 (18:46 +0200)]
pluginbase negotiates allocator with bufferpool
Originally vaapivideobufferpool instantiates its own allocator regardless the
received configuration, and it relies in custom configuration options to
choose which kind of allocator instantiate.
This patch transfers the responsibility of the allocator instantiate to
vaapipluginbase and pass it to the vaapivideobufferpool through its
configuration.
* gst/vaapi/gstvaapipluginbase.c
+ set_dmabuf_allocator(): inserts a dmabuf allocator in the bufferpool
+ ensure_sinkpad_buffer_pool(): set a normal vaapi video allocator in
bufferpool configuration
+ gst_vaapi_plugin_base_propose_allocation(): call set_dmabuf_allocator() if
needed.
+ gst_vaapi_plugin_base_decide_allocation(): set a normal vaapi video
allocator in bufferpool configuration
* gst/vaapi/gstvaapivideobufferpool.c
+ gst_vaapi_video_buffer_pool_set_config(): instead of instantiate the
allocator, process the received one through its configuration.
* gst/vaapi/gstvaapivideobufferpool.h: removed
GST_BUFFER_POOL_OPTION_DMABUF_MEMORY since it is not used anymore.
* gst/vaapi/gstvaapivideomemory.c
+ gst_vaapi_is_dmabuf_allocator(): new helper function to identify a dmabuf
allocator with the vaapi qdata.
https://bugzilla.gnome.org/show_bug.cgi?id=765435
Víctor Manuel Jáquez Leal [Fri, 20 May 2016 12:39:23 +0000 (14:39 +0200)]
vaapivideobufferpool: keep only current video info
Instead of keeping old and new GstVideoInfo video structure, we only keep one,
the current one, the negotiated. The old one is not needed at all.
https://bugzilla.gnome.org/show_bug.cgi?id=765435
Víctor Manuel Jáquez Leal [Mon, 23 May 2016 13:38:07 +0000 (15:38 +0200)]
pluginutil: add gst_video_info_force_nv12_if_encoded()
This lines repeat a couple times in the code, so it would be better to put it
a helper function.
https://bugzilla.gnome.org/show_bug.cgi?id=765435
Víctor Manuel Jáquez Leal [Fri, 20 May 2016 12:15:53 +0000 (14:15 +0200)]
pluginutil: add gst_video_info_changed() helper
This function is shared among different elements, so let factorized it.
https://bugzilla.gnome.org/show_bug.cgi?id=765435
Hyunjun Ko [Wed, 8 Jun 2016 01:14:16 +0000 (10:14 +0900)]
vaapipostproc: Add colorimetry attributes to src caps
https://bugzilla.gnome.org/show_bug.cgi?id=766596
Hyunjun Ko [Wed, 8 Jun 2016 01:17:46 +0000 (10:17 +0900)]
vaapidecode: remove chroma-site and colorimetry from src caps
https://bugzilla.gnome.org/show_bug.cgi?id=766596
Scott D Phillips [Tue, 7 Jun 2016 21:19:50 +0000 (14:19 -0700)]
vaapipostproc: add postproc_lock to protect data members
Add a mutex to postproc to protect concurrent access to data members.
Previously set_caps() could release the allowed_srcpad_caps while
transform_caps was in the middle of using it.
Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=766940
Sreerenj Balachandran [Mon, 30 May 2016 08:30:40 +0000 (11:30 +0300)]
encoder: vp9: Add simple algorithms for reference picture selection
Added two modes(as properties) for reference picture selection:
ref-mode-0: AltRef and GoldRef pointing to the recent keyframe
and LastRef is pointing to the previous frame.
ref-mode-1: Previous frame (n) as LastRef , n-1 th frame as GoldRef
and n-2 th frame as AltRef
https://bugzilla.gnome.org/show_bug.cgi?id=766048
Sreerenj Balachandran [Mon, 30 May 2016 08:25:52 +0000 (11:25 +0300)]
encoder: vp9: Define Max frame width and height
https://bugzilla.gnome.org/show_bug.cgi?id=766048
Sreerenj Balachandran [Mon, 30 May 2016 08:25:03 +0000 (11:25 +0300)]
encoder: vp9: Add more propertis for tuning encode quality
Added three tuning properties:
1: filter_level
2: sharpness_level
3: luma ac quant-table index
https://bugzilla.gnome.org/show_bug.cgi?id=766048
Sreerenj Balachandran [Mon, 30 May 2016 08:24:14 +0000 (11:24 +0300)]
Add vp9 encode element to "vaapi" plugin
https://bugzilla.gnome.org/show_bug.cgi?id=766048
Sreerenj Balachandran [Mon, 30 May 2016 08:23:12 +0000 (11:23 +0300)]
Add vp9 encoder support in libgstvaapi
https://bugzilla.gnome.org/show_bug.cgi?id=766048
Sreerenj Balachandran [Mon, 30 May 2016 08:22:35 +0000 (11:22 +0300)]
build: Add check for VP9 encode API support in libva
https://bugzilla.gnome.org/show_bug.cgi?id=766048
Víctor Manuel Jáquez Leal [Thu, 26 May 2016 09:42:32 +0000 (11:42 +0200)]
gstvaapisurface_drm: fix internal documentation
Víctor Manuel Jáquez Leal [Thu, 26 May 2016 09:41:25 +0000 (11:41 +0200)]
gstvaapisurface_drm: fix code-style
Víctor Manuel Jáquez Leal [Wed, 25 May 2016 10:28:48 +0000 (12:28 +0200)]
plugins: remove unused header
Remove the include of gst/allocators/allocators.h since it is not used.
Víctor Manuel Jáquez Leal [Wed, 25 May 2016 08:36:33 +0000 (10:36 +0200)]
vaapivideobufferpool: remove GL_TEXTURE_UPLOAD_META
Since gstreamer-vaapi is coupled with gstreamer releases, there is no need to
keep compatibility definition.
This patch removes the definition of
GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META since it is in
gst-plugins-base version 1.2.2
Víctor Manuel Jáquez Leal [Mon, 23 May 2016 20:49:11 +0000 (22:49 +0200)]
plugins: add gst_vaapi_buffer_pool_caps_is_equal()
This is a helper function to improve the readability of
ensure_sinkpad_buffer_pool(). It makes clearer when the buffer pool needs to be
re-instantiated.
Víctor Manuel Jáquez Leal [Tue, 24 May 2016 14:29:33 +0000 (16:29 +0200)]
plugins: deactivate buffer pool before unref
This buffer pool may still be processing buffers when a caps renegotiation is
done. This one-liner patch deactivates the pool to drain it before it
de-allocation.
Víctor Manuel Jáquez Leal [Tue, 24 May 2016 14:22:24 +0000 (16:22 +0200)]
plugins: no sinkpad bufferpool when decoder
Right now, the decoders create a buffer pool for their sink pad which is not
used at all, because the decoders have never proposed it to upstream.
This patch avoids the buffer pool instantiating when the element inherits from
the GstVideoDecoder class.
Víctor Manuel Jáquez Leal [Tue, 24 May 2016 11:39:25 +0000 (13:39 +0200)]
plugins: avoid to get/set pool config twice
This patch is a bit of optimization, since the bufferpool configuration is get
when the pool is created. Hence, we only need to request it when the pool from
the allocation query is reused.
Víctor Manuel Jáquez Leal [Fri, 13 May 2016 11:14:23 +0000 (13:14 +0200)]
plugins: destroy pool earlier if non-vaapi
If the offered pool in decide_allocation() vmethod doesn't have the
VAAPI_VIDEO_META option, it is destroyed immediatly and the pointer cleared,
so it could be created later.
Víctor Manuel Jáquez Leal [Mon, 23 May 2016 20:30:04 +0000 (22:30 +0200)]
vaapivideobufferpool: split caps validation
When validating the caps from bufferpool config, this patch distinguishes the
error from no caps received (NULL) from the invalid caps (cannot be converted
into GstVideoInfo structure).
Víctor Manuel Jáquez Leal [Mon, 23 May 2016 20:21:15 +0000 (22:21 +0200)]
plugins: check for caps in query earlier
Check for caps as soon gst_query_parse_allocation() returns.
Víctor Manuel Jáquez Leal [Mon, 23 May 2016 21:13:55 +0000 (23:13 +0200)]
plugins: remove unused variables
This variables stopped to be used since commit
001a5c63, which removed the
gstvaapiuploader.
Víctor Manuel Jáquez Leal [Mon, 23 May 2016 16:47:46 +0000 (18:47 +0200)]
plugins: fix potential memleak from commit 9159328
If gst_video_info_from_caps() fails it is required to unref the instantiated
pool.
Víctor Manuel Jáquez Leal [Mon, 23 May 2016 16:04:47 +0000 (18:04 +0200)]
vaapipostproc: handle if gst_video_info_from_caps() fails
Return FALSE is the received caps cannot be transformed into a GstVideoInfo
structure.
Víctor Manuel Jáquez Leal [Mon, 23 May 2016 15:55:35 +0000 (17:55 +0200)]
plugins: handle if gst_video_info_from_caps() fails
Let's play safe and return error if, somehow, the received caps are wrong.
Víctor Manuel Jáquez Leal [Mon, 23 May 2016 15:47:36 +0000 (17:47 +0200)]
plugins: relate errors to instance
Use GST_{ERROR,WARNING}_OBJECT instead of GST_{ERROR,WARNING}, thus the logs
will show the name of the vaapipluginbase instance that failed.
Also, the code-style is fixed, where some error labels need to be surrounded
by braces.
Víctor Manuel Jáquez Leal [Fri, 20 May 2016 19:01:02 +0000 (21:01 +0200)]
plugins: use GstVideoInfo accessors
Instead of access to GstVideInfo members directly, use their accessors
macros. This patch makes more resistance to future changes in GStreamer core.
Víctor Manuel Jáquez Leal [Fri, 20 May 2016 17:33:39 +0000 (19:33 +0200)]
remove spurious gst_video_info_init()
gst_video_info_set_format() and gst_video_info_from_caps() call, internally,
gst_video_info_init(), hence it is not required to call it before them. This
patch removes these spurious calls.
Víctor Manuel Jáquez Leal [Fri, 20 May 2016 17:15:11 +0000 (19:15 +0200)]
vaapipluginbase: code-style: rename goto label
The error labels have error_ prefix, but this one.
Víctor Manuel Jáquez Leal [Thu, 19 May 2016 14:34:50 +0000 (16:34 +0200)]
vaapivideomemory: use allocator custom alloc flag
Instead of a dummy alloc() vmethod, the allocator instance set the flag
GST_ALLOCATOR_FLAG_CUSTOM_ALLOC, which is used by the framework to avoid call
gst_allocator_alloc() on the allocator.
Víctor Manuel Jáquez Leal [Fri, 6 May 2016 11:17:47 +0000 (13:17 +0200)]
vaapivideobufferpool: relate errors to instance
Use GST_ERROR_OBJECT instead of GST_ERROR, thus the logs will show the name of
the vaapivideobufferpool instance that failed.
Víctor Manuel Jáquez Leal [Tue, 10 May 2016 14:14:48 +0000 (16:14 +0200)]
plugins: remove gst_vaapi_plugin_base_set_pool_config()
This function helper make sense for GStreamer 1.2, but it is not helpful for
greater version since the validation is already done in the API implementation.
Thus, it is removed.
Sreerenj Balachandran [Wed, 18 May 2016 14:05:03 +0000 (17:05 +0300)]
gstvaapipluginbase: Fix typo in doc
Sreerenj Balachandran [Fri, 13 May 2016 08:45:20 +0000 (11:45 +0300)]
encoder : h264: Disable b-frame encode in low-power mode
This is a workaround since vaapi-intel-driver doesn't have
support for B-frame encode when utilizing low-power-enc
hardware block.
Fixme :We should query the VAConfigAttribEncMaxRefFrames
instead of blindly disabling b-frame support and set b/p frame count,
buffer pool size etc based on the query result.
https://bugzilla.gnome.org/show_bug.cgi?id=766050
Sreerenj Balachandran [Fri, 13 May 2016 08:44:57 +0000 (11:44 +0300)]
encoder: h264 : Use "tune=low-power" for enabling lowpower encode
Remove the duplicate property "low-power-enc" and use the
tune property for enabling low power encoding mode.
https://bugzilla.gnome.org/show_bug.cgi?id=766050
Sreerenj Balachandran [Wed, 11 May 2016 09:06:38 +0000 (12:06 +0300)]
gstvaapiencoder:Use internal api to dervie configured VAEntrypoint
https://bugzilla.gnome.org/show_bug.cgi?id=766050
Sreerenj Balachandran [Wed, 11 May 2016 09:05:36 +0000 (12:05 +0300)]
encoder: h264: Add support of low power/high performance encoding mode
Added a new property "low-power-enc" for enabling low power
encoding mode. Certain encoding tools may not be available
with the VAEntrypointEncSliceLP.
https://bugzilla.gnome.org/show_bug.cgi?id=766050
Sreerenj Balachandran [Wed, 11 May 2016 09:04:46 +0000 (12:04 +0300)]
Add mapping for Macroblock level rate control (VA_RC_MB)
Sreerenj Balachandran [Wed, 11 May 2016 09:03:08 +0000 (12:03 +0300)]
gstvaapidisplay: Add VAEntrypointEncSliceLP support
https://bugzilla.gnome.org/show_bug.cgi?id=766050