frontends/va: Fix deinterlace bottom field first flag

Fixes an issue with mpv, where deinterlacing causes the picture to be
offset by one line every other frame in the video.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5157>
This commit is contained in:
Thong Thai 2020-05-21 19:40:13 -04:00 committed by Marge Bot
parent 569ca93751
commit 78786a219e

View file

@ -321,7 +321,7 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *contex
VAProcFilterParameterBufferDeinterlacing *deint = buf->data;
switch (deint->algorithm) {
case VAProcDeinterlacingBob:
if (deint->flags & VA_DEINTERLACING_BOTTOM_FIELD)
if (deint->flags & VA_DEINTERLACING_BOTTOM_FIELD_FIRST)
deinterlace = VL_COMPOSITOR_BOB_BOTTOM;
else
deinterlace = VL_COMPOSITOR_BOB_TOP;
@ -333,7 +333,7 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *contex
case VAProcDeinterlacingMotionAdaptive:
src = vlVaApplyDeint(drv, context, param, src,
!!(deint->flags & VA_DEINTERLACING_BOTTOM_FIELD));
!!(deint->flags & VA_DEINTERLACING_BOTTOM_FIELD_FIRST));
break;
default: