## CreepyDeint v0.1 by mf ## ## Slowest deinterlacer on the planet, uses weird methods instead of old fart ## theoretical stuff. ## ## Usage: ## Per default, this is a half-framerate bicubic deinterlacer. Nothing interesting. ## Turn features on, and stuff starts becoming really slow. Try it, you might run ## away screaming. ## ## Features: ## Ghost-instead-of-comb technology (tm) ## Steals SangNom's functionality ## Steals LSResize's functionality ## Steals Unblend's functionality ## Steals Bob's functionality ## It's made by mf, so it must be good (r) ## ## Dependancies: ## MaskTools, SangNom, LSResize, Unblend. ## function CreepyDeint(clip in, bool "bob", bool "blend", bool "deblend", bool "sharp", \ int "order", bool "bicubic", int "scd", bool "debug") { bob = Default(bob, false) # Double-framerate output blend = Default(blend, false) # Blend static parts (mf's brilliant # ghost-instead-of-comb technology (tm)) deblend = Default(deblend, false) # Uses Unblend() - may be useful for PAL # fieldblended movies (unrelated to blend) sharp = Default(sharp, false) # Compensates for sharpness loss by blending order = Default(order, 0) # Field order bicubic = Default(bicubic, true) # Uses bicubic instead of Edge-based Line Averaging # with New Edge-Directed Interpolation as fallback scd = Default(scd, 200) # Scenechange detection for blend=true debug = Default(debug, false) # For tweaking scenechange detection order2 = (order == 0) in order2 ? Interleave(SangNom(1), SangNom(0)) \ : Interleave(SangNom(0), SangNom(1)) sn = last Subtract(last, last.Sharpen(0,1)) CombMask() Blur(1) Greyscale() ColorYUV(levels="TV->PC") mask = last in Bob(height=in.height/2) LSResize() LanczosResize(in.width, in.height) lsr = last in.Bob() bobc = last MaskedMerge(sn, lsr, mask) bicubic ? bobc : last deblend ? Unblend() : last blah = last Overlay(blah.SelectEven(), blah.SelectOdd().ChangeFPS(in.framerate*2)) sharp ? Sharpen(0, 0.5) : last blendc = last blah YV12Subtract(blendc, blah) sub = last Levels(0, 1, 127, 255, 0, false) sub1 = last sub.Levels(128, 1, 255, 0, 255, false) sub2 = last Overlay(sub1, sub2, mode="lighten").Greyscale() Levels(0, 1, 30, 0, 255, false) Inflate() Greyscale() Levels(0, 1, 128, 0, 255, false) bmask = last BlankClip(last, color=$FFFFFF) white = last ConditionalFilter(bmask, white, bmask, "AverageLuma()", ">", String(scd), debug) debugc = last FitY2UV() MaskedMerge(blendc, blah, last) blend ? last : blah bob ? last : SelectEven() return debug ? debugc : last }