st/va: Added support for NV12 to IYUV conversion in vlVaGetImage
authorIndrajit Das <indrajit-kumar.das@amd.com>
Fri, 16 Oct 2015 06:48:45 +0000 (12:18 +0530)
committerChristian König <christian.koenig@amd.com>
Mon, 19 Oct 2015 07:47:33 +0000 (09:47 +0200)
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/va/image.c

index 3b36430541e1c361271ae0ecc4a61c5cf06e4e1f..b37a97144376cc178af219aedd2fe220cba51e2f 100644 (file)
@@ -240,9 +240,11 @@ vlVaGetImage(VADriverContextP ctx, VASurfaceID surface, int x, int y,
       return VA_STATUS_ERROR_OPERATION_FAILED;
 
    if (format != surf->buffer->buffer_format) {
-      /* support NV12 to YV12 conversion now only */
-      if (format == PIPE_FORMAT_YV12 &&
-          surf->buffer->buffer_format == PIPE_FORMAT_NV12)
+      /* support NV12 to YV12 and IYUV conversion now only */
+      if ((format == PIPE_FORMAT_YV12 &&
+          surf->buffer->buffer_format == PIPE_FORMAT_NV12) ||
+          (format == PIPE_FORMAT_IYUV &&
+          surf->buffer->buffer_format == PIPE_FORMAT_NV12))
          convert = true;
       else
          return VA_STATUS_ERROR_OPERATION_FAILED;