added quantize/inverse quantize, SSD, improved self-test