summaryrefslogtreecommitdiffstats
path: root/video/out/vo_vaapi.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-07-15 13:27:25 +0200
committerwm4 <wm4@nowhere>2015-07-15 13:27:25 +0200
commit50bd2807ad4f94bcf215991566336060ebfdd249 (patch)
tree78c533eb7d754d252ec00734a409f5720a989460 /video/out/vo_vaapi.c
parente3e20f1431fa0c2d7988234787994d87fb6385c2 (diff)
downloadmpv-50bd2807ad4f94bcf215991566336060ebfdd249.tar.bz2
mpv-50bd2807ad4f94bcf215991566336060ebfdd249.tar.xz
vaapi: don't assume vaQueryImageFormats() returns sorted list
vaQueryImageFormats() returns a randomly ordered list - so we shouldn't assume the first format on the list which works is the best. This effectively switches to nv12 instead of yuv420p on some drivers. We handle this by reusing va_to_imgfmt[], and ordering it by preference. We hardcode that GPUs prefer nv12 pver yuv420p. In theory we could do complicated probing (allocate dummy surface + use vaDeriveImage on it, then retrieve the FourCC) - but all things which could break assumption in the future are not supported yet (like 10 bit or 4:4:4), so this is fine.
Diffstat (limited to 'video/out/vo_vaapi.c')
0 files changed, 0 insertions, 0 deletions