mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
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
This commit is contained in:
parent
9d865453e1
commit
0f1b1f40e5
2 changed files with 7 additions and 0 deletions
|
@ -1531,6 +1531,8 @@ fill_color_standard (GstVideoColorimetry * colorimetry,
|
||||||
VAProcColorStandardType * type, VAProcColorProperties * properties)
|
VAProcColorStandardType * type, VAProcColorProperties * properties)
|
||||||
{
|
{
|
||||||
*type = from_GstVideoColorimetry (colorimetry);
|
*type = from_GstVideoColorimetry (colorimetry);
|
||||||
|
|
||||||
|
#if VA_CHECK_VERSION(1,2,0)
|
||||||
if (*type == VAProcColorStandardExplicit) {
|
if (*type == VAProcColorStandardExplicit) {
|
||||||
properties->colour_primaries =
|
properties->colour_primaries =
|
||||||
gst_video_color_primaries_to_iso (colorimetry->primaries);
|
gst_video_color_primaries_to_iso (colorimetry->primaries);
|
||||||
|
@ -1539,6 +1541,7 @@ fill_color_standard (GstVideoColorimetry * colorimetry,
|
||||||
properties->matrix_coefficients =
|
properties->matrix_coefficients =
|
||||||
gst_video_color_matrix_to_iso (colorimetry->matrix);
|
gst_video_color_matrix_to_iso (colorimetry->matrix);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
properties->color_range = from_GstVideoColorRange (colorimetry->range);
|
properties->color_range = from_GstVideoColorRange (colorimetry->range);
|
||||||
}
|
}
|
||||||
|
|
|
@ -983,7 +983,11 @@ from_GstVideoColorimetry (const GstVideoColorimetry * const colorimetry)
|
||||||
GST_VIDEO_COLORIMETRY_SMPTE240M))
|
GST_VIDEO_COLORIMETRY_SMPTE240M))
|
||||||
return VAProcColorStandardSMPTE240M;
|
return VAProcColorStandardSMPTE240M;
|
||||||
|
|
||||||
|
#if VA_CHECK_VERSION(1,2,0)
|
||||||
return VAProcColorStandardExplicit;
|
return VAProcColorStandardExplicit;
|
||||||
|
#else
|
||||||
|
return VAProcColorStandardNone;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue