st/vdpau: Provide YV12 to NV12 putBits conversion v2
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 3 Mar 2016 08:25:44 +0000 (09:25 +0100)
committerThomas Hellstrom <thellstrom@vmware.com>
Fri, 24 Feb 2017 15:44:33 +0000 (16:44 +0100)
commit3a418322ec6d540b1334f42688839aefb5d88d6d
tree803c0fe0488406a45ed151f0abee4cf6af5d7e8a
parent5398d006de3d2bd668e3fc4b80a3de0c101a3e43
st/vdpau: Provide YV12 to NV12 putBits conversion v2

mplayer likes putting YV12 data, and if there is a buffer format mismatch,
the vdpau state tracker would try to reallocate the video surface as an
YV12 surface. A virtual driver doesn't like reallocating and doesn't like YV12
surfaces, so if we can't support YV12, try an YV12 to NV12 conversion
instead.

Also advertize that we actually can do the getBits and putBits conversion.

v2: A previous version of this patch prioritized conversion before
reallocating. This has been changed to prioritize reallocating in this version.

Cc: Christian König <christian.koenig@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
src/gallium/auxiliary/util/u_video.h
src/gallium/state_trackers/vdpau/query.c
src/gallium/state_trackers/vdpau/surface.c