mirror of https://github.com/mpv-player/mpv
vf_vavpp: fix deinterlacing
Add filter parameters to VAAPI deinterlacing filter to actually process bottom fields instead of deinterlacing top field twice. Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
parent
4d0aa01637
commit
5c3a6ca96e
|
@ -163,6 +163,14 @@ static struct mp_image *render(struct vf_instance *vf, struct mp_image *in,
|
|||
status = vaMapBuffer(p->display, buffer, (void**)¶m);
|
||||
if (!check_error(vf, status, "vaMapBuffer()"))
|
||||
break;
|
||||
|
||||
VAProcFilterParameterBufferDeinterlacing *filter_params;
|
||||
status = vaMapBuffer(p->display, *(p->pipe.filters), (void**)&filter_params);
|
||||
if (!check_error(vf, status, "vaMapBuffer()"))
|
||||
break;
|
||||
filter_params->flags = flags & VA_TOP_FIELD ? 0 : VA_DEINTERLACING_BOTTOM_FIELD;
|
||||
vaUnmapBuffer(p->display, *(p->pipe.filters));
|
||||
|
||||
param->surface = in_id;
|
||||
param->surface_region = NULL;
|
||||
param->output_region = NULL;
|
||||
|
|
Loading…
Reference in New Issue