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 27th June 2008, 01:40   #1  |  Link
kandrey89
Qualitas Opus Operis
 
Join Date: Feb 2008
Posts: 45
Sharpen Filter Suggestions

I'm having a hard time with sharpen filters, primarily which ones to use,
import VDub filters,
Avisynth internals,
other Avisynth file filters,
ongoing almost finished good sharpen filters code here on forums.

Could you guys throw some names that you know do excellent filtering both sharpening and denoising for FILM?

Thank You
kandrey89 is offline   Reply With Quote
Old 27th June 2008, 01:53   #2  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,605
Some good sharpeners worth looking at:
LimitedSharpenFaster
SeeSaw
Unfilter

Some denoisers:
FFT3D[filter/gpu]
FRFun
DFTTest
DeGrainMedian
HQDN3D
TNLMeans (for the masochistic)

~MiSfit
Blue_MiSfit is offline   Reply With Quote
Old 27th June 2008, 01:55   #3  |  Link
mahsah
Registered User
 
Join Date: Jun 2006
Posts: 273
Well, if you want sharpening AND denoising in the same filter, I think fft3dfilter/fft3dgpu is the only one that does that. But it can be a bit heavy by default.

Personally, I think the denoiser that takes away the least detail is mvdegrain (use 1, 2, or 3 depending on how fast your PC is). Removegrain is also nice if you need something really speedy.

My favorite sharpener is Limitedsharpenfaster; it can do pretty much anything. I also like combining it with the "Soothe" filter.
mahsah is offline   Reply With Quote
Old 27th June 2008, 02:17   #4  |  Link
fibbingbear
Ursus arctos horribilis
 
fibbingbear's Avatar
 
Join Date: Dec 2007
Posts: 186
I do not recommend using FFT3DFilter's sharpener. It may be a great denoiser, but it's sharpener leaves a lot to be desired.

I sometimes use msharpen, although it's best applied to special cases.
fibbingbear is offline   Reply With Quote
Old 27th June 2008, 05:53   #5  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,605
Yeah fft3dfilter's sharpener is only good if used VERY gently.

MVDegrain2 is ... amazing.

But, it's also hideously slow

~MiSfit
Blue_MiSfit is offline   Reply With Quote
Old 27th June 2008, 22:34   #6  |  Link
Piper
Registered User
 
Piper's Avatar
 
Join Date: Jul 2002
Location: Canada
Posts: 196
I agree with fibbingbear and Blue_MiSfit usage of fft3dfilter's sharpener (or lack thereof). There are better sharpeners out there. Here's an example of fft3dfilter and and seesaw which I'm currently using on a 70's Britcom which I continuously toy with...

a = last
b=a.fft3dfilter(plane=0, sigma=1).fft3dfilter(plane=3, sigma=2, bw=32, bh=32, bt=4,)
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=6, Spower=8, Sdamplo=5, Szp=16)
Piper is offline   Reply With Quote
Old 28th June 2008, 00:17   #7  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,605
SeeSaw is great - at least when you preview it in an AviSynth script. For some reason, I'm never happy with encoded results, no matter how much bitrate I throw at it...

~MiSfit
Blue_MiSfit is offline   Reply With Quote
Old 28th June 2008, 01:00   #8  |  Link
Piper
Registered User
 
Piper's Avatar
 
Join Date: Jul 2002
Location: Canada
Posts: 196
@Blue_MiSfit: Perhaps bitrate isn't your issue.

There's another alternative that I've been using for a while:
mc_spuds(frames=2,strength=2,sharpp=2) Like fft3dfilter, mc_spuds has a "built in" sharpener.

I used this for quite a while before I was lured away by the speed of fft3dgpu (the temptress!). Still, there's a quality to mc_spuds which appeals to me more than fft3dgpu/fft3dfilter, at least so far.

Still, I admit to not using fft3dgpu very much, so I could very well not be using comparable settings. But if I can find settings with fft3dgpu which denoises as well and looks as sharp as the above mc_spuds example, I'll probably switch. It's just that much faster. My previous post was an example of such an effort...
Piper is offline   Reply With Quote
Old 28th June 2008, 13:24   #9  |  Link
anubhavrocker
hurrra
 
anubhavrocker's Avatar
 
Join Date: Aug 2007
Posts: 12
Quote:
Originally Posted by Blue_MiSfit View Post
Some good sharpeners worth looking at:
LimitedSharpenFaster
SeeSaw
Unfilter

Some denoisers:
FFT3D[filter/gpu]
FRFun
DFTTest
DeGrainMedian
HQDN3D
TNLMeans (for the masochistic)

~MiSfit
Hello
I have seen your many posts you are so helping to everyone. I have just one request from you. Can you please arrange(either decreasing or increasing order) both sharpeners and denoisers according to their end results, i mean to say according to your experience of ripping which do you favours more.
Thanks in advance.

(PS-I am new to all this ripping, but want to rip like professional rippers. I know it requires hard work but i ll do it)
anubhavrocker is offline   Reply With Quote
Old 29th June 2008, 04:55   #10  |  Link
xbox360
Registered User
 
xbox360's Avatar
 
Join Date: Aug 2006
Location: Region 3 with NDS Encryption
Posts: 355
try asharp I loved it.
xbox360 is offline   Reply With Quote
Old 29th June 2008, 18:00   #11  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,350
Heavyweight Denoisers, in order of percieved quality (to me):

-mvdenoise1/2/3 (pick your slowness) + fft3d for high sad picture areas

-mvdenoise1/2/3

-mvdenoise1/2/3 + predenoised motion prediction clip (stronger denoising)

-tnlmeans (technically this can ouperform mvdegrain, but its just too crazily slow with those esettings)

- Two stage fft3d (to avoid ringing, example later)

-dfttest

- fft3d

-tbilateral (sometimes better then fft3d on some content)

-Vaguedenoiser with prediction (sometimes better then fft3d, fast)

-dctfun (basically just blurs)

-frfun7 (basically just blurs and turns things to oil painting squiggles)

-deen various thresholded blurs, good when combined with more sophisticated methods



Lightweight Denoisers, in order of percieved quality (to me):

-ttempsmooth great temporal lockdown/stabilization, nonexisten/minor artifacts with default settings

-denoise3d (via ffavisynth) fast, powerful spatio temporal smoother, I have never seen it cause temporal artifacts.

-fluxsmoothST good spatio temporal 3x3x3 smoother

-degrainmedian Very powerful, fast, 3x3x3 median filter, tends to cause artifacts in anything less then mode=3, not very powerful in mode=3

-deen (in one of its temporal modes) very strong, but lots of artifacts



two stage fft3d example script:
Code:
strength = 6
fft3dfilter(bw=6, bh=6, ow=3, oh=3, plane=0, bt=1, sigma=strength)
fft3dfilter(bw=216, bh=216, ow=108, oh=108, plane=0, bt=1, sigma=strength/8, sigma2=strength/4, sigma3=strength/2, sigma4=strength)
Vaugedenoiser with prediction and temporal stabilization:
Code:
Aux = Deen("c3d", 1, 4, 8)#.ttempsmooth(maxr=7)
vaguedenoiser(nsteps=8, auxclip=aux, wiener=true, wratio=1.0, chromaT=1, threshold=1)
FluxsmoothT(3)
gradfun2db(1.51)
mvdegrain2+fft3d+temporal stabilization and debanding:
Code:
source = last
pred = source # to get stronger denoising, put denoisers here, they will change how motion vectors are predicted

backward_vec2 = pred.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
backward_vec1 = pred.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
forward_vec1 = pred.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
forward_vec2 = pred.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)

maskp1 = mvmask(kind=1, vectors=forward_vec1, ysc=255).UtoY()
maskp2 = mvmask(kind=1, vectors=forward_vec2).UtoY()
maskp3 = mvmask(kind=1, vectors=backward_vec1, ysc=255).UtoY()
maskp4 = mvmask(kind=1, vectors=backward_vec2).UtoY()
maskf = average(maskp1, 0.25, maskp2, 0.25, maskp3, 0.25, maskp4, 0.25).spline36resize(source.width, source.height)

smooth = pred.fft3dfilter(bw=16, bh=16, ow=8, oh=8, bt=1, sigma=4, plane=0)
source2 = maskedmerge(source, smooth, maskf)

source3 = source2.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)
source3
ttempsmooth(maxr=7)
gradfun2db(1.51)
*.mp4 guy is offline   Reply With Quote
Old 29th June 2008, 18:17   #12  |  Link
anubhavrocker
hurrra
 
anubhavrocker's Avatar
 
Join Date: Aug 2007
Posts: 12
Quote:
Originally Posted by *.mp4 guy View Post
Heavyweight Denoisers, in order of percieved quality (to me):

-mvdenoise1/2/3 (pick your slowness) + fft3d for high sad picture areas

-mvdenoise1/2/3

-mvdenoise1/2/3 + predenoised motion prediction clip (stronger denoising)

-tnlmeans (technically this can ouperform mvdegrain, but its just too crazily slow with those esettings)

- Two stage fft3d (to avoid ringing, example later)

-dfttest

- fft3d

-tbilateral (sometimes better then fft3d on some content)

-Vaguedenoiser with prediction (sometimes better then fft3d, fast)

-dctfun (basically just blurs)

-frfun7 (basically just blurs and turns things to oil painting squiggles)

-deen various thresholded blurs, good when combined with more sophisticated methods



Lightweight Denoisers, in order of percieved quality (to me):

-ttempsmooth great temporal lockdown/stabilization, nonexisten/minor artifacts with default settings

-denoise3d (via ffavisynth) fast, powerful spatio temporal smoother, I have never seen it cause temporal artifacts.

-fluxsmoothST good spatio temporal 3x3x3 smoother

-degrainmedian Very powerful, fast, 3x3x3 median filter, tends to cause artifacts in anything less then mode=3, not very powerful in mode=3

-deen (in one of its temporal modes) very strong, but lots of artifacts



two stage fft3d example script:
Code:
strength = 6
fft3dfilter(bw=6, bh=6, ow=3, oh=3, plane=0, bt=1, sigma=strength)
fft3dfilter(bw=216, bh=216, ow=108, oh=108, plane=0, bt=1, sigma=strength/8, sigma2=strength/4, sigma3=strength/2, sigma4=strength)
Vaugedenoiser with prediction and temporal stabilization:
Code:
Aux = Deen("c3d", 1, 4, 8)#.ttempsmooth(maxr=7)
vaguedenoiser(nsteps=8, auxclip=aux, wiener=true, wratio=1.0, chromaT=1, threshold=1)
FluxsmoothT(3)
gradfun2db(1.51)
mvdegrain2+fft3d+temporal stabilization and debanding:
Code:
source = last
pred = source # to get stronger denoising, put denoisers here, they will change how motion vectors are predicted

backward_vec2 = pred.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
backward_vec1 = pred.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
forward_vec1 = pred.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
forward_vec2 = pred.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)

maskp1 = mvmask(kind=1, vectors=forward_vec1, ysc=255).UtoY()
maskp2 = mvmask(kind=1, vectors=forward_vec2).UtoY()
maskp3 = mvmask(kind=1, vectors=backward_vec1, ysc=255).UtoY()
maskp4 = mvmask(kind=1, vectors=backward_vec2).UtoY()
maskf = average(maskp1, 0.25, maskp2, 0.25, maskp3, 0.25, maskp4, 0.25).spline36resize(source.width, source.height)

smooth = pred.fft3dfilter(bw=16, bh=16, ow=8, oh=8, bt=1, sigma=4, plane=0)
source2 = maskedmerge(source, smooth, maskf)

source3 = source2.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)
source3
ttempsmooth(maxr=7)
gradfun2db(1.51)
Excellent info mate, thanks for all this. I am gonna try them all.
Well my main concern was dvd9s as i rip only from dvd9 sources. So, what will u prefer for dvd9 source dvdrips ?
anubhavrocker is offline   Reply With Quote
Old 29th June 2008, 18:22   #13  |  Link
saint-francis
too much lurking
 
saint-francis's Avatar
 
Join Date: Sep 2006
Location: Valhalla
Posts: 668
Quote:
Originally Posted by *.mp4 guy View Post

mvdegrain2+fft3d+temporal stabilization and debanding:
Code:
source = last
pred = source # to get stronger denoising, put denoisers here, they will change how motion vectors are predicted

backward_vec2 = pred.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
backward_vec1 = pred.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
forward_vec1 = pred.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
forward_vec2 = pred.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)

maskp1 = mvmask(kind=1, vectors=forward_vec1, ysc=255).UtoY()
maskp2 = mvmask(kind=1, vectors=forward_vec2).UtoY()
maskp3 = mvmask(kind=1, vectors=backward_vec1, ysc=255).UtoY()
maskp4 = mvmask(kind=1, vectors=backward_vec2).UtoY()
maskf = average(maskp1, 0.25, maskp2, 0.25, maskp3, 0.25, maskp4, 0.25).spline36resize(source.width, source.height)

smooth = pred.fft3dfilter(bw=16, bh=16, ow=8, oh=8, bt=1, sigma=4, plane=0)
source2 = maskedmerge(source, smooth, maskf)

source3 = source2.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)
source3
ttempsmooth(maxr=7)
gradfun2db(1.51)
I tried this and I get an error saying that "there is no function named average".
saint-francis is offline   Reply With Quote
Old 29th June 2008, 19:39   #14  |  Link
jeffy
Registered User
 
Join Date: Jan 2007
Posts: 943
http://forum.doom9.org/showthread.php?t=118430
jeffy is offline   Reply With Quote
Old 29th June 2008, 21:09   #15  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,350
@anubhavrocker

Ehm, thats far far too little information for me to make an informed recomendation on. Essentially all commercial dvds are dvd9's, and commercial disks vary extremely widely in quality, no to mention different types of content. I'll outline what I generally use on the most common types of sources.

I usually don't process filmed content, unless there are source artifacts, such as macroblocking, or banding, in which case I consider how much I like the source, and choose a script based on speed/quality tradeoffs, I can't make that decision for you. In my case, I'm never happy with anything less then mvdegrain2, so Its either that, or nothing in my case.

For anime, I usually stick to light Tbilateral+ttempsmooth+gradfun . If the source has heavy noise or artifacts, then I will use either, 2 stage fft3d, or vaguedenoiser, or, If the source has a lot of detail, the mvdegrain2 script I posted, but followed by Tbilateral+ttempsmooth+gradfun, instead of just ttempsmooth and gradfun.

Of course, these are just starting points to build from, I almost never end up using a script without modifying it a bit to fit the specific circumstances.

I should mention that I'm extremely picky, I can't stand fft3d, or degrainmedian on film, the two most popular quick fix filters. However plenty of people use them and are perfectly happy with the results.

@jeffy
Thanks, I always forget about that.
*.mp4 guy is offline   Reply With Quote
Old 29th June 2008, 22:42   #16  |  Link
Avenger007
Bruce Wayne
 
Join Date: Dec 2007
Posts: 283
Quote:
Originally Posted by *.mp4 guy View Post
Heavyweight Denoisers, in order of percieved quality (to me):

-mvdenoise1/2/3 (pick your slowness) + fft3d for high sad picture areas

-mvdenoise1/2/3

-mvdenoise1/2/3 + predenoised motion prediction clip (stronger denoising)

-tnlmeans (technically this can ouperform mvdegrain, but its just too crazily slow with those esettings)

- Two stage fft3d (to avoid ringing, example later)

-dfttest

- fft3d

-tbilateral (sometimes better then fft3d on some content)

-Vaguedenoiser with prediction (sometimes better then fft3d, fast)

-dctfun (basically just blurs)

-frfun7 (basically just blurs and turns things to oil painting squiggles)

-deen various thresholded blurs, good when combined with more sophisticated methods



Lightweight Denoisers, in order of percieved quality (to me):

-ttempsmooth great temporal lockdown/stabilization, nonexisten/minor artifacts with default settings

-denoise3d (via ffavisynth) fast, powerful spatio temporal smoother, I have never seen it cause temporal artifacts.

-fluxsmoothST good spatio temporal 3x3x3 smoother

-degrainmedian Very powerful, fast, 3x3x3 median filter, tends to cause artifacts in anything less then mode=3, not very powerful in mode=3

-deen (in one of its temporal modes) very strong, but lots of artifacts



two stage fft3d example script:
Code:
strength = 6
fft3dfilter(bw=6, bh=6, ow=3, oh=3, plane=0, bt=1, sigma=strength)
fft3dfilter(bw=216, bh=216, ow=108, oh=108, plane=0, bt=1, sigma=strength/8, sigma2=strength/4, sigma3=strength/2, sigma4=strength)
Vaugedenoiser with prediction and temporal stabilization:
Code:
Aux = Deen("c3d", 1, 4, 8)#.ttempsmooth(maxr=7)
vaguedenoiser(nsteps=8, auxclip=aux, wiener=true, wratio=1.0, chromaT=1, threshold=1)
FluxsmoothT(3)
gradfun2db(1.51)
mvdegrain2+fft3d+temporal stabilization and debanding:
Code:
source = last
pred = source # to get stronger denoising, put denoisers here, they will change how motion vectors are predicted

backward_vec2 = pred.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
backward_vec1 = pred.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
forward_vec1 = pred.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)
forward_vec2 = pred.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1, truemotion=true)

maskp1 = mvmask(kind=1, vectors=forward_vec1, ysc=255).UtoY()
maskp2 = mvmask(kind=1, vectors=forward_vec2).UtoY()
maskp3 = mvmask(kind=1, vectors=backward_vec1, ysc=255).UtoY()
maskp4 = mvmask(kind=1, vectors=backward_vec2).UtoY()
maskf = average(maskp1, 0.25, maskp2, 0.25, maskp3, 0.25, maskp4, 0.25).spline36resize(source.width, source.height)

smooth = pred.fft3dfilter(bw=16, bh=16, ow=8, oh=8, bt=1, sigma=4, plane=0)
source2 = maskedmerge(source, smooth, maskf)

source3 = source2.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)
source3
ttempsmooth(maxr=7)
gradfun2db(1.51)
but where's MC_Spuds
Avenger007 is offline   Reply With Quote
Old 30th June 2008, 02:20   #17  |  Link
saint-francis
too much lurking
 
saint-francis's Avatar
 
Join Date: Sep 2006
Location: Valhalla
Posts: 668
Quote:
Originally Posted by jeffy View Post
Right. Thanks.
saint-francis is offline   Reply With Quote
Old 30th June 2008, 03:04   #18  |  Link
fibbingbear
Ursus arctos horribilis
 
fibbingbear's Avatar
 
Join Date: Dec 2007
Posts: 186
Quote:
Originally Posted by *.mp4 guy View Post
Heavyweight Denoisers, in order of percieved quality (to me):
two stage fft3d example script:
Code:
strength = 6
fft3dfilter(bw=6, bh=6, ow=3, oh=3, plane=0, bt=1, sigma=strength)
fft3dfilter(bw=216, bh=216, ow=108, oh=108, plane=0, bt=1, sigma=strength/8, sigma2=strength/4, sigma3=strength/2, sigma4=strength)
bt=1 implies that you're using it is a purely spatial denoiser. Do you not find it's temporal denoising satisfying?
fibbingbear is offline   Reply With Quote
Old 30th June 2008, 12:01   #19  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,350
@Avenger007
mc spuds is an automated mvdegrain2 script. I only looked at the first version, but that one was worse quality then plain mvdegrain2.

@fibbingbear

I only use fft3d on anime, and on anime it always causes a sort of "temporal ringing" artifact on characters in motion. I don't usually see that happen on film, but I don't use fft3d on film.
*.mp4 guy is offline   Reply With Quote
Old 30th June 2008, 17:09   #20  |  Link
fibbingbear
Ursus arctos horribilis
 
fibbingbear's Avatar
 
Join Date: Dec 2007
Posts: 186
Thank you for your reply *.mp4 guy I was going to post a question about FFT3DFilter because I noticed the *exact* same phenomenon. I was curious what other settings people used with it, and why they chose them. Looks like you answered my questions before I even posted them :-p

In followup, do you use any sort of temporal filter in conjunction with fft3dfilter for anime?

Last edited by fibbingbear; 30th June 2008 at 18:31.
fibbingbear 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 01:45.


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