Fixed DCT values being converted to 0-255 scale

This was a seriously annoying bug that caused very magnitude-small
numbers such as -1 and -2 to become 255 and 254, which throws off
quantization significantly.