st/va: properly indent buffer.c, config.c, image.c and picture.c

Some lines were using 4 indentation spaces instead of 3.

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Christian K<C3><B6>nig <christian.koenig@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
Julien Isorce 2015-11-06 09:45:11 +00:00
parent 6459e780ae
commit bfc245e9ac
4 changed files with 55 additions and 55 deletions

View file

@ -152,11 +152,11 @@ vlVaUnmapBuffer(VADriverContextP ctx, VABufferID buf_id)
return VA_STATUS_ERROR_INVALID_BUFFER;
if (buf->derived_surface.resource) {
if (!buf->derived_surface.transfer)
return VA_STATUS_ERROR_INVALID_BUFFER;
if (!buf->derived_surface.transfer)
return VA_STATUS_ERROR_INVALID_BUFFER;
pipe_buffer_unmap(drv->pipe, buf->derived_surface.transfer);
buf->derived_surface.transfer = NULL;
pipe_buffer_unmap(drv->pipe, buf->derived_surface.transfer);
buf->derived_surface.transfer = NULL;
}
return VA_STATUS_SUCCESS;
@ -175,10 +175,10 @@ vlVaDestroyBuffer(VADriverContextP ctx, VABufferID buf_id)
return VA_STATUS_ERROR_INVALID_BUFFER;
if (buf->derived_surface.resource) {
if (buf->export_refcount > 0)
return VA_STATUS_ERROR_INVALID_BUFFER;
if (buf->export_refcount > 0)
return VA_STATUS_ERROR_INVALID_BUFFER;
pipe_resource_reference(&buf->derived_surface.resource, NULL);
pipe_resource_reference(&buf->derived_surface.resource, NULL);
}
FREE(buf->data);

View file

@ -71,8 +71,8 @@ vlVaQueryConfigEntrypoints(VADriverContextP ctx, VAProfile profile,
*num_entrypoints = 0;
if (profile == VAProfileNone) {
entrypoint_list[(*num_entrypoints)++] = VAEntrypointVideoProc;
return VA_STATUS_SUCCESS;
entrypoint_list[(*num_entrypoints)++] = VAEntrypointVideoProc;
return VA_STATUS_SUCCESS;
}
p = ProfileToPipe(profile);
@ -104,7 +104,7 @@ vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile profile, VAEntrypoint en
value = VA_RT_FORMAT_YUV420;
break;
case VAConfigAttribRateControl:
value = VA_RC_NONE;
value = VA_RC_NONE;
break;
default:
value = VA_ATTRIB_NOT_SUPPORTED;
@ -127,8 +127,8 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoin
return VA_STATUS_ERROR_INVALID_CONTEXT;
if (profile == VAProfileNone && entrypoint == VAEntrypointVideoProc) {
*config_id = PIPE_VIDEO_PROFILE_UNKNOWN;
return VA_STATUS_SUCCESS;
*config_id = PIPE_VIDEO_PROFILE_UNKNOWN;
return VA_STATUS_SUCCESS;
}
p = ProfileToPipe(profile);
@ -167,7 +167,7 @@ vlVaQueryConfigAttributes(VADriverContextP ctx, VAConfigID config_id, VAProfile
if (config_id == PIPE_VIDEO_PROFILE_UNKNOWN) {
*entrypoint = VAEntrypointVideoProc;
*num_attribs = 0;
*num_attribs = 0;
return VA_STATUS_SUCCESS;
}

View file

@ -447,8 +447,8 @@ vlVaPutImage(VADriverContextP ctx, VASurfaceID surface, VAImageID image,
tmp_buf = drv->pipe->create_video_buffer(drv->pipe, &surf->templat);
if (!tmp_buf) {
surf->templat.buffer_format = old_surf_format;
return VA_STATUS_ERROR_ALLOCATION_FAILED;
surf->templat.buffer_format = old_surf_format;
return VA_STATUS_ERROR_ALLOCATION_FAILED;
}
surf->buffer->destroy(surf->buffer);

View file

@ -65,7 +65,7 @@ vlVaBeginPicture(VADriverContextP ctx, VAContextID context_id, VASurfaceID rende
if ((context->target->buffer_format != PIPE_FORMAT_B8G8R8A8_UNORM &&
context->target->buffer_format != PIPE_FORMAT_R8G8B8A8_UNORM) ||
context->target->interlaced)
return VA_STATUS_ERROR_UNIMPLEMENTED;
return VA_STATUS_ERROR_UNIMPLEMENTED;
return VA_STATUS_SUCCESS;
}
@ -717,60 +717,60 @@ handleVASliceDataBufferType(vlVaContext *context, vlVaBuffer *buf)
static VAStatus
handleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf)
{
struct u_rect src_rect;
struct u_rect dst_rect;
struct u_rect *dirty_area;
vlVaSurface *src_surface;
VAProcPipelineParameterBuffer *pipeline_param;
struct pipe_surface **surfaces;
struct pipe_screen *screen;
struct pipe_surface *psurf;
struct u_rect src_rect;
struct u_rect dst_rect;
struct u_rect *dirty_area;
vlVaSurface *src_surface;
VAProcPipelineParameterBuffer *pipeline_param;
struct pipe_surface **surfaces;
struct pipe_screen *screen;
struct pipe_surface *psurf;
if (!drv || !context)
return VA_STATUS_ERROR_INVALID_CONTEXT;
if (!drv || !context)
return VA_STATUS_ERROR_INVALID_CONTEXT;
if (!buf || !buf->data)
return VA_STATUS_ERROR_INVALID_BUFFER;
if (!buf || !buf->data)
return VA_STATUS_ERROR_INVALID_BUFFER;
if (!context->target)
return VA_STATUS_ERROR_INVALID_SURFACE;
if (!context->target)
return VA_STATUS_ERROR_INVALID_SURFACE;
pipeline_param = (VAProcPipelineParameterBuffer *)buf->data;
pipeline_param = (VAProcPipelineParameterBuffer *)buf->data;
src_surface = handle_table_get(drv->htab, pipeline_param->surface);
if (!src_surface || !src_surface->buffer)
return VA_STATUS_ERROR_INVALID_SURFACE;
src_surface = handle_table_get(drv->htab, pipeline_param->surface);
if (!src_surface || !src_surface->buffer)
return VA_STATUS_ERROR_INVALID_SURFACE;
surfaces = context->target->get_surfaces(context->target);
surfaces = context->target->get_surfaces(context->target);
if (!surfaces || !surfaces[0])
return VA_STATUS_ERROR_INVALID_SURFACE;
if (!surfaces || !surfaces[0])
return VA_STATUS_ERROR_INVALID_SURFACE;
screen = drv->pipe->screen;
screen = drv->pipe->screen;
psurf = surfaces[0];
psurf = surfaces[0];
src_rect.x0 = pipeline_param->surface_region->x;
src_rect.y0 = pipeline_param->surface_region->y;
src_rect.x1 = pipeline_param->surface_region->x + pipeline_param->surface_region->width;
src_rect.y1 = pipeline_param->surface_region->y + pipeline_param->surface_region->height;
src_rect.x0 = pipeline_param->surface_region->x;
src_rect.y0 = pipeline_param->surface_region->y;
src_rect.x1 = pipeline_param->surface_region->x + pipeline_param->surface_region->width;
src_rect.y1 = pipeline_param->surface_region->y + pipeline_param->surface_region->height;
dst_rect.x0 = pipeline_param->output_region->x;
dst_rect.y0 = pipeline_param->output_region->y;
dst_rect.x1 = pipeline_param->output_region->x + pipeline_param->output_region->width;
dst_rect.y1 = pipeline_param->output_region->y + pipeline_param->output_region->height;
dst_rect.x0 = pipeline_param->output_region->x;
dst_rect.y0 = pipeline_param->output_region->y;
dst_rect.x1 = pipeline_param->output_region->x + pipeline_param->output_region->width;
dst_rect.y1 = pipeline_param->output_region->y + pipeline_param->output_region->height;
dirty_area = vl_screen_get_dirty_area(drv->vscreen);
dirty_area = vl_screen_get_dirty_area(drv->vscreen);
vl_compositor_clear_layers(&drv->cstate);
vl_compositor_set_buffer_layer(&drv->cstate, &drv->compositor, 0, src_surface->buffer, &src_rect, NULL, VL_COMPOSITOR_WEAVE);
vl_compositor_set_layer_dst_area(&drv->cstate, 0, &dst_rect);
vl_compositor_render(&drv->cstate, &drv->compositor, psurf, dirty_area, true);
vl_compositor_clear_layers(&drv->cstate);
vl_compositor_set_buffer_layer(&drv->cstate, &drv->compositor, 0, src_surface->buffer, &src_rect, NULL, VL_COMPOSITOR_WEAVE);
vl_compositor_set_layer_dst_area(&drv->cstate, 0, &dst_rect);
vl_compositor_render(&drv->cstate, &drv->compositor, psurf, dirty_area, true);
screen->fence_reference(screen, &src_surface->fence, NULL);
drv->pipe->flush(drv->pipe, &src_surface->fence, 0);
screen->fence_reference(screen, &src_surface->fence, NULL);
drv->pipe->flush(drv->pipe, &src_surface->fence, 0);
return VA_STATUS_SUCCESS;
return VA_STATUS_SUCCESS;
}
VAStatus