View Single Post
Old 25th March 2011, 16:04   #7  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
@Gavino: Gracias! worked like charm. What I didn't know was that 255 ***. Of course in the practice I replaced U and L with x and y. At least I know that

edit: In gratitude just wanted to share my little function for what this was. Didn't test it deeply so it'll mostly contain errors.
Code:
FUNCTION Logo(clip clip,string path, int "x", int "y",int "length", bool "alpha",int "start",float "Opac",int "I",int "O",float "blur"){

path=string(path)
alpha=default(alpha,true)
x=default(x, 0)
y=default(y, 0)
start=default(start, 0)
length=default(length, 50)
I=default(I, 20)
O=default(O, 20)
Opac=default(Opac, 1.0)
Sblur=default(blur, 0.0)

logo0=CoronaSequence(path).trim(0,length).FadeIn(I).FadeOut(O)
logo0a=logo0.addborders(x,y,clip.width,clip.height).crop(0,0,-logo0.width-x,-logo0.height-y).blur(Sblur)
logo1=logo0a.converttoyv12().assumefps(Framerate(Clip))

video0=clip.trim(0,start == 1 ? -1 : start-1)
video1=clip.trim(start,start+length-1)
video2=clip.trim(start+length,0)

msk=ShowAlpha(logo0a,"rgb").converttoyv12

video1 = (alpha==true) ?
\   mt_merge(video1,logo1,mt_lut(msk," x 16 - "+String(Opac)+" * "),luma=true)
\ : mt_lutxy(video1,logo1,Y=3, U=2, V=2,
\  "236 16 - 236 16 - x 16 - - 236 16 - y 16 - - * 236 16 - / - 16 +  "+String(Opac)+" * x 1 "+String(Opac)+" - * + ")

video=start >0 ? video0+video1+video2 : video1+video2
return video}
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 26th March 2011 at 09:11.
Dogway is offline   Reply With Quote