mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
frontends/va/postproc: Keep track of deinterlacing method being used
When transcoding a video, the context used by decode/postproc process might be different from that of the encoder, but we encoder needs to know if deinterlacing was used. Fixes:c5088b4972("gallium: Fix VAAPI postproc blit") 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/12251> (cherry picked from commit3cafe333e9)
This commit is contained in:
parent
50c6394450
commit
ae1c19cc9e
2 changed files with 5 additions and 4 deletions
|
|
@ -535,7 +535,7 @@
|
||||||
"description": "frontends/va/postproc: Keep track of deinterlacing method being used",
|
"description": "frontends/va/postproc: Keep track of deinterlacing method being used",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 1,
|
"nomination_type": 1,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": "c5088b497290ba1207085899ec635ef851635267"
|
"because_sha": "c5088b497290ba1207085899ec635ef851635267"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,7 @@ static VAStatus vlVaPostProcBlit(vlVaDriver *drv, vlVaContext *context,
|
||||||
|
|
||||||
if (drv->pipe->screen->get_param(drv->pipe->screen,
|
if (drv->pipe->screen->get_param(drv->pipe->screen,
|
||||||
PIPE_CAP_PREFER_COMPUTE_FOR_MULTIMEDIA))
|
PIPE_CAP_PREFER_COMPUTE_FOR_MULTIMEDIA))
|
||||||
util_compute_blit(drv->pipe, &blit, &context->blit_cs);
|
util_compute_blit(drv->pipe, &blit, &context->blit_cs, !drv->compositor.deinterlace);
|
||||||
else
|
else
|
||||||
drv->pipe->blit(drv->pipe, &blit);
|
drv->pipe->blit(drv->pipe, &blit);
|
||||||
}
|
}
|
||||||
|
|
@ -281,7 +281,7 @@ vlVaApplyDeint(vlVaDriver *drv, vlVaContext *context,
|
||||||
VAStatus
|
VAStatus
|
||||||
vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf)
|
vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf)
|
||||||
{
|
{
|
||||||
enum vl_compositor_deinterlace deinterlace = VL_COMPOSITOR_WEAVE;
|
enum vl_compositor_deinterlace deinterlace = VL_COMPOSITOR_NONE;
|
||||||
VARectangle def_src_region, def_dst_region;
|
VARectangle def_src_region, def_dst_region;
|
||||||
const VARectangle *src_region, *dst_region;
|
const VARectangle *src_region, *dst_region;
|
||||||
VAProcPipelineParameterBuffer *param;
|
VAProcPipelineParameterBuffer *param;
|
||||||
|
|
@ -349,12 +349,13 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *contex
|
||||||
case VAProcDeinterlacingMotionAdaptive:
|
case VAProcDeinterlacingMotionAdaptive:
|
||||||
src = vlVaApplyDeint(drv, context, param, src,
|
src = vlVaApplyDeint(drv, context, param, src,
|
||||||
!!(deint->flags & VA_DEINTERLACING_BOTTOM_FIELD));
|
!!(deint->flags & VA_DEINTERLACING_BOTTOM_FIELD));
|
||||||
|
deinterlace = VL_COMPOSITOR_MOTION_ADAPTIVE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return VA_STATUS_ERROR_UNIMPLEMENTED;
|
return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
drv->compositor.deinterlace = deinterlace;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue