[FFmpeg-devel] [PATCH v2] avfilter/vf_bwdif: add x86 SIMD

Thomas Mundt loudmax at yahoo.de
Thu Mar 10 23:47:36 CET 2016

>>> Thomas Mundt wrote:
>> This new patch adds x86 SIMD support up to 12 bit. Please comment.
> Not much use I guess, but on sse2 8 bit content it tests OK = faster +
> md5sum the same as without the patch.
> Are you considering going further with this?
> Being sharper than yadif/preserving weave is nice, but for some SD
> (viewing scaled up) yadif wins on moving low angle diagonals, which end
> up stepped.
> From memory when testing intel h/w deint it did a nice motion adaptive
> deint of the same scene without steps. The possible difference being
> that its "bob"
> also did some sort of edge detection/interpolation.
We testet deinterlacers at work last year. Professional hard- and software and also ffmpeg.
All my colleagues preferred w3fdif over yadif because it looks more homogeneous and reminds a little of the sharpness and visual impression of crt monitors.
Yadif definitely better reproduces moving diagonals and stills, but harms the picture too much at details and slightly blurs it.

So I tried to combine the best of both. I was successful with stills, but didn´t find a useful edge detection that helps more than it harms.
There are some working edge detection models, but very complicated and speed was also very important.
The most promising and fast method was comparing vertical and diagonal differences around and horizontal nearby the interpolated pixel.
But I always found samples were it leads to heavy artefacts. Especially visible with our new oled monitors.

The resulting bwdif was the best compromise between quality (of course subjective) and speed for general purpose content.
This simd patch is faster than yadif.

With the snooker sample yadif performs better mostly because there are not many details.
But you can see yadif´s artefacts in the players face at the end. Also bwdif performs slightly better than w3fdif here.

Hardware scalers these days seem to have mature deinterlacers.
In our test Aja, Lynx and other professional scalers and also nvidia and intel gpus outperformed all software except Amberfin icr.
Unfortunately I didn´t find any continuative hints in the linked intel documentation.
Maybe direct access of the gpu scaler would be the best deinterlacing filter in ffmpeg, but I have no idea how this could work.
So for now I´m finished with this patch. I hope it will be applied.

More information about the ffmpeg-devel mailing list