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 > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th June 2003, 16:02   #1  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
Smart bob filter: DGBob() 1.6.0: Now with slow motion

Lots of people use SmoothDeinterlacer() by Gunnar Thalin (ported to Avisynth by Xesdeeni). But it is very slow. So I have written my own take on smart bobbing. Like SmoothDeinterlacer(), it attempts with some success to mitigate flutter, but it is much faster than SmoothDeinterlacer().

DGBob() can also be used as a simple deinterlacer (does not create frames from fields). It can also produce a fluid 50% slow motion effect.

It supports RGB, YUY2, and YV12 color spaces.

Please get the filter from my website as linked below. You can find it under Mine/Avisynth. Source code is available there as well.

Feedback will be appreciated.

Last edited by Guest; 6th July 2003 at 14:52.
Guest is offline   Reply With Quote
Old 14th June 2003, 16:56   #2  |  Link
Dark-Cracker
Registered User
 
Dark-Cracker's Avatar
 
Join Date: Feb 2002
Posts: 1,195
very nice work as always smoothdeint it's a very usefull filter happy to see he have now a little brother i will test it as soon as possible on PAL material.

Bye
__________________

AutoDub v1.8 : Divx3/4/5 & Xvid Video codec and .OGG/.MP3/.AC3/.WMA audio codec.
AutoRV10 v1.0 : Use RealVideo 10 Codec and support 2 Audio Streams and Subtitles.

Dark-Cracker is offline   Reply With Quote
Old 14th June 2003, 17:36   #3  |  Link
wotef
Registered User
 
wotef's Avatar
 
Join Date: Apr 2002
Posts: 272
what does the "smart" designate over non-smart bobbing?
wotef is offline   Reply With Quote
Old 14th June 2003, 18:33   #4  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
I just described it in my journal, but I will summarize it here.

When you make a frame from a field, you have to create all the missing lines. If you simply interpolated all the missing pixels from the current field, that is a dumb bob, even if you use some fancy interpolation like cubic bsplines.

But if you distinguish static from moving areas of the picture, and then interpolate in moving areas, while using the previous field data for static areas, that is a smart bob.

Smart bobbing allows you to retain the original picture detail in static areas.

Really smart bobbers, such as SmoothDeinterlace() and now DGBob() also attempt to mitigate the effects of flutter, which often results from bobbing. Flutter occurs when the field alternation causes detail to be present in one field but not the next. The simplest case is a single-pixel-high horizontal line. Without anti-flutter mitigation, it will disappear in every other bobbed frame.

Last edited by Guest; 14th June 2003 at 21:55.
Guest is offline   Reply With Quote
Old 14th June 2003, 21:24   #5  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
Absolutely brilliant!

So simple - and yet so effective! I'm looking so much forward to the YV12 version!
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 14th June 2003, 21:52   #6  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
Quote:
Originally posted by sh0dan
Absolutely brilliant!

So simple - and yet so effective! I'm looking so much forward to the YV12 version!
Thanks, sh0dan. Coming from you, that is really good for my ego.

Still, it's a first release. It needs a blend mode. And it can be faster with some optimization. I'm going to finish this one off before returning to Decomb 5, because I need it for my swimming videos.
Guest is offline   Reply With Quote
Old 15th June 2003, 04:55   #7  |  Link
DDogg
Retired, but still around
 
DDogg's Avatar
 
Join Date: Oct 2001
Location: Lone Star
Posts: 3,058
This is good news! Any special secrets or recommendations for a ntsc DV source script using this filter?
DDogg is offline   Reply With Quote
Old 15th June 2003, 05:12   #8  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
Just be sure to get the field order correct. Please report on your results.
Guest is offline   Reply With Quote
Old 15th June 2003, 10:46   #9  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
@neuron2: You could default to the fieldorder given by GetParity. This would allow users to use assumetff()/assumebff(), as with other filters.
This should also allow for clips with different field orders to be deinterlaced properly.
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 15th June 2003, 11:03   #10  |  Link
mf
 
mf's Avatar
 
Join Date: Jan 2002
Posts: 1,729
Sweet! Now let's see how smart this one is . I hope it really will be- I already have some ideas .
mf is offline   Reply With Quote
Old 15th June 2003, 14:05   #11  |  Link
jorel
Guest
 
Posts: n/a
Quote:
Originally posted by neuron2
Thanks, sh0dan. Coming from you, that is really good for my ego.

Still, it's a first release. It needs a blend mode. And it can be faster with some optimization. I'm going to finish this one off before returning to Decomb 5, because I need it for my swimming videos.
oh yes,is faster(too big)!


edited:
sorry, wrong words for big project!

neuron2,receive my excuses.


manono, thanks for advise.
  Reply With Quote
Old 15th June 2003, 16:14   #12  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,188
Hi jorel-

I know you sometimes have difficulty expressing yourself in English, and there's certainly no shame in that. But you have to be real careful with what you say so that it isn't taken the wrong way. To me that comment, besides adding nothing to the discussion, comes off as a completely gratuitous insult to one of the most valuable and respected members of this site. Didn't you get into trouble with some previous comments, and isn't that why you haven't been around for awhile? If you really were just joking, I'd say it was in bad taste and not at all funny. Please watch what you say in the future, unless you just don't care any more. In which case, I'm sure someone will be only too happy to put you out of your misery. Perhaps an apology is in order before it's too late.
manono is offline   Reply With Quote
Old 15th June 2003, 18:11   #13  |  Link
JohnMK
Registered User
 
Join Date: Sep 2002
Location: Seattle
Posts: 551
Is it easier to program within the YUY2 colorspace than in YV12?
JohnMK is offline   Reply With Quote
Old 15th June 2003, 19:57   #14  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
@JohnMK: Both have their own advantages. YV12 is "cleaner", as you don't have components mixed, whereas some operations are easier on YUY2, as you have chroma and luma at the same place.
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 15th June 2003, 22:15   #15  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Quote:
Originally posted by sh0dan
@neuron2: You could default to the fieldorder given by GetParity. This would allow users to use assumetff()/assumebff(), as with other filters.
This should also allow for clips with different field orders to be deinterlaced properly.
How effective is this? Does it work nicely on both AVI and MPEG-2 sources? Does it return information on every frame or just at beginning?

What a nice contribuition to this thread it may be ( I hope ).


Bilu
bilu is offline   Reply With Quote
Old 15th June 2003, 23:06   #16  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,607
Hello. Are there plans to build in some threshold-parameters for deinterlacing?
At this time I am not able to get comb-free videos with dgbob.
Small or low-contrast objects are not deinterlaced.
It seems, like there is a temporal mask, which needs some time to apply the new picture contents.

(Sorry, I can't describe this better with my actual english knowledge)

btw. I can't attach a Picture here
scharfis_brain is offline   Reply With Quote
Old 16th June 2003, 05:01   #17  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
Quote:
Originally posted by JohnMK
Is it easier to program within the YUY2 colorspace than in YV12?
Deinterlacing is harder in YV12 due to the vertical chroma subsampling. You can finesse that by deinterlacing the planes independently, but that is theoretically inadequate. To do it right, you have to couple the motion maps of the luma and chroma planes. All these problems don't arise for YUY2. But as sh0dan correctly points out, other applications are easier and faster in YV12.
Guest is offline   Reply With Quote
Old 16th June 2003, 05:11   #18  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
Quote:
Originally posted by scharfis_brain
Hello. Are there plans to build in some threshold-parameters for deinterlacing?
Sure, I can expose them to the user. I just chose hard-coded values for the first version. There are two thresholds. The first is equivalent to dthreshold in Decomb 4. It is already set very low, 4 or 5 IIRC. The more problematic one is the one that compares the pixels in the previous and following fields. If their difference is within this threshold I say the corresponding pixel in the current frame is static and I weave it. The problem is that if you make that one too low, you start losing your flutter mitigation (because normal noise variance starts making pixels get bobbed instead of weaved). I am aware of this issue and am exploring ways to better detect static areas. However, the whole reason for making DGBob() is to have a faster smart bob. I have to be careful not to lose that advantage.
Guest is offline   Reply With Quote
Old 19th June 2003, 01:35   #19  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
New version provides much better results

DGBob() version 1.1.0 is now available at my website. It greatly improves the motion detection (with no performance loss!) and thus produces much better results. The motion detection threshold is now exposed in the user interface ('thresh' parameter) to allow tweaking the tradeoff between flickering and residual combing/artifacts.

This version greatly reduces the artifacting resulting from single-field pixel changes. I'm just off to my journal to describe how it was done. I hope you all are as pleased with it as I am now. This final little finesse has made smart bobbing really viable, where previously I thought it was barely acceptable (due to the artifacting).

Next is YV12 support and a "show motion map" option, and maybe cubic interpolation and/or edge-directed interpolation for the interpolated pixels.

I don't often engage in hyperbole, but this filter kicks butt.

Last edited by Guest; 19th June 2003 at 01:50.
Guest is offline   Reply With Quote
Old 19th June 2003, 13:18   #20  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
RGB and YV12 support added

I cranked out DGBob 1.2.0 over my morning coffee. It adds support for RGB and YV12 color spaces. I also described the algorithmic improvement in my website journal.

Woohoo, the only YV12 smart bob filter!

Last edited by Guest; 19th June 2003 at 13:44.
Guest 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 05:30.


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