DCT matrix module function