View Single Post
Old 27th October 2007, 14:21   #4  |  Link
Morte66
Flying Skull
 
Morte66's Avatar
 
Join Date: Jan 2005
Posts: 397
Quote:
Originally Posted by tetsuo55 View Post
Won't such strong denoising destroy details?
A good denoiser will destroy a little real detail and a lot of grain/noise (which gives a false impression of detail). But yes, denoising will always remove some real detail with the noise and it's a judgement call. It's a matter of personal taste, and also your playback setup. Nobody can choose for you, you have to try a few methods and see what you like.

If you don't like noise, I'd denoise it then perhaps sharpen it (to get your false impression of detail by a different route). If you do like grain/noise, just use GrainOptimizer to help compression.

As for denoisers, if you're going to motion compensate fft3d then you may as well go the whole hog and use mvdegrain2 but with blksize=16 and overlap=8 (three times the speed of the default settings for a very small quality drop).

As for blocks, deblock_qed_mt2 is good for reasonable sources.

My usual DVD cleanup looks like:

Code:
# source

# deinterlace if needed

#TV (16..235) -> PC (0..255) levels. Much better blocking and banding in encode but your display must be adjusted for the different brightness/contrast to source DVD.
Tweak(bright=-16, cont=1.164, coring=false) 

#deblock before any denoise/crop/resize to give deblocker a clean shot
DeBlock_QED_mt2( quant1=20, quant2=24, aOff1=2, bOff1=4, aOff2=4, bOff2=8 )

#crop black borders
crop(2,4,-6,-8) #or whatever

#resize up to next multiple of 16 for encoder efficiency and compatibility with GradFunkMirror() later
spline36resize ( 16*((width+15)/16), 16*((height+15)/16) ) 

#Denoise or grainoptimizer to taste
#grainoptimizer()
#FrFun7(1.1,2.5,1.5) #fractal spatial denoiser
#TTempSmooth(maxr=5)  #pure temporal
#fft3dgpu(sigma=1,bh=32,bw=32,bt=4,precision=2,plane=4) #fast spatio-temporal, bw/bh=32 avoids occasional colour glitches
mvdegrain2p (source=last,blksize=16,overlap=8,sharp=2,thSAD=400,idx=1) #mocomped temporal, the daddy

#sharpen if you want (not my thing, ask somebody else)

#Tackle banding in flat areas
GradFunkMirror(1.2) 


function MVDegrain2p(clip "source", int "blksize", int "overlap", int "sharp", int "thSAD",  int "idx")
{ 
blksize=default(blksize,8) #  blksize value (4, 8 or 16)
overlap=default(overlap,blksize/2) # overlap value (0 to half blksize)
sharp=default(sharp,1) #  
thSAD=default(thSAD,400) #  higher risks ghosting, lower risks "staggered denoising"
idx=default(idx,1) # use various idx for different sources in same script

backward_vec2 = source.MVAnalyse(isb = true, delta = 2, pel = 2, blksize=blksize, overlap=overlap, sharp=sharp, idx = idx)
backward_vec1 = source.MVAnalyse(isb = true, delta = 1, pel = 2, blksize=blksize, overlap=overlap, sharp=sharp, idx = idx)
forward_vec1 = source.MVAnalyse(isb = false, delta = 1, pel = 2, blksize=blksize, overlap=overlap, sharp=sharp, idx = idx)
forward_vec2 = source.MVAnalyse(isb = false, delta = 2, pel = 2, blksize=blksize, overlap=overlap, sharp=sharp, idx = idx)
source.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=thSAD,idx=idx)
}


Function GradFunkMirror( clip c, float "strength" )
{
#counters edge effects for gradfun2db()
#gradfun2db() requires width mod8 and height mod2
	strength	=	default( strength, 1.2 )
	w			=	c.width()
	h			=	c.height()
	vflip		=	c.FlipVertical()
	hflip		=	c.FlipHorizontal()
	
	stackhorizontal( hflip.crop( w-16, 0, 16, h ).addborders( 0, 16, 0, 16 ),
	\	stackvertical( vflip.crop( 0, h-16, w, 16 ), c, vflip.crop(0, 0, w, 16 ) ),
	\	hflip.crop( 0, 0, 16, h ).addborders( 0, 16, 0, 16 ) )
	gradfun2db( strength )
	crop( 16, 16, -16, -16 )

	Return last
}
Pick a few clips (use trim() statements in your script) with light and dark scenes, smooth areas, highly detailed areas, and fast movement. Then give the options a whirl and see what floats your boat.

Last edited by Morte66; 27th October 2007 at 20:19.
Morte66 is offline   Reply With Quote