Using Low-Complexity History to Derive RICE Parameters for High-Bit-Depth Video Coding

By updating coefficient statistics based on encoding procedures, the techniques address the challenge of determining Rice parameters in high bit-depth video coding, enhancing coding efficiency.

JP7771187B2Active Publication Date: 2025-11-17QUALCOMM INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023534016
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-12-20
Filing Date
2021-12-21
Publication Date
2025-11-17
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

Existing video coding standards face challenges in accurately determining Rice parameters for high bit-depth coding, particularly when using context-based or absolute value encoding procedures, leading to suboptimal coding efficiency.

Method used

The proposed techniques update coefficient statistics based on the encoding procedure used for each transform coefficient, incorporating context-based and absolute value encoding, to determine Rice parameters more accurately, thereby improving coding efficiency.

Benefits of technology

This approach enhances the accuracy of Rice parameter selection, leading to improved coding efficiency in high bit-depth video coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007771187000004
    Figure 0007771187000004
  • Figure 0007771187000005
    Figure 0007771187000005
  • Figure 0007771187000006
    Figure 0007771187000006
Patent Text Reader

Abstract

A method for decoding video data includes a step of updating coefficient statistics based on one or more transform coefficients of a transform block (TB), where the step of updating the coefficient statistics includes performing a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, where the derivation process is determined based at least in part on which encoding procedure from a plurality of encoding procedures is used to encode each transform coefficient, the plurality of encoding procedures including a context-based procedure for encoding each transform coefficient and encoding each transform coefficient as an absolute value; and setting the coefficient statistics as an average of the coefficient statistics and the temporary value; a step of determining a history value based on the coefficient statistics; and a step of determining a Rice parameter for the particular transform coefficient of the TB.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application claims priority to U.S. Patent Application No. 17 / 645,187, filed December 20, 2021, and U.S. Provisional Application No. 63 / 128,641, filed December 21, 2020, the entire contents of which are incorporated herein by reference. U.S. Patent Application No. 17 / 645,187, filed December 20, 2021, claims the benefit of U.S. Provisional Application No. 63 / 128,641, filed December 21, 2020.

[0002] TECHNICAL FIELD This disclosure relates to video encoding and decoding. [Background technology]

[0003] Digital video capabilities may be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radiotelephones, so-called "smartphones," video teleconferencing devices, video streaming devices, etc. Digital video devices implement video coding techniques such as those described in standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10, Advanced Video Coding (AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC), and extensions to such standards. By implementing such video coding techniques, video devices may more efficiently transmit, receive, encode, decode, and / or store digital video information.

[0004] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) may be partitioned into video blocks, which are also sometimes referred to as coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial prediction with respect to reference samples in neighboring blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture may use spatial prediction with respect to reference samples in neighboring blocks in the same picture or temporal prediction with respect to reference samples in other reference pictures. A picture may be referred to as a frame, and a reference picture may be referred to as a reference frame. [Prior art documents] [Non-patent literature]

[0005] [Non-Patent Document 1] Bross et al., "Versatile Video Coding (Draft 10)," Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 18th Meeting: Remote Conference, June 22-July 1, 2020, JVET-S2001-vH Summary of the Invention [Means for solving the problem]

[0006] Generally, this disclosure describes techniques for Rice parameter derivation for regular residual coding (RRC) in high bit-depth coding. The proposed techniques relate to extensions to video coding standards (e.g., generic video coding (VVC)), but may also be applicable to other video coding standards. As described herein, a process for updating coefficient statistics used in determining Rice parameters for transform coefficients may take into account which encoding procedure of multiple encoding procedures is used to encode each transform coefficient. The multiple encoding procedures include a context-based procedure for encoding each transform coefficient and for encoding each transform coefficient as an absolute value. Determining the Rice parameters based at least in part on the encoding procedure used to encode each transform coefficient can increase the accuracy of Rice parameter selection, thereby improving coding efficiency.

[0007] In one example, the present disclosure describes a method for decoding video data, the method including: initializing coefficient statistics; and updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the video data, wherein updating the coefficient statistics comprises performing a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, the derivation process being determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context-based procedure for encoding the respective transform coefficients and encoding the respective transform coefficients as absolute values; and updating the coefficient statistics based on the coefficient statistics and the temporary value. the step of determining a Rice parameter for a particular transform coefficient of the TB, the step of determining the Rice parameter for the particular transform coefficient including determining a local sum value based on the history value based on the fact that the particular transform coefficient is at a spatial position less than 3 away from the right boundary of the TB or the bottom boundary of the TB, and determining the Rice parameter for the particular transform coefficient based on the local sum value; the step of determining the level of the particular transform coefficient based on the Rice parameter for the particular transform coefficient and one or more syntax elements coded in the bitstream; and the step of decoding the TB based on the level of the particular transform coefficient.

[0008] In another example, this disclosure describes a method for encoding video data, the method including initializing coefficient statistics and updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the video data, wherein updating the coefficient statistics includes performing a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, the derivation process being determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context-based procedure for encoding the respective transform coefficients and encoding the respective transform coefficients as absolute values. and setting a coefficient statistic as an average of the coefficient statistic and the temporary value; determining a history value based on the coefficient statistic; determining a Rice parameter for a specific transform coefficient of the TB, wherein determining the Rice parameter for the specific transform coefficient includes determining a local sum value based on the history value based on the specific transform coefficient being a spatial position less than 3 away from the right boundary of the TB or the bottom boundary of the TB, and determining the Rice parameter for the specific transform coefficient based on the local sum value; and generating a Rice code for the specific transform coefficient based on the Rice parameter for the specific transform coefficient and the level of the specific transform coefficient.

[0009] In another example, this disclosure describes a device for decoding video data, the device comprising: a memory configured to store the video data; and processing circuitry; the processing circuitry initializing coefficient statistics and updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the block of video data; the processing circuitry, as part of updating the coefficient statistics, performing a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB; the derivation process being determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients; the processing circuitry is configured to: determine a local sum value based on the history value based on the specific transform coefficient being less than three spatial positions away from the right boundary of the TB or the bottom boundary of the TB; determine a level of the specific transform coefficient based on the Rice parameter for the specific transform coefficient; and decode the block based on the level of the specific transform coefficient.

[0010] In another example, this disclosure describes a device for encoding video data, the device comprising: a memory configured to store the video data; and processing circuitry; the processing circuitry initializing coefficient statistics and updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the video data; and, as part of updating the coefficient statistics, the processing circuitry performing a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, the derivation process being determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures encoding the respective transform coefficients and encoding the respective transform coefficients as absolute values. and setting a coefficient statistic as an average of the coefficient statistic and the temporary value; determining a history value based on the coefficient statistic; and determining a Rice parameter for a particular transform coefficient of the TB, wherein the processing circuitry is configured to, as part of determining the Rice parameter for the particular transform coefficient, determine a local sum value based on the history value based on the particular transform coefficient being less than three spatial positions away from the right boundary of the TB or the bottom boundary of the TB, and determine the Rice parameter for the particular transform coefficient based on the local sum value; and generating a Rice code for the particular transform coefficient based on the Rice parameter for the particular transform coefficient and the level of the particular transform coefficient.

[0011] In another example, this disclosure describes a device for decoding video data, the device including: means for initializing coefficient statistics; and means for updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the block of video data, wherein the means for updating the coefficient statistics performs a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, the derivation process being determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context-based procedure for encoding the respective transform coefficients and for encoding the respective transform coefficients as absolute values. The decoding unit includes a means for determining a history value based on the coefficient statistics, a means for setting a coefficient statistic as an average of the coefficient statistic and a temporary value, a means for determining a Rice parameter for a particular transform coefficient of a TB, the means for determining the Rice parameter comprising: a means for determining a local sum value based on the history value for the particular transform coefficient based on the particular transform coefficient being at a spatial position less than 3 away from the right boundary of the TB or the bottom boundary of the TB; and a means for determining a Rice parameter for the particular transform coefficient based on the local sum value, a means for determining a level of the particular transform coefficient based on the Rice parameter for the particular transform coefficient, and a means for decoding the block based on the level of the particular transform coefficient.

[0012] In another example, this disclosure describes a device for encoding video data, the device including means for initializing coefficient statistics and means for updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the video data, the means for updating the coefficient statistics including means for performing a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, the derivation process being determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context-based procedure for encoding the respective transform coefficients and for encoding the respective transform coefficients as absolute values. and means for setting a coefficient statistic as an average of the coefficient statistic and a temporary value; means for determining a history value based on the coefficient statistic; and means for determining a Rice parameter for a specific transform coefficient of a TB, the means for determining the Rice parameter comprising: means for determining a local sum value based on the history value for the specific transform coefficient based on the specific transform coefficient being a spatial position less than 3 away from a right boundary of the TB or a bottom boundary of the TB; and means for determining the Rice parameter for the specific transform coefficient based on the local sum value; and means for generating a Rice code for the specific transform coefficient based on the Rice parameter for the specific transform coefficient and the level of the specific transform coefficient.

[0013] In another example, the disclosure describes a computer-readable storage medium having stored thereon instructions that, when executed, cause one or more processors to initialize coefficient statistics and update the coefficient statistics based on one or more transform coefficients of a transform block (TB) of a block of video data, wherein the instructions causing the one or more processors to update the coefficient statistics, when executed, cause the one or more processors to perform a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, the derivation process being determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context-based procedure for encoding the respective transform coefficients and encoding the respective transform coefficients as absolute values; and determining a history value based on the coefficient statistics and setting it as an average of a temporary value; determining a Rice parameter for a particular transform coefficient of the TB, wherein the instructions that cause one or more processors to determine the Rice parameter for the particular transform coefficient, when executed, cause the one or more processors to determine a local sum value based on the history value based on the particular transform coefficient being at a spatial position less than three away from the right boundary of the TB or the bottom boundary of the TB, and determine a Rice parameter for the particular transform coefficient based on the local sum value; determining a level of the particular transform coefficient based on the Rice parameter for the particular transform coefficient and one or more syntax elements coded in the bitstream; and decoding the block based on the level of the particular transform coefficient.

[0014] In another example, the present disclosure describes a computer-readable storage medium having stored thereon instructions that, when executed, cause one or more processors to initialize coefficient statistics and update the coefficient statistics based on one or more transform coefficients of a transform block (TB) of video data, wherein the instructions causing the one or more processors to update the coefficient statistics, when executed, cause the one or more processors to perform a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, the derivation process being determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context base for encoding the respective transform coefficients and encoding the respective transform coefficients as absolute values. determining a Rice parameter for a particular transform coefficient of the TB, wherein the instructions causing the one or more processors to determine a Rice parameter for the particular transform coefficient include instructions, when executed, to cause the one or more processors to: determine a local sum value based on the history value based on the particular transform coefficient being at a spatial position less than three away from a right boundary of the TB or a bottom boundary of the TB; and determine a Rice parameter for the particular transform coefficient based on the local sum value; and generate a Rice code for the particular transform coefficient based on the Rice parameter for the particular transform coefficient and the level of the particular transform coefficient.

[0015] The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will become apparent from the description, drawings, and claims. [Brief explanation of the drawings]

[0016] [Figure 1] FIG. 1 is a block diagram illustrating an example video encoding and decoding system that may implement techniques of this disclosure. [Figure 2] FIG. 10 is a conceptual diagram illustrating examples of neighboring coefficients that may be used in calculating a local sum of a current coefficient, in accordance with one or more techniques of this disclosure. [Figure 3] FIG. 1 is a conceptual diagram illustrating an example spatial domain, in accordance with one or more techniques of this disclosure. [Figure 4A] A conceptual diagram illustrating an example quadtree binary tree (QTBT) structure in accordance with one or more techniques of this disclosure. [Figure 4B] A conceptual diagram illustrating a corresponding coding tree unit (CTU) in accordance with one or more techniques of this disclosure. [Figure 5] FIG. 2 is a block diagram illustrating an example video encoder that may implement the techniques of this disclosure. [Figure 6] FIG. 2 is a block diagram illustrating an example video decoder that may implement the techniques of this disclosure. [Figure 7] 10 is a flowchart illustrating an example method for encoding a current block, in accordance with techniques of this disclosure. [Figure 8] 10 is a flowchart illustrating an example method for decoding a current block, in accordance with techniques of this disclosure. [Figure 9] 1 is a flowchart illustrating an example process for encoding video data, in accordance with one or more techniques of this disclosure. [Figure 10] 10 is a flowchart illustrating an example process for decoding video data, in accordance with one or more techniques of this disclosure. DETAILED DESCRIPTION OF THE INVENTION

[0017] In video coding standards such as Generic Video Coding (VVC), a video encoder generates residual samples. The residual samples may indicate differences between predicted samples of a block and original samples of the block. The video encoder may then apply a transform (e.g., a discrete cosine transform) to a block of residual samples (e.g., a transform block (TB)) to generate transform coefficients. Each transform coefficient may be represented in the form of one or more syntax elements. In some examples, the transform coefficients may be coded using a context-based procedure (e.g., a method) in which the level of a transform coefficient may be represented using a sign syntax element, a greater-than-one syntax element, a greater-than-two syntax element, and a remainder syntax element. In some examples, the transform coefficients may be coded using an absolute value syntax element (e.g., dec_abs_level). The remainder or absolute value syntax element typically includes the most bits.

[0018] A video encoder may use Rice coding to encode a remainder syntax element or a magnitude syntax element. Rice coding is a process in which an input value (e.g., the value of the remainder syntax element) is used to generate a Rice code that includes a prefix value and a suffix value. The prefix value is

[0019]

number

[0020] where q is the prefix, x is the input value, and M is 2 k where k is the Rice parameter. The suffix value may be generated as r=x-qM, where r is the suffix.

[0021] Different values ​​of the Rice parameter may be advantageous in different situations. Therefore, VVC provides a process for determining the Rice parameter to use when performing Rice coding for a remainder syntax element or absolute value syntax element. Specifically, a local sum value (e.g., locSumAbs) may be determined by summing the absolute values ​​of five adjacent transform coefficients. The term "locSumAbs" may be used interchangeably with "localSumAbs." The locations of the five adjacent transform coefficients are defined by a template. The local sum value may then be used as an index to look up the Rice parameter in a table. However, some modifications may be required, for example, when the high bit-depth extension of VVC is used, because the local sum value may be larger than the maximum index value defined in the table.

[0022] Another complicating aspect of determining the Rice parameters is that the current transform coefficient may be less than three rows or columns from the right and bottom boundaries of the current TB. Attempting to use neighboring transform coefficients defined by a template may reduce the accuracy of the process for determining the Rice parameters for the current transform coefficient. To address this, VVC defines a history-based procedure for determining the Rice parameters for the current TB. When using a history-based procedure to determine the Rice parameters for the current transform coefficient in the current Rice class of the current TB, the video coder may use a history value (e.g., histCoeff) as the value of the neighboring transform coefficient that is within two positions of the right or bottom boundary of the current TB.

[0023] To use the history-based procedure, a video coder (e.g., a video encoder or a video decoder) may initialize coefficient statistics (e.g., statCoeff) and update coefficients based on one or more transform coefficients of the current TB. The video coder may determine history values ​​based on the coefficient statistics.

[0024] However, as described above, the transform coefficients may be coded using a context-based procedure or using absolute values. Regardless of whether the transform coefficients are coded using a context-based procedure or using absolute values, updating the coefficient statistics in the same manner may degrade performance and may lead to incorrect Rice parameter selection. According to one or more techniques of this disclosure, a video coder (e.g., a video encoder or a video decoder) may update the coefficient statistics based on one or more transform coefficients of a TB of the video data. As part of updating the coefficient statistics, the video coder may perform a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB. The derivation process takes into account (i.e., is determined at least in part based on) which encoding procedure of a plurality of encoding procedures is used to code each respective transform coefficient. The plurality of encoding procedures includes a context-based procedure for coding each transform coefficient and for coding each transform coefficient as an absolute value. The video coder may set the coefficient statistics as an average of the coefficient statistics and the temporary value. Because the derivation process is determined based at least in part on which coding procedure is used to code each transform coefficient, the video coder may have a relatively high probability of determining the optimal Rice parameter for each transform coefficient. Because VVC defines a “hybrid” procedure for coding the normal residual coefficients (RRC), the video coder may have a relatively high probability of determining the optimal Rice parameter for each transform coefficient. In this “hybrid” procedure, depending on the mode, the video coder may CABAC code the RRC in bypass mode (i.e., an exponential-Golomb procedure using the number of bits to represent the coefficient depends on the Rice parameter derived from local template processing), or may CABAC code the RRC with a combination of context coding for the first bits and bypass coding (with Rice derivation) for the remaining bits of the RRC. This “hybrid” procedure is described in more detail below.

[0025] 1 is a block diagram illustrating an example video encoding and decoding system 100 that may implement techniques of this disclosure. The techniques of this disclosure are generally directed to coding (encoding and / or decoding) video data. Generally, video data includes any data for processing video. Thus, video data may include raw uncoded video, coded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling data.

[0026] 1, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116, in this example. Specifically, source device 102 provides the video data to destination device 116 via a computer-readable medium 110. Source device 102 and destination device 116 may comprise any of a wide range of devices, including desktop computers, notebook (i.e., laptop) computers, mobile devices, tablet computers, set-top boxes, telephone handsets such as smartphones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, broadcast receiver devices, etc. In some cases, source device 102 and destination device 116 may be equipped for wireless communication and therefore may be referred to as wireless communication devices.

[0027] In the example of FIG. 1, source device 102 includes a video source 104, memory 106, a video encoder 200, and an output interface 108. Destination device 116 includes an input interface 122, a video decoder 300, memory 120, and a display device 118. According to this disclosure, video encoder 200 of source device 102 and video decoder 300 of destination device 116 may be configured to apply techniques for Rice parameter derivation for regular residual coding (RRC) with high bit-depth coding. Thus, source device 102 represents an example of a video encoding device, and destination device 116 represents an example of a video decoding device. In other examples, the source device and destination device may include other components or arrangements. For example, source device 102 may receive video data from an external video source, such as an external camera. Similarly, destination device 116 may interface with an external display device rather than including an integrated display device.

[0028] System 100 as shown in FIG. 1 is merely an example. In general, any digital video encoding and / or decoding device may implement techniques for Rice parameter derivation for RRC with high bit-depth coding. Source device 102 and destination device 116 are merely examples of coding devices, such that source device 102 generates coded video data for transmission to destination device 116. This disclosure refers to devices that perform coding (encoding and / or decoding) of data as “coding” devices. Accordingly, video encoder 200 and video decoder 300 represent examples of coding devices, specifically, video encoders and video decoders, respectively. In some examples, source device 102 and destination device 116 may operate substantially symmetrically, such that each of source device 102 and destination device 116 includes video encoding and decoding components. Thus, system 100 may support unidirectional or bidirectional video transmission between source device 102 and destination device 116, e.g., for video streaming, video playback, video broadcasting, or video telephony.

[0029] Generally, video source 104 represents a source of video data (i.e., raw, unencoded video data) and provides a sequential series of pictures (also called “frames”) of the video data to video encoder 200, which encodes the data for the pictures. Video source 104 of source device 102 may include a video capture device, such as a video camera, a video archive containing previously captured raw video, and / or a video feed interface for receiving video from a video content provider. As a further alternative, video source 104 may generate computer-graphics-based data as source video, or a combination of live, archived, and computer-generated video. In each case, video encoder 200 encodes the captured, pre-captured, or computer-generated video data. Video encoder 200 may reorder the pictures from the order in which they were received (sometimes referred to as “display order”) into a coding order for coding. Video encoder 200 may generate a bitstream including the encoded video data. Source device 102 may then output the encoded video data via output interface 108 onto computer-readable medium 110 for receipt and / or retrieval by input interface 122 of destination device 116, for example.

[0030] Memory 106 of source device 102 and memory 120 of destination device 116 represent general-purpose memory. In some examples, memory 106, 120 may store raw video data, e.g., raw video from video source 104 and raw decoded video data from video decoder 300. Additionally or alternatively, memory 106, 120 may store software instructions executable by video encoder 200 and video decoder 300, respectively, for example. While memory 106 and memory 120 are shown separate from video encoder 200 and video decoder 300 in this example, it should be understood that video encoder 200 and video decoder 300 may also include internal memory for functionally similar or equivalent purposes. Furthermore, memory 106, 120 may store encoded video data, e.g., output from video encoder 200 and input to video decoder 300. In some examples, a portion of the memory 106, 120 may be allocated as one or more video buffers, for example, for storing raw decoded and / or encoded video data.

[0031] The computer-readable medium 110 may represent any type of medium or device capable of transporting encoded video data from the source device 102 to the destination device 116. In one example, the computer-readable medium 110 represents a communication medium that enables the source device 102 to transmit encoded video data directly to the destination device 116 in real time, for example, via a radio frequency network or a computer-based network. The output interface 108 may modulate a transmission signal containing the encoded video data, and the input interface 122 may demodulate a received transmission signal, in accordance with a communication standard such as a wireless communication protocol. The communication medium may comprise any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network, such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include routers, switches, base stations, or any other equipment that may be useful for facilitating communication from the source device 102 to the destination device 116.

[0032] In some examples, source device 102 may output encoded data from output interface 108 to storage device 112. Similarly, destination device 116 may access encoded data from storage device 112 via input interface 122. Storage device 112 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a DVD, a CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.

[0033] In some examples, source device 102 may output encoded video data to file server 114 or another intermediate storage device, which may store the encoded video data generated by source device 102. Destination device 116 may access the stored video data from file server 114 via streaming or download.

[0034] File server 114 may be any type of server device capable of storing encoded video data and transmitting the encoded video data to destination device 116. File server 114 may represent a web server (e.g., for a website), a server configured to provide file transfer protocol services (e.g., File Transfer Protocol (FTP) or File Delivery over Unidirectional Transport (FLUTE) protocol), a content delivery network (CDN) device, a Hypertext Transfer Protocol (HTTP) server, a Multimedia Broadcast Multicast Service (MBMS) or enhanced MBMS (eMBMS) server, and / or a network-attached storage (NAS) device. File server 114 may additionally or alternatively implement one or more HTTP streaming protocols, such as Dynamic Adaptive Streaming over HTTP (DASH), HTTP Live Streaming (HLS), Real Time Streaming Protocol (RTSP), HTTP Dynamic Streaming, etc.

[0035] Destination device 116 may access the encoded video data from file server 114 through any standard data connection, including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a digital subscriber line (DSL), a cable modem, etc.), or a combination of both suitable for accessing encoded video data stored on file server 114. Input interface 122 may be configured to operate according to any one or more of the various protocols described above for retrieving or receiving media data from file server 114 or other such protocols for retrieving media data.

[0036] Output interface 108 and input interface 122 may represent a wireless transmitter / receiver, a modem, a wired networking component (e.g., an Ethernet card), a wireless communication component operating according to any of the various IEEE 802.11 standards, or other physical components. In examples in which output interface 108 and input interface 122 comprise wireless components, output interface 108 and input interface 122 may be configured to transfer data, such as encoded video data, according to a cellular communication standard, such as 4G, 4G-LTE (Long Term Evolution), LTE-Advanced, 5G, etc. In some examples in which output interface 108 comprises a wireless transmitter, output interface 108 and input interface 122 may be configured to transfer data, such as encoded video data, according to other wireless standards, such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee™), the Bluetooth™ standard, etc. In some examples, source device 102 and / or destination device 116 may include respective system-on-chip (SoC) devices. For example, the source device 102 may include an SoC device for implementing functionality attributed to the video encoder 200 and / or the output interface 108, and the destination device 116 may include an SoC device for implementing functionality attributed to the video decoder 300 and / or the input interface 122.

[0037] The techniques of this disclosure may be applied to video coding supporting any of a variety of multimedia applications, such as over-the-air television broadcast, cable television transmission, satellite television transmission, Internet streaming video transmission such as Dynamic Adaptive Streaming over HTTP (DASH), digital video encoded on a data storage medium, decoding of digital video stored on a data storage medium, or other applications.

[0038] The input interface 122 of the destination device 116 receives an encoded video bitstream from the computer-readable medium 110 (e.g., a communications medium, a storage device 112, a file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200 and also used by the video decoder 300, such as syntax elements having values ​​that describe the characteristics and / or processing of video blocks or other coded units (e.g., slices, pictures, groups of pictures, sequences, etc.). The display device 118 displays decoded pictures of the decoded video data to a user. The display device 118 may represent any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or another type of display device.

[0039] 1, in some examples, video encoder 200 and video decoder 300 may each be integrated with an audio encoder and / or decoder and may include an appropriate MUX-DEMUX unit or other hardware and / or software to process multiplexed streams containing both audio and video in a common data stream. Where applicable, the MUX-DEMUX unit may conform to the ITU H.223 multiplexer protocol or other protocols such as the User Datagram Protocol (UDP).

[0040] The video encoder 200 and the video decoder 300 may each be implemented as any of a variety of suitable encoder and / or decoder circuit configurations, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When the techniques are implemented partially in software, a device may store instructions for the software on a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to implement the techniques of this disclosure. Each of the video encoder 200 and the video decoder 300 may be included in one or more encoders or decoders, any of which may be integrated as part of a combined encoder / decoder (CODEC) in the respective device. A device including the video encoder 200 and / or the video decoder 300 may comprise an integrated circuit, a microprocessor, and / or a wireless communication device such as a cellular telephone.

[0041] Video encoder 200 and video decoder 300 may operate according to a video coding standard such as ITU-T H.265, also known as High Efficiency Video Coding (HEVC), or extensions thereof, such as multiview and / or scalable video coding extensions. Alternatively, video encoder 200 and video decoder 300 may operate according to other proprietary or industry standards, such as ITU-T H.266, also known as Generic Video Coding (VVC). The goal of VVC is to provide significant improvements in compression performance over the existing HEVC standard and to support the deployment of higher quality video services and emerging applications such as 360° immersive multimedia and high dynamic range (HDR) video. A draft of the VVC standard is set forth in Bross et al., "Versatile Video Coding (Draft 10)," ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 Joint Video Experts Team (JVET), 18th Meeting: Teleconference, June 22-July 1, 2020, JVET-S2001-vH (hereinafter "VVC Draft 10"). However, the techniques of this disclosure are not limited to any particular coding standard.

[0042] In general, the video encoder 200 and the video decoder 300 may perform block-based coding of pictures. The term “block” generally refers to a structure containing data to be processed (e.g., encoded, decoded, or otherwise used in an encoding and / or decoding process). For example, a block may include a two-dimensional matrix of luma and / or chroma data samples. In general, the video encoder 200 and the video decoder 300 may code video data represented in YUV (e.g., Y, Cb, Cr) format. That is, rather than coding red, green, and blue (RGB) data for picture samples, the video encoder 200 and the video decoder 300 may code luma and chroma components, which may include both red and blue chroma components. In some examples, the video encoder 200 converts received RGB-formatted data to a YUV representation prior to encoding, and the video decoder 300 converts the YUV representation to an RGB format. Alternatively, pre-processing and post-processing units (not shown) may perform these conversions.

[0043] This disclosure may generally refer to coding (e.g., encoding and decoding) a picture to include the process of encoding or decoding data for the picture. Similarly, this disclosure may refer to coding of a block of a picture, e.g., predictive and / or residual coding, to include the process of encoding or decoding data for the block. A coded video bitstream generally includes a series of values ​​for syntax elements that represent coding decisions (e.g., coding modes) and the partitioning of a picture into blocks. Thus, references to coding a picture or a block should generally be understood as coding values ​​for the syntax elements that form the picture or block.

[0044] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video coder (such as video encoder 200) partitions coding tree units (CTUs) into CUs according to a quadtree structure. That is, the video coder partitions CTUs and CUs into four equal, non-overlapping squares, and each node in the quadtree has either zero or four child nodes. A node with no child nodes may be called a "leaf node," and a CU of such a leaf node may include one or more PUs and / or one or more TUs. The video coder may further partition PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents the partitioning of TUs. In HEVC, a PU represents inter-predicted data, and a TU represents residual data. An intra-predicted CU includes intra-prediction information, such as an intra-mode indication.

[0045] As another example, video encoder 200 and video decoder 300 may be configured to operate according to VVC. According to VVC, a video coder (such as video encoder 200) partitions a picture into multiple coding tree units (CTUs). Video encoder 200 may partition the CTUs according to a tree structure, such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure. The QTBT structure eliminates the concept of multiple partition types, such as the distinction between CUs, PUs, and TUs in HEVC. The QTBT structure includes two levels: a first level partitioned according to quadtree partitioning and a second level partitioned according to binary tree partitioning. The root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary tree correspond to coding units (CUs).

[0046] In the MTT partitioning structure, blocks may be partitioned using quad tree (QT) partitioning, binary tree (BT) partitioning, and one or more types of triple tree (TT) (also called ternary tree (TT)) partitioning. Triple tree or ternary tree partitioning is a partition in which a block is divided into three sub-blocks. In some examples, triple tree or ternary tree partitioning divides a block into three sub-blocks without splitting the original block through the center. The partition types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.

[0047] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luma and chroma components, and in other examples, the video encoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luma component and another QTBT / MTT structure for both chroma components (or two QTBT / MTT structures for each chroma component).

[0048] Video encoder 200 and video decoder 300 may be configured to use HEVC-specific quadtree partitioning, QTBT partitioning, MTT partitioning, or other partition structures. For illustrative purposes, the description of the techniques of this disclosure is presented with respect to QTBT partitioning. However, it should be understood that the techniques of this disclosure may also be applied to video coders configured to use quadtree partitioning or other types of partitioning.

[0049] In some examples, a CTU includes a coding tree block (CTB) of luma samples, two corresponding CTBs of chroma samples for a picture with three sample arrays, or a CTB of samples for a picture coded using three separate color planes and syntax structures used to code a monochrome picture or samples. The CTB can be an N×N block of samples for some value of N such that the division of the components into the CTB is partitioned. A component is a single sample from one array or one of three arrays (luma and two chroma) that create a picture in 4:2:0, 4:2:2, or 4:4:4 color format, or a single sample from an array or array that creates a picture in monochrome format. In some examples, a coding block is an M×N block of samples for some value of M and N such that the division of the CTB into coding blocks is partitioned.

[0050] Blocks (e.g., CTUs or CUs) may be grouped in various ways in a picture. As an example, a brick may refer to a rectangular region of a CTU row within a particular tile in a picture. A tile may be a rectangular region of a CTU within a particular tile column and a particular tile row in a picture. A tile column refers to a rectangular region of a CTU with a height equal to the height of the picture and a width specified by a syntax element (e.g., in a picture parameter set, etc.). A tile row refers to a rectangular region of a CTU with a height specified by a syntax element (e.g., in a picture parameter set, etc.) and a width equal to the width of the picture.

[0051] In some examples, a tile may be partitioned into multiple bricks, each of which may include one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick. However, a brick that is a true subset of a tile may not be referred to as a tile.

[0052] Bricks in a picture may also be arranged in slices. A slice may be an integer number of bricks of a picture that may be contained exclusively in a single Network Abstraction Layer (NAL) unit. In some examples, a slice may contain either a certain number of complete tiles or only a continuous sequence of complete bricks of one tile.

[0053] This disclosure may use "N x N" and "N by N" interchangeably to refer to the sample dimensions of a block (such as a CU or other video block) in terms of the vertical and horizontal dimensions, e.g., 16 x 16 samples or 16 by 16 samples. Generally, a 16 x 16 CU has 16 samples in the vertical direction (y = 16) and 16 samples in the horizontal direction (x = 16). Similarly, an N x N CU generally has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. Samples in a CU may be arranged in rows and columns. Furthermore, a CU does not necessarily have to have the same number of samples horizontally as vertically. For example, a CU may comprise N x M samples, where M is not necessarily equal to N.

[0054] Video encoder 200 encodes video data for a CU that represents prediction and / or residual information, as well as other information. The prediction information indicates how the CU will be predicted to form a predictive block for the CU. The residual information generally represents sample-by-sample differences between the samples of the CU and the samples of the predictive block prior to encoding.

[0055] To predict a CU, the video encoder 200 may generally form a predictive block for the CU through inter prediction or intra prediction. Inter prediction generally refers to predicting a CU from data of a previously coded picture, while intra prediction generally refers to predicting a CU from previously coded data of the same picture. To perform inter prediction, the video encoder 200 may generate a predictive block using one or more motion vectors. The video encoder 200 may generally perform motion search to identify a reference block that closely matches the CU, for example, with respect to the difference between the CU and the reference block. The video encoder 200 may calculate a difference metric using a sum of absolute differences (SAD), a sum of squared differences (SSD), a mean absolute difference (MAD), a mean squared difference (MSD), or other such difference calculation to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 may predict the current CU using unidirectional prediction or bidirectional prediction.

[0056] Some examples of VVC also provide an affine motion compensation mode, which may be considered an inter-prediction mode. In the affine motion compensation mode, the video encoder 200 may determine two or more motion vectors that represent non-translational motion, such as zooming in or out, rotation, perspective motion, or other irregular motion types.

[0057] To perform intra prediction, the video encoder 200 may select an intra prediction mode to generate a predictive block. Some examples of VVC provide 67 intra prediction modes, including various directional modes, as well as a planar mode and a DC mode. Generally, the video encoder 200 selects an intra prediction mode that describes neighboring samples relative to a current block (e.g., a block of a CU) from which to predict samples of the current block. Such samples may generally be above, above-left, or to the left of the current block in the same picture as the current block, assuming that the video encoder 200 codes CTUs and CUs in raster scan order (left to right, top to bottom).

[0058] The video encoder 200 encodes data representing a prediction mode for the current block. For example, in the case of an inter prediction mode, the video encoder 200 may encode data representing which of various available inter prediction modes is used, as well as motion information for the corresponding mode. In the case of unidirectional or bidirectional inter prediction, for example, the video encoder 200 may encode motion vectors using advanced motion vector prediction (AMVP) or merge mode. The video encoder 200 may use a similar mode to encode motion vectors for an affine motion compensation mode.

[0059] Following prediction, such as intra-prediction or inter-prediction, of a block, the video encoder 200 may calculate residual data for the block. The residual data, such as a residual block, represents sample-by-sample differences between the block and a predictive block for that block formed using a corresponding prediction mode. The video encoder 200 may apply one or more transforms to a transform block (TB) within the residual block to generate transform data in the transform domain rather than the sample domain. In some examples, the TB may be the same size as the residual block. The terms TB and TU may be used interchangeably in this document. The video encoder 200 may apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. In addition, the video encoder 200 may apply a secondary transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, or a Karhunen-Loeve transform (KLT), following the initial transform. The video encoder 200 generates transform coefficients following application of the one or more transforms.

[0060] As described above, following any transformation to generate transform coefficients, the video encoder 200 may perform quantization of the transform coefficients. Quantization generally refers to a process in which transform coefficients are quantized to possibly reduce the amount of data used to represent the transform coefficients, achieving further compression. By performing the quantization process, the video encoder 200 may reduce the bit depth associated with some or all of the transform coefficients. For example, the video encoder 200 may truncate an n-bit value to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, the video encoder 200 may perform a bitwise right shift of the value to be quantized.

[0061] Following quantization, the video encoder 200 may scan the transform coefficients and generate a one-dimensional vector from the two-dimensional matrix including the quantized transform coefficients. The scan may be designed to place transform coefficients with higher energy (and therefore lower frequency) at the front of the vector and transform coefficients with lower energy (and therefore higher frequency) at the back of the vector. In some examples, the video encoder 200 may use a predefined scan order for scanning the quantized transform coefficients to generate a serialized vector and then entropy encode the quantized transform coefficients of the vector. In other examples, the video encoder 200 may perform adaptive scanning. After scanning the quantized transform coefficients to form the one-dimensional vector, the video encoder 200 may entropy encode the one-dimensional vector, for example, according to context-adaptive binary arithmetic coding (CABAC). The video encoder 200 may also entropy encode values ​​for syntax elements describing metadata associated with the encoded video data for use by the video decoder 300 in decoding the video data.

[0062] To implement CABAC, video encoder 200 may assign a context within a context model to a symbol to be transmitted. The context may relate, for example, to whether neighboring values ​​of the symbol are zeroed. A probability decision may be based on the context assigned to the symbol.

[0063] Video encoder 200 may further generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, for example, in a picture header, a block header, a slice header, or other syntax data, such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS), to video decoder 300. Video decoder 300 may similarly decode such syntax data to determine how to decode corresponding video data.

[0064] In this manner, video encoder 200 may generate a bitstream including syntax elements that describe coded video data, e.g., partitions of a picture into blocks (e.g., CUs) and prediction and / or residual information for the blocks. Finally, video decoder 300 may receive the bitstream and decode the coded video data.

[0065] In general, video decoder 300 performs a process that is the inverse of that performed by video encoder 200 to decode encoded video data of a bitstream. For example, video decoder 300 may decode values ​​for syntax elements of a bitstream using CABAC in a manner that is the inverse of, but substantially similar to, the CABAC encoding process of video encoder 200. The syntax elements may define partition information for partitioning a picture into CTUs and the partition of each CTU according to a corresponding partition structure, such as a QTBT structure, to define the CUs of the CTU. The syntax elements may further define prediction and residual information for blocks of video data (e.g., CUs).

[0066] The residual information may be represented, for example, by quantized transform coefficients. The video decoder 300 may dequantize and inverse transform the quantized transform coefficients of the block to reconstruct a residual block for the block. The video decoder 300 uses the signaled prediction mode (intra-prediction or inter-prediction) and associated prediction information (e.g., motion information for inter-prediction) to form a predictive block for the block. The video decoder 300 may then combine the predictive block and the residual block (sample by sample) to reconstruct the original block. The video decoder 300 may perform additional processing, such as performing a deblocking process to reduce visual artifacts along block boundaries.

[0067] The video encoder 200 may generate Rice codes for the transform coefficients. The Rice codes may be coded versions of syntax elements such as remainder and absolute value syntax elements for the transform coefficients. The video encoder 200 may entropy code (e.g., CABAC code) the Rice codes for the transform coefficients and include the resulting CABAC coded data in the bitstream. The video decoder 300 may apply entropy decoding (e.g., CABAC decoding) to a bit sequence in the bitstream to obtain the Rice codes. The video decoder 300 may decode the Rice codes to obtain decoded values ​​that the video decoder 300 can use to restore the levels of the transform coefficients. The video encoder 200 and the video decoder 300 may determine Rice parameters to use when generating and decoding the Rice codes.

[0068] In VVC Draft 10, Rice parameters for normal residual coding (RRC) are derived using a look-up table, taking into account the transform coefficient values ​​(i.e., levels) of neighboring transform coefficients in a template. A template of neighboring coefficients is presented in FIG. 2. FIG. 2 is a conceptual diagram illustrating examples of neighboring coefficients that may be used in calculating a local sum value (e.g., localSumAbs) of a current coefficient. Specifically, in the example of FIG. 2, video encoder 200 or video decoder 300 determines a Rice parameter for current transform coefficient 250. Video encoder 200 and video decoder 300 may use the levels of neighboring transform coefficients 252A-252E (collectively, "neighboring transform coefficients 252") in calculating the local sum value.

[0069] In VVC Draft 10, a video coder (e.g., video encoder 200 or video decoder 300) may first calculate a local sum value (e.g., locSumAbs), which is the sum of the absolute values ​​of the five available neighboring transform coefficients (e.g., neighboring transform coefficients 252) in the template. The video coder may then normalize locSumAbs (e.g., using subtraction and clipping operations) as follows: locSumAbs=Clip3(0,31,locSumAbs-baseLevel*5)

[0070] A video coder may use the locSumAbs to derive the Rice parameters with a lookup table such as Table 1 below. As shown in Table 1, the Rice parameter range is constrained to 0 to 3 in the VVC Draft 10 design.

[0071] [Table 1]

[0072] The initial proposals attempted to address the limitations of VVC's Rice parameter derivation with respect to various input bit depths of video data, and thus may improve the compression efficiency of the coding design. In other words, the Rice parameter derivation process described in VVC Draft 10 may have limitations when applied to video data of higher bit depths. These limitations may lead to a loss of compression efficiency.

[0073] For example, a video coder may scale or normalize localSumAbs to handle bit-depth increases or the dynamic range of the transform coefficients before using them to derive Rice parameters; see, e.g., equation 1517 of VVC Draft 10. The amount of the scaling factor may depend on the input bit depth, a predefined bit depth for the operation (e.g., 10), the local activity of the transform coefficients, the block size, or syntax elements signaled in the bitstream. The video coder may then clip the localSumAbs to a certain range, e.g., using the localSumAbs clipping process in VVC Draft 10. The video coder may use the normalized and clipped localSumAbs to derive Rice parameters using a predefined lookup table, such as the current lookup table in VVC Draft 10 (i.e., Table 1 presented above). Once the localSumAbs are normalized in the first step of the proposed design, the video coder may derive the Rice parameters from a predefined table and may modify the Rice parameters by adding an offset to extend the dynamic range of the Rice parameters.

[0074] The following text describes the process for determining the Rice parameters for the remainder syntax element (abs_remainder) or absolute value syntax element (dec_abs_level) of a transform coefficient. 9.3.3.2 Rice Parameter Derivation Process for abs_remainder[] and dec_abs_level[] The inputs to this process are the base level baseLevel, the color component index cIdx, the luma location (x0,y0) specifying the top-left sample of the current transform block relative to the top-left sample of the current picture, the current coefficient scan location (xC,yC), the binary logarithm of the transform block width log2TbWidth, and the binary logarithm of the transform block height log2TbHeight. The output of this process is the Rice parameter cRiceParam. Given the component index cIdx and the array AbsLevel[x][y] for a transform block with top-left luma location (x0, y0), the variable locSumAbs is derived as specified by the following pseudocode process: Coding Listing 1 locSumAbs=0 if(xC<(1< <log2TbWidth)-1){ locSumAbs+=AbsLevel[xC+1][yC] if(xC<(1< <log2TbWidth)-2) locSumAbs+=AbsLevel[xC+2][yC] if(yC<(1< <log2TbHeight)-1) locSumAbs+=AbsLevel[xC+1][yC+1] (1517) } if(yC<(1< <log2TbHeight)-1){ locSumAbs+=AbsLevel[xC][yC+1] if(yC<(1< <log2TbHeight)-2) locSumAbs+=AbsLevel[xC][yC+2] } shift=(Bitdepth-b)>0 ? Floor(Log2(a*(Bitdepth-b))):0 localSumAbs=(shift==0) ? localSumAbs:(localSumAbs+(1<<(shift-1)))>>shift locSumAbs=Clip3(0,31,locSumAbs-baseLevel*5) Given the variable locSumAbs, the Rice parameter cRiceParam is derived as specified in table 128. The cRiceParam is then refined as follows: cRiceParam=cRiceParam+c

[0075] In some examples, the variables a, b, and c may be defined as follows: In one example, b specifies the operation bit depth and may be set equal to 10, a may be set equal to an integer value, e.g., 4, or other value that is a power of 2, and c may be set equal to or derived from the calculated shift value.

[0076] In another example to address VVC's Rice parameter derivation for various input bit depths of video data, the video coder may scale / normalize localSumAbs when they are greater than or equal to a threshold. In this case, the relevant Rice parameter derivation in VVC Draft 10 may therefore be modified as follows:<!----> ...<!--!--> tags indicate changes). 9.3.3.2 Rice Parameter Derivation Process for abs_remainder[] and dec_abs_level[] The inputs to this process are the base level baseLevel, the color component index cIdx, the luma location (x0,y0) specifying the top-left sample of the current transform block relative to the top-left sample of the current picture, the current coefficient scan location (xC,yC), the binary logarithm of the transform block width log2TbWidth, and the binary logarithm of the transform block height log2TbHeight. The output of this process is the Rice parameter cRiceParam. Given the component index cIdx and the array AbsLevel[x][y] for a transform block with top-left luma location (x0, y0), the variable locSumAbs is derived as specified by the following pseudocode process: Code Listing 2 locSumAbs=0 if(xC<(1< <log2TbWidth)-1){ locSumAbs+=AbsLevel[xC+1][yC] if(xC<(1< <log2TbWidth)-2) locSumAbs+=AbsLevel[xC+2][yC] if(yC<(1< <log2TbHeight)-1) locSumAbs+=AbsLevel[xC+1][yC+1] (1517) } if(yC<(1< <log2TbHeight)-1){ locSumAbs+=AbsLevel[xC][yC+1] if(yC<(1< <log2TbHeight)-2) locSumAbs+=AbsLevel[xC][yC+2] } <!----> shift=(Bitdepth-b)>0)&&(localSumAbs-baseLevel*5)>=T? Floor(Log2(a*(Bitdepth-b))):0 localSumAbs=(shift==0) ? localSumAbs:(localSumAbs+(1<<(shift-1)))>>shift<!--!--> locSumAbs=Clip3(0,31,locSumAbs-baseLevel*5) Given the variable locSumAbs, the Rice parameter cRiceParam is derived as specified in table 128. The cRiceParam is then refined as follows: <!----> cRiceParam=cRiceParam+c<!--!-->

[0077] In the above example, T is a predefined threshold. In one example, T may be set equal to 32. In some examples, the values ​​of variables a, b, and c are signaled through (i.e., coded in) the bitstream, or are set depending on or derived from bit depth, local statistics (e.g., min / max or average values ​​of transform coefficient values ​​in the current block), decoded transform or block size, or syntax elements signaled in the bitstream.

[0078] Furthermore, the spatial locations of decoded transform coefficients within a TU (or TB) may be classified by the expected accuracy of the template-based derivation procedure. An exemplary classification is shown in FIG. 3. FIG. 3 is a conceptual diagram illustrating an exemplary spatial domain of a TB 350. In the example of FIG. 3, TB 350 includes a current transform coefficient 352 and neighboring transform coefficients 354A-354E (collectively, "neighboring transform coefficients 354"). Furthermore, in the example of FIG. 3, transform coefficients (class C1) with spatial locations surrounded by bold lines are expected to have an accurate Rice derivation from the template-based procedure, as defined, for example, in VVC section 9.3.3.2, and possible modifications of the template-based procedure described above in this document. In other words, the Rice parameters (riceParam) for transform coefficients in class C1 may be written as follows: riceParam=template_based_method()

[0079] The transform coefficients for class (C4) with spatial locations enclosed in bold are expected not to have an accurate Rice derivation from the template-based procedure. Therefore, a history-based derivation procedure may be used instead. In other words, the Rice parameters (riceParam) for the transform coefficients in class C4 may be written as follows: riceParam=history_based_method()

[0080] Coefficients with spatial locations enclosed in bold lines for class C2 or class C3 are expected to have less accurate Rice derivations from the template-based procedure, and accuracy may be improved by taking into account Rice estimates, if they are derived from the history of decoded coefficients. Thus, Rice parameters for transform coefficients in class C2 or class C3 may be based on Rice parameters derived by the template-based procedure and / or the history-based procedure. In other words, the Rice parameters (riceParam) for transform coefficients in class C2 or class C3 may be written as follows: riceParam=function(template_based_method(),history_based_method())

[0081] In some examples, the classification of transform coefficients can be based on running the scan order in the reverse direction, e.g., assigning the first N decoded transform coefficients to class C4, with the remainder of the transform coefficients classified as class C1. In some examples, a subset of defined classes can be used, e.g., only decoded transform coefficients of class C4 use Rice information from history, and support for class C1 can be extended to incorporate the area of ​​classes C2 / C3 or the entire TU or TB. Thus, no history information is used in the Rice derivation.

[0082] In some previous proposals, the Rice parameters of the transform coefficients are determined as a function that aggregates the Rice information from the template-based procedure and the history-based procedure using a weighted average. An example is shown below. ricePar=(w2*riceParTemplate+w1*riceParHistory) / (w1+w2) The weights (w1 and w2) of the weighted average may depend on the spatial location of the transform coefficients within the TB.

[0083] In some examples, functions that aggregate local estimates and history information can be integrated into template-based derivations, and by doing so, in cases where local information is not available, Rice parameters derived from history information can be taken into account during template-based Rice derivations. An example is shown below, but the proposed changes to existing template-based procedures are <!---->...<!--!-->tagged with the <!--!--> tag. The term histCoef defines, for example, an estimated history conversion coefficient that has been accumulated in the past or a historical Rice parameter, for example, expressed as histCoef = 1 << histRiceParam. The terms M and N are estimated weight values, for example, integer values can be equal to 2 and 3 for N and M, respectively. Code Listing 3 unsigned templateAbsSum(int scanPos,const TCoeff* coeff,int baseLevel) { const uint32_t posY=m_scan[scanPos].y; const uint32_t posX=m_scan[scanPos].x; const TCoeff* pData=coeff+posX+posY*m_width; TCoeff sum=0; if(posX<m_width-1) { sum+=abs(pData[1]); if(posX<m_width-2) { sum+=abs(pData[2]); } <!---->else sum+=histCoef;<!--!--> if(posY<m_height-1) { sum+=abs(pData[m_width+1]); } <!---->else sum+=histCoef; <!--!--> } <!---->else sum+=N*histCoef; <!--!--> if(posY<m_height-1) { sum+=abs(pData[m_width]); if(posY<m_height-2) { sum+=abs(pData[m_width<<1]); } <!---->else sum+=histCoef; <!--!--> } <!---->else sum+=M*histCoef; <!--!--> return unsigned(std::max <tcoeff>(std::min <tcoeff>(sum-5*baseLevel,31),0)); }

[0084] In some examples, the history-based procedure for Rice derivation can be implemented using a counter. The counter can be a moving average value stored as the decoded transform coefficients, Rice parameters, or the length of the binary codeword representing the decoded transform coefficients. An example is shown below. For each class (e.g., classes C1, C2, C3, C4), where the class is identified by the index riceClass, a separate history is calculated and stored in a counter StatCoeff[riceClass]. During TB decoding, each decoded transform coefficient defined for history updating can be represented by a binary code length estimate, which indicates the optimal Rice parameter. In some examples, the video coder may update the history with the code length representation (number of bits) of the Exponential-Golomb coded portion of the first transform coefficient. This may reduce the latency for complete transform coefficient reconstruction. In some examples, the video coder may use all transform coefficients to update the history. The number of transform coefficients defined for history update is denoted as NUM_HISTORY_UPDATE. codeLength=floorLog2((uint32_t)decodedCoef); The number of decoded transform coefficients (e.g., NUM_HISTORY_UPDATE) can be used to update the history observations, and the sum of the code length (e.g., collectStatCoeff[riceClass]) and the number of coefficients used in the update (e.g., counterCollectStatCoeff) is stored. collectStatCoeff[riceClass]+=codeLength. counterCollectStatCoeff[riceClass]++; After the video coder analyzes all samples defined for the history update of the current class, the video coder may update the global history counter StatCoeff using a linear model, for example, a weighted moving average, as follows: int numCollected=NUM_HISTORY_UPDATE-g_counterCollectStatCoeff[i]; int averageRiceInTU=(int)(g_tempStatCoeff[i]+(numCollected>>1)) / numCollected); StatCoeff[i][compID]=(w3*StatCoeff[i][compID]+w4*averageRiceInTU) / (w3+w4); In some examples, parameters of the linear model may be selected as power-of-two derivatives to enable low-complexity multiplication or division operations. In some examples, a history counter (e.g., StatCoeff) may be maintained throughout a decoded picture, e.g., a full picture, a slice, a tile, a group of CTUs, or a certain region of a single CTU, with a normative reset at the beginning of a group of CTUs. In this disclosure, the history counter may be referred to as a coefficient statistic (e.g., StatCoeff).

[0085] In some examples, the history counters may be initialized with default values ​​that may be tabulated and provided to the video decoder as side information, signaled through the coded bitstream, e.g., at the slice level, through a special update signaling mechanism, or derived at the decoder side from bit depth, quantization parameters, or other syntax elements.

[0086] In some examples, one or more aspects of the history update process (e.g., update speed or moving average parameters) may be made dependent on block size, block dimension ratio, coding mode (e.g., use of intra or inter prediction), slice type, or signaled syntax elements.

[0087] This disclosure introduces several techniques that may improve the accuracy of the Rice parameter derivation. For example, this disclosure proposes improving the accuracy of the Rice parameter derivation by taking into account historical values ​​of the optimal Rice parameters determined from earlier decoded transform coefficients outside the current TB.

[0088] In some examples, a video coder (e.g., video encoder 200 or video decoder 300) may store a coefficient statistic (e.g., StatCoeff) as a value derived from a Rice parameter (i.e., a Rice parameter derivation). In examples in which a video coder stores a coefficient statistic (i.e., a history counter) as a Rice parameter derivation, the video coder may derive a history value (e.g., histCoef) as follows: historyRiceValue=StatCoeff[i][compID]; histCoef=1< <historyRiceValue; The video coder may use the historical value (histCoeff) to determine the local sum value (eg, localSumAbs) using, for example, the process of Coding Listing 3.

[0089] In some examples, a video coder (e.g., video encoder 200 or video decoder 300) may store the coefficient statistics as values ​​derived from the transform coefficients (i.e., transform coefficient derivatives). In examples in which the video coder stores the coefficient statistics as transform coefficient derivatives, the video coder may derive the history value histCoef as follows: historyValue=StatCoeff[i][compID]; histCoef=historyValue; The video coder may use the historical value (histCoeff) to determine the local sum value (eg, localSumAbs or locSumAbs) using, for example, the process of Coding Listing 3.

[0090] In some examples, the histCoef derivation process may be modified as a function of the spatial location of the coefficient within the TB, for example, as a function of the subgroup identifier to which the histCoef belongs. Examples of modifications may include adding an offset to the histRice value or applying an offset or scaler to the histCoef value. In some examples, the histCoef value is made dependent on the type of transform coefficient being encoded / decoded. For example, if some of the transform coefficients are coded as context coding, only the remaining part is coded in the Rice method. In other words, the video coder may implement a “hybrid” procedure for coding regular residual coefficients (RRC).

[0091] In some examples, for the coded portion of the transform coefficients in the context coding and the remaining portion of the transform coefficients in the Rice method, a video coder (e.g., video encoder 200 or video decoder 300) may set a variable, i.e., remBinsPass1, to the maximum number of context coding bins, and the video coder may reduce remBinsPass1 by 1 when a context coding bin is signaled. While remBinsPass1 is 4 or greater, a first coding pass including a coefficient importance flag (e.g., sig_coeff_flag), an absolute level flag (e.g., abs_level_gt1_flag) greater than 1, a level parity syntax element (e.g., par_level_flag) indicating the parity of the transform coefficient level, and an absolute level flag (e.g., abs_level_gt3_flag) greater than 3 is coded by using the context coding bins. If the number of context coding bins is less than or equal to a threshold value in the first pass coding (e.g., McCB or ReMCCB), the remaining part of the level information, which is indicated to be further coded in the first pass, is coded with an absolute remainder syntax element (e.g., abs_remainder) using Golomb-Rice coding and bypass coding bins. The threshold value may be defined in VVC as ((1<<(log2TbWidth+log2TbHeight))*7)>>2, where log2TbWidth is the binary logarithm of the width of the transform block and log2TbHeight is the binary logarithm of the height of the transform block.

[0092] If remBinsPass1 becomes less than 4 during coding of the first pass, the remaining transform coefficients indicated to be further coded in the first pass are coded with an absolute remainder syntax element (e.g., abs_remainder), and the transform coefficients not coded in the first pass are directly coded with an intermediate value syntax element (e.g., dec_abs_level) in the second pass by using Golomb-Rice codes and bypass coding bins. The intermediate value syntax element (e.g., dec_abs_level) is an intermediate value coded with Golomb-Rice codes at the scanned position. The video coder resets the value of remBinsPass1 for every TB. The transition from using context coding bins for coefficient importance flags (e.g., sig_coeff_flag), level flags greater than 1 (e.g., abs_level_gt1_flag), level parity flags (e.g., par_level_flag), and absolute level flags greater than 3 (e.g., abs_level_gt3_flag) to using bypass coding bins for the rest of the transform coefficients occurs at most once per TB. For a transform coefficient sub-block, if remBinsPass1 is less than 4, the entire transform coefficient sub-block is coded by using bypass coding bins. After all the above-mentioned level coding, the signs (e.g., sign_flag) for all scan positions with sig_coeff_flag equal to 1 are finally bypass coded.

[0093] The video coder uses a unified (identical) Rice parameter (ricePar) derivation for pass 2 and pass 3. The only difference is that the base level (e.g., baseLevel) is set to 4 and 0 for pass 2 and pass 3, respectively. The Rice parameter is not determined solely based on the sum of the absolute levels of the five neighboring transform coefficients in the local template, but the corresponding base level is also taken into account as follows: RicePara=RiceParTable[max(min(31,sumAbs-5*baseLevel),0)] When calculating the value sumAbs, a value of 0 is used for any adjacent coefficients outside the TB.

[0094] After the first sub-block coding pass, the absolute value of each remaining uncoded coefficient is coded by the syntax element dec_abs_level, which corresponds to a modified absolute level value, with zero level values ​​conditionally mapped to non-zero values. At the encoder side, the value of the syntax element dec_abs_level is derived from the absolute level (absLevel) depending on the values ​​of the quantizer state (QState) and the Rice parameter (RicePara) as follows: ZeroPos=(QState<2?1:2)< <RicePara if(absLevel==0) dec_abs_level=ZeroPos else dec_abs_level=(absLevel<=ZeroPos)?(absLevel-1):absLevel

[0095] In some examples, a video coder (e.g., video encoder 200 or video decoder 300) may maintain history counters throughout a decoded picture, e.g., a full picture, a slice, a tile, a group of CTUs, or a certain region (e.g., a partition) of a single CTU, with a normative reset at the start of the partition. The video coder may reset the coefficient statistics to a default history value (e.g., DefaultHistoryRiceValue). Thus, the normative reset of the coefficient statistics at the start of the partition may be expressed as follows: StatCoeff[i][compID]=DefaultHistoryRiceValue;

[0096] In some examples where the history counters (i.e., coefficient statistics) are stored as Rice parameter derivatives, the default value for the history reset (e.g., DefaultHistoryRiceValue) can be expressed as a function of the bit depth of the coded data or the internal bit depth. The internal bit depth may be greater than the bit depth of the coded data. A non-limiting example of such a dependence of the default history value on the bit depth can be expressed as follows: DefaultHistoryRiceValue=(bitDepth-10)>0 ? floorLog2(4*(bitDepth-10)):0; StatCoeff[i][compID]=DefaultHistoryRiceValue; The operator floorLog2 represents floor(Log2(x)), where Floor(x) denotes the largest integer less than or equal to x, and Log2(x) denotes the binary logarithm of x.

[0097] In other examples, default values ​​for the history reset values ​​(i.e., default history values) may be expressed as a function of the quantization parameter (QP), tabulated by analysis, or determined in some other way, signaled by the bitstream, or provided as side information. In some examples, linear models and / or non-linear operations such as clipping or clamping may be used. Examples of default history values ​​depending on QP are shown below. DefaultHistoryRiceValue=(bitDepth-10)>0 ? (int)(OFFSET-cs.slice->getSliceQp()*MULTIPLIER):0; DefaultHistoryRiceValue=DefaultHistoryRiceValue<0 ? 0:DefaultHistoryRiceValue; StatCoeff[i][compID]=DefaultHistoryRiceValue; In the above text, coefficient statistics are stored as Rice parameter derivatives. Therefore, the default history value is denoted by DefaultHistoryRiceValue. In this disclosure, the terms "DefaultHistoryValue" and "DefaultHistoryRiceValue" may be used interchangeably. OFFSET denotes the offset value, MULTIPLIER denotes the multiplier value, and cs.slice->getSliceQp() is a function that returns the QP of the slice.

[0098] In some examples, the video decoder 300 may determine a default history value for history reset (e.g., DefaultHistoryRiceValue) through a normative process, e.g., as described above, or may signal in the bitstream.

[0099] In some examples where coefficient statistics are stored as conversion coefficients or derivatives of conversion coefficients, a default value for history reset (e.g., DefaultHistoryCoefValue) can be expressed through an additional derivation process to that described above, and non-limiting examples of such procedures are provided below. DefaultHistoryCoefValue=1< <DefaultHistoryRiceValue; StatCoeff[i][compID]=DefaultHistoryCoefValue;

[0100] In some examples, the derivation process for the default history values ​​may take into account color component identifiers (IDs) or color formats. For example, history values ​​for chroma components may be derived as a function of history values ​​for the luma component, for example, through bit shifting, scaling, or offsetting.

[0101] In some examples where the coefficient statistics (e.g., history or StatCoeff) are stored as Rice parameters, the video coder (e.g., video encoder 200 or video decoder 300) may derive a value for updating the coefficient statistics (e.g., history or StatCoeff) from the Rice parameters used to decode a particular group of transform coefficients, e.g., the last N transform coefficients, or transform coefficients located at a block boundary. An example update is shown below. int averageRiceInTU=(int)(g_tempStatCoeff[i]); StatCoeff[i][compID]=(StatCoeff[i][compID]+averageRiceInTU)>>1;

[0102] In some examples, the Rice estimates for use in history updating can be derived from the decoded transform coefficients themselves as follows: int rem=m_BinDecoder.decodeRemAbsEP(ricePar, COEF_REMAIN_BIN_REDUCTION,cctx.maxLog2TrDRange()); if((g_counterCollectStatCoeff[riceClass]>0)&&(rem>0)) g_tempStatCoeff[riceClass]+=floorLog2((uint32_t)rem); In the above text, g_counterCollectStatCoeff[riceClass] indicates the number of transform coefficients in a class that the video coder has processed so far in a partition of a picture (e.g., an entire picture, a slice, a tile, a group of CUs, etc.), where the class is indicated by the index riceClass. Further in the above text, g_tempStatCoeff[riceClass] is a temporary value for the class indicated by the index riceClass. Further in the above text, the function m_BinDecoder.decodeRemAbsEP implements CABAC bypass decoding of most of the transform coefficients. In some examples, a smaller portion of these transform coefficients are context CABAC coded and are not used to update the history counters.

[0103] In examples using a history based on cumulative transform coefficient values, this value itself can be stored. For example, the video coder may update the history based on a weighted average with the code length, e.g., g_tempStatCoeff[riceClass]+=floorLog2((uint32_t)rem). In some examples, the video coder may update the history with the transform coefficient magnitude itself, e.g., g_tempStatCoeff[riceClass]+=rem.

[0104] In some examples, the derivation process for updating the history (i.e., the process for updating the coefficient statistics) may take into account the values ​​(e.g., levels) of the decoded transform coefficients. For example, when implementing the process for updating the history, the video coder may process transform coefficients of a partition (e.g., a TB, a group of CUs, etc.) and may reject updates to the history based on the decoded transform coefficients if the decoded transform coefficients are equal to 0 or below some threshold T. The history may be used to derive Rice parameters for Exponential-Golomb coding; if the transform coefficients are not coded with the Exponential-Golomb method but instead coded with a context procedure, information from these transform coefficients may be irrelevant to the Rice derivation. Therefore, it may be advantageous not to update the history when the decoded transform coefficients are equal to 0 or below some threshold T.

[0105] In some examples, when performing the process for updating the history, the video coder processes transform coefficients of a partition (e.g., a TB, a group of CUs, etc.) and may take into account the spatial location of the decoded transform coefficients within the current TB, sub-block, or coding group. For example, in some examples, the video coder does not perform history updating for decoded transform coefficients of DC values ​​of the current TB. In some examples, the derivation process (i.e., the process for updating the history) may depend on the spatial location such that the derivation process is modified or weighted for coefficients belonging to some sub-blocks (e.g., coding groups), e.g., for transform coefficients in sub-blocks that do not belong to the DC sub-block. A DC sub-block is a sub-block of the current TB that includes the DC value of the TB.

[0106] In some examples, a single history counter may represent the weighted history for all sub-blocks / classes of transform coefficients, i.e., there are no separate coefficient statistics for each class.

[0107] In some examples, the derivation process for the history update value may take into account the type of decoded transform coefficient. For example, the derivation process may take into account whether the decoded transform coefficient is partially coded with a context-based procedure (i.e., a significance or flag greater than X, followed by a residue coded with a bypass procedure using the Rice method) or whether the transform coefficient is coded as an absolute value. In some examples, when the history update value (e.g., statCoeff) is based on stored Rice parameters, the Rice value for the history update value may be calculated for a partially context-coded coefficient with an offset N targeted to cover the context-coded portion of the transform coefficient. g_tempStatCoeff[riceClass]+=floorLog2((uint32_t)rem)+N; In some examples, the value N in the above formula may be equal to an integer value such as 1, 2, etc.

[0108] Thus, in this example, the video coder may update the coefficient statistics based on one or more transform coefficients of a TB of the video data. As part of updating the coefficient statistics, the video coder may perform a derivation process to determine a temporary value (e.g., g_tempStatCoeff) for each respective transform coefficient of the one or more transform coefficients of the TB. The derivation process takes into account which encoding procedure of the multiple encoding procedures is used to encode the respective transform coefficient. In other words, the derivation process is determined based at least in part on which encoding procedure of the multiple encoding procedures is used to encode the respective transform coefficient. The multiple encoding procedures include a context-based procedure for encoding the respective transform coefficient and for encoding the respective transform coefficient as an absolute value. The video coder may set the coefficient statistics as an average of the coefficient statistics and the temporary value. For example, the video coder may: int averageRiceInTU=(int)(g_tempStatCoeff[i]); StatCoeff[i][compID]=(StatCoeff[i][compID]+averageRiceInTU)>>1; may be determined as described above.

[0109] In some examples, when history values ​​(i.e., coefficient statistics) are based on stored transform coefficient values, values ​​for history updates can be calculated in part for the context-coded coefficients with an offset or scaling targeted to cover the context-coded portions of the transform coefficients. g_tempStatCoeff[riceClass]+=rem< <M; or g_tempStatCoeff[riceClass]+=rem+X;

[0110] In some examples, the value N in the above formula may be equal to an integer value, such as 0, 1, 2, etc.

[0111] This disclosure may generally refer to “signaling” certain information, such as syntax elements. The term “signaling” may generally refer to communication of values ​​for syntax elements and / or other data used to decode encoded video data. That is, video encoder 200 may signal values ​​for syntax elements in a bitstream. Generally, signaling refers to generating values ​​in the bitstream. As mentioned above, source device 102 may transport the bitstream to destination device 116 substantially in real time or non-real time, such as may occur when storing syntax elements to storage device 112 for later retrieval by destination device 116.

[0112] 4A and 4B are conceptual diagrams illustrating an exemplary quadtree-binary tree (QTBT) structure 400 and a corresponding coding tree unit (CTU) 402. Solid lines represent quadtree partitioning, and dotted lines represent binary tree partitioning. At each partition (i.e., non-leaf) node of the binary tree, one flag is signaled to indicate which partition type (i.e., horizontal or vertical) is used, where, in this example, 0 indicates horizontal partitioning and 1 indicates vertical partitioning. For quadtree partitioning, there is no need to indicate the partition type because the quadtree node divides a block horizontally and vertically into four equal-sized sub-blocks. Thus, video encoder 200 may encode syntax elements (such as partition information) for the region tree level (i.e., solid lines) of QTBT structure 400 and syntax elements (such as partition information) for the prediction tree level (i.e., dashed lines) of QTBT structure 400, and video decoder 300 may decode those syntax elements. The video encoder 200 can encode, and the video decoder 300 can decode, video data, such as prediction data and transform data, for the CUs represented by the terminal leaf nodes of the QTBT structure 400.

[0113] 4B may be associated with parameters that define the sizes of blocks corresponding to nodes of the QTBT structure 400 at the first and second levels. These parameters may include a CTU size (representing the size of the CTU 402 in the sample), a minimum quadtree size (MinQTSize, representing the minimum allowed quadtree leaf node size), a maximum binary tree size (MaxBTSize, representing the maximum allowed binary tree root node size), a maximum binary tree depth (MaxBTDepth, representing the maximum allowed binary tree depth), and a minimum binary tree size (MinBTSize, representing the minimum allowed binary tree leaf node size).

[0114] The root node of a QTBT structure corresponding to a CTU may have four child nodes at the first level of the QTBT structure, and each child node may be partitioned according to a quadtree partition. That is, a first-level node is either a leaf node (with no child nodes) or has four child nodes. The example QTBT structure 400 represents a node as including a parent node and child nodes with solid lines for branching. If a first-level node is not larger than the maximum allowable binary tree root node size (MaxBTSize), the node may be further partitioned by its respective binary tree. The binary tree partitioning of a node may be repeated until the resulting node reaches the minimum allowable binary tree leaf node size (MinBTSize) or the maximum allowable binary tree depth (MaxBTDepth). The example QTBT structure 400 represents a node as including dashed lines for branching. The binary tree leaf nodes are called coding units (CUs), which are used for prediction (e.g., intra-picture prediction or inter-picture prediction) and transformation without further division. As discussed above, CUs may also be called "video blocks" or "blocks."

[0115] In one example of a QTBT partitioning structure, the CTU size is set as 128x128 (luma samples and two corresponding 64x64 chroma samples), MinQTSize is set as 16x16, MaxBTSize is set as 64x64, MinBTSize (for both width and height) is set as 4, and MaxBTDepth is set as 4. To generate quadtree leaf nodes, quadtree partitioning is first applied to the CTU. The quadtree leaf nodes may have sizes from 16x16 (i.e., MinQTSize) to 128x128 (i.e., CTU size). If the quadtree leaf node is 128x128, the quadtree leaf node is not further partitioned by a binary tree because the size exceeds MaxBTSize (i.e., 64x64 in this example). Otherwise, the quadtree leaf node is further partitioned by a binary tree. Therefore, a quadtree leaf node is also the root node of the binary tree and has the binary tree depth as 0. When the binary tree depth reaches MaxBTDepth (4 in this example), no further splits are allowed. A binary tree node with a width equal to MinBTSize (4 in this example) indicates that no further vertical splits (i.e., width splits) are allowed for that binary tree node. Similarly, a binary tree node with a height equal to MinBTSize indicates that no further horizontal splits (i.e., height splits) are allowed for that binary tree node. As mentioned above, the leaf nodes of a binary tree are called CUs and are further processed according to the prediction and transformation without further partitioning.

[0116] 5 is a block diagram illustrating an example video encoder 200 that may implement the techniques of this disclosure. Figure 5 is provided for purposes of explanation and should not be considered a limitation of the techniques as broadly illustrated and described in this disclosure. For purposes of explanation, this disclosure describes video encoder 200 in accordance with VVC (ITU-T H.266 under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be implemented by video encoding devices configured according to other video coding standards.

[0117] 5, video encoder 200 includes video data memory 230, mode select unit 202, residual generation unit 204, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, decoded picture buffer (DPB) 218, and entropy coding unit 220. Any or all of video data memory 230, mode select unit 202, residual generation unit 204, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, DPB 218, and entropy coding unit 220 may be implemented in one or more processors or processing circuitry. For example, the units of video encoder 200 may be implemented as one or more circuits or logic elements as part of hardware circuitry, or as part of a processor, ASIC, or FPGA. Furthermore, the video encoder 200 may include additional or alternative processors or processing circuitry for performing these and other functions. For example, in the example of Figure 5, the entropy coding unit 220 may include a Rice coding unit (REU) 228 and a CABAC unit 232.

[0118] Video data memory 230 may store video data to be encoded by components of video encoder 200. Video encoder 200 may receive video data stored in video data memory 230, for example, from video source 104 (FIG. 1). DPB 218 may act as a reference picture memory that stores reference video data for use in predicting subsequent video data by video encoder 200. Video data memory 230 and DPB 218 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. Video data memory 230 and DPB 218 may be provided by the same memory device or separate memory devices. In various examples, video data memory 230 may be on-chip with other components of video encoder 200, as shown, or may be off-chip relative to those components.

[0119] In this disclosure, references to video data memory 230 should not be construed as limited to memory internal to video encoder 200, unless specifically described as such, or to memory external to video encoder 200, unless specifically described as such. Rather, references to video data memory 230 should be understood as a reference memory that stores video data that video encoder 200 receives for encoding (e.g., video data for the current block to be encoded). Memory 106 of FIG. 1 may also provide temporary storage of outputs from various units of video encoder 200.

[0120] The various units in FIG. 5 are shown to aid in understanding the operations performed by video encoder 200. The units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. A fixed-function circuit refers to a circuit that provides specific functionality, and the operations that can be performed are pre-defined. A programmable circuit refers to a circuit that can be programmed to perform various tasks, and provides flexible functionality in the operations that can be performed. For example, a programmable circuit may execute software or firmware that causes the programmable circuit to operate in a manner defined by the software or firmware instructions. A fixed-function circuit may execute software instructions (e.g., to receive parameters or output parameters), but the types of operations that the fixed-function circuit performs are generally invariant. In some examples, one or more of the units may be different circuit blocks (fixed function or programmable), and in some examples, one or more units may be integrated circuits.

[0121] Video encoder 200 may include an arithmetic logic unit (ALU), an elementary function unit (EFU), digital circuitry, analog circuitry, and / or a programmable core formed from programmable circuitry. In examples in which the operations of video encoder 200 are implemented using software executed by programmable circuitry, memory 106 (FIG. 1) may store instructions (e.g., object code) of the software that video encoder 200 receives and executes, or another memory (not shown) within video encoder 200 may store such instructions.

[0122] The video data memory 230 is configured to store received video data. The video encoder 200 may retrieve pictures of the video data from the video data memory 230 and provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data memory 230 may be raw video data to be encoded.

[0123] The mode select unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra prediction unit 226. The mode select unit 202 may include additional functional units for performing video prediction according to other prediction modes. By way of example, the mode select unit 202 may include a palette unit, an intra block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.

[0124] Mode selection unit 202 typically coordinates multiple encoding passes to test combinations of encoding parameters and the resulting rate-distortion values ​​for such combinations. The encoding parameters may include partitioning of CTUs into CUs, prediction modes for CUs, transform types for residual data of CUs, quantization parameters for residual data of CUs, etc. Mode selection unit 202 may ultimately select a combination of encoding parameters that has a better rate-distortion value than the other tested combinations.

[0125] Video encoder 200 may partition a picture retrieved from video data memory 230 into a series of CTUs and encapsulate one or more CTUs within a slice. Mode select unit 202 may partition the CTUs of the picture according to a tree structure, such as the QTBT structure or quadtree structure of HEVC described above. As described above, video encoder 200 may form one or more CUs from partitioning the CTUs according to the tree structure. Such CUs may also be generally referred to as "video blocks" or "blocks."

[0126] Generally, the mode select unit 202 also controls its components (e.g., the motion estimation unit 222, the motion compensation unit 224, and the intra prediction unit 226) to generate a predictive block for a current block (e.g., the current CU, or in HEVC, the overlapping portion of the PU and TB). In the case of inter prediction of the current block, the motion estimation unit 222 may perform motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously coded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 may calculate a value representing how similar a potential reference block is to the current block according to, for example, the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), etc. The motion estimation unit 222 may generally perform these calculations using sample-by-sample differences between the current block and the reference block being considered. Motion estimation unit 222 may identify the reference block having the lowest value resulting from these calculations, which indicates the reference block that most closely matches the current block.

[0127] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of a reference block in a reference picture relative to the position of the current block in the current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, in the case of unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, while in the case of bidirectional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then generate a predictive block using the motion vectors. For example, the motion compensation unit 224 may use the motion vectors to retrieve data of the reference block. As another example, if the motion vectors have fractional sample precision, the motion compensation unit 224 may interpolate values ​​for the predictive block according to one or more interpolation filters. Furthermore, in the case of bidirectional inter prediction, the motion compensation unit 224 may retrieve data for the two reference blocks identified by the respective motion vectors and combine the retrieved data, for example, by sample-wise averaging or weighted averaging.

[0128] As another example, in the case of intra prediction or intra predictive coding, the intra prediction unit 226 may generate a predictive block from samples neighboring the current block. For example, in the case of a directional mode, the intra prediction unit 226 may generally mathematically combine the values ​​of neighboring samples and apply these calculated values ​​in a defined direction across the current block to generate a predictive block. As another example, in the case of a DC mode, the intra prediction unit 226 may calculate an average of neighboring samples for the current block and generate a predictive block to include this resulting average for each sample of the predictive block.

[0129] The mode select unit 202 provides the predictive block to the residual generation unit 204. The residual generation unit 204 receives a raw, uncoded version of the current block from the video data memory 230 and receives the predictive block from the mode select unit 202. The residual generation unit 204 calculates sample-by-sample differences between the current block and the predictive block. The resulting sample-by-sample differences define a residual block for the current block. In some examples, the residual generation unit 204 may also determine differences between sample values ​​in the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some examples, the residual generation unit 204 may be formed using one or more subtractor circuits that perform binary subtraction.

[0130] In examples in which mode select unit 202 partitions CUs into PUs, each PU may be associated with a luma prediction unit and a corresponding chroma prediction unit. Video encoder 200 and video decoder 300 may support PUs with various sizes. As indicated above, the size of a CU may refer to the size of the luma coding block of the CU, and the size of a PU may refer to the size of the luma prediction unit of the PU. Assuming that the size of a particular CU is 2N×2N, video encoder 200 may support a PU size of 2N×2N or N×N for intra prediction, and a symmetric PU size of 2N×2N, 2N×N, N×2N, N×N, or similar for inter prediction. Video encoder 200 and video decoder 300 may also support asymmetric partitioning for PU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter prediction.

[0131] In examples where the mode select unit 202 does not further partition the CUs into PUs, each CU may be associated with a luma coding block and a corresponding chroma coding block. As above, the size of a CU may refer to the size of the luma coding block of the CU. The video encoder 200 and the video decoder 300 may support CU sizes of 2N×2N, 2N×N, or N×2N.

[0132] For other video coding techniques, such as intra-block copy mode coding, affine mode coding, and linear model (LM) mode coding, as some examples, mode select unit 202 generates a predictive block for the current block being coded via a respective unit associated with the coding technique. In some examples, such as palette mode coding, mode select unit 202 may not generate a predictive block, but instead may generate syntax elements that indicate how to reconstruct the block based on a selected palette. In such modes, mode select unit 202 may provide these syntax elements to entropy coding unit 220 to be coded.

[0133] As described above, the residual generation unit 204 receives video data for a current block and a corresponding predictive block. The residual generation unit 204 then generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates sample-by-sample differences between the predictive block and the current block.

[0134] Transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 may apply various transforms to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform to the residual block. In some examples, transform processing unit 206 may perform multiple transforms, e.g., a linear transform and a quadratic transform, such as a rotation transform, on the residual block. In some examples, transform processing unit 206 does not apply a transform to the residual block.

[0135] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to generate a quantized transform coefficient block. The quantization unit 208 may quantize the transform coefficients of the transform coefficient block according to a quantization parameter (QP) value associated with the current block. The video encoder 200 (e.g., via the mode select unit 202) may adjust the degree of quantization applied to the transform coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may result in loss of information, and therefore, the quantized transform coefficients may have lower precision than the original transform coefficients generated by the transform processing unit 206.

[0136] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform, respectively, to the quantized transform coefficient block to reconstruct a residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block that corresponds to the current block (possibly with some distortion) based on the reconstructed residual block and the predictive block generated by the mode select unit 202. For example, the reconstruction unit 214 may add samples of the reconstructed residual block to corresponding samples from the predictive block generated by the mode select unit 202 to generate the reconstructed block.

[0137] Filter unit 216 may perform one or more filter operations on the reconstructed block. For example, filter unit 216 may perform a deblocking operation to reduce blockiness artifacts along the edges of a CU. The operations of filter unit 216 may be skipped in some examples.

[0138] Video encoder 200 stores the reconstructed blocks in DPB 218. For example, in examples where the operations of filter unit 216 are not performed, reconstruction unit 214 may store the reconstructed blocks in DPB 218. In examples where the operations of filter unit 216 are performed, filter unit 216 may store the filtered reconstructed blocks in DPB 218. Motion estimation unit 222 and motion compensation unit 224 may retrieve reference pictures formed from the reconstructed (and possibly filtered) blocks from DPB 218 to inter-predict blocks of a later-encoded picture. Additionally, intra-prediction unit 226 may use reconstructed blocks in DPB 218 of the current picture to intra-predict other blocks in the current picture.

[0139] In general, entropy encoding unit 220 may entropy encode syntax elements received from other functional components of video encoder 200. For example, entropy encoding unit 220 may entropy encode quantized transform coefficient blocks from quantization unit 208. As another example, entropy encoding unit 220 may entropy encode predictive syntax elements (e.g., motion information for inter-prediction or intra-mode information for intra-prediction) from mode select unit 202. Entropy encoding unit 220 may perform one or more entropy encoding operations on syntax elements, which are another example of video data, to generate entropy-encoded data. For example, entropy encoding unit 220 may perform a context-adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable-to-variable (V2V) length coding operation, a syntax-based context-adaptive binary arithmetic coding (SBAC) operation, a probability interval partitioned entropy (PIPE) coding operation, an exponential-Golomb coding operation, or another type of entropy coding operation on the data. In some examples, entropy encoding unit 220 may operate in a bypass mode in which syntax elements are not entropy coded.

[0140] The REU 228 may generate Rice codes for some syntax elements, such as remainder syntax elements for transform coefficients (e.g., abs_remainder) and absolute value syntax elements for transform coefficients (e.g., dec_abs_level). The CABAC unit 232 of the entropy coding unit 220 may perform CABAC coding or another type of entropy coding on the Rice codes. As part of generating Rice codes for syntax elements for transform coefficients, the REU 228 may determine Rice parameters for the transform coefficients. The REU 228 may determine the Rice parameters for the transform coefficients according to any of the techniques of this disclosure. For example, the REU 228 may determine historical values ​​(e.g., histCoef) for the transform coefficients. The historical values ​​are also referred to herein as estimated historical transform coefficients. The REU 228 may determine the historical values ​​based on coefficient statistics. As described elsewhere in this disclosure, the REU 228 may update the coefficient statistics to an average of the coefficient statistics and the temporary values. The REU 228 may perform a derivation process to determine the temporary values. The derivation process may take into account which encoding procedure of multiple encoding procedures is used to encode each transform coefficient. The multiple encoding procedures include a context-based procedure for encoding each transform coefficient and for encoding each transform coefficient as an absolute value.

[0141] Video encoder 200 may output a bitstream that includes entropy coding syntax elements needed to reconstruct blocks of a slice or picture. Specifically, entropy coding unit 220 may output the bitstream.

[0142] The operations described above are described with respect to blocks. Such descriptions should be understood as operations for luma coding blocks and / or chroma coding blocks. As described above, in some examples, the luma coding blocks and chroma coding blocks are luma and chroma components of a CU. In some examples, the luma coding blocks and chroma coding blocks are luma and chroma components of a PU.

[0143] In some examples, operations performed with respect to luma coding blocks need not be repeated for chroma coding blocks. As one example, operations for identifying motion vectors (MVs) and reference pictures for luma coding blocks need not be repeated to identify MVs and reference pictures for chroma blocks. Rather, MVs for luma coding blocks may be scaled to determine MVs for chroma blocks, and the reference pictures may be the same. As another example, the intra prediction process may be the same for luma coding blocks and chroma coding blocks.

[0144] In some examples, the video encoder 200 represents an example of a device configured to encode video data, including a memory configured to store the video data and one or more processing units implemented in a circuit configuration, the one or more processing units configured to: determine estimated historical transform coefficients (e.g., histCoef) for a current transform coefficient; determine a local sum value (e.g., localSumAbs) based on the estimated historical transform coefficients; determine a Rice parameter (e.g., cRiceParam) based on the local sum value; determine a syntax element (e.g., abs_remainder or dec_abs_level) based on the level of the current transform coefficient; and use the Rice parameter to encode the syntax element.

[0145] 6 is a block diagram illustrating an example video decoder 300 that can implement the techniques of this disclosure. Figure 6 is provided for purposes of explanation and does not limit the techniques as broadly illustrated and described in this disclosure. For purposes of explanation, this disclosure describes a video decoder 300 in accordance with VVC (ITU-T H.266 under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be implemented by video coding devices configured according to other video coding standards.

[0146] In the example of Figure 6, the video decoder 300 includes a coded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. Any or all of the CPB memory 320, the entropy decoding unit 302, the prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, the filter unit 312, and the DPB 314 may be implemented in one or more processors or processing circuitry. For example, the units of the video decoder 300 may be implemented as one or more circuits or logic elements as part of hardware circuitry, or as part of a processor, ASIC, or FPGA. Furthermore, the video decoder 300 may include additional or alternative processors or processing circuitry for performing these and other functions. For example, in the example of FIG. 6, the entropy decoding unit 302 includes a Rice decoding unit (RDU) 322 and a CABAC unit 324.

[0147] Prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. Prediction processing unit 304 may include additional units for performing prediction according to other prediction modes. By way of example, prediction processing unit 304 may include a palette unit, an intra block copy unit (which may form part of motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, video decoder 300 may include more, fewer, or different functional components.

[0148] CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by components of video decoder 300. The video data stored in CPB memory 320 may be retrieved, for example, from computer-readable medium 110 (FIG. 1). CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from the encoded video bitstream. CPB memory 320 may also store video data other than syntax elements of coded pictures, such as temporary data representing output from various units of video decoder 300. DPB 314 generally stores decoded pictures that video decoder 300 may output and / or use as reference video data when decoding subsequent data or pictures of the encoded video bitstream. CPB memory 320 and DPB 314 may be formed by any of a variety of memory devices, such as DRAM, including SDRAM, MRAM, RRAM, or other types of memory devices. CPB memory 320 and DPB 314 may be provided by the same memory device or separate memory devices. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300, or may be off-chip relative to those components.

[0149] Additionally or alternatively, in some examples, video decoder 300 may retrieve coded video data from memory 120 (FIG. 1). That is, memory 120 may store data such as those described above with respect to CPB memory 320. Similarly, memory 120 may store instructions to be executed by video decoder 300 when some or all of the functionality of video decoder 300 is implemented in software to be executed by processing circuitry of video decoder 300.

[0150] The various units shown in FIG. 6 are illustrated to aid in understanding the operations performed by video decoder 300. The units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. As with FIG. 5, a fixed-function circuit refers to a circuit that provides specific functionality, and the operations that can be performed are pre-defined. A programmable circuit refers to a circuit that can be programmed to perform various tasks, providing flexible functionality in the operations that can be performed. For example, a programmable circuit may execute software or firmware that causes the programmable circuit to operate in a manner defined by the software or firmware instructions. A fixed-function circuit may execute software instructions (e.g., to receive or output parameters), but the types of operations that the fixed-function circuit performs are generally invariant. In some examples, one or more of the units may be different circuit blocks (fixed function or programmable), and in some examples, one or more units may be integrated circuits.

[0151] The video decoder 300 may include a programmable core formed from an ALU, an EFU, digital circuits, analog circuits, and / or programmable circuits. In examples in which the operations of the video decoder 300 are performed by software executing on programmable circuits, on-chip or off-chip memory may store instructions (e.g., object code) of the software that the video decoder 300 receives and executes.

[0152] The entropy decoding unit 302 may receive the encoded video data from the CPB and entropy decode the video data to recover the syntax elements. The prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, and the filter unit 312 may generate decoded video data based on the syntax elements extracted from the bitstream.

[0153] In general, video decoder 300 reconstructs a picture on a block-by-block basis. Video decoder 300 may perform a reconstruction operation on each block individually (here, the block currently being reconstructed, i.e., decoded, may be referred to as the “current block”).

[0154] The entropy decoding unit 302 may entropy decode the quantized transform coefficients of the quantized transform coefficient block as well as syntax elements defining transform information, such as a quantization parameter (QP) and / or a transform mode indication. The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine the degree of quantization and, similarly, the degree of inverse quantization to apply. The inverse quantization unit 306 may, for example, perform a bitwise left-shift operation to inverse quantize the quantized transform coefficients. The inverse quantization unit 306 may thereby form a transform coefficient block including the transform coefficients.

[0155] Some syntax elements may be represented as Rice codes. In some such examples, the CABAC unit 324 may apply CABAC decoding or another form of entropy decoding to a bit sequence in the bitstream to obtain a Rice code for a syntax element, such as a remainder syntax element for a transform coefficient (e.g., abs_remainder) or an absolute value syntax element for a transform coefficient (e.g., dec_abs_level). In the example of FIG. 6, the RDU 322 of the entropy decoding unit 302 may decode the Rice code and use the resulting decoded value to determine the level of the transform coefficient. The RDU 322 may determine Rice parameters for use in decoding the Rice code in accordance with any of the techniques of this disclosure.

[0156] After the inverse quantization unit 306 forms the transform coefficient block, the inverse transform processing unit 308 may apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, the inverse transform processing unit 308 may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotational transform, an inverse transform, or another inverse transform to the transform coefficient block.

[0157] Further, prediction processing unit 304 generates a predictive block according to the prediction information syntax element entropy decoded by entropy decoding unit 302. For example, if the prediction information syntax element indicates that the current block is inter-predicted, motion compensation unit 316 may generate a predictive block. In this case, the prediction information syntax element may indicate a reference picture in DPB 314 from which to retrieve a reference block, as well as a motion vector that identifies the location of the reference block in the reference picture relative to the location of the current block in the current picture. Motion compensation unit 316 may generally perform the inter-prediction process in a manner substantially similar to that described with respect to motion compensation unit 224 (FIG. 5).

[0158] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, intra prediction unit 318 may generate a predictive block according to the intra-prediction mode indicated by the prediction information syntax element. Again, intra prediction unit 318 may generally perform the intra-prediction process in a manner substantially similar to that described with respect to intra prediction unit 226 (FIG. 5). Intra prediction unit 318 may retrieve data of samples neighboring the current block from DPB 314.

[0159] The reconstruction unit 310 may reconstruct the current block using the predictive block and the residual block. For example, the reconstruction unit 310 may add samples of the residual block to corresponding samples of the predictive block to reconstruct the current block.

[0160] Filter unit 312 may perform one or more filter operations on the reconstructed blocks. For example, filter unit 312 may perform a deblocking operation to reduce blockiness artifacts along the edges of the reconstructed blocks. The operations of filter unit 312 may not be performed in all instances.

[0161] The video decoder 300 may store the reconstructed blocks in the DPB 314. For example, in examples where the operations of the filter unit 312 are not performed, the reconstruction unit 310 may store the reconstructed blocks in the DPB 314. In examples where the operations of the filter unit 312 are performed, the filter unit 312 may store the filtered reconstructed blocks in the DPB 314. As described above, the DPB 314 may provide reference information to the prediction processing unit 304, such as samples of the current picture for intra prediction and previously decoded pictures for subsequent motion compensation. Additionally, the video decoder 300 may output the decoded pictures (e.g., decoded video) from the DPB 314 for later presentation on a display device, such as the display device 118 of FIG. 1.

[0162] Thus, the video decoder 300 may represent an example of a video decoding device that includes a memory configured to store video data and one or more processing units implemented in a circuit configuration configured to: determine estimated historical transform coefficients (e.g., histCoef) for a current transform coefficient; determine a local sum value (e.g., localSumAbs) based on the estimated historical transform coefficients; determine a Rice parameter (e.g., cRiceParam) based on the local sum value; use the Rice parameter to decode a syntax element (e.g., abs_remainder or dec_abs_level); determine a level of the current transform coefficient based on the syntax element; and reconstruct a block of video data based on the level of the current transform coefficient.

[0163] 7 is a flowchart illustrating an exemplary method for encoding a current block according to the techniques of this disclosure. The flowcharts of this disclosure are provided as examples. In other examples, more, fewer, or different actions may be included in the method, and the actions shown in the flowcharts may be performed in a different order. Furthermore, although the methods illustrated in the flowcharts of this disclosure are described with reference to FIGS. 1 through 6, the methods are not so limited. In the example of FIG. 7, the current block may include a current CU.

[0164] In this example, video encoder 200 first predicts a current block (700). For example, video encoder 200 may form a predictive block for the current block. Then, video encoder 200 may calculate a residual block for the current block (702). To calculate the residual block, video encoder 200 may calculate a difference between the original uncoded block and the predictive block for the current block. Then, video encoder 200 may transform the residual block and quantize the transform coefficients of the residual block (704). Next, video encoder 200 may scan the quantized transform coefficients of the residual block (706). During or following the scan, video encoder 200 may entropy code the transform coefficients (708). For example, video encoder 200 may code the transform coefficients using CAVLC or CABAC. Then, video encoder 200 may output entropy-coded data for the block (710).

[0165] As part of entropy coding the transform coefficients, video encoder 200 may determine Rice parameters for the transform coefficients according to any of the techniques of this disclosure. Video encoder 200 may generate Rice codes for the transform coefficients based on the Rice parameters and the levels of the transform coefficients. Video encoder 200 may entropy code the Rice codes.

[0166] 8 is a flowchart illustrating an example method for decoding a current block of video data in accordance with the techniques of this disclosure. The current block may include a current CU. Although described with respect to video decoder 300 (FIGS. 1 and 6), it should be understood that other devices may be configured to implement a method similar to that of FIG.

[0167] Video decoder 300 may receive entropy-coded data for a current block, such as entropy-coded prediction information and entropy-coded data for transform coefficients of a residual block that corresponds to the current block (800). Video decoder 300 may entropy decode the entropy-coded data to determine prediction information for the current block and to reconstruct the transform coefficients of the residual block (802).

[0168] The video decoder 300 may determine a Rice parameter for one or more of the transform coefficients according to any of the techniques of this disclosure. The video decoder 300 may determine the level of the transform coefficient based on the Rice parameter for the transform coefficient and one or more syntax elements encoded in the bitstream. For example, the video decoder 300 may entropy decode a remainder syntax element (e.g., abs_remainder) to obtain a Rice code for the transform coefficient. In this example, the video decoder 300 may then use the Rice parameter for the transform coefficient to decode the Rice code to obtain a decoded value. The video decoder 300 may use the decoded value to determine the level of the transform coefficient.

[0169] The video decoder 300 may predict the current block using, for example, an intra-prediction mode or an inter-prediction mode as indicated by the prediction information for the current block, to calculate a predictive block for the current block (804). The video decoder 300 may then inverse scan the reconstructed transform coefficients to create a block of quantized transform coefficients (806). The video decoder 300 may then dequantize the transform coefficients and apply an inverse transform to the transform coefficients to generate a residual block (808). The video decoder 300 may finally decode the current block by combining the predictive block and the residual block (810).

[0170] 9 is a flowchart illustrating an example process for encoding video data in accordance with one or more techniques of this disclosure. In the example of FIG. 9, the REU 228 initializes coefficient statistics (e.g., statCoeff[i][compID]) (900). For example, the REU 228 may initialize the coefficient statistics to 0. In some examples, the REU 228 may initialize the coefficient statistics to a default history value (e.g., DefaultHistoryRiceValue).

[0171] In some examples, the REU 228 may determine the default history value based on the QP of a slice of a picture that includes the block of video data. For example, if “DefaultHistoryRiceValue” indicates the default history value, “bitDepth” indicates the bit depth of the transform coefficients of the TB, and “cs.slice->getSliceQp()” is a function that returns the QP of the slice, the REU 228 may perform the following operation to determine the default history value: DefaultHistoryRiceValue=(bitDepth-10)>0 ? (int)(OFFSET-cs.slice->getSliceQp()*MULTIPLIER):0; DefaultHistoryRiceValue=DefaultHistoryRiceValue<0 ? 0:DefaultHistoryRiceValue; The REU 228 may reset coefficient statistics to default historical values ​​at the start of a partition of a picture. For example, the REU 228 may maintain coefficient statistics at a nominal reset at the start of a partition throughout a certain partition of a decoded picture (e.g., a full picture, a slice, a tile, a group of CTUs, or a single CTU).

[0172] Further, in the example of FIG. 9, the REU 228 may update the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the block of video data (902). The block of video data may be a CU or other type of block. The one or more transform coefficients may be all of the transform coefficients of the TB or a subset of the transform coefficients of the TB. As shown in the example of FIG. 9, as part of updating the coefficient statistics, the REU 228 may perform a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB (904).

[0173] The derivation process takes into account (i.e., is determined at least in part based on) which encoding procedure of a plurality of encoding procedures is used to encode each transform coefficient. The plurality of encoding procedures includes a context-based procedure for encoding each transform coefficient and for encoding each transform coefficient as an absolute value. When each transform coefficient is encoded using the context-based procedure for encoding, each transform coefficient may be represented using a flag greater than 1, optionally a flag greater than 2, and a remainder. The remainder may be equal to the absolute level of the respective transform coefficient minus 2 if the flag greater than 2 is present and equal to 1. The remainder may be equal to the absolute level of the respective transform coefficient minus 1 if the flag greater than 1 is equal to 1 and the flag greater than 2 is equal to 0. When each transform coefficient is encoded as an absolute value, each transform coefficient may be equal to the absolute value or the absolute value plus 1. A syntax element dec_abs_level may indicate the absolute value.

[0174] In cases where each transform coefficient is coded using a context-based procedure, REU 228 may determine a temporary value based on applying a floor function to the binary logarithm of the remainder value of each transform coefficient and adding an integer value. For example, if g_tempStatCoeff[riceClass] is the temporary value, “rem” is the remainder for each transform coefficient, and “N” is an integer value, REU 228 may calculate: g_tempStatCoeff[riceClass]+=floorLog2((uint32_t)rem)+N; In this operation and elsewhere in this disclosure, "(unit32_t)" indicates that "rem" is to be cast to an unsigned 32-bit integer.

[0175] In other cases, such as when each transform coefficient is coded as an absolute value, REU 228 may determine the temporary value based on applying a floor function to the binary logarithm of the absolute level of each transform coefficient. For example, if g_tempStatCoeff[riceClass] is the temporary value and “rem” is the remainder for each transform coefficient, REU 228 may calculate: g_tempStatCoeff[riceClass]+=floorLog2((uint32_t)rem)

[0176] Additionally, as part of updating the coefficient statistics, the REU 228 may set the coefficient statistics as the average of the coefficient statistics and the temporary values ​​(906). For example, tempStatCoeff[i] may indicate the temporary values, and StatCoeff[i][compID] may indicate the coefficient statistics. In this example, to set the coefficient statistics as the average of the coefficient statistics and the temporary values, the REU 228 may perform the following operation: int averageRiceInTU=(int)(g_tempStatCoeff[i]); StatCoeff[i][compID]=(StatCoeff[i][compID]+averageRiceInTU)>>1;

[0177] Further, in the example of FIG. 9, the REU 228 may determine 908 a historical value (e.g., histCoef) based on the coefficient statistics. In some examples, the REU 228 may store the coefficient statistics as a derivative of a Rice parameter. In such examples, as part of determining the historical value based on the coefficient statistics, the REU 228 may left-shift 1 by the coefficient statistics. For example, the REU 228 may perform the following operation to determine the historical value based on the coefficient statistics: historyRiceValue=StatCoeff[i][compID]; histCoef=1< <historyRiceValue; In another example, the REU 228 may store the coefficient statistics as a derivative of the transform coefficients. In this example, as part of determining the historical values ​​based on the coefficient statistics, the REU 228 may set the historical values ​​equal to the coefficient statistics. For example, the REU 228 may perform the following operations to determine the historical values ​​based on the coefficient statistics: historyValue=StatCoeff[i][compID]; histCoef=historyValue;

[0178] 9, the REU 228 may determine 910 a Rice parameter for a particular transform coefficient of the TB. The particular transform coefficient of the TB may be any of the transform coefficients of the TB. In some examples, the REU 228 may determine a Rice parameter for each transform coefficient of the TB.

[0179] As part of determining the Rice parameters for a particular transform coefficient, the REU 228 may determine whether the particular transform coefficient is less than three spatial locations from the right or bottom boundary of the TB (912). For example, “posX” may indicate the x-axis coordinate of the particular transform coefficient, “posY” may indicate the y-axis coordinate of the particular transform coefficient, “m_width” may indicate the width of the TB, “m_height” may indicate the height of the TB, “sum” may indicate a local sum value, “abs(pData[])” may indicate the absolute level of the transform coefficient, and “histCoef” may indicate a history value. In this example, the REU 228 may determine whether the particular transform coefficient is less than three spatial locations from the right or bottom boundary of the TB using one of the following comparisons shown in Code Listing 3: if(posX <m_width-1) if(posX <m_width-2) if(posY <m_height-1) if(posY <m_height-2)

[0180] 9, based on the particular transform coefficient being less than three spatial positions away from the right boundary of the TB or the bottom boundary of the TB ("YES" branch of 912), the REU 228 may determine a local sum value based on historical values ​​(914). For example, as shown in Code Listing 3, the REU 228 may determine the local sum value as one of the following: sum+=histCoef sum+=N*histCoef sum+=M*histCoef

[0181] On the other hand, if the particular transform coefficient is not less than three spatial positions away from the right boundary of the TB or the bottom boundary of the TB ("NO" branch of 912), the REU 228 may determine a local sum value based on the transform coefficients in the template (916). For example, as shown in pseudocode listing 3, the REU 228 may determine the local sum value as one of the following: · sum+=abs(pData[2]); · sum+=abs(pData[m_width+1]); sum+=abs(pData[m_width]); · sum+=abs(pData[m_width<<1]);

[0182] Further, the REU 228 may determine a Rice parameter for a particular transform coefficient based on the local sum value (918). For example, the REU 228 may use the local sum value to look up the Rice parameter for a particular transform coefficient in a table such as Table 1.

[0183] The REU 228 may generate a Rice code for the particular transform coefficient based on the Rice parameters for the particular transform coefficient and the level of the particular transform coefficient (920). For example, the Rice code for the particular transform coefficient may include a prefix and a suffix separated by a fixed value, typically equal to 0. The REU 228 may determine the prefix q as x divided by the truncated M (i.e.,

[0184]

number

[0185] ), where x is a value associated with a particular transform coefficient, such as the absolute level of the particular transform coefficient or the modulus value of the particular transform coefficient, and M is 2 k where k is the Rice parameter for a particular transform coefficient. The REU 228 may determine the suffix as r=x-qM, where r is the suffix. Thus, the suffix may be considered as a binary number with a length (i.e., number of bits) equal to k.

[0186] In some examples, CABAC unit 232 of entropy coding unit 220 may perform CABAC encoding on Rice codes for particular transform coefficients and include the resulting CABAC encoded values ​​in the bitstream.

[0187] 10 is a flowchart illustrating an example process for decoding video data in accordance with one or more techniques of this disclosure. In the example of FIG. 10, the RDU 322 initializes coefficient statistics (e.g., statCoeff[i][compID]) (1000). For example, the RDU 322 may initialize the coefficient statistics to 0. In some examples, the RDU 322 may initialize the coefficient statistics to a default history value (e.g., DefaultHistoryRiceValue).

[0188] In some examples, RDU 322 may determine the default history value based on the QP of a slice of a picture that includes the block of video data. For example, if “DefaultHistoryRiceValue” indicates the default history value, “bitDepth” indicates the bit depth of the transform coefficients of the TB, and “cs.slice->getSliceQp()” is a function that returns the QP of the slice, RDU 322 may perform the following operation to determine the default history value: DefaultHistoryRiceValue=(bitDepth-10)>0 ? (int)(OFFSET-cs.slice->getSliceQp()*MULTIPLIER):0; DefaultHistoryRiceValue=DefaultHistoryRiceValue<0 ? 0:DefaultHistoryRiceValue; The RDU 322 may reset coefficient statistics to default historical values ​​at the start of a partition of a picture. For example, the RDU 322 may maintain coefficient statistics at a nominal reset at the start of the partition throughout a certain partition of a decoded picture (e.g., a full picture, a slice, a tile, a group of CTUs, or a single CTU).

[0189] Further, in the example of FIG. 10, the RDU 322 may update coefficient statistics based on one or more transform coefficients of a TB of a block of video data (1002). The block of video data may be a CU or other type of block. The one or more transform coefficients may be all of the transform coefficients of the TB or a subset of the transform coefficients of the TB. As shown in the example of FIG. 10, as part of updating the coefficient statistics, the RDU 322 may perform a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB (1004).

[0190] The derivation process takes into account (i.e., is determined at least in part based on) which encoding procedure of a plurality of encoding procedures is used to encode each transform coefficient. The plurality of encoding procedures includes a context-based procedure for encoding each transform coefficient and for encoding each transform coefficient as an absolute value. The RDU 322 may perform the derivation process according to any of the examples described above with respect to the REU 228.

[0191] Additionally, as part of updating the coefficient statistics, the RDU 322 may set the coefficient statistics as the average of the coefficient statistics and the temporary value (1006). For example, tempStatCoeff[i] may indicate the temporary value, and StatCoeff[i][compID] may indicate the coefficient statistics. In this example, to set the coefficient statistics as the average of the coefficient statistics and the temporary value, the RDU 322 may perform the following operation: int averageRiceInTU=(int)(g_tempStatCoeff[i]); StatCoeff[i][compID]=(StatCoeff[i][compID]+averageRiceInTU)>>1;

[0192] Further, in the example of FIG. 10 , the RDU 322 may determine a historical value (e.g., histCoef) based on the coefficient statistics (1008). In some examples, the RDU 322 may store the coefficient statistics as a derivative of a Rice parameter. In such examples, as part of determining the historical value based on the coefficient statistics, the RDU 322 may left-shift 1 by the coefficient statistics. For example, the RDU 322 may perform the following operation to determine the historical value based on the coefficient statistics: historyRiceValue=StatCoeff[i][compID]; histCoef=1< <historyRiceValue; In another example, the RDU 322 may store the coefficient statistics as a derivative of the conversion coefficients. In this example, as part of determining the historical values ​​based on the coefficient statistics, the RDU 322 may set the historical values ​​equal to the coefficient statistics. For example, the RDU 322 may perform the following operations to determine the historical values ​​based on the coefficient statistics: historyValue=StatCoeff[i][compID]; histCoef=historyValue;

[0193] In the example of FIG. 10, the RDU 322 may determine 1010 a Rice parameter for a particular transform coefficient of the TB. The particular transform coefficient of the TB may be any of the transform coefficients of the TB. In some examples, the REU 228 may determine a Rice parameter for each transform coefficient of the TB.

[0194] As part of determining the Rice parameters for a particular transform coefficient, the RDU 322 may determine whether the particular transform coefficient is less than three spatial locations from the right or bottom boundary of the TB (1012). For example, “posX” may indicate the x-axis coordinate of the particular transform coefficient, “posY” may indicate the y-axis coordinate of the particular transform coefficient, “m_width” may indicate the width of the TB, “m_height” may indicate the height of the TB, “sum” may indicate a local sum value, “abs(pData[])” indicates the absolute level of the transform coefficient, and “histCoef” indicates a history value. In this example, the RDU 322 may determine whether the particular transform coefficient is less than three spatial locations from the right or bottom boundary of the TB using one of the following comparisons shown in Code Listing 3: if(posX <m_width-1) if(posX <m_width-2) if(posY <m_height-1) if(posY <m_height-2)

[0195] 10, based on the particular transform coefficient being less than three spatial positions away from the right boundary of the TB or the bottom boundary of the TB ("YES" branch of 1012), the RDU 322 may determine a local sum value based on historical values ​​(1014). For example, as shown in Code Listing 3, the RDU 322 may determine the local sum value as one of the following: sum+=histCoef sum+=N*histCoef sum+=M*histCoef

[0196] On the other hand, if the particular transform coefficient is not at a spatial position less than three away from the right boundary of the TB or the bottom boundary of the TB (the "NO" branch of 1012), the RDU 322 may determine a local sum value based on the transform coefficients in the template (1016). For example, as shown in Code Listing 3, the RDU 322 may determine the local sum value as one of the following: · sum+=abs(pData[2]); · sum+=abs(pData[m_width+1]); sum+=abs(pData[m_width]); · sum+=abs(pData[m_width<<1]);

[0197] Further, the RDU 322 may determine a Rice parameter for a particular transform coefficient based on the local sum value (1018). For example, the RDU 322 may use the local sum value to look up the Rice parameter for a particular transform coefficient in a table such as Table 1.

[0198] The RDU 322 may determine the level of a particular transform coefficient based on the Rice parameter for the particular transform coefficient and one or more syntax elements coded in the bitstream (1020). For example, a remainder syntax element (e.g., abs_remainder) or an absolute value syntax element (e.g., dec_abs_level) may indicate a Rice code for the particular transform coefficient. The Rice code for the particular transform coefficient may include a prefix q and a suffix r. The length of the suffix r may be equal to the Rice parameter for the particular transform coefficient. The RDU 322 may interpret the prefix q as a unary representation of a first number and the suffix r as a binary representation of a second number, and may ignore zeros between the prefix q and the suffix r. In this example, the RDU 322 may add the first number and the second number to determine a decoded value. In examples where a particular transform coefficient is coded using a context-based procedure, RDU 322 may determine the level of the particular transform coefficient by adding 2 to the decoded value if the flags syntax element greater than 2 is present and equal to 1, by adding 1 to the decoded value if the flags syntax element greater than 1 is equal to 1 and the flags syntax element greater than 2 is equal to 0, and by setting the sign of the level of the particular transform coefficient based on the sign flag syntax element. In examples where the particular transform coefficient is coded using an absolute value, the decoded value may be equal to the level of the particular transform coefficient, or the level of the particular transform coefficient may be equal to the decoded value plus 1, depending, for example, on whether the decoded value is greater than or less than the ZeroPos variable. The ZeroPos variable is described above.

[0199] In some examples, the CABAC unit 324 may perform CABAC decoding on values ​​in the bitstream to obtain Rice codes.

[0200] Further, in the example of FIG. 10, the video decoder 300 may decode a block of video data based on the level of a particular transform coefficient (1022). For example, the inverse quantization unit 306 may inverse quantize the level of the particular transform coefficient along with the values ​​of other transform coefficients in the TB. In this example, the inverse transform processing unit 308 of the video decoder 300 may apply an inverse transform to the inverse quantized values ​​of the transform coefficients of the TB to obtain residual values. (In some examples, the inverse quantization and / or inverse transform process is omitted, and the transform coefficients directly indicate the residual values.) The reconstruction unit 310 may add the residual values ​​to samples of the corresponding predictive block. By so processing each TB of the block, the reconstruction unit 310 may reconstruct sample values ​​of the block of video data.

[0201] The following is a non-limiting list of aspects in accordance with one or more techniques of the present disclosure.

[0202] Aspect 1A. A method for decoding video data, comprising: determining estimated historical transform coefficients for a current transform coefficient; determining a local sum value based on the estimated historical transform coefficients; determining a Rice parameter based on the local sum value; decoding a syntax element using the Rice parameter; determining a level of the current transform coefficient based on the syntax element; and reconstructing a block of video data based on the level of the current transform coefficient.

[0203] Aspect 2A. The method of aspect 1A, wherein determining estimated historical transform coefficients for the current transform coefficients includes determining historical values ​​for each Rice class for a region of the picture associated with the current transform unit, and determining estimated historical transform coefficients based on the historical values.

[0204] Aspect 3A. The method of aspect 2A, wherein the region is one of an entire area of ​​a picture, a slice, a tile, a group of coding tree units (CTUs), or a single CTU, and the method further includes resetting the history values ​​when beginning to decode the region to default history values.

[0205] Aspect 4A. The method of aspect 3A, further comprising determining a default history value based on a bit depth of the coded data.

[0206] Aspect 5A. The method of any of aspects 3A or 4A, further comprising determining the default history value based on a quantization parameter or based on data signaled in a bitstream that includes an encoded version of the video data.

[0207] Aspect 6A. The method of any of Aspects 2A to 5A, wherein determining the historical value includes determining an average Rice parameter among the transform units associated with the current transform coefficient, and determining the historical value based on the average Rice parameter.

[0208] Aspect 7A. A method for encoding video data, comprising: determining estimated historical transform coefficients for a current transform coefficient; determining a local sum value based on the estimated historical transform coefficients; determining a Rice parameter based on the local sum value; determining a syntax element based on a level of the current transform coefficient; and encoding the syntax element using the Rice parameter.

[0209] Aspect 8A. The method of aspect 7A, wherein the step of determining estimated historical transform coefficients for the current transform coefficients includes the steps of determining historical values ​​for each Rice class for a region of the picture associated with the current transform unit, and determining estimated historical transform coefficients based on the historical values.

[0210] Aspect 9A. The method of aspect 8A, wherein the region is one of an entire area of ​​a picture, a slice, a tile, a group of coding tree units (CTUs), or a single CTU, and the method further includes resetting the history value when beginning to decode the region to a default history value.

[0211] Aspect 10A. The method of aspect 9A, further comprising determining a default history value based on a bit depth of the coded data.

[0212] Aspect 11A. The method of any of aspects 9A or 10A, further comprising determining the default history value based on a quantization parameter or based on data signaled in a bitstream that includes an encoded version of the video data.

[0213] Aspect 12A. The method of any of aspects 8A to 11A, wherein determining the historical value includes determining an average Rice parameter among the transform units associated with the current transform coefficient, and determining the historical value based on the average Rice parameter.

[0214] Embodiment 13A. A device for coding video data, the device comprising one or more means for implementing the method of any of embodiments 1A-12A.

[0215] Embodiment 14A. The device of embodiment 13A, wherein the one or more means comprise one or more processors implemented in circuitry.

[0216] Embodiment 15A. The device of any of embodiments 13A or 14A, further comprising a memory for storing video data.

[0217] Embodiment 16A. The device of any of embodiments 13A-15A, further comprising a display configured to display the decoded video data.

[0218] Aspect 17A. The device of any of Aspects 13A-16A, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0219] Embodiment 18A. The device of any of embodiments 13A-17A, wherein the device includes a video decoder.

[0220] Embodiment 19A. The device of any of embodiments 13A-18A, wherein the device comprises a video encoder.

[0221] Aspect 20A. A computer-readable storage medium having stored thereon instructions that, when executed, cause one or more processors to perform the method of any of Aspects 1A-12A.

[0222] Aspect 1B: A method of decoding video data, comprising: initializing coefficient statistics; and updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the block of video data, wherein updating the coefficient statistics comprises performing a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, the derivation process being determined based at least in part on which encoding method of a plurality of encoding procedures is used to encode each transform coefficient, the plurality of encoding procedures including a context-based procedure for encoding each transform coefficient and encoding each transform coefficient as an absolute value; and determining the coefficient statistics as an average of the coefficient statistics and the temporary value. determining a Rice parameter for a particular transform coefficient of the TB, the determining the Rice parameter for the particular transform coefficient including determining a local sum value based on the history value based on the particular transform coefficient being at a spatial position less than three away from the right boundary of the TB or the bottom boundary of the TB, and determining the Rice parameter for the particular transform coefficient based on the local sum value; determining a level of the particular transform coefficient based on the Rice parameter for the particular transform coefficient and one or more syntax elements coded in the bitstream; and decoding the block based on the level of the particular transform coefficient.

[0223] Aspect 2B: The method of aspect 1B, wherein the step of performing a derivation process to determine the temporary value includes a step of determining the temporary value based on applying a floor function to the binary logarithm of the remainder value of each transform coefficient based on each transform coefficient being coded using a context-based procedure, and adding an integer value.

[0224] Aspect 3B: The method of aspect 1B, wherein the step of performing a derivation process to determine the temporary value includes a step of determining the temporary value based on applying a floor function to the binary logarithm of the absolute level of each transform coefficient based on each transform coefficient being coded as an absolute value.

[0225] Aspect 4B: The method of aspect 1B, further comprising: determining a default history value based on a quantization parameter (QP) of a slice of a picture including the TB; and resetting the coefficient statistics to the default history value at the start of the picture partition.

[0226] Aspect 5B: The method of aspect 1B, wherein the method further includes storing the coefficient statistics as Rice parameter derivatives, and wherein determining the historical values ​​based on the coefficient statistics includes left-shifting 1 by the coefficient statistics.

[0227] Aspect 6B: A method of encoding video data, comprising: initializing coefficient statistics; and updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the video data, wherein updating the coefficient statistics comprises performing a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, wherein the derivation process is determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context-based procedure for encoding the respective transform coefficients and for encoding the respective transform coefficients as absolute values; The method includes the steps of: setting a coefficient statistic value as an average of the coefficient statistic value and a temporary value; determining a historical value based on the coefficient statistic value; determining a Rice parameter for a specific transform coefficient of the TB, wherein the step of determining the Rice parameter for the specific transform coefficient includes determining a local sum value based on the historical value based on the specific transform coefficient being a spatial position less than 3 away from the right boundary of the TB or the lower boundary of the TB; and determining a Rice parameter for the specific transform coefficient based on the local sum value; and generating a Rice code for the specific transform coefficient based on the Rice parameter for the specific transform coefficient and the level of the specific transform coefficient.

[0228] Aspect 7B: The method of aspect 6B, wherein the step of performing a derivation process to determine the temporary value includes a step of determining the temporary value based on applying a floor function to the binary logarithm of the remainder value of each transform coefficient based on the fact that each transform coefficient was coded using a context-based procedure, and adding an integer value.

[0229] Aspect 8B: The method of aspect 6B, wherein the step of performing a derivation process to determine the temporary value includes a step of determining the temporary value based on applying a floor function to the binary logarithm value of the absolute level of each transform coefficient based on each transform coefficient being coded as an absolute value.

[0230] Aspect 9B: The method of aspect 6B, further comprising: determining a default history value based on a quantization parameter (QP) of a slice of a picture including the TB; and resetting the coefficient statistics to the default history value at the start of the picture partition.

[0231] Aspect 10B: The method of aspect 6B, wherein the method further includes storing the coefficient statistics as Rice parameter derivatives, and wherein determining the historical values ​​based on the coefficient statistics includes left-shifting 1 by the coefficient statistics.

[0232] Aspect 11B: A device for decoding video data, comprising: a memory configured to store the video data; and processing circuitry; the processing circuitry initializing coefficient statistics and updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the block of video data; and, as part of updating the coefficient statistics, the processing circuitry performing a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, the derivation process being determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context base for encoding the respective transform coefficients and encoding the respective transform coefficients as absolute values. determining a history value based on the coefficient statistics; and determining a Rice parameter for a particular transform coefficient of the TB, wherein the processing circuitry is configured to, as part of determining the Rice parameter for the particular transform coefficient, determine a local sum value based on the history value based on the particular transform coefficient being less than three spatial positions away from a right boundary of the TB or a bottom boundary of the TB, and determine the Rice parameter for the particular transform coefficient based on the local sum value; determining a level of the particular transform coefficient based on the Rice parameter for the particular transform coefficient; and decoding the block based on the level of the particular transform coefficient.

[0233] Aspect 12B: The device of aspect 11B, wherein the processing circuitry is configured, as part of performing the derivation process to determine the temporary value, to determine the temporary value based on applying a floor function to the binary logarithm of the remainder value of each transform coefficient and adding an integer value, based on each transform coefficient being coded using a context-based procedure, and to determine the temporary value based on applying a floor function to the binary logarithm of the absolute level of each transform coefficient, based on each transform coefficient being coded as an absolute value.

[0234] Aspect 13B: The device of aspect 11B, wherein the processing circuitry is further configured to determine a default history value based on a quantization parameter (QP) of a slice of a picture including the TB, and to reset the coefficient statistics to the default history value at the start of the picture partition.

[0235] Embodiment 14B: The device of embodiment 11B, wherein the processing circuitry is further configured to store the coefficient statistics as a Rice parameter derivative, and wherein the processing circuitry is configured to left-shift 1s by the coefficient statistics as part of determining the history value based on the coefficient statistics.

[0236] Embodiment 15B: The device of embodiment 11B, further comprising a display configured to display the decoded video data.

[0237] Aspect 16B: The device of aspect 11B, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0238] Aspect 17B: A device for encoding video data, comprising: a memory configured to store the video data; and processing circuitry; the processing circuitry initializing coefficient statistics and updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the video data; and, as part of updating the coefficient statistics, the processing circuitry performing a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, the derivation process being determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context for encoding the respective transform coefficients and encoding the respective transform coefficients as absolute values. determining a Rice parameter for a particular transform coefficient of the TB, the processing circuitry being configured to: determine a local sum value based on the history value based on the particular transform coefficient being less than three spatial positions away from the right boundary of the TB or the bottom boundary of the TB; and determine a Rice parameter for the particular transform coefficient based on the local sum value as part of determining the Rice parameter for the particular transform coefficient; and generating a Rice code for the particular transform coefficient based on the Rice parameter for the particular transform coefficient and the level of the particular transform coefficient.

[0239] Aspect 18B: The device of aspect 17B, wherein the processing circuitry is configured, as part of performing a derivation process to determine the temporary value, to determine the temporary value based on applying a floor function to the binary logarithm of the remainder value of each transform coefficient and adding an integer value, based on each transform coefficient being coded using a context-based procedure, and to determine the temporary value based on applying a floor function to the binary logarithm of the absolute level of each transform coefficient, based on each transform coefficient being coded as an absolute value.

[0240] Aspect 19B: The device of aspect 17B, wherein the processing circuitry is further configured to determine a default history value based on a quantization parameter (QP) of a slice of a picture including the TB, and to reset the coefficient statistics to the default history value at the start of the picture partition.

[0241] Aspect 20B: The device of aspect 17B, wherein the processing circuitry is further configured to store the coefficient statistics as a Rice parameter derivative, and wherein the processing circuitry is configured to left-shift 1s by the coefficient statistics as part of determining the history value based on the coefficient statistics.

[0242] Aspect 21B: The device of aspect 17B, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0243] Aspect 1C: A method of decoding video data, comprising: initializing coefficient statistics; and updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the block of video data, wherein updating the coefficient statistics comprises performing a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, the derivation process being determined based at least in part on which encoding method of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context-based procedure for encoding the respective transform coefficients and encoding the respective transform coefficients as absolute values; and determining a Rice parameter for a particular transform coefficient of the TB, the determining the Rice parameter for the particular transform coefficient including determining a local sum value based on the history value based on the particular transform coefficient being at a spatial position less than three away from the right boundary of the TB or the bottom boundary of the TB, and determining the Rice parameter for the particular transform coefficient based on the local sum value; determining a level of the particular transform coefficient based on the Rice parameter for the particular transform coefficient and one or more syntax elements coded in the bitstream; and decoding the block based on the level of the particular transform coefficient.

[0244] Aspect 2C: The method of Aspect 1C, wherein the step of performing a derivation process to determine the temporary value includes a step of determining the temporary value based on applying a floor function to the binary logarithm of the remainder value of each transform coefficient, based on each transform coefficient being coded using a context-based procedure, and adding an integer value.

[0245] Aspect 3C: The method of Aspect 1C, wherein the step of performing a derivation process to determine the temporary value includes a step of determining the temporary value based on applying a floor function to the binary logarithm of the absolute level of each transform coefficient based on each transform coefficient being coded as an absolute value.

[0246] Aspect 4C: The method of any of aspects 1C to 3C, further comprising: determining a default history value based on a quantization parameter (QP) of a slice of a picture including the TB; and resetting the coefficient statistics to the default history value at the start of the picture partition.

[0247] Aspect 5C: The method of any of aspects 1C to 4C, wherein the method further includes storing the coefficient statistics as Rice parameter derivatives, and wherein determining the historical values ​​based on the coefficient statistics includes left-shifting 1 by the coefficient statistics.

[0248] Aspect 6C: A method of encoding video data, comprising: initializing coefficient statistics; and updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the video data, wherein the updating of the coefficient statistics comprises performing a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, wherein the derivation process is determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context-based procedure for encoding the respective transform coefficients and encoding the respective transform coefficients as absolute values; The method includes the steps of: setting a coefficient statistic value as an average of the coefficient statistic value and a temporary value; determining a historical value based on the coefficient statistic value; determining a Rice parameter for a specific transform coefficient of the TB, wherein the step of determining the Rice parameter for the specific transform coefficient includes determining a local sum value based on the historical value based on the specific transform coefficient being a spatial position less than 3 away from the right boundary of the TB or the lower boundary of the TB; and determining a Rice parameter for the specific transform coefficient based on the local sum value; and generating a Rice code for the specific transform coefficient based on the Rice parameter for the specific transform coefficient and the level of the specific transform coefficient.

[0249] Aspect 7C: The method of aspect 6C, wherein the step of performing a derivation process to determine a temporary value includes a step of determining the temporary value based on applying a floor function to the binary logarithm of the remainder value of each transform coefficient, based on the fact that each transform coefficient was coded using a context-based procedure, and adding an integer value.

[0250] Aspect 8C: The method of aspect 6C, wherein the step of performing a derivation process to determine the temporary value includes a step of determining the temporary value based on applying a floor function to the binary logarithm value of the absolute level of each transform coefficient based on each transform coefficient being coded as an absolute value.

[0251] Aspect 9C: Any of the methods of aspects 6C to 8C, further comprising: determining a default history value based on a quantization parameter (QP) of a slice of a picture including the TB; and resetting the coefficient statistics to the default history value at the start of the picture partition.

[0252] Aspect 10C: The method of any of aspects 6C to 9C, wherein the method further includes storing the coefficient statistics as Rice parameter derivatives, and wherein determining the historical values ​​based on the coefficient statistics includes left-shifting 1 by the coefficient statistics.

[0253] Aspect 11C: A device for decoding video data, comprising: a memory configured to store the video data; and processing circuitry; the processing circuitry initializing coefficient statistics and updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the block of video data; and as part of updating the coefficient statistics, the processing circuitry performing a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, the derivation process being determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context base for encoding the respective transform coefficients and encoding the respective transform coefficients as absolute values. determining a history value based on the coefficient statistics; and determining a Rice parameter for a particular transform coefficient of the TB, wherein the processing circuitry is configured to, as part of determining the Rice parameter for the particular transform coefficient, determine a local sum value based on the history value based on the particular transform coefficient being less than three spatial positions away from a right boundary of the TB or a bottom boundary of the TB, and determine the Rice parameter for the particular transform coefficient based on the local sum value; determining a level of the particular transform coefficient based on the Rice parameter for the particular transform coefficient; and decoding the block based on the level of the particular transform coefficient.

[0254] Aspect 12C: The device of aspect 11C, wherein the processing circuitry is configured, as part of performing the derivation process to determine the temporary value, to determine the temporary value based on applying a floor function to the binary logarithm of a remainder value of each transform coefficient and adding an integer value, based on each transform coefficient being coded using a context-based procedure, and to determine the temporary value based on applying a floor function to the binary logarithm of an absolute level of each transform coefficient, based on each transform coefficient being coded as an absolute value.

[0255] Aspect 13C: A device of any of aspects 11C and 12C, wherein the processing circuitry is further configured to determine a default history value based on a quantization parameter (QP) of a slice of a picture including the TB, and to reset the coefficient statistics to the default history value at the start of the partition of the picture.

[0256] Embodiment 14C: The device of any of embodiments 11C to 13C, wherein the processing circuitry is further configured to store the coefficient statistics as a Rice parameter derivative, and wherein the processing circuitry is configured to left-shift 1s by the coefficient statistics as part of determining the history value based on the coefficient statistics.

[0257] Embodiment 15C: The device of any of embodiments 11C to 14C, further comprising a display configured to display the decoded video data.

[0258] Aspect 16C: The device of any of aspects 11C to 15C, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0259] Aspect 17C: A device for encoding video data, comprising: a memory configured to store the video data; and processing circuitry; the processing circuitry initializing coefficient statistics; and updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the video data, wherein the processing circuitry, as part of updating the coefficient statistics, performs a derivation process to determine a temporary value for each respective transform coefficient of the one or more transform coefficients of the TB, wherein the derivation process is determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, wherein the plurality of encoding procedures are used to encode the respective transform coefficients and to encode the respective transform coefficients as absolute values. determining a Rice parameter for a particular transform coefficient of the TB, the processing circuitry being configured to: determine a local sum value based on the history value based on the particular transform coefficient being less than three spatial positions away from the right boundary of the TB or the bottom boundary of the TB; and determine a Rice parameter for the particular transform coefficient based on the local sum value as part of determining the Rice parameter for the particular transform coefficient; and generating a Rice code for the particular transform coefficient based on the Rice parameter for the particular transform coefficient and the level of the particular transform coefficient.

[0260] Aspect 18C: The device of aspect 17C, wherein the processing circuitry is configured, as part of performing a derivation process to determine the temporary value, to determine the temporary value based on applying a floor function to the binary logarithm of a remainder value of each transform coefficient and adding an integer value, based on each transform coefficient being coded using a context-based procedure, and to determine the temporary value based on applying a floor function to the binary logarithm of an absolute level of each transform coefficient, based on each transform coefficient being coded as an absolute value.

[0261] Aspect 19C: A device of any of aspects 17C and 18C, wherein the processing circuitry is further configured to determine a default history value based on a quantization parameter (QP) of a slice of a picture including the TB, and to reset the coefficient statistics to the default history value at the start of the partition of the picture.

[0262] Embodiment 20C: The device of any of embodiments 17C to 19C, wherein the processing circuitry is further configured to store the coefficient statistics as a Rice parameter derivative, and wherein the processing circuitry is configured to left-shift 1s by the coefficient statistics as part of determining the history value based on the coefficient statistics.

[0263] Aspect 21C: The device of any of aspects 17C to 20C, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0264] It should be appreciated that, depending on the example, some acts or events of any of the techniques described herein may be performed in a different sequence, added, combined, or entirely excluded (e.g., not all described acts or events may be necessary to practice the techniques). Furthermore, in some examples, acts or events may be performed simultaneously rather than sequentially, for example, through multithreaded processing, interrupt processing, or multiple processors.

[0265] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted via a computer-readable medium as one or more instructions or code and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which correspond to tangible media such as data storage media, or communication media, including any medium that facilitates transfer of a computer program from one place to another, for example, according to a communications protocol. As such, computer-readable media may generally correspond to (1) tangible computer-readable storage media that are non-transitory, or (2) a communication medium such as a signal or carrier wave. Data storage media may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementing the techniques described in this disclosure. A computer program product may include a computer-readable medium.

[0266] By way of example, and not limitation, such computer-readable storage media may comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included within the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead cover non-transitory tangible storage media. As used herein, disk and disc include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically and discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0267] The instructions may be executed by one or more processors, such as one or more DSPs, general-purpose microprocessors, ASICs, FPGAs, or other equivalent integrated or discrete logic circuitry. Accordingly, the terms "processor" and "processing circuitry," as used herein, may refer to any of the above structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Also, the techniques may be implemented entirely in one or more circuits or logic elements.

[0268] The techniques of this disclosure may be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this disclosure to highlight functional aspects of devices configured to implement the disclosed techniques, but they do not necessarily require realization by different hardware units. Rather, as explained above, the various units may be combined in a codec hardware unit or may be provided by a collection of interoperable hardware units, including one or more processors as described above, along with appropriate software and / or firmware.

[0269] Various examples have been described. These and other examples are within the scope of the following claims. [Explanation of symbols]

[0270] 100 Video encoding and decoding system, system 102 Source Devices 104 Video Sources 106 memory 108 Output Interface 110 Computer-Readable Medium 112 Storage Devices 114 File Server 116 Destination Device 118 Display Devices 120 memory 122 input interface 200 Video Encoder 202 Mode Selection Unit 204 Residual Generation Unit 206 Conversion Processing Unit 208 quantization units 210 Inverse Quantization Unit 212 Inverse Transformation Processing Unit 214 Reconstruction Unit 216 Filter Unit 218 Decoded Picture Buffer (DPB) 220 Entropy Coding Unit 222 Motion Estimation Unit 224 Motion Compensation Unit 226 intra prediction units 228 Rice Encoding Unit (REU) 230 video data memory 232 CABAC unit 300 Video Decoder 302 Entropy Decoding Unit 304 Prediction Processing Unit 306 Inverse Quantization Unit 308 Inverse Transformation Processing Unit 310 Reconstruction Unit 312 Filter Unit 314 Decoded Picture Buffer (DPB) 316 Motion Compensation Unit 318 Intra Prediction Units 320 Coded Picture Buffer (CPB) memory 322 Rice Decoding Unit (RDU) 324 CABAC unit< / tcoeff> < / tcoeff>

Claims

1. 1. A method for decoding video data, comprising: initializing coefficient statistics; updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the block of video data, the step of updating the coefficient statistics comprising, for each respective transform coefficient of the one or more transform coefficients of the TB: i) performing a derivation process to determine a temporary value; and ii) setting the coefficient statistics as an average of the coefficient statistics and the temporary value, the derivation process being determined at least in part based on which encoding method of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context-based procedure for encoding the respective transform coefficients and for encoding the respective transform coefficients as absolute values; determining historical values ​​based on the coefficient statistics; determining a Rice parameter for a particular transform coefficient of the TB, the determining the Rice parameter for the particular transform coefficient comprising: i) determining a local sum value based on the history value based on the particular transform coefficient being at a spatial position less than three away from a right boundary of the TB or a bottom boundary of the TB; and ii) determining the Rice parameter for the particular transform coefficient based on the local sum value; determining a level of the particular transform coefficient based on the Rice parameter for the particular transform coefficient and one or more syntax elements coded in a bitstream; and decoding the block based on the level of the particular transform coefficient.

2. Implementing the derivation process to determine the temporary value comprises:

2. The method of claim 1, further comprising: determining the temporary value based on applying a floor function to a binary logarithm of a remainder value of the respective transform coefficient and adding an integer value based on the respective transform coefficient being coded using the context-based procedure.

3. Implementing the derivation process to determine the temporary value comprises:

2. The method of claim 1, further comprising determining the temporary value based on applying a floor function to a binary logarithmic value of the absolute level of the respective transform coefficient based on the respective transform coefficient being coded as an absolute value.

4. determining a default history value based on a quantization parameter (QP) of a slice of a picture including the TB; and resetting the coefficient statistics to the default historical values ​​at the start of the partitioning of the picture.

5. The method further includes storing the coefficient statistics as a Rice parameter derivative; The method of claim 1 , wherein determining the historical value based on the coefficient statistic comprises left-shifting 1 by the coefficient statistic.

6. 1. A method for encoding video data, comprising: initializing coefficient statistics; updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the video data, wherein the step of updating the coefficient statistics comprises, for each respective transform coefficient of the one or more transform coefficients of the TB: i) performing a derivation process to determine a temporary value; and ii) setting the coefficient statistics as an average of the coefficient statistics and the temporary value, wherein the derivation process is determined at least in part based on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context-based procedure for encoding the respective transform coefficients and for encoding the respective transform coefficients as absolute values; determining historical values ​​based on the coefficient statistics; determining a Rice parameter for a particular transform coefficient of the TB, the determining the Rice parameter for the particular transform coefficient comprising: i) determining a local sum value based on the history value based on the particular transform coefficient being at a spatial position less than three away from a right boundary of the TB or a bottom boundary of the TB; and ii) determining the Rice parameter for the particular transform coefficient based on the local sum value; generating a Rice code for the particular transform coefficient based on the Rice parameter for the particular transform coefficient and a level of the particular transform coefficient.

7. 1. A device for decoding video data, comprising: a memory configured to store the video data; and processing circuitry, the processing circuitry comprising: initializing coefficient statistics; updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the video data, wherein the processing circuitry, as part of updating the coefficient statistics, performs, for each respective transform coefficient of the one or more transform coefficients of the TB: i) a derivation process to determine a temporary value; and ii) setting the coefficient statistics as an average of the coefficient statistics and the temporary value, wherein the derivation process is determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context-based procedure for encoding the respective transform coefficients and for encoding the respective transform coefficients as absolute values; determining a historical value based on the coefficient statistics; determining a Rice parameter for a particular transform coefficient of the TB, wherein the processing circuitry is configured to, as part of determining the Rice parameter for the particular transform coefficient, i) determine a local sum value based on the history value based on the particular transform coefficient being less than three spatial positions away from a right boundary of the TB or a bottom boundary of the TB, and ii) determine the Rice parameter for the particular transform coefficient based on the local sum value; determining a level of the particular transform coefficient based on the Rice parameter for the particular transform coefficient; and decoding the TB based on the level of the particular transform coefficient.

8. The processing circuitry includes: determining a default history value based on a quantization parameter (QP) of a slice of a picture including the TB; The device of claim 7 , further configured to: resetting the coefficient statistics to the default history values ​​at the start of the partitioning of the picture.

9. the processing circuitry is further configured to store the coefficient statistics as a Rice parameter derivation; 8. The device of claim 7, wherein the processing circuitry is configured to left-shift 1's by the coefficient statistics as part of determining the history value based on the coefficient statistics.

10. The device of claim 7 , further comprising a display configured to display the decoded video data.

11. The device of claim 7 , wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

12. 1. A device for encoding video data, comprising: a memory configured to store the video data; and processing circuitry, the processing circuitry comprising: initializing coefficient statistics; updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the video data, wherein the processing circuitry, as part of updating the coefficient statistics, performs, for each respective transform coefficient of the one or more transform coefficients of the TB: i) a derivation process to determine a temporary value; and ii) setting the coefficient statistics as an average of the coefficient statistics and the temporary value, wherein the derivation process is determined based at least in part on which encoding procedure of a plurality of encoding procedures is used to encode the respective transform coefficients, the plurality of encoding procedures including a context-based procedure for encoding the respective transform coefficients and for encoding the respective transform coefficients as absolute values; determining a historical value based on the coefficient statistics; determining a Rice parameter for a particular transform coefficient of the TB, wherein the processing circuitry is configured to, as part of determining the Rice parameter for the particular transform coefficient, i) determine a local sum value based on the history value based on the particular transform coefficient being less than three spatial positions away from a right boundary of the TB or a bottom boundary of the TB, and ii) determine the Rice parameter for the particular transform coefficient based on the local sum value; generating a Rice code for the particular transform coefficient based on the Rice parameter for the particular transform coefficient and a level of the particular transform coefficient.

13. The processing circuitry includes: determining a default history value based on a quantization parameter (QP) of a slice of a picture including the TB; The device of claim 12 , further configured to: resetting the coefficient statistics to the default history values ​​at the start of the partitioning of the picture.

14. the processing circuitry is further configured to store the coefficient statistics as a Rice parameter derivation; 13. The device of claim 12, wherein the processing circuitry is configured to left-shift 1's by the coefficient statistics as part of determining the history value based on the coefficient statistics.

15. The device of claim 12 , wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

Citation Information

Patent Citations

  • Coding of Coefficient Levels in Video Coding

    JP2018529273A

  • Image decoding method and device using residual information in image coding system

    US20200177882A1