Commit graph

1580 commits

Author SHA1 Message Date
Gwenole Beauchesne
b763fdac2c Bump version for development. 2014-01-24 11:27:30 +01:00
Gwenole Beauchesne
c9af9a8608 debian: fix trailing whitespace in description. 2014-01-24 10:55:39 +01:00
Gwenole Beauchesne
183897d4ae debian: fix package description.
Try to improve package description for the compiled plug-in elements
available in there. e.g. only display vaapidownload and vaapiupload
for GStreamer 0.10 builds, display vaapiencode_* elements when VA
encoding is enabled, etc.

Also increase the copyright notice date.
2014-01-23 23:26:22 +01:00
Gwenole Beauchesne
cab11ef609 build: fix warnings on 64-bit platforms. 2014-01-23 22:50:03 +01:00
Gwenole Beauchesne
614aa4ac95 build: fix for older versions of VA-API (< 0.34.0).
Fix build with older versions of VA-API (< 0.34.0), or versions without
good enough headers for encoding support for instance.
2014-01-23 22:44:09 +01:00
Gwenole Beauchesne
b545c6fcbc 0.5.8. 2014-01-23 19:36:14 +01:00
Gwenole Beauchesne
271fb8298d README: updates.
VA-API up to 0.34.0 is actually supported. Mention new video encoding
support. Update copyright years, list of supported Intel HD Graphics
hardware.
2014-01-23 19:33:15 +01:00
Gwenole Beauchesne
0b176dea0f NEWS: updates. 2014-01-23 19:19:08 +01: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
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
449727ea31 libs: re-indent all source code related to VA utilities. 2014-01-23 18:51:59 +01:00
Gwenole Beauchesne
84044f28f7 libs: add missing file (libgstvaapi_priv_check.h). 2014-01-23 17:06:08 +01:00
Gwenole Beauchesne
4481c155b8 encoder: notify the encoder of the submitted packed headers.
Make sure to configure the encoder with the set of packed headers we
intend to generate and submit. i.e. make selection of packed headers
to submit more robust.
2014-01-23 15:48:58 +01:00
Gwenole Beauchesne
1dc9837dd9 encoder: fix and factor out check for supported rate-control modes.
Cache the first compatible GstVaapiProfile found if the encoder is not
configured yet. Next, factor out the code to check for the supported
rate-control modes by moving out vaGetConfigAttributes() to a separate
function, while also making sure that the attribute type is actually
supported by the encoder.

Also fix the default set of supported rate control modes to not the
"none" variant. It's totally useless to expose it at this point.
2014-01-23 15:48:58 +01:00
Gwenole Beauchesne
14ad694fdc context: move rate-control mode to encoder specific config.
Move usage-specific config out of the common GstVaapiContextInfo.
Create a specialized config for encoding and move rate-control mode
to there.
2014-01-23 14:29:09 +01:00
Gwenole Beauchesne
0eb4070977 context: introduce concept of usage.
Introduce GstVaapiContextUsage so that to explicitly determine the
usage of a VA context. This is useful in view to simplifying the
creation of VA context for VPP too.
2014-01-23 14:29:09 +01:00
Gwenole Beauchesne
e3ed05bc52 context: fix get_attribute() value result.
Unknown attributes, or attributes that are not supported for the given
profile/entrypoint pair have a return value of VA_ATTRIB_NOT_SUPPORTED.
So, return failure in this case.
2014-01-23 14:29:09 +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
c85b080688 context: clean-ups. Strip down APIs.
Improve documentation and debug messages. Clean-up APIs, i.e. strip
them down to the minimal set of interfaces. They are private, so no
need expose getters for instance.
2014-01-23 14:29:09 +01:00
Gwenole Beauchesne
1ffdc010ad context: re-indent all GstVaapiContext related source code. 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
ed302d091e Bump library major version.
Bump the library major version due to API/ABI changes that occurred in
the imaging API. In particular, GstVaapiDisplay interfaces no longer
expose any GstCaps but provide GArray based ones e.g. to determine the
set of supported decode/encode profiles.
2014-01-22 19:07:30 +01:00
Gwenole Beauchesne
6bf3c1863c legal: update copyright notice dates. 2014-01-22 19:02:35 +01:00
Gwenole Beauchesne
1c95903b98 legal: add per-file authorship information. 2014-01-22 18:49:20 +01:00
Gwenole Beauchesne
387371b19f decoder: fix video codec frame number in standalone mode.
Set a valid GstVideoCodecFrame.system_frame_number when decoding a
stream in standalone mode. While we are at it, improve the debugging
messages to also include that frame number.
2014-01-22 18:30:26 +01:00
Wind Yuan
0e8afe1c22 decoder: fix crash on invalid pointer for GST_DEBUG().
When decoding failed, or that the frame was dropped, the associated
surface proxy is not guaranteed to be present. Thus, the GST_DEBUG()
message needs to check whether the proxy is actually present or not.

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

[fixed gst_vaapi_surface_proxy_get_surface_id() to return VA_INVALID_ID]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-01-22 18:30:26 +01:00
Gwenole Beauchesne
deff9c775c encoder: h264: disable NAL HRD parameters for now.
Don't emit NAL HRD parameters for now in the SPS headers because the
SEI buffering_period() and picture_timing() messages are not handled
yet. Some additional changes are necessary to get it right.

https://bugzilla.gnome.org/show_bug.cgi?id=722734
2014-01-22 18:30:26 +01:00
Gwenole Beauchesne
9d5fc53899 encoder: h264: fix default CPB buffer size.
Fix default CPB buffer size to something more reasonable (1500 ms)
and that still fits the level limits. This is a non configurable
property for now. The initial CPB removal delay is also fixed to
750 ms.

https://bugzilla.gnome.org/show_bug.cgi?id=722087
2014-01-22 18:30:26 +01:00
Gwenole Beauchesne
9d42c86422 encoder: h264: fix bitrate encoding for HRD conformance.
Round down the calculated, or supplied, bitrate (kbps) into a multiple
of the HRD bitrate scale factor. Use a bitrate scale factor of 64 so
that to have less losses in precision. Likewise, don't round up because
that could be a strict constraint imposed by the user.
2014-01-22 18:30:26 +01:00
Gwenole Beauchesne
4c04a1bc88 encoder: h264: fix level lookup constraints wrt. bitrate.
Fix the level calculation involving bitrate limits. Since we are
targetting NAL HRD conformance, the check against MaxBR from the
Table A-1 limits shall involve cpbBrNalFactor depending on the
active profile.
2014-01-22 18:30:26 +01:00
Gwenole Beauchesne
1e502d63d5 encoder: h264: submit sequence parameter only once.
Submit sequence parameter buffers only once, or when the bitstream
was reconfigured in a way that requires such. Always submit packed
sequence parameter buffers at I-frame period, if the VA driver needs
those.

https://bugzilla.gnome.org/show_bug.cgi?id=722737
2014-01-22 18:30:26 +01:00
Gwenole Beauchesne
71113e4999 encoder: h264: only submit packed headers when required.
Make sure to submit the packed headers only if the underlying VA driver
requires those. Currently, only handle packed sequence and picture
headers.

https://bugzilla.gnome.org/show_bug.cgi?id=722737
2014-01-22 18:30:26 +01:00
Gwenole Beauchesne
d9cf58e88a encoder: h264: fix ip_period value in sequence parameter.
The VAEncSequenceParameterBuffer.ip_period value reprents the distance
between the I-frame and the next P-frame. So, this also accounts for
any additional B-frame in the middle of it.

This fixes rate control heuristics for certain VA drivers.

https://bugzilla.gnome.org/show_bug.cgi?id=722735
2014-01-22 18:30:26 +01:00
Gwenole Beauchesne
586f872085 encoder: h264: fix level when bitrate is automatically computed.
Fix level characterisation when the bitrate is automatically computed
from the active coding tools. i.e. ensure the bitrate once the profile
is completely characterized but before the level calculation process.
2014-01-22 18:30:26 +01:00
Gwenole Beauchesne
54d1900e1d encoder: h264: clean-ups.
Document and rename a few functions here and there. Drop code that
caps num_bframes variable in reset_properties() since they shall
have been checked beforehand, during properties initialization.
2014-01-22 18:30:26 +01:00
Gwenole Beauchesne
c48e769e08 encoder: h264: clean-up bitwriter related utilities.
Clean-up GstBitWriter related utility functions and simplify notations.
While we are at it, also make bitstream writing more robust should an
overflow occur. We could later optimize for writing headers capped to
their maximum possible size by using the _unchecked() helper variants.
2014-01-22 18:30:26 +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
7e6f7f384a encoder: h264: fix PPS header packing with profile < high.
Fix PPS header packing when profile is below High since 8x8 transform
mode and scaling lists are High Profile features.
2014-01-15 15:54:32 +01:00
Gwenole Beauchesne
391ad15ba0 encoder: h264: always emit VUI parameters for framerate.
Always emit VUI parameters for timing_info, which includes framerate
information.
2014-01-15 15:46:19 +01:00
Gwenole Beauchesne
5f5df3f723 encoder: h264: really fix frame cropping rectangle calculation.
Make frame cropping rectangle calculation future proof, i.e. exactly
follow the specification (7-18) to (7-21), and subsampling definitions
from Table 6-1.

https://bugzilla.gnome.org/show_bug.cgi?id=722089
https://bugzilla.gnome.org/show_bug.cgi?id=722238
2014-01-15 15:15:54 +01:00
Holger Kaelberer
b1d3f7d4c0 vaapisink: set csc render flags from sinkpad caps.
This maps GstVideoColorimetry information in vaapisink's sinkpad caps
to GST_VAAPI_COLOR_STANDARD_* flags, if per-buffer information was not
available.

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

[factored out code, added SMPTE240M, handle per-buffer flags]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-01-15 14:24:32 +01:00
Gwenole Beauchesne
751aa05937 surface: rework render flags.
Pack render flags per category and provide more flags into the color
standard category. In particular, cover for SMPTE-240M.
2014-01-15 13:53:42 +01:00
Zhao, Halley
467bf95c09 vaapipostproc: add support for colorbalance filters.
Add support for hue, saturation, brightness and constrat adjustments.
Also fix cap info local copy to match the really expected cap subtype
of interest.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-01-15 11:49:49 +01:00
Zhao, Halley
db5465c2d6 vaapipostproc: fix support for "sharpen" filter.
Fix copy/paste error when submitting the "sharpen" value to the
GstVaapiFilter instance.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-01-15 11:42:15 +01:00
Lionel Landwerlin
e66179dffb pkgconfig: plugin dir should use PKG version not API version.
Fix the pluginsdir and includedir variables in the generated pkgconfig
(.pc) files. The location needs to be built with the PKG version in
mind instead of the API version.

While we are at it, also fix the PKG version for GStreamer >= 1.3.

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

[additional fixes for includedir and pkg requirements]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-01-15 11:21:32 +01:00
Holger Kaelberer
f8666e2cae vaapisink: fix display initialization in GstVideoOverlay implementation.
When gst_vaapisink_video_overlay_set_window_handle() is called early,
before the pipeline has been set to PLAYING, the display has not yet
been initialized and _PLUGIN_BASE_DISPLAY_TYPE() is not yet
up-to-date. For this reason the foreign XID is not attached.

Now _ensure_display() is called earlier.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-01-15 11:07:05 +01:00
Sreerenj Balachandran
dd6751ed47 vaapisink: expose the raw video formats in static caps template.
Expose all raw video formats in the static caps template since the
vaapisink is supporting raw data. We will get the exact set of formats
supported by the driver dynamically through the _get_caps() routine.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-01-15 11:06:01 +01:00
Matthieu Bouron
a674d9eff2 vaapidecode: query downstream caps features like GLTextureUploadMeta.
Fix vaapidecode to correctly report caps features downstream, when
a custom pipeline is built manually.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-01-14 19:14:41 +01:00
Matthieu Bouron
cb81acd48c vaapidecode: add system memory caps to template caps.
Since vaapidecode provides buffer that can be mapped as regular memory,
those caps should be added to the template caps. That only applies to
GStreamer >= 1.2.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-01-14 19:14:41 +01:00
Wind Yuan
d2f6274f31 vaapidecode: fix hang on SIGINT.
vaapidecode hangs when pipeline is stopped without any EOS, e.g. when
<Ctrl>+C is pressed, thus causing the srcpad task to keep running and
locked. This fixes a deadlock on state change from PAUSED to READY.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-01-14 19:14:41 +01:00