View Single Post
Old 14th January 2019, 00:21   #275  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 346
Quote:
Originally Posted by Taurus View Post
If you cant see any differences between scales 0 -> 2
and/or BluMul you must be blind or your gammac script simply does not work...
Please post you entire script.
Because for me even subtile changes from the defaults are altering the output sometimes in dramatical ways.
Below is the script. When I change the BluMul, I can see the 1st quadrant change. However, the 4th quadrant does not. Nor does any quadrant change when I change the scale to 0, 1 or 2.

Quote:
AVISource("C:\Users\Main\Desktop\Videos\Home Movies\1995-05-14 To 1996-01.avi")
Trim(209006,226575).FadeIn(60) + Trim(226679,237540).FadeOut2(60)

ConvertToRGB24.KillAudio
#Spline36Resize(512,384)
O=Last
DC=Last

#DC=DC.Blur(1.0) # Detection Clip (uses source clip if dc not supplied, Denoised or whatever)
#DC=DC.BilinearResize(320,240) # Test DC not same size as source

LockChan = 1 # Chan for lock to Ave, 0=R, 1=G, 2=B
# -1 = Use LockVal below.
# -2 = LockVal=(RedAve+GrnAve+BluAve)/3.0 for LockVal.
# -3 = LockVal=Median(RedAve,GrnAve,BluAve)
Scale=1
RedMul = 1.0 # Required Ave multiplier for Red Channel, applied when requesting GuessGamma(reqAve*RedMul), Even applied when LockChan=-1.
GrnMul = 1.0 # Same for Green channel. GrnMul even applies when LockChan is Green Channel, etc for chans.
BluMul = 1.0 # Same for Blue channel. Allows tinkering/fine tuning.
Th = 0.0
LockVal = 128.0 # Only valid if LockChan == -1
RngLim = 11
GamMax = 10.0
Show = True # Metrics
Verb = 5 # Verbocity FULL
SHOWCOORDS= True # Show Original with Coords
DITHER=FALSE
x =5 # Coords (for dc Detection Clip)
y =5
w=-5
h=-5

omin=5 # Output channels minimum (footroom for manual editing).
omax=250 # Output channels maximum (headroom for manual editing).

#Return GamMac(DC,x=x,y=y,w=w,h=h,Coords=True) # Show Coords only

Scale=0
A_TEXT = RT_String("Scale=%d rMul=%.2f gMul=%.2f bMul=%.2f",Scale,RedMul,GrnMul,BluMul)
A=GamMac(LockChan=LockChan,SCALE=SCALE,RedMul=RedMul,GrnMul=GrnMul,BluMul=BluMul,
\ Th=Th,LockVal=LockVal,RngLim=RngLim,GamMax=GamMax,
\ dc=DC,
\ x=x,y=y,w=w,h=h,
\ omin=omin,omax=omax,
\ Show=Show,Verbosity=Verb,dither=DITHER)


Scale=1 BluMul=1.05
B_TEXT = RT_String("Scale=%d rMul=%.2f gMul=%.2f bMul=%.2f",Scale,RedMul,GrnMul,BluMul)
B=GamMac(LockChan=LockChan,SCALE=SCALE,RedMul=RedMul,GrnMul=GrnMul,BluMul=BluMul,
\ Th=Th,LockVal=LockVal,RngLim=RngLim,GamMax=GamMax,
\ dc=DC,
\ x=x,y=y,w=w,h=h,
\ omin=omin,omax=omax,
\ Show=Show,Verbosity=Verb,dither=DITHER)

Scale=2 BluMul=0.95
C_TEXT = RT_String("Scale=%d rMul=%.2f gMul=%.2f bMul=%.2f",Scale,RedMul,GrnMul,BluMul)
C=GamMac(LockChan=LockChan,SCALE=SCALE,RedMul=RedMul,GrnMul=GrnMul,BluMul=BluMul,
\ Th=Th,LockVal=LockVal,RngLim=RngLim,GamMax=GamMax,
\ dc=DC,
\ x=x,y=y,w=w,h=h,
\ omin=omin,omax=omax,
\ Show=Show,Verbosity=Verb,dither=DITHER)

COORDS=O.GamMac(dc=DC,x=x,y=y,w=w,h=h,Coords=True)
ODC=((SHOWCOORDS)?COORDS.Spline36Resize(width,Height):O) # Resize COORDS (Not necessarily the same sizse as source clip)
ODC_TEXT=(SHOWCOORDS)?"Detect Clip with Coords":"Original"
TOP=StackHorizontal(TSub(ODC,ODC_TEXT,true),TSub(A,A_TEXT))
BOT=StackHorizontal(TSub(B,B_TEXT),TSub(C,C_TEXT))
StackVertical(TOP,BOT)
return Last


# Stack Overhead Subtitle Text, with optional FrameNumber shown.
Function TSub(clip c,string Tit,Bool "ShowFrameNo"){
c.BlankClip(height=20)
(Default(ShowFrameNo,False))?ScriptClip("""Subtitle(String(current_frame,"%.f] """+Tit+""""))"""):Subtitle(Tit)
Return StackVertical(c).AudioDubEx(c)
}

Last edited by Danette; 14th January 2019 at 00:32.
Danette is offline   Reply With Quote