Víctor Manuel Jáquez Leal [Fri, 22 Jan 2016 18:27:13 +0000 (19:27 +0100)]
Remove old gst version guards
As gstreamer-vaapi now only supports from GStreamer 1.6, this patch removes
all the old GStreamer version guards.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Fri, 22 Jan 2016 18:23:43 +0000 (19:23 +0100)]
Remove video parser crufts
We forgot to remove gstvaapiparse.c when we removed all the videoparser
machinery.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Wed, 9 Dec 2015 18:52:33 +0000 (19:52 +0100)]
libs: remove versioning
Since we don't install libraries anymore, it makes no sense to keep
versioning them according to the gstreamer's version.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Wed, 9 Dec 2015 15:59:16 +0000 (16:59 +0100)]
libs: make libraries no installables
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Wed, 9 Dec 2015 14:37:39 +0000 (15:37 +0100)]
Do not install libgstvaapi headers
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Sreerenj Balachandran [Tue, 19 Jan 2016 08:40:54 +0000 (10:40 +0200)]
Remove videoparser patches
Víctor Manuel Jáquez Leal [Wed, 9 Dec 2015 14:18:11 +0000 (15:18 +0100)]
Remove pkg-config files
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Wed, 9 Dec 2015 12:24:30 +0000 (13:24 +0100)]
Remove codecparsers submodule
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Sreerenj Balachandran [Mon, 7 Dec 2015 22:36:36 +0000 (00:36 +0200)]
Remove libvpx submodule
We will be using upstream codecparsers always.
No more internal libvpx !
Víctor Manuel Jáquez Leal [Wed, 9 Dec 2015 13:12:22 +0000 (14:12 +0100)]
build: fix check for GstJpegParser
Right now the local JPEG parser is always compiled because the check for the
upstreamed version is broken: it looks for an non existent symbol:
GstJpegImage.
This patch changes that check for< GstJpegFrameHdr.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Michael Olbrich [Wed, 28 Oct 2015 08:56:46 +0000 (09:56 +0100)]
wayland: free the frame in frame_release_callback()
This basically reverts
62c3888b76afc69f714a020957e8c5dd9d98f561 (wayland:
decouple wl_buffer from frame).
Otherwise the frame may be overwritten while it is still used by the
compositer:
The frame done callback (frame_done_callback()) is called, when the
compositor is done processing the frame and hands it to the hardware.
The buffer release callback (frame_release_callback()) is called when the
buffer memory is no longer used.
This can be quite some time later: E.g. if weston (with the DRM backend)
puts the buffer on a hardware plane, then then buffer release callback is
called when the kernel is done with the buffer. This is usually when the
next frame is shown, so most likely after the frame done callback for the
next frame!
Since
70eff01d36a2870cbf06ffb91c2a941e8cb6b804 "wayland: sync() when
destroy()" the mentioned possible leak should no longer be a problem, so
reverting this change should cause no leaking buffers.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=758848
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Thu, 14 Jan 2016 16:36:24 +0000 (17:36 +0100)]
vaapipostproc: check ANY caps at transform_caps()
When transforming downstream caps we should check for ANY caps from peer pad,
otherwise we get a segmentation fault.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=759893
Víctor Manuel Jáquez Leal [Wed, 13 Jan 2016 18:17:02 +0000 (19:17 +0100)]
vaapisink: ignore frame if its upload failed
When gst_vaapi_plugin_base_get_input_buffer() fail to copy the input buffer
into a VAAPI buffer, the return value is GST_FLOW_NOT_SUPPORTED, and it was
ignored by the vaapisink, leading to a segmentation fault.
This patch ignores the frame that generated the GST_FLOW_NOT_SUPPORTED
returned by gst_vaapi_plugin_base_get_input_buffer(), avoiding the
segmentation fault, but doing and effort to continue rendering. This is
the same behavior of ximagesink.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=759332
Joel Holdsworth [Wed, 9 Dec 2015 16:24:50 +0000 (18:24 +0200)]
build: Don't ignore GST_PLUGIN_PATH_1_0 even if the directory doesn't exist yet
https://bugzilla.gnome.org/show_bug.cgi?id=759184
Sreerenj Balachandran [Tue, 8 Dec 2015 14:14:11 +0000 (16:14 +0200)]
Add 10 HEVC 10 bit decoding support
Only supporting vaapidecode ! vaapisink combination for now.
Missing dependencies:
1: No support for P010 video format in GStreamer
2: No support for P010 vaGetImage()/vaPutimage() in vaapi-intel-driver
3: As a result of 1&2 , we have no support for Vaapi Video memory mapping
through GstVideoMeta.
Right now we only set chroma format (YUV420 with more than 8 bits per channel)
for surface pool and keeping GST_VIDEO_FORMAT as ENCODED. The underlying format
of the surfaces is implementation (driver) defined, which is P010.
Sreerenj Balachandran [Mon, 1 Jan 2001 02:59:28 +0000 (04:59 +0200)]
gstvaapisurfacepool: Add new API to create surface pool based on chroma type
This new API gst_vaapi_surface_pool_new_with_chroma_type() is for
creating a new GstVaapiVideoPool of GstVaapiSurfaces with the specified
chroam type and dimensions. The underlying format of the surfaces is
implementation (driver) defined.
Sreerenj Balachandran [Mon, 7 Dec 2015 17:06:28 +0000 (19:06 +0200)]
Add definitions for YUV420 with more than 8 bits per channel
Sreerenj Balachandran [Mon, 7 Dec 2015 15:26:24 +0000 (17:26 +0200)]
gstvaapiporfile: Fix string representation of HEVCMain10 profile
Sreerenj Balachandran [Mon, 7 Dec 2015 14:17:11 +0000 (16:17 +0200)]
Bump version for development
Sreerenj Balachandran [Mon, 7 Dec 2015 10:52:10 +0000 (12:52 +0200)]
0.7.0
Sreerenj Balachandran [Mon, 7 Dec 2015 10:49:05 +0000 (12:49 +0200)]
NEWS: Updates
Sreerenj Balachandran [Mon, 7 Dec 2015 10:47:04 +0000 (12:47 +0200)]
AUTHORS: Update
Sreerenj Balachandran [Mon, 7 Dec 2015 10:39:23 +0000 (12:39 +0200)]
README: Update
Víctor Manuel Jáquez Leal [Thu, 26 Nov 2015 09:34:12 +0000 (10:34 +0100)]
texture: detect GL version and use the proper API
When receiving the texture from the application or the video sink, we must
know it size and border. To query the texture the API has changed according to
the OpenGL version used in the GL context of the application/vsink.
This patch checks the current context API type and queries the texture
according to this detected API.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=753099
Víctor Manuel Jáquez Leal [Thu, 26 Nov 2015 09:19:32 +0000 (10:19 +0100)]
texture: check for expected target and format
gst_vaapi_texture_glx_new_wrapped() only handles a GL_TEXTURE_2D target and
formats GL_RGBA or GL_BGRA.
This patch adds a debugging verification of those values.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=753099
Víctor Manuel Jáquez Leal [Thu, 26 Nov 2015 09:26:10 +0000 (10:26 +0100)]
libs: add gl3_bind_texture_2d()
Since OpenGL3.1 removed the fixed pipelines[1] enabling 2D textures is not
needed. In particular, the Intel's Mesa implementation complains if it is
called.
This patch add a new binding function for 2D textures, without enabling
gl3_bind_texture_2d()[2].
1. https://www.opengl.org/wiki/Fixed_Function_Pipeline
2. https://www.opengl.org/wiki/Common_Mistakes#OOP_and_hidden_binding
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=753099
Víctor Manuel Jáquez Leal [Thu, 26 Nov 2015 09:14:45 +0000 (10:14 +0100)]
libs: add gl_get_current_api()
In order to know which OpenGL API use, we must detect the API type of current
context. This patch adds the function gl_get_current_api() which returns the
OpenGL API type.
This function is an adaptation of gst_gl_context_get_current_gl_api() from
GstGL.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=753099
Sreerenj Balachandran [Fri, 27 Nov 2015 10:29:11 +0000 (12:29 +0200)]
build: Add gmodule dependency for libgstvaapi_egl
https://bugzilla.gnome.org/show_bug.cgi?id=756259
Sreerenj Balachandran [Fri, 27 Nov 2015 12:24:55 +0000 (14:24 +0200)]
patches/videoparsers: h264: Disable passthorugh mode enabling
This is a quick fix for regression introduced by the upstream
commit
e8908f5aeef952566f6bccde743c7735d3f8c6ef in h264 videoparser.
The patch is disabling the passthrough mode, otherwise it will
break multi-layer mvc stream parsing.
https://bugzilla.gnome.org/show_bug.cgi?id=758656
Víctor Manuel Jáquez Leal [Wed, 25 Nov 2015 13:12:53 +0000 (15:12 +0200)]
build: add gsth265parse patches conditionally
As gsth265parse was added in GStreamer 1.4, and gstreamer-vaapi still support
GStreamer 1.2, the patching of gsth265parse must be conditional to the target
GStreamer version.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=755525
Víctor Manuel Jáquez Leal [Wed, 25 Nov 2015 13:11:28 +0000 (15:11 +0200)]
build: declare correctly parse lib built files
This is a continuation of commit
fc8a0d12
When declaring BUILT_SOURCES, those files should not be distributed. This
patch avoids the distribution of the generated source code.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=755525
Sreerenj Balachandran [Tue, 24 Nov 2015 15:14:20 +0000 (17:14 +0200)]
build: libvpx: Add missing source file
Sreerenj Balachandran [Mon, 23 Nov 2015 15:21:23 +0000 (17:21 +0200)]
vaapipostproc: Correctly detect the caps change
This is a quick fix for regression introuduced by the
commit
757833230bc73b8e3b4e31649e4618ba802bea51
With out this, the gst_vaapipostproc_create() will
never get invoked.
https://bugzilla.gnome.org/show_bug.cgi?id=758543
Víctor Manuel Jáquez Leal [Wed, 18 Nov 2015 19:48:30 +0000 (20:48 +0100)]
build: libvpx: update the sources lists
`make dist` broke since commit f06798 (libvpx: Update the submodule to
libvpx-1.4.0) because the sources.frag does not contain all the module
sources.
This patch updates thoroughly the sources.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=755525
Víctor Manuel Jáquez Leal [Mon, 16 Nov 2015 16:49:01 +0000 (17:49 +0100)]
vaapipostproc: don't set caps change at first set
When the source caps change, the filter is destroyed and recreated.
Nonetheless, this happens every time the vaapipostproc starts, since the caps
change detection algorithm does not take in consideration when the caps are
set by first time.
This patch intents to be an optimization, to avoid a useless filter
destroy-creation cycle when the sources caps are set for first time.
The new helper function video_info_update() is a refactorization to avoid
duplicated code.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=758007
Víctor Manuel Jáquez Leal [Thu, 12 Nov 2015 15:13:25 +0000 (16:13 +0100)]
vaapipostproc: params video_info_changed() callers
The signature is video_info_changed(old_vip, new_vip). Nonetheless the callers
swapped the the order. This didn't raise problems since the comparison of both
structures were not affected by its semantics.
But still it would be better to fix this to keep the coherence of the code.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=758007
Víctor Manuel Jáquez Leal [Thu, 24 Sep 2015 10:35:44 +0000 (10:35 +0000)]
build: declare real built files
When runnig the `make dist` target from a clean tree, it fails because
if could not find the copied files from codecparsers submodule.
They weren't copied because they weren't declared as built sources.
This patch removes the stamp mechanism and use the actual file list to copy
as the built sources. Also it fixes the duplication of the parser files.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=755525
Sreerenj Balachandran [Tue, 17 Nov 2015 17:37:07 +0000 (19:37 +0200)]
decoder: vp9: Fix last/golden/altref frame index setting
Always fill VADecPictureParameterBufferVP9 last/golden/altref indices
based on what ever reference frame indices encoded in frame header.
Víctor Manuel Jáquez Leal [Tue, 25 Aug 2015 16:01:51 +0000 (16:01 +0000)]
debian: remove custom parallel compilation
In order to build a debian package with upstream source, the user should
do
./autogen.sh
cp -a debian.upstream debian
debuild -eDEB_BUILD_OPTIONS="parallel=8" -us -uc -b
The environment variable DEB_BUILD_OPTIONS="parallel=8" is the canonical
way to make a parallel build (-j8 in this case).
This commit removes the script in debian/rules that detects the number of
cpus, requested by the environment variable DEBIAN_BUILD_NCPUS, which is not
official in debian.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754087
Sreerenj Balachandran [Mon, 16 Nov 2015 16:22:55 +0000 (18:22 +0200)]
decoder: vp9: Fix PTS calculation of cloned frames
Sreerenj Balachandran [Mon, 16 Nov 2015 16:22:33 +0000 (18:22 +0200)]
decoder: vp9: Avoid unnecessary show_frame flag checking while doing picture output
We always set GST_VAAPI_PICTURE_FLAG_SKIPPED for DECODE_ONLY frames and the
gstvaapidecoder base calss is reponsible for handling those frames later on.
No need for explicit verification of frame header's show_frame in order to
do picture outputing.
Sreerenj Balachandran [Mon, 16 Nov 2015 16:22:14 +0000 (18:22 +0200)]
decoder: vp9: Fix ref picture update while doing repeat frame
Don't try to do frame decoding and reference picture update
while receiving a vp9 frame having show_existing_frame flag
set as TRUE.
Sreerenj Balachandran [Mon, 16 Nov 2015 16:21:56 +0000 (18:21 +0200)]
decoder: vp9: Add repeat-frame display handling
If vp9 frame header come up with show_existing_frame flag set,
we should duplicate the existing decoded frame as current frame to
be displayed.
Víctor Manuel Jáquez Leal [Thu, 12 Nov 2015 10:07:38 +0000 (11:07 +0100)]
vaapidecodebin: add me as element co-author
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757957
Víctor Manuel Jáquez Leal [Thu, 12 Nov 2015 11:47:01 +0000 (12:47 +0100)]
vaapidecodebin: try to get display from decoder
Rather than create a dummy display, if none has propagated as a context, we
should try to get the one from vaapidecode.
As the bin is already in READY state, the vaapidecode should be also in that
state. That means that the contexts have been negotiated, and it should have
already a display.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757957
Víctor Manuel Jáquez Leal [Wed, 11 Nov 2015 18:04:25 +0000 (19:04 +0100)]
vaapidecodebin: add postprocessor dynamically
The former approach to left the bin unfinished has some problems: the context
cannot be shared because the vaapidecode is unlinked in many cases, leading to
creating a VADisplay twice.
Initially the bin is fully functional, constructed as
(-----------------------------------)
| vaapidecodebin |
| (-------------) (-------) |
|<--| vaapidecode |--->| queue |--->|
| (-------------) (-------) |
(-----------------------------------)
When the context is shared and the VADisplay has VPP capabilities, before
changing to READY state, the bin is reconfigured dynamically, adding the
vaapipostproc element afeter the queue:
(--------------------------------------------------------)
| vaapidecodebin |
| (-------------) (-------) (---------------) |
|<--| vaapidecode |--->| queue |--->| vaapipostproc |--->|
| (-------------) (-------) (---------------) |
(--------------------------------------------------------)
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757957
Víctor Manuel Jáquez Leal [Wed, 11 Nov 2015 15:33:24 +0000 (16:33 +0100)]
vaapidecodebin: delay the bin configuration
Delay the bin configuration until changing to READY state. This is because we
should add the vaapipostproc element until the vaapidecode has emitted the
HAVE_CONTEXT message, so de gst_bin_add() could set the context set to
vaapipostproc.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757957
Sreerenj Balachandran [Fri, 13 Nov 2015 17:39:56 +0000 (19:39 +0200)]
decoder: vp9: Add crop rectangle support.
Set crop rectange if:
There is display_width and display_height which is different from actual width/height
or
The changed resolution is less than the actual configured dimension of surfaces
Sreerenj Balachandran [Fri, 13 Nov 2015 17:23:05 +0000 (19:23 +0200)]
decoder: vp9: Fix the context and surface pool reset for multi resolution video
Unlike other decoders, vp9 decoder doesn't need to reset the
whole context and surfaces for each resolution change. Context
reset only needed if resolution of any frame is greater than
what actullay configured. There are streams where a bigger
resolution set in ivf header or webm header but actual resolution
of all frames are less. Also it is possible to have inter-prediction
between these multi resolution frames.
Sreerenj Balachandran [Fri, 13 Nov 2015 16:58:33 +0000 (18:58 +0200)]
decoder: vp9: Fill the VADecPictureParameterBufferVP9 width/height from frame header
Always fill width/height of VADecPictureParameterBufferVP9 from frame header.
Preliminary fix for supproting multi resolution video decode.
Sreerenj Balachandran [Fri, 13 Nov 2015 16:51:27 +0000 (18:51 +0200)]
vaapidecode: Add comments for corner case fixes and fix couple of indentations.
Sreerenj Balachandran [Fri, 13 Nov 2015 16:41:53 +0000 (18:41 +0200)]
decoder: vp9: Set lossless flag from frame header
Sreerenj Balachandran [Fri, 13 Nov 2015 16:40:52 +0000 (18:40 +0200)]
codecparsers: Update to gst-vaapi-branch d9f25
d9f2527: codecparsers: vp9: Set lossless flag in frame header
Víctor Manuel Jáquez Leal [Wed, 11 Nov 2015 18:16:16 +0000 (19:16 +0100)]
libs: vp9: remove unused symbols
clang complains about a couple variables and one label which were not
used. This patch removes them.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757958
Sreerenj Balachandran [Tue, 10 Nov 2015 17:00:22 +0000 (19:00 +0200)]
codecparsers: Update to gst-vaapi-branch da251bb
da251bb: codecparsers: vp9: Optimize the memory allocation
f5759f4: codecparsers: vp9: Fix the wrong memcpy of probability arrays
Víctor Manuel Jáquez Leal [Thu, 5 Nov 2015 11:58:52 +0000 (12:58 +0100)]
plugin: guard pointers to pad query functions
Since gstreamer 1.4 is not required to have pad query functions if the query
vmethods are used.
This patch guards out the pad query functions for gstreamer < 1.4
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757629
Víctor Manuel Jáquez Leal [Thu, 5 Nov 2015 11:39:55 +0000 (12:39 +0100)]
vaapiencode: use pad query vmethods
GstVideoEncoder, the base class of vaapiencode, added support for pad queries
as virtual methods since gstreamer 1.4. This patch enables those vmethods,
while keeps support for previous versions of gstreamer.
This patch is relevant since GstVideoEncoder takes care of other queries that
we are currently ignoring.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757629
Víctor Manuel Jáquez Leal [Wed, 28 Oct 2015 12:01:04 +0000 (13:01 +0100)]
vaapidecode: return pad's template caps if no display
A caps query can occur before the element has a display. In that case, the
element can return its pad's template. But when the element already has a
display, and the caps probe fails, the element shall return an empty caps, so
the auto-plug could try with another decoder.
If the element has a display and the caps probe works, then the computed caps
should be returned.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Wed, 28 Oct 2015 11:59:02 +0000 (12:59 +0100)]
plugins: don't create display at caps query
Caps query can happen before the element has a bus. The display creation should
be should occur on the context negotiation, when the bus is already configured.
Then at caps query no display should be created.
Instead of force the display creation, we graciously fail the allowed_caps()
creation.
This change only applies for vaapidecode and vaapisink. The vaapipostroc, as a
basetransform descendant, seems to be not affected by this, nor the encoders.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Wed, 4 Nov 2015 20:38:42 +0000 (21:38 +0100)]
plugins: fix context query handling
The current context query handling design is flawed: the function
gst_vaapi_reply_to_query() returns FALSE either if the query is not a
GST_CONTEXT_QUERY of if the query could not be handled correctly. But the
pad query function should handle differently each case.
This patch changes the gst_vaapi_reply_to_query() for
gst_vaapi_handle_context_query() and changes it usage in all the vaapi plugins
to match the correct context query handling.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Wed, 4 Nov 2015 19:37:05 +0000 (20:37 +0100)]
plugin: don't lose previous context at query
When processing the GST_CONTEXT_QUERY we should not lose the previous
context in the query, we should only add our display structure.
This patch copies the old context, if it is there, and stamp our display on
it. Otherwise, a new context is created.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Wed, 4 Nov 2015 19:29:03 +0000 (20:29 +0100)]
vaapivideocontext: add gst_vaapi_video_context_set_display()
This function set the display to an already created context. This function is
going to be used later.
Also, gst_vaapi_video_context_new_with_display() now uses this function.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Fri, 30 Oct 2015 11:27:16 +0000 (12:27 +0100)]
plugins: check if display is set in sync
Since the context messages are sync'ed, the display assignation happens in the
same thread, hence we can know if the display was found or not as soon we call
for it.
In order to take advantage of it, gst_vaapi_video_context_prepare() receives,
as a new parameter, the address of the plugin's display, and reports back if
the display was found and set.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Fri, 30 Oct 2015 11:33:48 +0000 (12:33 +0100)]
plugins: set display through context
Instead of setting the display to the plugin directly after its creation, do
it through the gstreamer's context mechanism, avoiding double assignations.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Mon, 2 Nov 2015 17:20:07 +0000 (18:20 +0100)]
vaapivideocontext: rename context structure
The context structure is named "display" which is too generic. The contrary
happens, for example, with GstGL, what uses the same name as the context, and
its logs make more sense.
This patch renames the context structure with the same name as the
context, thus GST_PTR_FORMAT can pretty print it.
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Wed, 4 Nov 2015 18:02:34 +0000 (19:02 +0100)]
vaapivideocontext: refactor gst_vaapi_video_context_prepare()
First, refactorized run_context_query() into _gst_context_run_query(), adding
a new parameter: the pad direction, in order to simplify the code.
Second, added a new helper function: _gst_context_query(), which is a generic
context query function. It isolates the operation of running the query and
sets the context if found, also it enhances the logs.
_gst_context_query() is similar to the one used in GstGL. Perhaps, in the
future this helper function will be merged into the core libraries of
GStreamer.
Finally, gst_vaapi_video_context_prepare() was rewritten to use
_gst_context_query().
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Fri, 30 Oct 2015 10:18:47 +0000 (11:18 +0100)]
vaapivideocontext: refactor context category debug
Refactor the extraction GST_CAT_CONTEXT logging using a only once
initializator, so we could get the debug category from different code
paths, safely.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Fri, 23 Oct 2015 09:17:01 +0000 (11:17 +0200)]
gstvaapivideocontext: fix indentation
gst-indent does not handle correctly some expression like function
declaration with attributes, breaking the following expressions.
This patch makes gst-indent to ignore the attributed function
declartion so the followed function definition is not mangled, such
as happened in commit b4154a
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Mon, 2 Nov 2015 15:48:27 +0000 (16:48 +0100)]
plugin: chain up set_context() vmethod
Since Gstreamer 1.7, set_context() vmethod needs to be chained up with
the parent class in order to broadcast all its contexts when the element
is added into a bin:
http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=
d5ded1588920c4471eefe055d09095d9e5e989b5
There is no need to guard the call, because before GStreamer 1.7, the
set_context() vmethod was NULL in the element class, hence the conditional
call make it safe.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757598
Víctor Manuel Jáquez Leal [Fri, 6 Nov 2015 09:20:34 +0000 (10:20 +0100)]
tests: simple-encoder: remove dead code
The caps creation for codec state configuration is not used. Let's remove it.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Mon, 2 Nov 2015 18:05:07 +0000 (19:05 +0100)]
vaapidecodebin: fix a leaked display instance
The display returned by gst_vaapi_video_context_get_display() increments the
references. Thus, we have to unref the returned display.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757595
Víctor Manuel Jáquez Leal [Wed, 4 Nov 2015 15:50:44 +0000 (16:50 +0100)]
libs: remove unneeded headers
Since gstvaapidisplay_glx.h do not expose gl.h/glx.h structures, it is not
required to include them in the header. It is not also required to include
them in gstvaapidisplay_glx.c, since gstvaapiutils_glx.h includes them and
exposes their structures (e.g. GLXPixmap).
Nonetheless, glext.h neither glxext.h are required to include, they are
already included conditionally by gl.h and glx.h, respectively.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757577
Sreerenj Balachandran [Fri, 6 Nov 2015 17:18:54 +0000 (19:18 +0200)]
codecparsers: Update to gst-vaapi-branch 0ea6792
0ea6792: codecparsers: vp9: Add header comments
347ffc7: codecparsers: vp9: Use g_slice_free() for releasing memory allocated from the slice allocator
Sreerenj Balachandran [Fri, 6 Nov 2015 13:19:38 +0000 (15:19 +0200)]
VP9: plugins: Add VP9 decoder
Sreerenj Balachandran [Fri, 6 Nov 2015 13:12:51 +0000 (15:12 +0200)]
VP9: libgstvaapi: Add VP9 decoder
Sreerenj Balachandran [Fri, 6 Nov 2015 12:57:00 +0000 (14:57 +0200)]
VP9: gstvaapiprofile: Add profile definitions
Sreerenj Balachandran [Fri, 6 Nov 2015 12:39:22 +0000 (14:39 +0200)]
VP9: build: Check availability of vp9 decoder APIs
Sreerenj Balachandran [Fri, 6 Nov 2015 12:24:08 +0000 (14:24 +0200)]
VP9: Allow building vp9 codecparser internally
Sreerenj Balachandran [Fri, 6 Nov 2015 10:38:46 +0000 (12:38 +0200)]
codecparsers: Update to gst-vaapi-branch commit ac5dc1a
ac5dc1a: codecparsers: vp9: Add vp9 codec parser
e7d9217: codecparser: h264: initialize parsing structures
403d400: codecparser: h265: initialize parsing structures
Víctor Manuel Jáquez Leal [Wed, 4 Nov 2015 14:37:34 +0000 (15:37 +0100)]
configure.ac: don't use an undefined variable
If the environment lacks of gstreamer development packages, this error will
be reported to the user: "gstreamer- was not found"
This is because we are using an undefined variable in the printed message. The
fix simple changes the variable for the hard-coded string "1.0".
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757283
Víctor Manuel Jáquez Leal [Fri, 16 Oct 2015 13:55:40 +0000 (15:55 +0200)]
vaapidecode: relax guards for memory:VASurface capsfeature
Though caps features are supported since GStreamer 1.2, there are some
issues with the features caps negotiation in that version. Nonetheless,
those issues are fixed in GStreamer 1.4. So, the memoy:VASurface caps
feature negotiation is relaxed for GStreamer 1.4.
The guard is the same as in vaapisink's caps template.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=756686
Víctor Manuel Jáquez Leal [Thu, 15 Oct 2015 16:18:36 +0000 (18:18 +0200)]
vaapidecode: decide allocation doesn't update srccaps
The received caps query will bring the already negotiated caps, so they are
not expected to change.
This patch removes this verification which is dead code path.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=756686
Víctor Manuel Jáquez Leal [Wed, 14 Oct 2015 18:30:30 +0000 (20:30 +0200)]
vaapidecode: use caps to check the features
Instead of calling gst_vaapi_find_preferred_caps_feature(), which is
expensive, we check the caps from the allocation query, to check the
negotiated feature.
In order to do this verification a new utility function has been implemented:
gst_vaapi_caps_feature_contains().
As this new function shared its logic with gst_caps_has_vaapi_surface(), both
have been refactorized.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=756686
Víctor Manuel Jáquez Leal [Wed, 14 Oct 2015 18:22:43 +0000 (20:22 +0200)]
vaapidecode: set format before decide allocation
There is a regression from commit 3d8e5e. It was expected the buffer pool
allocation occur before the caps negotiation, but it is not.
This patch fixes this regression: the caps negotiation is done regardless the
allocation query from downstream.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=756686
Lim Siew Hoon [Fri, 16 Oct 2015 12:21:50 +0000 (20:21 +0800)]
build: check for patch and fix yasm check
Add configure checking for GNU patch tools and fixed configure
checking YASM to correct sequence.
Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=756690
Sreerenj Balachandran [Thu, 15 Oct 2015 16:20:21 +0000 (19:20 +0300)]
build: Remove disable-md5 option for libvpx build
The configure option --disable-md5 was provided in libvpx-1.3.0 which
has been removed in 1.4.0.
Sreerenj Balachandran [Thu, 15 Oct 2015 16:00:26 +0000 (19:00 +0300)]
libvpx: Update the submodule to libvpx-1.4.0
libvpx git commit:
c74bf6d889992c3cabe017ec353ca85c323107cd
Sreerenj Balachandran [Thu, 15 Oct 2015 07:59:08 +0000 (10:59 +0300)]
configure: mark support for GStreamer 1.2 as obsolete.
Support for GStreamer 1.2 is obsolete. i.e. it is no longer supported.
Our goal is to support the last two stable versions of GStreamer which
are 1.4 and 1.6 at the moment.
We still keep the 1.2 specific codes until the next gstreamer-vaapi-0.7
release and will get rid of those in 0.8.
Sreerenj Balachandran [Mon, 12 Oct 2015 11:13:03 +0000 (14:13 +0300)]
vaapidecode: Fix buffer copy assertion
Don't try to copy the NULL buffer-codec_data.
Víctor Manuel Jáquez Leal [Mon, 28 Sep 2015 12:57:33 +0000 (14:57 +0200)]
build: allow builds against GStreamer 1.7.x
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Wed, 23 Sep 2015 14:02:46 +0000 (16:02 +0200)]
gstcompat: add gst_buffer_copy_deep() if gst < 1.5
gst_buffer_copy_deep() was added in GStreamer 1.5. If want to use it we should
add an implementation if gstreamer-vaapi is linked to previous versions.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Wed, 23 Sep 2015 10:13:41 +0000 (12:13 +0200)]
vaapidecode: simplify copy of GstVideoCodecState
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Víctor Manuel Jáquez Leal [Mon, 14 Sep 2015 17:21:08 +0000 (19:21 +0200)]
patches/videoparsers: h265parser: more API fences
Add more API fences according with its version and refresh the patch.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754845
Víctor Manuel Jáquez Leal [Mon, 14 Sep 2015 17:19:56 +0000 (19:19 +0200)]
patches/videoparsers: h265parser: rename patch keeping number
Refresh the patch and rename it in order to keep the patch number.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754845
Víctor Manuel Jáquez Leal [Mon, 14 Sep 2015 17:18:33 +0000 (19:18 +0200)]
patches/videoparsers: h264parser: more API fences and refresh
Add more API fences according with its version and refresh the patch.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754845
Víctor Manuel Jáquez Leal [Mon, 14 Sep 2015 17:16:51 +0000 (19:16 +0200)]
patches/videoparsers: h264parser: fix description and refresh
Fix a typo in the patch description and refresh it in order to avoid the
creation of .orig files and break the distcheck target.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754845
Víctor Manuel Jáquez Leal [Mon, 14 Sep 2015 17:15:18 +0000 (19:15 +0200)]
patches/videoparsers: h264parser: refresh patches
In order to avoid the creation of .orig files and break the distcheck target.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754845
Víctor Manuel Jáquez Leal [Tue, 15 Sep 2015 14:53:31 +0000 (16:53 +0200)]
build: link libgstvaapi_parse against codec parser
GST_CODEC_PARSER_* variables are defined if builtin codec parsers are disabled
when running configure.
Right now, libgstcodecparsers links only to libgstvaapi, but libgstvaapi_parse
need it if builtin codec parsers are disabled.
This patch adds GST_CODEC_PARSER_* variables to libgstvaapi_parse
compilation. If builtin codec parsers are enable, this variable is null, so it
should work using libgstvaapi, as normal.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754845
Víctor Manuel Jáquez Leal [Fri, 11 Sep 2015 14:35:30 +0000 (16:35 +0200)]
build: verify for H264 MVC and H265 SPS
Currently the H264 and H265 parsers look for MVC and SPS respectively, and
the required symbols for those were added in GStreamer 1.5
If we try to compile in GStreamer < 1.4, without enabling the builtin codec
parsers, the compilation fails, because the lack of those symbols.
This patch verifies if the installed H264 and H265 parsers have those symbols. If
they do not, the specific built in codec parsers are enabled and used.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754845
Víctor Manuel Jáquez Leal [Fri, 11 Sep 2015 14:49:16 +0000 (16:49 +0200)]
decoder: h264: initialize PPS's slice_group_id
When the GstVaapiParserInfoH264 is allocated, the memory is not initialized,
so it contains random data.
When gst_h264_parser_parse_pps() fails, the PPS structure keeps slice_group_id
pointer uninitialized, leading to a segmentation fault when the memory is
freed.
This patch prevents this by initializing the slice_group_id before the PPS
parsing.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=754845