st/va: add dst rect to avoid scale on deint

For 1080p video transcode, the height will be scaled to 1088 when deint
to progressive buffer. Set dst rect to make sure no scale.

Fixes: 3ad8687 "st/va: use new vl_compositor_yuv_deint_full() to deint"

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Andy Furniss <adf.lists@gmail.com>
This commit is contained in:
Leo Liu 2017-09-28 21:41:29 -04:00
parent d190bfc1ad
commit 361d8f82c0
1 changed files with 6 additions and 6 deletions

View File

@ -669,15 +669,15 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id)
if (context->decoder->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) {
if (old_buf->interlaced) {
struct u_rect src_rect;
struct u_rect src_rect, dst_rect;
src_rect.x0 = 0;
src_rect.y0 = 0;
src_rect.x1 = surf->templat.width;
src_rect.y1 = surf->templat.height;
dst_rect.x0 = src_rect.x0 = 0;
dst_rect.y0 = src_rect.y0 = 0;
dst_rect.x1 = src_rect.x1 = surf->templat.width;
dst_rect.y1 = src_rect.y1 = surf->templat.height;
vl_compositor_yuv_deint_full(&drv->cstate, &drv->compositor,
old_buf, surf->buffer,
&src_rect, NULL, VL_COMPOSITOR_WEAVE);
&src_rect, &dst_rect, VL_COMPOSITOR_WEAVE);
} else
/* Can't convert from progressive to interlaced yet */
return VA_STATUS_ERROR_INVALID_SURFACE;