Probabilistic initialization for video decoding
By using context-adaptive entropy decoding in video encoding and decoding, and using predefined initialization values to determine the initial probability state in the linear domain, the problem of low arithmetic decoding efficiency in the video compression process in the existing technology is solved, and a more efficient implementation is achieved. Efficient video data processing and better standards adaptability.
Patent Information
- Application Number
- CN202080020348.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-12
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-03-12
AI Technical Summary
In the video compression process of existing video coding technology, the probability initialization efficiency of arithmetic decoding is low, resulting in low efficiency of video data encoding and decoding, and insufficient adaptability to different video standards.
Using the context-adaptive entropy decoding process in the binary arithmetic decoder, by obtaining predefined initialization values of multiple contexts, determining the initial probability state in the linear domain based on these values, and then performing entropy encoding or decoding, avoiding the need for Lookup tables required for probabilistic state transitions between numerical and linear domains, improving efficiency.
It improves the efficiency of encoding and decoding video data, reduces the dependence on video standards, enhances the adaptability and flexibility to different video standards, and reduces the demand for computing resources.
Smart Images

Figure CN113632491B_ABST
Abstract
Description
[0001] This application claims priority to U.S. Application No. 16 / 816,016, filed on March 11, 2020, which claims priority to U.S. Provisional Application No. 62 / 817,475, filed on March 12, 2019, U.S. Provisional Application No. 62 / 834,297, filed on April 15, 2019, and U.S. Provisional Application No. 62 / 871,519, filed on July 8, 2019, the entire contents of each of the above applications are incorporated herein by reference. Technical Field
[0002] The present disclosure relates to video encoding and video decoding. Background Art
[0003] Digital video capabilities may be incorporated into a wide range of devices, including digital televisions, digital live broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite wireless telephones, so-called "smart phones", video teleconferencing devices, video streaming devices, etc. Digital video devices implement video coding techniques (such as those described in standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 (Part 10, Advanced Video Coding (AVC)), ITU-T H.265 / High Efficiency Video Coding (HEVC), and extensions of such standards). By implementing such video coding techniques, video devices may more efficiently send, receive, encode, decode, and / or store digital video information.
[0004] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) may be partitioned into video blocks, which may also be referred to as coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial prediction relative to reference samples in neighboring blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture may use spatial prediction relative to reference samples in neighboring blocks in the same picture or temporal prediction relative to reference samples in other reference pictures. Pictures may be referred to as frames, and reference pictures may be referred to as reference frames. Summary of the invention
[0005] In summary, this disclosure describes techniques for probability initialization of arithmetic coding for video compression. For example, a video decoder can set an initial probability state for each context model used in a binary arithmetic decoder. The process can be called at the beginning of entropy encoding or decoding an independently decodable unit (such as a slice or tile).
[0006] As an example, a method for entropy decoding video data includes: obtaining a predefined initialization value for a context among multiple contexts used in a context adaptive entropy decoding process for entropy decoding values of syntax elements of independently decodable units of video data; determining an initial probability state of the context based on the predefined initialization value and in a linear domain; and entropy decoding a bin of values for the syntax elements based on the initial probability state of the context.
[0007] As another example, a device includes: a memory storing video data; and one or more processors implemented in a circuit and configured to: obtain a predefined initialization value for a context from a plurality of contexts used in a context adaptive entropy coding process for entropy coding values of syntax elements for independently decodable units of video data; determine an initial probability state of the context based on the predefined initialization value and in a linear domain; and entropy code bins of values for the syntax elements based on the initial probability state of the context.
[0008] As another example, a device includes: a unit for obtaining a predefined initialization value for a context among multiple contexts used in a context adaptive entropy decoding process for entropy decoding values of syntax elements for independently decodable units of video data; a unit for determining an initial probability state of the context based on the predefined initialization value and in a linear domain; and a unit for entropy decoding bins of values for the syntax elements based on the initial probability state of the context.
[0009] As another example, a computer-readable storage medium stores instructions that, when executed, cause one or more processors of a video decoder to perform the following operations: obtain a predefined initialization value for a context from a plurality of contexts used in a context-adaptive entropy coding process for entropy coding values of syntax elements for independently decodable units of video data; determine an initial probability state for the context based on the predefined initialization value and in a linear domain; and entropy code bins of values for the syntax elements based on the initial probability state for the context.
[0010] The details of one or more aspects of the disclosure are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the techniques described in the disclosure will be apparent from the description and drawings, and from the claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a block diagram illustrating an example video encoding and decoding system that may perform the techniques of this disclosure.
[0012] Figure 2A and 2B is a conceptual diagram illustrating a range update process in binary arithmetic decoding.
[0013] Figure 3 is a conceptual diagram showing an output process in binary arithmetic decoding.
[0014] Figure 4A and 4B is a conceptual diagram illustrating an example quadtree binary tree (QTBT) structure and a corresponding coding tree unit (CTU).
[0015] Figure 5 is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure.
[0016] Figure 6 is a block diagram illustrating a context-adaptive binary arithmetic coder in a video encoder.
[0017] Figure 7 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure.
[0018] Figure 8 is a block diagram illustrating a context-adaptive binary arithmetic coder in a video decoder.
[0019] Fig. 9 is a diagram showing a probability state for a probability expressed as 1 as in HEVC.
[0020] Fig. 10A and 10B is a diagram showing a probability state for a probability represented as 1 as in VVC, where Fig. 10A has 1024 probability states (10 bits of precision), and Fig. 10B There are 16384 probability states (14 bits of precision).
[0021] Fig.11A and 11B is a diagram showing a mapping from InitProbState to probability states that can be used in an arithmetic coding engine of generic video coding (VVC), where Fig.11Ahas 1024 probability states (10 bits of precision), and Fig. 11B There are 16384 probability states (14 bits of precision).
[0022] Fig.12 is a diagram showing the prior knowledge of the probability distribution of the syntax element SaoMergeFlag (1 bin) used in I slices.
[0023] Fig.13A It is shown in Fig.12 a graph of prior knowledge of the probability distribution represented by the probability states in the logarithmic domain, and Fig. 13B is a SliceQP showing the model probability state and having a linear function Y .
[0024] Fig.14A It is shown in Fig.12 A graph of prior knowledge of probability distributions represented by probability states in a linear domain; Fig. 14B is a diagram showing the model probability state and SliceQP without increasing the range of slope and offset defined in HEVC and current VVC Y and the graph of a linear function, and Fig. 14C The model probability states and SliceQP are shown for increasing ranges of slope and offset. Y and graphs of linear functions.
[0025] Fig.15A is a diagram showing the prior knowledge of the probability distribution of the syntax element SplitFlag used in B slices; Fig. 15B The model log-probability state and SliceQP are shown Y and graphs of linear functions; Fig. 15C It shows the linear probability state of the model and SliceQP Y and plots of linear functions using slope and offset defined in HEVC and current VVC, while Fig.15D It shows the linear probability state of the model and SliceQP Y And have in SliceQP Y Graph of a linear function equal to the intersection point defined at 32.
[0026] Figures 16A-16C is a graph showing the fitting of a probability distribution using a piecewise linear function determined by a plurality of intersection points.
[0027] Fig.17A and 17B is a diagram showing an example of mapping the secondary domain InitProbState to a probability state that can be used in the arithmetic decoding engine of VVC, where Fig.17Ahas 1024 probability states (10 bits of precision), and Fig. 17B There are 16384 probability states (14 bits of precision).
[0028] Fig.18A and 18B is a graph showing an example of extreme probability distribution.
[0029] Fig.19 is a flow chart illustrating an example method for encoding a current block.
[0030] Fig. 20 is a flow diagram illustrating an example process for performing context-based entropy encoding in accordance with one or more techniques of this disclosure.
[0031] Fig.21 is a flow chart illustrating an example method for decoding a current block.
[0032] Fig. 22 is a flow chart illustrating an example process for performing context-based entropy decoding in accordance with one or more techniques of this disclosure. DETAILED DESCRIPTION
[0033] In summary, this disclosure describes techniques for probability initialization for arithmetic coding for video compression. For example, a video decoder can set an initial probability state for each context model used in a binary arithmetic decoder. The process can be called at the beginning of entropy encoding or decoding of an independently decodable unit (such as a slice).
[0034] To perform initialization, the video coder may obtain a predefined initialization value (e.g., initValue) for a context in a plurality of contexts used in a context adaptive entropy coding process for entropy coding a value of a syntax element for a slice of video data. The video coder may determine an initial probability state (e.g., pStateIdx) for the context based on the predefined initialization value and in a logarithmic domain. The video coder may entropy code bins for values of syntax elements based on the initial probability state of the context.
[0035] When decoding video data according to some video standards, the video decoder can maintain probability states in the linear domain. For example, as discussed in further detail below, the context adaptive binary arithmetic decoder (CABAC) employed in the universal video coding (VVC) can maintain the probability state of the context in the linear domain. In the case where the initial probability state is determined in the logarithmic domain, the video decoder can perform various operations to convert the determined initial probability state in the linear domain. For example, the video decoder can use a lookup table (LUT) to convert the initial probability state from the logarithmic domain to the linear domain.
[0036] According to one or more techniques of the present disclosure, a video decoder can determine an initial probability state directly in a linear domain. For example, a video decoder can determine an initial probability state (e.g., pStateIdx) of a context in a linear domain based on a predefined initialization value without using a LUT to convert the initial probability state from a logarithmic domain to a linear domain. In this way, a video encoder can avoid having to store and / or access a LUT that converts between initial probability states in a linear domain and a logarithmic domain.
[0037] Figure 1 1 is a block diagram illustrating an example video encoding and decoding system 100 that can perform the techniques of the present disclosure. In general, the techniques of the present disclosure relate to coding (encoding and / or decoding) video data. In general, video data includes any data used to process video. Thus, video data can include original uncoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata (e.g., signaling data).
[0038] like Figure 1 As shown, 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 computer-readable medium 110. Source device 102 and destination device 116 may include any of a wide range of devices, including desktop computers, notebook computers (i.e., laptop computers), tablet computers, set-top boxes, telephone handsets (such as smart phones), televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some cases, source device 102 and destination device 116 may be equipped for wireless communication, and thus may be referred to as wireless communication devices.
[0039] exist Figure 1In the example of , 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 the present disclosure, the video encoder 200 of source device 102 and the video decoder 300 of destination device 116 can be configured to apply a technique for probabilistic initialization for arithmetic decoding for video compression. Therefore, source device 102 represents an example of a video encoding device, and destination device 116 represents an example of a video decoding device. In other examples, source device and destination device may include other components or arrangements. For example, source device 102 may receive video data from an external video source such as an external camera. Similarly, destination device 116 may be docked with an external display device instead of including an integrated display device.
[0040] exist Figure 1 The system 100 shown in is only an example. In general, any digital video encoding and / or decoding device can perform techniques for probability initialization for arithmetic decoding for video compression. The source device 102 and the destination device 116 are only examples of such decoding devices, wherein the source device 102 generates encoded video data for transmission to the destination device 116. The present disclosure refers to a "decoding" device as a device that performs decoding (e.g., encoding and / or decoding) of data. Therefore, the video encoder 200 and the video decoder 300 represent examples of decoding devices (specifically, video encoders and video decoders), respectively. In some examples, the devices 102 and 116 can operate in a substantially symmetrical manner so that each of the devices 102 and 116 includes video encoding and decoding components. Therefore, the system 100 can support one-way or two-way video transmission between video devices 102 and 116, for example, for video streaming, video playback, video broadcasting, or video telephony.
[0041] Typically, video source 104 represents a source of video data (i.e., original, undecoded video data), and provides a sequence of pictures (also referred to as "frames") of the video data to video encoder 200, which encodes the data for the pictures. Video source 104 of source device 102 may include a video capture device, such as a camera, a video archive unit containing previously captured original video, and / or a video feed interface for receiving video from a video content provider. As another alternative, video source 104 may generate computer graphics-based data as source video, or a combination of real-time video, archived video, and computer-generated video. In each case, video encoder 200 may encode captured, pre-captured, or computer-generated video data. Video encoder 200 may rearrange pictures from the received order (sometimes referred to as "display order") to a decoding order for decoding. Video encoder 200 may generate a bitstream comprising encoded video data. Source device 102 may then output the encoded video data onto computer-readable medium 110 via output interface 108 to be received and / or retrieved by, for example, input interface 122 of destination device 116 .
[0042] 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 can store original video data, for example, original video from the video source 104 and original decoded video data from the video decoder 300. In addition or alternatively, the memories 106, 120 can store software instructions that can be executed by, for example, the video encoder 200 and the video decoder 300, respectively. Although shown as separate from the video encoder 200 and the video decoder 300 in this example, it should be understood that the video encoder 200 and the video decoder 300 can also include internal memories for functionally similar or equivalent purposes. In addition, the memories 106, 120 can store, for example, encoded video data output from the video encoder 200 and input to the video decoder 300. In some examples, portions of the memories 106, 120 can be allocated as one or more video buffers, for example, to store original decoded and / or encoded video data.
[0043] The computer-readable medium 110 may represent any type of medium or device capable of transmitting the encoded video data from the source device 102 to the destination device 116. In one example, the computer-readable medium 110 represents a communication medium that enables the source device 102 to directly send the encoded video data 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 adjust the transmission signal including the encoded video data according to a communication standard such as a wireless communication protocol, and the input interface 122 may demodulate the received transmission information according to a communication standard such as a wireless communication protocol. The communication medium may include any wireless or wired communication medium, for example, a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form a portion 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 a router, a switch, a base station, or any other device that may be useful for facilitating communication from the source device 102 to the destination device 116.
[0044] In some examples, computer-readable medium 110 may include storage device 112. 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, Blu-ray disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.
[0045] In some examples, the computer-readable medium 110 may include a file server 114 or another intermediate storage device that may store the encoded video data generated by the source device 102. The source device 102 may output the encoded video data to the file server 114 or another intermediate storage device that may store the encoded video data generated by the source device 102. The destination device 116 may access the stored video data from the file server 114 via streaming or downloading. The file server 114 may be any type of server device capable of storing the encoded video data and sending the encoded video data to the destination device 116. The file server 114 may represent a web server (e.g., for a website), a file transfer protocol (FTP) server, a content delivery network device, or a network attached storage (NAS) device. The destination device 116 may access the encoded video data from the file server 114 via 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., DSL, a cable modem, etc.), or a combination of the two that is suitable for accessing the encoded video data stored on the file server 114. The file server 114 and the input interface 122 may be configured to operate according to a streaming transfer protocol, a download transfer protocol, or a combination thereof.
[0046] Output interface 108 and input interface 122 may represent wireless transmitters / receivers, modems, wired networking components (e.g., Ethernet cards), wireless communication components that operate according to any of a variety of IEEE 802.11 standards, or other physical components. In examples where output interface 108 and input interface 122 include wireless components, output interface 108 and input interface 122 may be configured to transmit data (such as encoded video data) according to a cellular communication standard (such as 4G, 4G-LTE (Long Term Evolution), Advanced LTE, 5G, etc.). In some examples where output interface 108 includes a wireless transmitter, output interface 108 and input interface 122 may be configured to transmit data (such as encoded video data) according to other wireless standards (such as IEEE 802.11 specifications, IEEE 802.15 specifications (e.g., ZigBee TM ), Bluetooth TM Standards, etc.) to transmit data (such as encoded video data). In some examples, source device 102 and / or destination device 116 may include corresponding system-on-chip (SoC) devices. For example, source device 102 may include a SoC device for performing the functions assigned to video encoder 200 and / or output interface 108, and destination device 116 may include a SoC device for performing the functions assigned to video decoder 300 and / or input interface 122.
[0047] The techniques of the present disclosure may be applied to video decoding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission (such as Dynamic Adaptive Streaming over HTTP (DASH)), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0048] The input interface 122 of the destination device 116 receives the encoded video bitstream from the computer-readable medium 110 (e.g., the storage device 112, the file server 114, etc.). The encoded video bitstream may include signaling information such as the following syntax elements defined by the video encoder 200 (which are also used by the video decoder 300): the syntax elements have values that describe the characteristics and / or processing of video blocks or other decoding units (e.g., slices, pictures, groups of pictures, sequences, etc.). The display device 118 displays the decoded pictures of the decoded video data to the user. The display device 118 can represent any of a variety of display devices, such as a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.
[0049] Despite Figure 1 2, but in some examples, the video encoder 200 and the video decoder 300 may each be integrated with an audio encoder and / or an audio decoder, and may include appropriate MUX-DEMUX units or other hardware and / or software to process multiplexed streams including both audio and video in a common data stream. If applicable, the MUX-DEMUX units may follow the ITU H.223 multiplexer protocol or other protocols such as the User Datagram Protocol (UDP).
[0050] The video encoder 200 and the video decoder 300 can each be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When the technology is partially implemented in software, the device can store instructions for the software in a suitable non-transitory computer-readable medium, and use one or more processors to execute the instructions in hardware to perform the technology of the present disclosure. Each of the video encoder 200 and the video decoder 300 can be included in one or more encoders or decoders, and any of the encoders or decoders can be integrated as part of a combined encoder / decoder (CODEC) in the corresponding device. The device including the video encoder 200 and / or the video decoder 300 can include an integrated circuit, a microprocessor, and / or a wireless communication device (such as a cellular phone).
[0051] The video encoder 200 and the video decoder 300 may operate according to a video coding standard, such as the ITU-T H.265 (also known as the High Efficiency Video Coding (HEVC) standard) or an extension thereof, such as a multi-view and / or scalable video coding extension. Alternatively, the video encoder 200 and the video decoder 300 may operate according to other proprietary or industry standards, such as the Joint Exploration Test Model (JEM) or the ITU-T H.266 standard, also known as Versatile Video Coding (VVC). The latest draft of the VVC standard is described in the following document: Bross et al., “Versatile Video Coding (Draft 4)”, Joint Video Experts Group (JVET) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 13th Meeting: Marrakech, Morocco, January 9-18, 2019, JVET-M1001-v6 (hereinafter referred to as “VVC Draft 4”). However, the techniques of this disclosure are not limited to any particular coding standard.
[0052] Typically, the video encoder 200 and the video decoder 300 can perform block-based decoding of the picture. The term "block" generally refers to a structure that includes data to be processed (e.g., to be encoded, decoded, or otherwise used in the encoding and / or decoding process). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Typically, the video encoder 200 and the video decoder 300 can decode video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, instead of decoding red, green, and blue (RGB) data for samples of a picture, the video encoder 200 and the video decoder 300 can decode luminance and chrominance components, wherein the chrominance components may include both red hue and blue hue chrominance components. In some examples, the video encoder 200 converts the received RGB formatted data to a YUV representation before encoding, and the video decoder 300 converts the YUV representation to an RGB format. Alternatively, a pre-processing and post-processing unit (not shown) may perform these conversions.
[0053] In general, the present disclosure may relate to the decoding (e.g., encoding and decoding) of a picture to include the process of encoding or decoding data for the picture. Similarly, the present disclosure may relate to the decoding of a block of a picture to include the process of encoding or decoding data for the block (e.g., prediction and / or residual decoding). The encoded video bitstream typically includes a series of values for syntax elements that represent decoding decisions (e.g., decoding modes) and partitioning of the picture into blocks. Therefore, references to decoding a picture or a block should generally be understood as decoding the values of the syntax elements used to form the picture or the block.
[0054] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video decoder (such as the video encoder 200) partitions a coding tree unit (CTU) into CUs according to a quadtree structure. That is, the video decoder partitions the CTU and the CU into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. A node without child nodes may be referred to as a "leaf node", and the CU of such a leaf node may include one or more PUs and / or one or more TUs. The video decoder may further partition the PU and TU. For example, in HEVC, a residual quadtree (RQT) represents a partition of a TU. In HEVC, a PU represents inter-frame prediction data, and a TU represents residual data. An intra-predicted CU includes intra-frame prediction information, such as an intra-frame mode indication.
[0055] As another example, the video encoder 200 and the video decoder 300 may be configured to operate according to JEM or VVC. According to JEM or VVC, a video decoder (such as the video encoder 200) partitions a picture into a plurality of coding tree units (CTUs). The video encoder 200 may partition the CTUs according to a tree structure (such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure). The QTBT structure removes the concept of multiple partition types, such as the separation between CU, PU, and TU of HEVC. The QTBT structure includes two levels: a first level partitioned according to quadtree partitioning, and a second level partitioned according to binary tree partitioning. The root node of the QTBT structure corresponds to the CTU. The leaf nodes of the binary tree correspond to coding units (CUs).
[0056] In the MTT segmentation structure, blocks can be segmented using quadtree (QT) segmentation, binary tree (BT) segmentation, and one or more types of ternary tree (TT) segmentation. A ternary tree segmentation is a segmentation in which a block is divided into three sub-blocks. In some examples, the ternary tree segmentation divides the block into three sub-blocks without dividing the original block through the center. The segmentation types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.
[0057] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luma component and the chroma components, while in other examples, the video encoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luma component and another QTBT / MTT structure for the two chroma components (or two QTBT / MTT structures for the respective chroma components).
[0058] The video encoder 200 and the video decoder 300 may be configured to use quadtree segmentation, QTBT segmentation, MTT segmentation, or other segmentation structures according to HEVC. For the purpose of explanation, a description of the technology of the present disclosure is given with respect to QTBT segmentation. However, it should be understood that the technology of the present disclosure may also be applied to a video decoder configured to use quadtree segmentation or also use other types of segmentation.
[0059] This disclosure may use "NxN" and "N by N" interchangeably to refer to the sample size of a block (such as a CU or other video block) in terms of vertical and horizontal dimensions, for example, 16x16 samples or 16 by 16 samples. Typically, a 16x16 CU will have 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an NxNCU typically has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. The samples in a CU may be arranged in rows and columns. In addition, a CU does not necessarily need to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may include NxM samples, where M is not necessarily equal to N.
[0060] The video encoder 200 encodes video data representing prediction and / or residual information and other information for a CU. The prediction information indicates how the CU will be predicted in order to form a prediction block for the CU. The residual information typically represents the sample-by-sample difference between the samples of the CU before encoding and the prediction block.
[0061] In order to predict a CU, the video encoder 200 can generally form a prediction block for the CU by inter-frame prediction or intra-frame prediction. Inter-frame prediction generally refers to predicting a CU based on data of a previously decoded picture, while intra-frame prediction generally refers to predicting a CU based on previously decoded data of the same picture. In order to perform inter-frame prediction, the video encoder 200 can use one or more motion vectors to generate a prediction block. The video encoder 200 can generally perform motion search to identify a reference block that closely matches the CU, for example, in terms of the difference between the CU and the reference block. The video encoder 200 can use the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean square difference (MSD), or other such difference calculations to calculate a difference metric to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 can use unidirectional prediction or bidirectional prediction to predict the current CU.
[0062] Some examples of JEM or VVC also provide an affine motion compensation mode, which can be considered an inter-frame prediction mode. In the affine motion compensation mode, the video encoder 200 can determine two or more motion vectors representing non-translational motion (such as zooming in or out, rotation, perspective motion, or other irregular motion types).
[0063] In order to perform intra prediction, the video encoder 200 can select an intra prediction mode to generate a prediction block. Some examples of JEM or VVC provide sixty-seven intra prediction modes, including various directional modes, as well as planar modes and DC modes. Typically, the video encoder 200 selects an intra prediction mode that describes the neighboring samples of the current block according to which the samples of the current block (e.g., a block of a CU) are to be predicted. Assuming that the video encoder 200 decodes the CTU and CU in raster scan order (from left to right, from top to bottom), such samples can typically be above, above left, or to the left of the current block in the same picture as the current block.
[0064] The video encoder 200 encodes data representing a prediction mode for the current block. For example, for an inter-frame prediction mode, the video encoder 200 may encode data representing which inter-frame prediction mode of various available inter-frame prediction modes is used and motion information for the corresponding mode. For unidirectional or bidirectional inter-frame prediction, for example, the video encoder 200 may encode motion vectors using advanced motion vector prediction (AMVP) or merge mode. The video encoder 200 may use a similar mode to encode motion vectors for affine motion compensation mode.
[0065] After a prediction, such as intra prediction or inter prediction of a block, the video encoder 200 may calculate residual data for the block. The residual data, such as a residual block, represents the sample-by-sample difference between the block and a prediction block for the block, which is formed using a corresponding prediction mode. The video encoder 200 may apply one or more transforms to the residual block to produce transformed data in a transform domain rather than in a 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, a Karhunen-Loeve transform (KLT), etc., after the first transform. The video encoder 200 generates transform coefficients after applying one or more transforms.
[0066] As described above, after any transform to produce 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 potentially reduce the amount of data used to represent the coefficients, thereby providing further compression. By performing the quantization process, the video encoder 200 may reduce the bit depth associated with some or all of the coefficients. For example, the video encoder 200 may round down 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.
[0067] After quantization, the video encoder 200 can scan the transform coefficients to generate a one-dimensional vector according to a two-dimensional matrix including the quantized transform coefficients. The scan can be designed to place coefficients of higher energy (and therefore lower frequency) in front of the vector and transform coefficients of lower energy (and therefore higher frequency) in the back of the vector. In some examples, the video encoder 200 can scan the quantized transform coefficients using a predefined scan order to generate a serialized vector, and then entropy encode the quantized transform coefficients of the vector. In other examples, the video encoder 200 can perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, the video encoder 200 can entropy encode the one-dimensional vector, for example, according to context adaptive binary arithmetic coding (CABAC). The video encoder 200 can also entropy encode the values of the syntax elements used to describe the metadata associated with the encoded video data for use by the video decoder 300 when decoding the video data.
[0068] To perform CABAC, the video encoder 200 may assign context within a context model to a symbol to be transmitted. The context may relate to, for example, whether neighboring values of the symbol are zero values. The probability determination may be based on the context assigned to the symbol.
[0069] The video encoder 200 may also generate syntax data (such as block-based syntax data, picture-based syntax data, and sequence-based syntax data) to the video decoder 300, 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). Likewise, the video decoder 300 may decode such syntax data to determine how to decode the corresponding video data.
[0070] In this way, the video encoder 200 can generate a bitstream that includes encoded video data, such as a syntax element describing the partitioning of a picture into blocks (e.g., CUs) and prediction and / or residual information for the blocks. Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.
[0071] The following sections describe Binary Arithmetic Coding (BAC) and CABAC techniques in more detail. In general, BAC is a recursive interval subdivision process. In the H.264 / AVC and H.265 / HEVC video coding standards, BAC is used to encode bins in the CABAC process. The output of a BAC decoder is a binary stream that represents the value or pointer of the probability within the final decoded probability interval. The probability interval is specified by a range ("range") and a lower limit value ("low"). Range is the extension of the probability interval. Low is the lower limit of the decoded / probability interval.
[0072] The application of arithmetic decoding to video decoding is described in the following document: D. Marpe, H. Schwarz, and T. Wiegand, "Context-Based Adaptive Binary Arithmetic Coding in the H.264 / AVCVideo Compression Standard", IEEE Trans. Circuits and Systems for Video Technology, Vol. 13, No. 7, July 2003. CABAC involves three main functions, namely binarization, context modeling, and arithmetic decoding. Binarization refers to the function of mapping syntax elements to binary symbols (or "bins"). Binary symbols may also be referred to as "bin strings". Context modeling refers to the function of estimating the probability of each bin. Arithmetic decoding refers to the subsequent function of compressing the bin into bits based on the estimated probability. Various devices and / or modules thereof (such as a binary arithmetic decoder) can perform the function of arithmetic decoding.
[0073] Several different binarization processes are used in HEVC, including unary (U), truncated unary (TU), exponential Golomb k (EGk), and fixed length (FL). The details of the various binarization processes are described in the following document: V. Sze and M. Budagavi, "High throughput CABAC entropy coding in HEVC", IEEE Transactions on Circuits and Systems for Video Technology (TCSVT), Vol. 22, No. 12, pp. 1778-1791, December 2012.
[0074] Each context (i.e., probability model) in CABAC is represented by a state. Each state (σ) implicitly represents the probability (p) that a particular symbol (e.g., bin) is the least likely symbol (LPS). σ ). The symbol can be an LPS or a most probable symbol (MPS). The symbol is binary, and therefore, the MPS and LPS can be either 0 or 1. The probability is estimated for the corresponding context and used to (implicitly) entropy code the symbol using an arithmetic coder.
[0075] The BAC process is handled by a state machine that changes its internal values 'range' and 'low' depending on the context to be decoded and the value of the bin being decoded. Depending on the state of the context (i.e. its probability), range is divided into rangeMPS σ (state σ The range of most likely symbols in ) and rangeLPS σ (state σ Theoretically, the probability state σ rangeLPS σ The values are derived by multiplication:
[0076] rangeLPS σ =range×p σ
[0077] Among them, p σ is the probability of choosing LPS. Of course, the probability of MPS is 1-p σ . Equivalently, rangeMPS σ Equal to range minus rangeLPS σ The BAC iteratively updates the range based on the state of the context bin to be decoded, the current range, and the value of the bin being decoded (i.e., the bin is equal to the LPS or MPS).
[0078] Figure 2A and 2B An example of this process at bin n is shown. Figure 2A In example 201, the range at bin n includes RangeMPS and RangeLPS, which is composed of LPS (pS) given a specific context state (σ) σ ). Example 201 shows the update of range at bin n+1 when the value of bin n is equal to MPS. In this example, low remains unchanged, but the value of range at bin n+1 is reduced to the value of RangeMPS at bin n. Figure 2BExample 203 shows the update of range at bin n+1 when the value of bin n is not equal to MPS (i.e., equal to LPS). In this example, low is moved to the lower range value of RangeLPS at bin n. In addition, the value of range at bin n+1 is reduced to the value of RangeLPS at bin n.
[0079] In HEVC, range is expressed using 9 bits and low is expressed using 10 bits. There is a renormalization process to maintain the range and low values with sufficient accuracy. Renormalization occurs whenever range is less than 256. Therefore, range after renormalization is always equal to or greater than 256. Depending on the values of range and low, BAC outputs "0" or "1" to the bitstream, or updates an internal variable (called BO: Unfinished Bit) to reserve for future output. Figure 3 An example of BAC output according to range is shown. For example, when range and low are above a certain threshold (e.g., 512), a "1" is output to the bitstream. When range and low are below a certain threshold (e.g., 512), a "0" is output to the bitstream. When range and low are between certain thresholds, nothing is output to the bitstream. Instead, the BO value is incremented and the next bin is encoded.
[0080] The techniques described in the present disclosure may be performed, for example, within a video encoder, a video decoder, or a combined video encoder-decoder (codec). Specifically, the 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, which may be configured to support video decoding (such as video decoding according to various aspects of the HEVC standard). The entropy encoding and decoding units may apply the decoding process in a reverse or inverse manner, for example, to encode or decode any of various video data (such as transform coefficients associated with residual video data, motion vector information, syntax elements, and other types of information that may be useful in video encoding and / or video decoding processes).
[0081] In general, the video decoder 300 performs a process that is inverse to the process performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 may use CABAC to decode the values of syntax elements for the bitstream in a manner substantially similar to, but reciprocal to, the CABAC encoding process of the 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 CTUs. The syntax elements may also define prediction and residual information for a block (e.g., CU) of video data.
[0082] The residual information may be represented by, for example, quantized transform coefficients. The video decoder 300 may inverse quantize and inverse transform the quantized transform coefficients of the block to regenerate a residual block for the block. The video decoder 300 uses the signaled prediction mode (intra-frame prediction or inter-frame prediction) and related prediction information (e.g., motion information for inter-frame prediction) to form a prediction block for the block. The video decoder 300 may then combine the prediction block and the residual block (on a sample-by-sample basis) to regenerate the original block. The video decoder 300 may perform additional processing, such as performing a deblocking process to reduce visual artifacts along the boundaries of the blocks.
[0083] According to the technology of the present disclosure, the video encoder 200 and / or the video decoder 300 can obtain a predefined slope index (e.g., SlopeIdx) and a predefined offset index (e.g., OffsetIdx) for a context in multiple contexts used in a context adaptive entropy coding process for entropy coding a value of a syntax element in a slice of video data; determine an initial probability state of the context for the slice of video data in a linear domain based on the predefined slope index and the predefined offset index; and entropy code bins of values for the syntax elements based on the initial probability state of the context.
[0084] In general, the present disclosure may involve "signaling" certain information (such as syntax elements). The term "signaling" may generally refer to the transmission of values for syntax elements and / or other data used to decode encoded video data. That is, video encoder 200 may signal values for syntax elements in a bitstream. Generally, signaling refers to generating values in a bitstream. As described above, source device 102 may transmit the bitstream to destination device 116 in substantially real time or not in real time (such as may occur when storing syntax elements to storage device 112 for later retrieval by destination device 116).
[0085] The techniques of this disclosure are applicable to binary arithmetic coders, such as the Context Adaptive Binary Arithmetic Coder (CABAC) employed in Versatile Video Coding (VVC), where probability states represent true probabilities in a linear domain.
[0086] In binary arithmetic coding, the video sequence is first converted into data elements (or syntax elements), where temporal and spatial redundancy is removed; then the syntax elements are losslessly converted into a binary representation (or bitstream) by entropy coding. The latest video coding standards (e.g., HEVC and VVC) can use binary arithmetic coding to perform entropy coding.
[0087] The binary arithmetic decoding process has three main stages, namely binarization, adaptive probability estimation and arithmetic decoding. In the binarization stage, each non-binary syntax element to be decoded is converted into a string of binary data symbols (or bins).
[0088] In the adaptive probability estimation stage, each bin (whether it is a binary syntax element or an element of a binary string converted from a non-binary syntax element) has an estimate of its probability distribution (i.e., the probability of being 0 or 1). The distributions can be divided into two categories: (1) stationary and uniform distributions (i.e., always p=0.5), and (2) time-varying or non-uniform distributions. Bins with category (2) distributions can be assigned a probability model (or context model) that tracks the real-time distribution of the bin based on its previous bin values and other context statistics.
[0089] In the arithmetic decoding stage, bins with category (1) distribution can be decoded in bypass mode, which is a low-complexity and highly parallelized mode; bins with category (2) distribution are decoded in normal mode, using the bin values and their probabilities estimated by the associated context model.
[0090] When used in a binary arithmetic decoder for video coding, the probability, which is theoretically real-valued and ranges from 0 to 1, is digitized and is therefore often referred to as a probability state. For example, in HEVC, the probability has 7 bits of precision, which corresponds to 128 probability states. Fig. 9 The mapping between probabilities and probability states is shown. It can be seen that the probability states in HEVC represent the true probabilities in the logarithmic domain. For another example, in VVC, the probability estimate for a particular bin is the average of two probabilities that are tracked in the associated context model of the bin and updated at fast and slow speeds, respectively. The one updated at fast speed has 10 bits of precision, which corresponds to 1024 probability states; the other one updated at slow speed has 14 bits of precision, which corresponds to 16384 probability states. Unlike HEVC, VVC uses a linear mapping between probability states and probabilities (see Fig. 10A and10B ).
[0091] In HEVC and VVC, the video bitstream includes or consists of multiple independently decodable units (e.g., slices), which means that at the beginning of such a unit, the probability states of all context models must be reset to some predefined values. Typically, each context model should assume a uniform distribution (p=0.5) without any prior knowledge of the statistical properties of the source. However, in order to connect the learning phase of the adaptive probability estimation and to achieve pre-adaptation under different decoding conditions, it is found to be beneficial to provide each probability model with an initial probability state (initialization process) that is more suitable than an equiprobable state.
[0092] CABAC in HEVC has an initialization process that is called at the beginning of each slice and depends on the quantization parameter (QP). Given an initial value SliceQP for the luma QP of a slice Y In the case of , the initial probability state of a particular context model (denoted as InitProbState) is generated by equations (1) to (3),
[0093] m=SlopeIdx*5–45 (1)
[0094] n=(OffsetIdx<<3)–16 (2)
[0095] InitProbState=Clip3(1,127,((m*SliceQP Y )>>4)+n) (3)
[0096] Where SlopeIdx and OffsetIdx (both integers ranging from 0 to 15 (inclusive)) are initialization parameters predefined and stored for each context model. Equation (3) means that InitProbState is modeled by a linear function of SliceQPY, where SliceQP Y = 0 with a slope of about m>>4 and an intersection point n. The mapping from SlopedIdx to slope and from OffsetIdx to intersection points can be seen in Tables 1 and 2, respectively.
[0097] Table 1 - Mapping from SlopeIdx to Slope
[0098] SlopeIdx 0 1 2 3 4 5 6 7 Slope -2.81 -2.50 -2.19 -1.88 -1.56 -1.25 -0.94 -0.63 SlopeIdx 8 9 10 11 12 13 14 15 Slope -0.31 0 0.31 0.63 0.94 1.25 1.56 1.88
[0099] Table 2 - Mapping from OffsetIdx to intersection points
[0100] OffsetIdx 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Intersection -16 -8 0 8 16 24 32 40 48 56 64 72 80 88 96 104
[0101] In other words, the context model may not store the initial probability state directly; instead, it stores two initialization parameters that jointly determine a linear function that uses SliceQP at the beginning of each slice. Y as independent variables to derive probability states.
[0102] Slopeldx and Offsetldx, both of which have 4 bits of precision, are packed into a single 8-bit initialization value, with the upper and lower nibbles being Slopeldx and Offsetldx, respectively.
[0103] The current VVC CABAC uses the same method as HEVC to derive InitProbState, except that the clipping in equation (3) is from 0 to 127. However, in deriving InitProbState (which represents the probability in the logarithmic domain (see Fig. 9 )) After that, the initialization process in VVC requires one more step to convert InitProbState into a probability state representing the probability in the linear domain (see Figures) 10A and 10B) for use in the arithmetic decoding engine of VVC. Fig.11A and 11B The conversion (or mapping) shown in is achieved by using a look-up table (LUT) (see Table 3) as follows:
[0104] 1. Use InitProbState as a search index to find the corresponding probability_state value in the LUT.
[0105] 2.- Derive the lower precision (10 bits) probability state (denoted as ProbabilityStateL) in equation (4).
[0106] ProbabilityStateL=probability_state>>5 (4)
[0107] - A higher precision (14 bits) probability state (denoted as ProbabilityStateH) is derived in equation (5).
[0108] ProbabilityStateH=probability_state>>1 (5)
[0109] Table 3 - Mapping from InitProbState to probability_state
[0110] InitProbState 0 1 2 3 4 5 6 7 probability_state 614 647 681 718 756 797 839 884 InitProbState 8 9 10 11 12 13 14 15 probability_state 932 982 1034 1089 1148 1209 1274 1342 InitProbState 16 17 18 19 20 21 22 23 probability_state 1414 1490 1569 1653 1742 1835 1933 2037 InitProbState 24 25 26 27 28 29 30 31 probability_state 2146 2261 2382 2509 2643 2785 2934 3091 InitProbState 32 33 34 35 36 37 38 39 probability_state 3256 3430 3614 3807 4011 4225 4452 4690 InitProbState 40 41 42 43 44 45 46 47 probability_state 4941 5205 5483 5777 6086 6412 6755 7116 InitProbState 48 49 50 51 52 53 54 55 probability_state 7497 7898 8320 8766 9235 9729 10249 10798 InitProbState 56 57 58 59 60 61 62 63 probability_state 11375 11984 12625 13300 14012 14762 15551 16384 InitProbState 64 65 66 67 68 69 70 71 probability_state 16384 17216 18005 18755 19467 20142 20783 21392 InitProbState 72 73 74 75 76 77 78 79 probability_state 21969 22518 23038 23532 24001 24447 24869 25270 InitProbState 80 81 82 83 84 85 86 87 probability_state 25651 26012 26355 26681 26990 27284 27562 27826 InitProbState 88 89 90 91 92 93 94 95 probability_state 28077 28315 28542 28756 28960 29153 29337 29511 InitProbState 96 97 98 99 100 101 102 103 probability_state 29676 29833 29982 30124 30258 30385 30506 30621 InitProbState 104 105 106 107 108 109 110 111 probability_state 30730 30834 30932 31025 31114 31198 31277 31353 InitProbState 112 113 114 115 116 117 118 119 probability_state 31425 31493 31558 31619 31678 31733 31785 31835 InitProbState 120 121 122 123 124 125 126 127 probability_state 31883 31928 31970 32011 32049 32086 32120 32153
[0111] As discussed above, the current CABAC of VVC adopts probability states that represent probabilities in the linear domain (see Fig. 10A and 10B ), but still uses the traditional initialization process in HEVC, where the derived initial probability state represents the probability in the logarithmic domain. In order to connect the output of the initialization process and the input of the arithmetic decoding engine, a 128-entry LUT is used for mapping.
[0112] According to one or more techniques of the present disclosure, the initialization process can be modified for VVC (for example, these techniques can improve the table lookup process by appropriately modifying the initialization process in VVC). Two methods for modification are proposed. In one method, the output probability state InitProbState represents the probability in the linear domain. By doing so, the mapping process is reduced to a shift operation, which is only used for precision adjustment purposes. In another method, the output probability state InitProbState represents the probability in the quadratic domain, and the mapping is implemented by using an equation instead of a LUT.
[0113] Increase the slope and the range of the intersection point. In order to find appropriate initialization parameters for a given context model, it is necessary to obtain prior knowledge of the probability distribution of bins using the context model by some means such as statistical analysis of the source. Fig.12 An example of bins of the syntax element SaoMergeFlag used in an I slice is shown.
[0114] In HEVC and current VVC, the prior knowledge of probability is converted into a probability state in the logarithmic domain ( Fig.13A is from Fig.12 converted), and the optimal initialization parameters (through which the linear function determined best fits the probability state and SliceQP Y For the same example, SlopedIdx and OffsetIdx are 13 and 6 respectively (slope is about 1.25 and intersection point is 32), and Fig. 13B The corresponding best-fit linear function is plotted in .
[0115] According to the techniques of the present disclosure, the initial probability state is in the linear domain to coordinate with the arithmetic decoding engine. Fig.14A The prior knowledge represented by the probability state in the linear domain is shown in Fig.12 A scaled version of . Note that for simplicity of illustration, 7 bits of precision are used for both the logarithmic and linear probability states. However, in other examples, other bit precisions may be used.
[0116] Fig.13A and Fig.14A The comparison shows that the probability state is accompanied by SliceQP in the logarithmic domain Y The change is much more subtle (compared to that in the linear domain), which means that a flat line that fits the probability state in the logarithmic domain very well may become quite steep in the linear domain. Fig.14A The probability state shown in , without changing the initialization process defined in HEVC and current VVC (see equations (1) to (3)), the best initialization parameters that can be found by exhaustive search are SlopedIdx equal to 15 and OffsetIdx equal to 4, which achieves the maximum effective slope of 1.88, as shown in Fig. 14B However, the line may not be steep enough to achieve a good fit. As the slope and search range for the intersection point are increased, a better fit can be found, as shown in Fig. 14C As shown, the slope is 3.25 and the intersection point is -23, both of which exceed the limits allowed by HEVC and current VVC.
[0117] Note that the example ( Figures 12 to 14C ) is typical, not abnormal - a large number of bins have this probability distribution. Therefore, the range of slopes and offsets should be increased to fit SliceQP using a linear model Y and the correlation of the probability states which are now in the linear domain.
[0118] In one example, the number of possible slope and intersection values does not change (i.e., SlopeIdx and OffsetIdx still range from 0 to 15), but the step size between them increases, which means that the constant a in equation (6) is greater than 5 in equation (1) and b in equation (7) is greater than 3 in equation (2), respectively.
[0119] m=SlopeIdx*a–c (6)
[0120] n=(OffsetIdx< <b)–d (7)
[0121] In another example, the number of possible slope and intersection values is increased. For example, SlopeIdx may range from 0 to 31, resulting in 32 possible slope values. The above two examples may be used jointly or independently.
[0122] Defined in SliceQP Y The intersection point at is not equal to 0. In addition to satisfying the linear probability state with an increasing range of slope and offset, the definition in SliceQP Y An alternative or additional method is to have the intersection point at not equal to 0. For example, Fig.15AThe probability distribution of SplitFlag used in B slices is shown in Figure 2. In the logarithmic domain, Fig. 15B As shown, about slice SliceQP Y The probability state of can be well modeled by a linear function with a slope equal to -0.63 and an intersection equal to 88 (i.e., SlopedIX 7 and OffsetIdx 13 as defined in HEVC and current VVC). However, in the linear domain, the effective slope / intersection combination defined in HEVC and current VVC cannot model the probability state well. Fig. 15C The closest fit found by the exhaustive search is shown, with a slope equal to -0.94 and an intersection point equal to 104 (i.e., SlopedIdx 6 and OffsetIdx 15). Fig.15D As shown, another effective slope of -1.88 (SlopeIdx 3) does achieve a better fit, but the projection onto the y-axis (i.e., Y The intersection point at (=0) is 130, far exceeding the upper limit of 104.
[0123] As shown above in equation (3), in some examples, the initial probability state can be obtained in part by multiplying the variable m by SliceQP Y In the example of equation (3), the linear model of the probability state is defined at the point where SliceQPY is zero.
[0124] According to one or more techniques of the present disclosure, a video coder may utilize an offset so that a linear model of probability states is defined in SliceQP Y The point where the probability state is defined on the linear model can be called the quantization parameter anchor point (QP anchor ). For example, a video decoder can Y The offset is subtracted from , and the result is multiplied by the variable m. In one example, this can be achieved by modifying equation (3) to equation (8) as shown below.
[0125] InitProbState=Clip3(1,127,((m*(SliceQP Y -QP anchor ))>>4)+n) (8)
[0126] Among them, QP anchor is the QP value that defines the intersection point. In this way, the intersection point can be kept within the valid range of the probability state (1 to 127 in this example), and consideration of large projections on the y-axis is eliminated, especially when the slope is steep. Fig.15D In the example, SlopeIdx is equal to 3, QPanchor is 32, and in QP anchor The intersection point at is 72. For QP anchor Other values of include but are not limited to 8, 16, 64, 128, etc.
[0127] Use an alternative representation for linear functions. In the example discussed above, this is used to exploit SliceQP Y The linear function used to model the probability state is determined by a slope and intersection pair, which is the same as HEVC and current VVC. This section proposes an alternative representation for the linear function, where the straight-line function is determined by two intersections at two different QPs. Compared to the slope / intersection representation, this dual-intersection representation provides more flexibility in fitting because it allows more slope values that are not in the form of an arithmetic sequence.
[0128] The two intersection points and the two corresponding QPs are represented as int1, int2, QP1, and QP2, respectively. QP1 and QP2 can be arbitrary as long as they are within the valid range (0 to 63) defined in the current VVC. However, since InitProbState is calculated by the following equation (9) or equation (10) (note that for simplicity of explanation, the intermediate clipping and shifting operations are not considered here),
[0129]
[0130]
[0131] Therefore, the difference between QP1 and QP2 is preferably an integer power of 2, so that the division in equations (9) and (10) can be replaced by a right shift.
[0132] The two-intersection representation can be further extended to a multi-intersection representation that determines a piecewise linear function. One such example is the bins from the brightness SigFlag (see Figures 16A-16C ), where a turning point occurs at about 30 or 31 QP, and the straight line determined by the slope / intersection pair or double intersection is not good enough to fit (see Fig.16A In this case, a triple intersection point representation is proposed, which uses three initialization parameters: an intersection point at QP equal to 31, and two other intersection points at QPs less than and greater than 31, respectively (see Fig. 16B ). To fit the probability distribution even more accurately, a quadruple intersection representation can be used, where another minor turning point is captured using an additional initialization parameter representing the intersection at QP equal to 37 (see Fig. 16C ).
[0133] Retain higher intermediate precision. The above example introduces modifications to equations (1) to (3) and derives InitProbState in the linear domain. Due to HEVC tradition, InitProbState still has 7 bits of precision (0 to 127) and needs to be left shifted by 3 bits and 7 bits to align with the precision of ProbabilityStateL and ProbabilityStateH defined in the current VVC, as in equations (11) and (12).
[0134] ProbabilityStateL=InitProbState<<3 (11)
[0135] ProbabilityStateH=InitProbState<<7 (12)
[0136] Note that the table lookup step just before equations (4) and (5) is saved in this technique.
[0137] Applying a right shift to derive InitProbState (see equation (3)) followed by a left shift (see equations (11) and (12)) certainly loses more information than moving all (or part) of the right shift to the last step, since the latter preserves a higher intermediate precision. The following two examples move all right shifts to the last step.
[0138] In an example:
[0139] InitProbState=Clip3(1,2047,((m*SliceQP Y )+(n<<4)) (13)
[0140] ProbabilityStateL=InitProbState>>1 (14)
[0141] ProbabilityStateH=InitProbState<<3 (15)
[0142] In another example:
[0143] InitProbState=Clip3(0,2047,((m*SliceQP Y )+(n<<4)) (16)
[0144] ProbabilityStateL=InitProbState>>1 (17)
[0145] ProbabilityStateH=(InitProbState<<3)+4 (18)
[0146] CE1 related: The following document proposes the following technique for initialization: Simplification of JVET-O0191 using 4or 6bit per initialization value, JVET-O0946, Gothenburg, Sweden, July 3-12, 2019 (hereinafter referred to as "JVET-O0946"):
[0147] q=Clip3(9,23,SliceQP Y >>1)-8
[0148] a=(initValue>>3)*9
[0149] b=(initValue&7)*9
[0150] ProbabilityStateL=16*a+(ba)*q+8
[0151] ProbabilityStateH=ProbabilityStateL<<4
[0152] However, the technique proposed in JVET-O0946 may have one or more disadvantages. For example, the technique proposed in JVET-O0946 may lose some intermediate precision.
[0153] According to one or more techniques of this disclosure, a video decoder may perform initialization as follows:
[0154] q=Clip3(18,46,SliceQP Y )-16
[0155] a=(initValue>>3)*9
[0156] b=(initValue&7)*9
[0157] ProbabilityStateL=16*a+((ba)*q>>1)+8
[0158] ProbabilityStateH=ProbabilityStateL<<4
[0159] It can be seen that the above technique allows for high intermediate precision by moving the right shift until the last step (ie, computing ProbabilityStateL).
[0160] Initialization in the Quadratic Domain. The above example can be used for scenarios where the output of the initialization process represents a probability state in the linear domain. However, for some input sources, it may be desirable to have the probability state represent a probability in the logarithmic domain, which corresponds to representing entropy in the linear domain. To achieve a representation in the logarithmic domain, the present disclosure proposes using a probability state in the quadratic domain. Fig.17A and 17B An example of a mapping from the quadratic domain InitProbState to the linear probability used in the arithmetic decoding engine of VVC is shown, which looks similar to the mapping for the logarithmic InitProbState (see Figures 11A-11B ), but can be implemented via multiplication (note that a LUT storing all possible multiplication results can be generated in advance for use if preferred by a particular implementation). Here is an example,
[0161] slope = int(initId&0x0F)-8;
[0162] offset=int(initId&0xF0)-128;
[0163] shp=offset+((slope*(qp-32))>>1);
[0164] idx = Clip3 (-127, 127, shp);
[0165] val = 128 - abs (idx);
[0166] p1=(idx<0?32768–val 2 :val 2 );
[0167] ProbabilityStateL=p1>>1
[0168] ProbabilityStateH=p1>>5
[0169] Here, initId is an initialization value, wherein the upper nibble and the lower nibble represent a slope and an offset, respectively, and idx means a probability state with 8-bit precision and centered at 0.
[0170] Note that the methods proposed in this section can be combined with the higher intermediate precision methods introduced above.
[0171] Initialization for extreme probability distributions. A large number of bins may have extreme probability distributions, which means that these bins have very high probabilities of being 1 or 0, which is different from SliceQP Y Not relevant. Fig.18A and 18B is a graph showing an example of extreme probability distribution.
[0172] To model such extreme probability distributions, the slope may have to be 0, and the initial probability state may depend only on n (see equations (2) and (7)). Therefore, the initial probability state may not vary with the quantization parameter (QP). The formula for deriving n (as in equation (2) or equation (7)) can be designed so that probabilities close to 0 and 1 can be represented efficiently. The following examples are based on a 7-bit representation of the probability state (0 to 127) and can be extended to other precisions.
[0173] Taking equation (2) as an example, when OffsetIdx ranges from 0 to 15, the maximum value that n can reach is 104, which represents a probability of 0.8189 (ie, 104 / 128), which is far from 1.0.
[0174] In the following document, n is derived with 10 bits of precision, where OffsetIdx ranges from 0 to 7, as in equation (19): “Simplification of the initialization process for context variables”, JVET-N0301, Geneva, Switzerland, March 19-27, 2019.
[0175] n=((OffsetIdx*5)<<5)+32 (19)
[0176] Its equivalent 7-bit representation of n is shown in equation (20),
[0177] n=((OffsetIdx*5)<<2)+4 (20)
[0178] The closest probability to 0 that it can achieve is 0.0313 (OffsetIdx is equal to 0, and n is equal to 4, 4 / 128=0.0313), and the closest probability to 1.0 that it can achieve is 0.9688 (OffsetIdx is equal to 6, and n is equal to 124, 124 / 128=0.9688). However, this approximation may not be accurate enough to represent extreme probability distributions.
[0179] According to one or more techniques of this disclosure, a video coder may utilize one or more of the following formulas to derive initialization parameters (eg, n).
[0180] 1. If OffsetIdx is 3 bits (from 0 to 7), n can be derived as shown in equation (21).
[0181] n=(OffsetIdx*18)+1 (21)
[0182] 2. If OffsetIdx is 4 bits (from 0 to 15), n can be derived as shown in equation (22).
[0183] n=(OffsetIdx*9)+1 (22)
[0184] It can be seen that in either case, n can reach 1 and 127, which means that probabilities of 0.0078 (i.e., 1 / 128) and 0.9922 (i.e., 127 / 128) can be reached. Such probabilities can be sufficiently close to 0 and 1, respectively. In this way, the techniques of the present disclosure enable a video decoder to initialize extreme probability distributions more accurately, which can reduce the bit rate of decoded video data.
[0185] In some examples, m, n, and / or initState may be determined according to one of the following equations: (twenty three)
[0187] m=slopeIdx*4–36
[0188] n=OffsetIdx*9+1
[0189] initState=(m*(qp-24)>>4)+n (twenty four)
[0191] m = slopeIdx*8–32
[0192] n=OffsetIdx*18+1
[0193] initState=(m*(qp-16)>>4)+n (25)
[0195] m=slopeIdx*5–45
[0196] n=OffsetIdx*8+7
[0197] Figure 4A and 4B1 is a conceptual diagram showing an example quadtree binary tree (QTBT) structure 130 and a corresponding coding tree unit (CTU) 132. Solid lines represent quadtree splitting, and dashed lines indicate binary tree splitting. In each split (i.e., non-leaf) node of the binary tree, a flag is signaled to indicate which split type (i.e., horizontal or vertical) is used, where, in this example, 0 indicates horizontal splitting, and 1 indicates vertical splitting. For quadtree splitting, since the quadtree node splits the block horizontally and vertically into 4 sub-blocks of equal size, there is no need to indicate the split type. Accordingly, the video encoder 200 can encode the following, and the video decoder 300 can decode the following: syntax elements (such as split information) for the regional tree level (i.e., the first level) (i.e., the solid line) of the QTBT structure 130, and syntax elements (such as split information) for the prediction tree level (i.e., the second level) (i.e., the dashed line) of the QTBT structure 130. The video encoder 200 may encode video data (such as prediction and transform data) for a CU represented by a terminal leaf node of the QTBT structure 130 , and the video decoder 300 may decode the video data.
[0198] generally, Figure 4B The CTU 132 may be associated with parameters defining the size of blocks corresponding to nodes at the first and second levels of the QTBT structure 130. These parameters may include a CTU size (indicating the size of the CTU 132 in samples), a minimum quadtree size (MinQTSize, which indicates the minimum allowed quadtree leaf node size), a maximum binary tree size (MaxBTSize, which indicates the maximum allowed binary tree root node size), a maximum binary tree depth (MaxBTDepth, which indicates the maximum allowed binary tree depth), and a minimum binary tree size (MinBTSize, which indicates the minimum allowed binary tree leaf node size).
[0199] The root node of the QTBT structure corresponding to the CTU may have four child nodes at the first level of the QTBT structure, each of which may be segmented according to a quadtree segmentation. That is, the node of the first level is a leaf node (without child nodes) or has four child nodes. The example of the QTBT structure 130 represents such a node as including a parent node and a child node with a solid line branch. If the node of the first level is not larger than the maximum allowed binary tree root node size (MaxBTSize), they may be further segmented by the corresponding binary tree. The binary tree splitting of a node may be iterated until the node generated from the split reaches the minimum allowed binary tree leaf node size (MinBTSize) or the maximum allowed binary tree depth (MaxBTDepth). The example of the QTBT structure 130 represents such a node as having a dotted line branch. The binary tree leaf node is called a coding unit (CU), which is used for prediction (e.g., intra-picture or inter-picture prediction) and transformation without any further segmentation. As discussed above, a CU may also be referred to as a "video block" or "block".
[0200] In one example of a QTBT partitioning structure, the CTU size is set to 128x128 (luminance sample and two corresponding 64x64 chrominance samples), MinQTSize is set to 16x16, MaxBTSize is set to 64x64, MinBTSize (for both width and height) is set to 4, and MaxBTDepth is set to 4. Quadtree partitioning is first applied to the CTU to generate a quadtree leaf node. The quadtree leaf node can have a size from 16x16 (i.e., MinQTSize) to 128x128 (i.e., CTU size). If the quadtree leaf node is 128x128, it will not be further split by the binary tree because the size exceeds MaxBTSize (i.e., 64x64 in this example). Otherwise, the quadtree leaf node will be further split by the binary tree. Therefore, the quadtree leaf node is also the root node for the binary tree and has a binary tree depth of 0. When the binary tree depth reaches MaxBTDepth (4 in this example), further splitting is not allowed. When a binary tree node has a width equal to MinBTSize (4 in this example), this means that no further horizontal splitting is allowed. Similarly, a binary tree node with a height equal to MinBTSize means that no further vertical splitting is allowed for the binary tree node. As described above, the leaf nodes of the binary tree are called CUs and are further processed according to prediction and transformation without further segmentation.
[0201] Figure 5 is a block diagram illustrating an example video encoder 200 that may perform the techniques of this disclosure. Figure 5The present disclosure describes the video encoder 200 in the context of video coding standards such as the HEVC video coding standard and the H.266 video coding standard under development. However, the techniques of the present disclosure are not limited to these video coding standards and are generally applicable to video encoding and decoding.
[0202] exist Figure 5 In the example of , 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 one 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, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the filter unit 216, the DPB 218, and the entropy coding unit 220 may be implemented in one or more processors or in processing circuits. In addition, the video encoder 200 may include additional or alternative processors or processing circuits to perform these and other functions.
[0203] 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 video data from, for example, the video source 104 ( Figure 1 ) receives the video data stored in the video data memory 230. DPB 218 can act as a reference picture memory, which stores reference video data for use when subsequent video data is predicted by the video encoder 200. Video data memory 230 and DPB 218 can be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. Video data memory 230 and DPB 218 can be provided by the same memory device or separate memory devices. In various examples, video data memory 230 can be on chip with other components of video encoder 200 (as shown), or off chip relative to those components.
[0204] In the present disclosure, references to the video data memory 230 should not be interpreted as limited to memory internal to the video encoder 200 (unless specifically described as such) or memory external to the video encoder 200 (unless specifically described as such). Rather, references to the video data memory 230 should be understood as a reference memory that stores video data received by the video encoder 200 for encoding (e.g., video data for a current block to be encoded). Figure 1 The memory 106 may also provide temporary storage for outputs from the various units of the video encoder 200 .
[0205] Explained Figure 5 The various units of the video encoder 200 are provided to help understand the operations performed by the video encoder 200. The unit may be implemented as a fixed-function circuit, a programmable circuit, or a combination thereof. A fixed-function circuit refers to a circuit that provides a specific function and is pre-set with respect to the operations that can be performed. A programmable circuit refers to a circuit that can be programmed to perform various tasks and provide flexible functions with the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. A fixed-function circuit can execute software instructions (e.g., to receive parameters or output parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more of the units in the unit may be different circuit blocks (fixed-function or programmable), and in some examples, one or more units may be integrated circuits.
[0206] The video encoder 200 may include an arithmetic logic unit (ALU), an elementary function unit (EFU), a digital circuit, an analog circuit, and / or a programmable core formed from programmable circuits. In an example where the operation of the video encoder 200 is performed using software executed by a programmable circuit, the memory 106 ( Figure 1 ) may store object code for software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 may store such instructions.
[0207] 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 original video data to be encoded.
[0208] 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. As an example, the mode selection unit 202 may include a palette unit, an intra-block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.
[0209] 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 partitioning of a CTU into CUs, a prediction mode for a CU, a transform type for residual data of a CU, a quantization parameter for residual data of a CU, etc. The mode selection unit 202 may ultimately select a combination of encoding parameters that has a better rate-distortion value than other tested combinations.
[0210] The video encoder 200 may partition a picture retrieved from the video data memory 230 into a series of CTUs, and encapsulate one or more CTUs in a slice. The mode selection unit 202 may partition the CTUs of the picture according to a tree structure (such as the QTBT structure or quadtree structure of HEVC described above). As described above, the video encoder 200 may form one or more CUs by partitioning the CTUs according to the tree structure. Such CUs may also be generally referred to as "video blocks" or "blocks".
[0211] Typically, 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 the current block (e.g., the current CU, or the overlapping portion of the PU and TU in HEVC). In order to inter-predict the current block, the motion estimation unit 222 may perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously decoded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 may calculate a value representing the degree of similarity of the potential reference block to the current block, for example, based on the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), etc. The motion estimation unit 222 may typically perform these calculations using the sample-by-sample difference between the current block and the reference block under consideration. The motion estimation unit 222 may identify the reference block with the lowest value obtained from these calculations, which indicates the reference block that most closely matches the current block.
[0212] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of the reference block in the reference picture relative to the position of the current block in the current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, for unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, while for bidirectional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then use the motion vectors to generate a prediction block. For example, the motion compensation unit 224 may use the motion vectors to retrieve data for the reference block. As another example, if the motion vectors have fractional sample precision, the motion compensation unit 224 may interpolate the values for the prediction block according to one or more interpolation filters. In addition, for bidirectional inter prediction, the motion compensation unit 224 may retrieve data for two reference blocks identified by corresponding motion vectors and combine the retrieved data, for example, by sample-by-sample averaging or weighted averaging.
[0213] As another example, for intra prediction or intra prediction decoding, the intra prediction unit 226 can generate a prediction block based on samples adjacent to the current block. For example, for directional mode, the intra prediction unit 226 can generally mathematically combine the values of adjacent samples and fill these calculated values across the current block in a defined direction to produce a prediction block. As another example, for DC mode, the intra prediction unit 226 can calculate the average of adjacent samples of the current block and generate a prediction block to include the resulting average for each sample of the prediction block.
[0214] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives the original undecoded version of the current block from the video data memory 230 and the prediction block from the mode selection unit 202. The residual generation unit 204 calculates the sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines a residual block for the current block. In some examples, the residual generation unit 204 may also determine the difference between the 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.
[0215] In an example where the mode selection unit 202 partitions the 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 of various sizes. As noted above, the size of a CU may refer to the size of a luma coding block of the CU, and the size of a PU may refer to the size of a luma prediction unit of the PU. Assuming that the size of a particular CU is 2Nx2N, the video encoder 200 may support PU sizes of 2Nx2N or NxN for intra-prediction, and 2Nx2N, 2NxN, Nx2N, NxN, or similar symmetrical PU sizes for inter-prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning for PU sizes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter-prediction.
[0216] In an example where the mode selection unit does not further split the CU into PUs, each CU may be associated with a luma coding block and a corresponding chroma coding block. As described 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 a CU size of 2Nx2N, 2NxN, or Nx2N.
[0217] For other video coding techniques (such as intra-block copy mode coding, affine mode coding, and linear model (LM) mode coding, to name a few examples), the mode selection unit 202 generates a prediction block for the current block being encoded via a corresponding unit associated with the coding technique. In some examples (such as palette mode coding), the mode selection unit 202 may not generate a prediction block, but instead generate syntax elements indicating how to reconstruct the block based on the selected palette. In such a mode, the mode selection unit 202 may provide these syntax elements to the entropy coding unit 220 for encoding.
[0218] As described above, the residual generation unit 204 receives video data for a current block and a corresponding prediction 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 the sample-by-sample difference between the prediction block and the current block.
[0219] The 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"). The transform processing unit 206 can apply various transforms to the residual block to form a transform coefficient block. For example, the transform processing unit 206 can 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, the transform processing unit 206 can perform multiple transforms on the residual block, for example, a primary transform and a secondary transform (such as a rotation transform). In some examples, the transform processing unit 206 does not apply a transform to the residual block.
[0220] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to produce 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 cause a loss of information, and therefore, the quantized transform coefficients may have a lower precision than the original transform coefficients produced by the transform processing unit 206.
[0221] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform, respectively, to the quantized transform coefficient block to reconstruct a residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (although potentially with some degree of distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 may add samples of the reconstructed residual block to corresponding samples of the prediction block generated by the mode selection unit 202 to generate a reconstructed block.
[0222] Filter unit 216 may perform one or more filter operations on the reconstructed block. For example, filter unit 216 may perform a deblocking operation to reduce blocking artifacts along the edge of the CU. In some examples, the operations of filter unit 216 may be skipped.
[0223] The video encoder 200 stores the reconstructed blocks in the DPB 218. For example, in an example where the operation of the filter unit 216 is not required, the reconstruction unit 214 can store the reconstructed blocks in the DPB 218. In an example where the operation of the filter unit 216 is required, the filter unit 216 can store the filtered reconstructed blocks in the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 can retrieve the reference picture formed according to the reconstructed (and potentially filtered) blocks from the DPB 218 to perform inter-frame prediction on the blocks of the subsequently encoded pictures. In addition, the intra-frame prediction unit 226 can use the reconstructed blocks of the current picture in the DPB 218 to perform intra-frame prediction on other blocks in the current picture.
[0224] In general, the entropy coding unit 220 may entropy encode syntax elements received from other functional components of the video encoder 200. For example, the entropy coding unit 220 may entropy encode the quantized transform coefficient blocks from the quantization unit 208. As another example, the entropy coding unit 220 may entropy encode the prediction syntax elements (e.g., motion information for inter-frame prediction or intra-frame mode information for intra-frame prediction) from the mode selection unit 202. The entropy coding unit 220 may perform one or more entropy coding operations on syntax elements as another example of video data to generate entropy-encoded data. For example, the entropy coding unit 220 may perform a context-adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable-variable (V2V) length 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, the entropy coding unit 220 may operate in a bypass mode in which the syntax elements are not entropy encoded.
[0225] Figure 61 is a block diagram of an example entropy coding unit 220 that can be configured to perform CABAC according to the techniques of the present disclosure. Syntax elements 1180 are input to the entropy coding unit 220. If the syntax element is already a binary valued syntax element (e.g., a flag or other syntax element that has only values 0 and 1), the step of binarization can be skipped. If the syntax element is a non-binary valued syntax element (e.g., a syntax element that can have values other than 1 or 0), the non-binary valued syntax element is binarized by a binarizer 1200. The binarizer 1200 maps the non-binary valued syntax element into a sequence of binary decisions. These binary decisions are often referred to as "bins". For example, for a transform coefficient level, the value of the level can be decomposed into consecutive bins, each bin indicating whether the absolute value of the coefficient level is greater than a certain value. 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 can be developed for each non-binary valued syntax element.
[0226] Each bin produced by the binarizer 1200 is fed to the binary arithmetic decoding side of the entropy coding unit 220. That is, for a predetermined set of non-binary valued syntax elements, each bin type (e.g., bin 0) is decoded before the next bin type (e.g., bin 1). Decoding can be performed in normal mode or bypass mode. In bypass mode, the bypass coding engine 1260 performs arithmetic decoding using a fixed probability model (e.g., using Golomb-Rice or exponential Golomb decoding). Bypass mode is typically used for more predictable syntax elements.
[0227] Decoding in normal mode includes performing CABAC. Normal mode CABAC is used to decode bin values, where the probability of the bin value is predictable given the value of a previously decoded bin. The probability that a bin is an LPS is determined by a context modeler 1220. The context modeler 1220 outputs the bin value and a probability state for the context (e.g., a probability state σ, including an LPS value and the probability of LPS occurring). The context may be an initial context for a series of bins, or may be determined based on the decoded values of previously decoded bins. As described above, the context modeler 1220 may update the state based on whether the received bin is an MPS or an LPS. After the context modeler 1220 determines the context and the probability state σ, the normal coding engine 1240 performs BAC on the bin value.
[0228] Return to Figure 5 , the video encoder 200 may output a bitstream including entropy-encoded syntax elements required for reconstructing a block of a slice or picture. Specifically, the entropy encoding unit 220 may output a bitstream.
[0229] The above operations are described with respect to blocks. Such descriptions should be understood as operations for luma coding blocks and / or chroma coding blocks. As described above, in some examples, the luma coding blocks and chroma coding blocks are the luma components and chroma components of a CU. In some examples, the luma coding blocks and chroma coding blocks are the luma components and chroma components of a PU.
[0230] In some examples, operations performed with respect to luma coding blocks need not be repeated for chroma coding blocks. As an example, operations for identifying motion vectors (MVs) and reference pictures for luma coding blocks need not be repeated to identify MVs and reference pictures for chroma blocks. Instead, the 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.
[0231] The video encoder 200 represents an example of a device configured to encode video data, comprising: a memory configured to store video data; and one or more processing units implemented in a circuit and configured to: obtain a predefined slope index (e.g., SlopeIdx) and a predefined offset index (e.g., OffsetIdx) for a context in a plurality of contexts used in a context adaptive entropy coding process for entropy coding a value of a syntax element in a slice of the video data; determine an initial probability state of a context for the slice of the video data based on the predefined slope index and the predefined offset index; and entropy encode bins of values for the syntax elements based on the initial probability state of the context.
[0232] Figure 7 is a block diagram illustrating an example video decoder 300 that may perform the techniques of this disclosure. Figure 7 It is provided for the purpose of explanation and does not limit the techniques extensively illustrated and described in this disclosure. For the purpose of explanation, this disclosure describes the video decoder 300 according to the techniques of JEM, VVC, and HEVC. However, the techniques of this disclosure can be performed by video decoding devices configured for other video decoding standards.
[0233] exist Figure 7In the example of , 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 one 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 in processing circuits. In addition, the video decoder 300 may include additional or alternative processors or processing circuits to perform these and other functions.
[0234] The prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. The prediction processing unit 304 may include an addition unit that performs predictions according to other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, an intra-block copy unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.
[0235] CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by components of video decoder 300. For example, the video bitstream may be obtained from computer readable medium 110 ( Figure 1 ) obtains video data stored in CPB memory 320. CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from an encoded video bitstream. In addition, CPB memory 320 may store video data other than syntax elements of decoded pictures, such as temporary data representing outputs from various units of video decoder 300. DPB314 typically stores decoded pictures, and video decoder 300 may output decoded pictures, and / or use decoded pictures as reference video data when decoding subsequent data or pictures of the encoded video bitstream. CPB memory 320 and DPB 314 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. CPB memory 320 and DPB 314 may be provided by the same memory device or separate memory devices. In various examples, CPB memory 320 can be on-chip with other components of video decoder 300 , or off-chip relative to those components.
[0236] Additionally or alternatively, in some examples, video decoder 300 may retrieve the video from memory 120 ( Figure 1 ) to retrieve the decoded video data. That is, memory 120 may utilize CPB memory 320 to store data as discussed above. Likewise, when some or all of the functions of video decoder 300 are implemented in software to be executed by processing circuitry of video decoder 300, memory 120 may store instructions to be executed by video decoder 300.
[0237] It explains Figure 7 The various units shown in FIG. 3 are shown to help understand the operations performed by the video decoder 300. The units may be implemented as fixed function circuits, programmable circuits, or a combination thereof. Figure 5 , fixed-function circuits refer to circuits that provide specific functions and are pre-set with respect to the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functions with respect to the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., to receive parameters or output parameters), but the types of operations performed by fixed-function circuits are 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 units may be integrated circuits.
[0238] The video decoder 300 may include an ALU, an EFU, a digital circuit, an analog circuit, and / or a programmable core formed from programmable circuits. In an example where the operation of the video decoder 300 is performed by software executed on the programmable circuits, an on-chip or off-chip memory may store instructions (e.g., object code) of the software that the video decoder 300 receives and executes.
[0239] The entropy decoding unit 302 may receive the encoded video data from the CPB and entropy decode the video data to regenerate 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.
[0240] Figure 8 is a block diagram of an example entropy decoding unit 302 that may be configured to perform CABAC in accordance with techniques of this disclosure. Figure 8 The entropy decoding unit 302 is used with Figure 6CABAC is performed in a reverse manner to the entropy coding unit 220 described in . The decoded bits from the bitstream 2180 are input to the entropy decoding unit 302. The decoded bits are fed to the context modeler 2200 or the bypass decoding engine 2220 based on whether they were entropy coded using the normal mode or the bypass mode. If the decoded bits were coded in the bypass mode, the bypass decoding engine will use Golomb-Rice or exponential Golomb decoding, for example, to retrieve the bins of binary valued syntax elements or non-binary syntax elements.
[0241] If the decoded bits are decoded in a conventional mode, the context modeler 2200 may determine a probability model for the decoded bits, and the conventional decoding engine 2240 may decode the decoded bits to produce bins of non-binary valued syntax elements (or the syntax elements themselves, if binary values). After the context modeler 2200 determines the context and the probability state σ, the conventional decoding engine 2240 performs BAC to decode the bin values. In other words, the conventional decoding engine 2240 may determine the probability state of the context and decode the bin values based on the previously decoded bins and the current range. After decoding the bins, the context modeler 2200 may update the probability state of the context based on the window size and the value of the decoded bins.
[0242] Return to Figure 7 Generally, the video decoder 300 reconstructs a picture block by block. The video decoder 300 may perform a reconstruction operation on each block individually (wherein a block currently being reconstructed (ie, decoded) may be referred to as a "current block").
[0243] The entropy decoding unit 302 may entropy decode syntax elements defining the quantized transform coefficients of the quantized transform coefficient block and transform information such as a quantization parameter (QP) and / or a transform mode indication. The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine a degree of quantization and, likewise, a degree of inverse quantization to be applied by the inverse quantization unit 306. The inverse quantization unit 306 may, for example, perform a bitwise left shift operation to inverse quantize the quantized transform coefficients. The inverse quantization unit 306 may thereby form a transform coefficient block including the transform coefficients.
[0244] 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 directional transform, or another inverse transform to the transform coefficient block.
[0245] In addition, prediction processing unit 304 generates a prediction block based on the prediction information syntax elements entropy decoded by entropy decoding unit 302. For example, if the prediction information syntax elements indicate that the current block is inter-predicted, motion compensation unit 316 can generate a prediction block. In this case, the prediction information syntax elements can indicate a reference picture in DPB 314 from which to retrieve the reference block, and a motion vector that identifies the position of the reference block in the reference picture relative to the position of the current block in the current picture. Motion compensation unit 316 can generally generate a prediction block in the same manner as described for motion compensation unit 224 ( Figure 5 )The inter-frame prediction process is performed in a manner substantially similar to that described in detail above.
[0246] 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 generate a prediction block in the same manner as described with respect to the intra-prediction unit 226 ( Figure 5 The intra prediction process is performed in a substantially similar manner as described in the foregoing description. The intra prediction unit 318 may retrieve data of neighboring samples of the current block from the DPB 314.
[0247] The reconstruction unit 310 may reconstruct the current block using the prediction block and the residual block. For example, the reconstruction unit 310 may reconstruct the current block by adding samples of the residual block to corresponding samples of the prediction block.
[0248] The filter unit 312 may perform one or more filter operations on the reconstructed block. For example, the filter unit 312 may perform a deblocking operation to reduce blocking artifacts along the edges of the reconstructed block. The operations of the filter unit 312 need not be performed in all examples.
[0249] The video decoder 300 may store the reconstructed block in the DPB 314. For example, in examples where the operation of the filter unit 312 is not performed, the reconstruction unit 310 may store the reconstructed block in the DPB 314. In examples where the operation of the filter unit 312 is performed, the filter unit 312 may store the filtered reconstructed block in the DPB 314. As discussed above, the DPB 314 may provide reference information (such as samples of the current picture for intra-frame prediction and previously decoded pictures for subsequent motion compensation) to the prediction processing unit 304. In addition, the video decoder 300 may output the decoded picture from the DPB for use in, for example, Figure 1 Subsequent presentation on a display device 118 of the display device.
[0250] In this way, the video decoder 300 represents an example of a video decoding device, which includes: a memory configured to store video data; and one or more processing units, which are implemented in circuits and configured to: obtain a predefined slope index (e.g., SlopeIdx) and a predefined offset index (e.g., OffsetIdx) for a context in a plurality of contexts used in a context adaptive entropy decoding process for entropy decoding a value of a syntax element in a slice of video data; determine an initial probability state of a context for the slice of video data based on the predefined slope index and the predefined offset index; and entropy decode a bin of a value for the syntax element based on the initial probability state of the context.
[0251] Fig.19 2 is a flowchart illustrating an example method for encoding a current block. The current block may include a current CU. Although with respect to the video encoder 200 ( Figure 1 and 5 ), but it should be understood that other devices may be configured to perform the same Fig.19 A similar approach to the one used in this paper.
[0252] In this example, the video encoder 200 initially predicts a current block (350). For example, the video encoder 200 may form a prediction 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 the difference between the original, uncoded block and the prediction block for the current block. The video encoder 200 may then transform the residual block and quantize the coefficients of the residual block (354). Next, the video encoder 200 may scan the quantized transform coefficients of the residual block (356). During or after the scan, the video encoder 200 may entropy encode the coefficients (358). For example, the video encoder 200 may use the above and reference Fig. 20 Techniques for probability initialization discussed use CAVLC or CABAC to encode coefficients and / or other syntax elements. Video encoder 200 may then output entropy coded data for the block (360).
[0253] Fig. 20 is a flow diagram illustrating an example process for performing context-based entropy encoding in accordance with one or more techniques of this disclosure. Fig. 20 The technique may be performed by a video encoder, such as in Figure 1 , 5 For illustration purposes, the video encoder 200 shown in FIG. Figure 1 , 5 and 6 are described in the context of the video encoder 200 Fig. 20 However, a video encoder having a configuration different from that of the video encoder 200 may perform Fig. 20 technology.
[0254] The video encoder 200 may obtain a bin string (e.g., a one-dimensional binary vector) to be encoded using context-based entropy coding (e.g., CABAC) (2002). For example, the entropy encoding unit 220 of the video encoder 200 may obtain the bin string by binarizing the syntax element received from the mode selection unit 202 of the video encoder 200.
[0255] The video encoder 200 may obtain a predefined initialization value for a context among the plurality of contexts (2004). For example, the entropy encoding unit 220 of the video encoder 200 may obtain a value of initValue, which may be a six-bit variable.
[0256] Video encoder 200 may determine an initial probability state for a context of an independently decodable unit (e.g., a slice, a tile, etc.) of video data in a linear domain based on a predefined initialization value (2006). For example, entropy encoding unit 220 may determine the initial probability state of the context in a linear domain without intermediately determining the initial probability state of the context in a logarithmic domain. In some examples, entropy encoding unit 220 may determine the initial probability state without using a LUT to convert the initial probability state from a logarithmic domain to a linear domain.
[0257] To determine the initial probability state, entropy coding unit 220 may obtain an initial value of a quantization parameter associated with an independently decodable unit (eg, SliceQP Y ), and obtain the value of the quantization parameter anchor point that is not zero (e.g., QP anchor ). The entropy coding unit 220 may determine the initial probability state based on the difference between the initial value of the quantization parameter for the slice and the value of the quantization parameter anchor point. For example, the entropy coding unit 220 may determine the initial probability state according to the following equation:
[0258] InitProbState=((m*(SliceQP Y -QP anchor ))>>rshift)+n
[0259] Among them, InitProbState is the initial probability state, SliceQP Y is the initial value of the quantization parameter, QP anchor is the quantization parameter anchor point, and rshift is the right shift value.
[0260] As discussed above, in some examples, the entropy coding unit 220 can be configured to perform initialization for extreme probability distributions with increased precision. For example, the entropy coding unit 220 can determine the slope index value and the offset index value based on a predefined initialization value. The entropy coding unit 220 can perform the following operations: determine the value of m based on the slope index value; and determine the value of n based on the offset index value. In some examples, the entropy coding unit 220 can determine the value of n according to the following equation: n = (OffsetIdx * 18) + 1, where OffsetIdx is the offset index value. As shown above, in some examples, the entropy coding unit 220 can determine the initial probability state based on the value of m and the value of n.
[0261] The video encoder 200 may encode the bins of the bin string in the video bitstream and based on the initial probability state of the context (2008). For example, the entropy encoding unit 220 may output a binary stream of values or pointers representing probabilities within the final decoded probability interval of the context.
[0262] Fig.21 is a flowchart illustrating an example method for decoding a current block of video data. The current block may include a current CU. Although with respect to the video decoder 300 ( Figure 1 and 7 ), but it should be understood that other devices may be configured to perform the same Fig.21 A similar approach to the one used in this paper.
[0263] The video decoder 300 may receive entropy coded data for a current block (such as entropy coded prediction information and entropy coded data for coefficients of a residual block corresponding to the current block) (370). The video decoder 300 may entropy decode the entropy coded data to determine the prediction information for the current block and regenerate the coefficients of the residual block (372). For example, the video decoder 300 may use the above and reference Fig. 22 The techniques for probability initialization discussed use CAVLC or CABAC to decode coefficients and / or other syntax elements. The video decoder 300 may predict the current block (374), for example, using an intra-frame or inter-frame prediction mode as indicated by the prediction information for the current block, to calculate a prediction block for the current block. The video decoder 300 may then inverse scan the regenerated coefficients (376) to create a block of quantized transform coefficients. The video decoder 300 may then inverse quantize and inverse transform the coefficients to produce a residual block (378). Finally, the video decoder 300 may decode the current block (380) by combining the prediction block and the residual block.
[0264] Fig. 22is a flow chart illustrating an example process for performing context-based entropy decoding in accordance with one or more techniques of this disclosure. Fig. 22 The technique may be performed by a video decoder, such as in Figure 1 , 7 For illustration purposes, the video decoder 300 is shown in FIG. Figure 1 , 7 and 8 are described in the context of the video decoder 300 Fig. 22 However, a video decoder having a configuration different from that of the video decoder 300 may perform Fig. 22 technology.
[0265] The video decoder 300 may obtain a bin string (e.g., a one-dimensional binary vector) to be decoded using context-based entropy coding from a video bitstream (2202). For example, the entropy decoding unit 302 of the video decoder 300 may obtain the bin string from the CPB memory 320. In some examples, the bin string may represent a value or pointer to a probability within a probability interval of a final decoding of the context. In some examples, the context-based entropy coding may include context-adaptive binary arithmetic coding (CABAC).
[0266] The video decoder 300 may obtain a predefined initialization value for a context in the plurality of contexts (2204). For example, the entropy decoding unit 302 of the video decoder 300 may obtain a value of initValue, which may be a six-bit variable.
[0267] The video decoder 300 may determine an initial probability state for a context of an independently decodable unit of video data (e.g., a slice, a tile, etc.) in a linear domain based on a predefined initialization value (2206). For example, the entropy decoding unit 302 may determine the initial probability state of the context in the linear domain without intermediately determining the initial probability state of the context in the logarithmic domain. In some examples, the entropy decoding unit 302 may determine the initial probability state without using a LUT to convert the initial probability state from the logarithmic domain to the linear domain.
[0268] To determine the initial probability state, the entropy decoding unit 302 may obtain an initial value of a quantization parameter for the independently decodable unit (eg, SliceQP Y ), and obtain the value of the quantization parameter anchor point that is not zero (e.g., QP anchor ). The entropy decoding unit 302 may determine the initial probability state based on the difference between the initial value of the quantization parameter for the independently decodable unit and the value of the quantization parameter anchor point. For example, the entropy decoding unit 302 may determine the initial probability state according to the following equation:
[0269] InitProbState=((m*(SliceQP Y -QP anchor ))>>rshift)+n
[0270] Among them, InitProbState is the initial probability state, SliceQP Y is the initial value of the quantization parameter, QP anchor is the quantization parameter anchor point, and rshift is the right shift value.
[0271] As discussed above, in some examples, the entropy decoding unit 302 can be configured to perform initialization for extreme probability distributions with increased precision. For example, the entropy decoding unit 302 can determine the slope index value and the offset index value based on a predefined initialization value. The entropy decoding unit 302 can perform the following operations: determine the value of m based on the slope index value; and determine the value of n based on the offset index value. In some examples, the entropy decoding unit 302 can determine the value of n according to the following equation: n = (OffsetIdx * 18) + 1, where OffsetIdx is the offset index value. As shown above, in some examples, the entropy decoding unit 302 can determine the initial probability state based on the value of m and the value of n.
[0272] The video decoder 300 may decode a bin of the bin string based on the initial probability state of the context (2208). The video decoder 300 may determine an updated probability state of the context based on the decoded bin and the initial probability state of the context. The video decoder 300 may decode another bin based on the updated probability state of the context (2206).
[0273] The following numbered examples may illustrate one or more aspects of the present disclosure:
[0274] Example 1A. A method for entropy coding video data, the method comprising: obtaining a predefined slope index and a predefined offset index for a context in a plurality of contexts for use in a context adaptive entropy coding process for entropy coding a value of a syntax element in a slice of the video data; determining an initial probability state for the context for the slice of the video data based on the predefined slope index and the predefined offset index; and entropy coding bins for the value of the syntax element based on the initial probability state of the context.
[0275] Example 2A. The method of Example 1A, wherein the initial probability state represents an initial probability in a linear domain.
[0276] Example 3A. The method of Example 1A, wherein the initial probability state represents an initial probability in a secondary domain.
[0277] Example 4A. The method of Example 3A, wherein determining the initial probability state is performed without using a lookup table (LUT) to map between the predefined slope index, the predefined offset index, and the initial probability state.
[0278] Example 5A The method of any combination of Examples 1A-4A, wherein the initial probability state is represented by InitProbState, the slope index is represented by SlopeIdx, and the offset index is represented by OffsetIdx.
[0279] Example 6A. The method of any of Examples 1A-5A, wherein the context adaptive entropy coding process comprises a context adaptive binary arithmetic coding (CABAC) process or a context adaptive variable length coding (CAVLC) process.
[0280] Example 7A. The method of any of Examples 1A-6A, wherein the decoding comprises decoding.
[0281] Example 8A. The method of any of Examples 1A-7A, wherein decoding includes encoding.
[0282] Example 9A. An apparatus for decoding video data, the apparatus comprising one or more units for performing the method according to any of Examples 1A-8A.
[0283] Example 10A. The device of Example 9A, wherein the one or more units include one or more processors implemented in circuitry.
[0284] Example 11A. The apparatus of any of Examples 9A and 10A, further comprising: a memory for storing the video data.
[0285] Example 12A. The apparatus of any of Examples 9A-11A, further comprising: a display configured to display the decoded video data.
[0286] Example 13A. The device of any of Examples 9A-12A, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0287] Example 14A. The apparatus of any of Examples 9A-13A, wherein the apparatus comprises a video decoder.
[0288] Example 15A. The apparatus of any of Examples 9A-14A, wherein the apparatus comprises a video encoder.
[0289] Example 16A. A computer-readable storage medium having instructions stored thereon that, when executed, cause one or more processors to perform a method according to any of Examples 1A-8A.
[0290] Example 1B. A method for entropy coding video data, the method comprising: obtaining a predefined offset index for a context in a plurality of contexts for use in a context adaptive entropy coding process for entropy coding a value of a syntax element in a slice of the video data; determining an initial probability state for the context for the slice of the video data based on the predefined offset index; and entropy coding a bin for the value of the syntax element based on the initial probability state of the context.
[0291] Example 2B. The method of Example 1B, wherein the initial probability state represents an initial probability in a linear domain.
[0292] Example 3B. The method of Example 1B, wherein the initial probability state represents an initial probability in a secondary domain.
[0293] Example 4B. The method of Example 3B, wherein determining the initial probability state is performed without using a lookup table (LUT) to map between the predefined offset index and the initial probability state.
[0294] Example 5B The method of any combination of Examples 1B-4B, wherein the initial probability state is represented by InitProbState and the offset index is represented by OffsetIdx.
[0295] Example 6B. The method of any of Examples 1B-5B, wherein the context adaptive entropy coding process comprises a context adaptive binary arithmetic coding (CABAC) process or a context adaptive variable length coding (CAVLC) process.
[0296] Example 7B. The method of any of Examples 1B-6B, wherein the coding comprises decoding.
[0297] Example 8B. The method of any of Examples 1B-7B, wherein decoding includes encoding.
[0298] Example 9B. An apparatus for decoding video data, the apparatus comprising one or more units for performing the method according to any of Examples 1B-8B.
[0299] Example 10B. The device of Example 9B, wherein the one or more units include one or more processors implemented in a circuit.
[0300] Example 11B. The apparatus of any of Examples 9B and 10B, further comprising: a memory for storing the video data.
[0301] Example 12B. The apparatus of any of Examples 9B-11B, further comprising: a display configured to display the decoded video data.
[0302] Example 13B. The device of any of Examples 9B-12B, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0303] Example 14B. The apparatus of any of Examples 9B-13B, wherein the apparatus comprises a video decoder.
[0304] Example 15B. The apparatus of any of Examples 9B-14B, wherein the apparatus comprises a video encoder.
[0305] Example 16B. A computer-readable storage medium having instructions stored thereon that, when executed, cause one or more processors to perform a method according to any of Examples 1B-8B.
[0306] Example 1C. A method for entropy coding video data, the method comprising: determining a first intermediate value based on a value of a variable; determining a value of a low-precision probability state of a context model based on the first intermediate value, wherein determining the value of the low-precision probability state comprises right-shifting the first intermediate value; and coding a value of at least one bit of a syntax element based on the value of the low-precision probability state of the context model.
[0307] Example 2C. The method of Example 1C, wherein determining the first intermediate value comprises: determining the first intermediate value according to the following equation: q=Clip3(18,46,SliceQP Y )–16, where q is the first intermediate value and SliceQPY is the value of the variable.
[0308] Example 3C. The method according to Example 1C or Example 2C, wherein determining the value of the low-precision probability state of the context model includes: determining the value of the low-precision probability state of the context model according to the following equation: ProbabilityStateL=16*a+((ba)*q>>1)+8, wherein q is the first intermediate value, ProbabilityStateL is the value of the low-precision probability state of the context model, a is the second intermediate value, and b is the third intermediate value.
[0309] Example 4C The method of Example 3C, further comprising: determining values for a and b according to the following equations: a=(initValue>>3)*9b=(initValue&7)*9, where initValue is an initialization value.
[0310] Example 5C. The method of any one of Examples 1C-4C further includes determining a value of a high-precision probability state of the context model based on a value of the low-precision probability state of the context model.
[0311] Example 6C. The method according to Example 5C, wherein determining the value of the high-precision probability state of the context model comprises: determining the value of the high-precision probability state of the context model according to the following equation: ProbabilityStateH = ProbabilityStateL<<4, wherein ProbabilityStateH is the value of the high-precision probability state of the context model, and ProbabilityStateL is the value of the low-precision probability state of the context model.
[0312] Example 7C. The method of any of Examples 1C-6C, wherein the context adaptive entropy coding process comprises a context adaptive binary arithmetic coding (CABAC) process or a context adaptive variable length coding (CAVLC) process.
[0313] Example 8C. The method of any of Examples 1C-7C, wherein the decoding comprises decoding.
[0314] Example 9C. The method of any one of Examples 1C-8C, wherein decoding includes encoding.
[0315] Example 10C. An apparatus for decoding video data, the apparatus comprising one or more units for performing the method according to any of Examples 1C-9C.
[0316] Example 11C. The device of Example 10C, wherein the one or more units include one or more processors implemented in a circuit.
[0317] Example 12C. The apparatus of any of Examples 10C and 11C, further comprising: a memory for storing the video data.
[0318] Example 13C. The device of any of Examples 10C-12C, further comprising: a display configured to display the decoded video data.
[0319] Example 14C. The device of any of Examples 10C-13C, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0320] Example 15C. The device of any of Examples 10C-14C, wherein the device comprises a video decoder.
[0321] Example 16C. The apparatus of any of Examples 10C-15C, wherein the apparatus comprises a video encoder.
[0322] Example 17C. A computer-readable storage medium having instructions stored thereon that, when executed, cause one or more processors to perform a method according to any of Examples 1C-9C.
[0323] It is to be appreciated that, according to examples, certain actions or events of any of the techniques described herein may be performed in a different order, may be added, combined, or omitted entirely (e.g., not all described actions or events are necessary for the practice of the techniques). In addition, in some examples, actions or events may be performed concurrently rather than sequentially, such as through multithreading, interrupt handling, or multiple processors.
[0324] 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 sent through a computer-readable medium as one or more instructions or codes 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, the communication medium including, for example, any medium that facilitates the transfer of a computer program from one place to another according to a communication protocol. In this manner, a computer-readable medium may generally correspond to (1) a non-temporary tangible computer-readable storage medium, or (2) a communication medium such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to obtain instructions, codes, and / or data structures for implementing the techniques described in the present disclosure. A computer program product may include a computer-readable medium.
[0325] By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and can be accessed by a computer. In addition, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, optical fiber cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to send instructions from a website, server or other remote source, then the coaxial cable, optical fiber cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave) is included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but are instead directed to non-temporary tangible storage media. As used herein, disks and optical disks include compact disks (CDs), laser optical disks, optical disks, digital versatile disks (DVDs), floppy disks and blue-ray disks, wherein disks usually copy data magnetically, while optical disks use lasers to optically copy data. Combinations of the above should also be included within the scope of computer-readable media.
[0326] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Accordingly, the terms "processor" and "processing circuitry" as used herein may refer to any of the aforementioned structures or any other structure suitable for implementing the techniques described herein. In addition, in some aspects, the functions described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. In addition, the techniques may be fully implemented in one or more circuits or logic elements.
[0327] 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 are described in the present disclosure to emphasize the functional aspects of a device configured to perform the disclosed techniques, but do not necessarily need to be implemented by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit, or provided by a collection of interoperable hardware units (including one or more processors as described above) in combination with appropriate software and / or firmware.
[0328] Various examples have been described. These and other examples are within the scope of the following claims.
Claims
1. A method for entropy decoding video data, the method comprising: retrieving from a memory a predefined initialization value for a context of a plurality of contexts used in a context adaptive entropy coding process for entropy coding a value of a syntax element for an independently decodable unit of video data; Determining a slope index value and an offset index value based on the predefined initialization value; determining a value of a parameter m based on the slope index value; Based on the offset index value, the value of parameter n is determined according to the following equation: n=(OffsetIdx*18)+1, where OffsetIdx is the offset index value, Obtaining an initial value of a quantization parameter associated with the independently decodable unit; determining an initial probability state of the context based on the predefined initialization value, the parameter m, the parameter n and the initial value of the quantization parameter, wherein determining the initial probability state is further based on a difference between the initial value of the quantization parameter associated with the independently decodable unit and a non-zero value defining a quantization parameter anchor point; and Bins of values for the syntax elements are entropy decoded from a video bitstream and based on the initial probability state for the context.
2. The method according to claim 1, wherein: Determining the initial probability state of the context includes determining the initial probability state of the context in a linear domain without intermediately determining the initial probability state of the context in a logarithmic domain.
3. The method according to claim 1, wherein: The initial value of the quantization parameter is SliceQP Y .
4. The method according to claim 1, wherein: The value of the quantization parameter anchor point is defined as 16.
5. The method according to claim 1, wherein: Determining the initial probability state includes determining the initial probability state according to the following equation: InitProbState=clip3(1,127,((m*(SliceQP Y –QP anchor ))>>rshift)+n) Among them, InitProbState is the initial probability state, SliceQP Y is the initial value of the quantization parameter, QP anchor is the quantization parameter anchor point, and rshift is the right shift value.
6. The method according to claim 1, wherein: The entropy decoding includes: using context adaptive binary arithmetic coding (CABAC) to perform entropy decoding.
7. A video decoding device, comprising: A memory for storing video data; as well as One or more processors implemented in circuitry and configured to: retrieving from the memory a predefined initialization value for a context of a plurality of contexts used in a context adaptive entropy coding process for entropy coding values of syntax elements for independently decodable units of video data; Determining a slope index value and an offset index value based on the predefined initialization value; determining a value of a parameter m based on the slope index value; Based on the offset index value, the value of parameter n is determined according to the following equation: n=(OffsetIdx*18)+1, where OffsetIdx is the offset index value, Obtaining an initial value of a quantization parameter associated with the independently decodable unit; determining an initial probability state of the context based on the predefined initialization value, the parameter m, the parameter n and the initial value of the quantization parameter, wherein, in order to determine the initial probability state, the processor is further configured to determine the initial probability state based on a difference between the initial value of the quantization parameter associated with the independently decodable unit and a non-zero value defining a quantization parameter anchor point; and Bins of values for the syntax elements are entropy decoded from a video bitstream and based on the initial probability state for the context.
8. The device according to claim 7, wherein: To determine the initial probability state of the context, the one or more processors are configured to determine the initial probability state of the context in a linear domain without intermediately determining the initial probability state of the context in a logarithmic domain.
9. The device according to claim 7, wherein: The initial value of the quantization parameter is SliceQP Y .
10. The device according to claim 7, wherein: The value of the quantization parameter anchor point is 16.
11. The device according to claim 7, wherein: To determine the initial probability state, the one or more processors are configured to determine the initial probability state according to the following equation: InitProbState=clip3(1,127,((m*(SliceQP Y –QP anchor ))>>rshift)+n) Among them, InitProbState is the initial probability state, SliceQP Y is the initial value of the quantization parameter, QP anchor is the quantization parameter anchor point, and rshift is the right shift value.
12. The device according to claim 7, wherein: To entropy decode the bins, the one or more processors are configured to decode the bins using context-adaptive binary arithmetic coding (CABAC).
13. A method for entropy encoding video data, the method comprising: retrieving from a memory a predefined initialization value for a context of a plurality of contexts used in a context adaptive entropy coding process for entropy coding a value of a syntax element for an independently decodable unit of video data; Determining a slope index value and an offset index value based on the predefined initialization value; determining a value of a parameter m based on the slope index value; Based on the offset index value, the value of parameter n is determined according to the following equation: n=(OffsetIdx*18)+1, where OffsetIdx is the offset index value, Obtaining an initial value of a quantization parameter associated with the independently decodable unit; determining an initial probability state of the context based on the predefined initialization value, the parameter m, the parameter n and the initial value of the quantization parameter, wherein determining the initial probability state is further based on a difference between the initial value of the quantization parameter associated with the independently decodable unit and a non-zero value defining a quantization parameter anchor point; and Bins of values for the syntax elements are entropy encoded in a video bitstream and based on the initial probability state for the context.
14. The method according to claim 13, wherein: Determining the initial probability state of the context includes determining the initial probability state of the context in a linear domain without intermediately determining the initial probability state of the context in a logarithmic domain.
15. The method according to claim 13, wherein: The initial value of the quantization parameter is SliceQP Y .
16. The method according to claim 13, wherein: The value of the quantization parameter anchor point is 16.
17. The method according to claim 13, wherein: Determining the initial probability state includes determining the initial probability state according to the following equation: InitProbState=clip3(1,127,((m*(SliceQP Y –QP anchor ))>>rshift)+n) Among them, InitProbState is the initial probability state, SliceQP Y is the initial value of the quantization parameter, QP anchor is the quantization parameter anchor point, and rshift is the right shift value.
18. A video encoding device, comprising: A memory for storing video data; as well as One or more processors implemented in circuitry and configured to: retrieving from the memory a predefined initialization value for a context of a plurality of contexts used in a context adaptive entropy coding process for entropy coding values of syntax elements for independently decodable units of video data; Determining a slope index value and an offset index value based on the predefined initialization value; determining a value of a parameter m based on the slope index value; Based on the offset index value, the value of parameter n is determined according to the following equation: n=(OffsetIdx*18)+1, where OffsetIdx is the offset index value, Obtaining an initial value of a quantization parameter associated with the independently decodable unit; determining an initial probability state of the context based on the predefined initialization value, the parameter m, the parameter n and the initial value of the quantization parameter, wherein, in order to determine the initial probability state, the processor is further configured to determine the initial probability state based on a difference between the initial value of the quantization parameter associated with the independently decodable unit and a non-zero value defining a quantization parameter anchor point; and Bins of values for the syntax elements are entropy encoded in a video bitstream and based on the initial probability state for the context.
19. The apparatus according to claim 18, wherein: To determine the initial probability state of the context, the one or more processors are configured to determine the initial probability state of the context in a linear domain without intermediately determining the initial probability state of the context in a logarithmic domain.
20. The apparatus of claim 18, wherein:The initial value of the quantization parameter is SliceQP Y .
21. The apparatus of claim 18, wherein: The value of the quantization parameter anchor point is 16.
22. The apparatus of claim 18, wherein: To determine the initial probability state, the one or more processors are configured to determine the initial probability state according to the following equation: InitProbState=clip3(1,127,((m*(SliceQP Y –QP anchor ))>>rshift)+n) Among them, InitProbState is the initial probability state, SliceQP Y is the initial value of the quantization parameter, QP anchor is the quantization parameter anchor point, and rshift is the right shift value.
23. A device comprising: means for obtaining a predefined initialization value for a context of a plurality of contexts for use in a context adaptive entropy coding process for entropy coding values of syntax elements for independently decodable units of video data; means for determining a slope index value and an offset index value based on the predefined initialization value; means for determining a value of a parameter m based on the slope index value; means for determining a value of a parameter n based on the offset index value according to the following equation: n=(OffsetIdx*18)+1, wherein OffsetIdx is the offset index value, means for obtaining an initial value of a quantization parameter associated with said independently decodable unit; means for determining an initial probability state of the context based on the predefined initialization value, the parameter m, the parameter n and the initial value of the quantization parameter, wherein the means for determining the initial probability state comprises means for determining the initial probability state based on a difference between the initial value of the quantization parameter associated with the independently decodable unit and a non-zero value defining a quantization parameter anchor point; and Means for entropy decoding bins of values for the syntax elements from a bitstream and based on the initial probability state for the context.
24. A non-transitory computer-readable storage medium storing instructions that, when executed, cause one or more processors of a video decoder to: obtaining a predefined initialization value for a context of a plurality of contexts used in a context adaptive entropy coding process for entropy coding a value of a syntax element for an independently decodable unit of video data; Determining a slope index value and an offset index value based on the predefined initialization value; determining a value of a parameter m based on the slope index value; Based on the offset index value, the value of parameter n is determined according to the following equation: n=(OffsetIdx*18)+1, where OffsetIdx is the offset index value, Obtaining an initial value of a quantization parameter associated with the independently decodable unit; determining an initial probability state of the context based on the predefined initialization value, the parameter m, the parameter n and the initial value of the quantization parameter, wherein, in order to determine the initial probability state, the processor is further configured to determine the initial probability state based on a difference between the initial value of the quantization parameter associated with the independently decodable unit and a non-zero value defining a quantization parameter anchor point; and Bins of values for the syntax elements are entropy encoded from a bitstream and based on the initial probability state for the context.
Citation Information
Patent Citations
Probability initialization for video coding
US20200296378A1
Context initialization in entropy coding
CN107333141A
Advanced arithmetic coder
CN107667530A
Content initialization for enhancement layer coding
US20140092985A1
Context state and probability initialization for context adaptive entropy coding
US9484952B2
