added masking modes 5 and 6; fixed memory whole; preliminaryTestNearIdentical; swlib 8bit mode