From 0c6f4b4781db0e2ce9516a636cf3cba91e34c0d4 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Thu, 3 Jan 2013 15:47:40 +0100 Subject: [PATCH] subpicture: fix creation of IA88/AI88 subpicture images. IA88 format is 16bpp, with one byte for alpha and one byte for the color index. Besides, a palette with 256 entries is also needed. Signed-off-by: Gwenole Beauchesne --- src/i965_drv_video.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c index aa971fa..5051f31 100755 --- a/src/i965_drv_video.c +++ b/src/i965_drv_video.c @@ -2323,6 +2323,18 @@ i965_CreateImage(VADriverContextP ctx, image->component_order[1] = 'G'; image->component_order[2] = 'B'; break; + case VA_FOURCC('I','A','8','8'): + case VA_FOURCC('A','I','8','8'): + image->num_planes = 1; + image->pitches[0] = width * 2; + image->offsets[0] = 0; + image->data_size = image->offsets[0] + image->pitches[0] * height; + image->num_palette_entries = 256; + image->entry_bytes = 3; + image->component_order[0] = 'R'; + image->component_order[1] = 'G'; + image->component_order[2] = 'B'; + break; case VA_FOURCC('B','G','R','A'): case VA_FOURCC('R','G','B','A'): case VA_FOURCC('B','G','R','X'): -- 2.7.4