summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2020-02-11 00:38:40 -0800
committerU. Artie Eoff <ullysses.a.eoff@intel.com>2020-02-11 00:38:40 -0800
commit0f1b1f40e5fb4bdb9cf4b42390e17dd92bdc7d78 (patch)
tree4a245583b79d4713ac8806515487a5bfbb618c90
parent9d865453e1593cfc993fe277101bfc5ac2f0a179 (diff)
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
-rw-r--r--gst-libs/gst/vaapi/gstvaapifilter.c3
-rw-r--r--gst-libs/gst/vaapi/gstvaapiutils.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapifilter.c b/gst-libs/gst/vaapi/gstvaapifilter.c
index 5f41726d..a2f2cb8d 100644
--- a/gst-libs/gst/vaapi/gstvaapifilter.c
+++ b/gst-libs/gst/vaapi/gstvaapifilter.c
@@ -1531,6 +1531,8 @@ fill_color_standard (GstVideoColorimetry * colorimetry,
VAProcColorStandardType * type, VAProcColorProperties * properties)
{
*type = from_GstVideoColorimetry (colorimetry);
+
+#if VA_CHECK_VERSION(1,2,0)
if (*type == VAProcColorStandardExplicit) {
properties->colour_primaries =
gst_video_color_primaries_to_iso (colorimetry->primaries);
@@ -1539,6 +1541,7 @@ fill_color_standard (GstVideoColorimetry * colorimetry,
properties->matrix_coefficients =
gst_video_color_matrix_to_iso (colorimetry->matrix);
}
+#endif
properties->color_range = from_GstVideoColorRange (colorimetry->range);
}
diff --git a/gst-libs/gst/vaapi/gstvaapiutils.c b/gst-libs/gst/vaapi/gstvaapiutils.c
index 2a100ab1..a3deff43 100644
--- a/gst-libs/gst/vaapi/gstvaapiutils.c
+++ b/gst-libs/gst/vaapi/gstvaapiutils.c
@@ -983,7 +983,11 @@ from_GstVideoColorimetry (const GstVideoColorimetry * const colorimetry)
GST_VIDEO_COLORIMETRY_SMPTE240M))
return VAProcColorStandardSMPTE240M;
+#if VA_CHECK_VERSION(1,2,0)
return VAProcColorStandardExplicit;
+#else
+ return VAProcColorStandardNone;
+#endif
}
/**