[vlc-devel] [PATCH] vdpau/deinterlace: implement flushing

Steve Lhomme robux4 at ycbcr.xyz
Wed Oct 14 09:00:15 CEST 2020


On 2020-10-13 17:59, Rémi Denis-Courmont wrote:
> Le tiistaina 13. lokakuuta 2020, 14.51.10 EEST Steve Lhomme a écrit :
>> We should not rely on the old PTS values after a flush.
>> ---
>>   modules/hw/vdpau/deinterlace.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/modules/hw/vdpau/deinterlace.c b/modules/hw/vdpau/deinterlace.c
>> index 2edcbab71db..842110c87aa 100644
>> --- a/modules/hw/vdpau/deinterlace.c
>> +++ b/modules/hw/vdpau/deinterlace.c
>> @@ -96,6 +96,12 @@ static picture_t *Deinterlace(filter_t *filter, picture_t
>> *src) return src;
>>   }
>>
>> +static void Flush(filter_t *filter)
>> +{
>> +    filter_sys_t *sys = filter->p_sys;
>> +    sys->last_pts = VLC_TICK_INVALID;
>> +}
>> +
> 
> This might work, but only if we can assume that the mixer (chroma.c) is also
> flushed at the same time. Otherwise, the picture history won't be reset, and
> this will just reset the PTS.

There is flushing in the chroma filter.

I don't think there is a legitimate case where you would flush one 
filter and not the others in the same pipeline. The order and time it 
happens may differ (async) but it seems logical to filter the whole 
pipeline at once.

>>   static void Close(filter_t *filter)
>>   {
>>       vlc_video_context_Release(filter->vctx_out);
>> @@ -103,6 +109,7 @@ static void Close(filter_t *filter)
>>
>>   static const struct vlc_filter_operations filter_ops = {
>>       .filter_video = Deinterlace, .close = Close,
>> +    .flush = Flush,
>>   };
>>
>>   static int Open(filter_t *filter)
> 
> 
> -- 
> Rémi Denis-Courmont
> http://www.remlab.net/
> 
> 
> 
> _______________________________________________
> 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