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

A hybrid method for updating coefficient statistics in video decoding addresses inaccuracies in determining Rice parameters for high-bit depth decoding, improving efficiency by combining context-based and history-based methods to enhance decoding performance in VVC standards.

TWI931406BActive Publication Date: 2026-07-11QUALCOMM INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
TW110147882
Authority / Receiving Office
TW · TW
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-12-20
Filing Date
2021-12-21
Publication Date
2026-07-11
Estimated Expiration
2041-12-20

AI Technical Summary

Technical Problem

Existing video decoding technologies face challenges in accurately determining Rice parameters for high-bit depth decoding, particularly in high-bit depth extensions of VVC, leading to reduced decoding efficiency due to inaccuracies in selecting Rice parameters when transform coefficients are near the boundaries of transform blocks.

Method used

A hybrid procedure is introduced that combines context-based and history-based methods to update coefficient statistics, considering the encoding procedure used for each transform coefficient, allowing for more accurate determination of Rice parameters through local sums and historical values, enhancing decoding efficiency.

Benefits of technology

The hybrid approach improves the accuracy of Rice parameter selection, leading to enhanced decoding efficiency and performance in high-bit depth video decoding, particularly in VVC standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IMG-2_DRAW_110147882-A0304-14-0001-1
    Figure IMG-2_DRAW_110147882-A0304-14-0001-1
  • Figure IMG-2_DRAW_110147882-A0304-14-0002-2
    Figure IMG-2_DRAW_110147882-A0304-14-0002-2
  • Figure IMG-2_DRAW_110147882-A0304-14-0003-3
    Figure IMG-2_DRAW_110147882-A0304-14-0003-3
Patent Text Reader

Abstract

A method for decoding video data includes: updating coefficient statistics based on one or more transform coefficients of a transform block (TB), wherein updating the coefficient statistics includes: for each of the one or more transform coefficients of the TB, performing a derivation procedure to determine a temporary value, wherein the derivation procedure 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; setting the coefficient statistics as the average of the coefficient statistics and the temporary value; determining historical values ​​based on the coefficient statistics; and determining a Rice parameter for a specific transform coefficient of the TB.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This patent application claims the benefit of U.S. Provisional Patent Application No. 63 / 128,641, filed on December 21, 2020, the entire contents of which are incorporated herein by reference.

[0002] This case concerns video encoding and video decoding. Prior 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 gaming devices, video game consoles, cellular or satellite wireless phones (so-called "smartphones"), video conferencing equipment, video streaming devices, etc. Digital video devices implement video decoding 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 Decoding (AVC), ITU-T H.265 / High Efficiency Video Decoding (HEVC), and extensions to such standards. By implementing these video decoding technologies, video devices can more efficiently transmit, receive, encode, decode, and / or store digital video information.

[0004] Video decoding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video 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 decoding tree units (CTUs), decoding units (CUs), and / or decoding nodes. Video blocks in a slice of a picture decoded intra-picture (I) are encoded using spatial prediction relative to reference samples in adjacent blocks within the same picture. Video blocks in a slice of a picture decoded inter-picture (P or B) can use 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 referred to as a frame, and a reference picture may be referred to as a reference frame. Summary of the Invention

[0005] In summary, this paper describes a technique for deriving Rice parameters in general residual decoding (RRC) for high-bit depth decoding. The proposed technique relates to extensions of video decoding standards (e.g., Multifunctional Video Decoding (VVC)), but can be applied to other video decoding standards. As described herein, the procedure for updating the coefficient statistics used in determining the Rice parameters for the transform coefficients can consider which of a plurality of coding procedures to use to encode the corresponding transform coefficients. This 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 parameters based at least in part on the coding procedure used to encode the corresponding transform coefficients can improve the accuracy of the Rice parameter selection, which can enhance decoding efficiency.

[0006] In one instance, this case 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 the video data, wherein updating the coefficient statistics comprises: for each of the one or more transform coefficients of the TB, performing a derivation procedure to determine a temporary value, wherein the derivation procedure 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 comprising methods for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value based on upper and lower bounds. The document describes the procedure for 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 determining Rice parameters for specific transform coefficients includes: determining local sums based on historical values ​​based on the specific transform coefficient being less than three spatial locations from the right boundary or lower boundary of the TB; determining Rice parameters for specific transform coefficients based on local sums; determining the level of specific transform coefficients based on Rice parameters for specific transform coefficients and one or more syntax elements encoded in the bitstream; and decoding the TB based on the level of specific transform coefficients.

[0007] In another example, this case 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 the video data, wherein updating the coefficient statistics comprises: for each of the one or more transform coefficients of the TB, performing a derivation procedure to determine a temporary value, wherein the derivation procedure 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 comprising methods for encoding the corresponding transform coefficient and assigning the corresponding transform coefficient to the transform coefficient. The program encodes numbers as absolute values ​​based on context; sets coefficient statistics as 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 determining Rice parameters for specific transform coefficients includes: determining local sums based on historical values ​​based on the specific transform coefficient being less than three spatial locations from the right boundary or lower boundary of the TB; determining Rice parameters for specific transform coefficients based on local sums; and generating Rice codes for specific transform coefficients based on Rice parameters for specific transform coefficients and the level of specific transform coefficients.

[0008] In another example, this application describes an apparatus for decoding video data, the apparatus comprising: a memory configured to store the video data; and processing circuitry configured to: initialize coefficient statistics; update the coefficient statistics based on one or more transform coefficients of a block of transforms (TB) of the video data, wherein the processing circuitry is configured to: as part of updating the coefficient statistics, for each of the one or more transform coefficients of the TB: execute a derivation procedure to determine a temporary value, wherein the derivation procedure 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 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 the TB, wherein the processing circuit is configured to: as part of determining Rice parameters for specific transform coefficients; determine local sums based on historical values, based on the specific transform coefficient being less than three spatial locations from the right boundary or lower 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.

[0009] In another example, this application describes an apparatus for encoding video data, the apparatus comprising: a memory configured to store the 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 the video data, wherein the processing circuitry is configured to: as part of updating the coefficient statistics, for each of the one or more transform coefficients of the TB: execute a derivation procedure to determine a temporary value, wherein the derivation procedure 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 those for encoding the corresponding transform coefficient. The process encodes coefficients and encodes the corresponding transform coefficients as absolute values ​​using a context-based procedure; sets coefficient statistics as the average of coefficient statistics and temporary values; determines historical values ​​based on coefficient statistics; and determines Rice parameters for a specific transform coefficient of the TB, wherein the processing circuit is configured to: as part of determining Rice parameters for a specific transform coefficient: determine a local sum based on historical values ​​based on the specific transform coefficient being less than three spatial locations from the right boundary or lower boundary of the TB; and determine Rice parameters for a specific transform coefficient based on the local sum; and generate Rice codes for a specific transform coefficient based on the Rice parameters for the specific transform coefficient and the level of the specific transform coefficient.

[0010] In another example, this application describes an apparatus for decoding video data, the apparatus comprising: a unit for initializing coefficient statistics; a unit 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 unit for updating the coefficient statistics includes: a corresponding transform coefficient for each of the one or more transform coefficients of the TB; and a unit for performing a derivation procedure to determine temporary values, wherein the derivation procedure 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 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; a unit for setting the coefficient statistics as the average of the coefficient statistics and temporary values; a unit for determining historical values ​​based on the coefficient statistics; and a unit for determining the Rice parameter for a specific transform coefficient of the TB, wherein the unit for determining the Rice parameter includes: for a specific transform coefficient: a unit for determining a local sum value based on historical values ​​based on the specific transform coefficient being less than three spatial locations from the right boundary or the lower boundary of the TB; a unit for determining the Rice parameter for a specific transform coefficient based on the local sum value; a unit for determining the level of a specific transform coefficient based on the Rice parameter for a specific transform coefficient; and a unit for decoding the block based on the level of the specific transform coefficient.

[0011] In another example, this application describes an apparatus for encoding video data, the apparatus comprising: a unit for initializing coefficient statistics; a unit for updating the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the video data, wherein the unit for updating the coefficient statistics includes: a corresponding transform coefficient for each of the one or more transform coefficients of the TB; and a unit for performing a derivation procedure to determine temporary values, wherein the derivation procedure 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 encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value. The program includes: a context-based procedure for setting coefficient statistics as the average of coefficient statistics and temporary values; a unit for determining historical values ​​based on coefficient statistics; and a unit for determining Rice parameters for a specific transform coefficient of a TB, wherein, for a specific transform coefficient, the unit for determining Rice parameters includes: a unit for determining a local sum based on historical values ​​based on the specific transform coefficient being less than three spatial locations from the right boundary or lower boundary of the TB; a unit for determining Rice parameters for a specific transform coefficient based on local sums; and a unit for generating Rice codes for a specific transform coefficient based on the Rice parameters for the specific transform coefficient and the level of the specific transform coefficient.

[0012] In another instance, this case describes a computer-readable storage medium having instructions stored thereon, which, when executed, cause one or more processors to: initialize coefficient statistics; update coefficient statistics based on one or more transform coefficients of a transform block (TB) of video data, wherein the instructions causing one or more processors to update the coefficient statistics include instructions that, when executed, cause one or more processors to: execute a derivation program to determine a temporary value, wherein the derivation program 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 converting the corresponding transform coefficient into a temporary value. The program encodes coefficients as absolute values ​​using a context-based procedure; sets coefficient statistics as the average of coefficient statistics and temporary values; determines historical values ​​based on coefficient statistics; determines Rice parameters for specific transform coefficients of a block, wherein the instructions that cause one or more processors to determine Rice parameters for specific transform coefficients include instructions that, when executed, cause one or more processors to: determine a local sum based on historical values ​​based on the fact that the specific transform coefficient is less than three spatial locations from the right boundary or lower boundary of the block; and determine Rice parameters for specific transform coefficients based on local sums; determine the level of a specific transform coefficient based on Rice parameters for specific transform coefficients 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 instance, this case describes a computer-readable storage medium having instructions stored thereon, which, when executed, cause one or more processors to: initialize coefficient statistics; update coefficient statistics based on one or more transform coefficients of a transform block (TB) of video data, wherein the instructions causing one or more processors to update the coefficient statistics include, when executed, instructions causing one or more processors to: execute a derivation program to determine a temporary value, wherein the derivation program 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 performs encoding and encodes the corresponding transform coefficients as absolute values ​​using a context-based procedure; sets the coefficient statistics as the average of the coefficient statistics and temporary values; determines historical values ​​based on the coefficient statistics; determines Rice parameters for a specific transform coefficient of a TB, wherein the instructions that cause one or more processors to determine the Rice parameters for a specific transform coefficient include instructions that, when executed, cause one or more processors to: determine a local sum based on historical values ​​based on the fact that the specific transform coefficient is less than three spatial locations from the right boundary or the lower boundary of the TB; determine the Rice parameters for a specific transform coefficient based on the local sum; and generate Rice codes for a specific transform coefficient based on the Rice parameters for the specific transform coefficient and the level of the specific transform coefficient.

[0014] Details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description, drawings, and claims. Simple Explanation of the Diagram

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

[0016] Figure 2 is a conceptual diagram illustrating an example of adjacent coefficients that can be used to calculate the local sum of the current coefficients according to one or more techniques based on the content of this case.

[0017] Figure 3 is a conceptual diagram showing an example spatial region of one or more technologies according to the content of this case.

[0018] Figures 4A and 4B are conceptual diagrams illustrating an example quadtree binary tree (QTBT) structure and a corresponding decoding tree unit (CTU) based on one or more technologies according to the present invention.

[0019] Figure 5 is a block diagram illustrating an example video transcoder that can perform the technology described in this case.

[0020] Figure 6 is a block diagram illustrating an example video decoder that can perform the techniques described in this case.

[0021] Figure 7 is a flowchart illustrating an example method for encoding the current block according to the technology described in this case.

[0022] Figure 8 is a flowchart illustrating an example method for decoding the current block according to the technology described in this case.

[0023] Figure 9 is a flowchart illustrating an example procedure for encoding video data using one or more technologies according to the content of this case.

[0024] Figure 10 is a flowchart illustrating an example procedure for decoding video data using one or more technologies according to the content of this case. Implementation

[0025] In video decoding standards such as Universal Video Decoding (VVC), the video transcoder produces residual samples. These residual samples indicate the difference between the predicted sample of a block and the original sample of the block. The video transcoder then applies a transform (e.g., discrete cosine transform) to the residual-sampled block (e.g., a transform block (TB)) to produce transform coefficients. Each transform coefficient can be represented by one or more syntax elements. In some instances, a context-based procedure (e.g., a method) can be used to encode the transform coefficients, where the level of the transform coefficient can be represented using a symbolic syntax element, a greater-than-1 syntax element, a greater-than-2 syntax element, and a remainder syntax element. In some instances, an absolute value syntax element (e.g., dec_abs_level) can be used to encode the transform coefficients. The remainder syntax element, or absolute value, typically includes the most bits.

[0026] Video transcoders can use Rice decoding to encode remainder syntax elements or absolute value syntax elements. Rice decoding is a program that uses input values ​​(e.g., the value of a remainder syntax element) to produce Rice code that includes a first code value and a last code value. The first code value can be generated as: Where q is the initial code, x is the input value, M equals 2k, and k is the Rice parameter. The postfix can be generated as: , where r is the postfix.

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

[0028] Another complexity in 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 the template can reduce the accuracy of the procedure for determining the Rice parameter used for the current transform coefficient. To address this, VVC defines a history-based procedure for determining the Rice parameter used for the current TB. When using a history-based procedure to determine the Rice parameter for the current transform coefficient in the current Rice class for the current TB, the video decoder can use historical values ​​(e.g., histCoeff) as the values ​​of neighboring transform coefficients within two positions of the right or bottom boundary of the current TB.

[0029] To use a history-based process, a video decoder (e.g., a video transcoder 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 decoder can determine historical values ​​based on the coefficient statistics.

[0030] However, as mentioned above, the transform coefficients can be encoded using a context-based procedure or by using absolute values. While it's possible to encode the transform coefficients using a context-based procedure or by using absolute values, updating coefficient statistics in the same way can reduce performance and may lead to incorrect selection of the Rice parameter. According to one or more techniques described herein, a video decoder (e.g., a video transcoder 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 decoder can perform a derivation procedure to determine a temporary value for each of the one or more transform coefficients of the TB. This derivation procedure considers (i.e., 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 includes a context-based procedure for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value. The video decoder can set the coefficient statistics as the average of the coefficient statistics and the temporary value. Because the derivation procedure is determined, at least in part, by which encoding procedure is used to encode the corresponding transform coefficients, the video decoder is more likely to determine the optimal Rice parameters for the corresponding transform coefficients. The video decoder is more likely to determine the optimal Rice parameters for the corresponding transform coefficients because VVC defines a "hybrid" procedure for decoding general residual coefficients (RRCs). In this "hybrid" procedure, depending on the mode, the video decoder can perform CABAC decoding of the RRC in bypass mode (i.e., the number of bits representing the coefficients depends on the exponential Golomb procedure of the Rice parameters derived from the local template processing), or it can perform CABAC decoding of the RRC in a combination of context decoding for the first bit and bypass decoding for the remaining bits of the RRC (with Rice derivation). This "hybrid" procedure is described in more detail below.

[0031] Figure 1 is a block diagram illustrating an example video encoding and decoding system 100 capable of performing the techniques described herein. The techniques described herein are generally aimed at decoding (encoding and / or decoding) video data. Typically, 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 relay data (such as signal transmission data).

[0032] As shown in Figure 1, in this example, system 100 includes a source device 102 that 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 media 110. Source device 102 and destination device 116 can include any of a wide variety of devices, including desktop computers, notebook computers (i.e., laptops), 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 can be equipped for wireless communication and can therefore be referred to as wireless communication devices.

[0033] In the example of Figure 1, source device 102 includes a video source 104, memory 106, a video transcoder 200, and an output interface 108. Destination device 116 includes an input interface 122, a video decoder 300, memory 120, and a display device 118. According to this invention, the video transcoder 200 of source device 102 and the video decoder 300 of destination device 116 can be configured to apply Rice parameter derivation techniques used in general residual decoding (RRC) for high-bit depth decoding. Therefore, 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 and destination devices 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] The system 100 shown in Figure 1 is merely one example. Typically, any digital video encoding and / or decoding device can perform Rice parameter derivation techniques for RRC in high-bit depth decoding. Source device 102 and destination device 116 are merely examples of such decoding devices, where source device 102 generates decoded video data for transmission to destination device 116. In this context, a "decoding" device is referred to as a device that performs the decoding (encoding and / or decoding) of data. Therefore, video transcoder 200 and video decoder 300 represent instances of decoding devices (specifically, a video transcoder and a video decoder). In some instances, 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 replay, video broadcasting or video telephony.

[0035] Typically, video source 104 represents a source of video data (i.e., raw, unencoded video data) and provides a continuous series of images (also called "frames") of video data to video transcoder 200, which encodes the data used for the images. The video source 104 of source device 102 may include a video capturing device (such as a camera), a video archive containing previously captured raw video, and / or a video feed interface for receiving video from a video content provider. Alternatively, video source 104 may generate source video or a combination of archived and computer-generated video from computer graphics-based data. In each case, video transcoder 200 encodes the captured, pre-captured, or computer-generated video data. Video transcoder 200 may rearrange the images from the received order (sometimes called "display order") to a decoding order for decoding. The video transcoder 200 can generate a bitstream including encoded video data. Subsequently, the source device 102 can output the encoded video data to a computer-readable medium 110 via an output interface 108 for reception and / or retrieval by an input interface 122 of a destination device 116, for example.

[0036] The memory 106 of the source device 102 and the memory 120 of the destination device 116 represent general-purpose memory. In some instances, memory 106 and memory 120 may store raw video data, such as raw video from video source 104 and raw decoded video data from video decoder 300. Alternatively or additionally, memory 106 and memory 120 may store software instructions executable by, for example, video transcoder 200 and video decoder 300. Although memory 106 and memory 120 are shown separately from video transcoder 200 and video decoder 300 in this example, it should be understood that video transcoder 200 and video decoder 300 may also include internal memory for functionally similar or equivalent purposes. Furthermore, memory 106 and memory 120 may store, for example, encoded video data output from video transcoder 200 and input to video decoder 300. In some instances, a portion of memory 106 or memory 120 may be allocated as one or more video buffers, for example, to store raw, decoded, and / or encoded video data.

[0037] Computer-readable media 110 can refer to any type of media or device capable of transmitting encoded video data from source device 102 to destination device 116. In one example, computer-readable media 110 represents communication media that enables source device 102 to transmit encoded video data directly to destination device 116 in real time, for example, via a radio frequency network or a computer-based network. According to communication standards such as wireless communication protocols, output interface 108 can modulate the transmitted signal including encoded video data, and input interface 122 can demodulate the received transmitted signal. Communication media can include any wireless or wired communication media, such as radio frequency (RF) spectrum or one or more physical transmission lines. Communication media 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. Communication media can include routers, switches, base stations, or any other means that can facilitate communication from source device 102 to destination device 116.

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

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

[0040] File server 114 can be any type of server device capable of storing encoded video data and sending the encoded video data to destination device 116. File server 114 can represent (e.g., for a website) a network server, a server configured to provide file transfer protocol services (such as File Transfer Protocol (FTP) or FLUTE-based file delivery 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 can supplementally or alternatively implement one or more HTTP streaming protocols, such as HTTP-based Dynamic Self-Adjusting Streaming (DASH), HTTP Real-Time Streaming (HLS), Real-Time Streaming Protocol (RTSP), HTTP Dynamic Streaming, etc.

[0041] Destination device 116 can access encoded video data from file server 114 via any standard data connection (including an Internet connection). This can 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 other such protocols for retrieving media data.

[0042] Output interface 108 and input interface 122 can represent a wireless transmitter / receiver, a modem, a wired networking unit (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 instances where output interface 108 and input interface 122 include wireless components, output interface 108 and input interface 122 can be configured to transmit data (such as encoded video data) according to cellular communication standards (such as 4G, 4G-LTE (Long Term Evolution), LTE Advanced, 5G, etc.). In some instances where output interface 108 includes a wireless transmitter, output interface 108 and input interface 122 can be configured to transmit data (such as encoded video data) according to other wireless standards (such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee™), the Bluetooth™ standard, etc.). In some instances, source device 102 and / or destination device 116 may include corresponding system-on-chip (SoC) devices. For example, source device 102 may include an SoC device for performing functions attributed to video transcoder 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 described in this case can be applied to video decoding to support any of the various multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, internet streaming video transmission (such as HTTP-based Dynamic Self-Adjusting Streaming (DASH), digital video encoded onto data storage media, decoding of digital video stored on data storage media), or other applications.

[0044] The input interface 122 of the destination device 116 receives an encoded video bitstream from computer-readable media 110 (e.g., communication media, storage device 112, file server 114, etc.). The encoded video bitstream may include signal transmission information defined by the video transcoder 200, such as the following syntax elements (also used by the video decoder 300): values ​​describing the characteristics and / or processing of video blocks or other 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 various display devices, such as a liquid crystal display (LCD), plasma display, organic light-emitting diode (OLED) display, or another type of display device.

[0045] Although not illustrated in Figure 1, in some instances, the video transcoder 200 and video decoder 300 may each be integrated with the audio encoder and / or audio decoder, and may include appropriate multiplexer-demultiplexer units or other hardware and / or software to process the multiplexed streams of both audio and video included in a common data stream. Where applicable, the multiplexer-demultiplexer unit may comply with the ITU H.223 multiplexer protocol or other protocols (such as User Packet Protocol (UDP)).

[0046] The video transcoder 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), individual logic, software, hardware, firmware, or any combination thereof. When the technology is partially implemented in software, the device can store instructions for the software in a suitable non-transitory computer-readable medium and use one or more processors to execute the instructions in hardware to perform the technology described herein. Each of the video transcoder 200 and video decoder 300 can be included in one or more encoders or decoders, any of which can be integrated as part of a combined encoder / decoder (CODEC) in the respective device. Devices including the video transcoder 200 and / or video decoder 300 can include integrated circuits, microprocessors, and / or wireless communication devices (such as cellular phones).

[0047] The video transcoder 200 and video decoder 300 can operate according to video decoding standards (such as ITU-T H.265) or extensions thereof (such as multi-view and / or scalable video decoding extensions), also known as High Efficiency Video Decoding (HEVC) standards. Alternatively, the video transcoder 200 and video decoder 300 can operate according to other proprietary or industry standards (such as ITU-T H.266) also known as Universal Video Decoding (VVC). The goal of VVC is to provide significant improvements in compression performance on top of the existing HEVC standard, thereby facilitating the deployment of higher-quality video services and emerging applications (such as 360° omnidirectional immersive multimedia and high dynamic range (HDR) video). The draft of the VVC standard is described in the following document: Bross et al., "Versatile Video Coding (Draft 10)", ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 Joint Video Experts Group (JVET), 18th Meeting: via teleconference, 22 June – 1 July 2020, JVET-S2001-vH (hereinafter referred to as "VVC Draft 10"). However, the technology contained in this document is not limited to any particular decoding standard.

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

[0049] The content of this application can generally refer to the decoding (e.g., encoding and decoding) of an image to include procedures for encoding or decoding data in the image. Similarly, the content of this application can refer to the decoding of blocks of an image to include procedures for encoding or decoding data used for the blocks, such as prediction and / or residual decoding. Encoded video bitstreams typically include a series of values ​​for representing decoding decisions (e.g., decoding modes) and syntax elements that divide the image into blocks. Therefore, references to decoding an image or block should generally be understood as decoding the values ​​of the syntax elements used to form the image or block.

[0050] HEVC defines various blocks, including decoding units (CUs), prediction units (PUs), and transformation units (TUs). According to HEVC, a video decoder (such as video transcoder 200) partitions a decoding tree unit (CTU) into CUs using a quadtree structure. That is, the video decoder 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 decoder can further partition the 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 predicted within a frame include intra-frame prediction information (such as intra-frame pattern indication).

[0051] As another example, the video transcoder 200 and video decoder 300 can be configured to operate according to VVC. According to VVC, the video decoder (such as the video transcoder 200) segments the image into a plurality of decoder tree units (CTUs). The video transcoder 200 can segment the CTUs according to a tree structure (such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure). The QTBT structure eliminates the concept of multiple segmentation types, such as the separation between CUs, PUs, and TUs in HEVC. The QTBT structure includes two levels: a first level segmented according to quadtree segmentation and a second level segmented according to binary tree segmentation. The root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary tree correspond to decoder 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 ternary tree (TT) partitioning (also known as tripartite tree (TT)) partitioning. A ternary tree partitioning or tripartite tree partitioning is a partition in which a block is divided into three sub-blocks. In some instances, ternary tree partitioning or tripartite tree partitioning divides a block into three sub-blocks without partitioning the original block via a center. The partitioning types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.

[0053] In some instances, the video transcoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luminance and chrominance components, while in other instances, the video transcoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luminance component and another QTBT / MTT structure for the two chrominance components (or two QTBT / MTT structures for the respective chrominance components).

[0054] The video transcoder 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 technology in this application is provided with respect to QTBT segmentation. However, it should be understood that the technology in this application can also be applied to video decoders configured to use quadtree segmentation or other types of segmentation.

[0055] In some instances, a CTU includes a decoder block (CTB) of luminance samples from an image with three sampling arrays, two corresponding CTBs of chrominance samples, or a CTB of samples from a monochrome image or an image decoded using three separate color planes and a syntax structure for decoding the samples. A CTB can be an NxN sampling block for some value of N, such that dividing the components into CTBs is a partition. Components are arrays or single samples from one of the three arrays (luminance and two chrominance) that make up an image in a 4:2:0, 4:2:2, or 4:4:4 color format, or an array or single sample of an array that makes up a monochrome image. In some instances, a decoder block is an MxN sampling block for some values ​​of M and N, such that dividing the CTB into decoder blocks is a partition.

[0056] Blocks (e.g., CTUs or CUs) can be grouped in various ways within an image. As an example, a brick can represent a rectangular area of ​​a row of CTUs 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 represents a rectangular area of ​​CTUs with a height equal to the height of the image and a width specified via syntax elements (e.g., such as in an image parameter set). A tile row represents a rectangular area of ​​CTUs with a height specified via syntax elements (e.g., such as in an image parameter set) and a width equal to the width of the image.

[0057] In some instances, a tile may be divided into multiple brick-shaped zones, each of which may include one or more CTU rows within the tile. A tile not divided into multiple brick-shaped zones may also be referred to as a brick-shaped zone. However, a brick-shaped zone that is a true subset of a tile may not be referred to as a tile.

[0058] The brick-shaped regions in an image can also be arranged as slices. A slice can be an integer number of brick-shaped regions in the image, which can be uniquely contained within a single Network Abstraction Layer (NAL) unit. In some instances, a slice consists of a continuous sequence of several complete tiles or a single complete brick-shaped region.

[0059] In this context, "NxN" and "N by N" can be used interchangeably to represent the sampling dimensions of a block (such as a CU or other video block) in the vertical and horizontal dimensions, for example, 16x16 sampling or 16 by 16 sampling. Typically, a 16x16 CU will have 16 samples in the vertical direction (y = 16) and 16 samples in the horizontal direction (x = 16). Similarly, an NxN 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 can include NxM samples, where M is not necessarily equal to N.

[0060] Video transcoder 200 encodes video data representing prediction information and / or residual information, as well as other information, for use in the control unit (CU). Prediction information indicates how the CU will be predicted to form a prediction block for the CU. Residual information typically represents the sample-by-sample difference between the CU samples before encoding and the prediction block.

[0061] To predict the CU, the video transcoder 200 typically forms prediction blocks for the CU via inter-frame prediction or intra-frame prediction. Inter-frame prediction typically represents predicting the CU from data in a previously decoded image, while intra-frame prediction typically represents predicting the CU from data in a previously decoded image within the same image. To perform inter-frame prediction, the video transcoder 200 can use one or more motion vectors to generate prediction blocks. The video transcoder 200 can typically perform motion search to identify, for example, a reference block whose difference pattern closely matches the CU. The video transcoder 200 can calculate a difference metric using the sum of absolute differences (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared difference (MSD), or other such difference calculations to determine whether the reference block closely matches the current CU. In some instances, the video transcoder 200 can use unidirectional or bidirectional prediction to predict the current CU.

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

[0063] To perform intra-frame prediction, the video transcoder 200 can select an intra-frame prediction mode to generate the prediction block. Some instances of VVC provide sixty-seven intra-frame prediction modes, including various directional modes as well as planar and DC modes. Typically, the video transcoder 200 selects an intra-frame prediction mode that describes the adjacent samples of the current block (e.g., the block of the CU), and predicts the samples of the current block from those adjacent samples. Assuming that the video transcoder 200 decodes the CTU and CU in raster scan order (from left to right, from top to bottom), such samples can typically be located above, to the upper left, or to the left of the current block within the same picture.

[0064] Video transcoder 200 encodes data representing the prediction mode used for the current block. For example, for inter-frame prediction modes, video transcoder 200 can encode data indicating which of the various available inter-frame prediction modes is used, as well as motion information for the corresponding mode. For unidirectional or bidirectional inter-frame prediction, for example, video transcoder 200 can use Advanced Motion Vector Prediction (AMVP) or merging modes to encode motion vectors. Video transcoder 200 can use similar modes to encode motion vectors used for affine motion compensation modes.

[0065] Following predictions such as intra-frame or inter-frame predictions for a block, the video transcoder 200 can compute residual data for that block. The residual data (such as a residual block) represents the sample-by-sample difference between the block and the prediction block used to form the block, which is formed using the corresponding prediction mode. The video transcoder 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 sampling domain. In some instances, the TB may be the same size as the residual block. The terms TB and TU may be used interchangeably in this document. The video transcoder 200 can apply Discrete Cosine Transform (DCT), integer transform, wavelet transform, or conceptually similar transforms to the residual video data. Additionally, the video transcoder 200 can apply a second transform after the first transform, such as Mode-dependent Inseparable Second Transform (MDNSST), Signal-dependent Transform, Karhunen-Loeve Transform (KLT), etc. The video transcoder 200 generates transform coefficients after applying one or more transforms.

[0066] As mentioned earlier, following any transformation used to generate the transform coefficients, the video transcoder 200 can perform quantization on the transform coefficients. Quantization typically represents a procedure in which the transform coefficients are quantized to reduce the amount of data used to represent them, thereby providing further compression. By performing the quantization procedure, the video transcoder 200 can reduce the bit depth associated with some or all of the transform coefficients. For example, the video transcoder 200 can round an n-bit value down to an m-bit value during quantization, where n is greater than m. In some instances, to perform quantization, the video transcoder 200 can perform a bitwise right shift of the value to be quantized.

[0067] Following quantization, the video transcoder 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 therefore lower-frequency) transform coefficients before the vector and lower-energy (and therefore higher-frequency) transform coefficients after the vector. In some instances, the video transcoder 200 can scan the quantized transform coefficients using a predefined scanning order to produce a serialized vector, and then entropy-encode the quantized transform coefficients of that vector. In other instances, the video transcoder 200 can perform a self-adjusting scan. After scanning the quantized transform coefficients to form a one-dimensional vector, the video transcoder 200 can entropy-encode the one-dimensional vector, for example, according to context-adjusted binary arithmetic decoding (CABAC). The video transcoder 200 can also entropy-encode the values ​​of syntax elements used to describe relay data associated with the encoded video data for use by the video decoder 300 when decoding the video data.

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

[0069] The video transcoder 200 can further generate syntax data (such as block-based syntax data, image-based syntax data, and sequence-based syntax data), or other syntax data (such as sequence parameter sets (SPS), image parameter sets (PPS), or video parameter sets (VPS)) destined for the video decoder 300, for example, from image headers, block headers, and slice headers. Similarly, the video decoder 300 can decode such syntax data to determine how to decode the corresponding video data.

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

[0071] Typically, the video decoder 300 executes a program that interacts with the program executed by the video transcoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 can use CABAC in a manner substantially similar to (but reciprocal to) the CABAC encoding program of the video transcoder 200 to decode the values ​​of syntax elements used for the bitstream. Syntax elements can define segmentation information for segmenting an image into CTUs and for segmenting each CTU according to a corresponding segmentation structure (such as a QTBT structure) to define the CUs of the CTU. Syntax elements can further define prediction and residual information for blocks (e.g., CUs) of the video data.

[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 regenerate a residual block for that block. The video decoder 300 uses the prediction mode transmitted in the signal (intra-frame prediction or inter-frame prediction) and associated prediction information (e.g., motion information for inter-frame prediction) to form a prediction block for that block. The video decoder 300 can then combine the prediction block and the residual block (on a sample-by-sample basis) to regenerate the original block. The video decoder 300 can perform additional processing, such as performing a deblocking procedure to reduce visual artifacts along the block boundaries.

[0073] Video transcoder 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 transcoder 200 can entropy encode (e.g., CABAC encoding) the Rice code for transform coefficients and include the resulting CABAC encoded data in a bitstream. Video decoder 300 can apply entropy decoding (e.g., CABAC decoding) to the bit sequence in the bitstream to obtain the Rice code. Video decoder 300 can decode the Rice code to obtain decoded values ​​that video decoder 300 can use to recover the levels of the transform coefficients. Video transcoder 200 and video decoder 300 can determine the Rice parameters used to generate the Rice code and to decode it.

[0074] In VVC draft 10, considering the transform coefficient values ​​(i.e., levels) of adjacent transform coefficients in the template, the Rice parameters used for general residual decoding (RRC) are derived using a lookup table. A template for adjacent coefficients is provided in Figure 2. Figure 2 is a conceptual diagram illustrating an example of adjacent coefficients that can be used to calculate the local sum value (e.g., localSumAbs) of the current coefficient. Specifically, in the example of Figure 2, video transcoder 200 or video decoder 300 determines the Rice parameters used for the current transform coefficient 250. Video transcoder 200 and video decoder 300 can use the levels of adjacent transform coefficients 252A-252E (collectively referred to as "adjacent transform coefficients 252") in the calculation of the local sum value.

[0075] In VVC draft 10, a video decoder (e.g., video transcoder 200 or video decoder 300) can first calculate a local sum value (e.g., locSumAbs), which is the sum of the absolute values ​​of five available adjacent transform coefficients (e.g., adjacent transform coefficient 252) in the template. Subsequently, the video decoder can normalize locSumAbs as follows (e.g., using subtraction and clipping operations): locSumAbs = Clip3( 0, 31, locSumAbs - baseLevel * 5 )

[0076] The video decoder can use this locSumAbs and consult 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 limited to 0 to 3. Table 1. Reference Table for Rice Parameters Based on locSumAbs in the Current Specification 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 twenty one twenty two twenty three twenty four 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3

[0077] Early proposals attempted to address the limitations of VVC's Lys parameter derivation relative to various input bit depths of video data, and thus improve the compression efficiency of the decoding design. In other words, the Lys parameter derivation procedure described in VVC Draft 10 may have limitations when applied to higher bit depth video data. These limitations may lead to a loss of compression efficiency.

[0078] For example, a video decoder can scale and normalize localSumAbs to handle the bit depth increase or dynamic range of the transform coefficients before using them to derive the Rice parameters, 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 the syntax elements sent as signals in the bitstream. Subsequently, the video decoder can, for example, use the localSumAbs clipping procedure in VVC Draft 10 to clip localSumAbs to a certain range. The video decoder 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 provided above)). In the case of normalizing localSumAbs in the first step of the proposed design, the video decoder can derive the Rice parameters from the predefined table and can modify the Rice parameters by adding offsets to extend the dynamic range of the Rice parameters.

[0079] The following describes the procedure for determining the Rice parameter for the remainder syntax element (abs_remainder) or the absolute value syntax element (dec_abs_level) used for transform coefficients. 9.3.3.2 Rice parameter derivation procedure for abs_remainder[] and dec_abs_level[] The inputs to this program 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). The output of this program is the Rice parameter cRiceParam. Given an array AbsLevel[x][y] for a transform block having component indices cIdx and a top-left luminance position (x0, y0), the variable locSumAbs can be derived as specified by the following virtual code procedure: Decoding List 1 locSumAbs = 0 if( xC < ( 1 << log2TbWidth ) - 1 ) { locSumAbs += AbsLevel[ xC + 1 ][ yC ] if( xC < ( 1 << log2TbWidth ) - 2 ) locSumAbs += AbsLevel[ xC + 2 ][ yC ] if( yC < ( 1 << log2TbHeight ) - 1 ) locSumAbs += AbsLevel[ xC + 1 ][ yC + 1 ] (1517) } if( yC < ( 1 << log2TbHeight ) - 1 ) { locSumAbs += AbsLevel[ xC ][ yC + 1 ] if( yC < ( 1 << log2TbHeight ) - 2 ) locSumAbs += AbsLevel[ xC ][ yC + 2 ]} shift = (Bitdepth - b) > 0 ? Floor(Log2(a*(Bitdepth - b))) :0 localSumAbs = (shift == 0) ? localSumAbs :(localSumAbs + (1 << (shift -1) )) >> shift locSumAbs = Clip3( 0, 31, locSumAbs - baseLevel * 5 ) Use the given variable locSumAbs, as specified in Table 128, to derive the Rice parameter cRiceParam. Then, refine cRiceParam as follows: cRiceParam = cRiceParam + c

[0080] In some instances, variables a, b, and c can be defined as follows. In one instance, b can specify the bit depth of the operation and be set to 10, a can be set to an integer value, such as 4 or other powers of 2, and c can be set to the calculated shift value or derived from the shift value.

[0081] In another instance of the Rice parameter derivation for VVC to solve various input bit depths of video data, the video decoder can scale / normalize localSumAbs when localSumAbs is greater than or equal to a threshold. In this case, the relevant Rice parameter derivation in VVC draft 10 can be changed accordingly as follows (where...<!----> …<!--!--> (Label indicates change) 9.3.3.2 Rice parameter derivation procedure for abs_remainder[] and dec_abs_level[] The inputs to this program 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). The output of this program is the Rice parameter cRiceParam. Given an array AbsLevel[x][y] for a transform block having component indices cIdx and a top-left luminance position (x0, y0), the variable locSumAbs can be derived as specified by the following virtual code procedure: Code Listing 2 locSumAbs = 0 if( xC < ( 1 << log2TbWidth ) - 1 ) { locSumAbs += AbsLevel[ xC + 1 ][ yC ] if( xC < ( 1 << log2TbWidth ) - 2 ) locSumAbs += AbsLevel[ xC + 2 ][ yC ] if( yC < ( 1 << log2TbHeight ) - 1 ) locSumAbs += AbsLevel[ xC + 1 ][ yC + 1 ] (1517) } if( yC < ( 1 << log2TbHeight ) - 1 ) { locSumAbs += AbsLevel[ xC ][ yC + 1 ] if( yC < ( 1 << log2TbHeight ) - 2 ) locSumAbs += AbsLevel[ xC ][ yC + 2 ] } <!----> shift = (Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T ? Floor(Log2(a*(Bitdepth - b))) :0 localSumAbs = (shift == 0) ? localSumAbs :(localSumAbs + (1 << (shift -1) )) >> shift<!--!--> locSumAbs = Clip3( 0, 31, locSumAbs - baseLevel * 5 ) Use the given variable locSumAbs, as specified in Table 128, to derive the Rice parameter cRiceParam. Then, refine cRiceParam as follows: <!----> cRiceParam = cRiceParam + c<!--!-->

[0082] In the example above, T is a predefined threshold. In one instance, T could be set to 32. In some instances, the values ​​of variables a, b, and c can be signaled via a bitstream (i.e., encoded in the bitstream), or determined by bit depth, local statistics (e.g., minimum / maximum or average transform coefficient values ​​within the current block), the decoded transform or block size, or by syntax elements signaled in the bitstream, or derived from bit depth, local statistics (e.g., minimum / maximum or average transform coefficient values ​​within the current block), the decoded transform or block size, or by syntax elements signaled in the bitstream.

[0083] Furthermore, the spatial location of the decoded transform coefficients within the TU (or TB) can be classified according to the expected accuracy of the template-based derivation procedure. An example classification is illustrated in Figure 3. Figure 3 is a conceptual diagram showing the spatial region of an example TB 350. In the example of Figure 3, TB 350 includes the current transform coefficient 352 and adjacent transform coefficients 354A-354E (collectively referred to as "adjacent transform coefficients 354"). Furthermore, in the example of Figure 3, transform coefficients with spatial locations (category C1) delineated by thick lines are expected to have accurate Rice derivations derived from template-based procedures (e.g., as defined in VVC Clause 9.3.3.2) and possible modifications of the template-based procedures described above in this document. In other words, the Rice parameter (riceParam) for transform coefficients in category C1 can be described as: riceParam = template_based_method().

[0084] The transformation coefficients for category (C4), with their spatial locations outlined by thick lines, are not expected to have an accurate Rice derivation derived from a template-based procedure. Therefore, a history-based derivation procedure can be used instead. In other words, the Rice parameter (riceParam) for the transformation coefficients in category C4 can be described as: riceParam = history_based_method().

[0085] The coefficients for category C2 or category C3 with spatial locations delineated by thick lines are expected to have Rice derivations that reduce accuracy from template-based procedures, and accuracy can be improved by considering Rice estimates, provided that such Rice estimates are derived from the history of decoded coefficients. Therefore, the Rice parameters for the transform coefficients in category C2 or category C3 can be based on Rice parameters derived from template-based and / or history-based procedures. In other words, the Rice parameters (riceParam) for the transform coefficients in category C2 or category C3 can be described as: riceParam = function( template_based_method(), history_based_method() ).

[0086] In some instances, the classification of transform coefficients can be performed based on the reverse scanning order; for example, the first N decoded transform coefficients are assigned to category C4, and the remaining transform coefficients are classified into category C1. In some instances, a subset of defined categories can be used; for example, only the decoded transform coefficients of category C4 use Ricean information from history, and support for category C1 can be extended to merge regions of categories C2 / C3 or the entire TU or TB. Therefore, no historical information is used for Ricean derivation.

[0087] In some previous proposals, the Rice parameter of the transformation coefficients was determined as a function that aggregates Rice information from template-based and history-based programs using a weighted average. An example is shown below: ricePar = (w2 * riceParTemplate + w1 * riceParHistory) / (w1+w2); The weights (w1 and w2) of the weighted average can depend on the spatial location of the transformation coefficients within TB.

[0088] In some instances, the ability to aggregate local estimates and historical information can be integrated into template-based derivation. This allows Rice parameters derived from historical information to be considered during template-based Rice derivation if local information is unavailable. An example is illustrated below, where modifications to an existing template-based procedure are proposed, labeled as...<!----> …<!--!-->Tag. The item histCoef defines an estimated historical transformation coefficient that has been accumulated in the past or expressed as a historical Rice parameter, e.g., histCoef = 1 << histRiceParam. The items M and N are estimated weight values. For example, for N and M, the integer values can be equal to 2 and 3 respectively. Code list 3 unsigned templateAbsSum( int scanPos, const TCoeff* coeff, int baseLevel ) { const uint32_t posY = m_scan[scanPos].y; const uint32_t posX = m_scan[scanPos].x; const TCoeff* pData = coeff + posX + posY * m_width; TCoeff sum = 0; if (posX < m_width - 1) { sum += abs(pData[1]); if (posX < m_width - 2) { sum += abs(pData[2]); } <!---->else sum += histCoef;<!--!--> if (posY < m_height - 1) { sum += abs(pData[m_width + 1]); } <!---->else sum += histCoef;<!--!--> } <!---->else sum += N * histCoef; <!--!--> if (posY < m_height - 1) { sum += abs(pData[m_width]); if (posY < m_height - 2) { sum += abs(pData[m_width << 1]); } <!---->else sum += histCoef; <!--!--> } <!---->else sum += M * histCoef; <!--!--> return unsigned(std::max <tcoeff>(std::min <tcoeff>(sum - 5 * baseLevel, 31), 0)); }

[0089] In some instances, a counter can be used to implement a history-based procedure for Rice derivation. The counter can be stored as a decoded transform coefficient, a Rice parameter, or a moving average representing the length of a binary-coded character representing the decoded transform coefficient. An example is illustrated below: For each category (e.g., category C1, category C2, category C3, category C4) (where the category is identified by the index riceClass), 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 via a binary code length estimate indicating the optimal Rice parameters. In some instances, the video decoder can update the history via the code length representation (number of bits) of the Exp-Golomb decoded portion of the first transform coefficient. This can reduce the latency of full transform coefficient reconstruction. In some instances, the video decoder can update the history using all transform coefficients. The number of transformation coefficients defined for historical updates is denoted as NUM_HISTORY_UPDATE. codeLength = floorLog2((uint32_t)decodedCoef); The number of decoded transform coefficients (e.g., NUM_HISTORY_UPDATE) can be used to update 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. collectStatCoeff[riceClass] += codeLength. counterCollectStatCoeff[riceClass]++; After the video decoder resolves all samples defined for the history update of the current category, the video decoder can update the global history counter StatCoeff using a linear model (e.g., a weighted moving average), as follows: int numCollected = NUM_HISTORY_UPDATE-g_counterCollectStatCoeff[i]; int averageRiceInTU = (int)( g_tempStatCoeff[i] + (numCollected >> 1)) / numCollected); StatCoeff[i][compID] = (w3 * StatCoeff[i][compID] + w4 * averageRiceInTU) / (w3+w4); In some instances, the parameters of a linear model can be chosen as derivatives of powers of 2 to achieve low-complexity multiplication or division operations. In some instances, a history counter (e.g., StatCoeff) can be maintained over a region of a decoded image (e.g., a complete image, a slice, a tile, a group of CTUs, or a single CTU), with a standard reset performed at the beginning of that CTU group. This context may refer to the history counter as coefficient statistics (e.g., StatCoeff).

[0090] In some instances, the history counter can be initialized using a preset value. This preset value can be tabulated and provided as side information to the video decoder, transmitted via decoded bitstream (e.g., at the slice level), via a special update signal delivery mechanism, or derived at the decoder side from bit depth, quantization parameters, or other syntax elements.

[0091] In some instances, one or more states of the historical update procedure (e.g., update rate or moving average parameters) can be made dependent on block size, block dimension ratio, decoding mode (e.g., using intra-frame prediction or inter-frame prediction), slice type, or syntax elements sent as signals.

[0092] This document describes several techniques that can improve the accuracy of Rice parameter derivation. For example, this document proposes to improve the accuracy of Rice parameter derivation by considering historical values ​​of the optimal Rice parameter determined from previously decoded transform coefficients, outside the current TB.

[0093] In some instances, a video decoder (e.g., a video transcoder 200 or a video decoder 300) can store coefficient statistics (e.g., StatCoeff) as values ​​derived from the Ricean parameters (i.e., the Ricean parameter derivative). In instances where the video decoder stores coefficient statistics (i.e., a history counter) as the Ricean parameter derivative, the video decoder can derive the history values ​​(e.g., histCoef) as follows: historyRiceValue = StatCoeff[i][compID]; histCoef = 1 << historyRiceValue; Video decoders can use history values ​​(histCoeff) to determine local sum values ​​(e.g., localSumAbs), for example, using the program in decode list 3.

[0094] In some instances, a video decoder (e.g., a video transcoder 200 or a video decoder 300) can store coefficient statistics as values ​​derived from the transform coefficients (i.e., derivatives of the transform coefficients). In instances where the video decoder stores coefficient statistics as derivatives of the transform coefficients, the video decoder can derive the history value histCoef as follows: historyValue = StatCoeff[i][compID]; histCoef = historyValue; Video decoders can use history values ​​(histCoeff) to determine local sum values ​​(e.g., localSumAbs or locSumAbs), for example, using the program in decode list 3.

[0095] In some instances, the histCoef derivation procedure can be modified to be a function of the spatial location of the coefficients within the TB, such as the function to which the subgroup identifier histCoef belongs. Examples of modification could include adding an offset to the histRice value or applying an offset or scaler to the histCoef value. In some instances, 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 decoded using context decoding, and only the remaining portion is decoded using the Rice method. In other words, the video decoder can perform a "hybrid" procedure for decoding general residual coefficients (RRCs).

[0096] In some instances, utilizing the code portion of the transform coefficients from context decoding and the remainder of the transform coefficients from the Rice method, a video decoder (e.g., video transcoder 200 or video decoder 300) can set the variable remBinsPass1 to the maximum number of bins decoded from context, and the video decoder can decrement remBinsPass1 by 1 when sending context-decoded bins as a signal. When remBinsPass1 is greater than or equal to four, the first decoding pass (which includes a coefficient validity flag (e.g., sig_coeff_flag), an absolute level flag greater than 1 (e.g., abs_level_gt1_flag), a level parity syntax element indicating the parity of the transform coefficient level (e.g., par_level_flag), and an absolute level flag greater than 3 (e.g., abs_level_gt3_flag)) is decoded via bins decoded from context. If the number of modules decoded in the first path is not greater than a threshold (e.g., Mccb or RemCcbs), the remainder of the level information (indicated to be further decoded in the first path) is decoded using Golomb-Rice decoding and bypass-decoded modules with absolute remainder syntax elements (e.g., abs_remainder). This threshold can be defined in VVC as (( 1 << ( log2TbWidth + log2TbHeight ) ) * 7 ) >> 2, where log2TbWidth is the logarithm of the width of the transform block to base 2, and log2TbHeight is the logarithm of the height of the transform block to base 2.

[0097] When remBinsPass1 becomes less than 4 while decoding the first path, the remaining transform coefficients indicated for further decoding in the first path are decoded using an absolute remainder syntax element (e.g., abs_remainder). Transform coefficients not decoded in the first path are then directly decoded in the second path using an intermediate value syntax element (e.g., dec_abs_level) via Golomb-Rice code and bypass decoding. The intermediate value syntax element (e.g., dec_abs_level) is the intermediate value decoded using Golomb-Rice code at the scan position. The video decoder resets the value of remBinsPass1 for each TB. The transition from a context-decoded module to a bypass-decoded module for the remaining transform coefficients occurs at most once per TB for the coefficient validity flag (e.g., sig_coeff_flag), level flags greater than 1 (e.g., abs_level_gt1_flag), level equivalence flags (e.g., par_level_flag), and absolute level flags greater than 3 (e.g., abs_level_gt3_flag). For a transform coefficient subblock, if remBinsPass1 is less than 4, the entire transform coefficient subblock is decoded via a bypass-decoded module. After all the above level decodings, the symbols (e.g., sign_flag) at all scan positions where sig_coeff_flag equals 1 are finally bypass-decoded.

[0098] The video decoder uses the same RicePar parameter derivation for both paths 2 and 3. The only difference is that the base level (e.g., baseLevel) is set to 4 and 0 for paths 2 and 3, respectively. The RicePar parameter is determined not only by the sum of the absolute levels of the five adjacent transform coefficients in the local paradigm but also by taking into account the corresponding base level, as shown below: RicePara = RiceParTable[ max(min( 31, sumAbs - 5 * baseLevel), 0) ] When calculating the value sumAbs, the value 0 is used for any adjacent coefficients outside of TB.

[0099] After the first sub-block decoding path terminates, the absolute values ​​of each of the remaining coefficients to be decoded are decoded via the syntax element dec_abs_level (which corresponds to the 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 from the absolute level (absLevel), the associated quantizer state (QState), and the Rice parameter (RicePara) as follows: ZeroPos = ( QState < 2? 1 :2 ) << RicePara if (absLevel == 0) dec_abs_level = ZeroPos else dec_abs_level = (absLevel <= ZeroPos) ? (absLevel – 1) :absLevel

[0100] In some instances, a video decoder (e.g., video transcoder 200 or video decoder 300) may maintain a history counter via a region (e.g., a partition) of the decoded image (e.g., a complete image, slice, tile, CTU group, or single CTU), where a standard reset is performed at the beginning of the partition. The video decoder may reset coefficient statistics to a preset history value (e.g., DefaultHistoryRiceValue). Therefore, the standard reset of coefficient statistics at the beginning of the partition can be expressed as: StatCoeff[i][compID] = DefaultHistoryRiceValue;

[0101] In some instances where history counters (i.e., coefficient statistics) are stored as derivatives of Rice's parameters, the default history reset value (e.g., DefaultHistoryRiceValue) can be represented as a function of the bit depth of the decoded data or the internal bit depth. The internal bit depth can be greater than the bit depth of the decoded data. A non-restrictive example of this dependency of the default history value on bit depth can be represented as follows: DefaultHistoryRiceValue = (bitDepth - 10) > 0 ? floorLog2(4 * (bitDepth - 10)) :0; StatCoeff[i][compID] = DefaultHistoryRiceValue; The operand floorLog2 represents 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.

[0102] In other instances, the preset value of the history reset (i.e., the preset history value) can be represented as a function of the quantization parameter (QP), analytically tabulated, or otherwise determined, transmitted as a signal via a bitstream, or provided as side information. In some instances, linear models and / or nonlinear operations, such as clipping or clamping, can be utilized. Examples of preset history values ​​depending on QP are shown below: DefaultHistoryRiceValue = (bitDepth - 10) > 0 ? (int)(OFFSET - cs.slice->getSliceQp() * MULTIPLIER) :0; DefaultHistoryRiceValue = DefaultHistoryRiceValue < 0 ? 0 :DefaultHistoryRiceValue; StatCoeff[i][compID] = DefaultHistoryRiceValue; In the above text, coefficient statistics are stored as Rice parameter derivatives. Therefore, the default history value is represented by DefaultHistoryRiceValue. The terms "DefaultHistoryValue" and "DefaultHistoryRiceValue" can be used interchangeably in this text. OFFSET represents the offset value, MULTIPLIER indicates the multiplier value, and cs.slice->getSliceQp() is a function that returns the QP of the slice.

[0103] In some instances, the video decoder 300 may determine the default history value for history reset (e.g., DefaultHistoryRiceValue) via a standard procedure as described above, or it may be transmitted as a signal in a bit string.

[0104] In some instances where coefficient statistics are stored as transform coefficients or derivatives of transform coefficients, the default value for history reset (e.g., DefaultHistoryCoefValue) can be represented via a derivation procedure other than those described above; non-limiting examples of such procedures are shown below: DefaultHistoryCoefValue= 1 << DefaultHistoryRiceValue; StatCoeff[i][compID] = DefaultHistoryCoefValue;

[0105] In some instances, the derivation procedure for preset historical values ​​may consider color component identifiers (IDs) or color formats. For example, historical values ​​for the chroma component may be derived from historical values ​​for the luminance component (e.g., via bit shifting, scaling, or offset).

[0106] In some instances where coefficient statistics (e.g., history or StatCoeff) are stored as Rice parameters, a video decoder (e.g., video transcoder 200 or video decoder 300) can derive values ​​for updating coefficient statistics (e.g., history or StatCoeff) from Rice parameters used for a group of transform coefficients (e.g., the last N transform coefficients or transform coefficients located at block boundaries). An example update is shown below: int averageRiceInTU = (int)(g_tempStatCoeff[i]); StatCoeff[i][compID] = (StatCoeff[i][compID] + averageRiceInTU) >> 1;

[0107] In some instances, the Rice estimate used for historical updates can be derived from the decoded transform coefficients themselves, as shown below: int rem= m_BinDecoder.decodeRemAbsEP( ricePar, COEF_REMAIN_BIN_REDUCTION, cctx.maxLog2TrDRange() ); if ((g_counterCollectStatCoeff[riceClass] > 0) && (rem > 0)) g_tempStatCoeff[riceClass] += floorLog2((uint32_t)rem) ; In the above text, `g_counterCollectStatCoeff[riceClass]` indicates the number of transform coefficients in the class that the video decoder has processed so far in the partition of the image (e.g., the entire image, slices, tiles, CU groups, etc.), where the class is indicated by the index `riceClass`. Furthermore, in the above text, `g_tempStatCoeff[riceClass]` is a temporary value for the class indicated by the index `riceClass`. Also, in the above text, the function `m_BinDecoder.decodeRemAbsEP` implements CABAC bypass decoding for most of the transform coefficients. In some instances, a smaller portion of these transform coefficients are context-based CABAC decoded and not used to update the history counter.

[0108] In instances with a history based on accumulated transform coefficient values, this value can be stored within itself. For example, a video decoder can update the history based on a weighted average with code length, as shown below: `g_tempStatCoeff[riceClass] += floorLog2((uint32_t)rem)`. In some instances, the video decoder can update the history using the transform coefficient quantifier itself, as shown below: `g_tempStatCoeff[riceClass] += rem`.

[0109] In some instances, the derivation procedure used to update the history (i.e., the procedure used to update coefficient statistics) can take into account the values ​​of the decoded transform coefficients (e.g., levels). For example, when executing the procedure for updating the history, the video decoder can process the transform coefficients of partitions (e.g., TB, CU groups, etc.), and if the decoded transform coefficients are equal to 0 or below a certain threshold T, an update to the history can be rejected based on the decoded transform coefficients. The history can be used to derive the Ricean parameters for Exp-Golomb decoding; if the transform coefficients are decoded using a context procedure instead of the Exp-Golomb method, the information from those transform coefficients may be irrelevant to the Ricean 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.

[0110] In some instances, when executing a procedure for updating history, the video decoder can process the transform coefficients of partitions (e.g., TBs, CU groups, etc.) and consider the spatial location of the decoded transform coefficients within the current TB, sub-block, or decoding group. For example, in some instances, the video decoder does not perform history updates for the decoded transform coefficients of the current TB's DC value. In some instances, the derivation procedure (i.e., the procedure for updating history) can be spatially dependent, such that the derivation procedure modifies or weights coefficients belonging to certain sub-blocks (e.g., decoding groups), such as transform coefficients within sub-blocks that are not part of the DC sub-block. A DC sub-block is a sub-block of the current TB that contains the TB's DC value.

[0111] In some instances, a single history counter can represent the weighted history of all sub-blocks / categories of the transformation coefficients. In other words, there is no separate coefficient statistic for each category.

[0112] In some instances, the derivation procedure for the history update value can take into account the type of the decoded transform coefficients. For example, the derivation procedure can consider whether to partially decode the decoded transform coefficients via a context-based procedure (i.e., a valid flag or a flag greater than X, followed by a remainder decoded via a bypass procedure using the Rice method), or whether to decode the transform coefficients to absolute values. In some instances, when the history update value (e.g., statCoeff) is based on stored Rice parameters, a Rice value for the history update value can be calculated for the partially context-decoded coefficients, where the offset N aims to cover the context-decoded portion of the transform coefficients. g_tempStatCoeff[riceClass] += floorLog2((uint32_t)rem) + N; In some instances, the value N in the above equation can be an integer value, such as 1, 2, etc.

[0113] Therefore, in this example, the video decoder can update coefficient statistics based on one or more transform coefficients of the TB of the video data. As part of updating the coefficient statistics, the video decoder can perform a derivation procedure to determine a temporary value (e.g., g_tempStatCoeff) for each of the one or more transform coefficients of the TB. The derivation procedure considers which of a plurality of encoding procedures to use to encode the corresponding transform coefficient. In other words, the derivation procedure is determined at least in part based on which of a plurality of encoding procedures to use to encode the corresponding transform coefficient. The plurality of encoding procedures includes context-based procedures for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value. The video decoder can set the coefficient statistics as the average of the coefficient statistics and the temporary value. For example, the video decoder can determine: int averageRiceInTU = (int)(g_tempStatCoeff[i]); StatCoeff[i][compID] = (StatCoeff[i][compID] + averageRiceInTU) >> 1; As described above.

[0114] In some instances, when historical values ​​(i.e., coefficient statistics) are based on stored transform coefficient values, values ​​for historical updates can be calculated for partially context-decoded coefficients via offsets or scaling that target the context-decoded portion covering the transform coefficients: g_tempStatCoeff[riceClass] += rem << M; or g_tempStatCoeff[riceClass] += rem + X;

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

[0116] In summary, this case may involve "signaling" certain information (such as syntax elements). The term "signaling" can generally refer to the transmission of values ​​for syntax elements and / or other data for decoding encoded video data. That is, the video transcoder 200 can signal-transmit values ​​for syntax elements in a bitstream. Typically, signal transmission represents the generation of values ​​in a bitstream. As mentioned above, the source device 102 can transmit the bitstream to the destination device 116 substantially instantaneously or non-instantaneously (such as when syntax elements are stored in storage device 112 for later retrieval by the destination device 116).

[0117] Figures 4A and 4B are conceptual diagrams illustrating an example Quadtree Binary Tree (QTBT) structure 400 and a corresponding Decoding Tree Unit (CTU) 402. Solid lines represent quadtree splits, and dashed lines indicate binary tree splits. In each split (i.e., non-leaf) node of the binary tree, a flag is sent to indicate which split type (i.e., horizontal or vertical) is used, where in this example, 0 indicates a horizontal split and 1 indicates a vertical split. For quadtree splits, since the quadtree node splits the block horizontally and vertically into four sub-blocks of equal size, there is no need to indicate the split type. Therefore, the video transcoder 200 can encode the following, and the video decoder 300 can decode the following: syntax elements (such as split information) for the region tree level (i.e., solid lines) of the QTBT structure 400 and syntax elements (such as split information) for the prediction tree level (i.e., dashed lines) of the QTBT structure 400. The video transcoder 200 can encode video data (such as prediction and transform data) for a CU represented by the terminal leaf nodes of the QTBT structure 400, while the video decoder 300 can decode the video data.

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

[0119] The root node corresponding to the CTU in a QTBT structure can have four child nodes at the first level of the QTBT structure, each of which can be partitioned according to a quadtree. That is, the first-level node is a leaf node (with no child nodes) or has four child nodes. An instance of QTBT structure 400 represents such a node as including a parent node and child nodes with solid lines for branching. If the first-level node is not larger than the maximum allowed binary tree root node size (MaxBTSize), such nodes can be further partitioned via the corresponding binary tree. The binary tree partitioning of a node can be repeated until the node obtained from the partitioning reaches the minimum allowed binary tree leaf node size (MinBTSize) or the maximum allowed binary tree depth (MaxBTDepth). An instance of QTBT structure 400 represents such a node as having dashed lines for branching. The binary tree leaf nodes are called decoding units (CUs), which are used for prediction (e.g., intra-image prediction or inter-image prediction) and transformation without any further partitioning. As discussed above, CU can also be called "video block" or "block".

[0120] In one instance of the QTBT partitioning structure, the CTU size is set to 128x128 (luminance sample and two corresponding 64x64 chrominance samples), MinQTSize is set to 16x16, MaxBTSize is set to 64x64, MinBTSize (for both width and height) is set to 4, and MaxBTDepth is set to 4. First, a quadtree partitioning is applied to the CTU to produce quadtree leaf nodes. Quadtree leaf nodes can have sizes ranging from 16x16 (i.e., MinQTSize) to 128x128 (i.e., the CTU size). If a quadtree leaf node is 128x128, the leaf quadtree node will not be further partitioned by the binary tree because this size exceeds MaxBTSize (i.e., 64x64 in this instance). Otherwise, the quadtree leaf node will be further partitioned by the binary tree. Therefore, the quadtree leaf node also serves as the root node of the binary tree and has a binary tree depth of 0. When the depth of a binary tree reaches MaxBTDepth (4 in this example), further splitting is not allowed. A binary tree node with a width equal to MinBTSize (4 in this example) means that further vertical splitting (i.e., width division) is not allowed for that binary tree node. Similarly, a binary tree node with a height equal to MinBTSize means that further horizontal splitting (i.e., height division) is not 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 prediction and transformation without further splitting.

[0121] Figure 5 is a block diagram illustrating an example video transcoder 200 capable of performing the techniques described herein. Figure 5 is provided for illustrative purposes and should not be construed as limiting the techniques extensively illustrated and described in this content. For illustrative purposes, this content describes a video transcoder 200 based on VVC (ITU-T H.266, under development) and HEVC (ITU-T H.265) technologies. However, the techniques described herein can be performed by video encoding devices configured for other video decoding standards.

[0122] In the example of Figure 5, the video transcoder 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 image buffer (DPB) 218, and an entropy encoding unit 220. Any 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 transcoder 200 can be implemented as one or more circuit or logic components, as part of hardware circuitry, or as part of a processor, ASIC, or FPGA. Furthermore, the video transcoder 200 may include supplemental or alternative processors or processing circuitry for performing these and other functions. For example, in the example of FIG5, the entropy coding unit 220 may include a Rice coding unit (REU) 228 and a CABAC unit 232.

[0123] Video data memory 230 can store video data to be encoded by components of video transcoder 200. Video transcoder 200 can receive video data stored in video data memory 230 from, for example, video source 104 (FIG. 1). DPB 218 can act as a reference picture memory, storing reference video data for use by video transcoder 200 when predicting subsequent video data. Video data memory 230 and DPB 218 can be formed from any of various 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 instances, video data memory 230 can be on-chip (as shown) with other components of video transcoder 200, or off-chip relative to those components.

[0124] In this context, references to video data memory 230 should not be construed as being limited to memory within video transcoder 200 (unless specifically described) or memory outside video transcoder 200 (unless specifically described). Rather, references to video data memory 230 should be understood as a reference memory storing video data received by video transcoder 200 for encoding (e.g., video data for the current block to be encoded). Memory 106 of FIG1 may also provide temporary storage for outputs from various units of video transcoder 200.

[0125] The various units in Figure 5 are shown to illustrate the operations performed by the video transcoder 200. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Fixed-function circuits represent circuits that provide a specific function and are pre-configured for the operations that can be performed. Programmable circuits represent circuits that can be programmed to perform various tasks and provide flexible functionality in the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes it to operate in a manner defined by software or firmware instructions. 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 generally immutable. In some instances, one or more of these units can be different circuit blocks (fixed-function or programmable), and in some instances, one or more of these units can be integrated circuits.

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

[0127] The video data memory 230 is configured to store received video data. The video transcoder 200 can retrieve images of the video data from the video data memory 230 and provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data memory 230 can be the original video data to be encoded.

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

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

[0130] The video transcoder 200 can segment an image retrieved from the video data memory 230 into a series of CTUs and encapsulate one or more CTUs within a slice. The mode selection unit 202 can segment the image's CTUs according to a tree structure (such as the QTBT structure or quadtree structure of HEVC described above). As described above, the video transcoder 200 can form one or more CUs by segmenting CTUs according to a tree structure. Such CUs are also commonly referred to as "video blocks" or "blocks".

[0131] Typically, mode selection unit 202 also controls its components (e.g., motion estimation unit 222, motion compensation unit 224, and intra-frame 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). To perform inter-frame prediction for the current block, motion estimation unit 222 can perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously decoded pictures stored in DPB 218). Specifically, motion estimation unit 222 can calculate values ​​representing the similarity between a potential reference block and the current block, for example, based on the sum of absolute differences (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared error (MSD), etc. Motion estimation unit 222 can typically perform these calculations using sampled differences between the current block and the reference blocks under consideration. Motion estimation unit 222 can identify the reference block with the lowest value obtained from these calculations, indicating the reference block that most closely matches the current block.

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

[0133] As another example, for in-frame prediction or in-frame prediction decoding, the in-frame prediction unit 226 can generate a prediction block from samples adjacent to the current block. For example, in directional mode, the in-frame prediction unit 226 can typically mathematically combine the values ​​of adjacent samples and fill these calculated values ​​across the current block in a defined direction to generate a prediction block. As another example, in DC mode, the in-frame prediction unit 226 can calculate the average of adjacent samples of the current block and generate a prediction block to include the obtained average for each sample of the prediction block.

[0134] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives the original, uncoded version of the current block from the video data memory 230 and the prediction block from the mode selection unit 202. The 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 for the current block. In some instances, the residual generation unit 204 may also determine the difference between sample values ​​in the residual block to generate the residual block using Residual Differential Pulse Code Modulation (RDPCM). In some instances, one or more subtractor circuits performing binary subtraction can be used to form the residual generation unit 204.

[0135] In an instance where the mode selection unit 202 divides a CU into PUs, each PU can be associated with a luminance prediction unit and a corresponding chrominance prediction unit. The video transcoder 200 and the video decoder 300 can support PUs of various sizes. As indicated above, the size of a CU can represent the size of its luminance decoding block, and the size of a PU can represent the size of the luminance prediction unit of the PU. Assuming a particular CU has a size of 2Nx2N, the video transcoder 200 can support 2Nx2N or NxN PU sizes for intra-frame prediction, and symmetrical PU sizes of 2Nx2N, 2NxN, Nx2N, NxN, etc., for inter-frame prediction. The video transcoder 200 and the video decoder 300 can also support asymmetric partitioning for PU sizes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter-frame prediction.

[0136] In instances where mode selection unit 202 does not further divide the CU into PUs, each CU can be associated with a luminance decoding block and a corresponding chrominance decoding block. As mentioned above, the size of the CU can represent the size of the luminance decoding block of the CU. Video transcoder 200 and video decoder 300 can support CU sizes of 2Nx2N, 2NxN, or Nx2N.

[0137] For other video decoding techniques (such as block-copy mode decoding, affine mode decoding, and linear model (LM) mode decoding), mode selection unit 202 generates a prediction block for the current block being encoded via a corresponding unit associated with the decoding technique. In some instances (such as palette mode decoding), 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 such modes, mode selection unit 202 may provide these syntax elements to entropy coding unit 220 for encoding.

[0138] As described above, the residual generation unit 204 receives video data for the current block and the corresponding prediction block. Subsequently, 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.

[0139] Transform processing unit 206 applies one or more transformations to the residual block to produce a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 may apply individual transformations to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform to the residual block. In some instances, transform processing unit 206 may perform multiple transformations on the residual block, such as primary and secondary transformations (e.g., rotation transformations). In some instances, transform processing unit 206 does not apply any transformations to the residual block.

[0140] 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 transcoder 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, and therefore, the quantized transform coefficients may have lower precision compared to the original transform coefficients generated by transform processing unit 206.

[0141] The inverse quantization unit 210 and the inverse transform processing unit 212 can apply inverse quantization and inverse transform, respectively, to the quantized transform coefficient block to reconstruct the residual block from 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 potentially with some degree of distortion). For example, the reconstruction unit 214 can add a sample of the reconstructed residual block to a corresponding sample of the prediction block generated by the mode selection unit 202 to generate the reconstructed block.

[0142] 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 instances, the operation of filter unit 216 can be skipped.

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

[0144] Typically, entropy coding unit 220 can entropy code syntax elements received from other functional components of video transcoder 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 pattern 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 that are another instance of video data to produce entropy-coded data. For example, entropy coding unit 220 can perform context-adjustable variable-length decoding (CAVLC), CABAC, variable-to-variable (V2V) length decoding, syntax-based context-adjustable binary arithmetic decoding (SBAC), probability interval partitioning entropy (PIPE) decoding, exponential Golomb coding, or another type of entropy coding operation on the data. In some instances, the entropy coding unit 220 can operate in a bypass mode where syntax elements are not entropy encoded.

[0145] REU 228 can generate Rice codes for some syntax elements, such as remainder syntax elements (e.g., abs_remainder) for transform coefficients and absolute value syntax elements (e.g., dec_abs_level) for transform coefficients. The CABAC unit 232 of entropy coding unit 220 can perform CABAC decoding or another type of entropy coding on the Rice codes. As part of generating Rice codes for the syntax elements used for transform coefficients, REU 228 can determine Rice parameters for the transform coefficients. REU 228 can determine the Rice parameters for the transform coefficients according to any technique described herein. For example, REU 228 can determine historical values ​​(e.g., histCoef) for the transform coefficients. 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 document, REU 228 can update the coefficient statistics to the average of the coefficient statistics and temporary values. REU 228 can perform a derivation procedure to determine temporary values. The derivation procedure may consider which of a plurality of encoding procedures to use to encode the corresponding transform coefficients. This plurality of encoding procedures includes context-based procedures for encoding the corresponding transform coefficients and encoding them as absolute values.

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

[0147] The operations described above are relative to block descriptions. Such descriptions should be understood as operations applied to luma decoding blocks and / or chroma decoding blocks. As described above, in some instances, the luma decoding block and chroma decoding block are the luma and chroma components of the CU. In some instances, the luma decoding block and chroma decoding block are the luma and chroma components of the PU.

[0148] In some instances, it is not necessary to repeat the operations performed for the luma decoding block for the chroma decoding block. As an example, it is not necessary to repeat the operations of identifying the motion vector (MV) and reference image for the luma decoding block to identify the MV and reference image for the chroma block. Specifically, the MV for the luma decoding block can be scaled to determine the MV for the chroma block, and the reference image can be the same. As another example, the in-frame prediction procedure can be the same for both the luma and chroma decoding blocks.

[0149] In some instances, video transcoder 200 represents an instance of a device configured to encode video data, the device including: a memory configured to store video data; and one or more processing units implemented in circuitry and configured to: determine estimated historical transform coefficients (e.g., histCoef) for 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.

[0150] Figure 6 is a block diagram illustrating an example video decoder 300 capable of performing the techniques described herein. Figure 6 is provided for illustrative purposes and does not limit the techniques extensively illustrated and described in this document. For illustrative purposes, this document describes the video decoder 300 based on VVC (ITU-T H.266, under development) and HEVC (ITU-T H.265) technologies. However, the techniques described herein can be performed by video decoding devices configured for other video decoding standards.

[0151] In the example of Figure 6, the video decoder 300 includes a decoded 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, the units of the video decoder 300 can be implemented as one or more circuit or logic components as part of hardware circuitry, or as part of a processor, ASIC, or FPGA. Furthermore, the video decoder 300 may include supplementary or alternative processors or processing circuitry for performing these and other functions. For example, in the example of Figure 6, the entropy decoding unit 302 includes a Rice decoding unit (RDU) 322 and a CABAC unit 324.

[0152] The prediction processing unit 304 includes a motion compensation unit 316 and an in-frame prediction unit 318. The prediction processing unit 304 may include additional units for performing 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 instances, the video decoder 300 may include more, fewer, or different functional components.

[0153] CPB memory 320 can store video data, such as encoded video bitstreams, to be decoded by components of video decoder 300. The video data stored in CPB memory 320 can be obtained, for example, from computer-readable media 110 (FIG. 1). CPB memory 320 may include a CPB storing encoded video data (e.g., syntax elements) from the encoded video bitstream. Furthermore, CPB memory 320 can store video data other than the syntax elements of the decoded images, such as temporary data representing the output from various units of video decoder 300. DPB 314 typically stores decoded images, which video decoder 300 can output, and / or uses as reference video data when decoding subsequent data or images from the encoded video bitstream. CPB memory 320 and DPB 314 can be formed from any of various memory devices, such as DRAM (including SDRAM), MRAM, RRAM, or other types of memory devices. CPB memory 320 and DPB 314 can be provided from the same memory device or as separate memory devices. In various instances, CPB memory 320 can be on-chip with other components of the video decoder 300, or off-chip relative to those components.

[0154] Alternatively or supplementarily, in some instances, the video decoder 300 may retrieve decoded video data from memory 120 (FIG. 1). That is, memory 120 may store data as discussed above regarding CPB memory 320. Similarly, when some or all of the functions of the video decoder 300 are implemented in software to be executed by the processing circuitry of the video decoder 300, memory 120 may store instructions to be executed by the video decoder 300.

[0155] The various units shown in Figure 6 are illustrated to explain 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 5, fixed-function circuits represent circuits that provide specific functions and are pre-configured for the operations that can be performed. Programmable circuits represent circuits that can be programmed to perform various tasks and provide flexible functionality in the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes it to operate in a manner defined by software or firmware instructions. 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 generally immutable. In some instances, one or more of these units can be different circuit blocks (fixed-function or programmable), and in some instances, one or more of these units can be integrated circuits.

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

[0157] Entropy decoding unit 302 can receive encoded video data from CPB and perform entropy decoding on the video data to regenerate 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.

[0158] Typically, 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").

[0159] Entropy decoding unit 302 can entropy decode the syntax elements of the quantized transform coefficients defining the quantized transform coefficient block, as well as transform information (such as quantization parameters (QP) and / or transform mode indications). Inverse quantization unit 306 can use the QP associated with the quantized transform coefficient block to determine the quantization level and, similarly, the inverse quantization level applied by inverse quantization unit 306. Inverse quantization unit 306 can, for example, perform a bit-by-bit left shift operation to inverse quantize the quantized transform coefficients. Inverse quantization unit 306 can thus form a transform coefficient block including the transform coefficients.

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

[0161] 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 the inverse DCT, inverse integer transform, inverse Karhunen-Loeve transform (KLT), inverse rotation transform, inverse directionality transform, or another inverse transform to the transform coefficient block.

[0162] 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 picture from which the reference block is to be retrieved in the DPB 314, and identify the motion vector of the position of the reference block in the reference picture relative to the position of the current block in the current picture. The motion compensation unit 316 can generally perform the inter-frame prediction procedure in a manner substantially similar to that described with respect to the motion compensation unit 224 (FIG. 5).

[0163] As another example, if the prediction information syntax element indicates that the current block is predicted intraframe, then the intraframe prediction unit 318 can generate a prediction block according to the intraframe prediction pattern indicated by the prediction information syntax element. Again, the intraframe prediction unit 318 can generally perform the intraframe prediction procedure in a manner substantially similar to that described with respect to the intraframe prediction unit 226 (FIG. 5). The intraframe prediction unit 318 can retrieve data from the adjacent samples of the current block from the DPB 314.

[0164] Reconstruction unit 310 can reconstruct the current block using the prediction block and the residual block. For example, reconstruction unit 310 can reconstruct the current block by adding the samples of the residual block to the corresponding samples of the prediction block.

[0165] 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 instances.

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

[0167] In this manner, the video decoder 300 represents an instance of a video decoding device, which includes: a memory configured to store video data; and one or more processing units implemented in circuitry and configured to: determine estimated historical transform coefficients (e.g., histCoef) for the current transform coefficients; determine local sum values ​​(e.g., localSumAbs) based on the estimated historical transform coefficients; determine Rice parameters (e.g., cRiceParam) based on the local sum values; 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.

[0168] Figure 7 is a flowchart illustrating an example method for encoding the current block according to the technique described in this invention. The flowchart in this invention 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 sequences. Furthermore, the method shown in the flowchart in this invention is related to the description in Figures 1 to 6, but the method is not limited thereto. In the example of Figure 7, the current block may include the current CU.

[0169] In this example, the video transcoder 200 initially predicts the current block (700). For example, the video transcoder 200 may form a prediction block for the current block. Subsequently, the video transcoder 200 may compute a residual block for the current block (702). To compute the residual block, the video transcoder 200 may calculate the difference between the original uncoded block and the prediction block for the current block. Subsequently, the video transcoder 200 may transform the residual block and quantize the transform coefficients of the residual block (704). Next, the video transcoder 200 may scan the quantized transform coefficients of the residual block (706). During or after the scan, the video transcoder 200 may entropy encode the transform coefficients (708). For example, the video transcoder 200 may use CAVLC or CABAC to encode the transform coefficients. Subsequently, the video transcoder 200 may output the entropy-encoded data of the block (710).

[0170] As part of entropy encoding of the transform coefficients, the video transcoder 200 can determine the Ricean parameter for the transform coefficients based on any technique described in this invention. The video transcoder 200 can generate Ricean code for the transform coefficients based on the Ricean parameter and the level of the transform coefficients. The video transcoder 200 can perform entropy encoding on the Ricean code.

[0171] Figure 8 is a flowchart illustrating an example method for decoding a current block of video data according to the technology described in this case. The current block may include the current CU. Although video decoder 300 (Figures 1 and 6) has been described, it should be understood that other devices can be configured to perform methods similar to those in Figure 8.

[0172] The video decoder 300 can receive entropy-coded data for the current block (such as entropy-coded prediction information and entropy-coded data for the transform coefficients of the residual block corresponding to the current block) (800). The video decoder 300 can entropy decode the entropy-coded data to determine the prediction information for the current block, and to regenerate the transform coefficients of the residual block (802).

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

[0174] The video decoder 300 can predict the current block (804) for example using an intra-frame prediction mode or an inter-frame prediction mode indicated by prediction information for the current block, to calculate a prediction block for the current block. Subsequently, the video decoder 300 can inverse scan the regenerated transform coefficients (806) to construct a block of quantized transform coefficients. Then, the video decoder 300 can inverse quantize the transform coefficients and apply the inverse transform to the transform coefficients to generate a residual block (808). Finally, the video decoder 300 can decode the current block by combining the prediction block and the residual block (810).

[0175] Figure 9 is a flowchart illustrating an example procedure for encoding video data using one or more techniques according to the present invention. In the example of Figure 9, REU 228 initializes coefficient statistics (e.g., statCoeff[i][compID])(900). For example, REU 228 may initialize the coefficient statistics to 0. In some instances, REU 228 may initialize the coefficient statistics to a preset historical value (e.g., DefaultHistoryRiceValue).

[0176] In some instances, the REU 228 can determine the default history value based on the QP of a slice of an image containing blocks of video data. For example, 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 perform the following operations to determine the default history value: DefaultHistoryRiceValue = (bitDepth - 10) > 0 ? (int)(OFFSET - cs.slice->getSliceQp() * MULTIPLIER) :0; DefaultHistoryRiceValue = DefaultHistoryRiceValue < 0 ? 0 :DefaultHistoryRiceValue; REU 228 can reset coefficient statistics to preset historical values ​​at the beginning of image segmentation. For example, REU 228 can maintain coefficient statistics via specific partitions of a decoded image (e.g., a complete image, slice, tile, CTU group, or single CTU), where a standard reset is performed at the beginning of the partition.

[0177] Furthermore, in the example of Figure 9, REU 228 can update coefficient statistics based on one or more transform coefficients of a transform block (TB) of a block of video data (902). The block of video data 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 TB's transform coefficients. As shown in the example of Figure 9, as part of updating the coefficient statistics, REU 228 can perform a derivation procedure for each of the one or more transform coefficients of the TB to determine a temporary value (904).

[0178] The derivation process considers (i.e., is at least partially based on) which of a plurality of encoding procedures is used to encode the corresponding transform coefficients. This plurality of encoding procedures includes a context-based procedure for encoding the corresponding transform coefficients and encoding them as absolute values. When the context-based procedure for encoding is used to encode the corresponding transform coefficients, the corresponding transform coefficients can be represented using a greater-than-1 flag, optionally a 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.

[0179] When using a context-based program to encode the corresponding transform coefficients, REU 228 can determine the temporary value based on the base-2 logarithm of the remainder of the corresponding transform coefficient after applying the floor function, plus the integer value. For example, with g_tempStatCoeff[riceClass] as the temporary value, "rem" as the remainder of the corresponding transform coefficient, and "N" as the integer value, REU 228 can calculate: g_tempStatCoeff[riceClass] += floorLog2((uint32_t)rem) + N; In this operation and elsewhere in this case, the "(unit32_t)" instruction casts "rem" to an unsigned 32-bit integer.

[0180] In other cases, such as when the corresponding transform coefficients are encoded as absolute values, REU 228 can determine the temporary value based on the base-2 logarithm of the absolute level of the corresponding transform coefficient by applying the floor function. For example, in the case where g_tempStatCoeff[riceClass] is the temporary value and "rem" is the remainder of the corresponding transform coefficient, REU 228 can calculate: g_tempStatCoeff[riceClass] += floorLog2((uint32_t)rem)

[0181] 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, and 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: int averageRiceInTU = (int)(g_tempStatCoeff[i]); StatCoeff[i][compID] = (StatCoeff[i][compID] + averageRiceInTU) >> 1;

[0182] Furthermore, in the example of Figure 9, REU 228 can determine historical values ​​(e.g., histCoef) based on coefficient statistics (908). In some instances, REU 228 can store coefficient statistics as derivatives of the Rice parameters. In such instances, as part of determining historical values ​​based on coefficient statistics, REU 228 can left-shift the coefficient statistics by 1. For example, REU 228 can do the following to determine historical values ​​based on coefficient statistics: historyRiceValue = StatCoeff[i][compID]; histCoef = 1 << historyRiceValue; In another example, 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, REU 228 can set historical values ​​equal to the coefficient statistics. For example, REU 228 can perform the following operations to determine historical values ​​based on coefficient statistics: historyValue = StatCoeff[i][compID]; histCoef = historyValue;

[0183] In the example of Figure 9, REU 228 can determine the Rice parameter (910) for a specific transform coefficient used in TB. The specific transform coefficient of TB can be any of the transform coefficients of TB. In some instances, REU 228 can determine the Rice parameter for each transform coefficient used in TB.

[0184] 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 lower 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[])" indicates the absolute level of the transform coefficient, and "histCoef" indicates 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 lower boundary of the TB: Is (posX < m_width - 1) Is it (posX < m_width - 2)? Is it (posY < m_height - 1)? Is it (posY < m_height - 1)? Is it (posY < m_height - 2)?

[0185] As shown in the example in Figure 9, REU 228 can determine the local sum value (914) based on historical values, given that a specific transform coefficient is less than three spatial locations from the right boundary or the lower boundary of TB (the "yes" branch of 912). For example, as shown in code listing 3, REU 228 can determine the local sum value as one of the following: sum += histCoef sum += N * histCoef sum += M * histCoef

[0186] Alternatively, if a particular transform coefficient is at least three spatial locations away from the right or lower boundary of TB (the "No" branch of 912), then REU 228 can determine the local sum value based on the transform coefficients in the template (916). For example, as shown in Virtual Code List 3, REU 228 can determine the local sum value as one of the following: sum += abs(pData[2]); sum += abs(pData[m_width + 1]); sum += abs(pData[m_width]); sum += abs(pData[m_width << 1]);

[0187] Furthermore, REU 228 can determine the Rice parameter (918) for a particular transform coefficient based on the local summation value. For example, REU 228 can use the local summation value to examine the Rice parameter for a particular transform coefficient in a table (such as Table 1).

[0188] REU 228 can generate Rice code (920) for a specific transform coefficient based on the Rice parameter used for that specific transform coefficient and the level of that specific transform coefficient. For example, the Rice code for a specific transform coefficient can include a first code and a last code separated by a fixed value that is usually equal to 0. REU 228 can determine the first code q as x divided by M and 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 2k, where k is the Rice parameter used for the particular transform coefficient. REU 228 can determine 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.

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

[0190] Figure 10 is a flowchart illustrating an example procedure for decoding video data using one or more techniques according to the present invention. In the example of Figure 10, the RDU 322 initializes coefficient statistics (e.g., statCoeff[i][compID])(1000). For example, the RDU 322 may initialize the coefficient statistics to 0. In some instances, the RDU 322 may initialize the coefficient statistics to a preset historical value (e.g., DefaultHistoryRiceValue).

[0191] In some instances, the RDU 322 can determine the default history value based on the QP of a slice of an image containing blocks of video data. For example, 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 perform the following operations to determine the default history value: DefaultHistoryRiceValue = (bitDepth - 10) > 0 ? (int)(OFFSET - cs.slice->getSliceQp() * MULTIPLIER) :0; DefaultHistoryRiceValue = DefaultHistoryRiceValue < 0 ? 0 :DefaultHistoryRiceValue; The RDU 322 can reset coefficient statistics to preset historical values ​​at the beginning of a segmentation of an image. For example, the RDU 322 can maintain coefficient statistics via specific partitions of a decoded image (e.g., a complete image, a slice, a tile, a group of CTUs, or a single CTU), where a standard reset is performed at the beginning of the partition.

[0192] Furthermore, in the example of Figure 10, RDU 322 can update coefficient statistics based on one or more transform coefficients of the TB of a block of video data (1002). The block of video data 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. As shown in the example of Figure 10, as part of updating the coefficient statistics, RDU 322 can perform a derivation procedure for each of the one or more transform coefficients of the TB to determine a temporary value (1004).

[0193] The derivation procedure considers (i.e., is determined at least in part based on) which of a plurality of encoding procedures is used to encode the corresponding transform coefficients. This plurality of encoding procedures includes context-based procedures for encoding the corresponding transform coefficients and encoding them as absolute values. RDU 322 can execute the derivation procedure according to any of the instances described above with respect to REU 228.

[0194] Additionally, as part of updating coefficient statistics, 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, and 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, RDU 322 can do the following: int averageRiceInTU = (int)(g_tempStatCoeff[i]); StatCoeff[i][compID] = (StatCoeff[i][compID] + averageRiceInTU) >> 1;

[0195] Furthermore, in the example of Figure 10, the RDU 322 can determine historical values ​​(e.g., histCoef) based on coefficient statistics (1008). In some instances, the RDU 322 can store the coefficient statistics as the derivative of the Rice parameter. In such instances, as part of determining historical values ​​based on coefficient statistics, the RDU 322 can left-shift the coefficient statistics by 1. For example, the RDU 322 can perform the following operations to determine historical values ​​based on coefficient statistics: historyRiceValue = StatCoeff[i][compID]; histCoef = 1 << historyRiceValue; 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: historyValue = StatCoeff[i][compID]; histCoef = historyValue;

[0196] In the example of Figure 10, RDU 322 can determine the Rice parameter (1010) for a specific transform coefficient used in TB. The specific transform coefficient of TB can be any of the transform coefficients of TB. In some instances, RDU 322 can determine the Rice parameter for each transform coefficient used in TB.

[0197] 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 lower boundary of the TB. 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, 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 lower boundary of the TB: Is (posX < m_width - 1) Is it (posX < m_width - 2)? Is it (posY < m_height - 1)? Is it (posY < m_height - 1)? Is it (posY < m_height - 2)?

[0198] As shown in the example in Figure 10, RDU 322 can determine the local sum value (1014) based on historical values, given that a specific transform coefficient is less than three spatial locations from the right boundary or the lower boundary of TB (the "yes" branch of 1012). For example, as shown in code listing 3, RDU 322 can determine the local sum value as one of the following: sum += histCoef sum += N * histCoef sum += M * histCoef

[0199] Alternatively, if a particular transform coefficient is at least three spatial locations away from the right or lower boundary of the TB (the "No" branch of 1012), then RDU 322 can determine the local sum value based on the transform coefficients in the template (1016). For example, as shown in code listing 3, RDU 322 can determine the local sum value as one of the following: sum += abs(pData[2]); sum += abs(pData[m_width + 1]); sum += abs(pData[m_width]); sum += abs(pData[m_width << 1]);

[0200] Furthermore, the RDU 322 can determine the Rice parameters (1018) for a particular transform coefficient based on local summation values. For example, the RDU 322 can use local summation values ​​to examine the Rice parameters for a particular transform coefficient in a table (such as Table 1).

[0201] The RDU 322 can determine the level (1020) of a particular transform coefficient based on a Ricean parameter used for that transform coefficient 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 Ricean code used for a particular transform coefficient. The Ricean code used for a particular transform coefficient can include a first code `q` and a last code `r`. The length of the last code `r` can be equal to the Ricean parameter used for that transform coefficient. The RDU 322 can interpret the first code `q` as a unary representation of the first bit and the last code `r` as a binary representation of the second bit, and can ignore zeros between the first code `q` and the last code `r`. In this example, the RDU 322 can add the first and second bits to determine the decoded value. In instances where a context-based program is used to encode a specific transform coefficient, the 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 exists and is 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 instances where an absolute value is used to encode a specific transform coefficient, 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 as described above.

[0202] In some instances, the CABAC unit 324 can perform CABAC decoding on values ​​in a bitstream to obtain Rice code.

[0203] Furthermore, in the example of Figure 10, the video decoder 300 can decode blocks of video data based on the level of a specific transform coefficient (1022). For example, the inverse quantization unit 306 can inverse quantize the level of a specific transform coefficient and the values ​​of other transform coefficients in the TB. In this example, the inverse transform processing unit 308 of the 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 procedures are omitted, and the transform coefficients directly indicate the residual values.) The 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, the reconstruction unit 310 can reconstruct the sampled values ​​of the block of video data.

[0204] The following is a non-limiting list of various forms of one or more technologies based on the content of this case.

[0205] State 1A. A method for decoding video data, the method comprising: determining estimated historical transform coefficients for current transform coefficients; determining a local summation value based on the estimated historical transform coefficients; determining a Rice parameter based on the local summation value; using the Rice parameter to decode syntax elements; determining the level of the current transform coefficient based on the syntax elements; and reconstructing blocks of the video data based on the level of the current transform coefficient.

[0206] State 2A. According to the method of State 1A, determining the estimated historical transformation coefficient for the current transformation coefficient includes: determining historical values ​​for each Rice category for the region of the image associated with the current transformation unit; and determining the estimated historical transformation coefficient based on the historical values.

[0207] State 3A. According to the method described in State 2A, wherein: the region is one of the complete region of the image, a slice, a tile, a group of Decoding Tree Units (CTUs) or a single CTU; and the method also includes: resetting the historical value to a preset historical value when decoding of the region begins.

[0208] State 4A. The method described according to State 3A also includes: determining the preset historical value based on the bit depth of the decoded data.

[0209] State 5A. The method according to any one of State 3A or State 4A also includes: determining the preset historical value based on quantization parameters or based on data transmitted as a signal in a bitstream including an encoded version of the video data.

[0210] State 6A. The method according to any one of states 2A to 5A, wherein determining the historical value includes: 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.

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

[0212] State 8A. According to the method of State 7A, the determination of the estimated historical transformation coefficient for the current transformation coefficient includes: determining historical values ​​for each Rice category for the region of the image associated with the current transformation unit; and determining the estimated historical transformation coefficient based on the historical values.

[0213] State 9A. According to the method described in State 8A, wherein: the region is one of the complete region of the image, a slice, a tile, a group of decoding tree units (CTUs) or a single CTU; and the method also includes: resetting the historical value to a preset historical value when decoding of the region begins.

[0214] State 10A. The method according to State 9A also includes: determining the preset history value based on the bit depth of the decoded data.

[0215] State 11A. The method according to any one of State 9A or State 10A also includes: determining the preset historical value based on quantization parameters or based on data transmitted as a signal in a bitstream including an encoded version of the video data.

[0216] State 12A. The method according to any one of states 8A to 11A, wherein determining the historical value includes: 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.

[0217] Sample 13A. An apparatus for decoding video data, the apparatus comprising one or more units for performing the method according to any one of Samples 1A-12A.

[0218] Version 14A. The device according to Version 13A, wherein the one or more units include one or more processors implemented in a circuit.

[0219] Version 15A. The device according to any one of Versions 13A and 14A also includes memory for storing the video data.

[0220] Version 16A. The device according to any one of Versions 13A-15A also includes a display configured to display decoded video data.

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

[0222] Version 18A. The device according to any one of versions 13A-17A, wherein the device includes a video decoder.

[0223] Version 19A. The device according to any one of versions 13A-18A, wherein the device includes a video transcoder.

[0224] Sample 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 Samples 1A-12A.

[0225] Sample 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 the video data, wherein updating the coefficient statistics includes: for each of the one or more transform coefficients of the TB, performing a derivation procedure to determine a temporary value, wherein the derivation procedure is determined at least in part based on which encoding method among 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 the coefficient... The statistical value is set as the average of the coefficient statistical value and the temporary value; the historical value is determined based on the coefficient statistical value; the Rice parameter for the specific transform coefficient used for the TB is determined, 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 three spatial positions away from the right boundary or the lower boundary of the TB; and determining the Rice parameter for the specific transform coefficient based on the local sum; determining the level of the specific transform coefficient based on the Rice parameter for 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.

[0226] State 2B: According to the method described in State 1B, wherein performing the derivation procedure to determine the temporary value includes: determining the temporary value based on the fact that the corresponding transform coefficient is encoded using the context-based procedure, based on the base-2 logarithm of the remainder of the corresponding transform coefficient after applying the floor function and adding an integer value.

[0227] State 3B: According to the method described in State 1B, wherein performing the derivation procedure 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 the base-2 logarithm of the absolute level of the corresponding transform coefficient to which a floor function is applied.

[0228] State 4B: The method according to State 1B also includes: determining a preset historical value based on the quantization parameter (QP) of the slice of the image including the TB; and resetting the coefficient statistics to the preset historical value at the beginning of the segmentation of the image.

[0229] State 5B: According to the method of State 1B, wherein: the method also includes: storing the coefficient statistic as Rice parameter derivative, and determining the historical value based on the coefficient statistic includes: left-shifting the coefficient statistic by 1.

[0230] State Sample 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 the video data, wherein updating the coefficient statistics includes: for each of the one or more transform coefficients of the TB, performing a derivation procedure to determine a temporary value, wherein the derivation procedure is determined at least in part using a plurality of encoding procedures based on which encoding procedure is used to encode the corresponding transform coefficient, the plurality of encoding procedures including those for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value. The program in the context; and set the coefficient statistic to the average of the coefficient statistic and the temporary value; determine the historical value based on the coefficient statistic; determine the Rice parameter for the specific transform coefficient of the TB, wherein determining the Rice parameter for the specific transform coefficient includes: determining the local sum based on the historical value based on the specific transform coefficient being less than three spatial locations from the right boundary or the lower boundary of the TB; and determining the Rice parameter for the specific transform coefficient based on the local sum; and generating the 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.

[0231] State 7B: According to the method described in State 6B, wherein performing the derivation procedure to determine the temporary value includes: determining the temporary value based on the fact that the corresponding transform coefficient is encoded using the context-based procedure, based on the base-2 logarithm of the remainder of the corresponding transform coefficient after applying the floor function and adding an integer value.

[0232] State 8B: According to the method described in State 6B, wherein performing the derivation procedure to determine the temporary value includes: determining the temporary value based on the corresponding transform coefficient being encoded as an absolute value, based on the base-2 logarithm of the absolute level of the corresponding transform coefficient to which a floor function is applied.

[0233] State 9B: The method according to State 6B also includes: determining a preset historical value based on the quantization parameter (QP) of the slice of the image including the TB; and resetting the coefficient statistics to the preset historical value at the beginning of the segmentation of the image.

[0234] State 10B: According to the method described in State 6B, wherein: the method also includes: storing the coefficient statistic as the Rice parameter derivative, and determining the historical value based on the coefficient statistic includes: shifting 1 to the left of the coefficient statistic.

[0235] Sample 11B: An apparatus for decoding video data, comprising: a memory configured to store the 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 the video data, wherein the processing circuitry is configured to: as part of updating the coefficient statistics, for each of the one or more transform coefficients of the TB, execute a derivation procedure to determine a temporary value, wherein the derivation procedure 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 those for encoding the corresponding transform coefficient and the corresponding transform coefficient being encoded. The transform coefficients are encoded as absolute values ​​in a context-based procedure; and the coefficient statistics are set as the average of the coefficient statistics and the temporary value; a historical value is determined based on the coefficient statistics; a Rice parameter is determined for a specific transform coefficient for the TB, wherein the processing circuit is configured to: as part of determining the Rice parameter for the specific transform coefficient: determine a local sum based on the historical value based on the specific transform coefficient being less than three spatial locations from the right boundary or the lower boundary of the TB; and determine the Rice parameter for the specific transform coefficient based on the local sum; determine the level of the specific transform coefficient based on the Rice parameter for the specific transform coefficient; and decode the block based on the level of the specific transform coefficient.

[0236] State 12B: The device according to State 11B, wherein the processing circuit is configured as part of executing the derivation procedure to determine the temporary value: based on the corresponding transform coefficient being encoded using the context-based procedure, the temporary value is determined based on the logarithm of the remainder of the corresponding transform coefficient applied with a floor function plus an integer value; and based on the corresponding transform coefficient being encoded as an absolute value, the temporary value is determined based on the logarithm of the absolute level of the corresponding transform coefficient applied with a floor function.

[0237] Sample 13B: The device according to Sample 11B, wherein the processing circuit is also configured to: determine a preset historical value based on the quantization parameter (QP) of a slice of an image including the TB; and reset the coefficient statistics to the preset historical value at the beginning of the image segmentation.

[0238] State 14B: The device according to State 11B, wherein: the processing circuit is also configured to: store the coefficient statistics as Rice parameter derivatives, and the processing circuit is configured to: shift the coefficient statistics to the left by 1 as part of determining the historical value based on the coefficient statistics.

[0239] Version 15B: The device according to Version 11B also includes a display configured to display decoded video data.

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

[0241] Sample 17B: An apparatus for encoding video data, comprising: a memory configured to store the 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 the video data, wherein the processing circuitry is configured to: as part of updating the coefficient statistics, for each of the one or more transform coefficients of the TB: execute a derivation procedure to determine a temporary value, wherein the derivation procedure 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 those for encoding the corresponding transform coefficient and... The corresponding transform coefficients are encoded as absolute values ​​in a context-based program; and the coefficient statistics are set as the average of the coefficient statistics and the temporary value; a historical value is determined based on the coefficient statistics; a Rice parameter for a specific transform coefficient of the TB is determined, wherein the processing circuit is configured to: as part of determining the Rice parameter for the specific transform coefficient: determine a local sum based on the historical value based on the specific transform coefficient being less than three spatial locations from the right boundary or the lower boundary of the TB; and determine the Rice parameter for the specific transform coefficient based on the local sum; and generate 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.

[0242] State 18B: The device according to State 17B, wherein the processing circuit is configured as part of executing the derivation procedure to determine the temporary value: based on the corresponding transform coefficient being encoded using the context-based procedure, the temporary value is determined based on the logarithm of the remainder of the corresponding transform coefficient applied with a floor function plus an integer value; and based on the corresponding transform coefficient being encoded as an absolute value, the temporary value is determined based on the logarithm of the absolute level of the corresponding transform coefficient applied with a floor function.

[0243] Sample 19B: The device according to Sample 17B, wherein the processing circuit is also configured to: determine a preset historical value based on the quantization parameter (QP) of a slice of an image including the TB; and reset the coefficient statistics to the preset historical value at the beginning of the image segmentation.

[0244] State 20B: The device according to State 17B, wherein: the processing circuit is also configured to: store the coefficient statistics as Rice parameter derivatives, and the processing circuit is configured to: shift the coefficient statistics to the left by 1 as part of determining the historical value based on the coefficient statistics.

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

[0246] State Sample 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 the video data, wherein updating the coefficient statistics includes: for each of the one or more transform coefficients of the TB, performing a derivation procedure to determine a temporary value, wherein the derivation procedure is determined at least in part based on which encoding method among 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 the coefficient The statistical value is set as the average of the coefficient statistical value and the temporary value; the historical value is determined based on the coefficient statistical value; the Rice parameter for the specific transform coefficient used for the TB is determined, 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 three spatial positions away from the right boundary or the lower boundary of the TB; and determining the Rice parameter for the specific transform coefficient based on the local sum; determining the level of the specific transform coefficient based on the Rice parameter for 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.

[0247] State 2C: According to the method described in State 1C, wherein performing the derivation procedure to determine the temporary value includes: determining the temporary value based on the fact that the corresponding transform coefficient is encoded using the context-based procedure, based on the base-2 logarithm of the remainder of the corresponding transform coefficient after applying the floor function and adding an integer value.

[0248] State 3C: According to the method described in State 1C, wherein performing the derivation procedure 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 the base-2 logarithm of the absolute level of the corresponding transform coefficient by applying a floor function.

[0249] State 4C: The method according to any one of State 1C to State 3C also includes: determining a preset historical value based on the quantization parameter (QP) of the slice of the image including the TB; and resetting the coefficient statistics to the preset historical value at the beginning of the segmentation of the image.

[0250] State 5C: The method according to any one of states 1C to 4C, wherein: the method also includes: storing the coefficient statistic as a Rice parameter derivative, and determining the historical value based on the coefficient statistic includes: left-shifting the coefficient statistic by 1.

[0251] State Sample 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 the video data, wherein updating the coefficient statistics includes: for each of the one or more transform coefficients of the TB, performing a derivation procedure to determine a temporary value, wherein the derivation procedure 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 those for encoding the corresponding transform coefficient and encoding the corresponding transform coefficient as an absolute value. The program in the context; and set the coefficient statistic to the average of the coefficient statistic and the temporary value; determine the historical value based on the coefficient statistic; determine the Rice parameter for the specific transform coefficient of the TB, wherein determining the Rice parameter for the specific transform coefficient includes: determining the local sum based on the historical value based on the specific transform coefficient being less than three spatial locations from the right boundary or the lower boundary of the TB; and determining the Rice parameter for the specific transform coefficient based on the local sum; and generating the 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.

[0252] State 7C: According to the method described in State 6C, wherein performing the derivation procedure to determine the temporary value includes: determining the temporary value based on the fact that the corresponding transform coefficient is encoded using the context-based procedure, based on the base-2 logarithm of the remainder of the corresponding transform coefficient after applying the floor function and adding an integer value.

[0253] State 8C: According to the method described in State 6C, wherein performing the derivation procedure to determine the temporary value includes: determining the temporary value based on the corresponding transform coefficient being encoded as an absolute value, based on the base-2 logarithm of the absolute level of the corresponding transform coefficient by applying a floor function.

[0254] State 9C: The method according to any one of State 6C to State 8C also includes: determining a preset historical value based on the quantization parameter (QP) of the slice of the image including the TB; and resetting the coefficient statistics to the preset historical value at the beginning of the segmentation of the image.

[0255] State 10C: The method according to any one of State 6C to State 9C, wherein: the method also includes: storing the coefficient statistic as Rice parameter derivative, and determining the historical value based on the coefficient statistic includes: left-shifting the coefficient statistic by 1.

[0256] Format 11C: An apparatus for decoding video data, comprising: a memory configured to store the 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 the video data, wherein the processing circuitry is configured to: as part of updating the coefficient statistics, for each of the one or more transform coefficients of the TB, execute a derivation procedure to determine a temporary value, wherein the derivation procedure 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 those for encoding the corresponding transform coefficient and the corresponding transform coefficient being encoded. The transform coefficients are encoded as absolute values ​​in a context-based procedure; and the coefficient statistics are set as the average of the coefficient statistics and the temporary value; a historical value is determined based on the coefficient statistics; a Rice parameter is determined for a specific transform coefficient for the TB, wherein the processing circuit is configured to: as part of determining the Rice parameter for the specific transform coefficient: determine a local sum based on the historical value based on the specific transform coefficient being less than three spatial locations from the right boundary or the lower boundary of the TB; and determine the Rice parameter for the specific transform coefficient based on the local sum; determine the level of the specific transform coefficient based on the Rice parameter for the specific transform coefficient; and decode the block based on the level of the specific transform coefficient.

[0257] State 12C: The device according to State 11C, wherein the processing circuit is configured as part of executing the derivation procedure to determine the temporary value: based on the corresponding transform coefficient being encoded using the context-based procedure, the temporary value is determined based on the logarithm of the remainder of the corresponding transform coefficient applied with a floor function plus an integer value; and based on the corresponding transform coefficient being encoded as an absolute value, the temporary value is determined based on the logarithm of the absolute level of the corresponding transform coefficient applied with a floor function.

[0258] Sample 13C: The device according to any one of Samples 11C and 12C, wherein the processing circuit is also configured to: determine a preset historical value based on the quantization parameter (QP) of a slice of an image including the TB; and reset the coefficient statistics to the preset historical value at the beginning of the image segmentation.

[0259] State 14C: The device according to any one of states 11C to 13C, wherein: the processing circuit is also configured to: store the coefficient statistics as Rice parameter derivatives, and the processing circuit is configured to: shift the coefficient statistics left by 1 as part of determining the historical value based on the coefficient statistics.

[0260] Version 15C: The device according to any one of versions 11C to 14C also includes a display configured to display decoded video data.

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

[0262] Format 17C: An apparatus for encoding video data, comprising: a memory configured to store the 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 the video data, wherein the processing circuitry is configured to: as part of updating the coefficient statistics, for each of the one or more transform coefficients of the TB: execute a derivation procedure to determine a temporary value, wherein the derivation procedure 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 those for encoding the corresponding transform coefficient and... The corresponding transform coefficients are encoded as absolute values ​​in a context-based program; and the coefficient statistics are set as the average of the coefficient statistics and the temporary value; a historical value is determined based on the coefficient statistics; a Rice parameter for a specific transform coefficient of the TB is determined, wherein the processing circuit is configured to: as part of determining the Rice parameter for the specific transform coefficient: determine a local sum based on the historical value based on the specific transform coefficient being less than three spatial locations from the right boundary or the lower boundary of the TB; and determine the Rice parameter for the specific transform coefficient based on the local sum; and generate 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.

[0263] State 18C: The device according to State 17C, wherein the processing circuit is configured as part of executing the derivation procedure to determine the temporary value: based on the corresponding transform coefficient being encoded using the context-based procedure, the temporary value is determined based on the logarithm of the remainder of the corresponding transform coefficient applied with a floor function plus an integer value; and based on the corresponding transform coefficient being encoded as an absolute value, the temporary value is determined based on the logarithm of the absolute level of the corresponding transform coefficient applied with a floor function.

[0264] Sample 19C: The device according to any one of Samples 17C and 18C, wherein the processing circuit is also configured to: determine a preset historical value based on the quantization parameter (QP) of a slice of an image including the TB; and reset the coefficient statistics to the preset historical value at the beginning of the image segmentation.

[0265] Sample 20C: The device according to any one of Samples 17C to 19C, wherein: the processing circuit is also configured to: store the coefficient statistics as Rice parameter derivatives, and the processing circuit is configured to: shift the coefficient statistics to the left by 1 as part of determining the historical value based on the coefficient statistics.

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

[0267] It should be recognized that, depending on the instance, certain actions or events of any of the techniques 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 technical practice). Furthermore, in some instances, actions or events may be performed concurrently rather than sequentially, for example, via multithreading, interrupt handling, or multiple processors.

[0268] In one or more instances, the described functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, such functionality may be stored as one or more instructions or code on or transmitted through a computer-readable medium and executed by a hardware-based processing unit. A computer-readable medium may include a computer-readable storage medium, which corresponds to tangible media such as data storage media or communication media, including, for example, any media 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 may 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 may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures used to implement the techniques described herein. A computer program product may include a computer-readable medium.

[0269] By way of example, and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disc storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other media capable of storing desired program code in the form of instructions or data structures, and any other media accessible by a computer. Furthermore, any connection is appropriately referred to as computer-readable media. For example, coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies (such as infrared, radio, and microwave) are included in the definition of media if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies (such as infrared, radio, and microwave). 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. As used herein, magnetic disks and optical disks include CDs, laser discs, optical discs, DVDs, floppy disks, and Blu-ray discs, where magnetic disks typically copy data magnetically, while optical discs use lasers to copy data optically. Combinations of the above should also be included within the scope of computer-readable media.

[0270] 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 individual logic circuits). Therefore, 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. Additionally, in some cases, the functions described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined transcoder. Furthermore, these techniques can be fully implemented in one or more circuit or logic elements.

[0271] The technology described in this application can be implemented in a wide variety of devices or apparatuses, including wireless mobile phones, integrated circuits (ICs), or a set of ICs (e.g., chipsets). Various components, modules, or units are described in this application to emphasize the functional characteristics of devices configured to perform the disclosed technology, but they do not necessarily need to be implemented by different hardware units. Rather, as described above, various units can be combined in a transcoder hardware unit, or provided by a collection of interactively operable hardware units (including one or more processors as described above) combined with appropriate software and / or firmware.

[0272] The individual instances have been described. These instances, along with others, fall within the scope of the attached request items.

[0273] 100: Video Encoding and Decoding System 102: Source device 104: Video Source 106: Memory 108: Output Interface 110: Computer-readable media 112: Storage device 114: Archive Server 116: Destination Equipment 118: Display device 120: Memory 122: Input Interface 200: Video transcoder 202: Mode Selection Unit 204: Residual Generation Unit 206: Transformation Processing Unit 208: Quantization unit 210: Inverse quantization unit 212: Inverse Transformation Processing Unit 214: Reconfiguration Unit 216: Filter Unit 218: Decoded Picture Buffer (DPB) 220: Entropy Coding Unit 222: Motion Estimation Unit 224: Motion Compensation Unit 226: In-frame prediction unit 228:REU 230: Video Data Memory 232: CABAC Unit 250: Current transformation coefficients 252A: Transformation coefficients 252B: Transformation coefficients 252C: Transformation coefficients 252D: Transformation coefficients 252E: Transformation coefficient 300: Video Decoder 302: Entropy Decoding Unit 304: Predictive Processing Unit 306: Inverse quantization unit 308: Inverse Transformation Processing Unit 310: Reconfiguration Unit 312: Filter Unit 314: Decoded Picture Buffer (DPB) 316: Motion Compensation Unit 318: In-frame prediction unit 320: Decoded Image Buffer (CPB) Memory 322:RDU 324: CABAC Unit 350:TB 352: Current transformation coefficients 354A: Adjacent Transformation Coefficients 354B: Adjacent Transformation Coefficients 354C: Adjacent Transformation Coefficients 354D: Adjacent Transformation Coefficients 354E: Adjacent Transformation Coefficients 400: Quadtree Binary Tree (QTBT) Structure 402: Code Tree Unit (CTU) 700: Square 702: Square 704: Square 706: Square 708: Square 710: Square 800: Square 802: Square 804: Square 806: Square 808: Square 810: Square 900: Square 902: Square 904: Square 906: Square 908: Square 910: Square 912: Square 914: Square 916: Square 918: Square 920: Square 1000: Square 1002: Square 1004: Square 1006: Square 1008: Square 1010: Square 1012: Square 1014: Square 1016: Square 1018: Square 1020: Square 1022: Square C1: Category C2: Category C3: Category C4: Category< / tcoeff> < / tcoeff>

Claims

1. A method for decoding video data, the method comprising the steps of: initializing a coefficient statistic; updating the coefficient statistic based on one or more transform coefficients of a transform block (TB) of a block of the video data, wherein updating the coefficient statistic comprises the steps of: for each of the one or more transform coefficients of the TB, performing a derivation procedure to determine a temporary value, wherein the derivation procedure is determined at least in part based on which encoding method among 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 statistic as an average of the coefficient statistic and the temporary value; determining a historical value based on the coefficient statistic; determining a Rice parameter for a specific transform coefficient of the TB, wherein determining the Rice parameter for the specific transform coefficient comprises: Based on the fact that the specific transform coefficient is less than three spatial locations away from a right boundary or a lower boundary of the TB, a local sum value is determined based on the historical value; and the Rice parameter used for the specific transform coefficient is determined based on the local sum value; a level of the specific transform coefficient is determined based on the Rice parameter used for the specific transform coefficient and one or more syntax elements encoded in a one-bit stream; and the block is decoded based on the level of the specific transform coefficient.

2. According to the method of request item 1, wherein performing the derivation procedure to determine the temporary value includes the following steps: based on the fact that the corresponding transform coefficient is encoded using the context-based procedure, the temporary value is determined based on a base-2 logarithm of a remainder of the corresponding transform coefficient applied to a floor function and added to an integer value.

3. According to the method of request item 1, wherein performing the derivation procedure to determine the temporary value includes the following steps: determining the temporary value based on the fact that the corresponding transform coefficient is encoded as an absolute value, based on the logarithm of the absolute level of the corresponding transform coefficient being a base-2 value by applying a floor function to the floor function of the corresponding transform coefficient.

4. The method according to request item 1 also includes the following steps: A preset historical value is determined based on a quantization parameter (QP) of all images, including the TB image. And at the very beginning of the segmentation of the image, the coefficient statistics are reset to the preset historical value.

5. According to the method of request item 1, wherein: The method also includes: storing the coefficient statistic as a Rice parameter derivative, and determining the historical value based on the coefficient statistic includes: left-shifting the coefficient statistic by 1.

6. A method for encoding video data, the method comprising the steps of: initializing a coefficient statistic; updating the coefficient statistic based on one or more transform coefficients of a transform block (TB) of the video data, wherein updating the coefficient statistic comprises the steps of: for each of the one or more transform coefficients of the TB, performing a derivation procedure to determine a temporary value, wherein the derivation procedure 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 statistic as an average of the coefficient statistic and the temporary value; determining a historical value based on the coefficient statistic; determining a Rice parameter for a particular transform coefficient of the TB, wherein determining the Rice parameter for the particular transform coefficient comprises: Based on the fact that the specific transform coefficient is less than three spatial locations away from a right boundary or a lower boundary of the TB, a local summation value is determined based on the historical value; and the Rice parameter for the specific transform coefficient is determined based on the local summation value; and a Rice code for the specific transform coefficient is generated based on the Rice parameter for the specific transform coefficient and a level of the specific transform coefficient.

7. According to the method of request item 6, wherein performing the derivation procedure to determine the temporary value includes the following steps: based on the fact that the corresponding transform coefficient is encoded using the context-based procedure, the temporary value is determined based on the base-2 logarithm of a remainder of the corresponding transform coefficient applied to a floor function and added to an integer value.

8. According to the method of request item 6, wherein performing the derivation procedure to determine the temporary value includes the following steps: determining the temporary value based on a base-2 logarithm of an absolute level of the corresponding transform coefficient, based on the fact that the corresponding transform coefficient is encoded as an absolute value.

9. The method according to request item 6 also includes the following steps: A preset historical value is determined based on a quantization parameter (QP) of all images, including the TB image. And at the beginning of a segment of the image, reset the coefficient statistics to the preset historical value.

10. According to the method of request item 6, wherein: The method also includes: storing the coefficient statistic as a Rice parameter derivative, and determining the historical value based on the coefficient statistic includes: left-shifting the coefficient statistic by 1.

11. An apparatus for decoding video data, the apparatus comprising: A memory configured to store the video data; and processing circuitry configured to: initialize a coefficient statistical value; The processing circuit updates the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the video data, wherein the processing circuit is configured to: as part of updating the coefficient statistics, for each of the one or more transform coefficients of the TB, perform a derivation procedure to determine a temporary value, wherein the derivation procedure 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 statistics as an average of the coefficient statistics and the temporary value; determine a historical value based on the coefficient statistics; and determine a Rice parameter for a specific transform coefficient of the TB, wherein the processing circuit is configured to: as part of determining the Rice parameter for the specific transform coefficient, determine a local sum based on the historical value, based on the specific transform coefficient being less than three spatial locations from a right boundary or a lower boundary of the TB; and determine the Rice parameter for the specific transform coefficient based on the local sum. The level of the particular transform coefficient is determined based on the Rice parameter used for that particular transform coefficient; and the TB is decoded based on that level of the particular transform coefficient.

12. The device according to claim 11, wherein the processing circuitry is configured as part of executing the derivation procedure to determine the temporary value: based on the fact that the corresponding transform coefficient is encoded using the context-based procedure, the temporary value is determined based on a base-2 logarithm of a remainder of the corresponding transform coefficient applied to a floor function and added to an integer value; and based on the fact that the corresponding transform coefficient is encoded as an absolute value, the temporary value is determined based on a base-2 logarithm of an absolute level of the corresponding transform coefficient applied to a floor function.

13. The device according to claim 11, wherein the processing circuit is also configured to: determine a preset historical value based on a quantization parameter (QP) of all slices of an image including the TB; and reset the coefficient statistics to the preset historical value at the beginning of a segment of the image.

14. The device according to request item 11, wherein: The processing circuit is also configured to store the coefficient statistic as a Rice parameter derivative, and the processing circuit is configured to shift the coefficient statistic to the left by 1 as part of determining the historical value based on the coefficient statistic.

15. The device according to claim 11 also includes 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, a computer, a mobile device, a broadcast receiver device, or a set-top box.

17. An apparatus for encoding video data, the apparatus comprising: A memory configured to store the video data; and processing circuitry configured to: initialize a coefficient statistical value; The processing circuit updates the coefficient statistics based on one or more transform coefficients of a transform block (TB) of the video data, wherein the processing circuit is configured to: as part of updating the coefficient statistics, for each of the one or more transform coefficients of the TB, perform a derivation procedure to determine a temporary value, wherein the derivation procedure 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 statistics as an average of the coefficient statistics and the temporary value; determine a historical value based on the coefficient statistics; and determine a Rice parameter for a specific transform coefficient of the TB, wherein the processing circuit is configured to: as part of determining the Rice parameter for the specific transform coefficient: Based on the fact that the specific transform coefficient is less than three spatial locations away from a right boundary or a lower boundary of the TB, a local summation value is determined based on the historical value; and the Rice parameter for the specific transform coefficient is determined based on the local summation value; and a Rice code for the specific transform coefficient is generated based on the Rice parameter for the specific transform coefficient and a level of the specific transform coefficient.

18. The device according to claim 17, wherein the processing circuitry is configured as part of executing the derivation procedure to determine the temporary value: based on the corresponding transform coefficient being encoded using the context-based procedure, the temporary value is determined based on a base-2 logarithm of a remainder of the corresponding transform coefficient applied to a floor function and added to an integer value; and based on the corresponding transform coefficient being encoded as an absolute value, the temporary value is determined based on a base-2 logarithm of an absolute level of the corresponding transform coefficient applied to a floor function.

19. The device according to claim 17, wherein the processing circuitry is also configured to: determine a preset historical value based on a quantization parameter (QP) of all slices of an image including the TB; and reset the coefficient statistic to the preset historical value at the beginning of a segment of the image.

20. The device according to request item 17, wherein: The processing circuit is also configured to store the coefficient statistic as a Rice parameter derivative, and the processing circuit is configured to shift the coefficient statistic to the left by 1 as part of determining the historical value based on the coefficient statistic.

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