Context-Adaptive Binary Arithmetic Coding (CABAC) Probability Estimation for Video Coding

JP2025503628A5Pending Publication Date: 2025-12-12QUALCOMM INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024541058
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-12-22
Filing Date
2022-12-23
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

The existing video encoding technology has insufficient accuracy in probability estimation, resulting in low video compression efficiency.

Method used

By improving the context adaptive binary arithmetic coding (Cabac) technology of video encoder and decoder, the context model during the encoding process is dynamically adjusted by using the combination of low-rate and high-rate state variables to improve the accuracy of probability estimation.

Benefits of technology

Improves the compression efficiency of video encoding, reduces the number of bits required for encoding, and improves video quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The video decoder is configured to: receive bin values ​​according to a context model, the context model including one or more probability states, the bin values ​​corresponding to one or more syntax elements of the video data; determine a first shift value based on the received bin values, determine a second shift value based on the received bin values, update a first state variable based on the first shift value, update a second state variable based on the second shift value, determine a probability state of the context model for a next bin to be decoded based on the first state variable and the second state variable, context decode the next bin to be decoded based on the probability state, and determine values ​​of the one or more syntax elements based on the received bin values ​​and the context decoded next bin values.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to U.S. Provisional Patent Application No. 63 / 266,623, filed January 10, 2022, and U.S. Provisional Patent Application No. 18 / 145,399, filed December 22, 2022. U.S. Provisional Patent Application No. 18 / 145,399, filed December 22, 2022, claims the benefit of U.S. Provisional Patent Application No. 63 / 266,623, filed January 10, 2022, the entire contents of each of which are incorporated herein by reference.

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

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

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

[0005] To reduce the bits required to code some syntax elements, some syntax elements may be coded using context adaptive binary arithmetic coding (CABAC). CABAC uses context to determine the probability that the next bit has a certain value. This disclosure describes techniques to improve the accuracy of probability estimation for binary arithmetic coders. The techniques may be used by video encoders and video decoders to calculate and update probability states of a context model associated with CABAC. The techniques of this disclosure may be suitable for binary arithmetic coders whose probability states represent real-world probabilities in the linear domain, such as CABAC as implemented in generic video coding (VVC).

[0006] Typically, the context state is selected as a function of two state variables, a low-rate state variable and a high-rate state variable. The low-rate state variable and the high-rate state variable are updated for the next bin based on the values ​​of the previously coded bin. According to the techniques of this disclosure, the low-rate state variable and the high-rate state variable may be further updated based on a specific combination of values ​​of the last M bins. In existing techniques, if the previous bin had a certain value, the low-rate state variable and the high-rate state variable would always be updated in the same way.

[0007] However, in accordance with the techniques of the present disclosure, in two coding scenarios where the previous bins have the same value, even if the bins to be coded are the same, the updates to the state variables may be different because the last M bins are different. For example, the video coder may be configured to determine a first shift value based on the received bin value and determine a second shift value based on the received bin value. The video coder may then update a first state variable, such as a low-rate state variable, based on the first shift value and update a second state variable, such as a high-rate state variable, based on the second shift value. The techniques of this disclosure may enable the video coder to select a better context that allows syntax elements to be signaled with fewer bits, thereby improving video compression.

[0008] According to one example of the present disclosure, a method of decoding video data includes receiving bin values ​​according to a context model, the context model including one or more probability states, the bin values ​​corresponding to one or more syntax elements of the video data; determining a first shift value based on the received bin values; determining a second shift value based on the received bin values; updating a first state variable based on the first shift value; updating a second state variable based on the second shift value; determining a probability state of the context model for a next bin to be decoded based on the first state variable and the second state variable; context decoding the next bin to be decoded based on the probability states; and determining values ​​of the one or more syntax elements based on the received bin values ​​and the context decoded next bin values.

[0009] According to one example of the disclosure, a device for decoding video data includes a memory configured to store the video data and one or more processors implemented in a circuit, wherein the one or more processors are configured to: receive bin values ​​according to a context model, the context model including one or more probability states, the bin values ​​corresponding to one or more syntax elements of the video data; determine a first shift value based on the received bin values; determine a second shift value based on the received bin values; update a first state variable based on the first shift value; update the second state variable based on the second shift value; determine a probability state of the context model for a next bin to be decoded based on the first state variable and the second state variable; context decode the next bin to be decoded based on the probability state; and determine values ​​of the one or more syntax elements based on the received bin value and the context decoded next bin value.

[0010] According to one example of the present disclosure, an apparatus for decoding video data includes means for receiving bin values ​​according to a context model, the context model including one or more probability states, the bin values ​​corresponding to one or more syntax elements of the video data, means for determining a first shift value based on the received bin values, means for determining a second shift value based on the received bin values, means for updating a first state variable based on the first shift value, means for updating a second state variable based on the second shift value, means for determining a probability state of the context model for a next bin to be decoded based on the first state variable and the second state variable, means for context decoding the next bin to be decoded based on the probability states, and means for determining values ​​of one or more syntax elements based on the received bin values ​​and the context decoded next bin values.

[0011] According to one example of the present disclosure, a computer-readable storage medium stores instructions that, when executed by one or more processors, cause the one or more processors to receive bin values ​​according to a context model, the context model including one or more probability states, the bin values ​​corresponding to one or more syntax elements of the video data, determine a first shift value based on the received bin values, determine a second shift value based on the received bin values, update a first state variable based on the first shift value, update a second state variable based on the second shift value, determine a probability state of the context model for a next bin to be decoded based on the first state variable and the second state variable, context decode the next bin to be decoded based on the probability states, and determine values ​​of the one or more syntax elements based on the received bin value and the context decoded next bin value.

[0012] A device for encoding video data includes a memory configured to store the video data and one or more processors implemented in a circuit, wherein the one or more processors are configured to: determine bin values ​​according to a context model, the context model including one or more probability states, the bin values ​​corresponding to one or more syntax elements of the video data; determine a first shift value based on the received bin values, determine a second shift value based on the received bin values, update a first state variable based on the first shift value, update the second state variable based on the second shift value, determine a probability state of the context model based on the first state variable and the second state variable for a next bin to be encoded, and context encode the next bin to be encoded based on the probability state.

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

[0014] [Figure 1] FIG. 1 is a block diagram illustrating an example video encoding and decoding system that may implement the techniques of this disclosure. [Diagram 2] 1 illustrates an example of a bin memory that may be used in accordance with the techniques of this disclosure. [Diagram 3] 1 illustrates an example of a 2D lookup table that may be used in accordance with the techniques of this disclosure. [Figure 4] 1 is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure. [Diagram 5] 1 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure. [Figure 6] 11 is a flowchart illustrating an example process for encoding a current block in accordance with techniques of this disclosure. [Figure 7] 10 is a flowchart illustrating an example process for decoding a current block in accordance with techniques of this disclosure. [Figure 8A] FIG. 1 is a conceptual diagram illustrating the range update process in binary arithmetic coding. [Figure 8B] FIG. 1 is a conceptual diagram illustrating the range update process in binary arithmetic coding. [Figure 9] FIG. 1 is a conceptual diagram showing the output process in binary arithmetic coding. [Figure 10] 1 is a block diagram showing a context-adaptive binary arithmetic coding (CABAC) coder in a video encoder. [Figure 11] FIG. 2 is a block diagram showing a CABAC coder in a video decoder. [Figure 12] 10 is a flowchart illustrating an example process for decoding a current block in accordance with techniques of this disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0015] Video coding (e.g., video encoding and / or video decoding) typically involves predicting blocks of video data from either already coded blocks of video data in the same picture (e.g., intra prediction) or from already coded blocks of video data in a different picture (e.g., inter prediction). In some instances, the video encoder also calculates residual data by comparing the predicted block to the original block. The residual data thus represents the difference between the predicted block and the original block. To reduce the number of bits required to signal the residual data, the video encoder transforms and quantizes the residual data and signals the transformed and quantized residual data in the encoded bitstream. The compression achieved by the transform and quantization process may be lossy, which means that the transform and quantization process may introduce distortion into the decoded video data.

[0016] A video decoder decodes the residual data and adds it to the predictive block to generate a reconstructed video block that more closely matches the original video block than the predictive block alone. Due to losses introduced by transforming and quantizing the residual data, the initial reconstructed block may have distortions or artifacts. One common type of artifact or distortion is called blockiness, where boundaries of blocks used to code the video data are visible.

[0017] To further improve the quality of the decoded video, the video decoder may perform one or more filtering operations on the reconstructed video blocks. Examples of these filtering operations include deblocking filtering, sample adaptive offset (SAO) filtering, and adaptive loop filtering (ALF). Parameters for these filtering operations may either be determined by the video encoder and explicitly signaled in the encoded video bitstream, or may be implicitly determined by the video decoder without the parameters having to be explicitly signaled in the encoded video bitstream.

[0018] To reduce the bits required to code some syntax elements, some syntax elements may be coded using context-adaptive binary arithmetic coding (CABAC). CABAC uses context to determine the probability that the next bit has a certain value. This disclosure describes techniques to improve the accuracy of probability estimation for binary arithmetic coders. The techniques may be used by video encoders and video decoders to calculate and update probability states of a context model associated with CABAC. The techniques of this disclosure may be suitable for binary arithmetic coders whose probability states represent real-world probabilities in the linear domain, such as CABAC as implemented in generic video coding (VVC).

[0019] Typically, the context state is selected as a function of two state variables, a low-rate state variable and a high-rate state variable. The low-rate state variable and the high-rate state variable are updated for the next bin based on the value of the previously coded bin. According to the techniques of this disclosure, the low-rate state variable and the high-rate state variable may further be updated based on a particular combination of values ​​of the last M bins. In existing techniques, if the previous bin had a certain value, the low-rate state variable and the high-rate state variable would always be updated in the same way. However, according to the techniques of the present invention, in two coding scenarios where the previous bin has the same value, even if the bin to be coded is the same, the updates to the state variables may be different because the last M bins are different. For example, the video coder may be configured to determine a first shift value based on the received bin value and determine a second shift value based on the received bin value. The video coder may then update a first state variable, such as a low-rate state variable, based on the first shift value and update a second state variable, such as a high-rate state variable, based on the second shift value. The techniques of this disclosure can enable a video coder to select better contexts that allow syntax elements to be signaled with fewer bits, thereby improving video compression.

[0020] The term video coding as used in this disclosure generally refers to either video encoding or video decoding. Similarly, the term video coder may generally refer to a video encoder or a video decoder. Furthermore, some techniques described in this disclosure with respect to video decoding may also be applied to video encoding, and vice versa. For example, often a video encoder and a video decoder are configured to perform the same or opposing processes. Also, a video encoder typically performs video decoding (also called reconstruction) as part of the process of determining how video data should be encoded. For example, a video decoder may be configured to determine the CABAC context in the same manner as a video encoder, such that both the video encoder and the video decoder can use the same context without the need to explicitly signal the context.

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

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

[0023] In the example of FIG. 1, source device 102 includes video source 104, memory 106, video encoder 200, and output interface 108. Destination device 116 includes input interface 122, video decoder 300, memory 120, and display device 118. According to this disclosure, video encoder 200 of source device 102 and video decoder 300 of destination device 116 may be configured to apply the disclosed techniques for probability estimation. Thus, source device 102 represents an example of a video encoding device, while destination device 116 represents an example of a video decoding device. In other examples, source device and destination device may include other components or configurations. 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.

[0024] The system 100 as shown in FIG. 1 is only an example. In general, any digital video encoding and / or decoding device may perform the probability estimation technique. The source device 102 and the destination device 116 are only examples of coding devices, such that the source device 102 generates coded video data for transmission to the destination device 116. This disclosure refers to devices that perform coding (encoding and / or decoding) of data as "coding" devices. Thus, the video encoder 200 and the video decoder 300 represent examples of coding devices, specifically, video encoders and video decoders, respectively. In some examples, the source device 102 and the destination device 116 may operate in a substantially symmetrical manner, such that each of the source device 102 and the destination device 116 includes video encoding and decoding components. Thus, the system 100 may support one-way or two-way video transmission between the source device 102 and the destination device 116, for example, video streaming, video playback, video broadcasting, or video telephony.

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

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

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

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

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

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

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

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

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

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

[0035] Although not shown in FIG. 1, in some examples, the video encoder 200 and the video decoder 300 may each be integrated with an audio encoder and / or audio decoder and may include appropriate MUX-DEMUX units or other hardware and / or software to handle multiplexed streams containing both audio and video in a common data stream.

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

[0037] The video encoder 200 and the video decoder 300 may operate according to a video coding standard such as ITU-T H.265, also referred to as High Efficiency Video Coding (HEVC), or an extension standard thereof, such as multiview and / or scalable video coding extensions. Alternatively, the video encoder 200 and the video decoder 300 may operate according to other proprietary or industry standards, such as ITU-T H.266, also referred to as Generic Video Coding (VVC). In other examples, the video encoder 200 and the video decoder 300 may operate according to a proprietary video codec / format, such as AOMedia Video1 (AV1), an extension of AV1, and / or a successor version of AV1 (e.g., AV2). In other examples, the video encoder 200 and the video decoder 300 may operate according to other proprietary formats or industry standards. However, the techniques of this disclosure are not limited to any particular coding standard or format. In general, video encoder 200 and video decoder 300 may be configured to perform the techniques of this disclosure with any video coding technique that uses probability estimation as part of the CABAC process.

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

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

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

[0041] As another example, the video encoder 200 and the video decoder 300 may be configured to operate according to VVC. According to VVC, a video coder (such as the video encoder 200) divides a picture into multiple coding tree units (CTUs). The video encoder 200 may divide the CTUs according to a tree structure, such as a quadtree-binary tree (QTBT) structure or a Multi-Type Tree (MTT) structure. The QTBT structure eliminates the concept of multiple partition types, such as the separation between CUs, PUs, and TUs in HEVC. The QTBT structure includes two levels, a first level divided according to a quadtree division, and a second level divided according to a binary tree division. The root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary tree correspond to coding units (CUs).

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

[0043] When operating according to the AV1 codec, the video encoder 200 and the video decoder 300 may be configured to code the video data in blocks. In AV1, the largest coding block that may be processed is called a superblock. In AV1, a superblock may be either 128×128 luma samples or 64×64 luma samples. However, in successor video coding formats (e.g., AV2), a superblock may be defined by a different (e.g., larger) luma sample size. In some examples, a superblock is the top level of a block quadtree. The video encoder 200 may further divide the superblock into smaller coding blocks. The video encoder 200 may divide the superblock and other coding blocks into smaller blocks using square or non-square partitioning. The non-square blocks may include N / 2×N, N×N / 2, N / 4×N, and N×N / 4 blocks. The video encoder 200 and the video decoder 300 may perform separate prediction and transformation processes for each of the coding blocks.

[0044] AV1 also defines tiles of video data. A tile is a rectangular array of superblocks that may be coded independently of other tiles. That is, video encoder 200 and video decoder 300 may encode and decode coding blocks within a tile, respectively, without using video data from other tiles. However, video encoder 200 and video decoder 300 may perform filtering across tile boundaries. Tiles may be uniform or non-uniform in size. Tile-based coding may enable parallel processing and / or multi-threading for encoder and decoder implementations.

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

[0046] Video encoder 200 and video decoder 300 may be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, superblock partitioning, or other partitioning structures.

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

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

[0049] In some examples, a tile may be divided into multiple bricks, each of which may include one or more CTU rows within the tile. A tile that is not divided into multiple bricks may also be referred to as a brick. However, a brick that is a true subset of a tile may not be referred to as a tile. Bricks in a picture may also be arranged as slices. A slice may be an integer number of bricks of a picture that may be contained exclusively within a single network abstraction layer (NAL) unit. In some examples, a slice includes either several complete tiles or only a continuous sequence of complete bricks of one tile.

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

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

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

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

[0054] To perform intra prediction, the video encoder 200 may select an intra prediction mode to generate a prediction block. Some examples of VVC provide 67 intra prediction modes, including various orientation modes, as well as a planar mode and a DC mode. In general, the video encoder 200 selects an intra prediction mode that describes neighboring samples for a current block (e.g., a block of a CU) and predicts samples of the current block therefrom. Assuming that the video encoder 200 codes the CTUs and CUs in raster scan order (left to right, top to bottom), such samples may generally be above, above and to the left, or to the left of the current block in the same picture as the current block.

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

[0056] AV1 includes two general techniques for encoding and decoding coding blocks of video data. The two general techniques are intra prediction (e.g., intra-frame prediction or spatial prediction) and inter prediction (e.g., inter-frame prediction or temporal prediction). In the context of AV1, when predicting a block of a current frame of video data using an intra prediction mode, the video encoder 200 and the video decoder 300 do not use video data from other frames of the video data. In most intra prediction modes, the video encoder 200 encodes the block of the current frame based on the difference between sample values ​​in the current block and predicted values ​​generated from reference samples in the same frame. The video encoder 200 determines the predicted values ​​generated from the reference samples based on the intra prediction mode.

[0057] Following prediction, such as intra- or inter-prediction, of a block, the video encoder 200 may compute residual data for the block. The residual data, such as a residual block, represents sample-by-sample differences between a block and a prediction block for that block formed using a corresponding prediction mode. The video encoder 200 may apply one or more transforms to the residual block to generate transform data in a transform domain rather than the sample domain. For example, the video encoder 200 may apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. In addition, the video encoder 200 may apply a secondary transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, or a Karhunen-Loeve transform (KLT), following the initial transform. The video encoder 200 generates transform coefficients following application of the one or more transforms.

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

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

[0060] To perform CABAC, the video encoder 200 may assign a context in a context model to a symbol to be transmitted. The context may relate, for example, to whether neighboring values ​​of the symbol are zeroed or not. The probability determination may be based on the context assigned to the symbol.

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

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

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

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

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

[0066] CABAC, as implemented in VVC, employs two probability states for each context model. The probability used for CABAC bin encoding and decoding is calculated as the average of the two probability states, as shown below. state i =(state i [0]+state i [1])>>N (1) Here, state i means the probability state of the i-th context model. N is the state i An integer that controls the precision with which the average is generated.

[0067] The video encoder 200 and the video decoder 300 may be configured to update the two probability states at a low rate and a high rate, respectively, after a bin is encoded or decoded. In the following example, i [0] is updated at a slower rate, and state i[1] is adapted at the higher rate. That is, in one example, the state value for the slower rate state variable takes into account more previous bins than the state value for the higher rate state variable, and therefore typically changes less as a result of one additional bin. In contrast, the state value for the higher rate state variable takes into account fewer previous bins than the state value for the lower rate state variable, and therefore typically changes more as a result of one additional bin. In another example, both rates are adapted based on the same amount of previous bins.

[0068] The video encoder 200 and the video decoder 300 may be configured to update the probabilities as shown below. If the bin just coded is equal to 1, state i [0]=state i [0]+(((2 10 -1)-state i [0])>>shiftL i )(2) state i [1]=state i [1]+(((2 14 -1)-state i [1])>>shiftH i )(3) Otherwise, if the bin just coded is equal to 0, state i [0]=state i [0]-(state i [0]>>shiftL i )(4) state i [1]=state i [1]-(state i [1]>>shiftH i )(5) shiftL i and shiftH i Note that shiftH is used to control the adaptation rate of the i-th context model. iis shiftL i The above is the case, which means faster adaptation. These two parameters should be predefined for each context model and stored in the ROM.

[0069] According to the techniques of the present disclosure, the video encoder 200 and the video decoder 300 can be configured to determine update and probability state calculations by providing more dimensional flexibility. The disclosed techniques include two approaches, which may be used separately or in combination.

[0070] In one example, the video encoder 200 and the video decoder 300 can be configured to determine weighted averages for probability calculations instead of performing uniform averages as in the case of VVC. Such techniques are shown below. state i =(w1 × state i [0]+w2 × state i [1]) >> N (6) Here, w1 and w2 are two weights assigned to two probability states, respectively.

[0071] Also, there are several variations of this approach, which may be used separately or in combination. In one example, the pair (w1, w2) can be predefined for each context model. Further, (w1, w2) may vary when the context model is used for coding different types of slices such as I slices, B slices, or P slices. In another example, the pair (w1, w2) may be derived during the encoding or decoding process according to a specific optimization criterion such as the minimum mean square error. In another example, the pair (w1, w2) is normalized, which means that w1 + w2 is equal to 1.0, or it may not be normalized but restricted such that c0 < w1 + w2 < c1. In another example, generally, the pair (w1, w2) is represented by real (floating-point) values, but in an actual implementation, it is converted to an integer by scaling. Therefore, in probability calculations, an appropriate shift can be used for normalization.

[0072] According to another technique of this disclosure, the video encoder 200 and the video decoder 300 may i and shiftH i By adjusting , the slow and fast adaptation rates can be configured to adapt to local activity (e.g., a local sequence of bins as opposed to all bins for a given context). The proposed probability update process is shown below. If the bin just coded is equal to 1, state i [0]=state i [0]+(((2 10 -1)-state i [0])>>(shiftL i +deltaL i )), (7) state i [1]=state i [1]+(((2 14 -1)-state i [1])>>(shiftH i +deltaH i )), (8) Otherwise, if the bin just coded is equal to 0, state i [0]=state i [0]-(state i [0]>>(shiftL i +deltaL i )), (9) state i [1]=state i [1]-(state i [1]>>(shiftH i +deltaH i )), (10)

[0073] In equations (7) to (10), deltaL i and deltaH iis an integer and can be in the ranges -3 to 3, -5 to 5, and -7 to 7, etc. i and deltaH i The value of deltaL may adapt to the local activity determined by the previous M bins of the context model. In some implementations, a typical value of M may not exceed 16. Given a context model, such as the example shown in FIG. 2, before processing the next bin (bin 130), the probability state is updated according to equations (7)-(10) and deltaL i and deltaH i is determined by the preceding M-bin memory.

[0074] 2 of M bin memory M There are 1024 possible combinations. For example, if M is equal to 10, then there are 1024 different M-bin memories, each representing a unique condition (or context) for the next bin 130. M The entry lookup table has the correct deltaL i and deltaH i is developed for each context model to search for deltaL, and thus we look up the table using an integer index whose binary representation is M bin memory. i and deltaH i can be found.

[0075] FIG. 3 illustrates an example of a 2D lookup table 140 that may be used in accordance with the techniques of this disclosure. M Since an entry lookup table is developed for each context model, the lookup table is ultimately 2D and has as two indexes the context model ID and the M-bin memory to search. Thus, the video encoder 200 and the video decoder 300 calculate deltaL based on the context model's identifier and the last M bins. i and deltaH iIn the example of FIG. 3, the identifier of the context model (denoted as ctx) is on the x-axis, and the 2M M-bin memories are shown on the y-axis. deltaL i and deltaH i The value of deltaL is packed into byte (8-bit) entries 142 as shown in FIG. i and deltaH i are 4 bits each.

[0076] 4 is a block diagram illustrating an example video encoder 200 that may perform techniques of this disclosure. FIG. 4 is provided for illustrative purposes and should not be considered as limiting the techniques broadly illustrated and described in this disclosure. For purposes of explanation, this disclosure describes video encoder 200 in accordance with VVC (ITU-T H.266 under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be performed by video encoding devices configured for other video coding standards and video coding formats, such as AV1 and successor video coding formats to AV1.

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

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

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

[0080] The various units in FIG. 4 are shown to aid in understanding the operations performed by the video encoder 200. The units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. A fixed-function circuit refers to a circuit that provides a specific function and is predefined in the operations that may be performed. A programmable circuit refers to a circuit that may be programmed to perform various tasks and provides flexibility in the operations that may be performed. For example, a programmable circuit may execute software or firmware that causes the programmable circuit to operate in a manner defined by the software or firmware instructions. Although a fixed-function circuit may execute software instructions (e.g., receive a parameter or output a parameter), the type of operation that the fixed-function circuit performs is generally unchanged. In some examples, one or more of the units may be different circuit blocks (fixed function or programmable), and in some examples, one or more of the units may be an integrated circuit.

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

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

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

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

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

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

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

[0088] The motion estimation unit 222 and the motion compensation unit 224, when operating according to the AV1 video coding format, may be configured to encode coding blocks of video data (e.g., both luma coding blocks and chroma coding blocks) using translational motion compensation, affine motion compensation, overlapped block motion compensation (OBMC), and / or synthetic inter-intra prediction.

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

[0090] When operating according to the AV1 video coding format, the intra prediction unit 226 may be configured to encode coding blocks of video data (e.g., both luma coding blocks and chroma coding blocks) using directional intra prediction, non-directional intra prediction, recursive filter intra prediction, chroma-from-luma (CFL) prediction, intra block copy (IBC), and / or color palette modes. The mode selection unit 202 may include additional functional units that perform video prediction according to other prediction modes.

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

[0092] In an example where the mode selection unit 202 splits a CU into PUs, each PU may be associated with a luma prediction unit and a corresponding chroma prediction unit. The video encoder 200 and the video decoder 300 may support PUs having various sizes. As mentioned above, the size of a CU may refer to the size of the luma coding block of the CU, and the size of a PU may refer to the size of the luma prediction unit of the PU. Assuming that the size of a particular CU is 2N×2N, the video encoder 200 may support a PU size of 2N×2N or N×N for intra prediction, and a symmetric PU size of 2N×2N, 2N×N, N×2N, N×N, or similar for inter prediction. The video encoder 200 and the video decoder 300 may also support asymmetric splitting for PU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter prediction.

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

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

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

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

[0097] When transform processing unit 206 operates according to AV1, it may apply one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 may apply various transforms to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply a horizontal / vertical transform combination, which may include a discrete cosine transform (DCT), an asymmetric discrete sine transform (ADST), an inverse ADST (e.g., ADST in reverse order), and an identity transform (IDTX). When using an identity transform, the transform is skipped in one of the vertical or horizontal directions. In some examples, the transform process may be skipped.

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

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

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

[0101] When filter unit 216 operates according to AV1, it may perform one or more filter operations on the reconstructed blocks. For example, filter unit 216 may perform a deblocking operation to reduce blockiness artifacts along the edges of a CU. In other examples, filter unit 216 may apply a constrained directional enhancement filter (CDEF), which may be applied after deblocking and may include application of a non-separable, non-linear, low-pass directional filter based on the estimated edge direction. Filter unit 216 may also include a loop restoration filter, which may be applied after CDEF and may include a separable symmetric normalized Wiener filter or a dual autoinduction filter.

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

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

[0104] The video encoder 200 may output a bitstream that includes entropy coding syntax elements needed to reconstruct blocks of a slice or picture. In particular, the entropy coding unit 220 may output the bitstream.

[0105] The entropy encoding unit 220 may be configured as a symbol-to-symbol adaptive multi-symbol arithmetic coder in accordance with AV1. The syntax elements in AV1 include an alphabet of N elements, and the context (e.g., a probability model) includes a set of N probabilities. The entropy encoding unit 220 may store the probabilities as n-bit (e.g., 15-bit) cumulative distribution functions (CDFs). The entropy encoding unit 22 may perform recursive scaling with an update factor based on the alphabet size to update the context.

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

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

[0108] Video encoder 200 represents an example of a device configured to encode video data, including a memory configured to store the video data and one or more processing units implemented in a circuit and configured to calculate the probability that a symbol has a particular value according to any of the techniques described in this disclosure, and to binary arithmetically code the symbol according to the probability that the symbol has a particular value.

[0109] 5 is a block diagram illustrating an example video decoder 300 that may perform techniques of this disclosure. FIG. 5 is provided for purposes of illustration and not to limit the techniques broadly illustrated and described in this disclosure. For purposes of illustration, this disclosure describes a video decoder 300 in accordance with VVC (ITU-T H.266 under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be performed by video coding devices configured to other video coding standards.

[0110] In the example of FIG. 5, the video decoder 300 includes a coded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. Any or all of the CPB memory 320, the entropy decoding unit 302, the prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, the filter unit 312, and the DPB 314 may be implemented in one or more processors or processing circuits. For example, the units of the video decoder 300 may be implemented as one or more circuits or logic elements as part of a hardware circuit, or as part of a processor, ASIC, or FPGA. Moreover, the video decoder 300 may include additional or alternative processors or processing circuits that perform these and other functions.

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

[0112] When operating according to AV1, the motion compensation unit 316 may be configured to decode coding blocks of the video data (e.g., both luma coding blocks and chroma coding blocks) using translational motion compensation, affine motion compensation, OBMC, and / or synthetic inter-intra prediction, as described above. The intra prediction unit 318 may be configured to decode coding blocks of the video data (e.g., both luma coding blocks and chroma coding blocks) using directional intra prediction, non-directional intra prediction, recursive filter intra prediction, CFL, intra block copy (IBC), and / or color palette mode, as described above.

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

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

[0115] The various units shown in FIG. 5 are presented to aid in understanding the operations performed by the video decoder 300. The units may be implemented as fixed function circuits, programmable circuits, or a combination thereof. As with FIG. 4, fixed function circuits refer to circuits that provide a particular function and are predefined in the operations that may be performed. Programmable circuits refer to circuits that may be programmed to perform various tasks and provide flexibility in the operations that may be performed. For example, a programmable circuit may execute software or firmware that causes the programmable circuit to operate in a manner defined by the software or firmware instructions. Although a fixed function circuit may execute software instructions (e.g., receive a parameter or output a parameter), the type of operation that the fixed function circuit performs is generally immutable. In some examples, one or more of the units may be different circuit blocks (fixed function or programmable), and in some examples, one or more of the units may be an integrated circuit.

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

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

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

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

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

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

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

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

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

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

[0126] In this manner, the video decoder 300 represents an example of a video decoding device that includes a memory configured to store video data and one or more processing units implemented in a circuit and configured to calculate the probability that a symbol has a particular value according to any of the techniques described in this disclosure, and to binary arithmetically code the symbol according to the probability that the symbol has a particular value.

[0127] 6 is a flowchart illustrating an example process for encoding a current block according to the techniques of this disclosure. The current block may include a current CU. Although described with respect to video encoder 200 (FIGS. 1 and 4), it should be understood that other devices may be configured to perform a process similar to that of FIG.

[0128] In this example, the video encoder 200 may first predict the current block (350). For example, the video encoder 200 may form a predictive block for the current block. The video encoder 200 may then calculate a residual block for the current block (352). To calculate the residual block, the video encoder 200 may calculate a difference between an original uncoded block and a predictive block for the current block. The video encoder 200 may then transform the residual block and quantize transform coefficients of the residual block (354). The video encoder 200 may then scan the quantized transform coefficients of the residual block (356). During or following the scan, the video encoder 200 may entropy code the transform coefficients (358). For example, the video encoder 200 may code the transform coefficients using CAVLC or CABAC. The video encoder 200 may then output entropy coded data for the block (360).

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

[0130] The video decoder 300 may receive entropy coded data for the current block, such as the entropy coded prediction information and the entropy coded data of the transform coefficients of the residual block corresponding to the current block (370). The video decoder 300 may entropy decode the entropy coded data to determine prediction information for the current block and reconstruct the transform coefficients of the residual block (372). The video decoder 300 may predict the current block, e.g., using an intra prediction mode or an inter prediction mode indicated by the prediction information for the current block, to calculate a prediction block for the current block (374). The video decoder 300 may then inverse scan the reconstructed transform coefficients to create a block of quantized transform coefficients (376). The video decoder 300 may then dequantize the transform coefficients and apply an inverse transform to the transform coefficients to generate a residual block (378). The video decoder 300 may finally decode the current block by combining the prediction block and the residual block (380).

[0131] 8A and 8B show an example of a CABAC process in bin n. In the example 400 in FIG. 8A, in bin n, the range in bin 2 is the lowest probable symbol (LPS) (p σ ) in the range MPS and RangeLPS. Example 400 shows a range update in bin n+1 when the value of bin n is equal to the Most Probable Symbol (MPS). In this example, the low remains the same, but the range value in bin n+1 is lowered to the value of RangeMPS in bin n. Example 402 in FIG. 8B shows a range update in bin n+1 when the value of bin n is not equal to the MPS (i.e., it is equal to the LPS). In this example, the low is moved to the lower range value of RangeLPS in bin n. In addition, the range value in bin n+1 is lowered to the value of RangeLPS in bin n.

[0132] In an example of a HEVC video coding process, the range is represented by 9 bits and the low is represented by 10 bits. There is a renormalization process to keep the range and low values ​​with sufficient accuracy. Renormalization occurs whenever the range is less than 256. Thus, the range is always greater than or equal to 256 after renormalization. Depending on the range and low values, the binary arithmetic coder (BAC) outputs a "0" or a "1" to the bitstream, or updates an internal variable (called BO: outstanding bit) for future output. Figure 9 shows an example of BAC output depending on the range. For example, when the range and low are above a certain threshold (e.g., 512), a "1" is output to the bitstream. When the range and low are below a certain threshold (e.g., 512), a "0" is output to the bitstream. When the range and low are between a certain threshold, nothing is output to the bitstream. Instead, the BO value is incremented and the next bin is coded.

[0133] In the CABAC context model of H.264 / AVC, and in some examples of HEVC, there are 128 states. There are 64 possible LPS probabilities (denoted by state σ) that can range from 0 to 63. Each MPS can be 0 or 1. Thus, the 128 states are 64 state probabilities times two possible values ​​of MPS (0 or 1). Thus, the states can be indexed with 7 bits.

[0134] LPS range σ To reduce the computation of deriving LPS, the results for all cases may be pre-computed as an approximation and stored in a look-up table. Thus, the LPS range can be obtained without any multiplications by using a simple table lookup. Avoiding multiplications may be important for some devices or applications because this operation can cause significant latency in many hardware architectures.

[0135] A pre-computed LPS range table with 4 columns can be used instead of multiplication. The range is divided into 4 segments. The segment index can be derived by the query (range>>6)&3. In practice, the segment index is derived by shifting bits and removing them from the actual range. Table 1 below shows the possible ranges and their corresponding indexes.

[0136] [Table 1]

[0137] And the LPS range table has 64 entries (one for each probability state) x 4 (one for each range index). Each entry is a RangeLPS, i.e., a range multiplied by an LPS probability. An example of a portion of this table is shown below in Table 2. Table 2 shows probability states 9 to 12. In one proposal for HEVC, the probability states could range from 0 to 63.

[0138] [Table 2]

[0139] Within each segment (i.e., range value), each probability state σ The LPS range of is predefined. In other words, the probability state σ The LPS range of is quantized into four values ​​(i.e., one value for each range index). The specific LPS range used at a given point depends on which segment the range belongs to. The number of possible LPS ranges used in the table is a trade-off between the number of table columns (i.e., the number of possible LPS range values) and the LPS range precision. In general, the more columns there are, the smaller the quantization error of the LPS range values, but also the greater the need for more memory to store the table. Fewer columns increases the quantization error, but also reduces the memory required to store the table.

[0140] As explained above, each LPS probability state has a corresponding probability. The probability p of each state is derived as follows: P σ =αp σ-1 Here, state σ ranges from 0 to 63. The constant α represents the amount of probability change between each context state. In one example, α = 0.9493, or more precisely, α = (0.01875 / 0.5) 1 / 63 The probability in state σ=0 is equal to 0.5 (i.e., p0=1 / 2). That is, in context state 0, LPS and MPS are equally likely. The probability in each successive state is derived by multiplying the previous state by α. Thus, the probability that LPS occurs in context state α=1 is equal to p0 * 0.9493(0.5 * 0.9493=0.47465). Thus, as the index of state α increases, the probability of LPS occurring decreases.

[0141] CABAC is adaptive because the probability states are updated to follow the signal statistics (i.e., the values ​​of the previously coded bins). The update process is as follows: for a given probability state, the update depends on the state index and the value of the coded symbol identified as either LPS or MPS. As a result of the update process, a new probability state is derived, which consists of a possibly revised LPS probability estimate and, if necessary, a revised MPS value.

[0142] If the bin value is equal to the MPS, then the given state index may be incremented by one. This is true for all states except when the MPS occurs at state index 62, where the LPS probability is already at its lowest value (or equivalently, the highest MPS probability has been reached). In this case, the state index 62 remains fixed until the LPS is found or the last bin value is coded (for the special case of the last bin value, state 63 is used). When the LPS occurs, the state index is changed by decrementing the state index by an amount, as shown in the following equation. This rule is generally applied for each occurrence of the LPS, with the following exception: In the state with index σ=0, which corresponds to the case of equal probability, assuming that the LPS is coded, the state index remains fixed, but the MPS value is switched such that the values ​​of the LPS and MPS are swapped. In all other cases, the MPS value remains unchanged, no matter which symbol is coded. The derivation of the transition rule for the LPS probability is as follows: for a given LPS probability p old and its updated probability p new It is based on the following relationship between When MPS occurs, P new =max(αp old ,p 62 ) When LPS occurs, P new =(1-α)+αp old

[0143] For a practical implementation of the probability estimation process in CABAC, it is important to note that all transition rules can be realized by at most two tables, each with 63 entries of 6-bit unsigned integer values. In some examples, state transitions may be determined using a single table TransIdxLPS, which determines, for a given state index σ, a new updated state index TransIdxLPS[σ] in cases where LPS is observed. The transitions caused by MPS can be obtained by a simple (saturated) increment of the state index by a fixed value of 1, resulting in an updated state index min(σ+1,62). Table 3 below is an example of a partial TransIdxLPS table.

[0144] [Table 3]

[0145] One problem with previous BAC techniques (e.g., the BAC technique used in H.264 / AVC) is that the tables RangeLPS and TransIdxLPS are tuned for low resolution video (i.e., Common Intermediate Format (CIF) and Quarter CIF (QCIF) video). Today, a large amount of video content is high definition (HD) and, in some cases, greater than HD. Video content that is HD or greater than HD resolution has different statistics than the decade-old QCIF sequences that were used to develop H.264 / AVC.

[0146] Therefore, the tables RangeLPS and TransIdxLPS from H.264 / AVC may cause too fast adaptation between states, i.e., the transitions between probability states, especially when LPS occurs, may be too large for the smoother, higher resolution content of HD video. Therefore, the probability models used according to conventional techniques are not accurate for HD and extra HD content. In addition, because HD video content contains a larger range of pixel values, the H.264 / AVC tables do not contain enough entries to take into account the more extreme values ​​that may be present in HD content.

[0147] Therefore, the RangeLPS and TransIdxLPS tables need to be modified to take into account the characteristics of this new content. This also implies that the BAC should differ in at least two aspects. One difference is that the BAC process should use tables that allow a slower adaptation process. Another difference is that the BAC process should consider more extreme cases (i.e., sloped probabilities).

[0148] The current RangeLPS and TransIdxLPS tables could be modified to achieve these goals simply by including more probability states and ranges. However, this solution would incur a significant increase in the size of the tables. Slower adaptation could be achieved by using a parameter α closer to 1 than the currently used parameter α (e.g., α=0.9493). However, with a larger value of α, the probability would tend to 0 more slowly, and therefore more states would be required. In addition, to achieve slower adaptation, it could be beneficial if the lowest possible probability was much lower than the lowest probability currently used. Thus, many more states might be required to reach that very low probability value.

[0149] In view of the above problems, this disclosure proposes a technique for modifying BAC to achieve slower adaptation and more gradient probabilities while keeping table sizes (e.g., RangeLPS and TransIdxLPS tables) at a realistic level. In other words, this disclosure describes a technique for achieving slower adaptation and more extreme probabilities (i.e., probabilities closer to 0 and 1) while using tables of relatively small size.

[0150] The techniques described in this disclosure can use more probability states, for example, more probability states used in BAC with H.264 / AVC or HEVC. In this case, the TransIdxLPS table may obtain slower adaptation and lower probabilities. In one example, the techniques described in this disclosure can use 128 probability states instead of 64. By doing so, the table TransIdxLPS increases by 64 entries (i.e., 128 entries instead of 64). This increase allows slower adaptation and lower minimum probabilities. As an example, by setting the parameter α=0.9689, the difference between successive probabilities becomes smaller. Furthermore, the lowest minimum probability drops to 0.009, which is about half of the H.264 / AVC case (i.e., 0.01875). Other numbers of states and values ​​of α are possible, but in general the number of states may be increased and the value of α may be closer to 1 than in the H.264 / AVC case of α=0.9493.

[0151] Another parameter that may be modified to improve HD or extra HD coding is the parameter p0. The value of p0 generally indicates the maximum probability for LPS. The reason for considering this possibility is that having a lower p0 means that the minimum probability is also reduced. The value of p0 is set to 0.5 in the conventional BAC process. This disclosure proposes to allow other values ​​for p0. Having other values ​​of p0 lower than 0.5 allows for a smoother transition in state 0 when an MPS / LPS swap occurs. In one example, p0 may be equal to 0.493, but many other examples can be used.

[0152] Typically, each probability state has its own entry in the RangeLPS table. The table size is #Probability state x #Quantized range index The RangeLPS table size may be expressed as: , which is 64×4=256 bytes in some proposals for HEVC. Since the number of states increases in the example of the present disclosure (doubles in the above example), the RangeLPS table size may be 128×4=512 bytes. However, to avoid this increase in the RangeLPS table size, the present disclosure further proposes to map the probability state indexes to a lower size (i.e., fewer indices) to index the RangeLPS size. In other words, the present disclosure proposes to decouple the state transition process from the range calculation process. This means that in the present example, there is a map for the calculation from states to ranges. The video encoder 200 and / or the video decoder 300 may be configured to map an index indicating the determined probability state to one of a plurality of grouping indexes (e.g., grouping indexes for the RangeLPS table), where at least one of the grouping indexes represents at least two of a plurality of probability states. Thus, the RangeLPS table (or other BAC table) may use a smaller number of indices in which the probability states exist.

[0153] In one example of the present disclosure, the number of probability states may be divided by two to generate a new index for use as an entry for the RangeLPS table. In this case, 128 probability states are reduced to 64 entries. Thus, the RangeLPS table may retain the current size used in H.264 / AVC. Thus, rather than using the probability state σ to index an entry in the RangeLPS table, the techniques described in this disclosure utilize (σ>>1), i.e., the state σ is divided by two and rounded to a lower integer for use as a grouping index into the RangeLPS table. The division may be by a larger number if the RangeLPS table is desired to be smaller for a given implementation or if the number of states is larger (e.g., of 256 probability states). In this context, each grouping index represents two probability states. In other examples of the present disclosure, the grouping index may represent more than two probability states.

[0154] From the viewpoint of optimal entropy, grouping of states for the RangeLPS table by using division or right bit shifting operations may be beneficial but may not always be the optimal technique. The optimal grouping may depend on several factors, including in particular the number of states and the parameter α. The most desirable (and possibly optimal) grouping may not be a simple operation such as a bit shifting operation. In general, the grouping may be described using a table starting from the total number of probability states to a reduced number of probability states (i.e., grouping states). In another example, the present disclosure proposes to use this kind of table. This approach will increase performance (compared to division or right shifting) at the expense of additional memory. Thus, this example is a trade-off between memory and performance, favoring better performance over the linear mapping example (i.e., division or right shifting).

[0155] Thus, although a linear mapping of probability states to entries in the RangeLPS table may be used, it may be desirable to provide a non-linear mapping. For example, the probability states may be mapped according to a logarithmic mapping. The logarithmic mapping may be achieved, in some examples, using piecewise linear mapping techniques. In general, such mappings may be defined using a table, such as a pre-computed mapping table.

[0156] In general, the techniques described in this disclosure may be performed in some examples by a process or device for entropy coding video data, which may include determining a probability state of a symbol in a binary arithmetic coding process, where the probability state may be one of a plurality of probability states, and mapping an index indicating the determined probability state to one of a plurality of grouping indexes, where at least one of the grouping indexes represents at least two of the plurality of probability states, each of the grouping indexes pointing to a range of the lowest probability symbols in a table.

[0157] In some examples, the number of probability states may be greater than 64. For example, the number of probability states may be 128. In some examples, the number of grouping indexes used as inputs to the RangeLPS table is 64. Specifically, the number of probability states may be 128, and the number of grouping indexes used as inputs to the RangeLPS table may be 64. The symbol may be coded based on the grouping index, for example, according to a table based on the probability state index, or according to a mathematical operation based on the index. The determined probability state maps to one of the multiple indexes according to a table or according to a mathematical operation. The mapping may be linear or nonlinear. For example, the mapping may be performed according to a divide by 2 operation. In some examples, the mapping may be a logarithmic mapping. In some examples, a piecewise linear mapping may be used to define the logarithmic mapping. In some examples, the maximum probability value p0 for the LPS may be less than 0.5.

[0158] The techniques described in this disclosure may be performed, for example, within a video encoder, a video decoder, or a combined video encoder / decoder (codec). Specifically, such techniques may be performed in an entropy encoding unit of a video encoder and / or an entropy decoding unit of a video decoder. The techniques may be performed, for example, within a CABAC process that may be configured to support video coding, such as video coding according to aspects of the HEVC standard. The entropy encoding and decoding unit may apply a coding process in a reciprocal or inverse manner to encode or decode any of a variety of video data, such as, for example, quantized transform coefficients associated with residual video data, motion vector information, syntax elements, and other types of information that may be useful in a video encoding and / or video decoding process.

[0159] FIG. 10 is a block diagram of an example implementation of the entropy encoding unit 220 of FIG. 4. The entropy encoding unit 220 may be configured to perform CABAC according to the techniques of this disclosure. A syntax element 418 is input to the entropy encoding unit 220. If the syntax element is already a binary-valued syntax element (i.e., a syntax element having only values ​​of 0 and 1), the binarization step may be skipped. If the syntax element is a non-binary-valued syntax element (e.g., a syntax element represented by multiple bits, such as a transform coefficient level), the non-binary-valued syntax element is binarized by the binarizer 420. The binarizer 420 performs a mapping of the non-binary-valued syntax element to a sequence of binary decisions. These binary decisions are often called "bins." For example, for a transform coefficient level, the value of the level can be decomposed into successive bins, each bin indicating whether the absolute value of the coefficient level is greater than some value or not. For example, bin 0 (sometimes referred to as a significance flag) indicates whether the absolute value of the transform coefficient level is greater than 0. Bin 1 indicates whether the absolute value of the transform coefficient level is greater than 1, and so on. A unique mapping may be developed for each non-binary valued syntax element.

[0160] Each bin generated by the binarizer 420 is fed to the binary arithmetic coding side of the entropy coding unit 56. That is, for a given set of non-binary valued syntax elements, each bin type (e.g., bin 0) is coded before the next bin type (e.g., bin 1). The coding can be performed in either normal mode or bypass mode. In bypass mode, the bypass coding engine 426 performs arithmetic coding using a fixed probability model, for example, using Golomb-Rice coding or Exponential-Golomb coding. The bypass mode is generally used for more predictable syntax elements.

[0161] Coding in normal mode involves performing CABAC for coding bin values ​​where the probability of the bin's value is predictable given the previously coded bin's value. The probability that a bin is an LPS is determined by the context modeler 422, which outputs the bin value and a context model (e.g., probability state σ). The context model may be an initial context model for the set of bins or may be determined based on the coded values ​​of previously coded bins. As explained above, the context modeler can update the state based on whether the previously coded bin was an MPS or an LPS.

[0162] After the context model and probability state σ are determined by the context modeler 422, the ordinary coding engine 424 performs BAC on the bin values. In accordance with the techniques of this disclosure, the ordinary coding engine 424 performs BAC using a TransIdxLPS table 430 that includes more than 64 probability states σ. In one example, the number of probability states is 428. TransIdxLPS is used to determine which probability state is used for the next bin (bin n+1) when the previous bin (bin n) is the LPS. The ordinary coding engine 424 may also use the RangeLPS table 428 to determine a range value for the LPS given a particular probability state σ. However, in accordance with the techniques of this disclosure, rather than using all possible probability states σ in the TransIdxLPS table 430, the probability state index σ is mapped to a grouping index for use in the RangeLPS table. That is, each index into the RangeLPS table 428 may represent two or more of the total number of probability states. The mapping of the probability state index σ to the grouping index may be linear (eg, by dividing by 2) or non-linear (eg, a logarithmic function or a mapping table).

[0163] In another example of the present disclosure, the difference between successive probability states can be made smaller by setting the parameter α to be greater than 0.9493. In one example, α=0.9689. In another example of the present disclosure, the highest probability of LPS occurring (p0) can be set to be less than 0.5. In one example, p0 can be equal to 0.493.

[0164] In accordance with one or more techniques of this disclosure, as opposed to using the same values ​​of variables (e.g., one or more of the window size, the scaling factor (α), and the probability update rate) used to update the probability states in the binary arithmetic coding process, entropy encoding unit 56 may use different values ​​of the variables for different context models and / or different syntax elements. For example, entropy encoding unit 56 may determine, for one context model of a plurality of context models, values ​​of the variables used to update the probability states in the binary arithmetic coding process and update the probability states based on the determined values.

[0165] 11 is a block diagram of an example entropy decoding unit 302 that may be configured to perform CABAC in accordance with the techniques of this disclosure. The entropy decoding unit 302 of FIG. 11 performs CABAC in an inverse manner to that of the entropy encoding unit 220 described in FIG. 4. Coded bits from a bitstream 518 are input to the entropy decoding unit 302. The coded bits are provided to either a context modeler 520 or a bypass decoding engine 522 based on whether the coded bits were entropy coded using a bypass mode or a normal mode. If the coded bits were coded in a bypass mode, the bypass decoding engine 522 may use, for example, Golomb-Rice decoding or exponential-Golomb decoding to extract the bins of binary-valued syntax elements or non-binary syntax elements.

[0166] If the coded bits are coded in normal mode, the context modeler 520 may determine a probability model for the coded bits, and the normal decoding engine 524 may decode the coded bits to generate bins of the non-binary valued syntax elements (or the syntax elements themselves if they are binary valued). After the context model and the probability states σ are determined by the context modeler 520, the normal decoding engine 524 performs BAC on the bin values. In accordance with the techniques of this disclosure, the normal decoding engine 524 performs BAC using a TransIdxLPS table 528 that includes more than 64 probability states σ. In one example, the number of probability states is 128, but other numbers of probability states consistent with the techniques of this disclosure may be defined. The TransIdxLPS table 528 is used to determine which probability state is used for the next bin (bin n+1) when the previous bin (bin n) is an LPS. The normal decoding engine 524 may also use the RangeLPS table 526 to determine a range value for the LPS given a particular probability state σ. However, in accordance with the techniques of this disclosure, rather than using all possible probability states σ in the TransIdxLPS table 528, the probability state index σ is mapped to a grouping index for use in the RangeLPS table 526. That is, each index into the RangeLPS table 526 may represent two or more of the total number of probability states. The mapping of the probability state index σ to the grouping index may be linear (e.g., by dividing by two) or non-linear (e.g., a logarithmic function or a mapping table).

[0167] In another example of the present disclosure, the difference between successive probability states can be made smaller by setting the parameter α to be greater than 0.9493. In one example, α=0.9689. In another example of the present disclosure, the highest probability of LPS occurring (p0) can be set to be less than 0.5. In one example, p0 can be equal to 0.493.

[0168] After the bins are decoded by the normal decoding engine 524, an inverse binarizer 530 may perform a reverse mapping to convert the bins back to non-binary valued syntax element values.

[0169] 12 is a flow chart illustrating an exemplary process for decoding a bitstream of video data. Although described with respect to video decoder 300 (FIGS. 1 and 5), it should be understood that other devices may be configured to perform a process similar to that of FIG.

[0170] The video decoder 300 may be configured to receive bin values ​​according to a context model (600). The context model includes one or more probability states, and the bin values ​​correspond to one or more syntax elements of the video data.

[0171] The video decoder 300 determines a first shift value based on the received bin values ​​(602). The video decoder 300 determines a second shift value based on the received bin values ​​(604). To determine the first shift value based on the received bin values, the video decoder 300 may be configured to identify an entry in a lookup table based on an identifier of the context model and the last M received bin values, where M is an integer value greater than 1, and the video decoder 300 may determine the first shift value based on the entry. The video decoder 300 may also determine the second shift value based on the entry. The entry may be, for example, an 8-bit value, where the first 4 bits of the 8-bit value identify the first shift value and the last 4 bits of the 8-bit value identify the second shift value. The first shift value may be updated at a higher rate than the second shift value. That is, the first shift value may update faster than the second shift value.

[0172] The video decoder 300 updates the first state variable based on the first shift value (606). The video decoder 300 updates the second state variable based on the second shift value (608). To determine the probability state of the context model based on the first state variable and the second state variable, the video decoder 300 may be configured to determine the probability state based on a weighted average of the first state variable and the second state variable. The video decoder 300 may determine weights for calculating the weighted average of the first state variable and the second state variable based on the context model. As described above, the weights may include a first weight and a second weight, and the sum of the first weight and the second weight is equal to 1. The video decoder 300 may be configured to determine the value of the weight based on an identifier of the context model.

[0173] The video decoder 300 determines a probability state of the context model for the next bin to be decoded based on the first state variable and the second state variable (610). The video decoder 300 context decodes the next bin to be decoded based on the probability state (612).

[0174] The video decoder 300 determines values ​​of one or more syntax elements based on the received bin value and the context decoded next bin value (614). The video decoder 300 may use the syntax elements to decode a block of video data, which may be output as part of a decoded picture. The techniques of this disclosure are not limited to any particular type of syntax element, but may be particularly beneficial for frequently occurring syntax elements, such as syntax elements used to code transform coefficients.

[0175] The following numbered clauses illustrate one or more aspects of the devices and techniques described in this disclosure.

[0176] Clause 1A: A method of coding data, the method comprising: calculating a probability that a symbol has a particular value according to any technique described in this disclosure; and binary arithmetically coding the symbol according to the probability that the symbol has the particular value.

[0177] Clause 2A: The method of clause 1A, wherein the coding includes decoding.

[0178] Clause 3A: The method of clause 1A, wherein the coding includes encoding.

[0179] Clause 4A: A device for coding video data, the device comprising one or more means for performing the methods of any of clauses 1A to 3A.

[0180] Clause 5A: The device of clause 4A, wherein the one or more means comprise one or more processors implemented in circuitry.

[0181] Clause 6A: The device of any of clauses 4A and 5A, further comprising a memory for storing video data.

[0182] Clause 7A: The device of any of clauses 4A to 6A, further comprising a display configured to display the decoded video data.

[0183] Clause 8A: The device of any of clauses 4A to 7A, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0184] Clause 9A: The device of any of clauses 4A to 8A, wherein the device comprises a video decoder.

[0185] Clause 10A: The device of any of clauses 4A to 9A, wherein the device comprises a video encoder.

[0186] Clause 11A: A computer-readable storage medium having stored thereon instructions that, when executed, cause one or more processors to perform the method of any of clauses 1A to 3A.

[0187] Clause 12A: A device for encoding video data, the device comprising: means for calculating a probability that a symbol has a particular value according to any technique described in this disclosure; and means for binary arithmetic coding the symbol according to the probability that the symbol has the particular value.

[0188] Clause 1B: A method for decoding video data, the method comprising: receiving bin values ​​according to a context model, the context model including one or more probability states, the bin values ​​corresponding to one or more syntax elements of the video data; determining a first shift value based on the received bin values; determining a second shift value based on the received bin values; updating a first state variable based on the first shift value; updating a second state variable based on the second shift value; determining a probability state of the context model for a next bin to be decoded based on the first state variable and the second state variable; context decoding the next bin to be decoded based on the probability states; and determining values ​​of one or more syntax elements based on the received bin values ​​and the context decoded next bin values.

[0189] Clause 2B: The method of clause 1B, wherein determining a probability state of the context model based on the first state variable and the second state variable includes determining the probability state based on a weighted average of the first state variable and the second state variable.

[0190] Clause 3B: The method of clause 2B, further comprising determining weights for calculating a weighted average of the first state variable and the second state variable based on the context model.

[0191] Clause 4B: The method of clause 3B, wherein the weights include a first weight and a second weight, and a sum of the first weight and the second weight is equal to one.

[0192] Clause 5B: The method of clause 3B or 4B, further comprising determining a value of the weight based on the identifier of the context model.

[0193] Clause 6B: The method of any of clauses 1B to 5B, wherein determining the first shift value based on the received bin value includes identifying an entry in a lookup table based on an identifier of the context model and the last M received bin values, where M is an integer value greater than 1, and determining the first shift value based on the entry.

[0194] Clause 7B: The method of clause 6B, further comprising determining a second shift value based on the entry.

[0195] Clause 8B: The method of clause 7B, wherein the entry includes an 8B-bit value, a first 4 bits of the 8B-bit value identifying a first shift value, and a last 4 bits of the 8B-bit value identifying a second shift value.

[0196] Clause 9B: The method of any of clauses 1B-8B, wherein the first shift value is updated at a higher rate than the second shift value.

[0197] Clause 10B: The method of any of clauses 1B-9B, wherein the received bin values ​​correspond to the last M bins decoded by the context model, where M is an integer value greater than zero.

[0198] Clause 11B: The method of clause 10B, wherein M is equal to 1.

[0199] Clause 12B: A device for decoding video data, the device comprising: a memory configured to store the video data; and one or more processors implemented in a circuit, the one or more processors configured to: receive bin values ​​according to a context model, the context model including one or more probability states, the bin values ​​corresponding to one or more syntax elements of the video data; determine a first shift value based on the received bin values; determine a second shift value based on the received bin values; update a first state variable based on the first shift value; update a second state variable based on the second shift value; determine a probability state of the context model for a next bin to be decoded based on the first state variable and the second state variable; context decode the next bin to be decoded based on the probability state; and determine values ​​of the one or more syntax elements based on the received bin value and the context decoded next bin value.

[0200] Clause 13B: The device of clause 12B, wherein to determine a probability state of the context model based on the first state variable and the second state variable, the one or more processors are further configured to determine the probability state based on a weighted average of the first state variable and the second state variable.

[0201] Clause 14B: The device of clause 13B, wherein the one or more processors are further configured to determine weights for calculating a weighted average of the first state variable and the second state variable based on the context model.

[0202] Clause 15B: The device of clause 14B, wherein the weights include a first weight and a second weight, a sum of the first weight and the second weight being equal to one.

[0203] Clause 16B: The device of clause 14B or 15B, wherein the one or more processors are further configured to determine a value of the weight based on the identifier of the context model.

[0204] Clause 17B: The device of any of clauses 12B to 16B, wherein, to determine the first shift value based on the received bin value, the one or more processors are further configured to identify an entry in a lookup table based on an identifier of the context model and the last M received bin values, where M is an integer value greater than 1, and determine the first shift value based on the entry.

[0205] Clause 18B: The device of clause 17B, wherein the one or more processors are further configured to determine a second shift value based on the entry.

[0206] Clause 19B: The device of clause 18B, wherein the entry includes an 8B-bit value, a first 4 bits of the 8B-bit value identifying a first shift value, and a last 4 bits of the 8B-bit value identifying a second shift value.

[0207] Clause 20B: The device of any of clauses 12B to 19B, wherein the first shift value is updated at a higher rate than the second shift value.

[0208] Clause 21B: The device of any of clauses 12B to 20B, wherein the received bin values ​​correspond to the last M bins decoded by the context model, where M is an integer value greater than 0.

[0209] Clause 22B: The device of clause 21B, wherein M is equal to 1.

[0210] Clause 23B: The device of any of clauses 12B to 22B, comprising a wireless communication device, the device further comprising a receiver configured to receive encoded video data.

[0211] Clause 24B: The device of clause 23B, wherein the wireless communications device comprises a telephone handset and the receiver is configured to demodulate a signal comprising the encoded video data in accordance with a wireless communications standard.

[0212] Clause 25B: The device of any of clauses 12B to 24B, further comprising a display configured to display the decoded video data.

[0213] Clause 26B: The device of any of clauses 12B to 25B, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0214] Clause 27B: An apparatus for decoding video data, the apparatus comprising: means for receiving bin values ​​according to a context model, the context model including one or more probability states, the bin values ​​corresponding to one or more syntax elements of the video data; means for determining a first shift value based on the received bin values; means for determining a second shift value based on the received bin values; means for updating a first state variable based on the first shift value; means for updating a second state variable based on the second shift value; means for determining a probability state of the context model for a next bin to be decoded based on the first state variable and the second state variable; means for context decoding the next bin to be decoded based on the probability states; and means for determining values ​​of one or more syntax elements based on the received bin values ​​and the context decoded next bin values.

[0215] Clause 28B: The apparatus of clause 27B, wherein determining a probability state of the context model based on the first state variable and the second state variable includes determining the probability state based on a weighted average of the first state variable and the second state variable.

[0216] Clause 29B: The apparatus of clause 28B, further comprising: means for determining weights for calculating a weighted average of the first state variable and the second state variable based on the context model.

[0217] Clause 30B: The apparatus of clause 29B, wherein the weights include a first weight and a second weight, a sum of the first weight and the second weight being equal to one.

[0218] It should be appreciated that in some examples, some acts or events of any of the techniques described herein may be performed in a different order, or may be added, combined, or omitted entirely (e.g., not all acts or events described are required to practice the techniques). Moreover, in some examples, acts or events may be performed in parallel rather than sequentially, for example, through multithreading, interrupt processing, or multiple processors.

[0219] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted via a computer-readable medium as one or more instructions or code and executed by a hardware-based processing unit. A computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium, such as a data storage medium, or a communication medium including any medium that facilitates transfer of a computer program from one place to another, for example according to a communication protocol. As such, a computer-readable medium may generally correspond to (1) a tangible computer-readable storage medium that is non-transitory, 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 for implementing the techniques described in this disclosure. A computer program product may include a computer-readable medium.

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

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

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

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

Claims

1. 1. A method for decoding video data, the method comprising: receiving bin values ​​according to a context model, the context model including one or more probability states, the bin values ​​corresponding to one or more syntax elements of the video data; determining a first shift value based on the received bin values; determining a second shift value based on the received bin values; updating a first state variable based on the first shift value; updating a second state variable based on the second shift value; determining a probability state of the context model based on the first state variable and the second state variable for a next bin to be decoded; context decoding the next bin to be decoded based on the probability state; determining values ​​of the one or more syntax elements based on the received bin value and the context decoded next bin value; Determining the first shift value based on the received bin values ​​includes: identifying an entry in a lookup table based on the context model identifier and the last M bin values ​​received, where M is an integer value greater than 1; determining the first shift value based on the entry; method.

2. 2. The method of claim 1 , wherein determining the probability state of the context model based on the first state variable and the second state variable comprises determining the probability state based on a weighted average of the first state variable and the second state variable.

3. The method of claim 2 , further comprising determining weights for calculating the weighted average of the first state variable and the second state variable based on the context model.

4. The method of claim 3 , wherein the weights include a first weight and a second weight, the sum of the first weight and the second weight being equal to one.

5. The method of claim 3 , further comprising determining the value of the weight based on an identifier of the context model.

6. The method of claim 1, further comprising determining the second shift value based on the entry.

7. 7. The method of claim 6, wherein the entry comprises an 8-bit value, the first 4 bits of the 8-bit value identifying the first shift value and the last 4 bits of the 8-bit value identifying the second shift value.

8. The method of claim 1 , wherein the first shift value is updated at a higher rate than the second shift value.

9. A non-transitory computer-readable medium storing instructions that, when executed using one or more processors, perform the method of any one of claims 1 to 8.

10. 1. A device for decoding video data, said device comprising: a memory configured to store video data; and one or more processors implemented in a circuit, the one or more processors comprising: receiving bin values ​​according to a context model, the context model including one or more probability states, the bin values ​​corresponding to one or more syntax elements of the video data; determining a first shift value based on the received bin values; determining a second shift value based on the received bin values; updating a first state variable based on the first shift value; updating a second state variable based on the second shift value; determining a probability state of the context model based on the first state variable and the second state variable for a next bin to be decoded; context decoding the next bin to be decoded based on the probability state; determining values ​​of the one or more syntax elements based on the received bin value and the context decoded next bin value; Determining the first shift value based on the received bin values ​​includes: identifying an entry in a lookup table based on the context model identifier and the last M bin values ​​received, where M is an integer value greater than 1; determining the first shift value based on the entry; device.

11. 11. The device of claim 10, wherein to determine the probability state of the context model based on the first state variable and the second state variable, the one or more processors are further configured to determine the probability state based on a weighted average of the first state variable and the second state variable.

12. the one or more processors: determining weights for calculating the weighted average of the first state variable and the second state variable based on the context model; Optionally, the weights include a first weight and a second weight, and the sum of the first weight and the second weight is equal to 1; or the one or more processors: and determining the value of the weight based on an identifier of the context model. The device of claim 11.

13. the one or more processors: determining the second shift value based on the entry; Optionally, the entry includes an 8-bit value, the first 4 bits of the 8-bit value identifying the first shift value, and the last 4 bits of the 8-bit value identifying the second shift value; The device of claim 10.

14. a wireless communication device, the device further comprising a receiver configured to receive encoded video data; Optionally, the wireless communication device comprises a telephone handset, and the receiver is configured to demodulate a signal containing the encoded video data in accordance with a wireless communication standard. or the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box; The device of claim 10.

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