Commit graph

149 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
54011c22e2 build: fix when HEVC decoder is disabled
This a very pathological situation: when we have a HEVC encoder but not a HEVC
decoder.

The encoder needs functions that are only available when the decoder is
enabled.

This patch moves the utils functions into the generic sources, such as the
rest of the utils.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-01 12:21:57 +01:00
Víctor Manuel Jáquez Leal
fa6144545f 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>
2016-01-20 10:19:07 +01:00
Víctor Manuel Jáquez Leal
f8bb674028 libs: make libraries no installables
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-01-19 13:16:43 +01:00
Víctor Manuel Jáquez Leal
bc54fa27e6 Do not install libgstvaapi headers
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-01-19 13:16:43 +01:00
Víctor Manuel Jáquez Leal
56fab31c00 Remove codecparsers submodule
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-01-19 12:49:11 +01:00
Sreerenj Balachandran
d7bd0a4c10 build: Add gmodule dependency for libgstvaapi_egl
https://bugzilla.gnome.org/show_bug.cgi?id=756259
2015-11-30 13:03:04 +01:00
Sreerenj Balachandran
db877e015d VP9: libgstvaapi: Add VP9 decoder 2015-11-06 15:12:51 +02:00
Sreerenj Balachandran
86c4cdc8b6 build: Add missing CFLAGS to Makefile.am 2015-07-07 13:32:18 +03:00
Sreerenj Balachandran
e623651d69 HEVC_Encode: Add HEVC(h265) encoder to core libgstvaapi
https://bugzilla.gnome.org/show_bug.cgi?id=748874

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
2015-05-25 11:42:33 +03:00
Víctor Manuel Jáquez Leal
89e41fc8e3 build: use git.mk
This patch handles dinamically the gitignore files with git.mk[1].

Removed the automake variable MAINTAINERCLANFILES in most of the
Makefile.am files since now it is handled by the top one.

1. https://github.com/behdad/git.mk/blob/master/git.mk

https://bugzilla.gnome.org/show_bug.cgi?id=749321
2015-05-18 16:14:46 +02:00
Víctor Manuel Jáquez Leal
ef7dc4eaf6 build: fix make distcheck
This patch fixes several issues found when running the `make distcheck`
target:

- In commit c561b8da, the update of gstcompat.h in Makefile.am was
  forgotten.
- In commit c5756a91 add the simple_encoder_source_h in EXTRA_DIST was
  forgotten.
- vpx.build.stamp is not generated at all, only vpx.configure.stamp.
- The make target distcleancheck failed because some autogenerated files
  were not handled with the DISTCLEANFILES variable.

Note: `make distcheck -jXX` is not currently supported.
2015-05-13 15:21:07 +02:00
Víctor Manuel Jáquez Leal
3eb7986409 build: don't compile HEVC if not supported
HEVC decoding was added recently libva-1.5.

This patch avoids HEVC decoding support in libgstvaapi if it is not available
in the installed libva.

https://bugzilla.gnome.org/show_bug.cgi?id=747831
2015-04-14 11:36:13 +02:00
Sreerenj Balachandran
430174f5a7 HEVC: Add HEVC(h265) decoder to core libgstvaapi
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
2015-04-13 15:41:45 +03:00
Sreerenj Balachandran
8c5f1b1c4b HEVC: Add codec utility methods to core libgstvaapi
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
2015-04-13 14:53:46 +03:00
Víctor Manuel Jáquez Leal
f5d3c2d85d 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>
2015-04-03 17:01:45 +03:00
Gwenole Beauchesne
aabb8c99c2 egl: add windowing support.
This provides for some basic EGL window abstraction.
2015-02-24 15:20:03 +01:00
Gwenole Beauchesne
23c489d8ee 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.
2015-02-24 15:20:03 +01:00
Gwenole Beauchesne
a9fe79610a 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
2015-02-24 15:20:03 +01:00
Gwenole Beauchesne
1e7c4db5a7 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
2015-02-24 15:20:03 +01:00
Víctor Manuel Jáquez Leal
671b1ea305 Fix compiler warnings
This patch fixes some warnings that gcc 4.9 reports.

https://bugzilla.gnome.org/show_bug.cgi?id=744411
2015-02-18 11:46:11 +02:00
Sreerenj Balachandran
eeefdb4958 Add VP8 Encoder to core libgstvaapi. 2015-02-13 13:42:04 +02:00
Sreerenj Balachandran
0609fad69c encoder: Add JPEG Encoder 2015-02-04 11:16:05 +02:00
Gwenole Beauchesne
073d6d59e1 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
2015-01-28 17:35:16 +01:00
Gwenole Beauchesne
250260cc36 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
2015-01-28 17:35:16 +01:00
Sreerenj Balachandran
7651c51324 Add missing header file to Makefile
Add gstvaapitexture_glx.h to Makefile.am
2015-01-28 18:25:09 +02:00
Gwenole Beauchesne
2101685b7d 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
2015-01-27 18:11:44 +01:00
Gwenole Beauchesne
1799b362a3 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
2015-01-27 18:11:44 +01:00
Gwenole Beauchesne
7ac501d026 build: fix with --no-undefined linker flags.
https://bugzilla.gnome.org/show_bug.cgi?id=729352
2014-08-01 11:05:01 +02:00
Sreerenj Balachandran
ee6d1b7bd1 build: fix conditional compilation of VP8 decoder.
https://bugzilla.gnome.org/show_bug.cgi?id=729170

[added check for VASliceParameterBufferBase fields]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-05-09 14:41:52 +02:00
Zhao, Halley
029bae0b6a Add initial VP8 decoder.
https://bugzilla.gnome.org/show_bug.cgi?id=722761

[complete overhaul, fixed support for resolution changes]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-04-18 20:03:44 +02:00
Gwenole Beauchesne
6e621413ab build: fix packaging for GStreamer 1.2.
Fix gstreamer-vaapi includedir for GStreamer 1.2 setups. i.e. use
the pkgconfig version (1.0) instead of the intended API version (1.2).
libgstvaapi1.0-dev and libgstvaapi1.2-dev packages will now conflict,
as would core GStreamer 1.0 and GStreamer 1.2 dev packages anyway.
2014-02-19 06:13:41 +01:00
Gwenole Beauchesne
db7a3b8d3e libs: factor out usages of vaGetConfigAttributes().
Add gst_vaapi_get_config_attribute() helper function that takes a
GstVaapiDisplay and the rest of the arguments with VA types. The aim
is to have thread-safe VA helpers by default.
2014-01-23 18:51:59 +01:00
Gwenole Beauchesne
3b714c8913 context: move overlay composition to separate files.
Move GstVideoOverlayComposition handling to separate source files.
This helps keeing GstVaapiContext core implementation to the bare
minimal, i.e. simpy helpers to create a VA context and handle pool
of associated VA surfaces.
2014-01-23 14:29:09 +01:00
Gwenole Beauchesne
c5bdeb6980 libs: check that private headers remain private.
Make sure that libgstvaapi private headers remain internally used to
build libgstvaapi libraries only. All header dependencies were reviewed
and checks for IN_LIBGSTVAAPI definition were added accordingly.

Also rename GST_VAAPI_CORE definition to IN_LIBGSTVAAPI_CORE to keep
consistency.
2014-01-23 14:29:09 +01:00
Gwenole Beauchesne
8e62164160 encoder: h264: completely remove private headers.
Drop private header since it was originally used to expose internals
to the plugin element. The proper interface is now the properties API,
thus rendering private headers totally obsolete.
2014-01-22 18:30:26 +01:00
Gwenole Beauchesne
9548e32cf4 utils: add new MPEG-2 helper functions.
Add various helper functions to convert profile, level, chroma formats
from gstreamer-vaapi world and the MPEG-2 specification world.
2014-01-13 16:25:49 +01:00
Gwenole Beauchesne
589078f2a4 utils: h264: expose levels in public header.
Instal <gst/vaapi/gstvaapiutils_h264.h> header but only expose the
H.264 levels in there. The additional helper functions are meant
to be private for now.
2014-01-10 19:52:50 +01:00
Gwenole Beauchesne
47dee4db96 utils: add new H.264 helper functions.
* Profiles:
- gst_vaapi_utils_h264_get_profile():
  Returns GstVaapiProfile from H.264 profile_idc value
- gst_vaapi_utils_h264_get_profile_idc():
  Returns H.264 profile_idc value from GstVaapiProfile

* Chroma formats:
- gst_vaapi_utils_h264_get_chroma_type():
  Returns GstVaapiChromaType from H.264 chroma_format_idc value
- gst_vaapi_utils_h264_get_chroma_format_idc():
  Returns H.264 chroma_format_idc value from GstVaapiChromaType
2013-12-06 19:25:21 +01:00
Matthieu Bouron
44ead80f5f Fix missing files in distribution tarball.
https://bugzilla.gnome.org/show_bug.cgi?id=719776

[Additional fixes and clean-ups]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-12-06 14:16:28 +01:00
Gwenole Beauchesne
0fb7c60508 encoder: rework GstVaapiCodedBuffer and related proxy.
Refactor the GstVaapiCodedBuffer APIs so that to more clearly separate
public and private interfaces. Besides, the map/unmap APIs should not
be exposed as is but appropriate accessors should be provided instead.

* GstVaapiCodedBuffer: VA coded buffer abstraction
- gst_vaapi_coded_buffer_get_size(): get coded buffer size.
- gst_vaapi_coded_buffer_copy_into(): copy coded buffer into GstBuffer

* GstVaapiCodedBufferPool: pool of VA coded buffer objects
- gst_vaapi_coded_buffer_pool_new(): create a pool of coded buffers of
  the specified max size, and bound to the supplied encoder

* GstVaapiCodedBufferProxy: pool-allocated VA coded buffer object proxy
- gst_vaapi_coded_buffer_proxy_new_from_pool(): create coded buf from pool
- gst_vaapi_coded_buffer_proxy_get_buffer(): get underlying coded buffer
- gst_vaapi_coded_buffer_proxy_get_buffer_size(): get coded buffer size

Rationale: more optimized transfer functions might be provided in the
future, thus rendering the map/unmap mechanism obsolete or sub-optimal.

https://bugzilla.gnome.org/show_bug.cgi?id=719775
2013-12-04 19:14:38 +01:00
Matthieu Bouron
76174922bc Fix build with GStreamer >= 1.3.
http://bugzilla.gnome.org/show_bug.cgi?id=715183

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-11-27 15:08:40 +01:00
XuGuangxin
d753c2226a encoder: add mpeg2 encoder.
Add initial support for MPEG-2 encoding. I/P/B frames are supported.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-11-24 16:52:05 +01:00
Wind Yuan
652245fb87 encoder: add h264 encoder.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-11-24 16:52:05 +01:00
Wind Yuan
8174a35737 Add initial infrastructure for video encoding.
Add initial API for video encoding: only basic interfaces and small
encoder objects are implemented so far.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-11-24 16:52:05 +01:00
Wind Yuan
99947d0592 libs: add generic bitstream writer.
GstBitWriter provides a bit writer that can write any number of bits
to a pre-allocated memory buffer. Helper functions are also provided
to write any number of bits from 8, 16, 32 and 64 bit variables.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-11-24 16:52:05 +01:00
Ross Burton
bc8a87d8bb build: link libgstvaapi-wayland against videoutils.
This library is using symbols that don't exist in GStreamer 0.10 so
it needs to link to built-in implementation (libgstvaapi-videoutils).

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

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-11-22 11:23:03 +01:00
Gwenole Beauchesne
f09008a8d1 Add initial infrastructure for video processing.
Add initial API for video processing: only scaling and color format
conversion operations are supported.
2013-08-23 19:00:38 +02:00
Gwenole Beauchesne
d8ffc2c150 libs: drop some public APIs.
Don't expose GstVaapiContext APIs and make them totally private to
libgstvaapi core library. That API would also tend to disappear in
a future revision. Likewise, don't expose GstVaapiDisplayCache API
but keep symbols visible so that the various render backends could
share a common display cache implementation in libgstvaapi.

Try to clean-up the documentation from any stale entry too.
2013-08-23 19:00:38 +02:00
Gwenole Beauchesne
2b0a4a0304 image: clean image API up.
Don't expose functions that reference a GstVaapiImageRaw, those are
meant to be internal only for implementing subpictures sync. Also add
a few private definitions to avoid functions calls for retrieving
image size and format information.
2013-07-26 13:16:52 +02:00
Gwenole Beauchesne
0af0849a92 x11: implement pixmap rendering with RENDER extension.
Use hardware accelerated XRenderComposite() function, from the RENDER
extension, to blit a pixmap to screen. Besides, this can also support
cropping and scaling.
2013-07-22 15:45:10 +02:00