Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
29th December 2016, 20:31 | #1 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
New filter: Fix Telecined Fades
binary(windows x64, requires msvcr 2017):https://github.com/IFeelBloated/Fix-...eleases/tag/r5
git repo:https://github.com/IFeelBloated/Fix-...ter/Source.cpp the filter gives a mathematically perfect solution to such(fades were done AFTER telecine which made a picture perfect IVTC pretty much impossible) problem, and it's now time to kiss "vinverse" goodbye cuz "vinverse" is old and low quality. unlike vinverse which works as a dumb blurring + contra-sharpening combo and very harmful to artifacts-free frames, this filter works by matching the brightness of top and bottom fields with statistical methods, and also harmless to healthy frames. Code:
core.ftf.FixFades(clip, mode=0, threshold=0.002, color=[0.0, 0.0, 0.0], opt=True) mode: could be 0(default), 1, or 2 0: adjust the brightness of both fields to match the average brightness of 2 fields. 1: darken the brighter field to match the brightness of the darker field 2: brighten the darker field to match the brightness of the brighter field threshold: threshold for the average difference per pixel, on a scale of 0.0 - 1.0, but could go beyond 1.0, the frame will remain untouched if the average difference between 2 fields goes below this value color: base color of the fade, default is [0.0, 0.0, 0.0](black) opt: call the fastest possible functions if opt=True, else call the C++ functions. INPUT CLIP MUST BE 32BITS FLOATING POINT FORMAT!!! apply this filter AFTER field matching!!! Last edited by feisty2; 28th January 2017 at 18:15. |
29th December 2016, 21:03 | #2 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
comparison against vinverse
input Code:
import vapoursynth as vs core = vs.get_core() clp = core.lsmas.LWLibavSource("rule6") clp = core.vivtc.VFM(clp,0) clp.set_output() vinverse Code:
import vapoursynth as vs core = vs.get_core() clp = core.lsmas.LWLibavSource("rule6") clp = core.vivtc.VFM(clp,0) clp = core.vinverse.Vinverse(clp) clp.set_output() FTF Code:
import vapoursynth as vs core = vs.get_core() clp = core.lsmas.LWLibavSource("rule6") clp = core.vivtc.VFM(clp,0) clp = core.fmtc.bitdepth(clp,bits=32,fulls=False,fulld=True) clp = core.ftf.FixFades(clp) clp.set_output() |
30th December 2016, 07:35 | #6 | Link |
Registered User
Join Date: Dec 2011
Posts: 95
|
Does this work in general on IVTC scene transitions? Since using Vapoursynth (through Staxrip) ive been having such a problem with duplicate frames and scthresh with VFM and Vdecimate (no blending???), that ive been forced to stay with mode=0, but scene changes look awful. Ive also been having trouble with dealing with rainbows and dotcrawl in motion, but I guess thats another problem as all the solutions are temporal only.
EDIT: Also scrolling scenes stink... Last edited by ShogoXT; 30th December 2016 at 07:38. |
30th December 2016, 10:42 | #7 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
|
|
30th December 2016, 20:06 | #11 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
another demonstration for something other than fading into blackness
input Code:
import vapoursynth as vs core = vs.get_core() clp = core.lsmas.LWLibavSource("rule6") clp = core.vivtc.VFM(clp,0) clp = core.fmtc.bitdepth(clp,bits=32,fulls=False,fulld=True) clp = core.std.Expr(clp, ["1.0 x -", "x"]) #invert Y so it would be literally fading into whiteness clp.set_output() FTF Code:
import vapoursynth as vs core = vs.get_core() clp = core.lsmas.LWLibavSource("rule6") clp = core.vivtc.VFM(clp,0) clp = core.fmtc.bitdepth(clp,bits=32,fulls=False,fulld=True) clp = core.std.Expr(clp, ["1.0 x -", "x"]) #invert Y so it would be literally fading into whiteness clp = core.ftf.FixFades(clp, color=[1.0, 0.0, 0.0]) clp.set_output() |
30th December 2016, 21:22 | #12 | Link | |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
Quote:
Steps: 1. Invoke source filter to obtain the untouched 30 fps clip. 2. Extract the fade using Trim. 3. Pass to QTGMC to obtain a 60 fps clip. 4. Stare at the output of QTGMC really carefully. It's been a few months since I did this, so I forget exactly what you're looking for. 5. Extract 4 frames out of a cycle of 10 using SelectEvery. Tada!
__________________
Buy me a "coffee" and/or hire me to write code! |
|
30th December 2016, 22:44 | #13 | Link | |
Registered User
Join Date: Dec 2011
Posts: 95
|
Quote:
|
|
30th December 2016, 23:08 | #14 | Link | |
Registered User
Join Date: Jun 2010
Posts: 91
|
Quote:
|
|
31st December 2016, 01:43 | #16 | Link |
Registered User
Join Date: Jan 2016
Posts: 163
|
I mean maybe the calculation of TopFieldSum/BottomFieldSum can be done in a small neighborhood, for example, 16x16 block?
There seems to be some residual fades after filtering, and I think the reason is the calculation is done in global, currently. |
31st December 2016, 08:16 | #17 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
if you got residual combing still even with threshold=0, it's then most likely your video suffers from something other than telecined fades and this filter won't help |
|
31st December 2016, 08:23 | #18 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
|
|
31st December 2016, 09:14 | #19 | Link | |
Registered User
Join Date: Jan 2016
Posts: 163
|
Quote:
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|