Use all-caps macros instead of object_heap_lookup (for now)

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
This commit is contained in:
Paul Kocialkowski
2018-04-25 11:03:58 +02:00
parent d809ff25e2
commit 294a6c958a
2 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -168,7 +168,7 @@ VAStatus SunxiCedrusDestroyContext(VADriverContextP context,
struct object_context *context_object; struct object_context *context_object;
int rc; int rc;
context_object = (struct object_context *) object_heap_lookup(&driver_data->context_heap, context_id); context_object = CONTEXT(context_id);
if (context_object == NULL) if (context_object == NULL)
return VA_STATUS_ERROR_INVALID_CONTEXT; return VA_STATUS_ERROR_INVALID_CONTEXT;
+3 -5
View File
@@ -68,14 +68,12 @@ VAStatus SunxiCedrusCreateSurfaces(VADriverContextP context, int width,
for (i = 0; i < surfaces_count; i++) { for (i = 0; i < surfaces_count; i++) {
id = object_heap_allocate(&driver_data->surface_heap); id = object_heap_allocate(&driver_data->surface_heap);
surface_object = (struct object_surface *) object_heap_lookup(&driver_data->surface_heap, id); surface_object = SURFACE(id);
if (surface_object == NULL) if (surface_object == NULL)
return VA_STATUS_ERROR_ALLOCATION_FAILED; return VA_STATUS_ERROR_ALLOCATION_FAILED;
memset(surface_object, 0, sizeof(*surface_object)); memset(surface_object, 0, sizeof(*surface_object));
surfaces_ids[i] = id;
rc = v4l2_request_buffer(driver_data->video_fd, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, i, length, offset); rc = v4l2_request_buffer(driver_data->video_fd, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, i, length, offset);
if (rc < 0) if (rc < 0)
return VA_STATUS_ERROR_ALLOCATION_FAILED; return VA_STATUS_ERROR_ALLOCATION_FAILED;
@@ -115,7 +113,7 @@ VAStatus SunxiCedrusDestroySurfaces(VADriverContextP context,
unsigned int i, j; unsigned int i, j;
for (i = 0; i < surfaces_count; i++) { for (i = 0; i < surfaces_count; i++) {
surface_object = (struct object_surface *) object_heap_lookup(&driver_data->surface_heap, surfaces_ids[i]); surface_object = SURFACE(surfaces_ids[i]);
if (surface_object == NULL) if (surface_object == NULL)
return VA_STATUS_ERROR_INVALID_SURFACE; return VA_STATUS_ERROR_INVALID_SURFACE;
@@ -184,7 +182,7 @@ VAStatus SunxiCedrusQuerySurfaceStatus(VADriverContextP context,
(struct sunxi_cedrus_driver_data *) context->pDriverData; (struct sunxi_cedrus_driver_data *) context->pDriverData;
struct object_surface *surface_object; struct object_surface *surface_object;
surface_object = (struct object_surface *) object_heap_lookup(&driver_data->surface_heap, surface_id); surface_object = SURFACE(surface_id);
if (surface_object == NULL) if (surface_object == NULL)
return VA_STATUS_ERROR_INVALID_SURFACE; return VA_STATUS_ERROR_INVALID_SURFACE;