Independent history-based Rice parameter derivations for video coding
View Patent ↗In some embodiments, a video decoder decodes a video from a bitstream of the video using a history-based rice parameter derivation. The video decoder accesses a binary string representing a partition of the video and processes each coding tree unit (CTU) in the partition to generate decoded coefficient values in the CTU. The process includes updating a replacement variable for a transform unit (TU) in the CTU for calculating rice parameters independently of the previous TU or CTU. The process further includes calculating the rice parameters for TU in the CTU based on the value of the replacement variable and decoding the binary string corresponding to the TU into coefficient values based on the calculated rice parameters. Pixel values of the TU can be determined from the decoded coefficient values for output.
1 . A method for decoding a video, the method comprising:
accessing a binary string representing a partition of the video, the partition comprising a plurality of coding tree units (CTUs);
decoding each CTU of the plurality of CTUs in the partition, decoding the CTU comprising decoding a transform unit (TU) of the CTU by:
updating a replacement variable HistValue for calculating Rice parameters for the TU, wherein updating the replacement variable Hist Value is performed independently of another TU of the CTU that precedes the TU and another CTU of the plurality of CTUs that precedes the CTU;
calculating the Rice parameters for the TU in the CTU based on the updated replacement variable HistValue; and
decoding the binary string corresponding to the TU in the CTU into coefficient values of the TU based on the calculated Rice parameters; and
determining pixel values for the TU in the CTU from the coefficient values; and
outputting a decoded partition of the video comprising the decoded plurality of CTUs in the partition,
wherein updating the replacement variable Hist Value comprises:
updating a history counter StatCoeff for a color component; and
prior to calculating a next Rice parameter, updating the replacement variable Hist Value based on the updated history counter StatCoeff for the color component by:
HistValue[cIdx]=1<<StatCoeff[cIdx],
wherein updating the history counter StatCoeff comprises:
in response to determining that a first non-zero Golomb-Rice coded transform coefficient in a TU is coded as abs_remainder, updating a history counter StatCoeff for a color component cIdx as:
StatCoeff[cIdx]=(StatCoeff_init[cIdx]+Floor(Log 2(abs_remainder[cIdx]))+2)>>1; and
in response to determining that the first non-zero Golomb-Rice coded transform coefficient in the TU is coded as dec_abs_level, updating the history counter StatCoeff for a color component cIdx as:
StatCoeff[cIdx]=(StatCoeff_init[cIdx]+Floor(Log 2(dec_abs_level[cIdx])))>>1,
wherein Floor(x) represents the largest integer less than or equal to x, and Log 2(x) is base-2 logarithm of x, wherein StatCoeff_init is an initial value of the history counter StatCoeff,
wherein the StatCoeff_init for a color component cIdx is determined for the partition based on at least one of:
statCoeff_init[idx]=2*Floor(Log 2(BitDepth−10)) or
statCoeff_init[idx]=Clip(MIN_Stat,MAX_Stat,(int)((19− QP )/6))−1,
wherein BitDepth specifies the bit depth of the samples of the luma or chroma arrays, and Floor(x) represents the largest integer less than or equal to x, and wherein MIN_Stat, MAX_Stat are two predefined integers, respectively, OP is the initial quantization parameter for each partition and Clip( ) is defined as follows:
Clip
(
x
,
y
,
z
)
=
{
x
;
z
<
x
y
;
z
>
y
z
;
otherwise
.
2 . The method of claim 1 , wherein the partition is a frame, a slice, or a tile.
3 . The method of claim 1 , further comprising setting the history counter StatCoeff to an initial value based on a bit depth of samples of luma and chroma arrays of the video or a quantization parameter of the current partition.
4 . A system comprising:
a processing device; and
a non-transitory computer-readable medium communicatively coupled to the processing device, wherein the processing device is configured to execute program code stored in the non-transitory computer-readable medium and thereby perform operations comprising:
accessing a binary string representing a partition of a video, the partition comprising a plurality of coding tree units (CTUs);
decoding each CTU of the plurality of CTUs in the partition, decoding the CTU comprising decoding a transform unit (TU) of the CTU by:
updating a replacement variable HistValue for calculating Rice parameters for the TU, wherein updating the replacement variable Hist Value is performed independently of another TU of the CTU that precedes the TU and another CTU of the plurality of CTUs that precedes the CTU;
calculating the Rice parameters for the TU in the CTU based on the updated replacement variable Hist Value; and
decoding the binary string corresponding to the TU in the CTU into coefficient values of the TU based on the calculated Rice parameters; and
determining pixel values for the TU in the CTU from the coefficient values; and
outputting a decoded partition of the video comprising the decoded plurality of CTUs in the partition,
wherein updating the replacement variable Hist Value comprises:
updating a history counter StatCoeff for a color component; and
prior to calculating a next Rice parameter, updating the replacement variable Hist Value based on the updated history counter StatCoeff for the color component by:
HistValue[cIdx]=1<<StatCoeff[cIdx],
wherein updating the history counter StatCoeff comprises:
in response to determining that a first non-zero Golomb-Rice coded transform coefficient in a TU is coded as abs_remainder, updating a history counter StatCoeff for a color component cIdx as:
StatCoeff[cIdx]=(StatCoeff_init[cIdx]+Floor(Log 2(abs_remainder[cIdx]))+2)>>1; and
in response to determining that the first non-zero Golomb-Rice coded transform coefficient in the TU is coded as dec_abs_level, updating the history counter StatCoeff for a color component cIdx as:
StatCoeff[cIdx]=(StatCoeff_init[cIdx]+Floor(Log 2(dec_abs_level[cIdx])))>>1,
wherein Floor(x) represents the largest integer less than or equal to x, and Log 2(x) is base-2 logarithm of x, wherein StatCoeff_init is an initial value of the history counter StatCoeff,
wherein the StatCoeff_init for a color component cIdx is determined for the partition based on at least one of:
statCoeff_init[idx]=2*Floor(Log 2(BitDepth−10)) or
statCoeff_init[idx]=Clip(MIN_Stat,MAX_Stat,(int)((19− QP )/6))−1,
wherein BitDepth specifies the bit depth of the samples of the luma or chroma arrays, and Floor(x) represents the largest integer less than or equal to x, and wherein MIN_Stat, MAX_Stat are two predefined integers, respectively, QP is the initial quantization parameter for each partition and Clip( ) is defined as follows:
Clip
(
x
,
y
,
z
)
=
{
x
;
z
<
x
y
;
z
>
y
z
;
otherwise
.
5 . A method for encoding a video, the method comprising:
accessing a partition of the video, the partition comprising a plurality of coding tree units (CTUs);
processing the partition of the video to generate a binary representation of the partition, the processing comprising:
encoding each CTU of the plurality of CTUs in the partition, encoding the CTU comprising encoding a transform unit (TU) of the CTU by:
updating a replacement variable HistValue for calculating Rice parameters for the TU, wherein updating the replacement variable Hist Value is performed independently of (a) another TU of the CTU that precedes the TU and (b) another CTU of the plurality of CTUs that precedes the CTU;
calculating the Rice parameters for the TU in the CTU based on the updated replacement variable Hist Value; and
encoding coefficient values of the TU into a binary representation corresponding to the TU in the CTU based on the calculated Rice parameters; and
encoding the binary representation of the partition into a bitstream of the video,
wherein updating the replacement variable Hist Value comprises:
updating a history counter StatCoeff for a color component; and
prior to calculating a next Rice parameter, updating the replacement variable Hist Value based on the updated history counter StatCoeff for the color component by:
HistValue[cIdx]=1<<StatCoeff[cIdx],
wherein updating the history counter StatCoeff comprises:
in response to determining that a first non-zero Golomb-Rice coded transform coefficient in a TU is coded as abs_remainder, updating a history counter StatCoeff for a color component cIdx as:
StatCoeff[cIdx]=(StatCoeff_init[cIdx]+Floor(Log 2(abs_remainder[cIdx]))+2)>>1; and
in response to determining that the first non-zero Golomb-Rice coded transform coefficient in the TU is coded as dec_abs_level, updating the history counter StatCoeff for a color component cIdx as:
StatCoeff[cIdx]=(StatCoeff_init[cIdx]+Floor(Log 2(dec_abs_level[cIdx])))>>1,
wherein Floor(x) represents the largest integer less than or equal to x, and Log 2(x) is base-2 logarithm of x, wherein StatCoeff_init is an initial value of the history counter StatCoeff,
wherein the StatCoeff_init for a color component cIdx is determined for the partition based on at least one of:
statCoeff_init[idx]=2*Floor(Log 2(BitDepth−10)) or
statCoeff_init[idx]=Clip(MIN_Stat,MAX_Stat,(int)((19− QP )/6))−1,
wherein BitDepth specifies the bit depth of the samples of the luma or chroma arrays, and Floor(x) represents the largest integer less than or equal to x, and wherein MIN_Stat, MAX_Stat are two predefined integers, respectively, QP is the initial quantization parameter for each partition and Clip( ) is defined as follows:
Clip
(
x
,
y
,
z
)
=
{
x
;
z
<
x
y
;
z
>
y
z
;
otherwise
.
6 . The method of claim 5 , wherein the partition is a frame, a slice, or a tile.
7 . The method of claim 5 , further comprising setting the history counter StatCoeff to an initial value based on a bit depth of samples of luma and chroma arrays of the video or a quantization parameter of the current partition.
8 . A non-transitory computer-readable storage medium, having a computer program and a bitstream stored thereon, wherein the computer program, when executed by a processor, enables the processor to perform the steps of the method for encoding a video of claim 5 to generate the bitstream.