Quantization level binarization in video coding
View Patent ↗A method for encoding a picture of a video including a current transform unit is disclosed. A coefficient of each position in the current transform unit is quantized by a processor to generate quantization levels of the current transform unit. A value of a Rice parameter of a current position in the current transform unit for Golomb-Rice binarization is determined by the processor based on a value of a history variable for a previous transform unit preceding the current transform unit. The value of the history variable is determined based on at least one of a bit depth or a bit rate for encoding the picture. The quantization level of the current position is converted by the processor into a binary representation using Golomb-Rice binarization with the value of the Rice parameter. The binary representation of the current position is compressed by the processor into a bitstream.
1 . A method for encoding a picture of a video, the picture comprising a current transform unit, the method comprising:
quantizing, by a processor, a coefficient of each position in the current transform unit to generate quantization levels of the current transform unit;
determining, by the processor, a value of a Rice parameter of a current position in the current transform unit for Golomb-Rice binarization based on a value of a history variable for a previous transform unit preceding the current transform unit, wherein the value of the history variable is determined based on at least one of a bit depth or a bit rate for encoding the picture;
converting, by the processor, the quantization level of the current position into a binary representation using Golomb-Rice binarization with the value of the Rice parameter; and
compressing, by the processor, the binary representation of the current position into a bitstream;
wherein the method further comprises:
determining the value of the history variable based on a value of an offset and a first, non-zero, Golomb-Rice coded quantization level of the quantization levels of the previous transform unit.
2 . The method of claim 1 , further comprising:
obtaining the value of the offset based on the at least one of the bit depth or the bit rate for encoding the picture.
3 . The method of claim 2 , wherein the value of the offset is a non-zero integer.
4 . The method of claim 3 , wherein the bit depth is 16 bits, and the value of the offset is 2.
5 . The method of claim 1 , wherein at least one of neighboring positions of the current position is outside of the current transform unit.
6 . The method of claim 1 , wherein the binary representation of the current position comprises a bypass-coded bin in regular residual coding (RRC).
7 . The method of claim 1 , wherein converting the quantization level of the current position comprises converting an absolute level of the quantization level of the current position into the binary representation.
8 . A method for decoding a picture of a video, the picture comprising a current transform unit, the method comprising:
decompressing, by a processor, a bitstream to obtain a binary representation of a current position in the current transform unit, and a value of a Rice parameter of the current position for Golomb-Rice binarization, wherein the value of the Rice parameter is determined based on a value of a history variable for a previous transform unit preceding the current transform unit, and the value of the history variable is determined based on at least one of a bit depth or a bit rate for decoding the picture;
converting, by the processor, the binary representation into a quantization level of the current position using Golomb-Rice binarization with the value of the Rice parameter; and
dequantizing, by the processor, the quantization level of the current position to generate a coefficient of the current position;
wherein the value of the history variable is determined based on a value of an offset and a first, non-zero, Golomb-Rice coded quantization level of the quantization levels of the previous transform unit.
9 . The method of claim 8 , further comprising:
obtaining the value of the offset based on the at least one of the bit depth or the bit rate for decoding the picture.
10 . The method of claim 9 , wherein the value of the offset is a non-zero integer.
11 . The method of claim 10 , wherein the bit depth is 16 bits, and the value of the offset is 2.
12 . The method of claim 8 , wherein at least one of neighboring positions of the current position is outside of the current transform unit.
13 . The method of claim 8 , wherein the binary representation of the current position comprises a bypass-coded bin in regular residual coding (RRC).
14 . The method of claim 8 , wherein converting the binary representation comprises converting the binary representation into an absolute level of the quantization level of the current position.
15 . A non-transitory computer-readable storage medium storing a bitstream and a computer program, wherein when executed by a processor, the computer program causes the processor to generate the bitstream by executing a method for encoding a picture of a video, the picture comprising a current transform unit, the method comprising:
quantizing a coefficient of each position in the current transform unit to generate quantization levels of the current transform unit;
determining a value of a Rice parameter of a current position in the current transform unit for Golomb-Rice binarization based on a value of a history variable for a previous transform unit preceding the current transform unit, wherein the value of the history variable is determined based on at least one of a bit depth or a bit rate for encoding the picture;
converting the quantization level of the current position into a binary representation using Golomb-Rice binarization with the value of the Rice parameter; and
compressing the binary representation of the current position into the bitstream;
wherein the method further comprises:
determining the value of the history variable based on a value of an offset and a first, non-zero, Golomb-Rice coded quantization level of the quantization levels of the previous transform unit.
16 . The non-transitory computer-readable storage medium of claim 15 , wherein the method further comprises:
obtaining the value of the offset based on the at least one of the bit depth or the bit rate for encoding the picture.
17 . The non-transitory computer-readable storage medium of claim 16 , wherein the value of the offset is a non-zero integer.
18 . The non-transitory computer-readable storage medium of claim 17 , wherein the bit depth is 16 bits, and the value of the offset is 2.
19 . The non-transitory computer-readable storage medium of claim 15 , wherein at least one of neighboring positions of the current position is outside of the current transform unit.
20 . The non-transitory computer-readable storage medium of claim 15 , wherein the binary representation of the current position comprises a bypass-coded bin in regular residual coding (RRC).