Help us keep the list up to date and submit new video software here.






Software Home »


Complete Version history / Release notes / Changelog / What's New for AviSynth+


AviSynth+ 3.7.3

Add "bold"=true (linux/NO_WIN_GDI: false), "italic"=false, "noaa"=false parameters to
"ShowFrameNumber", "ShowCRC32", "ShowSMPTE", "ShowTime" filters.
As noted below, "italic" and "noaa" parameters are ineffective in NO_WIN_GDI builds (e.g. Linux)

Add "noaa" parameter to SubTitle and Info. Setting it true will disable antialiasing.
Useful when someone would use "VCR OSD Mono" as-is, without beautifying the outlines,
as it as mentioned in https://forum.doom9.org/showthread.php?t=184627

Address #358, plus "noaa"

add "bold", "italic" and "noaa" boolean parameters to "SubTitle" and "Info"
add "italic" and "noaa" boolean parameter to "Text" ("bold" already existed)
"italic" and "noaa" is provided only to match the parameter list with SubTitle.
SubTitle: to mimic former working method, defaults are "bold"=true, "italic"=false, "noaa"=false
Text: "bold"=false (as before); "italic" is not handled at all, either true or false, it does not affect output.
"italic" and "noaa" parameters exist only because on non-Windows systems "Subtitle" is aliased to "Text"
(Each Subtitle parameter must exist in "Text" as well)

Fix #360: plane fill wrongly assumed that pitch is rowsize, which is not the case after a Crop
It would result in crash e.g. in HistogramRGBParade

Enhancement: much quicker YV24 to RGB32/RGB24 conversion when AVX2 instruction set is supported. (+50% fps at i7-11700)

UserDefined2Resize got an 's' parameter (to the existing b and c): support, default value = 2.3
(following DTL2020's addition in jpsdr's MT resizer repo, UserDefined2ResizeMT filter)

Now, as we have already three variable parameters to the optional chroma resamplers in ConvertToXX
converters, ConvertToXX family got a new float 'param3' parameter which is passed to UV resizer as
's', if "userdefined2" is specified as chroma resampler.
If param3 is not used in a resizer but is defined, then it is simply ignored.
Such as "ConvertToYV24" parameter signature: c[interlaced]b[matrix]s[ChromaInPlacement]s[chromaresample]s[param1]f[param2]f[param3]f
e.g.: ConvertToYV24(chromaresample="userdefined2", param1=126, param2=22, param3=2.25)

see also description at test6, which was updated with this parameter as well.

s (support) param - controls the 'support' of filter to use by resampler engine. Float value in valid range from
1.5 to 15. Default 2.3. It allows to fine tune resampling result between partially non-linear but more sharper and less
residual ringing (at low b and c values) and more linear processing with wider 'peaking' used. Setting too high
in common use cases (about > 5) may visibly degrade resampler performance (fps) without any visible output changes.
Recommended adjustment range - between 2 and 3.

Examples:
b=126 c=22 - medium soft, almost no ringing.
b=102 c=2 - sharper, small local peaking.
b=70 c=-30 s=2 - sharper, thinner 'peaking'.
b=70 c=-30 s=2.5 - a bit softer, more thick 'peaking'.
b=82 c=20 - sharp but lots of far ringing. Not for using.

Fix #350 ConvertXXX to accept YV411 clip's frame property _ChromaLocation set to 'left'
(and 'topleft' and 'bottomleft' which give the same result) instead of giving an error message.

Fix #348 bitrol/bitror functions return incorrect results when first argument is negative.
Regression since the asm code of Avisynth 2.6 classic was ported to C in Avisynth+ project.

"Info": if channel mask exists, then

its friendly name
otherwise the number of channels and the channel combinations
is displayed under "AudioLength: x".
e.g.
SetChannelMask("stereo") --> "Channel mask: stereo"
SetChannelMask("stereo+LFE") --> "Channel mask: 2.1" because the combination resulted in another known channel combo name
SetChannelMask("mono+LFE") --> "Channel mask: 2 channels (FC+LFE)" because the combination is unknown

Add SetChannel parameter: channel string syntax: (similar to ffmpeg)
a channel number followed by "c" for getting the default layout for a given number of channels.
E.g. SetChannelMask("3c") will set "2.1" because this is the default choice for 3 channels

Add SetChannel parameter: channel string syntax:
a simple number is treated as the actual numeric mask.
E.g. SetChannelMask("3") will set "stereo" because 3=1+2 that is "FL+FR" that is "stereo"

SetChannelMask string version: If string is other than "" then its set to known. It has a single string parameter.
SetChannelMask("mono") -> mask is known: "mono"
SetChannelMask("") -> mask is unknown

Add "speaker_all" to accepted layout mask strings

Fix possible crash of LLVM builds (clang-cl, Intel nextgen) on pre-AVX (SSE4-only) CPUs.
(Prevent static initialization from avx2 source modules, which cause running AVX instructions on DLL load)

ConvertToMono, GetLeftChannel, GetRightChannel: sets channel layout AVS_SPEAKER_FRONT_CENTER (mono)

GetChannel, GetChannels, MergeChannels will set default channel layout if channel count is 1 to 8
For defaults see VfW section below

New Script function: SetChannelMask: string version.

SetChannelMask(clip, string ChannelDescriptor) (parameters compulsory, no names must be set) (test10)

Accepts predefined channel string or channel layout names or their combination, in ffmpeg style.
Numerical indexes or channel counts are not allowed.
String is case sensitive!
E.g. "stereo+LFE+TC" or "FL+LR" or "5.1(side)"
"mono",
"stereo",
"2.1",
"3.0",
"3.0(back)",
"4.0",
"quad",
"quad(side)",
"3.1",
"5.0",
"5.0(side)",
"4.1",
"5.1",
"5.1(side)",
"6.0",
"6.0(front)",
"hexagonal",
"6.1",
"6.1(back)",
"6.1(front)",
"7.0",
"7.0(front)",
"7.1",
"7.1(wide)",
"7.1(wide-side)",
"7.1(top)",
"octagonal",
"cube"
"speaker_all"
Individual Speaker Channels:
"FL", front left
"FR", front right
"FC", front center
"LFE", low frequency
"BL", back left
"BR", back right
"FLC", front left-of-center
"FRC", front right-of-center
"BC", back center
"SL", side left
"SR", side right
"TC", top center
"TFL", top front left
"TFC", top front center
"TFR", top front right
"TBL", top back left
"TBC", top back center
"TBR", top back right

AudioDub will inherit channel layout setting from the audio clip.

VfW output channel guess (when ChannelMask is not specified) changed at some points.
Default number of channels to channel layout guess was modified to match of ffmpeg
3 channels: Surround to 2.1
4 channels: Quad to 4.0
6 channels: 6.1(back) to 6.1
This follows ffmpeg defaults
Present rules:
const chnls name layout
0x00004 1 mono -- -- FC
0x00003 2 stereo FL FR
0x0000B 3 2.1 FL FR LFE
0x00107 4 4.0 FL FR FC -- -- -- -- -- BC
0x00037 5 5.0 FL FR FC -- BL BR
0x0003F 6 5.1 FL FR FC LFE BL BR
0x0070F 7 6.1 FL FR FC LFE -- -- -- -- BC SL SR
0x0063F 8 7.1 FL FR FC LFE BL BR -- -- -- SL SR

Add initial audio channel mask (channel layout) support (CPP and C interface, script function)
It still belongs to V10 changes (there were only tests since then), but it can be discussed if not.
Technically it is done by using another 18+2 bits in the Clip's VideoInfo.image_type field.
Due to lack of enough bits in this VideoInfo field, the mapping between the original dwChannelMask
and Avisynth's internal values are not 1:1, but all information is kept however.
This is because not 32 but only 18 (strictly: 18+1) bits are defining speaker locations, so
the remaining bits of our existing 'image_type' field can be used for this purpose.
Thus 20 new bits are occupied.

1 bit: marks if channel mask is valid or not
18 bits for the actually defined WAVE_FORMAT_EXTENSIBLE dwChannelMask definitions
(https://learn.microsoft.com/en-us/windows/win32/api/mmreg/ns-mmreg-waveformatextensible)
1 bit for the special SPEAKER_ALL value
Programmers can check AvsChannelMask and AvsImageTypeFlags in avisynth.h and avisynth_c.h

new C++ interface functions

Check for existence:
bool VideoInfo::IsChannelMaskKnown()
Setting:
void VideoInfo::SetChannelMask(bool isChannelMaskKnown, unsigned int dwChannelMask)
Re-maps and stores channel mask into image_type, sets the 'has channel mask' flag as well
Note: this data can be set independently from the actual NumChannels number!
Retrieving:
unsigned int VideoInfo::GetChannelMask()
new C interface functions
bool avs_is_channel_mask_known(const AVS_VideoInfo * p);
void avs_set_channel_mask(const AVS_VideoInfo * p, bool isChannelMaskKnown, unsigned int dwChannelMask);
unsigned int avs_get_channel_mask(const AVS_VideoInfo * p);

Like when establishing BFF, TFF and fieldbased flags from 'image_type', technically 'image_type' can
be manipulated directly. See SetChannelMask and GetChannelMask in Avisynth source for
image_type <-> dwChannelMask conversion.

I guess once ffmpeg will support it, it will read (or not read) channel masks such a way.

new Script functions
bool IsChannelMaskKnown(clip)
int GetChannelMask(clip)
SetChannelMask(clip, bool known, int dwChannelMask) (parameters compulsory, no names must be set)
SetChannelMask(clip, string ChannelDescriptor) (parameters compulsory, no names must be set) (test10)
dwChannelMask must contain the combination of up to 18 positions or 0x80000000 for SPEAKER_ALL.

VfW export rules (included the existing sequence)
1.) OPT_UseWaveExtensible global variable must be...


AviSynth+ 3.7.2

C interface Win32 access: fix issue by adding V8 interface function…
… names to avisynth.def

or else names are decorated (Issue #276)
e.g. DLL published _avs_get_frame_props_ro@8 instead of avs_get_frame_props_ro

ShowRed/Green/Blue/Alpha/Y/U/V: addition to earlier fixes:
When clips are planar and both source and destination format have alpha plane,
then it will be copied instead of filled with 255d.
Additional checking is done for alpha plane size when ShowU/V, because when
source is subsampled the original alpha plane cannot be copied (larger).

ConvertBits:
Does not get frame 0 in constructor for frame properties if 'fulls' is directly specified. (magiblot)
May make script initialization much quicker (Issue #275)
#275

Trim, AudioTrim: bool 'cache' (default true) parameter.
Workaround for Issue #274, lower memory consumption but may be slower.
Benefits heavily depend on how trimmed clips are used later.

Expr: scale_inputs to case insensitive and add floatUV to error message as an allowed value.

propCopy: able to specify that the property list is negative.
bool "exclude" = false # default: "props" is positive list

propCopy(org,true,props=["_Matrix", "_ColorRange"], exclude=false) # merge only two properties
propCopy(org,true,props=["_Matrix", "_ColorRange"], exclude=true) # merge all, except listed ones
propCopy(org,props=["_Matrix", "_ColorRange"]) # erase all then copy only selected
propCopy(org,props=["_Matrix", "_ColorRange"], exclude = true) # erase all, then copy all, except listed ones

Version()
New optional parameters

int length, int width, int height, string pixel_type, clip c

Version clip defaults:
length=240, width = -1, height = -1 (-1: automatically sized to fit for font size 24)
pixel_type = "RGB24"

When 'clip' (a format template) is specified then pixel_type, length,
fps data, width and height are defined from it.
If any additional 'length', 'width', 'height', 'pixel_type' parameter is given, it overrides defaults.
When width and height is given and is <= 0 then it is treated as 'automatic'

Covers feature request Issue #261

BlankClip: allow 'colors' with array size more than the number of actual planes.
If an array is larger, further values are simply ignored.

BlankClip, AddBorders, LetterBox: no A=0 check for non-YUVA

Fade filter family new parameters
int 'color_yuv'
array of float 'colors'
similar to BlankClip

MergeRGB, MergeARGB

add MergeARGB parameter "pixel_type", similar to MergeRGB
accept pixel_type other than packed RGB formats, plus a special one is "rgb"
output format is planar rgb(a) (MergeRGB/MergeARGB) when
pixel_type = "rgb" or
pixel_type is empty and
either input is planar RGB
either input is different from 8 or 16 bits (no packed RGB formats there)
pixel_type is explicitely set to a valid planar rgb constant e.g. "RGBP10"
Accept planar RGB clip in place of input clips and the appropriate color plane is copied from them
Fill alpha channel with zero when MergeRGB output pixel_type format is specified to have an alpha plane
frame property source is the R clip; _Matrix and _ChromaLocation are removed if R is not an RGB clip
PropDelete: accept a non-empty array string as list of property names to remove
Parameter is not optional, and has no name. It can be either a string (as before) or an array of strings
propDelete("_Matrix") # old syntax, still accepted
propDelete(["_Matrix", "_ColorRange"])

PropCopy: new string parameter "props" as list of property names to remove
"props": a non-empty array of strings

old syntax, still accepted:
propCopy(org,true) # merge from all org's properties
propCopy(org,false) # erase all then copy all org's properties (exact copy)
new syntax
propCopy(org,true,props=["_Matrix", "_ColorRange"]) # merge
propCopy(org,props=["_Matrix", "_ColorRange"]) # erase all then copy only selected

Histogram Levels: stop using shades of grey on top of bars.

Histogram Levels: use bar color 255 for RGB instead of Y's 235. (and scaled eqivivalents)

Fix: Histogram "Levels": prevent crash when factor=0.0

Fix: Histogram "Levels": fix regression incorrect "factor" applied for U/V part drawing when format was subsampled (non-444)
Regression since 20160916 r2666 (commit 986e275)

Histogram "Audiolevels" and StereoOverlay to deny planar RGB

Histogram "Luma": support 10-16 and 32 bits

Histogram: give parameter name "factor" and type 'float' for Histogram's unnamed optional parameter used in "Level" mode.
Other modes just ignore this parameter if given.

Fix: Histogram "color" may crash on certain dimensions for subsampled formats.
Regression since 20180301 r2632.

Fix: Histogram "color" and "color2" mode check and give error on Planar RGB

Fix: missing Histogram "color2" CCIR rectangle top and bottom line (black on black)
Regression since 3.6.2-test1 (commit 1fc82f0)

Fix: Compare to support 10-14 bits
was: factor was always using 65535 (2^16-1) instead of (2^bit depth - 1)
was: 16 bit luma/rgb color values were used for drawing graph

Fix: Compare
'channels' parameter default to "Y" when input is greyscale;
instead of "YUV" which was giving error because of U and V does not exist for this format.

ShowRed/Green/Blue/Alpha/Y/U/V

support YUY2 input

support YV411 output

(not changed: ShowU/ShowV may give error for 420, 422 or 411 format outputs when clip dimensions are
not eligible for a given output subsampling (check for appropriate mod2 or mod4 width or height)

Copy alpha from source when target is alpha-capable

Fill alpha with maximum pixel value when target is alpha-capable but source ha no alpha component

Delete _Matrix and _ChromaLocation frame properties when needed.

More consistent behaviour for YUV and planar RGB sources.

Default pixel_type is adaptive. If none or empty ("") is given for pixel_type then target format is

YUV444 when source is Y, YUV or YUVA
RGB32/64 (packed RGB) when source is RGB24/32/48/64
RGBP (planar RGB) when source is RGBP or RGBAP
When 'rgb' is given for pixel_type then then target format is

RGB32/64 (packed) when source is RGB24/32/48/64 - old, compatible way
RGB planar when source is planar RGB(A) or YUV(A) or Y - changed from rgb32/64 because all bit depth must be supported
When 'yuv' is given (new option!) for pixel_type then then target format is

YUV444 for all sources
Also there is a new option when pixel_type is still not exact, and is given w/o bit depth.
pixel_type which describes the format without bit depth is automatically extended to a valid video string constant:

y, yuv420, yuv422, yuv444, yuva420, yuva422, yuva444, rgbp, rgbap

Examples:

32 bit video and pixel_type 'y' will result in "Y32"
16 bit video and pixel_type 'yuv444' will result in "YUV444P16"
8 bit video and pixel_type 'rgbap' will result in "RGBAP8"

Fix #263. Escaping double-quotes results in error

Allow top_left (2) and bottom_left (4) chroma placements for 422 in colorspace conversions, they act as "left" (0, "mpeg2")
in order not to give error with video sources which have _ChromaLocation set to other than "mpeg2"
See https://trac.ffmpeg.org/ticket/9598#comment:5

Fix: Expr LUT operation Access Violation on x86 + AVX2 due to an unaligned internal buffer (<32 bytes)

Fix: Chroma full scale as ITU Rec H.273 (e.g +/-127.5 and not +/-127) in internal converters, ColorYUV and Histogram

Fix #257: regression in 3.7.1: GreyScale to not convert to limited range when input is RGB. Regression in 3.7.1
Accepts only matrix names of limited range as it is put in the documentation.

Fix #256: ColorYUV(analyse=true) to not set _ColorRange property to "full" if input has no such
property and range cannot be 100% sure established. In general: when no _ColorRange for input and
no parameter which would rely on a supposed default (such as full range for gamma), then an
output frame property is not added.
When no _ColorRange for input and no other parameters to hint color range then

gamma<>0 sets full range
opt="coring" sets limited range
otherwise no _ColorRange for output would be set
Overlay (#255): "blend": using accurate formula using float calculation. 8 bit basic case is slower now when opacity=1.0.
Higher bit depths and opacity<1.0 cases are quicker.
Mask processing suffered from inaccuracy. For speed reasons mask value 0 to 255 were handled
as mask/256 instead of mask/255. Since with such calculation maximum value was not the expected 1.0 but rather 255/256 (0.996)
this case was specially treated as 1.0 to give Overlay proper results at least the the two extremes.
But for example applying mask=129 to pixel=255 resulted in result_pixel=128 instead of 129. This was valid on higher bit depths as well.
Note 3.7.2 Test2 has a regression of broken maskless mode for 0<opacity<1 which was fixed in 3.7.2 test 3

Fix: Attempt to resolve deadlock when an Eval'd (Prefetch inside) Clip result is
used in Invoke which calls a filter with GetFrame in its constructor.
(AvsPMod use case which Invokes frame prop read / ConvertToRGB32 after having the AVS script evaluated)
Remark: problem emerged in 3.7.1test22 which is trying to read frame properties of the 0th frame in its constructor.
A similar deadlock situation was already fixed earlier in Neo branch and had been backported but it did not cover this use case.
Note: Prefetch(1) case was fixed in 3.7.2 Test


AviSynth+ 3.7.1

Additions:

Linux: Show more information when dlopen fails
Expr: allow auto scaling effect on pixels obtained from relative addressing
New array manipulators: ArrayDel, ArrayAdd, ArrayIns, ArraySet with accepting multi dimensional indexes
ExtractY/U/V/R/G/B/A, PlaneToY: delete _ChromaLocation property. Set _ColorRange property to "full" if source is Alpha plane
Add new AEP (Avisynth Environtment Property) constants to directly query Avisynth interface main and bugfix version and system endianness:
AEP_HOST_SYSTEM_ENDIANNESS, AEP_INTERFACE_VERSION, AEP_INTERFACE_BUGFIX (c++)
AVS_AEP_HOST_SYSTEM_ENDIANNESS, AVS_AEP_INTERFACE_VERSION, AVS_AEP_INTERFACE_BUGFIX (c)
Interface: introduce AVISYNTHPLUS_INTERFACE_BUGFIX_VERSION.
New interface functions env->MakePropertyWritable/VideoFrame::IsPropertyWritable.
Expr: allow 'f32' as internal autoscale target (was: i8, i10, i12, i14, i16 were accepted, only integers)
Expr: LUT mode! 'lut'=1 or 2 for 1D (lut_x) and 2D (lux_xy) support
xPlaneMin/Max/Median/MinMaxDifference to accept old packed formats (RGB24/32/48/64 and YUY2) by autoconverting them to Planar RGB or YV16
New runtime function: PlaneMinMaxStats returns an array and/or set global variables.
Language syntax: accept arrays in the place of "val" script function parameter type regardless of being named or unnamed.
Histogram "Levels": more precise drawing when bit depth is different from histogram's resolution bit depth, plus using full/limited flag.
Expr: no more banker's rounding when converting back float result to integer pixels. Using the usual truncate(x+0.5) rounding method
ColorYUV: More consistent and accurate output across different color spaces, match with ConvertBits fulls-fulld conversions
ColorYUV: set _ColorRange frame property
ColorYUV: when no hint is given by parameter "levels" then it can use _ColorRange (limited/full) frame property for establishing source range for gamma
ColorYUV "showyuv_fullrange"=true: fix shown U and V ranges. E.g. for bits=8: 128 +/- 127 (range 1..255 is shown) instead of 0..255
propShow: display _Matrix, _ColorRange and _ChromaLocation constants with friendly names
Expr: new function "sgn". Returns -1 when x is negative; 0 if zero; 1 when x is positive
Expr: add "neg": negates stack top: a = -a
ConvertBits: Support YUY2 (by autoconverting to and from YV16), support YV411
ConvertBits: "bits" parameter is not compulsory, since bit depth can stay as it was before. Call like ConvertBits(fulld=true)
ConvertBits: much nicer output for low bit depth targets such as dither_bits 1 to 7.
ConvertBits: allow dither down from 8 bit sources by giving a lower dither_bits value
ConvertBits: dither=1 (Floyd-S) to support dither_bits = 1 to 16 (similar to ordered dither)
ConvertBits: dither=0 (ordered) to allow odd dither_bits values. Any dither_bits=1 to 16 (was: 2,4,6,8,..)
ConvertBits: dither=0 (ordered) allow larger than 8 bit difference when dither_bits is less than 8.
ConvertBits: Correct conversion of full-range chroma at 8-16 bits. Like 128+/-112 -> 128+/-127 in 8 bits
ConvertBits: allow dither from 32 bits to 8-16 bits
ConvertBits: allow different fulls fulld when converting between integer bit depths (was: they must have been the same)
ConvertBits: allow 32 bit to 32 bit conversion
frame property support: _ChromaLocation in various filters (e.g. ConvertToYUV422)
Support additional chroma locations "top", "bottom_left", "bottom"
New syntax for "matrix" parameters (e.g. in ConvertToYUV444 old:"rec601" new "170m:l") which separate matrix and full/limited marker.
Old syntax is still valid but does not support all new matrix values.
frame propery support: _Matrix and _ColorRange in various filters. New "matrix" string constants
RGB<->YUV (YUY2) conversions: frame property support _Matrix and _ColorRange (_Primaries and _Transfer is not used at all yet)
ConvertBits: use input frame property _ColorRange to detect full/limited range of input clip
ColorBars, ColorBarsHD, BlankClip: set frame properties _ColorRange and _Matrix
New function: propCopy to copy or merge frame properties from one clip to another.
xxxPlaneMin xxxPlaneMax, xxxPlaneMinMaxDifference for 32 bit float formats:
when threshold is 0 then return real values instead of 0..1 (chroma -0.5..0.5) clamped histogram-based result
Allow propGetXXX property getter functions called as normal functions, outside runtime. Frame number offset can be used.
YUY2 RGB conversions now allow matrix "PC.2020" and "Rec2020"
4:2:2 conversions: allow ChromaInPlacement and ChromaOutPlacement:
Valid values: left/mpeg2, center/mpeg1/jpeg
4:2:0 conversions: new ChromaInPlacement and ChromaOutPlacement values:
top_left, left (alias to mpeg2), center (alias to mpeg1), jpeg (alias to mpeg1) (see http://avisynth.nl/index.php/Convert)
Expr: atan2 (SIMD acceleration as well)
Expr: sin and cos SIMD acceleration (SSE2 and AVX2) port from VapourSynth (Akarin et al.)
Expr: x.framePropName syntax for injecting actual frame property values into expression
Script functions to supports arrays with _nz type suffix. (one or more)
Expr: arbitrary variable names (instead of single letters A..Z), up to 128 different one.
Expr: add 'round', 'floor', 'ceil', 'trunc' operators (nearest integer, round down, round up, round to zero)
Acceleration requires at least SSE4.1 capable processor or else the whole expression is running in C mode.
Recognize ' and b and v in escaped (e"somethg") string literals (see http://avisynth.nl/index.php/The_full_AviSynth_grammar#Literals)
Expr: allow TAB, CR and LF characters as whitespace in expression strings
Clip types for propSet, propGet, add propSetClip, propGetClip
Clip content support for propGetAsArray, propSetArray and propGetAll
RGBAdjust: analyse=true 32 bit float support
Build environment, Interface:

Added stubs for compiling on RISC-V and SPARC
Visual Studio 2022: Add /fp:contract to compilation parameters (addition to /fp:precise)
Check Visual Studio 2022, add build examples to documentation. Recognized: it has still an option to use v141_xp toolkit
CMake build environment: older GCC can be used which knows only -std=c++-1z instead of c++17
AviSynth programming interface V8.1 / V9:
Add 'MakePropertyWritable' to the IScriptEnvironment (CPP interface), avs_make_property_writable (C interface)
Add 'VideoFrame::IsPropertyWritable' (CPP interface), avs_is_property_writable (C interface)
Info on Windows XP compatibility (must revert to an older Visual C++ Redistributable)
CMake/source: Intel C++ Compiler 2021 and Intel C++ Compiler 19.2 support
experimental! Fix CUDA plugin support on specific builds, add CMake support for the option.
Fixes for building the core as a static library
Fixes:

Fix: "Text" filter would crash when y coord is odd and format has vertical subsampling
Fix: MinMax runtime filter family: check plane existance (e.g. error when requesting RPlaneMinMaxDifference on YV12)
Fix: prevent x64 debug AviSynth builds from crashing in VirtualDub2 (opened through CAVIStreamSynth)
Expr: fix conversion factor (+correct chroma scaling) when integer-to-integer full-scale automatic range scaling was required
ColorYUV: fix 32 bit float output
ColorYUV: fix display when showyuv=true and bits=32
ConvertBits: "dither" parameter: type changed to integer. Why was it float? :)
ConvertBits: Fix: fulls=true -> fulld=true 16->8 bit missing rounding
Fix: Planar RGB 32 bit -> YUV matrix="PC.709"/"PC.601"/"PC.2020" resulted in greyscale image
SelectRangeEvery: experimental fix on getting audio part (TomArrow; #232)
Fix: Overlay "blend" 10+ bit clips and "opacity"<1 would leave rightmost non-mod8 (10-16 bit format) or non-mod4 (32 bit format) pixels unprocessed.
Fix: Overlay "blend" with exactly 16 bit clips and "opacity"<1 would treat large mask values as zero (when proc>=SSE4.1)
Parser: proper error message when a script array is passed to a non-array named function argument
(e.g. foo(sigma=[1.1,1.1]) to [foo]f parameter signature)
Fix: Expr: wrong constant folding optimization when ternary operator and Store-Only (like M^) operator is used together.
ColorBars: fixed studio RGB values for -I and +Q for rgb pixel types
ColorBarsHD: use BT.709-2 for +I (Pattern 2), not BT.601.
Also fixed Pattern 1 Green.Y to conform to SMPTE RP 219-1:2014 (133, not 134).
Overlay mode "multiply": proper rounding in internal calculations
Fix: ConvertAudio integer 32-to-8 bits C code garbage (regression in 3.7)
Fix: ConvertAudio: float to 32 bit integer conversion max value glitch (regression in 3.7)
Fix: Crash in ColorBars very first frame when followed by ResampleAudio
Fix: frame property access from C interface
Fix: StackVertical and packed RGB formats: get audio and parity from the first and not the last clip
Optimizations:

Quicker ClearProperties and CopyProperties filters (by using MakePropertyWritable instead of MakeWritable).
ConvertBits: AVX2 support
ConvertBits: Special case for: 8->16 bit fulls=true, fulld=true
Expr: consume less bytes on stack. 48x Expr call in sequence caused stack overflow
xxxPlaneMin xxxPlaneMax, xxxPlaneMinMaxDifference for threshold 0 became a bit quicker for 8-16 bit formats (~10% on i7-7700)
Speedup: Overlay mode "multiply": overlay clip is not converted to 4:4:4 internally when 420 or 422 subsampled format
(since only Y is used from that clip)
Speedup: Overlay mode "multiply": SSE4.1 and AVX2 code (was: C only)
SSE4.1: ~1.2-2.5X speed, AVX2: ~2-3.5X speed (i7700 x64 single thread, depending on opacity full/not, mask clip yes/no)
ConvertAudio: Add direct Float from/to 8/16 conversions (C,SSE2,AVX2)


AviSynth+ 3.7.0

Haiku support
PowerPC support
Support for building the core as a static library (mcmtroffaes)
Fixes for MinGW-w64 compilation
Shibatch, TimeStretch, and ImageSeq GCC build support
Shibatch, TimeStretch, and ImageSeq non-Windows support
Fix: AddBorders did not pass frame properties
Fix: propSet, propDelete and propClearAll not to ruin visibility of variables
(property read functions are still kept being runtime only)
AviSource: fix test5 regression which refused handling old formats like YV24
Resizers: throw error on too small dimensions vs. taps
Add ShowCRC32 debug filter. Parameters are the same as in ShowFrameNumber
Overlay: allow 4:1:1 input
Overlay: fix crash when mask is YUV411 and greymask=false
Overlay: may work quicker, most input/overlay/mask/output clip format conversions moved to filter constructor
RemoveAlphaPlane: do nothing on YUY2 instead of throwing an error message
AviSource: support non-printing characters in fourCC code: allow [number] style, e.g. G3[0][16]
AviSource: add Y410 (YUVA444P10) format support. Allow 'Y410' pixel_type hints.
AviSource: decode b64a, b48r, v210, P210, P010, P016, P216, v410, Y416, r210, R10k, v308, v408, Y410 fourCCs natively.
Fix: Average...: check for valid colorspace (e.g. no AverageB for a YUV clip)
Add: AverageA
New: Average...: allow YUY2, RGB24/32/48/64 inputs
Fix: Overlay: Actual frame of a mask clip would be freed up too early in MT environment
Fix: ConvertBits to ignore dither parameter instead of throwing error, in a 8 to 8 bit case
Fix: GeneralConvolution missing internal rounding on 8-16 bit formats
support for Win10 long file path option
project: Improve inclusion of the ghc filesystem helper library
project: Add a GitHub action workflow
posix: fix crash when autoloading imports
internally refactored ConvertAudio
ConvertBits(8): fix dither=1 (floyd) for RGB48/RGB64
Fix: Blur right side garbage: 16 bit+AVX2+non mod32 width
Fix: check fn signature with implicite "last" first (3.6 regression)
Fix: function parameters provided as arrays (e.g. GrunT callback of WriteFileIf)
Fix: ConvertBits (YUV): proper rounding when bit depth is reduced and origin is 10-16 bits
(added rounder before bit-shift)
New: Histogram("color2") to support 10+ bits.
Allow bits=x (x=8,9,10,11,12) parameter for this kind of histogram as well.


AviSynth+ 3.6.1

Fix: proper handling of autoload directories precedence:
PluginDir+ in Software/Avisynth in HKEY_CURRENT_USER (highest priority)
PluginDir+ in Software/Avisynth in HKEY_LOCAL_MACHINE
PluginDir2_5 in Software/Avisynth in HKEY_CURRENT_USER
PluginDir2_5 in Software/Avisynth in HKEY_LOCAL_MACHINE (lowest priority)
Plugin (dll file name) found in a lower priority folder will not load if a similarly named plugin
already existed earlier.
fix: GeneralConvolution: incorrect parse of negative integer coefficient (added +1)
Regression since r2772.
Fix: GeneralConvolution: possible crash when chroma=true for 420 and 422 formats
Fix: ScriptClip + Runtime function object (which are new in 3.6) under heavy multithreading
New: Histogram("levels") to allow greyscale
Fix 3.6 regressions
when explicit "return last" was needed when followed by legacy function definition.
Windows XP is supported again (thread local storage workaround)
Stabilize CPP 2.5 plugins
allow forced named arrays usage again from plugins (MP_PipeLine)
Frame property related constants to match existing enum style in avisynth.h.
Plus they are not colliding now with VapourSynth's definitions.
Legend:
*_vcredist* = Includes the MSVC 2019 Redistributable
*_xp = Can be used on Windows XP
*-filesonly = Only the .dll files themselves, no installer. Includes both normal and -xp variants.
*_arm64test = Test build for Windows 10 on ARM64 processors.


AviSynth+ 3.6.0

Added predefined macros for ARM processors. Tested on Raspberry Pi 4B.
Added support for disabling the Intel SIMD intrinsics. Gets automatically disabled on non-x86 targets.
Added submodule to allow macOS 10.13 and 10.14 to build AviSynth+ with the native Clang compiler
Fixed some warnings on GCC (wangqr)
Implemented GetNumPhysicalCPUs on Linux and macOS (wangqr)
New function:
SetMaxCPU(string feature)

string "feature"

"" or "C" for zero SIMD support, no processor flags are reported
"mmx", "sse", "sse2", "sse3", "ssse3", "sse4" or "sse4.1", "sse4.2", "avx, "avx2"

parameter is case insensitive.
Note: "avx2" triggers FMA3 flag as well.

Processor options w/o any modifier will limit the CPU flag report to at most the processor level.
When "feature" is ended by '+', relevant processor feature flag will be switched on
When "feature" is ended by '-', relevant processor feature flag will be removed
Multiple options can be put in a comma separated list. They will evaluated in that order.

Examples:
SetMaxCPU("SSE2") reports at most SSE2 processor (even if AVX2 is available)
SetMaxCPU("avx,sse4.1-") limits to avx2 but explicitely removes reporting sse4.1 support
SetMaxCPU("C,avx2+") limits to plain C, then switches on AVX2-only support
Script array for NEW_AVSVALUE define are working again. (default in Linux build - experimental)
Fix: Mix/Max Runtime function 32bit float chroma: return -0.5..0.5 range (was: 0..1 range)
AviSynth+ enhancements by Nekopanda (Neo fork)
Allow multiple prefetchers (MT) (mentioned earlier)
Multithreading and deadlock fixes for ScriptClip
(originally I intended to pull only Neo changes which were fixing an old AVS+ bug,
namely ScriptClip and multithreading. But I was not able to do that without pulling
nearly everything from Neo)
Caching enhancements.
SetCacheMode(0) or SetCacheMode(CACHE_FAST_START) start up time and size balanced mode
SetCacheMode(1) or SetCacheMode(CACHE_OPTIMAL_SIZE) slow start up but optimal speed and cache size
Latter can do wonders especially at really low memory environment
ScriptClip and variable stability in multithreading.
UseVar, special filter, opens a clean variable environment in which only the
variables in the parameter list can be seen.
"escaped" string constants: with e prefix right before the quotation mask
n"Hello n" will store actual LF (10) control character into the string
n r t a f and " are converted
Introduce function objects into scripts
Functions can appear as standard Avisynth variables and parameters (AVSValue type='n')
https://github.com/nekopanda/AviSynthPlus/wiki/Language-New-Features
Even with variable capture [] (like in GRuntT args)
Filter graph. Switch it on by putting SetGraphAnalysis(true) at the beginning of the script.
Dump to text file with DumpFilterGraph. E.g. DumpFilterGraph("graph.txt", mode=2)
Frame properties (still from Neo!)
(experimental, we have planned it in Avs+, probably we'll try to follow the VapourSynth methods(?))
Fix: Multithreading enhancements and fixes (Nekopanda, from Neo fork)
Fix old ScriptClip (runtime filters) issue
In this example "current_frame" variable was not seen by YDifferenceFromPrevious scripted within SubTitle
resulting in "ERROR: Plane Difference: This filter can only be used within run-time filters" message
Now this script finally works:
SetLogParams("log.txt", LOG_DEBUG)
ColorBars(width=640, height=480, pixel_type="yv12")
ScriptClip(last, "Subtitle(String(YDifferenceFromPrevious))")
Prefetch(4)
Fix deadlock of ScriptClip on MT
MT improvement
Allow multiple Prefetchers

Add argument to Prefetch to change # of prefetch frames without changing # of threads
ex. Prefetch (clip c, int threads, int "frames")

In the original Plus, you could use only one Prefetch, but you can use any number of CUDA versions.
Also, an argument has been added to specify the number of frames to prefetch.
Prefetch (1,4) # Make 1 thread stand and prefetch 4 frames
By doing so, flexible parallelization configuration is possible, such as pipeline parallelization.

threads
Number of threads. If it is 0, it passes without doing anything.

frames
Number of frames to prefetch.
Again, if it is 0, it passes without doing anything.

Fix: BuildPixelType: chroma subsampling of sample clip was ignored.
POSIX: better behaviour under non-Windows because of having multiple sized fixed fonts, not only a single size=20 one.
e.g. MessageClip(), Info(), Version(), ColorYUV "show", internal ApplyMessage
Text filter:
font types with
"Terminus" fixed fonts added (12-14-16-18-20-22-24-28-32, regular + bold)
"Info_h" good old 10x20 fixed font kept under this name
much more international unicode characters (1354), use utf8=true under Windows
use fontname parameter (default "Terminus", other choice is "info_h")
use font_filename parameter (accepts BDF fonts at the moment - import is probably not too smart but worked for Terminus)
use size parameter (12 to 32, if no size is available, a smaller one is chosen but at least the smallest one)
new parameter: bold (default false)
Info() filter: when parameter "size" < 0, font is automatically enlarged over 640x480
(POSIX limit: minimum size is 12, maximum size is 32 - limited by available fixed fonts)")
SIL OPEN FONT LICENSE added because of usage of Terminus fonts)
able to build w/o GDI and font rendering engine under Windows, so that text-overlay filters
work like in POSIX version of AviSynth+ (mainly for my development test)
Use with NO_WIN_GDI define.
Fix: ReplaceStr when the pattern string to be replaced is empty
New:
Exist() to have bool utf8 parameter
This is another function to have utf8 option:
Usage: b = Exist("&#1047;&#1076;&#1088;&#1072;&#1074;&#1089;&#1090;&#1074;&#1091;&#1081;.mkv",utf8=true). Avs file is saved as utf8 w/o BOM
Fix: broken Exist for directories (regression appeared in 3.5.0)
Fix: ColorYUV: really disable variable search when parameter "conditional" is false
Development:
ScriptEnvironment::VSprintf: parameter (void *) is changed back to va_list.
May affect C interface (avs_vsprintf) and CPP interface (ScriptEnvironment::VSprintf)
Enhanced: Planar RGB to YUV 444 10-14 bits: more precision (32 bit float internally)
Enhanced: Planar RGB to YUV 444 10-16 bits: AVX2 (speed improvement)


AviSynth+ 3.5.1

More compiler coverage on POSIX
Native Clang on FreeBSD 12.1
Native AppleClang on Catalina
general code correctness fixes (-fpermissive is no longer required)
AddAutoloadDir now works on macOS and BSD
FreeBSD requires mounting procfs first in order for autoload to function
Automatic plugin autoloading now enabled on POSIX
ConvertStacked now is built and installed on POSIX by default
SONAME and SOVERSION defined for POSIX libavisynth.so
Fix: BuildPixelType: chroma subsampling of sample clip was ignored.
POSIX: better behaviour under non-Windows because of having multiple sized fixed fonts, not only a single size=20 one.
e.g. MessageClip(), Info(), Version(), ColorYUV "show", internal ApplyMessage
Text filter:
font types with
"Terminus" fixed fonts added (12-14-16-18-20-22-24-28-32, regular + bold)
"Info_h" good old 10x20 fixed font kept under this name
much more international unicode characters (1354), use utf8=true under Windows
use fontname parameter (default "Terminus", other choice is "info_h")
use font_filename parameter (accepts BDF fonts at the moment - import is probably not too smart but worked for Terminus)
use size parameter (12 to 32, if no size is available, a smaller one is chosen but at least the smallest one)
new parameter: bold (default false)
Info() filter: when parameter "size" < 0, font is automatically enlarged over 640x480
(POSIX limit: minimum size is 12, maximum size is 32 - limited by available fixed fonts)")
SIL OPEN FONT LICENSE added because of usage of Terminus fonts)
able to build w/o GDI and font rendering engine under Windows, so that text-overlay filters
work like in POSIX version of AviSynth+ (mainly for my development test)
Use with NO_WIN_GDI define.
Fix: ReplaceStr when the pattern string to be replaced is empty
New:
Exist() to have bool utf8 parameter
This is another function to have utf8 option:
Usage: b = Exist("&#1047;&#1076;&#1088;&#1072;&#1074;&#1089;&#1090;&#1074;&#1091;&#1081;.mkv",utf8=true). Avs file is saved as utf8 w/o BOM
Fix: broken Exist for directories (regression appeared in 3.5.0)
Fix: ColorYUV: really disable variable search when parameter "conditional" is false
Development:
ScriptEnvironment::VSprintf: parameter (void *) is changed back to va_list.
May affect C interface (avs_vsprintf) and CPP interface (ScriptEnvironment::VSprintf)
Enhanced: Planar RGB to YUV 444 10-14 bits: more precision (32 bit float internally)
Enhanced: Planar RGB to YUV 444 10-16 bits: AVX2 (speed improvement)


AviSynth+ 3.5.0

New:

New: Native Linux, macOS, and BSD support.
New function:
bool IsVersionOrGreater(int majorVersion, int minorVersion [,int bugfixVersion]) function
Returns true if the current version is equal or greater than the required one in the parameters.
The function is checking the current version against the given parameters (similar to a Windows API function)
e.g. IsVersionOrGreater(3, 4) or IsVersionOrGreater(3, 5, 8)
New: "Expr" helpers:
Constants "yrange_min", "yrange_half", "yrange_max"
Unlike the luma/chroma plane adaptive "range_min", "range_half", "range_max" these constants always report the luma (Y) values
new parameter: bool clamp_float_UV (default false)
this parameter affects clamping of chroma planes: chroma is clamped between 0..1.0 instead of -0.5..0.5s
"clamp_float" is not ignored (and set to true) when parameter "scale_inputs" auto-scales 32 bit float type pixels
New "yscalef" and "yscaleb" keywords similar to "scalef" and "scaleb" but scaling is forced to use rules for Y (non-UV) planes
new allowed value "floatUV" for scale_inputs.
In short: chroma pre-shift by 0.5 for 32 bit float pixels
Affects the chroma plane expressions of 32 bit float formats.
Shifts the input up by 0.5 before processing it in the expression, thus values from -0.5..0.5 (zero centered) range are converted to the 0..1 (0.5 centered) one.
Since the expression result internally has 0..1.0 range, this then is shifted back to the original -0.5..0.5 range. (since 2.2.20)
Note: predefined constants such as cmin, cmax, range_min, range_max and range_half will be shifted as well, e.g. the expression will see range_half = 0.5
These modifications are similar to Masktools2 2.2.20+
New: AddBorders, LetterBox: new color_yuv parameter like in BlankClip
Fixes:

Fix: ConvertBits 32->8 for extremely out of range float pixel values.
When pixel value in a 32 bit float format video was way out of range and greater than 128 (e.g. instead of 0 to 1.0 for Y plane) then the ConvertBits(8) had artifacts.
Fix potential crash on exit or cache shrink (linux/gcc only?)
Layer: support RGB24 and RGB48 (internally processed as Planar RGB - lossless pre and post conversion)
Fix: RGBP to 444 8-14bit right side artifacts at specific widths
Fix: "scalef" and "scaleb" for 32 bit input, when scale_inputs="floatf" produced wrong result
Fix: missing rounder in V channel calculation of PlanarRGB->YUV 8-14bits SSE2 code
Overlay: show error when Overlay is fed with clips with different bit depths
Fix: TemporalSoften possible access violation after SeparateFields (in general: after filters that only change frame pitch)
Fix: Shibatch.DLL Access Violation crash when exit when target rate is the same as vi.audio_samples_per_second or audio_samples_per_second is 0
Build system: Cmake: use platform toolset "ClangCL" for using built-in Clang support of Visual Studio.
Since VS2019 v16.4 there is LLVM 9.0 support.
Use: Tools|Get Tools and Features|Add Individual Components|Compilers, build tools, and runtimes
[X] C++ Clang compiler for Windows
[X] C++ Clang-cl for v142 build tools (x64/x86)
(for LLVM Clang installed separately, please use llvm or LLVM - no change in its usage)


AviSynth+ 3.4.0

Merges in the MT branch, the current state of pinterf/MT, and packaging fixes
Bumps version to 3.4


Avisynth+ r2772 (20181220)

Fix: Expr: possible Expr x64 crash under specific memory circumstances (AVX2 only)
Fix: Expr: safer code for internal variables "Store and pop from stack" (see: Internal variables at http://avisynth.nl/index.php/Expr)


Avisynth+ r2768-MT (20181218)

New: Expr: allow input clips to have more planes than an implicitely specified output format
Expr(aYV12Clip, "x 255.0 /", format="Y32") # target is Y only which needs only Y plane from YV12 -> no error
New: Expr: Y-plane-only clip(s) can be used as source planes when a non-subsampled (rgb or 444) output format implicitely specified
Expr(Y, "x", "x 2.0 /", "x 3.0 /", format="RGBPS") # r, g and b expression uses Y plane
Expr(Grey_r, Grey_g, Grey_b, "x", "y 2.0 /", "z 3.0 /", format="RGBPS") # r, g and b expression uses Y plane
Fix: ConvertToYUY2() error message for non-8 bit sources.
Fix: Y32 source to 32 bit 420,422,444 (introduced in big the zero-chroma-center transition)
Fix: ShowY, ShowU, ShowV crash for YUV (non-YUVA) sources
Speedup: ConvertToY12/16... for RGB or YUY2 sources where 4:4:4 or YV16 intermediate clip was used internally
(~1.5-2x speed, was a regression in Avs+, use intermediate cache again)
Fix: Allow ExtractY on greyscale clips
ImageReader/ImageSource: use cache before FreezeFrame when result is a multiframe clip (fast again, regression since an early AVS+ version)
Resizers: don't use crop at special edge cases to avoid inconsistent results across different parameters/color spaces
Fix: Histogram 'classic': rare incomplete histogram shown in multithreading environment
Fix: ImageReader and ImageWriter: if path is "" then it works from/to the current directory.
GeneralConvolution: Allow 7x7 and 9x9 matrices (was: 3x3 and 5x5)
GeneralConvolution: All 8-32 bit formats (was: RGB32 only): YUY2 is converted to/from YV16, RGB24/32/48/64 are treated as planar RGB internally
Since 32 bit float input is now possible, matrix elements and bias parameter now is of float type.
For 8-16 bit clips the matrix is converted to integer before use.
GeneralConvolution: Allow chroma subsampled formats to have their luma or chroma processed. E.g. set chroma=false for a YV12 input.
GeneralConvolution: new parameters: boolean luma (true), boolean chroma(true), boolean alpha(true)
Default: process all planes. For RGB: luma and chroma parameters are ignored.
Unprocessed planes are copied. Using alpha=false makes RGB32 processing faster, usually A channel is not needed.
GeneralConvolution: MT friendly parameter parsing
New: UTF8 filename support in AviSource, AVIFileSource, WAVSource, OpenDMLSource and SegmentedAVISource
All functions above have a new bool utf8 parameter. Default value is false.
Experimental: new syntax element (by addewyd): assignment operator ":=" which returns the assigned value itself.
(Assignment within an expression)


Avisynth+ r2728 (20180702)

Fix: Expr: expression string order for planar RGB is properly r-g-b like in original VapourSynth version, instead of counter-intuitive g-b-r.
Fix: Expr: check subsampling when a different output pixel format is given
Fix: ColorYUV: round to avoid green cast on consecutive TV<>PC
Fix: RGBAdjust memory leak when used in ScriptClip
Fix: RGB64 Turnleft/Turnright (which are also used in RGB64 Resizers)
Fix: Rare crash in FrameRegistry
Fix: couldn't see variables in avsi before plugin autoloads (colors_rgb.avsi issue)
Fix: LoadVirtualdubPlugin: Fix crash on exit when more than one instances of a filter was used in a script
New: Expr: implement 'clip' three operand operator like in masktools2
New: Expr: Parameter "clamp_float" (like in masktools2 2.2.15)
New: Expr: parameter "scale_inputs" (like in masktools2 2.2.15)
New: function bool VarExist(String variable_name)
New function: BuildPixelType:
Creates a video format (pixel_type) string by giving a colorspace family, bit depth, optional chroma subsampling and/or a template clip, from which the undefined format elements are inherited.
Enhanced: Limiter to work with 32 bit float clips
Enhanced: Limiter new parameter bool 'autoscale' default false, parameters now are of float type to handle 32 bit float values.
Enhanced: RGBAdjust new parameter: conditional (like in ColorYUV)
The global variables "rgbadjust_xxx" with xxx = r, g, b, a, rb, gb, bb, ab, rg, gg, bg, ag are read each frame, and applied.
Enhanced: RGBAdjust: support 32 bit float ('analyze' not supported, 'dither' silently ignored)
Enhanced: AviSource to support much more formats with 10+ bit depth.
Changed (finally): 32bit float YUV colorspaces: zero centered chroma channels.
U and V channels are now -0.5..+0.5 (if converted to full scale before) instead of 0..1
New function: bool IsFloatUvZeroBased() for plugin or script writers who want to be compatible with pre r2672 Avisynth+ float YUV format:
Enhanced: Allow ConvertToRGB24-32-48-64 functions for any source bit depths
Enhanced: ConvertBits: allow fulls-fulld combinations when either clip is 32bits
E.g. after a 8->32 bit fulls=false fulld=true:
Y: 16..235 -> 0..1
U/V: 16..240 -> -0.5..+0.5
Note: now ConvertBits does not assume full range for YUV 32 bit float.
Default values of fulls and fulld are now true only for RGB colorspaces.
New: LoadVirtualdubPlugin update: Update from interface V6 to V20, and Filtermod version 6 (partial)
Source: move to c++17, 'if constexpr' requires. Use Visual Studio 2017 (or GCC 7?). CMakeLists.txt changed.
Source: C api: AVSC_EXPORT to dllexport in capi.h for avisynth_c_plugin_init
Source: C api: avs_is_same_colorspace VideoInfo parameters to const
Project struct: changelog to git.
Include current avisynth header files and def/exp file in installer, when SDK is chosen


Avisynth+ r2664 (20180328)

Fix
YUY2 Sharpen overflow artifacts - e.g. Sharpen(0.6)
Levels: 32 bit float shift in luma
Merge sse2 for 10-14bits (regression)
AVX2 resizer possible access violation in extreme resizes (e.g. 600->20)
32bit float PlanarRGB<->YUV conversion matrix
VfW: fix b64a output for OPT_Enable_b64a=true

Enhanced
VfW output P010 and P016 conversion to SSE2 (VfW output is used by VirtualDub for example)
ColorYUV: recalculate 8-16 bit LUT in GetFrame only when changed frame-by-frame (e.g. in autowhite)
ConvertBits 32->8 sse2/avx2 and 32->10..16 sse41/avx2 (8-15x speed)


Avisynth+ r2636 (20180302)

##Fix
Blur/Sharpen crashed when YUY2.width<8, RGB32.width<4, RGB64.width<2
ColorYUV: don't apply TV range gamma for opt="coring" when explicit "PC->TV" is given
ColorbarsHD: 32bit float properly zero(0.5)-centered chroma


Avisynth+ r2632 (20180301)

##Fix

Fix: IsInterleaved returned false for RGB48 and RGB64 (raffriff42)
Fix: SubTitle for Planar RGB/RGBA: wrong text colors (raffriff42)
Fix: Packed->Planar RGB conversion failed on SSE2-only computers (SSSE3 instruction used)
Fix: Resizers for 32 bit float rare random garbage on right pixels (simd code NaN issue)
##Enhanced

Blur, Sharpen
AVX2 for 8-16 bit planar colorspaces (>1.35x speed on i7-7770)
SSE2 for 32 bit float formats (>1.5x speed on i7-7770)
Completely rewritten 16bit and float resizers, much faster (and not only with AVX2)
8 bit resizers: AVX2 support
Speed up converting from RGB24/RGB48 to Planar RGB(A) - SSSE3, approx. doubled fps
Enhanced: VfW: exporting Y416 (YUV444P16) to SSE2.
##New/Modded

ConvertFPS supports 10-32 bits, planar RGB(A), YUV(A)
New script function: int BitSetCount(int[, int, int, ...])
Modded script function: Hex(int , int "width"=0), new "width" parameter
Modded script function: HexValue(String, "pos"=1) new pos parameter
Modded script function: ReplaceStr(String, String, String[, Boolean "sig"=false]) New parameter: sig for case - insensitive search (Default false: exact search)
New script functions: TrimLeft, TrimRight, TrimAll for removing beginning/trailing whitespaces from a string.
New in ColorYUV: New parameter: bool f2c="false". When f2c=true, the function accepts the Tweak-like parameters for gain, gamma and contrast
New/Fixed in ColorYUV: Parameter "levels" accepts "TV". (can be "TV->PC", "PC->TV", "PC->TV.Y")
New: now gamma calculation is TV-range aware when either levels is "TV->PC" or coring = true or levels is "TV"
New in ColorYUV: 32 bit float support.
ColorYUV: can specify bits=32 when showyuv=true -> test clip in YUV420PS format
Modded: remove obsolate "scale" parameter from ConvertBits.
Internal: 8-16 bit YUV chroma to 32 bit float: keep middle chroma level (e.g. 128 in 8 bits) at 0.5. Calculate chroma as (x-128)/255.0 + 0.5 and not x/255.0
(Note: 32 bit float chroma center will be 0.0 in the future)
New: Histogram parameter "keepsource"=true (raffriff42) for "classic", "levels" and "color", "color2"
New: Histogram type "color" to accept 8-32bit input and "bits"=8,9,..12 display range
New: Histogram parameter "markers"=true. Markers = false disables extra markers/coloring for "classic" and "levels"


Avisynth+ r2580 (20171226)

Fix
(workaround): Merge: Visual Studio 2017 15.5.1/2 generated invalid AVX2 code (x86 crashed)
Temporalsoften 10-14 bits: an SSE 4.1 instruction was used for SSE2-only CPU-s (Illegal Instruction on Athlon XP)


Avisynth+ r2574 (20171219)

Fixes
MaskHS created inverse mask. Regression after r2173
jitasm code generation at specific circumstances
modification, additions
Expr:
new: Indexable source clip pixels by relative x,y positions like x[-1,1]
new functions: sin cos tan asin acos atan
new operator: % (modulo)
new: Variables: uppercase letters A..Z for storing and reuse temporary results, frequently used computations.
new: predefined expr variables 'frameno', 'time', 'width', 'height'
fix: jitasm code generation at specific circumstances
Other
Build: changed avisynth.h, strict C++ conformity with Visual Studio 2017 /permissive- flag
Installer (finally)


20171115 r2544
- Expr: fix "scalef" for 10-16 bits
- Expr optimization: eliminate ^1 +0 -0 *1 /1

20171114 r2542
- New filter: Expr
Ported from Vapoursynth, with a lot of additional tweaks
e.g. AVX2, recognize constant fill, spatial absolute and relative coordinates as input, recognize plane copy,
no GetFrame for unused clips, converts ^2, ^3, ^4 into faster multiplication,
converts x^0.5 into sqrt(x), borrow specific syntax elements from masktools2 (scaling, operators - but not all of them) to have partial
compatibility in widely used existing expression strings (see readme.txt)

clip Expr(clip c[,clip c2, ...], string expr [, string expr2[, string expr3[, string expr4]]] [, string format]
[, bool optSSE2][, bool optAVX2][, bool optSingleMode])

- Add: Levels: 32 bit float format support
- Fix: RGB (full scale) conversion: 10-16 bits to 8 bits rounding issue; pic got darker in repeated 16<->8 bit conversion chain
- Fix: ConvertToY: remove unnecessary clamp for Planar RGB 32 bit float
- Fix: RGB ConvertToY when rec601, rec709 (limited range) matrix. Regression since r2266
- Optimized: Faster RGB (full scale) 10-16 bits to 8 bits conversion when dithering
- Other: Default frame alignment is 64 bytes (was: 32 bytes). (independently of AVX512 support)
- Build:
Built with Visual Studio 2017, v141_xp toolset
Note that DLL will work When you have VS2015 Update 3 redistributable.

Download Visual Studio 2017 Redistributable from here (replaces and compatible with VS2015 redist)

X64:
https://go.microsoft.com/fwlink/?LinkId=746572

x86:
https://go.microsoft.com/fwlink/?LinkId=746571

- Experimental x64 builds for test (internal offsets from int to size_t)
- Source: avisynth_c.h (C interface header file) changed:
Optional define SIZETMOD. Experimental. Offsets are size_t instead of int (x64 is different!)
Fix: avs_get_row_size calls into avs_get_row_size_p, instead of direct field access
Fix: avs_get_height calls into avs_get_row_size_p, instead of direct field access.


20170629 r2508
- Fix TemporalSoften: threshold < 255 (probably since r1576)

20170608 r2506
- Fix CombinePlanes: feeding YV16 or YV411 target with Y8 sources

20170603 r2504
- fix XP support broken in r2502

20170602 r2502
- fix: (Important!) MT_SERIALIZED mode did not always protect filters (regression since r2069)
Such filters sometimes were called in a reentrant way (like being MT_NICE_FILTER), which
possibly resulted in using their internal buffers parallel.
- Fix: ImageWriter crash when no '.' in provided filename
- Fix: Overlay: correct masked blend: keep exact clip1 or clip2 pixel values for mask extremes 255 or 0.
Previously 0 became 1 for zero mask, similarly 255 changed into 254 for full transparency (255) mask
- New: script functions: StrToUtf8, StrFromUtf8: Converting a 8 bit (Ansi) string to UTF8 and back.
- New: PluginManager always throws error on finding wrong bitness DLL in the autoload directories
- Modified: increased x64 default MemoryMax from 1GB to 4GB, but physicalRAM/4 is still limiting
- Modified: allow conversions between RGB24/32/48/64 (8<->16 bits) w/o ConvertBits
- Added VS2017 and v141_xp to CMakeList.txt

20170529 r2489
- fix: memory leak in CAVIStreamSynth (e.g. feeding vdub)
- fix: ConvertToY for RGB64 and RGB48

20170528 r2487
- Blur, Sharpen 10-16 bits planar and RGB64: SSE2/SSE4 (2x-4x speed)
- New script function: int GetProcessInfo([int type = 0])
Without parameter or type==0 the current bitness of Avisynth DLL is returned (32 or 64)
With type=1 the function can return a bit more detailed info:
-1: error, can't establish
0: 32 bit DLL on 32 bit OS
1: 32 bit DLL on 64 bit OS (WoW64 process)
2: 64 bit DLL
- Fix: Blur width=16 (YV12 width=32)
- Fix: Overlay Lighten: artifacts when base clip and overlay clip have different widths (regression since r2290)
- Fix: YUY2 HorizontalReduceBy2 did nothing if target width was not mod4
- ImageReader: 16 bit support; "pixel_type" parameter new formats "RGB48", "RGB64" and "Y16"
- ImageWriter: 16 bit support; save RGB48, RGB64, Y16, planar RGB(A) 8 and 16 bit formats
(note: greyscale through devIL can be corrupt with some formats, use png)
- ImageWriter: flip greyscale images vertically (except "raw" format)
- SubTitle: new parameter "font_filename" allows using non-installed fonts
- (project can be compiled using gcc)
- Allows opening unicode filenames through VfW interface (virtualdub, MPC-HC)
- Script function Import: new parameter bool "utf8" to treat the filenames as UTF8 encoded
(not the script text!)
- SubTitle: new parameter bool "utf8" for drawing strings encoded in UTF8.
Title="Cherry blossom "+CHR($E6)+CHR($A1)+CHR($9C)+CHR($E3)+CHR($81)+CHR($AE)+CHR($E8)+CHR($8A)+CHR($B1)
SubTitle(Title,utf8=true)
- New script functions: ScriptNameUtf8(), ScriptFileUtf8(), ScriptDirUtf8(),
they return variables $ScriptNameUtf8$, $ScriptFileUtf8$ and $ScriptDirUtf8$ respectively

Knows issues:
- Filters with MT_SERIALIZED sometimes can get called in a reentrant way
- Runtime Script functions under MT


20170316 r2455
- Fix: IsY() script function returned IsY8() (VideoInfo::IsY was not affected)
- New: ConvertBits, dither=1 (Floyd-Steinberg): allow any dither_bits value between 0 and 8 (0=b/w)

20170310 r2440
- Fix Merge for float formats
- Fix error text formatting under wine (_vsnprintf_l issue)
- Fix Regression: YUY2 UToY copied V instead of U, since August, 2016 (v2150)

- faster Merge: float to sse2 (both weighted and average)
- faster ordered dither to 8bit: SSE2 (10x speed)

- ColorBars allows any 4:2:0, 4:4:4 formats, RGB64 and all planar RGB formats
- ColorBarsHD accepts any 4:4:4 formats
- Dithering: Floyd-Steinberg
Use convertBits parameter dither=1: Floyd-Steinberg (was: dither=0 for ordered dither)
- Dithering: parameter "dither_bits"
For dithering to lower bit depths than the target clip format
Usage: ConvertBits(x, dither=n [, dither_bits=y])
- ordered dither: dither_bits 2, 4, 6, ... but maximum difference between target bitdepth and dither_bits is 8
- Floyd-Steinberg: dither_bits 1, 2, 4, 6, ... up to target bitdepth - 2
(Avisynth+ low bitdepth, Windows 3.1 16 bit feeling I was astonished that dither_bits=6 still resulted in a quite usable image)
- Dithering is allowed from 10-16 -> 10-16 bits (was: only 8 bit targets)
- Dithering is allowed while keeping original bit-depth. clip10 = clip10.ConvertBits(10, dither=0, dither_bits=8)
(you still cannot dither from 8 or 32 bit source)
- ConditionalFilter syntax extension like Gavino's GConditional: no "=" "true" needed
- Revert: don't give error for interlaced=true for non 4:2:0 sources (compatibility, YATTA)
- CombinePlanes: silently autoconvert packed RGB/YUY2 inputs to planar
- ConvertBits: show error message on YV411 conversion attempt: 8 bit only
- ConvertBits: Don't give error message if dither=-1 (no dithering) is given for currently non-ditherable target formats
- Script function: IsVideoFloat. returns True if clip format is 32 bit float. For convenience, same as BitsPerComponent()==32
- ConvertToDoubleWidth and ConvertFromDoubleWidth: RGB24<->RGB48, RGB32<->RGB64
- New MT mode: MT_SPECIAL_MT. Specify it for MP_Pipeline like filters, even if no Prefetch is used (MP_Pipeline issue, 2 fps instead of 20)


20170202 r2420
- CombinePlanes:
When there is only one input clip, zero-cost BitBlt-less subframes are used, which is much faster.

e.g.: casting YUV to RGB, shuffle RGBA to ABGR, U to Y, etc..
Target planes that are not specified, preserve their content.

Examples:
combineplanes(clipRGBP, planes="RGB",source_planes="BGR") # swap R and B
combineplanes(clipYUV, planes="GBRA",source_planes="YUVA",pixel_type="RGBAP8") # cast YUVA to planar RGBA
combineplanes(clipYUV, planes="Y",source_planes="U",pixel_type="Y8") # extract U

- fix: SubframePlanarA (available in IScriptEnvironment2)
- faster: Difference-type conditional functions: Simd for 10-16 bits
- Fix: MinMax-type conditional functions (min, max, median): return float value for float clips
- ConvertToPlanarRGB(A):
PlanarRGB <-> PlanarRGBA is now allowed
- ConvertToPlanarRGB(A):
YUY2 source is now allowed (through automatic ConvertToRGB proxy)
- faster: RemoveAlphaPlane (subframe instead of BitBlt copy)
- Overlay: "Blend" native greyscale mode: process y plane only w/o conversion
- Overlay: automatic use444=false for "blend"/"luma"/"chroma"
for inputs: 420/422/444 and any RGB, lossless Planar RGB intermediate for PackedRGB
Overlay/mask auto-follows input clip format.
For compatibility: when greymask=true (default) and mask is RGB then mask source is the B channel
- faster: RGB48->RGB64 SSSE3 (1,6x), RGB64->RGB48 SSSE3 (1.5x speed)
- faster: RGB24,RGB48->PlanarRGB: uses RGB32/64 intermediate clip
- Histogram "levels": allow RGB24/32/48/64 input.
Display R, G and B channels instead of Y, U and V
Reminder 1: "levels" for Planar RGB was working already
Reminder 2: Histogram "levels" and "Classic" allows bits=xx parameter, xx=8..12
If "bits" is specified then Histogram is drawn with 9..12 bits precision. Get a wide monitor though :)
- ConvertBits: new parameters, partially for the future.
bool fulls, bool fulld

For YUV and greyscale clips the bit-depth conversion uses simple bit-shifts by default.
YUV default is fulls=false

RGB is converted as full-stretch (e.g. 0..255->0..65535)
RGB default is fulls=true

If fulld is not specified, it takes the value of fulls.
Use case: override greyscale conversion to fullscale instead of bit-shifts

Note 1: conversion from and to float is always full-scale
Note 2: alpha plane is always treated as full scale
Note 3: At the moment you cannot specify fulld to be different from fulls.


20170119 r2397
- TemporalSoften: Planar RGB support
- TemporalSoften: much faster average mode (thres=255)
radius=1 +70%, radius=2 +45%,
16bit: generally 7-8x speed (SSE2/4 instead of C)
- SeparateColumns: 10-16bit,float,RGB48/64
- WeaveColumns: 10-16bit,float,RGB48/64,PlanarRGB(A)
- AddAlphaPlane: fix function parameter type list, clip type did not work
- Internals: add SubframePlanarA to IScriptEnvirontment2 for frames with alpha plane
- SwapUV: YUVA support
- ConvertToRGB32/64: copy alpha from YUVA
- SeparateRows,SeparateFields: PlanarRGB(A),YUVA support
- WeaveRows: PlanarRGB(A), YUVA
- Weave (fields,frames): YUVA,PlanarRGB(A)
- Crop: Fast crop possible for frames with alpha plane (subframe)
- AddBorders missing l/r/top/bottom vs. subsampling check for YUVA
- Fix: YUVA->PlanarRGBA and YUVA42x->444 missing alpha plane copy
- YUV444->RGB48/64: fast intermediate PlanarRGB(A) then RGB48/64 (not C path)
- RGB48/64->YUV4xx target: Planar RGB intermediate (instead of C, 10x faster)

20170111 r2380
- Overlay: Merge the source of Chroma and Luma modes into Blend mode
Modes Blend,Luma and Chroma now support all bit depths and 444 conversionless (use444=false) mode
- Overlay: fix SSE2 Blend for mask+opacity for 10-16 bits
- VfW: (vdubmod14 VfW test)
Fix: YUV444P16 or YUVA444P16 to fourcc Y416
if alpha channel is present, it will we copied, else filled with FFFF
Fix: VDubPlanarHack is checked only for 8 bit YUV planar sources
20170110 r2372 (vdubmod14 VfW test)
- New: SSE2/SSE4 for 10-16 bit <-> 10-16 bit Planar RGB (and Alpha plane) full scale conversions
(needed for automatic planar RGB -> packed RGB VfW conversions)
- VfW:
Fixed: Y3[10][10],Y3[10][16] fourcc's byte order
New: Planar RGB(A) (MagicYUV)
10,12,14,16 bits: G3[0][10], G4[0][10], G3[0][12], G4[0][12], G3[0][14], G4[0][14], G3[0][16], G4[0][16]
New: YUV444P16 to fourcc Y416
New: Automatic conversion of 12, 14 and float YUV formats to 16 bit for 4:2:0 and 4:2:2
Note: OPT_Enable_Y3_10_16 is still valid as if format was originally 16 bits
New: Automatic conversion of 10, 12, 14 and float YUV formats to 16 bit for 4:4:4
New: Conversion of 10, 12, 14 and float planar RGB formats to RGB64
when global Avisynth variable Enable_PlanarToPackedRGB is true
New: Conversion of 8 bit planar RGB formats to RGB24
when global Avisynth variable Enable_PlanarToPackedRGB is true
New: Conversion of 8 bit planar RGBA formats to RGB32
when global Avisynth variable Enable_PlanarToPackedRGB is true

Note: use OPT_VDubPlanarHack=true for YV16 and YV24 for old VirtualDub

Supported formats:
BRA[64],b64a,BGR[48],P010,P016,P210,P216,Y3[10][10],Y3[10][16],v210,Y416
G3[0][10], G4[0][10], G3[0][12], G4[0][12], G3[0][14], G4[0][14], G3[0][16], G4[0][16]

Default format FourCCs:
RGB64: BRA[64]
RGB48: BGR[48]
YUV420P10: P010
YUV420P16: P016
YUV422P10: P210
YUV422P16: P216
YUV444P16 and YUVA444P16: Y416
Planar RGB 10-16 bit: G3[0][10], G3[0][12], G3[0][14], G3[0][16]
Planar RGBA 10-16 bit: G4[0][10], G4[0][12], G4[0][14], G4[0][16]

Global variables to override default formats:
OPT_Enable_V210 = true --> v210 for YUV422P10
OPT_Enable_Y3_10_10 = true --> Y3[10][10] for YUV422P10
OPT_Enable_Y3_10_16 = true --> Y3[10][16] for YUV422P16
OPT_Enable_b64a = true --> b64a for RGB64
Enable_PlanarToPackedRGB = true --> RGBP8->RGB24, RGBAP8->RGB32, all other bit depths to RGB64

20170109 r2367dev
- VfW: BRA[64],b64a,BGR[48],P010,P016,P210,P216,Y3[10][10],Y3[10][16],v210
experimental!
Default format FourCCs:
RGB64: BRA[64]
RGB48: BGR[48]
YUV420P10: P010
YUV420P16: P016
YUV422P10: P210
YUV422P16: P216
Global variables to override default formats:
OPT_Enable_V210 = true --> v210 for YUV422P10
OPT_Enable_Y3_10_10 = true --> Y3[10][10] for YUV422P10
OPT_Enable_Y3_10_16 = true --> Y3[10][16] for YUV422P16
OPT_Enable_b64a = true --> b64a for RGB64
- Overlay: blend for float format
- Overlay: blend: SSE4 for 10-16 bit, SSE2 for float
- AddAlphaPlane: also accepts clip with Y-only or alpha (YUVA/PRGBA/RGB32/64) for alpha source
(was: optional int/float mask value)

20170104 r2359dev
- Overlay:
new parameter: bool use444 (default true for compatibility)

Parameter is valid only for "blend" at the moment

When set to false, and base clip/overlay clip is 420/422/Planar RGB, the overlay core
does not convert to and back from YV24 (4:4:4 in general)

mask can be either greyscale or can be any planar YUV when greymask=true (default)

Works for Planar RGB, so blending is basically lossless for this format (no YUV conversion)

todo: support for other modes, convert packed RGB to planar RGB internally instead of YUV
- Overlay:
Add fast 4:2:0<->4:4:4 conversion, e.g. YV16<->YV24 (only fast YUY2 and YV12 existed so far)
instead of invoking generic core conversion
- Overlay:
10-16bit SSE2/SSE4 for 420/422<->444 conversions
- Info() made a bit more compact.
Bit depth info moved after color space info
Does not display pre-SSE2 CPU flags when at least AVX is available
Display AVX512 flags in separate line (would be too long)
- new CPU feature constants (see cpuid.h and avisynth_c.h)
Detect FMA4 and AVX512F,DQ,PF,ER,CD,BW,VL,IFMA,VBMI
- new script function:
string ReplaceStr(string s, string pattern, string replacement)
Function is case sensitive, parameters are unnamed
- new script function
int NumComponents(clip)
returns 1 for grayscale, 3 for YUVxxx, YUY2, planar RGB or RGB24/RGB48, 4 for YUVAxxx, Planar RGBA or RGB32/64
- new script function:
bool HasAlpha(clip)
returns true when clip is YUVA, Planar RGBA, or packed RGB32 or RGB64

20161222 r2347dev
- CombinePlanes addition: setting target to default RGBP(A)/YUV(A), when inputs are greyscale and no source planes are given
Decision is made by the target plane characters, if they are like R,G,B then target video format will be planar RGB
Same logic applies for YUV.
Example:
Y1, Y2 and Y3 are greyscale clips
Old, still valid: combineplanes(Y1, Y2, Y3, planes="RGB", source_planes="YYY", pixel_type="RGBP8")
New: combineplanes(Y1, Y2, Y3, planes="RGB") # result: Planar RGB
- Fix: ScriptClip would show garbage text when internal exception occurs instead of the error message

20161211 r2343dev
- Overlay: use y offset when greymask=true (fix)
- Fix DV chroma positioning (UV swapped), interlaced parameter check for 4:2:0
(fix by IanB in classic Avisynth)
- BitBlt in 32 bit Avisynth:
for processors with AVX or better ignore tricky isse memcpy replacement, trust in memcpy (test)
(x64 is O.K., it always used memcpy)
- Merge: use stream_load for AVX2
- VDubFilter.dll:
convert 'd' double and 'l' long typed parameters to 'f' float and 'i' int for poor AviSynth
thus allowing the usage of such virtualdub filters
- remove script array (new AVSValue schema) feature, cannot make it compatible with Invoke from v2.5 plugins
until I figure out a workaround or such plugins would slowly distinct.

20161208 r2337dev
- [feature temporarily removed, script arrays are incompatible until 2.5 plugins are supported]
C interface array compatibility vol#2 (zero size arrays)
(new AVSValue schema problem)
- Merge, MergeChroma, MergeLuma: AVX2 (planar)
- Possibly a bit faster text overlay

20161207 r2333dev
- Overlay fix

20161206 r2331dev
- YUY2 PlaneToY finally works
- C interface compatible array-type AVSValue handling (new AVSValue schema problem)

20161205 r2327dev
- [feature temporarily removed, script arrays are incompatible until 2.5 plugins are supported]
BlankClip parameter "colors" accepts exact color values to use
Color order: Y,U,V,A or R,G,B(,A)
These color values are used as-is, not scaled or converted in any way.
Reason: old colors parameter is int (32 bit) cannot hold three or four 16 bit or float values
Example: BlankClip(width=1920,height=1080,length=1000,pixel_type="RGB64", colors=[64000,32768,1231,65535])
- ExtractY, PlaneToY("Y") accepts YUY2 clip
- ExtractR, ExtractG, ExtractB, ExtractA,
and
PlaneToY("R"), PlaneToY("G"), PlaneToY("B"), PlaneToY("A")
functions are accepting packed RGB input (RGB24/32/48/64)
They are converted to planar RGB on-the-fly before plane extraction
- Histogram "levels" works from Planar RGB.
Color legends show R, G and B.
bits=8..12 parameter is still available for finer ultra-wide histogram display

20161201 r2322dev
- [feature temporarily removed, script arrays are incompatible until 2.5 plugins are supported]
constant script arrays
(note: feature was temporarily removed in r2443)
array_variable = [[1,2,3],[4,5,8],"hello"]
dictionary = [["one",1],["two",2]]
empty = []
subarray = array_variable[0]
val = subarray[2]
val2 = array_variable[1,3]
str = array_variable[2]
n = ArraySize(array_variable) #3
n2 = ArraySize(empty) #0
val3 = dictionary["two"]
- arrays as filter parameters (named and unnamed):
new 'a' type or use '.' (any) and check AVSValue IsArray()
todo: maybe .+ or *+ syntax?
(note: feature was temporarily removed in r2443)
- Planar RGB <-> YUV: SSE2 (SSE4)
- Planar RGB <-> Packed RGB32/64: SSE2

20161120:
make PlanarRGB TurnLeft, TurnRight work again.
(stricter check in PlaneToY)

20161119
Fix: PlaneToY("Y")

20161116

Replaced AToY8, GToY8, BToY8, RToY8
We have ExtractX, (X = R,G,B,Y,U,V,A) instead.
That Y8 ending was too confusing.
See new test build

20161110 Avisynth plus additions
New functions

AToY8 , same as PlaneToY("A") for planar RGBA or YUVA
RToY8 , same as PlaneToY("R") for planar RGB
GToY8 , same as PlaneToY("G") for planar RGB
BToY8 , same as PlaneToY("B") for planar RGB

They work the same way as UToY8 and VToY8 and ConvertToY did.
They convert to greyscale keeping the original bit-depth, not only 8 bit!
Y8 naming was kept, because UToY and VToY already existed.

Extended function
old: YToUV(clip clipU, clip clipV [, clip clipY ] )
new: YToUV(clip clipU, clip clipV [, clip clipY [, clip clipA] ] )

YToUV accepts optional alpha clip after Y clip

Example
U = source.UToY8()
V = source.VToY8()
Y = source.ConvertToY()
A = source.AddAlphaPlane(128).AToY8()
# swaps V, U and A, Y
YToUV(V,U,A,Y).Histogram("levels").Info().RemoveAlphaPlane()

New function
CombinePlanes(clip1 [,clip2, clip3, clip4], string planes [, string source_planes, string pixel_type, string sample_clip])

Combines planes of source clip(s) into a target clip

If sample_clip is given, target clip properties are copied from that clip
If no sample_clip is provided, then clip1 provides the template for target clip
An optional pixel_type string (e.g."YV24", "YUV420PS", "RGBP8") can override the base video format.

If the source clip count is less than the given planes defined, then the last available clip is
used as a source.

string planes
the target plane order (e.g. "YVU", "YYY", "RGB")
missing target planes will be undefined in the target

string source_planes (optional)
the source plane order, defaulting to "YUVA" or "RGBA" depending on the video format

Examples#1
#combine greyscale clips into YUVA clip
U8 = source.UToY8()
V8 = source.VToY8()
Y8 = source.ConvertToY()
A8 = source.AddAlphaPlane(128).AToY8()
CombinePlanes(Y8, U8, V8, A8, planes="YUVA", source_planes="YYYY", sample_clip=source) #pixel_type="YUV444P8"

Examples#2
# Copy planes between planar RGB(A) and YUV(A) without any conversion
# yuv 4:4:4 <-> planar rgb
source = last.ConvertBits(32) # 4:4:4
cast_to_planarrgb = CombinePlanes(source, planes="RGB", source_planes="YUV", pixel_type="RGBPS")
# get back a clip identical with "source"
cast_to_yuv = CombinePlanes(cast_to_planarrgb, planes="YUV", source_planes="RGB", pixel_type="YUV444PS")

Examples#3
#create a black and white planar RGB clip using Y channel
#source is a YUV clip
grey = CombinePlanes(source, planes="RGB", source_planes="YYY", pixel_type="RGBP8")

Examples#4
#copy luma from one clip, U and V from another
#source is the template
#sourceY is a Y or YUV clip
#sourceUV is a YUV clip
grey = CombinePlanes(sourceY, sourceUV, planes="YUV", source_planes="YUV", sample_clip = source)





Visit our sponsors! Try DVDFab and backup Blu-rays!
Search   Contact us   Privacy Policy   About   Advertise   Forum   RSS Feeds   Statistics   Software   

Site layout: Default Classic Blue

Affiliates: free-codecs.com

©1999-2025 videohelp.com