Releases: pinterf/masktools
Masktools2 2.2.30
Masktools v2.2.30 (20220219)
- mt_hysteresis new parameter:
bool corners
(default true)
When set to false, mask expanding is ignoring corner-only connections.
corners = true (default, old working mode):
+ + +
+ O +
+ + +
false:
- + -
+ O +
- + -
Where the '+' pixels indicate neighbors of the central 'O'
(See #23 )
- Add atan2 two operand function to lut expression evaluation. Calls atan2(y,x) math library function.
Masktools2 2.2.29
v2.2.29 (20211116)
- floating point number formats are local independent again. Regression since 2.2.27
- mt_merge accept "top_left" chroma placement ("topleft" is still valid)
- (avx2: stop using _mm256_zeroupper - compilers are do that automatically,
mainly because LLVM (12.0) generated suboptimal save-restore-all-xmm registers in
prologue and epilogue when encountered with it.)
Masktools2 2.2.28
v2.2.28 (20211005)
- allow TAB, CR and LF characters as symbol separators in expression strings
Masktools2 2.2.27
v2.2.27 (20210909)
- fix zero=false case for shape helper function (mt_rectangle, mt_circle, mt_diamond etc...)
- lut expressions: report obvious script error (unbalanced stack, invalid keyword or variable, etc)
- mt_lut: reuse LUTs across planes if they are the same like in e.g. mt_lutxyz.
- 1D LUT expressions: occupy only the necessary size for 10-14 bit LUT tables (was: buffer was always reserved for 16 bit data)
- mt_merge: error is luma=false, mask is greyscale but clip is not greyscale
- mt_merge new parameter hint for chroma placement when luma=true and 4:2:0: "topleft"
"topleft" is a new option for 4:2:0 videos only - Source syntax update for GCC (20201229)
- CMake build environment, builds on Linux,
Masktools2 2.2.26
v2.2.26 (20200904)
- mt_lut family: ignore "use_expr" parameter if "Expr" function does not exist in earlier AviSynth versions.
- more friendly error messages when an exception occurs during "Expr" call.
Masktools2 2.2.25
v2.2.25 (20200813)
- Introduce swap1 to swap9, dup0 to dup9 keywords besides dup and swap
- mt_infix duplicates the expression string when 'dup' found.
swap, swap1..9 and dup1..9 in mt_infix appear as functions
This is in no way a proper solution and does not result in valid expression.
The effect of stack operations on the resulting expression is not easy to stringify.
At least now dup and swap will appear somehow in infix. - mt_edge, mt_logic: fix possible use of AVX2 instructions on AVX-only processors (such as on i7-3930)
Masktools2 2.2.24
MaskTools 2
Masktools2 v2.2.24 (20200619)
**v2.2.24 (20200619)
- fix: mt_convolution divbyzero when greyscale + forced U=3,V=3 (process chroma)
Masktools2 2.2.23
**v2.2.23 (20200513)
- fix mt_polish for nested ternary operators
Example:
mt_polish("x > 128 ? 255 : x > 64 ? 128 : 0")
results:
"x 128 > 255 x 64 > 128 0 ? ?"
(was: "x 128 > 255 x 64 > ? 128 0 ?")
**v2.2.22 (20200422)
- Add AVX2 to mt_expand and mt_inpand 10-16 bit processing
- Add Avisynth+ interface V8 frame property copy support (test)
**v2.2.21 (20200410)
- fix mt_hysteresis for 10-32 bits
v2.2.20 (20200303)
- new "yscalef" and "yscaleb" keywords similar to "scalef" and "scaleb" but scaling is forced to use rules for Y (non-UV) planes
- mt_lutspa: add parameters "scale_inputs", "clamp_float" and "clamp_float_UV"
- new predefined constants in expressions: yrange_min, yrange_half, yrange_max
Unlike range_min, range_half, range_max the y-prefixed versions do not depend on whether the currently
processed plane is luma(Y) or chroma(U/V). They are always returning the values of Y plane. - new parameter to lut functions: Boolean "clamp_float_UV": default false, as an addition to clamp_float (since v2.2.20).
- New: Parameter "scale_inputs" can now be set to "floatUV" (chroma pre-shift by 0.5 for 32 bit float pixels)
- Fix: mt_motion mask contained out-of range pixels for 10-14 bit inputs
- Fix: mt_edge convolution mode incorrect result on 10-32 bits when normalizer weight is not power of 2
e.g. mode = "1 2 1 0 0 0 -1 -2 -1 15.0" (normalizer: 10th parameter or maximum of (sum_positive/sum_negative))
Note: when processing chroma (u=3,v=3) on 32 bit float clip will result 0..1.0 ranged masks in chroma planes as well. - Source:
- add LLVM-clangCl to VC project configuration (built-in clang support in VS2019)
- fix LLVM build for VS2019
- silence many warnings
- project configurations: use current SDK version 10.0.18362.0
v2.2.19 (20190710 - not released)
- Fix: mt_infix to recognize scaleb and scalef
- Fix: mt_infix to recognize ymin, ymax, abs, atan, etc... tokens beginning with 'a' and 'y' were not converted
- Move project to VS2019 v142 toolset, xp builds still at v141_xp
- update current Avisynth+ headers
- update source to use boost 1.70 lib v142 for non-xp builds
v2.2.18 (20180905)
- mt_merge: fix right side artifacts for non-mod16 width, AVX2 and luma=false (regression in 2.2.16)
- mt_adddiff: fix 32 bit chroma (still used 0.5 centered chroma instead of 0.0)
v2.2.17 (20180710)
- mt_convolution: check plane dimensions to exceed convolution horizontal/vertical size
- lut functions: plane order to RGBA from BGRA like in Expr.
expr parameters y-u-v-a naming matches now to r-g-b-a - for luts: use_expr=3: always send expression(s) to Expr
v2.2.16 (20180702)
-
mt_merge new parameter hint for chroma placement when luma=true and 4:2:0/4:2:2
String 'cplace': possible values "mpeg1" or "mpeg2" (default)
Parameter is effective only for 420 and 422 formats, otherwise ignored.
Default "mpeg1" is using fast 2x2 pixel (1x2 for 4:2:2) averaging when converting a 4:4:4 mask to a 4:2:0 or 4:2:2 format (old behaviour)
420 schema:
+------+------+
| 0.25 | 0.25 |
|------+------|
| 0.25 | 0.25 |
+------+------+"mpeg2" is using 2x3 (1x3 for 4:2:2) pixel weighted averaging when converting a 4:4:4 mask to a 4:2:0 or 4:2:2 format
420 schema:
------+------+-------+
0.125 | 0.25 | 0.125 |
------|------+-------|
0.125 | 0.25 | 0.125 |
------+------+-------+ -
32 bit float U and V chroma channels are now zero based (+/-0.5 for full scale). Was: 0..1, same as luma
Since internal format changed, use Avisynth+ r2724 or newer for this masktools2 2.2.16.
Affected predefined expression constants when plane is U or V:
cmin and cmax (limited range (16-128)/255 and (240-128)/255 instead of 16/255.0 and 240/255.0
range_max: 0.5 instead of 1.0
new: introduce range_min: -0.5 for float U/V chroma, 0 otherwise
range_half (0.0 instead of 0.5)
(range_size remained 1.0) -
New expression syntax for Lut expressions: autoscale any input (x,y,z,a) bit depths to 8-16 bits for internal
expression use. The primary reason of this feature is the "easy" usage of formerly written 8 bit optimized expressions. Parameters for lut functions: scale_inputs, clamp_float (similar to avs+ r2728) and use_expr -
New parameter: String "scale_inputs": "all","allf","int","intf","float","floatf","none", default "none". See Readme!
-
New parameter: Boolean "clamp_float": default false, but treated as always true (and thus ignored) when scale_inputs involves a float autoscale.
-
New parameter: Boolean "use_expr": default 0, calls fast JIT-compiled "Expr" in Avisynth+ for mt_lut, lutxy, lutxyz, lutxyza
0: no Expr, use slow internal realtime calc if needed (as before)
1: call Expr for bits>8 or lutxyza
2: call Expr, when masktools would do its slow realtime calc (see 'realtime' column in the table above)
Extends and replaces experimental clamp_xxxx keywords.
v2.2.15 (skipped, test versions)
v2.2.14 (20180225)
- Fix: mt_convolution invalid instruction on processors below SSE4.1
v2.2.13 (20180201)
- Fix: rare crash in multithreading environment at the very first frames
(keeping XP compatibility with /Z:threadsafeinit- caused troubles!) - mt_edge: AVX2 (1.4-1.9x speed) for 8 and 10-16 bits
- fix: "chroma" parameter with negative (memset) values were not working properly for 10-14 bits and 32bit float
v2.2.12 (20180107)
- Fix: mt_merge 10-16 bits: right side artifacts when clip is non-mod 8 (non-AVX2) or mod16 (AVX2) widths
Earlier changes
v2.2.11 (20180105)
- Fix: mt_merge luma=true: broken output when: 8-16 bits AVX2, 32 bit float: SSE2, AVX
- move project to VS2017, vs141_xp toolset
v2.2.10 (20170612)
- Fix: luts internal buffer overflow (crash)
- Speed: mt_inpand/mt_expand: 10-16 bits SSE4 (10-15x speed)
- Speed: mt_inflate/mt_deflate 10-16 bits SSE4 (4x speed)
v2.2.9 (20170608)
- Add "none" and "ignore" to valid values for "chroma" and "alpha" parameters.
- Report error for invalid "chroma" or "alpha" parameter values instead of exception
Masktools2 2.2.22
**v2.2.22 (20200422)
- Add AVX2 to mt_expand and mt_inpand 10-16 bit processing
- Add Avisynth+ interface V8 frame property copy support (test)
**v2.2.21 (20200410)
- fix mt_hysteresis for 10-32 bits
v2.2.20 (20200303)
- new "yscalef" and "yscaleb" keywords similar to "scalef" and "scaleb" but scaling is forced to use rules for Y (non-UV) planes
- mt_lutspa: add parameters "scale_inputs", "clamp_float" and "clamp_float_UV"
- new predefined constants in expressions: yrange_min, yrange_half, yrange_max
Unlike range_min, range_half, range_max the y-prefixed versions do not depend on whether the currently
processed plane is luma(Y) or chroma(U/V). They are always returning the values of Y plane. - new parameter to lut functions: Boolean "clamp_float_UV": default false, as an addition to clamp_float (since v2.2.20).
- New: Parameter "scale_inputs" can now be set to "floatUV" (chroma pre-shift by 0.5 for 32 bit float pixels)
- Fix: mt_motion mask contained out-of range pixels for 10-14 bit inputs
- Fix: mt_edge convolution mode incorrect result on 10-32 bits when normalizer weight is not power of 2
e.g. mode = "1 2 1 0 0 0 -1 -2 -1 15.0" (normalizer: 10th parameter or maximum of (sum_positive/sum_negative))
Note: when processing chroma (u=3,v=3) on 32 bit float clip will result 0..1.0 ranged masks in chroma planes as well. - Source:
- add LLVM-clangCl to VC project configuration (built-in clang support in VS2019)
- fix LLVM build for VS2019
- silence many warnings
- project configurations: use current SDK version 10.0.18362.0
v2.2.19 (20190710 - not released)
- Fix: mt_infix to recognize scaleb and scalef
- Fix: mt_infix to recognize ymin, ymax, abs, atan, etc... tokens beginning with 'a' and 'y' were not converted
- Move project to VS2019 v142 toolset, xp builds still at v141_xp
- update current Avisynth+ headers
- update source to use boost 1.70 lib v142 for non-xp builds
v2.2.18 (20180905)
- mt_merge: fix right side artifacts for non-mod16 width, AVX2 and luma=false (regression in 2.2.16)
- mt_adddiff: fix 32 bit chroma (still used 0.5 centered chroma instead of 0.0)
v2.2.17 (20180710)
- mt_convolution: check plane dimensions to exceed convolution horizontal/vertical size
- lut functions: plane order to RGBA from BGRA like in Expr.
expr parameters y-u-v-a naming matches now to r-g-b-a - for luts: use_expr=3: always send expression(s) to Expr
v2.2.16 (20180702)
-
mt_merge new parameter hint for chroma placement when luma=true and 4:2:0/4:2:2
String 'cplace': possible values "mpeg1" or "mpeg2" (default)
Parameter is effective only for 420 and 422 formats, otherwise ignored.
Default "mpeg1" is using fast 2x2 pixel (1x2 for 4:2:2) averaging when converting a 4:4:4 mask to a 4:2:0 or 4:2:2 format (old behaviour)
420 schema:
+------+------+
| 0.25 | 0.25 |
|------+------|
| 0.25 | 0.25 |
+------+------+"mpeg2" is using 2x3 (1x3 for 4:2:2) pixel weighted averaging when converting a 4:4:4 mask to a 4:2:0 or 4:2:2 format
420 schema:
------+------+-------+
0.125 | 0.25 | 0.125 |
------|------+-------|
0.125 | 0.25 | 0.125 |
------+------+-------+ -
32 bit float U and V chroma channels are now zero based (+/-0.5 for full scale). Was: 0..1, same as luma
Since internal format changed, use Avisynth+ r2724 or newer for this masktools2 2.2.16.
Affected predefined expression constants when plane is U or V:
cmin and cmax (limited range (16-128)/255 and (240-128)/255 instead of 16/255.0 and 240/255.0
range_max: 0.5 instead of 1.0
new: introduce range_min: -0.5 for float U/V chroma, 0 otherwise
range_half (0.0 instead of 0.5)
(range_size remained 1.0) -
New expression syntax for Lut expressions: autoscale any input (x,y,z,a) bit depths to 8-16 bits for internal
expression use. The primary reason of this feature is the "easy" usage of formerly written 8 bit optimized expressions. Parameters for lut functions: scale_inputs, clamp_float (similar to avs+ r2728) and use_expr -
New parameter: String "scale_inputs": "all","allf","int","intf","float","floatf","none", default "none". See Readme!
-
New parameter: Boolean "clamp_float": default false, but treated as always true (and thus ignored) when scale_inputs involves a float autoscale.
-
New parameter: Boolean "use_expr": default 0, calls fast JIT-compiled "Expr" in Avisynth+ for mt_lut, lutxy, lutxyz, lutxyza
0: no Expr, use slow internal realtime calc if needed (as before)
1: call Expr for bits>8 or lutxyza
2: call Expr, when masktools would do its slow realtime calc (see 'realtime' column in the table above)
Extends and replaces experimental clamp_xxxx keywords.
v2.2.15 (skipped, test versions)
v2.2.14 (20180225)
- Fix: mt_convolution invalid instruction on processors below SSE4.1
v2.2.13 (20180201)
- Fix: rare crash in multithreading environment at the very first frames
(keeping XP compatibility with /Z:threadsafeinit- caused troubles!) - mt_edge: AVX2 (1.4-1.9x speed) for 8 and 10-16 bits
- fix: "chroma" parameter with negative (memset) values were not working properly for 10-14 bits and 32bit float
v2.2.12 (20180107)
- Fix: mt_merge 10-16 bits: right side artifacts when clip is non-mod 8 (non-AVX2) or mod16 (AVX2) widths
Earlier changes
v2.2.11 (20180105)
- Fix: mt_merge luma=true: broken output when: 8-16 bits AVX2, 32 bit float: SSE2, AVX
- move project to VS2017, vs141_xp toolset
v2.2.10 (20170612)
- Fix: luts internal buffer overflow (crash)
- Speed: mt_inpand/mt_expand: 10-16 bits SSE4 (10-15x speed)
- Speed: mt_inflate/mt_deflate 10-16 bits SSE4 (4x speed)
v2.2.9 (20170608)
- Add "none" and "ignore" to valid values for "chroma" and "alpha" parameters.
- Report error for invalid "chroma" or "alpha" parameter values instead of exception
Masktools2 2.2.21
**v2.2.21 (20200410)
- fix mt_hysteresis for 10-32 bits
v2.2.20 (20200303)
- new "yscalef" and "yscaleb" keywords similar to "scalef" and "scaleb" but scaling is forced to use rules for Y (non-UV) planes
- mt_lutspa: add parameters "scale_inputs", "clamp_float" and "clamp_float_UV"
- new predefined constants in expressions: yrange_min, yrange_half, yrange_max
Unlike range_min, range_half, range_max the y-prefixed versions do not depend on whether the currently
processed plane is luma(Y) or chroma(U/V). They are always returning the values of Y plane. - new parameter to lut functions: Boolean "clamp_float_UV": default false, as an addition to clamp_float (since v2.2.20).
- New: Parameter "scale_inputs" can now be set to "floatUV" (chroma pre-shift by 0.5 for 32 bit float pixels)
- Fix: mt_motion mask contained out-of range pixels for 10-14 bit inputs
- Fix: mt_edge convolution mode incorrect result on 10-32 bits when normalizer weight is not power of 2
e.g. mode = "1 2 1 0 0 0 -1 -2 -1 15.0" (normalizer: 10th parameter or maximum of (sum_positive/sum_negative))
Note: when processing chroma (u=3,v=3) on 32 bit float clip will result 0..1.0 ranged masks in chroma planes as well. - Source:
- add LLVM-clangCl to VC project configuration (built-in clang support in VS2019)
- fix LLVM build for VS2019
- silence many warnings
- project configurations: use current SDK version 10.0.18362.0
v2.2.19 (20190710 - not released)
- Fix: mt_infix to recognize scaleb and scalef
- Fix: mt_infix to recognize ymin, ymax, abs, atan, etc... tokens beginning with 'a' and 'y' were not converted
- Move project to VS2019 v142 toolset, xp builds still at v141_xp
- update current Avisynth+ headers
- update source to use boost 1.70 lib v142 for non-xp builds
v2.2.18 (20180905)
- mt_merge: fix right side artifacts for non-mod16 width, AVX2 and luma=false (regression in 2.2.16)
- mt_adddiff: fix 32 bit chroma (still used 0.5 centered chroma instead of 0.0)
v2.2.17 (20180710)
- mt_convolution: check plane dimensions to exceed convolution horizontal/vertical size
- lut functions: plane order to RGBA from BGRA like in Expr.
expr parameters y-u-v-a naming matches now to r-g-b-a - for luts: use_expr=3: always send expression(s) to Expr
v2.2.16 (20180702)
-
mt_merge new parameter hint for chroma placement when luma=true and 4:2:0/4:2:2
String 'cplace': possible values "mpeg1" or "mpeg2" (default)
Parameter is effective only for 420 and 422 formats, otherwise ignored.
Default "mpeg1" is using fast 2x2 pixel (1x2 for 4:2:2) averaging when converting a 4:4:4 mask to a 4:2:0 or 4:2:2 format (old behaviour)
420 schema:
+------+------+
| 0.25 | 0.25 |
|------+------|
| 0.25 | 0.25 |
+------+------+"mpeg2" is using 2x3 (1x3 for 4:2:2) pixel weighted averaging when converting a 4:4:4 mask to a 4:2:0 or 4:2:2 format
420 schema:
------+------+-------+
0.125 | 0.25 | 0.125 |
------|------+-------|
0.125 | 0.25 | 0.125 |
------+------+-------+ -
32 bit float U and V chroma channels are now zero based (+/-0.5 for full scale). Was: 0..1, same as luma
Since internal format changed, use Avisynth+ r2724 or newer for this masktools2 2.2.16.
Affected predefined expression constants when plane is U or V:
cmin and cmax (limited range (16-128)/255 and (240-128)/255 instead of 16/255.0 and 240/255.0
range_max: 0.5 instead of 1.0
new: introduce range_min: -0.5 for float U/V chroma, 0 otherwise
range_half (0.0 instead of 0.5)
(range_size remained 1.0) -
New expression syntax for Lut expressions: autoscale any input (x,y,z,a) bit depths to 8-16 bits for internal
expression use. The primary reason of this feature is the "easy" usage of formerly written 8 bit optimized expressions. Parameters for lut functions: scale_inputs, clamp_float (similar to avs+ r2728) and use_expr -
New parameter: String "scale_inputs": "all","allf","int","intf","float","floatf","none", default "none". See Readme!
-
New parameter: Boolean "clamp_float": default false, but treated as always true (and thus ignored) when scale_inputs involves a float autoscale.
-
New parameter: Boolean "use_expr": default 0, calls fast JIT-compiled "Expr" in Avisynth+ for mt_lut, lutxy, lutxyz, lutxyza
0: no Expr, use slow internal realtime calc if needed (as before)
1: call Expr for bits>8 or lutxyza
2: call Expr, when masktools would do its slow realtime calc (see 'realtime' column in the table above)
Extends and replaces experimental clamp_xxxx keywords.
v2.2.15 (skipped, test versions)
v2.2.14 (20180225)
- Fix: mt_convolution invalid instruction on processors below SSE4.1
v2.2.13 (20180201)
- Fix: rare crash in multithreading environment at the very first frames
(keeping XP compatibility with /Z:threadsafeinit- caused troubles!) - mt_edge: AVX2 (1.4-1.9x speed) for 8 and 10-16 bits
- fix: "chroma" parameter with negative (memset) values were not working properly for 10-14 bits and 32bit float
v2.2.12 (20180107)
- Fix: mt_merge 10-16 bits: right side artifacts when clip is non-mod 8 (non-AVX2) or mod16 (AVX2) widths
Earlier changes
v2.2.11 (20180105)
- Fix: mt_merge luma=true: broken output when: 8-16 bits AVX2, 32 bit float: SSE2, AVX
- move project to VS2017, vs141_xp toolset
v2.2.10 (20170612)
- Fix: luts internal buffer overflow (crash)
- Speed: mt_inpand/mt_expand: 10-16 bits SSE4 (10-15x speed)
- Speed: mt_inflate/mt_deflate 10-16 bits SSE4 (4x speed)
v2.2.9 (20170608)
- Add "none" and "ignore" to valid values for "chroma" and "alpha" parameters.
- Report error for invalid "chroma" or "alpha" parameter values instead of exception