refactor hardcoding of dither matrices