[Libva] [PATCH intel-driver 1/5] surface: fix vaDeriveImage() for grayscale.

Gwenole Beauchesne gb.devel at gmail.com
Fri May 9 23:03:30 PDT 2014


Allow vaDeriveImage() to work with grayscale surfaces by only exposing
the luma component.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
---
 src/i965_drv_video.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index efe4777..cfc7815 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -3213,6 +3213,12 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
     image->format.bits_per_pixel = 12;
 
     switch (image->format.fourcc) {
+    case VA_FOURCC_Y800:
+        image->num_planes = 1;
+        image->pitches[0] = w_pitch; /* Y */
+        image->offsets[0] = 0;
+        break;
+
     case VA_FOURCC_YV12:
         image->num_planes = 3;
         image->pitches[0] = w_pitch; /* Y */
-- 
1.9.1



More information about the Libva mailing list