Commit a7dbd4e0 authored by Austin Yuan's avatar 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: default avatarAustin Yuan <shengquan.yuan@intel.com>
parents fb431c22 2822d025
*~
*.o
*.lo
*.la
*.orig
*.rej
*.loT
*.bin
.deps
.libs
install-sh
libtool
ltmain.sh
missing
Makefile
Makefile.in
config.h
config.h.in
stamp-h1
aclocal.m4
autom4te.cache
config.guess
config.log
config.status
config.sub
configure
depcomp
fw/msvdx_bin
fw/msvdx_fw.bin
......@@ -31,11 +31,16 @@ SUBDIRS += i965_drv_video
endif
pcfiles = \
libva.pc
libva.pc \
libva-$(LIBVA_DISPLAY).pc
# libva-<display>.pc - for display-specific dependencies
libva-$(LIBVA_DISPLAY).pc: libva_display.pc
@cp $< $@
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = $(pcfiles)
EXTRA_DIST = libva.pc.in
EXTRA_DIST = libva.pc.in libva_display.pc.in
CLEANFILES = $(pcfiles)
......@@ -22,8 +22,8 @@
# libva package version number, (as distinct from shared library version)
m4_define([libva_major_version], [0])
m4_define([libva_minor_version], [30])
m4_define([libva_micro_version], [4])
m4_define([libva_minor_version], [31])
m4_define([libva_micro_version], [0])
m4_define([libva_version],
[libva_major_version.libva_minor_version.libva_micro_version])
......@@ -32,9 +32,9 @@ m4_define([libva_version],
m4_define([libva_sds_version], [2])
# if the library source code has changed, increment revision
m4_define([libva_lt_revision], [1])
m4_define([libva_lt_revision], [0])
# if any interface was added/removed/changed, then inc current, reset revision
m4_define([libva_lt_current], [0])
m4_define([libva_lt_current], [1])
# if any interface was added since last public release, then increment age
# if any interface was removed since last public release, then set age to 0
m4_define([libva_lt_age], [0])
......@@ -114,8 +114,12 @@ AC_SUBST(LIBVA_LIBS)
pkgconfigdir=${libdir}/pkgconfig
AC_SUBST(pkgconfigdir)
libvabackendlib=libva.la
LIBVA_DISPLAY=x11
libvacorelib=libva.la
libvabackendlib=libva-$LIBVA_DISPLAY.la
AC_SUBST([libvacorelib])
AC_SUBST([libvabackendlib])
AC_SUBST(LIBVA_DISPLAY)
AC_OUTPUT([
Makefile
......@@ -130,5 +134,6 @@ AC_OUTPUT([
i965_drv_video/shaders/render/Makefile
test/Makefile
libva.pc
libva_display.pc
])
......@@ -502,25 +502,8 @@ VAStatus dummy_GetImage(
return VA_STATUS_SUCCESS;
}
VAStatus dummy_PutImage(
VADriverContextP ctx,
VASurfaceID surface,
VAImageID image,
int src_x,
int src_y,
unsigned int width,
unsigned int height,
int dest_x,
int dest_y
)
{
INIT_DRIVER_DATA
/* TODO */
return VA_STATUS_SUCCESS;
}
VAStatus dummy_PutImage2(
VAStatus dummy_PutImage(
VADriverContextP ctx,
VASurfaceID surface,
VAImageID image,
......@@ -631,31 +614,8 @@ VAStatus dummy_SetSubpictureGlobalAlpha(
return VA_STATUS_SUCCESS;
}
VAStatus dummy_AssociateSubpicture(
VADriverContextP ctx,
VASubpictureID subpicture,
VASurfaceID *target_surfaces,
int num_surfaces,
short src_x, /* upper left offset in subpicture */
short src_y,
short dest_x, /* upper left offset in surface */
short dest_y,
unsigned short width,
unsigned short height,
/*
* whether to enable chroma-keying or global-alpha
* see VA_SUBPICTURE_XXX values
*/
unsigned int flags
)
{
INIT_DRIVER_DATA
/* TODO */
return VA_STATUS_SUCCESS;
}
VAStatus dummy_AssociateSubpicture2(
VAStatus dummy_AssociateSubpicture(
VADriverContextP ctx,
VASubpictureID subpicture,
VASurfaceID *target_surfaces,
......@@ -1045,24 +1005,16 @@ VAStatus dummy_EndPicture(
VAStatus dummy_SyncSurface(
VADriverContextP ctx,
VAContextID context,
VASurfaceID render_target
)
{
INIT_DRIVER_DATA
VAStatus vaStatus = VA_STATUS_SUCCESS;
object_context_p obj_context;
object_surface_p obj_surface;
obj_context = CONTEXT(context);
ASSERT(obj_context);
obj_surface = SURFACE(render_target);
ASSERT(obj_surface);
/* Assume that this shouldn't be called before vaEndPicture() */
ASSERT( obj_context->current_render_target != obj_surface->base.id );
return vaStatus;
}
......@@ -1258,7 +1210,6 @@ VAStatus __vaDriverInit_0_30( VADriverContextP ctx )
ctx->vtable.vaSetImagePalette = dummy_SetImagePalette;
ctx->vtable.vaGetImage = dummy_GetImage;
ctx->vtable.vaPutImage = dummy_PutImage;
ctx->vtable.vaPutImage2 = dummy_PutImage2;
ctx->vtable.vaQuerySubpictureFormats = dummy_QuerySubpictureFormats;
ctx->vtable.vaCreateSubpicture = dummy_CreateSubpicture;
ctx->vtable.vaDestroySubpicture = dummy_DestroySubpicture;
......@@ -1266,7 +1217,6 @@ VAStatus __vaDriverInit_0_30( VADriverContextP ctx )
ctx->vtable.vaSetSubpictureChromakey = dummy_SetSubpictureChromakey;
ctx->vtable.vaSetSubpictureGlobalAlpha = dummy_SetSubpictureGlobalAlpha;
ctx->vtable.vaAssociateSubpicture = dummy_AssociateSubpicture;
ctx->vtable.vaAssociateSubpicture2 = dummy_AssociateSubpicture2;
ctx->vtable.vaDeassociateSubpicture = dummy_DeassociateSubpicture;
ctx->vtable.vaQueryDisplayAttributes = dummy_QueryDisplayAttributes;
ctx->vtable.vaGetDisplayAttributes = dummy_GetDisplayAttributes;
......
......@@ -27,7 +27,7 @@ AM_CFLAGS = -Wall -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 @DRM_CFLAGS@ -DIN_
i965_drv_video_la_LTLIBRARIES = i965_drv_video.la
i965_drv_video_ladir = @LIBVA_DRIVERS_PATH@
i965_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined @DRM_LIBS@ -ldrm_intel
i965_drv_video_la_LIBADD = ../src/libva.la -lpthread
i965_drv_video_la_LIBADD = ../src/libva-x11.la -lpthread
i965_drv_video_la_SOURCES = \
object_heap.c \
......
......@@ -350,7 +350,7 @@ i965_QueryImageFormats(VADriverContextP ctx,
}
VAStatus
i965_PutImage2(VADriverContextP ctx,
i965_PutImage(VADriverContextP ctx,
VASurfaceID surface,
VAImageID image,
int src_x,
......@@ -480,8 +480,12 @@ i965_AssociateSubpicture(VADriverContextP ctx,
int num_surfaces,
short src_x, /* upper left offset in subpicture */
short src_y,
unsigned short src_width,
unsigned short src_height,
short dest_x, /* upper left offset in surface */
short dest_y,
unsigned short dest_width,
unsigned short dest_height,
unsigned short width,
unsigned short height,
/*
......@@ -510,27 +514,6 @@ i965_AssociateSubpicture(VADriverContextP ctx,
return VA_STATUS_SUCCESS;
}
VAStatus
i965_AssociateSubpicture2(VADriverContextP ctx,
VASubpictureID subpicture,
VASurfaceID *target_surfaces,
int num_surfaces,
short src_x, /* upper left offset in subpicture */
short src_y,
unsigned short src_width,
unsigned short src_height,
short dest_x, /* upper left offset in surface */
short dest_y,
unsigned short dest_width,
unsigned short dest_height,
/*
* whether to enable chroma-keying or global-alpha
* see VA_SUBPICTURE_XXX values
*/
unsigned int flags)
{
return VA_STATUS_SUCCESS;
}
VAStatus
i965_DeassociateSubpicture(VADriverContextP ctx,
......@@ -1012,19 +995,13 @@ i965_EndPicture(VADriverContextP ctx, VAContextID context)
VAStatus
i965_SyncSurface(VADriverContextP ctx,
VAContextID context,
VASurfaceID render_target)
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
struct object_context *obj_context = CONTEXT(context);
struct object_surface *obj_surface = SURFACE(render_target);
assert(obj_context);
assert(obj_surface);
/* Assume that this shouldn't be called before vaEndPicture() */
assert(obj_context->decode_state.current_render_target != render_target);
return VA_STATUS_SUCCESS;
}
......@@ -1225,20 +1202,6 @@ i965_GetImage(VADriverContextP ctx,
return VA_STATUS_SUCCESS;
}
VAStatus
i965_PutImage(VADriverContextP ctx,
VASurfaceID surface,
VAImageID image,
int src_x,
int src_y,
unsigned int width,
unsigned int height,
int dest_x,
int dest_y)
{
return VA_STATUS_SUCCESS;
}
VAStatus
i965_PutSurface(VADriverContextP ctx,
VASurfaceID surface,
......@@ -1394,7 +1357,6 @@ __vaDriverInit_0_30( VADriverContextP ctx )
ctx->vtable.vaSetImagePalette = i965_SetImagePalette;
ctx->vtable.vaGetImage = i965_GetImage;
ctx->vtable.vaPutImage = i965_PutImage;
ctx->vtable.vaPutImage2 = i965_PutImage2;
ctx->vtable.vaQuerySubpictureFormats = i965_QuerySubpictureFormats;
ctx->vtable.vaCreateSubpicture = i965_CreateSubpicture;
ctx->vtable.vaDestroySubpicture = i965_DestroySubpicture;
......@@ -1403,7 +1365,6 @@ __vaDriverInit_0_30( VADriverContextP ctx )
ctx->vtable.vaSetSubpictureChromakey = i965_SetSubpictureChromakey;
ctx->vtable.vaSetSubpictureGlobalAlpha = i965_SetSubpictureGlobalAlpha;
ctx->vtable.vaAssociateSubpicture = i965_AssociateSubpicture;
ctx->vtable.vaAssociateSubpicture2 = i965_AssociateSubpicture2;
ctx->vtable.vaDeassociateSubpicture = i965_DeassociateSubpicture;
ctx->vtable.vaQueryDisplayAttributes = i965_QueryDisplayAttributes;
ctx->vtable.vaGetDisplayAttributes = i965_GetDisplayAttributes;
......
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
display=@LIBVA_DISPLAY@
Name: libva-${display}
Description: Userspace Video Acceleration (VA) ${display} interface
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lva-${display}
Cflags: -I${includedir}
......@@ -28,10 +28,18 @@ INCLUDES = \
LDADD = \
$(LIBVA_LT_LDFLAGS)
libva_la_LTLIBRARIES = libva.la
lib_LTLIBRARIES = \
libva.la \
libva-x11.la
libva_ladir = $(libdir)
libva_la_LDFLAGS = $(LDADD) -no-undefined
libva_la_LIBADD = $(LIBVA_LIBS) -ldl -lX11 -lXext x11/libva_x11.la -ldrm -lXfixes
libva_la_LIBADD = $(LIBVA_LIBS) -ldl
libva_x11_la_SOURCES =
libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(DRM_LIBS) $(XFIXES_LIBS)
libva_x11_la_LDFLAGS = $(LDADD)
libva_x11_la_DEPENDENCIES = $(libvacorelib)
SUBDIRS = x11
......
......@@ -56,7 +56,11 @@
static int va_debug_trace = 0;
int vaDisplayIsValid(VADisplay dpy);
static int vaDisplayIsValid(VADisplay dpy)
{
VADisplayContextP pDisplayContext = (VADisplayContextP)dpy;
return pDisplayContext && pDisplayContext->vaIsValid(pDisplayContext);
}
static void va_errorMessage(const char *msg, ...)
{
......@@ -217,7 +221,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
CHECK_VTABLE(vaStatus, ctx, SetImagePalette);
CHECK_VTABLE(vaStatus, ctx, GetImage);
CHECK_VTABLE(vaStatus, ctx, PutImage);
CHECK_VTABLE(vaStatus, ctx, PutImage2);
CHECK_VTABLE(vaStatus, ctx, QuerySubpictureFormats);
CHECK_VTABLE(vaStatus, ctx, CreateSubpicture);
CHECK_VTABLE(vaStatus, ctx, DestroySubpicture);
......@@ -225,7 +228,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
CHECK_VTABLE(vaStatus, ctx, SetSubpictureChromakey);
CHECK_VTABLE(vaStatus, ctx, SetSubpictureGlobalAlpha);
CHECK_VTABLE(vaStatus, ctx, AssociateSubpicture);
CHECK_VTABLE(vaStatus, ctx, AssociateSubpicture2);
CHECK_VTABLE(vaStatus, ctx, DeassociateSubpicture);
CHECK_VTABLE(vaStatus, ctx, QueryDisplayAttributes);
CHECK_VTABLE(vaStatus, ctx, GetDisplayAttributes);
......@@ -707,7 +709,6 @@ VAStatus vaEndPicture (
VAStatus vaSyncSurface (
VADisplay dpy,
VAContextID context,
VASurfaceID render_target
)
{
......@@ -716,7 +717,7 @@ VAStatus vaSyncSurface (
ctx = CTX(dpy);
TRACE(vaSyncSurface);
return ctx->vtable.vaSyncSurface( ctx, context, render_target );
return ctx->vtable.vaSyncSurface( ctx, render_target );
}
VAStatus vaQuerySurfaceStatus (
......@@ -866,30 +867,6 @@ VAStatus vaGetImage (
* Image must be in a format supported by the implementation
*/
VAStatus vaPutImage (
VADisplay dpy,
VASurfaceID surface,
VAImageID image,
int src_x,
int src_y,
unsigned int width,
unsigned int height,
int dest_x,
int dest_y
)
{
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
TRACE(vaPutImage);
return ctx->vtable.vaPutImage ( ctx, surface, image, src_x, src_y, width, height, dest_x, dest_y );
}
/*
* Similar to vaPutImage but with additional destination width
* and height arguments to enable scaling
*/
VAStatus vaPutImage2 (
VADisplay dpy,
VASurfaceID surface,
VAImageID image,
......@@ -907,8 +884,8 @@ VAStatus vaPutImage2 (
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
TRACE(vaPutImage2);
return ctx->vtable.vaPutImage2 ( ctx, surface, image, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height );
TRACE(vaPutImage);
return ctx->vtable.vaPutImage ( ctx, surface, image, src_x, src_y, src_width, src_height, dest_x, dest_y, dest_width, dest_height );
}
/*
......@@ -1086,32 +1063,6 @@ VAStatus vaSetSubpictureGlobalAlpha (
associations before the call to vaPutSurface simply overrides the association.
*/
VAStatus vaAssociateSubpicture (
VADisplay dpy,
VASubpictureID subpicture,
VASurfaceID *target_surfaces,
int num_surfaces,
short src_x, /* upper left offset in subpicture */
short src_y,
short dest_x, /* upper left offset in surface */
short dest_y,
unsigned short width,
unsigned short height,
/*
* whether to enable chroma-keying or global-alpha
* see VA_SUBPICTURE_XXX values
*/
unsigned int flags
)
{
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
TRACE(vaAssociateSubpicture);
return ctx->vtable.vaAssociateSubpicture ( ctx, subpicture, target_surfaces, num_surfaces, src_x, src_y, dest_x, dest_y, width, height, flags );
}
VAStatus vaAssociateSubpicture2 (
VADisplay dpy,
VASubpictureID subpicture,
VASurfaceID *target_surfaces,
......@@ -1135,8 +1086,8 @@ VAStatus vaAssociateSubpicture2 (
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
TRACE(vaAssociateSubpicture2);
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 );
TRACE(vaAssociateSubpicture);
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 );
}
/*
......
This diff is collapsed.
......@@ -175,7 +175,6 @@ struct VADriverVTable
VAStatus (*vaSyncSurface) (
VADriverContextP ctx,
VAContextID context,
VASurfaceID render_target
);
......@@ -249,18 +248,6 @@ struct VADriverVTable
);
VAStatus (*vaPutImage) (
VADriverContextP ctx,
VASurfaceID surface,
VAImageID image,
int src_x,
int src_y,
unsigned int width,
unsigned int height,
int dest_x,
int dest_y
);
VAStatus (*vaPutImage2) (
VADriverContextP ctx,
VASurfaceID surface,
VAImageID image,
......@@ -313,24 +300,6 @@ struct VADriverVTable
);
VAStatus (*vaAssociateSubpicture) (
VADriverContextP ctx,
VASubpictureID subpicture,
VASurfaceID *target_surfaces,
int num_surfaces,
short src_x, /* upper left offset in subpicture */
short src_y,
short dest_x, /* upper left offset in surface */
short dest_y,
unsigned short width,
unsigned short height,
/*
* whether to enable chroma-keying or global-alpha
* see VA_SUBPICTURE_XXX values
*/
unsigned int flags
);
VAStatus (*vaAssociateSubpicture2) (
VADriverContextP ctx,
VASubpictureID subpicture,
VASurfaceID *target_surfaces,
......
......@@ -205,27 +205,6 @@ static VAStatus va_DisplayContextGetDriverName (
return vaStatus;
}
int vaDisplayIsValid(VADisplay dpy)
{
VADisplayContextP tmp=NULL;
VADisplayContextP pDisplayContext = pDisplayContexts;
while (pDisplayContext)
{
if (pDisplayContext == (VADisplayContextP)dpy)
{
tmp = (VADisplay)pDisplayContext;
break;
}
pDisplayContext = pDisplayContext->pNext;
}
if (!tmp)
return 0;
return tmp->vaIsValid(pDisplayContext);
}
VADisplay vaGetDisplay (
Display *native_dpy /* implementation specific */
......
......@@ -222,7 +222,7 @@ void test()
va_status = vaEndPicture(va_dpy,vaContext);
ASSERT( VA_STATUS_SUCCESS == va_status );
va_status = vaSyncSurface(va_dpy, vaContext, vaSurface);
va_status = vaSyncSurface(va_dpy, vaSurface);
ASSERT( VA_STATUS_SUCCESS == va_status );
win = XCreateSimpleWindow(dpy, RootWindow(dpy, 0), 0, 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment