[vlc-devel] [PATCH] hw: vaapi: double framerate for Bob and X deint modes

Victorien Le Couviour--Tuffet victorien.lecouviour.tuffet at gmail.com
Thu Jul 6 11:53:09 CEST 2017

Hi, thanks for the patch.

On Thu, Jul 06, 2017 at 09:30:59AM +0300, Oliver Collyer wrote:
> The problem is if we were to use that shared code then logically we'd also want to use the picture history array and the callbacks too, which are part of the same "deinterlace_context" structure and then it becomes a bigger rewrite of this module....which was only recently written in the first place.

The common deinterlace code has been written a bit after this module actually,
this is the only reason why it doesn't use it. So if you 'd like to do a
rewrite, be my guest, I don't mind at all.

> +#define METADATA_SIZE 3
> +    for (unsigned int i = 1; i < METADATA_SIZE; ++i)
> +        p_deint_data->meta[i-1] = p_deint_data->meta[i];
> +    p_deint_data->meta[METADATA_SIZE-1].date        = src->date;
> +    p_deint_data->meta[METADATA_SIZE-1].i_nb_fields = src->i_nb_fields;

AFAIU, the metadata size shall match the size of the history and be filled
using the received pic (not the current pic to deinterlace). I believe this
is what is causing frame drops on my computer when seeking or play/pause.
The common code already does it, so if you decide to do a rewrite I believe it
will just get fixed along the way.

> +    unsigned int i = 0;
> +    picture_t *dest[2] = {NULL, NULL};
> +    for (unsigned int i = 0; i < 2; ++i)

This generates a warning as you have already declared this variable a few
lines before.

> +error:
> +    for (unsigned int i = 0; i < 2; ++i)


Besides that, it LGTM.

Victorien Le Couviour--Tuffet.

More information about the vlc-devel mailing list