The aim of the prediction stage is to remove any residual interdependencies between coefficients in the wavelet subbands, so that subsequent entropy coding can be applied as far as possible to decorrelated data. Prediction only applies to the DC (Low-Low) subband of intra frames.
In this subband, coefficients are scanned in raster order (that is, along horizontal lines in the subband) and so any quantised values to the left and above the current coefficient can be used to predict it. In Dirac, the coefficient at position (i,j) is predicted by the mean of the reconstructed coefficients at positions (i-1,j),(i,j-1) and (i-1,j-1). After this, the difference is quantised, and it's this value that is sent.
To reconstruct the value, to use for prediction of the next coefficient, the prediction must be added back into the quantised difference.
This process illustrates a subtle point about the transform coding process described previously. The process is not one where all the coefficients in a subband are quantised and then the subband is iterated over again to code all the coefficients. These processes instead take place for each coefficient in a single pass over the data. This is a more efficient implementation, but because prediction is intertwined with quantisation, it's also essential for coding Intra DC bands.
Previous: Quantisation Next: Lagrangian parameter control of subband quantisation