* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "va_backend.h"
+#include <va/va_backend.h>
#include "dummy_drv_video.h"
#include "assert.h"
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
return VA_STATUS_SUCCESS;
}
+VAStatus dummy_DeriveImage(
+ VADriverContextP ctx,
+ VASurfaceID surface,
+ VAImage *image /* out */
+)
+{
+ INIT_DRIVER_DATA
+
+ /* TODO */
+ return VA_STATUS_SUCCESS;
+}
+
VAStatus dummy_DestroyImage(
VADriverContextP ctx,
VAImageID image
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,
+ unsigned int src_width,
+ unsigned int src_height,
int dest_x,
- int dest_y
+ int dest_y,
+ unsigned int dest_width,
+ unsigned int dest_height
)
{
INIT_DRIVER_DATA
return VA_STATUS_SUCCESS;
}
+
VAStatus dummy_AssociateSubpicture(
VADriverContextP ctx,
VASubpictureID subpicture,
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 width,
- unsigned short height,
+ unsigned short dest_width,
+ unsigned short dest_height,
/*
* whether to enable chroma-keying or global-alpha
* see VA_SUBPICTURE_XXX values
obj_context->picture_height = picture_height;
obj_context->num_render_targets = num_render_targets;
obj_context->render_targets = (VASurfaceID *) malloc(num_render_targets * sizeof(VASurfaceID));
+ if (obj_context->render_targets == NULL)
+ {
+ vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
+ return vaStatus;
+ }
+
for(i = 0; i < num_render_targets; i++)
{
if (NULL == SURFACE(render_targets[i]))
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;
}
}
-VAStatus dummy_DbgCopySurfaceToBuffer(
+VAStatus dummy_CopySurfaceToBuffer(
VADriverContextP ctx,
VASurfaceID surface,
- void **buffer, /* out */
- unsigned int *stride /* out */
+ 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
)
{
/* TODO */
return VA_STATUS_SUCCESS;
}
-VAStatus __vaDriverInit_0_26( VADriverContextP ctx )
+VAStatus __vaDriverInit_0_31( VADriverContextP ctx )
{
object_base_p obj;
int result;
struct dummy_driver_data *driver_data;
int i;
- ctx->version_major = 0;
- ctx->version_minor = 26;
+ ctx->version_major = VA_MAJOR_VERSION;
+ ctx->version_minor = VA_MINOR_VERSION;
ctx->max_profiles = DUMMY_MAX_PROFILES;
ctx->max_entrypoints = DUMMY_MAX_ENTRYPOINTS;
ctx->max_attributes = DUMMY_MAX_CONFIG_ATTRIBUTES;
ctx->vtable.vaPutSurface = dummy_PutSurface;
ctx->vtable.vaQueryImageFormats = dummy_QueryImageFormats;
ctx->vtable.vaCreateImage = dummy_CreateImage;
+ ctx->vtable.vaDeriveImage = dummy_DeriveImage;
ctx->vtable.vaDestroyImage = dummy_DestroyImage;
ctx->vtable.vaSetImagePalette = dummy_SetImagePalette;
ctx->vtable.vaGetImage = dummy_GetImage;
ctx->vtable.vaCreateSubpicture = dummy_CreateSubpicture;
ctx->vtable.vaDestroySubpicture = dummy_DestroySubpicture;
ctx->vtable.vaSetSubpictureImage = dummy_SetSubpictureImage;
- ctx->vtable.vaSetSubpicturePalette = dummy_SetSubpicturePalette;
ctx->vtable.vaSetSubpictureChromakey = dummy_SetSubpictureChromakey;
ctx->vtable.vaSetSubpictureGlobalAlpha = dummy_SetSubpictureGlobalAlpha;
ctx->vtable.vaAssociateSubpicture = dummy_AssociateSubpicture;
ctx->vtable.vaGetDisplayAttributes = dummy_GetDisplayAttributes;
ctx->vtable.vaSetDisplayAttributes = dummy_SetDisplayAttributes;
- ctx->vtable.vaDbgCopySurfaceToBuffer = dummy_DbgCopySurfaceToBuffer;
+ ctx->vtable.vaCopySurfaceToBuffer = dummy_CopySurfaceToBuffer;
driver_data = (struct dummy_driver_data *) malloc( sizeof(*driver_data) );
ctx->pDriverData = (void *) driver_data;