Commit graph

161 commits

Author SHA1 Message Date
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
4fc8769761 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>
2015-11-09 16:14:56 +01:00
Sreerenj Balachandran
157ce77727 tests: Fix compilation while enabling egl as the only renderer in build
Include missing header files gstvaapidisplay_egl.h and gstvaapiwindow_egl.h.
2015-07-02 12:37:27 +03:00
Sreerenj Balachandran
2d64321313 build: Don't build simple-encoder test program if there is no VA Encoding support
This will fix the build error against older VA-APIs <= 0.32
2015-06-18 13:19:26 +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
Gwenole Beauchesne
c5756a9157 tests: simple-encoder: fix build warnings on 64-bit platforms.
Add a cosmetic change to replace VAAPI buffer with VA buffer and most
importantly fix warnings spitted out during build on 64-bit platforms.

../../tests/simple-encoder.c:211:5: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘gssize’ [-Wformat=]
     g_warning ("Invalid VAAPI buffer size (%d)", size);
     ^
../../tests/simple-encoder.c:217:5: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘gssize’ [-Wformat=]
     g_warning ("Failed to create output buffer of size %d", size);
     ^
2015-05-12 16:04:33 +02:00
Víctor Manuel Jáquez Leal
be40a1d479 tests: add simple-encoder program
This patch adds a simple-encoder test program that uses libgstvaapi for video
encoding to elementary (raw) streams. Input stream is raw YUV in the Y4M
format. That can be from a regular file or standard input when the input
filename is "-".

Usage: simple-encoder [options]* <source>

Options:
--output|-o     output file name
--codec|-c      codec to use for video encoding
--bitrate|-b    desired bitrate (kbps)

By default, and as an initial patch, the encoded stream shall conform to the
minimally supported profile. That is "Constrained Baseline Profile" for H.264
and "Simple Profile" for MPEG-2. Though, those are the defaults to be
generated by libgstvaapi.

You can find Y4M sample files here http://samples.mplayerhq.hu/yuv4mpeg2/

Original-patch-by: Changzhi Wei <changzhix.wei@intel.com>
* general code clean-up
* removed the yuv reader thread
* re-wrote the y4m file parser
* updated used API fixed some wrong usage
* fixed a lot of memory leaks
* added the bitrate setting
* keep fps' numerator and denominator
* simplified the thread control
* removed custom logging and use glib

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=719528
2015-05-12 11:24:41 +02:00
Víctor Manuel Jáquez Leal
c561b8da8a 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>
2015-04-03 17:08:30 +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
Víctor Manuel Jáquez Leal
43d8366ec6 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>
2015-04-03 16:55:43 +03:00
Víctor Manuel Jáquez Leal
d256f1d283 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>
2015-04-03 16:55:27 +03:00
Gwenole Beauchesne
8d4498f9fd 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.
2015-02-24 15:20:03 +01:00
Gwenole Beauchesne
96ce1bc761 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.
2015-01-27 18:11:45 +01: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
0a108653f2 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
2015-01-27 18:11:44 +01:00
Simon Farnsworth
c4cd8e2b36 build: fix source file modes.
A few source files are marked executable in error - fix them

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

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
2014-05-09 14:41:57 +02:00
Gwenole Beauchesne
e6fb4c1cdc tests: test-filter: fix "deinterlace" option parse.
Default to GST_VAAPI_DEINTERLACE_METHOD_NONE if no "deinterlace" option
string was provided, i.e. if it remained set to NULL.
2014-01-23 18:52:00 +01:00
Gwenole Beauchesne
6bf3c1863c legal: update copyright notice dates. 2014-01-22 19:02:35 +01:00
Gwenole Beauchesne
dd2ca582a1 tests: simple-decoder: don't use deprecated g_thread_create().
Use g_thread_try_new() instead of the deprecated g_thread_create()
function. Provide compatibility glue for any GLib version < 2.31.2.
2014-01-06 10:04:08 +01:00
Gwenole Beauchesne
c5581298fb display: don't use GstCaps for decode or encode profiles list.
Replace gst_vaapi_display_get_{decode,encode}_caps() APIs with more
more convenient APIs that return an array of GstVaapiProfile instead
of GstCaps: gst_vaapi_display_get_{decode,encode}_profiles().
2013-12-20 17:16:58 +01:00
Gwenole Beauchesne
c4ca08a8d6 display: don't use GstCaps for image or subpicture formats list.
Replace gst_vaapi_display_get_{image,subpicture}_caps() APIs, that
returned GstCaps, with more convenient APIs that return an array of
GstVideoFormat: gst_vaapi_display_get_{image,subpicture}_formats().
2013-12-20 17:16:58 +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
Gwenole Beauchesne
c516311a1a legal: update copyright notice dates. 2013-11-22 06:39:20 +01:00
Gwenole Beauchesne
15519ebe3d legal: add per-file authorship information.
Credit original authors on a per-file basis as we cannot expect people
to know all country-specific rules, or bother browsing through the git
history.
2013-11-22 06:39:15 +01:00
Gwenole Beauchesne
06c7fde8e0 filter: fix semantics of deinterlacing flags.
Fix deinterlacing flags to make more sense. The TFF (top-field-first)
flag is meant to specify the organization of reference frames used in
advanced deinterlacing modes. Introduce the more explicit flag TOPFIELD
to specify that the top-field of the supplied input surface is to be
used for deinterlacing. Conversely, if not set, this means that the
bottom field of the supplied input surface will be used instead.
2013-11-21 23:08:02 +01:00
Gwenole Beauchesne
d262d36623 tests: simple-decoder: fix for non-X11 backends.
Don't try to create pixmaps if we have not requested that feature. This
fixes execution for non-X11 backends, and most specifically DRM video
output mode.
2013-09-24 16:24:05 +02:00
Gwenole Beauchesne
ed9cc7c8d2 tests: filter: add support for deinterlacing.
Add --deinterlace option to enable deinterlacing through explicit VA/VPP
deinterlacing filter. However, if --deinterlace option is not set but the
--deinterlace-flags option is set with "top-field-first", then the very
basic bob deinterlacing filter is set through VA/VPP proc pipeline flags.
2013-08-23 19:00:38 +02:00
Zhao Halley
d48a18c9f2 tests: filter: add support for denoising and sharpening.
Add --denoise option to enable noise reduction with the level specified
as the option value (float). Likewise, add --sharpen option to enable
sharpening.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-08-23 19:00:38 +02:00
Gwenole Beauchesne
96362e6162 tests: filter: add support for frame cropping.
Add support for frame cropping through the --crop-rect|-c argument.
The format used is either <WIDTH> 'x' <HEIGHT>, with origin at (0,0) ;
or full specification with '('? <X> ',' <Y> ')'? <WIDTH> 'x' <HEIGHT>.
2013-08-23 19:00:38 +02:00
Gwenole Beauchesne
290cc8b7c9 tests: filter: dump supported operations and formats. 2013-08-23 19:00:38 +02:00
Zhao Halley
d7cc1374ed tests: add initial test for video processing.
Add minimal test case for video processing: scaling and color format
conversion.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2013-08-23 19:00:38 +02:00
Gwenole Beauchesne
b1085b57d5 tests: image: allow creation of images with interleaved patterns.
Add image_generate_full() function to create interleaved color rectangles.
If flags is zero, the whole frame is generated with a unique pattern. If
flags is non-zero, then each field is handled individually.
2013-08-23 19:00:38 +02:00
Gwenole Beauchesne
dd6a0d87ff tests: image: fix conversion from RGB to YUV.
Fix RGB to YUV conversion to preserve full data range.
2013-08-23 19:00:37 +02:00
Gwenole Beauchesne
73323ba76a tests: image: try to upload images through vaDeriveImage() too.
On some platforms, vaPutImage() would fail even if it does not involve
color format conversion or scaling, whereas copying raw pixels through
vaDeriveImage() could work instead.
2013-07-26 13:16:57 +02:00
Gwenole Beauchesne
f997f6271f tests: image: add support for packed YUV formats.
Add support for packed YUV 4:2:2 formats, i.e. YUY2 and UYVY.
2013-07-26 13:16:57 +02:00
Gwenole Beauchesne
6e9ce9ae37 tests: image: fix generation of I420/YV12 images.
U/V planes were reversed, thus producing invalid images.
2013-07-26 13:16:57 +02:00
Gwenole Beauchesne
e790722a84 tests: image: fix string representation for GstVideoFormat. 2013-07-26 13:16:52 +02:00
Gwenole Beauchesne
17c8f17d06 tests: simple-decoder: add support for pixmap API.
Add support for the new render-to-pixmap API. Avoid flickering on
platforms supporting video overlay by keeping up to 2 intermediate
pixmaps.
2013-07-22 15:45:10 +02:00
Gwenole Beauchesne
2e85860c9c tests: simple-decoder: add support for video cropping.
Handle video cropping information attached to a VA surface proxy.
2013-07-22 15:45:10 +02:00
Gwenole Beauchesne
155af03491 tests: add support for render-to-pixmap.
Add --pixmap option to test-decode so that to allow copies of VA
surface to an intermediate pixmap and rendering from that pixmap.

Only X11 backends are supported for now.
2013-07-22 15:45:10 +02:00
Gwenole Beauchesne
7fa4973f8a Fix new video format API.
Fix new internal video format API, based on GstVideoFormat, to not
clobber with system symbols. So replace the gst_video_format_* prefix
with gst_vaapi_video_format_ prefix, even if the format type remains
GstVideoFormat.
2013-07-15 14:42:33 +02:00
Gwenole Beauchesne
4ca7922f4b Use GstVideoInfo for video pools.
Get rid of GstCaps to create surface/image pool, and use GstVideoInfo
structures instead. Those are smaller, and allows for streamlining
libgstvaapi more.
2013-07-10 17:03:47 +02:00
Gwenole Beauchesne
cb92e7ca79 tests: port to new video format API. 2013-07-09 17:16:35 +02:00
Gwenole Beauchesne
0829d94f38 tests: add basic support for video cropping.
Change generic decoder of sample I-frame to return a GstVaapiSurfaceProxy
instead of a plain GstVaapiSurface. This means that we can now retrieve
the frame cropping rectangle from the surface proxy, along with additional
information if ever needed.
2013-07-08 18:52:56 +02:00
Gwenole Beauchesne
811c1abbc6 tests: improve check for display cache.
Improve check for display cache infrastructure. In particular, for X11 and
GLX backends, we need to make sure that we can create a GstVaapiDisplayX11
from another GstVaapiDisplayGLX, i.e. underlying X11 and VA displays can be
shared. Besides, allocating a GstVaapiDisplayGLX while a GstVaapiDisplayX11
already exists will have to generate different VA displays.
2013-05-27 16:07:15 +02:00
Gwenole Beauchesne
3c751b2dfd tests: cope with GST_VAAPI_IS_xxx() macros removal. 2013-05-23 19:01:34 +02:00
Gwenole Beauchesne
da403b62d0 tests: cope with new GstVaapiMiniObject objects. 2013-05-07 18:19:03 +02:00
Gwenole Beauchesne
0bd929dfa2 surfaceproxy: drop user-data support from GstVaapiSurfaceProxy.
Drop user-data support from GstVaapiSurfaceProxy. Rather make it explicit
to call some user-provided function when the surface proxy is released.
2013-04-16 18:54:37 +02:00