image: Use object image structure directly instead of abstract type

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
This commit is contained in:
Paul Kocialkowski
2018-04-23 10:11:36 +02:00
parent 97950176ad
commit 0bd492f0d3
2 changed files with 3 additions and 5 deletions
+2 -2
View File
@@ -52,7 +52,7 @@ VAStatus sunxi_cedrus_CreateImage(VADriverContextP ctx, VAImageFormat *format,
{ {
INIT_DRIVER_DATA INIT_DRIVER_DATA
int sizeY, sizeUV; int sizeY, sizeUV;
object_image_p obj_img; struct object_image *obj_img;
memset(image, 0, sizeof(VAImage)); memset(image, 0, sizeof(VAImage));
@@ -120,7 +120,7 @@ VAStatus sunxi_cedrus_DeriveImage(VADriverContextP ctx, VASurfaceID surface,
VAStatus sunxi_cedrus_DestroyImage(VADriverContextP ctx, VAImageID image) VAStatus sunxi_cedrus_DestroyImage(VADriverContextP ctx, VAImageID image)
{ {
INIT_DRIVER_DATA INIT_DRIVER_DATA
object_image_p obj_img; struct object_image *obj_img;
obj_img = IMAGE(image); obj_img = IMAGE(image);
assert(obj_img); assert(obj_img);
+1 -3
View File
@@ -30,7 +30,7 @@
#include "object_heap.h" #include "object_heap.h"
#define IMAGE(id) ((object_image_p) object_heap_lookup(&driver_data->image_heap, id)) #define IMAGE(id) ((struct object_image *) object_heap_lookup(&driver_data->image_heap, id))
#define IMAGE_ID_OFFSET 0x10000000 #define IMAGE_ID_OFFSET 0x10000000
struct object_image { struct object_image {
@@ -38,8 +38,6 @@ struct object_image {
VABufferID buf; VABufferID buf;
}; };
typedef struct object_image *object_image_p;
VAStatus sunxi_cedrus_QueryImageFormats(VADriverContextP ctx, VAStatus sunxi_cedrus_QueryImageFormats(VADriverContextP ctx,
VAImageFormat *format_list, int *num_formats); VAImageFormat *format_list, int *num_formats);