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. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#61 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,406
|
Prev 2 posts, fixed a couple of probs.
Code:
Function Elliptical_Marker(clip c,int W, Int H,Bool "Soft") {
# Req mt_tools_2, Returns YV12 frame WxH same FPS as c and without audio
Soft=Default(Soft,False)
# INFIX_H="(((x-.5)^2 +(y-.5)^2) < .25 ? 255 : 0" # INFIX: Elliptical Disk (Hard Edge) :: mode = "relative", Radius=0.5, Rad^2=0.25 :: SOFT_Inner rad:(Rad*0.9)^2~=0.2
# INFIX_S="((x-.5)^2+(y-.5)^2)<.2?255:(((x-.5)^2+(y-.5)^2)<.25?(.25-((x-.5)^2+(y-.5)^2))*5100):255" # INFIX: Elliptical Disk (Soft Edge) :: (.25-0.2)*5100=255 : (.25-.25)*5100=0.0] :: mode="relative", 0.25=1.0 : 0.2~=0.9
rpn = (!Soft)
\ ? "x 0.5 - 2 ^ y 0.5 - 2 ^ + 0.25 < 255 0 ?" [* RPN: Elliptical Disk [Hard Edge] *]
\ : "x 0.5 - 2 ^ y 0.5 - 2 ^ + 0.2 < 255 x 0.5 - 2 ^ y 0.5 - 2 ^ + 0.25 < 0.25 x 0.5 - 2 ^ y 0.5 - 2 ^ + - 5100 *" [* RPN: Elliptical Disk [Soft Edge] *]
c.Blankclip(width=W,height=H,Length=1,pixel_type="YV12").Killaudio
return Last.mt_lutspa(mode = "relative", expr = rpn, chroma = "-128" )
}
Converted to RPN, mt_Polish dont work in current Masktools on XP. Added comments to Infix notation expressions. (and changed infix & rpn expressions slightly).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 28th December 2019 at 19:01. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|