Adaptive derivation of rice parameter value for high bit-depth video coding
By calculating the local sum of the absolute values of adjacent coefficients (locSumAbs) of video data blocks, the shift value is derived and the locSumAbs value is normalized to determine the Rice parameter. This solves the problem of the range limitation of the Rice parameter in high bit depth video encoding and decoding, and improves encoding efficiency and decoding quality.
Patent Information
- Application Number
- CN202180067320.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-10-05
- Filing Date
- 2021-10-06
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2041-10-06
AI Technical Summary
In high bit depth video coding and decoding, the range limitation of the Rice parameter in existing video coding standards leads to a decrease in coding and decoding performance, especially in high bit depth coding where the extended precision and range of coefficients cannot be effectively utilized.
By calculating the local sum of the absolute values of adjacent coefficients (locSumAbs) of video data blocks, the shift value is derived and the locSumAbs value is normalized to determine the Rice parameter, thereby expanding the range of the Rice parameter to adapt to high bit depth video encoding and decoding.
It improves the performance of video encoding and decoding, especially in the case of high bit depth coding, enhancing encoding efficiency and decoding quality.
Smart Images

Figure CN116325738B_ABST
Abstract
Description
[0001] Cross-reference to related applications
[0002] This application claims priority to U.S. Patent Application No. 17 / 494,418, filed October 5, 2021; U.S. Provisional Patent Application No. 63 / 088,010, filed October 6, 2020; and U.S. Provisional Patent Application No. 63 / 090,615, filed October 12, 2020, the entire contents of each of which are incorporated herein by reference. U.S. Patent Application No. 17 / 494,418, filed October 5, 2021, claims the benefit of U.S. Provisional Patent Application No. 63 / 088,010, filed October 6, 2020, and U.S. Provisional Patent Application No. 63 / 090,615, filed October 12, 2020. Technical Field
[0003] This disclosure relates to video encoding and decoding, including video encoding and video decoding. Background Technology
[0004] Digital video capabilities can be integrated into a wide range of devices, including digital televisions, digital direct broadcasting systems, wireless broadcasting systems, personal digital assistants (PDAs), laptops or desktop computers, tablets, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio phones, so-called "smartphones," video conferencing equipment, video streaming devices, and more. Digital video devices implement video codec technologies, such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10, Advanced Video Codec (AVC), ITU-T H.265 / High-Efficiency Video Codec (HEVC), and extensions to these standards. By implementing such video codec technologies, video devices can more efficiently transmit, receive, encode, decode, and / or store digital video information.
[0005] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy of the video sequence. For block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) can be partitioned into video blocks, which can also be referred to as coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in the intra-coded (I) slices of a picture are coded using spatial prediction with respect to reference samples in neighboring blocks within the same picture. Video blocks in the inter-coded (P or B) slices of a picture can be coded by using either spatial prediction with respect to reference samples in neighboring blocks in the same picture or temporal prediction with respect to reference samples in other reference pictures. Pictures can be referred to as frames, and reference pictures can be referred to as reference frames. SUMMARY
[0006] In general, this disclosure describes techniques for adaptively deriving a Rice parameter value for regular residual coding (RRC) in high bit-depth video coding. Specifically, these techniques generally include deriving a shift value from a computed local sum of absolute values (locSumAbs value) of neighboring coefficients of a current coefficient of a current block of video data, normalizing the locSumAbs value using the shift value, and deriving a Rice parameter from the normalized locSumAbs value. These techniques can be incorporated into extensions of ITU-T H.266 / Versatile Video Coding (VVC) or other video coding standards.
[0007] In one example, a method of binarizing video data includes computing a local sum of absolute values (locSumAbs value) of neighboring coefficients of a current coefficient of a current block of video data, deriving a shift value from the locSumAbs value, normalizing the locSumAbs value using the shift value to generate a normalized locSumAbs value, determining a Rice parameter using the normalized locSumAbs value, and binarizing or de-binarizing the current coefficient using the Rice parameter.
[0008] In another example, an apparatus for binarizing video data includes a memory configured to store video data, and one or more processors implemented in circuitry configured to compute a local sum of absolute values (locSumAbs value) of neighboring coefficients of a current coefficient of a current block of video data, derive a shift value from the locSumAbs value, normalize the locSumAbs value using the shift value to generate a normalized locSumAbs value, determine a Rice parameter using the normalized locSumAbs value, and binarize or de-binarize the current coefficient using the Rice parameter.
[0009] In another example, a computer-readable storage medium has stored thereon instructions that, when executed, cause a processor to calculate a local sum value (locSumAbs value) of absolute values of neighboring coefficients of a current coefficient of a current block of video data; derive a shift value from the locSumAbs value; normalize the locSumAbs value using the shift value to generate a normalized locSumAbs value; determine a Rice parameter using the normalized locSumAbs value; and binarize or inverse binarize the current coefficient using the Rice parameter.
[0010] In another example, a device for binarizing video data includes means for calculating a local sum value (locSumAbs value) of absolute values of neighboring coefficients of a current coefficient of a current block of video data; means for deriving a shift value from the locSumAbs value; means for normalizing the locSumAbs value using the shift value to generate a normalized locSumAbs value; means for determining a Rice parameter using the normalized locSumAbs value; and means for binarizing or inverse binarizing the current coefficient using the Rice parameter.
[0011] The details of one or more examples of the disclosure are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the disclosure will be apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF DRAWINGS
[0012] Figure 1 FIG. 1 is a block diagram illustrating an example video encoding and decoding system that can perform the techniques of this disclosure.
[0013] Figure 2A and 2B FIG. 2 is a conceptual diagram illustrating an example quad-tree binary tree (QTBT) structure and corresponding coding tree units (CTUs).
[0014] Figure 3 FIG. 3 is a block diagram illustrating an example video encoder that can perform the techniques of this disclosure.
[0015] Figure 4 FIG. 4 is a block diagram illustrating an example video decoder that can perform the techniques of this disclosure.
[0016] Figure 5 FIG. 5 is a conceptual diagram illustrating an example set of neighboring coefficients that can be used when calculating a local sum of absolute values (locSumAbs) of neighboring coefficients of a current coefficient.
[0017] Figure 6 FIG. 6 is a flowchart illustrating an example method for encoding a current block according to the techniques of this disclosure.
[0018] Figure 7 FIG. 1 is a flowchart illustrating an example method for decoding a current block according to the techniques of this disclosure.
[0019] Figure 8 FIG. 2 is a flowchart illustrating an example method of binarizing video data according to the techniques of this disclosure.
[0020] Figure 9 FIG. 3 is a flowchart illustrating an example method of inverse binarizing video data according to the techniques of this disclosure. DETAILED DESCRIPTION
[0021] Video coding standards include ITU-T H.261, ISO / IEC MPEG-1 Visual, ITU-T H.262 or ISO / IEC MPEG-2 Visual, ITU-T H.263, ISO / IEC MPEG-4 Visual and ITU-T H.264 (also known as ISO / IEC MPEG-4 AVC), including its Scalable Video Coding (SVC) and Multiview Video Coding (MVC) extensions. High Efficiency Video Coding (HEVC) was finalized by the ITU-T Video Coding Experts Group (VCEG) and ISO / IEC Motion Picture Experts Group (MPEG) Video Coding Joint Collaborative Team (JCT-VC) in April 2013.
[0022] The Joint Video Experts Team (JVET) is a collaborative group consisting of the VCEG of MPEG and ITU-T Study Group 16, which is recently working on a new video coding standard called Versatile Video Coding (VVC). The main goal of VVC is to significantly improve the compression performance over the existing HEVC standard, helping the deployment of higher quality video services and emerging applications such as 360° omnidirectional immersive multimedia and high dynamic range (HDR) video. The development of the VVC standard was completed in 2020. A draft of VVC can be found at phenix.it-sudparis.eu / jvet / doc_end_user / documents / 19_Teleconference / wg11 / JVET-S2001-v17.zip.
[0023] The present disclosure recognizes that, in one example draft of the VVC specification, the Rice parameter has been widely tested for encoding video sources of 8-bit depth or 10-bit depth. In the example design, the Rice parameter value depends on the value of locSumAbs and is limited to the range of 0 to 3 by clipping. When the bit depth of the input video is increased, the extended precision is enabled, or the quantization parameter is set very low, the range of the coefficients and thus the locSumAbs value can increase significantly. In this case, some of the ranges of the Rice parameter values allowed in the example draft of VVC are insufficient. This limitation can lead to a decrease in coding performance in VVC and other video coding standards when high bit depth is used for coding. Accordingly, the present disclosure describes techniques that can increase the range of the Rice parameter, e.g., for high bit depth video coding.
[0024] Figure 1 FIG. 1 is a block diagram illustrating an example video encoding and decoding system 100 that can perform the techniques of this disclosure. The techniques of this disclosure are generally directed to coding (encoding and / or decoding) video data. In general, video data includes any data for processing video. Thus, video data can include raw, uncoded video, coded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling data.
[0025] As Figure 1 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. In particular, source device 102 provides the video data to destination device 116 via a computer- readable medium 110. Source device 102 and destination device 116 can comprise any of a wide variety of devices, including desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, handheld phones such as smartphones, televisions, cameras, display devices, digital media players, video gaming consoles, video streaming devices, and the like. In some cases, source device 102 and destination device 116 can be equipped for wireless communication, and thus can be referred to as wireless communication devices.
[0026] In Figure 1In the example, source device 102 includes a video source 104, memory 106, video encoder 200, and output interface 108. Destination device 116 includes an input interface 122, video decoder 300, memory 120, and display device 118. According to this disclosure, the video encoder 200 of source device 102 and the video decoder 300 of destination device 116 can be configured to apply techniques for adaptively derived Rice parameters for high bit depth video encoding and decoding. Thus, source device 102 represents an example of a video encoding device, while destination device 116 represents an example of a video decoding device. In other examples, the source device and destination device may include other components or arrangements. For example, source device 102 may receive video data from an external video source such as an external camera. Similarly, destination device 116 may interface with an external display device instead of including an integrated display device.
[0027] like Figure 1 The system 100 shown is merely an example. Typically, any digital video encoding and / or decoding device can perform techniques for adaptively derived Rice parameters for high bit-depth video encoding and decoding. Source device 102 and destination device 116 are merely examples of such encoding / decoding devices, where source device 102 generates encoded / decoded video data to be sent to destination device 116. This disclosure refers to "encoding / decoding" devices as devices that perform the encoding and / or decoding of data. Thus, video encoder 200 and video decoder 300 represent examples of encoding / decoding devices, specifically a video encoder and a video decoder, respectively. In some examples, source device 102 and destination device 116 may operate in a substantially symmetrical manner, such that each of source device 102 and destination device 116 includes video encoding and decoding components. Therefore, system 100 can support unidirectional or bidirectional video transmission between source device 102 and destination device 116 (e.g., for video streaming, video playback, video broadcasting, or video telephony).
[0028] In general, video source 104 represents a source of video data (i.e., raw, uncoded video data) and provides a continuous series of pictures (also referred to as “frames”) of the video data to video encoder 200, which encodes data for the pictures. Video source 104 of source device 102 can include a video capture device, such as a camera, a video archive containing previously captured raw video, and / or a video feed interface to receive video from a video content provider. As yet another alternative, video source 104 can generate computer graphics-based data as the source video, or a combination of live video, archived video, and computer-generated video. In each case, video encoder 200 encodes the captured, pre-captured, or computer-generated video data. Video encoder 200 can rearrange the pictures from the received order (sometimes referred to as “display order”) into an encoding order for coding. Video encoder 200 can generate a bitstream including encoded video data. Source device 102 can then output the encoded video data via output interface 108 onto computer- readable medium 110 for reception and / or retrieval by, for example, input interface 122 of destination device 116.
[0029] Memory 106 of source device 102 and memory 120 of destination device 116 represent general purpose memories. In some examples, memories 106, 120 can store raw video data, e.g., raw video from video source 104 and raw decoded video data from video decoder 300. Additionally or alternatively, memories 106, 120 can store software instructions executable by, e.g., video encoder 200 and video decoder 300, respectively. Although memory 106 and memory 120 are shown separately from video encoder 200 and video decoder 300 in this example, it should be understood that video encoder 200 and video decoder 300 can also include internal memories that are functionally similar or equivalent to memories 106, 120. Furthermore, memories 106, 120 can store encoded video data, e.g., data output from video encoder 200 and input to video decoder 300. In some examples, portions of memories 106, 120 can be allocated as one or more video buffers, e.g., to store raw, decoded, and / or encoded video data.
[0030] Computer-readable medium 110 can represent any type of medium or device capable of transporting the encoded video data from source device 102 to destination device 116. In one example, computer-readable medium 110 represents a communication medium to enable source device 102 to transmit encoded video data directly to destination device 116 in real-time, e.g., via a radio frequency network or computer-based network. Output interface 108 can modulate a transmission signal including the encoded video data, and input interface 122 can demodulate the received transmission signal, according to a communication standard, such as a wireless communication protocol. The communication medium can comprise any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium can form part of a packet-based network, such as a local area network, a wide-area network, or a global network such as the Internet. The communication medium can include routers, switches, base stations, or any other equipment that can be useful to facilitate communication from source device 102 to destination device 116.
[0031] In some examples, source device 102 can output encoded data from output interface 108 to storage device 112. Similarly, destination device 116 can access encoded data from storage device 112 via input interface 122. Storage device 112 can include any of a variety of distributed or locally accessed data storage media such as a hard drive, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing encoded video data.
[0032] In some examples, source device 102 can output encoded video data to file server 114 or another intermediate storage device that can store the encoded video generated by source device 102. Destination device 116 can access stored video data from file server 114 via streaming or download.
[0033] The file server 114 can be any type of server device capable of storing encoded video data and transmitting that encoded video data to the destination device 116. The file server 114 can represent a web server (e.g., for a website), a server configured to provide file transfer protocol services (such as File Transfer Protocol (FTP) or File Delivery over Unidirectional Transport (FLUTE) protocol), a content delivery network (CDN) device, a hypertext transfer protocol (HTTP) server, a multimedia broadcast multicast service (MBMS) or enhanced MBMS (eMBMS) server, and / or a network attached storage (NAS) device. The file server 114 can additionally or alternatively implement one or more HTTP streaming protocols, such as Dynamic Adaptive Streaming over HTTP (DASH), HTTP Live Streaming (HLS), Real Time Streaming Protocol (RTSP), HTTP Dynamic Streaming, and the like.
[0034] The destination device 116 can access encoded video data from the file server 114 through any standard data connection, including an Internet connection. This can include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a digital subscriber line (DSL), a cable modem, or the like), or a combination of both, that is suitable for accessing encoded video data stored on the file server 114. The input interface 122 can be configured to operate according to any one or more of various protocols for retrieving or receiving media data from the file server 114 as set forth above, or other such protocols for retrieving media data.
[0035] The output interface 108 and the input interface 122 can represent wireless transmitters / receivers, modems, wired networking components (e.g., Ethernet cards), wireless communication components operating according to any of a variety of IEEE 802.11 standards, or other physical components. In examples where the output interface 108 and the input interface 122 include wireless components, the output interface 108 and the input interface 122 can be configured to transmit data, such as encoded video data, according to a cellular communication standard, such as 4G, 4G-LTE (Long-Term Evolution), LTE Advanced, 5G, or the like. In some examples where the output interface 108 includes a wireless transmitter, the output interface 108 and the input interface 122 can be configured to transmit and receive data, respectively, according to a Bluetooth® specification. In some examples, the output interface 108 can include a wired connector (e.g., for connection to AC power, USB, HDMI, etc.), and the input interface 122 can receive data from a corresponding wired connector. Other wireless standards, such as those used for transmitting encoded video data, may be employed. 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 an SoC device performing functions belonging to video encoder 200 and / or output interface 108, and destination device 116 may include an SoC device performing functions belonging to video decoder 300 and / or input interface 122.
[0036] The techniques disclosed herein can be applied to video encoding and 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 HTTP-based Dynamic Adaptive Streaming (DASH)), digital video encoded to a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0037] The input interface 122 of the destination device 116 receives an encoded video bitstream from a computer-readable medium 110 (e.g., a communication medium, storage device 112, file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200, which is also used by the video decoder 300, such as syntax elements having values describing the characteristics and / or processing of video blocks or other encoded / decoded units (e.g., slices, pictures, picture groups, sequences, etc.). The display device 118 displays decoded images of the decoded video data to the user. The display device 118 may represent any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or another type of display device.
[0038] Although not in Figure 1 As shown, but in some examples, the video encoder 200 and video decoder 300 may each be integrated with the audio encoder and / or audio decoder, and may include appropriate MUX-DEMUX units or other hardware and / or software to process multiplexed streams that include both audio and video in a common data stream. Where applicable, the MUX-DEMUX unit may conform to the ITU H.223 multiplexer protocol or other protocols such as User Datagram Protocol (UDP).
[0039] Video encoder 200 and video decoder 300 each can be implemented as any of a variety of suitable encoder and / or decoder circuitry, 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 combinations thereof. When the techniques are implemented partially in software, a device can store instructions for the software in a suitable, non- transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Each of video encoder 200 and video decoder 300 can be included in one or more encoders or decoders, either of which can be integrated as part of a combined encoder / decoder (CODEC) in a respective device. A device including video encoder 200 and / or video decoder 300 can comprise an integrated circuit, a microprocessor, and / or a wireless communication device, such as a cellular telephone.
[0040] Video encoder 200 and video decoder 300 can operate according to a video coding standard, such as ITU-T H.265, also referred to as High Efficiency Video Coding (HEVC) or extensions thereof, such as multi-view and / or scalable video coding extensions. Alternatively, video encoder 200 and video decoder 300 can operate according to other proprietary or industry standards, such as Versatile Video Coding (VVC). A draft of the VVC standard is described in Bross, et al., “Versatile Video Coding (Draft 9),” Joint Video Team (JVT) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 18th Meeting: 15-24 April, JVET-R2001-v8 (hereinafter “VVC Draft 9”). The techniques of this disclosure, however, are not limited to any particular coding standard.
[0041] In general, video encoder 200 and video decoder 300 can perform block-based coding of pictures. The term “block” generally refers to a structure comprising data to be processed (e.g., encoded, decoded, or otherwise used in the encoding process and / or the decoding process). For example, a block can comprise a two-dimensional matrix of samples of luma and / or chroma data. In general, video encoder 200 and video decoder 300 can code video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, rather than coding samples of red, green, and blue (RGB) data of a picture, video encoder 200 and video decoder 300 can code luma and chroma components, where the chroma components can include both red hue and blue hue chroma components. In some examples, video encoder 200 converts received RGB formatted data to a YUV representation prior to encoding, and video decoder 300 converts the YUV representation to the RGB format. Alternatively, pre- and post-processing units (not shown) can perform these conversions.
[0042] This disclosure can generally relate to coding (e.g., encoding and decoding) of pictures, including processes that encode or decode data of pictures. Similarly, this disclosure can relate to coding of blocks of pictures, including processes that encode or decode data for blocks, e.g., prediction and / or residual coding. An encoded video bitstream generally includes a series of values for syntax elements that represent coding decisions (e.g., coding modes) and partitioning of pictures into blocks. Accordingly, references to coding a picture or block should generally be understood to code values of syntax elements that form the picture or block.
[0043] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video coder (such as video encoder 200) partitions a coding tree unit (CTU) into CUs according to a quadtree structure. That is, the video coder partitions a CTU and CUs into four equal, non overlapping squares, and each node of the quadtree either has zero or is a parent of four child nodes. Nodes with zero child nodes can be referred to as “leaf nodes,” and CUs of such leaf nodes can include one or more PUs and / or one or more TUs. Video coder can further partition PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents partitioning of TUs. In HEVC, PUs represent inter-predicted data, while TUs represent residual data. Intra-predicted CUs include intra-prediction information, such as an intra-mode indication.
[0044] As another example, video encoder 200 and video decoder 300 can be configured to operate according to VVC. According to VVC, a video coder (such as video encoder 200) partitions a picture into a plurality of coding tree units (CTUs). Video encoder 200 can partition a CTU according to a tree structure such as a quad-tree binary tree (QTBT) structure or a multi-type tree (MTT) structure. The QTBT structure removes the concepts of multiple partition types such as the separation between CUs, PUs, and TUs of HEVC. The QTBT structure includes two layers: a first layer partitioned according to quad-tree partitioning and a second layer partitioned according to binary tree partitioning. A root node of the QTBT structure corresponds to a CTU. Leaf nodes of the binary trees correspond to coding units (CUs).
[0045] In the MTT partitioning structure, blocks can be partitioned using quad-tree (QT) partitioning, binary tree (BT) partitioning, and one or more types of ternary tree (TT) (also referred to as tri-tree) partitioning. A ternary tree or tri-tree partitioning is a partitioning that splits a block into three sub-blocks. In some examples, a ternary tree or tri-tree partitioning splits a block into three sub-blocks without splitting the original block by a center. The partitioning types (e.g., QT, BT, and TT) in the MTT can be symmetric or asymmetric.
[0046] In some examples, video encoder 200 and video decoder 300 can use a single QTBT or MTT structure to represent each of luma and chroma components, while in other examples, video encoder 200 and video decoder 300 can use two or more QTBT or MTT structures, such as one QTBT / MTT structure for luma components and another QTBT / MTT structure for two chroma components (or two QTBT / MTT structures for respective chroma components).
[0047] Video encoder 200 and video decoder 300 can be configured to use quad-tree partitioning according to HEVC, QTBT partitioning, MTT partitioning, or other partition structures. For purposes of explanation of the techniques of this disclosure, the description of the techniques of this disclosure is presented with respect to QTBT partitioning. However, it should be understood that the techniques of this disclosure can also be applied to video coders configured to use quad-tree partitioning or other types of partitioning.
[0048] In some examples, a CTU includes a coding tree block (CTB) of luma samples, two corresponding CTBs of chroma samples of a picture having three arrays of samples, or a CTB of samples of a monochrome picture or a picture coded using three separate color planes and syntax structures used to code the samples. A CTB can be an NxN block of samples for some value of N such that partitioning a component into CTBs is a type of partitioning. A component can be an array from one of the three arrays (luma and two chroma) of a picture in 4:2:0, 4:2:2, 4:4:4 color formats or a single sample or array of single samples of an array of a picture in monochrome format. In some examples, a coding block is an MxN block of samples for some values of M and N such that partitioning a CTB into coding blocks is a type of partitioning.
[0049] A block (e.g., a CTU or CU) can be grouped in various ways in a picture. As one example, a tile can refer to a rectangular region of CTU rows within a particular tile within a picture. A tile can be a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. A tile column refers to a rectangular region of CTUs whose height is equal to the height of the picture and whose width is specified by a syntax element (e.g., such as in a picture parameter set). A tile row refers to a rectangular region of CTUs whose height is specified by a syntax element (e.g., such as in a picture parameter set) and whose width is equal to the width of the picture.
[0050] In some examples, a tile can be partitioned into multiple tiles, each of which can include one or more CTU rows within the tile. A tile that is not partitioned into multiple tiles can also be referred to as a tile. However, a tile that is a proper subset of a tile can not be referred to as a tile.
[0051] Tiles in a picture can also be arranged in slices. A slice can be an integer number of tiles of a picture that can be exclusively contained in a single network abstraction layer (NAL) unit. In some examples, a slice includes multiple complete tiles or only a complete sequence of tiles of a single tile.
[0052] The disclosure can 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, e.g., 16x16 samples or 16 by 16 samples. In general, a 16x16 CU has 16 samples in the vertical direction (y = 16) and 16 samples in the horizontal direction (x = 16). Similarly, an NxN CU generally has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. The samples in a CU can be arranged in rows and columns. Furthermore, a CU need not necessarily have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU can include N x M samples, where M need not necessarily equal N.
[0053] Video encoder 200 encodes video data of CUs that represent prediction and / or residual information, among other information. Prediction information indicates how to predict a CU in order to form a prediction block for the CU. Residual information generally represents sample-by-sample differences between the CU prior to encoding and the prediction block.
[0054] To predict a CU, video encoder 200 can generally form a prediction block for the CU through inter-prediction or intra-prediction. Inter-prediction generally refers to predicting the CU from data of a previously coded picture, whereas intra-prediction generally refers to predicting the CU from previously coded data of the same picture. To perform inter-prediction, video encoder 200 can use one or more motion vectors to generate the prediction block. Video encoder 200 generally performs a motion search to identify a reference block that closely matches the CU (e.g., in terms of differences between the CU and the reference block). Video encoder 200 can calculate a difference metric using a sum of absolute difference (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared differences (MSD), or other such difference calculations to determine whether a reference block closely matches a current CU. In some examples, video encoder 200 can use uni -prediction or bi-prediction to predict a current CU.
[0055] Some examples of VVC also provide an affine motion compensation mode, which can be considered an inter-prediction mode. In affine motion compensation mode, video encoder 200 can determine two or more motion vectors that represent non-translational motion, such as scaling or zooming, rotation, perspective motion, or other irregular types of motion.
[0056] To perform intra-prediction, video encoder 200 can select an intra-prediction mode to generate the prediction block. Some examples of VVC provide sixty-seven intra-prediction modes, including various directional modes, as well as a planar mode and a DC mode. Generally, video encoder 200 selects an intra-prediction mode that describes a prediction of samples of a current block (e.g., a block of a CU) from neighboring samples of the current block. Such samples can generally be above, above-left, or left of the current block in the same picture as the current block, assuming video encoder 200 encodes the CTU and CUs in a raster scan order (from left to right, top to bottom).
[0057] Video encoder 200 encodes data representing a prediction mode for the current block. For example, for inter prediction modes, video encoder 200 can encode data representing which of various available inter prediction modes is used, as well as motion information for the corresponding mode. For uni-directional or bi-directional inter prediction, video encoder 200 can encode motion vectors using advanced motion vector prediction (AMVP) or merge mode, for example. Video encoder 200 can use similar modes to encode motion vectors for affine motion compensation modes.
[0058] Following prediction, such as intra prediction or inter prediction of a block, video encoder 200 can calculate residual data for the block. The residual data, such as a residual block, represents sample-by-sample differences between the block and a prediction block for the block, the prediction block being formed using the corresponding prediction mode. Video encoder 200 can apply one or more transforms to the residual block to produce transformed data in a transform domain rather than the sample domain. For example, video encoder 200 can apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform. Additionally, video encoder 200 can apply a secondary transform following the first transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), or the like. Video encoder 200 produces transform coefficients following application of the one or more transforms.
[0059] As described above, following any transforms to produce transform coefficients, video encoder 200 can perform quantization of the transform coefficients. Quantization generally refers to a process in which transform coefficients are quantized to possibly reduce the amount of data used to represent the transform coefficients, providing further compression. By performing the quantization process, video encoder 200 can reduce the bit depth of some or all of the transform coefficients. For example, video encoder 200 can round n-bit values to m-bit values during quantization, where n is greater than m. In some examples, to perform quantization, video encoder 200 can perform a bitwise right-shift of the values to be quantized.
[0060] After quantization, video encoder 200 can scan the transform coefficients, producing a one-dimensional vector from the two-dimensional matrix including the quantized transform coefficients. The scan can be designed to place higher energy (and hence lower frequency) transform coefficients earlier in the vector and lower energy (and hence higher frequency) transform coefficients later in the vector. In some examples, video encoder 200 can scan the quantized transform coefficients with a pre-defined scan order to produce a serialized vector, and then entropy encode the quantized transform coefficients of the vector. In other examples, video encoder 200 can perform an adaptive scan. After scanning the quantized transform coefficients to form a one-dimensional vector, video encoder 200 can entropy encode the one-dimensional vector, e.g., according to context adaptive binary arithmetic coding (CABAC). Video encoder 200 can also entropy encode values for syntax elements describing metadata associated with the encoded video data for use by video decoder 300 when decoding the video data.
[0061] To perform CABAC, video encoder 200 can first binarize the value to be encoded, i.e., by forming a string of binary values, also referred to as “bins.” Video encoder 200 can assign a context within a context model to a symbol, e.g., each bin, to be transmitted. The context can relate to, for example, whether neighboring values of the symbol are zero-valued or not. The probability determination can be based on the context assigned to the symbol.
[0062] In the case of transform coefficient coding, video encoder 200 and video decoder 300 can code values for syntax elements representing level values of transform coefficients. In some examples, such syntax elements include a significant coefficient flag (indicating whether the absolute value of a transform coefficient level is greater than zero), a greater- than-1 flag (indicating whether the absolute value of a transform coefficient level is greater than 1), a greater-than-2 flag (indicating whether the absolute value of a transform coefficient level is greater than 2), and, if the transform coefficient level has an absolute value greater than 2, a remaining level value representing the actual value of the transform coefficient. Video encoder 200 and video decoder 300 can binarize the remaining level value using a Golomb-Rice code and a determined Rice parameter.
[0063] Video encoder 200 and video decoder 300 can use values of other transform coefficients in a neighborhood around the current transform coefficient to determine a Rice parameter for the current transform coefficient. That is, video encoder 200 and video decoder 300 can determine the Rice parameter from neighboring transform coefficients (i.e., transform coefficients in the neighborhood) of the current transform coefficient. For example, video encoder 200 and video decoder 300 can determine the Rice parameter from a value of a transform coefficient immediately to the right of the current transform coefficient, values of two transform coefficients to the right of the current transform coefficient, a value of a transform coefficient below and to the right of the current transform coefficient, a value of a transform coefficient immediately below the current transform coefficient, and values of two transform coefficients below the current transform coefficient. Video encoder 200 and video decoder 300 can compute a sum of the values of the absolute values of these transform coefficients, where such a sum can be referred to as a “local sum of absolute values” or “locSumAbs” value.
[0064] According to techniques of this disclosure, video encoder 200 and video decoder 300 can derive a shift value from the locSumAbs value and use the shift value to normalize the locSumAbs value, rather than using the locSumAbs value to immediately perform a lookup of the Rice parameter in a lookup table. For example, the shift value can represent a number of bits to perform a bitwise right shift of the locSumAbs value. Video encoder 200 and video decoder 300 can then use the normalized locSumAbs value to perform a lookup of the Rice parameter in a lookup table. Video encoder 200 and video decoder 300 can then use the determined Rice parameter to binarize (or de-binarize) the current transform coefficient.
[0065] Video encoder 200 can also generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, to video decoder 300, e.g., 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). Video decoder 300 can similarly decode such syntax data to determine how to decode corresponding video data.
[0066] In this manner, video encoder 200 can generate a bitstream including encoded video data, e.g., syntax elements describing partitioning of a picture into blocks (e.g., CUs) and prediction and / or residual information for the blocks. Ultimately, video decoder 300 can receive the bitstream and decode the encoded video data.
[0067] In general, video decoder 300 performs a reciprocal process to that performed by video encoder 200 to decode encoded video data of the bitstream. For example, video decoder 300 can decode values for syntax elements of the bitstream using CABAC in a manner substantially similar, albeit reciprocal, to the CABAC encoding process of video encoder 200. The syntax elements can define partitioning information for partitioning a picture into CTUs and partitioning each CTU according to a corresponding partition structure, such as a QTBT structure, to define CUs of the CTU. The syntax elements can further define prediction and residual information for blocks (e.g., CUs) of the video data.
[0068] The residual information can be represented by, for example, quantized transform coefficients. Video decoder 300 can inverse quantize and inverse transform the quantized transform coefficients of a block to reproduce a residual block for the block. Video decoder 300 forms a prediction block for the block using the signaled prediction mode (intra prediction or inter prediction) and related prediction information (e.g., motion information for inter prediction). Video decoder 300 can then combine (on a sample-by-sample basis) the prediction block and the residual block to reproduce the original block. Video decoder 300 can perform additional processing, such as performing a deblocking process to reduce visual artifacts along boundaries of the block.
[0069] This disclosure can generally relate to “signaling” certain information, such as syntax elements. The term “signaling” can generally refer to the communication of values for syntax elements and / or other data used to decode encoded video data. That is, video encoder 200 can signal values for syntax elements in the bitstream. In general, signaling refers to generating the values in the bitstream. As described above, source device 102 can transmit the bitstream to destination device 116 in real time or non-real time (such as can occur when storing the bitstream to storage device 112 for later retrieval by destination device 116).
[0070] According to techniques of this disclosure, video encoders, such as video encoder 200 and video decoder 300, can be configured to perform Rice parameter derivation in an improved manner relative to conventional VVC. That is, video encoder 200 and video decoder 300 can be configured to derive Rice parameters at various input bit depths of video data. These techniques can improve compression efficiency of codec design.
[0071] In one example, video encoder 200 and video decoder 300 can scale and / or normalize localSumbAbs (which can be the same as locSumAbs) to handle bit-depth increase or dynamic range of transform coefficients before being used to derive Rice parameters. For example, such scaling and / or normalization can affect Equation 1517 of the VVC specification as shown below. The amount of scaling factor can depend on the input bit-depth, a pre-defined operating bit-depth (e.g., 10), or the local activity of transform coefficients, block size, or values of syntax elements that video encoder 200 can signal in the bitstream. Then, video encoder 200 and video decoder 300 can clip localSumAbs to a certain range, e.g., using the current clipping of localSumAbs in VVC. Then, video encoder 200 and video decoder 300 can use the normalized and clipped localSumAbs to derive Rice parameters using a pre-defined lookup table (e.g., the current lookup table, Table 128, in VVC). With the normalization of localSumAbs in the first step of the proposed design, video encoder 200 and video decoder 300 can derive Rice parameters from the pre-defined table (e.g., from Table 128 of VVC). Finally, video encoder 200 and video decoder 300 can correct the value of localSumAbs by adding an offset to expand the dynamic range of the Rice parameter range.
[0072] Video encoder 200 and video decoder 300 can be configured as follows according to a revised version of the VVC specification, where “[added: added text]” is used to indicate added text:
[0073] 9.3.3.2 Rice parameter derivation process for abs_resements[] and dec_abs_level[]
[0074] The inputs of this process are the base level baseLevel, the color component index cldx, the luma position of the top-left sample of the current transform block relative to the top-left sample of the current picture (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm of the transform block width log2TbWidth, and the binary logarithm of the transform block height log2TbHeight.
[0075] The output of this process is the Rice parameter cRiceParam.
[0076] Given an array AbsLevel[x][y] of a transform block with component index cldx and top-left luma position (x0, y0), the variable locSumAbs is derived as specified by the following pseudo-code process:
[0077]
[0078]
[0079] Given the variable locSumAbs, the Rice parameter cRiceParam is derived as specified in Table 128.
[0080] cRiceParam is then refined as:
[0081] [Added: "cRiceParam = cRiceParam + c"]
[0082] In some examples, the above variables a, b, and c can be defined as follows: in one example, the variable "b" can specify the operation bit depth and be set equal to (for example) 10; the variable "a" can be set equal to an integer value, such as 4, or another value that is a power of 2; and the variable "c" can be set equal to, or derived from, the computed shift value. The operators "<<" and ">>" represent the bitwise left and right shift operators, while the "A?B:C" function indicates that if A is true, the value B is returned, while if A is false, the value C is returned.
[0083] In another example, the localSumAbs can be scaled / normalized when it is greater than or equal to a threshold. In this case, the relevant Rice parameter derivation part of VVC can be changed accordingly as follows (where "[Added: "added text"]" indicates an addition to VVC):
[0084] 9.3.3.2 Rice parameter derivation process for abs_resements[] and dec_abs_level[]
[0085] The inputs to this process are the base level baseLevel, the color component index cldx, the luma position of the top-left sample of the current transform block relative to the top-left sample of the current picture (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm of the transform block width log2TbWidth, and the binary logarithm of the transform block height log2TbHeight.
[0086] The output of this process is the Rice parameter cRiceParam.
[0087] Given an array AbsLevel[x][y] of a transform block with component index cldx and top-left luma position (x0, y0), the variable locSumAbs is derived in the manner specified by the following pseudo-code process:
[0088]
[0089] Given the variable locSumAbs, the Rice parameter cRiceParam is derived as specified in Table 128.
[0090] cRiceParam is then refined as:
[0091] [Added: "cRiceParam = cRiceParam + c"]
[0092] In this example, T is a predefined threshold. In one example, T can be set equal to 32. In some examples, the values of the variables a, b, and c can be signaled through the bitstream or set or derived from the bit depth, local statistics (e.g., minimum / maximum or average of the transform coefficient values within the current block), decoded transform, block size, or syntax elements signaled in the bitstream.
[0093] In another example, the video encoder 200 and video decoder 300 can normalize the localSumAbs value a second time, for example, as follows (where "[Added: "added text"]" indicates an addition to VVC):
[0094] 9.3.3.2 Rice parameter derivation process for abs_resements[] and dec_abs_level[]
[0095] The inputs to this process are the base level baseLevel, the color component index cldx, the luma position of the top-left sample of the current transform block relative to the top-left sample of the current picture (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm of the transform block width log2TbWidth, and the binary logarithm of the transform block height log2TbHeight.
[0096] The output of this process is the Rice parameter cRiceParam.
[0097] Given an array AbsLevel[x][y] of a transform block with component index cldx and top-left luma position (x0, y0), the variable locSumAbs is derived as specified in the following pseudo-code process:
[0098]
[0099] [Added: "shift = ((Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T?
[0100]
[0101] Given the variable locSumAbs, the Rice parameter cRiceParam is derived as specified in Table 128.
[0102] cRiceParam is then refined as:
[0103] [Added: "cRiceParam = cRiceParam + c"]
[0104] In the above example, video encoder 200 and video decoder 300 can set the value of c equal to (shift + shiftl).
[0105] In another example, video encoder 200 and video decoder 300 can normalize the locSumAbs value by a factor that depends on the magnitude of locSumAbs and the input bit depth. In this case, video encoder 200 and video decoder 300 can use the modified technique for deriving the relevant Rice parameter (relative to the corresponding part of VVC Draft 10), e.g., with the following changes, where [Added: "added text"] indicates additions relative to VVC Draft 10:
[0106] 9.3.3.2 Rice parameter derivation process for abs_resements[] and dec_abs_level[]
[0107] The inputs to this process are the base level baseLevel, the color component index cldx, the luma position of the top-left sample of the current transform block relative to the top-left sample of the current picture (x0, y0), the current coefficient scan position (xC, yC), the binary logarithm of the transform block width log2TbWidth, and the binary logarithm of the transform block height log2TbHeight.
[0108] The output of this process is the Rice parameter cRiceParam.
[0109] Given an array AbsLevel[x][y] of a transform block with component index cldx and top-left luma position (x0, y0), the variable locSumAbs is derived as specified in the following pseudo-code process:
[0110]
[0111] [Added: "The variables shift and locSumAbs are derived as follows:
[0112] shift = (locSumAbs * scl) >= T? FloorLog2((locSumAbs * scl) » N) : 0
[0113] locSumAbs = locSumAbs » shift
[0114] The variable locSumAbs is then updated as follows:
[0115] locSumAbs = Clip3(0, 31, locSumAbs - baseLevel * 5)
[0116] Given the variable locSumAbs, the Rice parameter cRiceParam is derived as specified in Table 128.
[0117] cRiceParam is then refined as:
[0118] [Added: “cRiceParam = cRiceParam + shift”]
[0119] In some examples according to the above examples, the video encoder 200 and the video decoder 300 can determine the values of the threshold T, scl, and N according to the bit depth of the bitstream. Alternatively, the video encoder 200 and the video decoder 300 can use predefined values for T, scl, and N. Alternatively, the video encoder 200 can signal the values of T, scl, and N at a sequence, picture, or slice level (e.g., using a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter set (APS), or a slice header), and the video decoder 300 can determine the values of T, scl, and N from the signaled data.
[0120] In one example, scl can be defined as:
[0121] Scl = floorLog2(bitdepth - 10).
[0122] Furthermore, T can be set equal to 8, and N can be set equal to 3.
[0123] Figure 2A and Figure 2Bis a conceptual diagram illustrating an example quad-tree binary tree (QTBT) structure 130 and a corresponding coding tree unit (CTU) 132. Solid lines represent quad-tree splitting, and dashed lines indicate binary-tree splitting. In each split node (i.e., non-leaf node) of the binary tree, one flag is signaled to indicate which type of splitting is used (i.e., horizontal or vertical), where 0 indicates horizontal splitting and 1 indicates vertical splitting in this example. For quad-tree splitting, no splitting type indication is needed because a quad-tree node splits a block horizontally and vertically into 4 equally sized sub-blocks. Accordingly, video encoder 200 can encode syntax elements (such as splitting information) for the area tree layer (i.e., solid lines) of QTBT structure 130 and syntax elements (such as splitting information) for the prediction tree layer (i.e., dashed lines) of QTBT structure 130, and video decoder 300 can decode these syntax elements. Video encoder 200 can encode video data (such as prediction and transform data) for CUs represented by terminal leaf nodes of QTBT structure 130, and video decoder 300 can decode this video data.
[0124] In general, Figure 2B CTU 132 can be associated with parameters that define the size of blocks corresponding to nodes of the QTBT structure 130 of the first and second layers. These parameters can include a CTU size (representing the size of CTU 132 in samples), a minimum quad-tree size (MinQTSize, representing the minimum allowed quad-tree leaf node size), a maximum binary tree size (MaxBTSize, representing the maximum allowed binary tree root node size), a maximum binary tree depth (MaxBTDepth, representing the maximum allowed binary tree depth), and a minimum binary tree size (MinBTSize, representing the minimum allowed binary tree leaf node size).
[0125] The root node of the QTBT structure corresponding to a CTU can have four child nodes at the first level of the QTBT structure, each of which can be partitioned according to quadtree partitioning. That is, a node of the first level is either a leaf node (having no child nodes) or has four child nodes. The example of QTBT structure 130 represents such nodes as including the parent node and child nodes with solid lines for branches. If a node of the first level is not larger than a maximum allowed binary tree root node size (MaxBTSize), the node can also be partitioned by a corresponding binary tree. The binary tree partitioning of a node can be iterated until the nodes resulting from the partitioning reach a minimum allowed binary tree leaf node size (MinBTSize) or a maximum allowed binary tree depth (MaxBTDepth). The example of QTBT structure 130 represents such nodes as having dashed lines for branches. Binary tree leaf nodes are referred to as coding units (CUs), which are used for prediction (e.g., intra-picture prediction or inter-picture prediction) and transform without any further partitioning. As discussed above, a CU can also be referred to as a “video block” or “block.”
[0126] In one example of a QTBT partitioning structure, the CTU size is set to 128x128 (luma samples and two corresponding 64x64 chroma 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 applied to the CTU first to generate quadtree leaf nodes. A quadtree leaf node can have a size from 16x16 (i.e., MinQTSize) to 128x128 (i.e., the CTU size). If a quadtree leaf node is 128x128, the leaf quadtree node will not be further partitioned by a binary tree because its size exceeds MaxBTSize (i.e., 64x64 in this example). Otherwise, the quadtree leaf node will be further partitioned by a binary tree. Thus, a quadtree leaf node is also a root node of a binary tree, and it has a binary tree depth of 0. When the binary tree depth reaches MaxBTDepth (4 in this example), no further partitioning is allowed. A binary tree node having a width equal to MinBTSize (4 in this example) means that no further vertical partitioning (i.e., partitioning of the width) is allowed for the binary tree node. Similarly, a binary tree node having a height equal to MinBTSize means that no further horizontal partitioning (i.e., partitioning of the height) is allowed for the binary tree node. As noted above, leaf nodes of a binary tree are referred to as CUs, and they are further processed for prediction and transform without further partitioning.
[0127] Figure 3is a block diagram illustrating an example video encoder 200 that can perform the techniques of this disclosure. Video encoder 200 is provided by way of example only, and other configurations of video encoder 200 can enable the techniques of this disclosure. Figure 3 is for explanatory purposes, and should not be considered limiting of the techniques broadly illustrated and described in this disclosure. For explanatory purposes, this disclosure describes video encoder 200 in the context of video coding standards, such as the ITU-T H.265 / HEVC video coding standard and the VVC video coding being developed. However, the techniques of this disclosure are not limited to these video coding standards, and are applicable to other video coding and decoding standards generally.
[0128] In Figure 3 In the example of FIG. 2, video encoder 200 includes video data memory 230, mode select unit 202, residual generation unit 204, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, decoded picture buffer (DPB) 218, and entropy encoding unit 220. Any or all of video data memory 230, mode select unit 202, residual generation unit 204, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, DPB 218, and entropy encoding unit 220 can be implemented in one or more processors or in processing circuitry. For example, the units of video encoder 200 can be implemented as one or more circuits or logic elements as part of hardware circuitry, or as part of a processor, ASIC, or FPGA. Also, video encoder 200 can include additional or alternative processors or processing circuitry to perform these and other functions.
[0129] Video data memory 230 can store video data to be encoded by the components of video encoder 200. Video encoder 200 can receive the video data stored in video data memory 230 from, for example, video source 104 Figure 1 DPB 218 can act as a reference picture memory that stores reference video data for use in encoding subsequent video data by 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), magneto resistive 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 illustrated, or off-chip relative to those components.
[0130] In this disclosure, reference to video data memory 230 should not be interpreted as a limitation to memory internal to video encoder 200, unless specifically described as such, or memory external to video encoder 200, unless specifically described as such. Rather, reference to video data memory 230 should be understood as reference to memory that stores video data that video encoder 200 receives for encoding, e.g., video data of a current block to be encoded. Figure 1 Memory 106 of system 100 can also provide temporary storage of outputs from the various units of video encoder 200.
[0131] FIG. 1 illustrates Figure 3 The various units of FIG. 1 are shown in FIG. 1 to assist with understanding the operations performed by video encoder 200. The units can be implemented as fixed- function circuits, programmable circuits, or a combination thereof. Fixed-function circuits refer to circuits that provide particular functionality, and are preset on the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functionality in the operations that can be performed. For instance, the programmable circuits can execute software or firmware that cause the programmable circuits to operate in the 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 that the fixed-function circuits perform are generally immutable. In some examples, one or more of the units can be distinct circuit blocks (fixed-function or programmable), and in some examples, one or more units can be integrated circuits.
[0132] Video encoder 200 can include arithmetic logic units (ALUs), elementary function units (EFUs), digital circuits, analog circuits, and / or programmable cores formed from programmable circuitry. In examples where the operations of video encoder 200 are performed using software executed by the programmable circuitry, memory 106 Figure 1 ) can store the instructions (e.g., object code) of the software that video encoder 200 receives and executes, or another memory within video encoder 200 (not shown) can store such instructions.
[0133] Video data memory 230 is configured to store received video data. Video encoder 200 can retrieve pictures of the video data from video data memory 230 and provide the video data to residual generation unit 204 and mode selection unit 202. The video data in video data memory 230 can be raw video data that is to be encoded.
[0134] 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 can include additional functional units to perform video prediction according to other prediction modes. As examples, the mode selection unit 202 can include a palette unit, an intra-block copy unit (which can be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.
[0135] The mode selection unit 202 generally coordinates the various encoding processes to test combinations of encoding parameters and resulting rate-distortion values for such combinations. The encoding parameters can include partitioning of CTUs into CUs, prediction modes for the CUs, transform types for residual data of the CUs, quantization parameters for the residual data of the CUs, etc. The mode selection unit 202 can ultimately select the combination of encoding parameters that has the better rate-distortion value than the other tested combinations.
[0136] The video encoder 200 can partition a picture retrieved from the video data memory 230 into a series of CTUs, and encapsulate one or more CTUs within a slice. The mode selection unit 202 can partition the CTUs of the picture according to a tree structure such as the QTBT structure or the quad-tree structure of HEVC described above. As described above, the video encoder 200 can form one or more CUs from partitioning a CTU according to the tree structure. Such CUs can also be generally referred to as “video blocks” or “blocks.”
[0137] In general, the mode selection unit 202 also controls its components (e.g., the motion estimation unit 222, the motion compensation unit 224, and the intra-prediction unit 226) to generate a prediction block for a current block (e.g., a current CU or an overlapping portion of a PU and a TU in HEVC). To perform inter-prediction for the current block, the motion estimation unit 222 can perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously coded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 can calculate values that represent how similar a potential reference block is to the current block, e.g., according to a sum of absolute difference (SAD), a sum of squared difference (SSD), a mean absolute difference (MAD), a mean squared difference (MSD), etc. The motion estimation unit 222 can generally perform these calculations using point-wise differences between the current block and the reference block under consideration. The motion estimation unit 222 can identify the reference block with the lowest value resulting from these calculations, indicating the reference block that most closely matches the current block.
[0138] Motion estimation unit 222 can form one or more motion vectors (MVs) that define a position of a reference block in a reference picture relative to a position of a current block in a current picture. Motion estimation unit 222 can then provide the motion vector(s) to motion compensation unit 224. For example, for uni-directional inter-prediction, motion estimation unit 222 can provide a single motion vector, while for bi-directional inter-prediction, motion estimation unit 222 can provide two motion vectors. Motion compensation unit 224 can then use the motion vector(s) to generate a prediction block. For example, motion compensation unit 224 can use the motion vector(s) to retrieve data for the reference block. As another example, if the motion vector(s) have fractional-sample precision, motion compensation unit 224 can interpolate values of the prediction block from one or more interpolation filters. Further, for bi-directional inter-prediction, motion compensation unit 224 can retrieve data for two reference blocks identified by the respective motion vectors and combine the retrieved data (e.g., by point-wise averaging or weighted averaging).
[0139] As another example, for intra-prediction or intra-prediction coding, intra-prediction unit 226 can generate a prediction block from samples neighboring the current block. For example, for directional modes, intra-prediction unit 226 can mathematically combine values of the neighboring samples and fill these computed values across a defined direction of the current block to produce the prediction block. As another example, for a DC mode, intra-prediction unit 226 can compute an average of the neighboring samples of the current block and generate the prediction block to include the resulting average for each sample of the prediction block.
[0140] Mode select unit 202 provides the prediction block to residual generation unit 204. Residual generation unit 204 receives the original, unencoded version of the current block from video data memory 230 and the prediction block from mode select unit 202. Residual generation unit 204 computes the point-wise difference between the current block and the prediction block. The resulting point-wise differences define a residual block for the current block. In some examples, residual generation unit 204 can also determine differences between the values of the samples in the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some examples, residual generation unit 204 can form using one or more subtractor circuits that perform binary subtraction.
[0141] In examples where the mode selection unit 202 partitions the CU into PUs, each PU can be associated with a luma prediction unit and corresponding chroma prediction units. Video encoder 200 and video decoder 300 can support PUs having various sizes. As indicated above, the size of a CU can refer to the size of the luma coding block of the CU, while the size of a PU can refer to the size of the luma prediction unit of the PU. Assuming that a particular CU has a size of 2Nx2N, video encoder 200 can support 2Nx2N or NxN PU sizes for intra-prediction, and 2Nx2N, 2NxN, Nx2N, NxN, or similar symmetric PU sizes for inter-prediction. Video encoder 200 and video decoder 300 can also support asymmetric partitioning for inter-prediction for PU sizes 2NxnU, 2NxnD, nLx2N, and nRx2N.
[0142] In examples where the mode selection unit 202 does not further partition the CU into PUs, each CU can be associated with a luma coding block and corresponding chroma coding blocks. As above, the size of a CU can refer to the size of the luma coding block of the CU. Video encoder 200 and video decoder 300 can support CU sizes of 2Nx2N, 2NxN, or Nx2N.
[0143] For other video coding techniques, such as intra block copy mode coding, affine mode coding, and linear model (LM) mode coding, as some examples, the mode selection unit 202 generates, via a respective unit associated with the coding technique, a prediction block for the current block being coded. In some examples, such as palette mode coding, the mode selection unit 202 can not generate a prediction block, but rather generate syntax elements indicative of a way to reconstruct the block based on a selected palette. In such modes, the mode selection unit 202 can provide the syntax elements to the entropy encoding unit 220 for encoding.
[0144] As described above, the residual generation unit 204 receives video data of the current block and the 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 point-wise difference between the prediction block and the current block.
[0145] Transform processing unit 206 applies one or more transforms to the residual block to produce a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 can apply various transforms to the residual block to form the transform coefficient block. For example, transform processing unit 206 can apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform. In some examples, transform processing unit 206 can perform multiple transforms, e.g., a primary transform and a secondary transform such as a rotation transform, on the residual block. In some examples, transform processing unit 206 does not apply a transform to the residual block.
[0146] Quantization unit 208 can quantize the transform coefficients in a transform coefficient block, to produce a quantized transform coefficient block. Quantization unit 208 can quantize transform coefficients of a transform coefficient block according to a quantization parameter (QP) value associated with the current block. Video encoder 200 (e.g., via mode select unit 202) can adjust the degree of quantization applied to the transform coefficient blocks associated with the current block by adjusting the QP value associated with the CU. Quantization can introduce loss of information, and thus, quantized transform coefficients can have lower precision than the original transform coefficients produced by transform processing unit 206.
[0147] Inverse quantization unit 210 and inverse transform processing unit 212 can apply inverse quantization and inverse transforms, respectively, to a quantized transform coefficient block to reconstruct the residual block from the transform coefficient block. Reconstruction unit 214 can produce a reconstructed block corresponding to the current block (albeit with some degree of distortion) based on the reconstructed residual block and the prediction block generated by mode select unit 202. For example, reconstruction unit 214 can add the samples of the reconstructed residual block to the corresponding samples from the prediction block generated by mode select unit 202 to produce the reconstructed block.
[0148] Filter unit 216 can perform one or more filtering operations on the reconstructed block. For example, filter unit 216 can perform a deblocking operation to reduce blocking artifacts along the edges of the CU. In some examples, the operations of filter unit 216 can be skipped.
[0149] Video encoder 200 stores the reconstructed blocks in DPB 218. For instance, in examples where the operations of filter unit 216 are not needed, reconstruction unit 214 can store the reconstructed blocks to DPB 218. In examples where the operations of filter unit 216 are needed, filter unit 216 can store the filtered reconstructed blocks to DPB 218. Motion estimation unit 222 and motion compensation unit 224 can retrieve reference pictures formed from reconstructed (and possibly filtered) blocks in DPB 218 to inter-predict blocks of subsequent coded pictures. Moreover, intra-prediction unit 226 can use reconstructed blocks in DPB 218 of the current picture to intra-predict other blocks in the current picture.
[0150] In general, entropy encoding unit 220 can entropy encode syntax elements received from other functional components of video encoder 200. For example, entropy encoding unit 220 can entropy encode quantized transform coefficient blocks from quantization unit 208. As another example, entropy encoding unit 220 can entropy encode prediction syntax elements (e.g., motion information for inter-prediction or intra-mode information for intra-prediction) from mode select unit 202. Entropy encoding unit 220 can perform one or more entropy encoding operations on syntax elements, as another example of video data, to generate entropy encoded data. For example, entropy encoding unit 220 can perform a context- adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable to variable (V2V) length coding operation, a syntax-based context-adaptive binary arithmetic coding (SBAC) operation, a Probability Interval Partitioning Entropy (PIPE) coding operation, an Exponential-Golomb coding operation, or another type of entropy encoding operation on the data. In some examples, entropy encoding unit 220 can operate in a bypass mode that does not entropy encode the syntax elements.
[0151] According to the techniques of this disclosure, entropy encoding unit 220 can be configured to Rice parameterize an absolute value of a residual level value of a current quantized transform coefficient. Entropy encoding unit 220 can first determine the Rice parameter by determining a local sum (locSumAbs) of absolute values of neighboring transform coefficients of the current quantized transform coefficient. Such neighboring transform coefficients can be those shown in the example of FIG. 2B. That is, the neighboring transform coefficients can include a right neighboring transform coefficient, a right two neighboring transform coefficient, a right lower neighboring transform coefficient, a lower neighboring transform coefficient, and a lower two neighboring transform coefficient. Figure 5
[0152] After computing the locSumAbs value, the entropy encoding unit 220 can derive a shift value from the locSumAbs value. For example, the entropy encoding unit 220 can compute the shift value according to “shift = ((Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b)) : 0”. In this example, Bitdepth represents a bit depth of the video data, a is an integer power of 2 value, b represents an operating bit depth, and T represents a threshold value.
[0153] After determining the shift value, the entropy encoding unit 220 can normalize the computed locSumAbs value using the shift value. For example, the entropy encoding unit 220 can normalize the locSumAbs value according to “localSumAbs = (shift == 0)? localSumAbs : (localSumAbs + (1 << (shift - 1))) » shift”. In this example, “<<” and “>>” represent bitwise left shift and right shift operators. In the above two examples, the “A? B : C” function indicates that if A is true, then the value B is returned, and if A is false, then the value C is returned. The entropy encoding unit 220 can also clip the normalized locSumAbs value according to “locSumAbs = Clip3(0, 31, locSumAbs - baseLevel * 5)”.
[0154] After computing the normalized locSumAbs value, the entropy encoding unit 220 can perform a lookup in a lookup table using the normalized locSumAbs value as an input to determine a Rice parameter (e.g., cRiceParam). The lookup table can be the same as in the current VVC and is reproduced below as Table 1. The entropy encoding unit 220 can use the determined Rice parameter to bin the absolute residual values of the current transform coefficients and then entropy encode the binned absolute residual values.
[0155] The video encoder 200 can output a bitstream that includes the entropy encoded syntax elements needed to reconstruct the blocks of a slice or picture. In particular, the entropy encoding unit 220 can output the bitstream.
[0156] The operations described above are described with respect to blocks. Such descriptions should be understood to be operations for luma coding blocks and / or chroma coding blocks. As described above, in some examples, the luma coding blocks and the chroma coding blocks are luma components and chroma components of a CU. In some examples, the luma coding blocks and the chroma coding blocks are luma components and chroma components of a PU.
[0157] In some examples, for chroma coding blocks, operations performed with respect to luma coding blocks need not be repeated. As one example, operations to identify motion vectors (MVs) and reference pictures for luma coding blocks need not be repeated for identifying MVs and reference pictures for chroma blocks. Rather, the MVs for luma coding blocks can be scaled to determine the MVs for chroma blocks, and the reference pictures can be the same. As another example, for luma coding blocks and chroma coding blocks, the intra prediction process can be the same.
[0158] In this manner, video encoder 200 represents an example of a device for binarizing video data, the device comprising: a memory configured to store the video data; and one or more processors implemented in circuitry configured to: compute a local sum value (locSumAbs value) of absolute values of neighboring coefficients of a current coefficient of a current block of the video data; derive a shift value from the locSumAbs value; normalize the locSumAbs value using the shift value; determine a Rice parameter using the normalized locSumAbs value; and binarize or de-binarize the current coefficient using the Rice parameter.
[0159] Figure 4 is a block diagram illustrating an example video decoder 300 that can perform the techniques of this disclosure. Video decoder 300 is provided as an example Figure 4 is for purposes of explanation and is not limiting on the extensive examples and descriptions set forth in this disclosure. For purposes of explanation, this disclosure describes video decoder 300 in terms of the techniques of VCC and HEVC (ITU-T H.265). However, the techniques of this disclosure can be performed by video coding devices configured for other video coding standards.
[0160] In Figure 4 In the example of FIG. 3, video decoder 300 includes coded picture buffer (CPB) memory 320, entropy decoding unit 302, prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, filter unit 312, and decoded picture buffer (DPB) 314. Any or all of CPB memory 320, entropy decoding unit 302, prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, filter unit 312, and DPB 314 can be implemented in one or more processors or in processing circuitry. For instance, the units of video decoder 300 can be implemented as one or more circuits or logic elements as part of hardware circuitry, or as part of a processor, ASIC, or FPGA. Also, video decoder 300 can include additional or alternative processors or processing circuitry to perform these and other functions.
[0161] The prediction processing unit 304 includes a motion compensation unit 316 and an intra-prediction unit 318. The prediction processing unit 304 may include additional units to perform predictions based on other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, an intra-block copying 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.
[0162] CPB memory 320 can store video data to be decoded by components of video decoder 300, such as encoded video bitstreams. For example, it can be stored from computer-readable medium 110 ( Figure 1 The video data stored in the CPB memory 320 is obtained. The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from the encoded video bitstream. Furthermore, the CPB memory 320 may store video data other than the syntax elements of the encoded / decoded pictures, such as temporary data representing the output from various units of the video decoder 300. The DPB 314 typically stores decoded pictures that the video decoder 300 may output and / or use as reference video data when decoding subsequent data or pictures from the encoded video bitstream. The CPB memory 320 and DPB 314 may be formed of any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive random access RAM (RRAM), or other types of memory devices. The CPB memory 320 and DPB 314 may be provided by the same memory device or separate memory devices. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300, or off-chip relative to those components.
[0163] Additionally or alternatively, in some examples, the video decoder 300 can be drawn from the memory 120 ( Figure 1 It retrieves encoded and decoded video data. That is, memory 120 can store data, as discussed above regarding CPB memory 320. Similarly, when some or all of the functions of video decoder 300 are implemented in software that will be run by the processing circuitry of video decoder 300, memory 120 can store instructions that will be executed by video decoder 300.
[0164] The diagram shows... Figure 4 The various units shown aid in understanding the operations performed by the video decoder 300. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Similar to... Figure 3Fixed function circuits are circuits that provide specific functionality and are preset to perform operations that are unchangeable. Programmable circuits are circuits that can be programmed to perform various tasks and provide flexible functionality in the operations that can be performed. For example, programmable circuits can run software or firmware that cause the programmable circuits to operate in the manner defined by the instructions of the software or firmware. Fixed function circuits can run software instructions (e.g., to receive parameters or output parameters), but the types of operations that the fixed function circuits perform are generally unchangeable. In some examples, one or more units can be different circuit blocks (fixed function or programmable), and in some examples, one or more units can be an integrated circuit.
[0165] Video decoder 300 can include ALUs, EFUs, digital circuits, analog circuits, and / or programmable cores formed from programmable circuitry. In examples where the operations of video decoder 300 are performed by software running on the programmable circuitry, on-chip or off-chip memory can store the instructions (e.g., object code) of the software that video decoder 300 receives and executes.
[0166] Entropy decoding unit 302 can receive encoded video data from a CPB and entropy decode the video data to reproduce syntax elements. Prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, and filter unit 312 can generate decoded video data based on the syntax elements extracted from the bitstream.
[0167] In general, video decoder 300 reconstructs a picture on a block-by-block basis. Video decoder 300 can perform reconstruction operations separately for each block, where the block that is currently being reconstructed (i.e., decoded) can be referred to as the “current block.”
[0168] Entropy decoding unit 302 can entropy decode syntax elements defining quantized transform coefficients of a quantized transform coefficient block, as well as transform information such as a quantization parameter (QP) and / or transform mode indication(s). According to the techniques of this disclosure, entropy decoding unit 302 can be configured to entropy decode absolute values of residual level values of the current quantized transform coefficients using a Rice parameter and then inverse binarize.
[0169] Entropy decoding unit 302 can first determine the Rice parameter by determining a local sum (locSumAbs) of absolute values of neighboring transform coefficients of the current quantized transform coefficient. Such neighboring transform coefficients can be those shown in the example of FIG. 6. That is, the neighboring transform coefficients can include a right neighboring transform coefficient, a right two neighboring transform coefficient, a right lower neighboring transform coefficient, a lower neighboring transform coefficient, and a lower two neighboring transform coefficient. Figure 5
[0170] After computing the locSumAbs value, the entropy decoding unit 302 can derive a shift value from the locSumAbs value. For example, the entropy decoding unit 302 can compute the shift value according to “shift = ((Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b))): 0.” In this example, Bitdepth represents a bit depth of the video data, a is an integer power of 2, b represents an operating bit depth, and T represents a threshold value.
[0171] After determining the shift value, the entropy decoding unit 302 can normalize the computed locSumAbs value using the shift value. For example, the entropy decoding unit 302 can normalize the locSumAbs value according to “localSumAbs = (shift == 0)? localSumAbs : (localSumAbs + (1 « (shift - 1))) » shift.” In this example, “<<” and “>>” represent bitwise left shift and right shift operators. In the above two examples, the “A? B : C” function indicates that if A is true, then the value B is returned, and if A is false, then the value C is returned. The entropy decoding unit 302 can also clip the normalized locSumAbs value according to “locSumAbs = Clip3(0, 31, locSumAbs - baseLevel * 5).
[0172] After computing the normalized locSumAbs value, the entropy decoding unit 302 can perform a lookup in a lookup table using the normalized locSumAbs value as an input to determine a Rice parameter (e.g., cRiceParam). The lookup table can be the same as in the current VVC and reproduced below as Table 1. The entropy decoding unit 302 can use the determined Rice parameter to de-binary the absolute residual values of the current transform coefficients.
[0173] The inverse quantization unit 306 can determine a degree of quantization associated with the quantized transform coefficient block using the QP and, likewise, a degree of inverse quantization for the inverse quantization unit 306 to apply. The inverse quantization unit 306 may, for example, perform a bitwise left shift operation to inverse quantize the quantized transform coefficients. The inverse quantization unit 306 may, thereby, form a transform coefficient block including transform coefficients.
[0174] After inverse quantization unit 306 forms a transform coefficient block, inverse transform processing unit 308 can apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, inverse transform processing unit 308 can 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.
[0175] Furthermore, prediction processing unit 304 generates a prediction block from 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 the 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 identifying a position of the reference block in the reference picture relative to a position of the current block in the current picture. Motion compensation unit 316 can generally perform the inter prediction process in a manner substantially similar to that described with respect to motion compensation unit 224 Figure 3 ) described above.
[0176] As another example, if the prediction information syntax elements indicate that the current block is intra predicted, intra prediction unit 318 can generate the prediction block according to an intra prediction mode indicated by the prediction information syntax elements. Again, intra prediction unit 318 can generally perform the intra prediction process in a manner substantially similar to that described with respect to intra prediction unit 226 Figure 3 ) described above. Intra prediction unit 318 can retrieve data for neighboring samples of the current block from DPB 314.
[0177] Reconstruction unit 310 can use the prediction block and the residual block to reconstruct the current block. For example, reconstruction unit 310 can add the samples of the residual block to corresponding samples of the prediction block to reconstruct the current block.
[0178] Filter unit 312 can perform one or more filtering operations on the reconstructed block. For example, filter unit 312 can perform a deblocking operation to reduce blocking artifacts along the edges of the reconstructed block. The operations of filter unit 312 are not necessarily performed in all examples.
[0179] Video decoder 300 can store the reconstructed blocks in DPB 314. For example, in examples where operations of filter unit 312 are not performed, reconstruction unit 310 can store the reconstructed blocks to DPB 314. In examples where operations of filter unit 312 are performed, filter unit 312 can store the filtered reconstructed blocks to DPB 314. As described above, DPB 314 can provide reference information, such as samples of a current picture for intra prediction and previously decoded pictures for subsequent motion compensation, to prediction processing unit 304. Moreover, video decoder 300 can output decoded pictures from DPB 314 for subsequent presentation on a display device, such as display device 118 of FIG. 1. Figure 1
[0180] In this way, video decoder 300 represents an example of a device for binarizing video data, the device comprising: a memory configured to store the video data; and one or more processors implemented in circuitry configured to: compute a local sum value (locSumAbs value) of absolute values of neighboring coefficients of a current coefficient of a current block of the video data; derive a shift value from the locSumAbs value; normalize the locSumAbs value using the shift value; determine a Rice parameter using the normalized locSumAbs value; and binarize or inverse binarize the current coefficient using the Rice parameter.
[0181] Figure 5 is a conceptual diagram illustrating an example set of neighboring coefficients that can be used when computing a local sum of neighboring absolute values (localSumAbs) of a current coefficient. Video encoder 200 and video decoder 300 can use the local sum of neighboring absolute values of a current coefficient to determine a Rice parameter. For example, in VVC, the Rice parameter for regular residual coding (RRC) is derived using a lookup table that takes into account the coefficient values of the neighboring transform coefficients in the template. Figure 5 The template of neighboring coefficients is presented in
[0182] First, video encoder 200 and video decoder 300 can compute locSumAbs, which is the absolute sum of the five available neighboring coefficients in the template. Then, video encoder 200 and video decoder 300 can normalize (subtract and clip) locSumAbs as follows:
[0183] locSumAbs = Clip3(0, 31, locSumAbs - baseLevel * 5)
[0184] Video encoder 200 and video decoder 300 can use the lookup table of Table 1 below to derive a Rice parameter value (e.g., cRiceParam):
[0185] Table 1 - Rice parameter lookup table based on locSumAbs in VVC
[0186] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
[0187] Figure 6 is a flowchart illustrating an example method for encoding a current block according to the techniques of this disclosure. The current block can include a current CU. Although described with respect to video encoder 200 Figure 1 and Figure 3 ), it should be understood that other devices can also be configured to perform a method similar to Figure 6 .
[0188] In this example, video encoder 200 first predicts the current block (350). For example, video encoder 200 can form a prediction block for the current block. Video encoder 200 can then calculate a residual block for the current block (352). To calculate the residual block, video encoder 200 can calculate the difference between the original, uncoded block and the prediction block for the current block. Video encoder 200 can then transform and quantize the coefficients of the residual block (354). Next, video encoder 200 can scan the quantized transform coefficients of the residual block (356). During or after the scan, video encoder 200 can entropy encode the transform coefficients (358). For example, video encoder 200 can encode the coefficients using CAVLC or CABAC. Video encoder 200 can then output the entropy encoded data for the block (360).
[0189] Figure 7 is a flowchart illustrating an example method for decoding a current block according to the techniques of this disclosure. The current block can include a current CU. Although described with respect to video decoder 300 Figure 1 and Figure 4 ), it should be understood that other devices can also be configured to perform a method similar to Figure 7 .
[0190] The video decoder 300 can receive entropy-encoded data of the current block, such as entropy-encoded prediction information and entropy-encoded data of the coefficients of the residual block corresponding to the current block (370). The video decoder 300 can entropy decode the entropy-encoded data to determine the prediction information of the current block and reproduce the coefficients of the residual block (372). The video decoder 300 can predict the current block (374) (e.g., using an intra-frame or inter-frame prediction mode indicated by the prediction information of the current block) to compute a prediction block for the current block. The video decoder 300 can then inversely scan the reproduced coefficients (376) to create a block of quantized transform coefficients. The video decoder 300 can then inversely quantize and inverse transform the quantized transform coefficients to produce a residual block (378). The video decoder 300 can finally decode the current block by combining the prediction block and the residual block (380).
[0191] Figure 8 This is a flowchart illustrating an example method for binarying video data according to the techniques of this disclosure. About Figure 1 and 3 To explain the video encoder 200 Figure 8 The method. In other examples, other devices can be configured to perform these or similar techniques. Furthermore, Figure 8 The method can usually correspond to Figure 6 Part of step 358.
[0192] First, the video encoder 200 can receive the current transform coefficient. The current transform coefficient can have an absolute value greater than 2. The video encoder 200 can calculate the local sum (locSumAbs) value (380) of the absolute values of the current coefficient from its adjacent coefficients. For example, the video encoder 200 can add the absolute values of the transform coefficient immediately to the right of the current transform coefficient, the two transform coefficients to the right of the current transform coefficient, the transform coefficient to the lower right of the current transform coefficient, the transform coefficient immediately below the current transform coefficient, and the two transform coefficients below the current transform coefficient, such as... Figure 5 As shown in the example.
[0193] Then, video encoder 200 can calculate a shift value for the current coefficient according to the locSumAbs value (382). For example, video encoder 200 can calculate the shift value according to the formula "shift = ((Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b)) : 0." As another example, video encoder 200 can calculate two shift values, shift and shiftl, according to the formulas "shift = ((Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b)) : 0" and "shiftl = ((Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b)) : 0." As yet another example, video encoder 200 can calculate a shift value according to the formula "shift = (locSumAbs * scl) >= T? FloorLog2((locSumAbs * scl) » N) : 0."
[0194] Then, video encoder 200 can normalize the locSumAbs value using the shift value (384). For example, video encoder 200 can normalize the locSumAbs value according to "localSumAbs = (shift == 0)? localSumAbs : (localSumAbs + (1 « (shift - 1))) » shift." As another example, in the case that two shift values (shift and shiftl) are used, video encoder 200 can normalize the locSumAbs according to "localSumAbs = (shift == 0)? localSumAbs : (localSumAbs + (1 « (shift - 1))) » shift" and "localSumAbs = (shiftl == 0)? localSumAbs : (localSumAbs + (1 « (shiftl - 1))) » shiftl." As yet another example, video encoder 200 can normalize the locSumAbs according to "locSumAbs = locSumAbs » shift."
[0195] Video encoder 200 can then determine a Rice parameter from the normalized locSumAbs value (386). For example, video encoder 200 can use Table 1 above to determine the Rice parameter.
[0196] Video encoder 200 can then binarize the transform coefficient using the determined Rice parameter (388). Finally, video encoder 200 can entropy encode the binarized transform coefficient (390).
[0197] In this way, Figure 8 The method of represents an example of a method that includes calculating a local sum value (locSumAbs value) of absolute values of neighboring coefficients of a current coefficient of a current block of video data; deriving a shift value from the locSumAbs value; normalizing the locSumAbs value using the shift value; determining a Rice parameter using the normalized locSumAbs value; and binarizing or de-binarizing the current coefficient using the Rice parameter.
[0198] Figure 9 is a flowchart illustrating an example method of de-binarizing video data according to the techniques of this disclosure.
[0199] First, video decoder 300 can receive binarized, entropy encoded data for a current transform coefficient. Specifically, video decoder 300 can entropy decode syntax elements for the entropy encoded transform coefficient, including a significance flag, a greater-than-1 flag, and a greater-than-2 flag (indicating that the transform coefficient has a value greater than 2). Thus, video decoder 300 can determine that the remaining value of the transform coefficient is to be decoded. Accordingly, video decoder 300 can first entropy decode the binarized transform coefficient (i.e., the remaining value of the binarized transform coefficient) (400).
[0200] Video decoder 300 can then calculate a local sum (locSumAbs) value of absolute values of neighboring coefficients of the current coefficient (402). For example, video decoder 300 can add the absolute values of the transform coefficient immediately to the right of the current transform coefficient, the two transform coefficients to the right of the current transform coefficient, the transform coefficient diagonally below and to the right of the current transform coefficient, the transform coefficient immediately below the current transform coefficient, and the two transform coefficients below the current transform coefficient, as shown in the example of Figure 5
[0201] Video decoder 300 can then calculate a shift value for the current coefficient according to the locSumAbs value (404). For example, video decoder 300 can calculate the shift value according to the formula "shift = ((Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b)) : 0." As another example, video decoder 300 can calculate two shift values, shift and shiftl, according to the formulas "shift = ((Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b)) : 0" and "shiftl = ((Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b)) : 0." As yet another example, video decoder 300 can calculate a shift value according to the formula "shift = (locSumAbs * scl) >= T? FloorLog2((locSumAbs * scl) » N) : 0."
[0202] Video decoder 300 can then normalize the locSumAbs value using the shift value (406). For example, video decoder 300 can normalize the locSumAbs value according to "localSumAbs = (shift == 0)? localSumAbs : (localSumAbs + (1 « (shift - 1))) » shift." As another example, in the case where two shift values (shift and shiftl) are used, video decoder 300 can normalize the locSumAbs according to "localSumAbs = (shift == 0)? localSumAbs : (localSumAbs + (1 « (shift - 1))) » shift" and "localSumAbs = (shiftl == 0)? localSumAbs : (localSumAbs + (1 « (shiftl - 1))) » shiftl." As yet another example, video decoder 300 can normalize the locSumAbs according to "locSumAbs = locSumAbs » shift."
[0203] Video decoder 300 can then determine a Rice parameter from the normalized locSumAbs value (408). For example, video decoder 300 can use Table 1 above to determine the Rice parameter. Video decoder 300 can then use the determined Rice parameter to inverse binarize the transform coefficient (specifically, the residual value) (410).
[0204] In this way, Figure 9 The method of Clause 1 represents an example of a method comprising: calculating a local sum value of absolute values of neighboring coefficients of a current coefficient of a current block of video data (locSumAbs value); deriving a shift value from the locSumAbs value; normalizing the locSumAbs value using the shift value; determining a Rice parameter using the normalized locSumAbs value; and binarizing or inverse binarizing the current coefficient using the Rice parameter.
[0205] The following clauses summarize certain example techniques of this disclosure:
[0206] Clause 1 : A method of decoding video data, the method comprising: deriving a Rice parameter according to any technique of this disclosure; and decoding the video data using the Rice parameter.
[0207] Clause 2: The method of Clause 1, wherein deriving the Rice parameter comprises: determining a local sum of absolute values of neighboring coefficients of the current coefficient; and scaling the local sum of absolute values using a scaling value.
[0208] Clause 3: The method of Clause 2, further comprising determining the scaling value according to one or more of an input bit depth, a predefined operating bit depth, a local activity degree of transform coefficients, a block size, or a syntax element signaled in a bitstream comprising the video data.
[0209] Clause 4: The method of any of Clauses 2 and 3, further comprising clipping the local sum of absolute values.
[0210] Clause 5: The method of any of Clauses 2-4, further comprising normalizing the local sum of absolute values.
[0211] Clause 6: The method of any of Clauses 2-5, wherein deriving the Rice parameter comprises deriving the Rice parameter (cRiceParam) from the local sum of absolute values (locSumAbs) according to the following table:
[0212] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
[0213] Clause 7: The method of any of clauses 2-6, wherein determining the local sum of absolute values comprises computing localSumAbs = (shift == 0)? localSumAbs : (localSumAbs + (1 « (shift - 1))) » shift.
[0214] Clause 8: The method of clause 7, further comprising computing a value for shift as shift = (Bitdepth - b) > 0? Floor(Log2(a * (Bitdepth - b))) : 0.
[0215] Clause 9: The method of clause 8, wherein Bitdepth specifies a bit depth of the video data, b specifies an operating bit depth, a is set equal to an integer power of 2, and c is set according to the computed value of shift.
[0216] Clause 10: The method of clause 7, further comprising computing a value for shift as shift = (Bitdepth - b) > 0 && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b))) : 0.
[0217] Clause 11: The method of clause 10, wherein T is a predefined threshold value.
[0218] Clause 12: The method of any of clauses 2-6, wherein determining the local sum of absolute values comprises computing: localSumAbs = (shift == 0)? localSumAbs : (localSumAbs + (1 « (shift - 1))) » shift; and localSumAbs = (shift1 == 0)? localSumAbs : (localSumAbs + (1 « (shift1 - 1))) » shift1.
[0219] Clause 13: The method of clause 15, further comprising computing values for shift and shift1 as: shift = (Bitdepth - b) > 0 && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b))) : 0; and shift1 = (Bitdepth - b) > 0 && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b))) : 0.
[0220] Clause 14: The method of clause 13, wherein T is a threshold value, Bitdepth specifies a bit depth of the video data, b specifies an operating bit depth, and a is set to an integer power of 2 equal to a.
[0221] Clause 15: The method of any of clauses 2-6, wherein determining the local sum of absolute values comprises calculating: shift = (locSumAbs * scl) >= T? FloorLog2((locSumAbs * scl) » N) : 0; locSumAbs = locSumAbs » shift; locSumAbs = Clip3(0, 31, locSumAbs - baseLevel * 5).
[0222] Clause 16: The method of clause 15, wherein T is a threshold value, scl is a scaling value, and N is a number of bits.
[0223] Clause 17: The method of clause 16, further comprising determining values of one or more of T, scl, and N according to a bit depth of a bitstream that includes the video data.
[0224] Clause 18: The method of clause 16, further comprising determining values of one or more of T, scl, and N from data signaled in a bitstream that includes the video data.
[0225] Clause 19: The method of clause 18, wherein the signaled data comprises data of one or more of a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter set (APS), or a slice header.
[0226] Clause 20: The method of clause 16, further comprising determining a value of T to be 8, a value of N to be 3, and scl = floorLog2(bitdepth - 10), wherein bitdepth has a value representative of a bit depth of a bitstream that includes the video data.
[0227] Clause 21: The method of clause 16, further comprising determining predetermined values of one or more of T, scl, and N.
[0228] Clause 22: The method of any of clauses 7-20, further comprising deriving a provisional Rice parameter value using a value of localSumAbs, and then calculating the Rice parameter as a sum of the provisional Rice parameter value and a variable c.
[0229] Clause 23: The method of clause 21, further comprising determining a value of c to be equal to a value of shift.
[0230] Clause 24: The method of clause 21, further comprising deriving a value of c from a value of shift.
[0231] Clause 25: The method of any of clauses 1-23, further comprising encoding the video data prior to decoding the video data.
[0232] Clause 26: An apparatus for decoding video data, the apparatus comprising one or more means configured to perform the method of any of clauses 1-25.
[0233] Clause 27: The apparatus of clause 26, wherein the one or more means comprise one or more processors implemented in circuitry.
[0234] Clause 28: The apparatus of clause 26, further comprising a display configured to display decoded video data.
[0235] Clause 29: The apparatus of clause 26, wherein the apparatus comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0236] Clause 30: The apparatus of clause 26, further comprising a memory configured to store video data.
[0237] Clause 31: A computer-readable storage medium having stored thereon instructions that, when executed by a processor, cause the processor to perform the method of any of clauses 1-25.
[0238] Clause 32: A method of binarizing video data, the method comprising: calculating a local sum value (locSumAbs value) of absolute values of neighboring coefficients of a current coefficient of a current block of the video data; deriving a shift value from the locSumAbs value; normalizing the locSumAbs value using the shift value; determining a Rice parameter using the normalized locSumAbs value; and binarizing or inverse binarizing the current coefficient using the Rice parameter.
[0239] Clause 33: The method of clause 32, further comprising context adaptive binary arithmetic coding (CABAC) encoding or decoding the current coefficient using the Rice parameter.
[0240] Clause 34: The method of clause 32, wherein normalizing the locSumAbs value comprises right-shifting the locSumAbs value by one bit using the shift value.
[0241] Clause 35: The method of clause 32, further comprising clipping the normalized locSumAbs value.
[0242] Clause 36: The method of clause 32, wherein determining the Rice parameter comprises deriving the Rice parameter from the normalized locSumAbs value according to a lookup table.
[0243] Clause 37: The method of clause 36, wherein the lookup table comprises:
[0244] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
[0245] and wherein the Rice parameter comprises cRiceParam.
[0246] Clause 38: The method of clause 32, wherein computing the locSumAbs value and the normalized locSumAbs value comprises computing the localSumAbs value to be equal to ((shift == 0)? localSumAbs : (localSumAbs + (1 « (shift - 1))) » shift.
[0247] Clause 39: The method of clause 38, wherein deriving the value of shift comprises computing the value of shift to be shift = (Bitdepth - b) > 0? Floor(Log2(a * (Bitdepth - b))) : 0.
[0248] Clause 40: The method of clause 39, wherein Bitdepth specifies a bit depth of the video data, b specifies an operating bit depth, a is set to be equal to an integer power of 2, and c is set according to the computed value of shift.
[0249] Clause 41: The method of clause 38, wherein deriving the value of shift comprises computing the value of shift to be shift = ((Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b))) : 0.
[0250] Clause 42: The method of clause 41, wherein T is a predefined threshold value.
[0251] Clause 43: The method of clause 32, wherein deriving the value of shift further comprises deriving the value of shift according to one or more of an input bit depth, a predefined operating bit depth, a local activity degree of a transform coefficient, a block size, or a syntax element signaled in a bitstream that includes the video data.
[0252] Clause 44: The method of clause 32, wherein computing the locSumAbs value and normalizing the locSumAbs value comprises computing: localSumAbs = (shift == 0)? localSumAbs : (localSumAbs + (1 << (shift - 1))) » shift; and localSumAbs = (shiftl == 0)? localSumAbs : (localSumAbs + (1 << (shiftl - 1))) » shiftl.
[0253] Clause 45: The method of clause 44, wherein deriving the shift value comprises computing values for shift and shiftl as: shift = ((Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b))) : 0; and shiftl = ((Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b))) : 0.
[0254] Clause 46: The method of clause 45, wherein T is a threshold value, Bitdepth specifies a bit depth of the video data, b specifies an operating bit depth, and a is set to an integer power of 2.
[0255] Clause 47: The method of clause 32, wherein computing the locSumAbs value, deriving the shift value, and normalizing the locSumAbs value comprises computing: shift = (locSumAbs * scl) >= T? FloorLog2((locSumAbs * scl) » N) : 0; locSumAbs = locSumAbs » shift; locSumAbs = Clip3(0, 31, locSumAbs - baseLevel * 5).
[0256] Clause 48: The method of clause 47, wherein T is a threshold value, scl is a scaling value, and N is a number of bits.
[0257] Clause 49: The method of clause 48, further comprising determining values for one or more of T, scl, and N according to a bit depth of a bitstream that includes the video data.
[0258] Clause 50: The method of clause 48, further comprising determining values for one or more of T, scl, and N from data signaled in a bitstream that includes the video data.
[0259] Clause 51 : The method of clause 50, wherein the signaled data comprises data of one or more of a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter set (APS), or a slice header.
[0260] Clause 52: The method of clause 48, further comprising determining a value of 8 for T, a value of 3 for N, and scl = floorLog2(bitdepth - 10), wherein bitdepth has a value representative of a bit depth of a bitstream comprising the video data.
[0261] Clause 53: The method of clause 48, further comprising determining a predetermined value for one or more of T, scl, and N.
[0262] Clause 54: The method of clause 32, further comprising deriving a temporary Rice parameter value using the locSumAbs value, wherein determining the Rice parameter comprises calculating the Rice parameter as a sum of the temporary Rice parameter value and a variable c.
[0263] Clause 55: The method of clause 54, further comprising determining a value of c to be equal to the shift value.
[0264] Clause 56: The method of clause 54, further comprising deriving a value of c from the shift value.
[0265] Clause 57: The method of clause 32, further comprising encoding or decoding the video data.
[0266] Clause 58: An apparatus for binarizing video data, the apparatus comprising: a memory configured to store the video data; and one or more processors implemented in circuitry configured to: calculate a local sum value (locSumAbs value) of absolute values of neighboring coefficients of a current coefficient of a current block of the video data; derive a shift value from the locSumAbs value; normalize the locSumAbs value using the shift value; determine a Rice parameter using the normalized locSumAbs value; and binarize or inverse binarize the current coefficient using the Rice parameter.
[0267] Clause 59: The apparatus of clause 58, wherein the one or more processors are configured to context-adaptive binary arithmetic coding (CABAC) encode or decode the current coefficient.
[0268] Clause 60: The apparatus of clause 58, wherein to normalize the locSumAbs value, the one or more processors are configured to right-shift the locSumAbs value by a bit using the shift value.
[0269] Clause 61 : The device of clause 58, wherein the one or more processors are further configured to clip the normalized locSumAbs value.
[0270] Clause 62: The device of clause 58, wherein to determine the Rice parameter, the one or more processors are configured to derive the Rice parameter from the normalized locSumAbs value according to a lookup table.
[0271] Clause 63: The device of clause 62, wherein the lookup table comprises:
[0272] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
[0273] and wherein the Rice parameter comprises cRiceParam.
[0274] Clause 64: The device of clause 58, further comprising a display configured to display decoded video data.
[0275] Clause 65: The device of clause 58, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0276] Clause 66: A computer-readable storage medium having stored thereon instructions that, when executed by a processor, cause the processor to: calculate a local sum value (locSumAbs value) of absolute values of neighboring coefficients of a current coefficient of a current block of video data; derive a shift value from the locSumAbs value; normalize the locSumAbs value using the shift value; determine a Rice parameter using the normalized locSumAbs value; and binarize or inverse binarize the current coefficient using the Rice parameter.
[0277] Clause 67: The computer-readable storage medium of clause 66, further comprising instructions that cause the processor to context-adaptive binary arithmetic coding (CABAC) encode or decode the current coefficient.
[0278] Clause 68: The computer-readable storage medium of clause 66, wherein the instructions that cause the processor to normalize the locSumAbs value comprise instructions that cause the processor to right-shift the locSumAbs value by a bit using the shift value.
[0279] Clause 69: The computer-readable storage medium of clause 66, further comprising instructions that cause the processor to clip the normalized locSumAbs value.
[0280] Clause 70: The computer-readable storage medium of clause 66, wherein the instructions that cause the processor to determine a Rice parameter comprise instructions that cause the processor to derive the Rice parameter from the normalized locSumAbs value according to a lookup table.
[0281] Clause 71 : The computer-readable storage medium of clause 70, wherein the lookup table comprises:
[0282]
[0283]
[0284] and wherein the Rice parameter comprises cRiceParam.
[0285] Clause 72: An apparatus for binarizing video data, the apparatus comprising: means for computing a local sum value (locSumAbs value) of absolute values of neighboring coefficients of a current coefficient of a current block of the video data; means for deriving a shift value from the locSumAbs value; means for normalizing the locSumAbs value using the shift value; means for determining a Rice parameter using the normalized locSumAbs value; and means for binarizing or inverse binarizing the current coefficient using the Rice parameter.
[0286] Clause 73: The apparatus of clause 72, further comprising means for context adaptive binary arithmetic coding (CABAC) encoding or decoding the current coefficient.
[0287] Clause 74: The apparatus of clause 72, wherein the means for normalizing the locSumAbs value comprises means for right bit-shifting the locSumAbs value using the shift value.
[0288] Clause 75: The apparatus of clause 72, further comprising means for clipping the normalized locSumAbs value.
[0289] Clause 76: The apparatus of clause 72, wherein the means for determining a Rice parameter comprises means for deriving the Rice parameter from the normalized locSumAbs value according to a lookup table.
[0290] Clause 77: The apparatus of clause 76, wherein the lookup table comprises:
[0291] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
[0292] and wherein the Rice parameter comprises cRiceParam.
[0293] Clause 78: A method of binarizing video data, the method comprising: computing a local sum value (locSumAbs value) of absolute values of neighboring coefficients of a current coefficient of a current block of the video data; deriving a shift value from the locSumAbs value; normalizing the locSumAbs value using the shift value; determining a Rice parameter using the normalized locSumAbs value; and binarizing or inverse binarizing the current coefficient using the Rice parameter.
[0294] Clause 79: The method of clause 78, further comprising context adaptive binary arithmetic coding (CABAC) encoding or decoding the current coefficient.
[0295] Clause 80: The method of any of clauses 78 and 79, wherein normalizing the locSumAbs value comprises right shifting the locSumAbs value by one bit using the shift value.
[0296] Clause 81: The method of any of clauses 78-80, further comprising clipping the normalized locSumAbs value.
[0297] Clause 82: The method of any of clauses 78-81, wherein determining the Rice parameter comprises deriving the Rice parameter from the normalized locSumAbs value according to a lookup table.
[0298] Clause 83: The method of clause 82, wherein the lookup table comprises:
[0299] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
[0300] and wherein the Rice parameter comprises cRiceParam.
[0301] Clause 84: The method of any of clauses 78-83, wherein computing the locSumAbs value and normalizing the locSumAbs value comprises computing the localSumAbs value as equal to (shift == 0)? localSumAbs : (localSumAbs + (1 << (shift - 1))) » shift.
[0302] Clause 85: The method of clause 84, wherein deriving the value of shift comprises computing the value of shift as shift = (Bitdepth - b) > 0? Floor(Log2(a * (Bitdepth - b))) : 0.
[0303] Clause 86: The method of clause 85, wherein Bitdepth specifies a bit depth of the video data, b specifies an operating bit depth, a is set to an integer power of 2 equal to 2, and c is set according to a computed shift value.
[0304] Clause 87: The method of any of clauses 84-86, wherein deriving the shift value comprises computing a value for shift as shift = ((Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b))): 0.
[0305] Clause 88: The method of clause 87, wherein T is a predefined threshold value.
[0306] Clause 89: The method of any of clauses 78-88, wherein deriving the shift value further comprises deriving the shift value according to one or more of an input bit depth, a predefined operating bit depth, a local activity of a transform coefficient, a block size, or a syntax element signaled in a bitstream that includes the video data.
[0307] Clause 90: The method of any of clauses 78-88, wherein computing the locSumAbs value and normalizing the locSumAbs value comprises computing: localSumAbs = (shift == 0)? localSumAbs : (localSumAbs + (1 « (shift - 1))) » shift; and localSumAbs = (shift1 == 0)? localSumAbs : (localSumAbs + (1 « (shift1 - 1))) » shift1.
[0308] Clause 91: The method of clause 90, wherein deriving the shift value comprises computing values for shift and shift1 as: shift = ((Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b))): 0; and shift1 = ((Bitdepth - b) > 0) && (localSumAbs - baseLevel * 5) >= T? Floor(Log2(a * (Bitdepth - b))): 0.
[0309] Clause 92: The method of clause 91, wherein T is a threshold value, Bitdepth specifies a bit depth of the video data, b specifies an operating bit depth, and a is set to an integer power of 2 equal to 2.
[0310] Clause 93: The method of any of clauses 78-92, wherein computing the locSumAbs value, deriving the shift value, and normalizing the locSumAbs value comprises computing: shift = (locSumAbs * scl) >= T? FloorLog2((locSumAbs * scl) >> N) : 0; locSumAbs = locSumAbs » shift; locSumAbs = Clip3(0, 31, locSumAbs - baseLevel * 5).
[0311] Clause 94: The method of clause 93, wherein T is a threshold value, scl is a scaling value, and N is a number of bits.
[0312] Clause 95: The method of clause 94, further comprising determining values of one or more of T, scl, and N as a function of a bit depth of a bitstream that includes the video data.
[0313] Clause 96: The method of clause 94, further comprising determining values of one or more of T, scl, and N from data signaled in a bitstream that includes the video data.
[0314] Clause 97: The method of clause 96, wherein the signaled data comprises data of one or more of a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter set (APS), or a slice header.
[0315] Clause 98: The method of clause 94, further comprising determining a value of T to be 8, a value of N to be 3, and scl = floorLog2(bitdepth - 10), wherein bitdepth has a value representative of a bit depth of a bitstream that includes the video data.
[0316] Clause 99: The method of clause 94, further comprising determining predetermined values of one or more of T, scl, and N.
[0317] Clause 100: The method of any of clauses 78-99, further comprising deriving a temporary Rice parameter value using the localSumAbs value, wherein determining the Rice parameter comprises computing the Rice parameter as a sum of the temporary Rice parameter value and a variable c.
[0318] Clause 101: The method of clause 54, further comprising determining a value of c to be equal to a value of shift.
[0319] Clause 102: The method of clause 54, further comprising deriving a value of c from the shift value.
[0320] Clause 103: The method of any of clauses 78-102, further comprising encoding or decoding the video data.
[0321] Clause 104: A device for binarizing video data, the device comprising: a memory configured to store the video data; and one or more processors implemented in circuitry configured to: compute a local sum value (locSumAbs value) of absolute values of neighboring coefficients of a current coefficient of a current block of the video data; derive a shift value from the locSumAbs value; normalize the locSumAbs value using the shift value; determine a Rice parameter using the normalized locSumAbs value; and binarize or inverse binarize the current coefficient using the Rice parameter.
[0322] Clause 105: The device of clause 104, wherein the one or more processors are configured to context adaptive binary arithmetic coding (CABAC) encode or decode the current coefficient.
[0323] Clause 106: The device of any of clauses 104 and 105, wherein to normalize the locSumAbs value, the one or more processors are configured to right shift the locSumAbs value by a bit using the shift value.
[0324] Clause 107: The device of any of clauses 104-106, wherein the one or more processors are further configured to clip the normalized locSumAbs value.
[0325] Clause 108: The device of clauses 104-107, wherein to determine the Rice parameter, the one or more processors are configured to derive the Rice parameter from the normalized locSumAbs value according to a lookup table.
[0326] Clause 109: The device of clause 108, wherein the lookup table comprises:
[0327] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
[0328] and wherein the Rice parameter comprises cRiceParam.
[0329] Clause 110: The device of any of clauses 104-109, further comprising a display configured to display the decoded video data.
[0330] Clause 111: The device of clauses 104-110, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0331] Clause 112: A computer-readable storage medium having stored thereon instructions that, when executed, cause a processor to: compute a local sum value (locSumAbs value) of absolute values of neighboring coefficients of a current coefficient of a current block of video data; derive a shift value from the locSumAbs value; normalize the locSumAbs value using the shift value; determine a Rice parameter using the normalized locSumAbs value; and binarize or inverse binarize the current coefficient using the Rice parameter.
[0332] Clause 113: The computer-readable storage medium of clause 112, further comprising instructions that cause the processor to context-adaptive binary arithmetic coding (CABAC) encode or decode the current coefficient.
[0333] Clause 114: The computer-readable storage medium of any of clauses 112 and 113, wherein the instructions that cause the processor to normalize the locSumAbs value comprise instructions that cause the processor to right-shift the locSumAbs value by one bit using the shift value.
[0334] Clause 115: The computer-readable storage medium of any of clauses 112-114, further comprising instructions that cause the processor to clip the normalized locSumAbs value.
[0335] Clause 116: The computer-readable storage medium of any of clauses 112-115, wherein the instructions that cause the processor to determine the Rice parameter comprise instructions that cause the processor to derive the Rice parameter from the normalized locSumAbs value according to a lookup table.
[0336] Clause 117: The computer-readable storage medium of clause 116, wherein the lookup table comprises:
[0337] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
[0338] and wherein the Rice parameter comprises cRiceParam.
[0339] Clause 118: An apparatus for binarizing video data, the apparatus comprising: means for computing a local sum value (locSumAbs value) of absolute values of neighboring coefficients of a current coefficient of a current block of video data; means for deriving a shift value from the locSumAbs value; means for normalizing the locSumAbs value using the shift value; means for determining a Rice parameter using the normalized locSumAbs value; and means for binarizing or inverse binarizing the current coefficient using the Rice parameter.
[0340] Clause 119: The device of clause 118, further comprising means for context adaptive binary arithmetic coding (CABAC) encoding or decoding the current coefficient.
[0341] Clause 120: The device of any of clauses 118 and 119, wherein the means for normalizing the locSumAbs value comprises means for right shifting the locSumAbs value by a number of bits using a shift value.
[0342] Clause 121: The device of any of clauses 118-120, further comprising means for clipping the normalized locSumAbs value.
[0343] Clause 122: The device of any of clauses 118-121, wherein the means for determining the Rice parameter comprises means for deriving the Rice parameter from the normalized locSumAbs value according to a lookup table.
[0344] Clause 123: The device of clause 122, wherein the lookup table comprises:
[0345] locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
[0346] and wherein the Rice parameter comprises cRiceParam.
[0347] It is recognized that depending on the examples, certain acts or events of any of the techniques described herein can be performed in a different sequence, can be added, modified or omitted (e.g., not all described acts or events are necessary for the practice of the techniques), and / or can be performed concurrently (e.g., through multi-threading, interrupt processing, or multiple processors). Additionally, certain acts or events can be performed by different components of the techniques described herein.
[0348] In one or more examples, the functions described can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored on or transmitted over as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media can include computer-readable storage media, which corresponds to a tangible medium such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another, e.g., according to a communication protocol. In this manner, computer- readable media generally can correspond to (1) tangible computer-readable storage media which is non-transitory or (2) a communication medium such as a signal or carrier wave. Data storage media can be any available media that can be accessed by one or more computers or one or more processors to retrieve instruction, code and / or data structures for implementation of the techniques described in this disclosure. A computer program product can include a computer-readable medium.
[0349] By way of example, and not limitation, such computer-readable storage media can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage, or other magnetic storage devices, flash memory, or any other storage medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any
[0350] Instructions can 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 circuitry. Accordingly, the terms “processor” and “processing circuitry,” as used herein can refer to any of the foregoing structures or any other structure suitable for implementation of the techniques described herein. In addition, in some aspects, the functionality described herein can be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Also, the techniques could be fully implemented in one or more circuits or logic elements.
[0351] The techniques of this disclosure can 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 chip set). Various components, modules, or units are described herein as being stored in or on memory, which can include one or more types of computer-readable storage media. In some examples, a component, module, or unit can be a software module or firmware module operating to
[0352] Various examples have been described. These and other examples are within the scope of the following claims.
Claims
1. A method for binarying or debinding video data, the method comprising: Calculate the local sum of the absolute values of the adjacent coefficients of the current coefficient in the current block of video data, using the value locSumAbs. The shift value is derived based on at least one of the bit depth of the video data or the locSumAbs value. The shift value is used to normalize the locSumAbs value to generate a normalized locSumAbs value. The Rice parameter is determined using the normalized locSumAbs value; as well as Use the Rice parameter to binary or debind the current coefficient.
2. The method according to claim 1 further includes performing context-adaptive binary arithmetic encoding / decoding (CABAC) on the current coefficients.
3. The method of claim 1, wherein normalizing the locSumAbs value comprises right-shifting the locSumAbs value bit by bit using the shift value to generate the normalized locSumAbs value.
4. The method of claim 1, further comprising limiting the normalized locSumAbs value.
5. The method of claim 1, wherein determining the Rice parameter comprises deriving the Rice parameter from the normalized locSumAbs value based on a lookup table.
6. The method of claim 5, wherein the lookup table comprises: The Rice parameter includes cRiceParam, and the method further includes... Update the Rice parameter, where c is determined based on the shift value.
7. The method of claim 1, wherein calculating the locSumAbs value and normalizing the locSumAbs value comprises calculating the localSumAbs value as equal to... .
8. The method of claim 7, wherein deriving the shift value comprises calculating the shift value as... .
9. The method of claim 8, wherein Bitdepth specifies the bit depth of the video data, b specifies the operation bit depth, and a is set to an integer power equal to 2.
10. The method of claim 8, wherein deriving the shift value comprises based on Calculate the shift value.
11. The method of claim 10, wherein T is a predefined threshold.
12. The method of claim 1, wherein deriving the shift value further comprises deriving the shift value based on one or more of the following: input bit depth, predefined operation bit depth, local activity of transform coefficients, block size, or syntax elements signaled in the bitstream including the video data.
13. The method of claim 1, wherein calculating the locSumAbs value and normalizing the locSumAbs value comprises calculating: ;as well as 。 14. The method of claim 13, wherein deriving the shift value comprises calculating the values of shift and shift1 as: ;as well as 。 15. The method of claim 14, wherein T is a threshold, baseLevel represents the original value of the current coefficient, Bitdepth specifies the bit depth of the video data, b specifies the operation bit depth, and a is set to an integer power equal to 2.
16. The method of claim 1, wherein calculating the locSumAbs value, deriving the shift value, and normalizing the locSumAbs value comprises calculating: ; ; 。 17. The method of claim 16, wherein T is a threshold, scl is a scaling value, and N is the number of bits.
18. The method of claim 17, further comprising determining a value of one or more of T, scl, and N based on the bit depth of the bitstream including the video data.
19. The method of claim 17, further comprising determining a value of one or more of T, scl, and N from data signaled in a bitstream including the video data.
20. The method of claim 19, wherein the signaled data includes one or more of the following: Sequence Parameter Set (SPS), Picture Parameter Set (PPS), Adaptive Parameter Set (APS), or slice header.
21. The method of claim 17, further comprising determining the value of T (8), the value of N (3), and , where bitdepth has a value representing the bit depth of the bit stream including the video data.
22. The method of claim 17, further comprising determining a predetermined value for one or more of T, scl, and N.
23. The method of claim 1, further comprising deriving a temporary Rice parameter value using the locSumAbs value, wherein determining the Rice parameter includes calculating the Rice parameter as the sum of the temporary Rice parameter value and the variable c.
24. The method of claim 23, further comprising determining the value of c to be equal to the shift value.
25. The method of claim 23, further comprising deriving the value of c from the shift value.
26. An apparatus for binary or debinary conversion of video data, the apparatus comprising: Configured as a storage device for storing video data; as well as One or more processors implemented in the circuit, and configured to: Calculate the local sum of the absolute values of the adjacent coefficients of the current coefficient in the current block of video data, using the value locSumAbs. The shift value is derived based on at least one of the bit depth of the video data or the locSumAbs value. The shift value is used to normalize the locSumAbs value to generate a normalized locSumAbs value. The Rice parameter is determined using the normalized locSumAbs value; as well as Use the Rice parameter to binary or debind the current coefficient.
27. The device of claim 26, wherein the one or more processors are configured to perform context-adaptive binary arithmetic encoding / decoding (CABAC) on the current coefficients.
28. The device of claim 26, wherein, in order to normalize the locSumAbs value, the one or more processors are configured to right-shift the locSumAbs value bit-by-bit using the shift value.
29. The device of claim 26, wherein the one or more processors are further configured to limit the normalized locSumAbs value.
30. The device of claim 26, wherein, in order to determine the Rice parameter, the one or more processors are configured to derive the Rice parameter from the normalized locSumAbs value based on a lookup table.
31. The device of claim 30, wherein the lookup table comprises: The Rice parameter includes cRiceParam, and the one or more processors are further configured to... Update the Rice parameter, where c is determined based on the shift value.
32. The device of claim 26, further comprising a display configured to display the video data.
33. The device of claim 26, wherein the device comprises one or more of a camera, computer, mobile device, broadcast receiver device, or set-top box.
34. A computer-readable storage medium having instructions stored thereon, the instructions causing a processor to: Calculate the local sum of the absolute values of the adjacent coefficients of the current coefficient in the current block of video data, using the value locSumAbs. The shift value is derived based on at least one of the bit depth of the video data or the locSumAbs value. The shift value is used to normalize the locSumAbs value to generate a normalized locSumAbs value. The Rice parameter is determined using the normalized locSumAbs value; as well as Use the Rice parameter to binary or debind the current coefficient.
35. An apparatus for decoding video data, the apparatus comprising: The component used to calculate the local sum of the absolute values of the adjacent coefficients of the current coefficient of the current block of video data, locSumAbs value; A component for deriving a shift value based on at least one of the bit depth of the video data or the locSumAbs value; A component for normalizing the locSumAbs value using the shift value to generate a normalized locSumAbs value; Components for determining Rice parameters using the normalized locSumAbs value; as well as A component used to decode the video data using the Rice parameter.