mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
libs: utils: map GstVideoColorRange to VAAPI VPP
This commit is contained in:
parent
33c80bccfe
commit
9542d55efb
2 changed files with 25 additions and 0 deletions
|
@ -987,3 +987,24 @@ from_GstVideoColorimetry (const GstVideoColorimetry * const colorimetry)
|
|||
|
||||
return VAProcColorStandardExplicit;
|
||||
}
|
||||
|
||||
/**
|
||||
* from_GstVideoColorRange:
|
||||
* @value: a #GstVideoColorRange
|
||||
*
|
||||
* VPP: maps the #GstVideoColorRange to the VA value.
|
||||
*
|
||||
* Returns: the VA color range.
|
||||
**/
|
||||
guint
|
||||
from_GstVideoColorRange (const GstVideoColorRange value)
|
||||
{
|
||||
switch (value) {
|
||||
case GST_VIDEO_COLOR_RANGE_0_255:
|
||||
return VA_SOURCE_RANGE_FULL;
|
||||
case GST_VIDEO_COLOR_RANGE_16_235:
|
||||
return VA_SOURCE_RANGE_REDUCED;
|
||||
default:
|
||||
return VA_SOURCE_RANGE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,4 +171,8 @@ G_GNUC_INTERNAL
|
|||
guint
|
||||
from_GstVideoColorimetry (const GstVideoColorimetry *const colorimetry);
|
||||
|
||||
G_GNUC_INTERNAL
|
||||
guint
|
||||
from_GstVideoColorRange (const GstVideoColorRange value);
|
||||
|
||||
#endif /* GST_VAAPI_UTILS_H */
|
||||
|
|
Loading…
Reference in a new issue