diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2016-06-03 12:48:09 +0200 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2016-06-06 09:36:34 +0800 |
commit | e656d84dc512dc899dda4b9a8121b48f5148fc4b (patch) | |
tree | 434e20befe5bc35dc0acc6a4ee21c8c08aa7c8c8 | |
parent | 3b84d9866f6eeaa013c75e6e5e99e8b5bdeb0e94 (diff) |
Fix the alpha mask at getting derive images
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 <vjaquez@igalia.com>
-rw-r--r-- | src/i965_drv_video.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c index 0a337f4..cbfc081 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: |