Lossless video coding with sub-frame level optimal quantization values
First Claim
Patent Images
1. A method for encoding a video stream including a plurality of frames, the method comprising:
- selecting a block of a plurality of blocks of the frame;
identifying, using a processor, an optimal quantization value, comprising;
performing a quantization optimization loop for a plurality of candidate quantization values using the block including;
identifying a candidate quantization value;
predicting the block to form a residual block;
partially encoding the residual block to form a partially encoded residual block;
quantizing the partially encoded residual block to form a quantized block using the candidate quantization value;
partially decoding the quantized block to form a decoded residual block;
subtracting the decoded residual block from the residual block to form a difference block; and
summing the bits included in the quantized block and the difference block to form an estimated number of bits; and
identifying the candidate quantization value that results in the smallest estimated number of bits as the optimal quantization value,wherein the optimal quantization value is a quantization value for the block that minimizes a number of bits required to encode a residual block of the block and a difference block of the block, the residual block being a difference between the block and a prediction block for the block, and the difference block being a block including errors resulting from encoding the residual block;
encoding the block using the optimal quantization value to form an encoded residual block and an encoded difference block by;
quantizing and subsequently entropy coding the residual block to form the encoded residual block; and
entropy coding the difference block without quantizing the difference block to form the encoded difference block; and
including the encoded residual block, the encoded difference block and the optimal quantization value in an encoded video bitstream.
2 Assignments
0 Petitions
Accused Products
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.
-
Citations
18 Claims
-
1. A method for encoding a video stream including a plurality of frames, the method comprising:
-
selecting a block of a plurality of blocks of the frame; identifying, using a processor, an optimal quantization value, comprising; performing a quantization optimization loop for a plurality of candidate quantization values using the block including; identifying a candidate quantization value; predicting the block to form a residual block; partially encoding the residual block to form a partially encoded residual block; quantizing the partially encoded residual block to form a quantized block using the candidate quantization value; partially decoding the quantized block to form a decoded residual block; subtracting the decoded residual block from the residual block to form a difference block; and summing the bits included in the quantized block and the difference block to form an estimated number of bits; and identifying the candidate quantization value that results in the smallest estimated number of bits as the optimal quantization value, wherein the optimal quantization value is a quantization value for the block that minimizes a number of bits required to encode a residual block of the block and a difference block of the block, the residual block being a difference between the block and a prediction block for the block, and the difference block being a block including errors resulting from encoding the residual block; encoding the block using the optimal quantization value to form an encoded residual block and an encoded difference block by; quantizing and subsequently entropy coding the residual block to form the encoded residual block; and entropy coding the difference block without quantizing the difference block to form the encoded difference block; and including the encoded residual block, the encoded difference block and the optimal quantization value in an encoded video bitstream. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. An apparatus for encoding a video stream including a plurality of frames, the apparatus comprising:
-
a memory; and a processor configured to execute instructions stored in the memory to; select a block of a plurality of blocks of a frame; identify an optimal quantization value wherein the identify the optimal quantization value comprises; performing a quantization optimization loop for a plurality of candidate quantization values using the block including; identifying a candidate quantization value; predicting the block to form a residual block; partially encoding the residual block to form a partially encoded residual block; quantizing the partially encoded residual block to form a quantized block using the candidate quantization value; partially decoding the quantized block to form a decoded residual block; subtracting the decoded residual block from the residual block to form a difference block; and summing the bits included in the quantized block and the difference block to form an estimated number of bits; and identifying the candidate quantization value that results in the smallest estimated number of bits as the optimal quantization value, wherein the optimal quantization value is a quantization value for the block that minimizes a number of bits required to encode a residual block of the block and a difference block of the block, the residual block being a difference between the block and a prediction block for the block, and the difference block being a block including errors resulting from encoding the residual block; encode the block using the optimal quantization value to form an encoded residual block and an encoded difference block by; quantizing and subsequently entropy coding the residual block to form the encoded residual block; and entropy coding the difference block without quantizing the difference block to form the encoded difference block; and include the encoded residual block, the encoded difference block and the optimal quantization value in an encoded video bitstream. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17)
-
-
18. A method for decoding an encoded video bitstream including a plurality of frames, the method comprising:
-
identifying, using a processor, an entropy coded quantized block and an entropy coded difference block associated with a block of a frame by reading bits in a block header associated with the block; identifying an optimal quantization value for the quantized block by reading bits in a block header associated with the block, wherein the optimal quantization value was selected by an encoder performing a quantization optimization loop for a plurality of candidate quantization values using the block including; identifying a candidate quantization value; predicting the block to form a residual block; partially encoding the residual block to form a partially encoded residual block; quantizing the partially encoded residual block to form a candidate quantized block using the candidate quantization value; partially decoding the candidate quantized block to form a decoded residual block; subtracting the decoded residual block from the residual block to form a candidate difference block; and summing the bits included in the candidate quantized block and the candidate difference block to form an estimated number of bits; and identifying the candidate quantization value that results in the smallest estimated number of bits as the optimal quantization value for the block; entropy decoding the entropy coded quantized block to form a quantized block; entropy decoding the entropy coded difference block to form a difference block; de-quantizing the quantized block using the optimal quantization value to form a transformed block; inverse transforming the transformed block to form a first residual block; adding the difference block to the first residual block to form a second residual block; predicting the block to form a prediction block; and adding the second residual block to the predicted block to form a decoded block.
-
Specification