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. |
18th September 2013, 18:14 | #61 | Link | |
Registered User
Join Date: Mar 2012
Posts: 29
|
RT_Stats
Quote:
Code:
C = last global g_logpath = "C:\<dir>\logfile.txt" C=C.WriteFileStart(g_logpath, """ "frameno" """, "Chr(9)", """ "args " """,append=false) C=C.WriteFileEnd(g_logpath, """ "#end" """) ScriptClip(c, "PGlow_Test(c)") Code:
9047 radius=189, min=177, max=114, threshold= 64, blur=176, sat=3.560000, cont=240 Code:
PGlow (radius=189, min=177, max=114, threshold= 64, blur=176, sat=3.560000, cont=240) Last edited by MJLives12; 25th September 2013 at 14:21. Reason: RT_Stats |
|
26th December 2013, 03:32 | #62 | Link |
Registered User
Join Date: Mar 2012
Posts: 29
|
Here's a faster version of using gaussian blur in realtime.
Code:
Function GBloom (clip c, int "radius", float "blur", int "w" \ ,float "sat", float "cont", int "bright", "min", int "max", float "me") { c #Variable blur required http://forum.doom9.org/showthread.php?t=88645 #MVtools v2 #radius for BiCubicResize (higher radius use for speed up, 8) #w for gaussian blur gfunc (set to 0 or 4 enhances lighting, luma and chroma) #me luma gamma, set to 0.1 or up to 0.4 (brighter chroma and luma) and max to 250 #sat set to 0.5 if chroma is noisy and max to 250, me to 0.2 radius = Default (radius, Round (Width / 120.0)) blur = Default (blur, 1.0) min = Default (min, 0) max = Default (max, min +1) me = Default (me, 0.1) w = Default (w, 4) sat = Default (sat, 1.0) cont = Default (cont, 1.0) bright = Default (bright, 0) rmax_set=255 rwmax=last.width/radius rhmax=last.height/radius rmax= (rwmax <= rhmax) ? rwmax : rhmax radius=(((rmax-1)*(radius-1))/(rmax_set-1))+1 old_wid = Width old_hgt = height new_wid = rwmax new_hgt = rhmax old_wid = Width old_hgt = height new_wid = rwmax new_hgt = rhmax new_wid = Min(Max(64, new_wid), old_wid / 2) new_hgt = Min(Max(64, new_hgt), old_hgt / 2) new_wid = new_wid + new_wid % 2 new_hgt = new_hgt + new_hgt % 2 Mask = BilinearResize(new_wid,new_hgt).ConvertToRGB32 () Mask = Mask.BLevels (min, me, max, 0, 255) \ .GaussianBlur(blur,blur,gfunc=w,y=3,u=3,v=3) \ .TweakRGB (sat=sat, cont=cont, bright=bright) \ .ConvertToYV12 ().BilinearResize(old_wid,old_hgt) MT_lutxy (Mask \ ,yexpr = "248 256 x - 256 y - * 256 / -" \ ,uexpr = " y 128 < x y * 128 /" \ ,vexpr = " y 128 < x y * 128 /", U = 3, V = 3) ColorYUV (levels="TV->PC") } function Blevels(clip c, \ int input_low, float gamma, int input_high, \ int output_low, int output_high) { c LC = Levels(input_low, gamma, input_high \ ,output_low, output_high, coring = true) Overlay(LC,mode="blend") } function TweakRGB(clip last, float "cont", float "sat", int "bright") { cont = Default (cont, 1.0) sat = Default (sat, 1.0) bright = Default (bright, 1) ConvertToYV12().Tweak(sat=sat, bright=bright) \ .ConvertToRGB32().RGBAdjust(cont,cont,cont,cont) } Code:
GBloom(radius=8,blur=6,me=0.4,max=250,sat=1.3,cont=0.8) Last edited by MJLives12; 12th April 2014 at 16:11. Reason: specify function, tweak function bright and with rgbadjust, BLevels function |
Thread Tools | Search this Thread |
Display Modes | |
|
|