if (realloc) {
struct pipe_video_buffer *old_buf = surf->buffer;
- if (vlVaHandleSurfaceAllocate(ctx, surf, &surf->templat) != VA_STATUS_SUCCESS) {
+ if (vlVaHandleSurfaceAllocate(drv, surf, &surf->templat) != VA_STATUS_SUCCESS) {
mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_ALLOCATION_FAILED;
}
}
VAStatus
-vlVaHandleSurfaceAllocate(VADriverContextP ctx, vlVaSurface *surface,
+vlVaHandleSurfaceAllocate(vlVaDriver *drv, vlVaSurface *surface,
struct pipe_video_buffer *templat)
{
- vlVaDriver *drv;
struct pipe_surface **surfaces;
unsigned i;
- drv = VL_VA_DRIVER(ctx);
-
surface->buffer = drv->pipe->create_video_buffer(drv->pipe, templat);
if (!surface->buffer)
return VA_STATUS_ERROR_ALLOCATION_FAILED;
!(memory_attibute->flags & VA_SURFACE_EXTBUF_DESC_ENABLE_TILING))
templat.bind = PIPE_BIND_LINEAR | PIPE_BIND_SHARED;
- vaStatus = vlVaHandleSurfaceAllocate(ctx, surf, &templat);
+ vaStatus = vlVaHandleSurfaceAllocate(drv, surf, &templat);
if (vaStatus != VA_STATUS_SUCCESS)
goto free_surf;
break;
// internal functions
VAStatus vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
-VAStatus vlVaHandleSurfaceAllocate(VADriverContextP ctx, vlVaSurface *surface, struct pipe_video_buffer *templat);
+VAStatus vlVaHandleSurfaceAllocate(vlVaDriver *drv, vlVaSurface *surface, struct pipe_video_buffer *templat);
void vlVaGetReferenceFrame(vlVaDriver *drv, VASurfaceID surface_id, struct pipe_video_buffer **ref_frame);
void vlVaHandlePictureParameterBufferMPEG12(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
void vlVaHandleIQMatrixBufferMPEG12(vlVaContext *context, vlVaBuffer *buf);