Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 7th November 2022, 21:37   #1  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,869
Recent comparison of deinterlacers?

Not sure where to put, as it is not really specific to e.g. AviSynth, VapourSynth or ffmpeg as hosting system...

I know a few more or less good deinterlacers (including basic video manipulation functions): Weave, Bob, KernelDeint, Yadif, TDeint, QTGMC... But I was surprised during the last week when a thread in the VideoHelp forum asked about libavfilter deinterlacers integrated in ffmpeg. They mentioned BWDIF, which I learned means "Bob Weave De-Interlacing Filter".

I never heard of that one. Completely missed any kind of discussion about it. And completely misunderstood it from its basic sounding name, thought it only applies "bob" or "weave", without any smart interpolation. I only marginally noticed the existence of its predecessor, w3fdif (Weston 3 Field De-Interlacing Filter). Now that I learned about them, I found that BWDIF already exists for a while and has been discussed, completely unnoticed by me.

So I wonder, is there a thread I should know if I am curious how good it is in specific cases of complicated material? Did anyone recently test several deinterlacers to handle a hard task?
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 7th November 2022, 22:03   #2  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,844
BWDIF is ok, but nothing crazy good. Better than w3fdif, YADIF, but not really on pair with motion adaptive ones.
BWDIF is "based on yadif with the use of w3fdif and cubic interpolation algorithms". It's relatively fast, which is its best feature. Don't expect miracles, but it's good choice when trade between quality/speed is important.

In avs, vs there is really nothing better than QTGMC. In pro world you have deinterlacing in Alchemist (Alchemist File now), Tachyon which are similar to QTGMC (in some aspects better in others worse). They are fairly quick though as they use GPU.

You have BWDIF in vapoursynth as well.

Last edited by kolak; 7th November 2022 at 22:09.
kolak is offline   Reply With Quote
Old 8th November 2022, 18:28   #3  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,980
Quote:
Originally Posted by kolak View Post
BWDIF is "based on yadif with the use of w3fdif and cubic interpolation algorithms". It's relatively fast, which is its best feature. Don't expect miracles, but it's good choice when trade between quality/speed is important.
Yep, it's mostly noticeable when there are like graphics in sports while the background is truly interlaced with players moving. Bob() would make fields jump up and down like crazy, yadif() would be slightly better, but still jumping a bit, TDeint() will try to get it right but would probably create nasty artifacts in some scenes, BWDIF() wouldn't make them jump (maybe just a bit), but there would still be aliasing.

Quote:
Originally Posted by kolak View Post
In avs, vs there is really nothing better than QTGMC.
There's nothing better than QTGMC() period, even outside Avisynth and VapourSynth.
In QTGMC() they would not jump at all and there would be no aliasing, as if everything was really progressive.
This is for new sources. When it comes to old sources, QTGMC() shines 'cause it can even get rid of some analog stripes and other kind of noise, thus delivering a clean and perfect picture.


Quote:
Originally Posted by kolak View Post
In pro world you have deinterlacing in Alchemist
Alchemist is used for live feeds, so it makes sense if you get like a 30i feed that you may wanna bob to 59,940p, blend to 50p and re-interlace to 25i in the best possible way, or for instance if you get 29,970p live feeds that you may wanna interpolate to 50p (instead of just blending it to 50p) and divide in fields to get 25i, all live, via SDI, but I wouldn't use it for files.


Quote:
Originally Posted by kolak View Post
Tachyon [...] similar to QTGMC (in some aspects better in others worse). They are fairly quick though as they use GPU.
Screw Tachyon and screw Telestream! It costs an eye and a leg, it's closed source, proprietary, you have no control over lots of stuff and it only works on proprietary hardware (like, you can't even have any NVIDIA GPU you like, you gotta install Lightspeed servers for thousands of euros).

QTGMC() is free, open source, totally customizable, tweakable and it works everywhere on CPU and on any NVIDIA card if you use KTGMC() with OnCUDA() in Avisynth.


For file-based workflows, I use BWDIF() when time is important and QTGMC() for everything else (like for UMatic, BetaCAM, 1 inch type c remastering workflows etc). It's the right way to do it, it's the open source friendly way to do it and it's the way that supports this great community we're part of. I've sent those files everywhere to different studios (and obviously aired them) and Avisynth / FFAStrans has been praised by other TVs and professionals. I mean, honestly, in this day and age there's literally no reason to go for ultra pricey stuff from Telestream when they literally add nothing to what open source has been capable of doing for years and the sooner companies toss their products and begin embracing open source, the better, 'cause it means that more and more professionals will contribute.

Last edited by FranceBB; 8th November 2022 at 18:33.
FranceBB is offline   Reply With Quote
Old 8th November 2022, 20:41   #4  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,844
Quote:
Originally Posted by FranceBB View Post
Alchemist is used for live feeds, so it makes sense if you get like a 30i feed that you may wanna bob to 59,940p, blend to 50p and re-interlace to 25i in the best possible way, or for instance if you get 29,970p live feeds that you may wanna interpolate to 50p (instead of just blending it to 50p) and divide in fields to get 25i, all live, via SDI, but I wouldn't use it for files.
Alchemist box is not as good (as it has to work in realtime and it's old) as new Alchemist File sold by Grass Valley now. Price is acceptable for pro market (way better than old box) and offers much more. Old box is not sold anymore, is it?
It has good and bad sides- not much of a control is bad side. If you have combing on small portion of a frame it will treat it as progressive and you have no control over it. Frame reconstruction itself is very decent, but if you want to get totally new progressive file (don't care about original fields, which is the case for most scenarios) QTGMC is better. Alchemist is much faster though- all you need is GTX 1080.

Of course Tachyon is not Telestream, which just license it. It's the most common app where you can actually use it and I agree that pricing is as of today very questionable. You could probably license engine from Cinnafilm which gives very detailed control over processing.

Last edited by kolak; 8th November 2022 at 20:51.
kolak is offline   Reply With Quote
Old 19th May 2024, 16:26   #5  |  Link
Sneals2000
Registered User
 
Join Date: May 2007
Location: UK
Posts: 18
Quote:
Originally Posted by kolak View Post
Alchemist box is not as good (as it has to work in realtime and it's old) as new Alchemist File sold by Grass Valley now. Price is acceptable for pro market (way better than old box) and offers much more. Old box is not sold anymore, is it?
The hardware model is not sold because GV closed the only factory they had left (Newbury) that could make it in their mad dash to pivot to the cloud... Their ex-Quantel server products suffered the same fate, as has the former-Snell Kahuna vision mixer range (though I believe the latter could be made elsewhere - but were too much competition for their North American-designed K-Frame switchers). The Kahuna Maverik control surface lives on as an AMPP control surface, as does the Quantel LiveTouch control panel for the cloud-based LiveTouch X.

I believe there is also an Alchemist Live box based on COTS hardware - though I don't know how it compares in performance terms to the custom hardware boxes.

Last edited by Sneals2000; 19th May 2024 at 16:34.
Sneals2000 is offline   Reply With Quote
Old 8th November 2022, 20:44   #6  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,844
Quote:
Originally Posted by FranceBB View Post
For file-based workflows, I use BWDIF() when time is important and QTGMC() for everything else (like for UMatic, BetaCAM, 1 inch type c remastering workflows etc).
I do about the same as it's all about automated processing where quality is important, but needs to be just at acceptable level.
BWDIF is used with combing detection, so for hybrid masters I don't break 95% (it's all set to be oversensitive, so I don't miss combing) of progressive parts.
This processed few million minutes now

Last edited by kolak; 8th November 2022 at 20:54.
kolak is offline   Reply With Quote
Old 8th November 2022, 19:31   #7  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 1,072
Quote:
Originally Posted by kolak View Post
BWDIF is ok, but nothing crazy good. Better than w3fdif, YADIF, but not really on pair with motion adaptive ones.
Yadif IS motion-adaptive :\

Quote:
Originally Posted by kolak View Post
In avs, vs there is really nothing better than QTGMC.
Unless, of course, you're dealing with non-linear field behavior. Or you care about keeping the original scanlines intact.

Yadifmod2 + Nnedi3 delivers "more correct" results by default, even if it doesn't look as good as QTGMC in certain cherry-picked scenarios, but it still can't handle some types of non-linear field behavior correctly.

TFM(mode=0,pp=0,micmatching=0).converttorgb().blur(0,1).sharpen(0,1) is the "safest" choice in the sense that it doesn't have any really spectacular failure modes no matter what you throw at it.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers.

Last edited by Katie Boundary; 8th November 2022 at 19:34.
Katie Boundary is offline   Reply With Quote
Old 8th November 2022, 19:47   #8  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,416
Quote:
Originally Posted by Katie Boundary View Post
Yadif IS motion-adaptive :\
Not really; at least not what is usually meant as "motion-adaptive", such as BWDIF

BWDIF will weave (the "W" in BWDIF stands for weave) a static content scene resulting in full resolution, yadif will deinterlace it resulting in ~1/2 spatial resolution


Quote:
TFM(mode=0,pp=0,micmatching=0).converttorgb().blur(0,1).sharpen(0,1) is the "safest" choice in the sense that it doesn't have any really spectacular failure modes no matter what you throw at it.
The "failure" is 1/2 temporal resolution loss and aliasing
poisondeathray is offline   Reply With Quote
Old 6th March 2023, 05:19   #9  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 1,072
Quote:
Originally Posted by poisondeathray View Post
BWDIF will weave (the "W" in BWDIF stands for weave) a static content scene resulting in full resolution, yadif will deinterlace it resulting in ~1/2 spatial resolution
YADIF will then compare each interpolated pixel to the pixels in the next and previous fields and perform temporal smoothing if appropriate. A static-content scene run through YADIF is indistinguishable from a field-matched one.

Quote:
Originally Posted by poisondeathray View Post
The "failure" is 1/2 temporal resolution loss and aliasing
Neither of those things happens unless the content was originally 60hz or 50hz natively interlaced.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers.

Last edited by Katie Boundary; 6th March 2023 at 05:24.
Katie Boundary is offline   Reply With Quote
Old 6th March 2023, 15:51   #10  |  Link
richardpl
Registered User
 
Join Date: Jan 2012
Posts: 295
ESTDIF is better than YADIF and BWDIF combined.
richardpl is offline   Reply With Quote
Old 6th March 2023, 23:38   #11  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,416
Quote:
Originally Posted by Katie Boundary View Post
YADIF will then compare each interpolated pixel to the pixels in the next and previous fields and perform temporal smoothing if appropriate. A static-content scene run through YADIF is indistinguishable from a field-matched one.

The yadif deterioration can be less noticable if the source has low effective resolution to begin with. eg. If the static scene has been selectively lowpassed, or uses thick fonts, or is blurry. You should notice the static scene yadif quality loss on fine static credits, static scenes with buildings, windows (lines at certain angles), higher quality scenes with higher frequency detail, and/or static scenes in mixed content cartoons/anime where you might be applying a deinterlacer instead of field matching. Yadif will degrade it signficantly more than if the field pairs were simply weaved. The yadif quality loss is measurable/quantifiable with test charts. Also, yadif 2x will tend to cause flicker in a static scene.

Sometimes bwdif can have detection problems, but the avisynth version of bwdif has a threshold setting. Tdeint is another option for mixed i/p content or with static scenes using tryweave=true

Quote:
Neither of those things happens unless the content was originally 60hz or 50hz natively interlaced.
And that's what this thread is about. "Deinterlacers" . 50Hz or 60Hz interlaced content (Or mixed content that contains some interlaced content) is usually why one uses a "deinterlacer" instead of a "field matcher". "Deinterlacer" in this forum implies interpolation from a single field




Quote:
Originally Posted by richardpl View Post
ESTDIF is better than YADIF and BWDIF combined.
It's probably source dependent, but estdif (default settings), looks significantly worse on that sample in this thread in terms of aliasing and bob flicker. Maybe the default settings are not ideal ?
poisondeathray is offline   Reply With Quote
Old 19th May 2024, 16:32   #12  |  Link
Sneals2000
Registered User
 
Join Date: May 2007
Location: UK
Posts: 18
Quote:
Originally Posted by kolak View Post
BWDIF is ok, but nothing crazy good. Better than w3fdif, YADIF, but not really on pair with motion adaptive ones.
Motion Compensative is a step up from Motion Adaptive isn't it?

Motion Adaptive deinterlacers change their deinterlacing mode based on whether there is intra-frame motion (i.e. motion difference between the two fields in a frame) - either globally or on a block-by-block basis.

Motion Compensative deinterlacers go a step further and try to detect the speed and direction of motion of picture elements to assist in interpolating the missing fields from the fields that are present (not dissimilar to the way LongGOP codecs use motion vectors for compression).

Phase Correlation - as used by Alchemist frame rate converters and Quasar SD-HD upconverters - improves on just basic block matching because the phase correlation surface indcates rotational motion in addition to linear translation (most block matching algorithms only try to match in linear directions - Phase Correlation-assisted block matching can also detect rotation)

It'll be interesting to see what happens if/when the patents for Phase Correlation use in this area lapse. (If they haven't already - Alchemist is based on the early 90s Gazelle Phase Correlation slow motion interpolator)
Sneals2000 is offline   Reply With Quote
Old 13th June 2024, 08:40   #13  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,175
Quote:
Originally Posted by Sneals2000 View Post
Motion Compensative is a step up from Motion Adaptive isn't it?
As you see with M_QTGMC example - the motion estimation is still very poor at the high and complex motion areas. And moving pictures like sports or action scenes are about realy fast and complex motion.
Some shows are too - good example is Brazilian Carnival. And with unstable and unreliable motion extimation the performance of simple QTGMC is poor too - it lost many details. And attempt to make higher quality motion estimation by combining several runs of ME engine with different params sets and also making statistical averaging of MVs from several searches around current block's position quickly degrades performance to 10x or even 100x times slower and close to unusable.
The only recommended solution may be with combined processing if possible to cut total movie to scenes with low and high complexity of motion and apply different ME engine to mostly static and complex motion scenes. But it is not valid to totally complex footages.
Though as the interlaced scan footage production is going to end so we have limited size of footage to deinterlace with (in theory) infitine time to process and it can be solved with finite time even with slow deinterlace engines.

"improves on just basic block matching because the phase correlation surface indcates rotational motion in addition to linear translation (most block matching algorithms only try to match in linear directions"

Rotation with a not very small radius and not very fast speed can be close to translation of the small enough blocks. So with decreasing of blocksize the error of rotation compensation also decreases. But with decreasing blocksize typical general motion estimation errors become higher. Some solution is progressive decreasing of blocksize (also takes more time to run). So the translation is the most important and main transform to estimate and compensate in most of ME/MC engines like deinterlace/denoise/FRC/MPEG.
Skipping rotation compensation makes more and more error only with 'large' temporal radius engines like denoisers and with typical deinterlace and FRC engines with a very small temporal radius like +-1 frame/field the rotation errors are very small at most footages.

Quote:
Originally Posted by kolak View Post
There is also an important detail- do we need deinterlacing to single or double fps?
It's very important as single one is way simpler and way easier to achieve (with simpler/faster deinterlacers).
Double-fps is natural for interlaced video by design. The storage in the form of a 'frame of 2 fields' was simply to make it more viewable at the progressive screens without deinterlacing. With correct proportions.

In the scan way it may better named field-based footage as a sequence of fields (and with double-frames rate).

The real analog and SDI transmission also performed in the field-stream. Not in the form of full-height 'frame'. CRT also displays as field sequence.

Last edited by DTL; 13th June 2024 at 09:07.
DTL is offline   Reply With Quote
Old 7th November 2022, 22:19   #14  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,869
I could test on my own, but I don't think I have much "known hard" material... are there notorious public samples?
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 8th November 2022, 03:05   #15  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,669
Quote:
Originally Posted by LigH View Post
I could test on my own, but I don't think I have much "known hard" material... are there notorious public samples?
About 10 years ago Didée posted an SD interlaced clip (now gone) that is problematic for some deinterlacers: SAT1.FFS.2011.03.21.m2v /// (archived)

Here's a clip of the scrip below: deint-comparison.mp4
Code:
DGSource("SAT1.FFS.2011.03.21.dgi")

a = QTGMC().Subtitle("QTGMC()")
b = BWDIF(field=-2).Subtitle("BWDIF(field=-2)")
c = DGBob(mode=1).Subtitle("DGBob(mode=1)")
d = PVBob(mode=1).Subtitle("PVBob(mode=1)")
top = StackHorizontal(a,b)
bot = StackHorizontal(c,d)
StackVertical(top,bot)
AssumeFPS(10)
  • DGBob() is a fast stand-alone CUDA filter that implements the YADIF deinterlacing algorithm.
  • PVBob() is a stand-alone version of the PureVideo deinterlacer.
  • Here's the same clip compared against MSU Deinterlacer 2.0: https://forum.doom9.org/showthread.p...67#post1560767

It would be nice to see some results of ML deinterlacers, if anyone has access to them.
Reel.Deel is offline   Reply With Quote
Old 8th November 2022, 19:43   #16  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,625
Quote:
Originally Posted by Reel.Deel View Post
About 10 years ago Didée posted [/URL] an SD interlaced clip (now gone) that is problematic for some deinterlacers
The clip I posted in the Cowboy Bebop thread has (on purpose) 29.79p, 23.976p and 60i frames. It could be a nice test bench.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 8th November 2022, 06:16   #17  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,416
You can use border=true for QTGMC to avoid those flickering border artifacts at the top
poisondeathray is offline   Reply With Quote
Old 8th November 2022, 20:58   #18  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,844
There is also an important detail- do we need deinterlacing to single or double fps?
It's very important as single one is way simpler and way easier to achieve (with simpler/faster deinterlacers).
kolak is offline   Reply With Quote
Old 12th November 2022, 18:07   #19  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,628
https://videoprocessing.ai/benchmarks/deinterlacer.html
Realtime visualisation of a selectable sample rectangle.
I hold my breath for MFDIN L Deinterlacer, hoping to become public.
https://arxiv.org/abs/2109.14151
https://arxiv.org/pdf/2109.14151
Tokyo Market looks well, other samples are jagged, don't seem to be interlaced...
Missing QTGMC though...why,MSU?
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 13th November 2022 at 13:09.
Emulgator is offline   Reply With Quote
Old 28th February 2023, 08:51   #20  |  Link
PatchWorKs
Registered User
 
PatchWorKs's Avatar
 
Join Date: Aug 2002
Location: Italy
Posts: 306
...my question is: which is the best FFMPEG deinterlacer ?
__________________
Hybrid Multimedia Production Suite will be a platform-indipendent open source suite for advanced audio/video contents production.

Official git: https://www.forart.it/HyMPS/
PatchWorKs is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.