Abstract:
A block of a frame of a video stream can be encoded using lossless coding that generates a transform domain residual block and a spatial domain difference block. The compression ratio of the coding may be improved by selecting an optimal quantization value on a per-block basis. The optimal quantization value can be selected by quantizing a residual block resulting from prediction of the block using a plurality of candidate quantization values and selecting the candidate quantization value that results in the fewest number of bits for the quantized residual block.