CHANGES FOR FILTER FACTORY BY DANIEL MARSCHALL, VIATHINKSOFT 18 December 2021, Version 3.1.1 ============================================= (1) Changes to the 8BF filter plugin LEGEND ------ [+] Extension [-] Removal [*] Optimization [!] Bugfix [#] Other change [$] Release CHANGELOG --------- 00 [$] Source of the patch: 3.0.4 (Build timestamp: 1995-05-31 04:02:38) 01 [#] The resource section of the 8BF file was extended by 8192 bytes to allow future extensions: - Additional space for 100 function/operator/constant definitions (= 1000 bytes). - Additional space for 100 synonym definitions (= 1600 bytes). - Additional space for 30168 bytes assembler code. 02 [*] Changed the imported DLL reference from msvcrt10.dll to msvcrt.dll to make the plugin compatible "out of the box" with newer OSs. 03 [#] Changed export table name "Espresso" 04 [*] Now using Win95-Look for all dialogs. Application should be still compatible to WinNT 3.51 etc. 05 [+] Assembler-Code size limit raised from 2048 (0x800) to 16384 (0x4000) per channel. 06 Misc changes in the assembler code: 06.01 [#] Reassembled with FASM 06.02 [+] Added function pow() function (power). 06.03 [!] Bugfix: cnv() crashes not anymore because of an access violation (when running in protected mode). At the border pixels, cnv() will now use the neighbor pixel values instead of just using "0" as value. (+ 160 byte asm code size) 06.04 [*] Optimized assembler code sizes. - Assembler-Code of operator "?" is 1 byte shorter. - Assembler-Code of operator "&&" is 5 bytes shorter. - Assembler-Code of operator "||" is 5 bytes shorter. - Assembler-Code of operator "==" is 3 bytes shorter. - Assembler-Code of operator "!=" is 3 bytes shorter. - Assembler-Code of operator "<" is 3 bytes shorter. - Assembler-Code of operator "<=" is 3 bytes shorter. - Assembler-Code of operator ">" is 3 bytes shorter. - Assembler-Code of operator ">=" is 3 bytes shorter. - Assembler-Code of constant i is 18 bytes shorter. - Assembler-Code of constant u is 17 bytes shorter. - Assembler-Code of constant v is 5 bytes shorter. - Assembler-Code of constants R, G, B, A, I, U, V, C is 1 byte shorter. - Assembler-Code of constant D is 1 byte shorter. - Assembler-Code of constant rmin is 1 byte shorter. - Assembler-Code of constant tmax is 4 bytes shorter. - Assembler-Code of function mix() is 3 bytes shorter. - Assembler-Code of function rst() is 1 byte shorter. - Assembler-Code of function ctl() is 2 bytes shorter. - Assembler-Code of function val() is 2 bytes shorter. - Assembler-Code of function map() is 2 bytes shorter. - Assembler-Code of function get() is 4 bytes shorter. - Assembler-Code of function put() is 4 bytes shorter. 06.05 [+] T constant added (synonym of tmax). 06.06 [!] YUV formulas are now more accurate. - Range of constant i is now [0,255] instead of [0,254]. - Range of constant u is stays [-55,55]. - Range of constant v is now [-78,78] instead of [-77,77]. - Changed formula for YUV in the PDF/WRI documentation to a similar(!) one. 06.07 [*] Changed "sub e?x,e?x" to "xor e?x,e?x" for a little bit more performance. 06.08 [+] Added sqrt() as synonym to sqr(), like in Premiere FilterFactory/TransitionFactory 07 [$] RELEASE 3.1.0 Added patch notice and changed version to 3.1.0 06.09 [!] Fixed bug in function val(), introduced in 3.1.0 (but size increases by 1 byte) 07 [$] RELEASE 3.1.1 ============================================= (2) CORRECTIONS TO Transexpl\Edittrns.afs & Transexpl\Edittrns.8bf Previous formula: a=a>0 ? ctl(1)<128 ? a - (256 - (2 * (ctl(1) + 1))) : a + (2 * (ctl(1) - 128)) : 0 Behavior: a=0 stays a=0 CTL= 0..127 (128) -> increases transparency CTL=128..255 (128) -> decreases transparency CTL=0 => a=a-254 (transparency can never become A=0) CTL=127 => a=a (no change) CTL=128 => a=a (no change) CTL=255 => a=a + 254 (maximum transparency because a>0) New formula: a=a>0 ? ctl(1)<128 ? a - (255 - (2 * ctl(1))) : a + (2 * (ctl(1) - 128)) : 0 Changed behavior: CTL=0 => a=a-255 (transparency can now become A=0) CTL=127 => a=a-1 Additionally changed (no change in behavior): r=c instead of r=r g=c instead of g=g b=c instead of b=b (ToDo) Should there be a possibility that a=0 can be edited to? ============================================= (3) CORRECTIONS TO Transexpl\Lumopac.afs & Transexpl\Lumopac.bf8 a) Preserved colors: r=c instead of r=0 g=c instead of g=0 b=c instead of b=0 b) Using YUV luminosity instead of the trivial luminosity (r+g+b)/3 Old: a=a>0 ?255 - (r+g+b)/3:0 New: a=a>0 ?255 - ((76*r)+(150*g)+(29*b))/A :0 Note: I used "((76*r)+(150*g)+(29*b))/A" instead of "i" because the AFS file might be used with an unpatched version of Filter Studio which has the range i=[0..254] instead of i=[0..255]. c) Preserve partial transparency (a=a-i instead of a=255-i) In addition to b) a=a - ((76*r)+(150*g)+(29*b))/A Example usage: Draw a black line on a 25% transparent white or on a fully transparent layer. With the new Lumopac.bf8 the line will behave the same as if it was drawn on a white canvas without transparency! ============================================= (4) CORRECTIONS TO Transexpl\Opaclum.afs & Transexpl\Opaclum.bf8 Original version: r=a>0 ? 255 - a: r g=a>0 ? 255 - a: g b=a>0 ? 255 - a: b a=a>0 ? 255 : 0 My version: r=mix(c, C, a, C) g=mix(c, C, a, C) b=mix(c, C, a, C) a=A Alternatively you could write "(c*a + C*(C-a)) / C" for r,g,b Changes: - Usage of C instead of 255 and c instead of r,g,b (no change in behavior) - Make the complete picture non-transparent, not just the a>0 parts - Can now correctly handle areas with a>0 correctly! - Slider ctl(1) resetted to 0. (no change in behavior) ============================================= (5) CORRECTIONS TO Transexpl\Settrans.afs & Transexpl\Settrans.bf8 Original version: r=r g=g b=b a=a>0 ? ctl(1):0 My version: r=c g=c b=c a=ctl(1) Changes: - Usage of c instead of r,g,b (no change in behavior) - Removed non-essential if-else code (no change in behavior) ============================================= (6) SMALLER CHANGES Patched Lights.8bf and Ffexamp.8bf according to the YUV-bug, but it should not change anything since i, u or v were not used. Lights.8bf and Ffexamp.8bf : - Added controllers which were not activated in the 8BF file. Set controllers which are not used to 0 in the AFS file. - Changed default values for the controllers Patched all 8BF example files to the newest version of FF 3.0.4, just to be sure that there aren't any bugs unfixed ! Changed title "EditTransparency" to "Edit Transparency" Changed filenames Edittran.8bf -> Edittrns.8bf =============================================