Changelog
**v2.2.7 (20170421)
- fix: mt_edge 10,12,14 bits: clamp mask value from 65535 to 1023 (10 bits), 4095 (12 bits) and 16383 (14 bits)
- fix: mt_merge 10-16 bits + non mod-16 width + luma=true + 4:2:2 colorspace, correct right side pixels
- fix: mt_merge 8 bit clips: keep original pixels from clip1/2 when mask is exactly 0 or 255
- YUVA, RGBAP support 8-32 bits
- "A" parameter like "Y", "U" and "V". Default value for "A" is 1 (do nothing, same as for "U" and "V")
- "alpha" parameter like "chroma" - overrides default plane mode
- aExpr parameter for lut-type filters like uExpr, and vExpr
- awExpr parameter for mt_luts like uwExpr, and vwExpr
- dual signature filters (both integer and float) are provided in separate binaries
In some cases specifying two different parameter lists with the same variables can cause troubles.
(dual signature version can be used to override an earlierly loaded different masktools version
(e.g. a 2.5 plugin) by defining the filters with both integer parameters AND the new float parameter lists)
- Make "scaleparams" to work consistent with all filters and parameters:
parameters "Y","U","V" and "A" negative (memset) values are scaled automatically to the current bit depth from a default 8-bit value. - New plane mode: 6 (copy from fourth clip) for "Y", "U", "V" and "A"
New "chroma" and "alpha" plane mode override: "copy fourth"
Use for mt_lutxyza which has four clips
**v2.2.6 (20170401)
- fix: >>u operator AV error
**v2.2.5 (20170330)
- Change #F and #B operators to @b and @f (# is reserved for Avisynth in-string comment character)
- Alias scaleb for @b
- Alias scalef for @f
- New: automatic scaling of parameters (threshold-like, sc_value) from the usual 8 bit range
Scripts need no extra measures to work for all bit depths with the same "command line" - New parameter "paramscale" for filters working with threshold-like parameters
Filters: mt_binarize, mt_edge, mt_inpand, mt_expand, mt_inflate, mt_deflate, mt_motion, mt_logic, mt_clamp
paramscale can be "i8" (default), "i10", "i10", "i12", "i14", "i16", "f32" or "none" or ""
Using "paramscale" tells the filter that parameters are given at what bit depth range. - dual function signatures (float and int), for backward compatibility with integer-type parameter list, prevent usage of earlier plugin-loaded masktools version
- keep old parameter ordering: parameters which are non-existant in 2.0b1 are inserted at the end of the parameter list, not before the common parameters Y, U, V
- new: "swap" keyword in expressions
- new: "dup" keyword in expressions
- a bit faster realtime lut calculation for 10+ bit depths
**v2.2.4 (20170304)
-
mt_polish to recognize:
- new v2.2.x constants and variables
a, bitdepth, sbitdepth, range_half, range_max, range_size, ymin, ymax, cmin, cmax - v2.2.x scaling functions (written as #B(expression) and #F(expression) for mt_polish)
#B() #F - single operand unsigned and signed negate introduced in 2.0.48
~u and ~s (written as ~u(expression)and ~s(expression) for mt_polish) - other operators introduced in 2.0.48:
@, &u, |u, °u, @U, >>, >>u, <<, <<u, &s, |s, °s, @s, >>s, <<s
- new v2.2.x constants and variables
-
mt_infix: don't put extra parameter after #F( and #B(
-
new expression syntax: auto scale modifiers for float clips (test for real.finder):
Keyword at the beginning of the expression:- clamp_f_i8, clamp_f_i10, clamp_f_i12, clamp_f_i14 or clamp_f_i16 for scaling and clamping
- clamp_f_f32 or clamp_f: for clamping the result to 0..1
Input values 'x', 'y', 'z' and 'a' are autoscaled by 255.0, 1023.0, ... 65535.0 before the expression evaluation,
so the working range is similar to native 8, 10, ... 16 bits. The predefined constants 'range_max', etc. will behave for 8, 10,..16 bits accordingly.The result is automatically scaled back to 0..1 and is clamped to that range.
When using clamp_f_f32 (or clamp_f) the scale factor is 1.0 (so there is no scaling), but the final clamping will be done anyway.
No integer rounding occurs.
v2.2.3 (20170227)
- mt_logic to 32 bit float (final filter lacking it)
- get CpuInfo from Avisynth (avx/avx2 preparation)
Note: AVX/AVX2 prequisites- recent Avisynth+ which reports extra CPU flags
- 64 bit OS (but Avisynth can be 32 bits)
- Windows 7 SP1 or later
- mt_merge: 8-16 bit: AVX2, float:AVX
- mt_logic: 8-16 bit: AVX2, float:AVX
- mt_edge: 10-16 bit and 32 bit float: SSE2/SSE4 optimization
- mt_edge: 32 bit float AVX
- new: mt_luts: weight expressions as an addon for then main expression(s) (martin53's idea)
- wexpr
- ywExpr, uwExpr, vwExpr
If the relevant parameter strings exist, the weighting expression is evaluated
for each source/neighborhood pixel values (lut or realtime, depending on the bit depth and the "realtime" parameter).
Then the usual lut result is premultiplied by this weight factor before it gets accumulated.
v2.2.2 (20170223) completed high bit depth support
- All filters work in 10,12,14,16 bits and float (except mt_logic which is 8-16 only)
- mt_lutxyza 4D lut available with realtime=false! (4 GBytes LUT table, slower initial lut table calculation)
Allowed only on x64. When is it worth?
Number of expression evaluations for 4G lut calculation equals to realtime calculation on
2100 frames (1920x1080 plane). Be warned, it would take be minutes. - mt_gradient 10-16 bit / float
- mt_convolution 10-16 bit / float
- mt_motion 10-16 bit / float
- mt_xxpand and mt_xxflate to float
- mt_clamp to float
- mt_merge to float
- mt_binarize to float
- mt_invert to float
- mt_makediff and mt_adddiff to float
- mt_average to float
- Expression syntax supporting bit depth independent expressions:
Added configuration keywords i8, i10, i12, i14, i16 and f32 in order to inform the expression evaluator
about bit depth of the values that are to scale by #B and #F operators.
v2.2.1 (20170218) initial high bit depth release
- project moved to Visual Studio 2015 Update 3
Requires VS2015 Update 3 redistributables - Fix: mt_merge (and probably other multi-clip filters) may result in corrupted results
under specific circumstances, due to using video frame pointers which were already released from memory - no special function names for high bit depth filters
- filters are auto registering their mt mode as MT_NICE_FILTER for Avisynth+
- Avisynth+ high bit depth support (incl. planar RGB, but color spaces with alpha plane are not yet supported)
For accepted bit depth, see table below. - YV411 (8 bit 4:1:1) support
- mt_merge accepts 4:2:2 clips when luma=true (8-16 bit)
- mt_merge accepts 4:1:1 clips when luma=true
- mt_merge to discard U and V automatically when input is greyscale
- new: mt_lutxyza. Accepts four clips. 4th variable name is 'a' (besides x, y and z)
- expression syntax supporting bit depth independent expressions
- bit-depth aware scale operators #B and #F
- pre-defined bit depth aware constants
bitdepth (automatic silent parameter of the lut expression)
range_half, range_max, range_size, ymin, ymax, cmin, cmax - parameter "stacked" (default false) for filters with stacked format support
- parameter "realtime" for lut-type filters to override default behaviour