mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-20 11:00:24 +01:00
st/va: Fix forward/backward referencing for deinterlacing
The VAAPI documentation is not very clear here, but the intent appears to be that a forward reference is forward from a frame in the past, not forward to a frame in the future (that is, forward as in forward prediction, not as in a forward reference in source code). This interpretation is derived from other implementations, in particular the i965 driver and the gstreamer client. In order to match those other implementations, this patch swaps the meaning of forward and backward references as they currently appear for motion-adaptive deinterlacing. Signed-off-by: Mark Thompson <sw@jkqxz.net> Reviewed-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
parent
c93a157078
commit
0798fddb50
2 changed files with 7 additions and 7 deletions
|
|
@ -184,13 +184,13 @@ vlVaApplyDeint(vlVaDriver *drv, vlVaContext *context,
|
|||
{
|
||||
vlVaSurface *prevprev, *prev, *next;
|
||||
|
||||
if (param->num_forward_references < 1 ||
|
||||
param->num_backward_references < 2)
|
||||
if (param->num_forward_references < 2 ||
|
||||
param->num_backward_references < 1)
|
||||
return current;
|
||||
|
||||
prevprev = handle_table_get(drv->htab, param->backward_references[1]);
|
||||
prev = handle_table_get(drv->htab, param->backward_references[0]);
|
||||
next = handle_table_get(drv->htab, param->forward_references[0]);
|
||||
prevprev = handle_table_get(drv->htab, param->forward_references[1]);
|
||||
prev = handle_table_get(drv->htab, param->forward_references[0]);
|
||||
next = handle_table_get(drv->htab, param->backward_references[0]);
|
||||
|
||||
if (!prevprev || !prev || !next)
|
||||
return current;
|
||||
|
|
|
|||
|
|
@ -845,8 +845,8 @@ vlVaQueryVideoProcPipelineCaps(VADriverContextP ctx, VAContextID context,
|
|||
case VAProcFilterDeinterlacing: {
|
||||
VAProcFilterParameterBufferDeinterlacing *deint = buf->data;
|
||||
if (deint->algorithm == VAProcDeinterlacingMotionAdaptive) {
|
||||
pipeline_cap->num_forward_references = 1;
|
||||
pipeline_cap->num_backward_references = 2;
|
||||
pipeline_cap->num_forward_references = 2;
|
||||
pipeline_cap->num_backward_references = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue