In general, techniques are described for computing even-sized discrete cosine transforms (DCTs). For example, a coding device may implement these techniques. The coding device includes a DCT-II unit that first determines whether a DCT-II to perform is a multiple of two, and in response to determining that the DCT-II to perform is a multiple of two, performs the DCT-II. To perform the DCT-II, the DCT-II unit computes a butterfly and reverses an order of a first sub-set of the outputs of the butterfly. The DCT-II unit then recursively subtracts the reverse-ordered first sub-set of the butterfly outputs. The DCT-II unit computes a sub-DCT-II for a second sub-set of the butterfly outputs and a sub-DCT-III for the recursively subtracted first set of butterfly outputs. The DCT-II unit reorders the outputs produced by the sub-DCT-II and sub-DCT-III to generate output values of the DCT-II.