diff options
author | Gwenole Beauchesne <gbeauchesne@splitted-desktop.com> | 2010-06-03 08:54:55 +0200 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2010-07-12 15:01:42 +0800 |
commit | d58c6d4b05a42153384133288c4ecedc1a9be14d (patch) | |
tree | 742f06c786adb85f3e3df9628f9e02f9eaf52c59 | |
parent | 252dd7c61f2a38af61ddc7906cf163c71fed4a82 (diff) | |
download | libva-d58c6d4b05a42153384133288c4ecedc1a9be14d.tar.gz |
Add I420 image format.
-rw-r--r-- | i965_drv_video/i965_drv_video.c | 16 | ||||
-rw-r--r-- | i965_drv_video/i965_drv_video.h | 2 |
2 files changed, 16 insertions, 2 deletions
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c index 6a020eb..c5fc2a5 100644 --- a/i965_drv_video/i965_drv_video.c +++ b/i965_drv_video/i965_drv_video.c @@ -64,6 +64,8 @@ static const i965_image_format_map_t i965_image_formats_map[I965_MAX_IMAGE_FORMATS + 1] = { { I965_SURFACETYPE_YUV, { VA_FOURCC('Y','V','1','2'), VA_LSB_FIRST, 12, } }, + { I965_SURFACETYPE_YUV, + { VA_FOURCC('I','4','2','0'), VA_LSB_FIRST, 12, } }, }; /* List of supported subpicture formats */ @@ -1352,6 +1354,16 @@ i965_CreateImage(VADriverContextP ctx, image->offsets[2] = size; image->data_size = size + 2 * size2; break; + case VA_FOURCC('I','4','2','0'): + image->num_planes = 3; + image->pitches[0] = width; + image->offsets[0] = 0; + image->pitches[1] = width2; + image->offsets[1] = size; + image->pitches[2] = width2; + image->offsets[2] = size + size2; + image->data_size = size + 2 * size2; + break; default: goto error; } @@ -1549,7 +1561,9 @@ i965_GetImage(VADriverContextP ctx, rect.height = height; switch (obj_image->image.format.fourcc) { - case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */ + case VA_FOURCC('Y','V','1','2'): + case VA_FOURCC('I','4','2','0'): + /* I420 is native format for MPEG-2 decoded surfaces */ if (render_state->interleaved_uv) goto operation_failed; get_image_yv12(obj_image, image_data, obj_surface, &rect); diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h index 54bc35d..e2cd77f 100644 --- a/i965_drv_video/i965_drv_video.h +++ b/i965_drv_video/i965_drv_video.h @@ -43,7 +43,7 @@ #define I965_MAX_PROFILES 11 #define I965_MAX_ENTRYPOINTS 5 #define I965_MAX_CONFIG_ATTRIBUTES 10 -#define I965_MAX_IMAGE_FORMATS 1 +#define I965_MAX_IMAGE_FORMATS 2 #define I965_MAX_SUBPIC_FORMATS 4 #define I965_MAX_DISPLAY_ATTRIBUTES 4 #define I965_STR_VENDOR "i965 Driver 0.1" |