Log in

View Full Version : How to fix problem with ringing edges


Dual65
24th January 2010, 22:55
Well I'm a noob yet so I don't how to fix this. This is some pictures of my problem:
http://img192.imageshack.us/img192/9974/46733073.pnghttp://img192.imageshack.us/img192/919/78724727.png
PS: My problem is not the noise, that's why I make that circle.
Somebody know what is this? Any filter can fix that?
PS: There is a unprocessed sample(0:40) without audio: download (http://www.mediafire.com/?mmdwtonynmd)

Vitaliy Gorbatenko
25th January 2010, 07:25
Use a EdgeCleaner.avs and/or dehaloh.avsi. Use a search!!!!!

rkalwaitis
25th January 2010, 17:25
MC Spuds has an anime preset (two of them) and the capabilities to dering/dehalo and clean edges.

LaTo
25th January 2010, 19:55
MCTemporalDenoise too, and if you don't need to denoise: MCTemporalDenoisePP ;)

MatLz
25th January 2010, 20:21
hqd:
http://forum.doom9.org/showpost.php?p=1331387&postcount=33

rkalwaitis
25th January 2010, 21:47
So true Lato, I forgot about that little gem.

Dual65
27th January 2010, 03:09
Well, thx guys, for answer me, but when I try to use MC Spuds I get this "new" problem that appear in MeGui preview:
http://img251.imageshack.us/img251/9623/89446799.png
PS: Just like I say before, I'm a noob, so I use MC Spuds in default(MC_Spuds() ) and like you see my problem still there. Can someone give me the code that I have to use?

poisondeathray
27th January 2010, 03:22
Where is the original source?

Dual65
28th January 2010, 00:32
/\
Here (http://www.mediafire.com/?mmdwtonynmd)

poisondeathray
28th January 2010, 00:37
/\
Here (http://www.mediafire.com/?mmdwtonynmd)

This is not the original source. It already has been encoded using x264...

rkalwaitis
29th January 2010, 09:27
Try Motion Compensated DFTTEST, it is slow, but may give you the results you need.

##################################################################
# Motion Compensated dfttest by anon32 #
# Aka: Really Really Really Slow #
# #
# Requirements: #
# dfttest #
# MVTools2 #
# #
# Description of function parameters: #
# #
# pp = Clip to calculate vectors from (default input) #
# mdg = Run MDegrain before dfttest (default false) #
# mdgthSAD = thSAD for MDegrain (default 400) #
# mcradius = Number of frames to compensate (default 3, max 5) #
# #
# All dfttest parameters except threads and opt are supported. #
# MVTools2 pel, thSCD, thSAD, blksize, overlap, dct, and search #
# are also supported. #
# #
# sigma is the main control of dfttest strength. mcradius should #
# not be set to less than (tbsize-1)/2. #
##################################################################


function dfttestMC (clip input, clip "pp", bool "Y", bool "U", bool "V", int "ftype", float "sigma", float "sigma2", float "pmin", float "pmax",
\ int "sbsize", int "smode", int "sosize", int "tbsize", int "tmode", int "tosize", int "swin", int "twin", float "sbeta", float "tbeta", bool "zmean",
\ string "sfile", string "sfile2", string "pminfile", string "pmaxfile", float "f0beta", string "nfile", int "mcradius", bool "mdg", int "mdgthSAD",
\ int "thSAD", int "thSCD1", int "thSCD2", int "blksize", int "pel", int "overlap", int "dct", int "search")
{
pp = default(pp, input)

# mvtools-related options
mcradius = default(mcradius, 3)
mcradius = Max(Min(mcradius,5),1)
mdg = default(mdg, false)
overlap = default(overlap, 2)

# MSuper
pp_super = pp.MSuper(pel=pel)

# Motion vector search
b5vec = (mcradius>=5) ?
\ MAnalyse(pp_super,isb=true,search=search,delta=5,overlap=overlap,blksize=blksize,dct=dct) : NOP
b4vec = (mcradius>=4) ?
\ MAnalyse(pp_super,isb=true,search=search,delta=4,overlap=overlap,blksize=blksize,dct=dct) : NOP
b3vec = (mcradius>=3) ?
\ MAnalyse(pp_super,isb=true,search=search,delta=3,overlap=overlap,blksize=blksize,dct=dct) : NOP
b2vec = (mcradius>=2) ?
\ MAnalyse(pp_super,isb=true,search=search,delta=2,overlap=overlap,blksize=blksize,dct=dct) : NOP
b1vec = MAnalyse(pp_super,isb=true,search=search,delta=1,overlap=overlap,blksize=blksize,dct=dct)
f1vec = MAnalyse(pp_super,isb=false,search=search,delta=1,overlap=overlap,blksize=blksize,dct=dct)
f2vec = (mcradius>=2) ?
\ MAnalyse(pp_super,isb=false,search=search,delta=2,overlap=overlap,blksize=blksize,dct=dct) : NOP
f3vec = (mcradius>=3) ?
\ MAnalyse(pp_super,isb=false,search=search,delta=3,overlap=overlap,blksize=blksize,dct=dct) : NOP
f4vec = (mcradius>=4) ?
\ MAnalyse(pp_super,isb=false,search=search,delta=4,overlap=overlap,blksize=blksize,dct=dct) : NOP
f5vec = (mcradius>=5) ?
\ MAnalyse(pp_super,isb=false,search=search,delta=5,overlap=overlap,blksize=blksize,dct=dct) : NOP

# Optional MDegrain
super = input.MSuper(pel=pel,levels=1)
degrained = (mcradius>=3 && mdg) ? input.MDegrain3(super,b1vec,f1vec,b2vec,f2vec,b3vec,f3vec,thSAD=mdgthSAD,thSCD1=thSCD1,thSCD2=thSCD2) :
\ (mcradius==2 && mdg) ? input.MDegrain2(super,b1vec,f1vec,b2vec,f2vec,thSAD=mdgthSAD,thSCD1=thSCD1,thSCD2=thSCD2) :
\ (mdg) ? input.MDegrain1(super,b1vec,f1vec,thSAD=mdgthSAD,thSCD1=thSCD1,thSCD2=thSCD2) : input

# Motion Compensation
degrained_super = (mdg) ? degrained.MSuper(pel=pel,levels=1) : super
b5clip = (mcradius>=5) ?
\ degrained.MCompensate(degrained_super,b5vec,thSAD=thSAD,thSCD1=thSCD1,thSCD2=thSCD2) : NOP
b4clip = (mcradius>=4) ?
\ degrained.MCompensate(degrained_super,b4vec,thSAD=thSAD,thSCD1=thSCD1,thSCD2=thSCD2) : NOP
b3clip = (mcradius>=3) ?
\ degrained.MCompensate(degrained_super,b3vec,thSAD=thSAD,thSCD1=thSCD1,thSCD2=thSCD2) : NOP
b2clip = (mcradius>=2) ?
\ degrained.MCompensate(degrained_super,b2vec,thSAD=thSAD,thSCD1=thSCD1,thSCD2=thSCD2) : NOP
b1clip = degrained.MCompensate(degrained_super,b1vec,thSAD=thSAD,thSCD1=thSCD1,thSCD2=thSCD2)
f1clip = degrained.MCompensate(degrained_super,f1vec,thSAD=thSAD,thSCD1=thSCD1,thSCD2=thSCD2)
f2clip = (mcradius>=2) ?
\ degrained.MCompensate(degrained_super,f2vec,thSAD=thSAD,thSCD1=thSCD1,thSCD2=thSCD2) : NOP
f3clip = (mcradius>=3) ?
\ degrained.MCompensate(degrained_super,f3vec,thSAD=thSAD,thSCD1=thSCD1,thSCD2=thSCD2) : NOP
f4clip = (mcradius>=4) ?
\ degrained.MCompensate(degrained_super,f4vec,thSAD=thSAD,thSCD1=thSCD1,thSCD2=thSCD2) : NOP
f5clip = (mcradius>=5) ?
\ degrained.MCompensate(degrained_super,f5vec,thSAD=thSAD,thSCD1=thSCD1,thSCD2=thSCD2) : NOP

# Create compensated clip
interleaved = (mcradius==5) ? Interleave(f5clip,f4clip,f3clip,f2clip,f1clip,degrained,b1clip,b2clip,b3clip,b4clip,b5clip) :
\ (mcradius==4) ? Interleave(f4clip,f3clip,f2clip,f1clip,degrained,b1clip,b2clip,b3clip,b4clip) :
\ (mcradius==3) ? Interleave(f3clip,f2clip,f1clip,degrained,b1clip,b2clip,b3clip) :
\ (mcradius==2) ? Interleave(f2clip,f1clip,degrained,b1clip,b2clip) :
\ Interleave(f1clip,degrained,b1clip)

# Perform dfttest
filtered = interleaved.dfttest(Y,U,V,ftype,sigma,sigma2,pmin,pmax,sbsize,smode,sosize,tbsize,tmode,tosize,
\ swin,twin,sbeta,tbeta,zmean,sfile,sfile2,pminfile,pmaxfile,f0beta,nfile)

output = filtered.SelectEvery(mcradius*2+1,mcradius)

return(output)
}

# 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

}

ronnylov
29th January 2010, 09:51
MCTemporalDenoise too, and if you don't need to denoise: MCTemporalDenoisePP ;)

Is it the "edgeclean=true" option when denoising?

LaTo
29th January 2010, 10:08
Is it the "edgeclean=true" option when denoising?

Here an example:

string = "FFT3Dfilter(plane=4,bt=1).dehalo_alpha(darkstr=0.5,brightstr=1.5)."+
\ "awarpsharp(depth=8,blurlevel=2).FastLineDarkenMOD(thinning=0,strength=64)"

MCTemporalDenoisePP(edgeclean=true,ECrad=4,ECthr=16,ECmode=string,settings="high")

And the result:
http://www.imagebam.com/image/f2cffd65792318


If you want to denoise before, replace MCTemporalDenoisePP by MCTemporalDenoise ;)

ronnylov
29th January 2010, 15:17
Here an example:

string = "FFT3Dfilter(plane=4,bt=1).dehalo_alpha(darkstr=0.5,brightstr=1.5)."+
\ "awarpsharp(depth=8,blurlevel=2).FastLineDarkenMOD(thinning=0,strength=64)"

MCTemporalDenoisePP(edgeclean=true,ECrad=4,ECthr=16,ECmode=string,settings="high")

And the result:
http://www.imagebam.com/image/f2cffd65792318


If you want to denoise before, replace MCTemporalDenoisePP by MCTemporalDenoise ;)

Thank You!

Dual65
16th February 2010, 20:37
Thx guys, I solved my problem, but now I need help in another video, I can't fix this:
http://img94.imageshack.us/img94/6048/71687699.jpg
PS: Here the source (http://www.mediafire.com/?0wmwmaj1mnw)(0:08) without audio.

Nightshiver
16th February 2010, 22:10
Stop posting .mkv's, as it makes it look like you downloaded the source, which is illegal and therefore against the rules. Post a real source.