OverlayPlus

From Avisynth wiki
Revision as of 08:40, 30 August 2021 by Reel.Deal (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Abstract
Author reel.deel
Version v1.0.0
Download
Category Layering
License
Discussion


Contents

Description

OverlayPlus is a layering scrip similar to Overlay.

  • 33 blend modes.
  • RGB colorspaces are processed without converting to YUV.
  • YUV420/YUV422 colorspaces are processed without converting to YUV444.
  • OverlayPlus in RGB produces results that are consistent with Photoshop and Gimp.

OverlayPlus is mainly a port of VapourSynth's Overlay script by HolyWu with some additional blending modes from Overlay_MTools.

Requirements

  • [x86] / [x64]: AviSynth+
  • Supported color formats: All planar formats (8/10/12/14/16/32bit, Y/YUV/RGB with or without alpha) are supported.

Required Plugins

Latest version of the following plugins are recommended unless stated otherwise.


Syntax and Parameters

function OverlayPlus (clip base, clip overlay, clip "mask", string "mode", float "opacity", int "x", int "y", bool "chroma", bool "mask_first_plane")


clip   =
Base clip must be planar Y, YUV, or RGB.
Properties such as dimensions, framerate, and length of the output clip will be the same as the base clip.


clip   =
Overlay clip must be the same colorspace as the base clip.
Overlay clip does not have to be the same dimensions as the base clip.
  • If the dimensions of the overlay clip are smaller it will be top left aligned and padded accordingly.
  • If the dimensions of the overlay clip are greater it will be cropped at the bottom and right sides.


clip  mask = undefined
Optional transparency mask to use for the overlay clip.
Mask clip must be in full range (for example, 0-255 for 8 bit, 0-65535 for 16bit, 0.0-1.0 for 32bit float).
The darker the pixel, the more transparent the overlay clip will be; black (0) pixel means full transparency.
Mask clip must be the same colorspace as the base clip.
Mask clip must have the same dimensions as the overlay clip.
If mask_first_plane=true, then the mask clip can be planar Y, YUV or RBG but needs to have the same bitdepth as the base clip.


string  mode = "blend"
Blend mode.
GROUP BLEND MODE
Simple average, blend (normal)
Darken burn (colorburn), darken, linearburn, multiply, multiply128
Lighten add (lineardodge), dodge (colordodge), lighten, linearadd, screen
Mix hardlight, hardmix, interpolation, linearlight, overlay, pinlight, softburn, softdodge, softlight, softlight2, vividlight
Difference difference, divide, exclusion, extremity, grainextract, grainmerge, linearsubtract, negation, phoenix, subtract
Names in parenthesis are aliases that can also be used.


float  opacity = 1.0
Blend transparency; the range is from 0.0 to 1.0, where 0.0 is transparent and 1.0 is fully opaque.


int  x = 0
int  y = 0
Horizontal and vertical placement of the overlay image on the base clip, in pixels. Can be positive or negative.
For subsampled colorspaces such as YUV420 both x and y must be mod2. For YUV422 only x must be mod2.
x=0, y=0 equals alignment at the top left corner of the frame.


bool  chroma = true
YUV chroma processing:
  • True : process chroma planes
  • False : copy chroma planes from base clip
For RGB all planes are always processed.


bool  mask_first_plane = true
When set to true, the first plane of the the mask clip will be used as a mask for all channels.


Examples

TODO:

AviSource("blah.avi")


Changelog

Version      Date            Changes
v1.0.0 2021/08/xx - Public release.


External Links




Back to External Filters

Personal tools