[vlc-devel] [PATCH] hw: vaapi: double framerate for Bob and X deint modes
Oliver Collyer
ovcollyer at mac.com
Thu Jul 6 12:29:37 CEST 2017
> 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.
>
Understood. I won't rewrite now though, maybe if I have time later...
>> +#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.
>
Ok, yes I can see that Common uses the received pic for the field duration calculation, so I will adjust that.
Otherwise it seems the same, i.e. the METADATA_SIZE is fixed.
Here is the code to slide the meta data in Common:
/* Slide the metadata history. */
for( int i = 1; i < METADATA_SIZE; i++ )
p_context->meta[i-1] = p_context->meta[i];
/* The last element corresponds to the current input frame. */
p_context->meta[METADATA_SIZE-1].pi_date = p_pic->date;
p_context->meta[METADATA_SIZE-1].pi_nb_fields = p_pic->i_nb_fields;
p_context->meta[METADATA_SIZE-1].pb_top_field_first = p_pic->b_top_field_first;
>> + 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)
>
> Idem.
>
Thankyou, I will fix that. I didn't get that warning.
Oliver
>
> Besides that, it LGTM.
>
> Regards,
> Victorien Le Couviour--Tuffet.
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list