Rearrange matrix definitions dithering module