Transform and last significant coefficient position signaling for low-frequency non-separable transforms in video coding
By using position-based restriction and LFNST transform index signaling methods in video encoding technology, the problem of large signaling overhead in the transformation coefficient decoding process is solved, and the decoding efficiency is improved and applicable to advanced video codecs.
Patent Information
- Application Number
- CN202080041971.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-06-11
- Filing Date
- 2020-06-12
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2040-06-12
AI Technical Summary
In the existing video encoding technology, there is a problem of large signaling overhead in the transformation coefficient decoding process, which affects the decoding efficiency.
Signaling overhead is reduced by using position-based limitations in transform coefficient coding to signal the last transform coefficient position and applying a transform index signaling method in the low-frequency inseparable transform (LFNST) region.
Improves the efficiency of video decoding and reduces signaling overhead, making this technology applicable to advanced video codecs, including the extension of HEVC and next-generation video decoding standards.
Smart Images

Figure CN113940069B_ABST
Abstract
Description
[0001] This application claims the benefit of priority of U.S. Application No. 16 / 899,063, filed on Jun. 11, 2020, which claims the benefit of U.S. Provisional Application No. 62 / 861,828, filed on Jun. 14, 2019, and U.S. Provisional Application No. 62 / 868,346, filed on Jun. 28, 2019. The entire contents of each of the above applications are incorporated herein by reference. Technical Field
[0002] The present disclosure relates to video encoding and video decoding. Background Art
[0003] Digital video capabilities can be incorporated into a wide range of devices, including digital televisions, digital live systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite wireless telephones, so-called "smart phones", video teleconferencing devices, video streaming devices, etc. Digital video devices implement video decoding techniques (such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 (Part 10, Advanced Video Coding (AVC)), ITU-T H.265 / High Efficiency Video Coding (HEVC)) and extensions of such standards). By implementing such video decoding techniques, video devices can send, receive, encode, decode, and / or store digital video information more efficiently.
[0004] Video decoding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in a video sequence. For block-based video decoding, a video slice (e.g., a video picture or a portion of a video picture) can be divided into video blocks, which may also be referred to as coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial prediction relative to reference samples in adjacent blocks in 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 in the same picture or temporal prediction relative to reference samples in other reference pictures. A picture may be referred to as a frame, and a reference picture may be referred to as a reference frame. Summary of the Invention
[0005] In general, the present disclosure describes techniques for signaling the position of the last transform coefficient and the transform index / flag. The present disclosure describes: (i) position-based restrictions for signaling the position of the last transform coefficient in transform coefficient decoding, and (ii) methods for signaling the transform index for low-frequency non-separable transforms (LFNSTs). Since the techniques described in the present disclosure can reduce signaling overhead, the techniques of the present disclosure can improve decoding efficiency and can be used in advanced video codecs, including extensions of HEVC and next-generation video coding standards such as Versatile Video Coding (VVC / H.266).
[0006] In one example, the present disclosure describes a method for decoding video data, the method comprising: determining a normalization-defined zeroing pattern for zero coefficients based on the block size of a current block and a low-frequency non-separable transform (LFNST) syntax element, wherein the LFNST syntax element is signaled at the transform unit (TU) level; determining the transform coefficients of the current block, wherein the transform coefficients of the current block include transform coefficients in the LFNST region of the current block and transform coefficients outside the LFNST region of the current block, and determining the transform coefficients of the current block includes: applying an inverse LFNST to determine the values of one or more transform coefficients in the LFNST region of the current block; and determining that the transform coefficients of the current block in the region of the current block defined by the zeroing pattern are equal to 0; applying an inverse transform to the transform coefficients of the current block to determine residual data for the current block; and reconstructing the current block based on the residual data for the current block.
[0007] In another example, the present disclosure describes a method for encoding video data, the method comprising: generating residual data for a current block of the video data; applying a transform to the residual data to generate first transform coefficients for the current block; determining a normalization-defined zeroing pattern for zeroing transform coefficients; determining second transform coefficients of the current block, wherein the current block includes a low-frequency non-separable transform (LFNST) region, and determining the second transform coefficients of the current block includes: applying an LFNST to determine the values of one or more second transform coefficients in the LFNST region of the current block; and determining that the second transform coefficients of the current block in the region of the block defined by the zeroing pattern are equal to 0; determining an LFNST syntax element, wherein the LFNST syntax element specifies the LFNST in combination with the mode of the current block and the size of the current block; and signaling the LFNST syntax element at the transform unit (TU) level.
[0008] In another example, the present disclosure describes an apparatus for decoding video data, the apparatus comprising: a memory for storing the video data; and one or more processors implemented in circuitry, the one or more processors configured to: determine a normalization-defined zeroing pattern based on a block size of a current block and a low-frequency non-separable transform (LFNST) syntax element, wherein the LFNST syntax element is signaled at a transform unit (TU) level; determine transform coefficients of the current block, wherein the transform coefficients of the current block include transform coefficients in an LFNST region of the current block and transform coefficients outside the LFNST region of the current block, and the one or more processors are configured such that, as part of determining the transform coefficients of the current block, the one or more processors perform the following operations: apply an inverse LFNST to determine values of one or more transform coefficients in the LFNST region of the current block; and determine that transform coefficients of the current block in a region of the current block defined by the zeroing pattern are equal to 0; apply an inverse transform to the transform coefficients of the current block to determine residual data for the current block; and reconstruct the current block based on the residual data for the current block.
[0009] In another example, the present disclosure describes an apparatus for encoding video data, the apparatus comprising: a memory for storing the video data; and one or more processors implemented in circuitry, the one or more processors configured to: generate residual data for a current block of the video data; apply a transform to the residual data to generate first transform coefficients for the current block; determine a zeroing pattern for normalization-defined zeroed transform coefficients; determine second transform coefficients of the current block, wherein the current block includes a low-frequency non-separable transform (LFNST) region, and the one or more processors are configured such that, as part of determining the second transform coefficients of the current block, the one or more processors perform the following operations: apply an LFNST to determine values of one or more second transform coefficients in the LFNST region of the current block; and determine that second transform coefficients of the current block in a region of the block defined by the zeroing pattern are equal to 0; determine an LFNST syntax element, wherein the LFNST syntax element specifies the LFNST in combination with a mode of the current block and a size of the current block; and signal the LFNST syntax element at a transform unit (TU) level.
[0010] In another example, the present disclosure describes an apparatus for decoding video data, the apparatus comprising: a unit for determining a normalization-defined zeroing pattern of zero coefficients based on a block size of a current block and a low-frequency non-separable transform (LFNST) syntax element, wherein the LFNST syntax element is signaled at a transform unit (TU) level; a unit for determining transform coefficients of the current block, wherein the transform coefficients of the current block include transform coefficients in an LFNST region of the current block and transform coefficients outside the LFNST region of the current block, and the unit for determining the transform coefficients of the current block comprises: a unit for applying an inverse LFNST to determine values of one or more transform coefficients in the LFNST region of the current block; and a unit for determining that transform coefficients of the current block in a region of the current block defined by the zeroing pattern are equal to 0; a unit for applying an inverse transform to the transform coefficients of the current block to determine residual data for the current block; and a unit for reconstructing the current block based on the residual data for the current block.
[0011] In another example, the present disclosure describes an apparatus for encoding video data, the apparatus comprising: a unit for generating residual data for a current block of the video data; a unit for applying a transform to the residual data to generate first transform coefficients for the current block; a unit for determining a zeroing pattern of normalization-defined zeroing transform coefficients; a unit for determining second transform coefficients of the current block, wherein the current block includes a low-frequency non-separable transform (LFNST) region, and the unit for determining the second transform coefficients of the current block comprises: a unit for applying LFNST to determine values of one or more second transform coefficients in the LFNST region of the current block; and a unit for determining that the second transform coefficients of the current block in a region of the block defined by the zeroing pattern are equal to 0; a unit for determining an LFNST syntax element, wherein the LFNST syntax element specifies the LFNST in combination with a mode of the current block and a size of the current block; and a unit for signaling the LFNST syntax element at a transform unit (TU) level.
[0012] In another example, the present disclosure describes a computer-readable data storage medium having instructions stored thereon that, when executed, cause one or more processors to perform the following operations: determine a normalization-defined zeroing pattern based on a block size of a current block and a low-frequency non-separable transform (LFNST) syntax element, wherein the LFNST syntax element is signaled at a transform unit (TU) level; determine transform coefficients of the current block, wherein the transform coefficients of the current block include transform coefficients in an LFNST region of the current block and transform coefficients outside the LFNST region of the current block, and the instructions that cause the one or more processors to determine the transform coefficients of the current block cause the one or more processors to perform the following operations: apply an inverse LFNST to determine values of one or more transform coefficients in the LFNST region of the current block; and determine that transform coefficients of the current block in a region of the current block defined by the zeroing pattern are equal to 0; apply an inverse transform to the transform coefficients of the current block to determine residual data for the current block; and reconstruct the current block based on the residual data for the current block.
[0013] In another example, the present disclosure describes a computer-readable data storage medium having instructions stored thereon that, when executed, cause one or more processors to perform the following operations: generate residual data for a current block of video data; apply a transform to the residual data to generate first transform coefficients for the current block; determine a normalization-defined zeroing pattern for zeroing transform coefficients; determine second transform coefficients of the current block, wherein the current block includes a low-frequency non-separable transform (LFNST) region, and the instructions that cause the one or more processors to determine the second transform coefficients of the current block cause the one or more processors to perform the following operations: apply an LFNST to determine values of one or more second transform coefficients in the LFNST region of the current block; and determine that second transform coefficients of the current block in a region of the block defined by the zeroing pattern are equal to 0; determine an LFNST syntax element, wherein the LFNST syntax element specifies the LFNST in combination with a mode of the current block and a size of the current block; and signal the LFNST syntax element at a transform unit (TU) level.
[0014] 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 description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1is a block diagram showing an example video encoding and decoding system that can implement the techniques of the present disclosure.
[0016] Figure 2A and Figure 2B is a conceptual diagram showing an example quadtree binary tree (QTBT) structure and a corresponding coding tree unit (CTU).
[0017] Figure 3A is an illustration of a low-frequency non-separable transform (LFNST) at a video encoder.
[0018] Figure 3B is an illustration of an inverse LFNST at a video decoder.
[0019] Figure 4 is a conceptual diagram showing example transform coefficients obtained after applying an LFNST of size N to an h×w sub-block in the case of zeroing, where Z of the N transform coefficients are zeroed and K transform coefficients are retained.
[0020] Figure 5 is a conceptual illustration of LFNST transform coefficients obtained by applying the LFNST without zeroing.
[0021] Figure 6 is an illustration of LFNST transform coefficients obtained by applying the LFNST and zeroing Z of the highest-frequency transform coefficients in the LFNST region and multiple transform selection (MTS) transform coefficients outside the LFNST region.
[0022] Figure 7 is an illustration of LFNST transform coefficients obtained by applying the LFNST and zeroing only the MTS transform coefficients outside the LFNST region.
[0023] Figure 8 is a block diagram showing an example video encoder that can implement the techniques of the present disclosure.
[0024] Figure 9 is a block diagram showing an example video decoder that can implement the techniques of the present disclosure.
[0025] Figure 10 is a flowchart showing an example method for encoding a current block.
[0026] Figure 11 is a flowchart showing an example method for decoding a current block of video data.
[0027] Figure 12 is a flowchart showing an example method for encoding video data according to one or more techniques of the present disclosure.
[0028] Figure 13 is a flowchart showing an example method for decoding video data according to one or more techniques of the present disclosure.
[0029] Figure 14 is a flowchart showing an example method for encoding video data according to one or more techniques of the present disclosure.
[0030] Figure 15 is a flowchart showing an example method for decoding video data according to one or more techniques of the present disclosure. DETAILED DESCRIPTION
[0031] As part of performing a video encoding process, a video encoder may apply a transform to a block of residual data to generate a block of transform coefficients. The transform converts the residual data to the frequency domain. For example, the video encoder may apply one or more separable transforms to a block of residual data. Additionally, in some cases, the video encoder may apply a low-frequency non-separable transform (LFNST) to a sub-block of the block of transform coefficients. The video encoder may then quantize the transform coefficients resulting from the application of the LFNST. The video encoder may then encode the syntax elements representing the quantized transform coefficients. Similarly, a video decoder may inverse quantize the transform coefficients and apply an inverse LFNST to a sub-block of the inverse quantized transform coefficients. The video decoder may then generate residual data by applying an inverse transform to the transform coefficients resulting from the inverse LFNST. The inverse transform converts the transform coefficients from the frequency domain to the residual domain. The video decoder may reconstruct a block of video data based on the residual data and a prediction block.
[0032] In some examples, when applying the LFNST to the transform coefficients, the video encoder preserves and transforms the k lowest-frequency transform coefficients in a sub-block while zeroing the remaining transform coefficients in the sub-block. When the video encoder preserves the k lowest-frequency transform coefficients, the video encoder does not zero the k lowest-frequency transform coefficients. In such examples, the video decoder does not conventionally zero the transform coefficients outside the sub-block. In other examples, when applying the LFNST to the transform coefficients, the video encoder does not zero the transform coefficients in the sub-block or the transform coefficients outside the sub-block. In other examples, when applying the LFNST to the transform coefficients, the video encoder preserves and transforms the k lowest-frequency transform coefficients in a sub-block while zeroing all remaining transform coefficients of a block that includes transform coefficients within and outside the sub-block.
[0033] The following document is the latest draft of the upcoming VVC standard: Bross et al., "Versatile Video Coding (Draft 5)", Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 14th meeting: Geneva, Switzerland, March 19 - 27, 2019, JVET-N1001-v8 (hereinafter referred to as "VVC Draft 5"). In VVC Draft 5, the video encoder signals an LFNST index, which indicates whether LFNST is used and, if LFNST is used, which one of two non-separable transform kernels in the selected transform set is used.
[0034] In addition, in VVC Draft 5, the video encoder signals the position of the last significant transform coefficient of a block. In the present disclosure, a transform coefficient is a significant transform coefficient if it is non-zero. Signaling the position of the last significant transform coefficient can enable the video decoder to determine how many transform coefficients are signaled for the block. Further, in VVC Draft 5, a block can be partitioned into coefficient groups (CGs). The video encoder can signal a flag (e.g., a coded sub-block flag) for each CG to indicate whether the CG includes any non-zero transform coefficients. A CG that includes one or more non-zero transform coefficients can be referred to as a "coded CG". A CG that does not include any non-zero transform coefficients can be referred to as an "uncoded CG".
[0035] The present disclosure describes techniques in which a video encoder and a video decoder can infer (e.g., determine without explicitly decoding a syntax element) a pattern of transform coefficient zeroing and, based on the determined zeroing pattern, infer the position of the last significant transform coefficient or at least the bounds within which the last significant transform coefficient must lie. In this way, the video encoder can skip signaling the position of the last significant transform coefficient. Skipping signaling the position of the last significant transform coefficient can reduce the number of bits included in the bitstream that contains the encoded representation of video data. In this way, the techniques of the present disclosure can improve decoding efficiency.
[0036] In one example, the present disclosure describes a video encoder configured to generate residual data for a current block of video data. Additionally, the video encoder is configured to apply a transform to the residual data to generate first transform coefficients for the current block. The video encoder is further configured to determine an LFNST syntax element and signal the LFNST syntax element at the transform unit (TU) level. The LFNST syntax element indicates whether LFNST is applied and, if so, indicates the applicable LFNST kernel. Additionally, the video encoder may be configured to determine a normalization-defined zeroing pattern for zero coefficients based on the block size of the current block and the applicable LFNST kernel. The video encoder may also be configured to determine second transform coefficients for the current block. The current block includes an LFNST region. The LFNST region is a sub-block of the current block. As part of determining the second transform coefficients for the current block, the video encoder may apply LFNST to determine values of one or more second transform coefficients in the LFNST region of the current block. Additionally, the video encoder may be configured to cause, as part of determining the second transform coefficients for the current block, the video encoder to determine that the second transform coefficients of the current block in the region of the block defined by the zeroing pattern are equal to 0.
[0037] Similarly, according to one or more techniques of the present disclosure, a video decoder may be configured to determine a normalization-defined zeroing pattern for zero coefficients based on the block size of the current block and the LFNST syntax element. In this example, the LFNST syntax element is signaled at the TU level. In other examples, the LFNST syntax element may be signaled at the CU level or another level. Additionally, the video decoder may be configured to determine transform coefficients for the current block. The transform coefficients of the current block include transform coefficients in the LFNST region of the current block and transform coefficients outside the LFNST region of the current block. The video decoder may be configured to cause, as part of determining the transform coefficients for the current block, the video decoder to apply inverse LFNST to determine values of one or more transform coefficients in the LFNST region of the current block. The video decoder may also be configured to determine that the transform coefficients of the current block in the region of the current block defined by the zeroing pattern are equal to 0. The video decoder may also be configured to apply an inverse transform to the transform coefficients of the current block to determine residual data for the current block. Additionally, the video decoder may be configured to reconstruct the current block based on the residual data for the current block. Since the zeroing pattern may be determined based on the block size of the current block and the LFNST syntax element, it may not be necessary to explicitly signal the zeroing pattern. Additionally, as described in the present disclosure, the last significant coefficient of the current block may be limited to positions not zeroed by the zeroing pattern. This may reduce the need to signal the position of the last significant coefficient.
[0038] Figure 1FIG. 0 is a block diagram illustrating an example video encoding and decoding system 100 that may implement the techniques of the present disclosure. Generally, the techniques of the present disclosure relate to decoding (encoding and / or decoding) video data. Typically, video data includes any data for processing video. Thus, video data may include raw, unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata (e.g., signaling data).
[0039] As Figure 1 shown, in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. Specifically, source device 102 provides the video data to destination device 116 via a computer-readable medium 110. Source device 102 and destination device 116 may include any of a variety of devices, including desktop computers, laptop computers (i.e., notebook computers), tablet computers, set-top boxes, cellular phones such as smart phones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some cases, source device 102 and destination device 116 may be equipped for wireless communication and may thus be referred to as wireless communication devices.
[0040] In Figure 1 the example of FIG. 10, source device 102 includes a video source 104, a memory 106, a video encoder 200, and an output interface 108. Destination device 116 includes an input interface 122, a video decoder 300, a memory 120, and a display device 118. According to the present disclosure, video encoder 200 of source device 102 and video decoder 300 of destination device 116 may be configured to apply techniques for signaling the last transform coefficient location and transform index / flag. Thus, 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 device and destination device may include other components or arrangements. For example, source device 102 may receive video data from an external video source such as an external camera. Similarly, destination device 116 may interface with an external display device rather than include an integrated display device.
[0041] As Figure 1The system 100 shown is merely an example. In general, any digital video encoding and / or decoding device may perform techniques for signaling the last transform coefficient position and transform index / flag. The source device 102 and the destination device 116 are merely examples of such decoding devices, where the source device 102 generates encoded video data for transmission to the destination device 116. This disclosure refers to a "decoding" device as a device that performs decoding (e.g., encoding and / or decoding) of data. Thus, the video encoder 200 and the video decoder 300 represent examples of decoding devices (specifically, a video encoder and a video decoder), respectively. In some examples, the devices 102 and 116 may operate in a substantially symmetric manner such that each of the devices 102 and 116 includes video encoding and decoding components. Thus, the system 100 may support unidirectional or bidirectional video transmission between the video devices 102, 116, e.g., for video streaming, video playback, video broadcast, or video telephony.
[0042] In general, the 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 the video encoder 200, which encodes the data for the pictures. The video source 104 of the source device 102 may include a video capture device, such as a camera, a video archival unit containing previously captured raw video, and / or a video feed interface for receiving video from a video content provider. As another alternative, the video source 104 may generate computer graphics-based data as the source video, or generate a combination of live video, archived video, and computer-generated video. In each case, the video encoder 200 may encode the captured, pre-captured, or computer-generated video data. The video encoder 200 may reorder the pictures from the received order (sometimes referred to as the "display order") into a decoding order for decoding. The video encoder 200 may generate a bitstream including the encoded video data. Then, the source device 102 may output the encoded video data via the output interface 108 onto a computer-readable medium 110 for reception and / or retrieval by, e.g., the input interface 122 of the destination device 116.
[0043] The memories 106 of the source device 102 and 120 of the destination device 116 represent general memories. In some examples, the memories 106, 120 may store raw video data, e.g., raw video from the video source 104 and raw decoded video data from the video decoder 300. Additionally or alternatively, the memories 106, 120 may store software instructions that may be executed by, for example, the video encoder 200 and the video decoder 300, respectively. Although the memories 106 and 120 are shown as separate from the video encoder 200 and the video decoder 300 in this example, it should be understood that the video encoder 200 and the video decoder 300 may also include internal memories for functionally similar or equivalent purposes. Further, the memories 106, 120 may store, for example, encoded video data output from the video encoder 200 and input to the video decoder 300. In some examples, portions of the memories 106, 120 may be allocated as one or more video buffers, e.g., to store raw decoded and / or encoded video data.
[0044] The computer-readable medium 110 may represent any type of medium or device capable of conveying the encoded video data from the source device 102 to the destination device 116. In one example, the computer-readable medium 110 represents a communication medium that enables the source device 102 to directly send the encoded video data to the destination device 116 in real time, e.g., via a radio frequency network or a computer-based network. The output interface 108 may modulate the transmission signal including the encoded video data according to a communication standard such as a wireless communication protocol, and the input interface 122 may demodulate the received transmission signal according to a communication standard such as a wireless communication protocol. The communication medium may include any wireless or wired communication medium, e.g., the radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include routers, switches, base stations, or any other device that may be useful for facilitating communication from the source device 102 to the destination device 116.
[0045] In some examples, the computer-readable medium 110 may include a storage device 112. The source device 102 may output the encoded data from the output interface 108 to the storage device 112. Similarly, the destination device 116 may access the encoded data from the storage device 112 via the input interface 122. The storage device 112 may include any of a variety of distributed or locally accessible data storage media, such as a hard disk drive, a Blu-ray disc, a DVD, a CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing the encoded video data.
[0046] In some examples, the computer-readable medium 110 can include a file server 114 or another intermediate storage device that can store the encoded video data generated by the source device 102. The source device 102 can output the encoded video data to the file server 114 or another intermediate storage device that can store the encoded video generated by the source device 102. The destination device 116 can access the stored video data from the file server 114 via streaming or downloading. The file server 114 can be any type of server device capable of storing the encoded video data and sending the encoded video data to the destination device 116. The file server 114 can represent a web server (e.g., for a website), a File Transfer Protocol (FTP) server, a content delivery network device, or a Network Attached Storage (NAS) device. The destination device 116 can access the encoded video data from the 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 the encoded video data stored on the file server 114. The file server 114 and the input interface 122 can be configured to operate according to: a streaming protocol, a download transfer protocol, or a combination thereof.
[0047] The output interface 108 and the input interface 122 can represent a wireless transmitter / receiver, a modem, a wired networking component (e.g., an Ethernet card), a wireless communication component operating according to any one of the various IEEE 802.11 standards, or other physical components. In examples where the output interface 108 and the input interface 122 include wireless components, the output interface 108 and the input interface 122 can be configured to transmit data (such as encoded video data) according to cellular communication standards (such as 4G, 4G-LTE (Long Term Evolution), enhanced LTE, 5G, etc.). In some examples where the output interface 108 includes a wireless transmitter, the output interface 108 and the input interface 122 can be configured to operate according to other wireless standards (such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee TM )、Bluetooth TMtransfer data (such as encoded video data) according to standards, 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 an SoC device for performing the functions assigned to video encoder 200 and / or output interface 108, and destination device 116 may include an SoC device for performing the functions assigned to video decoder 300 and / or input interface 122.
[0048] The techniques of the present disclosure can be applied to video coding to support any of a variety of multimedia applications, such as over-the-air television broadcasts, cable television transmissions, satellite television transmissions, Internet streaming video transmissions (such as HTTP-based Dynamic Adaptive Streaming over HTTP (DASH)), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0049] Input interface 122 of destination device 116 receives an encoded video bitstream from a computer-readable medium 110 (e.g., a communication device, storage device 112, file server 114, etc.). The encoded video bitstream may include signaling information such as the following syntax elements (which are also used by video decoder 300) defined by video encoder 200: the syntax elements have values that describe the characteristics and / or processing of video blocks or other coding units (e.g., slices, pictures, groups of pictures, sequences, etc.). Display device 118 displays the decoded pictures of the decoded video data to a user. Display device 118 may represent any of a variety of display devices, such as a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or another type of display device.
[0050] Although not shown in Figure 1 In some examples, video encoder 200 and video decoder 300 may each be integrated with an audio encoder and / or an audio decoder, and may include appropriate MUX-DEMUX units or other hardware and / or software to process a multiplexed stream including both audio and video in a common data stream. If applicable, the MUX-DEMUX unit may follow the ITU H.223 multiplexer protocol or other protocols (such as the User Datagram Protocol (UDP)).
[0051] Video encoder 200 and video decoder 300 may each be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When the techniques are implemented partially in software, 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 techniques of the present disclosure. Each of video encoder 200 and video decoder 300 may be included in one or more encoders or decoders, and any of the encoders or decoders may be integrated as part of a combined encoder / decoder (CODEC) in a corresponding device. Devices including video encoder 200 and / or video decoder 300 may include integrated circuits, microprocessors, and / or wireless communication devices (such as cellular phones).
[0052] Video encoder 200 and video decoder 300 may operate according to a video coding standard, such as ITU-T H.265 (also known as the High Efficiency Video Coding (HEVC) standard) or an extension thereof (such as multi-view and / or scalable video coding extensions). Alternatively, video encoder 200 and video decoder 300 may operate according to other proprietary or industry standards, such as the Joint Exploration Test Model (JEM) or the ITU-T H.266 standard, also known as Versatile Video Coding (VVC). The latest draft of the VVC standard is described in the following document: Bross et al., "Versatile Video Coding (Draft 5)", Joint Video Team (JVT) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 14th meeting: Geneva, Switzerland, March 19-27, 2019, JVET-N1001-v8 (hereinafter simply referred to as "VVC Draft 5"). However, the techniques of the present disclosure are not limited to any particular coding standard.
[0053] Generally, video encoder 200 and video decoder 300 may perform block-based coding of pictures. The term "block" generally refers to a structure including data to be processed (e.g., to be encoded, decoded, or otherwise used during the encoding and / or decoding process). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Generally, video encoder 200 and video decoder 300 may code video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, instead of coding the red, green, and blue (RGB) data of the samples for a picture, video encoder 200 and video decoder 300 may code the luminance and chrominance components, where the chrominance components may include both the 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 an RGB format. Alternatively, a preprocessing unit and a postprocessing unit (not shown) may perform these conversions.
[0054] Generally speaking, the present disclosure may relate to coding (e.g., encoding and decoding) of pictures to include a process of encoding or decoding data of a picture. Similarly, the present disclosure may relate to coding of blocks of a picture to include a process of encoding or decoding data for a block (e.g., prediction and / or residual coding). An encoded video bitstream generally includes a series of values for representing coding decisions (e.g., coding modes) and syntax elements that partition a picture into blocks. Thus, a reference to coding a picture or a block should generally be understood as coding the values of the syntax elements used to form the picture or the block.
[0055] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video coder (such as video encoder 200) divides a coding tree unit (CTU) into CUs according to a quadtree structure. That is, the video coder divides the CTU and CUs into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. A node without child nodes may be referred to as a "leaf node", and the CU of such a leaf node may include one or more PUs and / or one or more TUs. The video coder may further divide PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents the division of TUs. In HEVC, a PU represents inter-prediction data, while a TU represents residual data. In VVC, the acronym PU refers to "picture unit". An intra-predicted CU includes intra-prediction information, such as an intra-mode indicator.
[0056] As another example, video encoder 200 and video decoder 300 may be configured to operate according to JEM or VVC. According to JEM or VVC, a video coder (such as video encoder 200) divides a picture into multiple coding tree units (CTUs). Video encoder 200 may divide a CTU according to a tree structure (such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure). The QTBT structure removes the concept of multiple partitioning types, such as the separation between the CU, PU, and TU in HEVC. The QTBT structure includes two levels: a first level that is divided according to quadtree partitioning, and a second level that is divided according to binary tree partitioning. The root node of the QTBT structure corresponds to the CTU. The leaf nodes of the binary tree correspond to coding units (CUs).
[0057] In the MTT partitioning structure, quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of ternary tree (TT) partitioning may be used to partition a block. Ternary tree partitioning is a partitioning in which a block is split into three sub-blocks. In some examples, the ternary tree partitioning divides a block into three sub-blocks without dividing the original block through the center. The partitioning types in the MTT (e.g., QT, BT, and TT) may be symmetric or asymmetric.
[0058] In some examples, video encoder 200 and video decoder 300 may use a single QTBT or MTT structure to represent each of the luminance component and the chrominance components, while in other examples, video encoder 200 and video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luminance component and another QTBT / MTT structure for the two chrominance components (or two QTBT / MTT structures for the respective chrominance components).
[0059] Video encoder 200 and video decoder 300 may be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, or other partitioning structures per HEVC. For purposes of explanation, a description of the techniques of the present disclosure is given with respect to QTBT partitioning. However, it should be understood that the techniques of the present disclosure may also be applied to video coders configured to use quadtree partitioning or also other types of partitioning.
[0060] The present disclosure may interchangeably use "NxN" and "N by N" to refer to the sample size of a block (such as a CU or other video block) in terms of vertical and horizontal dimensions. For example, 16x16 samples or 16 by 16 samples. Generally, 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 generally has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non - negative integer value. The samples in a CU can be arranged in rows and columns. Additionally, a CU does not necessarily need to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU can include NxM samples, where M does not necessarily equal N.
[0061] Video encoder 200 encodes video data for the prediction and / or residual information and other information used for a CU. The prediction information indicates how the CU is to be predicted in order to form a prediction block for the CU. The residual information generally represents the sample - by - sample difference between the samples of the CU before encoding and the prediction block.
[0062] To predict a CU, video encoder 200 can generally form a prediction block for the CU through inter - frame prediction or intra - frame prediction. Inter - frame prediction generally refers to predicting a CU based on the data of previously decoded pictures, while intra - frame prediction generally refers to predicting a CU based on the previously decoded data of the same picture. To perform inter - frame prediction, video encoder 200 can use one or more motion vectors to generate the prediction block. Video encoder 200 can generally perform a motion search to identify a reference block that closely matches the CU, for example, in terms of the difference between the CU and the reference block. Video encoder 200 can use the sum of absolute differences (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared difference (MSD), or other such difference calculations to compute a difference metric to determine whether the reference block closely matches the current CU. In some examples, video encoder 200 can use uni - directional prediction or bi - directional prediction to predict the current CU.
[0063] Some examples of JEM and VVC also provide an affine motion compensation mode, which can be considered an inter - frame prediction mode. In the affine motion compensation mode, video encoder 200 can determine two or more motion vectors representing non - translational motion (such as zooming in or out, rotation, perspective motion, or other irregular motion types).
[0064] To perform intra prediction, video encoder 200 may select an intra prediction mode to generate a prediction block. Some examples of JEM and VVC provide sixty-seven intra prediction modes, including various directional modes, as well as planar mode and DC mode. Generally, video encoder 200 selects an intra prediction mode that describes the neighboring samples of the current block (e.g., the block of a CU) from which samples of the current block are to be predicted. Assuming that video encoder 200 decodes CTUs and CUs in raster scan order (from left to right, top to bottom), such samples can typically be above, top-left, or left of the current block in the same picture as the current block.
[0065] Video encoder 200 encodes data representing the prediction mode for the current block. For example, for an inter prediction mode, video encoder 200 may encode data indicating which of the various available inter prediction modes is used and the motion information for the corresponding mode. For unidirectional or bidirectional inter prediction, for example, video encoder 200 may use advanced motion vector prediction (AMVP) or merge mode to encode the motion vectors. Video encoder 200 may use a similar mode to encode the motion vectors for an affine motion compensation mode.
[0066] After prediction such as intra prediction or inter prediction of a block, video encoder 200 may compute residual data for the block. The residual data (such as a residual block) represents the sample-by-sample difference between the block and the prediction block for the block, which is formed using the corresponding prediction mode. Video encoder 200 may apply one or more transforms to the residual block to produce transformed data in the transform domain rather than in the sample domain. For example, video encoder 200 may apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. Additionally, video encoder 200 may apply a second transform after the first transform, such as a mode-dependent non-separable second transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), etc. Video encoder 200 produces transform coefficients after applying one or more transforms.
[0067] As described above, after any transform to produce transform coefficients, video encoder 200 may perform quantization of the transform coefficients. Quantization generally refers to the process in which 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, video encoder 200 may reduce the bit depth associated with some or all of the transform coefficients. For example, video encoder 200 may round an n-bit value down to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, video encoder 200 may perform a bitwise right shift on the value to be quantized.
[0068] After quantization, video encoder 200 may scan the transform coefficients to produce a one-dimensional vector from the two-dimensional matrix including the quantized transform coefficients. The scan may be designed to place the higher energy (and thus lower frequency) transform coefficients at the front of the vector and the lower energy (and thus higher frequency) transform coefficients at the back of the vector. In some examples, video encoder 200 may use a predefined scan order to scan the quantized transform coefficients to produce a serialized vector, and then entropy code the quantized transform coefficients of the vector. In other examples, video encoder 200 may perform an adaptive scan. After scanning the quantized transform coefficients to form a one-dimensional vector, video encoder 200 may entropy code the one-dimensional vector, for example, according to context adaptive binary arithmetic coding (CABAC). Video encoder 200 may also entropy code the values of syntax elements used to describe metadata associated with the encoded video data for use by video decoder 300 when decoding the video data.
[0069] To perform CABAC, video encoder 200 may assign a context within a context model to the symbol to be sent. The context may relate, for example, to whether adjacent values of the symbol are zero values. Probability determination may be based on the context assigned to the symbol.
[0070] Video encoder 200 may also generate syntax data (such as block-based syntax data, picture-based syntax data, and sequence-based syntax data) or other syntax data (such as sequence parameter set (SPS), picture parameter set (PPS), or video parameter set (VPS)) for video decoder 300, for example, in a picture header, a block header, a slice header. Similarly, video decoder 300 may decode such syntax data to determine how to decode the corresponding video data.
[0071] In this way, the video encoder 200 can generate a bitstream that includes encoded video data, e.g., syntax elements that describe partitioning of a picture into blocks (e.g., CUs) and prediction and / or residual information for the blocks. Eventually, the video decoder 300 can receive the bitstream and decode the encoded video data.
[0072] Generally, the video decoder 300 performs a process opposite to the process performed by 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 the syntax elements for the bitstream in a way that is substantially similar but opposite to the CABAC encoding process of the video encoder 200. The syntax elements can define partitioning information for partitioning a picture into CTUs and further partitioning each CTU according to a corresponding partitioning structure (such as a QTBT structure) to define the CUs of the CTU. The syntax elements can also define prediction and residual information for blocks (e.g., CUs) of the video data.
[0073] The residual information can be represented by, e.g., quantized transform coefficients. The video decoder 300 can inverse-quantize and inverse-transform the quantized transform coefficients of a block to reproduce the residual block for the block. The video decoder 300 uses a signaled prediction mode (intra prediction or inter prediction) and associated prediction information (e.g., motion information for inter prediction) to form a prediction block for the block. The video decoder 300 can then combine the prediction block and the residual block (on a sample-by-sample basis) to reproduce the original block. The video decoder 300 can perform additional processing, such as performing a deblocking process to reduce visual artifacts along block boundaries.
[0074] According to the techniques of the present disclosure, a video encoder 200 may generate residual data for a current block of video data. The video encoder 200 may also apply a transform to the residual data to generate first transform coefficients for the current block. The video encoder 200 may also determine a normalization-defined zero coefficient cancellation pattern. Additionally, the video encoder 200 may determine second transform coefficients for the current block. The current block includes a LFNST region, and to determine the second transform coefficients for the current block, the video encoder 200 may apply LFNST to determine values of one or more second transform coefficients in the LFNST region of the current block. Further, as part of determining the second transform coefficients for the current block, the video encoder 200 may determine that the second transform coefficients of the current block in a region of the block defined by the cancellation pattern are equal to 0. The video encoder 200 may also determine LFNST syntax elements, such as a LFNST index or a LFNST flag. The LFNST syntax elements specify LFNST. In other words, a video decoder 300 may determine LFNST based on the LFNST syntax elements. For example, the video decoder 300 may determine LFNST based on the LFNST syntax elements in combination with a mode of the current block (e.g., an intra prediction mode) and a size of the current block. The video encoder 200 may signal the LFNST syntax elements, for example, at a TU level.
[0075] Further, according to the techniques of the present disclosure, a video decoder 300 may determine a normalization-defined zero coefficient cancellation pattern based on a block size of the current block and the LFNST syntax elements. The video decoder 300 may determine transform coefficients for the current block. The transform coefficients of the current block include transform coefficients in the LFNST region of the current block and transform coefficients outside the LFNST region of the current block. In this example, as part of determining the transform coefficients for the current block, the video decoder 300 may apply inverse LFNST to determine values of one or more transform coefficients in the LFNST region of the current block. Additionally, the video decoder 300 may determine that the transform coefficients of the current block in a region of the current block defined by the cancellation pattern are equal to 0. The video decoder 300 may apply an inverse transform to the transform coefficients of the current block to determine residual data for the current block. The video decoder 300 may reconstruct the current block based on the residual data for the current block.
[0076] Generally speaking, the present disclosure may relate to "signaling" certain information (such as syntax elements). The term "signaling" generally may refer to the conveyance of values for syntax elements and / or other data used to decode the encoded video data. That is, the video encoder 200 may signal the values for syntax elements in the bitstream. Generally, signaling refers to generating values in the bitstream. As described above, the source device 102 may transmit the bitstream to the destination device 116 substantially in real time or not in real time (such as may occur when storing the syntax elements in the storage device 112 for later retrieval by the destination device 116).
[0077] Figure 2A and 2B is a conceptual diagram showing an example quadtree binary tree (QTBT) structure 130 and a corresponding coding tree unit (CTU) 132. The solid lines represent quadtree splits, while the 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 a quadtree node splits a block horizontally and vertically into 4 sub-blocks of equal size, there is no need to indicate the split type. Thus, the video encoder 200 may encode the following, and the video decoder 300 may decode the following: syntax elements (such as split information) for the region tree level (i.e., the first level) (i.e., the solid lines) of the QTBT structure 130, and syntax elements (such as split information) for the prediction tree level (i.e., the second level) (i.e., the dashed lines) of the QTBT structure 130. The video encoder 200 may encode video data (such as prediction and transform data) for the CUs represented by the terminal leaf nodes of the QTBT structure 130, and the video decoder 300 may decode the video data.
[0078] Generally Figure 2B The CTU 132 may be associated with parameters that define the sizes 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 samples), the minimum quadtree size (MinQTSize, which represents the minimum allowable quadtree leaf node size), the maximum binary tree size (MaxBTSize, which represents the maximum allowable binary tree root node size), the maximum binary tree depth (MaxBTDepth, which represents the maximum allowable binary tree depth), and the minimum binary tree size (MinBTSize, which represents the minimum allowable binary tree leaf node size).
[0079] The root node corresponding to the CTU in the QTBT structure can have four child nodes at the first level of the QTBT structure, and each child node can be divided according to the quadtree division. That is, the nodes at the first level are leaf nodes (without child nodes) or have four child nodes. An example of the QTBT structure 130 represents such a node as including a parent node and child nodes with solid lines for the branches. If the nodes at the first level are not larger than the maximum allowable binary tree root node size (MaxBTSize), these nodes can be further divided by the corresponding binary tree. The binary tree splitting of a node can be iterated until the nodes generated from the splitting reach the minimum allowable binary tree leaf node size (MinBTSize) or the maximum allowable binary tree depth (MaxBTDepth). An example of the QTBT structure 130 represents such a node as having dashed lines for the branches. The binary tree leaf nodes are called coding units (CUs), which are used for prediction (e.g., intra-picture or inter-picture prediction) and transformation without any further division. As discussed above, the CU can also be referred to as a "video block" or a "block".
[0080] In an example of the QTBT splitting structure, the CTU size is set to 128x128 (luminance samples 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, quadtree division is applied to the CTU to generate quadtree leaf nodes. The quadtree leaf nodes can have sizes ranging from 16x16 (i.e., MinQTSize) to 128x128 (i.e., CTU size). If the quadtree leaf node is 128x128, since this size exceeds MaxBTSize (i.e., 64x64 in this example), the quadtree leaf node will not be further split by the binary tree. Otherwise, the quadtree leaf node will be further divided by the binary tree. Therefore, the quadtree leaf node is also the root node for the binary tree and has a binary tree depth of 0. When the binary tree depth reaches MaxBTDepth (4 in this example), further splitting is not allowed. When a binary tree node has a width equal to MinBTSize (4 in this example), it means that no further vertical splitting is allowed. Similarly, a binary tree node with a height equal to MinBTSize means that no further horizontal splitting is 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 division.
[0081] As described above, the video encoder 200 may apply a transform to a block of residual data to generate a block of transform coefficients. Similarly, the video decoder 300 may apply an inverse transform to convert the block of transform coefficients into a block of residual data. In video coding standards prior to HEVC, when using DCT-2 vertically and horizontally, only fixed separable transforms were used. In HEVC, in addition to DCT-2, DST-7 is also used as a fixed separable transform for 4×4 blocks.
[0082] U.S. Patent No. 10,306,229, U.S. Patent Publication No. 2018 / 0020218, and U.S. Patent Publication No. 2019 / 0373261 (U.S. Patent Application No. 16 / 426,749 filed on May 30, 2019) describe a multiple transform selection (MTS) method. An example of MTS in U.S. Patent Publication No. 2019 / 0373261 was adopted in the Joint Exploration Model (JEM-7.0) of the Joint Video Exploration Team (JVET), and a simplified version of MTS was subsequently adopted in VVC. MTS was previously known as Adaptive Multiple Transform (AMT), which is just a name change, and the technology is the same.
[0083] In JEM-7.0, the Figure 3A and Figure 3B low-frequency non-separable transform (LFNST) shown in
[0084] is used to further improve the coding efficiency of MTS, where the implementation of LFNST is based on the hypercube Givens transform (HyGT), which is described in U.S. Patent Publication No. 2017 / 0238013. See also U.S. Patent Publications No. 2017 / 0094313, 2017 / 0238014, U.S. Patent Application No. 16 / 364,007, and U.S. Provisional Patent Applications Nos. 62 / 668,105 and 62 / 849,689 (describing alternative designs and additional details). Figure 3A is a description of LFNST at the video encoder 200. In the Figure 3A example, the video encoder 200 may first apply a separable transform 134 (e.g., DCT or DST) to a set of residual data of the current block to generate a first set of transform coefficients for the current block. The first set of transform coefficients for the current block may be the MTS transform coefficients for the current block. Then, the video encoder 200 may apply the LFNST 135 to the first set of transform coefficients to generate a second set of transform coefficients for the current block. After generating the second set of transform coefficients for the current block, the video encoder 200 may quantize 136 the transform coefficients in the second set of transform coefficients.
[0085] Figure 3BThis is an illustration of inverse LFNST at video decoder 300. At Figure 3B In the example of Figure 3B , video decoder 300 may first apply inverse quantization 137 to the second set of transform coefficients for the current block. Then, video decoder 300 may apply inverse LFNST 138 to the inverse-quantized second set of transform coefficients for the current block to generate the first set of transform coefficients for the current block. Then, video decoder 300 may apply inverse transform 139 (e.g., inverse DCT or inverse DST) to the first set of transform coefficients for the current block to generate the residual data for the current block.
[0086] LFNST has been adopted in the VVC standard. For example, see Koo et al., "CE6: Reduced Secondary Transform (RST) (CE6-3.1)", Joint Video Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC1 / SC 29 / WG 11, 14th meeting, Geneva, Switzerland, March 19-27, 2019, document JVET-N0193. LFNST was previously known as non-separable secondary transform (NSST) or secondary transform, all of which have the same meaning.
[0087] In the LFNST design of VVC draft 5, a video encoder (e.g., video encoder 200) may perform a zeroing operation to keep K lowest-frequency transform coefficients transformed by an LFNST of size N (e.g., for 8x8 LFNST, N = 64), and a video decoder (e.g., video decoder 300) reconstructs separable transform coefficients (e.g., MTS transform coefficients) by using only these K transform coefficients. In VVC draft 5, according to the block size, 4×4 non-separable LFNST (N = 16) or 8×8 non-separable LFNST (N = 64) is used to complete this zeroing process. For example, 4×4 LFNST may be applied to blocks with a smaller size (e.g., min(width, height) < 8), while 8×8 LFNST is applied to larger blocks. In this configuration, the video decoder implicitly infers (e.g., assumes) that the remaining N–K higher-frequency transform coefficients are set to zero, and the K LFNST transform coefficients are used for reconstruction.
[0088] Figure 4 is a conceptual diagram showing example transform coefficients obtained after applying an LFNST of size N to an h×w sub-block 140 with zeroing, where Z of the N transform coefficients are zeroed and K transform coefficients are retained. Figure 4 The h×w sub-block 140 shown in the example of Figure 4 is the LFNST region of block 142, which may be larger than h×w. Figure 4Shows the transform coefficients obtained after applying the LFNST with zeroing on a separable subset of transform coefficients (e.g., the MTS transform coefficients within the dashed h×w sub-block 140). As described in U.S. Patent Publication No. 2017 / 0094313 and U.S. Provisional Patent Application No. 62 / 799,410, the LFNST is performed by first converting the two-dimensional h×w sub-block 140 (including Figure 4 the dark shaded region therein) into a one-dimensional list 144 (or vector) of transform coefficients via a predefined scan order, and then applying a transform to a subset 146 of the transform coefficients. The transform can be any transform or a pre-trained transform.
[0089] Figure 5 is a conceptual illustration of the LFNST transform coefficients obtained by applying the LFNST without zeroing. That is, Figure 5 shows an example of a separable transform (e.g., MTS) and the LFNST transform coefficients obtained without any zeroing. Specifically, in the example of Figure 5 , the block 150 has a size of H×W. The LFNST region 152 of the block 150 has a size of h×w. In the example of Figure 5 , the LFNST transform coefficients in the LFNST region 152 are scanned as a one-dimensional vector 154 including w×h transform coefficients.
[0090] Figure 6 and Figure 7 show variants of the LFNST described in U.S. Provisional Patent Application No. 62 / 799,410 and U.S. Patent Application No. 15 / 931,271, which apply zeroing to the transform coefficients outside the LFNST region (e.g., the MTS transform coefficients outside the shaded block). More specifically, Figure 6 is an illustration of the LFNST transform coefficients obtained by applying the LFNST and zeroing to both the Z highest-frequency transform coefficients 160 in the LFNST region 162 and the MTS transform coefficients 164 outside the LFNST region 162. Thus, in the example of Figure 6 , the video encoder 200 can scan the LFNST transform coefficients (including the zeroed highest-frequency transform coefficients 160) as a one-dimensional vector 166. Thus, the vector 166 includes N total LFNST transform coefficients, which include K non-zeroed LFNST transform coefficients and Z zeroed transform coefficients.
[0091] Figure 7 is an illustration of the LFNST transform coefficients obtained by applying the LFNST and zeroing only the MTS transform coefficients 170 outside the LFNST region. Figure 7 is the same as Figure 6Similarly, except that the MTS coefficients are regularly zeroed. Thus, vector 172 includes only w×h transform coefficients, where w is the width 174 of the LFNST region and h is the height of the LFNST region 174.
[0092] U.S. Patent Application 15 / 931,271 aims to reduce the signaling overhead of LFNST indices / flags based on side information obtained from decoding transform coefficients. The LFNST index (or LFNST flag) indicates whether LFNST is applied, and if LFNST is applied, which LFNST transform is applied. In VVC Draft 5, LFNST consists of 3 modes, which are signaled using LFNST index values 0, 1, and 2, where:
[0093] · The LFNST index 0 corresponds to skipping the LFNST process (e.g., using only MTS),
[0094] · The LFNST indices 1 and 2 are used to determine a non-separable transform from a set of two transforms selected according to the mode (e.g., intra prediction mode) and the size of the block (i.e., CU / TU). The non-separable transform can also be referred to as a kernel.
[0095] For example, as described in §8.7.4.1 of VVC Draft 5, when the LFNST index is equal to 1 or 2, the video decoder can determine the transform output size based on the size of the TU (e.g., nLfnstOutSize = (nTbW >= 8 && nTbH >= 8)? 48:16), and as described in §8.7.4.3 of VVC Draft 5, the video decoder can determine the LFNST transform set index based on the intra prediction mode of the block (e.g., CU). In addition, as described in §8.8.7.4.3 of VVC Draft 5, the video decoder can select between two different tables specifying the coefficients to be applied when LFNST is applied. In U.S. Patent Application 15 / 931,271, the zeroed transform coefficient mode is used to infer the LFNST index. In other words, U.S. Patent Application 15 / 931,271 describes techniques for avoiding signaling the LFNST index. In examples other than VVC Draft 5, there may be more or fewer than 3 modes.
[0096] This disclosure describes techniques that can reduce the signaling overhead of transform coefficient decoding based on LFNST index / flag information. For example, the LFNST index / flag can be used as side information in transform coefficient decoding. Reducing the signaling overhead of transform coefficient decoding can lead to higher decoding efficiency. The following signaling techniques of this disclosure can be used alone or in any combination.
[0097] In the case where LFNST is applied with a predefined set of conditions (e.g., block size, block shape, and / or transform-related syntax such as MTS index / flag) for canonical zeroing (i.e., canonical zeroing is applied at both the video encoder 200 and the video decoder 300), both the video encoder 200 and the video decoder 300 use the block size and the LFNST index / flag information to determine the mode of the canonically defined zero transform coefficients. The term "LFNST index / flag" may be used to refer to LFNST syntax elements (such as an index or a flag) that can be used to at least partially indicate the type of the applied LFNST. Based on the known or inferred zeroing mode, the last transform coefficient position (i.e., the last valid transform coefficient position) can be restricted (or inferred to be bounded) such that:
[0098] i) The signaling of the last transform coefficient position is reduced based on the LFNST index / flag,
[0099] ii) The number of decoded / non-decoded coefficient groups (CGs) can be inferred based on the LFNST index / flag, and
[0100] iii) The encoder / decoder operations (and optimizations) using the transform coefficient positions can be reduced or simplified based on the LFNST index / flag.
[0101] The signaling of the last transform coefficient position can be reduced because if LFNST is applied, the last transform coefficient position is guaranteed to be within a predefined LFNST zeroing region since all transform coefficients outside the zeroing region are forced to 0. By moving the signaling of the last transform coefficient position after LFNST, the video decoder 300 can determine the zeroing region before decoding the syntax element that signals the last transform coefficient position. Thus, according to one or more techniques of the present disclosure, if LFNST is used, the signaling of the last transform coefficient position may not be necessary (e.g., the video decoder 300 can infer the last transform coefficient position as the last element position in the predefined zeroing region).
[0102] As described above, the encoder and / or decoder operations (and optimizations) using the transform coefficient positions can be reduced or simplified based on the LFNST index / flag. Currently, the video encoder 200 relies on estimating the last transform coefficient position to make decisions regarding entropy coding. The video decoder 300 also has to wait until the last transform coefficient position is decoded in order to perform further operations. However, according to one or more techniques of the present disclosure, by adjusting the last transform coefficient position based on LFNST zeroing, all these decisions are simpler because the video encoder 200 and the video decoder 300 do not need to wait for the signaling of the last transform coefficient position.
[0103] For a predefined zeroing pattern, the last transform coefficient position / location (e.g., horizontal / vertical position X / Y) can be canonically restricted to or bounded by a position or location within a block (e.g., within a CU / TU / CG) where the transform coefficient can be non-zero (i.e., where the transform coefficient is not canonically zeroed). Providing a specific example from VVC draft 5:
[0104] i) For 4x4 LFNST, the transform coefficients can be restricted (and inferred) to be located in the upper-left 4x4 region of the block (a total of 16 transform coefficients).
[0105] ii) For 8x8 LFNST, the transform coefficients can be restricted (and inferred) to be located in the upper-left 8x8 region of the block, excluding the bottom 4x4 region (a total of 48 transform coefficients). Alternatively, in some examples, the transform coefficients can be restricted to be located in the upper-left 4x4 region of the block (a total of 16 transform coefficients).
[0106] iii) For 4xN or Nx4 blocks (where N≥16), 4x4 LFNST is applied to each of two adjacent upper-left 4x4 blocks, and the last transform coefficient position can be restricted (and inferred) accordingly.
[0107] If LFNST is applied (i.e., when the LFNST index / flag is non-zero), the zeroing pattern can be determined based on the block size information. For example, LFNST has several edge cases. For example, if the block size is 8x8, at most 8 transform coefficients are retained in a predefined zeroing region that includes 48 out of a total of 64 coefficients. By knowing that the block size is 8x8, video encoder 200 and video decoder 300 can determine the zeroing pattern (e.g., by using a predefined mapping from block size to zeroing pattern).
[0108] In a variant of LFNST where zeroing is applied to all transform coefficients outside the LFNST region, as in Figure 6 and Figure 7As shown and described in U.S. Provisional Patent Application No. 62 / 799,410 and U.S. Patent Application No. 15 / 931,271, the last transform coefficient position may be restricted to a predetermined position, where transform coefficients known to be outside the predetermined position are conventionally zeroed. If LFNST is applied, the last transform coefficient position is guaranteed to be within a predefined LFNST zeroing region. This is because all transform coefficients outside the zeroing region are forced to 0. In this case, even if the actual last transform coefficient position may be outside the zeroing region, the information signaling the specified last transform coefficient position may be useless because the transform coefficient at the last transform coefficient position will be zeroed in a later process. Restricting the last transform coefficient position to a predetermined position (where transform coefficients known to be outside the predetermined position are conventionally zeroed) means that if LFNST is used and the last position is outside the zeroing region, instead of signaling the syntax element specifying the last transform coefficient position, the last transform coefficient position can be inferred to be the last element of the predefined zeroing region.
[0109] Since the last transform coefficient is restricted to a predetermined position, it may not be necessary to signal the last transform coefficient position. Additionally, since the last transform coefficient is restricted to a predetermined position, any CG occurring after the predetermined position can be inferred to be a non-coded CG. Therefore, it may not be necessary to signal whether the CG occurring after the predetermined position is a coded CG.
[0110] According to some techniques of the present disclosure, the signaling of the LFNST index / flag can be unified with the MTS signaling. In VVC Draft 5, the LFNST signaling is performed at the CU level. For example, in VVC Draft 5, the LFNST index / flag (e.g., lfnst_idx) is included in the coding_unit syntax structure. The present disclosure proposes signaling the LFNST index / flag before transform coefficient decoding. Since the LFNST index / flag is signaled before transform coefficient decoding, the signaling of the LFNST index / flag can be done at the TU level. In other words, the LFNST index / flag can be signaled in the transform_unit syntax structure. In other examples, the LFNST index / flag can be signaled at the CU level. In other words, the LFNST index / flag can be signaled in the coding_unit syntax structure.
[0111] Since some techniques of the present disclosure allow the video encoder 200 to signal the LFNST information before transform coefficient decoding, in an alternative design, the signaling of the LFNST index / flag can be combined with the existing transform signaling (e.g., the MTS signaling completed before transform coefficient decoding in VVC draft 5). Thus, the MTS signaling and the LFNST signaling can be unified / coordinated. Examples of such unification / coordination are discussed in U.S. Patent Application 16 / 426,749 and U.S. Provisional Patent Application 62 / 830,125. For example, the LFNST is signaled separately from the primary transform (MTS). This is because the LFNST is signaled at the CU level and the MTS is signaled at the TU level. It is possible to bundle the MTS and the LFNST such that the LFNST is another mode of the MTS.
[0112] The present disclosure also describes techniques for signaling the LFNST index / flag for a segmented block (such as a segmented CU). For example, in some examples, if a block (e.g., a CU) is split into multiple sub-blocks (e.g., TUs), the LFNST index can be signaled separately for each sub-block (e.g., TU). For example, for each TU of a CU, there may be a separate LFNST index.
[0113] In other examples, the LFNST index can be signaled for a subset of the sub-blocks (e.g., TUs). For example, in one example, the LFNST index can be signaled only for the sub-blocks (e.g., TUs) for which the coded block flag (CBF) is enabled (i.e., when the CBF flag is true).
[0114] In some examples, the LFNST flag / index can be signaled (e.g., by the video encoder 200) on a separate TU using a TU-level parameter based on a threshold-based criterion or a count-based criterion. For example, in some examples where the video encoder 200 signals the LFNST flag / index on a separate TU using a TU-level parameter based on a threshold-based criterion, the threshold can be fixed to a constant value (e.g., 2), and if the last transform coefficient position is less than the threshold, the LFNST index / flag can be signaled (e.g., by the video decoder 300) for luminance and / or chrominance.
[0115] In some examples where video encoder 200 signals the LFNST flag / index using TU-level parameters on individual TUs based on a threshold-based criterion, the threshold can be applied to the luminance-based last position value in the dual-tree disabled case (i.e., single-tree case) in VVC Draft 5. In the single-tree case, the CU is partitioned into TUs in the same way for both the luminance and chrominance components. In the dual-tree case, the CU can be partitioned into TUs in different ways for both the luminance and chrominance components.
[0116] In addition, in some examples where video encoder 200 signals the LFNST flag / index using TU-level parameters on individual TUs based on a threshold-based criterion, the threshold for signaling the LFNST index / flag can be based on the last position of valid transform coefficients (i.e., last valid transform coefficient position). For example, if the last transform coefficient position is equal to or less than the DC term (indicating no transform coefficients), the LFNST should not be applied to the individual TU.
[0117] In some examples, video encoder 200 uses a counter-based criterion in VVC Draft 5 to signal the LFNST index / flag. For example, in VVC Draft 5, if a single tree is used to decode a CU, then if the number of significant coefficients (numSigCoeff) in the CU is greater than 2 and the number of zeroed significant coefficients in the CU is equal to 0, the video encoder signals the lfnst_idx syntax element (e.g., LFNST index or LFNST flag) for the CU. In VVC Draft 5, if a dual tree is used to decode a CU, then if the number of significant coefficients (numSigCoeff) in the CU is greater than 1 and the number of zeroed significant coefficients in the CU is equal to 0, the video encoder signals the lfnst_idx syntax element. In an example according to the present disclosure of using a counter-based criterion to determine whether to signal the LFNST index / flag for a TU, for each TU of a CU decoded using a single tree, if the number of significant coefficients in the TU is greater than 2 and the number of zeroed significant coefficients in the TU is equal to 0, video encoder 200 can signal the lfnst_idx syntax element for the TU. In this example, if a dual tree is used to encode the CU, then if the number of significant coefficients (numSigCoeff) in the TU is greater than 1 and the number of zeroed significant coefficients in the TU is equal to 0, the video encoder signals the lfnst_idx syntax element.
[0118] In some examples, the video encoder 200 signals the LFNST index / flag based on the relative position of the current TU with respect to the first TU (e.g., TU index) in a given CU. For example, the video encoder 200 may signal the LFNST index / flag for TUs below and / or to the right of the first TU, but not below and to the right of the first TU.
[0119] In some examples, the video encoder 200 may determine whether to signal the LFNST index / flag based on whether the CU is dual-tree decoded or single-tree decoded. For example, in some examples, when the CU is dual-tree decoded rather than single-tree decoded, the video encoder 200 may signal the LFNST index / flag for the TUs of the CU. In other examples, when the CU is single-tree decoded rather than dual-tree decoded, the video encoder 200 may signal the LFNST index / flag for the TUs of the CU.
[0120] In addition, in some examples, the video encoder 200 may determine whether to signal the LFNST index / flag based on the value of the DC component (e.g., the value of the transform coefficient at the top left of the TU or CU). For example, the video encoder 200 may signal the LFNST index for the TU or CU based on the DC component of the TU or CU being above (or alternatively, below) a particular threshold.
[0121] In some examples, the video encoder 200 may determine whether to signal the LFNST index / flag based on the magnitude, standard deviation, and / or statistics of the transform coefficients in the TU or CU. For example, when the total (or maximum) magnitude or standard deviation of the transform coefficients in the TU or CU is above (or alternatively, below) a particular threshold, the video encoder 200 may signal the LFNST index / flag.
[0122] In some examples in which video encoder 200 signals an LFNST index / flag for a segmented block, video encoder 200 may signal the LFNST index / flag for a single sub-block (single TU). For example, in one example, video encoder 200 may signal the LFNST index only for the first sub-block (e.g., the first-occurring TU in a CU). In this example, video encoder 200 and video decoder 300 may infer that the remaining sub-blocks (e.g., TUs) of the CU use the same LFNST index / flag as the first sub-block (e.g., TU). Alternatively, in this example, video encoder 200 and video decoder 300 may infer the LFNST index / flag of the remaining TUs based on a predefined value. For example, the LFNST index / flag may be disabled (i.e., may be set to zero). In other words, video encoder 200 and video decoder 300 may infer that the LFNST index / flag for the remaining TUs has a predefined value indicating that LFNST is disabled.
[0123] In some examples in which video encoder 200 signals the LFNST index / flag only for a single sub-block (e.g., TU) of a CU, video encoder 200 may signal the LFNST index only for the first sub-block whose CBF flag is enabled. In other words, in this example, video encoder 200 may signal the LFNST index only for the first-occurring sub-block having a CBF indicating that the sub-block includes valid transform coefficients.
[0124] In some examples in which video encoder 200 signals the LFNST index / flag only for a single sub-block (e.g., TU) of a CU, if a coefficient threshold is used to derive the LFNST index / flag, video encoder 200 and video decoder 300 may count only the number of non-zero transform coefficients within the first sub-block (first TU), and video encoder 200 and video decoder 300 may compare this count to the coefficient threshold to infer the value of the LFNST index / flag for the sub-block. Thus, in such examples, video encoder 200 and video decoder 300 may use only the first sub-block (first TU) to derive the LFNST index / flag.
[0125] In addition, in some examples, the video encoder 200 signals the LFNST flag / index for only a single TU or the first TU based on a threshold-based criterion or a count-based criterion, which is based on TU-level parameters. For example, in some examples where the video encoder 200 signals the LFNST flag / index for only a single TU or the first TU based on a threshold-based criterion (which is based on TU-level parameters), the threshold can be fixed to a constant value (e.g., 2), and if the last transform coefficient position is less than the threshold, the video encoder 200 can signal the LFNST index / flag for luminance and / or chrominance.
[0126] In some examples where the video encoder 200 signals the LFNST flag / index for only a single TU or the first TU based on a threshold-based criterion (which is based on TU-level parameters), the threshold can be applied to the last position value based on luminance in the double-tree disabling case (i.e., in the single-tree case) in VVC Draft 5.
[0127] In addition, in some examples where the video encoder 200 signals the LFNST flag / index for only a single TU or the first TU based on a threshold-based criterion (which is based on TU-level parameters), the threshold used to signal LFNST can be:
[0128] a. Based on the last position of the valid transform coefficients (i.e., the last valid transform coefficient position),
[0129] b. A counter-based one as in VVC Draft 5,
[0130] c. Based on the relative position of the current TU with respect to the first TU (e.g., TU index) in a given CU,
[0131] d. Based on whether the CU is double-tree decoded or single-tree decoded,
[0132] e. Based on the value of the DC component (e.g., the transform coefficient value at the top left of the TU or CU),
[0133] f. Based on the magnitude, standard deviation, and statistics of the transform coefficients in the TU or CU.
[0134] As an example, in VVC Draft 5, when the CU size is 128x128, the CU can be divided into four TUs. Thus, the above signaling method can be used for such CUs / TUs in VVC.
[0135] In this manner, in some examples, the video encoder 200 may determine that a current block of video data is split into a plurality of sub-blocks. In this example, the plurality of sub-blocks includes a current sub-block of the current block. The video encoder 200 may also generate residual data for the current block of video data. The residual data for the current block includes the residual data for the current sub-block. Then, the video encoder 200 may apply a transform (e.g., MTS transform) to the residual data for the current sub-block to generate first transform coefficients for the current sub-block. Additionally, the video encoder 200 may determine, based on a threshold-based or counter-based criterion, whether to signal in the bitstream an LFNST syntax element (e.g., LFNST index / flag) for the current sub-block. The bitstream includes an encoded representation of the video data. The LFNST syntax element may indicate whether LFNST is applied to the current block. Based on the determination regarding signaling the LFNST syntax element in the bitstream, the video encoder 200 may signal in the bitstream an LFNST index at the sub-block (e.g., TU) level. Further, the video encoder 200 may apply LFNST to the first transform coefficients for the current sub-block to determine values of one or more second transform coefficients in the LFNST region of the current sub-block.
[0136] In some examples, the video decoder 300 may determine that a current block of video data is split into a plurality of sub-blocks. In this example, the plurality of sub-blocks includes a current sub-block of the current block. Further, the video decoder 300 may determine, based on a threshold-based criterion or a count-based criterion, whether to signal in the bitstream an LFNST syntax element for the current block. The bitstream includes an encoded representation of the video data. Based on the determination regarding signaling the LFNST syntax element in the bitstream, the video decoder 300 may obtain the LFNST syntax element from the bitstream. Based on the LFNST syntax element indicating that LFNST is applied to the current sub-block, the video decoder 300 may apply the inverse of LFNST to determine values of one or more transform coefficients in the LFNST region of the current block. In some examples, the video decoder 300 may determine that transform coefficients of the current block in a region of the current sub-block defined by a flush mode are equal to 0. Further, the video decoder 300 may apply an inverse transform to the transform coefficients of the current sub-block to determine the residual data for the current sub-block. The video decoder 300 may reconstruct the current block based on the residual data for the current sub-block (e.g., together with the residual data for other sub-blocks of the current block).
[0137] Figure 8 is a block diagram illustrating an example video encoder 200 that may perform the techniques of the present disclosure. Figure 8It is provided for purposes of explanation and should not be considered a limitation of the techniques generally illustrated and described in this disclosure. For purposes of explanation, this disclosure describes the video encoder 200 in the context of video coding standards such as the HEVC video coding standard and the H.266 video coding standard being developed. However, the techniques of this disclosure are not limited to these video coding standards and are generally applicable to video encoding and decoding.
[0138] In Figure 8 an 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 one or all of the video data memory 230, the mode selection unit 202, the residual generation unit 204, the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the filter unit 216, the DPB 218, and the entropy coding unit 220 may be implemented in one or more processors or in processing circuitry. Additionally, the video encoder 200 may include additional or alternative processors or processing circuitry to perform these and other functions. For example, in Figure 8 an example, the transform processing unit 206 includes an LFNST unit 207, and the inverse transform processing unit 212 includes an inverse LFNST unit 213.
[0139] The video data memory 230 may store video data to be encoded by components of the video encoder 200. The video encoder 200 may receive the video data stored in the video data memory 230 from, for example, a video source 104 ( Figure 1 ). The DPB 218 may act as a reference picture memory that stores reference video data for use in predicting subsequent video data by the video encoder 200. The video data memory 230 and the DPB 218 may be formed of 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 the DPB 218 may be provided by the same memory device or separate memory devices. In various examples, the video data memory 230 may be on-chip (as shown) with other components of the video encoder 200 or off-chip relative to those components.
[0140] In the present disclosure, a reference to the video data memory 230 should not be construed as limited to a memory internal to the video encoder 200 (unless so specifically described), or limited to a memory external to the video encoder 200 (unless so specifically described). Rather, a reference to the video data memory 230 should be understood as a reference memory that stores video data received by the video encoder 200 for encoding (e.g., video data for a current block to be encoded). Figure 1 The memory 106 may also provide temporary storage for outputs from various units of the video encoder 200.
[0141] is shown Figure 8 various units of to assist in understanding the operations performed by the video encoder 200. These units may be implemented as fixed-function circuitry, programmable circuitry, or a combination thereof. Fixed-function circuitry refers to circuitry that provides a specific function and is preset with respect to the operations that can be performed. Programmable circuitry refers to circuitry that can be programmed to perform various tasks and provides flexible functionality in terms of the operations that can be performed. For example, programmable circuitry may execute software or firmware that causes the programmable circuitry to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuitry may execute software instructions (e.g., to receive parameters or output parameters), but the types of operations performed by the fixed-function circuitry are 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.
[0142] The video encoder 200 may include an arithmetic logic unit (ALU), a basic function unit (EFU), digital circuitry, analog circuitry, and / or a programmable core formed by programmable circuitry. In an example where software executed by programmable circuitry is used to perform the operations of the video encoder 200, the memory 106 ( Figure 1 ) may store the object 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.
[0143] The video data memory 230 is configured to store the received video data. The video encoder 200 may retrieve pictures of the video data from the video data memory 230 and provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data memory 230 may be the original video data to be encoded.
[0144] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra prediction unit 226. The mode selection unit 202 may include additional functional units that perform video prediction according to other prediction modes. As an example, the mode selection unit 202 may include a palette unit, a block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.
[0145] The mode selection unit 202 generally coordinates multiple encoding passes to test combinations of encoding parameters and the rate-distortion values obtained for such combinations. The encoding parameters may include splitting a CTU into CUs, the prediction mode for a CU, the transform type for the residual data of a CU, the quantization parameter for the residual data of a CU, etc. The mode selection unit 202 may ultimately select the combination of encoding parameters that has a better rate-distortion value than other tested combinations.
[0146] The video encoder 200 may split a picture retrieved from the video data memory 230 into a series of CTUs and encapsulate one or more CTUs within a slice. The mode selection unit 202 may split the CTUs of the picture according to a tree structure (such as the QTBT structure or the quad-tree structure of HEVC described above). As described above, the video encoder 200 may form one or more CUs by splitting the CTUs according to a tree structure. Such CUs may also generally be referred to as "video blocks" or "blocks".
[0147] Generally, the mode selection unit 202 also controls its components (e.g., the motion estimation unit 222, the motion compensation unit 224, and the intra prediction unit 226) to generate a prediction block for the current block (e.g., the current CU, or the overlapping part of the PU and TU in HEVC). For inter prediction of the current block, the motion estimation unit 222 may perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously decoded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 may calculate a value representing how closely a potential reference block will match the current block, for example, according to the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), etc. The motion estimation unit 222 may generally use the per-sample difference between the current block and the considered reference block to perform these calculations. The motion estimation unit 222 may identify the reference block with the lowest value obtained from these calculations, which indicates the reference block that most closely matches the current block.
[0148] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of a reference block in a reference picture relative to the position of a current block in a current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, for uni-directional inter prediction, the motion estimation unit 222 may provide a single motion vector, and for bi-directional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then use the motion vectors to generate a prediction block. For example, the motion compensation unit 224 may use the motion vectors to retrieve data of the reference block. As another example, if the motion vectors have fractional sample precision, the motion compensation unit 224 may interpolate values for the prediction block according to one or more interpolation filters. Further, for bi-directional inter prediction, the motion compensation unit 224 may retrieve data for two reference blocks identified by the respective motion vectors and combine the retrieved data, e.g., by per-sample averaging or weighted average.
[0149] As another example, for intra prediction or intra prediction coding, the intra prediction unit 226 may generate a prediction block according to samples adjacent to the current block. For example, for a directional mode, the intra prediction unit 226 may generally mathematically combine values of adjacent samples and fill the calculated values across the current block in a defined direction to produce the prediction block. As another example, for a DC mode, the intra prediction unit 226 may calculate an average of adjacent samples of the current block and generate a prediction block to include the obtained average for each sample of the prediction block.
[0150] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives an original, unencoded version of the current block from the video data memory 230 and receives the prediction block from the mode selection unit 202. The residual generation unit 204 calculates the per-sample difference between the current block and the prediction block. The obtained per-sample difference defines a residual block for the current block. In some examples, the residual generation unit 204 may calculate differences between sample values in the residual block to generate the residual block using residual differential pulse coding modulation (RDPCM). In some examples, one or more subtractor circuits that perform binary subtraction may be used to form the residual generation unit 204.
[0151] In an example where the mode selection unit 202 divides a CU into PUs, each PU may be associated with a luminance prediction unit and a corresponding chrominance prediction unit. The video encoder 200 and the video decoder 300 may support PUs of various sizes. As noted above, the size of a CU may refer to the size of the luminance decoding block of the CU, and the size of a PU may refer to the size of the luminance prediction unit of the PU. Assuming that the size of a particular CU is 2Nx2N, the video encoder 200 may support PU sizes of 2Nx2N or NxN for intra prediction, and symmetric PU sizes of 2Nx2N, 2NxN, Nx2N, NxN, or similar sizes for inter prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning for PU sizes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter prediction.
[0152] In an example where the mode selection unit does not further divide a CU into PUs, each CU may be associated with a luminance decoding block and a corresponding chrominance decoding block. As described above, the size of a CU may refer to the size of the luminance decoding block of the CU. The video encoder 200 and the video decoder 300 may support CU sizes of 2Nx2N, 2NxN, or Nx2N.
[0153] For other video decoding techniques (to name a few examples, such as block 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 generates a syntax element indicating the way to reconstruct the block based on the selected palette. In such a mode, the mode selection unit 202 may provide these syntax elements to the entropy coding unit 220 for encoding.
[0154] As described above, the residual generation unit 204 receives the 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.
[0155] The transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). The transform processing unit 206 may apply various transforms to the residual block to form a transform coefficient block. For example, the transform processing unit 206 may apply a discrete cosine transform (DCT), a direction transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform to the residual block. In some examples, the transform processing unit 206 may perform multiple transforms on the residual block, such as a primary transform and a secondary transform (such as a rotation transform). In some examples, the transform processing unit 206 does not apply a transform to the residual block.
[0156] In accordance with one or more techniques of the present disclosure, the transform processing unit 206 may apply a transform (e.g., DCT, discrete sine transform (DST), etc.) to the residual data to generate first transform coefficients for a current block (such as a CU or a sub-block (e.g., a TU)). Additionally, the LFNST unit 207 may determine a normalization mode for normalizing defined transform coefficients to zero. The LFNST unit 207 may also determine second transform coefficients for the current block. In this example, the current block includes an LFNST region. As part of determining the second transform coefficients by the LFNST unit 207, the LFNST unit 207 may apply LFNST to determine values of one or more second transform coefficients in the LFNST region. Additionally, the LFNST unit 207 may determine that the second transform coefficients of the current block in the region of the block defined by the normalization mode are equal to zero. The LFNST unit 207 may also determine LFNST syntax elements (e.g., LFNST index / flag). The LFNST syntax elements specify LFNST in combination with the mode of the current block and the size of the current block. The video encoder 200 may signal the LFNST syntax elements at the TU level.
[0157] According to one or more techniques of the present disclosure, a video encoder 200 may determine that a current block of video data is split into a plurality of sub - blocks, where the plurality of sub - blocks includes a current sub - block of the current block. A residual generation unit 204 may generate residual data for the current block of video data. The residual data for the current block includes the residual data for the current sub - block. In addition, a transform processing unit 206 may apply a transform to the residual data to generate first transform coefficients for the current sub - block. An LFNST unit 207 may determine whether to signal an LFNST syntax element for the current sub - block in a bitstream based on a threshold - based criterion or a count - based criterion. In this example, the bitstream includes an encoded representation of the video data, and the LFNST syntax element indicates whether LFNST is applied to the current sub - block. Based on the determination of whether to signal the LFNST syntax element in the bitstream, the video encoder 200 may signal the LFNST syntax element in the bitstream at the sub - block (e.g., TU level). The LFNST unit 207 may apply LFNST to the first transform coefficients for the current sub - block to determine values of one or more second transform coefficients in an LFNST region of the current sub - block.
[0158] A quantization unit 208 may quantize the transform coefficients in a transform coefficient block to produce a quantized transform coefficient block. The quantization unit 208 may quantize the transform coefficients of the transform coefficient block according to a quantization parameter (QP) value associated with the current block. The video encoder 200 (e.g., via a mode selection unit 202) may adjust the degree of quantization applied to the transform coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may cause information loss, and thus, the quantized transform coefficients may have lower precision compared to the original transform coefficients generated by the transform processing unit 206.
[0159] An inverse quantization unit 210 and an inverse transform processing unit 212 may apply inverse quantization and inverse transform, respectively, to the quantized transform coefficient block to reconstruct a residual block from the transform coefficient block.
[0160] As described above, the inverse transform processing unit 212 may include an inverse LFNST unit 213. The inverse LFNST unit 213 may apply the inverse of the LFNST applied by the LFNST unit 207. According to one or more techniques of the present disclosure, the inverse LFNST unit 213 may determine a normalization-defined zero coefficient cancellation pattern based on the block size of the current block (e.g., CU, sub-block, etc.), the mode of the current block, and the LFNST syntax element. The LFNST syntax element may be signaled at the transform unit (TU) level. Additionally, the inverse LFNST unit 213 may determine the transform coefficients of the current block. The transform coefficients of the current block include the transform coefficients in the LFNST region of the current block and the transform coefficients outside the LFNST region of the current block. As part of determining the transform coefficients of the current block, the inverse LFNST unit 213 may apply the inverse LFNST to determine the values of one or more transform coefficients in the LFNST region of the current block. Additionally, as part of determining the transform coefficients of the current block, the inverse LFNST unit 213 may determine that the transform coefficients of the current block in the region of the current block defined by the cancellation pattern are equal to 0. The inverse transform processing unit 212 may apply an inverse transform (e.g., inverse DCT, inverse DST, etc.) to the transform coefficients of the current block to determine the residual data for the current block.
[0161] The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (although potentially with some degree of distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 may add the samples of the reconstructed residual block to the corresponding samples of the prediction block generated by the mode selection unit 202 to generate the reconstructed block.
[0162] The filter unit 216 may perform one or more filter operations on the reconstructed block. For example, the filter unit 216 may perform a deblocking operation to reduce block effect artifacts along the edges of the CU. In some examples, the operation of the filter unit 216 may be skipped.
[0163] The video encoder 200 stores the reconstructed block in the DPB 218. For example, in an example where the operation of the filter unit 216 is not required, the reconstruction unit 214 may store the reconstructed block into the DPB 218. In an example where the operation of the filter unit 216 is required, the filter unit 216 may store the filtered reconstructed block into the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 may retrieve the reference picture formed by the reconstructed (and potentially filtered) blocks from the DPB 218 to perform inter prediction on the blocks of the subsequently encoded pictures. Additionally, the intra prediction unit 226 may use the reconstructed blocks of the current picture in the DPB 218 to perform intra prediction on other blocks in the current picture.
[0164] Generally, the entropy coding unit 220 may perform entropy coding on syntax elements received from other functional components of the video encoder 200. For example, the entropy coding unit 220 may perform entropy coding on the quantized transform coefficient blocks from the quantization unit 208. As another example, the entropy coding unit 220 may perform entropy coding on the prediction syntax elements from the mode selection unit 202 (e.g., motion information for inter prediction or intra mode information for intra prediction). The entropy coding unit 220 may perform one or more entropy coding operations on syntax elements as another example of video data to generate entropy-coded data. For example, the entropy coding unit 220 may perform context-adaptive variable-length coding (CAVLC) operations, CABAC operations, variable-variable (V2V) length coding operations, syntax-based context-adaptive binary arithmetic coding (SBAC) operations, probability interval partitioning entropy (PIPE) coding operations, exponential Golomb coding operations, or another type of entropy coding operation on the data. In some examples, the entropy coding unit 220 may operate in a bypass mode in which the syntax elements are not entropy coded.
[0165] The video encoder 200 may output a bitstream that includes the entropy-coded syntax elements needed to reconstruct the blocks of a slice or picture. Specifically, the entropy coding unit 220 may output the bitstream.
[0166] The above operations are described with respect to blocks. Such descriptions should be understood as operations for luminance decoding blocks and / or chrominance decoding blocks. As described above, in some examples, the luminance decoding block and the chrominance decoding block are the luminance component and the chrominance component of a CU. In some examples, the luminance decoding block and the chrominance decoding block are the luminance component and the chrominance component of a PU.
[0167] In some examples, it is not necessary to repeat the operations performed on the luminance coding block for the chrominance decoding block. As an example, it is not necessary to repeat the operations for identifying the motion vector (MV) and the reference picture for the luminance decoding block to identify the MV and the reference picture for the chrominance block. Rather, the MV for the luminance decoding block may be scaled to determine the MV for the chrominance block, and the reference picture may be the same. As another example, the intra prediction process may be the same for the luminance decoding block and the chrominance decoding block.
[0168] Video encoder 200 represents an example of a device configured to encode video data, the device including: a memory configured to store the video data; and one or more processing units implemented in circuitry and configured to generate residual data for a current block of the video data. The one or more processing units of video encoder 200 may also apply a transform to the residual data to generate first transform coefficients for the current block. Additionally, the one or more processing units of video encoder 200 may also determine a normalization-defined zeroing pattern for the zeroed transform coefficients. The one or more processing units of video encoder 200 may also be configured to determine second transform coefficients for the current block. The current block includes a LFNST region. The one or more processing units of video encoder 200 may be configured such that as part of determining the second transform coefficients for the current block, the one or more processing units of video encoder 200 may apply LFNST to determine values of one or more second transform coefficients in the LFNST region of the current block. Additionally, as part of determining the second transform coefficients for the current block, the one or more processing units of video encoder 200 may determine that the second transform coefficients of the current block in a region of the block defined by the zeroing pattern are equal to 0. The one or more processing units of video encoder 200 may also determine LFNST syntax elements, where the LFNST syntax elements specify LFNST in combination with the mode of the current block and the size of the current block. The one or more processing units of video encoder 200 may signal the LFNST syntax elements at a sub-block level (e.g., TU level).
[0169] In some examples, video encoder 200 represents an example of a device configured to encode video data, the device including: a memory configured to store the video data; and one or more processing units implemented in circuitry and configured to generate residual data for a current block of the video data. The one or more processing units of video encoder 200 may also apply a transform to the residual data to generate first coefficients for the current block. Additionally, the one or more processing units of video encoder 200 may determine LFNST syntax elements. The one or more processing units of video encoder 200 may also determine a normalization-defined zeroing pattern for zero coefficients based on the block size of the current block and the LFNST syntax elements. The one or more processing units of video encoder 200 may determine second coefficients for the current block, where the current block includes a LFNST region, and determining the second coefficients for the current block includes: applying LFNST to determine values of one or more second coefficients in the LFNST region of the current block; and determining that the second coefficients of the current block in a region of the block defined by the zeroing pattern are equal to 0.
[0170] Figure 9 is a block diagram illustrating an example video decoder 300 that may perform the techniques of the present disclosure.Figure 9 It is provided for purposes of explanation and does not limit the technologies generally illustrated and described in this disclosure. For purposes of explanation, this disclosure describes the video decoder 300 in accordance with the technologies of JEM, VVC, and HEVC. However, the technologies of this disclosure can be performed by video coding devices configured for other video coding standards.
[0171] In Figure 9 the example of, the video decoder 300 includes a coded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 134. In Figure 9 the example of, the inverse transform processing unit 308 includes an inverse LFNST unit 309. Any one or all of the CPB memory 320, the entropy decoding unit 302, the prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, the filter unit 312, and the DPB 134 can be implemented in one or more processors or in processing circuitry. Additionally, the video decoder 300 can include additional or alternative processors or processing circuitry to perform these and other functions.
[0172] The prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. The prediction processing unit 304 can include an addition unit that performs prediction according to other prediction modes. As an example, the prediction processing unit 304 can include a palette unit, a block copy unit (which can form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 can include more, fewer, or different functional components.
[0173] The CPB memory 320 can store video data to be decoded by components of the video decoder 300, such as an encoded video bitstream. For example, it can be obtained from a computer-readable medium 110 ( Figure 1)Obtain video data stored in the CPB memory 320. The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from an encoded video bitstream. Additionally, the CPB memory 320 may store video data other than the syntax elements of decoded pictures, such as temporary data representing the outputs of the respective units from the video decoder 300. The DPB 314 generally stores decoded pictures, and the video decoder 300 may output decoded pictures and / or use the decoded pictures as reference video data when decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and the DPB 314 may be formed 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 the DPB 314 may be provided by the same memory device or separate memory devices. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300 or off-chip relative to those components.
[0174] Additionally or alternatively, in some examples, the video decoder 300 may retrieve decoded video data from the memory 120( Figure 1 ). That is, the memory 120 may utilize the CPB memory 320 to store data as discussed above. Similarly, when some or all of the functions of the video decoder 300 are implemented with software to be executed by the processing circuitry of the video decoder 300, the memory 120 may store instructions to be executed by the video decoder 300.
[0175] is shown Figure 9 the respective units shown in to assist in understanding the operations performed by the video decoder 300. These units may be implemented as fixed-function circuitry, programmable circuitry, or a combination thereof. Similar to Figure 8 , fixed-function circuitry refers to circuitry that provides a specific function and is pre-set with respect to the operations that can be performed. Programmable circuitry refers to circuitry that can be programmed to perform various tasks and provides flexible functionality with respect to the operations that can be performed. For example, programmable circuitry may execute software or firmware that causes the programmable circuitry to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuitry may execute software instructions (e.g., to receive parameters or output parameters), but the type of operations performed by the fixed-function circuitry 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 an integrated circuit.
[0176] The video decoder 300 may include an ALU, an EFU, digital circuits, analog circuits, and / or programmable cores formed by programmable circuits. In an example where the operations of the video decoder 300 are performed by software executed on the programmable circuits, on-chip or off-chip memory may store instructions (e.g., object code) of the software received and executed by the video decoder 300.
[0177] The entropy decoding unit 302 may receive the encoded video data from the CPB and perform entropy decoding on the video data to reproduce syntax elements. The prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, and the filter unit 312 may generate the decoded video data based on the syntax elements extracted from the bitstream.
[0178] Generally, the video decoder 300 reconstructs pictures block by block. The video decoder 300 may perform the reconstruction operation on each block individually (where the block currently being reconstructed (i.e., decoded) may be referred to as the "current block").
[0179] The entropy decoding unit 302 may perform entropy decoding on the syntax elements defining the quantized transform coefficients of the quantized transform coefficient block and transform information such as quantization parameter (QP) and / or transform mode indication. The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine the quantization degree, and similarly, determine the inverse quantization degree to be applied by the inverse quantization unit 306. The inverse quantization unit 306 may, for example, perform a bitwise left shift operation to inverse-quantize the quantized transform coefficients. The inverse quantization unit 306 may thus form a transform coefficient block including the transform coefficients.
[0180] After the inverse quantization unit 306 forms the transform coefficient block, the inverse transform processing unit 308 may apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, the inverse transform processing unit 308 may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotation transform, an inverse direction transform, or another inverse transform to the transform coefficient block.
[0181] In Figure 9In the example, the inverse transform processing unit 308 includes an inverse LFNST unit 309. The inverse LFNST unit 309 is configured to apply the inverse LFNST. For example, the inverse LFNST unit 309 may determine a zeroing pattern of the canonical defined zero coefficients based on the block size of the current block and the LFNST syntax element. The current block may be a CU, a TU, a sub-block, or other types of blocks. In this example, the LFNST syntax element may be signaled at the TU level. In other examples, the LFNST syntax element may be signaled at the CU level or another level. Additionally, the inverse LFNST unit 309 may determine the transform coefficients of the current block. The transform coefficients of the current block include the transform coefficients in the LFNST region of the current block and the transform coefficients outside the LFNST region of the current block. As part of determining the transform coefficients of the current block, the inverse LFNST unit 309 may apply the inverse LFNST to determine the values of one or more transform coefficients in the LFNST region of the current block. Additionally, as part of determining the transform coefficients of the current block, the inverse LFNST unit 309 may determine that the transform coefficients of the current block in the region of the current block defined by the zeroing pattern are equal to 0. The inverse transform processing unit 308 may apply an inverse transform (e.g., inverse DCT, inverse DST, etc.) to the transform coefficients of the current block to determine the residual data for the current block.
[0182] In some examples of the present disclosure, the entropy decoding unit 302 (or another unit of the video decoder 300) may determine an LFNST syntax element signaled for a sub-block (e.g., a TU or other types of sub-blocks) of the current block in the bitstream based on a threshold-based criterion or a count-based criterion. Based on the determination of signaling the LFNST syntax element in the bitstream, the entropy decoding unit 302 (or another unit of the video decoder 300) may obtain the LFNST syntax element from the bitstream. Based on the LFNST syntax element indicating that the LFNST is applied to the current sub-block, the inverse LFNST unit 309 may apply the inverse of the LFNST to determine the values of one or more transform coefficients in the LFNST region of the sub-block of the current block. The inverse transform processing unit 308 may apply an inverse transform (e.g., inverse DCT, inverse DST, or other types of transforms) to the transform coefficients of the sub-block of the current block to determine the residual data for the sub-block of the current block.
[0183] In addition, the prediction processing unit 304 generates a prediction block based on the prediction information syntax element entropy-decoded by the entropy decoding unit 302. For example, if the prediction information syntax element indicates that the current block is inter-frame predicted, the motion compensation unit 316 can generate a prediction block. In this case, the prediction information syntax element can indicate the reference picture in the DPB 314 from which the reference block is to be retrieved, and the motion vector that identifies the position of the reference block in the reference picture relative to the position of the current block in the current picture. The motion compensation unit 316 can generally perform the inter-frame prediction process in a manner substantially similar to the manner described with respect to the motion compensation unit 224( Figure 8 ).
[0184] As another example, if the prediction information syntax element indicates that the current block is intra-frame predicted, the intra-frame prediction unit 318 can generate a prediction block according to the intra-frame prediction mode indicated by the prediction information syntax element. Again, the intra-frame prediction unit 318 can generally perform the intra-frame prediction process in a manner substantially similar to the manner described with respect to the intra-frame prediction unit 226( Figure 8 ). The intra-frame prediction unit 318 can retrieve the data of the neighboring samples of the current block from the DPB 314.
[0185] The reconstruction unit 310 can use the prediction block and the residual block to reconstruct the current block. For example, the reconstruction unit 310 can add the samples of the residual block to the corresponding samples of the prediction block to reconstruct the current block.
[0186] The filter unit 312 can perform one or more filter operations on the reconstructed block. For example, the filter unit 312 can perform a deblocking operation to reduce the blocking artifact along the edges of the reconstructed block. The operation of the filter unit 312 is not necessarily performed in all examples.
[0187] The video decoder 300 can store the reconstructed block in the DPB 314. For example, in an example where the operation of the filter unit 312 is not performed, the reconstruction unit 310 can store the reconstructed block into the DPB 314. In an example where the operation of the filter unit 312 is performed, the filter unit 312 can store the filtered reconstructed block into the DPB 314. As discussed above, the DPB 314 can provide reference information (such as the current picture for intra-frame prediction and the samples of the previously decoded pictures for subsequent motion compensation) to the prediction processing unit 304. In addition, the video decoder 300 can output the decoded picture from the DPB 314 for subsequent presentation on a display device such as Figure 1 the display device 118.
[0188] In this manner, video decoder 300 represents an example of a video decoding device that includes: a memory configured to store video data; and one or more processing units implemented in circuitry and configured to determine a normalization defined zero coefficient cancellation mode based on a block size of a current block and an LFNST syntax element. In some examples, the LFNST syntax element is signaled at a TU level. Video decoder 300 may determine transform coefficients of a current block. The transform coefficients of the current block include transform coefficients within an LFNST region of the current block and transform coefficients outside the LFNST region of the current block. In this example, as part of determining the transform coefficients of the current block, video decoder 300 may apply an inverse LFNST to determine values of one or more transform coefficients within the LFNST region of the current block. Additionally, video decoder 300 may determine that transform coefficients of the current block within a region of the current block defined by the cancellation mode are equal to 0. Video decoder 300 may apply an inverse transform to the transform coefficients of the current block to determine residual data for the current block. Video decoder 300 may reconstruct the current block based on the residual data for the current block.
[0189] Additionally, in some examples, video decoder 300 represents an example of a video decoding device that includes: a memory configured to store video data; and one or more processing units implemented in circuitry and configured to determine that a current block of video data is split into a plurality of sub-blocks, the plurality of sub-blocks including a current sub-block of the current block. The one or more processors may also determine an LFNST syntax element for the sub-blocks of the current block signaled in a bitstream based on a threshold-based criterion or a count-based criterion. Additionally, the one or more processors may be configured such that based on a determination of signaling of the LFNST syntax element in the bitstream, the one or more processors obtain the LFNST syntax element from the bitstream. Based on the LFNST syntax element indicating that LFNST is applied to the current sub-block, the one or more processors may apply an inverse of the LFNST to determine values of one or more transform coefficients within an LFNST region of the sub-blocks of the current block. The one or more processors may apply an inverse transform to the transform coefficients of the sub-blocks of the current block to determine residual data for the sub-blocks of the current block. The one or more processors may reconstruct the current block based on the residual data for the sub-blocks of the current block.
[0190] Figure 10 is a flowchart illustrating an example method for encoding a current block. The current block may include a current CU. Although described with respect to video encoder 200 ( Figure 1 and Figure 8 ), it should be understood that other devices may be configured to perform methods similar to the Figure 10 method.
[0191] In this example, video encoder 200 initially predicts a current block (350). For example, video encoder 200 may form a prediction block for the current block. Then, video encoder 200 may compute a residual block (352) for the current block. To compute the residual block, video encoder 200 may compute the difference between the original, unencoded block and the prediction block for the current block. Then, video encoder 200 may transform the residual data to generate transform coefficients (354). As part of transforming the residual data, video encoder 200 may determine and apply an LFNST as described in any example of the present disclosure.
[0192] Video encoder 200 may quantize the transform coefficients of the residual block (356). Next, video encoder 200 may scan the quantized transform coefficients of the residual block (358). During or after scanning, video encoder 200 may entropy code the transform coefficients (360). For example, video encoder 200 may use CAVLC or CABAC to code the coefficients. Then, video encoder 200 may output the entropy-coded data of the block (362).
[0193] Figure 11 is a flowchart illustrating an example method for decoding a current block. The current block may include a current CU. Although described with respect to video decoder 300 ( Figure 1 and Figure 9 ), it should be understood that other devices may be configured to perform methods similar to the Figure 11 method.
[0194] Video decoder 300 may receive entropy - encoded data for a current block (e.g., entropy - encoded prediction information and entropy - encoded data of transform coefficients for a residual block corresponding to the current block) (370). Video decoder 300 may entropy - decode the entropy - encoded data to determine prediction information for the current block and reproduce the transform coefficients of the residual block (372). Video decoder 300 may predict the current block, for example, using an intra - prediction mode or an inter - prediction mode indicated by the prediction information for the current block (374), to calculate a prediction block for the current block. Then, video decoder 300 may inverse - scan the reproduced transform coefficients to create a block of quantized transform coefficients (376). Then, video decoder 300 may inverse - quantize the transform coefficients (378). Additionally, video decoder 300 may apply an inverse transform to the transform coefficients to produce a residual block (380). In some examples, as part of producing the residual block, video decoder 300 may apply inverse LFNST as described in any example of the present disclosure. Finally, video decoder 300 may decode the current block by combining the prediction block and the residual block (382).
[0195] Figure 12 is a flowchart showing an example method for encoding video data according to one or more techniques of the present disclosure. In Figure 12 an example, video encoder 200 (e.g., residual generation unit 204 of video encoder 200) may generate residual data for a current block of video data (400). For example, video encoder 200 may subtract samples of a prediction block for the current block from corresponding samples of the current block to generate residual data for the current block.
[0196] Furthermore, video encoder 200 (e.g., transform processing unit 206 of video encoder 200) may apply a transform to the residual data to generate first transform coefficients for the current block (402). For example, video encoder 200 may apply an MTS transform, DCT, DST, or other type of transform to the residual data.
[0197] Video encoder 200 (e.g., LFNST unit 207 of video encoder 200) may determine a normalization - defined zeroing pattern for zeroing transform coefficients (404). For example, to determine the zeroing pattern, video encoder 200 may test LFNSTs associated with different zeroing patterns and select an LFNST based on the results of the test (such as a rate - distortion metric).
[0198] In some examples, video encoder 200 determines the number of coded coefficient groups and non-coded coefficient groups (CGs) based on the LFNST syntax element. For example, to determine the number of coded and non-coded CGs based on the LFNST syntax element, video encoder 200 may determine that the number of coded CGs includes any CGs that appear before the CGs that fully fall within the zeroing pattern in the CG scan order. Thus, when determining the transform coefficients of the current block, video encoder 200 may determine whether to signal in the bitstream a syntax element indicating the value of the transform coefficients for any CGs other than the number of coded CGs based on the number of CGs. Additionally, in some examples, it may not be necessary to signal the CBF for CGs other than the number of coded CGs. Avoiding the need to signal the CBF for CGs other than the number of coded CGs can improve decoding efficiency.
[0199] Furthermore, in some examples, the last significant coefficient position of the current block is canonically restricted to positions in the current block that are allowed to be zeroed by the zeroing pattern. In other words, video encoder 200 may determine that the last significant coefficient position of the current block must not be in the region of the current block that is zeroed by the zeroing pattern. In some examples, video decoder 300 can thus infer that any transform coefficients of the current block that are not canonically zeroed may be significant coefficients. Thus, it may not be necessary for video encoder 200 to signal a syntax element indicating the position of the last significant transform coefficient of the current block. Avoiding the need to signal a syntax element indicating the position of the last significant transform coefficient of the current block can improve decoding efficiency.
[0200] Additionally, in Figure 12 the example, video encoder 200 (e.g., LFNST unit 207) may determine the second transform coefficient (406) of the current block. The current block includes an LFNST region. As part of determining the second transform coefficient of the current block, video encoder 200 (e.g., LFNST unit 207) may apply LFNST to determine the value of one or more second transform coefficients (408) in the LFNST region of the current block. Additionally, video encoder 200 (e.g., LFNST unit 207) may determine that the second transform coefficient of the current block in the region of the block defined by the zeroing pattern is equal to 0 (410). In other words, video decoder 200 may zero the transform coefficients in the region defined by the zeroing pattern.
[0201] Additionally, video encoder 200 may determine a LFNST syntax element (412). The LFNST syntax element may specify the LFNST in combination with the mode of the current block, the size of the current block, and / or other factors. The video encoder 200 (e.g., the entropy coding unit 220 of the video encoder 200) may signal the LFNST syntax element at the TU level (414). In other examples, the video encoder 200 may signal the LFNST syntax element at the CU level or another level.
[0202] Figure 13 is a flowchart illustrating an example method for decoding video data in accordance with one or more techniques of the present disclosure. In Figure 13 example, video decoder 300 (e.g., the inverse LFNST unit 309 of video decoder 300) determines a normalization pattern of canonical defined zero coefficients (450) based on the block size of the current block, the mode of the current block, and the LFNST syntax element. The current block may be a CU, TU, CG, sub-block, or other type of block. In some examples, the LFNST syntax element is signaled at the TU level. In other examples, the LFNST syntax element is signaled at another level, such as the CU level. In some examples, the current block is a CU and the LFNST syntax element is signaled.
[0203] Furthermore, in Figure 13 example, video decoder 300 (e.g., inverse LFNST unit 309) may determine the transform coefficients of the current block (452). The transform coefficients of the current block include transform coefficients within the LFNST region of the current block and transform coefficients outside the LFNST region of the current block.
[0204] In some examples, video decoder 300 determines the number of decoded coefficient groups and non-decoded coefficient groups (CGs) based on the LFNST syntax element. For example, to determine the number of decoded and non-decoded CGs based on the LFNST syntax element, video decoder 300 may determine that the number of decoded CGs includes any CGs that appear before a CG that fully falls within the normalization pattern in the CG scan order. Thus, when determining the transform coefficients of the current block, video decoder 300 may determine that the bitstream does not include a syntax element indicating a value of a transform coefficient for any CGs other than the number of decoded CGs. Additionally, in some examples, it may not be necessary to signal the CBF for CGs other than the number of decoded CGs. Avoiding the need to signal the CBF for CGs other than the number of decoded CGs can improve decoding efficiency.
[0205] In addition, in some examples, the position of the last significant coefficient of the current block is canonically restricted to positions in the current block that are allowed to be zeroed by the zeroing pattern. In other words, the video decoder 300 can determine that the position of the last significant coefficient of the current block must not be in the region of the current block that is zeroed by the zeroing pattern. In some examples, the video decoder 300 can thus infer that any transform coefficients of the current block that are not canonically zeroed can be significant coefficients. Thus, it may not be necessary to signal a syntax element for indicating the position of the last significant transform coefficient of the current block. Avoiding the need to signal a syntax element for indicating the position of the last significant transform coefficient of the current block can improve the decoding efficiency.
[0206] As part of determining the transform coefficients of the current block, the video decoder 300 (e.g., the inverse LFNST unit 309) can apply inverse LFNST to determine the values of one or more transform coefficients in the LFNST region of the current block (454). Additionally, as part of determining the transform coefficients, the video decoder 300 (e.g., the inverse LFNST unit 309) can determine that the transform coefficients of the current block in the region of the current block defined by the zeroing pattern are equal to 0 (456).
[0207] In addition, in Figure 13 the example of, the video decoder 300 (e.g., the inverse transform unit 308) can apply an inverse transform to the transform coefficients of the current block to determine the residual data for the current block (458). For example, the video decoder 300 can apply an inverse DCT, an inverse DST, or other types of inverse transforms.
[0208] The video decoder 300 (e.g., the reconstruction unit 310 of the video decoder 300) can reconstruct the current block based on the residual data for the current block (460). For example, the video decoder 300 can add the samples of the residual data to the corresponding samples of the prediction block for the current block to reconstruct the current block.
[0209] Figure 14 is a flowchart showing an example method for encoding video data according to one or more techniques of the present disclosure. In Figure 14 the example of, the video encoder 200 can determine that the current block of video data is split into a plurality of sub-blocks (500). For example, the video encoder 200 can determine that the current block is split into a plurality of sub-blocks based on the size of the current block being greater than a threshold, based on the shape of the current block, or based on one or more other characteristics of the current block or the content of the current block. The plurality of sub-blocks includes the current sub-block of the current block.
[0210] In addition, in Figure 14In the example, a video encoder 200 (e.g., the residual generation unit 204 of the video encoder 200) may generate residual data for a current block of video data, and the residual data for the current block includes residual data for a current sub-block (502). For example, the video encoder 200 may generate the residual by subtracting samples of a predicted block for the current block from corresponding samples of the current block.
[0211] The video encoder 200 (e.g., the transform processing unit 206 of the video encoder 200) may apply a transform to the residual data to generate first transform coefficients for the current sub-block (504). For example, the video encoder 200 may apply a DCT, DST, or other type of transform to a portion of the residual data corresponding to the current sub-block to generate the first transform coefficients for the current sub-block.
[0212] In addition, in Figure 14 the example, the video encoder 200 (e.g., the LFNST unit 207 of the video encoder 200) may determine whether to signal an LFNST syntax element for the current sub-block in a bitstream based on a threshold-based criterion (or a count-based criterion) (506). The bitstream includes an encoded representation of the video data, and the LFNST syntax element indicates whether LFNST is applied to the current sub-block.
[0213] As described in various examples provided elsewhere in this disclosure, the video encoder 200 may use various threshold-based criteria and / or count-based criteria to determine whether to signal the LFNST syntax element in the bitstream. For example, in some examples, the threshold is fixed to a constant value, and the video encoder 200 signals the LFNST syntax element for at least one of a luminance component or a chrominance component based on whether a last transform coefficient position of the current block is less than the threshold. In some such examples, the threshold is based on a last position of valid transform coefficients of the current block (i.e., the last valid transform coefficient position). Alternatively, in some such examples, the video encoder 200 may determine the threshold based on a relative position of the current TU of the current block with respect to a first-occurring TU of the current block. If a CU includes multiple TUs (such as in the case of a 128x128 CU), the CU is split into 4 TUs of size 64x64. Then, the video encoder 200 may signal the LFNST syntax element for the first TU in the scan order and not for other TUs in the same CU. Other TUs that are not the first TU in the scan order may reuse the LFNST syntax element from the first TU. This may reduce signaling overhead.
[0214] In some examples, the video encoder 200 may determine a threshold based on whether the current block is dual-tree decoded or single-tree decoded. For example, when the current block is dual-tree decoded, the video encoder 200 may signal the LFNST syntax element separately for luminance and chrominance. When the current block is single-tree decoded, the video encoder 200 may signal the LFNST syntax element for luminance, but need not signal the LFNST syntax element for chrominance.
[0215] Additionally, in some examples, the video encoder 200 may determine a threshold based on the DC component of the transform unit of the current block or the value of the DC component of the current block. For example, if the DC component is zero, signaling the LFNST index is useless. In some examples, the video encoder 200 may determine a threshold based on one or more of the following: the magnitude, standard deviation, or statistics of the TUs of the current block or the transform coefficients of the current block.
[0216] Additionally, in Figure 14 the example of, based on the determination of signaling the LFNST syntax element in the bitstream, the video encoder 200 may signal the LFNST syntax element (508) in the bitstream at the sub-block level. For example, in some examples, the video encoder 200 may include the lfnst_idx syntax element in the transform_unit syntax structure. In such an example, the LFNST syntax element may be applied only to a single TU of the current block. In other examples, the video encoder 200 may signal another type of syntax element that indicates whether LFNST is applied and, if so, which LFNST kernel is applied. Signaling the lfnst_idx syntax element at the sub-block level may enable LFNST to be applied or not applied to different sub-blocks of the same CU and / or enable different LFNST kernels to be applied to different sub-blocks of the same CU.
[0217] The video encoder 200 (e.g., the LFNST unit 207 of the video encoder 200) may apply LFNST to the first transform coefficients for the current sub-block to determine the values of one or more second transform coefficients in the LFNST region of the current sub-block (510). For example, the video encoder 200 may multiply the first transform coefficients (or perform one or more other mathematical operations) by a matrix or vector of filter coefficients associated with the LFNST kernel.
[0218] In some examples, Figure 14 and Figure 12Operations. For example, before signaling the LFNST syntax element in (414), the video encoder 200 may determine, based on a threshold-based criterion or a count-based criterion, the LFNST syntax element for a sub-block of the current block to be signaled in the bitstream including the encoded representation of the video data. In some such examples, as part of determining the LFNST syntax element to be signaled in the bitstream, the video encoder 200 may determine the threshold based on at least one of the following: the position of the last valid transform coefficient of the current block, the relative position of the current sub-block with respect to the first-occurring sub-block of the current block, whether the current block is dual-tree decoded or single-tree decoded, or the value of the DC component of the transform unit of the current block or the DC component of the current block. In such examples, the video encoder 200 may determine to signal the LFNST syntax element for the sub-block in the bitstream based on the threshold. In some examples, Figure 12 and Figure 14 the LFNST syntax elements may apply to a single TU of the current block or multiple TUs of the current block.
[0219] Figure 15 is a flow chart showing an example method for decoding video data according to one or more techniques of the present disclosure. In Figure 15 the example, the video decoder 300 may determine that the current block of the video data is split into multiple sub-blocks (550). For example, the video decoder 300 may determine that the current block is split into multiple sub-blocks, such as TUs, based on the size of the current block, the shape of the current block, the syntax element signaled indicating that the current block is split into sub-blocks, and / or other factors. In Figure 15 the example, the multiple sub-blocks include the current sub-block of the current block.
[0220] Additionally, a video decoder 300 (e.g., the entropy decoding unit 302 of the video decoder 300) may determine to signal in a bitstream an LFNST syntax element (552) for a sub-block of a current block based on a threshold-based criterion (or a count-based criterion). As described in various examples provided elsewhere in this disclosure, the video decoder 300 may use various threshold-based criteria and / or count-based criteria to determine whether to signal the LFNST syntax element in the bitstream. For example, in some examples, the threshold is fixed to a constant value, and the video decoder 300 parses the LFNST syntax element from the bitstream for at least one of a luminance component or a chrominance component based on whether a last transform coefficient position of the current block is less than the threshold. In some examples, the threshold is based on a last valid transform coefficient position of the current block. Alternatively, in some such examples, the video decoder 300 may determine the threshold based on a relative position of a current TU of the current block with respect to a first-occurring TU of the current block. In some examples, the video decoder 300 may determine the threshold based on whether the current block is dual-tree decoded or single-tree decoded. Additionally, in some examples, the video decoder 300 may determine the threshold based on a DC component of a transform unit of the current block or a value of a DC component of the current block. In some examples, the video decoder 300 may determine the threshold based on one or more of the following: an amplitude, a standard deviation, or a statistic of a TU of the current block or transform coefficients of the current block.
[0221] In Figure 15 the example, based on a determination regarding signaling of the LFNST syntax element in the bitstream, the video decoder 300 (e.g., the entropy decoding unit 302 of the video decoder 300) may obtain the LFNST syntax element (554) from the bitstream. For example, the video decoder 300 may parse the LFNST syntax element from the bitstream. The LFNST syntax element (e.g., an LFNST index or an LFNST flag) may indicate whether LFNST is to be applied to the current sub-block, and if so, which LFNST (e.g., which LFNST kernel) is to be applied to the current sub-block.
[0222] Based on the LFNST syntax element indicating that LFNST is to be applied to the current sub-block, the video decoder 300 (e.g., the LFNST unit 309) may apply an inverse of the LFNST to determine values of one or more transform coefficients in an LFNST region of a sub-block of the current block (556). For example, the video decoder 300 may multiply (or perform one or more other types of mathematical operations) a signaled transform coefficient in the LFNST region of the sub-block by values specified in a matrix of the LFNST to determine transform coefficients in the LFNST region of the sub-block of the current block.
[0223] Additionally, in Figure 15In the example of, video decoder 300 may apply an inverse transform to the transform coefficients of sub-blocks of a current block to determine residual data (558) for the sub-blocks of the current block. For example, video decoder 300 may apply an inverse DCT, an inverse DST, or other types of inverse transforms to determine the residual data for the sub-blocks.
[0224] Video decoder 300 may reconstruct the current block (560) based on the residual data for the sub-blocks of the current block. For example, video decoder 300 may add samples of the residual data for the current block (including samples of the residual data for the current sub-block of the current block) to corresponding samples of the prediction block for the current block in order to reconstruct the current block.
[0225] In some examples, video decoder 300 may perform the operations of Figure 13 in combination with Figure 15 the operations of. Thus, in some examples, before determining the zeroing mode in (450), video decoder 300 may determine to signal the LFNST syntax element in the bitstream based on a threshold-based or count-based criterion. In some such examples, as part of determining to signal the LFNST syntax element in the bitstream, video decoder 300 may determine the threshold based on at least one of the following: the position of the last significant transform coefficient of the current block, the relative position of the current sub-block with respect to the first-occurring sub-block of the current block, whether the current block is dual-tree decoded or single-tree decoded, or the value of the DC component of the transform unit of the current block or the DC component of the current block. Video decoder 300 may determine to signal the LFNST syntax element for the sub-blocks in the bitstream based on the threshold. In some examples, Figure 13 and Figure 15 the LFNST syntax elements may apply to a single TU of the current block or multiple TUs of the current block.
[0226] The following is a non-exclusive list of examples of one or more techniques in accordance with the present disclosure.
[0227] Example 1. A method for decoding video data, the method comprising: determining a normalization-defined zero coefficient cancellation pattern based on a block size of a current block and a Low Frequency Non-Separable Transform (LFNST) syntax element; determining coefficients of the current block, wherein the coefficients of the current block include coefficients in an LFNST region of the current block and coefficients outside the LFNST region of the current block, and determining the coefficients of the current block includes: applying an inverse LFNST to determine values of one or more coefficients in the LFNST region of the current block; and determining that coefficients of the current block in a region of the current block defined by the cancellation pattern are equal to 0; applying an inverse transform to the coefficients of the current block to determine residual data for the current block; and reconstructing the current block based on the residual data for the current block.
[0228] Example 2. A method for encoding video data, the method comprising: generating residual data for a current block of the video data; applying a transform to the residual data to generate first coefficients for the current block; determining a Low Frequency Non-Separable Transform (LFNST) syntax element; determining a predefined cancellation pattern of normalization-defined zero coefficients based on the block size of the current block and the LFNST syntax element; and determining second coefficients of the current block, wherein the current block includes an LFNST region, and determining the second coefficients of the current block includes: applying LFNST to determine values of one or more second coefficients in the LFNST region of the current block; and determining that second coefficients of the current block in a region of the block defined by the predefined cancellation pattern are equal to 0.
[0229] Example 3. The method according to any one of Examples 1 or 2, wherein the LFNST syntax element is signaled at a Transform Unit (TU) level.
[0230] Example 4. The method according to any one of Examples 1-3, further comprising: determining a number of decoded coefficient groups and non-decoded coefficient groups (CGs) based on the LFNST syntax element.
[0231] Example 5. The method according to any one of Examples 1-4, wherein a last coefficient position is canonically restricted to a position in the current block that is allowed to be non-zero by the predefined cancellation pattern.
[0232] Example 6. The method according to any one of Examples 1-5, wherein a last coefficient position is canonically restricted to a predefined position in the current block, wherein coefficients of the block outside the predefined position are defined to be zero by the predefined cancellation pattern.
[0233] Example 7. The method according to any one of Examples 1-6, wherein the current block is a sub-block of a coding unit (CU), and the LFNST syntax element is signaled for a subset of the sub-blocks of the CU.
[0234] Example 8. A method for decoding video data, the method comprising: determining that a current block of the video data is split into a plurality of sub-blocks; determining, based on a threshold or a count-based criterion, a low-frequency non-separable transform (LFNST) syntax element for the current block signaled in a bitstream comprising an encoded representation of the video data; obtaining the LFNST syntax element from the bitstream based on the LFNST syntax element being signaled in the bitstream; based on the LFNST syntax element indicating that LFNST is to be applied to the current block, performing the following operations: applying an inverse LFNST to determine values of one or more coefficients in the LFNST region of the current block; and determining that coefficients of the current block in a region of the current block defined by a predefined zeroing pattern are equal to 0; applying an inverse transform to the coefficients of the current block to determine residual data for the current block; and reconstructing the current block based on the residual data for the current block.
[0235] Example 9. A method for encoding video data, the method comprising: determining that a current block of the video data is split into a plurality of sub-blocks; generating residual data for the current block of the video data; applying a transform to the residual data to generate first coefficients for the current block; determining, based on a threshold or a count-based criterion, a low-frequency non-separable transform (LFNST) syntax element for the current block to be signaled in a bitstream comprising an encoded representation of the video data, the LFNST syntax element indicating whether LFNST is to be applied to the current block; signaling the LFNST syntax element in the bitstream based on the determination that the LFNST syntax element is to be signaled in the bitstream; based on the LFNST syntax element indicating that LFNST is to be applied to the current block, performing the following operations: applying LFNST to determine values of one or more second coefficients in the LFNST region of the current block; and determining that second coefficients of the current block in a region of the block defined by a predefined zeroing pattern are equal to 0.
[0236] Example 10. The method according to any one of Examples 8 or 9, wherein the threshold is fixed to a constant value, and the LFNST is signaled for at least one of a luminance component or a chrominance component based on whether a last transform coefficient position of the current block is less than the threshold.
[0237] Example 11. The method according to any one of Examples 8 or 9, wherein the threshold is based on the last position of the transform coefficients of the current block.
[0238] Example 12. The method according to any one of Examples 8-11, wherein the threshold is determined based on the relative position of the current transform unit (TU) of the current block with respect to the first-occurring TU of the current block.
[0239] Example 13. The method according to any one of Examples 8-12, wherein the threshold is based on whether the current block is double-tree decoded or single-tree decoded.
[0240] Example 14. The method according to any one of Examples 8-13, wherein the threshold is based on the DC component of the transform unit of the current block or the value of the DC component of the current block.
[0241] Example 15. The method according to any one of Examples 8-14, wherein the threshold is based on one or more of the following: the magnitude, standard deviation, or statistics of the TUs of the current block or the transform coefficients of the current block.
[0242] Example 16. The method according to any one of Examples 8-15, wherein the LFNST syntax element applies to a single TU of the current block.
[0243] Example 17. A device for decoding video data, the device including one or more units for performing the method according to any one of Examples 1-16.
[0244] Example 18. The device according to Example 17, wherein the one or more units include one or more processors implemented in a circuit.
[0245] Example 19. The device according to any one of Examples 17 and 18, further including: a memory for storing the video data.
[0246] Example 20. The device according to any one of Examples 17-19, further including: a display configured to display the decoded video data.
[0247] Example 21. The device according to any one of Examples 17-20, wherein the device includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0248] Example 22. The device according to any one of Examples 17-21, wherein the device includes a video decoder.
[0249] Example 23. The apparatus according to any one of Examples 17-22, wherein the apparatus includes a video encoder.
[0250] Example 24. A computer-readable storage medium having instructions stored thereon that, when executed, cause one or more processors to perform the method according to any one of Examples 1-16.
[0251] It should be appreciated that, depending on the example, certain actions or events of any of the techniques described herein may be performed in a different order, may be added, combined, or entirely omitted (e.g., not all described actions or events are necessary for implementing the techniques). Additionally, in certain examples, the actions or events may be performed, for instance, concurrently rather than sequentially by multithreading, interrupt processing, or multiple processors.
[0252] In one or more examples, the described functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functionality may be stored on or transmitted via a computer-readable medium as one or more instructions or code and executed by a hardware-based processing unit. The computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium such as a data storage medium or a communication medium including any medium that facilitates transfer of a computer program from one place to another, for example, according to a communication protocol. In this manner, the computer-readable medium generally may correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium such as a signal or carrier wave. The data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to obtain instructions, code, and / or data structures for implementing the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0253] By way of example and not limitation, such a computer-readable storage medium can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and that can be accessed by a computer. Additionally, any connection is properly termed a computer-readable medium. For example, if instructions are transmitted using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies (such as infrared, radio, and microwave) are included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead are directed to non-transitory, tangible storage media. As used herein, disk and optical disks include compact disk (CD), laser disk, optical disk, digital versatile disk (DVD), floppy disk, and Blu-ray disk, where disks typically reproduce data magnetically, while optical disks utilize lasers to optically reproduce data. Combinations of the above should also be included within the scope of computer-readable media.
[0254] The instructions can be executed by one or more processors, such as one or more digital signal processors (DSPs), general microprocessors, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Thus, as used herein, the terms “processor” and “processing circuitry” can refer to any one of the foregoing structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functions described herein can be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Further, the techniques can be implemented entirely in one or more circuits or logic elements.
[0255] The techniques of the present disclosure can be implemented in a variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC) or a group of ICs (e.g., a chipset). Various components, modules, or units are described in the present disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but need not necessarily be implemented by different hardware units. Rather, 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, in conjunction with appropriate software and / or firmware.
[0256] 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 comprises: determining a normalization-defined zeroing pattern based on the block size of a current block and a Low-Frequency Non-Separable Transform (LFNST) syntax element, wherein the LFNST syntax element is signaled at a Transform Unit (TU) level, and wherein, in the absence of a syntax element signaled to indicate the position of the last significant coefficient of the current block, the position of the last significant coefficient of the current block is canonically restricted to positions allowed to be non-zero by the zeroing pattern in the current block; determining the transform coefficients of the current block, wherein the transform coefficients of the current block include transform coefficients in the LFNST region of the current block and transform coefficients outside the LFNST region of the current block, and determining the transform coefficients of the current block comprises: applying an inverse LFNST to determine values of one or more transform coefficients in the LFNST region of the current block; and determining that the transform coefficients of the current block in the region of the current block defined by the zeroing pattern are equal to 0; applying an inverse transform to the transform coefficients of the current block to determine residual data for the current block; and reconstructing the current block based on the residual data for the current block.
2. The method according to claim 1, further comprises: determining the number of decoded coefficient groups and non-decoded coefficient groups (CGs) based on the LFNST syntax element.
3. The method according to claim 1, wherein, the current block is a sub-block of a Coding Unit (CU).
4. The method according to claim 1, further comprises: determining that the current block is split into a plurality of sub-blocks, the plurality of sub-blocks including a current sub-block of the current block, wherein the LFNST syntax element is for the sub-blocks of the current block, and the LFNST region of the current block is the LFNST region of the sub-blocks; determining, based on a threshold-based criterion, that the LFNST syntax element for the sub-blocks of the current block is signaled in a bitstream including an encoded representation of the video data; and obtaining the LFNST syntax from the bitstream based on the determination that the LFNST syntax element is signaled in the bitstream.
5. The method according to claim 4, wherein, the threshold is fixed to a constant value, and determining that the LFNST syntax element is signaled in the bitstream comprises: determining that the LFNST syntax element is signaled in the bitstream for at least one of a luminance component or a chrominance component according to whether the position of the last transform coefficient of the current block is less than the threshold.
6. The method according to claim 4, wherein, determining that the LFNST syntax element is signaled in the bitstream comprises: determining a threshold based on at least one of: the relative position of the current sub-block with respect to the first-occurring sub-block of the current block, whether the current block is dual-tree decoded or single-tree decoded, or the DC component of the transform unit of the current block or the value of the DC component of the current block; and determining that the LFNST syntax element for the sub-block is signaled in the bitstream based on the threshold.
7. The method according to claim 1, wherein, the LFNST syntax element applies only to a single TU among multiple TUs of the current block and does not apply to other TUs among the multiple TUs of the current block.
8. A method for encoding video data, the method comprising: generating residual data for a current block of the video data; applying a transform to the residual data to generate first transform coefficients for the current block; determining a normalization-defined zeroing pattern for the zeroing transform coefficients, wherein the last significant coefficient position of the current block is normatively restricted to positions allowed to be non-zero by the zeroing pattern in the current block; determining second transform coefficients of the current block, wherein the current block includes a low-frequency non-separable transform (LFNST) region, and determining the second transform coefficients of the current block includes: applying LFNST to determine values of one or more second transform coefficients in the LFNST region of the current block; and determining that the second transform coefficients of the current block in the region of the block defined by the zeroing pattern are equal to 0; determining an LFNST syntax element, wherein the LFNST syntax element specifies the LFNST in combination with the mode of the current block and the size of the current block; and signaling the LFNST syntax element at the transform unit (TU) level without signaling a syntax element for indicating the last significant coefficient position of the current block.
9. The method according to claim 8, further comprising: determining the number of decoded coefficient groups and non-decoded coefficient groups (CG) based on the LFNST syntax element.
10. The method according to claim 8, wherein, the current block is a sub-block of a coding unit (CU), and the LFNST syntax element is signaled for a subset of the sub-blocks of the CU.
11. The method according to claim 8, wherein: the method further comprises: determining that the current block is split into multiple sub-blocks, the multiple sub-blocks including the current sub-block of the current block, wherein the LFNST syntax element is for the sub-blocks of the current block, and the LFNST region of the current block is the LFNST region of the sub-blocks; determining, based on a threshold-based criterion, that the LFNST syntax element for the sub-blocks of the current block will be signaled in a bitstream including an encoded representation of the video data; and signaling the LFNST syntax element at the TU level includes: signaling the LFNST syntax element in the bitstream based on the determination that the LFNST syntax element will be signaled in the bitstream.
12. The method according to claim 11, wherein, The threshold is fixed to a constant value, and determining to signal the LFNST syntax element in the bitstream includes: determining to signal the LFNST syntax element in the bitstream for at least one of the luminance component or the chrominance component according to whether the position of the last transform coefficient of the current block is less than the threshold.
13. The method according to claim 11, wherein, determining to signal the LFNST syntax element in the bitstream includes: determining a threshold based on at least one of the following: the relative position of the current sub-block with respect to the first-occurring sub-block of the current block, whether the current block is double-tree decoded or single-tree decoded, or the value of the DC component of the transform unit of the current block or the DC component of the current block; and determining to signal the LFNST syntax element for the sub-block in the bitstream based on the threshold.
14. The method according to claim 8, wherein, the LFNST syntax element is only applicable to a single TU among multiple TUs of the current block and not applicable to other TUs of the multiple TUs of the current block.
15. A device for decoding video data, the device comprising: a memory for storing the video data; and one or more processors implemented in circuitry, the one or more processors being configured to: determine a normalization-defined zeroing pattern for zero coefficients based on the block size of the current block and a low-frequency non-separable transform (LFNST) syntax element, wherein the LFNST syntax element is signaled at the transform unit (TU) level, and wherein in the absence of a syntax element signaling the position of the last valid coefficient of the current block, the position of the last valid coefficient of the current block is normatively restricted to positions allowed to be non-zero by the zeroing pattern in the current block; determine the transform coefficients of the current block, wherein the transform coefficients of the current block include transform coefficients in the LFNST region of the current block and transform coefficients outside the LFNST region of the current block, and the one or more processors are configured such that as part of determining the transform coefficients of the current block, the one or more processors perform the following operations: apply an inverse LFNST to determine the values of one or more transform coefficients in the LFNST region of the current block; and determine that the transform coefficients of the current block in the region of the current block defined by the zeroing pattern are equal to 0; apply an inverse transform to the transform coefficients of the current block to determine residual data for the current block; and reconstruct the current block based on the residual data for the current block.
16. The device according to claim 15, wherein, the one or more processors are further configured to: determine the number of decoded coefficient groups and non-decoded coefficient groups (CGs) based on the LFNST syntax element.
17. The device according to claim 15, wherein, the current block is a sub-block of a coding unit (CU).
18. The apparatus according to claim 15, wherein, the one or more processors are further configured to: determine that the current block is split into a plurality of sub - blocks, the plurality of sub - blocks including a current sub - block of the current block, wherein the LFNST syntax element is for the sub - blocks of the current block, and the LFNST region of the current block is the LFNST region of the sub - blocks; determine, based on a threshold - based criterion, that the LFNST syntax element for the sub - blocks of the current block is signaled in a bitstream including an encoded representation of the video data; and obtain the LFNST syntax from the bitstream based on the determination that the LFNST syntax element is signaled in the bitstream.
19. The apparatus according to claim 18, wherein, the threshold is fixed to a constant value, and the one or more processors are configured such that, as part of determining that the LFNST syntax element is signaled in the bitstream, the one or more processors determine whether the LFNST syntax element is signaled in the bitstream for at least one of a luminance component or a chrominance component based on whether a last transform coefficient position of the current block is less than the threshold.
20. The apparatus according to claim 18, wherein, the one or more processors are configured such that, as part of determining that the LFNST syntax element is signaled in the bitstream, the one or more processors perform the following operations: determine a threshold based on at least one of the following: a relative position of the current sub - block with respect to a first - occurring sub - block of the current block, whether the current block is double - tree decoded or single - tree decoded, or a DC component of a transform unit of the current block or a value of a DC component of the current block; and determine that the LFNST syntax element for the sub - blocks is signaled in the bitstream based on the threshold.
21. The apparatus according to claim 18, wherein, the LFNST syntax element applies only to a single TU among a plurality of TUs of the current block and does not apply to other TUs among the plurality of TUs of the current block.
22. The apparatus according to claim 15, further comprising: a display configured to display decoded video data.
23. The apparatus according to claim 15, wherein, the apparatus includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set - top box.
24. An apparatus for encoding video data, the apparatus comprising: a memory for storing the video data; and one or more processors implemented in a circuit, the one or more processors being configured to: generate residual data for a current block of the video data; apply a transform to the residual data to generate first transform coefficients for the current block; determine a normalization - defined zeroing pattern for zeroing transform coefficients, wherein a last valid coefficient position of the current block is normatively restricted to positions allowed to be non - zero by the zeroing pattern in the current block; Determine a second transform coefficient of the current block, wherein the current block includes a low-frequency non-separable transform (LFNST) region, and the one or more processors are configured such that as part of determining the second transform coefficient of the current block, the one or more processors perform the following operations: Apply LFNST to determine values of one or more second transform coefficients in the LFNST region of the current block; and Determine that the second transform coefficient of the current block in the region of the block defined by the zeroing pattern is equal to 0; Determine an LFNST syntax element, wherein the LFNST syntax element specifies the LFNST in combination with the mode of the current block and the size of the current block; and Signal the LFNST syntax element at the transform unit (TU) level without signaling a syntax element for indicating the position of the last significant coefficient of the current block.
25. The apparatus according to claim 24, wherein, the one or more processors are further configured to: determine the number of coded coefficient groups and non-coded coefficient groups (CGs) based on the LFNST syntax element.
26. The apparatus according to claim 24, wherein, the current block is a sub-block of a coding unit (CU), and the LFNST syntax element is signaled for a subset of the sub-blocks of the CU.
27. The apparatus according to claim 24, wherein: the one or more processors are further configured to: Determine that the current block is split into a plurality of sub-blocks, the plurality of sub-blocks including a current sub-block of the current block, wherein the LFNST syntax element is for the sub-blocks of the current block, and the LFNST region of the current block is the LFNST region of the sub-blocks; Determine, based on a threshold-based criterion, whether to signal the LFNST syntax element for the sub-blocks of the current block in a bitstream including an encoded representation of the video data, and the one or more processors are configured such that as part of signaling the LFNST syntax element at the TU level, the one or more processors perform the following operations: signal the LFNST syntax element in the bitstream based on the determination of whether to signal the LFNST syntax element in the bitstream.
28. The apparatus according to claim 27, wherein, the threshold is fixed to a constant value, and the one or more processors are configured such that as part of determining whether to signal the LFNST syntax element in the bitstream, the one or more processors are configured to: determine whether to signal the LFNST syntax element in the bitstream for at least one of a luminance component or a chrominance component based on whether the position of the last transform coefficient of the current block is less than the threshold.
29. The apparatus according to claim 27, wherein, The one or more processors are configured such that as part of determining to signal the LFNST syntax element in the bitstream, the one or more processors perform the following: Determine a threshold based on at least one of the following: The relative position of the current sub-block with respect to the first-occurring sub-block of the current block, Whether the current block is double-tree decoded or single-tree decoded, or The value of the DC component of the transform unit of the current block or the DC component of the current block; And Based on the threshold, determine to signal the LFNST syntax element for the sub-block in the bitstream.
30. The apparatus according to claim 24, wherein, The LFNST syntax element applies only to a single TU among the multiple TUs of the current block and does not apply to other TUs among the multiple TUs of the current block.
31. The apparatus according to claim 24, wherein, The apparatus includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
32. An apparatus for decoding video data, the apparatus comprises: A unit for determining a normalization-defined zeroing pattern for zero coefficients based on the block size of a current block and a Low-Frequency Non-Separable Transform (LFNST) syntax element, wherein the LFNST syntax element is signaled at the transform unit (TU) level, and wherein in the absence of a syntax element signaled to indicate the last valid coefficient position of the current block, the last valid coefficient position of the current block is normatively restricted to positions in the current block that are allowed to be non-zero by the zeroing pattern; A unit for determining the transform coefficients of the current block, wherein the transform coefficients of the current block include transform coefficients in the LFNST region of the current block and transform coefficients outside the LFNST region of the current block, and the unit for determining the transform coefficients of the current block comprises: A unit for applying an inverse LFNST to determine the values of one or more transform coefficients in the LFNST region of the current block; and A unit for determining that the transform coefficients of the current block in the region of the current block defined by the zeroing pattern are equal to 0; A unit for applying an inverse transform to the transform coefficients of the current block to determine residual data for the current block; and A unit for reconstructing the current block based on the residual data for the current block.
33. An apparatus for encoding video data, the apparatus comprises: A unit for generating residual data for a current block of the video data; A unit for applying a transform to the residual data to generate first transform coefficients for the current block; A unit for determining a zeroing pattern for normalization-defined zeroing transform coefficients, wherein the last valid coefficient position of the current block is normatively restricted to positions in the current block that are allowed to be non-zero by the zeroing pattern; A unit for determining a second transform coefficient of the current block, wherein the current block includes a low-frequency non-separable transform (LFNST) region, and the unit for determining the second transform coefficient of the current block includes: A unit for applying LFNST to determine values of one or more second transform coefficients in the LFNST region of the current block; and A unit for determining that the second transform coefficient of the current block in the region of the block defined by the zeroing pattern is equal to 0; A unit for determining an LFNST syntax element, wherein the LFNST syntax element specifies the LFNST in combination with the mode of the current block and the size of the current block; and A unit for signaling the LFNST syntax element at the transform unit (TU) level without signaling a syntax element for indicating the position of the last valid coefficient of the current block.
34. A computer-readable data storage medium having instructions stored thereon, the instructions when executed causing one or more processors to perform the following operations: Determine a zeroing pattern of canonically defined zero coefficients based on the block size of the current block and a low-frequency non-separable transform (LFNST) syntax element, wherein, the LFNST syntax element is signaled at the transform unit (TU) level, and wherein, in the absence of signaling a syntax element for indicating the position of the last valid coefficient of the current block, the position of the last valid coefficient of the current block is canonically limited to positions in the current block that are allowed to be non-zero by the zeroing pattern; Determine the transform coefficients of the current block, wherein the transform coefficients of the current block include transform coefficients in the LFNST region of the current block and transform coefficients outside the LFNST region of the current block, and the instructions causing the one or more processors to determine the transform coefficients of the current block cause the one or more processors to perform the following operations: Apply an inverse LFNST to determine values of one or more transform coefficients in the LFNST region of the current block; and Determine that the transform coefficients of the current block in the region of the current block defined by the zeroing pattern are equal to 0; Apply an inverse transform to the transform coefficients of the current block to determine residual data for the current block; and Reconstruct the current block based on the residual data for the current block.
35. A computer-readable data storage medium having instructions stored thereon, the instructions when executed causing one or more processors to perform the following operations: Generate residual data for a current block of video data; Apply a transform to the residual data to generate first transform coefficients for the current block; Determine a zeroing pattern of canonically defined zeroing transform coefficients, wherein, the position of the last valid coefficient of the current block is canonically limited to positions in the current block that are allowed to be non-zero by the zeroing pattern; Determine a second transform coefficient of the current block, wherein the current block includes a low-frequency non-separable transform (LFNST) region, and the instructions that cause the one or more processors to determine the second transform coefficient of the current block cause the one or more processors to perform the following operations: Apply LFNST to determine values of one or more second transform coefficients in the LFNST region of the current block; and Determine that the second transform coefficient of the current block in the region of the block defined by the zeroing pattern is equal to 0; Determine an LFNST syntax element, wherein the LFNST syntax element specifies the LFNST in combination with the mode of the current block and the size of the current block; and Signal the LFNST syntax element at the transform unit (TU) level without signaling a syntax element for indicating a last significant coefficient position of the current block.
Citation Information
Patent Citations
Enhanced multiple transforms for prediction residual
US10306229B2
Coding adaptive multiple transform information for video coding
US10986340B2
Low-frequency non-separable transform signaling based on zero-out patterns for video coding
US11032572B2
Non-separable secondary transform for video coding
US20170094313A1
Multi-pass non-separable transforms for video coding
US20170238013A1