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:
Filip Milivojevic 2015-03-08 19:58:58 +01:00 committed by wm4
parent 4d0aa01637
commit 5c3a6ca96e
1 changed files with 8 additions and 0 deletions

View File

@ -163,6 +163,14 @@ static struct mp_image *render(struct vf_instance *vf, struct mp_image *in,
status = vaMapBuffer(p->display, buffer, (void**)&param);
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;