diff options
author | Christian König <[email protected]> | 2012-03-04 12:06:18 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2012-03-08 11:37:02 +0100 |
commit | ac1dd440b8295289486d48902a052ebda892174d (patch) | |
tree | 338dd66e38ea61b5ae1ffde6ff69b8214b38aaee /src | |
parent | d6119ac9facac23dbfaf40a582287785c190b5da (diff) |
vl/video_buffer: add YUVA and VUYA support
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_video_buffer.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c index 0510f59ac12..df21769a5d9 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.c +++ b/src/gallium/auxiliary/vl/vl_video_buffer.c @@ -50,6 +50,18 @@ const enum pipe_format const_resource_formats_NV12[3] = { PIPE_FORMAT_NONE }; +const enum pipe_format const_resource_formats_YUVA[3] = { + PIPE_FORMAT_R8G8B8A8_UNORM, + PIPE_FORMAT_NONE, + PIPE_FORMAT_NONE +}; + +const enum pipe_format const_resource_formats_VUYA[3] = { + PIPE_FORMAT_B8G8R8A8_UNORM, + PIPE_FORMAT_NONE, + PIPE_FORMAT_NONE +}; + const unsigned const_resource_plane_order_YUV[3] = { 0, 1, @@ -72,6 +84,12 @@ vl_video_buffer_formats(struct pipe_screen *screen, enum pipe_format format) case PIPE_FORMAT_NV12: return const_resource_formats_NV12; + case PIPE_FORMAT_R8G8B8A8_UNORM: + return const_resource_formats_YUVA; + + case PIPE_FORMAT_B8G8R8A8_UNORM: + return const_resource_formats_VUYA; + default: return NULL; } @@ -85,6 +103,8 @@ vl_video_buffer_plane_order(enum pipe_format format) return const_resource_plane_order_YVU; case PIPE_FORMAT_NV12: + case PIPE_FORMAT_R8G8B8A8_UNORM: + case PIPE_FORMAT_B8G8R8A8_UNORM: return const_resource_plane_order_YUV; default: |