Methods, apparatus and computer-readable storage media for video decoding
By determining the number of non-zero transform coefficients based on the data block size in video decoding, and applying LFNST and inverse separable transform, the problem of unnecessary coefficient zeroing in hardware implementation is solved, thus improving decoding efficiency and quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QUALCOMM INC
- Filing Date
- 2021-09-27
- Publication Date
- 2026-05-26
Smart Images

Figure CN116250233B_ABST
Abstract
Description
[0001] This application claims the benefit of U.S. Patent Application No. 17 / 326,588, filed May 21, 2021, and U.S. Provisional Patent Application No. 63 / 086,888, filed October 2, 2020, the entire contents of each of which are incorporated herein by reference. U.S. Patent Application No. 17 / 326,588, filed May 21, 2021, claims the benefit of U.S. Provisional Patent Application No. 63 / 086,888, filed October 2, 2020. Technical Field
[0002] This disclosure relates to video encoding and video decoding. Background Technology
[0003] Digital video capabilities can be incorporated into a wide variety of devices, including digital televisions, digital live broadcast 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 decoding technologies (such as those described in standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 (Part 10, Advanced Video Decoding (AVC)), ITU-T H.265 / High Efficiency Video Decoding (HEVC), and extensions to such standards). By implementing such video decoding technologies, video devices can more efficiently send, receive, encode, decode, and / or store digital video information.
[0004] Video decoding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video decoding, video slices (e.g., video pictures or portions of video pictures) can be segmented into video blocks, which may also be referred to as decoding tree units (CTUs), decoding units (CUs), and / or decoding nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial prediction relative to reference samples in adjacent blocks within the same picture. Video blocks in an inter-coded (P or B) slice of a picture can use spatial prediction relative to reference samples in adjacent blocks within the same picture, or temporal prediction relative to reference samples in other reference pictures. A picture may be referred to as a frame, and a reference picture may be referred to as a reference frame. Summary of the Invention
[0005] The techniques disclosed herein relate to transform decoding. More specifically, this disclosure describes various low-frequency non-separable transform (LFNST) designs that can improve decoding efficiency in general video decoding (VVC / H.266). The techniques of this disclosure can also be used in other improved video codecs, including extensions to HEVC and next-generation video decoding standards.
[0006] For hardware implementations, the number of worst-case multiplications (coefficients per transform) can be an important complexity metric. A simple technique to reduce the number of worst-case multiplications is to canonically zero-out some transform coefficients and have a maximum number of non-zero transform coefficients. In this context, zeroed-out transform coefficients must be set to zero. Conversely, allowed non-zero transform coefficients can be either zero or non-zero. In this respect, the allowed number of non-zero transform coefficients can represent the maximum possible number of non-zero transform coefficients, and the actual number of non-zero transform coefficients can be less than the maximum value. Conversely, the number of zeroed-out transform coefficients can represent the minimum number of transform coefficients equal to zero, and the actual number of transform coefficients equal to zero can be greater than the minimum value.
[0007] Zeroing out coefficients can degrade decoding quality and is therefore undesirable unless a worst-case multiplication count is required. In VVC, these standards are hardwired for the TU size, which in some decoding scenarios results in more transform coefficients being zeroed out than the worst-case multiplication count standard is needed. To address this drawback, this disclosure describes a technique for determining the number of permissible non-zero transform coefficients based on the transform dimension and the dimension of the transform matrix (including the number of “support samples”). By determining the number of permissible non-zero coefficients for a video data block based on its size, a video decoder operating according to the technique of this disclosure can avoid unnecessarily zeroing out coefficients when not needed, while still meeting the worst-case multiplication standard.
[0008] According to one example, a method for decoding video data includes: determining the number of allowed non-zero coefficients for a block based on the size of the video data block; obtaining a set of dequantized coefficients for the video data block, wherein the set of dequantized coefficients includes a first subset of dequantized coefficients and a second subset of dequantized coefficients, the first subset of dequantized coefficients including non-zero dequantized coefficients and the second subset of dequantized coefficients including all-zero coefficients, wherein the number of coefficients in the first subset of dequantized coefficients is equal to the number of allowed non-zero coefficients for the video data block; applying an inverse low-frequency non-separable transform (LFNST) to the first subset of dequantized coefficients to determine a first intermediate subset of coefficients; and applying an inverse separable transform to at least a portion of the first intermediate subset of coefficients and the second subset of coefficients to determine a block of reconstructed residual values.
[0009] According to another example, an apparatus for decoding video data includes: a memory configured to store video data; and one or more processors implemented in a circuit and configured to: determine the number of permissible non-zero coefficients for a block based on the size of the video data block; obtain a set of dequantized coefficients for the video data block, wherein the set of dequantized coefficients includes a first subset of dequantized coefficients and a second subset of dequantized coefficients, the first subset of dequantized coefficients including non-zero dequantized coefficients and the second subset of dequantized coefficients including all-zero coefficients, wherein the number of coefficients in the first subset of dequantized coefficients is equal to the number of permissible non-zero coefficients for the video data block; apply an inverse low-frequency non-separable transform (LFNST) to the first subset of dequantized coefficients to determine a first intermediate subset of coefficients; and apply an inverse separable transform to at least a portion of the first intermediate subset of coefficients and the second subset of coefficients to determine a block of reconstructed residual values.
[0010] According to another example, a computer-readable storage medium storing instructions that, when executed by one or more processors, cause the one or more processors to: determine the number of permissible non-zero coefficients for a video data block based on the size of the block; obtain a set of dequantized coefficients for the video data block, wherein the set of dequantized coefficients includes a first subset of dequantized coefficients and a second subset of dequantized coefficients, the first subset of dequantized coefficients including non-zero dequantized coefficients and the second subset of dequantized coefficients including all-zero coefficients, wherein the number of coefficients in the first subset of dequantized coefficients is equal to the number of permissible non-zero coefficients for the video data block; apply an inverse low-frequency non-separable transform (LFNST) to the first subset of dequantized coefficients to determine a first intermediate subset of coefficients; and apply an inverse separable transform to at least a portion of the first intermediate subset of coefficients and the second subset of coefficients to determine a block of reconstructed residual values.
[0011] According to another example, an apparatus for decoding video data includes: a unit for determining the number of permissible non-zero coefficients for a block based on the size of the video data block; a unit for obtaining a set of dequantized coefficients for the video data block, wherein the set of dequantized coefficients includes a first subset of dequantized coefficients and a second subset of dequantized coefficients, the first subset of dequantized coefficients including non-zero dequantized coefficients and the second subset of dequantized coefficients including all-zero coefficients, wherein the number of coefficients in the first subset of dequantized coefficients is equal to the number of permissible non-zero coefficients for the video data block; a unit for applying an inverse low-frequency non-separable transform (LFNST) to the first subset of dequantized coefficients to determine a first intermediate subset of coefficients; and a unit for applying an inverse separable transform to at least a portion of the first intermediate subset of coefficients and the second subset of coefficients to determine a block of reconstructed residual values.
[0012] Details of one or more examples are set forth in the accompanying drawings and the following description. Other features, objects, and advantages will be apparent from the specification, drawings, and claims. Attached Figure Description
[0013] Figure 1 This is a block diagram illustrating an example video encoding and decoding system that can perform the techniques described in this disclosure.
[0014] Figure 2A and Figure 2B This is a conceptual diagram showing an example quadtree binary tree (QTBT) structure and its corresponding decoding tree unit (CTU).
[0015] Figure 3 This is a block diagram showing an example low-frequency non-separable transform (LFNST) at the encoder and decoder.
[0016] Figure 4 This is a conceptual diagram illustrating the inverse transformation process when using LFNST.
[0017] Figure 5 This is a conceptual diagram illustrating a 4x4 inverse LFNST used to reconstruct 16 intermediate coefficients from a list of 16 input coefficients.
[0018] Figure 6 A diagram is shown for reconstructing an 8x8 inverse LFNST from a list of 16 input coefficients and 48 intermediate coefficients.
[0019] Figure 7 A diagram illustrating the inverse LFNST process is shown.
[0020] Figure 8 An example of input reconstruction based on a raster scan with 16 decoding coefficients is shown.
[0021] Figure 9 An example of input reconstruction based on a raster scan with 64 decoding coefficients is shown.
[0022] Figure 10 A diagram is shown for reconstructing an 8x8 inverse LFNST from 16 input coefficients and 64 intermediate coefficients.
[0023] Figure 11 An example illustration of an 8x8 inverse LFNST for reconstructing 64 intermediate coefficients from 64 input coefficients is shown.
[0024] Figure 12 This is a block diagram illustrating an example video encoder that can perform the techniques described in this disclosure.
[0025] Figure 13 This is a block diagram illustrating an example video decoder that can perform the techniques described in this disclosure.
[0026] Figure 14 This is a flowchart illustrating an example process for encoding the current block according to the techniques described in this disclosure.
[0027] Figure 15 This is a flowchart illustrating an example process for decoding the current block according to the techniques described in this disclosure.
[0028] Figure 16 This is a flowchart illustrating an example process for decoding the current block according to the techniques described in this disclosure. Detailed Implementation
[0029] Video decoding (e.g., video encoding and / or video decoding) typically involves predicting video data blocks from decoded video data blocks in the same frame (e.g., intra-frame prediction) or from decoded video data blocks in different frames (e.g., inter-frame prediction). In some cases, the video encoder also computes residual data by comparing the predicted block with the original block. Therefore, the residual data represents the difference between the predicted block and the original block. To reduce the number of bits required to signal the residual data, the video encoder transforms and quantizes the residual data and signals the transformed and quantized residual data in the encoded bitstream. Compression achieved through the transformation and quantization process can be lossy, meaning that the transformation and quantization process may introduce distortion into the decoded video data.
[0030] The video decoder decodes the residual data and adds it to the prediction blocks to produce reconstructed video blocks that are closer to the original video blocks than the individual prediction blocks. The first reconstructed block may exhibit distortion or artifacts due to losses introduced by the transformation and quantization of the residual data. A common type of artifact or distortion is called blockiness, where the boundaries of the blocks used to decode the video data are visible.
[0031] To further improve the quality of the decoded video, the video decoder can perform one or more filtering operations on the reconstructed video blocks. Examples of these filtering operations include deblocking filtering, Sample Adaptive Offset (SAO) filtering, and Adaptive Loop Filtering (ALF). The parameters used for these filtering operations can be determined by the video encoder and explicitly signaled in the encoded video bitstream, or they can be implicitly determined by the video decoder without being explicitly signaled in the encoded video bitstream.
[0032] The techniques disclosed herein relate to transform decoding. More specifically, this disclosure describes various low-frequency non-separable transform (LFNST) designs that can improve decoding efficiency in general video decoding (VVC / H.266). The techniques of this disclosure can also be used in other advanced video codecs, including extensions to HEVC and next-generation video decoding standards.
[0033] When implementing LFNST, the video decoder performs a coefficient decoding step to obtain a list of 2D dequantized coefficients. The decoder applies inverse LFNST to reconstruct a subset of coefficients. The video decoder then uses an inverse separable transform (e.g., DCT-2) to reconstruct the residuals in the 2D blocks / array. In some examples, the video decoder can use a larger transform matrix (increasing the number of supporting samples) and, correspondingly, a larger set of transforms and candidates to allow for optimization of the matrix for more intra-frame prediction modes.
[0034] For hardware implementations, the number of worst-case multiplications (coefficients per transform) can be an important complexity metric. A simple technique to reduce the number of worst-case multiplications is to canonically zero some transform coefficients and have a maximum number of non-zero transform coefficients. In this context, the zeroed-out transform coefficients must be set to zero. Conversely, the allowed non-zero transform coefficients can be either zero or non-zero. In this respect, the allowed number of non-zero transform coefficients can represent the maximum possible number of non-zero transform coefficients, and the actual number of non-zero transform coefficients can be less than the maximum value. Conversely, the number of zeroed-out transform coefficients can represent the minimum number of transform coefficients equal to zero, and the actual number of transform coefficients equal to zero can be greater than the minimum value.
[0035] Zeroing out coefficients can degrade decoding quality and is therefore undesirable unless a worst-case multiplication count is required. In VVC, these standards are hardwired for the TU size, which in some decoding scenarios results in more transform coefficients being zeroed out than the worst-case multiplication count standard is needed. To address this drawback, this disclosure describes a technique for determining the number of permissible non-zero transform coefficients based on the transform dimension and the dimension of the transform matrix (including the number of “support samples”). By determining the number of permissible non-zero coefficients for a video data block based on its size, a video decoder operating according to the technique of this disclosure can avoid unnecessarily zeroing out coefficients when not needed, while still meeting the worst-case multiplication standard.
[0036] Figure 1This is a block diagram illustrating an example video encoding and decoding system 100 capable of performing the techniques of this disclosure. In general, the techniques of this disclosure relate to decoding (encoding and / or decoding) video data. Typically, video data includes any data used for processing video. Therefore, video data can include raw, unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata (e.g., signaling data).
[0037] like Figure 1 As shown, in this example, system 100 includes source device 102, which provides encoded video data to be decoded and displayed by destination device 116. Specifically, source device 102 provides the video data to destination device 116 via computer-readable medium 110. Each of source device 102 and destination device 116 can be any one or more of a wide variety of devices, including desktop computers, laptop computers, mobile devices, tablet computers, set-top boxes, mobile phones such as smartphones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, broadcast receivers, etc. In some cases, source device 102 and destination device 116 may be equipped for wireless communication and may therefore be referred to as wireless communication devices.
[0038] exist Figure 1 In the example, source device 102 includes a video source 104, memory 106, video encoder 200, and output interface 108. Destination device 116 includes an input interface 122, video decoder 300, memory 120, and display device 118. According to this disclosure, the video encoder 200 of source device 102 and the video decoder 300 of destination device 116 can be configured to apply the LFNST technology described herein. Therefore, source device 102 represents an example of a video encoding device, and destination device 116 represents an example of a video decoding device. In other examples, the source and destination devices may include other components or arrangements. For example, source device 102 may receive video data from an external video source such as an external camera. Similarly, destination device 116 may interface with an external display device, rather than including an integrated display device.
[0039] like Figure 1The system 100 shown is merely an example. Typically, any digital video encoding and / or decoding device can perform the LFNST technology described herein. Source device 102 and destination device 116 are merely examples of such decoding devices, where source device 102 generates decoded video data for transmission to destination device 116. In this disclosure, "decoding device" refers to a device that performs the decoding (e.g., encoding and / or decoding) of data. Thus, video encoder 200 and video decoder 300 represent examples of decoding devices (specifically, video encoder and video decoder). 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 one-way or two-way video transmission between source device 102 and destination device 116, for example, for video streaming, video playback, video broadcasting, or video telephony.
[0040] Typically, video source 104 represents a source of video data (i.e., raw, unencoded video data) and provides a sequential series of pictures (also referred to as "frames") of the video data to video encoder 200, which encodes the data used for the pictures. Video source 104 of source device 102 may include video capture devices such as cameras, video archive units containing previously captured raw video, and / or video feed interfaces for receiving video from video content providers. Alternatively, video source 104 may generate computer graphics-based data as source video, or a combination of live video, archived video, and computer-generated video. In each case, video encoder 200 may encode the captured, pre-captured, or computer-generated video data. Video encoder 200 may rearrange the pictures from the received order (sometimes referred to as "display order") to a decoding order for decoding. Video encoder 200 may generate a bitstream comprising the encoded video data. Then, the source device 102 can output the encoded video data to the computer-readable medium 110 via the output interface 108 so that it can be received and / or retrieved by, for example, the input interface 122 of the destination device 116.
[0041] The memory 106 of source device 102 and the memory 120 of destination device 116 represent general-purpose memory. In some examples, memories 106 and 120 may store raw video data, such as raw video from video source 104 and raw decoded video data from video decoder 300. Alternatively, memories 106 and 120 may store software instructions executable by, for example, video encoder 200 and video decoder 300. Although memories 106 and 120 are shown separately from video encoder 200 and video decoder 300 in this example, it should be understood that video encoder 200 and video decoder 300 may also include internal memory for functionally similar or equivalent purposes. Furthermore, memories 106 and 120 may store, for example, encoded video data output from video encoder 200 and input to video decoder 300. In some examples, portions of memories 106 and 120 may be allocated as one or more video buffers, for example, to store raw decoded and / or encoded video data.
[0042] Computer-readable medium 110 can represent any type of medium or device capable of transmitting encoded video data from source device 102 to destination device 116. In one example, computer-readable medium 110 represents a communication medium enabling source device 102 to directly transmit encoded video data to destination device 116 in real time, for example, via a radio frequency network or a computer-based network. Output interface 108 can modulate the transmitted signal including the encoded video data according to a communication standard such as a wireless communication protocol, and input interface 122 can demodulate the received transmitted signal according to a communication standard such as a wireless communication standard. The communication medium can include any wireless or wired communication medium, such as radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium can form part of a packet-based network such as a local area network, a wide area network, or a global network such as the Internet. The communication medium can include a router, a switch, a base station, or any other device that may be useful for facilitating communication from source device 102 to destination device 116.
[0043] 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 may include any of a variety of distributed or locally accessed data storage media, such as hard disk drives, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.
[0044] In some examples, source device 102 can output encoded video data to file server 114 or to another intermediate storage device that can store the encoded video generated by source device 102. Destination device 116 can access the stored video data from file server 114 via streaming or download.
[0045] File server 114 can be any type of server device capable of storing encoded video data and sending such encoded video data to destination device 116. File server 114 can represent a web server (e.g., for a website), a server configured to provide file transfer protocol services (e.g., File Transfer Protocol (FTP) or FLUTE-based file transfer protocol), a content delivery network (CDN) device, a Hypertext Transfer Protocol (HTTP) server, a Multimedia Broadcast Multicast Service (MBMS) or enhanced MBMS (eMBMS) server, and / or a Network Attached Storage (NAS) device. File server 114 may additionally or alternatively implement one or more HTTP streaming protocols, such as HTTP-based Dynamic Adaptive Streaming (DASH), HTTP Real-Time Streaming (HLS), Real-Time Streaming Protocol (RTSP), HTTP Dynamic Streaming, etc.
[0046] Destination device 116 can access encoded video data from file server 114 via any standard data connection, including an internet connection. This can include a wireless channel (e.g., Wi-Fi connection), a wired connection (e.g., Digital Subscriber Line (DSL), cable modem, etc.), or a combination of both, suitable for accessing encoded video data stored on file server 114. Input interface 122 can be configured to operate according to any one or more of the various protocols discussed above for retrieving or receiving media data from file server 114, or other such protocols for retrieving media data.
[0047] Output interface 108 and input interface 122 may represent a wireless transmitter / receiver, a modem, a wired networking component (e.g., an Ethernet card), a wireless communication component operating according to any of the various IEEE 802.11 standards, or other physical components. In examples where output interface 108 and input interface 122 include wireless components, output interface 108 and input interface 122 may be configured to transmit data (such as encoded video data) according to cellular communication standards (such as 4G, 4G-LTE (Long Term Evolution), improved LTE, 5G, etc.). In some examples where output interface 108 includes a wireless transmitter, output interface 108 and input interface 122 may be configured to transmit data (such as encoded video data) according to other wireless standards (such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee™), the Bluetooth™ standard, etc.). In some examples, source device 102 and / or destination device 116 may include corresponding system-on-chip (SoC) devices. For example, source device 102 may include a SoC device for performing functions assigned to video encoder 200 and / or output interface 108, and destination device 116 may include a SoC device for performing functions assigned to video decoder 300 and / or input interface 122.
[0048] The technology disclosed herein can be applied to video decoding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, internet streaming video transmission (such as HTTP-based Dynamic Adaptive Streaming (DASH)), digital video encoded onto data storage media, decoding digital video stored on data storage media, or other applications.
[0049] The input interface 122 of the destination device 116 receives an encoded video bitstream from a computer-readable medium 110 (e.g., a communication medium, storage device 112, file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200 and also used by the video decoder 300, such as syntax elements having values describing the characteristics and / or processing of video blocks or other decoding units (e.g., slices, pictures, picture groups, sequences, etc.). The display device 118 displays a decoded image of the decoded video data to the user. The display device 118 may represent any of 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.
[0050] Despite Figure 1Not 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 including both audio and video in a common data stream. Where applicable, the MUX-DEMUX unit may comply with the ITU H.223 multiplexer protocol or other protocols (such as User Datagram Protocol (UDP)).
[0051] The video encoder 200 and video decoder 300 can each be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When the technology is implemented in part in software, the device may store instructions for the software in a suitable non-transitory computer-readable medium and use one or more processors to execute the instructions in hardware to perform the technology of this disclosure. Each of the video encoder 200 and video decoder 300 may be included in one or more encoders or decoders, and either encoder or decoder may be integrated as part of a combined encoder / decoder (CODEC) in the respective device. Devices including the video encoder 200 and / or video decoder 300 may include integrated circuits, microprocessors, and / or wireless communication devices (such as cellular phones).
[0052] The video encoder 200 and video decoder 300 can operate according to video decoding standards such as ITU-T H.265 (also known as the High Efficiency Video Decoding (HEVC) standard) or extensions thereof such as MultiView and / or Scalable Video Decoding Extensions. Alternatively, the video encoder 200 and video decoder 300 can operate according to other proprietary or industry standards such as the ITU-T H.266 standard (also known as Universal Video Decoding (VVC)). A draft of the VVC standard is described in “Versatile Video Coding (Draft 10)” by Bross et al., ITU-T SG 16 WP 3 and the Joint Video Experts Group (JVET) of ISO / IEC JTC 1 / SC 29 / WG 11, 18th Meeting, Teleconference, June 22-July 1, 2020, JVET-S2001-v17 (hereinafter referred to as “VVC Draft 10”). However, the technology of this disclosure is not limited to any particular decoding standard.
[0053] Typically, video encoder 200 and video decoder 300 can perform block-based decoding of images. The term "block" generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used during encoding and / or decoding). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Typically, video encoder 200 and video decoder 300 can decode video data represented in YUV (e.g., Y, Cb, Cr) format. That is, instead of decoding the red, green, and blue (RGB) data used for images, video encoder 200 and video decoder 300 can decode both luminance and chrominance components, where chrominance components may include both red hue and blue hue chrominance components. In some examples, video encoder 200 converts the received RGB-formatted data to a YUV representation before encoding, and video decoder 300 converts the YUV representation to RGB format. Alternatively, preprocessing and postprocessing units (not shown) may perform these conversions.
[0054] In summary, this disclosure may relate to the decoding (e.g., encoding and decoding) of images to include the process of encoding or decoding the data of an image. Similarly, this disclosure may relate to the decoding of blocks of an image to include the process of encoding or decoding the data used for the blocks (e.g., prediction and / or residual decoding). Encoded video bitstreams typically include a series of values for representing decoding decisions (e.g., decoding modes) and syntax elements that segment the image into blocks. Therefore, references to decoding images or blocks should generally be understood as decoding the values of the syntax elements used to form images or blocks.
[0055] HEVC defines various blocks, including decoding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video decoder (such as a video encoder 200) partitions a decoding tree unit (CTU) into CUs based on a quadtree structure. That is, the video decoder partitions the CTU and CU into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. Nodes without child nodes can be called "leaf nodes," and the CU of such leaf nodes can include one or more PUs and / or one or more TUs. The video decoder can further partition PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents a partition of the TU. In HEVC, PUs represent inter-frame prediction data, while TUs represent residual data. CUs with intra-frame prediction include intra-frame prediction information, such as intra-frame mode indication.
[0056] As another example, video encoder 200 and video decoder 300 can be configured to operate according to VVC. According to VVC, the video decoder (such as video encoder 200) segments the image into multiple decoding tree units (CTUs). Video encoder 200 can segment CTUs according to a tree structure (such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure). The QTBT structure eliminates the concept of multiple segmentation types, such as the separation between CUs, PUs, and TUs in HEVC. The QTBT structure includes two levels: a first level segmented according to quadtree segmentation and a second level segmented according to binary tree segmentation. The root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary tree correspond to decoding units (CUs).
[0057] In the MTT partitioning structure, blocks can be partitioned using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of ternary tree (TT) partitioning (also known as tripartite tree (TT)) partitioning. A ternary or tripartite tree partitioning is a partition in which a block is split into three sub-blocks. In some examples, a ternary or tripartite tree partitioning divides a block into three sub-blocks without splitting the original block through a center. The partitioning types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.
[0058] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luma and chroma components, while in other examples, the video encoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luma component and another QTBT / MTT structure for the two chroma components (or two QTBT / MTT structures for the respective chroma components).
[0059] The video encoder 200 and video decoder 300 can be configured to use per-HEVC quadtree segmentation, QTBT segmentation, MTT segmentation, or other segmentation structures. For illustrative purposes, a description of the techniques of this disclosure is given with respect to QTBT segmentation. However, it should be understood that the techniques of this disclosure can also be applied to video decoders configured to use quadtree segmentation or other types of segmentation.
[0060] In some examples, a CTU includes a decoded tree block (CTB) of luminance samples, two corresponding CTBs of chrominance samples of an image with three sample arrays, or a CTB of samples of a monochrome image or an image decoded using three separate color planes and a syntax structure for decoding the samples. A CTB can be an NxN sample block for some value of N, such that partitioning the components into CTBs is a partition. A component is an array or a single sample from one of the three arrays (luminance and two chrominance) that make up an image in a 4:2:0, 4:2:2, or 4:4:4 color format, or an array or a single sample from an array or array that makes up a monochrome image. In some examples, a decoded block is an MxN sample block for some values of M and N, such that partitioning the CTB into decoded blocks is a partition.
[0061] Blocks (e.g., CTUs or CUs) can be grouped within an image in various ways. As an example, a brick can refer to a rectangular area within a row of CTUs in an image, specifically within a tile. A tile can be a rectangular area of a CTU within a specific tile column or row. A tile column is a rectangular area of a CTU with a height equal to the image height and a width specified by a syntax element (e.g., as specified in the image parameter set). A tile row is a rectangular area of a CTU with a height specified by a syntax element (e.g., as in the image parameter set) and a width equal to the image width.
[0062] In some examples, a tile can be divided into multiple bricks, each brick potentially including one or more CTU rows within the tile. A tile that is not divided into multiple bricks can also be referred to as a brick. However, a brick that is a true subset of a tile cannot be referred to as a tile.
[0063] The bricks in an image can also be arranged as slices. A slice can be an integer number of bricks in the image, which can be exclusively contained in a single Network Abstraction Layer (NAL) unit. In some examples, a slice consists of several complete tiles or a consecutive sequence of complete bricks consisting of only one tile.
[0064] This disclosure uses "NxN" and "N by N" interchangeably to refer to the sample dimensions of a block (such as a CU or other video block) in the vertical and horizontal dimensions, for example, 16x16 samples or 16 by 16 samples. Typically, a 16x16 CU will have 16 samples in the vertical direction (y = 16) and 16 samples in the horizontal direction (x = 16). Similarly, an NxN CU typically has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. Samples in a CU can be arranged in rows and columns. Furthermore, a CU does not necessarily need to have the same number of samples in the horizontal direction as it does in the vertical direction. For example, a CU can include NxM samples, where M is not necessarily equal to N.
[0065] The video encoder 200 encodes video data for representation prediction and / or residual information, as well as other information, used for the CU. The prediction information indicates how the CU will be predicted to form a prediction block for the CU. The residual information typically represents the sample-by-sample difference between a sample of the CU before encoding and the prediction block.
[0066] To predict the Cubic Frame (CU), the video encoder 200 typically forms prediction blocks for the CU using either inter-frame prediction or intra-frame prediction. Inter-frame prediction generally refers to predicting the CU based on data from previously decoded images, while intra-frame prediction generally refers to predicting the CU based on data from previously decoded images of the same frame. To perform inter-frame prediction, the video encoder 200 can use one or more motion vectors to generate prediction blocks. The video encoder 200 can typically perform a motion search to identify, for example, a reference block that closely matches the CU in terms of the difference between the CU and a reference block. The video encoder 200 can use the following to compute difference metrics to determine whether a reference block closely matches the current CU: Sum of Absolute Differences (SAD), Sum of Squared Differences (SSD), Mean Absolute Difference (MAD), Mean Squared Difference (MSD), or other such difference calculations. In some examples, the video encoder 200 can use unidirectional or bidirectional prediction to predict the current CU.
[0067] Some examples of VVC also provide an affine motion compensation mode, which can be considered an inter-frame prediction mode. In affine motion compensation mode, the video encoder 200 can determine two or more motion vectors to represent non-translational motion (such as zooming in or out, rotation, perspective motion, or other irregular types of motion).
[0068] To perform intra-frame prediction, the video encoder 200 can select an intra-frame prediction mode to generate prediction blocks. Some examples of VVC provide sixty-seven intra-frame prediction modes, including various directional modes, as well as planar and DC modes. Typically, the video encoder 200 selects an intra-frame prediction mode that describes the samples of the current block (e.g., a block of a CU) to be predicted based on, which are the neighboring samples of the current block. Assuming the video encoder 200 decodes the CTU and CU in raster scan order (from left to right, from top to bottom), such samples can typically be located above, to the upper left, or to the left of the current block within the same image.
[0069] The video encoder 200 encodes data representing the prediction mode used for the current block. For example, for inter-frame prediction modes, the video encoder 200 may encode data indicating which of the various available inter-frame prediction modes is used, and motion information for the corresponding mode. For unidirectional or bidirectional inter-frame prediction, for example, the video encoder 200 may use Advanced Motion Vector Prediction (AMVP) or merging modes to encode motion vectors. The video encoder 200 may use similar modes to encode motion vectors used for affine motion compensation modes.
[0070] Following a prediction, such as intra-frame or inter-frame prediction of a block, the video encoder 200 can compute residual data for that block. The residual data (such as a residual block) represents the sample-by-sample difference between the block and the prediction block used to form the block, which is formed using the corresponding prediction mode. The video encoder 200 can apply one or more transforms to the residual block to produce transformed data in the transform domain rather than the sample domain. For example, the video encoder 200 can apply a Discrete Cosine Transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. Additionally, the video encoder 200 can apply a secondary transform after the first transform, such as a Mode-dependent Inseparable Quadratic Transform (MDNSST), a Signal-dependent Transform, a Karhunen-Loeve Transform (KLT), etc. The video encoder 200 produces transform coefficients after applying one or more transforms.
[0071] As described above, after any transformation to produce transform coefficients, the video encoder 200 can perform quantization of the transform coefficients. Quantization generally refers to the process in which the transform coefficients are quantized to potentially reduce the amount of data used to represent the transform coefficients, thereby providing further compression. By performing the quantization process, the video encoder 200 can reduce the bit depth associated with some or all of the representation coefficients. For example, the video encoder 200 can reduce the bit depth associated with some or all of the representation coefficients during quantization. n The value of a bit is rounded down to m The value of the bits, wheren Greater than m In some examples, in order to perform quantization, the video encoder 200 may perform a bitwise right shift of the value to be quantized.
[0072] After quantization, the video encoder 200 can scan the transform coefficients to generate a one-dimensional vector from a two-dimensional matrix including the quantized transform coefficients. The scan can be designed to place higher-energy (and therefore lower-frequency) transform coefficients before the vector and lower-energy (and therefore higher-frequency) transform coefficients after the vector. In some examples, the video encoder 200 can utilize a predefined scan order to scan the quantized transform coefficients to produce a serialized vector, and then entropy-encode the quantized transform coefficients of the vector. In other examples, the video encoder 200 can perform an adaptive scan. After scanning the quantized transform coefficients to form a one-dimensional vector, the video encoder 200 can entropy-encode the one-dimensional vector, for example, according to context-adaptive binary arithmetic decoding (CABAC). The video encoder 200 can also entropy-encode the values of syntax elements used to describe metadata associated with the encoded video data for use by the video decoder 300 when decoding the video data.
[0073] To perform CABAC, the video encoder 200 can assign context within a context model to the symbols to be transmitted. Context may involve, for example, whether the neighboring values of a symbol are zero. Probability determination can be based on the context assigned to the symbols.
[0074] The video encoder 200 can also generate, for example, grammatical data (such as block-based grammatical data, image-based grammatical data, and sequence-based grammatical data) or other grammatical data (such as sequence parameter sets (SPS), image parameter sets (PPS), or video parameter sets (VPS)) to the video decoder 300 in image headers, block headers, or slice headers. Similarly, the video decoder 300 can decode such grammatical data to determine how to decode the corresponding video data.
[0075] In this way, the video encoder 200 can generate a bitstream that includes encoded video data, such as syntax elements describing the segmentation of an image into blocks (e.g., CUs) and prediction and / or residual information for those blocks. Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.
[0076] Typically, the video decoder 300 performs the reverse process of the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 can use CABAC to decode the values of syntax elements used for the bitstream in a manner substantially similar to, but reversed, the CABAC encoding process of the video encoder 200. Syntax elements can define segmentation information for segmenting images into CTUs and for segmenting each CTU according to a corresponding segmentation structure (such as a QTBT structure) to define the CUs of the CTU. Syntax elements can also define prediction and residual information for blocks (e.g., CUs) of the video data.
[0077] The residual information can be represented, for example, by quantized transform coefficients. The video decoder 300 can inversely quantize and inversely transform the quantized transform coefficients of the block to reconstruct the residual block used for that block. The video decoder 300 uses a signal-informed prediction mode (intra-frame prediction or inter-frame prediction) and associated prediction information (e.g., motion information for inter-frame prediction) to form a prediction block for that block. The video decoder 300 can then combine the prediction block and the residual block (on a sample-by-sample basis) to reconstruct the original block. The video decoder 300 can perform additional processing, such as performing a deblocking process to reduce visual artifacts along the block boundaries.
[0078] In summary, this disclosure may involve "signaling" certain information (such as syntax elements). The term "signaling" can generally refer to the transmission of values for syntax elements and / or other data for decoding encoded video data. That is, video encoder 200 can signal values for syntax elements in the bitstream. Generally, signaling refers to values generated in the bitstream. As described above, source device 102 can transmit the bitstream to destination device 116 substantially in real time or not in real time (such as when syntax elements are stored in storage device 112 for later retrieval by destination device 116).
[0079] Figure 2A and 2BThis is a conceptual diagram illustrating an example Quadtree Binary Tree (QTBT) structure 130 and its corresponding Decoding Tree Unit (CTU) 132. Solid lines represent quadtree splits, and dashed lines indicate binary tree splits. In each split (i.e., non-leaf) node of the binary tree, a flag is signaled to indicate which split type (i.e., horizontal or vertical) is used, where, in this example, 0 indicates a horizontal split and 1 indicates a vertical split. For quadtree splits, since the quadtree node splits the block horizontally and vertically into four sub-blocks of equal size, there is no need to indicate the split type. Therefore, the video encoder 200 can encode the following, and the video decoder 300 can decode the following: syntax elements (such as split information) for the region tree level (i.e., solid lines) of the QTBT structure 130, and syntax elements (such as split information) for the prediction tree level (i.e., dashed lines) of the QTBT structure 130. The video encoder 200 can encode video data (such as prediction and transform data) for a CU represented by the terminal leaf nodes of the QTBT structure 130, and the video decoder 300 can decode the video data.
[0080] generally, Figure 2B The CTU 132 can be associated with parameters used to define the size of the blocks corresponding to the nodes at the first and second levels of the QTBT structure 130. These parameters may include the CTU size (representing the size of the CTU 132 in the sample), the minimum quadtree size (MinQTSize, which represents the minimum allowed quadtree leaf node size), the maximum binary tree size (MaxBTSize, which represents the maximum allowed binary tree root node size), the maximum binary tree depth (MaxBTDepth, which represents the maximum allowed binary tree depth), and the minimum binary tree size (MinBTSize, which represents the minimum allowed binary tree leaf node size).
[0081] The root node corresponding to the CTU in a QTBT structure can have four child nodes at the first level of the QTBT structure, each child node being segmented according to a quadtree partition. That is, the first-level node is a leaf node (with no child nodes) or has four child nodes. An example of QTBT structure 130 represents such a node as including a parent node and child nodes with solid-line branches. If the first-level node is not larger than the maximum allowed binary tree root node size (MaxBTSize), then the node can then be further partitioned by the corresponding binary tree. The binary tree partitioning of a node can be iterated until the node resulting from the partition reaches the minimum allowed binary tree leaf node size (MinBTSize) or the maximum allowed binary tree depth (MaxBTDepth). An example of QTBT structure 130 represents such a node as having dashed lines for branching. The binary tree leaf nodes are called decoding units (CUs), which are used for prediction (e.g., intra-image or inter-image prediction) and transformation without any further partitioning. As discussed above, CUs can also be referred to as “video chunks” or “blocks”.
[0082] In one example of a QTBT segmentation structure, the CTU size is set to 128x128 (luminance sample and two corresponding 64x64 chrominance samples), MinQTSize is set to 16x16, MaxBTSize is set to 64x64, MinBTSize (for both width and height) is set to 4, and MaxBTDepth is set to 4. First, a quadtree segmentation is applied to the CTU to generate quadtree leaf nodes. Quadtree leaf nodes can have sizes ranging from 16x16 (i.e., MinQTSize) to 128x128 (i.e., the CTU size). If a quadtree leaf node is 128x128, it will not be further split by the binary tree because this size exceeds MaxBTSize (i.e., 64x64 in this example). Otherwise, the quadtree leaf node will be further split by the binary tree. Therefore, the quadtree leaf node is also used as the root node of the binary tree and has a binary tree depth of 0. When the depth of a binary tree reaches MaxBTDepth (4 in this example), further splitting is not allowed. A binary tree node with a width equal to MinBTSize (4 in this example) means that further vertical splitting (i.e., width division) is not allowed for that binary tree node. Similarly, a binary tree node with a height equal to MinBTSize means that further horizontal splitting (i.e., height division) is not allowed for that binary tree node. As mentioned above, the leaf nodes of the binary tree are called CUs and are further processed according to prediction and transformation without further splitting.
[0083] Prior to HEVC, example video decoding standards used only fixed separable transforms, with DCT-2 used vertically and horizontally. In HEVC, in addition to DCT-2, DST-7 is also used for 4x4 blocks as a fixed separable transform.
[0084] U.S. Patent Publications 2016-0219290-A1, 2018-0020218-A1, and 2019-0373261-A1 describe techniques for Multi-Transform Selection (MTS). MTS can also be referred to as Adaptive Multi-Transform (AMT). The MTS example in 2019-0373261-A1 has been adopted in the Joint Video Experts Group (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG11, JEM software, https: / / jvet.hhi.fraunhofer.de / svn / svn_HMJEMSoftware / tags / HM-16.6-JEM-7.0 (JEM 7.0), and a simplified version of MTS was later adopted in VVC Draft 10.
[0085] Figure 3 This is an illustration of an example LFNST performed by a video encoder and a video decoder (e.g., video encoder 200 and video decoder 300), where the use of LFNST introduces a new stage between separable transform and quantization in the codec. Figure 3 As shown, on the encoder side (e.g., video encoder 200), the transform processing unit 206 can first apply a separable transform 500 to the transform block to obtain transform coefficients. The transform processing unit 206 can then apply LFNST 502 to a portion of the transform coefficients of the transform block (e.g., an LFNST region). As described above, the transform processing unit 206 can combine LFNST to apply a zeroing process. The quantization unit 208 can then quantize the obtained transform coefficients before entropy encoding. For... Figure 12 The transformation processing unit 206 and the quantization unit 208 are described in more detail.
[0086] On the decoder side (e.g., video decoder 300), the inverse quantization unit 306 first performs inverse quantization on the entropy-decoded transform coefficients in the transform block. Then, the inverse transform processing unit 308 of the video decoder 300 applies the inverse LFNST 504 to the LFSNT region of the transform block. The inverse transform processing unit 308 then applies the inverse separable transform 506 to the result of the inverse LFNST to produce a residual block. Figure 13 The inverse quantization unit 306 and the inverse transform processing unit 308 are described in more detail.
[0087] like Figure 3 As shown, LFNST is used in JEM-7.0 to further improve the decoding efficiency of MTS. The implementation of LFNST is based on HyGT described in U.S. Patent Publication 2017-0238013-A1. Additional designs and further details are also described in U.S. Patent Publication 2017-0094313-A1, U.S. Patent Publication 2017-0238014-A1, U.S. Provisional Patent Application 62 / 668,105 (filed May 2018), and U.S. Patent Publication 2019-0297351-A1. LFNST has been adopted in VVC Draft 10 and described in JVET-N0193, Reduced Secondary Transform (RST) (CE6-3.1), 14th Meeting: Geneva, Switzerland, March 19-27, 2019. LFNST can also be referred to as Inseparable Secondary Transform (NSST) or Secondary Transform.
[0088] Figure 3 The diagram illustrates the LFNST transform, which can be performed by a video encoder and a video decoder, where LFNST introduces a new stage between separable transform and quantization in the encoder and decoder.
[0089] The decoding process for LFNST will now be described. The inverse transform using LFNST involves... Figure 4 The following are the main steps:
[0090] 1) By first converting the 2D block into a 1D coefficient list (or vector) via a predefined scan / sort, the decoded transform coefficients (see...) Figure 4 Subblock 315 in the middle is used as input to the inverse LFNST;
[0091] 2) The inverse LFNST is applied to a 1D list of input coefficients, and the output coefficients are reorganized into 2D blocks via a predefined scan / sort (see [link]). Figure 4 (sub-block 317 in the middle).
[0092] 3) The LFNST coefficients after inverse transformation are used as inputs to the separable inverse DCT-2 to obtain the reconstructed residuals.
[0093] Figure 4 A diagram illustrating the inverse transformation process when using LFNST is shown.
[0094] In VVC draft 10, LFNST can be applied to both 4x4 and 8x8 subblocks. In both cases, the 16 decoded coefficients (some of which may be canonically zeroed) in the 4x4 subblock are input into the inverse LFNST:
[0095] For the 4x4 case, a 16x16 inverse LFNST is used to construct 16 intermediate coefficients before the separable inverse DCT-2, such as... Figure 5 As shown.
[0096] For the 8x8 case, a 16x48 inverse LFNST is used to construct 48 intermediate coefficients before the separable inverse DCT-2, such as... Figure 6 As shown. It should be noted that the 48 intermediate coefficients are reorganized into an L-shaped pattern.
[0097] The inverse LFNST process can be fully defined based on (i) the transformation (i.e., LFNST) matrix and (ii) the recombination pattern / scan for intermediate coefficients.
[0098] The details of the zeroing process in VVC Draft 10 are described in U.S. Patent Application 15 / 931,271, filed on May 13, 2020.
[0099] Figure 5 A diagram is shown for reconstructing the 4x4 inverse LFNST from a list of 16 input coefficients.
[0100] For 4x4 LFNST, the following two modes / scans are used depending on the intra-frame mode:
[0101] const int g_lfnstRGScan4x4
[16] =
[0102] { / / 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[0103] 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
[0104] };
[0105] const int g_lfnstRGTranScan4x4
[16] =
[0106] { / / 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[0107] 0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15
[0108] };
[0109] The two modes / scan instructions mentioned above indicate the reordering of intermediate coefficients. For example, g_lfnstRGScan4x4 does not change the row-major reordering of coefficients. However, lfnstRGTranScan4x4 reorders the coefficients by transposing their order (e.g., coefficients at positions 1, 2, 3, 6, 7, and 11 are swapped with coefficients at positions 4, 8, 12, 9, 13, and 14, respectively).
[0110] For 4x4 LFNST, there are eight 16x16 matrices in VVC draft 10. These are listed in section 8.7.4.3 of JVET-O2001.
[0111] Figure 6 A diagram is shown illustrating the 8x8 inverse LFNST used to reconstruct 48 intermediate coefficients from a list of 16 input coefficients. The intermediate coefficients are reconstructed into an L-shaped pattern.
[0112] For 8x8 LFNST, the following two modes / scans are used depending on the intra-frame mode:
[0113] const int g_lfnstRGScan8x8
[48] =
[0114] { / / 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
[0115] 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 40, 41, 42, 43, 48, 49, 50, 51, 56, 57, 58, 59
[0116] };
[0117] const int g_lfnstRGTranScan8x8
[48] =
[0118] { / / 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
[0119] 0, 8, 16, 24, 32, 40, 48, 56, 1, 9, 17, 25, 33, 41, 49, 57, 2, 10, 18, 26, 34, 42, 50, 58, 3, 11, 19, 27, 35, 43, 51, 59, 4, 12, 20, 28, 5, 13, 21, 29, 6, 14, 22, 30, 7, 15, 23, 31
[0120] };
[0121] The two modes / scans mentioned above indicate the reordering of intermediate coefficients. Specifically, g_lfnstRGScan8x8 reorganizes the 48 intermediate coefficients in an L-shaped pattern (e.g., the 48th coefficient is mapped to...). Figure 6 Position 59 in the middle). The scan lfnstRGTranScan4x4 is performed by transposing the coefficients (e.g., the 48th coefficient is mapped to). Figure 6 Position 31 in the middle is used to reorder the L-shaped pattern.
[0122] For 8x8 LFNST, there are eight 16x48 matrices in VVC draft 10. These are listed in section 8.7.4.3 of JVET-O2001.
[0123] For both the 4x4 and 8x8 LFNST in VVC Draft 10, the eight LFNST matrices are divided into four groups, each consisting of two LFNST candidates. The transform matrix used for decoding is determined by signaling an LFNST index, which identifies the transform matrix used between two LFNST candidates in a given transform set. In VVC Draft 10, the transform set is derived based on intra-frame modes. Specifically, it is derived according to the following table.
[0124] Mapping rules for the four LFNST sets in VVC draft 10
[0125]
[0126] This disclosure describes techniques for extending the LFNST design of VVC draft 10. The proposed techniques aim to improve the LFNST design by introducing additional transformation sets and candidates, and provide techniques for handling worst-case complexity in terms of the number of multiplications (i.e., multiplications per coefficient).
[0127] The present invention also describes aspects of the LFNST decoding process. After obtaining a list of 2D dequantized coefficients (based on the coefficient decoding step), the decoder (e.g., video decoder 300) can apply the inverse low-frequency non-separable transform (LFNST) to reconstruct a subset of coefficients. Then, the inverse separable transform (e.g., DCT-2) is used to reconstruct the residuals in the 2D block / array (see, for example...). Figure 4 ).
[0128] The LFNST decoding process can be specified based on the following:
[0129] - Recombination mode / scan, which defines how the LFNST input and output coefficients are organized.
[0130] - Transformation matrix, defined for decoding inseparable transformations of subsets of coefficients.
[0131] In LFNST, the decoding coefficients can be organized into 2D blocks / arrays to align the matrix entries with the input. For example... Figure 7 As shown, this can be achieved in the following way:
[0132] i) Construct coefficients from a 2D array of coefficients M A 1D list, then
[0133] ii) Apply to a 1D list (size: M x N (of) inverse LFNST, to reconstruct N LFNST coefficients, and
[0134] iii) The output coefficients are recombined in a 2D block / array and input to a separable transform (inverse DCT-2) for reconstructing the residual block.
[0135] In VVC Draft 10, the LFNST design allows for a maximum of M=16 One non-zero coefficient (located in the top-left 4x4 sub-block), while the remaining coefficients are set to zero, such as... Figure 7 As shown. However, the ideas in this disclosure can be applied to designs that allow all coefficients to be non-zero. An example could be... M=N In another example, no coefficients are normalized to zero.
[0136] Figure 7 A diagram illustrating the inverse LFNST process is shown.
[0137] Input Recombination:
[0138] - For example, in raster scanning (also known as row-first sorting, such as...) Figure 8 Recombination is carried out in the form shown in the figure.
[0139] - As another example, reorganization can be performed by column priority.
[0140] - Reassembly can also depend on block size and intra-frame mode.
[0141] - If the codec (e.g., video encoder 200 or video decoder) canonically sets a subset of input coefficients to zero, then the list of input coefficients for LFNST may exclude those zeroed coefficients. The reassembly step only allows coefficients that can be non-zero (i.e., coefficients that are not canonically zeroed).
[0142] Figure 8 An example of input reconstruction based on a raster scan with 16 decoding coefficients is shown. Figure 9 An example of input reconstruction based on a raster scan with 64 decoding coefficients is shown.
[0143] Transformation matrix:
[0144] - The transformation (LFNST) matrix can have size MxN ,in,
[0145] o M This represents the number of basis vectors and also the number of rows.
[0146] o N This represents the number of LFNST coefficients reconstructed after the transformation is applied (also known as the number of support samples for the transformation).
[0147] Transformation matrix entries can be in 8-bit, 9-bit, or 10-bit precision.
[0148] - The sign of all entries in a row of the transformation matrix can be reversed. In other words, row vectors in the transformation matrix can be multiplied by -1.
[0149] All rows in the transformation matrix can be multiplied by -1.
[0150] A subset of rows in the transformation matrix can be multiplied by 1, while the other entries remain unchanged.
[0151] Output recombination mode / scan:
[0152] - NA 1D list of output LFNST coefficients can be reassembled based on an array (defined pattern / scan), where each value in the array corresponds to an orientation / position in a 2D block.
[0153] - The values in the array (used for reorganization) can represent the indices of the 2D blocks in any predefined order.
[0154] In one example, an index value can correspond to a position within a 2D block. Given an index value... v The corresponding position in the 2D block can be calculated as follows:
[0155] Row index: r = floor(v / w)
[0156] Column index: c = mod(v, w)
[0157] in, w Indicates the width of the LFNST subblock (in VVC draft 10, w (It can be 4 or 8). Based on this formula, the following arrays for the recombination mode correspond to the raster sequence for a 4x4 block:
[0158] const int raster_order
[16] =
[0159] { / / 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[0160] 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
[0161] };
[0162] In order to map the i-th element in the 1D coefficient list to the row and column positions in the 2D block, such as for i=0,1,......,15:
[0163] · r[i] = floor( raster_order [i] / w)
[0164] · c[i] = mod( raster_order [i], w)
[0165] In the example above, N is the same as the value in MxN, and is also equal to the number of reconstruction coefficients on the decoder side. M is the number of input coefficients associated with the M rows of the MxN matrix.
[0166] N: The number of output / reconstruction coefficients, which is equal to the number of columns in the matrix (i.e., N).
[0167] This disclosure also describes techniques for extending 8x8 LFNST support with and without zeroing. The 8x8 LFNST design in VVC Draft 10 can be extended to provide greater support for refactored LFNST coefficients.
[0168] In one example, by keeping the number of allowed coefficients to be M=16 The number of supported samples can be expanded from 48 to 64, such as Figure 10 As shown. Note that in this design, both the video decoder 300 and the video encoder 200 can be configured such that only a maximum of 16 coefficients can be non-zero, as shown. Figure 8 As shown in the figure, the input block has 16 samples.
[0169] Figure 9 A diagram illustrating the 8x8 inverse LFNST used to reconstruct 64 intermediate coefficients from 16 input coefficients is shown. The intermediate coefficients are reconstructed into an 8x8 square pattern.
[0170] In another example, by further expanding the number of allowed coefficients to M=64 The number of supported samples can be expanded from 48 to 64, such as Figure 11 As shown. Note that this design does not allow any of the coefficients to be normalized to zero (i.e., both the video encoder 200 and the video decoder 300 can be configured such that non-zero coefficients can exist at any position in the square block).
[0171] Figure 11 An example illustration of an 8x8 inverse LFNST is shown for reconstructing 64 intermediate coefficients from 64 input coefficients. The intermediate coefficients are reconstructed into an 8x8 square pattern.
[0172] for M=16 or 64 Each decoding coefficient can be used as follows: Figure 8 The input reconstruction is performed during the raster scan shown, and the output reconstruction mode / scan is specified in the arrays g_lfnstRGScan8x8 and g_lfnstRGTranScan8x8, where one of these arrays is used according to the intra-frame mode. In one example, lfnstRGScan is used for intra-frame modes with indices 0, 1, 2, 3…34, and lfnstRGTranScan is used for 35, 36,…
[0173] const int g_lfnstRGScan8x8
[64] =
[0174] {
[0175] 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63
[0176] };
[0177] const int g_lfnstRGTranScan8x8
[64] =
[0178] {
[0179] 0, 8, 16, 24, 32, 40, 48, 56, 1, 9, 17, 25, 33, 41, 49, 57, 2, 10, 18, 26, 34, 42, 50, 58, 3, 11, 19, 27, 35, 43, 51, 59, 4, 12, 20, 28, 36, 44, 52, 60, 5, 13, 21, 29, 37, 45, 53, 61, 6, 14, 22, 30, 38, 46, 54, 62, 7, 15, 23, 31, 39, 47, 55, 63
[0180] };
[0181] Specifically, the above scanning corresponds to raster scanning and transpose order.
[0182] This disclosure also describes techniques for expanding the number of LFNST candidates.
[0183] The number of LFNST sets (S) and the number of candidates (C) can be extended to S=35 and C=3 Furthermore, the LFNST set (lfnstTrSetIdx) for a given intra-frame mode can be derived from the following mapping table.
[0184] Mapping rules for the four LFNST sets and extended LFNST designs
[0185]
[0186]
[0187] for S=35 and C=3 The set of 105 LFNST matrices g_lfnst4x4 and g_lfnst8x8 can be various different matrices.
[0188] This disclosure also describes techniques for improving worst-case matrix multiplication processing.
[0189] For hardware implementations, the number of worst-case multiplications (coefficients per transformation) is an important complexity metric. One example technique for reducing the number of worst-case multiplications is to canonically zero some transformation coefficients. However, the zeroing process is undesirable unless a specific worst-case multiplication requirement needs to be met.
[0190] In VVC draft 10, the following set of rules is used to maintain the worst-case complexity of 8 multiplications:
[0191] - If LFNST is used and the TU size is 4x4 or 8x8, a maximum of 8 non-zero coefficients are allowed, and the remaining coefficients are normalized to zero.
[0192] - Otherwise, if LFNST is used, a maximum of 16 non-zero coefficients are allowed, and the remaining coefficients are normalized to zero.
[0193] In standard texts, this is reflected as:
[0194] nonZeroSize = ( ( nTbW = = 4 && nTbH = = 4 ) | | ( nTbW = = 8&& nTbH = = 8 ) ) ? 8 : 16
[0195] let WCM This represents the required number of worst-case multiplications. The general formula for determining the allowable number of non-zero coefficients (i.e., the zero-level) is:
[0196] NZ = floor ( ( WCM x nTbW x nTbH) / ( N x N Where nTbH and nTbW represent the height and width of TU, and N This refers to the transformation dimension as described above. This general formula can be reflected in standard text, as shown below:
[0197] nonZeroSize = ( nTbW = = nTbH ) ? NZ : (2x NZ ),
[0198] When TU is a square, the number of allowed coefficients is equal to NZ Otherwise, it equals 2 multiplied by NZ .
[0199] If the block width and height are equal, the number of allowed non-zero coefficients can be equal to NZ. Otherwise, the number of allowed non-zero coefficients can be equal to 2 multiplied by NZ (e.g., 2xNZ).
[0200] To implement the above technology, the video encoder 200 and video decoder 300 can be configured to: determine the number of allowed non-zero coefficients for a video data block based on the size of the block, and obtain a set of dequantized coefficients for the video data block, wherein the set of dequantized coefficients includes a first subset of dequantized coefficients and a second subset of dequantized coefficients, the first subset of dequantized coefficients including non-zero dequantized coefficients and the second subset of dequantized coefficients including all-zero coefficients. The number of coefficients in the first subset of dequantized coefficients can be equal to the number of allowed non-zero coefficients for the video data block. The video encoder 200 and video decoder 300 can then apply the inverse LFNST to the first subset of dequantized coefficients to determine a first intermediate subset of coefficients, and apply the inverse separable transform to at least a portion of the first intermediate subset of coefficients and the second subset of coefficients to determine a block of reconstructed residual values.
[0201] Figure 12 This is a block diagram illustrating an example video encoder 200 capable of performing the techniques described herein. Figure 12 This disclosure is for illustrative purposes and should not be construed as limiting the techniques extensively illustrated and described herein. For illustrative purposes, this disclosure describes a video encoder 200 based on VVC (ITU-T H.266 under development) and HEVC (ITU-TH.265) technologies. However, the techniques of this disclosure can be implemented by video encoding devices configured for other video decoding standards.
[0202] exist Figure 12In the example, the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a decoded picture buffer (DPB) 218, and an entropy coding unit 220. Any or all of the video data memory 230, mode selection unit 202, residual generation unit 204, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, DPB 218, and entropy coding unit 220 can be implemented in one or more processors or in processing circuitry. For example, the units of the video encoder 200 can be implemented as one or more circuit or logic elements as part of hardware circuitry, or as part of a processor, ASIC, or FPGA. Furthermore, the video encoder 200 may include additional or alternative processors or processing circuitry to perform these and other functions.
[0203] The video data storage device 230 can store video data to be encoded by the components of the video encoder 200. The video encoder 200 can obtain data from, for example, a video source 104 (…). Figure 1 The video data memory 230 receives video data stored in the video data memory 230. The DPB 218 can act as a reference picture memory, storing reference video data for use when the video encoder 200 predicts subsequent video data. The video data memory 230 and DPB 218 can be formed from any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The video data memory 230 and DPB 218 can be provided by the same memory device or separate memory devices. In various examples, the video data memory 230 can be on-chip (as shown) with other components of the video encoder 200, or off-chip relative to those components.
[0204] In this disclosure, references to video data memory 230 should not be construed as limited to memory within video encoder 200 (unless specifically described therein), or to memory outside video encoder 200 (unless specifically described therein). Rather, references to video data memory 230 should be understood as reference memory storing video data received by video encoder 200 for encoding (e.g., video data for the current block to be encoded). Figure 1 The memory 106 can also provide temporary storage for the outputs from the various units of the video encoder 200.
[0205] It shows Figure 12 The various units help to understand the operations performed by the video encoder 200. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Fixed-function circuits refer to circuits that provide a specific function and are pre-configured regarding the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functionality in terms of the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., to receive or output parameters), but the type of operation performed by a fixed-function circuit is generally immutable. In some examples, one or more of these units can be different circuit blocks (fixed-function or programmable), and in some examples, one or more of the units can be integrated circuits.
[0206] The video encoder 200 may include an arithmetic logic unit (ALU), an essential function unit (EFU), digital circuitry, analog circuitry, and / or a programmable core, all formed by programmable circuitry. In an example where software executed by programmable circuitry is used to perform the operation of the video encoder 200, memory 106 ( Figure 1 The video encoder 200 may store instructions (e.g., target code) of the software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 may store such instructions.
[0207] The video data storage unit 230 is configured to store the received video data. The video encoder 200 can retrieve images of the video data from the video data storage unit 230 and provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data storage unit 230 can be the raw video data to be encoded.
[0208] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra-frame prediction unit 226. The mode selection unit 202 may include additional functional units to perform video prediction based on other prediction modes. As an example, the mode selection unit 202 may include a palette unit, an intra-block copying unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.
[0209] Mode selection unit 202 typically coordinates multiple coding passes to test combinations of coding parameters and the rate-distortion values obtained for such combinations. Coding parameters may include segmenting the CTU into CUs, the prediction mode for the CUs, the transformation type of the residual data for the CUs, and the quantization parameters of the residual data for the CUs. Mode selection unit 202 can ultimately select a combination of coding parameters that yields a better rate-distortion value than other tested combinations.
[0210] The video encoder 200 can segment images retrieved from the video data storage 230 into a series of CTUs and encapsulate one or more CTUs within a slice. The mode selection unit 202 can segment the CTUs of the image according to a tree structure (such as the QTBT structure or quadtree structure of HEVC described above). As mentioned above, the video encoder 200 can form one or more CUs by segmenting CTUs according to a tree structure. Such CUs can also generally be referred to as "video blocks" or "blocks".
[0211] Typically, mode selection unit 202 also controls its components (e.g., motion estimation unit 222, motion compensation unit 224, and intra-frame prediction unit 226) to generate prediction blocks for the current block (e.g., the current CU, or the overlapping portion of PU and TU in HEVC). To perform inter-frame prediction for the current block, motion estimation unit 222 may perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously decoded pictures stored in DPB 218). Specifically, motion estimation unit 222 may calculate values representing the similarity between a potential reference block and the current block, for example, based on sum of absolute differences (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared difference (MSD), etc. Motion estimation unit 222 may typically perform these calculations using sample-by-sample differences between the current block and the considered reference blocks. Motion estimation unit 222 may identify the reference block with the lowest value obtained from these calculations, indicating the reference block that most closely matches the current block.
[0212] Motion estimation unit 222 can generate one or more motion vectors (MVs) that define the position of a reference block in a reference image relative to the position of the current block in the current image. Motion estimation unit 222 can then provide the motion vectors to motion compensation unit 224. For example, for unidirectional inter-frame prediction, motion estimation unit 222 can provide a single motion vector, while for bidirectional inter-frame prediction, motion estimation unit 222 can provide two motion vectors. Motion compensation unit 224 can then use the motion vectors to generate prediction blocks. For example, motion compensation unit 224 can use the motion vectors to retrieve data for the reference blocks. As another example, if the motion vectors have fractional-sample precision, motion compensation unit 224 can interpolate the values used for the prediction blocks according to one or more interpolation filters. Furthermore, for bidirectional inter-frame prediction, motion compensation unit 224 can retrieve data for two reference blocks identified by corresponding motion vectors and combine the retrieved data, for example, by per-sample averaging or weighted averaging.
[0213] As another example, for intra-prediction or intra-prediction decoding, intra-prediction unit 226 can generate a prediction block based on samples adjacent to the current block. For example, in directional mode, intra-prediction unit 226 can typically mathematically combine the values of adjacent samples and fill these calculated values across the current block in a defined direction to generate a prediction block. As another example, in DC mode, intra-prediction unit 226 can calculate the average of the adjacent samples of the current block and generate a prediction block to include the average of each sample for the resulting prediction block.
[0214] Mode selection unit 202 provides a prediction block to residual generation unit 204. Residual generation unit 204 receives the original, uncoded version of the current block from video data memory 230 and the prediction block from mode selection unit 202. Residual generation unit 204 calculates a sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines the residual block for the current block. In some examples, residual generation unit 204 may also determine the difference between sample values in the residual block to generate the residual block using residual differential pulse decode-modulation (RDPCM). In some examples, one or more subtractor circuits performing binary subtraction may be used to form residual generation unit 204.
[0215] In the example where mode selection unit 202 divides a CU into PUs, each PU can be associated with a luma prediction unit and a corresponding chroma prediction unit. Video encoder 200 and video decoder 300 can support PUs of various sizes. As noted above, the size of a CU can refer to the size of the luma decoding block of the CU, and the size of a PU can refer to the size of the luma prediction unit of the PU. Assuming a particular CU size is 2Nx2N, video encoder 200 can support PU sizes of 2Nx2N or NxN for intra-frame prediction, and 2Nx2N, 2NxN, Nx2N, NxN, or similar symmetrical PU sizes for inter-frame prediction. Video encoder 200 and video decoder 300 can also support asymmetric segmentation for PU sizes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter-frame prediction.
[0216] In an example where the mode selection unit 202 does not further divide the CU into PUs, each CU can be associated with a luminance decoding block and a corresponding chrominance decoding block. As mentioned above, the size of the CU can refer to the size of the luminance decoding block of the CU. The video encoder 200 and the video decoder 300 can support CU sizes of 2Nx2N, 2NxN, or Nx2N.
[0217] For other video decoding techniques (such as block-based copy mode decoding, affine mode decoding, and linear model (LM) mode decoding, the mode selection unit 202 generates a prediction block for the current block being encoded via a corresponding unit associated with the decoding technique. In some examples (such as palette mode decoding), the mode selection unit 202 may not generate a prediction block, but instead generate syntax elements indicating how the block should be reconstructed based on the selected palette. In such a mode, the mode selection unit 202 can provide these syntax elements to the entropy coding unit 220 for encoding.
[0218] As described above, the residual generation unit 204 receives video data for the current block and the corresponding prediction block. Then, the residual generation unit 204 generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates the sample-by-sample difference between the prediction block and the current block.
[0219] Transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 may apply various transforms to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply Discrete Cosine Transform (DCT), Direction Transform, Karhunen-Loeve Transform (KLT), or conceptually similar transforms to the residual block. In some examples, transform processing unit 206 may perform multiple transforms on the residual block, such as primary transforms and secondary transforms (e.g., rotation transforms). Transform processing unit 206 may apply LFNST and separable transforms, for example, in the manner described in this disclosure. According to the techniques of this disclosure, transform processing unit 206 may, for example, determine the number of permissible non-zero coefficients for the video data block based on the size of the video data block, and perform a zeroing process based on the determined number of permissible non-zero coefficients as part of applying LFNST and separable transforms. In some examples, transform processing unit 206 does not apply any transforms to the residual block.
[0220] Quantization unit 208 can quantize the transform coefficients in the transform coefficient block to produce a quantized transform coefficient block. Quantization unit 208 can quantize the transform coefficients of the transform coefficient block based on the quantization parameter (QP) value associated with the current block. Video encoder 200 (e.g., via mode selection unit 202) can adjust the degree of quantization applied to the transform coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may cause information loss, and therefore, the quantized transform coefficients may have lower precision than the original transform coefficients produced by transform processing unit 206.
[0221] The inverse quantization unit 210 and the inverse transform processing unit 212 can apply inverse quantization and inverse transform, respectively, to the quantized transform coefficient block to reconstruct the residual block from the transform coefficient block. The inverse transform processing unit 212 can apply the inverse LFNST and inverse separable transform, for example, in the manner described in this disclosure. According to the techniques of this disclosure, the inverse transform processing unit 212 can, for example, determine the number of allowed non-zero coefficients for the video data block based on the size of the block, and perform a zeroing process based on the determined number of allowed non-zero coefficients as part of applying the inverse LFNST and inverse separable transform.
[0222] Reconstruction unit 214 can generate a reconstructed block corresponding to the current block (although potentially with some degree of distortion) based on the reconstructed residual block and the prediction block generated by mode selection unit 202. For example, reconstruction unit 214 can add samples from the reconstructed residual block to corresponding samples from the prediction block generated by mode selection unit 202 to generate a reconstructed block.
[0223] Filter unit 216 can perform one or more filtering operations on the reconstructed block. For example, filter unit 216 can perform a deblocking operation to reduce block artifacts along the edges of the CU. In some examples, the operations of filter unit 216 can be skipped.
[0224] The video encoder 200 stores the reconstructed blocks in the DPB 218. For example, in an example where the filter unit 216 is not operated, the reconstruction unit 214 may store the reconstructed blocks in the DPB 218. In an example where the filter unit 216 is operated, the filter unit 216 may store the filtered reconstructed blocks in the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 may retrieve a reference picture formed from the reconstructed (and potentially filtered) blocks from the DPB 218 to perform inter-frame prediction of blocks in subsequently encoded pictures. Additionally, the intra-frame prediction unit 226 may use the reconstructed blocks of the current picture in the DPB 218 to perform intra-frame prediction of other blocks in the current picture.
[0225] Typically, entropy coding unit 220 can entropy-encode syntax elements received from other functional components of video encoder 200. For example, entropy coding unit 220 can entropy-encode quantized transform coefficient blocks from quantization unit 208. As another example, entropy coding unit 220 can entropy-encode predictive syntax elements (e.g., motion information for inter-frame prediction or intra-frame mode information for intra-frame prediction) from mode selection unit 202. Entropy coding unit 220 can perform one or more entropy coding operations on syntax elements, another example of video data, to generate entropy-encoded data. For example, entropy coding unit 220 can perform context-adaptive variable-length decoding (CAVLC), CABAC, variable-to-variable (V2V) length decoding, syntax-based context-adaptive binary arithmetic decoding (SBAC), probabilistic interval partitioned entropy (PIPE) decoding, exponential Golomb coding, or another type of entropy coding operation on the data. In some examples, entropy coding unit 220 can operate in a bypass mode where syntax elements are not entropy-encoded.
[0226] The video encoder 200 can output a bitstream that includes entropy-encoded syntax elements required for reconstructing slices or blocks of images. Specifically, the entropy coding unit 220 can output a bitstream.
[0227] The above operations are described in relation to the blocks. Such a description should be understood as referring to the operations used for the luma decoding block and / or the chroma decoding block. As mentioned above, in some examples, the luma decoding block and the chroma decoding block are the luma and chroma components of the CU. In some examples, the luma decoding block and the chroma decoding block are the luma and chroma components of the PU.
[0228] In some examples, it is not necessary to repeat the operations performed for the chroma-decoded block as with the luma-coded block. As an example, it is not necessary to repeat the operations used to identify the motion vector (MV) and reference image for the luma-decoded block to identify the MV and reference image for the chroma block. Instead, the MV for the luma-decoded block can be scaled to determine the MV for the chroma block, and the reference image can be the same. As another example, the intra-frame prediction process can be the same for both the luma-decoded block and the chroma-decoded block.
[0229] Figure 13 This is a block diagram illustrating an example video decoder 300 capable of performing the techniques described herein. Figure 13 This disclosure is provided for illustrative purposes and does not limit the techniques illustrated and described in this disclosure in a general manner. For illustrative purposes, this disclosure describes a video decoder 300 based on the techniques of VVC (ITU-T H.266 under development) and HEVC (ITU-T H.265). However, the techniques of this disclosure can be implemented by video decoding devices configured for other video decoding standards.
[0230] exist Figure 13 In the example, the video decoder 300 includes a decoded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. Any or all of the CPB memory 320, entropy decoding unit 302, prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, filter unit 312, and DPB 314 can be implemented in one or more processors or in processing circuitry. For example, units of the video decoder 300 can be implemented as one or more circuit or logic elements as part of hardware circuitry, or as part of a processor, ASIC, or FPGA. Furthermore, the video decoder 300 may include additional or alternative processors or processing circuitry to perform these and other functions.
[0231] The prediction processing unit 304 includes a motion compensation unit 316 and an intra-frame prediction unit 318. The prediction processing unit 304 may include an addition unit that performs predictions based on other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, an intra-block copy unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.
[0232] 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. Additionally, the CPB memory 320 may store video data other than the syntax elements of the decoded picture, such as temporary data used to represent the output from various units of the video decoder 300. The DPB 314 typically stores decoded pictures, which the video decoder 300 may output and / or use as reference video data when decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and DPB 314 may be formed of any of a variety of memory devices, such as DRAM, including SDRAM, MRAM, RRAM, or other types of memory devices. The CPB memory 320 and DPB 314 may be provided by the same memory device or separate memory devices. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300, or off-chip relative to those components.
[0233] Alternatively or concurrently, in some examples, the video decoder 300 can be derived from the memory 120 ( Figure 1 The decoded video data can be retrieved. In other words, memory 120 can utilize CPB memory 320 to store data, as discussed above. Similarly, when some or all of the functions of video decoder 300 are implemented using software to be executed by the processing circuitry of video decoder 300, memory 120 can store instructions to be executed by video decoder 300.
[0234] It shows Figure 13 The various units shown help to understand 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 12Fixed-function circuits refer to circuits that provide a specific function and are pre-configured regarding the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functionality in terms of the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., to receive or output parameters), but the type of operation performed by a fixed-function circuit is generally immutable. In some examples, one or more of these units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more of the units may be integrated circuits.
[0235] The video decoder 300 may include an ALU, EFU, digital circuitry, analog circuitry, and / or a programmable core formed by programmable circuitry. In an example where the operation of the video decoder 300 is performed by software executing on the programmable circuitry, on-chip or off-chip memory may store instructions (e.g., object code) of the software received and executed by the video decoder 300.
[0236] Entropy decoding unit 302 can receive encoded video data from the CPB and perform entropy decoding on the video data to reconstruct the 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.
[0237] Typically, the video decoder 300 reconstructs the image on a block-by-block basis. The video decoder 300 can perform the reconstruction operation on each block individually (where the block currently being reconstructed (i.e., decoded) can be referred to as the "current block").
[0238] Entropy decoding unit 302 can entropy decode the syntax elements of the quantized transform coefficients used to define the quantized transform coefficient block, as well as transform information such as quantization parameters (QP) and / or transform mode indications. Inverse quantization unit 306 can use the QP associated with the quantized transform coefficient block to determine the degree of quantization, and similarly, determine the degree of inverse quantization to be applied by inverse quantization unit 306. Inverse quantization unit 306 can, for example, perform a bitwise left shift operation to inverse quantize the quantized transform coefficients. Inverse quantization unit 306 can thus form a transform coefficient block including the transform coefficients.
[0239] After the inverse quantization unit 306 forms a transform coefficient block, the inverse transform processing unit 308 can apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, the inverse transform processing unit 308 can apply inverse DCT, inverse integer transform, inverse Karhunen-Loeve transform (KLT), inverse rotation transform, inverse direction transform, or another inverse transform to the transform coefficient block. The inverse transform processing unit 308 can apply inverse LFNST and inverse separable transform in the manner described in this disclosure. According to the techniques of this disclosure, the inverse transform processing unit 308 can, for example, determine the number of allowed non-zero coefficients for the video data block based on the size of the block, and perform a zeroing process based on the determined number of allowed non-zero coefficients as part of applying inverse LFNST and inverse separable transform.
[0240] Furthermore, the prediction processing unit 304 generates a prediction block based on the prediction information syntax elements entropy-decoded by the entropy decoding unit 302. For example, if the prediction information syntax elements indicate that the current block is predicted inter-frame, the motion compensation unit 316 can generate the prediction block. In this case, the prediction information syntax elements may indicate a reference picture in the DPB 314 from which the reference block is to be retrieved, and a motion vector used to identify the position of the reference block in the reference picture relative to the position of the current block in the current picture. The motion compensation unit 316 can typically be configured with respect to the motion compensation unit 224 ( Figure 12 The method described is basically similar to the way the inter-frame prediction process is performed.
[0241] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, then intra-prediction unit 318 can generate a prediction block according to the intra-prediction mode indicated by the prediction information syntax element. Again, intra-prediction unit 318 can typically be configured with respect to intra-prediction unit 226 ( Figure 12 The intra-prediction process is performed in a manner substantially similar to that described above. The intra-prediction unit 318 can retrieve data from neighboring samples of the current block from the DPB 314.
[0242] Reconstruction unit 310 can reconstruct the current block using the prediction block and the residual block. For example, reconstruction unit 310 can reconstruct the current block by adding the samples of the residual block to the corresponding samples of the prediction block.
[0243] Filter unit 312 can perform one or more filter operations on the reconstructed block. For example, filter unit 312 can perform a deblocking operation to reduce block artifacts along the edges of the reconstructed block. The operation of filter unit 312 is not necessarily performed in all examples.
[0244] The video decoder 300 can store the reconstructed blocks in the DPB 314. For example, in an example where the filter unit 312 is not operated, the reconstruction unit 310 can store the reconstructed blocks in the DPB 314. In an example where the filter unit 312 is operated, the filter unit 312 can store the filtered reconstructed blocks in the DPB 314. As discussed above, the DPB 314 can provide reference information (such as samples of the current image for intra-frame prediction and samples of previously decoded images for subsequent motion compensation) to the prediction processing unit 304. Furthermore, the video decoder 300 can output decoded images (e.g., decoded video) from the DPB 314 for use in applications such as... Figure 1 The subsequent presentation on display devices such as display device 118.
[0245] Figure 14 This is a flowchart illustrating an example process for encoding a current block according to the technology of this disclosure. The current block may include the current CU. Although for video encoder 200 ( Figure 1 and Figure 12 The description is provided, but it should be understood that other devices can be configured to perform actions similar to... Figure 14 A similar process.
[0246] In this example, the video encoder 200 initially predicts the current block (350). For example, the video encoder 200 may form a predicted block for the current block. The video encoder 200 may then compute a residual block for the current block (352). To compute the residual block, the video encoder 200 may compute the difference between the original, uncoded block and the predicted block for the current block. The video encoder 200 may then transform the residual block and quantize the transform coefficients of the residual block (354). Next, the video encoder 200 may scan the quantized transform coefficients of the residual block (356). During or after the scan, the video encoder 200 may entropy-encode the transform coefficients (358). For example, the video encoder 200 may encode the transform coefficients using CAVLC or CABAC. The video encoder 200 may then output the entropy-encoded data of the block (360).
[0247] Figure 15 This is a flowchart illustrating an example process for decoding a current block of video data according to the technology of this disclosure. The current block may include the current CU. Although for video decoder 300 ( Figure 1 and Figure 13 The description is provided, but it should be understood that other devices can be configured to perform actions similar to... Figure 15 A similar process.
[0248] The video decoder 300 can receive entropy-coded data for the current block, such as entropy-coded prediction information and entropy-coded data for the transform coefficients of the residual block corresponding to the current block (370). The video decoder 300 can entropy decode the entropy-coded data to determine the prediction information for the current block and reproduce the transform coefficients of the residual block (372). The video decoder 300 can predict the current block (374), for example, using an intra-frame prediction mode or inter-frame prediction mode indicated by the prediction information for the current block, to compute a prediction block for the current block. The video decoder 300 can then perform an inverse scan (376) on the reproduced transform coefficients to create a block of quantized transform coefficients. The video decoder 300 can then inverse quantize the transform coefficients and apply the inverse transform to the transform coefficients to produce a residual block (378). As part of the inverse transform, the video decoder 300 can, for example, obtain a set of dequantized coefficients for a video data block, wherein the set of dequantized coefficients includes a first subset of dequantized coefficients and a second subset of dequantized coefficients, the first subset of dequantized coefficients including non-zero dequantized coefficients and the second subset of dequantized coefficients including all-zero coefficients. The video decoder 300 can apply the inverse LFNST to the first subset of dequantized coefficients to determine a first intermediate subset of coefficients, and apply the inverse separable transform to at least a portion of the first intermediate subset of coefficients and the second subset of coefficients to determine a block of reconstructed residual values. The video decoder 300 can ultimately decode the current block by combining the predicted block and the residual block (380).
[0249] Figure 16 This is a flowchart illustrating an example process for decoding a current block of video data according to the technology of this disclosure. The current block may include the current CU. Although for video decoder 300 ( Figure 1 and Figure 13 The description is provided, but it should be understood that other devices can be configured to perform actions similar to... Figure 16 A similar process. For example, the video decoding loop of the video encoding process performed by the video encoder 200 can also be executed. Figure 16 The technology.
[0250] The video decoder 300 can determine the number of allowed non-zero coefficients (400) for a video data block based on its size. The video decoder 300 can determine the allowed number of non-zero coefficients according to the formula NZ = floor((WCM x nTbW x nTbH) / (N x N)), where nTbH represents the height of the block of reconstructed values, nTbW represents the width of the block of reconstructed values, NZ equals the number of allowed non-zero coefficients, and WCM represents a constant value. The first dequantized subset of coefficients can, for example, have NZ coefficients. In some examples, M can be equal to 2 x NZ, and N can be equal to 64.
[0251] The video decoder 300 obtains a set of dequantization coefficients for a video data block, wherein the set of dequantization coefficients includes a first subset of dequantization coefficients and a second subset of dequantization coefficients, the first subset of dequantization coefficients includes non-zero dequantization coefficients, and the second subset of dequantization coefficients includes all-zero coefficients (402). The number of coefficients in the first subset of dequantization coefficients may be equal to the number of allowed non-zero coefficients for the video data block.
[0252] The video decoder 300 applies the inverse LFNST to a first subset of dequantized coefficients to determine a first intermediate subset of coefficients (404). The video decoder 300 may, for example, determine an intra-frame prediction mode for a video data block; determine a set of inverse LFNST candidates from multiple sets based on the intra-frame prediction mode; and select an inverse LFNST from the determined set of inverse LFNST candidates. The inverse LFNST candidate set may, for example, include 3 candidates, and may be determined from multiple sets including 35 sets. The first subset of dequantized coefficients may include M dequantized coefficients, and the first intermediate subset of coefficients may include N coefficients, where M and N are integer values. As discussed above, in some examples, M may be equal to 16, and N may be equal to 64. In other examples, M may be equal to 64, and N may be equal to 64.
[0253] The video decoder 300 applies an inverse separable transform to at least a portion of a first intermediate subset of coefficients and a second subset of coefficients to determine a block (406) of reconstructed residual values. The video decoder 300 may add the block of reconstructed residual values to the prediction block to form a reconstructed block; apply one or more filters to the reconstructed block to determine a filtered reconstructed block; and output decoded video data including the filtered reconstructed block.
[0254] The following terms describe the implementation methods of the above-described technologies and equipment.
[0255] Clause 1. A method for decoding video data, the method comprising: obtaining a set of dequantized coefficients for a block of video data, wherein the set of dequantized coefficients includes a first subset of dequantized coefficients and a second subset of dequantized coefficients, the first subset of dequantized coefficients including non-zero dequantized coefficients and the second subset of dequantized coefficients including all-zero coefficients; applying an inverse low-frequency non-separable transform (LFNST) to the first subset of dequantized coefficients to determine a first intermediate subset of coefficients; and applying an inverse separable transform to at least a portion of the first intermediate subset of coefficients and the second subset of coefficients to determine a block of reconstructed residual values.
[0256] Clause 2. The method according to Clause 1, wherein the first subset of solution quantization coefficients comprises M solution quantization coefficients, and wherein the first intermediate subset of coefficients comprises N coefficients, wherein M and N are integer values.
[0257] Clause 3, the method described in Clause 2, wherein M = 16 and N = 64.
[0258] Clause 4, the method described in Clause 2, wherein M = 64 and N = 64.
[0259] Clause 5. The method described under any of Clauses 1-4 further comprises: determining an intra-prediction mode for the video data block; determining an inverse LFNST candidate set from a plurality of sets based on the intra-prediction mode; and selecting the inverse LFNST from the determined inverse LFNST candidate set.
[0260] Clause 6. The method according to Clause 5, wherein the inverse LFNST candidate set comprises 3 candidates.
[0261] Clause 7. The method described in accordance with Clause 5 or Clause 6, wherein the plurality of sets comprises 35 sets.
[0262] Clause 8. The method described under any of Clauses 2-7 further comprises: determining the minimum number of allowed non-zero coefficients according to the formula NZ = floor((WCM x nTbW x nTbH) / (N x N)), where nTbH represents the height of the block of the reconstructed value, nTbW represents the width of the block of the reconstructed value, NZ is equal to the minimum number of allowed non-zero coefficients, and WCM represents a constant value.
[0263] Clause 9. The method according to Clause 8, wherein the first solution quantization coefficient subset has NZ coefficients.
[0264] Clause 10, the method described in accordance with Clauses 2 and 8 or Clauses 2 and 9, wherein M = 2 x NZ and N = 64.
[0265] Clause 11. An apparatus for decoding video data, the apparatus comprising one or more units for performing the method described pursuant to any of Clauses 1-10.
[0266] Clause 12. The device according to Clause 11, wherein the one or more units include one or more processors implemented in a circuit.
[0267] Clause 13. The device described in Clause 11 or 12 further includes a memory for storing the video data.
[0268] Clause 14. The device described in any of Clauses 11-13 also includes a display configured to display decoded video data.
[0269] Clause 15. The device described in any of Clauses 11-14, wherein the device includes one or more of the following: camera, computer, mobile device, broadcast receiver device or set-top box.
[0270] Clause 16. The device described in any of Clauses 11-15, wherein the device includes a video decoder.
[0271] Clause 17. The device described in any of Clauses 11-16, wherein the device includes a video encoder.
[0272] Clause 18. A computer-readable storage medium having instructions stored thereon, which, when executed, cause one or more processors to perform the method described in accordance with any one of Clauses 1-10.
[0273] Clause 19. A method for decoding video data, the method comprising: determining, based on the size of a video data block, the number of permissible non-zero coefficients for the block; obtaining a dequantized coefficient set for the video data block, wherein the dequantized coefficient set includes a first dequantized coefficient subset and a second dequantized coefficient subset, the first dequantized coefficient subset including non-zero dequantized coefficients, the second dequantized coefficient subset including all-zero coefficients, wherein the number of coefficients in the first dequantized coefficient subset is equal to the number of permissible non-zero coefficients for the video data block; applying an inverse low-frequency non-separable transform (LFNST) to the first dequantized coefficient subset to determine a first intermediate coefficient subset; and applying an inverse separable transform to at least a portion of the first intermediate coefficient subset and the second coefficient subset to determine a block of reconstructed residual values.
[0274] Clause 20. The method according to Clause 19 further includes: determining an intra-prediction mode for the video data block; determining an inverse LFNST candidate set from a plurality of sets based on the intra-prediction mode; and selecting the inverse LFNST from the determined inverse LFNST candidate set.
[0275] Clause 21. The method according to Clause 20, wherein the inverse LFNST candidate set comprises 3 candidates.
[0276] Clause 22, the method according to Clause 20 or Clause 21, wherein the plurality of sets comprises 35 sets.
[0277] Clause 23. The method according to any of Clauses 19-22, wherein the first subset of solution quantization coefficients comprises M solution quantization coefficients, and wherein the first intermediate subset of coefficients comprises N coefficients, wherein M and N are integer values.
[0278] Clause 24, the method described in accordance with Clause 23, wherein M = 16 and N = 64.
[0279] Clause 25, the method described in accordance with Clause 23, wherein M = 64 and N = 64.
[0280] Clause 26. The method described under any of Clauses 23-25 further comprises: determining the number of allowed non-zero coefficients according to the formula NZ = floor((WCM x nTbW x nTbH) / (N x N)), where nTbH represents the height of the block of the reconstructed value, nTbW represents the width of the block of the reconstructed value, NZ is equal to the number of allowed non-zero coefficients, and WCM represents a constant value.
[0281] Clause 27. The method according to Clause 26, wherein the first solution quantization coefficient subset has NZ coefficients.
[0282] Clause 28. The method described in accordance with Clause 26 or 27, wherein M = 2 x NZ and N = 64.
[0283] Clause 29. The method according to any one of Clauses 19-28 further comprises: adding a block of reconstructed residual values to a prediction block to form a reconstructed block; applying one or more filters to the reconstructed block to determine a filtered reconstructed block; and outputting decoded video data including the filtered reconstructed block.
[0284] Clause 30. The method described under any of the clauses 19-29, wherein the method is performed as part of a video encoding process.
[0285] Clause 31. An apparatus for decoding video data, the apparatus comprising: a memory configured to store video data; one or more processors implemented in a circuit and configured to: determine, based on the size of a video data block, a number of permissible non-zero coefficients for the block; obtain a set of dequantized coefficients for the video data block, wherein the set of dequantized coefficients includes a first subset of dequantized coefficients and a second subset of dequantized coefficients, the first subset of dequantized coefficients including non-zero dequantized coefficients, the second subset of dequantized coefficients including all-zero coefficients, wherein the number of coefficients in the first subset of dequantized coefficients is equal to the number of permissible non-zero coefficients for the video data block; apply an inverse low-frequency non-separable transform (LFNST) to the first subset of dequantized coefficients to determine a first intermediate subset of coefficients; and apply an inverse separable transform to at least a portion of the first intermediate subset of coefficients and the second subset of coefficients to determine a block of reconstructed residual values.
[0286] Clause 32. The apparatus according to Clause 31, wherein the one or more processors are further configured to: determine an intra-frame prediction mode for the video data block; determine an inverse LFNST candidate set from a plurality of sets based on the intra-frame prediction mode; and select the inverse LFNST from the determined inverse LFNST candidate set.
[0287] Clause 33. The device according to Clause 32, wherein the inverse LFNST candidate set comprises 3 candidates.
[0288] Clause 34. The device as described in Clause 32, wherein the plurality of sets comprises 35 sets.
[0289] Clause 35. The device according to any of Clauses 31-34, wherein the first subset of solution quantization coefficients comprises M solution quantization coefficients, and wherein the first intermediate subset of coefficients comprises N coefficients, wherein M and N are integer values.
[0290] Clause 36. The device as described in Clause 35, wherein M = 16 and N = 64.
[0291] Clause 37. The device as described in Clause 35, wherein M = 64 and N = 64.
[0292] Clause 38. The device according to any of Clauses 35-37, wherein the one or more processors are further configured to: determine the number of allowed non-zero coefficients according to the formula NZ = floor((WCM x nTbW x nTbH) / (N x N)), where nTbH represents the height of the block of reconstructed values, nTbW represents the width of the block of reconstructed values, NZ is equal to the number of allowed non-zero coefficients, and WCM represents a constant value.
[0293] Clause 39. The device according to Clause 35, wherein the first subset of solution quantization coefficients has NZ coefficients.
[0294] Clause 40. The device as described in Clause 35 or 36, wherein M = 2 x NZ and N = 64.
[0295] Clause 41. The device according to any of Clauses 31-41, wherein the one or more processors are further configured to: add a block of reconstructed residual values to a prediction block to form a reconstructed block; apply one or more filters to the reconstructed block to determine a filtered reconstructed block; and output decoded video data including the filtered reconstructed block.
[0296] Clause 42. The device described in any of Clauses 31-41, wherein the device includes a wireless communication device and further includes a receiver configured to receive encoded video data.
[0297] Clause 43. The device according to Clause 42, wherein the wireless communication device includes a handheld telephone, and wherein the receiver is configured to demodulate a signal including the encoded video data according to a wireless communication standard.
[0298] Clause 44. The device described in any of Clauses 31-43 further includes: a display configured to display decoded video data.
[0299] Clause 45. The device described in any of Clauses 31-44, wherein the device includes one or more of the following: camera, computer, mobile device, broadcast receiver device or set-top box.
[0300] Clause 46. The device described in any of Clauses 31-45 further includes: a camera configured to capture video data.
[0301] Clause 47. The device described in any of Clauses 31-46, wherein the device includes a wireless communication device and further includes a transmitter configured to transmit encoded video data.
[0302] Clause 48. The device according to Clause 47, wherein the wireless communication device includes a handheld telephone, and wherein the transmitter is configured to modulate a signal including the encoded video data according to a wireless communication standard.
[0303] Clause 49. A computer-readable storage medium storing instructions, wherein, when executed by one or more processors, the instructions cause the one or more processors to: determine, based on the size of a video data block, the number of permissible non-zero coefficients for the block; obtain a set of dequantized coefficients for the video data block, wherein the set of dequantized coefficients includes a first subset of dequantized coefficients and a second subset of dequantized coefficients, the first subset of dequantized coefficients including non-zero dequantized coefficients and the second subset of dequantized coefficients including all-zero coefficients, wherein the number of coefficients in the first subset of dequantized coefficients is equal to the number of permissible non-zero coefficients for the video data block; apply an inverse low-frequency non-separable transform (LFNST) to the first subset of dequantized coefficients to determine a first intermediate subset of coefficients; and apply an inverse separable transform to at least a portion of the first intermediate subset of coefficients and the second subset of coefficients to determine a block of reconstructed residual values.
[0304] Clause 50. An apparatus for decoding video data, the apparatus comprising: a unit for determining, based on the size of a video data block, the number of permissible non-zero coefficients for the block; a unit for obtaining a set of dequantized coefficients for the video data block, wherein the set of dequantized coefficients includes a first subset of dequantized coefficients and a second subset of dequantized coefficients, the first subset of dequantized coefficients including non-zero dequantized coefficients and the second subset of dequantized coefficients including all-zero coefficients, wherein the number of coefficients in the first subset of dequantized coefficients is equal to the number of permissible non-zero coefficients for the video data block; a unit for applying an inverse low-frequency non-separable transform (LFNST) to the first subset of dequantized coefficients to determine a first intermediate subset of coefficients; and a unit for applying an inverse separable transform to at least a portion of the first intermediate subset of coefficients and the second subset of coefficients to determine a block of reconstructed residual values.
[0305] It should be recognized that, based on the examples, certain actions or events of any technique described herein may be performed in a different order, and may be added, combined, or omitted entirely (e.g., not all described actions or events are necessary for implementing the technique). Furthermore, in some examples, actions or events may be performed concurrently rather than sequentially, for example, through multithreading, interrupt handling, or multiple processors.
[0306] In one or more examples, the described functionality can be implemented using hardware, software, firmware, or any combination thereof. If implemented in software, the functionality can be stored or transmitted as one or more instructions or code on or through a computer-readable medium and executed by a hardware-based processing unit. A computer-readable medium can include a computer-readable storage medium, which corresponds to a tangible medium such as a data storage medium or a communication medium, including, for example, any medium that facilitates the transfer of a computer program from one place to another according to a communication protocol. In this way, a computer-readable medium can generally correspond to (1) a non-transitory tangible computer-readable storage medium or (2) a communication medium such as a signal or carrier wave. A data storage medium can be any available medium that can be accessed by one or more computers or one or more processors to obtain instructions, code, and / or data structures for implementing the techniques described in this disclosure. Computer program products can include computer-readable media.
[0307] For example, rather than limiting, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disc storage, disk storage or other magnetic storage devices, flash memory, or any other medium capable of storing desired program code in the form of instructions or data structures and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technology (e.g., infrared, radio, and microwave), then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technology (e.g., infrared, radio, and microwave) is included in the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but rather refer instead to non-transient tangible storage media. As used herein, disks and optical discs include compact optical discs (CDs), laser optical discs, optical discs, digital versatile optical discs (DVDs), floppy disks, and Blu-ray discs, wherein disks typically magnetically copy data, while optical discs utilize lasers to optically copy data. Combinations of the above items should also be included within the scope of computer-readable media.
[0308] Instructions can be executed by one or more processors, such as one or more DSPs, general-purpose microprocessors, ASICs, FPGAs, or other equivalent integrated or discrete logic circuits. Therefore, the terms "processor" and "processing circuit" as used herein can refer to any of the foregoing structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described herein can be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into combined codecs. Furthermore, the techniques can be implemented entirely within one or more circuit or logic elements.
[0309] The technologies disclosed herein can be implemented in a wide variety of devices or apparatuses, including wireless mobile phones, integrated circuits (ICs), or a set of ICs (e.g., chipsets). Various components, modules, or units are described in this disclosure to emphasize functional aspects of a device configured to perform the disclosed technologies, but they do not necessarily need to be implemented through different hardware units. Specifically, as described above, the various units can be combined in a codec hardware unit, or provided by a collection of interoperable hardware units (including one or more processors as described above) combined with appropriate software and / or firmware.
[0310] Various examples have been described. These and other examples are within the scope of the appended claims.
Claims
1. A method for decoding video data, the method comprising: Obtain a set of dequantization coefficients for a video data block, wherein the set of dequantization coefficients includes a first subset of dequantization coefficients and a second subset of dequantization coefficients, the first subset of dequantization coefficients includes non-zero dequantization coefficients, and the second subset of dequantization coefficients includes all-zero coefficients; Determine the intra-frame prediction mode for the video data block; Based on the intra-frame prediction mode, a candidate set of inverse low-frequency inseparable transform (LFNST) is determined from a plurality of sets, wherein the plurality of sets includes 35 sets, wherein determining the candidate set of inverse LFNST includes: determining an index for indicating the candidate set of inverse LFNST based on the intra-frame prediction mode, and wherein determining the index based on the intra-frame prediction mode includes: For values of the intra-prediction mode between 0 and 34, the index is determined to be equal to the value of the intra-prediction mode, and For the value of the intra-prediction mode between 35 and 66, the index is determined to be equal to 68 minus the value of the intra-prediction mode; Select an inverse LFNST from the determined set of inverse LFNST candidates; The inverse LFNST is applied to the first solution quantize a subset of coefficients to determine a first intermediate subset of coefficients; and The inverse separable transformation is applied to at least a portion of the first intermediate subset of coefficients and the second subset of coefficients to determine blocks of reconstructed residual values.
2. The method according to claim 1, wherein, The inverse LFNST candidate set includes 3 candidates.
3. The method according to claim 1, wherein, The first subset of solution quantization coefficients includes M solution quantization coefficients, and the first intermediate subset of coefficients includes N coefficients, where M and N are integer values.
4. The method according to claim 3, wherein, M = 16 and N = 64.
5. The method according to claim 3, wherein, M = 64 and N = 64.
6. The method according to claim 3, further comprising: The number of allowed non-zero coefficients is determined by the formula NZ = floor((WCM x nTbW x nTbH) / (N x N)), where nTbH represents the height of the block of the reconstructed value, nTbW represents the width of the block of the reconstructed value, NZ is equal to the number of allowed non-zero coefficients, and WCM represents a constant value.
7. The method according to claim 6, wherein, The first solution quantization coefficient subset has NZ coefficients.
8. The method according to claim 6, wherein, M = 2xNZ and N = 64.
9. The method according to claim 1, further comprising: The reconstructed residual block is added to the predicted block to form the reconstructed block; One or more filters are applied to the reconstructed block to determine the filtered reconstructed block; and The output includes the decoded video data of the filtered reconstruction block.
10. The method according to claim 1, wherein, The method is performed as part of the video encoding process.
11. An apparatus for decoding video data, the apparatus comprising: The memory is configured to store video data; One or more processors, which are implemented in a circuit and configured to: Obtain a set of dequantization coefficients for a video data block, wherein the set of dequantization coefficients includes a first subset of dequantization coefficients and a second subset of dequantization coefficients, the first subset of dequantization coefficients includes non-zero dequantization coefficients, and the second subset of dequantization coefficients includes all-zero coefficients; Determine the intra-frame prediction mode for the video data block; Based on the intra-frame prediction mode, a candidate set of inverse low-frequency inseparable transform (LFNST) is determined from a plurality of sets, wherein the plurality of sets includes 35 sets, wherein, in order to determine the candidate set of inverse LFNST, the one or more processors are configured to: determine an index for indicating the candidate set of inverse LFNST based on the intra-frame prediction mode, and wherein, in order to determine the index based on the intra-frame prediction mode, the one or more processors are configured to: For values of the intra-prediction mode between 0 and 34, the index is determined to be equal to the value of the intra-prediction mode, and For the value of the intra-prediction mode between 35 and 66, the index is determined to be equal to 68 minus the value of the intra-prediction mode; Select an inverse LFNST from the determined set of inverse LFNST candidates; The inverse LFNST is applied to the first solution quantize a subset of coefficients to determine a first intermediate subset of coefficients; and The inverse separable transformation is applied to at least a portion of the first intermediate subset of coefficients and the second subset of coefficients to determine blocks of reconstructed residual values.
12. The device according to claim 11, wherein, The inverse LFNST candidate set includes 3 candidates.
13. The device according to claim 11, wherein, The first subset of solution quantization coefficients includes M solution quantization coefficients, and the first intermediate subset of coefficients includes N coefficients, where M and N are integer values.
14. The device according to claim 13, wherein, M = 16 and N = 64.
15. The device according to claim 13, wherein, M = 64 and N = 64.
16. The device according to claim 13, wherein, The one or more processors are further configured to: The number of allowed non-zero coefficients is determined by the formula NZ = floor((WCM x nTbW x nTbH) / (N x N)), where nTbH represents the height of the block of the reconstructed value, nTbW represents the width of the block of the reconstructed value, NZ is equal to the number of allowed non-zero coefficients, and WCM represents a constant value.
17. The device according to claim 13, wherein, The first solution quantization coefficient subset has NZ coefficients.
18. The device according to claim 13, wherein, M = 2xNZ and N = 64.
19. The device according to claim 11, wherein, The one or more processors are further configured to: The reconstructed residual block is added to the predicted block to form the reconstructed block; One or more filters are applied to the reconstructed block to determine the filtered reconstructed block; and The output includes the decoded video data of the filtered reconstruction block.
20. The device according to claim 11, wherein, The device includes a wireless communication device, and further includes a receiver configured to receive encoded video data.
21. The device according to claim 20, wherein, The wireless communication device includes a handheld telephone, and wherein the receiver is configured to demodulate a signal including the encoded video data according to a wireless communication standard.
22. The device according to claim 11, further comprising: The monitor is configured to display decoded video data.
23. The device according to claim 11, wherein, The device includes one or more of the following: camera, computer, mobile device, broadcast receiver device or set-top box.
24. The apparatus of claim 11, further comprising: A camera, configured to capture video data.
25. The device according to claim 11, wherein, The device includes a wireless communication device, and further includes a transmitter configured to transmit encoded video data.
26. The device according to claim 25, wherein, The wireless communication device includes a handheld telephone, and wherein the transmitter is configured to modulate a signal including the encoded video data according to a wireless communication standard.
27. A computer-readable storage medium storing instructions, wherein, When executed by one or more processors, the instructions cause the one or more processors to: Obtain a set of dequantization coefficients for a video data block, wherein the set of dequantization coefficients includes a first subset of dequantization coefficients and a second subset of dequantization coefficients, the first subset of dequantization coefficients includes non-zero dequantization coefficients, and the second subset of dequantization coefficients includes all-zero coefficients; Determine the intra-frame prediction mode for the video data block; Based on the intra-frame prediction mode, a candidate set of inverse low-frequency inseparable transform (LFNST) is determined from a plurality of sets, wherein the plurality of sets includes 35 sets, wherein, in order to determine the candidate set of inverse LFNST, the instructions cause the one or more processors to determine an index for indicating the candidate set of inverse LFNST based on the intra-frame prediction mode, and wherein, in order to determine the index based on the intra-frame prediction mode, the instructions cause the one or more processors to: For values of the intra-prediction mode between 0 and 34, the index is determined to be equal to the value of the intra-prediction mode, and For the value of the intra-prediction mode between 35 and 66, the index is determined to be equal to 68 minus the value of the intra-prediction mode; Select an inverse LFNST from the determined set of inverse LFNST candidates; The inverse LFNST is applied to the first solution quantize a subset of coefficients to determine a first intermediate subset of coefficients; and The inverse separable transformation is applied to at least a portion of the first intermediate subset of coefficients and the second subset of coefficients to determine blocks of reconstructed residual values.
28. An apparatus for decoding video data, the apparatus comprising: A unit for obtaining a set of dequantization coefficients for a video data block, wherein the set of dequantization coefficients includes a first subset of dequantization coefficients and a second subset of dequantization coefficients, the first subset of dequantization coefficients includes non-zero dequantization coefficients, and the second subset of dequantization coefficients includes all-zero coefficients. Unit for determining the intra-frame prediction mode for the video data block; A unit for determining a candidate set of inverse low-frequency inseparable transform (LFNST) from a plurality of sets based on the intra-frame prediction mode, wherein the plurality of sets includes 35 sets, wherein the unit for determining the candidate set of inverse LFNST includes: a unit for determining an index for indicating the candidate set of inverse LFNST based on the intra-frame prediction mode, and wherein the unit for determining the index based on the intra-frame prediction mode includes a unit for the following: For values of the intra-prediction mode between 0 and 34, the index is determined to be equal to the value of the intra-prediction mode, and For the value of the intra-prediction mode between 35 and 66, the index is determined to be equal to 68 minus the value of the intra-prediction mode; The cell used to select the inverse LFNST from the determined set of inverse LFNST candidates; Units for applying the inverse LFNST to the first dequantized subset of coefficients to determine the first intermediate subset of coefficients; and A unit for applying an inverse separable transformation to at least a portion of the first intermediate subset of coefficients and the second subset of coefficients to determine a block of reconstructed residual values.