mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
st/va: move YUV content to deinterlaced buffer when reallocated for encoder
v2: use deinterlace common function v3: make sure deinterlace only Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
parent
cadeb73f6b
commit
15d4d44d9b
1 changed files with 10 additions and 1 deletions
|
|
@ -660,13 +660,22 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id)
|
|||
}
|
||||
|
||||
if (realloc) {
|
||||
surf->buffer->destroy(surf->buffer);
|
||||
struct pipe_video_buffer *old_buf = surf->buffer;
|
||||
|
||||
if (vlVaHandleSurfaceAllocate(ctx, surf, &surf->templat) != VA_STATUS_SUCCESS) {
|
||||
mtx_unlock(&drv->mutex);
|
||||
return VA_STATUS_ERROR_ALLOCATION_FAILED;
|
||||
}
|
||||
|
||||
if (context->decoder->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) {
|
||||
if (old_buf->interlaced)
|
||||
vl_compositor_yuv_deint(&drv->cstate, &drv->compositor, old_buf, surf->buffer);
|
||||
else
|
||||
/* Can't convert from progressive to interlaced yet */
|
||||
return VA_STATUS_ERROR_INVALID_SURFACE;
|
||||
}
|
||||
|
||||
old_buf->destroy(old_buf);
|
||||
context->target = surf->buffer;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue