vl/video_buffer: add support for P016
authorChristian König <christian.koenig@amd.com>
Sat, 14 Jan 2017 12:57:02 +0000 (13:57 +0100)
committerChristian König <christian.koenig@amd.com>
Mon, 13 Mar 2017 07:51:22 +0000 (08:51 +0100)
Just simply the description of the planes.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Mark Thompson <sw@jkqxz.net>
src/gallium/auxiliary/vl/vl_video_buffer.c

index fdc9598f8ac8858a422bae9f8802ddd8e9d4d35e..f6b3cb5e9f9076d75db4644096bea1a7c183ca29 100644 (file)
@@ -86,6 +86,12 @@ const enum pipe_format const_resource_formats_UYVY[3] = {
    PIPE_FORMAT_NONE
 };
 
+const enum pipe_format const_resource_formats_P016[3] = {
+   PIPE_FORMAT_R16_UNORM,
+   PIPE_FORMAT_R16G16_UNORM,
+   PIPE_FORMAT_NONE
+};
+
 const unsigned const_resource_plane_order_YUV[3] = {
    0,
    1,
@@ -126,6 +132,9 @@ vl_video_buffer_formats(struct pipe_screen *screen, enum pipe_format format)
    case PIPE_FORMAT_UYVY:
       return const_resource_formats_UYVY;
 
+   case PIPE_FORMAT_P016:
+      return const_resource_formats_P016;
+
    default:
       return NULL;
    }
@@ -143,6 +152,7 @@ vl_video_buffer_plane_order(enum pipe_format format)
    case PIPE_FORMAT_B8G8R8A8_UNORM:
    case PIPE_FORMAT_YUYV:
    case PIPE_FORMAT_UYVY:
+   case PIPE_FORMAT_P016:
       return const_resource_plane_order_YUV;
 
    default: