Apparatus for decoding video data in which differences between predicted and original samples are frequency-separated, using a frequency-separation transform, and encoded, comprising: a predictor configured to predict samples of an image from reference samples derived from the same image according to a prediction mode associated with a sample to be predicted, the reference samples comprising previously encoded samples above and to the left of the samples to be predicted, the prediction mode defining a prediction direction and being selected for each of a plurality of blocks of samples, from a set of two or more numbered candidate prediction modes; a selector configured to select, for the prediction of luminance samples, a scan pattern from a set of two or more candidate scan patterns, each scan pattern defining an order of encoding the set of frequency-separated coefficients, in dependence upon the prediction mode for that block of samples by using a mapping between scan patterns and prediction modes, wherein the selector is configured to select a horizontal scan pattern in respect of a set of prediction modes that are predominantly vertical, to select a vertical scan pattern in respect of a set of prediction modes that are predominantly horizontal, and to select a diagonal scan pattern in respect of other prediction modes; the selector being configured to apply a different mapping between scan patterns and prediction modes for chrominance samples, the different mapping using a set of candidate scan patterns consisting only of the horizontal scan pattern and the vertical scan pattern, and to map either a horizontal scan pattern or a vertical scan pattern to each of the prediction modes; and a decoder configured to decode frequency-separated difference data representing a frequency-separated version of data indicative of differences between the samples to be decoded and respective predicted samples, in an order of frequency-separated coefficients according to the selected scan pattern. a predictor configured to predict samples of an image from reference samples derived from the same image according to a prediction mode associated with a sample to be predicted, the reference samples comprising previously encoded samples above and to the left of the samples to be predicted, the prediction mode defining a prediction direction and being selected for each of a plurality of blocks of samples, from a set of two or more numbered candidate prediction modes; a selector configured to select, for the prediction of luminance samples, a scan pattern from a set of two or more candidate scan patterns, each scan pattern defining an order of encoding the set of frequency-separated coefficients, in dependence upon the prediction mode for that block of samples by using a mapping between scan patterns and prediction modes, wherein the selector is configured to select a horizontal scan pattern in respect of a set of prediction modes that are predominantly vertical, to select a vertical scan pattern in respect of a set of prediction modes that are predominantly horizontal, and to select a diagonal scan pattern in respect of other prediction modes; the selector being configured to apply a different mapping between scan patterns and prediction modes for chrominance samples, the different mapping using a set of candidate scan patterns consisting only of the horizontal scan pattern and the vertical scan pattern, and to map either a horizontal scan pattern or a vertical scan pattern to each of the prediction modes; and a decoder configured to decode frequency-separated difference data representing a frequency-separated version of data indicative of differences between the samples to be decoded and respective predicted samples, in an order of frequency-separated coefficients according to the selected scan pattern.