[Mesa-dev] [PATCH 2/2] Added support for NV12 to IYUV conversion in vlVaGetImage

Christian König deathsimple at vodafone.de
Fri Oct 16 07:53:47 PDT 2015


From: Indrajit Das <indrajit-kumar.das at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>
---
 src/gallium/state_trackers/va/image.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/gallium/state_trackers/va/image.c b/src/gallium/state_trackers/va/image.c
index 3b36430..b37a971 100644
--- a/src/gallium/state_trackers/va/image.c
+++ b/src/gallium/state_trackers/va/image.c
@@ -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;
-- 
1.9.1



More information about the mesa-dev mailing list