View Single Post
Old 26th March 2011, 11:33   #9  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Thanks thanks a lot, maybe thats the reason of the "darkening" of fadein fadeout, before/after disappearing. Good tips
I also had realised about mt_infix, I tested after that with mt_polish...
I rely on blur() but do you think 0.0 is a no-operator? should I better use GaussianBlur?

I updated the function:
Code:
FUNCTION Logo(clip clip,string path, int "x", int "y",int "start",int "length", bool "alpha",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-1).FadeIn0(I).FadeOut0(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)

video1 = (alpha==true) ?
\   mt_merge(video1,logo1,mt_lut(ShowAlpha(logo0a,"YV12")," x "+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 11:57.
Dogway is offline   Reply With Quote