summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@intel.com>2009-08-27 17:45:40 +0800
committerAustin Yuan <shengquan.yuan@intel.com>2009-08-27 17:45:40 +0800
commit4aef21d9d99c622b603d0db3e78fef50ba2fb78e (patch)
tree965a36640ba604dcd8d79daa4b5dfb8fa0d463f1
parentcac45b0c190b73d05189457e2838dcd215858306 (diff)
downloadlibva-4aef21d9d99c622b603d0db3e78fef50ba2fb78e.tar.gz
Combine vaPutImage/vaPutImage2, vaAssociateSubpicture/vaAssociateSubpicture2
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
-rw-r--r--dummy_drv_video/dummy_drv_video.c46
-rw-r--r--i965_drv_video/i965_drv_video.c43
-rw-r--r--src/va.c60
-rw-r--r--src/va.h40
-rw-r--r--src/va_backend.h30
5 files changed, 11 insertions, 208 deletions
diff --git a/dummy_drv_video/dummy_drv_video.c b/dummy_drv_video/dummy_drv_video.c
index 1eb51a0..fe4055d 100644
--- a/dummy_drv_video/dummy_drv_video.c
+++ b/dummy_drv_video/dummy_drv_video.c
@@ -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;
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
index 538a628..5a50bf1 100644
--- a/i965_drv_video/i965_drv_video.c
+++ b/i965_drv_video/i965_drv_video.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,
@@ -1226,20 +1209,6 @@ i965_GetImage(VADriverContextP ctx,
}
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,
Drawable draw, /* X Drawable */
@@ -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;
diff --git a/src/va.c b/src/va.c
index b409c7c..bbe1e70 100644
--- a/src/va.c
+++ b/src/va.c
@@ -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);
@@ -871,30 +869,6 @@ VAStatus vaPutImage (
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,
- int src_x,
- int src_y,
unsigned int src_width,
unsigned int src_height,
int dest_x,
@@ -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 );
}
/*
@@ -1092,32 +1066,6 @@ VAStatus vaAssociateSubpicture (
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,
- 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 */
@@ -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 );
}
/*
diff --git a/src/va.h b/src/va.h
index c02ba37..2d5169a 100644
--- a/src/va.h
+++ b/src/va.h
@@ -1420,8 +1420,6 @@ 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,
@@ -1429,22 +1427,6 @@ VAStatus vaPutImage (
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,
- int src_x,
- int src_y,
unsigned int src_width,
unsigned int src_height,
int dest_x,
@@ -1593,28 +1575,6 @@ VAStatus vaAssociateSubpicture (
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,
- 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 */
diff --git a/src/va_backend.h b/src/va_backend.h
index 619dd99..fcf34e2 100644
--- a/src/va_backend.h
+++ b/src/va_backend.h
@@ -254,18 +254,6 @@ struct VADriverVTable
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,
- int src_x,
- int src_y,
unsigned int src_width,
unsigned int src_height,
int dest_x,
@@ -319,24 +307,6 @@ struct VADriverVTable
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,
- 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 */