This paper studies the relation between the discrete cosine transform(DCT) and the discrete hartley transform(DHT). A fast algorithm to calculate the coefficient on two dimension discrete cosine transform(2DDCT) is proposed based on the algorithm of DHT.