Scaling matrix and signaling for video encoding and decoding

By determining whether to apply the scaling matrix to the LFNST codec block in video encoding and decoding, the problem of poor application effect of scaling matrix in the prior art is solved, and the encoding and decoding efficiency and quality are improved.

CN114375576BActive Publication Date: 2024-12-10QUALCOMM INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080064317.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-09-17
Filing Date
2020-09-18
Publication Date
2024-12-10
Estimated Expiration
2040-09-18

AI Technical Summary

Technical Problem

The application of existing scaling matrix in low-frequency inseparable transform (LFNST) coefficients may not produce the desired effect, resulting in reduced encoding and decoding efficiency and visual artifacts.

Method used

Improve codec efficiency by determining whether the scaling matrix can be applied to the LFNST codec block and avoiding the use of the scaling matrix when it is not suitable.

Benefits of technology

It effectively avoids the disadvantages of the scaling matrix, improves the encoding and decoding efficiency, reduces processing power and waiting time, and improves the decoding quality of video data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114375576B_ABST
    Figure CN114375576B_ABST
Patent Text Reader

Abstract

An example device for encoding and decoding video data includes a memory configured to store the video data and one or more processors implemented in a circuit and communicatively coupled to the memory. The one or more processors are configured to determine whether a scaling matrix can be applied to a low frequency non-separable transform (LFNST) codec block. The one or more processors are further configured to not apply the scaling matrix to the LFNST codec block based on the determination that the scaling matrix cannot be applied to the LFNST codec block. The one or more processors are further configured to encode and decode the video data without applying the scaling matrix to the LFNST codec block.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to U.S. Patent Application No. 17 / 024,551, filed on September 17, 2020, entitled “SCALING MATRICES AND SIGNALING FOR VIDEO CODING,” U.S. Provisional Patent Application No. 62 / 903,679, filed on September 20, 2019, entitled “SCALING MATRICES FOR VIDEO CODING,” and U.S. Provisional Patent Application No. 62 / 905,873, filed on September 25, 2019, entitled “SCALING MATRICES FOR VIDEO CODING.” Technical Field

[0003] The present disclosure relates to video encoding and video decoding. Background Art

[0004] Digital video capabilities can be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio telephones, so-called "smart phones", video teleconferencing devices, video streaming devices, etc. Digital video devices implement video codec technologies, such as those described in the standards defined by the following: MPEG-2; MPEG-4; ITU-T H.263; ITU-T H.264 / MPEG-4 Part 10; Advanced Video Codec (AVC); ITU-T H.265 / High Efficiency Video Codec (HEVC) and extensions of such standards. By implementing such video codec technologies, video devices can more efficiently send, receive, encode, decode and / or store digital video information.

[0005] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) may be partitioned into video blocks, which may also be referred to as codec tree units (CTUs), codec units (CUs), and / or codec nodes. Video blocks in an intra-frame codec (I) slice of a picture are encoded using spatial prediction relative to reference samples in neighboring blocks in the same picture. Video blocks in an inter-frame codec (P or B) slice of a picture may use spatial prediction relative to reference samples in neighboring blocks in the same picture, or temporal prediction relative to reference samples in other reference pictures. Pictures may be referred to as frames, and reference pictures may be referred to as reference frames. Summary of the invention

[0006] In general, the present disclosure describes techniques for determining scaling matrices and scaling matrix signaling for video coding. The application of existing scaling matrices to low frequency non-separable transform (LFNST) coefficients may not produce the desired effect. The techniques of the present disclosure can avoid the disadvantages of using existing scaling matrices and can improve coding efficiency by selectively not applying scaling matrices when it is not necessary to apply scaling matrices.

[0007] In one example, a method includes determining whether a scaling matrix can be applied to a low frequency non-separable transform (LFNST) codec block of video data; based on the determination that the scaling matrix cannot be applied to the LFNST codec block, not applying the scaling matrix to the LFNST codec block; and encoding and decoding the video data without applying the scaling matrix to the LFNST codec block.

[0008] In another example, a device includes a memory configured to store video data; and one or more processors implemented in a circuit and communicatively coupled to the memory, the one or more processors configured to: determine whether a scaling matrix can be applied to a low frequency non-separable transform (LFNST) codec block of the video data; based on a determination that the scaling matrix cannot be applied to the LFNST codec block, not apply the scaling matrix to the LFNST codec block; and encode and decode the video data without applying the scaling matrix to the LFNST codec block.

[0009] In another example, an apparatus includes: a component for determining whether a scaling matrix can be applied to a low-frequency non-separable transform (LFNST) codec block of video data; a component for not applying the scaling matrix to the LFNST codec block based on a determination that the scaling matrix cannot be applied to the LFNST codec block; and a component for encoding and decoding the video data without applying the scaling matrix to the LFNST codec block.

[0010] In another example, a non-transitory computer-readable storage medium has instructions stored thereon, which, when executed by one or more processors, cause the one or more processors to: determine whether a scaling matrix can be applied to a low-frequency non-separable transform (LFNST) codec block of video data; based on a determination that the scaling matrix cannot be applied to the LFNST codec block, not apply the scaling matrix to the LFNST codec block; and encode and decode the video data without applying the scaling matrix to the LFNST codec block.

[0011] The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 is a block diagram illustrating an example video encoding and decoding system that may perform the techniques of this disclosure.

[0013] Figure 2A and Figure 2B is a conceptual diagram illustrating an example quadtree binary tree (QTBT) structure and a corresponding codec tree unit (CTU).

[0014] Figure 3 is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure.

[0015] Figure 4 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure.

[0016] Figure 5 is a conceptual diagram illustrating a low frequency non-separable transform (LFNST) in an encoder and a decoder.

[0017] Figure 6 is a conceptual diagram illustrating an inverse transform process using LFNST.

[0018] Figure 7 is a conceptual diagram illustrating a 4×4 inverse LFNST for reconstructing 16 intermediate coefficients from a list of 16 input coefficients.

[0019] Figure 8 is a conceptual diagram illustrating an 8×8 inverse LFNST for reconstructing 48 intermediate coefficients from a list of 16 input coefficients.

[0020] Fig. 9 is a conceptual diagram illustrating LFNST and scaling matrices in an encoder and a decoder.

[0021] Fig.10 is a flow chart illustrating a scaling matrix signaling technique according to the present disclosure.

[0022] Fig.11 is a flow chart illustrating a method for encoding video data according to the techniques of this disclosure.

[0023] Fig.12 is a flow chart illustrating a method for decoding video data according to the techniques of this disclosure. DETAILED DESCRIPTION

[0024] When existing scaling matrices of certain draft standards are applied to LFNST coefficient matrices, the application of the scaling matrices may not have the desired effect. For example, when the video decoder 300 applies a scaling matrix associated with an M×N block to a 4×4 region of a transform block, the relative differences in the coefficients may not result in the desired behavior. For example, if the block is an 8×8 block, the upper left 4×4 region of the block may correspond to low-frequency coefficients. The scaling matrix may cause the low-frequency coefficients to not be quantized as much as the high-frequency coefficients, resulting in a relatively flat profile of the scaling coefficients in the 4×4 region. When the block is encoded and decoded with LFNST, the scaling matrix may not result in any relative scaling of the coefficients due to the flat nature of the coefficients in the 4×4 region.

[0025] When the transform block is 32×32, the scaling matrix is ​​specified on an 8×8 grid and the scaling matrix is ​​upsampled using replication to obtain a 32×32 scaling matrix. Therefore, in effect, the upper left 4×4 region is filled with a value that corresponds to the upper left coefficient of the 8×8 grid. When such a scaling matrix is ​​applied to a 32×32 block with LFNST applied, the LFNST coefficients (e.g., limited to the upper left 4×4 region) are scaled by a constant value and there is no relative scaling of the coefficients. This effectively results in a "flat" scaling matrix for the primary transform coefficients, which is the opposite of the desired behavior of the scaling matrix.

[0026] When a video codec applies LFNST, the number of LFNST coefficients present in a transform block may be only 8 or 16. In a fixed quantization parameter codec configuration, this may result in a significant reduction in the bits used to encode and decode the block. This may produce visual artifacts due to the large number of zeroing of coefficients and the relatively small precision of the non-zero primary transform coefficients.

[0027] Furthermore, when LFNST is enabled, it may be difficult for a video encoder to apply rate control for LFNST codec blocks using a scaling matrix. When rate control is enabled, it may be necessary to disable or limit the application of LFNST so that a more predictable rate control behavior can be expected.

[0028] According to the technology of the present disclosure, a video encoder may determine a scaling matrix and / or a signal syntax element related to the scaling matrix to avoid the disadvantages set forth above. For example, as further discussed below, a video encoder may determine that it is undesirable to apply a scaling matrix to the LFNST transform coefficients of a LFNST transform codec block. The video encoder may determine one or more syntax elements indicating whether the scaling matrix can be applied to the LFNST transform coefficients, and may signal the syntax element in the bitstream. The video decoder may determine the syntax element indicating whether the scaling matrix can be applied to the LFNST transform coefficients by parsing the syntax element, and based on the syntax element indicating that the scaling matrix cannot be applied to the LFNST coefficients, the scaling matrix is ​​not applied to the LFNST coefficients. The video decoder may decode the video data without applying the scaling matrix to the LFNST coefficients of the LFNST codec block. In this way, the video codec may avoid the disadvantages mentioned above, and may reduce processing power and improve latency by not applying the scaling matrix when it is desired not to apply the scaling matrix or conversely when it is undesirable to apply the scaling matrix.

[0029] Figure 1 1 is a block diagram illustrating an example video encoding and decoding system 100 that can perform the techniques of the present disclosure. The techniques of the present disclosure generally relate to encoding and decoding (encoding and / or decoding) video data. Generally, video data includes any data used to process video. Therefore, video data may include original unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling notification data.

[0030] like Figure 1 As shown, in this example, system 100 includes a source device 102 that provides encoded video data for decoding and display by a destination device 116. Specifically, source device 102 provides video data to destination device 116 via computer-readable medium 110. Source device 102 and destination device 116 may include any of a variety of devices, including desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, telephone handsets such as smart phones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some cases, source device 102 and destination device 116 may be equipped for wireless communication and, therefore, may be referred to as wireless communication devices.

[0031] exist Figure 1In the example of , source device 102 includes video source 104, memory 106, video encoder 200, and output interface 108. Destination device 116 includes input interface 122, video decoder 300, memory 120 and display device 118. According to the present disclosure, the video encoder 200 of source device 102 and the video decoder 300 of destination device 116 can be configured to apply a technique for determining a scaling matrix and scaling matrix signaling notification for video encoding and decoding. Therefore, source device 102 represents an example of a video encoding device, and destination device 116 represents an example of a video decoding device. In other examples, source device and destination device may include other components or arrangements. For example, source device 102 may receive video data from an external video source such as an external camera. Similarly, destination device 116 may interface with an external display device instead of including an integrated display device.

[0032] like Figure 1 The system 100 shown is just an example. In general, any digital video encoding and / or decoding device can perform the technology for determining the scaling matrix and scaling matrix signaling notification for video encoding and decoding. The source device 102 and the destination device 116 are only examples of such codec devices, wherein the source device 102 generates coded and decoded video data for transmission to the destination device 116. The present disclosure refers to a "codec" device as a device that performs the encoding and decoding (encoding and / or decoding) of data. Therefore, the video encoder 200 and the video decoder 300 represent examples of codec devices, specifically, examples of video encoders and video decoders, respectively. In some examples, the source device 102 and the destination device 116 can operate in a substantially symmetrical manner, so that each of the source device 102 and the destination device 116 includes a video encoding and decoding component. Therefore, the system 100 can support one-way or two-way video transmission between the source device 102 and the destination device 116, for example, for video streaming, video playback, video broadcasting or video telephony.

[0033] Typically, video source 104 represents the source of video data (i.e., original, uncoded video data) and provides a continuous series of pictures (also referred to as "frames") of video data to video encoder 200, which encodes the data for these pictures. Video source 104 of source device 102 may include a video capture device such as a video camera, a video archive containing previously captured original video, and / or a video feed interface for receiving video from a video content provider. As a further alternative, video source 104 may generate computer graphics-based data as source video, or a combination of live video, archived video, and computer-generated video. In each case, video encoder 200 encodes captured, pre-captured, or computer-generated video data. Video encoder 200 may rearrange pictures from a received order (sometimes referred to as "display order") into a codec order for encoding and decoding. Video encoder 200 may generate a bitstream comprising encoded video data. Source device 102 may then output the encoded video data onto computer-readable medium 110 via output interface 108 for receipt and / or retrieval by, for example, input interface 122 of destination device 116 .

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

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

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

[0037] In some examples, the source device 102 may output the encoded video data to a file server 114 or another intermediate storage device that may store the encoded video generated by the source device 102. The destination device 116 may access the stored video data from the file server 114 via streaming or downloading. The file server 114 may be any type of server device capable of storing the encoded video data and sending the encoded video data to the destination device 116. The file server 114 may represent a web server (e.g., for a website), a file transfer protocol (FTP) server, a content delivery network device, or a network attached storage (NAS) device. The destination device 116 may access the encoded video data from the file server 114 via any standard data connection including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a digital subscriber line (DSL), a 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 may be configured to operate according to a streaming transmission protocol, a download transmission protocol, or a combination thereof.

[0038] Output interface 108 and input interface 122 may represent wireless transmitters / receivers, modems, wired networking components (e.g., Ethernet cards), wireless communication components that operate according to any of the various IEEE 802.11 standards, or other physical components. In examples where output interface 108 and input interface 122 include wireless components, output interface 108 and input interface 122 may be configured to communicate data, such as encoded video data, according to a cellular communication standard such as 4G, 4G-LTE (Long Term Evolution), Advanced LTE, 5G, etc. In certain examples where output interface 108 includes a wireless transmitter, output interface 108 and input interface 122 may be configured to communicate data, such as encoded video data, according to other wireless standards such as IEEE 802.11 specifications, IEEE 802.15 specifications (e.g., ZigBee TM ),Bluetooth TM Standards, etc.) to transfer data, such as encoded video data. In some examples, source device 102 and / or destination device 116 may include respective system-on-chip (SoC) devices. For example, source device 102 may include a SoC device for performing functionality attributed to video encoder 200 and / or output interface 108, while destination device 116 may include a SoC device for performing functionality attributed to video decoder 300 and / or input interface 122.

[0039] The techniques disclosed herein can be applied to video encoding and decoding supporting any of a variety of multimedia applications such as: over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission such as Dynamic Adaptive Streaming over HTTP (DASH), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.

[0040] The input interface 122 of the destination device 116 receives an encoded video bitstream from the computer-readable medium 110 (e.g., a communication medium, a storage device 112, a file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200 and also used by the video decoder 300, such as syntax elements with values ​​describing characteristics and / or processing of video blocks or other coded and decoded units (e.g., slices, pictures, groups of pictures, sequences, etc.). The display device 118 displays decoded pictures of the decoded video data to a user. The display device 118 may represent any of a variety of display devices, such as a 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.

[0041] although Figure 12. Although not shown in the figure, in some examples, the video encoder 200 and the video decoder 300 may each be integrated with an audio encoder and / or an audio decoder, and may include appropriate MUX-DEMUX units or other hardware and / or software to process multiplexed streams including both audio and video in a common data stream. If applicable, the MUX-DEMUX unit may conform to the ITU H.223 multiplexer protocol or other protocols, such as the User Datagram Protocol (UDP).

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

[0043] The video encoder 200 and the video decoder 300 may operate according to a video codec standard, such as ITU-T H.265, also known as High Efficiency Video Coding (HEVC), or an extension thereof, such as a multi-view and / or scalable video codec extension. Alternatively, the video encoder 200 and the video decoder 300 may operate according to other private or industry standards, such as ITU-T H.266, also known as Versatile Video Coding (VVC). At the 15th meeting of the Joint Video Experts Group (JVET) of ITU-T SG 16WP3 and ISO / IEC JTC 1 / SC 29 / WG 11: Gothenburg, SE, July 3-12, 2019, JVET-O2001-vE, Bross et al. described a draft of the VVC standard in "Versatile Video Coding (Draft 6)" (hereinafter referred to as "VVC Draft 6"). At the 19th meeting of the Joint Video Experts Group (JVET) of ITU-T SG 16WP3 and ISO / IEC JTC1 / SC 29 / WG 11: by teleconference, June 22-July 1, 2020, JVET-S2001-vA, Bross et al. described a newer draft of the VVC standard in "Versatile Video Coding (Draft 10)" (hereinafter referred to as "VVC Draft 10"). However, the technology of the present disclosure is not limited to any particular codec standard.

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

[0045] The present disclosure may generally relate to encoding and decoding of pictures (e.g., encoding and decoding), which is intended to include the process of encoding or decoding data for a picture. Similarly, the present disclosure may refer to encoding and decoding of blocks of a picture as including the process of encoding or decoding data for the block, for example, prediction and / or residual encoding and decoding. The encoded video bitstream typically includes a series of values ​​for syntax elements that represent encoding and decoding decisions (e.g., codec modes) and the partitioning of pictures into blocks. Therefore, references to encoding and decoding a picture or a block should generally be understood as encoding and decoding the values ​​for the syntax elements that form the picture or block.

[0046] HEVC defines various blocks, including codec units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video codec (such as video encoder 200) partitions a codec tree unit (CTU) into CUs according to a quadtree structure. That is, the video codec partitions the CTU and CU into four equal non-overlapping squares, and each node of the quadtree has zero or four child nodes. A node without child nodes may be referred to as a "leaf node", and the CU of such a leaf node may include one or more PUs and / or one or more TUs. The video codec may further partition the PU and TU. For example, in HEVC, a residual quadtree (RQT) represents the partitioning of a TU. In HEVC, a PU represents inter-frame prediction data, and a TU represents residual data. An intra-predicted CU includes intra-frame prediction information, such as an intra-frame mode indication.

[0047] As another example, the video encoder 200 and the video decoder 300 may be configured to operate according to VVC. According to VVC, a video codec (such as the video encoder 200) partitions a picture into a plurality of codec tree units (CTUs). The video encoder 200 may partition the 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 partition types, such as the separation between CU, PU, ​​and TU of HEVC. The QTBT structure includes two levels: a first level partitioned according to quadtree partitioning, and a second level partitioned according to binary tree partitioning. The root node of the QTBT structure corresponds to the CTU. The leaf nodes of the binary tree correspond to the codec units (CUs).

[0048] In the MTT partitioning structure, blocks can be partitioned using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of ternary tree (TT) (also known as ternary tree (TT)) partitioning. A ternary tree or ternary tree partitioning is a partitioning in which a block is split into three sub-blocks. In some examples, the ternary tree or ternary tree partitioning divides the block into three sub-blocks instead of dividing the original block through the center. The partitioning types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.

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

[0050] The video encoder 200 and the video decoder 300 may be configured to use quadtree segmentation, QTBT segmentation, MTT segmentation, or other segmentation structures in accordance with HEVC. For purposes of explanation, the description of the technology of the present disclosure is presented with respect to QTBT segmentation. However, it should be understood that the technology of the present disclosure may also be applied to a video codec configured to use quadtree segmentation or other types of segmentation.

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

[0052] In some examples, a tile may be partitioned into multiple bricks, where each brick may include one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick. However, a brick that is a proper subset of a tile may not be referred to as a tile.

[0053] Tiles in a picture may also be arranged in slices. A slice may be an integer number of tiles of a picture that may be contained exclusively in a single Network Abstraction Layer (NAL) unit. In some examples, a slice includes a continuous sequence of multiple complete tiles or just complete tiles of one tile.

[0054] The present disclosure may use "N×N" and "N by N" interchangeably to refer to the sample dimensions of a block (such as a CU or other video block) in terms of vertical and horizontal dimensions, for example, 16×16 samples or 16 by 16 samples. Typically, a 16×16 CU will have 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an N×N CU typically has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. The samples in a CU may be arranged in rows and columns. In addition, a CU does not necessarily need to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may include N×M samples, where M is not necessarily equal to N.

[0055] The video encoder 200 encodes video data representing prediction and / or residual information and other information for a CU. The prediction information indicates how the CU will be predicted to form a prediction block for the CU. The residual information generally indicates the sample-by-sample difference between the samples of the CU before encoding and the prediction block.

[0056] In order to predict a CU, the video encoder 200 can generally form a prediction block of the CU by inter-frame prediction or intra-frame prediction. Inter-frame prediction generally refers to predicting a CU based on data of a previously coded picture, while intra-frame prediction generally refers to predicting a CU based on previously coded data of the same picture. In order to perform inter-frame prediction, the video encoder 200 can use one or more motion vectors to generate a prediction block. The video encoder 200 can generally perform a motion search to identify a reference block that closely matches the CU, for example, based on the difference between the CU and the reference block. The video encoder 200 can use the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean square difference (MSD), or other such difference calculations to calculate a difference metric to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 can use unidirectional prediction or bidirectional prediction to predict the current CU.

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

[0058] To perform intra prediction, the video encoder 200 may select an intra prediction mode to generate a prediction block. Certain examples of VVC provide sixty-seven intra prediction modes, including various directional modes, as well as a plane mode and a DC mode. Typically, the video encoder 200 selects neighboring samples describing a current block (e.g., a block of a CU) to predict an intra prediction mode of the samples of the current block based thereon. Assuming that the video encoder 200 encodes and decodes CTUs and CUs in a raster scan order (from left to right, from top to bottom), such samples may typically be located above, to the upper left, or to the left of the current block in the same picture as the current block.

[0059] The video encoder 200 encodes data representing the prediction mode for the current block. For example, for inter-frame prediction mode, the video encoder 200 can encode data representing which of the various available inter-frame prediction modes to use and the motion information for the corresponding mode. For example, for unidirectional or bidirectional inter-frame prediction, the video encoder 200 can encode the motion vector using advanced motion vector prediction (AMVP) or merge mode. For affine motion compensation mode, the video encoder 200 can use a similar mode to encode the motion vector.

[0060] After prediction of a block, such as intra prediction or inter prediction of a block, the video encoder 200 may calculate residual data for the block. Residual data, such as a residual block, represents the sample-by-sample difference between the block and a prediction block for the block formed using a corresponding prediction mode. The video encoder 200 may apply one or more transforms to the residual block to generate transformed data in a transform domain rather than a sample domain. For example, the video encoder 200 may apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. Additionally, the video encoder 200 may apply a secondary transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), etc., after the primary transform. The video encoder 200 generates transform coefficients after applying one or more transforms.

[0061] As described above, after any transform used to produce transform coefficients, the video encoder 200 can perform quantization of the transform coefficients. Quantization generally refers to a process in which transform coefficients are quantized to possibly reduce the amount of data used to represent the transform coefficients, thereby providing further compression. By performing the quantization process, the video encoder 200 can reduce the bit depth associated with some or all of the transform coefficients. For example, the video encoder 200 can round down an n-bit value to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, the video encoder 200 can perform a bit-by-bit right shift of the value to be quantized.

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

[0063] To perform CABAC, the video encoder 200 may assign context within a context model to a symbol to be sent. The context may relate to, for example, whether neighboring values ​​of the symbol are zero values. The probability determination may be based on the context assigned to the symbol.

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

[0065] In this way, the video encoder 200 can generate a bitstream that includes encoded video data, such as syntax elements describing the partitioning of a picture into blocks (e.g., CUs) and prediction and / or residual information for the blocks. Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.

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

[0067] The residual information may be represented by, for example, quantized transform coefficients. The video decoder 300 may inverse quantize and inverse transform the quantized transform coefficients of the block to reproduce a residual block for the block. The video decoder 300 uses the signaled prediction mode (intra-frame or inter-frame prediction) and related prediction information (e.g., motion information for inter-frame prediction) to form a prediction block for the block. The video decoder 300 may then combine the prediction block and the residual block (on a sample-by-sample basis) to reproduce the original block. The video decoder 300 may perform additional processing, such as performing a deblocking process to reduce visual artifacts along the boundaries of the blocks.

[0068] Application of existing scaling matrices to low frequency non-separable transform (LFNST) coefficients may not produce the desired effect. The disclosed technology can avoid the disadvantages of using existing scaling matrices and can improve encoding and decoding efficiency by not applying scaling matrices when application of scaling matrices is undesirable.

[0069] According to the technology of the present disclosure, a method includes: determining whether a scaling matrix can be applied to a low-frequency non-separable transform (LFNST) codec block of video data; based on the determination that the scaling matrix cannot be applied to the LFNST codec block, not applying the scaling matrix to the LFNST codec block; and encoding and decoding the video data without applying the scaling matrix to the LFNST codec block.

[0070] According to the technology of the present disclosure, a device includes a memory configured to store video data; and one or more processors implemented in a circuit and communicatively coupled to the memory, the one or more processors being configured to: determine whether a scaling matrix can be applied to a low-frequency non-separable transform (LFNST) codec block of the video data; based on a determination that the scaling matrix cannot be applied to the LFNST codec block, not apply the scaling matrix to the LFNST codec block; and encode and decode the video data without applying the scaling matrix to the LFNST codec block.

[0071] According to the technology of the present disclosure, a device includes: a component for determining whether a scaling matrix can be applied to a low-frequency non-separable transform (LFNST) codec block of video data; a component for not applying the scaling matrix to the LFNST codec block based on the determination that the scaling matrix cannot be applied to the LFNST codec block; and a component for encoding and decoding the video data without applying the scaling matrix to the LFNST codec block.

[0072] According to the technology of the present disclosure, a non-transitory computer-readable storage medium has instructions stored thereon, which, when executed by one or more processors, cause the one or more processors to: determine whether a scaling matrix can be applied to a low-frequency non-separable transform (LFNST) codec block of video data; based on the determination that the scaling matrix cannot be applied to the LFNST codec block, not apply the scaling matrix to the LFNST codec block; and encode and decode the video data without applying the scaling matrix to the LFNST codec block.

[0073] The present disclosure may generally relate to "signaling" certain information, such as syntax elements. The term "signaling" may generally relate to the communication of values ​​for syntax elements and / or other data used to decode encoded video data. That is, the video encoder 200 may signal values ​​for syntax elements in a bitstream. Typically, signaling involves generating values ​​in a bitstream. As described above, the source device 102 may transmit the bitstream to the destination device 116 substantially in real time or in non-real time (such as may occur when storing syntax elements to the storage device 112 for later retrieval by the destination device 116).

[0074] Figure 2A and Figure 2B 1 is a conceptual diagram illustrating an example quadtree binary tree (QTBT) structure 130, and a corresponding codec tree unit (CTU) 132. Solid lines represent quadtree splits, while 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 horizontal splitting and 1 indicates vertical splitting. For quadtree splitting, there is no need to indicate the split type because the quadtree node splits the block horizontally and vertically into 4 equally sized sub-blocks. Accordingly, the video encoder 200 can encode and the video decoder 300 can decode syntax elements (such as split information) for the region tree level (i.e., solid lines) of the QTBT structure 130 and syntax elements (such as split information) for the prediction tree level (i.e., dashed lines) of the QTBT structure 130. The video encoder 200 may encode and the video decoder 300 may decode video data such as prediction and transform data for the CU represented by the terminal leaf node of the QTBT structure 130 .

[0075] generally, Figure 2B The CTU 132 may be associated with parameters defining the size of blocks corresponding to nodes at the first and second levels in the QTBT structure 130. These parameters may include a CTU size (in terms of samples representing the size of the CTU 132), a minimum quadtree size (MinQTSize, representing the minimum allowed quadtree leaf node size), a maximum binary tree size (MaxBTSize, representing the maximum allowed binary tree root node size), a maximum binary tree depth (MaxBTDepth, representing the maximum allowed binary tree depth), and a minimum binary tree size (MinBTSize, representing the minimum allowed binary tree leaf node size).

[0076] The root node of the QTBT structure corresponding to the CTU can have four child nodes at the first level of the QTBT structure, each of which can be segmented according to the quadtree segmentation. That is, the node of the first level is a leaf node (without child nodes) or has four child nodes. The example of the QTBT structure 130 represents such nodes as a parent node and a child node including a solid line for branching. If the node of the first level is not larger than the maximum allowed binary tree root node size (MaxBTSize), these nodes can be further segmented by the corresponding binary tree. The binary tree splitting of a node can be iterated until the node obtained by the split reaches the minimum allowed binary tree leaf node size (MinBTSize) or the maximum allowed binary tree depth (MaxBTDepth). The example of the QTBT structure 130 represents such nodes as having a dotted line for branching. The binary tree leaf node is called a coding unit (CU), which is used for prediction (e.g., intra-picture or inter-picture prediction) and transformation without any further segmentation. As described above, a CU may also be referred to as a "video block" or "block".

[0077] In one example of a QTBT partitioning structure, the CTU size is set to 128×128 (luminance sample and two corresponding 64×64 chrominance samples), MinQTSize is set to 16×16, MaxBTSize is set to 64×64, MinBTSize (for both width and height) is set to 4, and MaxBTDepth is set to 4. Quadtree partitioning is first applied to the CTU to generate a quadtree leaf node. The quadtree leaf node can have a size from 16×16 (i.e., MinQTSize) to 128×128 (i.e., CTU size). If the leaf quadtree node is 128×128, the leaf quadtree node will not be further split by the binary tree because the size exceeds MaxBTSize (i.e., in this example, 64×64). Otherwise, the leaf quadtree node will be further split by the binary tree. Therefore, the quadtree leaf node is also the root node of the binary tree and has a binary tree depth of 0. When the binary tree depth reaches MaxBTDepth (4 in this example), no further splitting is allowed. When a binary tree node has a width equal to MinBTSize (4 in this example), this means that no further horizontal splitting is allowed. Similarly, a binary tree node with a height equal to MinBTSize means that no further vertical splitting is allowed for the binary tree node. As described above, the leaf nodes of the binary tree are called CUs and are further processed according to prediction and transformation without the need for further segmentation.

[0078] Figure 3 is a block diagram illustrating an example video encoder 200 that may perform the techniques of this disclosure. Figure 3 The present disclosure describes the video encoder 200 in the context of video codec standards such as the HEVC video codec standard and the developing H.266 video codec standard. However, the techniques of the present invention are not limited to these video codec standards and can be generally applied to video encoding and decoding.

[0079] exist Figure 3In the example of , the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a decoded picture buffer (DPB) 218, and an entropy coding unit 220. Any 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 processing circuits. In addition, the video encoder 200 may include additional or alternative processors or processing circuits to perform these and other functions.

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

[0081] In the present disclosure, references to the video data memory 230 should not be construed as limited to memory internal to the video encoder 200, unless specifically described as such, or memory external to the video encoder 200, unless specifically described as such. Rather, references to the video data memory 230 should be understood as reference memory that stores video data received by the video encoder 200 for encoding (e.g., video data for a current block to be encoded). Figure 1 The memory 106 may also provide temporary storage for outputs from the various units of the video encoder 200 .

[0082] Figure 3Various units are illustrated to help understand the operations performed by the video encoder 200. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Fixed-function circuits refer to circuits that provide specific functions and are preset on operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functionality in the operations that can be performed. For example, a programmable circuit can execute software or firmware so that the programmable circuit operates in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., to receive parameters or output parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more of the units may be different circuit blocks (fixed-function or programmable), while in some examples, one or more of the units may be integrated circuits.

[0083] The video encoder 200 may include an arithmetic logic unit (ALU), an elementary function unit (EFU), a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example where the operation of the video encoder 200 is performed using software executed by a programmable circuit, the memory 106 ( Figure 1 ) may store instructions (eg, object code) for software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 may store such instructions.

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

[0085] 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 for performing video prediction according to other prediction modes. As an example, the mode selection unit 202 may include a palette unit, an intra-block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, and the like.

[0086] The mode selection unit 202 typically coordinates multiple encoding passes to test combinations of encoding parameters and the resulting rate-distortion values ​​for such combinations. The encoding parameters may include the partitioning of CTUs 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 a combination of encoding parameters that has a better rate-distortion value than other tested combinations.

[0087] The video encoder 200 may partition a picture retrieved from the video data memory 230 into a series of CTUs and encapsulate one or more CTUs in a slice. The mode selection unit 202 may partition the CTUs of the picture according to a tree structure such as a QTBT structure or the quadtree structure of the HEVC described above. As described above, the video encoder 200 may form one or more CUs by partitioning the CTUs according to the tree structure. Such CUs may also be generally referred to as "video blocks" or "blocks".

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

[0089] 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 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 unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, and for bidirectional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then use the motion vectors to generate a prediction block. For example, the motion compensation unit 224 may use the motion vectors to retrieve data for the reference block. As another example, if the motion vectors have fractional sample precision, the motion compensation unit 224 may interpolate values ​​for the prediction block according to one or more interpolation filters. In addition, for bidirectional inter prediction, the motion compensation unit 224 may retrieve data for two reference blocks identified by the corresponding motion vectors and combine the retrieved data, for example, by sample-by-sample averaging or weighted averaging.

[0090] As another example, for intra prediction or intra prediction codec, the intra prediction unit 226 can generate a prediction block based on samples adjacent to the current block. For example, for directional mode, the intra prediction unit 226 can generally mathematically combine the values ​​of the adjacent samples and fill these calculated values ​​in a defined direction across the current block to generate a prediction block. As another example, for DC mode, the intra prediction unit 226 can calculate the average of the adjacent samples of the current block and generate a prediction block so that for each sample of the prediction block, this obtained average is included.

[0091] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives the original uncoded 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 sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines a residual block for the current block. In some examples, the residual generation unit 204 can also determine the difference between the sample values ​​in the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some examples, the residual generation unit 204 can be formed using one or more subtractor circuits that perform binary subtraction.

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

[0093] In an example where the mode selection unit 202 does not further partition the CU into PUs, each CU may be associated with a luma codec block and a corresponding chroma codec block. As described above, the size of a CU may refer to the size of the luma codec block of the CU. The video encoder 200 and the video decoder 300 may support CUs of size 2N×2N, 2N×N, or N×2N.

[0094] For other video codec techniques such as intra-block copy mode codec, affine mode codec, and linear model (LM) mode codec, as several examples, the mode selection unit 202 generates a prediction block for the current block being encoded via a corresponding unit associated with the codec technique. In some examples, such as palette mode codec, the mode selection unit 202 may not generate a prediction block, but instead generate syntax elements indicating a manner to reconstruct the block based on the selected palette. In such modes, the mode selection unit 202 may provide these syntax elements to the entropy coding unit 220 for encoding.

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

[0096] 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 LFNST, a discrete cosine transform (DCT), a directional transform, a Karl-Lof 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, for example, a primary transform and a secondary transform (such as a rotation transform). In some examples, the transform processing unit 206 does not apply a transform to the residual block.

[0097] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to produce a quantized transform coefficient block. The quantization unit 208 may quantize the transform coefficients of the transform coefficient block according to a quantization parameter (QP) value associated with the current block. The video encoder 200 (e.g., via the mode selection unit 202) may adjust the degree of quantization applied to the transform coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may introduce information loss, and therefore, the quantized transform coefficients may have lower precision than the original transform coefficients produced by the transform processing unit 206.

[0098] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform, respectively, to the quantized transform coefficient block to reconstruct a residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (although potentially with some degree of distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 may add samples of the reconstructed residual block to corresponding samples of the prediction block generated by the mode selection unit 202 to generate a reconstructed block.

[0099] Filter unit 216 may perform one or more filter operations on the reconstructed block. For example, filter unit 216 may perform a deblocking operation to reduce blocking artifacts along the edges of the CU. In some examples, the operations of filter unit 216 may be skipped.

[0100] The video encoder 200 stores the reconstructed blocks in the DPB 218. For example, in examples where the operation of the filter unit 216 is not required, the reconstruction unit 214 can store the reconstructed blocks to the DPB 218. In examples where the operation of the filter unit 216 is required, the filter unit 216 can store the filtered reconstructed blocks to the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 can retrieve a reference picture formed by the reconstructed (and possibly filtered) blocks from the DPB 218 to perform inter-frame prediction on blocks of subsequent encoded pictures. In addition, the intra-frame prediction unit 226 can use the reconstructed blocks of the current picture in the DPB 218 to perform intra-frame prediction on other blocks in the current picture.

[0101] In some examples, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, and / or other units of video encoder 200 may determine that applying a scaling matrix to the LFNST coefficients is undesirable. For example, as discussed further below, applying a scaling matrix to the LFNST coefficients may not result in any relative scaling of the coefficients due to the flat nature of the coefficients, or may produce visual artifacts.

[0102] The transform processing unit 206, the quantization unit 208, the inverse quantization unit 210, the inverse transform processing unit 212, and / or other units of the video encoder 200 may determine a syntax element indicating whether the scaling matrix is ​​not to be applied to the LFNST coefficients. In one example, the quantization unit 208 and the inverse quantization unit 210 do not apply the scaling matrix to the LFNST coefficients based on the syntax element indicating that the scaling matrix is ​​not to be applied to the LFNST coefficients.

[0103] In general, the entropy coding unit 220 may entropy encode syntax elements received from other functional components of the video encoder 200. For example, the entropy coding unit 220 may entropy encode syntax elements indicating whether the scaling matrix will not be applied to the LFNST coefficients. For example, the entropy coding unit 220 may entropy encode the quantized transform coefficient block from the quantization unit 208. As another example, the entropy coding unit 220 may entropy encode the prediction syntax elements (e.g., motion information for inter-frame prediction or intra-frame mode information for intra-frame prediction) from the mode selection unit 202. The entropy coding unit 220 may perform one or more entropy coding operations on syntax elements as another example of video data to generate entropy-encoded data. For example, the entropy coding unit 220 may perform a context adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable to variable (V2V) length coding operation, a syntax-based context adaptive binary arithmetic coding (SBAC) operation, a probability interval partitioning entropy (PIPE) coding operation, an exponential-Golomb coding operation, or another type of entropy coding operation on the data. In some examples, entropy encoding unit 220 may operate in a bypass mode in which syntax elements are not entropy encoded.

[0104] The video encoder 200 may output a bitstream including entropy-encoded syntax elements required for reconstructing blocks of a slice or picture. Specifically, the entropy encoding unit 220 may output a bitstream.

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

[0106] In some examples, operations performed with respect to luma codec blocks need not be repeated for chroma codec blocks. As an example, operations for identifying motion vectors (MVs) and reference pictures for luma codec blocks need not be repeated for identifying MVs and reference pictures for chroma codec blocks. Specifically, the MVs for luma codec blocks may be scaled to determine MVs for chroma blocks, while the reference pictures may be the same. As another example, the intra prediction process may be the same for luma codec blocks and chroma codec blocks.

[0107] The video encoder 200 represents an example of a device configured to encode video data, including a memory configured to store the video data, and one or more processors implemented in circuitry and communicatively coupled to the memory, the one or more processors configured to: determine whether a scaling matrix can be applied to a low frequency non-separable transform (LFNST) codec block of the video data; based on a determination that the scaling matrix cannot be applied to the LFNST codec block, not apply the scaling matrix to the LFNST codec block; and encode the video data without applying the scaling matrix to the LFNST codec block.

[0108] Figure 4 is a block diagram illustrating an example video decoder 300 that may perform the techniques of this disclosure. Figure 4 It is provided for the purpose of explanation and is not a limitation of the techniques widely illustrated and described in this disclosure. For the purpose of explanation, this disclosure describes a video decoder 300 according to the techniques of VVC and HEVC. However, the techniques of this disclosure may be performed by video codec devices configured for other video codec standards.

[0109] exist Figure 4 In the example of , the video decoder 300 includes a codec picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. Any or all of the CPB memory 320, the entropy decoding unit 302, the prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, the filter unit 312, and the DPB 314 may be implemented in one or more processors or processing circuits. In addition, the video decoder 300 may include additional or alternative processors or processing circuits to perform these and other functions.

[0110] The prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. The prediction processing unit 304 may include additional units for performing predictions according to other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, an intra block copy unit (which may be part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.

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

[0112] Additionally or alternatively, in some examples, video decoder 300 may retrieve the video from memory 120 ( Figure 1 ) to retrieve the encoded and decoded video data. That is, memory 120 may store data as discussed above in conjunction with CPB memory 320. Likewise, when some or all of the functionality of video decoder 300 is implemented in software to be executed by processing circuitry of video decoder 300, memory 120 may store instructions to be executed by video decoder 300.

[0113] Figure 4 The various units shown in FIG. 3 are illustrated to aid in understanding the operations performed by the video decoder 300. These units may be implemented as fixed function circuits, programmable circuits, or a combination thereof. Figure 3 Similarly, a fixed-function circuit refers to a circuit that provides a specific function and is preset on the operations that can be performed. A programmable circuit refers to a circuit that can be programmed to perform various tasks and provides flexible functionality in the operations that can be performed. For example, a programmable circuit can execute software or firmware so that the programmable circuit operates in a manner defined by the instructions of the software or firmware. A fixed-function circuit can execute software instructions (for example, to receive parameters or output parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more of the units may be different circuit blocks (fixed-function or programmable), while in some examples, one or more of the units may be integrated circuits.

[0114] The video decoder 300 may include an ALU, an EFU, a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example where the operation of the video decoder 300 is performed by software executed on the programmable circuit, an on-chip or off-chip memory may store instructions (e.g., object code) of the software received and executed by the video decoder 300.

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

[0116] Typically, the video decoder 300 reconstructs a picture on a block-by-block basis. The video decoder 300 may perform a reconstruction operation on each block individually (where the block currently being reconstructed, ie, decoded, may be referred to as a "current block").

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

[0118] In some examples, inverse quantization unit 306 and / or other units of video decoder 300 may determine a syntax element indicating whether the scaling matrix is ​​not to be applied to the LFNST coefficients, e.g., by parsing the syntax element. In one example, inverse quantization unit 306 does not apply the scaling matrix to the LFNST coefficients based on the syntax element indicating that the scaling matrix is ​​not to be applied to the LFNST coefficients.

[0119] 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 Karl-Lof transform (KLT), an inverse rotational transform, an inverse directional transform, or another inverse transform to the coefficient block.

[0120] In addition, prediction processing unit 304 generates a prediction block based on the prediction information syntax element entropy decoded by entropy decoding unit 302. For example, if the prediction information syntax element indicates that the current block is inter-predicted, motion compensation unit 316 can generate the prediction block. In this case, the prediction information syntax element can indicate a reference picture in DPB 314 from which the reference block is retrieved, and a motion vector that identifies the position of the reference block in the reference picture relative to the position of the current block in the current picture. Motion compensation unit 316 can generally generate a prediction block in the same manner as relative to motion compensation unit 224 ( Figure 3 ) and the inter-frame prediction process is performed in a manner basically similar to the described method.

[0121] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, the intra-prediction unit 318 may generate a prediction block according to the intra-prediction mode indicated by the prediction information syntax element. Again, the intra-prediction unit 318 may generally generate a prediction block in the same manner as the intra-prediction unit 226 ( Figure 3 The intra prediction process is performed in a substantially similar manner as described above. The intra prediction unit 318 may retrieve data of neighboring samples for the current block from the DPB 314.

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

[0123] The filter unit 312 may perform one or more filter operations on the reconstructed block. For example, the filter unit 312 may perform a deblocking operation to reduce blocking artifacts along the edges of the reconstructed block. The operations of the filter unit 312 need not be performed in all examples.

[0124] The video decoder 300 may store the reconstructed block in the DPB 314. For example, in examples where the operation of the filter unit 312 is not performed, the reconstruction unit 310 may store the reconstructed block to the DPB 314. In examples where the operation of the filter unit 312 is performed, the filter unit 312 may store the filtered reconstructed block to the DPB 314. As described above, the DPB 314 may provide reference information to the prediction processing unit 304, such as samples of the current picture for intra-frame prediction and samples of previously decoded pictures for subsequent motion compensation. Moreover, the video decoder 300 may output a decoded picture (e.g., a decoded video) from the DPB 314 for use in, for example, Figure 1 Subsequent presentation on a display device such as display device 118.

[0125] In this way, the video decoder 300 represents an example of a video decoding device, which includes a memory configured to store video data, and one or more processors implemented in a circuit and communicatively coupled to the memory, the one or more processors configured to: determine whether a scaling matrix can be applied to a low-frequency non-separable transform (LFNST) codec block of the video data; based on a determination that the scaling matrix cannot be applied to the LFNST codec block, not apply the scaling matrix to the LFNST codec block; and decode the video data without applying the scaling matrix to the LFNST codec block.

[0126] Video codec standards include ITU-T H.261, ISO / IEC MPEG-1Visual, ITU-T H.262 or ISO / IEC MPEG-2Visual, ITU-T H.263, ISO / IEC MPEG-4Visual and ITU-T H.264 (also known as ISO / IECMPEG-4AVC), including its Scalable Video Codec (SVC) and Multi-view Video Codec (MVC) extensions. The Joint Collaboration Team on Video Codecs (JCT-VC) of the ITU-T Video Codec Experts Group (VCEG) and the ISO / IEC Moving Picture Experts Group (MPEG) completed the latest video codec standard, High Efficiency Video Codec (HEVC), in April 2013.

[0127] The Joint Video Experts Group (JVET), a collaborative group consisting of MPEG and VCEG of ITU-T Study Group 16, is working on a new video codec standard called VVC. The main goal of VVC is to significantly improve compression performance over the existing HEVC standard, helping to deploy higher quality video services and emerging applications such as 360° immersive multimedia and high dynamic range (HDR) video. The development of the VVC standard is expected to be completed in 2020.

[0128] The video encoder 200 and the video decoder 300 use the QP value, for example, to determine the step size for quantizing or inverse quantizing the transform coefficients. The QP value is specified in the range of -QpBdOffset to 63 (including the endpoints), where 63 is the maximum QP value. QpBdOffset is specified as a fixed value for a specific bit depth, derived as 6*(bitDepth-8). The QP ideal value (prime value) calculated by adding QpBdOffset to the specified QP value is used to derive the actual step size. For ease of description, QP and QP ideal values ​​may be used interchangeably in the rest of the present disclosure, and it should be understood that QP values ​​are used for most of the QP derivation process, while QP ideal values ​​are only used in the final stage before determining the step size. A QP value change of 1 roughly indicates a step size change of 12%; a QP value change of 6 corresponds to a step size change of 2 times. The higher the QP value, the larger the quantization step size, and the coarser the representation of the quantized transform coefficients becomes.

[0129] In video coding, the residual obtained after the prediction operation is transformed using DCT2 or other (multiple) transform operations. Subsequently, the transform coefficients are quantized, and the quantized coefficients can be entropy coded and decoded.

[0130] For example, the quantization process of the video encoder 200 or the video decoder 300 is controlled by two factors: 1) QP and; 2) scaling matrix. A description of QP has been provided above. At the video decoder (e.g., the video decoder 300), a scaling factor corresponding to the QP is determined. The video decoder 300 can apply the scaling factor as follows:

[0131] levelScale[][qP%6])<<(qP / 6)

[0132] Where qP is the quantization parameter and levelScale[][] is an array defined as follows:

[0133] The list levelScale[][] is specified as levelScale[j][k] = {{40, 45, 51, 57, 64, 72}, {57, 64, 72, 80, 90, 102}}, where j = 0..1, k = 0..5.

[0134] A QP difference of 6 results in a bit shift of 1, so the video decoder 300 may apply a scaling associated with the QP by a shift of (qP / 6), and may calculate the scaling using qP%6.

[0135] In addition, the video encoder 200 and the video decoder 300 may apply a scaling parameter to each coefficient. The scaling parameter may be different for different coefficients. The video encoder 200 or the video decoder 300 may determine a scaling factor associated with the scaling matrix. For example, the scaling factor may be derived from the scaling parameter. The scaling parameter may be defined using a scaling list and / or matrix. The video encoder 200 or the video decoder 300 may determine the intermediate scaling factor m[x][y] as follows: m[x][y] is set equal to 16 if one or more of the following conditions are true: 1) sps_scaling_list_enabled_flag is equal to 0; or 2) transform_skip_flag[xTbY][yTbY] is equal to 1. If neither of these two conditions is true, the following conditions apply: m[x][y]=ScalingFactor[Log2(nTbW)][Log2(nTbH)][matrixId][x][y], where matrixId is as specified in Table 7-5 (8-958) of VVC Draft 6.

[0136] The video encoder 200 or the video decoder 300 may determine the final scaling factor used in inverse quantization by multiplying the two scaling terms (from the QP and the scaling matrix) as follows: If dep_quant_enabled_flag is equal to 1, the following may apply: ls[x][y] = (m[x][y]*levelScale[rectNonTsFlag][(qP+1)%6]) << ((qP+1) / 6) (8-959)

[0137] Otherwise (dep_quant_enabled_flag is equal to 0), the following may apply: ls[x][y] = (m[x][y]*levelScale[rectNonTsFlag][qP%6]) << (qP / 6) (8-960)

[0138] The scaled transform coefficients are derived as follows and used in the inverse quantization step. The values ​​dnc[x][y] are derived as follows:

[0139] dnc[x][y]=(dz[x][y]* ls[x][y]+bdOffset)>> bdShift (8-693)

[0140] The scaled transform coefficients d[x][y] are derived as follows: d[x][y] = Clip3(CoeffMin, CoeffMax, dnc[x][y]) (8-694)

[0141] The signaling and definition of the scaling matrix is ​​now discussed. The scaling matrix is ​​a set of coefficients used by the video encoder 200 and the video decoder 300, for example, to scale transform coefficients. The video encoder 200 and / or the video decoder 300 may use the scaling matrix for rate control and perception control, as described below.

[0142] Rate control of video is usually performed by adjusting the QP value of the block. However, a poor QP results in a uniform scaling factor being applied to the entire block. A scaling matrix can be used to transform the relative control between various coefficients within a block. For example, a scaling matrix can be defined so that low-frequency coefficients are quantized less than high-frequency coefficients. This use of a scaling matrix may be beneficial for video data that has less high-frequency content.

[0143] The scaling matrix can also be used to control the relative precision of coefficients within a transform block so that the perceived quality of the video is maintained at a lower bit rate. Human visual system (HVS) based quantization using a scaling matrix can provide better quality video for certain types of content. See Sze, Budagavi and Sullivan, High Efficiency Video Coding (HEVC), Springer.

[0144] The video encoder 200 may use scaling lists to signal the scaling matrices, and these scaling lists

[0145] This can be signaled in the Adaptive Parameter Set (APS). The scaling column can be enabled or disabled in the SPS.

[0146] If the SPS indicates that the scaling list is enabled, the video encoder may further control the scaling matrix (eg, in the slice header) to turn the scaling matrix on and off.

[0147] A scaling matrix may be defined for each transform block size and prediction type of the block. As described above, the matrix may be derived from a scaling list. The video encoder 200 may use the syntax of the scaling list signaled in the PPS and / or SPS as follows:

[0148]

[0149]

[0150] Table 1

[0151] Section 7.4.3.16 of VVC draft 6 provides the semantics of the scaling matrix. The scaling matrix (represented by the variable ScalingFactor[wId][hId][matrixId][x][y]) is derived from the scaling list data. wId and hId refer to the sizeID variable representing the transform block size. sizeId (Table 2) and matrixId (Table 3) are described in the following table:

[0152]

[0153]

[0154] Table 2

[0155]

[0156]

[0157] Table 3

[0158] In Table 3, matrixId is specified based on sizeId, prediction mode, and color component.

[0159] Now we discuss some salient features of the scaling matrix and its derivation. A scaling matrix is ​​specified separately for each of the three color components, and the two prediction types, inter prediction and IBC, are considered together as one prediction type, while intra prediction is considered as another prediction type.

[0160] The scaling list (and hence the derived matrix) is specified for square TBs. For rectangular TBs, the scaling matrix is ​​derived from the scaling matrix of the corresponding square TB.

[0161] For 16x16, 32x32, and 64x64 scaling matrices, only 64 coefficients are specified as an 8x8 grid, and the matrix coefficients for the larger block are obtained by upsampling the coefficients to the desired size. In this case, the video encoder 200 also signals the DC coefficient.

[0162] The scaling matrix for a specific sizeID can be predicted from other scaling matrices of the same sizeID. The prediction in this case is a copy of the reference matrix. When the DC coefficient is also signaled for a specific sizeID, the DC coefficient is copied from the DC coefficient of the reference matrix.

[0163] In video codec standards before HEVC, when DCT-2 is used in both vertical and horizontal directions, only a fixed separable transform is used. In HEVC, in addition to DCT-2, DST-7 is also used as a fixed separable transform for 4×4 blocks.

[0164] U.S. Patent No. 10,306,229, entitled “Enhanced Multiple Transforms for Prediction Residuals,” issued on May 28, 2019, claiming priority to U.S. Provisional Patent Application No. 62 / 107,996, filed on January 26, 2015; U.S. Publication No. 2018-0020218 A1, entitled “Lookup Table for Enhanced Multiple Transforms,” published on January 18, 2018, claiming priority to U.S. Provisional Patent Application No. 62 / 363,188, filed on July 15, 2016; and U.S. Patent Publication No. 2019-0373261 A1, entitled “Codec Adaptive Multiple Transform Information for Video Codecs,” filed on May 30, 2019, claiming priority to U.S. Provisional Patent Application No. 62 / 679,570, filed on June 1, 2018, cover multiple transform selection (MTS) methods. MTS was previously known as Adaptive Multiple Transform (AMT). An example of MTS in U.S. Patent Publication No. 2019-0373261 A1 has been adopted by the Joint Video Experts Group (JVET) Joint Experimental Model (JEM-7.0), and a simplified version of MTS was later adopted in VVC.

[0165] Figure 5 is a conceptual diagram illustrating a low frequency non-separable transform (LFNST) in an encoder and a decoder (eg, the video encoder 200 and the video decoder 300). Figure 5 , a video encoder (e.g., video encoder 200) may apply a separable transform 400. The video encoder may then apply LFNST 402. The video encoder may then quantize the LFNST coefficients 404. A video decoder (e.g., video decoder 300) may inverse quantize the quantized coefficients 406. The video decoder may then apply an inverse LFNST 408. The video decoder may then apply an inverse separable transform 410.

[0166] Used in JEM-7.0 Figure 5The LFNST shown in the figure is used to further improve the encoding and decoding efficiency of MTS, wherein the implementation of LFNST is based on the Hypercube Givens Transform disclosed in U.S. Patent No. 10,448,053 entitled “Multiple Codec Inseparable Transforms for Video Coding and Decoding”, which was authorized on October 15, 2019 and claims the benefits of U.S. Provisional Patent Application Nos. 62 / 295,440 and 62 / 295,448, both filed on February 15, 2016. Transform, HyGT) (for alternative designs and more details, see U.S. Patent No. 10,491,922, entitled “Non-separable quadratic transform for video coding,” issued on November 26, 2019; U.S. Patent No. 10,349,085, entitled “Efficient parameter storage for compressed multi-pass transforms,” issued on July 9, 2019, and claiming the benefit of U.S. Provisional Patent Application Nos. 62 / 295,456 and 62 / 295,448, both filed on February 15, 2016, and U.S. Patent Publication No. 2019-0297351 A1, entitled “Minimizing transform memory and latency via parallel factorization,” published on September 26, 2019). LFNST was formerly known as the Non-separable Quadratic Transform (NSST) or the Quadratic Transform, where all abbreviations are the same. Recently, LFNST has been adopted by: Koo et al., “CE6: Simplified Quadratic Transform (RST) (CE6-3.1)”, Joint Video Experts Group (JVET) of ITU-T SG16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 14th Meeting: Geneva, CH, March 19-27, 2019, JVET-N0193.

[0167] Figure 6 is a conceptual diagram illustrating an example inverse transform process using LFNST. Figure 6 The following technique shown in and can be performed by, for example, the inverse transform processing unit 212 of the video encoder 200 and the inverse transform processing unit 308 of the video decoder 300. The decoded transform coefficients in the 2-D block 420 are used as input to the inverse LFNST by first converting the 2-D block 420 into a list of 1-D coefficients (or vectors) via a predefined scan or ordering. The zeroing coefficients 422 are not used. The zeroing coefficients can be coefficients whose values ​​are set to zero based on their position within the 2-D block according to a predefined rule. The inverse LFNST is applied to the 1-D list of input coefficients, and the output coefficients are reorganized into a 2-D block 424 via a predefined scan or ordering. The zeroing coefficients 426 are not used. The inverse transformed LFNST coefficients are used as input to a separable inverse DCT-2 to obtain a reconstructed residual 428.

[0168] Figure 7 is a conceptual diagram illustrating a 4×4 inverse LFNST for reconstructing 16 intermediate coefficients from a list of 16 input coefficients. Figure 8 is a conceptual diagram illustrating an 8×8 inverse LFNST for reconstructing 48 intermediate coefficients from a list of 16 input coefficients. In VVC draft 6, LFNST can be applied to either 4×4 or 8×8 sub-blocks. In both cases, the 16 decoded coefficients in the 4×4 sub-block (some of which may be normalized to zero) are input to the inverse LFNST. For the 4×4 sub-block 430, before applying the separable inverse DCT-2, the video decoder 300 can use a 16×16 inverse LFNST to construct 16 intermediate coefficients 432, as shown in FIG. Figure 7 For an 8×8 sub-block 440, the video decoder 300 may use a 16×48 inverse LFNST before a separable inverse DCT-2 to construct 48 intermediate coefficients 442, as shown in FIG. Figure 8 As shown. Note that the 48 intermediate coefficients 442 are reorganized into an L-shaped pattern. The remaining coefficients 444, shown as unshaded, are zeroed. The inverse LFNST process can be fully defined based on (i) the transform (e.g., LFNST) matrix and (ii) the reorganization pattern or scan for the intermediate coefficients. An example of the details of the zeroing process in VVC Draft 6 is described in U.S. Patent Application No. 15 / 931,271, entitled "Low Frequency Inseparable Transform Signaling Based on Zeroing Pattern for Video Codecs," filed on May 13, 2020, and claiming priority to U.S. Provisional Patent Application No. 62 / 849,689 filed on May 17, 2019.

[0169] For 4×4 LFNST, depending on the intra mode, one of the following two modes / scans is used:

[0170] const int g_lfnstRGScan4x4

[16] =

[0171] { / / 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

[0172] 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15

[0173] };

[0174] const int g_lfnstRGTranScan 4x 4

[16] =

[0175] { / / 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

[0176] 0,4,8,12,1,5,9,13,2,6,10,14,3,7,11,15

[0177] };

[0178] Where the above two modes / scans indicate the reordering of intermediate coefficients. For example, g_lfnstRGScan4x4 does not change the row-major reordering of coefficients. However, g_lfnstRGTranScan4x4 reorders by transposing the order of the coefficients (e.g., swapping coefficients at 1, 2, 3, 6, 7, and 11 with coefficients at 4, 8, 12, 9, 13, and 14, respectively). In some examples, g_lfnstRGScan4x4 can be used for intra-frame modes with indices between 0 and 34 (inclusive), and g_lfnstRGTranScan4x4 can be used for intra-frame modes with indices above 34.

[0179] For 4×4 LFNST, eight 16×16 matrices are used as candidates according to Section 8.7.4.3 of VVC draft 6.

[0180] For 8×8 LFNST, depending on the intra mode, one of the following two modes / scans is used:

[0181] const int g_lfnstRGScan8x8

[48] =

[0182] { / / 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2425 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

[0183] 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,40,41,42,43,48,49,50,51,56,57,58,59

[0184] };

[0185] const int g_lfnstrgTranScan8x8

[48] =

[0186] { / / 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2425 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

[0187] 0,8,16,24,32,40,48,56,1,9,17,25,33,41,49,57,2,10,18,26,34,42,50,58,3,11,19,27,35,43,51,59,4,12,20,28,5,13,21,29,6,14,22,30,7,15,23,31

[0188] };

[0189] The above two modes / scans indicate the reordering of the intermediate coefficients. Specifically, g_lfnstRGScan8x8 reorders the 48 intermediate coefficients in the L-shaped mode (e.g., the 48th coefficient is mapped to Figure 8 position 59 in the . Scan g_lfnstRGTranScan8x8 reorders the L-shaped pattern by transposing the coefficients (e.g., the 48th coefficient is mapped to Figure 8 In some examples, g_lfnstRGScan4x4 may be used for intra modes indexed between 0 and 34 (inclusive), and g_lfnstRGTranScan4x4 may be used for intra modes indexed above 34. For 8×8 LFNST, eight 16×48 matrices are used as candidates according to section 8.7.4.3 of VVC draft 6.

[0190] Fig. 9 is a conceptual diagram illustrating LFNST and scaling matrices in the encoder and decoder. Fig. 9 , a video encoder (e.g., video encoder 200) may apply a separable transform 450. The video encoder may then apply LFNST 452. The video encoder may then quantize the LFNST coefficients and apply a scaling matrix 454. A video decoder (e.g., video decoder 300) may inverse quantize the quantized coefficients and apply a scaling matrix 456. The video decoder may then apply an inverse LFNST 458. The video decoder may then apply an inverse separable transform 460.

[0191] Scaling matrices are defined for various transform block sizes. When the transform block has an M×N size, the video decoder 300 applies the scaling matrix corresponding to the block size in the inverse quantization step as follows. When LFNST is applied, each block contains only 8 or 16 LFNST coefficients. Since LFNST is an inseparable transform, these coefficients are one-dimensional. However, the coefficients can be arranged in a diagonal scan order calculated using the upper left 4×4 region of the transform block. Scaling matrices are usually defined for primary transform coefficients. In VVC Draft 6, when a scaling matrix is ​​applied, the scaling matrix applicable to the M×N block is directly applied to the LFNST coefficients.

[0192] Although applying a scaling matrix to a LFNST coefficient matrix may not crash the decoder, such application may not have the desired effect. For example, when the video decoder 300 applies a scaling matrix associated with an M×N block to a 4×4 region of a transform block, the relative differences in the coefficients may not result in the desired behavior. For example, if the block is an 8×8 block, the upper left 4×4 region of the block may correspond to low-frequency coefficients. The scaling matrix may cause the low-frequency coefficients to be not quantized as much as the high-frequency coefficients, resulting in a relatively flat profile of the scaling coefficients in the 4×4 region. When the block is encoded and decoded with LFNST, the scaling matrix may not result in any relative scaling of the coefficients due to the flat nature of the coefficients in the 4×4 region.

[0193] When the transform block is 32×32, the scaling matrix is ​​specified on an 8×8 grid and the scaling matrix is ​​upsampled using replication to obtain a 32×32 scaling matrix. Therefore, in effect, the upper left 4×4 region is filled with a value that corresponds to the upper left coefficient of the 8×8 grid. When such a scaling matrix is ​​applied to a 32×32 block with LFNST applied, the LFNST coefficients (e.g., limited to the upper left 4×4 region) are scaled by a constant value and there is no relative scaling of the coefficients. This effectively results in a "flat" scaling matrix for the primary transform coefficients, which is the opposite of the desired behavior of the scaling matrix.

[0194] When the video encoder 200 or the video decoder 300 applies LFNST, the number of LFNST coefficients present in the transform block is only 8 or 16. In a fixed QP codec configuration, this may result in a significant reduction in bits used to encode and decode the block. This may produce visual artifacts due to the large number of zeroing of coefficients and the relatively small precision of the non-zero primary transform coefficients.

[0195] A scaling matrix design that works well for transform blocks encoded with LFNST is desirable. However, for the scaling matrix design of VVC Draft 6, one of the following situations may occur: 1) when LFNST is enabled, the video encoder 200 may have difficulty applying rate control to LFNST codec blocks using the scaling matrix; or 2) when rate control is enabled, the application of LFNST may be disabled or limited so that a more predictable rate control behavior can be expected.

[0196] This disclosure describes several techniques, including signaling techniques, that can improve chroma QP derivation for a hybrid transform-based video codec. One or more of these techniques can be used independently or in combination with other techniques. For an M×N transform block to which LFNST with index lfnstIdx is applied, where nZ is the number of non-zero LFNST coefficients, where nZ coefficients can be arranged in an M1×N1 region of the transform block, several techniques are disclosed.

[0197] In some examples, video encoder 200 or video decoder 300 may apply a scaling matrix corresponding to an M1×N1 transform block to the LFNST coefficients (e.g., instead of a scaling matrix corresponding to an M×N block). In some examples, a scaling matrix corresponding to a block size of M2×N2 may be applied, where only the top-left M1×N1 coefficients are applied to the LFNST coefficients. For example, for LFNST with 16 coefficients, the top-left 4×4 coefficients of the scaling matrix corresponding to an 8×8 block may be applied.

[0198] In some examples, when the video encoder 200 or the video decoder 300 obtains a scaling matrix for an M×N block by scaling up using a K1×K2 scaling matrix, the following may apply, where the K1×K2 scaling matrix is ​​initially used before scaling up. If M1 is not greater than K1 and N1 is not greater than K2, the upper left M1×N1 samples of the K1×K2 matrix may be applied to the LFNST coefficients. In this case, upsampling of the scaling matrix coefficients may not be applied. For example, if M=N=32, M1=N1=4, K1=K2=8, then for the block, only the upper left 4×4 samples of the 8×8 original scaling matrix coefficients may be used as the scaling matrix. When one or both of M1 and N1 are greater than K1 and K2, respectively, then scaling up may be applied only to the larger (multiple) dimensions.

[0199] In some examples, the video encoder 200 or the video decoder 300 may apply a first QP-offset-LFNST to encode and decode the transform block. The first QP offset may be implicit or inferred to be equal to a value. For example, when LFNST is applied, a QP offset of -1 may be added, resulting in a lower QP or finer quantization of the coefficients of the transform block. In some alternatives, the first QP offset may depend on the block size. For larger blocks, the first QP offset may be larger in magnitude than smaller blocks. In some examples, other characteristics of the block, including but not limited to intra mode, primary transform used, prediction mode used, QP value, etc., may be used to determine the QP offset to be applied to the LFNST block. In some examples, the video encoder 200 may signal the first QP offset value in the bitstream. In some examples, the video decoder 300 may derive the first QP offset value. In an alternative example, the QP offset may be obtained as a function of the QP, lfnstIdx, and intra mode of the block. The video encoder 200 or the video decoder 300 may apply the function as a function, or may apply the function by using a lookup table.

[0200] In some examples, the video encoder 200 or the video decoder 300 may apply a scaling vector of size nZ to the LFNST block. The scaling vector may be applied to the LFNST coefficients instead of the LFNST matrix. Alternatively, when LFNST is specified for a LFNST block, the video encoder 200 may signal an M1×N1 matrix containing the scaling coefficients to be applied. In another example, different scaling vectors / matrices may be specified for different block sizes to which LFNST is applied. Different vectors / matrices may also be applied depending on other characteristics of the block (e.g., intra mode, lfnstIdx, prediction mode, etc.). In some examples, the video encoder 200 or the video decoder 300 may predict the scaling vector / matrix specified for the LFNST block based on the other scaling matrices specified. Alternatively, other scaling matrices may be predicted based on the scaling vector / matrix specified for the LFNST block.

[0201] In some examples, video decoder 300 may infer that the scaling factor for one or more coefficients in the matrix not specified by one of the above techniques is equal to zero.

[0202] In some examples, a flag may be signaled or derived to specify that a scaling matrix may not be applied to a LFNST codec block. The video encoder 200 may signal the flag in one or more parameter sets (e.g., SPS, PPS, APS, etc.) of the bitstream, or the video decoder 300 may infer the flag in other ways. In some examples, the flag may also be configured to restrict the application of a scaling matrix to a LFNST block only under certain standards. For example, one or more standards may depend on block characteristics, such as block width / height / aspect ratio, prediction mode used, component, primary transform applied, etc. More generally, for tools used to encode and decode video, a flag may be signaled or derived to specify that a scaling matrix may not be applied to a block encoded and decoded with a specific tool or a tool with certain parameters. For example, when a block is encoded and decoded using a primary transform with a non-DCT2 kernel, a scaling matrix may not be applied.

[0203] In some examples, some of the techniques disclosed above may also be applied to primary transform coefficients. For example, when the primary transform coefficients are restricted to an area smaller than the block size (eg, due to zeroing), one or more of the above techniques may be used to derive a scaling matrix to be applied.

[0204] One or more techniques disclosed herein may be further constrained by one or more characteristics of the samples to which the chroma map is applied, such as block shape, aspect ratio, prediction mode used, characteristics of neighboring blocks, location of the samples relative to the picture (close to or far from a boundary, including picture boundaries, tile boundaries, strip boundaries, brick-block boundaries, etc.).

[0205] Some of the techniques described above may be applied to a codec or a decoder, or both. Although many of the techniques disclosed are for chrominance components, they may also be applied to luminance and components in other color spaces that may be used to represent video data. One or more techniques may be applied together or independently.

[0206] For blocks with LFNST enabled, a scaling matrix corresponding to a 4×4 transform block size may be applied. The following changes may be made to the scaling process for transform coefficients in section 8.7.3 of VVC draft 6. Add the value shown in <add> and< / add> between, delete the <delete> and< / delete> between.

[0207] The list levelScale[][] is specified as levelScale[j][k] = {{40, 45, 51, 57, 64, 72}, {57, 64, 72, 80, 90, 102}}, where j = 0..1, k = 0..5.

[0208] The (nTbW)x(nTbH) array dz is set equal to the (nTbW)x(nTbH) array TransCoeffLevel[xTbY][yTbY][cIdx].

[0209] To derive the scaled transform coefficients d[x][y] where x=0..nTbW-1, y=0..nTbH-1, the following applies:

[0210] – The intermediate scaling factor m[x][y] is derived as follows:

[0211] – m[x][y] is set equal to 16 if one or more of the following conditions are true:

[0212] –sps_scaling_list_enabled_flag is equal to 0.

[0213] –transform_skip_flag[xTbY][yTbY] is equal to 1.

[0214] – Otherwise, the following applies:

[0215] <add>if(lfnst_idx[xTbY][yTbY]!=0)

[0216] scW=4

[0217] swH=4

[0218] else

[0219] scW=nTbW

[0220] scH=nTbH< / add>

[0221] m[x][y]=ScalingFactor[Log2( <add> wxya< / add> <delete> nB< / delete> )][Log2( <add> HkDJ< / add> <delete> nB< / delete> )][matrixId][x][y],

[0222] Where matrixId is as specified in Table 7-5 (8-958)

[0223] – The scaling factor ls[x][y] is derived as follows:

[0224] …

[0225] In some examples, the LFNST coefficients may be different for different block sizes. For example, when LFNST is enabled, the values ​​scW and scH may depend on the block size nTbW, nTbH, and lfnstIdx. For example, for a 64×64 block size, the number of coefficients may be limited to within an 8×8 region instead of a 4×4 region. In this case, scW and scH may be set to 8 instead of 4.

[0226] In some examples, the video encoder 200 or the video decoder 300 may apply an implicit QP offset of -1 to all LFNST blocks. The following changes may be made to the scaling process of transform coefficients in Section 8.7.3 of VVC draft 6. Additions are shown in <add> and< / add>between.

[0227] Scaling process of transform coefficients

[0228] …

[0229] – The scaling factor ls[x][y] is derived as follows:

[0230] <add> –The variable qPFinal is set equal to (lfnstIdx[xTbY][yTbY]!=0)? qP–1:qP< / add>

[0231] – If dep_quant_enabled_flag is equal to 1, the following applies:

[0232] ls[x][y]=(m[x][y]*levelScale[rectNonTsFlag][(qP <add> Final< / add> +1)%6])<<((qP <add> Final< / add> +1) / 6)(8-959)

[0233] – Otherwise (dep_quant_enabled_flag is equal to 0), the following applies:

[0234] ls[x][y]=(m[x][y]*levelScale[rectNonTsFlag][qP <add> Final< / add> %6])<<(qP <add> Final< / add> / 6)(8-960)

[0235] In some alternatives, the implicit QP may not be applied to all color components. For example, the implicit QP may be applied only to the luma component and not to the chroma components.

[0236] In one example, the video encoder 200 may signal a flag in the APS or scaling_list_data syntax structure to specify whether a scaling matrix may be applied to a LFNST codec block. In some examples, when a scaling matrix is ​​applied, a scaling matrix corresponding to a 4×4 transform block size may be applied to a given matrixID value (i.e., prediction type and component). The modifications to VVC Draft 6 are as follows. Additions are shown in <add> and< / add> between, delete the <delete> and< / delete> between.

[0237]

[0238] Table 4

[0239] <add>scaling_matrix_for_lfnst_disable_flag equal to 1 specifies that the scaling matrix should not be used for blocks encoded with LFNST.

[0240] scaling_matrix_for_lfnst_disable_flag equal to 0 specifies that the scaling matrix can be applied to blocks encoded with LFNST.< / add>

[0241] The following changes were made to Section 8.7.3, “Scaling process for transform coefficients”.

[0242] To derive the scaled transform coefficients d[x][y] where x=0..nTbW-1, y=0..nTbH-1, the following applies:

[0243] …

[0244] The intermediate scaling factor m[x][y] is derived as follows:

[0245] – m[x][y] is set equal to 16 if one or more of the following conditions are true:

[0246] sps_scaling_list_enabled_flag is equal to 0.

[0247] transform_skip_flag[xTbY][yTbY] is equal to 1.

[0248] <add>scaling_matrix_for_lfnst_disable_flag is equal to 1 and lfnst_idx[xTbY][yTbY] is not equal to 0

[0249] All of the following conditions are true:

[0250] scaling_matrix_for_lfnst_disable_flag is equal to 0

[0251] lfnst_idx[xTbY][yTbY] is not equal to 0

[0252] x is greater than or equal to 4

[0253] y is greater than or equal to 4< / add>

[0254] – Otherwise, the following applies:

[0255] <add>scW=(lfnst_idx[xTbY][yTbY]!=0)?4:nTbW

[0256] scH=(lfnst_idx[xTbY][yTbY]!=0)?4:nTbH< / add>

[0257] m[x][y]=ScalingFactor[Log2( <delete> nB< / delete> W)][Log2( <delete> nB< / delete> H)][matrixId][x][y], where matrixId is as specified in Table 7-5 (8-958)

[0258] -The scaling factor ls[x][y] is derived as follows:

[0259] …

[0260] Fig.102 is a flowchart illustrating an example scaling matrix signaling technique according to the present disclosure. The video encoder 200 or the video decoder 300 may determine whether the scaling matrix can be applied to the LFNST codec block of the video data (330). For example, the video encoder 200 may determine that the scaling matrix should not be used for the LFNST codec block. The video encoder 200 may process a syntax element indicating whether the scaling matrix can be applied to the LFNST codec block by generating a syntax element, and may signal the syntax element in the bitstream to indicate whether the scaling matrix can be applied to the LFNST codec block. The video encoder 200 may signal the syntax element in an SPS, PPS, or APS. The video encoder 200 may signal the syntax element in a scaling list data syntax structure in the bitstream. The video decoder 300 determines whether the scaling matrix can be applied to the LFNST codec block based on the syntax element received in one of the SPS, PPS, or APS. For example, the video decoder 300 may parse the syntax element. In some examples, the video decoder 300 may derive a value indicating whether the scaling matrix can be applied to the LFNST codec block.

[0261] Based on the determination that the scaling matrix may not be applied to the LFNST codec block, the video encoder 200 or the video decoder 300 may not apply the scaling matrix to the LFNST codec block (332). For example, the video encoder 200 or the video decoder may refrain from applying the scaling matrix to the LFNST codec block based on the determination that the scaling matrix may not be applied to the LFNST codec block. The video encoder 200 or the video decoder 300 may encode and decode the video data without applying the scaling matrix to the LFNST codec block (334). For example, the video encoder 200 may encode the video data without applying the scaling matrix to the LFNST codec block, and the video decoder 300 may decode the video data without applying the scaling matrix to the LFNST codec block.

[0262] In some examples, the video decoder 300 may determine whether to process the syntax element based on at least one criterion. In some examples, the at least one criterion may be at least one of a characteristic of the LFNST codec block, a prediction mode for encoding and decoding the LFNST codec block, a component of the LFNST codec block, or a primary transform applied to the LFNST codec block. In some examples, the characteristic includes at least one of a block width of the LFNST codec block, a block height of the LFNST codec block, or a block aspect ratio of the LFNST codec block. In some examples, the component includes a luma component of the LFNST codec block or a chroma component of the LFNST codec block.

[0263] In other examples, video encoder 200 or video decoder 300 may determine whether the scaling matrix may be applied to the LFNST codec block based on a tool for encoding and decoding the LFNST codec block or specific parameters used with the tool.

[0264] Fig.11 2 is a flowchart illustrating an example method for encoding a current block. The current block may include a current CU. Although with respect to the video encoder 200 ( Figure 1 and Figure 3 ), but it should be understood that other devices may be configured to perform similar Fig.11 method.

[0265] In this example, the video encoder 200 initially predicts the current block (350). For example, the video encoder 200 may form a prediction block for the current block. The video encoder 200 may then calculate a residual block for the current block (352). To calculate the residual block, the video encoder 200 may calculate the difference between the original uncoded block and the prediction block for the current block. The video encoder 200 may then transform and quantize the coefficients of the residual block (354). In some examples, the video encoder 200 may determine a syntax element indicating whether the scaling matrix will not be applied to the low frequency non-separable transform (LFNST) coefficients, such as by generating a syntax element indicating whether the scaling matrix will not be applied to the LFNST coefficients. The video encoder 200 may not apply the scaling matrix to the LFNST coefficients based on the syntax element indicating that the scaling matrix will not be applied to the LFNST coefficients. Next, the video encoder 200 may scan the quantized transform coefficients of the residual block (356). During the scan, or after the scan, the video encoder 200 may entropy encode the transform coefficients (358). For example, video encoder 200 may encode the transform coefficients using CAVLC or CABAC.Video encoder 200 may then output entropy encoded data for the block (360).

[0266] Fig.12 is a flowchart illustrating an example method for decoding a current block of video data. The current block may include a current CU. Although with respect to the video decoder 300 ( Figure 1 and Figure 4 ), but it should be understood that other devices may be configured to perform similar Fig.12 method.

[0267] The video decoder 300 may receive entropy encoded data for a current block, such as entropy encoded data corresponding to entropy encoded prediction information for the current block and coefficients of a residual block (370). The video decoder 300 may entropy decode the entropy encoded data to determine prediction information for the current block and reproduce coefficients of the residual block (372). The video decoder 300 may predict the current block (374), for example, using an intra-frame or inter-frame prediction mode as indicated by the prediction information of the current block to calculate the prediction block of the current block. The video decoder 300 may then inverse scan the reproduced coefficients (376) to produce a block of quantized transform coefficients. The video decoder 300 may then inverse quantize and inverse transform the transform coefficients to produce a residual block (378). In some examples, the video decoder 300 may determine a syntax element indicating whether a scaling matrix is ​​not to be applied to the LFNST coefficients. Based on the syntax element indicating that the scaling matrix is ​​not to be applied to the LFNST coefficients, the video decoder 300 may not apply the scaling matrix to the LFNST coefficients. The video decoder 300 may finally decode the current block by combining the prediction block and the residual block ( 380 ).

[0268] According to the technology of the present disclosure, the disadvantages of using the existing scaling matrix can be avoided. In addition, the coding efficiency (eg, processing power and latency) can be improved by not applying the scaling matrix when it is not desired to apply the scaling matrix.

[0269] This disclosure includes the following examples.

[0270] Example 1. A method for encoding and decoding video data, the method comprising: determining a syntax element indicating whether a scaling matrix will not be applied to a low-frequency non-separable transform (LFNST) coefficient; based on the syntax element indicating that the scaling matrix will not be applied to the LFNST coefficient, not applying the scaling matrix to the LFNST coefficient; and encoding and decoding the video data based on not applying the scaling matrix to the LFNST coefficient.

[0271] Example 2. The method of Example 1, wherein the syntax element is signaled in the bitstream.

[0272] Example 3. A method according to Example 2, wherein the syntax element is signaled in one of a sequence parameter set, a picture parameter set, or an adaptation parameter set in the bitstream.

[0273] Example 4. A method according to Example 3, wherein the syntax element is signaled in an adaptive parameter set.

[0274] Example 5. A method according to Example 2, wherein the syntax element is signaled in a scaling list data syntax structure.

[0275] Example 6. The method of Example 1, wherein determining the syntax element comprises deriving the syntax element.

[0276] Example 7. A method according to any combination of Examples 1-6, wherein the syntax element indicates whether the scaling matrix will not be applied to the LFNST coefficients if a predetermined condition exists, wherein the predetermined condition includes at least one of a block characteristic, a prediction mode used, a component, or an applied primary transform.

[0277] Example 8. The method of Example 7, wherein the block characteristic comprises at least one of a block width, a block height, or a block aspect ratio.

[0278] Example 9. The method of Example 7 or 8, wherein the component comprises a luminance component or a chrominance component.

[0279] Example 10. A method according to any combination of Examples 1-9, wherein the syntax element indicates whether the scaling matrix is ​​not to be applied to the LFNST coefficients based on a tool applied to the block of video data or a tool with predetermined parameters applied to the block of video data.

[0280] Example 11. The method of Example 10, wherein the predetermined parameters include a primary transform of a non-DCT2 kernel.

[0281] Example 12. A method of encoding and decoding video data, the method comprising: applying a scaling matrix corresponding to an M1×N1 transform block size to low frequency non-separable transform (LFNST) coefficients to create scaled coefficients; and encoding and decoding the video data based on the scaled coefficients.

[0282] Example 13. The method of Example 12, wherein the scaling matrix corresponds to a transform block size of 4×4.

[0283] Example 14. The method of Example 12, wherein when LFNST is enabled, the values ​​of scW and scH depend on the block sizes nTbW, nTbH, and lfnstIdx.

[0284] Example 15. A method for encoding and decoding video data, the method comprising: determining whether a scaling matrix for M×N is obtained by upscaling; if the scaling method is obtained by upscaling, determining whether M1 is not greater than K1 and whether N1 is not greater than K2; if M1 is not greater than K1 and N1 is not greater than K2, applying the upper left M1×N1 samples of the K1×K2 matrix to the LFNST coefficients to create scaled coefficients; and encoding and decoding the video data based on the scaled coefficients, wherein the K1×K2 matrix is ​​the scaling matrix used before upscaling.

[0285] Example 16. The method of Example 15, wherein upsampling of scaling matrix coefficients is not applied.

[0286] Example 17. The method of Example 15, wherein if M1 is greater than K1, the scaling matrix coefficients are upsampled in the M1 dimension.

[0287] Example 18. The method of Example 15, wherein if N1 is greater than K2, the scaling matrix coefficients are upsampled in the N1 dimension.

[0288] Example 19. A method of encoding and decoding video data, the method comprising: applying a first quantization parameter (QP) offset to encode and decode a transform block (TB); and encoding and decoding the video data based on the TB.

[0289] Example 20. The method of Example 19, wherein the first QP offset is inferred to be equal to a value.

[0290] Example 21. The method of Example 20, wherein the value is -1.

[0291] Example 22. The method of Example 19, wherein the first QP offset is implicit.

[0292] Example 23. The method of Example 22, wherein the first QP offset is based on block size.

[0293] Example 24. The method of Example 23, wherein the first QP offset is larger for smaller block sizes.

[0294] Example 25. A method according to any combination of Examples 22-24, wherein the first QP offset is based on one or more of block size, intra mode, primary transform used, prediction mode used, or QP value.

[0295] Example 26. The method of any combination of Examples 22-25, wherein the first QP offset is based on the QP of the block, lfnstIdx, and an intra mode.

[0296] Example 27. The method of Example 26, wherein the first QP offset is applied as a function or a lookup table.

[0297] Example 28. A method according to any combination of Examples 19-27, wherein the first QP offset is signaled in the bitstream or derived by the video codec.

[0298] Example 29. The method of any combination of Examples 19-28, wherein, implicitly, the first QP offset is not applied to all color components.

[0299] Example 30. A method of encoding and decoding video data, the method comprising: applying a scaling vector of size nZ to coefficients of a LFNST block in place of a LFNST matrix to create scaled coefficients; and encoding and decoding the video data based on the scaled coefficients.

[0300] Example 31. A method for encoding and decoding video data, the method comprising: determining whether LFNST is applied to a block; if LFNST is applied, determining characteristics of the block; applying a scaling matrix or vector to the block to create scaled coefficients, the scaling matrix or vector being based on the characteristics of the block; and encoding and decoding the video data based on the scaled coefficients.

[0301] Example 32. The method of Example 31, wherein the characteristics of the block include one or more of block size, intra mode, lfnstIdx, or prediction mode.

[0302] Example 33. A method for encoding and decoding video data, the method comprising: determining whether LFNST is applied to a block; if LFNST is applied, determining a scaling vector or scaling matrix based on other scaling vectors or matrices; applying the scaling vector or matrix to the block to create scaled coefficients; and encoding and decoding the video data based on the scaled coefficients.

[0303] Example 34. A method according to any combination of Examples 12-33, wherein an unspecified scaling factor of one or more coefficients is inferred to be equal to zero.

[0304] Example 35. A method of encoding and decoding video data, the method comprising: determining whether a scaling matrix can be applied to a LFNST codec block; and encoding and decoding the LFNST codec block based on the determination.

[0305] Example 36. The method of Example 35, further comprising: determining a characteristic of a LFNST codec block; and limiting application of the scaling matrix to the LFNST codec block based on at least one characteristic of the LFNST codec block.

[0306] Example 37. A method according to Example 36, wherein the characteristics include one or more of block width / height / aspect ratio, prediction mode used, components, and primary transform applied.

[0307] Example 38. The method of Example 35, further comprising: determining a tool for encoding and decoding video data; and limiting application of the scaling matrix to the LFNST codec block based on the tool.

[0308] Example 39. The method of Example 38, wherein the tool is a non-DCT2 kernel.

[0309] Example 40. The method of any combination of Examples 1-39, wherein the method is applied to primary transform coefficients.

[0310] Example 41. A method according to any one of Examples 1-40, wherein encoding and decoding includes decoding.

[0311] Example 42. A method according to any one of Examples 1-41, wherein encoding and decoding includes encoding.

[0312] Example 43. A device for encoding and decoding video data, the device comprising one or more components for performing the method of any of Examples 1-42.

[0313] Example 44. An apparatus according to Example 43, wherein the one or more components include one or more processors implemented in the circuit.

[0314] Example 45. The apparatus of any one of Examples 43 or 44 further comprising a memory for storing video data.

[0315] Example 46. The apparatus of any combination of Examples 43-45, further comprising a display configured to display the decoded video data.

[0316] Example 47. A device according to any combination of Examples 43-46, wherein the device includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0317] Example 48. A device according to any combination of Examples 43-47, wherein the device includes a video decoder.

[0318] Example 49. A device according to any combination of Examples 43-48, wherein the device includes a video encoder.

[0319] Example 50. A computer-readable storage medium having instructions stored thereon, which when executed cause one or more processors to perform the method of any of Examples 1-42.

[0320] Although one or more of the above methods may be described for a particular type of block, these methods may be applied to different types of blocks, such as codec blocks, prediction blocks, transform blocks, or other types of blocks that specify some spatial partitioning of a picture.

[0321] 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 sequence, may be added, combined, or omitted entirely (e.g., not all described actions or events are necessary for the practice of the techniques). Moreover, in some examples, actions or events may be performed concurrently, such as through multithreading, interrupt handling, or multiple processors, rather than sequentially.

[0322] In one or more examples, the described functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored or sent as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media such as data storage media; or communication media, including, for example, any medium that facilitates the transfer of a computer program from one place to another according to a communication protocol. In this manner, computer-readable media may generally correspond to (1) non-transitory tangible computer-readable storage media or (2) communication media such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in the present disclosure. A computer program product may include a computer-readable medium.

[0323] As an example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store the required program code in the form of instructions or data structures and can be accessed by a computer. Similarly, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, optical fiber cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, microwaves are used to send instructions from a website, server or other remote source, then coaxial cable, optical fiber cable, twisted pair, DSL, or wireless technologies such as infrared, radio and microwaves 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 transient media, but are directed to non-transient, tangible storage media. Disks and optical disks used herein include compact disks (CDs), laser disks, optical disks, digital versatile disks (DVDs), floppy disks and blue-ray disks, wherein disks usually reproduce data magnetically, while optical disks reproduce data optically with lasers. The combination of the above items should also be included in the scope of computer-readable media.

[0324] Instructions may be executed by one or more processors such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Accordingly, the terms "processor" and "processing circuitry" as used herein may refer to any of the aforementioned structures or any other structure suitable for implementing the techniques described herein. In addition, in some aspects, the functionality described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Similarly, the technology may be fully implemented in one or more circuits or logic elements.

[0325] The techniques of the present disclosure may be implemented in a variety of devices or apparatuses, including wireless handheld devices, integrated circuits (ICs) or IC sets (e.g., chipsets). Various components, modules, or units are described in the present disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but do not necessarily need to be implemented by different hardware units. More specifically, as described above, the various units may be combined in a codec hardware unit or provided by a collection of interoperable hardware units including one or more processors as described above in combination with appropriate software and / or firmware.

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

Claims

1. A method for decoding video data, the method include: determining whether a scaling matrix for low frequency non-separable transform (LFNST) coefficients can be applied to a LFNST coding block of the video data; based on a determination that the scaling matrix may not be applied to the LFNST coding block, not applying the scaling matrix to the LFNST coding block; as well as The video data is decoded without applying the scaling matrix to the LFNST coding block.

2. The method according to claim 1, further comprising: include: A syntax element indicating whether the scaling matrix is ​​applicable to the LFNST coding block is received in one of a sequence parameter set, a picture parameter set, or an adaptation parameter set of a bitstream, wherein the determination of whether the scaling matrix is ​​applicable to the LFNST coding block is based on the syntax element. 3 . The method of claim 2 , further comprising determining whether to process the syntax element based on at least one criterion.

4. The method according to claim 3, in, The at least one criterion is based on at least one of a characteristic of the LFNST coding block, a prediction mode used to code the LFNST coding block, a component of the LFNST coding block, or a primary transform applied to the LFNST coding block.

5. The method according to claim 4, in, The characteristic comprises at least one of a block width of the LFNST coding block, a block height of the LFNST coding block, or a block aspect ratio of the LFNST coding block.

6. The method according to claim 4, in, The components include a luma component of the LFNST coding block or a chroma component of the LFNST coding block.

7. The method according to claim 2, in, The syntax elements are signaled in the scaling list data syntax structure.

8. The method of claim 1, further comprising deriving a value indicating whether a scaling matrix can be applied to the LFNST coding block.

9. The method of claim 1, further comprising determining whether a scaling matrix can be applied to the LFNST coding block based on a tool used to code the LFNST coding block or a specific parameter used with the tool.

10. A method for encoding video data, the method include: determining whether a scaling matrix for low frequency non-separable transform (LFNST) coefficients can be applied to a LFNST coding block of the video data; based on a determination that the scaling matrix may not be applied to the LFNST coding block, not applying the scaling matrix to the LFNST coding block; as well as The video data is encoded without applying the scaling matrix to the LFNST coding block.

11. The method according to claim 10, further comprising: include: A syntax element indicating whether the scaling matrix is ​​applicable to the LFNST coding block is signaled within one of a sequence parameter set, a picture parameter set, or an adaptation parameter set of a bitstream.

12. The method of claim 11, further comprising signaling the syntax element in a scaling list data syntax structure.

13. The method of claim 10, further comprising determining whether a scaling matrix can be applied to the LFNST coding block based on a tool used to code the LFNST coding block or a specific parameter used with the tool.

14. A device for decoding video data, the device include: A memory configured to store the video data; as well as one or more processors implemented in circuitry and communicatively coupled to the memory, the one or more processors being configured to: determining whether a scaling matrix for low frequency non-separable transform (LFNST) coefficients can be applied to a LFNST coding block of the video data; based on a determination that the scaling matrix may not be applied to the LFNST coding block, not applying the scaling matrix to the LFNST coding block; as well as The video data is decoded without applying the scaling matrix to the LFNST coding block.

15. The device according to claim 14, in, The one or more processors are further configured to cause the device to: receiving, in one of a sequence parameter set, a picture parameter set, or an adaptation parameter set of a bitstream, a syntax element indicating whether the scaling matrix can be applied to the LFNST coding block; as well as It is determined whether the scaling matrix can be applied to the LFNST coding block based on the syntax element.

16. The device according to claim 15, in, The one or more processors are further configured to determine whether to process the syntax element based on at least one criterion.

17. The device according to claim 16, in, The at least one criterion is based on at least one of a characteristic of the LFNST coding block, a prediction mode used to code the LFNST coding block, a component of the LFNST coding block, or a primary transform applied to the LFNST coding block.

18. The device according to claim 17, in, The characteristic comprises at least one of a block width of the LFNST coding block, a block height of the LFNST coding block, or a block aspect ratio of the LFNST coding block.

19. The device according to claim 17, in, The components include a luma component of the LFNST coding block or a chroma component of the LFNST coding block.

20. The device according to claim 15, in, The syntax elements are signaled in the scaling list data syntax structure.

21. The apparatus according to claim 14, in, The one or more processors are further configured to derive a value indicating whether a scaling matrix may be applied to the LFNST coding block.

22. The apparatus according to claim 14, in, The one or more processors are further configured to determine whether a scaling matrix can be applied to the LFNST coding block based on a tool used to code the LFNST coding block or specific parameters used with the tool.

23. The device according to claim 14, in, The device comprises a wireless communication device.

24. A device for encoding video data, the device include: A memory configured to store the video data; as well as one or more processors implemented in circuitry and communicatively coupled to the memory, the one or more processors being configured to: determining whether a scaling matrix for low frequency non-separable transform (LFNST) coefficients can be applied to a LFNST coding block of the video data; based on a determination that the scaling matrix may not be applied to the LFNST coding block, not applying the scaling matrix to the LFNST coding block; as well as The video data is encoded without applying the scaling matrix to the LFNST coding block.

25. The device according to claim 24, in, The one or more processors are further configured to cause the device to: A syntax element indicating whether the scaling matrix is ​​applicable to the LFNST coding block is signaled within one of a sequence parameter set, a picture parameter set, or an adaptation parameter set of a bitstream.

26. The device according to claim 25, in, The one or more processors are configured to cause the device to signal the syntax element in a zoom list data syntax structure.

27. The apparatus according to claim 24, in, The one or more processors are further configured to determine whether a scaling matrix can be applied to the LFNST coding block based on a tool used to code the LFNST coding block or specific parameters used with the tool.

28. A non-transitory computer-readable storage medium having stored thereon instructions that, when executed by one or more processors, cause the one or more processors to: Determining whether a scaling matrix for low frequency non-separable transform (LFNST) coefficients can be applied to a LFNST coded block of video data; based on a determination that the scaling matrix may not be applied to the LFNST coding block, not applying the scaling matrix to the LFNST coding block; as well as The video data is decoded without applying the scaling matrix to the LFNST coding block.

29. The non-transitory computer-readable storage medium of claim 28, in, The instructions further cause the one or more processors to: receiving, in one of a sequence parameter set, a picture parameter set, or an adaptation parameter set of a bitstream, a syntax element indicating whether the scaling matrix can be applied to the LFNST coding block; as well as Determine whether the scaling matrix is ​​applicable to the LFNST coding block based on the syntax element.

30. A non-transitory computer-readable storage medium having stored thereon instructions that, when executed by one or more processors, cause the one or more processors to: Determining whether a scaling matrix for low frequency non-separable transform (LFNST) coefficients can be applied to a LFNST coded block of video data; based on a determination that the scaling matrix may not be applied to the LFNST coding block, not applying the scaling matrix to the LFNST coding block; as well as The video data is encoded without applying the scaling matrix to the LFNST coding block.

31. The non-transitory computer-readable storage medium of claim 30, in, The instructions further cause the one or more processors to signal, within one of a sequence parameter set, a picture parameter set, or an adaptation parameter set of a bitstream, a syntax element indicating whether the scaling matrix is ​​applicable to the LFNST coding block.

32. A device for decoding video data, the device include: means for determining whether a scaling matrix for low frequency non-separable transform (LFNST) coefficients can be applied to a LFNST coding block of video data; means for not applying the scaling matrix to the LFNST coding block based on a determination that the scaling matrix may not be applied to the LFNST coding block; as well as Means for decoding the video data without applying the scaling matrix to the LFNST coding block.

33. The device according to claim 32, further comprising: include: means for receiving, within one of a sequence parameter set, a picture parameter set, or an adaptation parameter set of a bitstream, a syntax element indicating whether the scaling matrix may be applied to the LFNST coding block; as well as Means for determining, based on the syntax element, whether the scaling matrix can be applied to the LFNST coding block.

34. A device for encoding video data, the device include: means for determining whether a scaling matrix for low frequency non-separable transform (LFNST) coefficients can be applied to a LFNST coding block of video data; means for not applying the scaling matrix to the LFNST coding block based on a determination that the scaling matrix may not be applied to the LFNST coding block; as well as Means for encoding the video data without applying the scaling matrix to the LFNST coding block.

35. The apparatus of claim 32, further comprising means for signaling, within one of a sequence parameter set, a picture parameter set, or an adaptation parameter set of a bitstream, a syntax element indicating whether the scaling matrix can be applied to the LFNST coding block.