hardware/intel/common/libva
Revisión | a7dbd4e05ab1f30d7f020ff0b25d8f1948924f91 (tree) |
---|---|
Tiempo | 2009-08-28 18:33:21 |
Autor | Austin Yuan <shengquan.yuan@inte...> |
Commiter | Austin Yuan |
Merge branch 'master-fd.o'
Conflicts:
Makefile.am
configure.ac
dummy_drv_video/dummy_drv_video.c
i965_drv_video/Makefile.am
i965_drv_video/i965_drv_video.c
src/Makefile.am
src/va.c
src/va.h
src/va_backend.h
src/x11/va_x11.c
test/test_12.c
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
@@ -0,0 +1,29 @@ | ||
1 | +*~ | |
2 | +*.o | |
3 | +*.lo | |
4 | +*.la | |
5 | +*.orig | |
6 | +*.rej | |
7 | +*.loT | |
8 | +*.bin | |
9 | +.deps | |
10 | +.libs | |
11 | +install-sh | |
12 | +libtool | |
13 | +ltmain.sh | |
14 | +missing | |
15 | +Makefile | |
16 | +Makefile.in | |
17 | +config.h | |
18 | +config.h.in | |
19 | +stamp-h1 | |
20 | +aclocal.m4 | |
21 | +autom4te.cache | |
22 | +config.guess | |
23 | +config.log | |
24 | +config.status | |
25 | +config.sub | |
26 | +configure | |
27 | +depcomp | |
28 | +fw/msvdx_bin | |
29 | +fw/msvdx_fw.bin |
@@ -31,11 +31,16 @@ SUBDIRS += i965_drv_video | ||
31 | 31 | endif |
32 | 32 | |
33 | 33 | pcfiles = \ |
34 | - libva.pc | |
34 | + libva.pc \ | |
35 | + libva-$(LIBVA_DISPLAY).pc | |
36 | + | |
37 | +# libva-<display>.pc - for display-specific dependencies | |
38 | +libva-$(LIBVA_DISPLAY).pc: libva_display.pc | |
39 | + @cp $< $@ | |
35 | 40 | |
36 | 41 | pkgconfigdir = @pkgconfigdir@ |
37 | 42 | pkgconfig_DATA = $(pcfiles) |
38 | 43 | |
39 | -EXTRA_DIST = libva.pc.in | |
44 | +EXTRA_DIST = libva.pc.in libva_display.pc.in | |
40 | 45 | |
41 | 46 | CLEANFILES = $(pcfiles) |
@@ -22,8 +22,8 @@ | ||
22 | 22 | |
23 | 23 | # libva package version number, (as distinct from shared library version) |
24 | 24 | m4_define([libva_major_version], [0]) |
25 | -m4_define([libva_minor_version], [30]) | |
26 | -m4_define([libva_micro_version], [4]) | |
25 | +m4_define([libva_minor_version], [31]) | |
26 | +m4_define([libva_micro_version], [0]) | |
27 | 27 | |
28 | 28 | m4_define([libva_version], |
29 | 29 | [libva_major_version.libva_minor_version.libva_micro_version]) |
@@ -32,9 +32,9 @@ m4_define([libva_version], | ||
32 | 32 | m4_define([libva_sds_version], [2]) |
33 | 33 | |
34 | 34 | # if the library source code has changed, increment revision |
35 | -m4_define([libva_lt_revision], [1]) | |
35 | +m4_define([libva_lt_revision], [0]) | |
36 | 36 | # if any interface was added/removed/changed, then inc current, reset revision |
37 | -m4_define([libva_lt_current], [0]) | |
37 | +m4_define([libva_lt_current], [1]) | |
38 | 38 | # if any interface was added since last public release, then increment age |
39 | 39 | # if any interface was removed since last public release, then set age to 0 |
40 | 40 | m4_define([libva_lt_age], [0]) |
@@ -114,8 +114,12 @@ AC_SUBST(LIBVA_LIBS) | ||
114 | 114 | pkgconfigdir=${libdir}/pkgconfig |
115 | 115 | AC_SUBST(pkgconfigdir) |
116 | 116 | |
117 | -libvabackendlib=libva.la | |
117 | +LIBVA_DISPLAY=x11 | |
118 | +libvacorelib=libva.la | |
119 | +libvabackendlib=libva-$LIBVA_DISPLAY.la | |
120 | +AC_SUBST([libvacorelib]) | |
118 | 121 | AC_SUBST([libvabackendlib]) |
122 | +AC_SUBST(LIBVA_DISPLAY) | |
119 | 123 | |
120 | 124 | AC_OUTPUT([ |
121 | 125 | Makefile |
@@ -130,5 +134,6 @@ AC_OUTPUT([ | ||
130 | 134 | i965_drv_video/shaders/render/Makefile |
131 | 135 | test/Makefile |
132 | 136 | libva.pc |
137 | + libva_display.pc | |
133 | 138 | ]) |
134 | 139 |
@@ -502,25 +502,8 @@ VAStatus dummy_GetImage( | ||
502 | 502 | return VA_STATUS_SUCCESS; |
503 | 503 | } |
504 | 504 | |
505 | -VAStatus dummy_PutImage( | |
506 | - VADriverContextP ctx, | |
507 | - VASurfaceID surface, | |
508 | - VAImageID image, | |
509 | - int src_x, | |
510 | - int src_y, | |
511 | - unsigned int width, | |
512 | - unsigned int height, | |
513 | - int dest_x, | |
514 | - int dest_y | |
515 | -) | |
516 | -{ | |
517 | - INIT_DRIVER_DATA | |
518 | - | |
519 | - /* TODO */ | |
520 | - return VA_STATUS_SUCCESS; | |
521 | -} | |
522 | 505 | |
523 | -VAStatus dummy_PutImage2( | |
506 | +VAStatus dummy_PutImage( | |
524 | 507 | VADriverContextP ctx, |
525 | 508 | VASurfaceID surface, |
526 | 509 | VAImageID image, |
@@ -631,31 +614,8 @@ VAStatus dummy_SetSubpictureGlobalAlpha( | ||
631 | 614 | return VA_STATUS_SUCCESS; |
632 | 615 | } |
633 | 616 | |
634 | -VAStatus dummy_AssociateSubpicture( | |
635 | - VADriverContextP ctx, | |
636 | - VASubpictureID subpicture, | |
637 | - VASurfaceID *target_surfaces, | |
638 | - int num_surfaces, | |
639 | - short src_x, /* upper left offset in subpicture */ | |
640 | - short src_y, | |
641 | - short dest_x, /* upper left offset in surface */ | |
642 | - short dest_y, | |
643 | - unsigned short width, | |
644 | - unsigned short height, | |
645 | - /* | |
646 | - * whether to enable chroma-keying or global-alpha | |
647 | - * see VA_SUBPICTURE_XXX values | |
648 | - */ | |
649 | - unsigned int flags | |
650 | -) | |
651 | -{ | |
652 | - INIT_DRIVER_DATA | |
653 | - | |
654 | - /* TODO */ | |
655 | - return VA_STATUS_SUCCESS; | |
656 | -} | |
657 | 617 | |
658 | -VAStatus dummy_AssociateSubpicture2( | |
618 | +VAStatus dummy_AssociateSubpicture( | |
659 | 619 | VADriverContextP ctx, |
660 | 620 | VASubpictureID subpicture, |
661 | 621 | VASurfaceID *target_surfaces, |
@@ -1045,24 +1005,16 @@ VAStatus dummy_EndPicture( | ||
1045 | 1005 | |
1046 | 1006 | VAStatus dummy_SyncSurface( |
1047 | 1007 | VADriverContextP ctx, |
1048 | - VAContextID context, | |
1049 | 1008 | VASurfaceID render_target |
1050 | 1009 | ) |
1051 | 1010 | { |
1052 | 1011 | INIT_DRIVER_DATA |
1053 | 1012 | VAStatus vaStatus = VA_STATUS_SUCCESS; |
1054 | - object_context_p obj_context; | |
1055 | 1013 | object_surface_p obj_surface; |
1056 | 1014 | |
1057 | - obj_context = CONTEXT(context); | |
1058 | - ASSERT(obj_context); | |
1059 | - | |
1060 | 1015 | obj_surface = SURFACE(render_target); |
1061 | 1016 | ASSERT(obj_surface); |
1062 | 1017 | |
1063 | - /* Assume that this shouldn't be called before vaEndPicture() */ | |
1064 | - ASSERT( obj_context->current_render_target != obj_surface->base.id ); | |
1065 | - | |
1066 | 1018 | return vaStatus; |
1067 | 1019 | } |
1068 | 1020 |
@@ -1258,7 +1210,6 @@ VAStatus __vaDriverInit_0_30( VADriverContextP ctx ) | ||
1258 | 1210 | ctx->vtable.vaSetImagePalette = dummy_SetImagePalette; |
1259 | 1211 | ctx->vtable.vaGetImage = dummy_GetImage; |
1260 | 1212 | ctx->vtable.vaPutImage = dummy_PutImage; |
1261 | - ctx->vtable.vaPutImage2 = dummy_PutImage2; | |
1262 | 1213 | ctx->vtable.vaQuerySubpictureFormats = dummy_QuerySubpictureFormats; |
1263 | 1214 | ctx->vtable.vaCreateSubpicture = dummy_CreateSubpicture; |
1264 | 1215 | ctx->vtable.vaDestroySubpicture = dummy_DestroySubpicture; |
@@ -1266,7 +1217,6 @@ VAStatus __vaDriverInit_0_30( VADriverContextP ctx ) | ||
1266 | 1217 | ctx->vtable.vaSetSubpictureChromakey = dummy_SetSubpictureChromakey; |
1267 | 1218 | ctx->vtable.vaSetSubpictureGlobalAlpha = dummy_SetSubpictureGlobalAlpha; |
1268 | 1219 | ctx->vtable.vaAssociateSubpicture = dummy_AssociateSubpicture; |
1269 | - ctx->vtable.vaAssociateSubpicture2 = dummy_AssociateSubpicture2; | |
1270 | 1220 | ctx->vtable.vaDeassociateSubpicture = dummy_DeassociateSubpicture; |
1271 | 1221 | ctx->vtable.vaQueryDisplayAttributes = dummy_QueryDisplayAttributes; |
1272 | 1222 | ctx->vtable.vaGetDisplayAttributes = dummy_GetDisplayAttributes; |
@@ -27,7 +27,7 @@ AM_CFLAGS = -Wall -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 @DRM_CFLAGS@ -DIN_ | ||
27 | 27 | i965_drv_video_la_LTLIBRARIES = i965_drv_video.la |
28 | 28 | i965_drv_video_ladir = @LIBVA_DRIVERS_PATH@ |
29 | 29 | i965_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined @DRM_LIBS@ -ldrm_intel |
30 | -i965_drv_video_la_LIBADD = ../src/libva.la -lpthread | |
30 | +i965_drv_video_la_LIBADD = ../src/libva-x11.la -lpthread | |
31 | 31 | |
32 | 32 | i965_drv_video_la_SOURCES = \ |
33 | 33 | object_heap.c \ |
@@ -350,7 +350,7 @@ i965_QueryImageFormats(VADriverContextP ctx, | ||
350 | 350 | } |
351 | 351 | |
352 | 352 | VAStatus |
353 | -i965_PutImage2(VADriverContextP ctx, | |
353 | +i965_PutImage(VADriverContextP ctx, | |
354 | 354 | VASurfaceID surface, |
355 | 355 | VAImageID image, |
356 | 356 | int src_x, |
@@ -480,8 +480,12 @@ i965_AssociateSubpicture(VADriverContextP ctx, | ||
480 | 480 | int num_surfaces, |
481 | 481 | short src_x, /* upper left offset in subpicture */ |
482 | 482 | short src_y, |
483 | + unsigned short src_width, | |
484 | + unsigned short src_height, | |
483 | 485 | short dest_x, /* upper left offset in surface */ |
484 | 486 | short dest_y, |
487 | + unsigned short dest_width, | |
488 | + unsigned short dest_height, | |
485 | 489 | unsigned short width, |
486 | 490 | unsigned short height, |
487 | 491 | /* |
@@ -510,27 +514,6 @@ i965_AssociateSubpicture(VADriverContextP ctx, | ||
510 | 514 | return VA_STATUS_SUCCESS; |
511 | 515 | } |
512 | 516 | |
513 | -VAStatus | |
514 | -i965_AssociateSubpicture2(VADriverContextP ctx, | |
515 | - VASubpictureID subpicture, | |
516 | - VASurfaceID *target_surfaces, | |
517 | - int num_surfaces, | |
518 | - short src_x, /* upper left offset in subpicture */ | |
519 | - short src_y, | |
520 | - unsigned short src_width, | |
521 | - unsigned short src_height, | |
522 | - short dest_x, /* upper left offset in surface */ | |
523 | - short dest_y, | |
524 | - unsigned short dest_width, | |
525 | - unsigned short dest_height, | |
526 | - /* | |
527 | - * whether to enable chroma-keying or global-alpha | |
528 | - * see VA_SUBPICTURE_XXX values | |
529 | - */ | |
530 | - unsigned int flags) | |
531 | -{ | |
532 | - return VA_STATUS_SUCCESS; | |
533 | -} | |
534 | 517 | |
535 | 518 | VAStatus |
536 | 519 | i965_DeassociateSubpicture(VADriverContextP ctx, |
@@ -1012,19 +995,13 @@ i965_EndPicture(VADriverContextP ctx, VAContextID context) | ||
1012 | 995 | |
1013 | 996 | VAStatus |
1014 | 997 | i965_SyncSurface(VADriverContextP ctx, |
1015 | - VAContextID context, | |
1016 | 998 | VASurfaceID render_target) |
1017 | 999 | { |
1018 | 1000 | struct i965_driver_data *i965 = i965_driver_data(ctx); |
1019 | - struct object_context *obj_context = CONTEXT(context); | |
1020 | 1001 | struct object_surface *obj_surface = SURFACE(render_target); |
1021 | 1002 | |
1022 | - assert(obj_context); | |
1023 | 1003 | assert(obj_surface); |
1024 | 1004 | |
1025 | - /* Assume that this shouldn't be called before vaEndPicture() */ | |
1026 | - assert(obj_context->decode_state.current_render_target != render_target); | |
1027 | - | |
1028 | 1005 | return VA_STATUS_SUCCESS; |
1029 | 1006 | } |
1030 | 1007 |
@@ -1226,20 +1203,6 @@ i965_GetImage(VADriverContextP ctx, | ||
1226 | 1203 | } |
1227 | 1204 | |
1228 | 1205 | VAStatus |
1229 | -i965_PutImage(VADriverContextP ctx, | |
1230 | - VASurfaceID surface, | |
1231 | - VAImageID image, | |
1232 | - int src_x, | |
1233 | - int src_y, | |
1234 | - unsigned int width, | |
1235 | - unsigned int height, | |
1236 | - int dest_x, | |
1237 | - int dest_y) | |
1238 | -{ | |
1239 | - return VA_STATUS_SUCCESS; | |
1240 | -} | |
1241 | - | |
1242 | -VAStatus | |
1243 | 1206 | i965_PutSurface(VADriverContextP ctx, |
1244 | 1207 | VASurfaceID surface, |
1245 | 1208 | Drawable draw, /* X Drawable */ |
@@ -1394,7 +1357,6 @@ __vaDriverInit_0_30( VADriverContextP ctx ) | ||
1394 | 1357 | ctx->vtable.vaSetImagePalette = i965_SetImagePalette; |
1395 | 1358 | ctx->vtable.vaGetImage = i965_GetImage; |
1396 | 1359 | ctx->vtable.vaPutImage = i965_PutImage; |
1397 | - ctx->vtable.vaPutImage2 = i965_PutImage2; | |
1398 | 1360 | ctx->vtable.vaQuerySubpictureFormats = i965_QuerySubpictureFormats; |
1399 | 1361 | ctx->vtable.vaCreateSubpicture = i965_CreateSubpicture; |
1400 | 1362 | ctx->vtable.vaDestroySubpicture = i965_DestroySubpicture; |
@@ -1403,7 +1365,6 @@ __vaDriverInit_0_30( VADriverContextP ctx ) | ||
1403 | 1365 | ctx->vtable.vaSetSubpictureChromakey = i965_SetSubpictureChromakey; |
1404 | 1366 | ctx->vtable.vaSetSubpictureGlobalAlpha = i965_SetSubpictureGlobalAlpha; |
1405 | 1367 | ctx->vtable.vaAssociateSubpicture = i965_AssociateSubpicture; |
1406 | - ctx->vtable.vaAssociateSubpicture2 = i965_AssociateSubpicture2; | |
1407 | 1368 | ctx->vtable.vaDeassociateSubpicture = i965_DeassociateSubpicture; |
1408 | 1369 | ctx->vtable.vaQueryDisplayAttributes = i965_QueryDisplayAttributes; |
1409 | 1370 | ctx->vtable.vaGetDisplayAttributes = i965_GetDisplayAttributes; |
@@ -0,0 +1,11 @@ | ||
1 | +prefix=@prefix@ | |
2 | +exec_prefix=@exec_prefix@ | |
3 | +libdir=@libdir@ | |
4 | +includedir=@includedir@ | |
5 | +display=@LIBVA_DISPLAY@ | |
6 | + | |
7 | +Name: libva-${display} | |
8 | +Description: Userspace Video Acceleration (VA) ${display} interface | |
9 | +Version: @PACKAGE_VERSION@ | |
10 | +Libs: -L${libdir} -lva-${display} | |
11 | +Cflags: -I${includedir} |
@@ -28,10 +28,18 @@ INCLUDES = \ | ||
28 | 28 | LDADD = \ |
29 | 29 | $(LIBVA_LT_LDFLAGS) |
30 | 30 | |
31 | -libva_la_LTLIBRARIES = libva.la | |
31 | +lib_LTLIBRARIES = \ | |
32 | + libva.la \ | |
33 | + libva-x11.la | |
34 | + | |
32 | 35 | libva_ladir = $(libdir) |
33 | 36 | libva_la_LDFLAGS = $(LDADD) -no-undefined |
34 | -libva_la_LIBADD = $(LIBVA_LIBS) -ldl -lX11 -lXext x11/libva_x11.la -ldrm -lXfixes | |
37 | +libva_la_LIBADD = $(LIBVA_LIBS) -ldl | |
38 | + | |
39 | +libva_x11_la_SOURCES = | |
40 | +libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(DRM_LIBS) $(XFIXES_LIBS) | |
41 | +libva_x11_la_LDFLAGS = $(LDADD) | |
42 | +libva_x11_la_DEPENDENCIES = $(libvacorelib) | |
35 | 43 | |
36 | 44 | SUBDIRS = x11 |
37 | 45 |
@@ -56,7 +56,11 @@ | ||
56 | 56 | |
57 | 57 | static int va_debug_trace = 0; |
58 | 58 | |
59 | -int vaDisplayIsValid(VADisplay dpy); | |
59 | +static int vaDisplayIsValid(VADisplay dpy) | |
60 | +{ | |
61 | + VADisplayContextP pDisplayContext = (VADisplayContextP)dpy; | |
62 | + return pDisplayContext && pDisplayContext->vaIsValid(pDisplayContext); | |
63 | +} | |
60 | 64 | |
61 | 65 | static void va_errorMessage(const char *msg, ...) |
62 | 66 | { |
@@ -217,7 +221,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) | ||
217 | 221 | CHECK_VTABLE(vaStatus, ctx, SetImagePalette); |
218 | 222 | CHECK_VTABLE(vaStatus, ctx, GetImage); |
219 | 223 | CHECK_VTABLE(vaStatus, ctx, PutImage); |
220 | - CHECK_VTABLE(vaStatus, ctx, PutImage2); | |
221 | 224 | CHECK_VTABLE(vaStatus, ctx, QuerySubpictureFormats); |
222 | 225 | CHECK_VTABLE(vaStatus, ctx, CreateSubpicture); |
223 | 226 | CHECK_VTABLE(vaStatus, ctx, DestroySubpicture); |
@@ -225,7 +228,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) | ||
225 | 228 | CHECK_VTABLE(vaStatus, ctx, SetSubpictureChromakey); |
226 | 229 | CHECK_VTABLE(vaStatus, ctx, SetSubpictureGlobalAlpha); |
227 | 230 | CHECK_VTABLE(vaStatus, ctx, AssociateSubpicture); |
228 | - CHECK_VTABLE(vaStatus, ctx, AssociateSubpicture2); | |
229 | 231 | CHECK_VTABLE(vaStatus, ctx, DeassociateSubpicture); |
230 | 232 | CHECK_VTABLE(vaStatus, ctx, QueryDisplayAttributes); |
231 | 233 | CHECK_VTABLE(vaStatus, ctx, GetDisplayAttributes); |
@@ -707,7 +709,6 @@ VAStatus vaEndPicture ( | ||
707 | 709 | |
708 | 710 | VAStatus vaSyncSurface ( |
709 | 711 | VADisplay dpy, |
710 | - VAContextID context, | |
711 | 712 | VASurfaceID render_target |
712 | 713 | ) |
713 | 714 | { |
@@ -716,7 +717,7 @@ VAStatus vaSyncSurface ( | ||
716 | 717 | ctx = CTX(dpy); |
717 | 718 | |
718 | 719 | TRACE(vaSyncSurface); |
719 | - return ctx->vtable.vaSyncSurface( ctx, context, render_target ); | |
720 | + return ctx->vtable.vaSyncSurface( ctx, render_target ); | |
720 | 721 | } |
721 | 722 | |
722 | 723 | VAStatus vaQuerySurfaceStatus ( |
@@ -871,30 +872,6 @@ VAStatus vaPutImage ( | ||
871 | 872 | VAImageID image, |
872 | 873 | int src_x, |
873 | 874 | int src_y, |
874 | - unsigned int width, | |
875 | - unsigned int height, | |
876 | - int dest_x, | |
877 | - int dest_y | |
878 | -) | |
879 | -{ | |
880 | - VADriverContextP ctx; | |
881 | - CHECK_DISPLAY(dpy); | |
882 | - ctx = CTX(dpy); | |
883 | - | |
884 | - TRACE(vaPutImage); | |
885 | - return ctx->vtable.vaPutImage ( ctx, surface, image, src_x, src_y, width, height, dest_x, dest_y ); | |
886 | -} | |
887 | - | |
888 | -/* | |
889 | - * Similar to vaPutImage but with additional destination width | |
890 | - * and height arguments to enable scaling | |
891 | - */ | |
892 | -VAStatus vaPutImage2 ( | |
893 | - VADisplay dpy, | |
894 | - VASurfaceID surface, | |
895 | - VAImageID image, | |
896 | - int src_x, | |
897 | - int src_y, | |
898 | 875 | unsigned int src_width, |
899 | 876 | unsigned int src_height, |
900 | 877 | int dest_x, |
@@ -907,8 +884,8 @@ VAStatus vaPutImage2 ( | ||
907 | 884 | CHECK_DISPLAY(dpy); |
908 | 885 | ctx = CTX(dpy); |
909 | 886 | |
910 | - TRACE(vaPutImage2); | |
911 | - return ctx->vtable.vaPutImage2 ( ctx, surface, image, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height ); | |
887 | + TRACE(vaPutImage); | |
888 | + return ctx->vtable.vaPutImage ( ctx, surface, image, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height ); | |
912 | 889 | } |
913 | 890 | |
914 | 891 | /* |
@@ -1092,32 +1069,6 @@ VAStatus vaAssociateSubpicture ( | ||
1092 | 1069 | int num_surfaces, |
1093 | 1070 | short src_x, /* upper left offset in subpicture */ |
1094 | 1071 | short src_y, |
1095 | - short dest_x, /* upper left offset in surface */ | |
1096 | - short dest_y, | |
1097 | - unsigned short width, | |
1098 | - unsigned short height, | |
1099 | - /* | |
1100 | - * whether to enable chroma-keying or global-alpha | |
1101 | - * see VA_SUBPICTURE_XXX values | |
1102 | - */ | |
1103 | - unsigned int flags | |
1104 | -) | |
1105 | -{ | |
1106 | - VADriverContextP ctx; | |
1107 | - CHECK_DISPLAY(dpy); | |
1108 | - ctx = CTX(dpy); | |
1109 | - | |
1110 | - TRACE(vaAssociateSubpicture); | |
1111 | - return ctx->vtable.vaAssociateSubpicture ( ctx, subpicture, target_surfaces, num_surfaces, src_x, src_y, dest_x, dest_y, width, height, flags ); | |
1112 | -} | |
1113 | - | |
1114 | -VAStatus vaAssociateSubpicture2 ( | |
1115 | - VADisplay dpy, | |
1116 | - VASubpictureID subpicture, | |
1117 | - VASurfaceID *target_surfaces, | |
1118 | - int num_surfaces, | |
1119 | - short src_x, /* upper left offset in subpicture */ | |
1120 | - short src_y, | |
1121 | 1072 | unsigned short src_width, |
1122 | 1073 | unsigned short src_height, |
1123 | 1074 | short dest_x, /* upper left offset in surface */ |
@@ -1135,8 +1086,8 @@ VAStatus vaAssociateSubpicture2 ( | ||
1135 | 1086 | CHECK_DISPLAY(dpy); |
1136 | 1087 | ctx = CTX(dpy); |
1137 | 1088 | |
1138 | - TRACE(vaAssociateSubpicture2); | |
1139 | - return ctx->vtable.vaAssociateSubpicture2 ( ctx, subpicture, target_surfaces, num_surfaces, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height, flags ); | |
1089 | + TRACE(vaAssociateSubpicture); | |
1090 | + return ctx->vtable.vaAssociateSubpicture ( ctx, subpicture, target_surfaces, num_surfaces, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height, flags ); | |
1140 | 1091 | } |
1141 | 1092 | |
1142 | 1093 | /* |
@@ -125,6 +125,7 @@ typedef int VAStatus; /* Return status type from functions */ | ||
125 | 125 | #define VA_STATUS_ERROR_FLAG_NOT_SUPPORTED 0x00000011 |
126 | 126 | #define VA_STATUS_ERROR_INVALID_PARAMETER 0x00000012 |
127 | 127 | #define VA_STATUS_ERROR_RESOLUTION_NOT_SUPPORTED 0x00000013 |
128 | +#define VA_STATUS_ERROR_UNIMPLEMENTED 0x00000014 | |
128 | 129 | #define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF |
129 | 130 | |
130 | 131 | /* |
@@ -572,7 +573,7 @@ typedef struct _VAMacroblockParameterBufferMPEG2 | ||
572 | 573 | unsigned int field_motion_type : 2; |
573 | 574 | unsigned int dct_type : 1; |
574 | 575 | } bits; |
575 | - unsigned char value; | |
576 | + unsigned int value; | |
576 | 577 | } macroblock_modes; |
577 | 578 | unsigned char motion_vertical_field_select; |
578 | 579 | /* |
@@ -626,18 +627,18 @@ typedef struct _VAPictureParameterBufferMPEG4 | ||
626 | 627 | VASurfaceID backward_reference_picture; |
627 | 628 | union { |
628 | 629 | struct { |
629 | - unsigned char short_video_header : 1; | |
630 | - unsigned char chroma_format : 2; | |
631 | - unsigned char interlaced : 1; | |
632 | - unsigned char obmc_disable : 1; | |
633 | - unsigned char sprite_enable : 2; | |
634 | - unsigned char sprite_warping_accuracy : 2; | |
635 | - unsigned char quant_type : 1; | |
636 | - unsigned char quarter_sample : 1; | |
637 | - unsigned char data_partitioned : 1; | |
638 | - unsigned char reversible_vlc : 1; | |
630 | + unsigned int short_video_header : 1; | |
631 | + unsigned int chroma_format : 2; | |
632 | + unsigned int interlaced : 1; | |
633 | + unsigned int obmc_disable : 1; | |
634 | + unsigned int sprite_enable : 2; | |
635 | + unsigned int sprite_warping_accuracy : 2; | |
636 | + unsigned int quant_type : 1; | |
637 | + unsigned int quarter_sample : 1; | |
638 | + unsigned int data_partitioned : 1; | |
639 | + unsigned int reversible_vlc : 1; | |
639 | 640 | } bits; |
640 | - unsigned short value; | |
641 | + unsigned int value; | |
641 | 642 | } vol_fields; |
642 | 643 | unsigned char no_of_sprite_warping_points; |
643 | 644 | short sprite_trajectory_du[3]; |
@@ -645,14 +646,14 @@ typedef struct _VAPictureParameterBufferMPEG4 | ||
645 | 646 | unsigned char quant_precision; |
646 | 647 | union { |
647 | 648 | struct { |
648 | - unsigned char vop_coding_type : 2; | |
649 | - unsigned char backward_reference_vop_coding_type : 2; | |
650 | - unsigned char vop_rounding_type : 1; | |
651 | - unsigned char intra_dc_vlc_thr : 3; | |
652 | - unsigned char top_field_first : 1; | |
653 | - unsigned char alternate_vertical_scan_flag : 1; | |
649 | + unsigned int vop_coding_type : 2; | |
650 | + unsigned int backward_reference_vop_coding_type : 2; | |
651 | + unsigned int vop_rounding_type : 1; | |
652 | + unsigned int intra_dc_vlc_thr : 3; | |
653 | + unsigned int top_field_first : 1; | |
654 | + unsigned int alternate_vertical_scan_flag : 1; | |
654 | 655 | } bits; |
655 | - unsigned short value; | |
656 | + unsigned int value; | |
656 | 657 | } vop_fields; |
657 | 658 | unsigned char vop_fcode_forward; |
658 | 659 | unsigned char vop_fcode_backward; |
@@ -722,28 +723,41 @@ typedef struct _VAPictureParameterBufferVC1 | ||
722 | 723 | /* sequence layer for AP or meta data for SP and MP */ |
723 | 724 | union { |
724 | 725 | struct { |
725 | - unsigned char interlace : 1; /* SEQUENCE_LAYER::INTERLACE */ | |
726 | - unsigned char syncmarker : 1;/* METADATA::SYNCMARKER */ | |
727 | - unsigned char overlap : 1;/* METADATA::OVERLAP */ | |
726 | + unsigned int pulldown : 1; /* SEQUENCE_LAYER::PULLDOWN */ | |
727 | + unsigned int interlace : 1; /* SEQUENCE_LAYER::INTERLACE */ | |
728 | + unsigned int tfcntrflag : 1; /* SEQUENCE_LAYER::TFCNTRFLAG */ | |
729 | + unsigned int finterpflag : 1; /* SEQUENCE_LAYER::FINTERPFLAG */ | |
730 | + unsigned int psf : 1; /* SEQUENCE_LAYER::PSF */ | |
731 | + unsigned int multires : 1; /* METADATA::MULTIRES */ | |
732 | + unsigned int overlap : 1; /* METADATA::OVERLAP */ | |
733 | + unsigned int syncmarker : 1; /* METADATA::SYNCMARKER */ | |
734 | + unsigned int rangered : 1; /* METADATA::RANGERED */ | |
735 | + unsigned int max_b_frames : 3; /* METADATA::MAXBFRAMES */ | |
728 | 736 | } bits; |
729 | - unsigned char value; | |
737 | + unsigned int value; | |
730 | 738 | } sequence_fields; |
731 | 739 | |
732 | 740 | unsigned short coded_width; /* ENTRY_POINT_LAYER::CODED_WIDTH */ |
733 | 741 | unsigned short coded_height; /* ENTRY_POINT_LAYER::CODED_HEIGHT */ |
734 | - unsigned char closed_entry; /* ENTRY_POINT_LAYER::CLOSED_ENTRY */ | |
735 | - unsigned char broken_link; /* ENTRY_POINT_LAYER::BROKEN_LINK */ | |
736 | - unsigned char loopfilter; /* ENTRY_POINT_LAYER::LOOPFILTER */ | |
742 | + union { | |
743 | + struct { | |
744 | + unsigned int broken_link : 1; /* ENTRY_POINT_LAYER::BROKEN_LINK */ | |
745 | + unsigned int closed_entry : 1; /* ENTRY_POINT_LAYER::CLOSED_ENTRY */ | |
746 | + unsigned int panscan_flag : 1; /* ENTRY_POINT_LAYER::PANSCAN_FLAG */ | |
747 | + unsigned int loopfilter : 1; /* ENTRY_POINT_LAYER::LOOPFILTER */ | |
748 | + } bits; | |
749 | + unsigned int value; | |
750 | + } entrypoint_fields; | |
737 | 751 | unsigned char conditional_overlap_flag; /* ENTRY_POINT_LAYER::CONDOVER */ |
738 | 752 | unsigned char fast_uvmc_flag; /* ENTRY_POINT_LAYER::FASTUVMC */ |
739 | 753 | union { |
740 | 754 | struct { |
741 | - unsigned char luma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPY_FLAG */ | |
742 | - unsigned char luma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPY */ | |
743 | - unsigned char chroma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPUV_FLAG */ | |
744 | - unsigned char chroma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPUV */ | |
755 | + unsigned int luma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPY_FLAG */ | |
756 | + unsigned int luma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPY */ | |
757 | + unsigned int chroma_flag : 1; /* ENTRY_POINT_LAYER::RANGE_MAPUV_FLAG */ | |
758 | + unsigned int chroma : 3; /* ENTRY_POINT_LAYER::RANGE_MAPUV */ | |
745 | 759 | } bits; |
746 | - unsigned char value; | |
760 | + unsigned int value; | |
747 | 761 | } range_mapping_fields; |
748 | 762 | |
749 | 763 | unsigned char b_picture_fraction; /* PICTURE_LAYER::BFRACTION */ |
@@ -757,88 +771,88 @@ typedef struct _VAPictureParameterBufferVC1 | ||
757 | 771 | unsigned char luma_shift; /* PICTURE_LAYER::LUMSHIFT */ |
758 | 772 | union { |
759 | 773 | struct { |
760 | - unsigned char picture_type : 2; /* PICTURE_LAYER::PTYPE */ | |
761 | - unsigned char frame_coding_mode : 3; /* PICTURE_LAYER::FCM */ | |
762 | - unsigned char top_field_first : 1; /* PICTURE_LAYER::TFF */ | |
763 | - unsigned char is_first_field : 1; /* set to 1 if it is the first field */ | |
764 | - unsigned char intensity_compensation : 1; /* PICTURE_LAYER::INTCOMP */ | |
774 | + unsigned int picture_type : 3; /* PICTURE_LAYER::PTYPE */ | |
775 | + unsigned int frame_coding_mode : 3; /* PICTURE_LAYER::FCM */ | |
776 | + unsigned int top_field_first : 1; /* PICTURE_LAYER::TFF */ | |
777 | + unsigned int is_first_field : 1; /* set to 1 if it is the first field */ | |
778 | + unsigned int intensity_compensation : 1; /* PICTURE_LAYER::INTCOMP */ | |
765 | 779 | } bits; |
766 | - unsigned char value; | |
780 | + unsigned int value; | |
767 | 781 | } picture_fields; |
768 | 782 | union { |
769 | 783 | struct { |
770 | - unsigned char mv_type_mb : 1; /* PICTURE::MVTYPEMB */ | |
771 | - unsigned char direct_mb : 1; /* PICTURE::DIRECTMB */ | |
772 | - unsigned char skip_mb : 1; /* PICTURE::SKIPMB */ | |
773 | - unsigned char field_tx : 1; /* PICTURE::FIELDTX */ | |
774 | - unsigned char forward_mb : 1; /* PICTURE::FORWARDMB */ | |
775 | - unsigned char ac_pred : 1; /* PICTURE::ACPRED */ | |
776 | - unsigned char overflags : 1; /* PICTURE::OVERFLAGS */ | |
784 | + unsigned int mv_type_mb : 1; /* PICTURE::MVTYPEMB */ | |
785 | + unsigned int direct_mb : 1; /* PICTURE::DIRECTMB */ | |
786 | + unsigned int skip_mb : 1; /* PICTURE::SKIPMB */ | |
787 | + unsigned int field_tx : 1; /* PICTURE::FIELDTX */ | |
788 | + unsigned int forward_mb : 1; /* PICTURE::FORWARDMB */ | |
789 | + unsigned int ac_pred : 1; /* PICTURE::ACPRED */ | |
790 | + unsigned int overflags : 1; /* PICTURE::OVERFLAGS */ | |
777 | 791 | } flags; |
778 | - unsigned char value; | |
792 | + unsigned int value; | |
779 | 793 | } raw_coding; |
780 | 794 | union { |
781 | 795 | struct { |
782 | - unsigned char bp_mv_type_mb : 1; /* PICTURE::MVTYPEMB */ | |
783 | - unsigned char bp_direct_mb : 1; /* PICTURE::DIRECTMB */ | |
784 | - unsigned char bp_skip_mb : 1; /* PICTURE::SKIPMB */ | |
785 | - unsigned char bp_field_tx : 1; /* PICTURE::FIELDTX */ | |
786 | - unsigned char bp_forward_mb : 1; /* PICTURE::FORWARDMB */ | |
787 | - unsigned char bp_ac_pred : 1; /* PICTURE::ACPRED */ | |
788 | - unsigned char bp_overflags : 1; /* PICTURE::OVERFLAGS */ | |
796 | + unsigned int bp_mv_type_mb : 1; /* PICTURE::MVTYPEMB */ | |
797 | + unsigned int bp_direct_mb : 1; /* PICTURE::DIRECTMB */ | |
798 | + unsigned int bp_skip_mb : 1; /* PICTURE::SKIPMB */ | |
799 | + unsigned int bp_field_tx : 1; /* PICTURE::FIELDTX */ | |
800 | + unsigned int bp_forward_mb : 1; /* PICTURE::FORWARDMB */ | |
801 | + unsigned int bp_ac_pred : 1; /* PICTURE::ACPRED */ | |
802 | + unsigned int bp_overflags : 1; /* PICTURE::OVERFLAGS */ | |
789 | 803 | } flags; |
790 | - unsigned char value; | |
804 | + unsigned int value; | |
791 | 805 | } bitplane_present; /* signal what bitplane is being passed via the bitplane buffer */ |
792 | 806 | union { |
793 | 807 | struct { |
794 | - unsigned char reference_distance_flag : 1;/* PICTURE_LAYER::REFDIST_FLAG */ | |
795 | - unsigned char reference_distance : 5;/* PICTURE_LAYER::REFDIST */ | |
796 | - unsigned char num_reference_pictures: 1;/* PICTURE_LAYER::NUMREF */ | |
797 | - unsigned char reference_field_pic_indicator : 1;/* PICTURE_LAYER::REFFIELD */ | |
808 | + unsigned int reference_distance_flag : 1;/* PICTURE_LAYER::REFDIST_FLAG */ | |
809 | + unsigned int reference_distance : 5;/* PICTURE_LAYER::REFDIST */ | |
810 | + unsigned int num_reference_pictures: 1;/* PICTURE_LAYER::NUMREF */ | |
811 | + unsigned int reference_field_pic_indicator : 1;/* PICTURE_LAYER::REFFIELD */ | |
798 | 812 | } bits; |
799 | - unsigned short value; | |
813 | + unsigned int value; | |
800 | 814 | } reference_fields; |
801 | 815 | union { |
802 | 816 | struct { |
803 | - unsigned char mv_mode : 3; /* PICTURE_LAYER::MVMODE */ | |
804 | - unsigned char mv_mode2 : 3; /* PICTURE_LAYER::MVMODE2 */ | |
805 | - unsigned char mv_table : 3; /* PICTURE_LAYER::MVTAB/IMVTAB */ | |
806 | - unsigned char two_mv_block_pattern_table: 2; /* PICTURE_LAYER::2MVBPTAB */ | |
807 | - unsigned char four_mv_switch : 1; /* PICTURE_LAYER::4MVSWITCH */ | |
808 | - unsigned char four_mv_block_pattern_table : 2; /* PICTURE_LAYER::4MVBPTAB */ | |
809 | - unsigned char extended_mv_flag : 1; /* ENTRY_POINT_LAYER::EXTENDED_MV */ | |
810 | - unsigned char extended_mv_range : 2; /* PICTURE_LAYER::MVRANGE */ | |
811 | - unsigned char extended_dmv_flag : 1; /* ENTRY_POCHAR_LAYER::EXTENDED_DMV */ | |
812 | - unsigned char extended_dmv_range : 2; /* PICTURE_LAYER::DMVRANGE */ | |
817 | + unsigned int mv_mode : 3; /* PICTURE_LAYER::MVMODE */ | |
818 | + unsigned int mv_mode2 : 3; /* PICTURE_LAYER::MVMODE2 */ | |
819 | + unsigned int mv_table : 3; /* PICTURE_LAYER::MVTAB/IMVTAB */ | |
820 | + unsigned int two_mv_block_pattern_table: 2; /* PICTURE_LAYER::2MVBPTAB */ | |
821 | + unsigned int four_mv_switch : 1; /* PICTURE_LAYER::4MVSWITCH */ | |
822 | + unsigned int four_mv_block_pattern_table : 2; /* PICTURE_LAYER::4MVBPTAB */ | |
823 | + unsigned int extended_mv_flag : 1; /* ENTRY_POINT_LAYER::EXTENDED_MV */ | |
824 | + unsigned int extended_mv_range : 2; /* PICTURE_LAYER::MVRANGE */ | |
825 | + unsigned int extended_dmv_flag : 1; /* ENTRY_POINT_LAYER::EXTENDED_DMV */ | |
826 | + unsigned int extended_dmv_range : 2; /* PICTURE_LAYER::DMVRANGE */ | |
813 | 827 | } bits; |
814 | 828 | unsigned int value; |
815 | 829 | } mv_fields; |
816 | 830 | union { |
817 | 831 | struct { |
818 | - unsigned char dquant : 2; /* ENTRY_POINT_LAYER::DQUANT */ | |
819 | - unsigned char quantizer : 2; /* ENTRY_POINT_LAYER::QUANTIZER */ | |
820 | - unsigned char half_qp : 1; /* PICTURE_LAYER::HALFQP */ | |
821 | - unsigned char pic_quantizer_scale : 5;/* PICTURE_LAYER::PQUANT */ | |
822 | - unsigned char pic_quantizer_type : 1;/* PICTURE_LAYER::PQUANTIZER */ | |
823 | - unsigned char dq_frame : 1; /* VOPDQUANT::DQUANTFRM */ | |
824 | - unsigned char dq_profile : 2; /* VOPDQUANT::DQPROFILE */ | |
825 | - unsigned char dq_sb_edge : 2; /* VOPDQUANT::DQSBEDGE */ | |
826 | - unsigned char dq_db_edge : 2; /* VOPDQUANT::DQDBEDGE */ | |
827 | - unsigned char dq_binary_level : 1; /* VOPDQUANT::DQBILEVEL */ | |
828 | - unsigned char alt_pic_quantizer : 5;/* VOPDQUANT::ALTPQUANT */ | |
832 | + unsigned int dquant : 2; /* ENTRY_POINT_LAYER::DQUANT */ | |
833 | + unsigned int quantizer : 2; /* ENTRY_POINT_LAYER::QUANTIZER */ | |
834 | + unsigned int half_qp : 1; /* PICTURE_LAYER::HALFQP */ | |
835 | + unsigned int pic_quantizer_scale : 5;/* PICTURE_LAYER::PQUANT */ | |
836 | + unsigned int pic_quantizer_type : 1;/* PICTURE_LAYER::PQUANTIZER */ | |
837 | + unsigned int dq_frame : 1; /* VOPDQUANT::DQUANTFRM */ | |
838 | + unsigned int dq_profile : 2; /* VOPDQUANT::DQPROFILE */ | |
839 | + unsigned int dq_sb_edge : 2; /* VOPDQUANT::DQSBEDGE */ | |
840 | + unsigned int dq_db_edge : 2; /* VOPDQUANT::DQDBEDGE */ | |
841 | + unsigned int dq_binary_level : 1; /* VOPDQUANT::DQBILEVEL */ | |
842 | + unsigned int alt_pic_quantizer : 5;/* VOPDQUANT::ALTPQUANT */ | |
829 | 843 | } bits; |
830 | - unsigned long value; | |
844 | + unsigned int value; | |
831 | 845 | } pic_quantizer_fields; |
832 | 846 | union { |
833 | 847 | struct { |
834 | - unsigned char variable_sized_transform_flag : 1;/* ENTRY_POINT_LAYER::VSTRANSFORM */ | |
835 | - unsigned char mb_level_transform_type_flag : 1;/* PICTURE_LAYER::TTMBF */ | |
836 | - unsigned char frame_level_transform_type : 2;/* PICTURE_LAYER::TTFRM */ | |
837 | - unsigned char transform_ac_codingset_idx1 : 2;/* PICTURE_LAYER::TRANSACFRM */ | |
838 | - unsigned char transform_ac_codingset_idx2 : 2;/* PICTURE_LAYER::TRANSACFRM2 */ | |
839 | - unsigned char intra_transform_dc_table : 1;/* PICTURE_LAYER::TRANSDCTAB */ | |
848 | + unsigned int variable_sized_transform_flag : 1;/* ENTRY_POINT_LAYER::VSTRANSFORM */ | |
849 | + unsigned int mb_level_transform_type_flag : 1;/* PICTURE_LAYER::TTMBF */ | |
850 | + unsigned int frame_level_transform_type : 2;/* PICTURE_LAYER::TTFRM */ | |
851 | + unsigned int transform_ac_codingset_idx1 : 2;/* PICTURE_LAYER::TRANSACFRM */ | |
852 | + unsigned int transform_ac_codingset_idx2 : 2;/* PICTURE_LAYER::TRANSACFRM2 */ | |
853 | + unsigned int intra_transform_dc_table : 1;/* PICTURE_LAYER::TRANSDCTAB */ | |
840 | 854 | } bits; |
841 | - unsigned short value; | |
855 | + unsigned int value; | |
842 | 856 | } transform_fields; |
843 | 857 | } VAPictureParameterBufferVC1; |
844 | 858 |
@@ -882,6 +896,7 @@ This is simplely a buffer containing raw bit-stream bytes | ||
882 | 896 | typedef struct _VAPictureH264 |
883 | 897 | { |
884 | 898 | VASurfaceID picture_id; |
899 | + unsigned int frame_idx; | |
885 | 900 | unsigned int flags; |
886 | 901 | unsigned int TopFieldOrderCnt; |
887 | 902 | unsigned int BottomFieldOrderCnt; |
@@ -909,30 +924,41 @@ typedef struct _VAPictureParameterBufferH264 | ||
909 | 924 | unsigned char num_ref_frames; |
910 | 925 | union { |
911 | 926 | struct { |
912 | - unsigned char chroma_format_idc : 2; | |
913 | - unsigned char residual_colour_transform_flag : 1; | |
914 | - unsigned char frame_mbs_only_flag : 1; | |
915 | - unsigned char mb_adaptive_frame_field_flag : 1; | |
916 | - unsigned char direct_8x8_inference_flag : 1; | |
917 | - unsigned char MinLumaBiPredSize8x8 : 1; /* see A.3.3.2 */ | |
927 | + unsigned int chroma_format_idc : 2; | |
928 | + unsigned int residual_colour_transform_flag : 1; | |
929 | + unsigned int gaps_in_frame_num_value_allowed_flag : 1; | |
930 | + unsigned int frame_mbs_only_flag : 1; | |
931 | + unsigned int mb_adaptive_frame_field_flag : 1; | |
932 | + unsigned int direct_8x8_inference_flag : 1; | |
933 | + unsigned int MinLumaBiPredSize8x8 : 1; /* see A.3.3.2 */ | |
934 | + unsigned int log2_max_frame_num_minus4 : 4; | |
935 | + unsigned int pic_order_cnt_type : 2; | |
936 | + unsigned int log2_max_pic_order_cnt_lsb_minus4 : 4; | |
937 | + unsigned int delta_pic_order_always_zero_flag : 1; | |
918 | 938 | } bits; |
919 | - unsigned char value; | |
939 | + unsigned int value; | |
920 | 940 | } seq_fields; |
921 | 941 | unsigned char num_slice_groups_minus1; |
922 | 942 | unsigned char slice_group_map_type; |
943 | + unsigned short slice_group_change_rate_minus1; | |
923 | 944 | signed char pic_init_qp_minus26; |
945 | + signed char pic_init_qs_minus26; | |
924 | 946 | signed char chroma_qp_index_offset; |
925 | 947 | signed char second_chroma_qp_index_offset; |
926 | 948 | union { |
927 | 949 | struct { |
928 | - unsigned char entropy_coding_mode_flag : 1; | |
929 | - unsigned char weighted_pred_flag : 1; | |
930 | - unsigned char weighted_bipred_idc : 2; | |
931 | - unsigned char transform_8x8_mode_flag : 1; | |
932 | - unsigned char field_pic_flag : 1; | |
933 | - unsigned char constrained_intra_pred_flag : 1; | |
950 | + unsigned int entropy_coding_mode_flag : 1; | |
951 | + unsigned int weighted_pred_flag : 1; | |
952 | + unsigned int weighted_bipred_idc : 2; | |
953 | + unsigned int transform_8x8_mode_flag : 1; | |
954 | + unsigned int field_pic_flag : 1; | |
955 | + unsigned int constrained_intra_pred_flag : 1; | |
956 | + unsigned int pic_order_present_flag : 1; | |
957 | + unsigned int deblocking_filter_control_present_flag : 1; | |
958 | + unsigned int redundant_pic_cnt_present_flag : 1; | |
959 | + unsigned int reference_pic_flag : 1; /* nal_ref_idc != 0 */ | |
934 | 960 | } bits; |
935 | - unsigned char value; | |
961 | + unsigned int value; | |
936 | 962 | } pic_fields; |
937 | 963 | unsigned short frame_num; |
938 | 964 | } VAPictureParameterBufferH264; |
@@ -1006,10 +1032,10 @@ typedef struct _VAEncSliceParameterBuffer | ||
1006 | 1032 | unsigned int slice_height; /* slice height measured in MB */ |
1007 | 1033 | union { |
1008 | 1034 | struct { |
1009 | - unsigned char is_intra : 1; | |
1010 | - unsigned char disable_deblocking_filter_idc : 2; | |
1035 | + unsigned int is_intra : 1; | |
1036 | + unsigned int disable_deblocking_filter_idc : 2; | |
1011 | 1037 | } bits; |
1012 | - unsigned char value; | |
1038 | + unsigned int value; | |
1013 | 1039 | } slice_flags; |
1014 | 1040 | } VAEncSliceParameterBuffer; |
1015 | 1041 |
@@ -1218,18 +1244,17 @@ Synchronization | ||
1218 | 1244 | */ |
1219 | 1245 | VAStatus vaSyncSurface ( |
1220 | 1246 | VADisplay dpy, |
1221 | - VAContextID context, | |
1222 | 1247 | VASurfaceID render_target |
1223 | 1248 | ); |
1224 | 1249 | |
1225 | 1250 | typedef enum |
1226 | 1251 | { |
1227 | - VASurfaceRendering = 0, /* Rendering in progress */ | |
1228 | - VASurfaceDisplaying = 1, /* Displaying in progress (not safe to render into it) */ | |
1252 | + VASurfaceRendering = 1, /* Rendering in progress */ | |
1253 | + VASurfaceDisplaying = 2, /* Displaying in progress (not safe to render into it) */ | |
1229 | 1254 | /* this status is useful if surface is used as the source */ |
1230 | 1255 | /* of an overlay */ |
1231 | - VASurfaceReady = 2, /* not being rendered or displayed */ | |
1232 | - VASurfaceSkipped = 4 /* Indicate a skipped frame during encode */ | |
1256 | + VASurfaceReady = 4, /* not being rendered or displayed */ | |
1257 | + VASurfaceSkipped = 8 /* Indicate a skipped frame during encode */ | |
1233 | 1258 | } VASurfaceStatus; |
1234 | 1259 | |
1235 | 1260 | /* |
@@ -1394,8 +1419,6 @@ VAStatus vaGetImage ( | ||
1394 | 1419 | * Image must be in a format supported by the implementation |
1395 | 1420 | * Returns a VA_STATUS_ERROR_SURFACE_BUSY if the surface |
1396 | 1421 | * shouldn't be rendered into when this is called |
1397 | - * The source and destionation width and height are the same and | |
1398 | - * no scaling is performed with this operation. | |
1399 | 1422 | */ |
1400 | 1423 | VAStatus vaPutImage ( |
1401 | 1424 | VADisplay dpy, |
@@ -1403,22 +1426,6 @@ VAStatus vaPutImage ( | ||
1403 | 1426 | VAImageID image, |
1404 | 1427 | int src_x, |
1405 | 1428 | int src_y, |
1406 | - unsigned int width, | |
1407 | - unsigned int height, | |
1408 | - int dest_x, | |
1409 | - int dest_y | |
1410 | -); | |
1411 | - | |
1412 | -/* | |
1413 | - * Similar to vaPutImage but with additional destination width | |
1414 | - * and height arguments to enable scaling | |
1415 | - */ | |
1416 | -VAStatus vaPutImage2 ( | |
1417 | - VADisplay dpy, | |
1418 | - VASurfaceID surface, | |
1419 | - VAImageID image, | |
1420 | - int src_x, | |
1421 | - int src_y, | |
1422 | 1429 | unsigned int src_width, |
1423 | 1430 | unsigned int src_height, |
1424 | 1431 | int dest_x, |
@@ -1567,28 +1574,6 @@ VAStatus vaAssociateSubpicture ( | ||
1567 | 1574 | int num_surfaces, |
1568 | 1575 | short src_x, /* upper left offset in subpicture */ |
1569 | 1576 | short src_y, |
1570 | - short dest_x, /* upper left offset in surface */ | |
1571 | - short dest_y, | |
1572 | - unsigned short width, | |
1573 | - unsigned short height, | |
1574 | - /* | |
1575 | - * whether to enable chroma-keying or global-alpha | |
1576 | - * see VA_SUBPICTURE_XXX values | |
1577 | - */ | |
1578 | - unsigned int flags | |
1579 | -); | |
1580 | - | |
1581 | -/* | |
1582 | - * Similar to vaAssociateSubpicture but with additional destination width | |
1583 | - * and height to enable scaling | |
1584 | - */ | |
1585 | -VAStatus vaAssociateSubpicture2 ( | |
1586 | - VADisplay dpy, | |
1587 | - VASubpictureID subpicture, | |
1588 | - VASurfaceID *target_surfaces, | |
1589 | - int num_surfaces, | |
1590 | - short src_x, /* upper left offset in subpicture */ | |
1591 | - short src_y, | |
1592 | 1577 | unsigned short src_width, |
1593 | 1578 | unsigned short src_height, |
1594 | 1579 | short dest_x, /* upper left offset in surface */ |
@@ -175,7 +175,6 @@ struct VADriverVTable | ||
175 | 175 | |
176 | 176 | VAStatus (*vaSyncSurface) ( |
177 | 177 | VADriverContextP ctx, |
178 | - VAContextID context, | |
179 | 178 | VASurfaceID render_target |
180 | 179 | ); |
181 | 180 |
@@ -254,18 +253,6 @@ struct VADriverVTable | ||
254 | 253 | VAImageID image, |
255 | 254 | int src_x, |
256 | 255 | int src_y, |
257 | - unsigned int width, | |
258 | - unsigned int height, | |
259 | - int dest_x, | |
260 | - int dest_y | |
261 | - ); | |
262 | - | |
263 | - VAStatus (*vaPutImage2) ( | |
264 | - VADriverContextP ctx, | |
265 | - VASurfaceID surface, | |
266 | - VAImageID image, | |
267 | - int src_x, | |
268 | - int src_y, | |
269 | 256 | unsigned int src_width, |
270 | 257 | unsigned int src_height, |
271 | 258 | int dest_x, |
@@ -319,24 +306,6 @@ struct VADriverVTable | ||
319 | 306 | int num_surfaces, |
320 | 307 | short src_x, /* upper left offset in subpicture */ |
321 | 308 | short src_y, |
322 | - short dest_x, /* upper left offset in surface */ | |
323 | - short dest_y, | |
324 | - unsigned short width, | |
325 | - unsigned short height, | |
326 | - /* | |
327 | - * whether to enable chroma-keying or global-alpha | |
328 | - * see VA_SUBPICTURE_XXX values | |
329 | - */ | |
330 | - unsigned int flags | |
331 | - ); | |
332 | - | |
333 | - VAStatus (*vaAssociateSubpicture2) ( | |
334 | - VADriverContextP ctx, | |
335 | - VASubpictureID subpicture, | |
336 | - VASurfaceID *target_surfaces, | |
337 | - int num_surfaces, | |
338 | - short src_x, /* upper left offset in subpicture */ | |
339 | - short src_y, | |
340 | 309 | unsigned short src_width, |
341 | 310 | unsigned short src_height, |
342 | 311 | short dest_x, /* upper left offset in surface */ |
@@ -205,27 +205,6 @@ static VAStatus va_DisplayContextGetDriverName ( | ||
205 | 205 | return vaStatus; |
206 | 206 | } |
207 | 207 | |
208 | -int vaDisplayIsValid(VADisplay dpy) | |
209 | -{ | |
210 | - VADisplayContextP tmp=NULL; | |
211 | - VADisplayContextP pDisplayContext = pDisplayContexts; | |
212 | - | |
213 | - while (pDisplayContext) | |
214 | - { | |
215 | - if (pDisplayContext == (VADisplayContextP)dpy) | |
216 | - { | |
217 | - tmp = (VADisplay)pDisplayContext; | |
218 | - break; | |
219 | - } | |
220 | - pDisplayContext = pDisplayContext->pNext; | |
221 | - } | |
222 | - | |
223 | - if (!tmp) | |
224 | - return 0; | |
225 | - | |
226 | - return tmp->vaIsValid(pDisplayContext); | |
227 | -} | |
228 | - | |
229 | 208 | |
230 | 209 | VADisplay vaGetDisplay ( |
231 | 210 | Display *native_dpy /* implementation specific */ |
@@ -222,7 +222,7 @@ void test() | ||
222 | 222 | va_status = vaEndPicture(va_dpy,vaContext); |
223 | 223 | ASSERT( VA_STATUS_SUCCESS == va_status ); |
224 | 224 | |
225 | - va_status = vaSyncSurface(va_dpy, vaContext, vaSurface); | |
225 | + va_status = vaSyncSurface(va_dpy, vaSurface); | |
226 | 226 | ASSERT( VA_STATUS_SUCCESS == va_status ); |
227 | 227 | |
228 | 228 | win = XCreateSimpleWindow(dpy, RootWindow(dpy, 0), 0, 0, |