Commit graph

81 commits

Author SHA1 Message Date
He Junyan
0a34b6882e libs: decoder: AV1: Add the av1 decoder support.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/191>
2021-01-06 00:08:01 +08:00
He Junyan
85bc355019 libs: decoder: H265: Add SCC_MAIN_444_10 profile support.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/311>
2020-06-05 09:51:19 +00:00
He Junyan
9067d902e2 libs: profile: Add screen extended main/main10/main444 define.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/311>
2020-06-05 09:51:19 +00:00
He Junyan
f303b4a30f libs: utils: Add HEVC Main444 sting in string_of_VAProfile
HEVCMain444_10 is already a supported profile and misses the strings.
2020-03-17 12:43:16 +00:00
U. Artie Eoff
13c3b8ba5b libs: filter: guard all color properties to VA-API 1.2.0
Older VA-API (0.39.0) doesn't have VAProcColorProperties.

Thus, guard all colorimetry -> VA-API support to version
1.2.0.

Fixes #234
2020-02-21 14:40:26 +00:00
U. Artie Eoff
5df8cf0cdb libs: utils: guard EncSliceLP for VA-API < 0.39.1
Relates to #234
2020-02-15 11:51:02 -08:00
U. Artie Eoff
0f1b1f40e5 libs: VA explicit color standard not supported until 1.2.0
VAProcColorStandardExplicit and associated VAProcColorProperties
(primaries, transfer and matrix) are not supported until
VA-API 1.2.0.

Use VAProcColorStandardNone instead of VAProcColorStandardExplicit
if VA-API < 1.2.0.

Fixes #231
2020-02-11 00:38:40 -08:00
U. Artie Eoff
9d865453e1 libs: utils: WA: use explicit for sRGB colorimetry
Addresses #228 on iHD side.  It seems iHD can't handle
VAProcColorStandardSRGB in all situations for vpp.  But
it has no problem when we specify the sRGB parameters
via VAProcColorStandardExplicit parameters.
2020-02-10 09:36:46 -08:00
U. Artie Eoff
9542d55efb libs: utils: map GstVideoColorRange to VAAPI VPP 2020-02-08 10:07:58 +00:00
U. Artie Eoff
bc2c483f13 libs: utils: map GstVideoColorimetry to VAAPI VPP
Fallback to VAProcColorStandardExplicit if there is no
1:1 mapping.
2020-02-05 09:59:43 -08:00
U. Artie Eoff
9c46c15e51 libs: utils: add missing break in switch 2019-09-19 10:56:46 -07:00
Víctor Manuel Jáquez Leal
8d8743a494 libs: utils: guard the VAEntrypointFEI symbol
VAEntrypointFEI appeared in libva 2.0.0 (API version 1.0.0)
2019-09-07 13:35:49 +02:00
Víctor Manuel Jáquez Leal
ab4ba47bbf libs: utils: treat va_rt_format as bitwise flag
The return value of vaGetConfigAttributes() of VAConfigAttribRTFormat
is a bitwise flag with *all* the supported chroma types.

Previously it was assumed that the return value was a single value,
thus when returning the GST_VAAPI_CHROMA_TYPE_XXX the code was a
simple case. But it is wrong.

This patch changes the case block with a sequence of ifs testing the
bitwise. For now we assume a "priority" list in the testing sequence.
2019-08-19 17:26:55 +00:00
Víctor Manuel Jáquez Leal
738be524b1 libs: move memory types conversions to gstvaapiutils
And add more supported memory types by current VA.
2019-08-19 17:26:55 +00:00
Yan Wang
a48625d7ff libs: filter: set all color balance values
When set multiple settings of color balance like hue, saturation,
brightness and contrast for vaapipostproc, they should be set as
parameters of color balance filter, at the same color balance
filter calling.

Otherwise, multiple color balance filter calling will cause
previous setting get reset by the last calling with default value.

Fixes #182.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
2019-08-16 13:10:36 +02:00
He Junyan
5939bf4d81 libs: utils: Add missing entries for string_of_VAEntrypoint. 2019-08-15 17:33:13 +02:00
Wangfei
9e0c133a24 libs: encoder: h264: support ICQ/QVBR bitrate control mode
ICQ is Intelligent Constant Quality. It will use the initial QP
vaule of icq-quality-factor to adjust QP at MB level intelligently
to improve subjective quality.

QVBR is Quality defined VBR. It will use qvbr-quality-factor to
adjust QP for each MB to get enough quality picture without waste
of bits.
2019-08-05 11:01:19 +08:00
U. Artie Eoff
f1aa0cc5e0 vaapipostproc: add rotation support
Adds vpp rotation support to vaapipostproc.  Uses
property video-direction. Default is identity (no
rotation).

Closes #104
2019-07-09 12:26:46 -07:00
Wangfei
b8739a89b0 libs: encoder: Add MB ratecontrol mode to get its string 2019-07-05 16:56:12 +00:00
Wangfei
66d6754fce libs: encoder: refine guard of bitrate control mode
Remove useless guard of all bitrate control mode's guard except MB
which is define in VA-API version 0.39.1.
2019-07-05 16:56:12 +00:00
U. Artie Eoff
3ccf3f3334 vaapipostproc: add mirror support
Adds vpp mirroring support to vaapipostproc.  Use
property video-direction.  Valid values are identity,
horiz or vert.  Default is identity (no mirror).

Closes #89

v2: Use GstVideoOrientationMethod enum
v3: Don't warn for VA_MIRROR_NONE.
    Use GST_TYPE_VIDEO_ORIENTATION_METHOD type.
v4: Query VAAPI caps when setting mirror value
    instead of during per-frame processing.
v5: Return TRUE in warning cases when setting mirror value.
2019-05-29 09:06:27 +00:00
He Junyan
3c86fd12cb libs: utils: avoid macro evaluation when stringify
string_of_va_chroma_format() gets a wrong string format description.
For example, the YUV420_10BPP get a string of 0x00000100 as output.

It's because VA_RT_FORMAT_xxx values are macro definitions. And
STRINGIFY(VA_RT_FORMAT_xxx) will expand to its real value
0x00000XXX.

To avoid the macro evaluation, it is changed to show only the color
format without VA_RT_FORMAT_ prefix.
2019-04-15 15:36:28 +02:00
Víctor Manuel Jáquez Leal
7c0ec687cd libs: utils: use glib's macros
Don't reinvent the wheel.
2019-04-15 15:36:28 +02:00
Wangfei
14587eb8e8 vaapipostproc: clean up USE_VA_VPP macro since it already removed from
configure file.
2019-01-11 13:50:22 +08:00
Haihao Xiang
920b1ec7a8 vaapi: bump the minimum vaapi version requirement to 0.39.0
And reduce unnecessary API version and structures check as well.

https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/108
2019-01-07 17:46:42 +00:00
Wangfei
5d0878b48a libs: dec: h265: support decode for main-444 8bit streams.
Add 444 8bit yuv format AYUV, which can be used to decode
main-444 8bit streams. Currently, this feature is only
supported by media-driver in Icelake.

https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/119
2018-11-14 02:29:54 +00:00
He Junyan
90d8350820 libs: Sync the GstVaapiChromaType to VA header file.
Add more kinds of chrometype which will be used to describe
new video formats. Sync it with 1.4.0 version header file.
Alse delete useless GST_VAAPI_CHROMA_TYPE_YUV410 chrome type.

Signed-off-by: He Junyan <junyan.he@hotmail.com>
2018-11-10 19:57:40 +01:00
Wangfei
638004875b libs: dec: h265: support decode for main-10-422 10bit streams.
Add 422 10bit yuv format Y210, which can be used to decode
main-10-422 10bit streams. Currently, this feature is only
supported by media-driver in Icelake.

https://bugzilla.gnome.org/show_bug.cgi?id=797264
2018-11-01 14:03:23 +01:00
Wangfei
619abbdeb4 libs: dec: h265: add 422 chroma format support.
Add main-422-10 profile which support 422 chroma format stream.
Currently, this feature is only supported by media-driver in Icelake.

https://bugzilla.gnome.org/show_bug.cgi?id=797143
2018-09-27 11:55:04 +02:00
Víctor Manuel Jáquez Leal
c7d712a932 libs: utils: log warn if display fail
gstreamer-vaapi initializes the display by trial-and-error, thus
logging an error message if the display initialisation fails the user
may be weary of the error message in the screen, if using VA-API 1.0

This commit set the VA error log handler to GStreamer warning level
while calling vaInitialize() and set it to error after that.

https://bugzilla.gnome.org/show_bug.cgi?id=783169
2017-10-03 13:37:23 +02:00
Víctor Manuel Jáquez Leal
585628d2a2 libs: guard deprecated symbols
In VA-API 1.0 the H.264 baseline profile is deprecated. This patch
guards the H.264 baseline usage. Consider this commit as a
continuation of commit e0e0a474

https://bugzilla.gnome.org/show_bug.cgi?id=784398
2017-08-25 16:07:34 +02:00
Víctor Manuel Jáquez Leal
9891f1a9e2 build: consolidate the VA sub API includes
Include all VA sub APIs headers in a single point (gstvaapicompat.h),
since they are all already included in va.h after VA-API 0.38.

https://bugzilla.gnome.org/show_bug.cgi?id=786119
2017-08-13 18:08:19 +02:00
Víctor Manuel Jáquez Leal
777bba473e libs: utils: libva 1.0 changed the logging
The logging mechanism in libva has changed it's functions
signatures. This patch updates that for libva versions >= 1.0

https://bugzilla.gnome.org/show_bug.cgi?id=784398
2017-07-31 18:17:06 +02:00
Víctor Manuel Jáquez Leal
db7268117d libs: encoder: initialize chroma_type
Instead of initialize the chroma_type with a undefined value, which
will be converted to GST_VAAPI_CHROMA_TYPE_YUV420 by GstVaapiContext,
this patch queries the VA config, given the received
GstVaapiContextInfo's parameters, and gets the first response.

In order to get the GstVaapiChromaType value, also it was needed to
add a new utility function: to_GstVaapiChromaType(), which, given a
VA_RT_FORMAT_* will return the associated GstVaapiChromaType.

https://bugzilla.gnome.org/show_bug.cgi?id=771291
2017-04-06 22:00:05 +02:00
Hyunjun Ko
2d463f79f2 libs: utils: add HEVC profiles representation
https://bugzilla.gnome.org/show_bug.cgi?id=778318
2017-02-08 10:42:28 +01:00
Víctor Manuel Jáquez Leal
da7500de3f vaapi: bump ifdef to API 0.40.0 for log redirect
vaSetInfoCallback() is not released yet. It is going to appear in
VA-API 0.40.0
2017-01-12 12:54:34 +01:00
Sebastian Dröge
08dea01bf4 vaapiutils: Fix compilation with latest and previous libva releases
vaSetInfoCallback() was defined after 0.39.4 / 1.7.3, so check for
0.39.5 instead.
2017-01-12 13:45:29 +02:00
Víctor Manuel Jáquez Leal
1e0b3c2f74 libs: display: redirect logging at initialize
Redirect libva's logs to GStreamer logging mechanism. This is
particularly useful when VA is initialized, because it always logs
out the drivers details.

In order to achieve this a new helper function was added as a wrapper
for the vaInitialize() function.

https://bugzilla.gnome.org/show_bug.cgi?id=777115
2017-01-11 16:11:30 +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
22647090be utils: report VP9 profiles
Add VP9Profile0-3 name mapping.
2016-06-28 16:34:30 +02:00
Sreerenj Balachandran
8c1cfbaa1e Add mapping for Macroblock level rate control (VA_RC_MB) 2016-05-11 12:04:46 +03:00
Sreerenj Balachandran
009c2c72c9 Add definitions for YUV420 with more than 8 bits per channel 2015-12-07 19:06:28 +02: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
Gwenole Beauchesne
3656659d1c filter: add initial support for high quality scaling.
Add support for video scaling options in VPP pipelines. Only the
DEFAULT mode is bound to exist. Others might be folded into that
mode.
2014-10-29 17:33:48 +01:00
Li Xiaowei
fb7ecb15e2 utils: add H.264 MVC profiles.
Add "MultiView High" and "Stereo High" definitions.

Signed-off-by: Li Xiaowei <xiaowei.a.li@intel.com>
[require VA-API >= 0.35.2 for MVC profiles]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-06-02 18:25:12 +02:00
Gwenole Beauchesne
800bfc1add utils: only enable VP8 profiles for newer VA-API versions.
VP8 decoding API appeared in VA-API >= 0.35.0. So, disable mappings
involving VP8 codec on earlier versions of the API.
2014-06-02 18:25:12 +02:00
Gwenole Beauchesne
85a60441fa decoder: h264: properly support grayscale formats.
Request the correct chroma format for decoding grayscale streams.
i.e. make lookups of the VA chroma format more generic, thus possibly
supporting more formats in the future.

This means that, if a VA driver doesn't support grayscale formats,
it is now going to fail. We cannot safely assume that maybe grayscale
was implemented on top of some YUV 4:2:0 with the chroma components
all set to 0x80.
2014-05-10 06:29:25 +02: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
449727ea31 libs: re-indent all source code related to VA utilities. 2014-01-23 18:51:59 +01:00
Gwenole Beauchesne
6bf3c1863c legal: update copyright notice dates. 2014-01-22 19:02:35 +01:00