Commit c21aaad5 authored by Austin Yuan's avatar Austin Yuan

Rename vaDbgCopySurfaceToBuffer ->vaCopySurfaceToBuffer,...

Rename vaDbgCopySurfaceToBuffer ->vaCopySurfaceToBuffer, vaDbgCreateSurfaceFromMrstVL42Buffer->vaCreateSurfaceFromMrstVL42Buffer
Signed-off-by: default avatarAustin Yuan <shengquan.yuan@intel.com>
parent 52764382
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
...@@ -223,7 +223,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) ...@@ -223,7 +223,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
CHECK_VTABLE(vaStatus, ctx, QueryDisplayAttributes); CHECK_VTABLE(vaStatus, ctx, QueryDisplayAttributes);
CHECK_VTABLE(vaStatus, ctx, GetDisplayAttributes); CHECK_VTABLE(vaStatus, ctx, GetDisplayAttributes);
CHECK_VTABLE(vaStatus, ctx, SetDisplayAttributes); CHECK_VTABLE(vaStatus, ctx, SetDisplayAttributes);
CHECK_VTABLE(vaStatus, ctx, DbgCopySurfaceToBuffer);
} }
if (VA_STATUS_SUCCESS != vaStatus) if (VA_STATUS_SUCCESS != vaStatus)
{ {
...@@ -537,20 +536,6 @@ VAStatus vaCreateSurfaces ( ...@@ -537,20 +536,6 @@ VAStatus vaCreateSurfaces (
} }
VAStatus vaCreateSurfaceFromCIFrame (
VADisplay dpy,
unsigned long frame_id,
VASurfaceID *surface /* out */
)
{
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
TRACE(vaCreateSurfacesFromCIFrame);
return ctx->vtable.vaCreateSurfaceFromCIFrame( ctx, frame_id, surface );
}
VAStatus vaDestroySurfaces ( VAStatus vaDestroySurfaces (
VADisplay dpy, VADisplay dpy,
VASurfaceID *surface_list, VASurfaceID *surface_list,
...@@ -1238,23 +1223,26 @@ VAStatus vaSetDisplayAttributes ( ...@@ -1238,23 +1223,26 @@ VAStatus vaSetDisplayAttributes (
} }
#warning TODO: Remove vaDbgCopySurfaceToBuffer in rev 0.29 VAStatus vaCreateSurfaceFromCIFrame (
VAStatus vaDbgCopySurfaceToBuffer(VADisplay dpy, VADisplay dpy,
VASurfaceID surface, unsigned long frame_id,
void **buffer, /* out */ VASurfaceID *surface /* out */
unsigned int *stride /* out */
) )
{ {
VADriverContextP ctx; VADriverContextP ctx;
CHECK_DISPLAY(dpy); CHECK_DISPLAY(dpy);
ctx = CTX(dpy); ctx = CTX(dpy);
TRACE(vaDbgCopySurfaceToBuffer); TRACE(vaCreateSurfacesFromCIFrame);
return ctx->vtable.vaDbgCopySurfaceToBuffer( ctx, surface, buffer, stride );
if (ctx->vtable.vaCreateSurfaceFromCIFrame)
return ctx->vtable.vaCreateSurfaceFromCIFrame( ctx, frame_id, surface );
else
return VA_STATUS_ERROR_UNKNOWN;
} }
#warning TODO: Remove vaDbgCreateSurfaceFromMrstV4L2Buf in rev 0.29
VAStatus vaDbgCreateSurfaceFromMrstV4L2Buf( VAStatus vaCreateSurfaceFromMrstV4L2Buf(
VADisplay dpy, VADisplay dpy,
unsigned int width, unsigned int width,
unsigned int height, unsigned int height,
...@@ -1273,7 +1261,34 @@ VAStatus vaDbgCreateSurfaceFromMrstV4L2Buf( ...@@ -1273,7 +1261,34 @@ VAStatus vaDbgCreateSurfaceFromMrstV4L2Buf(
CHECK_DISPLAY(dpy); CHECK_DISPLAY(dpy);
ctx = CTX(dpy); ctx = CTX(dpy);
TRACE(vtable.vaDbgCreateSurfaceFromMrstV4L2Buf); TRACE(vtable.vaCreateSurfaceFromMrstV4L2Buf);
return ctx->vtable.vaDbgCreateSurfaceFromMrstV4L2Buf( ctx, width, height, size, fourcc, luma_stride, chroma_u_stride, chroma_v_stride, luma_offset, chroma_u_offset, chroma_v_offset, surface );
if (ctx->vtable.vaCreateSurfaceFromMrstV4L2Buf)
return ctx->vtable.vaCreateSurfaceFromMrstV4L2Buf( ctx, width, height, size, fourcc, luma_stride, chroma_u_stride, chroma_v_stride, luma_offset, chroma_u_offset, chroma_v_offset, surface );
else
return VA_STATUS_ERROR_UNKNOWN;
} }
VAStatus vaCopySurfaceToBuffer(VADisplay dpy,
VASurfaceID surface,
unsigned int *fourcc, /* following are output argument */
unsigned int *luma_stride,
unsigned int *chroma_u_stride,
unsigned int *chroma_v_stride,
unsigned int *luma_offset,
unsigned int *chroma_u_offset,
unsigned int *chroma_v_offset,
void **buffer
)
{
VADriverContextP ctx;
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
TRACE(vaCopySurfaceToBuffer);
if (ctx->vtable.vaCopySurfaceToBuffer)
return ctx->vtable.vaCopySurfaceToBuffer( ctx, surface, fourcc, luma_stride, chroma_u_stride, chroma_v_stride, luma_offset, chroma_u_offset, chroma_v_offset, buffer);
else
return VA_STATUS_ERROR_UNKNOWN;
}
...@@ -100,12 +100,6 @@ struct VADriverVTable ...@@ -100,12 +100,6 @@ struct VADriverVTable
VASurfaceID *surfaces /* out */ VASurfaceID *surfaces /* out */
); );
VAStatus (*vaCreateSurfaceFromCIFrame) (
VADriverContextP ctx,
unsigned long frame_id,
VASurfaceID *surface /* out */
);
VAStatus (*vaDestroySurfaces) ( VAStatus (*vaDestroySurfaces) (
VADriverContextP ctx, VADriverContextP ctx,
VASurfaceID *surface_list, VASurfaceID *surface_list,
...@@ -380,14 +374,15 @@ struct VADriverVTable ...@@ -380,14 +374,15 @@ struct VADriverVTable
int num_attributes int num_attributes
); );
/* device specific */
VAStatus (*vaDbgCopySurfaceToBuffer) ( VAStatus (*vaCreateSurfaceFromCIFrame) (
VADriverContextP ctx, VADriverContextP ctx,
VASurfaceID surface, unsigned long frame_id,
void **buffer, /* out */ VASurfaceID *surface /* out */
unsigned int *stride /* out */
); );
VAStatus (*vaDbgCreateSurfaceFromMrstV4L2Buf) (
VAStatus (*vaCreateSurfaceFromMrstV4L2Buf) (
VADriverContextP ctx, VADriverContextP ctx,
unsigned int width, unsigned int width,
unsigned int height, unsigned int height,
...@@ -401,6 +396,19 @@ struct VADriverVTable ...@@ -401,6 +396,19 @@ struct VADriverVTable
unsigned int chroma_v_offset, unsigned int chroma_v_offset,
VASurfaceID *surface /* out */ VASurfaceID *surface /* out */
); );
VAStatus (*vaCopySurfaceToBuffer) (
VADriverContextP ctx,
VASurfaceID surface,
unsigned int *fourcc, /* out for follow argument */
unsigned int *luma_stride,
unsigned int *chroma_u_stride,
unsigned int *chroma_v_stride,
unsigned int *luma_offset,
unsigned int *chroma_u_offset,
unsigned int *chroma_v_offset,
void **buffer
);
}; };
struct VADriverContext struct VADriverContext
......
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