diff options
author | Thong Thai <[email protected]> | 2020-02-28 10:56:49 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-03 15:17:26 +0000 |
commit | 3f31c54842d4d2e1e78dad6cab57e45cb616b344 (patch) | |
tree | 477ba561238c46ae929f53167fcd3c680819d794 /src/gallium | |
parent | 2d32248f49ebc25d76eb32d6f7a41bb0fd2c489a (diff) |
st/va/postproc: reallocate interlaced destination buffer
When the source buffer is progressive source, re-allocate the
destination buffer as progressive if it isn't already - otherwise
transcoding will fail.
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1418
Signed-off-by: Thong Thai <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4001>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4001>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/va/postproc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/va/postproc.c b/src/gallium/state_trackers/va/postproc.c index 83293c8343f..18458832844 100644 --- a/src/gallium/state_trackers/va/postproc.c +++ b/src/gallium/state_trackers/va/postproc.c @@ -130,9 +130,6 @@ static VAStatus vlVaPostProcBlit(vlVaDriver *drv, vlVaContext *context, !src->interlaced) grab = true; - if (src->interlaced != dst->interlaced && dst->interlaced && !grab) - return VA_STATUS_ERROR_INVALID_SURFACE; - if ((src->width != dst->width || src->height != dst->height) && (src->interlaced && dst->interlaced)) scale = true; @@ -141,7 +138,7 @@ static VAStatus vlVaPostProcBlit(vlVaDriver *drv, vlVaContext *context, if (!src_surfaces || !src_surfaces[0]) return VA_STATUS_ERROR_INVALID_SURFACE; - if (scale || (grab && dst->interlaced)) { + if (scale || (src->interlaced != dst->interlaced && dst->interlaced)) { vlVaSurface *surf; surf = handle_table_get(drv->htab, context->target_id); |