st/va/postproc: use video original size for postprocessing
Otherwise the aligned size will make video scaled Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
parent
3e685ec983
commit
eb51838771
|
@ -35,7 +35,7 @@
|
||||||
#include "va_private.h"
|
#include "va_private.h"
|
||||||
|
|
||||||
static const VARectangle *
|
static const VARectangle *
|
||||||
vlVaRegionDefault(const VARectangle *region, struct pipe_video_buffer *buf,
|
vlVaRegionDefault(const VARectangle *region, vlVaSurface *surf,
|
||||||
VARectangle *def)
|
VARectangle *def)
|
||||||
{
|
{
|
||||||
if (region)
|
if (region)
|
||||||
|
@ -43,8 +43,8 @@ vlVaRegionDefault(const VARectangle *region, struct pipe_video_buffer *buf,
|
||||||
|
|
||||||
def->x = 0;
|
def->x = 0;
|
||||||
def->y = 0;
|
def->y = 0;
|
||||||
def->width = buf->width;
|
def->width = surf->templat.width;
|
||||||
def->height = buf->height;
|
def->height = surf->templat.height;
|
||||||
|
|
||||||
return def;
|
return def;
|
||||||
}
|
}
|
||||||
|
@ -230,7 +230,7 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *contex
|
||||||
const VARectangle *src_region, *dst_region;
|
const VARectangle *src_region, *dst_region;
|
||||||
VAProcPipelineParameterBuffer *param;
|
VAProcPipelineParameterBuffer *param;
|
||||||
struct pipe_video_buffer *src;
|
struct pipe_video_buffer *src;
|
||||||
vlVaSurface *src_surface;
|
vlVaSurface *src_surface, *dst_surface;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
if (!drv || !context)
|
if (!drv || !context)
|
||||||
|
@ -245,6 +245,8 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *contex
|
||||||
param = buf->data;
|
param = buf->data;
|
||||||
|
|
||||||
src_surface = handle_table_get(drv->htab, param->surface);
|
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)
|
if (!src_surface || !src_surface->buffer)
|
||||||
return VA_STATUS_ERROR_INVALID_SURFACE;
|
return VA_STATUS_ERROR_INVALID_SURFACE;
|
||||||
|
|
||||||
|
@ -290,8 +292,8 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *contex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
src_region = vlVaRegionDefault(param->surface_region, src_surface->buffer, &def_src_region);
|
src_region = vlVaRegionDefault(param->surface_region, src_surface, &def_src_region);
|
||||||
dst_region = vlVaRegionDefault(param->output_region, context->target, &def_dst_region);
|
dst_region = vlVaRegionDefault(param->output_region, dst_surface, &def_dst_region);
|
||||||
|
|
||||||
if (context->target->buffer_format != PIPE_FORMAT_NV12 &&
|
if (context->target->buffer_format != PIPE_FORMAT_NV12 &&
|
||||||
context->target->buffer_format != PIPE_FORMAT_P016)
|
context->target->buffer_format != PIPE_FORMAT_P016)
|
||||||
|
|
Loading…
Reference in New Issue