Rearrange matrix definitions in dithering module