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>
(cherry picked from commit
e656d84dc512dc899dda4b9a8121b48f5148fc4b)
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;
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: