View Single Post
Old 12th January 2012, 16:21   #12  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 712
My attempt :

Code:
al = 0.15   # Luma blend
ac = al     # Chroma blend
g = 3

# Deblending with pseudo-gamma correction
edi = nnedi3 (field=-2)
s1 = " 16 - 219 / 0 max "+String(1.0/g)+" ^ "
s2 = " 0 max "+String(g)+" ^ 219 * 16 + "
fix = mt_lutxy (edi, edi.SelectEvery (1, -1),
\	yexpr="x "+s1+String(1+al)+" * y "+s1+String(al)+" * -"+s2,
\	expr="x "+String(1+ac)+" * y "+String(ac)+" * -",
\	y=3, u=3, v=3)
fix = fix.SeparateFields ().SelectEvery (4, 0, 3)

# Replaces only the blended fields with their fixed counterparts
Interleave (last.SeparateFields (), fix)
SelectEvery (10, 0, 2+1, 4, 6, 8+1)   # Comb pattern here
Weave ()

# Usual IVTC + light postprocessing for residual combing
TFM (PP=0)
Vinverse ()
TDecimate (mode=1)
It may exhibits occasional artifacts. I'm not sure about the values or the formulas, but it's a decent starting point.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding

Last edited by cretindesalpes; 18th January 2012 at 12:33. Reason: 219 instead of 239 and 0 max before ^
cretindesalpes is offline   Reply With Quote