[FFmpeg-devel] [PATCH 16/17] hwcontext_vaapi: Move better-matching surface formats earlier
Mark Thompson
sw at jkqxz.net
Fri Nov 24 02:51:33 EET 2017
In particular, avoid selecting YV12/YV16 when I420/422H are available.
---
libavutil/hwcontext_vaapi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index fcff25dc9b..2f47162a0d 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -99,15 +99,15 @@ static const struct {
enum AVPixelFormat pix_fmt;
} vaapi_format_map[] = {
MAP(NV12, YUV420, NV12),
- MAP(YV12, YUV420, YUV420P), // With U/V planes swapped.
- MAP(IYUV, YUV420, YUV420P),
#ifdef VA_FOURCC_I420
MAP(I420, YUV420, YUV420P),
#endif
+ MAP(YV12, YUV420, YUV420P), // With U/V planes swapped.
+ MAP(IYUV, YUV420, YUV420P),
+ MAP(422H, YUV422, YUV422P),
#ifdef VA_FOURCC_YV16
MAP(YV16, YUV422, YUV422P), // With U/V planes swapped.
#endif
- MAP(422H, YUV422, YUV422P),
MAP(UYVY, YUV422, UYVY422),
MAP(YUY2, YUV422, YUYV422),
MAP(Y800, YUV400, GRAY8),
--
2.11.0
More information about the ffmpeg-devel
mailing list