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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th September 2013, 18:14   #61  |  Link
MJLives12
Registered User
 
Join Date: Mar 2012
Posts: 29
RT_Stats

Quote:
Originally Posted by StainlessS View Post
RT_debug and RT_TxtWriteFile are functions from RT_Stats dll, runtime/compile time functions.
RT_Debug takes 1 or more strings, and outputs to debugview window so you can see debugging
information in real time.
DebugView from SysInternals, bought out by Microsoft, here:
http://technet.microsoft.com/en-gb/s.../bb896647.aspx

Debugview is highly recommended if you develop scripts especially if you use either Scriptclip or GScript, you can see some example RT_Debug
output in post #50, 3rd code block, and the RT_Debug line in 1st code block of same post.

You can remove both RT_ funcs, as they are not now needed in your script.
Just downloaded the RT_Stats dll from Mediafire hyperlink, testing it out now with VirtualDub.

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)
Attached Files
File Type: txt logfile.txt (1.9 KB, 14 views)

Last edited by MJLives12; 25th September 2013 at 14:21. Reason: RT_Stats
MJLives12 is offline   Reply With Quote
Old 26th December 2013, 03:32   #62  |  Link
MJLives12
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
MJLives12 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:04.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.