From 0e6516c5cbc3a1e7995a7858c5fbd14b7c0411e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Fri, 3 Jun 2016 12:48:09 +0200 Subject: [PATCH] Fix the alpha mask at getting derive images MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The alpha mask is set to 0x0 when getting derived images, regardless the alpha channel in the RGB format. But, When RGBx, the x means an alpha mask of 0x00000000 When RGBA, the A means an alpha mask of 0xff000000 This patch set the alpha mask correctly. Signed-off-by: Víctor Manuel Jáquez Leal (cherry picked from commit e656d84dc512dc899dda4b9a8121b48f5148fc4b) --- src/i965_drv_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c index 6c88be7..efac5a5 100644 --- a/src/i965_drv_video.c +++ b/src/i965_drv_video.c @@ -4351,14 +4351,12 @@ VAStatus i965_DeriveImage(VADriverContextP ctx, image->format.red_mask = 0x000000ff; image->format.green_mask = 0x0000ff00; image->format.blue_mask = 0x00ff0000; - image->format.alpha_mask = 0x00000000; break; case VA_FOURCC_BGRA: case VA_FOURCC_BGRX: image->format.red_mask = 0x00ff0000; image->format.green_mask = 0x0000ff00; image->format.blue_mask = 0x000000ff; - image->format.alpha_mask = 0x00000000; break; default: goto error; @@ -4367,10 +4365,12 @@ VAStatus i965_DeriveImage(VADriverContextP ctx, switch (image->format.fourcc) { case VA_FOURCC_RGBA: case VA_FOURCC_BGRA: + image->format.alpha_mask = 0xff000000; image->format.depth = 32; break; case VA_FOURCC_RGBX: case VA_FOURCC_BGRX: + image->format.alpha_mask = 0x00000000; image->format.depth = 24; break; default: -- 2.11.0