#include "va_private.h"
static const VARectangle *
-vlVaRegionDefault(const VARectangle *region, struct pipe_video_buffer *buf,
+vlVaRegionDefault(const VARectangle *region, vlVaSurface *surf,
VARectangle *def)
{
if (region)
def->x = 0;
def->y = 0;
- def->width = buf->width;
- def->height = buf->height;
+ def->width = surf->templat.width;
+ def->height = surf->templat.height;
return def;
}
const VARectangle *src_region, *dst_region;
VAProcPipelineParameterBuffer *param;
struct pipe_video_buffer *src;
- vlVaSurface *src_surface;
+ vlVaSurface *src_surface, *dst_surface;
unsigned i;
if (!drv || !context)
param = buf->data;
src_surface = handle_table_get(drv->htab, param->surface);
+ dst_surface = handle_table_get(drv->htab, context->target_id);
+
if (!src_surface || !src_surface->buffer)
return VA_STATUS_ERROR_INVALID_SURFACE;
}
}
- src_region = vlVaRegionDefault(param->surface_region, src_surface->buffer, &def_src_region);
- dst_region = vlVaRegionDefault(param->output_region, context->target, &def_dst_region);
+ src_region = vlVaRegionDefault(param->surface_region, src_surface, &def_src_region);
+ dst_region = vlVaRegionDefault(param->output_region, dst_surface, &def_dst_region);
if (context->target->buffer_format != PIPE_FORMAT_NV12 &&
context->target->buffer_format != PIPE_FORMAT_P016)