Gwenole Beauchesne [Tue, 27 Jan 2015 15:21:04 +0000 (16:21 +0100)]
egl: add windowing support.
This provides for some basic EGL window abstraction.
Gwenole Beauchesne [Sat, 24 Jan 2015 07:29:57 +0000 (08:29 +0100)]
egl: add texture abstraction.
Add GstVaapiTextureEGL abstraction that can create its own GL texture,
or import a foreign allocated one, while still allowing updates from a
VA surface.
Gwenole Beauchesne [Tue, 9 Dec 2014 17:14:56 +0000 (18:14 +0100)]
egl: allow for EGLImage imports into VA Surfaces.
Add helpers to import EGLImage objects into VA surfaces. There are
two operational modes: (i) gst_vaapi_surface_new_from_egl_image(),
which allows for implicit conversion from EGLImage to a VA surface
in native video format, and (ii) gst_vaapi_surface_new_with_egl_image(),
which exactly wraps the source EGLImage, typically in RGBA format
with linear storage.
Note: in case of (i), the EGLImage can be disposed right after the
VA surface creation call, unlike in (ii) where the user shall ensure
that the EGLImage is live until the associated VA surface is no longer
needed.
https://bugzilla.gnome.org/show_bug.cgi?id=743847
Gwenole Beauchesne [Fri, 20 Feb 2015 14:27:53 +0000 (15:27 +0100)]
Add initial support for EGL.
Add initial support for EGL to libgstvaapi core library. The target
display server and the desired OpenGL API can be programmatically
selected at run-time.
A comprehensive set of EGL utilities are provided to support those
dynamic selection needs, but also most importantly to ensure that
the GL command stream is executed from within a single thread.
https://bugzilla.gnome.org/show_bug.cgi?id=743846
Gwenole Beauchesne [Fri, 30 Jan 2015 20:38:07 +0000 (21:38 +0100)]
libs: initialize GValues in a thread-safe manner.
Gwenole Beauchesne [Fri, 30 Jan 2015 20:35:10 +0000 (21:35 +0100)]
libs: re-indent all GValue related source code.
Gwenole Beauchesne [Thu, 22 Jan 2015 21:45:24 +0000 (22:45 +0100)]
vaapidecode: partially revert
0777f35.
Reset the VA decoder after updating the base plugin caps, and most
importantly, after GstVideoDecoder negotiation. The reason behind
this is that the negotiation could trigger a last decide_allocation()
where we could actually derive a new GstVaapiDisplay to use from the
downstream element. e.g. GLX backend.
Sreerenj Balachandran [Thu, 19 Feb 2015 11:37:09 +0000 (13:37 +0200)]
vaapidecode: Caps query should return the list of all supported caps.
Query caps filtering should be always done on top of allowed caps instead
of existing fixed caps on a particular pad.
This fixes the mvc stream decoding when there is a base view(high profile)
and non-base view(stereo-high profile).
Víctor Manuel Jáquez Leal [Wed, 18 Feb 2015 11:36:16 +0000 (13:36 +0200)]
vaapidecode: intersect filter from query caps
According to documentation[1] when receiving a GST_QUERY_CAPS
the return value should be all formats that this elements supports,
taking into account limitations of peer elements further downstream
or upstream, sorted by order of preference, highest preference first.
This patch add those limitations intersecting with the received
filter in the query. Also takes into account the already negotiated
caps. Also adds the processing of the query on the SRC pad.
1. http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/section-nego-getcaps.html
https://bugzilla.gnome.org/show_bug.cgi?id=744406
Víctor Manuel Jáquez Leal [Wed, 18 Feb 2015 09:46:11 +0000 (11:46 +0200)]
Fix compiler warnings
This patch fixes some warnings that gcc 4.9 reports.
https://bugzilla.gnome.org/show_bug.cgi?id=744411
Víctor Manuel Jáquez Leal [Wed, 18 Feb 2015 09:22:21 +0000 (11:22 +0200)]
vaapidecode: Use GST_DEBUG_FUNCPTR for gst_vaapidecode_query()
Hence the function name is shown in the gst-inspect-1.0 information
rather than the memory address.
https://bugzilla.gnome.org/show_bug.cgi?id=744330
Víctor Manuel Jáquez Leal [Wed, 18 Feb 2015 09:21:35 +0000 (11:21 +0200)]
vaapidecode: log flow error name
https://bugzilla.gnome.org/show_bug.cgi?id=744387
Víctor Manuel Jáquez Leal [Wed, 18 Feb 2015 09:20:42 +0000 (11:20 +0200)]
VC1: decoder: Ignore VC1 user BDU's
Don't return error if the processed BDU is a user one, just ignore them.
https://bugzilla.gnome.org/show_bug.cgi?id=741237
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Olivier Crete [Wed, 18 Feb 2015 09:19:26 +0000 (11:19 +0200)]
vaapidecode: Emit error GstMessage when returning a GST_FLOW_ERROR
This is required in GStreamer, elements should never return
GST_FLOW_ERROR without posting an ERROR message on the bus.
https://bugzilla.gnome.org/show_bug.cgi?id=744620
Sreerenj Balachandran [Fri, 13 Feb 2015 11:45:32 +0000 (13:45 +0200)]
plugins: Add VP8 Encoder
Sreerenj Balachandran [Fri, 13 Feb 2015 11:42:04 +0000 (13:42 +0200)]
Add VP8 Encoder to core libgstvaapi.
Sreerenj Balachandran [Fri, 13 Feb 2015 11:40:19 +0000 (13:40 +0200)]
configure: Add Check for VP8 Encoding API
Lim Siew Hoon [Tue, 10 Feb 2015 09:40:16 +0000 (11:40 +0200)]
decoder: vc1: Rounding control handling for VC1 simple and Main profile
Added rounding control handling for VC1 simple and Main profile
based on VC1 standard spec: section 8.3.7
https://bugzilla.gnome.org/show_bug.cgi?id=743958
Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Sreerenj Balachandran [Fri, 6 Feb 2015 10:10:51 +0000 (12:10 +0200)]
build: fix make dist when certain conditionals not met.
Fix typo which was preventing the inclusion of jpeg encoder
source files from make dist (when there is no jpeg encoder
API support in libva).
Sreerenj Balachandran [Thu, 5 Feb 2015 11:08:53 +0000 (13:08 +0200)]
encoder: jpeg: Fix the sampling factor calculation for ENCODED format.
If the incoming raw video format is GST_VIDEO_FORMAT_ENCODED,
use native YUV420 format (which is i420) as default.
Sreerenj Balachandran [Thu, 5 Feb 2015 10:13:38 +0000 (12:13 +0200)]
encoder: Only support YUV420 native format as input for now
Practically we should be able to support more formats, for eg:
JPEG Encoder can support YUV422, RGBA and all.
But this is causing more issues which need proper fix here and there.
Olivier Crete [Wed, 4 Feb 2015 16:34:59 +0000 (18:34 +0200)]
vaapidecode: Check the condition after taking the lock
Otherwise the condition could become true before the lock
is taken and the g_cond_signal() could be called
before the g_cond_wait(), so the g_cond_wait() is never
awoken.
https://bugzilla.gnome.org/show_bug.cgi?id=740645
Sreerenj Balachandran [Wed, 4 Feb 2015 09:18:29 +0000 (11:18 +0200)]
plugins: Add JPEG encoder element
Sreerenj Balachandran [Wed, 4 Feb 2015 09:17:58 +0000 (11:17 +0200)]
gstvaapicontext: Add VAConfigAttribValEncJPEG to the attribute list using for VAConfig creation.
Sreerenj Balachandran [Wed, 4 Feb 2015 09:17:27 +0000 (11:17 +0200)]
gstvaapicontext: Don't use the unsupported Ratecontrol attributes for vaCreateConfig
Don't add the VAConfigAttribRateControl to the attribute list using
for the vaCreateConfig if it is not supported by the driver.
Sreerenj Balachandran [Wed, 4 Feb 2015 09:17:06 +0000 (11:17 +0200)]
gstvaapiencoder: Use hardcoded packed_raw_data flag for JPEG Encoding
Sreerenj Balachandran [Wed, 4 Feb 2015 09:16:37 +0000 (11:16 +0200)]
gstvaapiencoder: Fix crash when handling rate control mask
Having a ratecontrol_mask equal to zero is not a bug, but the driver
might not be supporting any kind of rate control mechanisms.
Eg: JPEG Encoding
Sreerenj Balachandran [Wed, 4 Feb 2015 09:16:05 +0000 (11:16 +0200)]
encoder: Add JPEG Encoder
Sreerenj Balachandran [Wed, 4 Feb 2015 09:15:38 +0000 (11:15 +0200)]
encoder_objects: Add QuantizationMatrix and JPEGHuffmanTable
Sreerenj Balachandran [Wed, 4 Feb 2015 09:15:00 +0000 (11:15 +0200)]
Encode: Add support for Picture level Entrypoint
This is useful for JPEG encoding which is utilizing picture level
entrypoint instead of slice level entrypoint like h264,mpeg2 etc.
Sreerenj Balachandran [Wed, 4 Feb 2015 09:14:15 +0000 (11:14 +0200)]
configure: Add Check for JPEG encoding API
Sreerenj Balachandran [Tue, 3 Feb 2015 11:08:53 +0000 (13:08 +0200)]
AUTHORS: Updates
Sreerenj Balachandran [Tue, 3 Feb 2015 11:08:01 +0000 (13:08 +0200)]
Bump version for development.
Sreerenj Balachandran [Tue, 3 Feb 2015 08:00:42 +0000 (10:00 +0200)]
0.5.10
Sreerenj Balachandran [Tue, 3 Feb 2015 08:00:23 +0000 (10:00 +0200)]
NEWS: Updates
Sreerenj Balachandran [Mon, 2 Feb 2015 09:43:58 +0000 (11:43 +0200)]
Fix compilation error if there is no GL/gl.h header file installed
Gwenole Beauchesne [Wed, 28 Jan 2015 17:09:40 +0000 (18:09 +0100)]
plugins: drop leftover declaration.
GstVaapiVideoMemory quark is not needed any more, and the actual
implementation was already removed bfore the merge. i.e. this is
an oversight for a hunk that was not meant to be pushed.
Gwenole Beauchesne [Mon, 26 Jan 2015 17:30:47 +0000 (18:30 +0100)]
plugins: add support for dma_buf exports (v4l2src).
Allow v4l2src element to connected to vaapipostproc or vaapisink when
"io-mode" is set to "dmabuf-import". In practice, this is a more likely
operational mode with uvcvideo. Supporting v4lsrc with "io-mode" set
to "dmabuf" could work, but with more demanding driver or kernel reqs.
Note: with GStreamer 1.4, v4l2src (gst-plugins-good) needs to be built
with --without-libv4l2.
https://bugzilla.gnome.org/show_bug.cgi?id=743635
Wind Yuan [Thu, 23 Jan 2014 10:00:09 +0000 (05:00 -0500)]
plugins: add support for dma_buf imports.
Allow imports of v4l2 buffers into VA surfaces for further operation
with vaapi plugins, e.g. vaapipostproc or vaapiencode_* elements.
https://bugzilla.gnome.org/show_bug.cgi?id=735362
[fixed memory leaks, ported to new dma_buf infrastructure, cleanups]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Gwenole Beauchesne [Mon, 15 Sep 2014 13:27:50 +0000 (15:27 +0200)]
surface: add support for GEM buffer imports.
Add support for GEM buffer imports. This is useful for VA/EGL interop
with legacy Mesa implementations, or when it is desired or required to
support outbound textures for instance.
https://bugzilla.gnome.org/show_bug.cgi?id=736718
Gwenole Beauchesne [Mon, 15 Sep 2014 13:25:09 +0000 (15:25 +0200)]
surface: add support for dma_buf imports.
Add new gst_vaapi_surface_new_with_dma_buf_handle() helper function
to allow for creating VA surfaces from a foreign DRM PRIME fd. The
resulting VA surface owns the supplied buffer handle.
https://bugzilla.gnome.org/show_bug.cgi?id=735362
Gwenole Beauchesne [Tue, 27 Jan 2015 10:19:58 +0000 (11:19 +0100)]
surface: add initial support for foreign buffer imports.
Add gst_vaapi_surface_new_from_buffer_proxy() helper function to
create a VA surface from an external buffer provided throug the
new GstVaapiBufferProxy object.
Gwenole Beauchesne [Mon, 15 Sep 2014 11:47:53 +0000 (13:47 +0200)]
surface: add support for GEM buffer exports.
Add support for GEM buffer exports. This will only work with VA drivers
based off libdrm, e.g. the Intel HD Graphics VA driver. This is needed
to support interop with EGL and the "Desktop" GL specification. Indeed,
the EXT_image_dma_buf_import extension is not going to be supported in
Desktop GL, due to the lack of support for GL_TEXTURE_EXTERNAL_OES targets
there.
This is useful for implementing VA/EGL interop with legacy Mesa stacks,
in Desktop OpenGL context.
https://bugzilla.gnome.org/show_bug.cgi?id=736717
Gwenole Beauchesne [Mon, 15 Sep 2014 09:48:05 +0000 (11:48 +0200)]
surface: add support for dma_buf exports.
Use the new VA buffer export APIs to allow for a VA surface to be
exposed as a plain PRIME fd. This is in view to simplifying interop
with EGL or OpenCL for instance.
https://bugzilla.gnome.org/show_bug.cgi?id=735364
Gwenole Beauchesne [Mon, 15 Sep 2014 08:58:51 +0000 (10:58 +0200)]
Add abstraction for exported VA buffers.
The VA buffer export APIs work for a particular lifetime starting from
vaAcquireBufferHandle() and ending with vaReleaseBufferHandle(). As such,
it could be much more convenient to support implicit releases by simply
having a refcount reaching zero.
https://bugzilla.gnome.org/show_bug.cgi?id=736721
Sreerenj Balachandran [Wed, 28 Jan 2015 16:25:09 +0000 (18:25 +0200)]
Add missing header file to Makefile
Add gstvaapitexture_glx.h to Makefile.am
Gwenole Beauchesne [Tue, 27 Jan 2015 10:44:12 +0000 (11:44 +0100)]
videopool: add optional flags for surface pool allocation.
Reword surface pool allocation helpers so that to allow for a simple
form, e.g. gst_vaapi_surface_pool_new(format, width, height); and a
somewhat more elaborated/flexible form with optional allocation flags
and precise GstVideoInfo specification.
This is an API/ABI change, and SONAME version needs to be bumped.
Gwenole Beauchesne [Mon, 26 Jan 2015 22:21:56 +0000 (23:21 +0100)]
videopool: re-indent all GstVaapiVideoPool related source code.
Gwenole Beauchesne [Wed, 10 Dec 2014 19:13:21 +0000 (20:13 +0100)]
window: add toplevel display indirection for visualid and colormap.
Add GstVaapiDisplay::get_{visual_id,colormap}() helpers to help determine
the best suitable window visual id and colormap. This is an indirection in
view to supporting EGL and custom/generic replacements.
Gwenole Beauchesne [Wed, 10 Dec 2014 18:58:10 +0000 (19:58 +0100)]
window: add toplevel API to determine the colormap.
Add GstVaapiWindowClass::get_colormap() hook to help determine the
currently active colormap bound to the supplied window, or actually
create it if it does not already exist yet.
Gwenole Beauchesne [Wed, 10 Dec 2014 18:36:12 +0000 (19:36 +0100)]
window: add toplevel API to determine a visual id.
Add GstVaapiWindowClass::get_visual_id() function hook to help find
the best suitable visual id for the supplied window. While doing so,
also simplify the process by which an X11 window is created with a
desired Visual, i.e. now use a visual id instead of a Visual object.
Gwenole Beauchesne [Wed, 10 Dec 2014 17:12:24 +0000 (18:12 +0100)]
window: add generic helper to create windows.
Add a new generic helper function gst_vaapi_window_new() to create
a window without having the caller to check for the display type
himself. i.e. internally, there is now a GstVaapiDisplayClass hook
to create windows, and the actual backend implementation fills it in.
Add new generic helper functions gst_vaapi_texture_new_wrapped()
This is a simplification in view to supporting EGL.
Gwenole Beauchesne [Wed, 3 Dec 2014 10:39:24 +0000 (11:39 +0100)]
display: add utility function to check for OpenGL rendering.
Add gst_vaapi_display_has_opengl() helper function to help determining
whether the display can support OpenGL context to be bound to it, i.e.
if the class is of type GST_VAAPI_DISPLAY_TYPE_GLX.
Gwenole Beauchesne [Wed, 10 Dec 2014 17:02:55 +0000 (18:02 +0100)]
display: refine the meaning of display type.
Make gst_vaapi_display_get_display_type() return the actual VA display
type. Conversely, add a gst_vaapi_display_get_class_type() function to
return the type of the GstVaapiDisplay instance. The former is used to
identify the display server onto which the application is running, and
the latter to identify the original object class.
Gwenole Beauchesne [Tue, 2 Dec 2014 10:23:29 +0000 (11:23 +0100)]
display: cosmetics (helper macros, new internal API names).
Add more helper macros to the top-level GstVaapiDisplay interfaces.
Rename a few others used internally for improved consistency.
Gwenole Beauchesne [Mon, 1 Dec 2014 16:08:29 +0000 (17:08 +0100)]
display: record native display object.
Record the underlying native display instance into the toplevel
GstVaapiDisplay object. This is useful for fast lookups to the
underlying native display, e.g. for creating an EGL display.
Gwenole Beauchesne [Mon, 1 Dec 2014 15:54:32 +0000 (16:54 +0100)]
display: use a recursive mutex for the display cache.
Use a recursive mutex for the display cache so that a 3rdparty display
object could be initialized during the initialization of the parent
display.
Gwenole Beauchesne [Thu, 4 Dec 2014 13:36:35 +0000 (14:36 +0100)]
texture: add generic helper to create textures.
Add new generic helper functions gst_vaapi_texture_new_wrapped()
and gst_vaapi_texture_new() to create a texture without having
the caller to uselessly check for the display type himself. i.e.
internally, there is now a GstVaapiDisplayClass hook to create
textures, and the actual backend implementation fills it in.
This is a simplification in view to supporting EGL.
Gwenole Beauchesne [Thu, 23 Oct 2014 15:44:23 +0000 (17:44 +0200)]
texture: move to core libgstvaapi base library.
GstVaapiTexture is a generic abstraction that could be moved to the
core libgstvaapi library. While doing this, no extra dependency needs
to be added. This means that a GstVaapitextureClass is now available
for any specific code that needs to be added, e.g. creation of the
underlying GL texture objects, or backend dependent ways to upload
a surface to the texture object.
Generic OpenGL data types (GLuint, GLenum) are also replaced with a
plain guint.
https://bugzilla.gnome.org/show_bug.cgi?id=736715
Gwenole Beauchesne [Thu, 23 Oct 2014 11:11:54 +0000 (13:11 +0200)]
texture: drop support for VA/GLX interfaces.
The VA/GLX interfaces are obsolete. They used to exist for XvBA, and
ease of use, but they had other caveats to deal with. It's now better
to move on to legacy mode, whereby VA/GLX interop is two be provided
through (i) X11 Pixmap, and (ii) other modern means of buffer sharing.
https://bugzilla.gnome.org/show_bug.cgi?id=736711
Gwenole Beauchesne [Thu, 23 Oct 2014 09:56:31 +0000 (11:56 +0200)]
texture: add support for cropping rectangle during transfer.
The gst_vaapi_texture_put_surface() function is missing a crop_rect
argument that would be used during transfer for cropping the source
surface to the desired dimensions.
Note: from a user point-of-view, he should create the GstVaapiTexture
object with the cropped size. That's the default behaviour in software
decoding pipelines that we need to cope with.
This is an API/ABI change, and SONAME version needs to be bumped.
https://bugzilla.gnome.org/show_bug.cgi?id=736712
Gwenole Beauchesne [Thu, 23 Oct 2014 09:22:10 +0000 (11:22 +0200)]
texture: re-indent all GstVaapiTexture related source code.
Gwenole Beauchesne [Tue, 27 Jan 2015 10:16:34 +0000 (11:16 +0100)]
surface: add more fine-grained allocation helper.
Add new gst_vaapi_surface_new_full() helper function that allocates
VA surface from a GstVideoInfo template in argument. Additional flags
may include ways to
- allocate linear storage (GST_VAAPI_SURFACE_ALLOC_FLAG_LINEAR_STORAGE) ;
- allocate with fixed strides (GST_VAPI_SURFACE_ALLOC_FLAG_FIXED_STRIDES) ;
- allocate with fixed offsets (GST_VAAPI_SURFACE_ALLOC_FLAG_FIXED_OFFSETS).
Gwenole Beauchesne [Mon, 15 Sep 2014 12:57:57 +0000 (14:57 +0200)]
surface: re-indent all GstVaapiSurface related source code.
Gwenole Beauchesne [Fri, 23 Jan 2015 15:44:34 +0000 (16:44 +0100)]
surfaceproxy: add helper to create a wrapped surface object.
Add new gst_vaapi_surface_proxy_new() helper to wrap a surface into
a proxy. The main use case for that is to convey additional information
at the proxy level that would not be suitable to the plain surface.
Gwenole Beauchesne [Fri, 23 Jan 2015 15:37:06 +0000 (16:37 +0100)]
surfaceproxy: re-indent all GstVaapiSurfaceProxy related source code.
Gwenole Beauchesne [Tue, 27 Jan 2015 17:02:56 +0000 (18:02 +0100)]
libs: bump library major version.
Gwenole Beauchesne [Thu, 4 Dec 2014 13:36:35 +0000 (14:36 +0100)]
libs: re-introduce a GST_VAAPI_ID_INVALID value.
Re-introduce a GST_VAAPI_ID_INVALID value that represents
a non-zero and invalid id. This is useful to have a value
that is still invalid for cases where zero could actually
be a valid value.
Gwenole Beauchesne [Tue, 2 Dec 2014 15:51:20 +0000 (16:51 +0100)]
libs: expose GstVaapiMiniObject APIs to all backends.
Make it possible to have all libgstvaapi backends (libs) access to a
common GstVaapiMiniObject API and implementation. This is a minor step
towards full exposure when needed, but restrict it to libgstvaapi at
this time.
Gwenole Beauchesne [Tue, 2 Dec 2014 13:15:49 +0000 (14:15 +0100)]
libs: re-indent all GstVaapiObject related source code.
Re-indent and provide additional minor cosmetical changes to the
GstVaapiMiniObject and GstVaapiObject source files.
Simon Farnsworth [Tue, 27 Jan 2015 14:25:21 +0000 (16:25 +0200)]
pluginutil: Fix clearing of subtitle overlay
dvbsuboverlay signals no subtitles present by not setting
GstVideoOverlayCompositionMeta on a buffer.
Detect this, and remove subtitles whenever we have no overlay composition to
hand.
Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Michael Olbrich [Tue, 27 Jan 2015 14:06:02 +0000 (16:06 +0200)]
vaapipostproc: clear state on stop
Otherwise restarting may fail because the state of vaapipluginbase and
vaapipostproc don't match. e.g. gst_vaapipostproc_set_caps() will skip
initailization and not call gst_vaapi_plugin_base_set_caps()
Michael Olbrich [Tue, 27 Jan 2015 12:50:12 +0000 (14:50 +0200)]
vaapidecode: don't print an error message for GST_FLOW_FLUSHING
Sreerenj Balachandran [Tue, 27 Jan 2015 10:38:45 +0000 (12:38 +0200)]
gstvaapiencoder: Fix the negotiation issue with _ENCODED format handling
Don't error out for the video format GST_VIDEO_FORMAT_ENCODED with in gstvaapiencoder,
since the vaaapi context creation (gstvaapicontext.c) can still use the
default chroma type which is YUV420.
https://bugzilla.gnome.org/show_bug.cgi?id=743567
https://bugzilla.gnome.org/show_bug.cgi?id=743035
Sreerenj Balachandran [Wed, 21 Jan 2015 16:31:22 +0000 (18:31 +0200)]
h264parse: drop patches merged upstream.
0003-h264parse-add-initial-support-for-MVC-NAL-units.patch
Sreerenj Balachandran [Wed, 21 Jan 2015 16:26:12 +0000 (18:26 +0200)]
codecparsers: update to gst-vaapi-branch commit
d3b5c1b
8194cac: h264parse: parse SPS subset
64b7f52: h264parse: expose stereo-high profile
774360a: h264parse: add initial support for MVC NAL units
258478f: h264parser: fix stack smashing
Sreerenj Balachandran [Mon, 19 Jan 2015 09:30:12 +0000 (11:30 +0200)]
Fix compilation error if there is no GL/gl.h header file installed
Gwenole Beauchesne [Thu, 15 Jan 2015 15:23:24 +0000 (16:23 +0100)]
vaapidecode: commit updated srcpad caps to base plugin.
Make sure that the GstVaapiPluginBase instance receives the new src
pad caps whenever they get updated from within the GstVaapiDecoder
decode routines.
This also ensures that downstream elements receive correctly sized
SW decoded buffers if needed.
https://bugs.tizen.org/jira/browse/TC-114
Gwenole Beauchesne [Thu, 15 Jan 2015 15:19:59 +0000 (16:19 +0100)]
vaapidecode: always reset decoder on ::set_format().
Split GstVideoDecoder::set_format() handler to first update the sink
pad caps and reset the active VA decoder instance based on those, and
then update the src pad caps whenever possible, e.g. when the caps
specify a valid video resolution.
Gwenole Beauchesne [Thu, 15 Jan 2015 15:14:13 +0000 (16:14 +0100)]
vaapivideomemory: don't crash when trying to allocate 0x0 images.
In some occasions, a buffer pool is created for pre-initialization
purposes regardless of whether a valid image size is available or
not. However, during actual decode stage, the vaapidecode element
is expected to update the srcpad caps with the new dimensions, thus
also triggering a reset of the underlying bufferpool.
Sreerenj Balachandran [Wed, 14 Jan 2015 22:00:16 +0000 (00:00 +0200)]
codecparsers: update to gst-vaapi-branch commit
191cb2f
347605a: h264parse: expose compatible profiles to downstream
d1ea97e: h264parse: Fix periodic SPS/PPS sending work after a seek
24a3126: Revert "h264parse: expose compatible profiles to downstream"
8661740: h264parse: expose compatible profiles to downstream
8b7ef3f: codecparsers: fix some compiler warnings
Sreerenj Balachandran [Thu, 27 Nov 2014 10:11:03 +0000 (12:11 +0200)]
encoder: h264: Fix the period between I/P frames
If the key-frame period is set as one, then ip_period shuld be zero
https://bugzilla.gnome.org/show_bug.cgi?id=734992
Sreerenj Balachandran [Thu, 27 Nov 2014 09:21:03 +0000 (11:21 +0200)]
encoder: h264: Provide intra_idr_period value for VAEncSequenceParameterBufferH264
https://bugzilla.gnome.org/show_bug.cgi?id=734993
Sreerenj Balachandran [Thu, 27 Nov 2014 09:14:50 +0000 (11:14 +0200)]
vaapisink: Protect the X11 API invokations with proper locking
https://bugzilla.gnome.org/show_bug.cgi?id=739808
Gwenole Beauchesne [Thu, 27 Nov 2014 09:13:20 +0000 (11:13 +0200)]
encoder: h264: fix pixel-aspect-ratio in encoded stream.
Really report sample aspect ratio (SAR) as present, and make it match
what we have obtained from the user as pixel-aspect-ratio (PAR). i.e.
really make sure VUI parameter aspect_ratio_info_present_flag is set
to TRUE and that the indication from aspect_ratio_idc is Extended_SAR.
This is a leftover from git commit
a12662f.
https://bugzilla.gnome.org/show_bug.cgi?id=740360
Gwenole Beauchesne [Tue, 25 Nov 2014 10:46:12 +0000 (11:46 +0100)]
decoder: mpeg4: fix uninitialized variables.
Fix gst_vaapi_decoder_mpeg4_parse() to initialize the packet type to
GST_MPEG4_USER_DATA so that a parse error would result in skipping
that packet. Also fix gst_vaapi_decoder_mpeg4_decode_codec_data() to
initialize status to GST_VAAPI_DECODER_STATUS_SUCCESS.
Gwenole Beauchesne [Tue, 25 Nov 2014 10:41:49 +0000 (11:41 +0100)]
encoder: h264: fix profile limits.
Fix ensure_profile_limits() to lower profile to the desired limits,
only if the latter are actually known and the profile needed to be
changed to fit.
Gwenole Beauchesne [Mon, 24 Nov 2014 14:14:37 +0000 (15:14 +0100)]
vaapipostproc: fix out caps for GLMemory.
If the best downstream capsfeature turns out to be GLMemory, then make
sure to propagate RGBA video format in caps to that element. This fixes
the following pipeline: ... ! vaapipostproc ! glimagesink.
Gwenole Beauchesne [Mon, 24 Nov 2014 13:25:33 +0000 (14:25 +0100)]
vaapipostproc: fix check for compatible src pad capsfilters.
When an explicit output video format is selected, from an src pad
capsfilter, make sure that the downstream element actually supports
that format. In particular, fix crash with the following pipelines:
... ! vaapipostproc ! video/x-raw,format=XXX ! xvimagesink ; where
XXX is a format not supported by xvimagesink.
While doing so, also reduce the set of src pad filter caps to the
actual set of allowed src pad caps.
Gwenole Beauchesne [Mon, 24 Nov 2014 13:10:11 +0000 (14:10 +0100)]
plugins: re-indent all video processing related source code.
Gwenole Beauchesne [Mon, 24 Nov 2014 12:20:33 +0000 (13:20 +0100)]
plugins: further fixes to the new "current" storage tracker.
The ensure_surface() and ensure_image() functions shall only relate
to the underlying backing store. The actual current flags are to be
updated only through ensure_{surface,image}_is_current() or very other
particular cases in GstMemory hooks.
Gwenole Beauchesne [Fri, 21 Nov 2014 14:43:35 +0000 (15:43 +0100)]
plugins: fix "current" video memory flags.
If the surface proxy is updated into the GstVaapiVideoMemory, then
it is assumed it is the most current representation of the current
video frame. Likewise, make a few more arrangements to have the
"current " flags set more consistently.
Gwenole Beauchesne [Fri, 21 Nov 2014 14:23:13 +0000 (15:23 +0100)]
plugins: ensure VA surface is current prior to using it.
When interacting with SW elements, the buffers and underlying video
memory could be mapped as read/write. However, we need to use those
buffers again as plain VA surfaces, we have to make sure the VA image
is thus committed back to VA surface memory.
This fixes pipelines involving avdec_* and vaapi{postproc,sink}.
Víctor Manuel Jáquez Leal [Fri, 12 Jul 2013 10:34:15 +0000 (06:34 -0400)]
plugins: enable memory maps for read & write.
Hence vaapisink can display buffers decoded by gst-libav, or HW decoded
buffers can be further processed in-place, e.g. with a textoverlay.
https://bugzilla.gnome.org/show_bug.cgi?id=704078
[ported to current git master branch, amended commit message]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Gwenole Beauchesne [Tue, 18 Nov 2014 13:57:02 +0000 (14:57 +0100)]
plugins: preserve framerate when updating src caps video format.
In the current implementation, gst_video_info_set_format() would reset
the whole GstVideoInfo structure first, prior to setting video format
and size. So, coleteral information like framerate or pixel-aspect-
ratio are lost.
Provide and use a unique gst_video_info_change_format() for overcome
this issue, i.e. only have it change the format and video size, and
copy over the rest of the fields.
https://bugzilla.gnome.org/show_bug.cgi?id=734665
Sreerenj Balachandran [Tue, 18 Nov 2014 12:07:57 +0000 (14:07 +0200)]
vaapidecode: increase the rank to GST_RANK_PRIMARY + 1
This is for helping decodebin to autoplug the vaapidecode element.
Decodebin is selecting decoder elements only based on rank and caps.
Without overriding the autoplug-* signals there is no way to autoplug
HW decoders inside decodebin. An easier soulution is to raise the
rank of vaapidecode, so that it gets selected first.
https://bugzilla.gnome.org/show_bug.cgi?id=739332
Gwenole Beauchesne [Wed, 12 Nov 2014 06:46:53 +0000 (07:46 +0100)]
vaapidecode: only expose supported profiles when needed.
JPEG and VP8 codecs do not really support the concept of "profile". So,
don't try to expose any set that wouldn't be supported by jpegparse, or
ivfparse for instance.
https://bugzilla.gnome.org/show_bug.cgi?id=739713
https://bugzilla.gnome.org/show_bug.cgi?id=739714
Gwenole Beauchesne [Thu, 13 Nov 2014 14:13:24 +0000 (15:13 +0100)]
decoder: h264: add initial support for repeat-first-field (RFF) flag.
Use the SEI pic_timing() message to track and propagate down the repeat
first field (RFF) flag. This is only initial support as there is one
other condition that could induce the RFF flag, which is not handled
yet.
Gwenole Beauchesne [Thu, 13 Nov 2014 14:05:19 +0000 (15:05 +0100)]
decoder: h264: fix picture ordering count type 0 with previous MMCO5.
Fix the decoding process for picture order count type 0 when the previous
picture had a memory_management_control_operation = 5. In particular, fix
the actual variable type for prev_pic_structure to hold the full bits of
the picture structure.
In practice, this used to work though, due to the underlying type used to
express a gboolean.
Gwenole Beauchesne [Thu, 13 Nov 2014 14:00:21 +0000 (15:00 +0100)]
decoder: h264: fix detection of top-field-first (TFF) flag.
Use the SEI pic_timing() message to track the pic_struct variable when
present, or infer it from the regular slice header flags field_pic_flag
and bottom_field_flag. This fixes temporal sequence ordering when the
output pictures are to be displayed.
https://bugzilla.gnome.org/show_bug.cgi?id=739291