Commit 4aef21d9 authored by Austin Yuan's avatar Austin Yuan

Combine vaPutImage/vaPutImage2, vaAssociateSubpicture/vaAssociateSubpicture2

Signed-off-by: default avatarAustin Yuan <shengquan.yuan@intel.com>
parent cac45b0c
......@@ -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,
......@@ -1258,7 +1218,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 +1225,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;
......
......@@ -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,
......@@ -1225,20 +1208,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 +1363,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 +1371,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;
......
......@@ -217,7 +217,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 +224,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);
......@@ -866,30 +864,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 +881,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 +1060,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 +1083,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 );
}
/*
......
......@@ -1420,26 +1420,8 @@ VAStatus vaGetImage (
* Image must be in a format supported by the implementation
* Returns a VA_STATUS_ERROR_SURFACE_BUSY if the surface
* shouldn't be rendered into when this is called
* The source and destionation width and height are the same and
* no scaling is performed with this operation.
*/
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
);
/*
* Similar to vaPutImage but with additional destination width
* and height arguments to enable scaling
*/
VAStatus vaPutImage2 (
VADisplay dpy,
VASurfaceID surface,
VAImageID image,
......@@ -1587,28 +1569,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
);
/*
* Similar to vaAssociateSubpicture but with additional destination width
* and height to enable scaling
*/
VAStatus vaAssociateSubpicture2 (
VADisplay dpy,
VASubpictureID subpicture,
VASurfaceID *target_surfaces,
......
......@@ -249,18 +249,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 +301,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,
......
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