Thread: Type of sources
View Single Post
Old 5th August 2011, 23:24   #3  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 712
For the first sample, it's 100 % interlaced. I think QTGMC().SelectEven() is your best bet, despite a bit of ghosting. The parity gets reversed at some moment on the scene with the flag, so you'll have to take care of that too.

For the second funny sample, you could try something like this:
Code:
FFVideoSource ("VTS_02_0.demuxed.m2v")

x01 = SelectEvery (5, 0)
x67 = SelectEvery (5, 3)
x89 = SelectEvery (5, 4)

b = nnedi3 (field=-2)
x2 = b.SelectEvery (10, 2)
x3 = b.SelectEvery (10, 3)
x4 = b.SelectEvery (10, 4)
x5 = b.SelectEvery (10, 5)

# y   = 32 115 198 278 354 440
# dif =   83  83  80  76  86 
blend_fnc = x01.mt_lutspa (
\   mode="relative",
\   expr="y 32 480 / - 82 480 / / pi * sin 128 * 128 +",
\   y=3, u=3, v=3)

x2b = mt_lutxyz (x01, x2, blend_fnc, "y 256 * z 256 - x * + z 0.01 + /", y=3, u=3, v=3)
x3b = mt_lutxyz (x01, x3, blend_fnc, "y 256 * z x * - 256 z - /", y=3, u=3, v=3)
x23 = mt_merge (x3b, x2b, blend_fnc, luma=true)

x4b = mt_lutxyz (x67, x4, blend_fnc, "y 256 * z x * - 256 z - /", y=3, u=3, v=3)
x5b = mt_lutxyz (x67, x5, blend_fnc, "y 256 * z 256 - x * + z 0.01 + /", y=3, u=3, v=3)
x45 = mt_merge (x4b, x5b, blend_fnc, luma=true)

x2345 = mt_average (x23, x45, y=3, u=3, v=3)

Interleave (x01, x2345, x67, x89)
It handles only the deblending part and would need tuning and optimisation (scene changes, various artifacts, get rid of the lutxyz...), but you've got something to start with.
__________________
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; 6th August 2011 at 07:27. Reason: Fixed mt_lutspa + unnecessary deinterlacing
cretindesalpes is offline   Reply With Quote