Commit graph

1273 commits

Author SHA1 Message Date
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