View Single Post
Old 11th September 2019, 15:04   #43  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Thanks Mani, was in plugin docs eh, I was trying to find webpage.

Bout 25% done now, will initially be for SOME avs standard colorspaces only, I will though want avs+ eventually. [will also supply v2.58 plug + x64]

Doin' it summick like this,

Code:
Function Uglarm(clip c,                                                     [* Avs v2.58 & v2.60 std supports YV12/YUY2/RGB32/RGB24 : Avs+ r2915+ also YV16, YV12, YV24, Y8 *]
        \ int LogoX,int LogoY,Int LogoW,Int LogoH,                          [* ALL coords can be -ve, where RHS/BOT relative, LogoW & LogoH can additionally be 0 where RHS/BOT relative*]
        \ int "ClipX"=0,int "ClipY"=0,Int "ClipW"=0,Int "ClipH"=0,          [* ClipW, and ClipH coords can be zero or -ve, where RHS/BOT relative (but ClipX:ClipY cannot be -ve) *]
        \ float "SAR"=1.0,                                                  [* Sample (Pixel) Aspect Ratio (x/y)*]
        \ float "BlurPower"=1.0,                                            [* 1.0 -> ??? *]
        \ Int "ShowMode"=0                                                  [* 0=Overlay Logo Patch(Clipped Logo), 1=Overlay Logo Patch(Clipped) & Border, 2=DeLogo *]
        \ Bool "Blank"=false                                                [* Where ShowMode==2 and Blank==True then Blank to Black any border area (border is outside of Clip args) *]
        \ )
EDITED:

EDIT: I'm not taking any pixel Aspect Ratio into account for distance, dont think it worth the (small) effort. [EDIT: See SAR above]

EDIT: ShowMode = 1 Example showing Patch Area (after clipping, in Yellowish), Clipped out area (In Reddish), and border Area in Purplish.
Yellowish + Reddish is original non clipped Logo Coords.
Code:
Avisource(".\Parade.avi")
Crop(0,0,Width/4*4,height/4*4)      # Make Mod 4

ConvertToRGB24     # Internally Converted to RGB32 and back to RGB24 again [Layer() requirement, supports only YUY2 & RGB32].

LogoX    = -100    # Can be -ve, Width  relative
LogoY    = -100    # Can be -ve, Heigth relative
LogoW    =  -20    # Can be 0 or -ve, Width  relative
LogoH    =  -20    # Can be 0 or -ve, Height relative

                   # Clipping Coords (inside is valid graphic, outside of it is border/Letterbox)
ClipX    =    0    # Black border area, +ve ONLY
ClipY    =    0    #   ditto
ClipW    =  -50    #   Can be 0 or -ve, Width  relative
ClipH    =  -50    #   Can be 0 or -ve, Height relative

BLURPOWER=  1.0
SHOWMODE =    1
BLANK    = False

Uglarm(LogoX,LogoY,LogoW,LogoH,ClipX,ClipY,ClipW,ClipH,BlurPower,ShowMode,BLANK)
__________________
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; 12th September 2019 at 21:18.
StainlessS is offline   Reply With Quote