Low complexity history of rice parameter derivation for high bit-depth video coding

CN116584094BActive Publication Date: 2026-07-07QUALCOMM INC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
QUALCOMM INC
Filing Date
2021-12-21
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In high-bit depth video encoding and decoding, existing technologies struggle to accurately determine Rice parameters, leading to reduced encoding and decoding efficiency.

Method used

By initializing the coefficient statistics, updating the coefficient statistics based on the transform coefficients in the transform block of the video data, considering which of the multiple encoders was used to encode the transform coefficients, determining the Rice parameter using a context-based encoder, and combining historical values ​​and local sums to determine the Rice parameter of the current transform coefficient.

Benefits of technology

It improves the accuracy and efficiency of video encoding and decoding, and enhances the performance of the encoding and decoding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116584094B_ABST
    Figure CN116584094B_ABST
Patent Text Reader

Abstract

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

Description

[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. Technical Field

[0002] This disclosure relates to video encoding and video decoding. Background Technology

[0003] Digital video capabilities can be integrated into a wide variety of devices, including digital televisions, digital live broadcasting systems, wireless broadcasting systems, personal digital assistants (PDAs), laptops or desktop computers, tablets, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite wireless phones, so-called "smartphones," video conferencing equipment, video streaming devices, and more. Digital video devices implement video codec technologies, 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 these standards. By implementing these video codec technologies, video devices can more efficiently transmit, receive, encode, decode, and / or store digital video information.

[0004] Video coding and decoding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or eliminate inherent redundancy in video sequences. For block-based video coding and decoding, video slices (e.g., video pictures or portions of video pictures) can be segmented into video blocks, which may also be referred to as coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in an intra-frame coding (I) slice of a picture are encoded using spatial prediction relative to reference samples in adjacent blocks within the same picture. Video blocks in an inter-frame coding (P or B) slice of a picture can use either spatial prediction relative to reference samples in adjacent blocks within the same picture or temporal prediction relative to reference samples in other reference pictures. A picture may be called a frame, and a reference picture may be called a reference frame. Summary of the Invention

[0005] In summary, this disclosure describes a technique for deriving the Rice parameter in regular residual coding (RRC) for high-bit-depth coding. The proposed technique relates to extensions of video codec standards (e.g., Versatile Video Coding (VVC)), but can also be applied to other video codec standards. As described herein, a process for updating coefficient statistics used in determining the Rice parameter of transform coefficients can consider which of a plurality of coding procedures is used to encode the corresponding transform coefficients. The plurality of coding procedures includes context-based procedures for encoding the corresponding transform coefficients and encoding the corresponding transform coefficients as absolute values. Determining the Rice parameter based at least in part on the coding procedure used to encode the corresponding transform coefficients can increase the accuracy of the Rice parameter selection, which can enhance coding efficiency.

[0006] In one example, this disclosure describes a method for decoding video data, the method comprising: initializing coefficient statistics; updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of video data, wherein updating the coefficient statistics comprises, for each corresponding transform coefficient of the one or more transform coefficients of the TB: performing a derivation process to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding programs is used to encode the corresponding transform coefficient, the plurality of encoding programs including a context-based program for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value; and setting the coefficient statistics to the average of the coefficient statistics and the temporary value; determining historical values ​​based on the coefficient statistics; determining a Rice parameter of a specific transform coefficient of the TB, wherein determining the Rice parameter of the specific transform coefficient comprises: determining a local sum based on the historical value based on the specific transform coefficient being less than 3 spatial locations from the right boundary or the bottom boundary of the TB; and determining the Rice parameter of the specific transform coefficient based on the local sum; determining a level of the specific transform coefficient based on the Rice parameter of the specific transform coefficient and one or more syntax elements encoded in the bitstream; and decoding the TB based on the level of the specific transform coefficient.

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

[0008] In another example, this disclosure describes an apparatus for decoding video data, the apparatus comprising: a memory configured to store video data; and processing circuitry configured to: initialize coefficient statistics; and update the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the video data, wherein, as part of updating the coefficient statistics, the processing circuitry is configured to: for each corresponding transform coefficient of the one or more transform coefficients of the TB: perform a derivation process to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding programs is used to encode the corresponding transform coefficient, the plurality of encoding programs including those for encoding the corresponding transform coefficient. The process involves: encoding coefficients and encoding the corresponding transform coefficients as absolute values ​​using a context-based procedure; setting coefficient statistics as the average of coefficient statistics and temporary values; determining historical values ​​based on coefficient statistics; determining Rice parameters for specific transform coefficients of a TB, wherein, as part of determining the Rice parameters for specific transform coefficients, the processing circuitry is configured to: determine local sums based on historical values, based on the specific transform coefficient being less than 3 spatial locations from the right boundary or bottom boundary of the TB; determining the Rice parameters for specific transform coefficients based on local sums; determining the level of specific transform coefficients based on the Rice parameters for specific transform coefficients; and decoding the block based on the level of specific transform coefficients.

[0009] In another example, this disclosure describes an apparatus for encoding video data, the apparatus comprising: a memory configured to store video data; and processing circuitry configured 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, as part of updating the coefficient statistics, the processing circuitry is configured to: for each corresponding transform coefficient of the one or more transform coefficients of the TB: perform a derivation process to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding programs is used to encode the corresponding transform coefficient, the plurality of encoding programs including those for encoding the corresponding transform coefficient. The process involves encoding transform coefficients and encoding the corresponding transform coefficients as absolute values ​​using a context-based procedure; setting coefficient statistics as the average of coefficient statistics and temporary values; determining historical values ​​based on coefficient statistics; determining Rice parameters for specific transform coefficients of a TB, wherein, as part of determining the Rice parameters for specific transform coefficients, the processing circuit is configured to: determine local sums based on historical values, based on the specific transform coefficient being less than 3 spatial locations from the right boundary or bottom boundary of the TB; determine the Rice parameters for specific transform coefficients based on local sums; and generate Rice codes for specific transform coefficients based on the Rice parameters and the level of the specific transform coefficients.

[0010] In another example, this disclosure describes an apparatus for decoding video data, the apparatus comprising: components for initializing coefficient statistics; components for updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of a block of video data, wherein the components for updating the coefficient statistics include, for each corresponding transform coefficient of the one or more transform coefficients of the TB: components for performing a derivation process to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding programs is used to encode the corresponding transform coefficient, the plurality of encoding programs including those for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value based on an upper and lower bound. The document includes: a program for setting coefficient statistics to the average of coefficient statistics and temporary values; a program for determining historical values ​​based on coefficient statistics; a program for determining Rice parameters for a specific transform coefficient of a TB, wherein the program for determining Rice parameters includes, for a specific transform coefficient: a program for determining local sums based on historical values ​​based on the specific transform coefficient being less than 3 spatial locations from the right boundary or bottom boundary of the TB; a program for determining Rice parameters for a specific transform coefficient based on local sums; a program for determining the level of a specific transform coefficient based on the Rice parameters of a specific transform coefficient; and a program for decoding a block based on the level of a specific transform coefficient.

[0011] In another example, this disclosure describes an apparatus for encoding video data, the apparatus comprising: components for initializing coefficient statistics; components for updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of video data, wherein the components for updating the coefficient statistics include, for each respective transform coefficient of the one or more transform coefficients of the TB: components for performing a derivation process to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding programs is used to encode the respective transform coefficient, the plurality of encoding programs including encoding the respective transform coefficient and encoding the respective transform coefficient as an absolute value. The context-based program; and components for setting coefficient statistics to the average of coefficient statistics and temporary values; components for determining historical values ​​based on coefficient statistics; components for determining Rice parameters of specific transform coefficients of a TB, wherein the components for determining Rice parameters include, for a specific transform coefficient: components for determining local sums based on historical values ​​based on the specific transform coefficient being less than 3 spatial locations from the right boundary or bottom boundary of the TB; and components for determining Rice parameters of a specific transform coefficient based on local sums; and components for generating Rice codes of a specific transform coefficient based on the Rice parameters of the specific transform coefficient and the level of the specific transform coefficient.

[0012] In another example, this disclosure describes a computer-readable storage medium having instructions thereon that, when executed, cause one or more processors to: initialize coefficient statistics; 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 include, when executed, instructions causing the one or more processors to perform the following operations for each corresponding transform coefficient of the one or more transform coefficients of the TB: perform a derivation process to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding programs is used to encode the corresponding transform coefficient, the plurality of encoding programs including those for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient... The code is an absolute value-based context-based program; and sets the coefficient statistics to the average of the coefficient statistics and temporary values; determines historical values ​​based on the coefficient statistics; determines the Rice parameter of a specific transform coefficient of a TB, wherein the instructions that cause one or more processors to determine the Rice parameter of a specific transform coefficient include instructions that, when executed, cause one or more processors to perform the following operations: determine local sums based on historical values ​​based on the specific transform coefficient being less than 3 spatial locations from the right boundary or bottom boundary of the TB; and determine the Rice parameter of a specific transform coefficient based on the local sums; determine the level of a specific transform coefficient based on the Rice parameter of the specific transform coefficient and one or more syntax elements encoded in the bitstream; and decode the block based on the level of the specific transform coefficient.

[0013] In another example, this disclosure describes a computer-readable storage medium having instructions thereon that, when executed, cause one or more processors to: initialize coefficient statistics; 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 include, when executed, instructions causing the one or more processors to perform the following operations for each corresponding transform coefficient of the one or more transform coefficients of the TB: perform a derivation process to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding programs is used to encode the corresponding transform coefficient, the plurality of encoding programs including those for encoding the corresponding transform coefficient. The program encodes and encodes the corresponding transform coefficients into absolute values ​​based on a context; sets coefficient statistics to the average of coefficient statistics and temporary values; determines historical values ​​based on coefficient statistics; determines Rice parameters for specific transform coefficients of a TB, wherein the instructions that cause one or more processors to determine the Rice parameters for specific transform coefficients include instructions that, when executed, cause one or more processors to perform the following operations: determine local sums based on historical values ​​based on the fact that the specific transform coefficient is less than 3 spatial locations from the right boundary or bottom boundary of the TB; determine the Rice parameters for specific transform coefficients based on local sums; and generate Rice codes for specific transform coefficients based on the Rice parameters for specific transform coefficients and the level of specific transform coefficients.

[0014] Details of one or more examples are set forth in the accompanying drawings and the following description. Other features, objects, and advantages will become apparent from the specification, drawings, and claims. Attached Figure Description

[0015] Figure 1 This is a block diagram illustrating an example video encoding and decoding system that can perform the techniques of this disclosure.

[0016] Figure 2 This is a conceptual diagram illustrating examples of adjacent coefficients that can be used when calculating the local sum value of the current coefficients according to one or more techniques of this disclosure.

[0017] Figure 3 This is a conceptual diagram illustrating an example airspace region according to one or more techniques of this disclosure.

[0018] Figure 4A and Figure 4B This is a conceptual diagram illustrating an example quadtree-binary tree (QTBT) structure and a corresponding codec tree unit (CTU) according to one or more techniques of this disclosure.

[0019] Figure 5 This is a block diagram illustrating an example video encoder that can perform the techniques of this disclosure.

[0020] Figure 6 This is a block diagram illustrating an example video decoder that can perform the techniques disclosed herein.

[0021] Figure 7 This is a flowchart illustrating an example method for encoding the current block according to the technology of this disclosure.

[0022] Figure 8 This is a flowchart illustrating an example method for decoding the current block according to the technology of this disclosure.

[0023] Figure 9 This is a flowchart illustrating an example process for encoding video data according to one or more techniques disclosed herein.

[0024] Figure 10 This is a flowchart illustrating an example process for decoding video data according to one or more techniques according to this disclosure. Detailed Implementation

[0025] In video codec standards such as Video Multifunction Coding (VVC), the video encoder generates residual samples. Residual samples indicate the difference between the predicted samples of a block and the original samples of the block. The video encoder can then apply a transform (e.g., discrete cosine transform) to the block of residual samples (e.g., a transform block (TB)) to generate transform coefficients. Each transform coefficient can be represented as one or more syntax elements. In some examples, transform coefficients can be encoded using a context-based procedure (e.g., a method), where the level of the transform coefficient can be represented using a sign syntax element, a greater than 1 syntax element, a greater than 2 syntax element, and a remainder syntax element. In some examples, transform coefficients can be encoded using an absolute value syntax element (e.g., dec_abs_level). The remainder syntax element, or absolute value, typically includes the most bits.

[0026] Video encoders can use Rice codecs to encode remainder syntax elements or absolute value syntax elements. Rice codec is a process where input values ​​(e.g., the values ​​of remainder syntax elements) are used to generate Rice codes that include prefix and suffix values. The prefix value can be generated as: Where q is a prefix, x is the input value, and M equals 2. k , where k is the Rice parameter. The suffix value can be generated as: r = x - qM, where r is the suffix.

[0027] Different values ​​for the Rice parameter can be advantageous in different situations. Accordingly, VVC provides a procedure for determining the Rice parameter used when performing Rice encoding / decoding on remainder syntax elements or absolute value syntax elements. Specifically, the local sum value (e.g., locSumAbs) can be determined by summing the absolute values ​​of five adjacent transform coefficients. The terms "locSumAbs" and "localSumAbs" are used interchangeably. The positions of the five adjacent transform coefficients are defined by the template. The local sum value can then be used as an index to look up the Rice parameter in a table. However, some modifications may be needed, for example, when using high-bit depth extensions of VVC, because the local sum value may be larger than the maximum index value defined in the table.

[0028] Another complex aspect of determining the Rice parameter is that the current transform coefficient may be less than three rows or three columns of the right and bottom boundaries of the current TB. Attempting to use adjacent transform coefficients defined by a template can reduce the accuracy of the process used to determine the Rice parameter of the current transform coefficient. To address this, VVC defines a history-based procedure for determining the Rice parameter of the current TB. When using a history-based procedure to determine the Rice parameter of the current transform coefficient in the current Rice class of the current TB, the video codec can use historical values ​​(e.g., histCoeff) as values ​​of adjacent transform coefficients within two positions at the right or bottom boundaries of the current TB.

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

[0030] However, as mentioned above, transform coefficients can be encoded using a context-based procedure or using absolute values. While it's possible to encode transform coefficients using either a context-based procedure or using absolute values, updating coefficient statistics in the same way can degrade performance and may lead to incorrect selection of the Rice parameter. According to one or more techniques of this disclosure, a video codec (e.g., a video encoder or video decoder) can update coefficient statistics based on one or more transform coefficients of a TB of video data. As part of updating the coefficient statistics, the video codec can perform a derivation process for each corresponding transform coefficient in the one or more transform coefficients of the TB to determine a temporary value. The derivation process considers which of a plurality of encoding procedures was used to encode the corresponding transform coefficient (i.e., the derivation process is determined at least in part based on this consideration). The plurality of encoding procedures includes a context-based procedure for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value. The video codec can set the coefficient statistics to the average of the coefficient statistics and the temporary value. Because the derivation process is determined at least in part based on which encoding procedure was used to encode the corresponding transform coefficient, the video codec is more likely to determine the optimal Rice parameter for the corresponding transform coefficient. The video encoder is likely more likely to determine the optimal Rice parameters for the corresponding transform coefficients because VVC defines a “hybrid” procedure for encoding and decoding the regular residual coefficients (RRCs). In this “hybrid” procedure, depending on the mode, the video codec can perform CABAC encoding and decoding of the RRC in bypass mode (i.e., the Exponential-Golomb procedure with the number of bits used to represent the coefficients depends on the Rice parameters derived from local template processing), or it can perform CABAC encoding and decoding of the RRC using a combination of context encoding and decoding of the first bit of the RRC and bypass encoding and decoding of the remaining bits of the RRC (using the Rice derivation). This “hybrid” procedure will be described in more detail below.

[0031] Figure 1 This is a block diagram illustrating an example video encoding and decoding system 100 capable of implementing the techniques of this disclosure. The techniques of this disclosure are generally directed to encoding and / or decoding video data. In general, video data includes any data used for processing video. Therefore, video data can include raw, unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling data.

[0032] like Figure 1As shown, in this example, system 100 includes source device 102, which provides encoded video data to be decoded and displayed by destination device 116. Specifically, source device 102 provides video data to destination device 116 via computer-readable medium 110. Source device 102 and destination device 116 can include any of a wide variety of devices, including desktop computers, laptop computers, mobile devices, tablet computers, set-top boxes, mobile phones (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.

[0033] exist Figure 1 In the example, source device 102 includes a video source 104, memory 106, video encoder 200, and output interface 108. Destination device 116 includes an input interface 122, video decoder 300, memory 120, and display device 118. According to this disclosure, the video encoder 200 of source device 102 and the video decoder 300 of destination device 116 can be configured to apply techniques used for Rice parameter derivation to regular residual coding (RRC) in high-bit depth coding. Thus, source device 102 represents an example of a video encoding device, while 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.

[0034] like Figure 1 The system 100 shown is merely an example. Generally, any digital video encoding and / or decoding device can perform the technique of Rice parameter derivation for RRC in high-bit-depth encoding and decoding. Source device 102 and destination device 116 are merely examples of such encoding and decoding devices, where source device 102 generates encoded and decoded video data for transmission to destination device 116. This disclosure refers to a “encoding and decoding” device as a device that performs the encoding and / or decoding of data. Thus, video encoder 200 and video decoder 300 represent examples of encoding and decoding devices, specifically a video encoder and a video decoder, respectively. In some examples, source device 102 and destination device 116 can operate in a substantially symmetrical manner, such that each of source device 102 and destination device 116 includes video encoding and decoding components. Therefore, system 100 can support one-way or two-way video transmission between source device 102 and destination device 116, for example, for video streaming, video playback, video broadcasting, or video telephony.

[0035] Generally, video source 104 represents the source of video data (i.e., raw, unencoded video data) and provides a continuous series of pictures (also called “frames”) of video data to video encoder 200, which encodes the data of the pictures. Video source 104 of source device 102 may include video capture devices such as cameras, video archives containing previously captured raw video, and / or video feed interfaces for receiving video from video content providers. As a further alternative, video source 104 may generate computer graphics-based data as source video, or a combination of live video, archived video, and computer-generated video. In each case, video encoder 200 encodes the captured, pre-captured, or computer-generated video data. Video encoder 200 may rearrange the pictures from the received order (sometimes referred to as “display order”) into an encoding / decoding order for encoding and decoding. Video encoder 200 may generate a bitstream comprising encoded video data. The source device 102 can then output the encoded video data to a computer-readable medium 110 via the output interface 108 for reception and / or retrieval, for example, by the input interface 122 of the destination device 116.

[0036] The memory 106 of source device 102 and the memory 120 of destination device 116 represent general-purpose memory. In some examples, memories 106 and 120 may store raw video data, such as raw video from video source 104 and raw decoded video data from video decoder 300. Additionally or alternatively, memories 106 and 120 may store software instructions executable by, for example, video encoder 200 and video decoder 300. Although memories 106 and 120 are shown as 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, memories 106 and 120 may store encoded video data, such as video data output from video encoder 200 and input to video decoder 300. In some examples, portions of memories 106 and 120 may be allocated as one or more video buffers, for example, to store raw decoded and / or encoded video data.

[0037] Computer-readable medium 110 can represent any type of medium or device capable of transmitting encoded video data from source device 102 to destination device 116. In one example, computer-readable medium 110 represents a communication medium enabling source device 102 to transmit encoded video data directly to destination device 116 in real time (e.g., via a radio frequency network or a computer-based network). According to a communication standard such as a wireless communication protocol, output interface 108 can modulate the transmitted signal including the encoded video data, and input interface 122 can demodulate the received transmitted signal. The communication medium can include any wireless or wired communication medium, such as radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium can 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 can include a router, switch, base station, or any other device that can be used to facilitate communication from source device 102 to destination device 116.

[0038] In some examples, source device 102 can output encoded data to storage device 112 from output interface 108. Similarly, destination device 116 can 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 hard disk drives, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.

[0039] In some examples, source device 102 may output encoded video data to file server 114 or another intermediate storage device that 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.

[0040] File server 114 can be any type of server device capable of storing encoded video data and transferring such encoded video data to destination device 116. File server 114 can represent a web server (e.g., for a website), a server configured to provide file transfer protocol services (such as 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), and HTTP Dynamic Streaming.

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

[0042] 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 where output interface 108 and input interface 122 include wireless components, output interface 108 and input interface 122 may be configured to transmit data (such as encoded video data) according to cellular communication standards (such as 4G, 4G-LTE (Long Term Evolution), Advanced LTE, 5G, etc.). In some examples where output interface 108 includes a wireless transmitter, output interface 108 and input interface 122 may be configured to comply with other wireless standards (such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee)). TM ),Bluetooth TM The source device 102 and / or destination device 116 may include corresponding system-on-a-chip (SoC) devices. For example, source device 102 may include an SoC device for performing functions attributed to video encoder 200 and / or output interface 108, and destination device 116 may include an SoC device for performing functions attributed to video decoder 300 and / or input interface 122.

[0043] The technology disclosed herein can be applied to video encoding and decoding that supports any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, internet streaming video transmission (such as HTTP-based Dynamic Adaptive Streaming (DASH)), digital video encoded onto a data storage medium, decoding digital video stored on a data storage medium, or other applications.

[0044] The input interface 122 of the destination device 116 receives an encoded video bitstream from a computer-readable medium 110 (e.g., a communication medium, storage device 112, 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. This signaling information may be syntax elements having values ​​describing the characteristics and / or processing of video blocks or other encoding / decoding units (e.g., slices, pictures, picture groups, sequences, etc.). The display device 118 displays a decoded image of the decoded video data to the 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 other types of display devices.

[0045] although Figure 1 Not shown, but in some examples, the video encoder 200 and video decoder 300 may each be integrated with the audio encoder and / or audio decoder, and may include appropriate MUX-DEMUX (multiplexing-demultiplexing) units or other hardware and / or software to handle multiplexed streams that include both audio and video in a common data stream. If applicable, the MUX-DEMUX unit may comply with the ITU H.223 multiplexer protocol, or other protocols such as the User Datagram Protocol (UDP).

[0046] The video encoder 200 and video decoder 300 can each be implemented as any of a variety of suitable encoder and / or decoder circuits, 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 these technologies are implemented in part in software, the device may store instructions for the software in a suitable non-transitory computer-readable medium and execute those instructions in hardware using one or more processors to perform the technologies of this disclosure. Each of the video encoder 200 and video decoder 300 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder / decoder (CODEC) in the respective device. Devices including the video encoder 200 and / or video decoder 300 may include integrated circuits, microprocessors, and / or wireless communication devices, such as cellular phones.

[0047] The video encoder 200 and video decoder 300 can operate according to video codec standards such as ITU-T H.265 (also known as High Efficiency Video Codec (HEVC)) or its extensions (such as Multi-View and / or Scalable Video Codec Extensions)). Alternatively, the video encoder 200 and video decoder 300 can operate according to other proprietary or industry standards such as ITU-T H.266 (also known as Versatile Video Codec (VVC)). The goal of VVC is to provide significant improvements in compression performance based on the existing HEVC standard to help deploy higher-quality video services and emerging applications such as 360° immersive multimedia and high-dynamic-range (HDR) video. The draft of the VVC standard is described in Bross et al.'s "Multi-functional Video Coding (Draft 10)" (the 18th meeting of the Joint Video Experts Team (JVET) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, held via teleconference, June 22 to July 1, 2020, JVET-S2001-vH (hereinafter referred to as "VVC Draft 10")). However, the technology disclosed herein is not limited to any particular codec standard.

[0048] Generally, the video encoder 200 and video decoder 300 can perform block-based encoding and decoding of images. The term "block" typically refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used during encoding and / or decoding). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Generally, the video encoder 200 and video decoder 300 can encode and decode video data represented in YUV (e.g., Y, Cb, Cr) format. That is, the video encoder 200 and video decoder 300 can encode and decode luminance and chrominance components, rather than encoding and decoding red, green, and blue (RGB) data of image samples, where the chrominance components may include both red hue chrominance components and blue hue chrominance components. In some examples, the video encoder 200 converts the received RGB format data to a YUV representation before encoding, and the video decoder 300 converts the YUV representation to RGB format. Alternatively, preprocessing and postprocessing units (not shown) may perform these conversions.

[0049] This disclosure can generally relate to the encoding and decoding (e.g., encoding and decoding) of images, including the process of encoding or decoding data of an image. Similarly, this disclosure can relate to the encoding and decoding of blocks of images, including the process of encoding or decoding data of blocks, such as predictive encoding / decoding and / or residual encoding / decoding. Encoded video bitstreams typically include a series of syntax element values ​​representing encoding / decoding decisions (e.g., encoding / decoding modes) and dividing the image into blocks. Therefore, references to encoding or decoding an image or block should generally be understood as encoding or decoding the values ​​of the syntax elements that form the image or block.

[0050] HEVC defines various blocks, including codec units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video codec (such as a video encoder 200) partitions a codec tree unit (CTU) into CUs according to a quadtree structure. That is, the video codec partitions the CTU and CU into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. Nodes without child nodes can be called "leaf nodes," and the CU of such leaf nodes can include one or more PUs and / or one or more TUs. The video codec can further partition PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents a partition of a TU. In HEVC, PUs represent inter-frame prediction data, while TUs represent residual data. CUs with intra-frame prediction include intra-frame prediction information, such as intra-frame mode indication.

[0051] As another example, video encoder 200 and video decoder 300 can be configured to operate according to VVC. According to VVC, the video codec (such as video encoder 200) segments the image into multiple codec tree units (CTUs). Video encoder 200 can segment 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 segmentation types, such as the separation between CUs, PUs, and TUs in HEVC. The QTBT structure includes two levels: a first level of segmentation based on quadtree segmentation and a second level of segmentation based on binary tree segmentation. The root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary tree correspond to codec units (CUs).

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

[0053] 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, while 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 the two chroma components (or two QTBT / MTT structures for the respective chroma components).

[0054] The video encoder 200 and video decoder 300 can be configured to use per-HEVC quadtree segmentation, QTBT segmentation, MTT segmentation, or other segmentation structures. For illustrative purposes, the description of the techniques disclosed herein is presented in relation to QTBT segmentation. However, it should be understood that the techniques disclosed herein can also be applied to video codecs configured to use quadtree segmentation or other types of segmentation.

[0055] In some examples, a CTU includes a code-decode tree block (CTB) of luma samples, two corresponding CTBs of chroma samples from an image with three sample arrays, or a CTB of samples from a monochrome image or an image encoded using three separate color planes and a syntax structure for encoding and decoding the samples. For a given N value, a CTB can be an N×N sample block such that dividing a component into a CTB is a partition. A component is an array or a single sample from one of the three arrays (one luma array and two chroma arrays) that make up a 4:2:0, 4:2:2, or 4:4:4 color format image, or an array or a single sample from an array or array that makes up a monochrome image. In some examples, for certain M and N values, a code-decode block is an M×N sample block such that dividing a CTB into a code-decode block is a partition.

[0056] In an image, blocks (e.g., CTUs or CUs) can be grouped in various ways. As an example, a brick can refer to a rectangular area of ​​a CTU row within a specific tile in an image. A tile can be a rectangular area of ​​CTUs within a specific tile column or a specific tile row in an image. A tile column is a rectangular area of ​​CTUs whose height is equal to the height of the image and whose width is specified by a syntax element (e.g., as in the image parameter set). A tile row is a rectangular area of ​​CTUs whose height is specified by a syntax element (e.g., as in the image parameter set) and whose width is equal to the width of the image.

[0057] In some examples, a slice can be divided into multiple bricks, each brick potentially including one or more CTU rows within the slice. A slice that is not divided into multiple bricks can also be called a brick. However, bricks that are a true subset of a slice may not be called a slice.

[0058] The bricks in an image can also be arranged into slices. A slice can be an integer number of bricks in the image, and it can be exclusively contained within a single network abstraction layer (NAL) unit. In some examples, a slice consists of multiple complete pieces or a continuous sequence of complete bricks consisting of only one piece.

[0059] This disclosure uses "N×N" and "N multiplied by N" interchangeably to refer to the sample size of a block (such as a CU or other video block) in the vertical and horizontal dimensions, for example, 16×16 samples or 16 by 16 samples. Generally, a 16×16 CU will have 16 samples in the vertical direction (y = 16) and 16 samples in the horizontal direction (x = 16). Similarly, an N×N CU typically 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 can be arranged in rows and columns. Furthermore, a CU does not necessarily need to have the same number of samples in the horizontal direction as it does in the vertical direction. For example, a CU may include N×M samples, where M is not necessarily equal to N.

[0060] The video encoder 200 encodes video data of the CU (Cubic Array), which represents prediction information and / or residual information, as well as other information. The prediction information indicates how the CU will be predicted to form a prediction block of the CU. The residual information typically represents the sample-by-sample difference between the CU samples before encoding and the prediction block.

[0061] To predict the Cubic Frame (CU), the video encoder 200 typically forms a prediction block of the CU through inter-frame prediction or intra-frame prediction. Inter-frame prediction generally refers to predicting the CU based on data from previously encoded images, while intra-frame prediction generally refers to predicting the CU based on data from previously encoded images of the same frame. To perform inter-frame prediction, the video encoder 200 can use one or more motion vectors to generate prediction blocks. The video encoder 200 can typically perform motion search to identify (e.g., in terms of the difference between the CU and a reference block) a reference block that closely matches the CU. The video encoder 200 can calculate a difference index using the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), or other such difference calculations to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 can use unidirectional or bidirectional prediction to predict the current CU.

[0062] Some examples of VVC also provide affine motion compensation modes that can be viewed as inter-frame prediction modes. In affine motion compensation mode, the video encoder 200 can determine two or more motion vectors representing non-translational motion (such as zooming in or out, rotation, perspective motion, or other irregular motion types).

[0063] To perform intra-frame prediction, the video encoder 200 can select an intra-frame prediction mode to generate prediction blocks. Some examples of VVC provide 67 intra-frame prediction modes, including various directional modes as well as planar and DC modes. Generally, the video encoder 200 selects an intra-frame prediction mode that describes the neighboring samples of the current block (e.g., the block of the CU), and predicts the samples of the current block according to that intra-frame prediction mode. Assuming the video encoder 200 encodes and decodes the CTU and CU in raster scan order (from left to right, from top to bottom), these samples are typically located above, to the upper left, or to the left of the current block in the same frame as the current block.

[0064] The video encoder 200 encodes data representing the prediction mode of the current block. For example, for inter-frame prediction modes, the video encoder 200 can encode data indicating which of the various available inter-frame prediction modes is used, along with the corresponding motion information. For example, for unidirectional or bidirectional inter-frame prediction, the video encoder 200 can encode motion vectors using advanced motion vector prediction (AMVP) or merge modes. The video encoder 200 can use similar modes to encode motion vectors for affine motion compensation modes.

[0065] After prediction (such as intra-frame or inter-frame prediction of a block), the video encoder 200 can compute residual data for the block. Residual data (such as a residual block) represents the sample-by-sample difference between the block and its predicted block formed using the corresponding prediction mode. The video encoder 200 can apply one or more transforms to a transform block (TB) within the residual block to produce transformed 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 are used interchangeably in this document. The video encoder 200 can apply a discrete cosine transform (DCT), integer transform, wavelet transform, or conceptually similar transforms to the residual video data. Additionally, the video encoder 200 can apply a second transform after the first transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), etc. The video encoder 200 produces transform coefficients after applying one or more transforms.

[0066] As described above, after any transform used to generate the transform coefficients, the video encoder 200 can perform quantization of the transform coefficients. Quantization generally refers to a process in which transform coefficients are quantized to minimize the amount of data used to represent them, thereby providing further compression. By performing the quantization process, the video encoder 200 can reduce the bit depth associated with some or all of the transform coefficients. For example, the video encoder 200 can round an n-bit value down to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, the video encoder 200 can perform a bitwise right shift of the value to be quantized.

[0067] After quantization, the video encoder 200 can scan the transform coefficients to generate a one-dimensional vector from a two-dimensional matrix containing the quantized transform coefficients. The scan can be designed to place higher-energy (and thus lower-frequency) transform coefficients before the vector and lower-energy (and thus higher-frequency) transform coefficients after the vector. In some examples, the video encoder 200 can utilize a predefined scan order to scan 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 can perform an adaptive scan. After scanning the quantized transform coefficients to form a one-dimensional vector, the video encoder 200 can entropy-encode the one-dimensional vector, for example, using context-adaptive binary arithmetic coding (CABAC). The video encoder 200 can also entropy-encode the values ​​of syntax elements describing metadata associated with the encoded video data for use by the video decoder 300 when decoding the video data.

[0068] To perform CABAC, the video encoder 200 can assign context within a context model to the symbols to be transmitted. The context may involve, for example, whether the neighboring values ​​of a symbol are zero. Probability determination can be based on the context assigned to the symbol.

[0069] The video encoder 200 can further generate syntax data (such as block-based syntax data, image-based syntax data, and sequence-based syntax data) from picture headers, block headers, slice headers, or other syntax data (such as sequence parameter sets (SPS), picture parameter sets (PPS), or video parameter sets (VPS)) and provide it to the video decoder 300. The video decoder 300 can also decode this syntax data to determine how to decode the corresponding video data.

[0070] In this way, the video encoder 200 can generate a bitstream that includes encoded video data (e.g., syntax elements describing the segmentation of an image into blocks (e.g., CUs) and prediction and / or residual information for the blocks). Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.

[0071] Generally, the video decoder 300 performs the inverse of the process performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 can use CABAC to decode the values ​​of the syntax elements of the bitstream in a manner largely similar to but inverse of the CABAC encoding process of the video encoder 200. The syntax elements can define segmentation information used to segment the image into CTUs and the segmentation of each CTU according to a corresponding segmentation structure (such as a QTBT structure) to define the CUs of the CTUs. The syntax elements can further define prediction information and residual information for blocks of video data (e.g., CUs).

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

[0073] Video encoder 200 can generate Rice code for transform coefficients. The Rice code can be an encoded version of syntax elements such as remainder syntax elements and absolute value syntax elements for transform coefficients. Video encoder 200 can entropy encode (e.g., CABAC encoding) the Rice code of the transform coefficients and include the resulting CABAC-encoded data in the bit stream. Video decoder 300 can apply entropy decoding (e.g., CABAC decoding) to the bit sequences in the bit stream to obtain the Rice code. Video decoder 300 can decode the Rice code to obtain decoded values, which can be used to recover the levels of the transform coefficients. Video encoder 200 and video decoder 300 can determine the Rice parameters used in generating and decoding the Rice code.

[0074] In VVC draft 10, a lookup table is used to derive the Rice parameter for Regular Residual Encoding and Decoding (RRC), taking into account the transform coefficient values ​​(i.e., levels) of adjacent transform coefficients in the template. The template for adjacent coefficients is as follows: Figure 2 As shown. Figure 2 This is a conceptual diagram illustrating examples of adjacent coefficients that can be used when calculating the local sum value of the current coefficients (e.g., localSumAbs). Specifically, in Figure 2 In the example, video encoder 200 or video decoder 300 is determining the Rice parameter of the current transform coefficient 250. Video encoder 200 and video decoder 300 may use the levels of adjacent transform coefficients 252A-252E (collectively referred to as "adjacent transform coefficients 252") when calculating local sums.

[0075] In VVC draft 10, a video codec (e.g., video encoder 200 or video decoder 300) can first compute a local sum (e.g., locSumAbs), which is the sum of the absolute values ​​of five available adjacent transform coefficients (e.g., adjacent transform coefficients 252) in the template. The video codec can then normalize locSumAbs as follows (e.g., using subtraction and clipping operations):

[0076] locSumAbs=Clip3(0,31,locSumAbs-baseLevel*5)

[0077] The video codec can use this locSumAbs with lookup tables (such as Table 1 below) to derive the Rice parameter. As shown in Table 1, in the design of VVC Draft 10, the Rice parameter range is constrained to be from 0 to 3.

[0078] Table 1: Rice parameter lookup table based on locSumAbs in the current specification

[0079] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3

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

[0081] For example, the video codec can scale or normalize localSumAbs before using it to derive the Rice parameters to handle the increase in bit depth or dynamic range of the transform coefficients, see, for example, Equation 1517 of VVC Draft 10. The amount of scaling factor can depend on the input bit depth, a predefined operating bit depth (e.g., 10), the local activity of the transform coefficients, the block size, or a syntax element that signals notification in the bitstream. The video encoder can then clip localSumAbs to a certain range (e.g., using the clipping procedure of localSumAbs in VVC Draft 10). The video codec can use the normalized and clipped localSumAbs to derive the Rice parameters using a predefined lookup table (such as the current lookup table in VVC Draft 10 (i.e., Table 1 given above)). In the case of normalizing localSumAbs in the first step of the proposed design, the video codec can derive the Rice parameters according to the predefined table and can modify the Rice parameters by adding an offset to extend the dynamic range of the Rice parameters.

[0082] The following text describes a procedure for determining the Rice parameters of the remainder syntax element (abs_remainder) or absolute value syntax element (dec_abs_level) for transform coefficients. 9.3.3.2 Derivation of Rice Parameters for abs_remainder[] and dec_abs_level[]

[0083] The inputs to this process are the base level (baseLevel), the color component index (cIdx), the brightness position (x0, y0) of the top-left sample of the current transform block relative to the top-left sample of the current image, the current coefficient scan position (xC, yC), the binary logarithm of the transform block width (log2TbWidth), and the binary logarithm of the transform block height (log2TbHeight).

[0084] The output of this process is the Rice parameter cRiceParam.

[0085] Given the array AbsLevel[x][y] of the transform block with component index cIdx and the top-left brightness position (x0, y0), the variable locSumAbs is specified through the following pseudocode procedure:

[0086] Code Listing 1

[0087]

[0088]

[0089] Given the variable locSumAbs, the Rice parameter cRiceParam is derived as shown in Table 128.

[0090] Then, cRiceParam is further refined into:

[0091] cRiceParam = cRiceParam + c

[0092] In some examples, variables a, b, and c can be defined as follows. In one example, b can specify the bit depth of the operation and can be set to 10; a can be set to an integer value, such as 4, or another power of 2; c can be set to the calculated shift value or derived from the shift value.

[0093] In another example of VVC Rice parameter derivation for addressing various input bit depths of video data, the video codec can scale / normalize localSumAbs when it is greater than or equal to a threshold. In this case, the relevant Rice parameter derivation in VVC Draft 10 can be modified accordingly as follows (using <!>…< / !> (Label indicates change):

[0094] 9.3.3.2 Derivation of Rice parameters for abs_remainder[] and dec_abs_level[]

[0095] The inputs to this process are the base level (baseLevel), the color component index (cIdx), the brightness position (x0, y0) of the top-left sample of the current transform block relative to the top-left sample of the current image, the current coefficient scan position (xC, yC), the binary logarithm of the transform block width (log2TbWidth), and the binary logarithm of the transform block height (log2TbHeight).

[0096] The output of this process is the Rice parameter cRiceParam.

[0097] Given the array AbsLevel[x][y] of the transform block with component index cIdx and the top-left brightness position (x0, y0), the variable locSumAbs is specified through the following pseudocode procedure:

[0098] Code Listing 2

[0099]

[0100] Given the variable locSumAbs, the Rice parameter cRiceParam is derived as shown in Table 128.

[0101] Then, cRiceParam is further refined into:

[0102] <! >cRiceParam=cRiceParam+c< / !>

[0103] In the example above, T is a predefined threshold. In one example, T could be set to 32. In some examples, the values ​​of variables a, b, and c are signaled via the bitstream (i.e., encoded in the bitstream), or set or derived based on bit depth, local statistics (e.g., the minimum / maximum or mean of transform coefficient values ​​within the current block), the decoded transform or block size, or syntax elements that signal in the bitstream.

[0104] Furthermore, the spatial location of the decoded transform coefficients within the TU (or TB) can be classified based on the expected accuracy of the template-based derivation procedure. Figure 3 Example categories are shown. Figure 3 This is a conceptual diagram showing an example airspace region of TB 350. Figure 3 In the example, TB 350 includes the current transform coefficient 352 and the adjacent transform coefficients 354A-354E (collectively referred to as "adjacent transform coefficients 354"). Furthermore, in Figure 3 In the example, the transform coefficients (class C1) with spatial locations outlined by thick lines are expected to have an accurate Rice derivation according to a template-based procedure (e.g., as defined in clause 9.3.3.2 VVC), and possible modifications to the template-based procedure described above in this document. In other words, the Rice parameter (riceParam) of the transform coefficients in class C1 can be described as:

[0105] riceParam=template_based_method()

[0106] For class (C4), the transform coefficients with spatial locations outlined by thick lines are not expected to have an accurate Rice derivation according to a template-based procedure. Therefore, a history-based derivation procedure can be used instead. In other words, the Rice parameter (riceParam) of the transform coefficients in class C4 can be described as:

[0107] riceParam=history_based_method()

[0108] For classes C2 or C3, coefficients having an空域位置(此处原文“空域位置”表述有误,推测可能是“空域位置信息”之类,按“空域位置信息”翻译) outlined by thick lines are expected to have a Rice derivation with reduced accuracy according to a template-based procedure, and the accuracy can be improved by considering Rice estimates, provided that these Rice estimates are derived from the history of the decoded coefficients. Thus, the Rice parameter of the transform coefficients in classes C2 or C3 can be derived based on the Rice parameters derived by a template-based procedure and / or a history-based procedure. In other words, the Rice parameter (riceParam) of the transform coefficients in classes C2 or C3 can be described as:

[0109] riceParam = function(template_based_method(),history_based_method())

[0110] In some examples, the class of the transform coefficients can be based on the scan order in one reverse direction. For example, the N first decoded transform coefficients are assigned to class C4, and the remaining transform coefficients are classified as class C1. In some examples, a subset of the defined classes can be used. For example, only the decoded transform coefficients of class C4 use the Rice information from the history, and the support for class C1 can be extended to incorporate the regions of classes C2 / C3 or the entire TU or TB. Thus, no history information is used for Rice derivation.

[0111] In some previous proposals, the Rice parameter of the transform coefficients was determined as a function that aggregates Rice information according to a template-based procedure and a history-based procedure using a weighted average. An example is shown below:

[0112] ricePar = (w2 * riceParTemplate + w1 * riceParHistory) / (w1 + w2)

[0113] The weights (w1 and w2) of the weighted average can depend on the空域位置信息(同第一句注释) of the transform coefficients within the TB.

[0114] In some examples, the function that aggregates local estimates and historical information can be integrated into the template-based derivation so that if local information is not available, the Rice parameter derived from historical information can be considered during the template-based Rice derivation. An example is shown below, where the proposed changes to the existing template-based procedure are marked with <!>…< / !> tags. The histCoef term defines the estimated historical transform coefficients, for example, accumulated in the past, or represented as a historical Rice parameter, for example, histCoef = 1 << histRiceParam. The M term and the N term are the estimated weight values. For example, for N and M, the integer values can be equal to 2 and 3 respectively.

[0115] Code Listing 3

[0116]

[0117]

[0118] In some examples, a counter can be used to implement a history-based procedure for Rice derivation. The counter can be stored as decoded transform coefficients, Rice parameters, or a moving average representing the length of the binary codeword of the decoded transform coefficients. An example is shown below:

[0119] For each class identified by the index `riceClass` (e.g., classes C1, C2, C3, C4), a separate history is computed and stored in the counter `StatCoeff[riceClass]`. During TB decoding, each decoded transform coefficient defined for history updates can be represented by a binary code length estimate, which indicates the optimal Rice parameters. In some examples, the video codec can update the history using the code length representation (number of bits) of the exponential Columbus codec portion of the first transform coefficient. This reduces the latency of full transform coefficient reconstruction. In some examples, the video codec can update the history using all transform coefficients.

[0120] The number of transformation coefficients defined for historical updates is denoted as NUM_HISTORY_UPDATE.

[0121] codeLength=floorLog2((uint32_t)decodedCoef)

[0122] The number of decoded transform coefficients (e.g., NUM_HISTORY_UPDATE) can be used to update historical observations, where the sum of the code length (e.g., collectStatCoeff[riceClass]) and the number of coefficients used in the update (e.g., counterCollectStatCoeff) is stored:

[0123] collectStatCoeff[riceClass]+=codeLength

[0124] counterCollectStatCoeff[riceClass]++

[0125] After the video codec resolves all samples defined for the history update of the current class, the video codec can update the global history counter StatCoeff using a linear model (e.g., a weighted moving average), as follows:

[0126] int numCollected=NUM_HISTORY_UPDATE-g_counterCollectStatCoeff[i]; intaverageRiceInTU=(int)(g_tempStatCoeff[i]+(numCollected>>1)) / numCollected);

[0127] StatCoeff[i][compID]=(w3*StatCoeff[i][compID]+w4*averageRiceInTU) / (w3+w4);

[0128] In some examples, the parameters of the linear model can be chosen as derivatives of powers of 2 to achieve low-complexity multiplication or division operations. In some examples, a history counter (e.g., StatCoeff) can be maintained in a region of the decoded image (e.g., a complete image, slice, piece, CTU group, or a single CTU) by performing a canonical reset at the beginning of the CTU group. This disclosure may refer to the history counter as coefficient statistics (e.g., StatCoeff).

[0129] In some examples, history counters can be initialized with default values. Default values ​​can be tableed and provided to the video decoder as side information, signaled via a special update signaling mechanism through the encoded bitstream (e.g., at the slice level), or derived on the decoder side based on bit depth, quantization parameters, or other syntax elements.

[0130] In some examples, one or more aspects of the historical update process (e.g., the rate of update or parameters of the moving average) may depend on the block size, the block size ratio, the encoding / decoding mode (e.g., the use of intra-frame or inter-frame prediction), the slice type, or the syntax element for signaling notification.

[0131] This disclosure describes several techniques that can improve the accuracy of Rice parameter derivation. For example, this disclosure proposes to improve the accuracy of Rice parameter derivation by considering historical values ​​of the optimal Rice parameter, which is determined based on transform coefficients from earlier decoded data outside the current TB.

[0132] In some examples, the video codec (e.g., video encoder 200 or video decoder 300) may store coefficient statistics (e.g., StatCoeff) as values ​​derived from the Ricean parameters (i.e., Ricean parameter derivatives). In the example where the video codec stores coefficient statistics (i.e., history counters) as Ricean parameter derivatives, the video codec may derive history values ​​(e.g., histCoef) as follows:

[0133] historyRiceValue=StatCoeff[i][compID]

[0134] histCoef=1< <historyRiceValue

[0135] Video codecs can (for example, using the procedure in Listing 3) use history values ​​(histCoeff) to determine local sums and values ​​(e.g., localSumAbs).

[0136] In some examples, the video codec (e.g., video encoder 200 or video decoder 300) can store coefficient statistics as values ​​derived from the transform coefficients (i.e., transform coefficient derivatives). In the example where the video codec stores coefficient statistics as transform coefficient derivatives, the video codec can derive the history value histCoef as follows:

[0137] historyValue=StatCoeff[i][compID]

[0138] histCoef = historyValue

[0139] Video codecs can (for example, using the procedure in Listing 3) use history values ​​(histCoeff) to determine local sums and values ​​(e.g., localSumAbs or locSumAbs).

[0140] In some examples, the histCoef derivation process can be modified based on the spatial location of the coefficients within the TB (e.g., based on the subgroup identifier to which histCoef belongs). Examples of modification could include adding an offset to the histRice value, or applying an offset or scaling factor to the histCoef value. In some examples, the histCoef value is made dependent on the type of transform coefficients being encoded / decoded. For example, if a portion of the transform coefficients is encoded / decoded as contextual codecs, only the remaining portion is encoded / decoded using the Rice method. In other words, the video codec can perform a “hybrid” procedure for encoding and decoding regular residual coefficients (RRCs).

[0141] In some examples, the code portion of the transform coefficients utilizes context encoding / decoding, while the remainder utilizes the Rice method. The video codec (e.g., video encoder 200 or video decoder 300) can set the variable `remBinsPass1` to the maximum number of context-encoded binaries, and when signaling the context-encoded binaries, the video codec can decrement `remBinsPass1` by 1. When `remBinsPass1` is greater than or equal to 4, the first encoding / decoding pass, including coefficient importance flags (e.g., `sig_coeff_flag`), an absolute level greater than 1 flag (e.g., `abs_level_gt1_flag`), a level parity syntax element indicating the parity of the transform coefficient levels (e.g., `par_level_flag`), and an absolute level greater than 3 flag (e.g., `abs_level_gt3_flag`), is encoded / decoded using the context-encoded binaries. If the number of binary numbers encoded via context in the first pass is not greater than a threshold (e.g., Mccb or RemCcbs), then the remaining portion of the level information indicated for further encoding in the first pass is encoded using the Columbus encoding and the binary numbers encoded via bypass, with an absolute remainder syntax element (e.g., abs_remainder). The threshold can be defined in VVC as ((1<<(log2TbWidth+log2TbHeight))*7)>>2, where log2TbWidth is the logarithm of the transform block width to the base 2, and log2TbHeight is the logarithm of the transform block height to the base 2.

[0142] When remBinsPass1 becomes less than 4 during the first pass of encoding / decoding, the remaining transform coefficients indicated for further encoding / decoding in the first pass are encoded / decoded using an absolute remainder syntax element (e.g., abs_remainder). In the second pass, the transform coefficients not encoded / decoded in the first pass are directly encoded / decoded using an intermediate value syntax element (e.g., dec_abs_level) by using Columbus codes and the bypass-encoded binary numbers. The intermediate value syntax element (e.g., dec_abs_level) is an intermediate value encoded / decoded using Columbus codes at the scan position. The video codec resets the value of remBinsPass1 for each TB. The transition from context-encoded binary numbers for coefficient importance flags (e.g., sig_coeff_flag), level greater than 1 flags (e.g., abs_level_gt1_flag), level parity flags (e.g., par_level_flag), and absolute level greater than 3 flags (e.g., abs_level_gt3_flag) to bypass-encoded binary numbers for the remaining transform coefficients occurs at most once per TB. For transform coefficient subblocks, if remBinsPass1 is less than 4, the entire transform coefficient subblock is encoded using bypass-encoded binary numbers. After encoding and decoding at all the above levels, finally, bypass encoding and decoding is performed on the symbols (e.g., sign_flag) at all scan positions where sig_coeff_flag is equal to 1.

[0143] The video codec uses the same RicePar derivation for passes 2 and 3. The only difference is that the base level (e.g., baseLevel) is set to 4 and 0 for passes 2 and 3, respectively. The RicePar is determined not only based on the sum of the absolute levels of the five adjacent transform coefficients in the local template, but also taking into account the corresponding base level, as shown below:

[0144] RicePara=RiceParTable[max(min(31,sumAbs-5*baseLevel),0)]

[0145] When calculating the sumAbs value, a value of 0 is used for any adjacent coefficients outside of TB.

[0146] After the first sub-block encoding / decoding iteration terminates, the absolute value of each remaining coefficient to be encoded / decoded is encoded / decoded using the syntax element `dec_abs_level`, which corresponds to a modified absolute level value, where the zero level value is conditionally mapped to a non-zero value. On the encoder side, the value of the syntax element `dec_abs_level` is derived based on the absolute level (absLevel), the associated quantizer state (QState), and the Rice parameter value (RicePara) as follows:

[0147]

[0148] In some examples, the video codec (e.g., video encoder 200 or video decoder 300) can maintain a history counter in a region (e.g., partition) of the decoded image (e.g., a complete image, slice, piece, CTU group, or single CTU) by performing a canonical reset at the start of segmentation. The video codec can reset the coefficient statistics to a default history value (e.g., DefaultHistoryRiceValue). Therefore, the canonical reset of the coefficient statistics at the start of segmentation can be represented as:

[0149] StatCoeff[i][compID]=DefaultHistoryRiceValue

[0150] In some examples where history counters (i.e., coefficient statistics) are stored as derivatives of the Rice parameter, the default value used for history reset (e.g., DefaultHistoryRiceValue) can be represented as a function of the bit depth of the encoded / decoded data or the internal bit depth. The internal bit depth can be greater than the bit depth of the encoded / decoded data. A non-restrictive example of this correlation between the default history value and the bit depth can be represented as follows:

[0151] DefaultHistoryRiceValue=(bitDepth-10)>0? floorLog2(4*(bitDepth-10)):0StatCoeff[i][compID]=DefaultHistoryRiceValue

[0152] The operator floorLog2 means floor(Log2(x)), where floor(x) indicates the largest integer less than or equal to x, and Log2(x) indicates the base-2 logarithm of x.

[0153] In other examples, the default value of the history reset (i.e., the default history value) can be represented as a function of the quantization parameter (QP), which is otherwise parsably tabled or determined, signaled via a bitstream, or provided as supplementary information. In some examples, linear models and / or nonlinear operations, such as clipping or clamping, can be utilized. Examples of default history values ​​depending on the QP are shown below:

[0154] DefaultHistoryRiceValue=(bitDepth-10)>0? (int)(OFFSET-cs.slice->getSliceQp()*MULTIPLIER):0

[0155] DefaultHistoryRiceValue=DefaultHistoryRiceValue<0?0:

[0156] DefaultHistoryRiceValue

[0157] StatCoeff[i][compID]=DefaultHistoryRiceValue;

[0158] In the text above, coefficient statistics are stored as Rice parameter derivatives. Correspondingly, the default history value is represented by `DefaultHistoryRiceValue`. The `DefaultHistoryValue` and `DefaultHistoryRiceValue` items can be used interchangeably in this disclosure. `OFFSET` indicates the offset value, `MULTIPLIER` indicates the multiplier value, and `cs.slice->getSliceQp()` is a function that returns the `QP` of the slice.

[0159] In some examples, the video decoder 300 may determine the default history value (e.g., DefaultHistoryRiceValue) for history reset through a canonical procedure (e.g., the canonical procedure described above), or it may notify the video decoder by signaling in the bitstream.

[0160] In some examples where coefficient statistics are stored as transform coefficients or derivatives of transform coefficients, the default value used for history reset (e.g., DefaultHistoryCoefValue) can be represented by a derivation process other than those described above; a non-limiting example of such a procedure is shown below:

[0161] DefaultHistoryCoefValue = 1 <DefaultHistoryRiceValue

[0162] StatCoeff[i][compID]=DefaultHistoryCoefValue

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

[0164] In some examples where coefficient statistics (e.g., history or StatCoeff) are stored as Ricean parameters, a video encoder (e.g., video encoder 200 or video decoder 300) can derive values ​​from the Ricean parameters to update the coefficient statistics (e.g., history or StatCoeff), which are used to decode a set of transform coefficients, such as the last N transform coefficients or transform coefficients located at block boundaries. An example of such an update is shown below:

[0165] int averageRiceInTU=(int)(g_tempStatCoeff[i])

[0166] StatCoeff[i][compID]=(StatCoeff[i][compID]+averageRiceInTU)>>1

[0167] In some examples, the Rice estimate used for historical updates can be derived from the decoded transform coefficients themselves, as follows:

[0168] int rem=m_BinDecoder.decodeRemAbsEP(ricePar,COEF_REMAIN_BIN_REDUCTION,cctx.maxLog2TrDRange());

[0169] if((g_counterCollectStatCoeff[riceClass]>0)&&(rem>0))

[0170] g_tempStatCoeff[riceClass]+=floorLog2((uint32_t)rem)

[0171] In the text above, `g_counterCollectStatCoeff[riceClass]` indicates the number of transform coefficients in the class that the video codec has processed so far in a partition of the picture (e.g., the entire picture, slice, piece, CU group, etc.), where the class is indicated by the index `riceClass`. Additionally, in the text above, `g_tempStatCoeff[riceClass]` is a temporary value for the class indicated by the index `riceClass`. Furthermore, in the text above, the function `m_BinDecoder.decodeRemAbsEP` performs CABAC bypass decoding of most of the transform coefficients. In some examples, a smaller portion of these transform coefficients are context-coded and not used to update the history counter.

[0172] In examples with a history based on cumulative transform coefficient values, the value can be stored itself. For example, a video codec can update the history based on a weighted average with the code length, such as: `g_tempStatCoeff[riceClass] += floorLog2((uint32_t)rem)`. In some examples, the video codec can update the history using the transform coefficient value itself, such as: `g_tempStatCoeff[riceClass] += rem`.

[0173] In some examples, the derivation process for updating the history (i.e., the process for updating coefficient statistics) can take into account the values ​​of the decoded transform coefficients (e.g., levels). For example, when performing the process for updating the history, the video codec can process the transform coefficients of partitions (e.g., TB, CU groups, etc.) and can reject updating the history based on the decoded transform coefficients if the decoded transform coefficients are equal to 0 or below a certain threshold T. The history can be used to derive the Rice parameters for exponential Golomb encoding and decoding. If the transform coefficients are not encoded and decoded using the exponential Golomb method but using a context program, the information from those 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 a certain threshold T.

[0174] In some examples, when performing a process for updating history, the video codec may process the transform coefficients of partitions (e.g., TB, CU groups, etc.) and consider the spatial location of the decoded transform coefficients within the current TB, sub-block, or codec group. For example, in some examples, the video codec does not perform history updates on the decoded transform coefficients of the current TB's DC value. In some examples, the derivation process (i.e., the process for updating history) may depend on the spatial location, such that the derivation process will modify or weight coefficients belonging to certain sub-blocks (e.g., codec groups), such as transform coefficients within a sub-block that do not belong to a DC sub-block. A DC sub-block is a sub-block of the current TB that contains the DC value of the TB.

[0175] In some examples, a single history counter can represent the weighted history of all sub-blocks / classes of the transform coefficients. In other words, there is no separate coefficient statistic for each class.

[0176] In some examples, the derivation process for historical update values ​​can take into account the type of the decoded transform coefficients. For example, the derivation process can consider whether the decoded transform coefficients were partially encoded using a context-based procedure (i.e., an importance or greater than X flag, followed by a remainder encoded using a bypass procedure with the Rice method), or whether the transform coefficients were encoded as absolute values. In some examples, when historical update values ​​(e.g., statCoeff) are based on stored Rice parameters, Rice values ​​for the historical update values ​​can be calculated for partially context-decoded coefficients, with the offset N of the coefficients aimed at covering the context-decoded portion of the transform coefficients.

[0177] g_tempStatCoeff[riceClass]+=floorLog2((uint32_t)rem)+N

[0178] In some examples, the value of N in the above equation can be an integer value, such as 1, 2, etc.

[0179] Therefore, in this example, the video codec can update coefficient statistics based on one or more transform coefficients of the video data TB. As part of updating the coefficient statistics, the video codec can perform a derivation process for each corresponding transform coefficient in the one or more transform coefficients of TB to determine a temporary value (e.g., g_tempStatCoeff). The derivation process considers which of a plurality of encoders was used to encode the corresponding transform coefficient. In other words, the derivation process is determined at least in part based on which of a plurality of encoders was used to encode the corresponding transform coefficient. The plurality of encoders includes context-based programs for encoding the corresponding transform coefficients and encoding the corresponding transform coefficients as absolute values. The video codec can set the coefficient statistics to the average of the coefficient statistics and the temporary value. For example, the video codec can determine:

[0180] int averageRiceInTU=(int)(g_tempStatCoeff[i])

[0181] StatCoeff[i][compID]=(StatCoeff[i][compID]+averageRiceInTU)>>1 as described above.

[0182] In some examples, when historical values ​​(i.e., coefficient statistics) are based on stored transform coefficient values, the historically updated values ​​for partially context-coded coefficients can be calculated by offsetting or scaling the context-coded portion that covers the transform coefficients:

[0183] g_tempStatCoeff[riceClass]+=rem< <M

[0184] or

[0185] g_tempStatCoeff[riceClass]+=rem+X

[0186] In some examples, the value of N in the above equation can be an integer value, such as 0, 1, 2, etc.

[0187] This disclosure can generally refer to "signaling" certain information, such as syntax elements. The term "signaling" can generally refer to communication of values ​​for syntax elements and / or other data used to decode encoded video data. That is, video encoder 200 can signal the values ​​of syntax elements in the bitstream. Generally, signaling refers to generating values ​​in the bitstream. As described above, source device 102 can transmit the bitstream to destination device 116 substantially in real time or non-real time, such as when syntax elements are stored in storage device 112 for later retrieval by destination device 116.

[0188] Figure 4A and Figure 4B This is a conceptual diagram illustrating an example Quadtree Binary Tree (QTBT) structure 400 and a corresponding Code-to-Code-to-Decoder Tree Unit (CTU) 402. Solid lines represent quadtree partitions, while dashed lines represent binary tree partitions. In each partition (i.e., non-leaf) node of the binary tree, a signal is sent to indicate which partition type (i.e., horizontal or vertical) is used, where in this example, 0 indicates a horizontal partition and 1 indicates a vertical partition. For quadtree partitions, it is not necessary to indicate the partition type because the quadtree node divides a block horizontally and vertically into four equal-sized sub-blocks. Accordingly, the video encoder 200 can encode and the video decoder 300 can decode the syntax elements (such as partition information) at the region tree level (i.e., solid lines) and the prediction tree level (i.e., dashed lines) of the QTBT structure 130. The video encoder 200 can encode and the video decoder 300 can decode video data of the CU, such as prediction data and transform data, represented by the terminal leaf nodes of the QTBT structure 130.

[0189] Generally speaking, Figure 4B CTU 402 can be associated with parameters that define the block size corresponding to the nodes of QTBT structure 130 at the first and second levels. These parameters may include CTU size (in sample units representing the size of CTU 132), minimum quadtree size (MinQTSize, representing the minimum allowed size of leaf nodes in a quadtree), maximum binary tree size (MaxBTSize, representing the maximum allowed size of root nodes in a binary tree), maximum binary tree depth (MaxBTDepth, representing the maximum allowed depth in a binary tree), and minimum binary tree size (MinBTSize, representing the minimum allowed size of leaf nodes in a binary tree).

[0190] The root node of the QTBT structure corresponding to CTU can have four child nodes at the first level of the QTBT structure, and each child node can be partitioned according to a quadtree partition. That is, the first-level node is either a leaf node (with no child nodes) or has four child nodes. An example of QTBT structure 130 represents such a node as including a parent node and child nodes with solid-line branches. If the first-level node is not larger than the maximum allowed binary tree root node size (MaxBTSize), the node can be further partitioned by the corresponding binary tree. The binary tree partitioning of a node can be iterated until the node obtained by the partitioning reaches the minimum allowed binary tree leaf node size (MinBTSize) or the maximum allowed binary tree depth (MaxBTDepth). An example of QTBT structure 400 represents such a node as having dashed-line branches. The binary tree leaf nodes are called codec units (CUs), which are used for prediction (e.g., intra-picture or inter-picture prediction) and transformation without any further partitioning. As mentioned above, CUs can also be called "video chunks" or "blocks".

[0191] In one example of a QTBT partitioning structure, the CTU size is set to 128×128 (luminance samples and two corresponding 64×64 chrominance samples), MinQTSize is set to 16×16, MaxBTSize is set to 64×64, MinBTSize (width and height) is set to 4, and MaxBTDepth is set to 4. Quadtree partitioning is first applied to the CTU to generate quadtree leaf nodes. The size of the quadtree leaf nodes can range from 16×16 (i.e., MinQTSize) to 128×128 (i.e., the CTU size). If the quadtree leaf node is 128×128, the leaf quadtree node will not be further partitioned by the binary tree because its size exceeds MaxBTSize (i.e., 64×64 in this example). Otherwise, the quadtree leaf node will be further partitioned by the binary tree. Therefore, the quadtree leaf node is also the root node of the binary tree, and its binary tree depth is 0. When the binary tree depth reaches MaxBTDepth (4 in this example), further partitioning is not allowed. A binary tree node with a width equal to MinBTSize (4 in this example) means that no further vertical partitioning (i.e., partitioning by width) is allowed for that binary tree node. Similarly, a binary tree node with a height equal to MinBTSize means that no further horizontal partitioning (i.e., partitioning by height) is allowed for that binary tree node. As mentioned above, the leaf nodes of the binary tree are called CUs and are further processed according to the prediction and transformation without further partitioning.

[0192] Figure 5 This is a block diagram illustrating an example video encoder 200 that can perform the techniques of this disclosure. Figure 5This disclosure is provided for illustrative purposes and should not be construed as limiting the techniques extensively illustrated and described herein. For illustrative purposes, this disclosure describes a video encoder 200 based on VVC (ITU-T H.266, under development) and HEVC (ITU-T H.265) technologies. However, the techniques of this disclosure can be implemented by video encoding devices configured to conform to other video codec standards.

[0193] exist Figure 5 In the example, the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a decoded picture buffer (DPB) 218, and an entropy encoding unit 220. Any one or all of the video data memory 230, mode selection 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 encoding unit 220 can be implemented in one or more processors or in processing circuitry. For example, the units of the video encoder 200 can be implemented as one or more circuit 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 to perform these and other functions. For example, in Figure 5 In the example, the entropy coding unit 220 may include a Rice Encoding Unit (REU) 228 and a CABAC unit 232.

[0194] The video data storage device 230 can store video data to be encoded by the components of the video encoder 200. The video encoder 200 can obtain data from, for example, a video source 104 (…). Figure 1The video encoder 200 receives video data stored in video data memory 230. DPB 218 can act as a reference picture memory, storing reference video data for use by the video encoder 200 when predicting subsequent video data. Video data memory 230 and DPB 218 can be formed from 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 can be provided by the same memory device or separate memory devices. In various examples, video data memory 230 can be on-chip with other components of the video encoder 200, as shown, or off-chip relative to those components.

[0195] In this disclosure, references to video data memory 230 should not be construed as being limited to memory within video encoder 200 unless so specifically described, or to memory external to video encoder 200 unless so specifically described. Rather, references to video data memory 230 should be understood as a reference memory storing video data received by video encoder 200 for encoding (e.g., video data of the current block to be encoded). Figure 1 The memory 106 can also provide temporary storage for the outputs from the various units of the video encoder 200.

[0196] It shows Figure 5 Various units help understand the operations performed by the video encoder 200. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. A fixed-function circuit is a circuit that provides a specific function and is pre-programmed with the operations it can perform. A programmable circuit is a circuit that can be programmed to perform various tasks and provides flexible functionality within the operations it can perform. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. A fixed-function circuit can execute software instructions (e.g., to receive or output parameters), but the type of operation performed by a fixed-function circuit is typically immutable. In some examples, one or more units can be different circuit blocks (fixed-function or programmable), and in some examples, one or more units can be integrated circuits.

[0197] The video encoder 200 may include an arithmetic logic unit (ALU), an elementary function unit (EFU), digital circuits, analog circuits, and / or a programmable core formed by programmable circuits. In an example where the operation of the video encoder 200 is performed using software executed by programmable circuits, memory 106 ( Figure 1 The video encoder 200 may store instructions (e.g., object code) of the software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 may store such instructions.

[0198] The video data storage unit 230 is configured to store received video data. The video encoder 200 can retrieve images of the video data from the video data storage unit 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 storage unit 230 can be the raw video data to be encoded.

[0199] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra-frame prediction unit 226. The mode selection unit 202 may include additional functional units to perform video prediction based on other prediction modes. As an example, the mode selection 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.

[0200] The mode selection unit 202 typically coordinates multiple coding passes to test combinations of coding parameters and the rate-distortion values ​​of these combinations. Coding parameters may include segmenting the CTU into CUs, the prediction mode of the CUs, the transformation type of the CU residual data, and the quantization parameters of the CU residual data. The mode selection unit 202 can ultimately select a combination of coding parameters that has a better rate-distortion value than other test combinations.

[0201] The video encoder 200 can segment images retrieved from the video data storage 230 into a series of CTUs, and encapsulate one or more CTUs within a slice. The mode selection unit 202 can segment the CTUs of the image according to a tree structure (such as the QTBT structure or quadtree structure of HEVC described above). As mentioned above, the video encoder 200 can form one or more CUs by segmenting CTUs according to a tree structure. Such CUs can also generally be referred to as "video blocks" or "blocks".

[0202] Generally, mode selection unit 202 also controls its components (e.g., motion estimation unit 222, motion compensation unit 224, and intra-prediction unit 226) to generate prediction blocks for the current block (e.g., the current CU, or the overlapping portion of PU and TB in HEVC). For inter-frame prediction of the current block, 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 encoded / decoded pictures stored in DPB 218). Specifically, motion estimation unit 222 may calculate values ​​representing the similarity between the potential reference block and the current block (e.g., based on sum of absolute differences (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared difference (MSD), etc.). Motion estimation unit 222 may typically perform these calculations using sample-by-sample differences between the current block and the reference block being considered. The motion estimation unit 222 can identify a reference block with the lowest value calculated from these values, which indicates the reference block that most closely matches the current block.

[0203] The motion estimation unit 222 can generate one or more motion vectors (MVs), where MVs define the position of a reference block in a reference image relative to the position of a current block in the current image. The motion estimation unit 222 can then provide the motion vectors to the motion compensation unit 224. For example, for unidirectional inter-frame prediction, the motion estimation unit 222 can provide a single motion vector, while for bidirectional inter-frame prediction, it can provide two motion vectors. The motion compensation unit 224 can then use the motion vectors to generate prediction blocks. For example, the motion compensation unit 224 can use the motion vectors to retrieve data for reference blocks. As another example, if the motion vectors have fractional sample precision, the motion compensation unit 224 can interpolate the values ​​of the prediction blocks according to one or more interpolation filters. Furthermore, for bidirectional inter-frame prediction, the motion compensation unit 224 can retrieve data for two reference blocks identified by the corresponding motion vectors and (e.g., by averaging or weighted averaging) combine the retrieved data.

[0204] As another example, for intra-prediction or intra-prediction codec, intra-prediction unit 226 can generate a prediction block based on samples from neighboring current blocks. For example, in directional mode, intra-prediction unit 226 can typically mathematically combine the values ​​of neighboring samples and fill these calculated values ​​in a defined direction on the current block to generate a prediction block. As another example, in DC mode, intra-prediction unit 226 can calculate the average of neighboring samples of the current block and generate a prediction block to include the resulting average for each sample of the prediction block.

[0205] Mode selection unit 202 provides the prediction block to residual generation unit 204. Residual generation unit 204 receives the original, unencoded version of the current block from video data memory 230 and the prediction block from mode selection unit 202. Residual generation unit 204 calculates the sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines the residual block of the current block. In some examples, residual generation unit 204 can also determine the differences between sample values ​​in the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some examples, residual generation unit 204 can be formed using one or more subtractor circuits performing binary subtraction.

[0206] In the example where mode selection unit 202 divides a CU into PUs, each PU can be associated with a luma prediction unit and a corresponding chroma prediction unit. Video encoder 200 and video decoder 300 can support PUs of various sizes. As mentioned above, the size of a CU can refer to the size of its luma codec block, and the size of a PU can refer to the size of the luma prediction unit of the PU. Assuming a specific CU size is 2N×2N, video encoder 200 can support PU sizes of 2N×2N or N×N for intra-frame prediction, as well as symmetrical PU sizes such as 2N×2N, 2N×N, N×2N, and N×N for inter-frame prediction. Video encoder 200 and video decoder 300 can also support asymmetric segmentation for PU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter-frame prediction.

[0207] In the example where mode selection unit 202 does not further divide the CU into PUs, each CU can be associated with a luma codec block and a corresponding chroma codec block. As mentioned above, the size of the CU can refer to the size of the luma codec block of the CU. The video encoder 200 and the video decoder 300 can support CU sizes of 2N×2N, 2N×N, or N×2N.

[0208] For other video codec techniques, such as intra-block copy mode codec, affine mode codec, and linear model (LM) mode codec, as some examples, mode selection unit 202 generates a prediction block for the current block being encoded via a corresponding unit associated with the codec technique. In some examples, such as palette mode codec, mode selection unit 202 may not generate a prediction block, but instead generate syntax elements indicating how the block should be reconstructed based on the selected palette. In this mode, mode selection unit 202 can provide these syntax elements to entropy coding unit 220 for encoding.

[0209] As described above, the residual generation unit 204 receives video data of the current block and the corresponding prediction block. Then, the residual generation unit 204 generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates the sample-by-sample difference between the prediction block and the current block.

[0210] Transform processing unit 206 applies one or more transformations 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 transformations to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply a discrete cosine transform (DCT), direction transform, KL transform (KLT), or conceptually similar transformations to the residual block. In some examples, transform processing unit 206 may perform multiple transformations on the residual block, such as a primary transformation and secondary transformations (e.g., rotation transformations). In some examples, transform processing unit 206 does not apply any transformations to the residual block.

[0211] Quantization unit 208 can quantize the transform coefficients in the transform coefficient block to produce a quantized transform coefficient block. Quantization unit 208 can quantize the transform coefficients of the transform coefficient block based on the quantization parameter (QP) value associated with the current block. Video encoder 200 (e.g., via mode selection unit 202) can 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 introduce information loss; therefore, the quantized transform coefficients may have lower precision than the original transform coefficients generated by transform processing unit 206.

[0212] The inverse quantization unit 210 and the inverse transform processing unit 212 can apply inverse quantization and inverse transform to the quantized transform coefficient block, respectively, to reconstruct the residual block based on the transform coefficient block. The reconstruction unit 214 can generate a reconstructed block corresponding to the current block based on the reconstructed residual block and the prediction block generated by the mode selection unit 202 (although it may have some degree of distortion). For example, the reconstruction unit 214 can add the samples of the reconstructed residual block to the corresponding samples of the prediction block generated by the mode selection unit 202 to generate the reconstructed block.

[0213] Filter unit 216 can perform one or more filtering operations on the reconstructed block. For example, filter unit 216 can perform a deblocking operation to reduce block artifacts along the edges of the CU. In some examples, the operation of filter unit 216 can be skipped.

[0214] The video encoder 200 stores reconstructed blocks in the DPB 218. For example, in an example where the filter unit 216 is not operated, the reconstruction unit 214 may store the reconstructed blocks in the DPB 218. In an example where the filter unit 216 is operated, the filter unit 216 may store the filtered reconstructed blocks in the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 may retrieve a reference image formed by the reconstructed (and possibly filtered) blocks from the DPB 218 to perform inter-frame prediction of blocks in subsequent encoded images. Furthermore, the intra-frame prediction unit 226 may use the reconstructed blocks in the DPB 218 of the current image to perform intra-frame prediction of other blocks in the current image.

[0215] Generally, entropy coding unit 220 can entropy code syntax elements received from other functional components of video encoder 200. For example, entropy coding unit 220 can entropy code quantized transform coefficient blocks from quantization unit 208. As another example, entropy coding unit 220 can entropy code predictive syntax elements (e.g., motion information for inter-frame prediction or intra-frame mode information for intra-frame prediction) from mode selection unit 202. Entropy coding unit 220 can perform one or more entropy coding operations on syntax elements, another example of video data, to generate entropy-coded data. For example, entropy coding unit 220 can perform context-adaptive variable length coding (CAVLC), CABAC, variable-to-variable (V2V) length coding, syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE), exponential Golomb coding, or another type of entropy coding operation on the data. In some examples, entropy coding unit 220 can operate in a bypass mode where entropy coding of syntax elements is not performed.

[0216] REU 228 can 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 entropy coding unit 220 can perform CABAC encoding / decoding or another type of entropy coding on the Rice codes. As part of the Rice codes for generating the syntax elements of transform coefficients, REU 228 can determine the Rice parameters of the transform coefficients. REU 228 can determine the Rice parameters of the transform coefficients according to any technique of this disclosure. For example, REU 228 can determine historical values ​​of the transform coefficients (e.g., histCoef). Historical values ​​may also be referred to herein as estimated historical transform coefficients. REU 228 can determine historical values ​​based on coefficient statistics. As described elsewhere in this disclosure, REU 228 can update the coefficient statistics to the average of the coefficient statistics and temporary values. REU 228 can perform a derivation process to determine temporary values. The derivation process can consider which of a plurality of coding procedures was used to encode the corresponding transform coefficient. Multiple encoding procedures include context-based procedures for encoding the corresponding transform coefficients and encoding the corresponding transform coefficients as absolute values.

[0217] The video encoder 200 can output a bitstream containing the entropy-encoded syntax elements required to reconstruct blocks of slices or images. Specifically, the entropy coding unit 220 can output a bitstream.

[0218] The above operations are described at the block level. This description should be understood as operations on the luma codec block and / or chroma codec block. As mentioned above, in some examples, the luma codec block and chroma codec block are the luma and chroma components of the CU. In some examples, the luma codec block and chroma codec block are the luma and chroma components of the PU.

[0219] In some examples, the operations performed for the luma codec block do not need to be repeated for the chroma codec block. As an example, the operations used to identify the motion vector (MV) and reference image for the luma codec block do not need to be repeated for identifying the MV and reference image for the chroma block. Instead, the MV of the luma codec block can be scaled to determine the MV of the chroma block, and the reference image can be the same. As another example, the intra-frame prediction process can be the same for both luma and chroma codec blocks.

[0220] In some examples, video encoder 200 represents an example of a device configured to encode video data, which includes a memory configured to store the video data and one or more processing units implemented in the circuit, and the processing units are configured to: determine estimated historical transform coefficients (e.g., histCoef) of the current transform coefficients; determine local sums (e.g., localSumAbs) based on the estimated historical transform coefficients; determine Rice parameters (e.g., cRiceParam) based on the local sums; determine syntax elements (e.g., abs_remainder or dec_abs_level) based on the level of the current transform coefficients; and encode the syntax elements using the Rice parameters.

[0221] Figure 6 This is a block diagram illustrating an example video decoder 300 that can perform the techniques disclosed herein. Figure 6 This disclosure is provided for illustrative purposes and does not limit the techniques broadly exemplified and described herein. For illustrative purposes, this disclosure describes a video decoder 300 based on VVC (ITU-T H.266, under development) and HEVC (ITU-T H.265) technologies. However, the techniques of this disclosure can be implemented by video codec devices configured to conform to other video codec standards.

[0222] exist Figure 6 In the example, the video decoder 300 includes a codec 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, entropy decoding unit 302, prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, filter unit 312, and DPB 314 can be implemented in one or more processors or in processing circuitry. For example, units of the video decoder 300 can be implemented as one or more circuit 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 to perform these and other functions. For example, in Figure 6 In the example, the entropy decoding unit 302 includes a Rice Decoding Unit (RDU) 322 and a CABAC unit 324.

[0223] The prediction processing unit 304 includes a motion compensation unit 316 and an intra-frame prediction unit 318. The prediction processing unit 304 may include additional units to perform predictions based on other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, an intra-block copy unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.

[0224] CPB memory 320 can store video data to be decoded by components of video decoder 300, such as encoded video bitstreams. The video data stored in CPB memory 320 can be obtained from, for example, computer-readable medium 110 (…). Figure 1 The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from the encoded video bitstream. Additionally, the CPB memory 320 may store video data other than the syntax elements of the encoded picture, such as temporary data representing the output from various units of the video decoder 300. The DPB 314 typically stores decoded pictures that the video decoder 300 may output and / or use as reference video data when decoding subsequent data or pictures from the encoded video bitstream. The CPB memory 320 and DPB 314 may be formed of any of a variety of memory devices, such as DRAM, including SDRAM, MRAM, RRAM, or other types of memory devices. The 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 off-chip relative to those components.

[0225] Additionally or alternatively, in some examples, the video decoder 300 can be drawn from the memory 120 ( Figure 1 The encoded and decoded video data is retrieved from the memory. That is, memory 120 can store data as discussed above regarding CPB memory 320. Similarly, when some or all of the functions of video decoder 300 are implemented in software to be executed by the processing circuitry of video decoder 300, memory 120 can store instructions to be executed by video decoder 300.

[0226] It shows Figure 6 The various units shown aid in understanding the operations performed by the video decoder 300. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Similar to... Figure 5Fixed-function circuits are circuits that provide a specific function and are pre-configured with the operations they can perform. Programmable circuits are circuits that can be programmed to perform various tasks and provide flexible functionality within the operations they can perform. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions in the software or firmware. Fixed-function circuits can execute software instructions (e.g., to receive or output parameters), but the type of operation performed by a fixed-function circuit is typically immutable. In some examples, one or more units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more units may be integrated circuits.

[0227] The video decoder 300 may include an ALU, an EFU, digital circuitry, analog circuitry, and / or a programmable core formed by programmable circuitry. In an example where the operation of the video decoder 300 is performed by software executed on the programmable circuitry, on-chip or off-chip memory may store instructions (e.g., object code) of the software received and executed by the video decoder 300.

[0228] Entropy decoding unit 302 can receive encoded video data from CPB and perform entropy decoding on the video data to reproduce syntax elements. Prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, and filter unit 312 can generate decoded video data based on syntax elements extracted from the bitstream.

[0229] Generally, the video decoder 300 reconstructs the image on a block-by-block basis. The video decoder 300 can perform the reconstruction operation on each block individually (where the block currently being reconstructed (i.e., decoded) can be called the "current block").

[0230] Entropy decoding unit 302 can entropy decode the syntax elements of the quantized transform coefficients that define the quantized transform coefficient block, as well as transform information such as quantization parameters (QP) and / or (multiple) transform mode indications. Inverse quantization unit 306 can use the QP associated with the quantized transform coefficient block to determine the degree of quantization, and similarly, determine the degree of inverse quantization to be applied by inverse quantization unit 306. Inverse quantization unit 306 can, for example, perform a bitwise left shift operation to inverse quantize the quantized transform coefficients. Inverse quantization unit 306 can thereby form a transform coefficient block including the transform coefficients.

[0231] Some syntax elements can be represented as Rice codes. In some such examples, CABAC unit 324 can apply CABAC decoding or another form of entropy decoding to a bit sequence in a bitstream to obtain the Rice codes of syntax elements (such as remainder syntax elements of transform coefficients (e.g., abs_remainder) or absolute value syntax elements of transform coefficients (e.g., dec_abs_level)). Figure 6 In the example, the RDU 322 of the entropy decoding unit 302 can decode the Rice code and use the resulting decoded value to determine the level of the transform coefficients. The RDU 322 can determine the Rice parameters used when decoding the Rice code according to any of the techniques disclosed herein.

[0232] After the inverse quantization unit 306 forms the transform coefficient block, the inverse transform processing unit 308 can 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 can apply an inverse DCT, an inverse integer transform, an inverse KL transform (KLT), an inverse rotation transform, an inverse direction transform, or another inverse transform to the transform coefficient block.

[0233] Furthermore, the prediction processing unit 304 generates a prediction block based on the prediction information syntax elements entropy-decoded by the entropy decoding unit 302. For example, if the prediction information syntax elements indicate that the current block is predicted inter-frame, the motion compensation unit 316 can generate the prediction block. In this case, the prediction information syntax elements may indicate the reference image from which the reference block is retrieved in the DPB 314, and the motion vector identifying the position of the reference block in the reference image relative to the position of the current block in the current image. The motion compensation unit 316 can generally be configured in a manner substantially similar to that for the motion compensation unit 224 ( Figure 5 The inter-frame prediction process is performed in the manner described.

[0234] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, then intra-prediction unit 318 can generate a prediction block according to the intra-prediction mode indicated by the prediction information syntax element. Similarly, intra-prediction unit 318 can generally be configured in a manner substantially similar to that for intra-prediction unit 226. Figure 5 The intra-prediction process is performed in the manner described. The intra-prediction unit 318 can retrieve data of neighboring samples of the current block from the DPB 314.

[0235] Reconstruction unit 310 can use prediction blocks and residual blocks to reconstruct the current block. For example, reconstruction unit 310 can add samples from the residual block to the corresponding samples from the prediction block to reconstruct the current block.

[0236] Filter unit 312 can perform one or more filtering operations on the reconstructed block. For example, filter unit 312 can perform a deblocking operation to reduce block artifacts along the edges of the reconstructed block. The operation of filter unit 312 is not necessarily performed in all examples.

[0237] The video decoder 300 can store reconstructed blocks in the DPB 314. For example, in an example where the filter unit 312 is not operated, the reconstruction unit 310 can store the reconstructed blocks in the DPB 314. In an example where the filter unit 312 is operated, the filter unit 312 can store the filtered reconstructed blocks in the DPB 314. As described above, the DPB 314 can provide reference information to the prediction processing unit 304, such as samples of the current image for intra-frame prediction and samples of previously decoded images for subsequent motion compensation. Furthermore, the video decoder 300 can output the decoded image (e.g., decoded video) from the DPB 314 for subsequent display on a display device (such as...). Figure 1 It is displayed on the display device 118.

[0238] In this way, the video decoder 300 can represent an example of a video decoding device, which includes a memory configured to store video data and one or more processing units implemented in the circuitry, the processing units being configured to: determine estimated historical transform coefficients (e.g., histCoef) of the current transform coefficients; determine local sums (e.g., localSumAbs) based on the estimated historical transform coefficients; determine Rice parameters (e.g., cRiceParam) based on the local sums; decode syntax elements (e.g., abs_remainder or dec_abs_level) using the Rice parameters; determine the level of the current transform coefficients based on the syntax elements; and reconstruct blocks of video data based on the level of the current transform coefficients.

[0239] Figure 7 This is a flowchart illustrating an example method for encoding the current block according to the techniques of this disclosure. The flowchart of this disclosure is provided as an example. In other examples, the method may include more, fewer, or different actions, and the actions shown in the flowchart may be performed in different orders. Furthermore, see reference... Figures 1 to 6 The method shown in the flowchart of this disclosure is described, but the method is not limited thereto. Figure 7 In the example, the current block may include the current CU.

[0240] In this example, the video encoder 200 initially predicts the current block (700). For example, the video encoder 200 may form a predicted block for the current block. The video encoder 200 may then compute a residual block for the current block (702). To compute the residual block, the video encoder 200 may compute the difference between the original unencoded block and the predicted block for the current block. The video encoder 200 may then transform the residual block and quantize the transform coefficients of the residual block (704). Next, the video encoder 200 may scan the quantized transform coefficients of the residual block (706). During or after the scan, the video encoder 200 may entropy encode the transform coefficients (708). For example, the video encoder 200 may encode the transform coefficients using CAVLC or CABAC. The video encoder 200 may then output the entropy-encoded data of the block (710).

[0241] As part of entropy coding of the transform coefficients, the video encoder 200 can determine the Ricean parameter of the transform coefficients according to any of the techniques disclosed herein. The video encoder 200 can generate Ricean codes for the transform coefficients based on the Ricean parameter and the level of the transform coefficients. The video encoder 200 can perform entropy coding on the Ricean codes.

[0242] Figure 8 This is a flowchart illustrating an example method for decoding a current block of video data according to the techniques of this disclosure. The current block may include the current CU. Although for video decoder 300 ( Figure 1 and Figure 6 The description is provided, but it should be understood that other devices can also be configured to perform similar actions. Figure 8 The method.

[0243] The video decoder 300 can receive entropy-encoded data of the current block, such as entropy-encoded prediction information and entropy-encoded data of the transform coefficients of the residual block corresponding to the current block (800). The video decoder 300 can perform entropy decoding on the entropy-encoded data to determine the prediction information of the current block and reproduce the transform coefficients of the residual block (802).

[0244] Video decoder 300 can determine the Ricean parameters of one or more transform coefficients according to any of the techniques disclosed herein. Video decoder 300 can determine the level of the transform coefficients based on the Ricean parameters of the transform coefficients and one or more syntax elements encoded in the bitstream. For example, video decoder 300 can perform entropy decoding on a remainder syntax element (e.g., abs_remainder) to obtain the Ricean code of the transform coefficients. In this example, video decoder 300 can then decode the Ricean code using the Ricean parameters of the transform coefficients to obtain a decoded value. Video decoder 300 can use the decoded value to determine the level of the transform coefficients.

[0245] The video decoder 300 can predict the current block (804), for example, by calculating a predicted block for the current block using an intra-frame or inter-frame prediction mode indicated by the prediction information of the current block. The video decoder 300 can then perform an inverse scan (806) on the reconstructed transform coefficients to produce a block of quantized transform coefficients. The video decoder 300 can then inverse quantize the transform coefficients and apply an inverse transform to the transform coefficients to produce a residual block (808). The video decoder 300 can finally decode the current block by combining the predicted block and the residual block (810).

[0246] Figure 9 This is a flowchart illustrating an example process for encoding video data according to one or more techniques according to this disclosure. Figure 9 In the example, REU 228 initializes the coefficient statistics (e.g., statCoeff[i][compID])(900). For example, REU 228 can initialize the coefficient statistics to 0. In some examples, REU 228 can initialize the coefficient statistics to the default historical value (e.g., DefaultHistoryRiceValue).

[0247] In some examples, the REU 228 can determine the default history value based on the QP of an image slice that includes blocks of video data. For instance, where "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 can determine the default history value by:

[0248] DefaultHistoryRiceValue=(bitDepth-10)>0? (int)(OFFSET-cs.slice->getSliceQp()*MULTIPLIER):0

[0249] DefaultHistoryRiceValue=DefaultHistoryRiceValue<0?

[0250] 0:DefaultHistoryRiceValue;

[0251] REU 228 can reset coefficient statistics to default historical values ​​at the start of image segmentation. For example, REU228 can maintain coefficient statistics in a partition of the decoded image (e.g., a complete image, slice, piece, CTU group, or a single CTU) by performing a canonical reset at the start of segmentation.

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

[0253] The derivation process considers which of several encoding procedures is used to encode the corresponding transform coefficients (i.e., the derivation process is determined at least in part based on this consideration). The multiple encoding procedures include a context-based procedure for encoding the corresponding transform coefficients and encoding them as absolute values. When encoding the corresponding transform coefficients using a context-based procedure, the corresponding transform coefficient can be represented using a greater-than-1 flag, an optional greater-than-2 flag, and a remainder. If the greater-than-2 flag is present and equal to 1, the remainder can be equal to the absolute level of the corresponding transform coefficient minus 2. If the greater-than-1 flag is equal to 1 and the greater-than-2 flag is equal to 0, the remainder can be equal to the absolute level of the corresponding transform coefficient minus 1. When the corresponding transform coefficient is encoded as an absolute value, the corresponding transform coefficient can be equal to the absolute value or equal to the absolute value plus 1. The syntax element `dec_abs_level` can indicate the absolute value.

[0254] When encoding the corresponding transform coefficients using a context-based program, REU 228 can determine a temporary value by applying a floor function to the base-2 logarithm of the remainder of the corresponding transform coefficient and adding an integer value. For example, when g_tempStatCoeff[riceClass] is a temporary value, "rem" is the remainder of the corresponding transform coefficient, and "N" is an integer value, REU 228 can calculate:

[0255] g_tempStatCoeff[riceClass]+=floorLog2((uint32_t)rem)+N

[0256] In this operation and elsewhere in this disclosure, "(uint32_t)" indicates that "rem" is converted to an unsigned 32-bit integer.

[0257] In other cases, such as when the corresponding transform coefficients are encoded as absolute values, REU 228 can determine the temporary value based on a base-2 logarithmic value of the absolute level of the corresponding transform coefficient. For example, if g_tempStatCoeff[riceClass] is a temporary value and "rem" is the remainder of the corresponding transform coefficient, REU 228 can calculate:

[0258] g_tempStatCoeff[riceClass]+=floorLog2((uint32_t)rem)

[0259] Additionally, as part of updating coefficient statistics, REU 228 can set the coefficient statistics to the average of the coefficient statistics and the temporary value (906). For example, tempStatCoeff[i] can indicate the temporary value, while StatCoeff[i][compID] can indicate the coefficient statistics. In this example, to set the coefficient statistics to the average of the coefficient statistics and the temporary value, REU 228 can do the following:

[0260] int averageRiceInTU=(int)(g_tempStatCoeff[i]);

[0261] StatCoeff[i][compID]=(StatCoeff[i][compID]+averageRiceInTU)>>1

[0262] In addition, Figure 9 In some examples, the REU 228 can determine historical values ​​(e.g., histCoef) based on coefficient statistics (908). In other examples, the REU 228 can store the coefficient statistics as the derivative of the Rice parameter. In such examples, as part of determining historical values ​​based on coefficient statistics, the REU 228 can shift the coefficient statistics left by 1. For example, the REU 228 can do the following to determine historical values ​​based on coefficient statistics:

[0263] historyRiceValue=StatCoeff[i][compID];

[0264] histCoef=1< <historyRiceValue

[0265] In another example, the REU 228 can store coefficient statistics as derivatives of the transformed coefficients. In this example, as part of determining historical values ​​based on coefficient statistics, the REU 228 can set historical values ​​equal to the coefficient statistics. For example, the REU 228 can perform the following operations to determine historical values ​​based on coefficient statistics:

[0266] historyValue=StatCoeff[i][compID]

[0267] histCoef = historyValue

[0268] exist Figure 9 In the example, REU 228 can determine the Rice parameter (910) of a specific transform coefficient of TB. A specific transform coefficient of TB can be any transform coefficient of TB. In some examples, REU 228 can determine the Rice parameter for each transform coefficient of TB.

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

[0270] ·if(posX <m_width-1

[0271] ·if(posX <m_width-2)

[0272] ·if(posY <m_height-1)

[0273] ·if(posY <m_height-1)

[0274] ·if(posY <m_height-2)

[0275] like Figure 9As shown in the example, REU 228 can determine the local sum based on historical values ​​(914) when a specific transform coefficient is less than 3 spatial locations from the right or bottom boundary of the TB (the "yes" branch of 912). For example, as shown in code listing 3, REU 228 can determine the local sum as one of the following:

[0276] ·sum+=histCoef

[0277] ·sum+=N*histCoef

[0278] ·sum+=M*histCoef

[0279] On the other hand, if a particular transform coefficient is at least three spatial locations away from the right boundary or the bottom boundary of the TB (the "No" branch of 912), then REU 228 can determine the local sum based on the transform coefficients in the template (916). For example, as shown in pseudocode listing 3, REU 228 can determine the local sum as one of the following:

[0280] ·sum+=abs(pData[2]);

[0281] ·sum+=abs(pData[m_width+1]);

[0282] ·sum+=abs(pData[m_width]);

[0283] ·sum+=abs(pData[m_width<<1]);

[0284] Furthermore, REU 228 can determine the Rice parameter of a particular transform coefficient based on local sums (918). For example, REU 228 can use local sums to look up the Rice parameter of a particular transform coefficient in a table (such as Table 1).

[0285] REU 228 can generate the Rice code (920) of specific transform coefficients based on the Rice parameters and levels of specific transform coefficients. For example, the Rice code of specific transform coefficients can include a prefix and a suffix separated by a fixed value, usually equal to 0. REU 228 can determine the prefix q as x divided by M and then rounded down (i.e., ), where x is a value associated with a particular transform coefficient, such as the absolute level of the particular transform coefficient or the remainder of the particular transform coefficient, and M equals 2. k , where k is the Rice parameter of a specific transform coefficient. REU 228 can define the suffix as r = x – qM, where r is the suffix. Therefore, the suffix can be considered as a binary number with a length (i.e., number of bits) equal to k.

[0286] In some examples, the CABAC unit 232 of the entropy coding unit 220 can perform CABAC encoding on the Rice code of a specific transform coefficient and include the resulting CABAC-encoded value in the bit stream.

[0287] Figure 10 This is a flowchart illustrating an example process for decoding video data according to one or more techniques according to this disclosure. Figure 10 In the example, RDU 322 initializes the coefficient statistics (e.g., statCoeff[i][compID]) (1000). For example, RDU 322 can initialize the coefficient statistics to 0. In some examples, RDU 322 can initialize the coefficient statistics to the default historical value (e.g., DefaultHistoryRiceValue).

[0288] In some examples, the RDU 322 can determine the default history value based on the QP of a slice of an image containing chunks of video data. For instance, where "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 RDU 322 can determine the default history value by doing the following: DefaultHistoryRiceValue = (bitDepth - 10) > 0? (int)(OFFSET - cs.slice->getSliceQp() * MULTIPLIER): 0

[0289] DefaultHistoryRiceValue=DefaultHistoryRiceValue<0?0:

[0290] DefaultHistoryRiceValue

[0291] The RDU 322 can reset coefficient statistics to default historical values ​​at the start of image segmentation. For example, the RDU 322 can maintain coefficient statistics in a partition of the decoded image (e.g., a complete image, slice, piece, CTU group, or a single CTU) by performing a canonical reset at the start of segmentation.

[0292] In addition, Figure 10In the example, RDU 322 can update coefficient statistics (1002) based on one or more transform coefficients of a TB (Transformer Module) of a block of video data. The block of video data can be a CU (Cellular Module) or other types of blocks. The one or more transform coefficients can be all transform coefficients of the TB or a subset of the transform coefficients of the TB. For example... Figure 10 As shown in the example, as part of updating coefficient statistics, the RDU 322 can perform a derivation process for each of the corresponding transform coefficients in one or more transform coefficients of the TB to determine a temporary value (1004).

[0293] The derivation process considers which of several encoding procedures is used to encode the corresponding transform coefficients (i.e., the derivation process is determined at least in part based on this consideration). The several encoding procedures include context-based procedures for encoding the corresponding transform coefficients and encoding them as absolute values. RDU 322 can perform the derivation process according to any of the examples described above for REU 228.

[0294] Additionally, as part of updating coefficient statistics, the RDU 322 can set the coefficient statistics to the average of the coefficient statistics and the temporary value (1006). For example, tempStatCoeff[i] can indicate the temporary value, while StatCoeff[i][compID] can indicate the coefficient statistics. In this example, to set the coefficient statistics to the average of the coefficient statistics and the temporary value, the RDU 322 can do the following:

[0295] int averageRiceInTU=(int)(g_tempStatCoeff[i])

[0296] StatCoeff[i][compID]=(StatCoeff[i][compID]+averageRiceInTU)>>1

[0297] In addition, Figure 10 In some examples, the RDU 322 can determine historical values ​​(e.g., histCoef) based on coefficient statistics (1008). In other examples, the RDU 322 can store the coefficient statistics as the derivative of the Rice parameter. In such examples, as part of determining historical values ​​based on coefficient statistics, the RDU 322 can shift the coefficient statistics left by 1. For example, the RDU 322 can perform the following operations to determine historical values ​​based on coefficient statistics:

[0298] historyRiceValue=StatCoeff[i][compID]

[0299] histCoef=1< <historyRiceValue

[0300] In another example, the RDU 322 can store coefficient statistics as derivatives of the transformed coefficients. In this example, as part of determining historical values ​​based on coefficient statistics, the RDU 322 can set historical values ​​equal to the coefficient statistics. For example, the RDU 322 can perform the following operations to determine historical values ​​based on coefficient statistics:

[0301] historyValue=StatCoeff[i][compID]

[0302] histCoef = historyValue

[0303] exist Figure 10 In the examples, RDU 322 can determine the Rice parameter (1010) of a specific transform coefficient of TB. A specific transform coefficient of TB can be any transform coefficient of TB. In some examples, REU 228 can determine the Rice parameter for each transform coefficient of TB.

[0304] As part of the Rice parameters used to determine a particular transform coefficient, the RDU 322 can determine whether a particular transform coefficient is less than 3 spatial locations (1012) from the right or bottom boundary of the TB. For example, “posX” indicates the x-axis coordinate of a particular transform coefficient, “posY” indicates the y-axis coordinate of a particular transform coefficient, “m_width” indicates the width of the TB, “m_height” indicates the height of the TB, “sum” indicates the local sum value, “abs(pData[])” indicates the absolute level of the transform coefficient, and “histCoef” indicates the history value. In this example, the RDU 322 can use one of the following comparisons shown in code listing 3 to determine whether a particular transform coefficient is less than 3 spatial locations from the right or bottom boundary of the TB:

[0305] ·if(posX <m_width-1

[0306] ·if(posX <m_width-2)

[0307] ·if(posY <m_height-1)

[0308] ·if(posY <m_height-1)

[0309] ·if(posY <m_height-2)

[0310] like Figure 10As shown in the example, RDU 322 can determine the local sum based on historical values ​​(1014) when a specific transform coefficient is less than 3 spatial locations from the right or bottom boundary of the TB (the "yes" branch of 1012). For example, as shown in code listing 3, RDU 328 can determine the local sum as one of the following:

[0311] ·sum+=histCoef

[0312] ·sum+=N*histCoef

[0313] ·sum+=M*histCoef

[0314] On the other hand, if a particular transform coefficient is at least three spatial locations away from the right or bottom boundary of the TB (the "No" branch of 1012), then RDU 322 can determine the local sum based on the transform coefficients in the template (1016). For example, as shown in code listing 3, RDU 322 can determine the local sum as one of the following:

[0315] ·sum+=abs(pData[2]);

[0316] ·sum+=abs(pData[m_width+1]);

[0317] ·sum+=abs(pData[m_width]);

[0318] ·sum+=abs(pData[m_width<<1]);

[0319] Furthermore, the RDU 322 can determine the Rice parameter (1018) of a specific transform coefficient based on local sums. For example, the RDU 322 can use local sums to look up the Rice parameter of a specific transform coefficient in a table (such as Table 1).

[0320] RDU 322 can determine the level (1020) of a particular transform coefficient based on its Rice parameter and one or more syntax elements encoded in the bitstream. For example, a remainder syntax element (e.g., `abs_remainder`) or an absolute value syntax element (e.g., `dec_abs_level`) can indicate the Rice code of a particular transform coefficient. The Rice code of a particular transform coefficient can include a prefix `q` and a suffix `r`. The length of the suffix `r` can be equal to the Rice parameter of the particular transform coefficient. RDU 322 can 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 can ignore the zeros between the prefix `q` and the suffix `r`. In this example, RDU 322 can add the first and second numbers to determine the decoded value. In the example of encoding a specific transform coefficient using a context-based program, RDU 322 can determine the level of a specific transform coefficient by adding 2 to the decoded value if the greater than 2 flag syntax element is present and equal to 1; adding 1 to the decoded value if the greater than 1 flag syntax element is equal to 1 and the greater than 2 flag syntax element is equal to 0; and setting the sign of the level of a specific transform coefficient based on the sign flag syntax element. In the example of encoding a specific transform coefficient using absolute values, the decoded value can be equal to the level of the specific transform coefficient, or the level of the specific transform coefficient can be equal to the decoded value plus 1, depending on, for example, whether the decoded value is greater than or less than the ZeroPos variable. The ZeroPos variable is described above.

[0321] In some examples, CABAC unit 324 can perform CABAC decoding on values ​​in a bit stream to obtain Rice code.

[0322] In addition, Figure 10 In the example, video decoder 300 can decode blocks of video data based on the level of a specific transform coefficient (1022). For example, inverse quantization unit 306 can inverse quantize the level of a specific transform coefficient as well as the values ​​of other transform coefficients in the TB. In this example, inverse transform processing unit 308 of video decoder 300 can apply the 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.) Reconstruction unit 310 can add the residual values ​​to the corresponding samples of the predicted block. By processing each TB of the block in this way, reconstruction unit 310 can reconstruct the sample values ​​of the block of video data.

[0323] The following is a non-limiting list of aspects of one or more technologies based on this disclosure.

[0324] Aspect 1A: A method for decoding video data, the method comprising: determining estimated historical transform coefficients of current transform coefficients; determining local sums based on the estimated historical transform coefficients; determining Rice parameters based on the local sums; using the Rice parameters to decode syntax elements; determining the level of the current transform coefficients based on the syntax elements; and reconstructing blocks of video data based on the level of the current transform coefficients.

[0325] Aspect 2A: According to the method of aspect 1A, wherein determining the estimated historical transform coefficients of the current transform coefficients includes: determining historical values ​​for each Rice class of the region of the image associated with the current transform unit; and determining the estimated historical transform coefficients based on the historical values.

[0326] Aspect 3A: The method according to aspect 2A, wherein: the region is a complete region of an image, a slice, a piece, a group of codec tree units (CTUs) or a single CTU; and the method further includes resetting the history value to a default history value at the start of decoding the region.

[0327] Aspect 4A: The method described in aspect 3A further includes determining a default history value based on the bit depth of the encoded / decoded data.

[0328] Aspect 5A: The method according to any one of Aspects 3A or 4A further includes determining a default historical value based on quantization parameters or based on signaling notification data in a bitstream including an encoded version of video data.

[0329] Aspect 6A: The method according to any one of Aspects 2A to 5A, wherein determining the historical value comprises: determining the average Rice parameter in the transform unit associated with the current transform coefficient; and determining the historical value based on the average Rice parameter.

[0330] Aspect 7A: A method for encoding video data, the method comprising: determining estimated historical transform coefficients of current transform coefficients; determining local sums based on the estimated historical transform coefficients; determining Rice parameters based on the local sums; determining syntax elements based on the level of the current transform coefficients; and encoding the syntax elements using the Rice parameters.

[0331] Aspect 8A: According to the method of aspect 7A, wherein determining the estimated historical transform coefficients of the current transform coefficients includes: determining historical values ​​for each Rice class of the region of the image associated with the current transform unit; and determining the estimated historical transform coefficients based on the historical values.

[0332] Aspect 9A: The method according to aspect 8A, wherein: the region is a complete region of an image, a slice, a piece, a group of codec tree units (CTUs) or a single CTU; and the method further includes resetting the history value to a default history value at the start of decoding the region.

[0333] Aspect 10A: The method described in aspect 9A further includes determining a default history value based on the bit depth of the encoded / decoded data.

[0334] Aspect 11A: The method according to any one of Aspects 9A or 10A further includes determining a default historical value based on quantization parameters or based on signaling notification data in a bitstream including an encoded version of video data.

[0335] Aspect 12A: The method according to any one of Aspects 8A to 11A, wherein determining the historical value comprises: determining the average Rice parameter in the transform unit associated with the current transform coefficient; and determining the historical value based on the average Rice parameter.

[0336] Aspect 13A: An apparatus for encoding and decoding video data, the apparatus comprising one or more components for performing the method according to any one of aspects 1A-12A.

[0337] Aspect 14A: The device according to aspect 13A, wherein one or more components include one or more processors implemented in a circuit.

[0338] Aspect 15A: The device according to any one of aspects 13A and 14A further includes a memory for storing video data.

[0339] Aspect 16A: The device according to any one of aspects 13A-15A further includes a display configured to display decoded video data.

[0340] Aspect 17A: The device according to any one of aspects 13A-16A, wherein the device includes one or more of a camera, computer, mobile device, broadcast receiver device or set-top box.

[0341] Aspect 18A: The device according to any one of aspects 13A-17A, wherein the device includes a video decoder.

[0342] Aspect 19A: The device according to any one of aspects 13A-18A, wherein the device includes a video encoder.

[0343] Aspect 20A: A computer-readable storage medium having instructions stored thereon, which, when executed, cause one or more processors to perform the method according to any one of aspects 1A-12A.

[0344] Aspect 1B: 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 a block of video data, wherein updating the coefficient statistics includes, for each corresponding transform coefficient of the one or more transform coefficients of the TB: performing a derivation process to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding programs is used to encode the corresponding transform coefficient, the plurality of encoding programs including a context-based program for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value; and setting the coefficient statistics to the average of the coefficient statistics and the temporary value; determining historical values ​​based on the coefficient statistics; determining a Rice parameter of a specific transform coefficient of the TB, wherein determining the Rice parameter of the specific transform coefficient includes: determining a local sum based on the historical value based on the specific transform coefficient being less than 3 spatial locations from the right boundary or the bottom boundary of the TB; and determining the Rice parameter of the specific transform coefficient based on the local sum; determining a level of the specific transform coefficient based on the Rice parameter of the specific transform coefficient and one or more syntax elements encoded in the bitstream; and decoding the block based on the level of the specific transform coefficient.

[0345] Aspect 2B: According to the method of aspect 1B, wherein performing the derivation process to determine the temporary value includes: using a context-based program encoded based on the corresponding transform coefficients, and applying a base-2 logarithmic rounding function to the remainder of the corresponding transform coefficients and adding an integer value to determine the temporary value.

[0346] Aspect 3B: According to the method described in aspect 1B, wherein performing the derivation process to determine the temporary value includes: determining the temporary value based on the corresponding transform coefficient being encoded as an absolute value, and based on applying a base-2 logarithmic value to the absolute level of the corresponding transform coefficient using a rounding function.

[0347] Aspect 4B: The method described in aspect 1B further includes: determining a default historical value based on the quantization parameter (QP) of the slices of the image including TB; and resetting the coefficient statistics to the default historical value at the start of image segmentation.

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

[0349] Aspect 6B: 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 video data, wherein updating the coefficient statistics includes, for each corresponding transform coefficient of the one or more transform coefficients of the TB: performing a derivation process to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding procedures is used to encode the corresponding transform coefficient, the plurality of encoding procedures including a context-based procedure for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value; and setting the coefficient statistics to the average of the coefficient statistics and the temporary value; determining historical values ​​based on the coefficient statistics; 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 based on the historical value based on the specific transform coefficient being less than 3 spatial locations from the right boundary or the bottom boundary of the TB; and determining the Rice parameter for the specific transform coefficient based on the local sum; 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.

[0350] Aspect 7B: According to the method described in aspect 6B, wherein performing the derivation process to determine the temporary value includes: using a context-based program encoded based on the corresponding transform coefficients, and applying a base-2 logarithmic value of the remainder of the corresponding transform coefficients to a rounding function and adding an integer value to determine the temporary value.

[0351] Aspect 8B: According to the method described in aspect 6B, wherein performing the derivation process to determine the temporary value includes: determining the temporary value based on the corresponding transform coefficient being encoded as an absolute value, and based on applying a base-2 logarithmic value to the absolute level of the corresponding transform coefficient using a rounding function.

[0352] Aspect 9B: The method according to aspect 6B further includes: determining a default historical value based on the quantization parameter (QP) of the slice of the image including TB; and resetting the coefficient statistics to the default historical value at the start of image segmentation.

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

[0354] Aspect 11B: An apparatus for decoding video data, comprising: a memory configured to store video data; and processing circuitry configured to: initialize coefficient statistics; update the coefficient statistics based on one or more transform coefficients of a transform block (TB) of a block of video data, wherein, as part of updating the coefficient statistics, the processing circuitry is configured to: for each corresponding transform coefficient among the one or more transform coefficients of the TB: perform a derivation process to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding programs is used to encode the corresponding transform coefficient, the plurality of encoding programs including those for encoding the corresponding transform coefficient. The process involves: encoding the corresponding transform coefficients into absolute values ​​using a context-based procedure; setting coefficient statistics as the average of coefficient statistics and temporary values; determining historical values ​​based on coefficient statistics; determining Rice parameters for specific transform coefficients of a TB, wherein, as part of determining Rice parameters for specific transform coefficients, the processing circuitry is configured to: determine local sums based on historical values, based on the specific transform coefficient being less than 3 spatial locations from the right boundary or bottom boundary of the TB; and determine Rice parameters for specific transform coefficients based on local sums; determine the level of specific transform coefficients based on Rice parameters for specific transform coefficients; and decode the block based on the level of specific transform coefficients.

[0355] Aspect 12B: The apparatus according to aspect 11B, wherein, as part of performing the derivation process to determine a temporary value, the processing circuit is configured to: encode a context-based program based on the corresponding transform coefficients; apply a rounding function to the base-2 logarithm of the remainder of the corresponding transform coefficients and add an integer value to determine the temporary value; and encode the corresponding transform coefficients as absolute values; apply a rounding function to the base-2 logarithm of the absolute level of the corresponding transform coefficients to determine the temporary value.

[0356] Aspect 13B: The apparatus according to aspect 11B, wherein the processing circuitry is further configured to: determine a default historical value based on the quantization parameters (QP) of a slice of an image including TB; and reset the coefficient statistics to the default historical value at the start of image segmentation.

[0357] Aspect 14B: The apparatus according to aspect 11B, wherein: the processing circuit is further configured to store the coefficient statistics as Rice parameter derivatives, and as part of determining historical values ​​based on the coefficient statistics, the processing circuit is configured to shift the coefficient statistics to the left by 1.

[0358] Aspect 15B: The apparatus according to aspect 11B further includes a display configured to display decoded video data.

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

[0360] Aspect 17B: An apparatus for encoding video data includes: a memory configured to store video data; and processing circuitry configured to: initialize coefficient statistics; update the coefficient statistics based on one or more transform coefficients of a transform block (TB) of video data, wherein, as part of updating the coefficient statistics, the processing circuitry is configured to: for each corresponding transform coefficient among the one or more transform coefficients of the TB: perform a derivation process to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding programs is used to encode the corresponding transform coefficient, the plurality of encoding programs including those for encoding the corresponding transform coefficient. The process includes: row encoding and encoding the corresponding transform coefficients into absolute values ​​based on a context-based procedure; setting coefficient statistics as the average of coefficient statistics and temporary values; determining historical values ​​based on coefficient statistics; determining the Rice parameters of specific transform coefficients of a TB, wherein, as part of determining the Rice parameters of specific transform coefficients, the processing circuit is configured to: determine local sums based on historical values ​​based on the specific transform coefficient being less than 3 spatial locations from the right boundary or bottom boundary of the TB; determine the Rice parameters of specific transform coefficients based on local sums; and generate Rice codes for specific transform coefficients based on the Rice parameters of specific transform coefficients and the level of specific transform coefficients.

[0361] Aspect 18B: The apparatus according to aspect 17B, wherein, as part of performing the derivation process to determine a temporary value, the processing circuit is configured to: encode a context-based program based on the corresponding transform coefficients; apply a rounding function to the base-2 logarithm of the remainder of the corresponding transform coefficients and add an integer value to determine the temporary value; and encode the corresponding transform coefficients as absolute values; apply a rounding function to the base-2 logarithm of the absolute level of the corresponding transform coefficients to determine the temporary value.

[0362] Aspect 19B: The apparatus according to aspect 17B, wherein the processing circuitry is further configured to: determine a default historical value based on the quantization parameters (QP) of a slice of an image including TB; and reset the coefficient statistics to the default historical value at the start of image segmentation.

[0363] Aspect 20B: The apparatus according to aspect 17B, wherein: the processing circuit is further configured to store the coefficient statistics as Rice parameter derivatives, and as part of determining historical values ​​based on the coefficient statistics, the processing circuit is configured to shift the coefficient statistics to the left by 1.

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

[0365] Aspect 1C: 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 a block of video data, wherein updating the coefficient statistics includes, for each corresponding transform coefficient of the one or more transform coefficients of the TB: performing a derivation process to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding programs is used to encode the corresponding transform coefficient, the plurality of encoding programs including a context-based program for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value; and setting the coefficient statistics to the average of the coefficient statistics and the temporary value; determining historical values ​​based on the coefficient statistics; determining a Rice parameter of a specific transform coefficient of the TB, wherein determining the Rice parameter of the specific transform coefficient includes: determining a local sum based on the historical value based on the specific transform coefficient being less than 3 spatial locations from the right boundary or the bottom boundary of the TB; and determining the Rice parameter of the specific transform coefficient based on the local sum; determining a level of the specific transform coefficient based on the Rice parameter of the specific transform coefficient and one or more syntax elements encoded in the bitstream; and decoding the block based on the level of the specific transform coefficient.

[0366] Aspect 2C: According to the method of aspect 1C, wherein performing the derivation process to determine the temporary value includes: using a context-based program encoded based on the corresponding transform coefficients, and applying a base-2 logarithmic value of the remainder of the corresponding transform coefficients to a rounding function and adding an integer value to determine the temporary value.

[0367] Aspect 3C: According to the method described in aspect 1C, wherein performing the derivation process to determine the temporary value includes: determining the temporary value based on the corresponding transform coefficient being encoded as an absolute value, and based on applying a base-2 logarithmic value to the absolute level of the corresponding transform coefficient using a rounding function.

[0368] Aspect 4C: The method according to any one of Aspects 1C to 3C further includes: determining a default history value based on the quantization parameter (QP) of a slice of an image including TB; and resetting the coefficient statistics to the default history value at the start of image segmentation.

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

[0370] Aspect 6C: 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 video data, wherein updating the coefficient statistics includes, for each corresponding transform coefficient of the one or more transform coefficients of the TB: performing a derivation process to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding procedures is used to encode the corresponding transform coefficient, the plurality of encoding procedures including a context-based procedure for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value; and setting the coefficient statistics to the average of the coefficient statistics and the temporary value; determining historical values ​​based on the coefficient statistics; determining a Rice parameter of a specific transform coefficient of the TB, wherein determining the Rice parameter of the specific transform coefficient includes: determining a local sum based on the historical value based on the specific transform coefficient being less than 3 spatial locations from the right boundary or the bottom boundary of the TB; and determining the Rice parameter of the specific transform coefficient based on the local sum; and generating a Rice code of the specific transform coefficient based on the Rice parameter of the specific transform coefficient and the level of the specific transform coefficient.

[0371] Aspect 7C: According to the method described in aspect 6C, wherein performing the derivation process to determine the temporary value includes: using a context-based program encoded based on the corresponding transform coefficients, and applying a base-2 logarithmic rounding function to the remainder of the corresponding transform coefficients and adding an integer value to determine the temporary value.

[0372] Aspect 8C: According to the method described in aspect 6C, wherein performing the derivation process to determine the temporary value includes: determining the temporary value based on the corresponding transform coefficient being encoded as an absolute value, and based on applying a base-2 logarithmic value to the absolute level of the corresponding transform coefficient using a rounding function.

[0373] Aspect 9C: The method according to any one of Aspects 6C to 8C further includes: determining a default history value based on the quantization parameter (QP) of a slice of an image including TB; and resetting the coefficient statistics to the default history value at the start of image segmentation.

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

[0375] Aspect 11C: An apparatus for decoding video data, comprising: a memory configured to store video data; and processing circuitry configured to: initialize coefficient statistics; update the coefficient statistics based on one or more transform coefficients of a transform block (TB) of a block of video data, wherein, as part of updating the coefficient statistics, the processing circuitry is configured to: for each corresponding transform coefficient of the one or more transform coefficients of the TB: perform a derivation process to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding programs is used to encode the corresponding transform coefficient, the plurality of encoding programs including those for encoding the corresponding transform coefficient. The process involves: encoding the corresponding transform coefficients into absolute values ​​using a context-based procedure; setting coefficient statistics as the average of coefficient statistics and temporary values; determining historical values ​​based on coefficient statistics; determining Rice parameters for specific transform coefficients of a TB, wherein, as part of determining Rice parameters for specific transform coefficients, the processing circuitry is configured to: determine local sums based on historical values, based on the specific transform coefficient being less than 3 spatial locations from the right boundary or bottom boundary of the TB; and determine Rice parameters for specific transform coefficients based on local sums; determine the level of specific transform coefficients based on Rice parameters for specific transform coefficients; and decode the block based on the level of specific transform coefficients.

[0376] Aspect 12C: The apparatus according to aspect 11C, wherein, as part of performing the derivation process to determine a temporary value, the processing circuit is configured to: encode a context-based program based on the corresponding transform coefficients; apply a rounding function to the base-2 logarithm of the remainder of the corresponding transform coefficients and add an integer value to determine the temporary value; and encode the corresponding transform coefficients as absolute values; apply a rounding function to the base-2 logarithm of the absolute level of the corresponding transform coefficients to determine the temporary value.

[0377] Aspect 13C: The device according to any one of Aspects 11C and 12C, wherein the processing circuitry is further configured to: determine a default historical value based on the quantization parameters (QP) of a slice of an image including TB; and reset the coefficient statistics to the default historical value at the start of image segmentation.

[0378] Aspect 14C: The apparatus according to any one of aspects 11C to 13C, wherein: the processing circuit is further configured to store the coefficient statistics as Rice parameter derivatives, and as part of determining historical values ​​based on the coefficient statistics, the processing circuit is configured to shift the coefficient statistics to the left by 1.

[0379] Aspect 15C: The device according to any one of aspects 11C to 14C further includes a display configured to display decoded video data.

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

[0381] Aspect 17C: An apparatus for encoding video data, comprising: a memory configured to store video data; and processing circuitry configured to: initialize coefficient statistics; update the coefficient statistics based on one or more transform coefficients of a transform block (TB) of video data, wherein, as part of updating the coefficient statistics, the processing circuitry is configured to: for each corresponding transform coefficient among the one or more transform coefficients of the TB: perform a derivation process to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding programs is used to encode the corresponding transform coefficient, the plurality of encoding programs including those for encoding the corresponding transform coefficient. The process includes: row encoding and encoding the corresponding transform coefficients into absolute values ​​based on a context-based procedure; setting coefficient statistics as the average of coefficient statistics and temporary values; determining historical values ​​based on coefficient statistics; determining the Rice parameters of specific transform coefficients of a TB, wherein, as part of determining the Rice parameters of specific transform coefficients, the processing circuit is configured to: determine local sums based on historical values ​​based on the specific transform coefficient being less than 3 spatial locations from the right boundary or bottom boundary of the TB; determine the Rice parameters of specific transform coefficients based on local sums; and generate Rice codes for specific transform coefficients based on the Rice parameters of specific transform coefficients and the level of specific transform coefficients.

[0382] Aspect 18C: The apparatus according to aspect 17C, wherein, as part of performing a derivation process to determine a temporary value, the processing circuit is configured to: encode a context-based program based on the corresponding transform coefficients; apply a rounding function to the base-2 logarithm of the remainder of the corresponding transform coefficients and add an integer value to determine the temporary value; and encode the corresponding transform coefficients as absolute values; apply a rounding function to the base-2 logarithm of the absolute level of the corresponding transform coefficients to determine the temporary value.

[0383] Aspect 19C: The apparatus according to any one of Aspects 17C and 18C, wherein the processing circuitry is further configured to: determine a default historical value based on the quantization parameters (QP) of a slice of an image including TB; and reset the coefficient statistics to the default historical value at the start of image segmentation.

[0384] Aspect 20C: The apparatus according to any one of aspects 17C to 19C, wherein: the processing circuit is further configured to store the coefficient statistics as Rice parameter derivatives, and as part of determining historical values ​​based on the coefficient statistics, the processing circuit is configured to shift the coefficient statistics to the left by 1.

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

[0386] It should be recognized that, depending on the example, certain actions or events of any technique described herein may be performed in a different order, and may be added, combined, or omitted entirely (e.g., not all described actions or events are necessary for the practice of the technique). Furthermore, in some examples, actions or events may be performed concurrently rather than sequentially (e.g., through multithreading, interrupt handling, or multiprocessor).

[0387] In one or more examples, the described functionality can be implemented using hardware, software, firmware, or any combination thereof. If implemented in software, these functions can be stored on or transmitted thereon as one or more instructions or code and executed by a hardware-based processing unit. A computer-readable medium can include a computer-readable storage medium (which corresponds to a tangible medium such as a data storage medium) or a communication medium (including, for example, any medium that facilitates the transfer of a computer program from one place to another according to a communication protocol). In this way, a computer-readable medium can generally correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium such as a signal or carrier wave. A data storage medium can 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 can include a computer-readable medium.

[0388] By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disc storage, 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 is accessible by a computer. Furthermore, any connection is properly referred to as 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), then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies (such as infrared, radio, and microwave) are included in 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 transient media, but rather refer to non-transient tangible storage media. Disks and optical discs as used herein include compact optical discs (CDs), laser discs, optical discs, digital versatile optical discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0389] Instructions can 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 circuits). Accordingly, the terms "processor" and "processing circuit" as used herein can refer to any of the foregoing structures or any other structure suitable for implementing the techniques described herein. Furthermore, in some aspects, the functionality described herein can be provided in dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into combined codecs. Moreover, these techniques can be implemented entirely within one or more circuit or logic elements.

[0390] The techniques disclosed herein can be implemented in a wide variety of devices or apparatuses, including wireless mobile phones, integrated circuits (ICs), or collections of ICs (e.g., chipsets). Various components, modules, or units are described in this disclosure to emphasize functional aspects of a device configured to perform the disclosed techniques, but they do not necessarily need to be implemented by different hardware units. Rather, as described above, various units can be combined in a codec hardware unit or provided by a collection of interoperable hardware units, including one or more processors as described above combined with suitable software and / or firmware.

[0391] Various examples have been described. These and other examples are within the scope of the appended claims.

Claims

1. A method for decoding video data, the method comprising: Initialize the coefficient statistics; The coefficient statistics are updated based on one or more transform coefficients of a transform block TB of the video data, wherein updating the coefficient statistics includes, for each corresponding transform coefficient among the one or more transform coefficients of the TB: A derivation process is performed to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding procedures is used to encode the corresponding transform coefficient, the plurality of encoding procedures including a context-based procedure for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value; and Set the coefficient statistical value to the average of the coefficient statistical value and the temporary value; Historical values ​​are determined based on the statistical values ​​of the aforementioned coefficients; Determine the Rice parameters of specific transform coefficients of the TB, wherein determining the Rice parameters of the specific transform coefficients includes: Based on the fact that the specific transform coefficients are less than 3 spatial locations from the right boundary or the bottom boundary of the TB, the local sum value is determined based on the historical values; and The Rice parameter of the specific transform coefficient is determined based on the local sum value; The level of the specific transform coefficient is determined based on the Rice parameter of the specific transform coefficient and one or more syntax elements encoded in the bitstream; and The block is decoded based on the level of the specific transform coefficients.

2. The method according to claim 1, wherein, Performing the derivation process to determine the temporary value includes: The context-based program is encoded based on the corresponding transform coefficients, and the temporary value is determined by applying a base-2 logarithmic rounding function to the remainder of the corresponding transform coefficient and adding an integer value.

3. The method according to claim 1, wherein, Performing the derivation process to determine the temporary value includes: The temporary value is determined by applying a base-2 rounding function to the logarithmic value of the absolute level of the corresponding transform coefficient, which is encoded as an absolute value.

4. The method according to claim 1, further comprising: The default historical value is determined based on the quantization parameter QP of the slice of the image including the TB; as well as When the segmentation of the image begins, the coefficient statistics are reset to the default historical values.

5. The method according to claim 1, wherein: The method further includes storing the coefficient statistics as Rice parameter derivatives, and Determining the historical value based on the coefficient statistics includes shifting the coefficient statistics to the left by 1.

6. A method for encoding video data, the method comprising: Initialize the coefficient statistics; The coefficient statistics are updated based on one or more transform coefficients of the transform block TB of the video data, wherein updating the coefficient statistics includes, for each corresponding transform coefficient among the one or more transform coefficients of the TB: A derivation process is performed to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding procedures is used to encode the corresponding transform coefficient, the plurality of encoding procedures including a context-based procedure for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value; and Set the coefficient statistical value to the average of the coefficient statistical value and the temporary value; Historical values ​​are determined based on the statistical values ​​of the aforementioned coefficients; Determine the Rice parameters of specific transform coefficients of the TB, wherein determining the Rice parameters of the specific transform coefficients includes: Based on the fact that the specific transform coefficients are less than 3 spatial locations from the right boundary or the bottom boundary of the TB, the local sum value is determined based on the historical values; and The Rice parameters of the specific transform coefficients are determined based on the local sum values; and The Rice code of the specific transform coefficient is generated based on the Rice parameter of the specific transform coefficient and the level of the specific transform coefficient.

7. The method according to claim 6, wherein, Performing the derivation process to determine the temporary value includes: The context-based program is encoded based on the corresponding transform coefficients, and the temporary value is determined by applying a base-2 logarithmic rounding function to the remainder of the corresponding transform coefficient and adding an integer value.

8. The method according to claim 6, wherein, Performing the derivation process to determine the temporary value includes: The temporary value is determined by applying a base-2 rounding function to the logarithmic value of the absolute level of the corresponding transform coefficient, which is encoded as an absolute value.

9. The method according to claim 6, further comprising: The default historical value is determined based on the quantization parameter QP of the slice of the image including the TB; as well as When the segmentation of the image begins, the coefficient statistics are reset to the default historical values.

10. The method according to claim 6, wherein: The method further includes storing the coefficient statistics as Rice parameter derivatives, and Determining the historical value based on the coefficient statistics includes shifting the coefficient statistics to the left by 1.

11. An apparatus for decoding video data, the apparatus comprising: The memory is configured to store the video data; as well as The processing circuit is configured as follows: Initialize the coefficient statistics; The coefficient statistics are updated based on one or more transform coefficients of the transform block TB of the video data, wherein, as part of updating the coefficient statistics, the processing circuit is configured to, for each corresponding transform coefficient among the one or more transform coefficients of the TB: A derivation process is performed to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding procedures is used to encode the corresponding transform coefficient, the plurality of encoding procedures including a context-based procedure for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value; and Set the coefficient statistical value to the average of the coefficient statistical value and the temporary value; Historical values ​​are determined based on the statistical values ​​of the aforementioned coefficients; Determine the Rice parameters of specific transform coefficients of the TB, wherein, as part of determining the Rice parameters of the specific transform coefficients, the processing circuit is configured to: Based on the fact that the specific transform coefficients are less than 3 spatial locations from the right boundary or the bottom boundary of the TB, the local sum value is determined based on the historical values; and The Rice parameter of the specific transform coefficient is determined based on the local sum value; The level of the specific transform coefficient is determined based on the Rice parameter of the specific transform coefficient; and The TB is decoded based on the level of the specific transform coefficients.

12. The device according to claim 11, wherein, As part of performing the derivation process to determine the temporary value, the processing circuit is configured to: The context-based program is encoded based on the corresponding transformation coefficients, and the temporary value is determined by applying a base-2 logarithmic value of the remainder of the corresponding transformation coefficients and adding an integer value. as well as The temporary value is determined by applying a base-2 rounding function to the logarithmic value of the absolute level of the corresponding transform coefficient, which is encoded as an absolute value.

13. The device according to claim 11, wherein, The processing circuit is further configured to: The default historical value is determined based on the quantization parameter QP of the slice of the image including the TB; as well as When the segmentation of the image begins, the coefficient statistics are reset to the default historical values.

14. The device according to claim 11, wherein: The processing circuit is further configured to store the coefficient statistics as Ricean derivatives, and As part of determining the historical value based on the coefficient statistics, the processing circuit is configured to shift the coefficient statistics to the left by 1 bit.

15. The device of claim 11, further comprising a display configured to display decoded video data.

16. The device according to claim 11, wherein, The device includes one or more of a camera, computer, mobile device, broadcast receiver device, or set-top box.

17. An apparatus for encoding video data, the apparatus comprising: The memory is configured to store the video data; as well as The processing circuit is configured as follows: Initialize the coefficient statistics; The coefficient statistics are updated based on one or more transform coefficients of the transform block TB of the video data, wherein, as part of updating the coefficient statistics, the processing circuit is configured to, for each corresponding transform coefficient among the one or more transform coefficients of the TB: A derivation process is performed to determine a temporary value, wherein the derivation process is determined at least in part based on which of a plurality of encoding procedures is used to encode the corresponding transform coefficient, the plurality of encoding procedures including a context-based procedure for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value; and Set the coefficient statistical value to the average of the coefficient statistical value and the temporary value; Historical values ​​are determined based on the statistical values ​​of the aforementioned coefficients; Determine the Rice parameters of specific transform coefficients of the TB, wherein, as part of determining the Rice parameters of the specific transform coefficients, the processing circuit is configured to: Based on the fact that the specific transform coefficients are less than 3 spatial locations from the right boundary or the bottom boundary of the TB, the local sum value is determined based on the historical values; and The Rice parameters of the specific transform coefficients are determined based on the local sum values; and The Rice code of the specific transform coefficient is generated based on the Rice parameter of the specific transform coefficient and the level of the specific transform coefficient.

18. The device according to claim 17, wherein, As part of performing the derivation process to determine the temporary value, the processing circuit is configured to: The context-based program is encoded based on the corresponding transformation coefficients, and the temporary value is determined by applying a base-2 logarithmic value of the remainder of the corresponding transformation coefficients and adding an integer value. as well as The temporary value is determined by applying a base-2 rounding function to the logarithmic value of the absolute level of the corresponding transform coefficient, which is encoded as an absolute value.

19. The device according to claim 17, wherein, The processing circuit is further configured to: The default historical value is determined based on the quantization parameter QP of the slice of the image including the TB; as well as When the segmentation of the image begins, the coefficient statistics are reset to the default historical values.

20. The apparatus according to claim 17, wherein: The processing circuit is further configured to store the coefficient statistics as Ricean derivatives, and As part of determining the historical value based on the coefficient statistics, the processing circuit is configured to shift the coefficient statistics to the left by 1 bit.

21. The device according to claim 17, wherein, The device includes one or more of a camera, computer, mobile device, broadcast receiver device, or set-top box.

22. An apparatus for decoding video data, the apparatus comprising components for performing the method according to any one of claims 1 to 5.

23. A computer-readable medium having program code recorded thereon, wherein the program code is executable by one or more processors to cause the processors to perform the method according to any one of claims 1 to 5.

24. A computer program product comprising computer-readable instructions that, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 5.

25. An apparatus for encoding video data, the apparatus comprising components for performing the method according to any one of claims 6 to 10.

26. A computer-readable medium having program code recorded thereon, wherein the program code is executable by one or more processors to cause the processors to perform the method according to any one of claims 6 to 10.

27. A computer program product comprising computer-readable instructions that, when executed by one or more processors, cause the processors to perform the method according to any one of claims 6 to 10.