Commit graph

1367 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
d1581ba557 libs: move get_surface_formats to utils_core
The query of all the supported formats for a VA config were only used by the
postprocessor (vaapifilter). But, in order to enable the vaapidecoder to
negotiate a suitable raw format with downstream, we need to query these
formats against the decoder's config.

This patch is the first step: moves the code in filter's ensure_image() to a
generic gst_vaapi_get_surface_formats() in vaapiutils_core, so it can be
shared later by the decoder.

https://bugzilla.gnome.org/show_bug.cgi?id=752958
2016-11-03 13:04:09 +01:00
Víctor Manuel Jáquez Leal
b1f6da98de libs: fix code style for errors 2016-11-03 12:51:44 +01:00
Víctor Manuel Jáquez Leal
5ff513ec27 libs: vaapitexturemap: trivial code-style fix 2016-11-03 08:31:16 +01:00
Víctor Manuel Jáquez Leal
be65508753 libs: display: egl: avoid recreate native display
Instead of passing the native descriptor of the display, just pass the received
GstVaapiDisplay and reuse it.
2016-11-03 08:27:57 +01:00
Hyunjun Ko
313860dea4 libs: window: egl: pass native va display
When creating a GstVaapiWindowEGL, it also creates native window by its own
native display. It should pass the native display, either X11 or Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=768266
2016-11-03 08:27:40 +01:00
Hyunjun Ko
185da3d1a4 libs: display: GstVaapiDisplay as GstObject descendant
This patch is to change the inheritance of GstVaapiDisplay to GstObject,
instead of GstVaapiMiniObject. In this way we can use all the available
infrastructure for GObject/GstObject such as GstTracer, GIR, etc.

In addition, a new debug category for GstVaapiDisplay is created to make it
easier to trace debug messages. It is named "vaapidisplay" and it transverse
all the VA display backends (DRM, GLX, EGL, Wayland, ...)

This patch is a step forward to expose GstVaapiDisplay for users in a future
library.

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

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-11-03 08:24:59 +01:00
Hyunjun Ko
abc2480b10 libs: minor correction for logical consistency
GstVaapiDecode is a descendant of GstVaapiMiniObject, so, thought we should
use its methods, even though it doesn't change functionality.

GstVaapiPixmap, GstVaapiTexture and GstVaapiWindow are descendant of
GstVaapiObject, hence its methods shall be used.

https://bugzilla.gnome.org/show_bug.cgi?id=772554
2016-10-25 11:35:22 +02:00
Víctor Manuel Jáquez Leal
fb95a79818 build: clean up the dlopen usage 2016-10-19 16:14:34 +02:00
Víctor Manuel Jáquez Leal
ef3ee8b7bb encoder: h264,h265: fix regression in offset count
In commit dc35dafa a bug was introduced because I assumed that
GST_CLOCK_TIME_NONE is zero when is -1. This patch fixes that mistake.

https://bugzilla.gnome.org/show_bug.cgi?id=772259
2016-10-19 16:14:34 +02:00
Víctor Manuel Jáquez Leal
9414815383 libs: display: egl: remove unused header include
The header gmodule.h is not used since the library dynamic loading for EGL
display was removed.

https://bugzilla.gnome.org/show_bug.cgi?id=772599
2016-10-08 13:08:29 +02:00
Hyunjun Ko
a80e10ac5c libs: display{egl,glx}: cache GstVaapiTextures
instances when created and reuse

This patch improves performance when glimagesink uploads a GL texture.

It caches the GStVaapiTexture instances in GstVaapiDisplay{GLX,EGL}, using an
instance of GstVaapiTextureMap, so our internal texture structure can be found
by matching the GL texture id for each frame upload process, avoiding the
internal texture structure creation and its following destruction.

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

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-09-22 17:01:59 +02:00
Hyunjun Ko
f974c91d73 libs: vaapitexturemap: implement GstVaapiTextureMap
Implement GstVaapiTextureMap object, which caches VAAPI textures, so them can be
reused. Internally it is a hash table.

Note that it is GstObject based rather than GstVaapiObject, as part of the future
converstion to GstObject of most of the code.

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

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-09-22 14:19:05 +02:00
Sreerenj Balachandran
0fae277d34 encoder: vp8: Increase the allocation size for coded buffer
We are not getting enough compression for some streams and
encoded frame end up with more size than allocated.
Assuming a compression ratio of 4, which should be good enough
for holding the frames.

https://bugzilla.gnome.org/show_bug.cgi?id=771528
2016-09-21 09:55:53 +03:00
Sreerenj Balachandran
44a90c196d encoder: vp9: Fix refresh frame flag setting
While doing the mode-1 referece picture selection,
the circular buffer logic was not correctly setting the
refresh frame flags as per VP9 spec.
Make sure refresh_flag[0] get updated correclty after
each cycle of GST_VP9_REF_FRAMES.

https://bugzilla.gnome.org/show_bug.cgi?id=771507
2016-09-21 09:52:21 +03:00
Víctor Manuel Jáquez Leal
9afa0ce471 vaapidecode: codec_data minimal size is 7
When the format of a H.264 stream is AVC3, the SPS and PPS are inside the
stream, not in the codec_data, so the size of codec_data might be 7.

This patch reduces the minimal size of the codec_data buffer from 8 to 7.

https://bugzilla.gnome.org/show_bug.cgi?id=771441
2016-09-15 10:38:08 +02:00
Víctor Manuel Jáquez Leal
574ff693a5 libs: surface: ensure composite overlay is not bigger
Ensure the composition overlay rectangle (subtitles) is not bigger than
the surface where it is going to be composited and rendered.

https://bugzilla.gnome.org/show_bug.cgi?id=766978
2016-09-08 17:06:57 +02:00
Víctor Manuel Jáquez Leal
7ebef58093 decoder: vc1: fails only on advanced profile
In commit 2eb4394 the frame coding mode was verified for progressive
regardless the profile. But the FCM is only valid in the advanced
profile. This patch checks for the advanced profile before verifying FCM for
progressive.

https://bugzilla.gnome.org/show_bug.cgi?id=769250
2016-09-06 12:39:22 +02:00
Scott D Phillips
2eb439416d decoder: vc1: Fail only on actual interlaced frames
In the earlier patch:

 f31d9f3 decoder: vc1: Print error on interlaced content

Decoding would error out if the interlace flag was set in the
sequence bdu. This isn't quite right because a video can have this
flag set and yet not have any interlaced pictures.

Here instead we error out when either parsing a field bdu or
decoding a frame bdu which has fcm set to anything other than
progressive.

Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=769250
2016-09-05 12:33:03 +02:00
Scott D Phillips
f31d9f37b6 decoder: vc1: Print error on interlaced content
Interlaced video is as yet unsupported in the vc1 element. Print
an error to make that more obvious.

https://bugzilla.gnome.org/show_bug.cgi?id=769250
2016-08-16 11:58:38 +03:00
Víctor Manuel Jáquez Leal
ad3b45ebc4 encoder: h264: fix C90 mixed declarations and code
Commit 4259d1a introduced this compilation error. This patch fixes it.
2016-08-10 13:29:45 +02:00
Víctor Manuel Jáquez Leal
68b9ab7818 encoder: h264,h265,mpeg2,vp8: use gst_util_uint64_scale() for bitrate
Use gst_util_uint64_scale() to calculate bitrate instead of normal arithmetic
to avoid overflows, underflows and loss of precision.

https://bugzilla.gnome.org/show_bug.cgi?id=768458
2016-08-10 12:20:48 +02:00
Víctor Manuel Jáquez Leal
4259d1aec7 vaapiencode: h264,h265: validate fps numerator
Validate that fps numerator is non-zero so it can be used to calculate
the duration of the B frame.

Also it gst_util_uint64_scale() is used instead of normal arithmetic in
order to aviod overflows, underflows and loss of precision.

https://bugzilla.gnome.org/show_bug.cgi?id=768458
2016-08-10 12:20:48 +02:00
Víctor Manuel Jáquez Leal
27429ce676 libs: egl: remove dynamic library loading code
Since the upstream of gstreamer-vaapi, the library is not a public shared
object anymore. But the EGL support depended on this dynamic library, so the
EGL support was broken.

This patch removes the dynamic library loading code and instantiates the
EGL display using either X11 or Wayland if available.

https://bugzilla.gnome.org/show_bug.cgi?id=767203
2016-07-22 17:23:23 +02:00
Víctor Manuel Jáquez Leal
7472826a36 Revert "gstvaapisurface_drm: release image when done"
This reverts commit 1dbcc8a0e1  and commit
372a03a9e3.

While the dmabuf handle is exported, the derive image must exist, otherwise
the image's VA buffer is invalid, thus the dmabuf handle is never released,
leading into a file descriptors leak.
2016-07-22 17:15:58 +02:00
Víctor Manuel Jáquez Leal
3efc2f70b7 encoder: h265: fix code-style 2016-07-22 17:15:38 +02:00
Hyunjun Ko
cc6df605a1 vaapipostproc: checking and updating filter parameter only when it's set
This patch is to avoid checking filter value at every frame.

https://bugzilla.gnome.org/show_bug.cgi?id=751876
2016-07-22 12:08:20 +02:00
Allen Zhang
d9ef88230f decoder: h265: handle the SEI NAL units included in codec_data
The prefix/suffix SEI nal units can appear in codec_data too
which weren't handled before. Parse these SEI headers to
fix the segfault.

https://bugzilla.gnome.org/show_bug.cgi?id=768544
2016-07-21 11:24:31 +03:00
Sreerenj Balachandran
6c6007ad94 encoder: h264: Fix MVC encode while enabling dct8x8
Pack the transform_8x8_mode_flag and other necessary rbsp data
in packed_pps header for MVC encode.

https://bugzilla.gnome.org/show_bug.cgi?id=768647
2016-07-15 14:41:27 +03:00
Jagyum Koo
0d1d097273 wayland: Error check before using cached wl_display
A planar(or some other) buffer allocation may fail on the driver, then
the wayland connection becomes invalid, not able to send request or
receive any event. So we need to set up a new wayland connection if
there's an error detected on the cached wl_display.

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

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-07-14 12:18:10 +02:00
Víctor Manuel Jáquez Leal
fcc08627e5 decoder: vc1: flush dpb only if opened
Flush the decode picture buffer, if and only if, the decoder is
started. Otherwise the dpb structure might be NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=742922
2016-07-11 10:44:06 +02:00
Hyunjun Ko
e8fabf6a99 vaapisink: add support for GST_TAG_IMAGE_ORIENTATION
https://bugzilla.gnome.org/show_bug.cgi?id=765798
2016-07-05 20:17:12 +02:00
Víctor Manuel Jáquez Leal
22647090be utils: report VP9 profiles
Add VP9Profile0-3 name mapping.
2016-06-28 16:34:30 +02:00
Scott D Phillips
60cd511fad remove unused glibcompat.h
glibcompat.h is no longer doing anything. Remove it.

Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=767886
2016-06-23 12:47:52 +02:00
Scott D Phillips
4aec5bdd72 encoder: h264: Use high profile by default
Change defaults for max-bframes, cabac, and dct8x8 to be enabled
by default. This will cause the default profile to be high instead
of baseline. In most situations this is the right decision, and
the profile can still be lowered in the case of caps restrictions.

Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=757941
2016-06-23 12:28:50 +02:00
Hyunjun Ko
05cf583c97 decoder: h265: fix to release all dpb pictures
Without this, all dpb pictures are not released during flush,
because we used the global dpb_count variable for checking the
dpb fullness which get decremented in dpb_remove_index()
routine during each loop iteration.

https://bugzilla.gnome.org/show_bug.cgi?id=767934
2016-06-22 15:11:56 +03:00
Scott D Phillips
57ee937b8c decoder: vp9: Update comment about context resets
Clarify that vaapi context resets are never needed for vp9, but
that ensure_context() needs called when the size increases so that
new surfaces can be allocated.

Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=767474
2016-06-15 20:50:20 +02:00
Scott D Phillips
ad9fcb9386 gstvaapicontext: control reset_on_resize with option
Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=767474
2016-06-15 20:50:20 +02:00
Víctor Manuel Jáquez Leal
73d1228896 libs: change gst_vaapi_surface_new_with_dma_buf_handle()
Instead of passing the data already in GstVideoInfo, let's just pass the
GstVideoInfo structure.

https://bugzilla.gnome.org/show_bug.cgi?id=765435
2016-06-08 10:19:01 +02:00
Sreerenj Balachandran
76c2e5fdb5 encoder: vp9: Add simple algorithms for reference picture selection
Added two modes(as properties) for reference picture selection:

ref-mode-0: AltRef and GoldRef pointing to the recent keyframe
and LastRef is pointing to the previous frame.

ref-mode-1: Previous frame (n) as LastRef , n-1 th frame as GoldRef
and n-2 th frame as AltRef

https://bugzilla.gnome.org/show_bug.cgi?id=766048
2016-05-30 12:18:04 +03:00
Sreerenj Balachandran
5dc63dbf5a encoder: vp9: Define Max frame width and height
https://bugzilla.gnome.org/show_bug.cgi?id=766048
2016-05-30 11:25:52 +03:00
Sreerenj Balachandran
1606d4bd77 encoder: vp9: Add more propertis for tuning encode quality
Added three tuning properties:
1: filter_level
2: sharpness_level
3: luma ac quant-table index

https://bugzilla.gnome.org/show_bug.cgi?id=766048
2016-05-30 11:25:03 +03:00
Sreerenj Balachandran
221fb9351a Add vp9 encoder support in libgstvaapi
https://bugzilla.gnome.org/show_bug.cgi?id=766048
2016-05-30 11:23:12 +03:00
Víctor Manuel Jáquez Leal
765a53d4c2 gstvaapisurface_drm: fix internal documentation 2016-05-26 11:44:18 +02:00
Víctor Manuel Jáquez Leal
372a03a9e3 gstvaapisurface_drm: fix code-style 2016-05-26 11:43:51 +02:00
Víctor Manuel Jáquez Leal
d69917ecca remove spurious gst_video_info_init()
gst_video_info_set_format() and gst_video_info_from_caps() call, internally,
gst_video_info_init(), hence it is not required to call it before them. This
patch removes these spurious calls.
2016-05-20 19:33:39 +02:00
Sreerenj Balachandran
c91de2398a encoder : h264: Disable b-frame encode in low-power mode
This is a workaround since vaapi-intel-driver doesn't have
support for B-frame encode when utilizing low-power-enc
hardware block.

Fixme :We should query the VAConfigAttribEncMaxRefFrames
instead of blindly disabling b-frame support and set b/p frame count,
buffer pool size etc based on the query result.

https://bugzilla.gnome.org/show_bug.cgi?id=766050
2016-05-13 11:45:20 +03:00
Sreerenj Balachandran
43af7c362c encoder: h264 : Use "tune=low-power" for enabling lowpower encode
Remove the duplicate property "low-power-enc" and use the
tune property for enabling low power encoding mode.

https://bugzilla.gnome.org/show_bug.cgi?id=766050
2016-05-13 11:44:57 +03:00
Sreerenj Balachandran
d446013ae4 gstvaapiencoder:Use internal api to dervie configured VAEntrypoint
https://bugzilla.gnome.org/show_bug.cgi?id=766050
2016-05-11 12:06:38 +03:00
Sreerenj Balachandran
32ee78bc52 encoder: h264: Add support of low power/high performance encoding mode
Added a new property "low-power-enc" for enabling low power
encoding mode. Certain encoding tools may not be available
with the VAEntrypointEncSliceLP.

https://bugzilla.gnome.org/show_bug.cgi?id=766050
2016-05-11 12:05:36 +03:00
Sreerenj Balachandran
8c1cfbaa1e Add mapping for Macroblock level rate control (VA_RC_MB) 2016-05-11 12:04:46 +03:00
Sreerenj Balachandran
c1abf37d0b gstvaapidisplay: Add VAEntrypointEncSliceLP support
https://bugzilla.gnome.org/show_bug.cgi?id=766050
2016-05-11 12:03:08 +03:00
Sreerenj Balachandran
7e4e597c6d gstvaapiprofile : Add VAEntrypointEncSliceLP definitions
This is for implementations that supports low_power/high_performance
variant for slice level encode.

https://bugzilla.gnome.org/show_bug.cgi?id=766050
2016-05-11 12:02:44 +03:00
Sreerenj Balachandran
018ea8b2fc encoder: h265: Enable cu_qp_delta_enabled_flag for CBR
It seems driver requires enablement of cu_qp_delta_enabled_flag
for modifying QP values to controll the CBR mode bitrate.

https://bugzilla.gnome.org/show_bug.cgi?id=749852
2016-04-27 17:10:26 +03:00
Sreerenj Balachandran
7ddc7ea0bc encoder: h265: Add CBR Encoding support
https://bugzilla.gnome.org/show_bug.cgi?id=749852
2016-04-27 17:06:09 +03:00
Julien Isorce
8e7ebaa505 gstvaapisurface: explicitely clear TILING flag if dmabuf
https://bugzilla.gnome.org/show_bug.cgi?id=755072
2016-04-26 16:10:45 +01:00
Julien Isorce
1dbcc8a0e1 gstvaapisurface_drm: release image when done
Otherwise intel-vaapi-driver will fail to process the exported surface because
it will find it is currently derived, so considered as busy.

https://bugzilla.gnome.org/show_bug.cgi?id=755072
2016-04-26 16:06:12 +01:00
Michael Olbrich
1e32d62c1e libs: fix deleting a GstVaapiCodedBufferPool object
Call gst_vaapi_video_pool_finalize() in coded_buffer_pool_finalize().
Otherwise it is not called when the pool is destroyed and all objects
referenced by the GstVaapiVideoPool are never released.

https://bugzilla.gnome.org/show_bug.cgi?id=764993
2016-04-13 15:45:26 +02:00
Víctor Manuel Jáquez Leal
bb0b8ce7ab surface: destroy derived image
If gst_vaapi_image_new_with_image() fails, the created derived image should be
destroyed, otherwise the surface cannot be processed because is being used.

https://bugzilla.gnome.org/show_bug.cgi?id=764607
2016-04-07 18:25:56 +02:00
Sreerenj Balachandran
80c3bfe448 decoder: vp9: Align with the ABI changes in vp9 codecparser
The subsampling_x, subsampling_y, bit_depth, color_space and color_range
fileds are moved from GstVp9FrameHdr to the global GstVp9Parser structure.
These fields are only present in keyframe or intra-only frame, no need to
duplicate them for inter-frames.

https://bugzilla.gnome.org/show_bug.cgi?id=764082
2016-04-01 14:00:28 +03:00
Sreerenj Balachandran
641e9a47f6 decoder: vp9 : Add 10bit decoding support (Profile2)
https://bugzilla.gnome.org/show_bug.cgi?id=764082
2016-04-01 13:59:59 +03:00
Sreerenj Balachandran
4e5cf53ee0 gstvaapiporfile: Add more VP9 profile definitions
https://bugzilla.gnome.org/show_bug.cgi?id=764082
2016-04-01 13:57:45 +03:00
Sreerenj Balachandran
c009d29c00 decoder: h265: Fix offset calculation when there is more than one vps/sps/pps present in codec_data
The array_completeness, reserved bit and num_nal_units fields
in HEVCDecoderConfigurationRecord will be present for each VPS/SPS/PPS array list,
but not for each occurance of similar headers.

https://bugzilla.gnome.org/show_bug.cgi?id=764274
2016-03-30 14:37:21 +03:00
Sreerenj Balachandran
35fe2abc3e video-format: Keep the HW order preference while mapping to GstVideoFormats 2016-03-29 15:34:38 +03:00
Scott D Phillips
eea3f0cdb2 Add P010 video format support
The P010 video format is the native format used by the vaapi intel driver
for HEVCMain10 decode . Add support for planes and images of this video format.

https://bugzilla.gnome.org/show_bug.cgi?id=759181
2016-03-29 14:34:00 +03:00
Stephen
b64eaaad4d libs: x11: allows 30-bit colour depth
The colour depth is clamped to 24 when it is not equal {15,16,24,32}. But this
fails with the NVIDIA binary driver as it doesn't advertise a TrueColor visual
with a depth of 24 (only 30 and 32). Allowing the depth to be 30, lets everything
work as expected.

https://bugzilla.gnome.org/show_bug.cgi?id=764256
2016-03-29 12:08:55 +02:00
Sreerenj Balachandran
a486942ba2 decoder: h265: Fix offset calculation in codec_data parsing
https://bugzilla.gnome.org/show_bug.cgi?id=762922
2016-03-11 17:44:07 +02:00
Thiago Santos
0a9161ac3a vaapidecoder_h265: plug leak of h265 parsing info
If something goes wrong while parsing, the info object is
being leaked

https://bugzilla.gnome.org/show_bug.cgi?id=763121
2016-03-09 15:39:31 +01:00
Thiago Santos
2b47bf8c74 vaapidecoder_h264: plug leak of h264 parsing info
If something goes wrong while parsing, the info object is
being leaked

https://bugzilla.gnome.org/show_bug.cgi?id=763121
2016-03-09 15:39:31 +01:00
Vineeth TM
805a4733bf vaapidisplay: Fix uninitialized value error for VA attribute
https://bugzilla.gnome.org/show_bug.cgi?id=763362
2016-03-09 15:39:31 +01:00
Sreerenj Balachandran
1eabfad5c3 decoder: vp9: Assign values for profile and bit_depth from frame header
bit_depth field has added only in VA-API 0.39.0, added version check.
2016-03-04 10:51:42 +02:00
Lim Siew Hoon
0bae36bb88 Add memset to initialize value for VAEncSliceParameterBufferJPEG
https://bugzilla.gnome.org/show_bug.cgi?id=762850
2016-02-29 11:55:27 +02:00
Scott D Phillips
ffd5028a38 decoder: hevc: Fill dependent slice segment headers while parsing
Copy the data into the dependent slice segment header from the
corresponding independent slice segment header during parsing.

Previously the reference to the "previous" independent header was
held through the parsing phase and then dereferenced during the
decoding phase. This caused all dependent headers to be populated
with the data of the AU's last independent header instead of the
proper corresponding header.

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

Changes since v1:
- Reworded commit message
2016-02-23 10:55:02 +02:00
Thiago Santos
1f71503fc9 vaapidecoder_h265: fix parsing of NALU aligned data
Don't assume the whole buffer is a single NAL, instead look for the
next start code in case there are multiple NALs per buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=762328
2016-02-22 12:09:35 +01:00
Thiago Santos
056a69cf2a vaapidecoder_h264: fix parsing of NALU aligned data
Don't assume the whole buffer is a single NAL, instead look for the
next start code in case there are multiple NALs per buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=762328
2016-02-19 15:37:45 +01:00
Sebastian Dröge
734b8bad8f vaapi: Fix various compiler warnings and disable -Wredundant-decls for now 2016-02-16 15:09:01 +02:00
Víctor Manuel Jáquez Leal
60ebfbc595 libs: fix build error
gst_vaapi_buffer_proxy_{acquire_handle,release_handle,finalize,class}
functions are used only when libva's API version is greater than 0.36.0

This patch guards those functions completely rather than just their
content. The patch is a continuation of commit 38f8fea4

Original-patch-by: Vineeth TM <vineeth.tm@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=762055
2016-02-15 18:20:48 +01:00
Víctor Manuel Jáquez Leal
d76d78cc8e libs: fix compiler warnings
After setting the release flags, the compiler warns about a couple
initialized variables.

Also marked a couple of set variables as unused, because they are only
used for assertion.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-03 20:22:46 +01:00
Víctor Manuel Jáquez Leal
ac730d0a62 libs: humongous code style fix
As part of the upstreaming process of gstreamer-vaapi into the GStreamer
umbrella, we need to comply with the project's code style. This meant to
change a lot of code.

It was decided to use a single massive patch to update the code style.

I would like to apologize with the original developers of this code because of
the history breakage.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-03 20:03:47 +01:00
Víctor Manuel Jáquez Leal
4b5be5973e libs: small refactors to enhance the code style
As gst-indent generated ugly code in these cases, this patch changes the used
idiomatic into other one.

No functional changes were introduced.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-03 20:03:47 +01:00
Víctor Manuel Jáquez Leal
28d01c0857 libs: small code style fixes
This a set of small code style fixes detected as-is by gst-indent.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-03 12:45:30 +01:00
Víctor Manuel Jáquez Leal
02c0e6c183 libs: trivial comment style fixes
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-03 12:20:37 +01:00
Víctor Manuel Jáquez Leal
a0b325c19a libs: avoid gst-indent mess up
Guard pieces of code to avoid gst-ident to mess up the following code.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-03 12:20:37 +01:00
Tim-Philipp Müller
ab28dea7c1 Fix some more compiler warning
Two (false) compiler warnings about variables potentially
being used uninitialized, and one about a variable being
set but not used.

https://bugzilla.gnome.org/show_bug.cgi?id=759192
2016-02-02 17:19:42 +01:00
Tim-Philipp Müller
24168a2093 vaapi: fix 'ISO C90 forbids mixed declarations and code' compiler warnings
Declare variables at the beginning of a code block, which
is how it's done in GStreamer.

https://bugzilla.gnome.org/show_bug.cgi?id=759192
2016-02-02 16:17:43 +01:00
Sreerenj Balachandran
eb2daed2a7 decoder: vp9: Fix crop rectangle setting
Align with software vp9dec behaviour: Add crop rectangle
only if display_width/display_height is less than the
frame_hdr->width/frame_hdr->height
2016-02-02 16:17:43 +01:00
Víctor Manuel Jáquez Leal
2a80f4b909 decoder: update a deprecated function
Somehow this didn't show up earlier, but gst_adapter_prev_timestamp() got
deprecated since GStreamer 1.0.

This patch replace it with gst_adapter_prev_pts()

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-02-02 16:17:43 +01:00
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
1c722efe54 Remove old gst version guards
As gstreamer-vaapi now only supports from GStreamer 1.6, this patch removes
all the old GStreamer version guards.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-01-25 12:09:40 +00: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
258214aa33 Remove libvpx submodule
We will be using upstream codecparsers always.
No more internal libvpx !
2016-01-19 12:49:11 +01:00
Michael Olbrich
e4ed64b731 wayland: free the frame in frame_release_callback()
This basically reverts 62c3888b76 (wayland:
decouple wl_buffer from frame).

Otherwise the frame may be overwritten while it is still used by the
compositer:

The frame done callback (frame_done_callback()) is called, when the
compositor is done processing the frame and hands it to the hardware.
The buffer release callback (frame_release_callback()) is called when the
buffer memory is no longer used.

This can be quite some time later: E.g. if weston (with the DRM backend)
puts the buffer on a hardware plane, then then buffer release callback is
called when the kernel is done with the buffer. This is usually when the
next frame is shown, so most likely after the frame done callback for the
next frame!

Since 70eff01d36 "wayland: sync() when
destroy()" the mentioned possible leak should no longer be a problem, so
reverting this change should cause no leaking buffers.

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

https://bugzilla.gnome.org/show_bug.cgi?id=758848
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
2016-01-19 12:43:45 +01:00
Sreerenj Balachandran
61045041c4 Add 10 HEVC 10 bit decoding support
Only supporting vaapidecode ! vaapisink combination for now.

Missing dependencies:
1: No support for P010 video format in GStreamer
2: No support for P010 vaGetImage()/vaPutimage() in vaapi-intel-driver
3: As a result of 1&2 , we have no support for Vaapi Video memory mapping
   through GstVideoMeta.

Right now we only set chroma format (YUV420 with more than 8 bits per channel)
for surface pool and keeping GST_VIDEO_FORMAT as ENCODED. The underlying format
of the surfaces is implementation (driver) defined, which is P010.
2015-12-08 16:14:11 +02:00
Sreerenj Balachandran
9ccdbce4bd gstvaapisurfacepool: Add new API to create surface pool based on chroma type
This new API gst_vaapi_surface_pool_new_with_chroma_type() is for
creating a new GstVaapiVideoPool of GstVaapiSurfaces with the specified
chroam type and dimensions. The underlying format of the surfaces is
implementation (driver) defined.
2015-12-08 15:16:00 +02:00
Sreerenj Balachandran
009c2c72c9 Add definitions for YUV420 with more than 8 bits per channel 2015-12-07 19:06:28 +02:00
Sreerenj Balachandran
a2171ea0eb gstvaapiporfile: Fix string representation of HEVCMain10 profile 2015-12-07 17:26:24 +02:00
Víctor Manuel Jáquez Leal
4897d96945 texture: detect GL version and use the proper API
When receiving the texture from the application or the video sink, we must
know it size and border. To query the texture the API has changed according to
the OpenGL version used in the GL context of the application/vsink.

This patch checks the current context API type and queries the texture
according to this detected API.

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

https://bugzilla.gnome.org/show_bug.cgi?id=753099
2015-11-30 13:26:22 +01:00
Víctor Manuel Jáquez Leal
1e39b59ce8 texture: check for expected target and format
gst_vaapi_texture_glx_new_wrapped() only handles a GL_TEXTURE_2D target and
formats GL_RGBA or GL_BGRA.

This patch adds a debugging verification of those values.

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

https://bugzilla.gnome.org/show_bug.cgi?id=753099
2015-11-30 13:26:22 +01:00