[vlc-devel] [PATCH] Fixed incorrect backward/forward reference ordering in vaapi deinterlacing

Thomas Guillem thomas at gllm.fr
Tue Jun 27 22:26:16 CEST 2017



On Tue, Jun 27, 2017, at 21:21, Oliver Collyer wrote:
> 
> > On 27 Jun 2017, at 16:25, Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com> wrote:
> > 
> > On Tue, Jun 27, 2017 at 03:58:48PM +0300, Oliver Collyer wrote:
> >> After testing the Motion Adaptive deinterlacing mode and finding it produced lots of flicker/judder and not much deinterlacing I traced the error back to the below.
> >> 
> >> Although it seems a little counter-intuitive, the "forward_refs" are actually the frames older than the current one, and the "backward_refs" are those later.
> >> 
> >> In addition, the forward_refs (previously the backward_refs) have to be ordered such that [0] is most recent, [1] older, etc; before this patch it was the opposite.
> >> 
> >> Just to be 100% sure, I have also cross-referenced this approach with how FFmpeg does it:
> >> 
> >> https://github.com/FFmpeg/FFmpeg/blob/master/libavfilter/vf_deinterlace_vaapi.c <https://github.com/FFmpeg/FFmpeg/blob/master/libavfilter/vf_deinterlace_vaapi.c>
> >> 
> >> See function deint_vaapi_filter_frame.
> >> 
> > 
> > Oh thanks I would have never guessed that. It is indeed a bit
> > counter-intuitive. And obviously the VA documentation does not tell you that.
> > I was probably not able to see those flicker/judder by myself as on my computer
> > I only have one backward frame. Anyway, thanks again.
> > Also, LGTM.
> > 
> 
> I may have noticed it more clearly because I had hacked in frame doubling
> too.
> 
> Do you have any plans to add support for a frame rate doubling output?
> i.e. some sort of "Output one frame per field" option? Both dxva2 and
> vaapi deinterlacing lack this, and I think it's rather important.
> Watching any sort of interlaced sports content is way smoother.
> 
> I would be happy to add it, it's quite straightforward, but I wasn't too
> sure how the option should be specified. Would each of the interlace
> modes "Bob" and "x" have an extra "Bobx2" and "xx2" counterpart (like the
> way Yadfifx2 works for software deinterlacing), or should it be a
> different option completely?
> 
> Of course, you may already have this in your plans, in which case you may
> ignore me!

Hello,

We don't have that in our plans and we'll be happy to merge it.
You can add "x2" or "bob2" options in the vaapi filters module. You'll
be able to select it via the command line. If we add bob2 or x2 in the
QT GUI, we need to have a working CPU implementation since we can't add
a menu option that is working only for VAAPI. Sadly, we are not able
(yet) to get HW module capabilities in order to fill the QT menu with
adequate options. This won't be done for the 3.0 release (and probably
not for the 4.0 one too).

Regards,
Thomas

> 
> > Regards.
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> 
> _______________________________________________
> 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