Optimize dithering
Prepare for SSE2 extension