DCT - Coefficients and Basis Function
When DCT is defined by a matrix, then this matrix contains the necessary information to build the basis functions. 

Suppose that $I$ is your $8\times8$ block, and $D$ a real $8\times8$  matrix for a 1D DCT (with column-wise vectors). Then $D^TI$ applies the DCT on columns, and $ID$ does it on rows. Thus, a 2D DCT yields a  $8\times8$ matrix $C$ of coefficients defined by:

$$C = D^T I D\,.$$

Consequently, we have $$I = D C  D^T  \,.$$

If we call $\Gamma_{m,n}$ the matrix such that every element is zero, except for $\Gamma[m,n]=1$ (the canonical basis), then 

$$C = \sum_{m,n} C[m,n]\Gamma_{m,n}$$

hence, by linearity:

$$I = \sum_{m,n} C[m,n] D \Gamma_{m,n} D^T  \,.$$

Each matrix $D \Gamma_{m,n} D^T $ is an element of the basis you are looking for.