• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/libva


Commit MetaInfo

Revisãod58c6d4b05a42153384133288c4ecedc1a9be14d (tree)
Hora2010-07-12 16:01:42
AutorGwenole Beauchesne <gbeauchesne@spli...>
CommiterXiang, Haihao

Mensagem de Log

Add I420 image format.

Mudança Sumário

Diff

--- 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
6464 i965_image_formats_map[I965_MAX_IMAGE_FORMATS + 1] = {
6565 { I965_SURFACETYPE_YUV,
6666 { VA_FOURCC('Y','V','1','2'), VA_LSB_FIRST, 12, } },
67+ { I965_SURFACETYPE_YUV,
68+ { VA_FOURCC('I','4','2','0'), VA_LSB_FIRST, 12, } },
6769 };
6870
6971 /* List of supported subpicture formats */
@@ -1352,6 +1354,16 @@ i965_CreateImage(VADriverContextP ctx,
13521354 image->offsets[2] = size;
13531355 image->data_size = size + 2 * size2;
13541356 break;
1357+ case VA_FOURCC('I','4','2','0'):
1358+ image->num_planes = 3;
1359+ image->pitches[0] = width;
1360+ image->offsets[0] = 0;
1361+ image->pitches[1] = width2;
1362+ image->offsets[1] = size;
1363+ image->pitches[2] = width2;
1364+ image->offsets[2] = size + size2;
1365+ image->data_size = size + 2 * size2;
1366+ break;
13551367 default:
13561368 goto error;
13571369 }
@@ -1549,7 +1561,9 @@ i965_GetImage(VADriverContextP ctx,
15491561 rect.height = height;
15501562
15511563 switch (obj_image->image.format.fourcc) {
1552- case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */
1564+ case VA_FOURCC('Y','V','1','2'):
1565+ case VA_FOURCC('I','4','2','0'):
1566+ /* I420 is native format for MPEG-2 decoded surfaces */
15531567 if (render_state->interleaved_uv)
15541568 goto operation_failed;
15551569 get_image_yv12(obj_image, image_data, obj_surface, &rect);
--- a/i965_drv_video/i965_drv_video.h
+++ b/i965_drv_video/i965_drv_video.h
@@ -43,7 +43,7 @@
4343 #define I965_MAX_PROFILES 11
4444 #define I965_MAX_ENTRYPOINTS 5
4545 #define I965_MAX_CONFIG_ATTRIBUTES 10
46-#define I965_MAX_IMAGE_FORMATS 1
46+#define I965_MAX_IMAGE_FORMATS 2
4747 #define I965_MAX_SUBPIC_FORMATS 4
4848 #define I965_MAX_DISPLAY_ATTRIBUTES 4
4949 #define I965_STR_VENDOR "i965 Driver 0.1"