A method of decoding an image from a bitstream of encoded data using a decoder, the image being partitioned into blocks, the method comprising: for a current block of the image, determining a predicted value of a quantization parameter to be used in decoding the current block, wherein the predicted value is based upon a previous quantization parameter used for a neighboring block in the image, a second previous quantization parameter used for another neighboring block in the image, an estimated AC energy of the neighboring block, an estimated AC energy of the another neighboring block, and an estimated AC energy of the current block, wherein the predicted value is based upon the previous quantization parameter of the neighboring block and second previous quantization parameter of the another neighboring block, both weighted by a ratio of the estimated AC energy of the current block to their respective estimated AC energies, decoding from the bitstream a quantization parameter residual and deriving the quantization parameter from the predicted value and the quantization parameter residual; and reconstructing the pixels of the block, including dequantizing decoded quantized transform domain coefficients based on the quantization parameter, wherein the estimated AC energy of the neighboring block comprises the AC energy of a prediction of the neighboring block, and wherein the estimated AC energy of the current block comprises the AC energy of a prediction of the current block; or wherein the estimated AC energy of the neighboring block comprises the AC energy of a reconstruction of the neighboring block, and wherein the estimated AC energy of the current block is estimated based upon the AC energy of a prediction of the current block, and a difference between the AC energy of the reconstruction of the neighboring block and the AC energy of a prediction of the neighboring block. for a current block of the image, determining a predicted value of a quantization parameter to be used in decoding the current block, wherein the predicted value is based upon a previous quantization parameter used for a neighboring block in the image, a second previous quantization parameter used for another neighboring block in the image, an estimated AC energy of the neighboring block, an estimated AC energy of the another neighboring block, and an estimated AC energy of the current block, wherein the predicted value is based upon the previous quantization parameter of the neighboring block and second previous quantization parameter of the another neighboring block, both weighted by a ratio of the estimated AC energy of the current block to their respective estimated AC energies, decoding from the bitstream a quantization parameter residual and deriving the quantization parameter from the predicted value and the quantization parameter residual; and reconstructing the pixels of the block, including dequantizing decoded quantized transform domain coefficients based on the quantization parameter, determining a predicted value of a quantization parameter to be used in decoding the current block, wherein the predicted value is based upon a previous quantization parameter used for a neighboring block in the image, a second previous quantization parameter used for another neighboring block in the image, an estimated AC energy of the neighboring block, an estimated AC energy of the another neighboring block, and an estimated AC energy of the current block, wherein the predicted value is based upon the previous quantization parameter of the neighboring block and second previous quantization parameter of the another neighboring block, both weighted by a ratio of the estimated AC energy of the current block to their respective estimated AC energies, a previous quantization parameter used for a neighboring block in the image, a second previous quantization parameter used for another neighboring block in the image, an estimated AC energy of the neighboring block, an estimated AC energy of the another neighboring block, and an estimated AC energy of the current block, wherein the predicted value is based upon the previous quantization parameter of the neighboring block and second previous quantization parameter of the another neighboring block, both weighted by a ratio of the estimated AC energy of the current block to their respective estimated AC energies, decoding from the bitstream a quantization parameter residual and deriving the quantization parameter from the predicted value and the quantization parameter residual; and reconstructing the pixels of the block, including dequantizing decoded quantized transform domain coefficients based on the quantization parameter, wherein the estimated AC energy of the neighboring block comprises the AC energy of a prediction of the neighboring block, and wherein the estimated AC energy of the current block comprises the AC energy of a prediction of the current block; or wherein the estimated AC energy of the neighboring block comprises the AC energy of a reconstruction of the neighboring block, and wherein the estimated AC energy of the current block is estimated based upon the AC energy of a prediction of the current block, and a difference between the AC energy of the reconstruction of the neighboring block and the AC energy of a prediction of the neighboring block.