platform/upstream/gstreamer.git
9 years agoHEVC: build: Check availability of h265 decoder APIs
Sreerenj Balachandran [Mon, 13 Apr 2015 11:52:14 +0000 (14:52 +0300)]
HEVC: build: Check availability of h265 decoder APIs

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
9 years agoHEVC: Allow to build h265 codecparser internally
Sreerenj Balachandran [Mon, 13 Apr 2015 11:51:51 +0000 (14:51 +0300)]
HEVC: Allow to build h265 codecparser internally

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
9 years agoguard buffer export API if not available
Víctor Manuel Jáquez Leal [Wed, 8 Apr 2015 16:05:20 +0000 (18:05 +0200)]
guard buffer export API if not available

The support for buffer exports in VA-API was added in version 0.36. These
interfaces are for interop with EGL, OpenCL, etc.

GStreamer-VAAPI uses it for a dmabuf memory allocator. Though, gstreamer-vaapi
has to support VA-API versions ranging from 0.30.4, which doesn't support it.

This patch guards all the buffer exports handling (and dmabuf allocator) if
the detected VA-API version is below 0.36.

https://bugzilla.gnome.org/show_bug.cgi?id=746405

9 years agocodecparsers: Update to gst-vaapi-branch commit 9bc72b0
Sreerenj Balachandran [Mon, 13 Apr 2015 08:29:35 +0000 (11:29 +0300)]
codecparsers: Update to gst-vaapi-branch commit 9bc72b0

767bf22: codecparsers: h265: add helpers to convert quantization matrices
71c8e93: codecparser: h265: skip byte alignment bits while parsing slice header
3bf0355: codecparsre: h265: Fix the NumDeltaPocs calculation
10e2087: codecparser: h265: Fix the NumPocTotalCurr calculatio
2d753b8: codecparser: h265: Fix nal size calculation for EOS and EOB

9 years agovaapidecode: unref video codec frame twice
Michael Olbrich [Thu, 11 Dec 2014 11:02:38 +0000 (12:02 +0100)]
vaapidecode: unref video codec frame twice

We get one reference when the frame is passed to decode_handle_frame()
and create another one in gst_vaapi_decoder_push_frame().

Usually the frame is handled in gst_vaapidecode_push_decoded_frame().
Here the frame is always released twice:
gst_video_decoder_finish_frame() + gst_video_codec_frame_unref() or
gst_video_decoder_drop_frame() + gst_video_codec_frame_unref().

In gst_vaapidecode_reset_full() both references to the frame must be
released as well.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
https://bugzilla.gnome.org/show_bug.cgi?id=743226

9 years agolibs: remove unused variables
Víctor Manuel Jáquez Leal [Wed, 8 Apr 2015 16:20:34 +0000 (18:20 +0200)]
libs: remove unused variables

clang reports these unused variables. Let's get rid of them.

This patch is a missing part of commit c82e5173

https://bugzilla.gnome.org/show_bug.cgi?id=747312

9 years agodecoder: mpeg4: remove an spurious comparison
Víctor Manuel Jáquez Leal [Fri, 3 Apr 2015 18:38:07 +0000 (20:38 +0200)]
decoder: mpeg4: remove an spurious comparison

The member size in GstMpeg4Packet is gsize which is unsigned, which cannot be
less than zero. Hence this pre-condition test is a no-op. This patch removes
that code.

https://bugzilla.gnome.org/show_bug.cgi?id=747312

9 years agoencoder: h264: casts slice_param->slice_type
Víctor Manuel Jáquez Leal [Fri, 3 Apr 2015 18:33:44 +0000 (20:33 +0200)]
encoder: h264: casts slice_param->slice_type

slice_type in slice_param is defined as (char *), but it is compared against a
signed integer. clang complains about this comparison.

This patch casts the variable.

https://bugzilla.gnome.org/show_bug.cgi?id=747312

9 years agoencoder: avoid GstVaapiCodedBuffer redefinition
Víctor Manuel Jáquez Leal [Fri, 3 Apr 2015 18:31:47 +0000 (20:31 +0200)]
encoder: avoid GstVaapiCodedBuffer redefinition

The symbol GstVaapiCodedBuffer is already defined in
gst-libs/gst/vaapi/gstvaapicodedbuffer.h which is loaded, at the end, by
gstvaapiencoder_objects.h. Clang complains about the symbol re-definition.

This patch removes that redefinition.

https://bugzilla.gnome.org/show_bug.cgi?id=747312

9 years agolibs: remove unused variables
Víctor Manuel Jáquez Leal [Fri, 3 Apr 2015 18:28:22 +0000 (20:28 +0200)]
libs: remove unused variables

clang reports these unused variables. Let's get rid of them.

https://bugzilla.gnome.org/show_bug.cgi?id=747312

9 years agoencoder: mpeg2: use fabsf() instead of abs()
Víctor Manuel Jáquez Leal [Fri, 3 Apr 2015 18:27:24 +0000 (20:27 +0200)]
encoder: mpeg2: use fabsf() instead of abs()

The member value in frame_rate_tab is float, the result of the abs() function
should be float too. But abs() only manages integers.

This patch replaces abs() with fabsf() to handle correctly the possible floats
values.

https://bugzilla.gnome.org/show_bug.cgi?id=747312

9 years agodecoder: cast GST_VAAPI_DECODER_STATUS_DROP_FRAME
Víctor Manuel Jáquez Leal [Fri, 3 Apr 2015 18:02:29 +0000 (20:02 +0200)]
decoder: cast GST_VAAPI_DECODER_STATUS_DROP_FRAME

Since GST_VAAPI_DECODER_STATUS_DROP_FRAME is not part of the enum
GstVaapiDecoderStatus, we need to cast it to avoid compiler complains.

https://bugzilla.gnome.org/show_bug.cgi?id=747312

9 years agoUpdate README
Sreerenj Balachandran [Fri, 3 Apr 2015 21:40:29 +0000 (00:40 +0300)]
Update README

9 years agoChanging source code download links from https://gitorious to https://github
Sreerenj Balachandran [Fri, 3 Apr 2015 21:06:56 +0000 (00:06 +0300)]
Changing source code download links from https://gitorious  to https://github

-- gitmodules: Change gstreamer-codecparsers submodule source download link
-- README: Change the gstreamer-vaapi webpage link

9 years agocodecparsers: update to gst-vaapi-branch commit 1f792e4
Sreerenj Balachandran [Fri, 3 Apr 2015 20:30:24 +0000 (23:30 +0300)]
codecparsers: update to gst-vaapi-branch commit 1f792e4

87f4a7e: bytereader: add gst_byte_reader_peek_sub_reader() and _get_sub_reader()
7d8ba7a: bytereader: use unchecked inline variant for get_remaining in more places
2528ea6: bytereader: add gst_byte_reader_masked_scan_uint32_peek
2b92a67: h264parse: reset the parser information when caps changes
05eee86: codecparsers: Indent file
e27a38b: codecparsers: Add READ_UE_MAX macro
2036471: Constify some static arrays everywhere

9 years agoRemove the gstvaapivideoconverter_*.c source files missed in commit 51b1e4a
Sreerenj Balachandran [Fri, 3 Apr 2015 14:45:08 +0000 (17:45 +0300)]
Remove the gstvaapivideoconverter_*.c source files missed in commit 51b1e4a

9 years agoRemoval of gstreamer-1.0 support
Víctor Manuel Jáquez Leal [Fri, 3 Apr 2015 14:09:08 +0000 (17:09 +0300)]
Removal of gstreamer-1.0 support

The support for GStreamer 1.0 has been obsoleted in 0.5.10 release.
GStreamer 1.2 is the a minimal requirement for building the gstreamer-vaapi.

This patch removes all the pre-processor conditional code compilation guarded
for gstreamer-1.0.

Thus, all the video converters were removed too.

https://bugzilla.gnome.org/show_bug.cgi?id=745728

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
9 years agoupdate and move gstcompat.h
Víctor Manuel Jáquez Leal [Fri, 3 Apr 2015 14:08:30 +0000 (17:08 +0300)]
update and move gstcompat.h

The purpose of gstcompat.h is to couple the API differences among
gstreamer-1.0 and gstreamer-0.10. Since gstreamer-0.10 is obsolete, the code
in this compatibility layer shall be removed.

Nevertheless, the gstcompat.h header should be kept, if new incompatibilites
appear in the future, but it shall live in gst/vaapi, not in gst-libs.

This patch removes the crumbs defined gstcompat.h and moves it to gst/vaapi.
In order to avoid layer violations, gstcompat.h includes sysdeps.h and all
the includes in gst/vaapi of sysdeps.h are replaced with gstcompat.h

https://bugzilla.gnome.org/show_bug.cgi?id=745728

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
9 years agoautotools: remove gstreamer-1.0 support
Víctor Manuel Jáquez Leal [Fri, 3 Apr 2015 14:05:45 +0000 (17:05 +0300)]
autotools: remove gstreamer-1.0 support

This patch only removes the support of gstreamer-1.0 in the autotools
scripts. No other files are touched.

In the automake file all the converters were deprecated.

https://bugzilla.gnome.org/show_bug.cgi?id=745728

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
9 years agoRemove the gstreamer-videoutils submodule
Sreerenj Balachandran [Fri, 3 Apr 2015 14:03:38 +0000 (17:03 +0300)]
Remove the gstreamer-videoutils submodule

9 years agoRemove libgstvaapi-videoutils.so
Víctor Manuel Jáquez Leal [Fri, 3 Apr 2015 14:01:45 +0000 (17:01 +0300)]
Remove libgstvaapi-videoutils.so

This library was intended to add the base classes for video decoders which
where not included in gstreamer-0.10.

Since the support of gstreamer-0.10 is deprecated those classes are not
required, thus the whole library is removed.

https://bugzilla.gnome.org/show_bug.cgi?id=745728
https://bugzilla.gnome.org/show_bug.cgi?id=732666

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
9 years agoRemove HAVE_GST_VIDEO_OVERLAY_HWCAPS macro
Víctor Manuel Jáquez Leal [Fri, 3 Apr 2015 13:55:43 +0000 (16:55 +0300)]
Remove HAVE_GST_VIDEO_OVERLAY_HWCAPS macro

This macro guarded the use of HAVE_GST_VIDEO_OVERLAY_HWCAPS, which was not
defined before gstreamer 0.10.35. Since the support of gstreamer-0.10 is
deprecated these guards are not required.

https://bugzilla.gnome.org/show_bug.cgi?id=745728
https://bugzilla.gnome.org/show_bug.cgi?id=732666

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
9 years agoRemoval of gstreamer-0.10 support
Víctor Manuel Jáquez Leal [Fri, 3 Apr 2015 13:55:27 +0000 (16:55 +0300)]
Removal of gstreamer-0.10 support

This patch removes all the pre-processor conditional code compilation guarded
for gstreamer-0.10.

https://bugzilla.gnome.org/show_bug.cgi?id=745728
https://bugzilla.gnome.org/show_bug.cgi?id=732666

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
9 years agoautotools: remove gstreamer-0.10 support
Víctor Manuel Jáquez Leal [Fri, 3 Apr 2015 13:54:54 +0000 (16:54 +0300)]
autotools: remove gstreamer-0.10 support

This patch only removes the support of gstreamer-0.10 in the autotools
scripts. No other files are touched.

The configuration parameter --gstreamer-api was deleted since now it is always
auto-detected.

The verification of vmethod query in GstBaseSinkClass was removed since it was
added in gstreamer 0.10.35. The same case for GstVideoOverlayComposition and
its format flags.

The precious variable GST_PLUGIN_PATH was removed, while GST_PLUGIN_PATH_1_0
remained.

The automake files were changed accordingly.

Removed, in debian/control, the vaapiupload and vaapidownload descriptions.

https://bugzilla.gnome.org/show_bug.cgi?id=732666
https://bugzilla.gnome.org/show_bug.cgi?id=745728

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
9 years agovaapidecode: add drain() vmethod
Víctor Manuel Jáquez Leal [Mon, 16 Mar 2015 21:38:18 +0000 (23:38 +0200)]
vaapidecode: add drain() vmethod

In GStremer v1.6 a new vmethod drain() was added in GstVideoDecoder
class. This patch implements this new method.

https://bugzilla.gnome.org/show_bug.cgi?id=742922

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
9 years agovaapidecode: remove vmethod reset()
Víctor Manuel Jáquez Leal [Mon, 16 Mar 2015 21:37:29 +0000 (23:37 +0200)]
vaapidecode: remove vmethod reset()

Since in bug #745728 the support for GStreamer 1.0 is going to be dropped,
this patch removes the method reset() which was deprecated in GStreamer 1.2.

https://bugzilla.gnome.org/show_bug.cgi?id=742922

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
9 years agovaapidecode: handle flush() vmethod
Víctor Manuel Jáquez Leal [Mon, 16 Mar 2015 21:36:33 +0000 (23:36 +0200)]
vaapidecode: handle flush() vmethod

Since GStreamer 1.2 the vmethod reset() in GstVideoDecoderClass was deprecated
and flush() was added.

This patch set the vmethod flush() if the installed GStreamer version is 1.2 or
superior. Otherwise, reset() is set.

v2: 1) In order to avoid symbol collision, the old method gst_vaapidecode_flush()
       was renamed to gst_vaapidecode_internal_flush().
    2) The new vmethod flush() always do a hard full reset.
v3: 1) Call gst_vaapidecode_internal_flush() first in flush() vmethod, in order to
       gather all collected data with  gst_video_decoder_have_frame()

https://bugzilla.gnome.org/show_bug.cgi?id=742922

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
9 years agovaapidecode: call the correct query function
Víctor Manuel Jáquez Leal [Mon, 16 Mar 2015 21:10:53 +0000 (23:10 +0200)]
vaapidecode: call the correct query function

In commit 2f8c115 (vaapidecode: use the query virtual methods in 1.4)
a bug was introduced: when calling the parent's query function of the
src pad, the one of the sink pad is called instead. This patch fixes
this issue.

https://bugzilla.gnome.org/show_bug.cgi?id=746248

9 years agogitmodules: Use https:// url instead of git:// for submodules.
Sreerenj Balachandran [Sat, 14 Mar 2015 22:36:45 +0000 (00:36 +0200)]
gitmodules: Use https:// url instead of git:// for submodules.

Gitorious is failing to clone repositories over git:// url.

9 years agovaapidisplay: mark X11 display as compatible with EGL
Julien Isorce [Sat, 14 Mar 2015 20:12:19 +0000 (22:12 +0200)]
vaapidisplay: mark X11 display as compatible with EGL

GST_GL_WINDOW=x11 GST_GL_API=gles2 GST_GL_PLATFORM=egl
gst-launch-1.0 ... ! vaapidecode ! glimagesink

https://bugzilla.gnome.org/show_bug.cgi?id=745902

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
9 years agovaapidecode: Don't crash if a buffer outlives the decoder
Olivier Crete [Fri, 6 Mar 2015 13:20:01 +0000 (15:20 +0200)]
vaapidecode: Don't crash if a buffer outlives the decoder

Sometimes, for example, when switching video streams but keeping
the same sink, the surface will be released after the decoder is
stopped and replaced. This caused a crash because the release
callback was called on an invalid pointer.
The patch adding an additional reference to the decoder object in the buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=745189

Signed-off-by: Olivier Crete <olivier.crete@collabora.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
9 years agovaapidecode: clean-ups (indentation, drop unused variables)
Sreerenj Balachandran [Fri, 6 Mar 2015 12:31:21 +0000 (14:31 +0200)]
vaapidecode: clean-ups (indentation, drop unused variables)

9 years agovaapidecode: use the query virtual methods in 1.4
Víctor Manuel Jáquez Leal [Fri, 6 Mar 2015 12:09:22 +0000 (14:09 +0200)]
vaapidecode: use the query virtual methods in 1.4

GstVideoDecoder, the base class of vaapidecode, added support for
pad queries as virtual methods. This patch enables the use of that
support, while keeping support for lower versions of gstreamer.

This patch is important because GstVideoDecoder takes care of other
queries that might be important in the pipeline managing.

v2: 1) rebase to current master
    2) fix indentation with gst-indent
    3) simplify the patch layout
    4) fix the context query
    5) initialise the filter to NULL
    6) improve the query log message for gst-1.2

https://bugzilla.gnome.org/show_bug.cgi?id=744406

9 years agovaapipostproc: always activate buffer pool
Víctor Manuel Jáquez Leal [Fri, 6 Mar 2015 10:16:17 +0000 (12:16 +0200)]
vaapipostproc: always activate buffer pool

The vaapipostproc has a proxy flag to know if the the buffer pool is
already active. But this fails in some situations where it is needed
to renegotiate the buffer pool.

This patch removes that flag so the renegotiation is done whenever is
required.

https://bugzilla.gnome.org/show_bug.cgi?id=745535

9 years agovaapisink: fix minor memory leak in debug mode.
Gwenole Beauchesne [Mon, 2 Mar 2015 16:04:20 +0000 (17:04 +0100)]
vaapisink: fix minor memory leak in debug mode.

The gst_video_colorimetry_to_string() function returns a newly created
string that represents the GstVideoColorimetry value. So, that needs
to be released after usage, in e.g. GST_DEBUG().

9 years agovaapidecodebin: Avoid usage of "__" prefix in macro names
Sreerenj Balachandran [Tue, 3 Mar 2015 10:37:41 +0000 (12:37 +0200)]
vaapidecodebin: Avoid usage of "__" prefix in macro names

Avoiding "__" prefix usage in Header File Guards as per
C standard recommendation.

9 years agoplugins: Disable vaapidecodebin for GStreamer < 1.4
Sreerenj Balachandran [Tue, 3 Mar 2015 10:31:11 +0000 (12:31 +0200)]
plugins: Disable vaapidecodebin for GStreamer < 1.4

There are autoplugging issues in GStreamer-1.2.
Lets disable vaapidecodebin untill we get some workarounds for this.

9 years agoplugins: Add a vaapidecodebin element
Sreerenj Balachandran [Mon, 2 Mar 2015 13:19:40 +0000 (15:19 +0200)]
plugins: Add a vaapidecodebin element

Add a "vaapidecodebin" element to vaapi plugins.

Child Elements: "vaapidecode ! queue ! vaapipostproc"

The Reasons for implementing a new bin element:

-- Help to Autoplug Hardware Accelerated Video Postprocessing element in playbin
with out any dependency to upstream gstreamer.
This is to overcome the *unacceptable* delay in upstream gstreamer to get new
features in. Eg: https://bugzilla.gnome.org/show_bug.cgi?id=687182.
Also customers using older gstreamer versions (1.2 and 1.4) will get the
benefit of autoplugging, hardware accelerated deinterlacing support etc.

-- Help to maintain a single thread implementation in vaapidecode.
This will result a dead-lock free vaapidecode in most of the cases.
More details here: https://bugzilla.gnome.org/show_bug.cgi?id=742605

https://bugzilla.gnome.org/show_bug.cgi?id=745216

9 years agovaapidecode: re-indent (gst-indent) gstvaapidecode.c
Sreerenj Balachandran [Mon, 2 Mar 2015 12:59:16 +0000 (14:59 +0200)]
vaapidecode: re-indent (gst-indent) gstvaapidecode.c

9 years agovaapidecode: Switch back to Single thread implementation
Simon Farnsworth [Mon, 2 Mar 2015 12:46:38 +0000 (14:46 +0200)]
vaapidecode: Switch back to Single thread implementation

Because the decoder uses the thread from handle_frame() to decode a frame,
the src pad task creates an unsolveable AB-BA deadlock between
handle_frame() waiting for a free surface and decode_loop() pushing
decoded frames out.

Instead, have handle_frame() take responsibility for pushing surfaces,
and remove the deadlock completely. If you need a separate thread
downstream, you can insert a queue between vaapidecode and its downstream
to get one.

Another justification for the single thread implementation is,
there are two many point of locking in gstreamer-vaapi's current
implementation which can lead to deadlocks.

https://bugzilla.gnome.org/show_bug.cgi?id=742605

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
9 years agoplugins: fix detection of upstream v4l2src element.
Gwenole Beauchesne [Mon, 2 Mar 2015 12:28:41 +0000 (13:28 +0100)]
plugins: fix detection of upstream v4l2src element.

Improve check for upstream element that requires DMABUF buffer pool,
e.g. v4l2src element. In particular, make sure to traverse through
any additional capsfilter for instance.

Note: the traversal to the top-most upstream element could be made
more generic, but we are insofar only interested in supporting pipes
similar to v4l2src or v4l2src ! capsfilter, e.g. with an explicit
specification for a desired video camera format, or resolution.

9 years agoplugins: fix allocation of DMABUF memory.
Gwenole Beauchesne [Mon, 2 Mar 2015 10:12:53 +0000 (11:12 +0100)]
plugins: fix allocation of DMABUF memory.

The dmabuf allocator would close the DMABUF handle passed in the init
function gst_dmabuf_allocator_alloc(). So, we need to dup() it so that
to avoid a double close, ultimately in the underlying driver that owns
the DMABUF handle.

9 years agovaapidecode: keep src caps and output state in sync
Víctor Manuel Jáquez Leal [Thu, 26 Feb 2015 10:28:02 +0000 (12:28 +0200)]
vaapidecode: keep src caps and output state in sync

vaapidecode keeps an output state that use the format
GST_VIDEO_FORMAT_ENCODED, while it crafts a different src caps
for a correct negotiation.

I don't see the rational behind this decoupling, it looks like
unnecessary complexity. This patch simplify this logic keeping
in sync the output state and the src caps.

This patch improves the readability of the function
gst_vaapidecode_update_src_caps() and simplify its logic. Also,
the patch validates if the buffer pool has the configuration for
the GL texture upload meta, in order to set the caps feature
meta:GLTextureUpload. Otherwise, the I420 format is set back.

https://bugzilla.gnome.org/show_bug.cgi?id=744618

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
9 years agovaapidecode: upload meta only if feature and allocation
Víctor Manuel Jáquez Leal [Thu, 26 Feb 2015 10:26:54 +0000 (12:26 +0200)]
vaapidecode: upload meta only if feature and allocation

When vaapidecode finishes the decoding of a frame and pushes it,
if, in the decide_allocation() method, it is determined if the
next element supports the GL texture upload meta feature, the
decoder adds the buffer's meta.

Nonetheless, in the same spirit of the commit 71d3ce4d, the
determination if the next element supports the GL texture upload
meta needs to check both the preferred caps feature *and* if the
allocation query request the API type.

This patch, first removes the unused variable need_pool, and
determines the attribute has_texture_upload_meta using the
preferred caps feature *and* the allocation query.

Also, the feature passed to GstVaapPluginBase is not longer
determined by has_texture_upload_meta, but by the computed
preferred one.

https://bugzilla.gnome.org/show_bug.cgi?id=744618

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
9 years agovaapidecode: delayed src caps negotiation
Víctor Manuel Jáquez Leal [Thu, 26 Feb 2015 10:24:55 +0000 (12:24 +0200)]
vaapidecode: delayed src caps negotiation

Currently the src caps are set immediately after the sink caps are set, but in
that moment the pipeline might not fully constructed and the video sink has
not negotiated its supported caps and features. As a consequence, in many cases
of playback, the least optimized caps feature is forced. This is partially the
responsible of bug #744039.

Also, vaapidecode doesn't attend the reconfigure events from downstream,
which is a problem too, since the video sink can be changed with different
caps features.

This patch delays the src caps, setting them until the first frame arrives to
the decoder, assuming until that very moment the whole pipeline is already
negotiated. Particularly, it checks if the src pad needs to be reconfigured,
as a consequence of a reconfiguration event from downstream.

A key part of this patch is the new GstVaapiCapsFeature
GST_VAAPI_CAPS_FEATURE_NOT_NEGOTIATED, which is returned when the src pad
doesn't have a peer yet. Also, for a better report of the caps allowed
through the src pad and its peer, this patch uses gst_pad_get_allowed_caps()
instead of gst_pad_peer_query_caps() when looking for the preferred feature.

v3: move the input_state unref to close(), since videodecoder resets at
some events such as navigation.

v4: a) the state_changed() callback replaces the input_state if the media
changed, so this case is also handled.
    b) since the parameter ref_state in gst_vaapidecode_update_src_caps() is
always the input_state, the parameter were removed.
    c) there were a lot of repeated code handling the input_state, so I
refactored it with the function gst_vaapi_decode_input_state_replace().

https://bugzilla.gnome.org/show_bug.cgi?id=744618

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
9 years agoencoder: h264: add support for more than 2 views
Sreerenj Balachandran [Tue, 24 Feb 2015 15:14:33 +0000 (17:14 +0200)]
encoder: h264: add support for more than 2 views

Add support for H.264 MVC Multiview High profile encoding with
more than 2 views. All views within the same accesss unit are
provided in increasing order of view order index (VOIdx).

Upto 10 view are supported for now.

A new property "view-ids" has been provided for the plugins to
set the view ids (which is an array of guint values) to be used
for mvc encoding.

https://bugzilla.gnome.org/show_bug.cgi?id=732453

9 years agoplugins: upload meta only if feature and allocation
Víctor Manuel Jáquez Leal [Mon, 23 Feb 2015 15:55:36 +0000 (16:55 +0100)]
plugins: upload meta only if feature and allocation

Working on bug #743687, I realized that vaapidecode always adds to its buffer
pool the config option GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META if
the decide_allocation()'s query has GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE.

Nevertheless, there are occasions where the query has the API type, but the
last negotiated caps don't have the feature meta:GstVideoGLTextureUploadMeta.

Under this contradiction, vaapidecode adds the GLTextureUploadMeta API to its
buffer pool configuration, and adds its buffer's meta to each output buffer,
even if the negotiated caps feature is memory:SystemMemory with I420 color
format.

This kind of output buffers chokes ClutterAutoVideosSink, since it uses a map
that relates caps <-> GL upload method. If it receives a buffer with color
format I420, it assumes that it doesn't have a texture upload meta, because
only those with RGB color format has it. Our buffers, with I420 format, say
that they have the upload meta too. In that case the mapped method is a dummy
one which does nothing. I reported this issue in bug #744039 (the patch,
obviously, was rejected).

This patch workarounds the problem: the buffer pool's configuration option
GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META is set if and only if the
query has the GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE *and* the negotiated
caps feature is meta:GstVideoGLTextureUploadMeta.

I have tested these patches with gst-master (1.5), gst-1.4 and gst-1.2 and
in all they seem to work correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=744618

[adapted to fit current EGL changes]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
9 years agoplugins: add support for GstVideoGLTextureOrientation.
Gwenole Beauchesne [Fri, 20 Feb 2015 14:13:03 +0000 (15:13 +0100)]
plugins: add support for GstVideoGLTextureOrientation.

Add support for GstVideoGLTextureOrientation modes. In particular,
add orientation flags to the GstVaapiTexture wrapper and the GLX
implementations. Default mode is that texture memory is laid out
with top lines first, left row first. Flags indicate whether the
X or Y axis need to be inverted.

9 years agoplugins: add support for BGRA textures.
Gwenole Beauchesne [Mon, 9 Feb 2015 20:09:07 +0000 (21:09 +0100)]
plugins: add support for BGRA textures.

Some frameworks (EFL) expect BGRA textures for storage. However,
adding support for that broadly into GStreamer framework  implies
two kinds of hacks: (i) libgstgl helpers currently do not support
BGRA textures correctly, (ii) we need to better parse downstream
suggested caps and intersect them with what the VA plugin elements
can offer to them for GL texturing.

9 years agoplugins: fix support for Wayland/EGL running alongside X11.
Gwenole Beauchesne [Fri, 23 Jan 2015 08:31:57 +0000 (09:31 +0100)]
plugins: fix support for Wayland/EGL running alongside X11.

When multiple display servers are available, the glimagesink element
(from GStreamer 1.4) may not be able to derive a global display in
Wayland. Rather, a "window"-specific display is created. In this case,
the GstGLDisplay handle available through GstGLContext is invalid.

So, try to improve heuristics for display server characterisation in
those particular situations.

9 years agoplugins: add initial support for EGL.
Gwenole Beauchesne [Fri, 20 Feb 2015 14:29:17 +0000 (15:29 +0100)]
plugins: add initial support for EGL.

Add initial support for EGL through GstVideoGLTextureUploadMeta.

Fix gst_vaapi_ensure_display() to allocate a GstVaapiDisplay off the
downstream supplied GstGLContext configuration, i.e. use its native
display handle to create a GstVaapiDisplay of type X11 or Wayland ;
and use the desired OpenGL API to allocate the GstVaapiDisplayEGL
wrapper.

https://bugzilla.gnome.org/show_bug.cgi?id=741079

9 years agoplugins: track video texture size changes.
Gwenole Beauchesne [Tue, 9 Dec 2014 10:46:58 +0000 (11:46 +0100)]
plugins: track video texture size changes.

Sync video texture sizes to GstVideoGLTextureUploadMeta private date,
i.e. GstVaapiVideoMetaTexture, on a regular basis. In particular, we
now update the texture size from the GstVideoMeta, if any, or reset
to some defaults otherwise.

9 years agoplugins: ensure VA display matches GL context expectations.
Gwenole Beauchesne [Wed, 3 Dec 2014 14:45:52 +0000 (15:45 +0100)]
plugins: ensure VA display matches GL context expectations.

If a GstGLContext is supplied by the downstream element, then make
sure that the VA plugin element gets a compatible display to what
is requested by the GL context. e.g. re-allocate a VA/GLX display
when a GLX context is provided by the downstream element.

9 years agoplugins: record downstream GstGLContext.
Gwenole Beauchesne [Wed, 3 Dec 2014 13:14:30 +0000 (14:14 +0100)]
plugins: record downstream GstGLContext.

Record GL context supplied by downstream elements. This can be useful,
and further needed, to enforce run-time check that the GL context is
compatible for use by libgstvaapi. e.g. check that we don't create a
VA/GLX display for EGL/X11 contexts.

https://bugzilla.gnome.org/show_bug.cgi?id=725643

Original-path-by: Matthew Waters <ystreet00@gmail.com>
9 years agoegl: update tests.
Gwenole Beauchesne [Mon, 1 Dec 2014 13:52:39 +0000 (14:52 +0100)]
egl: update tests.

Add initial support for EGL to tests. The new EGL backend can be selected
through the --egl command line option. The OpenGL|ES version can further
be selected with the --gles-version command line option, where the default
of 0 means "desktop" OpenGL.

9 years agoegl: add windowing support.
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.

9 years agoegl: add texture 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.

9 years agoegl: allow for EGLImage imports into VA Surfaces.
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

9 years agoAdd initial support for EGL.
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

9 years agolibs: initialize GValues in a thread-safe manner.
Gwenole Beauchesne [Fri, 30 Jan 2015 20:38:07 +0000 (21:38 +0100)]
libs: initialize GValues in a thread-safe manner.

9 years agolibs: re-indent all GValue related source code.
Gwenole Beauchesne [Fri, 30 Jan 2015 20:35:10 +0000 (21:35 +0100)]
libs: re-indent all GValue related source code.

9 years agovaapidecode: partially revert 0777f35.
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.

9 years agovaapidecode: Caps query should return the list of all supported caps.
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).

9 years agovaapidecode: intersect filter from query caps
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

9 years agoFix compiler warnings
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

9 years agovaapidecode: Use GST_DEBUG_FUNCPTR for gst_vaapidecode_query()
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

9 years agovaapidecode: log flow error name
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

9 years agoVC1: decoder: Ignore VC1 user BDU's
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>
9 years agovaapidecode: Emit error GstMessage when returning a GST_FLOW_ERROR
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

9 years agoplugins: Add VP8 Encoder
Sreerenj Balachandran [Fri, 13 Feb 2015 11:45:32 +0000 (13:45 +0200)]
plugins: Add VP8 Encoder

9 years agoAdd VP8 Encoder to core libgstvaapi.
Sreerenj Balachandran [Fri, 13 Feb 2015 11:42:04 +0000 (13:42 +0200)]
Add VP8 Encoder to core libgstvaapi.

9 years agoconfigure: Add Check for VP8 Encoding API
Sreerenj Balachandran [Fri, 13 Feb 2015 11:40:19 +0000 (13:40 +0200)]
configure: Add Check for VP8 Encoding API

9 years agodecoder: vc1: Rounding control handling for VC1 simple and Main profile
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>
9 years agobuild: fix make dist when certain conditionals not met.
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).

9 years agoencoder: jpeg: Fix the sampling factor calculation for ENCODED format.
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.

9 years agoencoder: Only support YUV420 native format as input for now
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.

9 years agovaapidecode: Check the condition after taking the lock
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

9 years agoplugins: Add JPEG encoder element
Sreerenj Balachandran [Wed, 4 Feb 2015 09:18:29 +0000 (11:18 +0200)]
plugins: Add JPEG encoder element

9 years agogstvaapicontext: Add VAConfigAttribValEncJPEG to the attribute list using for VAConfi...
Sreerenj Balachandran [Wed, 4 Feb 2015 09:17:58 +0000 (11:17 +0200)]
gstvaapicontext: Add VAConfigAttribValEncJPEG to the attribute list using for VAConfig creation.

9 years agogstvaapicontext: Don't use the unsupported Ratecontrol attributes for vaCreateConfig
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.

9 years agogstvaapiencoder: Use hardcoded packed_raw_data flag for JPEG Encoding
Sreerenj Balachandran [Wed, 4 Feb 2015 09:17:06 +0000 (11:17 +0200)]
gstvaapiencoder: Use hardcoded packed_raw_data flag for JPEG Encoding

9 years agogstvaapiencoder: Fix crash when handling rate control mask
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

9 years agoencoder: Add JPEG Encoder
Sreerenj Balachandran [Wed, 4 Feb 2015 09:16:05 +0000 (11:16 +0200)]
encoder: Add JPEG Encoder

9 years agoencoder_objects: Add QuantizationMatrix and JPEGHuffmanTable
Sreerenj Balachandran [Wed, 4 Feb 2015 09:15:38 +0000 (11:15 +0200)]
encoder_objects: Add QuantizationMatrix and JPEGHuffmanTable

9 years agoEncode: Add support for Picture level Entrypoint
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.

9 years agoconfigure: Add Check for JPEG encoding API
Sreerenj Balachandran [Wed, 4 Feb 2015 09:14:15 +0000 (11:14 +0200)]
configure: Add Check for JPEG encoding API

9 years agoAUTHORS: Updates
Sreerenj Balachandran [Tue, 3 Feb 2015 11:08:53 +0000 (13:08 +0200)]
AUTHORS: Updates

9 years agoBump version for development.
Sreerenj Balachandran [Tue, 3 Feb 2015 11:08:01 +0000 (13:08 +0200)]
Bump version for development.

9 years ago0.5.10
Sreerenj Balachandran [Tue, 3 Feb 2015 08:00:42 +0000 (10:00 +0200)]
0.5.10

9 years agoNEWS: Updates
Sreerenj Balachandran [Tue, 3 Feb 2015 08:00:23 +0000 (10:00 +0200)]
NEWS: Updates

9 years agoFix compilation error if there is no GL/gl.h header file installed
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

9 years agoplugins: drop leftover declaration.
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.

9 years agoplugins: add support for dma_buf exports (v4l2src).
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

9 years agoplugins: add support for dma_buf imports.
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>
9 years agosurface: add support for GEM buffer imports.
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

9 years agosurface: add support for dma_buf imports.
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

9 years agosurface: add initial support for foreign buffer imports.
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.

9 years agosurface: add support for GEM buffer exports.
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

9 years agosurface: add support for dma_buf exports.
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

9 years agoAdd abstraction for exported VA buffers.
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