summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2019-06-07 21:15:29 +0100
committerMark Thompson <sw@jkqxz.net>2019-06-07 21:15:29 +0100
commita53f9fde45e6fd4007a85b39eab0a693900cd936 (patch)
tree668022632680a7304fb6dda80599da2461006cc5 /libavfilter
parent410a0824f07ac4a526f633409cf893a897d2269c (diff)
lavfi/vaapi: Fix build with libva 2.1 and 2.2
While the VAProcColorProperties structure was added in libva 2.1, the colour primaries/transfer/space fields were not added until libva 2.3.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vaapi_vpp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavfilter/vaapi_vpp.c b/libavfilter/vaapi_vpp.c
index 0486c295cb..b5b245c8af 100644
--- a/libavfilter/vaapi_vpp.c
+++ b/libavfilter/vaapi_vpp.c
@@ -273,7 +273,7 @@ static void vaapi_vpp_fill_colour_standard(VAAPIColourProperties *props,
int i, j, score, best_score, worst_score;
VAProcColorStandardType best_standard;
-#if VA_CHECK_VERSION(1, 1, 0)
+#if VA_CHECK_VERSION(1, 3, 0)
// If the driver supports explicit use of the standard values then just
// use them and avoid doing any mapping. (The driver may not support
// some particular code point, but it still has enough information to
@@ -463,7 +463,7 @@ static int vaapi_vpp_colour_properties(AVFilterContext *avctx,
// If the properties weren't filled completely in the output frame and
// we chose a fixed standard then fill the known values in here.
-#if VA_CHECK_VERSION(1, 1, 0)
+#if VA_CHECK_VERSION(1, 3, 0)
if (output_props.va_color_standard != VAProcColorStandardExplicit)
#endif
{
@@ -492,16 +492,20 @@ static int vaapi_vpp_colour_properties(AVFilterContext *avctx,
params->input_color_properties = (VAProcColorProperties) {
.chroma_sample_location = input_props.va_chroma_sample_location,
.color_range = input_props.va_color_range,
+#if VA_CHECK_VERSION(1, 3, 0)
.colour_primaries = input_props.color_primaries,
.transfer_characteristics = input_props.color_trc,
.matrix_coefficients = input_props.colorspace,
+#endif
};
params->output_color_properties = (VAProcColorProperties) {
.chroma_sample_location = output_props.va_chroma_sample_location,
.color_range = output_props.va_color_range,
+#if VA_CHECK_VERSION(1, 3, 0)
.colour_primaries = output_props.color_primaries,
.transfer_characteristics = output_props.color_trc,
.matrix_coefficients = output_props.colorspace,
+#endif
};
#endif