Techniques for transforming the prediction error of intra-coded blocks using mode-dependent transform functions. In an embodiment, an encoder selects a set of transform functions to represent prediction error based on the spatial mode used for prediction. In an alternative embodiment, a decoder reconstructs an image block by using the signaled spatial mode to derive the corresponding set of transform functions. No additional signaling between encoder and decoder is required as compared to prior art implementations.