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

 

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

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th December 2019, 18:06   #61  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
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" )
}
was chroma = "128", should be chroma = "-128". [did throw error in current masktools - thanx P]
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.
StainlessS is offline   Reply With Quote
Old 17th October 2022, 01:56   #62  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,170
Latest ver:
https://github.com/Asd-g/AviSynthPlu...Drawrect_.avsi
kedautinh12 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 02:09.


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