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. |
13th July 2010, 09:52 | #41 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,361
|
Didée: Is that aimed to interpolation between frames with higher differences? How can I do the opposite ((double)interpolate everything except where the differences are greater)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
13th July 2010, 10:00 | #42 | Link | ||
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Quote:
Quote:
However, it is totally beyond me what that should be good for ... ?
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 13th July 2010 at 10:06. |
||
28th March 2013, 14:24 | #43 | Link | |
Warm and fuzzy
Join Date: Apr 2010
Location: Moscow, Russia
Posts: 201
|
Quote:
. . This is a idea of Didee, see script code upper. . On this idea of Didee is besed new function function DoubleFPS(clip clp, int "numerator", int "denominator", int "mode", bool "mopro", int "bias", bool "show") . Code:
function DoubleFPS(clip clp, int "numerator", int "denominator", \ int "mode", bool "mopro", int "bias", bool "show") { # Defaults # numerator = Default(numerator, 2) denominator = Default(denominator, 1) mode = Default(mode, 2) mopro = Default(mopro, false) bias = String(Default(bias, 128)) showdot = Default(show, false) # Here is code of function... # v = addborders(clp, 16, 16, 16, 16) o = v.assumefps(FramerateNumerator(clp)) ox = v.width() oy = v.height() S = (showdot == true) ? v.subtitle(".", x=32, y=24).MSuper(pel=4, hpad=16, vpad=16, rfilter=4) : \ v.MSuper(pel=4, hpad=16, vpad=16, rfilter=4) A = S.MAnalyse(isb=true, blksize=8, overlap=2, plevel=0, search=5, searchparam=8, badrange=(-24)) B = S.MAnalyse(isb=false, blksize=8, overlap=2, plevel=0, search=5, searchparam=8, badrange=(-24)) C = S.MRecalculate(A, blksize=8, search=5, searchparam=2) D = S.MRecalculate(B, blksize=8, search=5, searchparam=2) E = S.MRecalculate(C, blksize=4, search=5, searchparam=1) F = S.MRecalculate(D, blksize=4, search=5, searchparam=1) double = (mode == 1) ? v.MBlockFps(S, E, F, \ num=FramerateNumerator(v) * numerator, \ den=FramerateDenominator(v) * denominator, \ mode=0, blend=false, ThSCD1=220) \ : (mode == 2) ? v.MFlowFps(S, E, F, \ num=FramerateNumerator(v) * numerator, \ den=FramerateDenominator(v) * denominator, \ mask=2, ml=10000, blend=false, ThSCD1=220) \ : NOP() diff2next = mt_makediff(o, o.selectevery(1, 1)).mt_lut("x "+bias+" - abs 32 / 1 2.0 / ^ 128 *", U=-128, V=-128) diff2next = mt_lutf(diff2next, diff2next, yexpr="x", mode="average").pointresize(32, 32) diff2next = interleave(diff2next.selectevery(4, 0).tsg(2), diff2next.selectevery(4, 1).tsg(2), \ diff2next.selectevery(4, 2).tsg(2), diff2next.selectevery(4, 3).tsg(2)) max = diff2next.mt_logic(diff2next.selectevery(1, -3), "max") \ .mt_logic(diff2next.selectevery(1, -2), "max") \ .mt_logic(diff2next.selectevery(1, -1), "max") \ .mt_logic(diff2next.selectevery(1, 1), "max") \ .mt_logic(diff2next.selectevery(1, 2), "max") \ .mt_logic(diff2next.selectevery(1, 3), "max") ismax = mt_lutxy(diff2next, max, "x y < 255 0 ?", U=-128, V=-128).pointresize(ox, oy) # swap 255 0 to interpolate only on big changes. themask = interleave(o.mt_lut("0"), ismax) interleave(o, o).mt_merge(double, themask, luma=true, U=3, V=3) (mopro == true) ? last.crop(16, 16, -16, -16) : double.crop(16, 16, -16, -16) return (last) } function tsg(clip clp, int t) { last = clp (t < 5) ? last : last.temporalsoften(1, 255, 0, 255, 2).merge(last, 0.25) (t < 4) ? last : last.temporalsoften(1, 255, 0, 255, 2).merge(last, 0.25) (t < 3) ? last : last.temporalsoften(1, 255, 0, 255, 2).merge(last, 0.25) (t < 2) ? last : last.temporalsoften(1, 255, 0, 255, 2).merge(last, 0.25) (t < 1) ? last : last.temporalsoften(1, 255, 0, 255, 2).merge(last, 0.25) return (last) } Question to Didee. . How to correct this script function to do various frames conversion (not only doubling, multiply by various numerator and denominator) ? when "mopro = true" . . Thanks. .
__________________
Warm and fuzzy (white and fluffy) Last edited by Jenyok; 28th March 2013 at 19:38. |
|
|
|