PDA

View Full Version : What are your current go-to filters?


Chainmax
1st October 2009, 04:48
I recently bought a couple of DVDs and want to use them as an excuse to get back into filtering. Now, since it's been a long time I'd like to know what are your most used filters. Here are mine:


* Bobbing/same-rate deinterlacing:TempGaussMC (http://avisynth.org/mediawiki/TempGaussMC) & SelectEven/Odd.

Alternative: TDeint+NNEDI2+TMM (http://forum.doom9.org/showthread.php?t=82264) & SelectEven/Odd.

* IVTC: TIVTC + TDeint + NNEDI2 + TMM (http://forum.doom9.org/showthread.php?t=82264). On animated content, I might add Vinverse (http://bengal.missouri.edu/~kes25c/vinverse.zip) right before decimation.

* Antialiasing, upsizing: NNEDI2 (http://forum.doom9.org/showthread.php?t=147695). I haven't found a method that works as good as this or its predecessors.

* Dotcrawl, mild rainbowing: TComb (http://bengal.missouri.edu/~kes25c/). I tried most other alternatives (DeDot, BiFrost, DeCross, SSIQ), but upon extensive testing they all seemed to produce some kind of minor artifacting.

* Rainbowing: FFT3DFilter (http://avisynth.org.ru/fft3dfilter/fft3dfilter.html) on chroma planes. In my humble opinion, it's simply unbeatable.

* Denoising, light deblocking, light dotcrawl removal: DeGrainMedian (http://avisynth.org.ru/degrain/degrainmedian.html) and DFTTest (http://forum.doom9.org/showthread.php?t=132194). DGM is really something, it can treat all three of these kinds of artifacting quite effectively. DFTTest seems just as good on denoising and deblocking, haven't tested if it can remove dotcrawl too.

* Denoising: MVDegrain3. This is one area I am very outdated in, as I never tried the new methods (McSpuds et al), so please let me know what am I missing.

* Sharpening:LimitedSharpenFaster (http://avisynth.org/mediawiki/LimitedSharpen)+Soothe (http://avisynth.org/mediawiki/Soothe). For very clean sources, SeeSaw (http://forum.doom9.org/showthread.php?t=104701) is probably a good choice as well.

* Line thinning: aWarpSharp2 (http://forum.doom9.org/showthread.php?t=147285). Everything that was good about MarcFD's original, but without the lateral green smudges. I really love this as a follow-up to LSF on animated content.

* Line darkening: VmToon (http://avisynth.org/mediawiki/VmToon).

* Debanding: I was going to say Gradfun2DB, but apparently it has a small bug that GradFunkMirror (http://avisynth.org/mediawiki/upload/7/75/GradFunkMirror.avsi) solves.

* Noise adding: AddGrain (http://members.cox.net/trbarry/downloads.htm). Once again, I'm pretty sure more developments have surfaced in this areas, oriented to actual detail faking, but I am not fully aware of them. Any information would be appreciated.

* Automatic levels HDR AGC (http://forum.doom9.org/showthread.php?t=93571). Autolevels v0.3 failed to work on a couple of scenes in a difficult clip I tried it on.

* Very severe blocking: a variation on this great suggestion Didée gave me a long time ago:

- deblock_QED (remove blocking, but keep detail) (-> it's on kassandro's forum, search)
- soft upsampling (perhaps gaussian) to ~150%
- extreme LimitedSharpen (updated version), with Smode=3, strength=1000, wide=true, soft=75~100
- 2x Upsampling by EEDI2, or custom script with good old SangNom
- lanczos to final destination size

- temporal filtering somewhere inbetween, perhaps MC'ed
- eventually use SeeSaw instead of LimitedSharpen, or even both

*Never found a satisfactory solution for: framerate interpolation and stabilization.


I think that's pretty much it. If I can think of anything else, it will be added. So, which are your preferred filters?

thewebchat
1st October 2009, 05:07
Disclaimer: I mostly work in cartoons, so my advice may not be representative of general content.

Deinterlacing: I just use nnedi. Sometimes nnedi with TDeint. I find that most of the time when I need to deinterlace something, it's a stray field on a scene change, or some other telecine artifact. In general, I find that motion-compensated deinterlacers only seem to improve pans on cartoons.

IVTC: TIVTC and then corrections in Yatta. Plain old TIVTC with blend postprocessing when I don't care enough.

Antialiasing: Masked EEDI2. SangNom if I don't care enough. nnedi never seems to remove enough aliasing on cartoons.

Dotcrawl: Checkmate. This is the only filter I've found that can remove dotcrawl on moving content.

Rainbows: BiFrost with SSIQ (multiple times if necessary). Apparently this doesn't help much on real life footage though.

Denoising: MDegrain variants. And no, you're not missing anything from using "advanced" scripted variants. They all seem to be various combinations of MDegrain, prefiltered analysis clips, and lame sharpening filters.

More evil types of denoising: dfttest. Possibly dfttest with MC. Also, sometimes Deen depending on how bad it is.

Deblocking: GradFun2DB/GradFunkMirror or AddGrainC. Normal deblocking filters seem to only turn the blocks into bands, which look much worse in my opinion.

Sharpening: LimitedSharpenFaster. Does the job well enough, and I don't believe in the "filters make the output better than input" meme.

Line thinning: Dunno, never needed to do it. On the other hand, aWarpSharp is great at removing chroma bleeding.

Debanding: GradFun2DB/GradFunkMirror.

Noise: AddGrain. GrainFactory3 always seemed way exaggerated to me.

Levels adjustment: No idea here.

Really bad blocking: AddLotsOfGrain.

Framerate conversion/stabilization: Good luck with that.

Chainmax
1st October 2009, 05:15
Oh, you made me remember that aWarpSharp also does minor halo removal, which reminds me of:

* Halo removal: DeHalo_Alpha (http://forum.doom9.org/showthread.php?t=102794). The best, bar none.

Thanks for the thorough reply :).

Blue_MiSfit
1st October 2009, 07:40
I do mass encoding for a living, so my parameters are probably different than lots of folks here.

Also, I deal almost exclusively with film content, most of which is progressive, and of higher initial quality than most folks have access to. That doesn't mean it's perfect. You try feeding a gorgeous 1080p ProRes master - unfiltered - into x264 at low bitrate CBR and see what happens :p Denoisers are my friend, to put it keenly.

Deinterlacing / Bobbing: YADIFMod + NNEDI for quality, YADIF for speed, or neuron2's CUDA tools when I'm working locally (maybe 5% of my total work). I rarely have time for the really good smart bobbers like TGMC or MCBob.

IVTC: TFM.Vinverse.TDecimate... If this doesn't work, I usually reject the content, or brutalize it... LOL! I hate dealing with hard-telecined stuff. Thankfully I don't often have to!

Spatial Interpolation: Spline36, NNEDI for 4x3LB -> 16x9 conversions, when I'm bored :p

Temporal Interpolation: MVTools2. what else? AssumeFPS? ;) Seriously though, I almost never do temporal interpolation. Neither should you, though I once did a mean 24p -> 60i "fix" to correct a dreadful mistake made during a multi-camera shoot... Thanks Fizick!

"Free" Denoiser: FFT3DGPU / DeGrainMedian (depending on whether I'm on a local machine or a remote server)

"Heavy" Denoiser / Degrainer: MDegrain2 with MT. Light up all 8 cores. I usually produce lots of encodes from one source, so I will create a degrained "mezzanine" file as an intermediate.

Deblocking: DFTTest or FFT3DGPU, sometimes Deblock_QED - again depending on remote / local. Sometimes other stuff works wonders too!

Dot Crawl Removal: Checkmate

Rainbow Removal: FFT3DGPU on chroma

Dither: GradFunkMirror(1.51). I always add this after fft3d***. It has a tendancy to create / reveal banding.

Sharpening: LSFMod(SMode=4 or maybe 5, usually with reduced strength)

PC <--->TV or other levels adjustments: SmoothLevels. Compare before / after histograms between this and ColorYUV. Wow! :D

Grain Addition: GrainFactory3 at low settings, or maybe a low AddGrainC

Other useful stuff I use all the time: QTSource, SoundOut, VSFilter, SupTitle, FFMPEGSource2, and tons of built in filters.

#This is SO trick!!!
a=last
awesomeDenoiser
interleave(a,last)
histogram(mode="luma")

~MiSfit

MadRat
1st October 2009, 10:50
I consider myself intermediate at avisynth filtering so when I feel very self-conscious giving any suggestions: like someone with nothing but first aid training trying to answer the questions of the doctor who's the head of the hospital emergency department. I don't have answers to these questions so I'm interested in the result.

For rainbowing, have you compared FFT3DFilter on the chroma to ChubbyRain2?

Have you compared fastlinedarken to VmToon?

Have you tried adding external motion compenstation to denoising? tritical did a recent test with updated filters and came up with some really good results. [http://forum.doom9.org/showthread.php?p=1272704#post1272704] I asked a few questions but his answers were far beyond anything I could ever hope to understand. I'm not completely sure but I think the code for dtffilter with external motion compensation would look like this:


sclip = msuper()
vf1=manalyse(sclip,isb=false,delta=1,overlap=4)
vf2=manalyse(sclip,isb=false,delta=2,overlap=4)
vb1=manalyse(sclip,isb=true,delta=1,overlap=4)
vb2=manalyse(sclip,isb=true,delta=2,overlap=4)

mcomp5 = interleave(\
mcompensate(sclip,vf2,thSCD1=600)\
, mcompensate(sclip,vf1,thSCD1=600)\
, last\
, mcompensate(sclip,vb1,thSCD1=600)\
, mcompensate(sclip,vb2,thSCD1=600))

mcomp5.dfttest_dfttest(tbsize=5,ftype=1,sbsize=8,sosize=7,sigma=110).selectevery(5,2).mergechroma(last)


I'm not entirely sure this is right either but but I think the code for FFT3DFilter with external motion compensation would look like this:



vf=last.mvanalyse(pel=2,blksize=8,isb=false,idx=1,overlap=4,sharp=2,truemotion=true)
vb=last.mvanalyse(pel=2,blksize=8,isb=true,idx=1,overlap=4,sharp=2,truemotion=true)
vf2=last.mvanalyse(pel=2,blksize=8,isb=false,idx=1,delta=2,overlap=4,sharp=2,truemotion=true)
interleave(\
mvcompensate(last,vf2,idx=1,thSCD1=600)\
, mvcompensate(last,vf,idx=1,thSCD1=600)\
, last\
, mvcompensate(last,vb,idx=1,thSCD1=600))
FFT3DFilter(sigma=3.7, bt=4, bw=8, bh=8, ow=4, oh=4)
selectevery(4,2)



In the test, using artificially added noise (AddNoise filter) dfttest removed more noise. But I prefer FFT3DFilter to do my denoising because I love its sharpener and I'm more familiar with it.

It seems to me that replacing FFT3DFilter(sigma=3.7, bt=4, bw=8, bh=8, ow=4, oh=4) with FFT3DFilter(sigma=3.7,bt=4,bw=32,bh=32,ow=16,oh=16) is supposed to filter noise better, but if tritical used the first one and Fizick didn't tell him to change it then I'm probably wrong; especially since I can't even tell you what those settings do.

MatLz
1st October 2009, 12:19
My plugins directory. Nothing else...

Aeris.avsi
ffavisynth.avsi
hqd.avsi
k9ma.avsi
Degrain.avsi
nrs.avsi
xpd.avsi
AddGrainC.dll
aWarpSharp.dll
aWarpSharp2.dll
deblock.dll
deen.dll
dfttest.dll
DGAVCDecode.dll
DGDecode.dll
DirectShowSource.dll
ffavisynth.dll
FFT3DFilter.dll
gradfun2db.dll
hqdn3d.dll
mt_masktools.dll
mvtools2.dll
NicAudio.dll
TIVTC.dll
TomsMoComp.dll
Toonlite.dll
vsfilter.dll
warpsharp.dll

Firebird
1st October 2009, 12:37
Oh, you made me remember that aWarpSharp also does minor halo removal, which reminds me of:

* Halo removal: DeHalo_Alpha (http://forum.doom9.org/showthread.php?t=102794). The best, bar none.

Thanks for the thorough reply :).

EdgeCleaner + Dehalo_Alpha for animated content.

g-force
1st October 2009, 15:49
Great Thread!

-G

LaTo
1st October 2009, 15:53
Denoising: MDegrain variants. And no, you're not missing anything from using "advanced" scripted variants. They all seem to be various combinations of MDegrain, prefiltered analysis clips, and lame sharpening filters.
MCTD's sharpening is: LSFmod (preblur/secure mode) + Temporal limiting + Spatial repartition

Lame? Yes, maybe... But in this case, what isn't lame? :rolleyes:

Nightshiver
1st October 2009, 18:57
Bobbing: TempGaussMC_beta1mod or MCBob
IVTC: AnimeIVTC (if simpler methods are needed, TDeint&Decimate)
AA: AnimeIVTC's internal functions (It has 4 separate methods, each able to call outside of the AnimeIVTC function)
Dotcrawl: Checkmate (never really had huge issues where checkmate didn't work)
Rainbowing: Chubbyrain2 or DFMDeRainbow
Denoising: Honestly, only real option (to me) is MVDegrain(multi). I have used dfttest and DGM, FFT3d and others in the past, I just like how well MVDegrain does it without harming any other factors. You're not (my opinion again) missing out on anything "groundbreaking" by not using MCSpuds or MCTemporalDenoise.
Sharpening: What else? LSF.
Line thinning: If ever needed, awarpsharp2
Line darkening: toon
Debanding: gradfunkmirror (You shouldn't have to deband unless you've over-filtered or have a rare source, at least in my experience)
Noise adding: Never had to. Grainfactory3 has good reviews though.
Autolevels: Never. I do manual color correction when needed.

On other notes, FizzKillerMulti is good for old/seriously crappy sources that have noise that cannot be taken out by other means. Dehalo_alpha is also the best for removing halo's, and Srestore for getting PAL transfers back to PAL or other blending crap.

halsboss
2nd October 2009, 06:11
Denoising: Convolution3D ... does no one like C3D anymore ? Or PixieDust (albeit no MTing with this) ?
Big Denoising: MDegrain1, MDegrain2, MDegrain3
DeSpoting: DeSpot
Sharpening: LimitedSharpenFaster
Deblocking: Deblock_QED_MT2
Automatic levels: HDRAGC
Resizing: lanczos4resize and spline36resize

Just wondering if some of the answers may be different for interlaced/progressive input vs progressive ? ie what techniques do people use to deal with interlaced material...

onesloth
2nd October 2009, 06:51
"Heavy" Denoiser / Degrainer: MDegrain2 with MT. Light up all 8 cores. I usually produce lots of encodes from one source, so I will create a degrained "mezzanine" file as an intermediate.

I particularly like first creating a denoised source like this (maybe with a FFT3D prefiltered analysis clip) because MDegrain often solves other seemingly non-noise issues (e.g. blocking), eliminating the need for other filters.

halsboss
2nd October 2009, 08:39
I particularly like first creating a denoised source like this (maybe with a FFT3D prefiltered analysis clip) because MDegrain often solves other seemingly non-noise issues (e.g. blocking), eliminating the need for other filters.Gee, do you have a link to a MT type script handy ?

onesloth
2nd October 2009, 11:21
Gee, do you have a link to a MT type script handy ?
http://avisynth.org.ru/mvtools/mvtools2.html
http://avisynth.org/mediawiki/MT
Those two should put you in business.:p

I made TemporalDegrain_MT (http://forum.doom9.org/showthread.php?t=147540) (if you really want to use MT()) and TemporalDegrain_ChromaMod (http://forum.doom9.org/showthread.php?t=147548) (for SetMTMode()) a while ago but I stopped using TemporalDegrain after noticing motion blur in particular sources. Now I just use a modification of FastDegrain (http://avisynth.org/mediawiki/Temporal_Degrain) with added prefiltered clip and chroma parameters with SetMTMode(2). I like to keep it simple.

thewebchat
2nd October 2009, 18:01
Just wondering if some of the answers may be different for interlaced/progressive input vs progressive ? ie what techniques do people use to deal with interlaced material...

We deal with interlaced material by deinterlacing of course!

Nightshiver
2nd October 2009, 18:07
If, like he may have been wondering, what actual filters some use, it's simply a matter of preference. AnimeIVTC, TFM, telecide, yadif, the list goes on and on.

JohannesL
2nd October 2009, 21:27
[/cygdrive/i/Encoding/AviSynth plugins]% ls
AAA.avs RepairSSE2.dll aWarpSharp.dll
AddGrainC.dll SangNom.dll colors_rgb.avs
DirectShowSource.dll Soothe.avs gradfun2db.dll
EdgeCleaner.avs SubExSoftShade.avs jdl-effects.avs
GradFun2DBmod.v1.3.avs SubtitleEx.dll jdl-range.avs
GrainFactory3.avs TASCompSub.avs jdl-util.avs
KenBurnsEffect.avs TCPDeliver.dll jdl-wrappers.avs
LSFmod.v1.8.avs Toon-v1.0.dll libsndfile-1.dll
RSharpenSSE2.dll TransAll.dll mt_masktools-26.dll
RangeFPS.avs UnFilter.dll mvtools2.dll
RemoveGrainSSE2.dll VariableBlur.dll nnedi2.dll

Gavino
2nd October 2009, 23:10
... mt_masktools-26.dll ...
Are you running Avisynth 2.6?
If not, you should be using mt_masktools-25.dll.

rtjnyoface
2nd October 2009, 23:58
TomsMoComp and Lanczos4. That's it :p :).

halsboss
3rd October 2009, 03:16
We deal with interlaced material by deinterlacing of course!Oh. I've seem some scripts separating fields and using some plugins whereas others however don't necessarily work nicely that way. Apparently some filters have an interlaced parameter to deal with interlaced. Was just wondering.

levi
3rd October 2009, 03:29
No one still uses pixiedust ? except me? pixiedustMT is it real?

http://seraphy.fam.cx/~seraphy/cgi-bin/srch.cgi?logs=.%2Fcbbs.dat&word=dllno

Nightshiver
3rd October 2009, 05:35
Probably because there are much better filters out there besides pixiedust....

Chainmax
3rd October 2009, 16:10
I see many recommendations for Checkmate, guess I'm gonna have to check it out then :).

Blue_MiSfit: neuron2's CUDA tools sound interesting, I'm going to read up on them. Are you referring to DG[AVC/MPG/VC1]DecNV? As for MDegrain2 with MT, does that mean using SetMTMode? Finally, what difference do you see between LSF and LSFMod?

MadRat: I have never tried ChubbyRain2, but what amazed me with FFD3D on chroma is just how amazingly well it does, and unlike all the alternatives I tried does not seem to have side-effects. I have tried FastLineDarken, and to me it seemed like it would cause some very slight aliasing on a few spots, which I have not seen with VmToon. Then again, line darkening is something I did very few times.
Motion compensation sounds interesting, gonna have to visit the thread you linked to and ask around.

Firebird: Edgecleaner? Never heard of it, sounds promising though. Is it this:

# EdgeCleaner() v1.03 (06/08/2008)
# - a simple edge cleaning and weak dehaloing function
#
# Description:
# Functions have been briefly tested to work with MT on mode 1 and 2 without any problems
#
# Requirements:
# aWarpSharp, mt_masktools, Repair (optional), RemoveGrain (optional) and Deen (optional) plugins required
# YV12 input required and mod16 or even mod32 input is preferred since aWarpSharp borks sometimes
#
# Parameters:
# strength (float) - specifies edge denoising strength (8.0)
# rep (boolean) - actives Repair for the aWarpSharped clip (true; requires Repair)
# rmode (integer) - specifies the Repair mode; 1 is very mild and good for halos,
# 16 and 18 are good for edge structure preserval on strong settings but keep more halos and edge noise,
# 17 is similar to 16 but keeps much less haloing, other modes are not recommended (17; requires Repair)
# smode (integer) - specifies what method will be used for finding small particles, ie stars; 0 is disabled,
# 1 uses RemoveGrain and 2 uses Deen (0; requires RemoveGrain/Repair/Deen)
# hot (boolean) - specifies whether removal of hot pixels should take place (false)
# fix (boolean) - fixes an aWarpSharp bug by overlaying a healthy pixel from the source clip;
# good idea to set to false when over-cropping afterwards (true)

function EdgeCleaner(clip c, float "strength", bool "rep", int "rmode", int "smode", bool "hot", bool "fix") {

strength = default(strength, 8.0)
rep = default(rep, true)
rmode = default(rmode, 17)
smode = default(smode, 0)
hot = default(hot, false)
fix = default(fix, true)

c = (c.isYV12()) ? c : c.ConvertToYV12()
strength = (smode==0) ? strength : strength+4

main = c.aWarpSharp(strength,1)
main = (rep) ? Repair(main,c,rmode) : main

mask = c.mt_edge("prewitt",4,32,4,32).mt_invert().mt_convolution()

final = (!hot) ? mt_merge(c,main,mask) : Repair(mt_merge(c,main,mask),c,2)
final = (fix) ? Overlay(final,c.ConvertToRGB24().Crop(0,1,-c.width+1,-c.height+2),x=0,y=1) : final
final = (smode != 0) ? mt_merge(final,c,c.StarMask(smode)) : final

return final

}

function StarMask(clip c, int "mode") {

mode = default(mode, 1)

clean = (mode==1) ? c.RemoveGrain(17) : Repair(c.Deen("a3d",4,12,0),c,15).RemoveGrain(21)
diff = (mode==1) ? mt_makediff(c,clean) : NOP

final = (mode==1) ? diff.Greyscale().Levels(40,0.350,168,0,255).removegrain(7,-1).mt_edge("prewitt",4,16,4,16) : \
Subtract(mt_merge(clean,c,c.mt_edge("roberts",0,2,0,2).mt_expand(mode=mt_circle(1)).mt_invert()),c).mt_edge("roberts",0,0,0,0).mt_deflate()

return final

}

# Changelog:
# 06/08/2008 v1.03
# - improved mask that leaves less warping and more original line structure, therefore higher strengths are now safe to use
# - improved StarMask()
# - removed super mode
# - removed srep, sshiqloc, some smodes and VD_SmartSmoothHiQ() due to StarMask() changes
# 01/06/2008 v1.02
# - added srep parameter
# - improved particle masking
# 01/06/2008 v1.01
# - added masking for particles with two parameters; smode and sshiqloc
# 12/05/2008 v1.00
# - removed line darkening, mode 2 mask, RemoveGrain
# - assert changed to colorspace conversion to yv12
# - fixed some logic problems
# - "fixed" the aWarpSharp black pixel bug
# - added Repair

?

Nightshiver: I read about SRestore a few days ago, it needs bobbing before it, and Didée recommended not to use MCed bobbers, to use stuff like TDeint or YadifMod instead, right?


Thanks for all the replies so far guys, keep them coming :).

Firebird
3rd October 2009, 17:39
Is it this:
Yes. Try it :)
Examples:
original (http://img115.imageshack.us/img115/9118/originall.png)

Dehalo_alpha(darkstr=0) + Edgecleaner(12) (http://img43.imageshack.us/img43/65/dhaedgeclean.png)

leon1789
3rd October 2009, 20:26
Denoising: MDegrain[1/2/3] , RemoveGrain(mode=[1/2/27]) (and sometimes Deen)
Sharpening: SoftSharpen :) http://forum.doom9.org/showthread.php?t=149395
Debanding: Gradfun2dbMod :) http://forum.doom9.org/showthread.php?t=144537 (faster than Gradfunkmirror)
Noise adding: Never.
Autolevels: Never.
Resizing: Lanczos4 (or bicubic(b=0,c=[0.5/0.8]) for speed)

canuckerfan
3rd October 2009, 20:45
IVTC: TIVTC+YadifMod+NNEDI2+Vinverse
Field Blending: SRestore(memory leak's been fixed now) or new RePal which goes to 25.000 fps
Spot Removal: I use either DeSpot+DepanInterleave+DepanEstimate or RemoveNoiseMC
Denoising: MCTemporalDenoise
Deblocking: I mostly deal with mpeg2 stuff so I just stick with cpu=4 from the DGDecode package
Edgeclean/Debanding: MCTemporalDenoisePP
Dehalo: Dehalo_Alpha (or Masked_DHA - although I don't see too much of an advantage)
Colours: HDRAGC for bringing out shadow detail and SmoothLevels for levels correction
Sharpening: LSFMod
Smart Bobbers: TempGaussMC_beta1mod

oh and if you do runtime environment stuff then definately check out GRunT

Nightshiver: I read about SRestore a few days ago, it needs bobbing before it, and Didée recommended not to use MCed bobbers, to use stuff like TDeint or YadifMod instead, right?
really? curious about that...

Blue_MiSfit
3rd October 2009, 21:05
@Chainmax:

CUDA tools indeed. You're on the right track. Well worth the $15 to get a free decode and bob for true 1080i content. It makes going to 720p60 SO MUCH FASTER!

I've never had good results with SetMTMode... not sure why. It doesn't seem to run any faster!!

So, I always use MT(...) like this (from MVTools2 docs)


MT("""
super = MSuper(pel=2, sharp=1)
backward_vec2 = super.MAnalyse(isb = true, delta = 2, overlap=4)
backward_vec1 = super.MAnalyse(isb = true, delta = 1, overlap=4)
forward_vec1 = super.MAnalyse(isb = false, delta = 1, overlap=4)
forward_vec2 = super.MAnalyse(isb = false, delta = 2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
""",4,4) # four threads, 4 pixels of overlap


Regarding LSF / LSFMod, I've just found LSFMod to be a little better at enhancing sharpness without looking oversharpened. But, the differences are subtle. It's also fairly up-to-date WRT dependencies, not sure what stuff LSF requires.

Also, regarding SRestore, you're indeed correct in remembering that you should never smart bob blended fields. A regular bobber with good spatial interpolation, like YADIFMod + NNEDI(2) will do nicely!

~MiSfit

Nightshiver
3rd October 2009, 21:06
You can use MCBob, but I haven't encountered any ill effects yet. But yes, you would be better off using yadifmod or TempGaussMC_beta1mod.

Blue_MiSfit
3rd October 2009, 21:23
@Nightshiver - If you're referring to bobbing field blended sources in preparation for deblending, then I definitely disagree, and so does Didee ;)

~MiSfit

canuckerfan
3rd October 2009, 21:39
isn't yadifmod a smart bobber?

thewebchat
3rd October 2009, 23:16
Yes, it is. Yadif, Yadifmod, and TDeint are all motion-adaptive (smart) deinterlacers, and they all have full-rate (bob) modes.

Blue_MiSfit
3rd October 2009, 23:52
I think I got my terminology wrong. You don't want to use motion compensated bobbers like TempGaussMC or MCBob.

I'm not sure if it's detrimental to use such a bobber, it just might be a huge waste of CPU time ;)

At any rate, I do believe Didee specifically mentioned YADIF etc as "safe" to use..

~MiSfit

MatLz
4th October 2009, 07:38
For anime edges deringing, hqd is not bad too :

#hqd 0.2
#Based on HQDering by Mf

function hqd(clip C,int "str",int "exp",int "rad")
{
str=default(str,10)
exp=default(exp,7)
rad=default(rad,2)
mm=mt_lutxy(C,xsharpen(C,127,255),"x y - abs 1 - 63 *",u=1,v=1)
mt_merge(C,C.deen("a2d",rad,str,str),mt_lutxy(mm,xpd(mm,exp),"y x - 63 - 1.5 *",u=1,v=1))
}

function xpd(clip C,int "nt")
{
nt=default(nt,0)
(nt>0)?mt_expand(C,u=1,v=1):C
return((nt>1)?xpd(last,nt-1):last)
}

LaTo
4th October 2009, 08:17
Finally, what difference do you see between LSF and LSFMod?

Here is the complete changelog (some bugfix, but many improvements):

http://forum.doom9.org/showthread.php?t=142706

LSFmod has 3 presets:

LSFmod(defaults="slow") -> slow paramaters (default)
LSFmod(defaults="fast") -> faster parameters
LSFmod(defaults="old") -> same parameters as LSF, the output will be exactly the same as LimitedSharpenFaster

If you want comparaison picture:
this with LSFmod 1.4 (http://forum.doom9.org/showthread.php?p=1245621#post1245621)
or this for new Smode=5 (http://forum.doom9.org/showthread.php?p=1212516#post1212516)

:)

MadRat
6th October 2009, 13:22
Oh yeah, the one script I can't do with out: RemoveDirt (http://forum.doom9.org/showthread.php?t=70856). I don't use it very often but whenever I have old, speckled video it's must have filter.

owais
7th October 2009, 22:54
* Very severe blocking: a variation on this great suggestion Didée gave me a long time ago:

- deblock_QED (remove blocking, but keep detail) (-> it's on kassandro's forum, search)
- soft upsampling (perhaps gaussian) to ~150%
- extreme LimitedSharpen (updated version), with Smode=3, strength=1000, wide=true, soft=75~100
- 2x Upsampling by EEDI2, or custom script with good old SangNom
- lanczos to final destination size

- temporal filtering somewhere inbetween, perhaps MC'ed
- eventually use SeeSaw instead of LimitedSharpen, or even both



hey thnx for all info but i m confused with this, i deal wid sometimes very blocky stuff so plz can u give more detail abt it
like u mean that upscale to 150% softly through guassian? but when i use gaussion it has values :confused:
i didnt understand what u mean by MC'ed

Nightshiver
8th October 2009, 01:26
MC'ed = MoComp'ed = Motion Compensated

Chainmax
8th October 2009, 22:23
owais: like Nightshiver correctly pointed out, MCed is a contraction of "Motion COmpensated" A good starting point for that would be MVDegrain1/2/3, as its usage implies the use of motion vectors. As for a soft GaussResize to ~150% size, that means using it with a low p parameter (default is ok) and use an output resolution with ~1.5x the pixelcount, always with dimensions rounded up to their nearest multiple of 16. For example 640x480 ==> GaussResize(784,592). No need to worry about slight differences in aspect ratio since you will be doing another resize to the final resolution anyway.

owais
9th October 2009, 00:05
owais: like Nightshiver correctly pointed out, MCed is a contraction of "Motion COmpensated" A good starting point for that would be MVDegrain1/2/3, as its usage implies the use of motion vectors. As for a soft GaussResize to ~150% size, that means using it with a low p parameter (default is ok) and use an output resolution with ~1.5x the pixelcount, always with dimensions rounded up to their nearest multiple of 16. For example 640x480 ==> GaussResize(784,592). No need to worry about slight differences in aspect ratio since you will be doing another resize to the final resolution anyway.

thnx very much reallyyy :thanks:

pdadi
9th October 2009, 03:42
IVTC: TIVTC+YadifMod+NNEDI2+Vinverse
Field Blending: SRestore(memory leak's been fixed now) or new RePal which goes to 25.000 fps
Spot Removal: I use either DeSpot+DepanInterleave+DepanEstimate or RemoveNoiseMC
Denoising: MCTemporalDenoise
Deblocking: I mostly deal with mpeg2 stuff so I just stick with cpu=4 from the DGDecode package
Edgeclean/Debanding: MCTemporalDenoisePP
Dehalo: Dehalo_Alpha (or Masked_DHA - although I don't see too much of an advantage)
Colours: HDRAGC for bringing out shadow detail and SmoothLevels for levels correction
Sharpening: LSFMod
Smart Bobbers: TempGaussMC_beta1mod

oh and if you do runtime environment stuff then definately check out GRunT


really? curious about that...

Caould you please point to new repal? Thanks

canuckerfan
9th October 2009, 06:23
^http://forum.doom9.org/showthread.php?t=48401&page=2

see around the middle of the page for the attached file

Keiyakusha
10th October 2009, 00:54
For anime edges deringing, hqd is not bad too :

#hqd 0.2
#Based on HQDering by Mf

function hqd(clip C,int "str",int "exp",int "rad")
{
str=default(str,10)
exp=default(exp,7)
rad=default(rad,2)
mm=mt_lutxy(C,xsharpen(C,127,255),"x y - abs 1 - 63 *",u=1,v=1)
mt_merge(C,C.deen("a2d",rad,str,str),mt_lutxy(mm,xpd(mm,exp),"y x - 63 - 1.5 *",u=1,v=1))
}

function xpd(clip C,int "nt")
{
nt=default(nt,0)
(nt>0)?mt_expand(C,u=1,v=1):C
return((nt>1)?xpd(last,nt-1):last)
}

This is a nice thing! Exactly what i need right now. Where did you find it?

Caroliano
25th January 2010, 20:09
http://avisynth.org.ru/mvtools/mvtools2.html
http://avisynth.org/mediawiki/MT
Those two should put you in business.:p

I made TemporalDegrain_MT (http://forum.doom9.org/showthread.php?t=147540) (if you really want to use MT()) and TemporalDegrain_ChromaMod (http://forum.doom9.org/showthread.php?t=147548) (for SetMTMode()) a while ago but I stopped using TemporalDegrain after noticing motion blur in particular sources. Now I just use a modification of FastDegrain (http://avisynth.org/mediawiki/Temporal_Degrain) with added prefiltered clip and chroma parameters with SetMTMode(2). I like to keep it simple.
Care to share your version of FastDegrain? I ended up duplicating some work here (http://forum.doom9.org/showthread.php?t=152326&highlight=fastdegrain), and now I'm interested in your modifications.

MatLz
25th January 2010, 20:19
@Keyakusha
Sorry I just see your post now!

I made it by modifying HQdering. I'm actually at the 0.4 version but not yet public because I want to integrate it in an 'all in one function for animes'.
Work in progress...since a long time now:D

onesloth
26th January 2010, 19:17
Care to share your version of FastDegrain? I ended up duplicating some work here (http://forum.doom9.org/showthread.php?t=152326&highlight=fastdegrain), and now I'm interested in your modifications.

Sure
###################################################################
# Fast Degrain by Sagekilla #
# #
# Easy to use alias for MDegrain 1, 2, or 3. #
# Features optional sharpening if you should desire. #
# #
# Required plugins: HQDn3d.dll / LimitedSharpenFaster.avs #
# MT.dll / mt_masktools.dll / MVTools2.dll #
# #
###################################################################

# Fast Degrain Syntax
#
# degrain = MVDegrain 1, 2, or 3. Each is increasingly stronger and slower.
# blksize = MVAnalsye blksize. See MVTools documentation for details.
# overlap = MVAnalyse overlap. Must be even and < blksize/2. Higher values are better, but slower.
# pel = MVAnalyse subpixel accuracy. Higher values give better MVs and lowers speed.
# thSAD = Affects degraining: Low values reduce degraining, high values raise it.
# limit = Limits max MVDegrain change. Decrease if you experience artifacts.
# sharp = Enables LSF sharpening. Disable for speed and compression boost.
# str = LSF's sharpening strength. Increase for more sharpening.
# ss = Supersampling for LSF, values over 1 decrease edge aliasing.
# sft = Dampens LSF sharpening (It weakens the sharpening)
# oshoot = Sharpening limit, increase it too much and it causes haloing.

##################
#
# My Changes:
#
# chroma parameter
# plane variable
# pel default to 2
# enable use of external prefiltered clip with "pre" parameter
#
##################

function FastDegrain( clip src, clip "pre", int "degrain", int "blksize", int "overlap", int "pel",
\ int "thSAD", int "limit", bool "sharp", int "str", int "ss", int "sft", int "oshoot", bool "chroma", bool "SMTM")
{
degrain = default( degrain, 2 ) # Degraining method (1 - 3)
blksize = default( blksize, 8 ) # MAnalyse block size (4, 8, 16)
overlap = default( overlap, blksize/2 ) # MVAnalyse block overlap (even, ov<=blksize/2)
pel = default( pel, 2 ) # MVAnalyse pel (1, 2, 4)
thSAD = default( thSAD, 400 ) # MVDegrain thSAD
limit = default( limit, 255 ) # MVDegrain limit (0 - 255)
sharp = default( sharp, false ) # Toggles LSF
str = default( str, 160 ) # LSF strength
ss = default( ss, 1.5 ) # LSF supersampling
sft = default( sft, 30 ) # LSF soft
oshoot = default( oshoot, 1 ) # LSF overshoot
chroma = default( chroma, true ) # enables chroma processing
plane = (chroma) ? 4 : 0

try {
SMTMdefaultmode = GetMTMode()
SMTM = (SMTMdefaultmode!=0)
} catch(err_msg) {SMTM = false}

# Sharpen the video a bit to counter the slight loss of detail and texture.
# I prefer how the video looks with this before. You can also do this after degraining.
src = (sharp==true) ? src.LimitedSharpenFaster(strength=str,ss_x=ss,ss_y=ss,soft=sft,overshoot=oshot) : src

(SMTM) ? SetMTMode(2) : NOP()

# Create our Super clip for MV search. Then, search for motion vectors.
super = src.MSuper(pel=pel, chroma=chroma)
search_super = (defined(pre)) ? pre.MSuper(pel=pel, chroma=chroma) : super

bvec3 = (degrain>=3) ? MAnalyse( search_super, isb=true, delta=3, blksize=blksize, overlap=overlap, chroma=chroma ) : NOP()
bvec2 = (degrain>=2) ? MAnalyse( search_super, isb=true, delta=2, blksize=blksize, overlap=overlap, chroma=chroma ) : NOP()
bvec1 = (degrain>=1) ? MAnalyse( search_super, isb=true, delta=1, blksize=blksize, overlap=overlap, chroma=chroma ) : NOP()
fvec1 = (degrain>=1) ? MAnalyse( search_super, isb=false, delta=1, blksize=blksize, overlap=overlap, chroma=chroma ) : NOP()
fvec2 = (degrain>=2) ? MAnalyse( search_super, isb=false, delta=2, blksize=blksize, overlap=overlap, chroma=chroma ) : NOP()
fvec3 = (degrain>=3) ? MAnalyse( search_super, isb=false, delta=3, blksize=blksize, overlap=overlap, chroma=chroma ) : NOP()

# Degraining the video using MVDegrain. Nothing special here.
src = (degrain==1) ? src.MDegrain1( super, bvec1, fvec1, limit=limit, plane=plane ) : src
src = (degrain==2) ? src.MDegrain2( super, bvec1, fvec1, bvec2, fvec2, limit=limit, plane=plane ) : src
src = (degrain>=3) ? src.MDegrain3( super, bvec1, fvec1, bvec2, fvec2, bvec3, fvec3, limit=limit, plane=plane ) : src

(SMTM) ? SetMTMode(SMTMdefaultmode) : NOP()
return src
}

rkalwaitis
26th January 2010, 19:21
Onesloth

I have a different version of the script.

###################################################################
# Fast Degrain by Sagekilla #
# #
# Easy to use alias for MDegrain 1, 2, or 3. #
# Features optional sharpening if you should desire. #
# #
# Required plugins: HQDn3d.dll / LimitedSharpenFaster.avs #
# MT.dll / mt_masktools.dll / MVTools2.dll #
# #
###################################################################

# Fast Degrain Syntax
#
# degrain = MDegrain 1, 2, or 3. Each is increasingly stronger and slower.
# blksize = MAnalsye blksize. See MVTools documentation for details.
# overlap = MAnalyse overlap. Must be even and < blksize/2. Higher values are better, but slower.
# pel = MAnalyse subpixel accuracy. Higher values give better MVs and lowers speed.
# thSAD = Affects degraining: Low values reduce degraining, high values raise it.
# limit = Limits max MVDegrain change. Decrease if you experience artifacts.
# sharp = Enables LSF sharpening. Disable for speed and compression boost.
# str = LSF's sharpening strength. Increase for more sharpening.
# ss = Supersampling for LSF, values over 1 decrease edge aliasing.
# sft = Dampens LSF sharpening (It weakens the sharpening)
# oshoot = Sharpening limit, increase it too much and it causes haloing.

function FastDegrain( clip src, int "degrain", int "blksize", int "overlap", int "pel",
\ int "thSAD", int "limit", bool "sharp", int "str", int "ss", int "sft", int "oshoot")
{
degrain = default( degrain, 2 ) # Degraining method (1 - 3)
blksize = default( blksize, 8 ) # MAnalyse block size (4, 8, 16)
overlap = default( overlap, blksize/2 ) # MVAnalyse block overlap (even, ov<=blksize/2)
pel = default( pel, 1 ) # MVAnalyse pel (1, 2, 4)
thSAD = default( thSAD, 400 ) # MVDegrain thSAD
limit = default( limit, 255 ) # MVDegrain limit (0 - 255)
sharp = default( sharp, false ) # Toggles LSF
str = default( str, 160 ) # LSF strength
ss = default( ss, 1.5 ) # LSF supersampling
sft = default( sft, 30 ) # LSF soft
oshoot = default( oshoot, 1 ) # LSF overshoot


# Sharpen the video a bit to counter the slight loss of detail and texture.
# I prefer how the video looks with this before. You can also do this after degraining.
src = (sharp==true) ? src.LimitedSharpenFaster(strength=str,ss_x=ss,ss_y=ss,soft=sft,overshoot=oshot) : src

# Create our Super clip for MV search. Then, search for motion vectors.
super = src.MSuper(pel=pel)
bvec3 = (degrain>=3) ? super.MAnalyse(isb=true, delta=3, blksize=blksize, overlap=overlap) : NOP()
bvec2 = (degrain>=2) ? super.MAnalyse(isb=true, delta=2, blksize=blksize, overlap=overlap) : NOP()
bvec1 = (degrain>=1) ? super.MAnalyse(isb=true, delta=1, blksize=blksize, overlap=overlap) : NOP()
fvec1 = (degrain>=1) ? super.MAnalyse(isb=false, delta=1, blksize=blksize, overlap=overlap) : NOP()
fvec2 = (degrain>=2) ? super.MAnalyse(isb=false, delta=2, blksize=blksize, overlap=overlap) : NOP()
fvec3 = (degrain>=3) ? super.MAnalyse(isb=false, delta=3, blksize=blksize, overlap=overlap) : NOP()

# Degraining the video using MVDegrain. Nothing special here.
src = (degrain==1) ? src.MDegrain1(super, bvec1, fvec1, limit=limit) : src
src = (degrain==2) ? src.MDegrain2(super, bvec1, fvec1, bvec2, fvec2, limit=limit) : src
src = (degrain>=3) ? src.MDegrain3(super, bvec1, fvec1, bvec2, fvec2, bvec3, fvec3, limit=limit) : src

return src
}

Maybe yours is newer.

onesloth
26th January 2010, 19:26
Maybe yours is newer.

It just has changes that I made to the original script.

rkalwaitis
26th January 2010, 19:31
Well then I would like to try yours too. :) Thanks for sharing

Could you please let me have an example of a prefilter's use with your changes.

onesloth
26th January 2010, 22:38
Could you please let me have an example of a prefilter's use with your changes.

You would want to use another denoiser for the prefiltered clip (fft3dfilter(), fft3dGPU(), blur().blur().blur(), etc.). You can safely use very strong denoising for the prefiltered clip without negatively affecting the detail of fastdegrain's output much. The banding created by fft3d won't create banding in the final result either. That banding will however have an odd effect that I have difficulty describing if you set fft3d's sigma too high.
Use something like:
src = last
pre = fft3dGPU(sigma=8)
src.fastdegrain(pre=pre)

kool
27th January 2010, 07:48
On other notes, FizzKillerMulti is good for old/seriously crappy sources that have noise that cannot be taken out by other means.

I would like to test this filter or similar one for better quality, haven't use it before, uploading it will help me alot to get the right version.

rkalwaitis
27th January 2010, 10:29
thanks Onesloth

Lyle_JP
27th January 2010, 17:37
I don't think I'm near anyone's level here, but I have been slowly converting my entire DVD library to .mp4 and, mostly through trial and error, I have found some filters I like more than others. If anyone has some suggestions/criticisms of my list I'm open to them. I'm always on the lookout for better PQ, so long as I can maintain a decent 8 FPS or better when encoding. Note that nearly everything I work with is film-based (except concerts) and DVD-sourced, and I do not have an interest in anime at all, so my go-to filters may differ from most here.

Resize: Spline64
Noise, grain, light deblock: DegrainMedian, MVTools+DegrainMedian, MDegrain (in order of strength, lowest to highest)
Medium deblock: cpu=4 parameter in DGDecode
Mosquito noise ONLY: cpu2="ooooxx" in DGDecode (if there's mosquito noise plus other noise, then DegrainMedian will get it instead)
Rainbows: ChubbyRain2
Ringing/EE: Dehalo_alpha (I use this one a lot)
Straight deinterlace: Yadif
Bobbing: TDeint
Undoing PAL->NTSC: srestore() (Not sure why so many concert videos were shot with PAL video cameras, but it seems like almost half)
Stray combing: FieldDeinterlace(full=false) (when I don't care enough to re-index for IVTC)
IVTC: 95% of the time, TFM+TDecimate is fine, but some stuff seems to need Telecide, mostly thanks to it's Vthresh parameter. Even still, I find Tdecimate to be superior to Decomb's decimater in most cases (especially when there is 12 fps material present, like animated title sequences), and as odd as it may seem I often combine Telecide with TDecimate. Not sure why so many of you use bobbers in your IVTC scripts. Must be an anime thing.

Also, I do all of my denoising before resizing (seems to help Spline64 give an even more detailed picture) but this can cause banding if I'm not careful. Except for Undot(), which is nearly always the last line of my script, unless I whipped out the MVTools, in which case Undot becomes a pretty worthless afterthought.

Chainmax
28th January 2010, 03:35
@Keyakusha
Sorry I just see your post now!

I made it by modifying HQdering. I'm actually at the 0.4 version but not yet public because I want to integrate it in an 'all in one function for animes'.
Work in progress...since a long time now:D

Very interesting....HQDering was a really amazing halo remover, and it actually sharpened the image a little bit if I recall correctly. However, I also recall that it could cause aliasing. Have you tested your modification in that regard? If so, has it improved on that? I will try it myself, of course, but I am curious about your thoughts on that.

MatLz
28th January 2010, 04:24
In previous or actual version, no aliasing to signal....or I'm half blind!:eek:

The only problem with 0.2 is the default value of the mask edges 'exp'...a little too much....2 to 5 should be enough for regular using.

If I correctly remember it should be 2 or (3) times faster than original HQDering.