A data encoding method comprising: generating an ordered array of data values representing an image region and having an array order; deriving a quantisation parameter indicating a quantisation degree so that the ordered array of data values, when encoded using that quantisation degree, meets one or more predetermined criteria comprising at least a data quantity criterion; detecting a number and location of non-zero values in the array order, amongst the ordered array of data values or the ordered array of data values as quantised according to a quantisation degree indicated by the derived quantisation parameter; if the detected number of non-zero values is no more than a threshold number and the detected number of non-zero values are the lowest frequency values in the array order, selecting a different quantisation parameter; quantising the data values to generate respective quantised values; and entropy encoding the quantised values; in which the generating step comprises: predicting an image region for an image to be encoded; generating a residual image region dependent upon the difference between the predicted image region and a corresponding region of the image to be encoded; and frequency transforming the residual image region; in which the ordered array of data values comprises data values of a frequency-transformed representation of the residual image region in which the array order is an array order from a data value representing lowest spatial frequencies to a data value representing highest spatial frequencies. generating an ordered array of data values representing an image region and having an array order; deriving a quantisation parameter indicating a quantisation degree so that the ordered array of data values, when encoded using that quantisation degree, meets one or more predetermined criteria comprising at least a data quantity criterion; detecting a number and location of non-zero values in the array order, amongst the ordered array of data values or the ordered array of data values as quantised according to a quantisation degree indicated by the derived quantisation parameter; if the detected number of non-zero values is no more than a threshold number and the detected number of non-zero values are the lowest frequency values in the array order, selecting a different quantisation parameter; quantising the data values to generate respective quantised values; and entropy encoding the quantised values; in which the generating step comprises: predicting an image region for an image to be encoded; generating a residual image region dependent upon the difference between the predicted image region and a corresponding region of the image to be encoded; and frequency transforming the residual image region; in which the ordered array of data values comprises data values of a frequency-transformed representation of the residual image region in which the array order is an array order from a data value representing lowest spatial frequencies to a data value representing highest spatial frequencies. predicting an image region for an image to be encoded; generating a residual image region dependent upon the difference between the predicted image region and a corresponding region of the image to be encoded; and frequency transforming the residual image region; in which the ordered array of data values comprises data values of a frequency-transformed representation of the residual image region in which the array order is an array order from a data value representing lowest spatial frequencies to a data value representing highest spatial frequencies. <EOS>