1. A computer-implemented method performed by a decoder, the method comprising: with the decoder: parsing, from a bit stream, information indicating a selected scale factor prediction mode, wherein the selected scale factor prediction mode is selected from plural scale factor prediction modes, wherein each of the plural scale factor prediction modes is available for processing a particular mask; performing scale factor prediction according to the selected scale factor prediction mode; entropy decoding difference values; combining the difference values with results of the scale factor prediction to produce plural current scale factors; reconstructing media using the plural current scale factors; and outputting the reconstructed media.