Discrete cosine or sine transform