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. |
27th September 2015, 13:41 | #1 | Link |
Anime addict
Join Date: Feb 2009
Location: Spain
Posts: 673
|
[Solved] Check if porting is proper
Hi, folks. I am porting some functions for beginning to use vapoursynth.
I need convert this function: Code:
function BrightDfttestMod(clip input, float "sbright", float "smedium", float "sdark", \ int "th_low", int "th_med", int "th_high", int "tbsize", bool "lsb", int "mode") { sbright = default( sbright, 0 ) smedium = default( smedium, 0 ) sdark = default( sdark, 0 ) th_low = default( th_low, 20 ) th_med = default( th_med, 40 ) th_high = default( th_high, 100 ) lsb = default( lsb, false ) mode = default( mode, 0 ) bright = (sbright > 0 && lsb==false) ? input.dfttest(sigma = sbright,tbsize=tbsize,sbsize=18,sosize=9,lsb=lsb):\ (sbright > 0 && lsb==true) ? input.dfttest(sigma = sbright,tbsize=tbsize,sbsize=18,sosize=9,lsb=lsb).ditherpost(mode=mode) : input medium = (smedium > 0 && lsb==false) ? input.dfttest(sigma = smedium,tbsize=tbsize,sbsize=18,sosize=9,lsb=lsb):\ (smedium > 0 && lsb==true) ? input.dfttest(sigma = smedium,tbsize=tbsize,sbsize=18,sosize=9,lsb=lsb).ditherpost(mode=mode) : input dark = (sdark > 0 && lsb==false) ? input.dfttest(sigma = sdark,tbsize=tbsize,sbsize=18,sosize=9,lsb=lsb) :\ (sdark > 0 && lsb==true) ? input.dfttest(sigma = sdark,tbsize=tbsize,sbsize=18,sosize=9,lsb=lsb).ditherpost(mode=mode) : input mmask = medium.levels(th_med, 1.0, th_high, 255, 0, false) dmask = medium.levels(th_low, 1.0, th_med, 255, 0, false) output = bright.mt_merge(medium, mmask, U=3, V=3, luma=true) \ .mt_merge(dark, dmask, U=3, V=3, luma=true) return output } Thanks
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite Last edited by Overdrive80; 1st October 2015 at 20:16. Reason: Edit code |
Thread Tools | Search this Thread |
Display Modes | |
|
|