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

Oliver Collyer ovcollyer at mac.com
Thu Jul 6 18:29:56 CEST 2017


> On 6 Jul 2017, at 19:17, Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com> wrote:
> 
> On Thu, Jul 06, 2017 at 05:48:32PM +0300, Oliver Collyer wrote:
> 
> In order to avoid useless computation you could store the return of
> Deinterlace_UpdateHistory in a tmp variable and move up this block:
> 
>> +    src = Deinterlace_UpdateHistory(p_deint_data, src);
>> +    if (p_deint_data->history.num_pics < p_deint_data->history.sz)
>> +        return NULL;
> 
> between this one:
> 
>> +    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;
> 
> and this one:
> 
>> +    mtime_t i_field_dur = 0;
>> +    unsigned int i = 0;
>> +    for ( ; i < METADATA_SIZE-1; i ++)
>> +        if (p_deint_data->meta[i].date > VLC_TS_INVALID)
>> +            break;
>> +    if (i < METADATA_SIZE-1) {
>> +        unsigned int i_fields_total = 0;
>> +        for (unsigned int j = i; j < METADATA_SIZE-1; ++j)
>> +            i_fields_total += p_deint_data->meta[j].i_nb_fields;
>> +        i_field_dur = (src->date - p_deint_data->meta[i].date) / i_fields_total;
>> +    }
>> +    else if (fmt->i_frame_rate_base)
>> +        i_field_dur = CLOCK_FREQ * fmt->i_frame_rate_base / fmt->i_frame_rate;
> 

Ok, will do.


> Also, I've added a flush callback in which you have to flush your metadata in
> order to avoid frame drops / displayed late.
> 

So how do I proceed - do I wait for your flush commit to reach the main repo, and then re-do my patch, or do you want to simply adopt my patch and make it a set?

I'm happy with either approach.

Oliver

> 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