diff options
author | Philip Langdale <philipl@overt.org> | 2022-08-19 16:55:44 -0700 |
---|---|---|
committer | Philip Langdale <philipl@overt.org> | 2022-08-25 19:04:10 -0700 |
commit | caf26a8a126d7b9853568ce0db2f6e04029fd1a2 (patch) | |
tree | 8b90c26d44d90b088a9cd442bb4be14350fb51f0 /libavutil | |
parent | 45726aa1177ee7d9d17435f879c96ab3537d8ad3 (diff) |
lavc/vaapi: Switch preferred 8bit 444 format to VUYX
As vaapi doesn't actually do anything useful with the alpha channel,
and we have an alphaless format available, let's use that instead.
The changes here are mostly 1:1 switching, but do note the explicit
change in the number of declared channels from 4 to 3 to reflect that
the alpha is being ignored.
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/hwcontext_vaapi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index 2ee5145727..78205425ee 100644 --- a/libavutil/hwcontext_vaapi.c +++ b/libavutil/hwcontext_vaapi.c @@ -125,7 +125,9 @@ static const VAAPIFormatDescriptor vaapi_format_map[] = { MAP(411P, YUV411, YUV411P, 0), MAP(422V, YUV422, YUV440P, 0), MAP(444P, YUV444, YUV444P, 0), - MAP(AYUV, YUV444, VUYA, 0), +#ifdef VA_FOURCC_XYUV + MAP(XYUV, YUV444, VUYX, 0), +#endif MAP(Y800, YUV400, GRAY8, 0), #ifdef VA_FOURCC_P010 MAP(P010, YUV420_10BPP, P010, 0), @@ -1009,6 +1011,9 @@ static const struct { #endif DRM_MAP(ARGB, 1, DRM_FORMAT_BGRA8888), DRM_MAP(XRGB, 1, DRM_FORMAT_BGRX8888), +#if defined(VA_FOURCC_XYUV) && defined(DRM_FORMAT_XYUV8888) + DRM_MAP(XYUV, 1, DRM_FORMAT_XYUV8888), +#endif }; #undef DRM_MAP |