Search

US-12627812-B2 - History-based rice parameter derivations for wavefront parallel processing in video coding

US12627812B2US 12627812 B2US12627812 B2US 12627812B2US-12627812-B2

Abstract

In some embodiments, a video decoder decodes a video from a bitstream. 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 values in the CTU. The process includes for the first CTU of a current CTU row, determining whether the current CTU row is the first CTU row in the partition. If so, a history counter is set to an initial value. If not, the history counter is set to a value stored in a history counter storage variable. The video decoder decodes the CTU by calculating the Rice parameters for the CTU based on the history counter and decoding the binary string corresponding to the CTU based on the calculated Rice parameters. After decoding the CTU, the current value of the history counter is stored in the history counter storage variable.

Inventors

  • Yue Yu
  • Haoping Yu
  • Vladyslav ZAKHARCHENKO

Assignees

  • GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., LTD.

Dates

Publication Date
20260512
Application Date
20220826

Claims (20)

  1. 1 . A method for decoding a video from a video bitstream, the method comprising: accessing a binary string representing a partition of the video, the partition comprising a plurality of coding tree units (CTUs) forming one or more CTU rows; for each CTU of the plurality of CTUs in the partition, prior to decoding the CTU and in response to determining that parallel coding is enabled and that the CTU is the first CTU of a current CTU row, determining whether the current CTU row is the first CTU row in the partition; in response to determining that the current CTU row is the first CTU row in the partition, setting a history counter for a color component for calculating Rice parameters to an initial value; in response to determining that the current CTU row is not the first CTU row in the partition, setting the history counter for a color component to a value stored in a history counter storage variable; decoding the CTU, comprising: calculating the Rice parameters for transform units (TUs) in the CTU based on the value of the history counter; decoding the binary string corresponding to the TUs in the CTU into coefficient values of the TUs based on the calculated Rice parameters; and determining pixel values for the TUs in the CTU from the coefficient values; and after decoding the CTU, in response to determining that parallel coding is enabled and that the CTU is the first CTU of the current CTU row, storing a current value of the history counter in the history counter storage variable.
  2. 2 . The method of claim 1 , wherein the partition is a frame, a slice, or a tile.
  3. 3 . The method of claim 1 , wherein setting the history counter for a color component cIdx to an initial value comprises: StatCoeff[ c Idx]=2*Floor(Log 2(BitDepth−10)), wherein StatCoeff denotes the history counter, BitDepth specifies a bit depth of samples of luma and chroma arrays of the video, Floor(x) represents the largest integer less than or equal to x, and Log 2(x) is base-2 logarithm of x.
  4. 4 . The method of claim 1 , wherein calculating the Rice parameters for the TUs in the CTU based on the value of the history counter comprises: determining a replacement variable HistValue based on the history counter; calculating a local sum variable locSumAbs for a coefficient in a TU of the CTU using values of neighboring coefficients in a pre-determined neighborhood of the coefficient and the replacement variable HistValue; and deriving a Rice parameter for the TU based on the local sum variable locSumAbs.
  5. 5 . The method of claim 4 , wherein calculating a local sum variable locSumAbs for a coefficient in a TU of the CTU comprises: determining that a neighboring sample of a plurality of neighboring samples in the pre-determined neighborhood of the coefficient is outside the TU; and using the replacement variable HistValue as a value of the neighboring sample outside the TU to calculate the local sum variable locSumAbs.
  6. 6 . The method of claim 1 , further comprising: prior to decoding the CTU, in response to determining that the current CTU row is not the first CTU row in the partition, setting a replacement variable to a stored replacement variable value, wherein calculating the Rice parameters for TUs in the CTU based on the value of the history counter comprises calculating the Rice parameters for TUs in the CTU based on the replacement variable; and after decoding the CTU, in response to determining that parallel coding is enabled and that the CTU is the first CTU of the current CTU row, storing a current value of the replacement variable.
  7. 7 . The method of claim 1 , wherein decoding the CTU further comprises updating the history counter by: in response to determining that the first, non-zero, Golomb-Rice coded transform coefficient in a TU is coded as abs_remainder, updating the history counter for a color component cIdx as: StatCoeff[ c Idx]=(StatCoeff[ c Idx]+Floor(Log 2(abs_remainder[ c Idx]))+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 for a color component cIdx as: StatCoeff[ c Idx]=(StatCoeff[ c Idx]+Floor(Log 2(dec_abs_level[ c Idx])))>>1, wherein StatCoeff denotes the history counter, Floor(x) represents the largest integer less than or equal to x, and Log 2(x is base-2 logarithm of x.
  8. 8 . 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) forming one or more CTU rows; for each CTU of the plurality of CTUs in the partition, prior to decoding the CTU and in response to determining that parallel coding is enabled and that the CTU is the first CTU of a current CTU row, determining whether the current CTU row is the first CTU row in the partition; in response to determining that the current CTU row is the first CTU row in the partition, setting a history counter for a color component for calculating Rice parameters to an initial value; in response to determining that the current CTU row is not the first CTU row in the partition, setting the history counter for a color component to a value stored in a history counter storage variable; decoding the CTU, comprising: calculating the Rice parameters for transform units (TUs) in the CTU based on the value of the history counter; decoding the binary string corresponding to the TUs in the CTU into coefficient values of the TUs based on the calculated Rice parameters; and determining pixel values for the TUs in the CTU from the coefficient values; and after decoding the CTU, in response to determining that parallel coding is enabled and that the CTU is the first CTU of the current CTU row, storing a current value of the history counter in the history counter storage variable.
  9. 9 . The system of claim 8 , wherein setting the history counter for a color component cIdx to an initial value comprises: StatCoeff[ c Idx]=2*Floor(Log 2(BitDepth−10)), wherein StatCoeff denotes the history counter, BitDepth specifies a bit depth of samples of luma and chroma arrays of the video, Floor(x) represents the largest integer less than or equal to x, and Log 2(x) is base-2 logarithm of x.
  10. 10 . The system of claim 8 , wherein calculating the Rice parameters for the TUs in the CTU based on the value of the history counter comprises: determining a replacement variable HistValue based on the history counter; calculating a local sum variable locSumAbs for a coefficient in a TU of the CTU using values of neighboring coefficients in a pre-determined neighborhood of the coefficient and the replacement variable HistValue; and deriving a Rice parameter for the TU based on the local sum variable locSumAbs.
  11. 11 . The system of claim 8 , further comprising: prior to decoding the CTU, in response to determining that the current CTU row is not the first CTU row in the partition, setting a replacement variable to a stored replacement variable value, wherein calculating the Rice parameters for TUs in the CTU based on the value of the history counter comprises calculating the Rice parameters for TUs in the CTU based on the replacement variable; and after decoding the CTU, in response to determining that parallel coding is enabled and that the CTU is the first CTU of the current CTU row, storing a current value of the replacement variable.
  12. 12 . The system of claim 8 , wherein decoding the CTU further comprises updating the history counter by: in response to determining that the first, non-zero, Golomb-Rice coded transform coefficient in a TU is coded as abs_remainder, updating the history counter for a color component cIdx as: StatCoeff[cIdx]=(StatCoeff[ c Idx]+Floor(Log 2(abs_remainder[ c Idx]))+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 for a color component cIdx as: StatCoeff[ c Idx]=(StatCoeff[ c Idx]+Floor(Log 2(dec_abs_level[ c Idx])))>>1, wherein StatCoeff denotes the history counter, Floor(x) represents the largest integer less than or equal to x, and Log 2(x) is base-2 logarithm of x.
  13. 13 . 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) forming one or more CTU rows; processing the partition of the video to generate a binary representation of the partition, the processing comprising: for each CTU of the plurality of CTUs in the partition, prior to encoding the CTU and in response to determining that parallel coding is enabled and that the CTU is the first CTU of a current CTU row, determining whether the current CTU row is the first CTU row in the partition; in response to determining that the current CTU row is the first CTU row in the partition, setting a history counter for a color component for calculating Rice parameters to an initial value; in response to determining that the current CTU row is not the first CTU row in the partition, setting the history counter for a color component to a value stored in a history counter storage variable; and encoding the CTU, comprising: calculating the Rice parameters for transform units (TUs) in the CTU based on the value of the history counter, and encoding coefficient values of the TUs into a binary representation corresponding to the TUs in the CTU based on the calculated Rice parameters; and after encoding the CTU, in response to determining that parallel coding is enabled and that the CTU is the first CTU of the current CTU row, storing a current value of the history counter in the history counter storage variable; and encoding the binary representation of the partition into a bitstream of the video.
  14. 14 . The method of claim 13 , wherein the partition is a frame, a slice, or a tile.
  15. 15 . The method of claim 13 , wherein setting the history counter for a color component cIdx to an initial value comprises: StatCoeff[ c Idx]=2*Floor(Log 2(BitDepth−10)), wherein StatCoeff denotes the history counter, BitDepth specifies a bit depth of samples of luma and chroma arrays of the video, Floor(x) represents the largest integer less than or equal to x, and Log 2(x) is base-2 logarithm of x.
  16. 16 . The method of claim 13 , wherein calculating the Rice parameters for the TUs in the CTU based on the value of the history counter comprises: determining a replacement variable HistValue based on the history counter; calculating a local sum variable locSumAbs for a coefficient in a TU of the CTU using values of neighboring coefficients in a pre-determined neighborhood of the coefficient and the replacement variable HistValue; and deriving a Rice parameter for the TU based on the local sum variable locSumAbs.
  17. 17 . The method of claim 16 , wherein calculating a local sum variable locSumAbs for a coefficient in a TU of the CTU comprises: determining that a neighboring sample of a plurality of neighboring samples in the pre-determined neighborhood of the coefficient is outside the TU; and using the replacement variable HistValue as a value of the neighboring sample outside the TU to calculate the local sum variable locSumAbs.
  18. 18 . The method of claim 13 , further comprising: prior to encoding the CTU, in response to determining that the current CTU row is not the first CTU row in the partition, setting a replacement variable to a stored replacement variable value, wherein calculating the Rice parameters for TUs in the CTU based on the value of the history counter comprises calculating the Rice parameters for TUs in the CTU based on the replacement variable; and after encoding the CTU, in response to determining that parallel coding is enabled and that the CTU is the first CTU of the current CTU row, storing a current value of the replacement variable.
  19. 19 . The method of claim 13 , wherein encoding the CTU further comprises updating the history counter by: in response to determining that the first, non-zero, Golomb-Rice coded transform coefficient in a TU is coded as abs_remainder, updating the history counter for a color component cIdx as: StatCoeff[ c Idx]=(StatCoeff[ c Idx]+Floor(Log 2(abs_remainder[ c Idx]))+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 for a color component cIdx as: StatCoeff[ c Idx]=(StatCoeff[ c Idx]+Floor(Log 2(dec_abs_level[ c Idx])))>>1, wherein StatCoeff denotes the history counter, Floor(x) represents the largest integer less than or equal to x, and Log 2(x is base-2 logarithm of x.
  20. 20 . 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 method of claim 13 to generate the bitstream.

Description

CROSS-REFERENCE TO RELATED APPLICATIONS This application is a national stage application of International Application No. PCT/US2022/075497, filed on Aug. 26, 2022, which claims priority to U.S. Provisional Application No. 63/260,600, entitled “History-Based Rice Parameter Derivations for Wavefront Parallel Processing in Video Coding,” filed on Aug. 26, 2021, U.S. Provisional Application No. 63/262,078, entitled “History-Based Rice Parameter Derivations for Wavefront Parallel Processing in Video Coding,” filed on Oct. 4, 2021, and U.S. Provisional Application No. 63/251,385, entitled “Representation of Bit Depth Range for VVC Operation Range Extension,” filed on Oct. 1, 2021, which are hereby incorporated in their entirety by this reference. TECHNICAL FIELD This disclosure relates generally to computer-implemented methods and systems for video processing. Specifically, the present disclosure involves history-based Rice parameter derivations for wavefront parallel processing in video coding. BACKGROUND The ubiquitous camera-enabled devices, such as smartphones, tablets, and computers, have made it easier than ever to capture videos or images. However, the amount of data for even a short video can be substantially large. Video coding technology (including video encoding and decoding) allows video data to be compressed into smaller sizes thereby allowing various videos to be stored and transmitted. Video coding has been used in a wide range of applications, such as digital TV broadcast, video transmission over the internet and mobile networks, real-time applications (e.g., video chat, video conferencing), DVD and Blu-ray discs, and so on. To reduce the storage space for storing a video and/or the network bandwidth consumption for transmitting a video, it is desired to improve the efficiency of the video coding scheme. SUMMARY Some embodiments involve history-based Rice parameter derivations for wavefront parallel processing in video coding. In one example, a method for decoding a video from a video bitstream comprises: accessing a binary string representing a partition of the video, the partition comprising a plurality of coding tree units (CTUs) forming one or more CTU rows; for each CTU of the plurality of CTUs in the partition, prior to decoding the CTU and in response to determining that parallel coding is enabled and that the CTU is the first CTU of a current CTU row, determining whether the current CTU row is the first CTU row in the partition; in response to determining that the current CTU row is the first CTU row in the partition, setting a history counter for a color component for calculating Rice parameters to an initial value; in response to determining that the current CTU row is not the first CTU row in the partition, setting the history counter for a color component to a value stored in a history counter storage variable; decoding the CTU, comprising: calculating the Rice parameters for transform units (TUs) in the CTU based on the value of the history counter; decoding the binary string corresponding to the TUs in the CTU into coefficient values of the TUs based on the calculated Rice parameters; and determining pixel values for the TUs in the CTU from the coefficient values; and after decoding the CTU, in response to determining that parallel coding is enabled and that the CTU is the first CTU of the current CTU row, storing a current value of the history counter in the history counter storage variable. In another example, a non-transitory computer-readable medium has program code that is stored thereon and executable by one or more processing devices for performing operations. The operations comprise accessing a binary string representing a partition of a video, the partition comprising a plurality of coding tree units (CTUs) forming one or more CTU rows; for each CTU of the plurality of CTUs in the partition, prior to decoding the CTU and in response to determining that parallel coding is enabled and that the CTU is the first CTU of a current CTU row, determining whether the current CTU row is the first CTU row in the partition; in response to determining that the current CTU row is the first CTU row in the partition, setting a history counter for a color component to an initial value; in response to determining that the current CTU row is not the first CTU row in the partition, setting the history counter for a color component to a value stored in a history counter storage variable; decoding the CTU, comprising: calculating Rice parameters for transform units (TUs) in the CTU based on the value of the history counter; decoding the binary string corresponding to the TUs in the CTU into coefficient values of the TUs based on the calculated Rice parameters; and determining pixel values for the TUs in the CTU from the coefficient values; and after decoding the CTU, in response to determining that parallel coding is enabled and that the CTU is the first CTU of the current CTU row, storing a curr