Intra-mode dependent multiple transform selection for video coding
Patent Information
- Application Number
- JP2023559794
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-04-11
- Filing Date
- 2022-04-12
- Publication Date
- 2025-04-07
- Estimated Expiration
- 2042-04-12
AI Technical Summary
Existing video coding techniques do not effectively utilize the differences in residual characteristics for blocks of various sizes and intra prediction modes, leading to suboptimal video compression performance.
A video coder selects a multiple transform selection (MTS) scheme based on the size and intra prediction mode of video blocks, applying horizontal and vertical transforms to improve compression efficiency.
This approach enhances video compression without degrading video quality by optimizing transform selection for different block sizes and prediction modes, leading to improved encoding and decoding efficiency.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[0001] This application claims priority to U.S. Patent Application No. 17 / 658,803, filed April 11, 2022, and U.S. Provisional Application No. 63 / 173,884, filed April 12, 2021, and U.S. Provisional Application No. 63 / 223,377, filed July 19, 2021, the entire contents of each of which are incorporated herein by reference. U.S. Patent Application No. 17 / 658,803, filed April 11, 2022, claims the benefit of U.S. Provisional Application No. 63 / 173,884, filed April 12, 2021, and U.S. Provisional Application No. 63 / 223,377, filed July 19, 2021.
[0002] TECHNICAL FIELD This disclosure relates to video coding, including video encoding and video decoding. [Background technology]
[0003] Digital video capabilities may 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 gaming devices, video game consoles, cellular or satellite radio telephones, so-called "smartphones," video teleconferencing devices, video streaming devices, etc. Digital video devices implement video coding techniques such as those described in standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4, Part 10, Advanced Video Coding (AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC), ITU-T H.266 / Versatile Video Coding (VVC), and extensions to such standards, as well as proprietary video codecs / formats such as AOMedia Video 1 (AV1) developed by the Alliance for Open Media. By implementing such video coding techniques, video devices may more efficiently transmit, receive, encode, decode, and / or store digital video information.
[0004] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) may be partitioned into video blocks, which may also be referred to as coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial prediction with respect to reference samples in neighboring blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture may use spatial prediction with respect to reference samples in neighboring blocks in the same picture or temporal prediction with respect to reference samples in other reference pictures. A picture may be referred to as a frame, and a reference picture may be referred to as a reference frame. Summary of the Invention [Means for solving the problem]
[0005] Generally, this disclosure describes techniques for selecting a multiple transform selection (MTS) scheme for video coding. A video coder may partition a picture into blocks and code each block separately. The coding generally includes forming a predictive block according to a prediction mode and coding a residual block, where the residual block represents a difference between the predictive block and an actual block. A video encoder may apply a transform to the residual block, while a video decoder may apply an inverse transform to the transform block to reconstruct the residual block. The MTS scheme includes multiple transforms applied during residual block coding, including horizontal and vertical transforms. According to the techniques of this disclosure, a video coder may be configured to select an MTS scheme according to a size of the block and an intra prediction mode for the block.
[0006] In some examples, the video coder may determine the MTS scheme according to a size group that includes the size of the block. For example, the size group may be a range of block sizes. The video coder may be configured with various different size groups, each corresponding to a different MTS scheme. Additionally or alternatively, in some examples, the video coder may determine the MTS scheme according to a mode group that includes an intra-prediction mode for the current block. For example, the mode group may be a set of intra-prediction modes. The video coder may be configured with various different mode groups, each corresponding to a different MTS scheme. In some examples, the video coder may apply size symmetry to select the MTS scheme. For example, a size of M×N (where M and N are unequal integer values and predicted using directional intra-prediction modes) may be mapped to an MTS scheme, and the video coder may be configured to select the same MTS scheme for an N×M block predicted using symmetric directional intra-prediction modes.
[0007] In one example, a method for decoding video data includes the steps of: determining a size of a current block of video data; determining an intra-prediction mode for the current block of video data; determining a mode group including the determined intra-prediction mode, where the mode group is one of a plurality of mode groups, each mode group among the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups; determining a set of available multiple transform selection (MTS) schemes for the current block according to the size and intra-prediction mode for the current block, where the set of available MTS schemes is one set of available MTS schemes among a plurality of sets of MTS schemes; determining an MTS scheme from the set of available MTS schemes according to the determined mode group; applying a transform of the MTS scheme to a transform block of the current block to generate a residual block for the current block; and decoding the current block using the residual block.
[0008] In another example, a device for decoding (and possibly also encoding) video data may include a memory configured to store the video data; and one or more processors implemented in a circuit configured to: determine a size of a current block of video data; determine an intra-prediction mode for the current block of video data; determine a mode group including the determined intra-prediction mode, where the mode group is one of a plurality of mode groups, each mode group among the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups; determine a set of available multiple transform selection (MTS) schemes for the current block according to the size and intra-prediction mode for the current block, where the set of available MTS schemes is one set of available MTS schemes among a plurality of sets of MTS schemes; determine an MTS scheme from the set of available MTS schemes according to the determined mode group; apply a transform of the MTS scheme to a transform block of the current block to generate a residual block for the current block; and decode the current block using the residual block.
[0009] In another example, a computer-readable storage medium storing instructions that, when executed, cause a processor of a device for decoding video data to determine a size of a current block of video data; determine an intra-prediction mode for the current block of video data; determine a mode group including the determined intra-prediction mode, where the mode group is one of a plurality of mode groups, each mode group among the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups; determine a set of available multiple transform selection (MTS) schemes for the current block according to the size and intra-prediction mode for the current block, where the set of available MTS schemes is one set of available MTS schemes among a plurality of sets of MTS schemes; determine an MTS scheme from the set of available MTS schemes according to the determined mode group; apply a transform of the MTS scheme to a transform block of the current block to generate a residual block for the current block; and decode the current block using the residual block.
[0010] In another example, a device for decoding (and possibly encoding) video data includes means for determining a size of a current block of video data; means for determining an intra-prediction mode for the current block of video data; means for determining a mode group including the determined intra-prediction mode, where the mode group is one of a plurality of mode groups, each mode group among the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups; means for determining a set of available multiple transform selection (MTS) schemes for the current block according to the size and intra-prediction mode for the current block, where the set of available MTS schemes is one set of available MTS schemes among a plurality of sets of MTS schemes; means for determining an MTS scheme from the set of available MTS schemes according to the determined mode group; means for applying a transform of the MTS scheme to a transform block of the current block to generate a residual block for the current block; and means for decoding the current block using the residual 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] FIG. 1 is a block diagram illustrating an example video encoding and decoding system that may implement the techniques of this disclosure. [Diagram 2] FIG. 1 is a conceptual diagram showing a normal angle intra prediction mode and a wide angle intra prediction mode. [Diagram 3] 1 is a flow diagram illustrating an example of a matrix intra-prediction (MIP) process. [Figure 4]FIG. 1 is a conceptual diagram illustrating an example of constructing a histogram for gradient computation for decoder-side intra mode derivation and fused intra prediction (DIMD). [Diagram 5] 1 is a flow diagram illustrating an example weight determination and predicted block generation process for DIMD. [Figure 6] FIG. 1 is a conceptual diagram illustrating templates and reference samples used for template-based intra mode derivation with fusion (TIMD). [Figure 7] 1 is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure. [Figure 8] 1 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure. [Figure 9] 1 is a flowchart illustrating an example method for encoding a current block, in accordance with techniques of this disclosure. [Figure 10] 5 is a flowchart illustrating an example method for decoding a current block, in accordance with techniques of this disclosure. [Figure 11] 5 is a flowchart illustrating another example method for decoding a block of video data in accordance with techniques of this disclosure. [Figure 12] 5 is a flowchart illustrating another example method for decoding a block of video data in accordance with techniques of this disclosure. [Figure 13] 5 is a flowchart illustrating another example method for decoding a block of video data in accordance with techniques of this disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Video coding standards include ITU-T H.261, ISO / IEC MPEG-1 Visual, ITU-T H.262 or ISO / IEC MPEG-2 Visual, ITU-T H.263, ISO / IEC MPEG-4 Visual (MPEG-4 Part 2), ITU-T H.264 (also known as ISO / IEC MPEG-4 AVC) with its Scalable Video Coding (SVC) extension and Multiview Video Coding (MVC) extension, and ITU-T H.265 (also known as ISO / IEC MPEG-4 HEVC (High Efficiency Video Coding)) with its extensions. Standardization activities for Versatile Video Coding (VVC) (also known as ITU-T H.266) began during the April 2018 meeting of the Joint Video Experts Team (JVET), with evaluation of video compression techniques submitted in response to a Call for Proposals.
[0014] Generally, this disclosure describes techniques for selecting a multiple transform selection (MTS) scheme for video coding. A video coder may partition a picture into blocks and code each block separately. The coding generally includes forming a predictive block according to a prediction mode and coding a residual block, where the residual block represents a difference between the predictive block and an actual block. A video encoder may apply a transform to the residual block, while a video decoder may apply an inverse transform to the transform block to reconstruct the residual block. The MTS scheme includes multiple transforms applied during residual block coding, including horizontal and vertical transforms. According to the techniques of this disclosure, a video coder may be configured to select an MTS scheme according to a size of the block and an intra prediction mode for the block.
[0015] Said et al., "CE6.1.1: Extended AMT," Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 11th Meeting: Ljubljana, Slovenia, July 10-18, 2018, Document No. JVET-K0375-v2 (hereinafter "JVET-K0375"), describes an exemplary process for determining the MTS scheme using only the shortest side of a non-square block. As a result, for example, a 16×4 block and a 4×4 block will be treated the same for MTS determination purposes. However, statistically, the respective residual characteristics for these blocks may be different even if these blocks use the same intra-prediction mode. In addition, matrix intra-prediction (MIP) modes may have different residual characteristics compared to directional intra-prediction modes. However, JVET-K0375 does not specify a different set of transforms for MIP modes. This disclosure describes various techniques for selecting an MTS scheme that can take advantage of residual characteristics for blocks of various sizes, taking into account both horizontal and vertical directions in block size, and also taking into account MIP mode as a possible intra-prediction mode. Thus, these techniques can improve video compression without adversely affecting video quality.
[0016] 1 is a block diagram illustrating an example video encoding and decoding system 100 that may perform the techniques of this disclosure. The techniques of this disclosure are generally directed to coding (encoding and / or decoding) video data. In general, video data includes any data for processing video. Thus, video data may include raw uncoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling data.
[0017] As shown in Figure 1, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116, in this example. Specifically, source device 102 provides the video data to destination device 116 via a computer-readable medium 110. Source device 102 and destination device 116 may comprise any of a wide range of devices, including desktop computers, notebook (i.e., laptop) computers, mobile devices, tablet computers, set-top boxes, telephone handsets such as smartphones, televisions, cameras, display devices, digital media players, video gaming consoles, video streaming devices, broadcast receiver devices, and the like. 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.
[0018] In the example of FIG. 1, the source device 102 includes a video source 104, a memory 106, a video encoder 200, and an output interface 108. The destination device 116 includes an input interface 122, a video decoder 300, a memory 120, and a display device 118. According to this disclosure, the video encoder 200 of the source device 102 and the video decoder 300 of the destination device 116 may be configured to apply techniques for determining a multiple transform selection (MTS) scheme according to a size of a current block and an intra-prediction mode for the current block. Thus, the source device 102 represents an example of a video encoding device, and the destination device 116 represents an example of a video decoding device. In other examples, the source device and the destination device may include other components or configurations. For example, the source device 102 may receive video data from an external video source, such as an external camera. Similarly, the destination device 116 may interface with an external display device rather than including an integrated display device.
[0019] The system 100 as shown in FIG. 1 is only an example. In general, any digital video encoding and / or decoding device may perform a technique for determining a multiple transform selection (MTS) scheme according to a size of a current block and an intra-prediction mode for the current block. The source device 102 and the destination device 116 are only examples of coding devices such that the source device 102 generates coded video data for transmission to the destination device 116. This disclosure refers to devices that perform coding (encoding and / or decoding) of data as "coding" devices. Thus, the video encoder 200 and the video decoder 300 represent examples of coding devices, specifically, video encoders and video decoders, respectively. In some examples, the source device 102 and the destination device 116 may operate in a substantially symmetric manner such that each of the source device 102 and the destination device 116 includes video encoding and decoding components. Thus, the system 100 may support unidirectional or bidirectional video transmission between the source device 102 and the destination device 116, for example, video streaming, video playback, video broadcasting, or video telephony.
[0020] In general, video source 104 represents a source of video data (i.e., raw, uncoded video data) and provides a continuous series of pictures (also called "frames") of the video data to video encoder 200, which encodes the data for the pictures. Video source 104 of source device 102 may include a video capture device, such as a video camera, a video archive containing previously captured raw 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, archived, and computer-generated video. In each case, video encoder 200 encodes the captured, pre-captured, or computer-generated video data. Video encoder 200 may reorder the pictures from the order in which they were received (sometimes called "display order") into a coding order for coding. Video encoder 200 may generate a bitstream including the encoded video data. The source device 102 may then output the encoded video data via the output interface 108 onto a computer-readable medium 110 for receipt and / or retrieval by, for example, an input interface 122 of the destination device 116 .
[0021] The memory 106 of the source device 102 and the memory 120 of the destination device 116 represent general-purpose memories. In some examples, the memories 106, 120 may store raw video data, e.g., raw video from the video source 104 and raw decoded video data from the video decoder 300. Additionally or alternatively, the memories 106, 120 may store software instructions executable by, e.g., the video encoder 200 and the video decoder 300, respectively. Although the memories 106 and 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 may also include internal memories for functionally similar or equivalent purposes. Additionally, the memories 106, 120 may store encoded video data, e.g., the output from the video encoder 200 and the input to the video decoder 300. In some examples, a portion of the memory 106, 120 may be allocated as one or more video buffers, for example, for storing raw, decoded, and / or encoded video data.
[0022] The computer-readable medium 110 may represent any type of medium or device capable of transporting 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 allows the source device 102 to transmit encoded video data directly to the destination device 116 in real time, for example, via a radio frequency network or a computer-based network. The output interface 108 may modulate a transmission signal including the encoded video data and the input interface 122 may demodulate a received transmission signal according to a communication standard such as a wireless communication protocol. The communication medium may comprise 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 routers, switches, base stations, or any other equipment that may be useful to facilitate communication from the source device 102 to the destination device 116.
[0023] 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, a Blu-ray disc, a DVD, a CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.
[0024] In some examples, source device 102 may output the encoded video data to a file server 114 or another intermediate storage device, which may store the encoded video data generated by source device 102. Destination device 116 may access the stored video data from file server 114 via streaming or download.
[0025] The file server 114 may be any type of server device capable of storing encoded video data and transmitting the encoded video data to the destination device 116. The file server 114 may represent a web server (e.g., for a website), a server configured to provide file transfer protocol services (such as File Transfer Protocol (FTP) or File Delivery over Unidirectional Transport (FLUTE) protocol), a Content Delivery Network (CDN) device, a Hypertext Transfer Protocol (HTTP) server, a Multimedia Broadcast Multicast Service (MBMS) or enhanced MBMS (eMBMS) server, and / or a Network Attached Storage (NAS) device. The file server 114 may additionally or alternatively implement one or more HTTP streaming protocols, such as Dynamic Adaptive Streaming over HTTP (DASH), HTTP Live Streaming (HLS), Real Time Streaming Protocol (RTSP), HTTP Dynamic Streaming, etc.
[0026] The destination device 116 may access the encoded video data from the file server 114 through 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 input interface 122 may be configured to operate according to any one or more of the various protocols discussed above for retrieving or receiving media data from the file server 114 or other such protocols for retrieving media data.
[0027] The output interface 108 and the input interface 122 may represent a wireless transmitter / receiver, a modem, a wired networking component (e.g., an Ethernet card), a wireless communication component operating according to any of the various IEEE 802.11 standards, or other physical components. In examples in which the output interface 108 and the input interface 122 comprise wireless components, the output interface 108 and the input interface 122 may be configured to transfer data, such as encoded video data, according to a cellular communication standard, such as 4G, 4G-LTE (Long Term Evolution), LTE Advanced, 5G, etc. In some examples in which the output interface 108 comprises a wireless transmitter, the output interface 108 and the input interface 122 may be configured to transfer data, such as encoded video data, according to other wireless standards, such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee™), the Bluetooth™ standard, etc. In some examples, the source device 102 and / or the destination device 116 may include respective system-on-chip (SoC) devices. For example, the source device 102 may include a SoC device for performing functions attributed to the video encoder 200 and / or the output interface 108, and the destination device 116 may include a SoC device for performing functions attributed to the video decoder 300 and / or the input interface 122.
[0028] The techniques of this disclosure may be applied to video coding supporting any of a variety of multimedia applications, such as over-the-air television broadcast, cable television transmission, satellite television transmission, Internet streaming video transmission such as Dynamic Adaptive Streaming over HTTP (DASH), digital video encoded on a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0029] 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 having values that describe characteristics and / or processing of video blocks or other coded 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 liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.
[0030] Although not shown in FIG. 1, 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 that include both audio and video in a common data stream.
[0031] The video encoder 200 and the video decoder 300 may each be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When the techniques are implemented partially in software, a device may store instructions for the software on a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Each of the video encoder 200 and the video decoder 300 may be included in one or more encoders or decoders, any of which may be integrated as part of a combined encoder / decoder (CODEC) in the respective device. A device including the video encoder 200 and / or the video decoder 300 may comprise an integrated circuit, a microprocessor, and / or a wireless communication device such as a cellular phone.
[0032] The video encoder 200 and the video decoder 300 may operate according to a video coding standard, such as ITU-T H.265, also referred to as High Efficiency Video Coding (HEVC), or an extension thereof, such as a multiview and / or scalable video coding extension. Alternatively, the video encoder 200 and the video decoder 300 may operate according to other proprietary or industry standards, such as ITU-T H.266, also referred to as Versatile Video Coding (VVC). In other examples, the video encoder 200 and the video decoder 300 may operate according to a proprietary video codec / format, such as AOMedia Video 1 (AV1), an extension of AV1, and / or a successor version of AV1 (e.g., AV2). In other examples, the video encoder 200 and the video decoder 300 may operate according to other proprietary formats or industry standards. However, the techniques of this disclosure are not limited to any particular coding standard or format. In general, video encoder 200 and video decoder 300 may be configured to perform the techniques of this disclosure with any video coding technique that uses determining a multiple transform selection (MTS) scheme according to the size of the current block and the intra-prediction mode for the current block.
[0033] In general, the video encoder 200 and the video decoder 300 may perform block-based coding of pictures. The term “block” generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used in an encoding and / or decoding process). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. In general, the video encoder 200 and the video decoder 300 may code video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, rather than coding red, green, and blue (RGB) data for samples of a picture, the video encoder 200 and the video decoder 300 may code luminance and chrominance components, where the chrominance components may include chrominance components of both red and blue hues. In some examples, the video encoder 200 converts received RGB formatted data to a YUV representation prior to encoding, and the video decoder 300 converts the YUV representation to an RGB format. Alternatively, pre-processing and post-processing units (not shown) may perform these conversions.
[0034] This disclosure may generally refer to coding (e.g., encoding and decoding) a picture to include the process of encoding or decoding data for a picture. Similarly, this disclosure may refer to coding of a block of a picture, e.g., predictive and / or residual coding, to include the process of encoding or decoding data for the block. A coded video bitstream generally includes a set of values for syntax elements that represent coding decisions (e.g., coding modes) and partitioning of a picture into blocks. Thus, references to coding a picture or a block should generally be understood as coding values for the syntax elements that form the picture or block.
[0035] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video coder (such as the video encoder 200) partitions coding tree units (CTUs) into CUs according to a quadtree structure. That is, the video coder partitions CTUs and CUs into four equal non-overlapping squares, and each node of the quadtree has either zero or four child nodes. A node without child nodes may be called a "leaf node", and a CU of such a leaf node may include one or more PUs and / or one or more TUs. The video coder may further partition PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents a partition of TUs. In HEVC, a PU represents inter-predicted data, and a TU represents residual data. An intra-predicted CU includes intra-prediction information, such as an intra-mode indication.
[0036] 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 coder (such as the video encoder 200) partitions a picture into multiple coding tree units (CTUs). The video encoder 200 may partition the CTUs according to a tree structure, such as a quad-tree binary tree (QTBT) structure or a multi-type tree (MTT) structure. The QTBT structure eliminates the concept of multiple partition types, such as the distinction between CUs, PUs, and TUs in HEVC. The QTBT structure includes two levels, a first level partitioned according to a quad-tree partition and a second level partitioned according to a binary tree partition. The root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary tree correspond to coding units (CUs).
[0037] In the MTT partitioning structure, blocks may be partitioned using quad tree (QT) partitioning, binary tree (BT) partitioning, and one or more types of triple tree (TT) (also called ternary tree (TT)) partitioning. Triple tree or ternary tree partitioning is a partitioning in which a block is divided into three sub-blocks. In some examples, triple tree or ternary tree partitioning divides a block into three sub-blocks without splitting the original block through the center. Partition types in MTT (e.g., QT, BT, and TT) may be symmetric or asymmetric.
[0038] When operating according to the AV1 codec, the video encoder 200 and the video decoder 300 may be configured to code the video data on a block-by-block basis. In AV1, the largest coding block that may be processed is called a superblock. In AV1, a superblock may be either 128×128 luma samples or 64×64 luma samples. However, in successor video coding formats (e.g., AV2), a superblock may be defined by a different (e.g., larger) luma sample size. In some examples, a superblock is the top level of a block quadtree. The video encoder 200 may further partition the superblock into smaller coding blocks. The video encoder 200 may partition the superblock and other coding blocks into smaller blocks using square or non-square partitions. The non-square blocks may include N / 2×N, N×N / 2, N / 4×N, and N×N / 4 blocks. The video encoder 200 and the video decoder 300 may perform separate prediction and transformation processes for each of the coding blocks.
[0039] AV1 also defines tiles of video data. A tile is a rectangular array of superblocks that may be coded independently of other tiles. That is, video encoder 200 and video decoder 300 may encode and decode coding blocks within a tile, respectively, without using video data from other tiles. However, video encoder 200 and video decoder 300 may perform filtering across tile boundaries. Tiles may be uniform or non-uniform in size. Tile-based coding may enable parallel processing and / or multithreading for encoder and decoder implementations.
[0040] In some examples, video encoder 200 and video decoder 300 may use a single QTBT or MTT structure to represent each of the luminance and chrominance components, while in other examples, video encoder 200 and video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luminance component and another QTBT / MTT structure for both chrominance components (or two QTBT / MTT structures for each chrominance component).
[0041] Video encoder 200 and video decoder 300 may be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, superblock partitioning, or other partition structures.
[0042] In some examples, the CTU includes a coding tree block (CTB) of luma samples, two corresponding CTBs of chroma samples for a picture with three sample arrays, or a CTB of samples for a picture coded using three separate color planes and syntax structures used to code a monochrome picture or sample. The CTB may be an N×N block of samples for some value of N such that the division of the components into the CTB is partitioned. The components may be an array or a single sample of that array from one of the three arrays (luma and two chromas) for a 4:2:0, 4:2:2, or 4:4:4 color format picture, or an array or a single sample of that array for a monochrome format picture. In some examples, the coding block is an M×N block of samples for some value of M and N such that the division of the CTB into coding blocks is partitioned.
[0043] Blocks (e.g., CTUs or CUs) may be grouped in various ways in a picture. As an example, a brick may refer to a rectangular region of a CTU row in a particular tile in a picture. A tile may be a rectangular region of CTUs in a particular tile column and a particular tile row in a picture. A tile column refers to a rectangular region of CTUs with a height equal to the height of the picture and a width specified by a syntax element (e.g., in a picture parameter set, etc.). A tile row refers to a rectangular region of CTUs with a height specified by a syntax element (e.g., in a picture parameter set, etc.) and a width equal to the width of the picture.
[0044] In some examples, a tile may be partitioned into multiple bricks, each of which 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 true subset of a tile may not be referred to as a tile. Bricks in a picture may also be arranged in slices. A slice may be an integer number of bricks of a picture that may be contained exclusively in a single Network Abstraction Layer (NAL) Unit. In some examples, a slice includes either a certain number of complete tiles or only a continuous sequence of complete bricks of one tile.
[0045] This disclosure may use "NxN" 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, e.g., 16x16 samples or 16 by 16 samples. Generally, a 16x16 CU has 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an NxN CU generally has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. Samples within a CU may be arranged in rows and columns. Furthermore, a CU does not necessarily have to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may comprise NxM samples, where M is not necessarily equal to N.
[0046] The video encoder 200 encodes video data for a CU that represents prediction and / or residual information, as well as other information. The prediction information indicates how the CU will be predicted to form a predictive block for the CU. The residual information generally represents sample-by-sample differences between samples of the CU and samples of the predictive block prior to encoding.
[0047] To predict a CU, the video encoder 200 may generally form a predictive block for the CU through inter prediction or intra prediction. Inter prediction generally refers to predicting a CU from data of a previously coded picture, while intra prediction generally refers to predicting a CU from previously coded data of the same picture. To perform inter prediction, the video encoder 200 may generate a predictive block using one or more motion vectors. The video encoder 200 may generally perform motion search to identify a reference block that closely matches the CU, for example, with respect to the difference between the CU and the reference block. The video encoder 200 may calculate a difference metric using a sum of absolute differences (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared difference (MSD), or other such difference calculation to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 may predict the current CU using unidirectional prediction or bidirectional prediction.
[0048] Some examples of VVC also provide an affine motion compensation mode, which may be considered an inter-prediction mode. In an affine motion compensation mode, the video encoder 200 may determine two or more motion vectors that represent non-translational motion, such as zooming in or out, rotation, perspective motion, or other irregular motion types.
[0049] To perform intra prediction, the video encoder 200 may select an intra prediction mode to generate a predictive block. Some examples of VVC provide 67 intra prediction modes, including various orientation modes, as well as a planar mode and a DC mode. In general, the video encoder 200 selects an intra prediction mode that describes neighboring samples relative to a current block (e.g., a block of a CU) from which to predict samples of the current block. Such samples may generally be above, above and to the left, or to the left of the current block in the same picture as the current block, assuming that the video encoder 200 codes CTUs and CUs in raster scan order (left to right, top to bottom).
[0050] Video encoder 200 encodes data representing a prediction mode for the current block. For example, in the case of an inter prediction mode, video encoder 200 may encode data representing which of various available inter prediction modes is used, as well as motion information for the corresponding mode. In the case of unidirectional or bidirectional inter prediction, for example, video encoder 200 may encode motion vectors using advanced motion vector prediction (AMVP) or merge mode. Video encoder 200 may use similar modes to encode motion vectors for affine motion compensation modes.
[0051] AV1 includes two general techniques for encoding and decoding coding blocks of video data. The two general techniques are intra prediction (e.g., intra-frame prediction or spatial prediction) and inter prediction (e.g., inter-frame prediction or temporal prediction). In the context of AV1, when predicting a block of a current frame of video data using an intra prediction mode, the video encoder 200 and the video decoder 300 do not use video data from other frames of the video data. For most intra prediction modes, the video encoder 200 encodes the block of the current frame based on the difference between sample values in the current block and predicted values generated from reference samples in the same frame. The video encoder 200 determines the predicted values generated from the reference samples based on the intra prediction mode.
[0052] Following prediction, such as intra- or inter-prediction, of a block, the video encoder 200 may calculate residual data for the block. The residual data, such as a residual block, represents sample-by-sample differences between the block and a predictive block for that block formed using a corresponding prediction mode. The video encoder 200 may apply one or more transforms to the residual block to generate transform data in a transform domain rather than the sample domain. For example, the video encoder 200 may apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. In addition, the video encoder 200 may apply a secondary transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), etc., following the first transform. In some examples, the video encoder 200 and the video decoder 300 may be configured to perform a multiple transform selection (MTS) scheme, which may include applying both a horizontal transform and a vertical transform to a block. The video encoder 200 generates the transform coefficients following application of one or more transforms.
[0053] As mentioned above, following any transformation to generate transform coefficients, the video encoder 200 may perform quantization of the transform coefficients. Quantization generally refers to a process in which transform coefficients are quantized to possibly reduce the amount of data used to represent the transform coefficients, achieving further compression. By performing a quantization process, the video encoder 200 may reduce the bit depth associated with some or all of the transform coefficients. For example, the video encoder 200 may truncate an n-bit value to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, the video encoder 200 may perform a bitwise right shift of the value to be quantized.
[0054] Following quantization, the video encoder 200 may scan the transform coefficients and generate a one-dimensional vector from the two-dimensional matrix including the quantized transform coefficients. The scan may be designed to place transform coefficients of higher energy (and therefore lower frequency) at the front of the vector and transform coefficients of lower energy (and therefore higher frequency) at the rear of the vector. In some examples, the video encoder 200 may utilize a predefined scan order for scanning the quantized transform coefficients to generate a serialized vector and then entropy encode the quantized transform coefficients of the vector. In other examples, the video encoder 200 may perform an adaptive scan. After scanning the quantized transform coefficients to form the one-dimensional vector, the video encoder 200 may entropy encode the one-dimensional vector, e.g., according to context-adaptive binary arithmetic coding (CABAC). The video encoder 200 may also entropy encode values for syntax elements describing metadata associated with the encoded video data for use by the video decoder 300 in decoding the video data.
[0055] To perform CABAC, the video encoder 200 may assign a context in a context model to a symbol to be transmitted. The context may relate, for example, to whether neighboring values of the symbol are zeroed out or not. The probability determination may be based on the context assigned to the symbol.
[0056] Video encoder 200 may further generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data to video decoder 300, for example in a picture header, a block header, a slice header, or other syntax data, such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS). Video decoder 300 may similarly decode such syntax data to determine how to decode corresponding video data.
[0057] In this manner, video encoder 200 may generate a bitstream including syntax elements that describe encoded video data, e.g., partitions of a picture into blocks (e.g., CUs) and predictive and / or residual information for the blocks. Finally, video decoder 300 may receive the bitstream and decode the encoded video data.
[0058] In general, video decoder 300 performs a process that is inverse to that performed by video encoder 200 to decode encoded video data of a bitstream. For example, video decoder 300 may decode values for syntax elements of a bitstream using CABAC in a manner that is inverse to but substantially similar to the CABAC encoding process of video encoder 200. The syntax elements may define partition information for partitioning of a picture into CTUs and partitioning of each CTU according to a corresponding partition structure, such as a QTBT structure, to define CUs of the CTU. The syntax elements may further define prediction and residual information for blocks (e.g., CUs) of video data.
[0059] The residual information may be represented, for example, by quantized transform coefficients. The video decoder 300 may dequantize and inverse transform the quantized transform coefficients of the block to reconstruct a residual block for the block. The video decoder 300 uses the signaled prediction mode (intra-prediction or inter-prediction) and associated prediction information (e.g., motion information for inter-prediction) to form a predictive block for the block. The video decoder 300 may then combine (sample-by-sample) the predictive block and the residual block to reconstruct the original block. The video decoder 300 may perform additional processing, such as performing a deblocking process to reduce visual artifacts along block boundaries.
[0060] This disclosure may generally refer to "signaling" certain information, such as syntax elements. The term "signaling" may generally refer to communication of values for syntax elements and / or other data used to decode the encoded video data. That is, video encoder 200 may signal values for syntax elements in a bitstream. In general, signaling refers to generating values in a bitstream. As mentioned above, source device 102 may transport the bitstream to destination device 116 substantially in real time or not in real time, such as may occur when storing syntax elements to storage device 112 for later retrieval by destination device 116.
[0061] As described above, the video encoder 200 and the video decoder 300 may be configured to apply an MTS scheme to a current block. For example, the video encoder 200 may apply an MTS scheme (including horizontal and vertical transforms) to a residual block, while the video decoder 300 may apply an MTS scheme to a transform block to reconstruct the residual block. According to the techniques of this disclosure, the MTS scheme may correspond to one of a set of available MTS schemes, and the video encoder 200 and the video decoder 300 may select a set of available MTS schemes from a plurality of sets of MTS schemes according to the size of the current block and the intra-prediction mode for the current block.
[0062] Figure 2 is a conceptual diagram showing normal angle intra prediction mode and wide angle intra prediction mode. In order to capture any edge direction presented in natural video, the number of directional intra modes in VTM5 is expanded to 65 from 33 used in HEVC. The new directional modes in VVC are shown in Figure 2, while the planar and DC modes remain the same as in HEVC. These denser directional intra prediction modes apply to all block sizes and to both luma intra prediction and chroma intra prediction in VVC.
[0063] The traditional (or "normal") angular intra prediction direction is defined in HEVC from 45 degrees to -135 degrees in a clockwise direction, which corresponds to modes 2 to 66 in Figure 2. To provide better prediction for non-square blocks, angles other than 45 degrees to -135 degrees are considered in VVC, which are shown in Figure 2 as modes [67, 80] and [-1, -14]. These modes are sometimes called "wide-angle" modes. For blocks with a width (W) greater than their height (H), mode [67, 80] is considered, and for blocks with a width (W) less than their height (H), mode [-1, -14] is considered. These directional intra prediction modes may be used in combination with either multiple reference line (MRL) or intra-sub partition modes (ISP). Details can be found in J. Chen, Y. Ye, S. Kim, "Algorithm description for Versatile Video Coding and Test Model 10 (VTM10)," 19th JVET Conference, Teleconference, July 2020, JVET-S2002, and B. Bross, J. Chen, S. Liu, "Versatile Video Coding (Draft 10)," 19th JVET Conference, Teleconference, July 2020, JVET-S2001.
[0064] FIG. 3 is a flow diagram showing an example of a matrix intra prediction (MIP) process. The matrix weighted intra prediction (MIP) method is an intra prediction technique in VVC. To predict samples of a rectangular block 129 of width W and height H, a video coder (e.g., video encoder 200 or video decoder 300) performing matrix weighted intra prediction (MIP) takes as input one row of H reconstructed adjacent boundary samples (samples 130B) to the left of block 129 and one row of W reconstructed adjacent boundary samples (samples 130A) above block 129. If the reconstructed samples are not available, the video coder generates values for them as is done in conventional intra prediction. The generation of a prediction signal is based on three steps: averaging, matrix vector multiplication, and linear interpolation, as shown in FIG. 3.
[0065] Specifically, the video coder may average samples 130B to form averaged sample 132B and average samples 130A to form averaged sample 132A. The video coder may then perform matrix-vector multiplication using averaged samples 132A, 132B to form intermediate prediction block 136. The video coder may then perform linear interpolation on the samples of intermediate prediction block 136 to form prediction block 138.
[0066] There are three different sizes Id used for the MIP process in VVC. VVC defines the index idx=idx(W,H) as follows:
[0067]
number
[0068] For idx=0, 1, and 2, there are 16, 12, and 6 matrices defined, respectively, which also define the number of modes for that given idx. In addition, each mode may be transposed, in which case samples from the left and top are swapped before performing the matrix-vector multiplication. Thus, in addition, the video coder may code a transpose flag (along with the mode signaling) when a CU is coded with MIP to indicate whether the mode is transposed or not.
[0069] FIG. 4 is a conceptual diagram illustrating an example of constructing histograms 140A, 140B for gradient calculation for decoder-side intra mode derivation and fusion intra prediction (DIMD). FIG. 5 is a flow diagram illustrating an example weight determination and prediction block generation process for DIMD. Abdoli et al., "Non-CE3: Decoder-side Intra Mode Derivation with Prediction Fusion Using Planar," Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 15th Meeting: Gothenburg, Sweden, July 3-12, 2019, Document No. JVET-O0449-v2, describes performing intra prediction (using already decoded neighboring reconstructed samples) based on the decoder-derived intra mode and fusing it with planar prediction samples. In JVET-O0449, the two angular modes are selected from a histogram of gradients (HoG), calculated from the neighboring pixels of the current block. Once the two angular modes are selected, their predictors are calculated using the conventional angular intra-prediction modes (IPM) and the final predictor of the block. The weights of the planar modes are kept at 21 / 64 (≈1 / 3), and the remaining 43 / 64 are distributed proportionally to the two angular modes based on the corresponding amplitudes in the HoG. The HoG is calculated by sliding a 3×3 window along the left and top neighboring reconstruction samples, as shown in FIG. 4. The final predicted block 150 may be calculated using a weighted combination of the predicted block formed from the intra-prediction modes M1, M2, and the planar modes.
[0070] Figure 6 is a conceptual diagram showing the templates and reference samples used for template-based intra mode derivation with fusion (TIMD).Wang et al., "EE2-related: Template-based intra mode derivation using MPMs," Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29, 22nd Meeting, Remote Conference, April 20-28, 2021, Document No. JVET-V0098-v2, proposed another decoder-side intra mode derivation method as template-based intra mode derivation.
[0071] FIG. 6 illustrates the concept of TIMD. Given a current CU 160, a video coder (e.g., video encoder 200 or video decoder 300) selects two template regions (e.g., above the current CU 160 and to the left of the current CU 160) and correspondingly selects reference samples for those templates. For each mode in the MPM list, the video coder may generate a prediction for the template region and calculate a sum of absolute transform difference (SATD) cost on the template region between the predicted sample and the reconstructed sample. The video coder may select the mode with the lowest cost as the mode for TIMD. The video coder may also use several angle intra modes (including a wide-angle mode) that are expanded (doubled) compared to VVC, i.e., the angles are arranged twice as densely.
[0072] Additionally, Cao et al., “EE2-related: Fusion for template-based intra mode derivation,” Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29, 23rd Meeting, Remote Conference, July 7-16, 2021, Document No. JVET-W0123-v2, proposed fusion for TIMD. According to JVET-W0123, instead of selecting only one mode with the minimum SATD cost, the video coder may pick the first two modes with the minimum SATD cost for an intra mode derived using the TIMD method, and then fuse these two modes with weights. The video coder may use such weighted intra prediction to code the current CU. The video coder may compare the costs of the two selected modes to a threshold, for example, by applying a cost factor of 2 as follows: costMode2 < 2*costMode1
[0073] If this condition is true, the video coder may apply fusion, otherwise the video coder may use only mode1.
[0074] The video coder may calculate the weight for a mode from the mode's SATD cost, as follows: weight1 = costMode2 / (costMode1 + costMode2) weight2 = 1 - weight1
[0075] In addition to the DCT-II adopted in HEVC, the Multiple Transform Selection (MTS) scheme is used for residual coding for both inter-coded and intra-coded blocks in VVC. The MTS scheme uses multiple selected transforms, for example, from DCT8 / DST7. The newly introduced transform matrices are DST-7 and DCT-8. Both of these two transform kernels can be applied to both vertical and horizontal transforms, corresponding to four different combinations of horizontal transform (trHor) and vertical transform (trVer), as follows: {trVer, trHor} = {DST7, DST7}, {DST7, DCT8}, {DCT8, DST7}, {DCT8, DCT8}
[0076] In JVET-O0449, a flag (cu_mts_flag) is signaled to indicate, for a given coding unit, whether DCT2 is used for both trHor and trVer (cu_mts_flag = 0) or not (cu_mts_flag = 1). If DCT2 is not used, another syntax named cu_mts_idx is signaled to indicate which transform combination among these four DST7 / DCT8 combinations is used.
[0077] JVET-K0375 describes additional transform kernels, including DCT5, DST1, DST4, and identity transform. Seven transform sets are defined, with each transform set having four different transform pairs (for {trVer, trHor}). A lookup table is defined to assign each of the seven transform sets based on different intra prediction modes and block sizes. The seven transform sets are designed as follows: T 0, intra = { (DST-4, DST-4), (DST-7, DST-7), (DST-4, DCT-8), (DCT-8, DST-4)} T 1, intra= { (DST-7, DST-7), (DST-7, DCT-5), (DCT-5, DST-7), (DST-1, DCT-5)} T 2, intra = { (DST-7, DST-7), (DST-7, DCT-8), (DCT-8, DST-7), (DCT-5, DCT-5)} T 3, intra = { (DST-4, DST-4), (DST-4, DCT-5), (DCT-8, DST-4), (DST-1, DST-7)} T 4, intra = { (DST-4, DST-7), (DST-7, DCT-5), (DCT-8, DST-7), (DST-1, DST-7)} T 5, intra = { (DST-7, DST-7), (DST-7, DCT-5), (DCT-8, DST-7), (DST-1, DST-7)} T 6, intra = { (DST-7, DST-7), (DST-7, DCT-5), (DCT-5, DST-7), (DST-1, DST-7)}
[0078] In JVET-K0375, the identity transform is applied to blocks that do not exceed 16x16 and have intra mode within a proximity in the horizontal intra direction and vertical intra direction, where the proximity is defined by a block size-based threshold. If the transform index is equal to 3 and the block satisfies the above conditions, the horizontal and / or vertical identity transform is applied.
[0079] According to the techniques of this disclosure, video encoder 200 and video decoder 300 may be configured to select an MTS scheme according to a block size and an intra-prediction mode for a block. Video encoder 200 and video decoder 300 may classify a block into one of 16 different size groups based on both width and height, for example, as shown in Table 1 below, where the size groups are represented as {W×H}, where W represents the width in samples and H represents the height in samples.
[0080] [Table 1]
[0081] In the above, N is an integer value that is a power of 2 and is greater than 16 (eg, greater than or equal to 32).
[0082] The video encoder 200 and the video decoder 300 may additionally or alternatively classify the prediction mode into one of a number of intra-prediction mode groups (e.g., five mode groups) based on the intra-prediction mode information. Table 2 below illustrates an example of mode group classification.
[0083] [Table 2]
[0084] In an example where both size groups (e.g., 16 size groups) and mode groups (e.g., 5 mode groups) are used, a total of 16*5=80 groups may be considered. Thus, the intra-prediction mode and block size may correspond to a particular group of available MTS schemes. An MTS scheme generally represents a combination of transforms, e.g., horizontal and vertical transforms. All possible MTS schemes may be divided into a set of available MTS schemes for a particular group of block characteristics, e.g., size groups and / or mode groups. Each size group and / or mode group may have four MTS scheme (transform pair) options, which may correspond to different signaled values of an MTS index, e.g., cu_mts_idx. Thus, cu_mts_idx may have a value in {0, 3} inclusive, representing a particular MTS scheme in the group of available MTS schemes, which is determined according to the size and intra-prediction mode for the current block. Specifically, the group of available MTS schemes may be determined according to a size group including the size of the block (e.g., according to Table 1) and / or a mode group including the intra prediction mode (e.g., according to Table 2) for the current block.
[0085] In some examples, the number of transform pairs may depend on the block shape (eg, whether the width is greater than the height) and / or the quantization parameter of the corresponding transform block.
[0086] In addition, in some examples, the video encoder 200 and the video decoder 300 may be configured to use joint mode and block symmetry for transform pair design. For example, mode i (i>34) with block shape A×B is mapped to the same group corresponding to (68-i) with block shape B×A. However, for each transform pair in that group, the vertical and horizontal transforms are swapped.
[0087] In other words, if a first block has a size of W×H, is predicted using intra prediction mode i, and is transformed using a transform pair of a horizontal transform and a vertical transform, video encoder 200 and video decoder 300 may select the same transform pair for a second block that has a size of H×W, is predicted using intra prediction mode (68-i), but applies the horizontal transform as the vertical transform and the vertical transform as the horizontal transform.
[0088] For example, assume that a 16x4 block with mode 18 (horizontal prediction) is mapped to a group and the signaled cu_mts_idx corresponds to the transform pair {trVer, trHor}={DCT8, DST7}. Then, if a 4x16 block with mode 50 (vertical prediction) is mapped to the same group and has the same cu_mts_idx, the transform pair becomes {trVer, trHor}={DST7, DCT8}.
[0089] For MIP coded blocks, video encoder 200 and video decoder 300 may use the corresponding transpose flag along with the block shape symmetry to determine the MTS scheme. For example, video encoder 200 and video decoder 300 may map a MIP coded block having shape A×B with the MIP transpose flag on to the same group as a group of block shape B×A with the MIP transpose flag off.
[0090] If the block is coded in DIMD mode, the video encoder 200 and the video decoder 300 may use the dominant angle mode (with the highest weight) to derive the transform pair. Alternatively, if the difference between the two angle mode values is greater than a threshold, the video encoder 200 and the video decoder 300 may treat the mode as a planar mode (mode 0) to determine the MTS kernel. Otherwise, if the difference between the two angle mode values is less than or equal to a threshold, the video encoder 200 and the video decoder 300 may use only the dominant mode to determine the MTS kernel.
[0091] For wide-angle intra-prediction modes, the video encoder 200 and the video decoder 300 may use the closest conventional angle mode for transform set determination. For example, the video encoder 200 and the video decoder 300 may use mode 2 for all modes between -2 and -14. Similarly, the video encoder 200 and the video decoder 300 may use mode 66 for modes 67 to 80.
[0092] An example of a mapping table for deriving MTS groups according to prediction modes and block sizes (shapes) is shown in Table 3 below.
[0093] [Table 3]
[0094] Below is an example mapping of transform pair indices to corresponding transform pairs (ie, MTS scheme): const uint8_t g_aucTrIdxToTr
[25] [2] = { { DCT8, DCT8}, { DCT8, DST7}, { DCT8, DCT5}, { DCT8, DST4}, { DCT8, DST1}, { DST7, DCT8}, { DST7, DST7}, { DST7, DCT5}, { DST7, DST4}, { DST7, DST1}, { DCT5, DCT8}, { DCT5, DST7}, { DCT5, DCT5}, { DCT5, DST4}, { DCT5, DST1}, { DST4, DCT8}, { DST4, DST7}, { DST4, DCT5}, { DST4, DST4}, { DST4, DST1}, { DST1, DCT8}, { DST1, DST7}, { DST1, DCT5}, { DST1, DST4}, { DST1, DST1}, };
[0095] Below are example mappings of each of the four different sets of transform pair indices to corresponding transform pairs (ie, MTS schemes). const uint8_t g_aucTrSet
[80] [4] = { { 17, 18, 23, 24}, { 3, 7, 18, 22}, { 2, 17, 18, 22}, { 3, 15, 17, 18}, { 3, 12, 18, 19}, { 12, 18, 19, 23}, { 2, 12, 17, 18}, { 2, 17, 18, 22}, { 2, 11, 17, 18}, { 12, 18, 19, 23}, { 12, 13, 16, 24}, { 2, 11, 16, 23}, { 2, 13, 17, 22}, { 2, 11, 17, 21}, { 13, 16, 19, 22}, { 7, 12, 13, 18}, { 1, 11, 12, 16}, { 3, 13, 17, 22}, { 1, 6, 12, 22}, { 12, 13, 15, 16}, { 18, 19, 23, 24}, { 2, 17, 18, 24}, { 3, 4, 17, 22}, { 12, 18, 19, 23}, { 12, 18, 19, 23}, { 6, 12, 18, 24}, { 2, 6, 12, 21}, { 1, 11, 17, 22}, { 3, 11, 16, 17}, { 8, 12, 19, 23}, { 7, 13, 16, 23}, { 1, 6, 11, 12}, { 1, 11, 17, 21}, { 6, 11, 17, 21}, { 8, 11, 14, 17}, { 6, 11, 12, 21}, { 1, 6, 11, 12}, { 2, 6, 11, 12}, { 1, 6, 11, 21}, { 7, 11, 12, 16}, { 8, 12, 19, 24}, { 1, 13, 18, 22}, { 2, 6, 17, 21}, { 11, 12, 16, 19}, { 8, 12, 17, 24}, { 6, 12, 19, 21}, { 6, 12, 13, 21}, { 2, 16, 17, 21}, { 6, 17, 19, 23}, { 6, 12, 14, 17}, { 6, 7, 11, 21}, { 1, 11, 12, 16}, { 1, 6, 11, 12}, { 6, 11, 12, 21}, { 7, 8, 9, 11}, { 6, 7, 11, 12}, { 6, 7, 11, 12}, { 1, 11, 12, 16}, { 6, 11, 17, 21}, { 6, 7, 11, 12}, { 12, 14, 18, 21}, { 1, 11, 16, 22}, { 1, 11, 16, 22}, { 7, 13, 15, 16}, { 1, 8, 12, 19}, { 6, 7, 9, 12}, { 2, 6, 12, 13}, { 1, 12, 16, 21}, { 7, 11, 16, 19}, { 7, 8, 11, 12}, { 6, 7, 11, 12}, { 6, 7, 11, 12}, { 1, 6, 11, 12}, { 6, 7, 11, 16}, { 6, 7, 11, 12}, { 6, 7, 11, 12}, { 6, 11, 12, 21}, { 1, 6, 11, 12}, { 6, 7, 11, 12}, { 6, 7, 11, 12},};
[0096] In the above example, the g_aucTrIdxToTr data structure represents a collection of 25 possible MTS schemes (transform pairs). These MTS schemes are associated with respective index values from 1 to 25. The g_aucTrSet data structure represents a collection of 80 different sets of MTS schemes. Specifically, the values in each of the sets of MTS schemes correspond to an index into the g_aucTrIdxToTr data structure. The size (e.g., size group) of the block and the intra-prediction mode (e.g., mode group) for the block may be mapped together to one of the entries of the g_aucTrIdxToTr data structure. The video encoder 200 and the video decoder 300 may further code a transform index representing an index value (0, 1, 2, or 3) into one of the entries of the g_aucTrIdxToTr data structure to which the set of available MTS schemes, i.e., the block size and the intra-prediction mode, are mapped. The video decoder 300 may use the decoded index value to determine one of the indexes in a set of entries of the g_aucTrIdxToTr data structure, and then use the determined one of the indexes from the set of entries in the g_aucTrIdxToTr data structure to determine the corresponding MTS scheme, for example, using the g_aucTrSet data structure.
[0097] For example, if the size of the current block is 4×4 and the intra-prediction mode is either mode 0 or mode 1, the size and intra-prediction mode for the current block are mapped to the first entry of the g_aucTrIdxToTr data structure (i.e., {17, 18, 23, 24}) (according to Table 3). If the decoded transform index has a value of 0, the video decoder 300 may determine that one of the indices is 17. The video decoder 300 may then use the g_aucTrSet data structure to determine that the MTS scheme is the 17th transform pair, i.e., {DST4, DST7}. As another example, if the size of the current block is 4×16 and the intra-prediction mode for the current block is either mode 0 or mode 1, the size and intra-prediction mode for the current block are mapped to the tenth entry of the g_aucTrIdxToTr data structure (i.e., {12, 18, 19, 23}) (according to Table 3). If the decoded transform index has a value of 3, the video decoder 300 may determine that one of the indices is 23. The video decoder 300 may use the g_aucTrSet data structure to determine that the MTS scheme is the 23rd transform pair, namely, {DST1, DCT5}.
[0098] As described above, in some examples, when TIMD is activated, the video encoder 200 and the video decoder 300 may use an expanded (e.g., doubled) number of intra-modes. That is, the angles of the intra-modes may be arranged twice as densely. Various techniques for deriving the transform kernel are described below.
[0099] In one example, when a TIMD mode includes one intra mode for intra prediction (i.e., no fusion), the video encoder 200 or video decoder 300 may map that intra mode to a VVC intra mode with the closest angle (selected from one of the 67+wide angle modes of VVC). The video encoder 200 or video decoder 300 may then use the mapped mode to determine the MTS kernel. If the VVC intra modes are a subset of the extended intra modes (i.e., every other intra mode in the extended set corresponds to a VVC intra mode), the conversion may be as follows (because mode 0 and mode 1 are non-angle modes, this conversion does not affect the values for those modes): mode = (mode<2? mode:((mode>>1)+1))
[0100] When a TIMD mode uses fusion (two modes are involved to generate the final intra prediction), the video encoder 200 or video decoder 300 may map only the dominant mode (having lower distortion) to a VVC intra mode to determine the MTS kernel.
[0101] According to a conventional error concealment mode (ECM), a video coder, such as video encoder 200 or video decoder 300, would employ a low frequency non-separable transform (LFNST) based on an intra mode. According to the techniques of this disclosure, video encoder 200 or video decoder 300 may be configured to apply the techniques described above to an LFNST transform kernel as well.
[0102] In another example, a lookup table (LUT) or mapping table for mapping intra modes to transform kernels may be specified when a TIMD mode is used. A table may be specified for the upscaled (doubled) angle, and video encoder 200 and video decoder 300 may be configured with this table.
[0103] When the video encoder 200 or the video decoder 300 applies TIMD with fusion (i.e., two modes are involved to generate the final intra prediction), the video encoder 200 and the video decoder 300 may use only the dominant mode to determine the MTS kernel.
[0104] Alternatively, when the difference between the two mode values is greater than a threshold, video encoder 200 and video decoder 300 may treat the mode as a planar mode (mode 0) to determine the MTS kernel. Otherwise, if the difference is less than or equal to the threshold, video encoder 200 and video decoder 300 may use only the dominant mode to determine the MTS kernel.
[0105] In another example, when TIMD mode is used, video encoder 200 and video decoder 300 may disable MTS, i.e., only DCT2 may be used for TIMD. In this case, video encoder 200 may avoid signaling mts_idx, and video decoder 300 may determine that mts_idx is not signaled and infer a value for mts_idx instead. This disabling may also depend on the block size, e.g., MTS may be disabled for some block sizes. Similarly, LFNST may also be disabled when TIMD coding is used, possibly in combination with block size restrictions.
[0106] 7 is a block diagram illustrating an example video encoder 200 that may perform techniques of this disclosure. FIG. 7 is provided for illustrative purposes and should not be considered a limitation of the techniques as broadly illustrated and described in this disclosure. For illustrative purposes, this disclosure describes a video encoder 200 according to VVC (ITU-T H.266 under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be performed by video encoding devices configured according to other video coding standards and video coding formats such as AV1 and successors of the AV1 video coding format.
[0107] 7, 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, a multiple transform selection (MTS) group 232, 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, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a DPB 218, an MTS group 232, and an entropy coding unit 220 may be implemented in one or more processors or processing circuits. For example, the units of video encoder 200 may be implemented as one or more circuits or logic elements as part of a hardware circuit, or as part of a processor, ASIC, or FPGA. Further, video encoder 200 may include additional or alternative processors or processing circuits for performing these and other functions.
[0108] 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 stored in the video data memory 230, for example, from the video source 104 (FIG. 1). The DPB 218 may act as a reference picture memory that stores reference video data for use in predicting subsequent video data by the video encoder 200. The video data memory 230 and the DPB 218 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The video data memory 230 and the DPB 218 may be provided by the same memory device or separate memory devices. In various examples, the video data memory 230 may be on-chip with other components of the video encoder 200, as shown, or may be off-chip relative to those components.
[0109] In this disclosure, references to video data memory 230 should not be construed as limited to memory internal to video encoder 200, unless specifically described as such, or to memory external to video encoder 200, unless specifically described as such. Rather, references to video data memory 230 should be understood as a reference memory that stores video data that video encoder 200 receives for encoding (e.g., video data for a current block to be encoded). Memory 106 of FIG. 1 may also provide temporary storage of outputs from various units of video encoder 200.
[0110] The various units in FIG. 7 are illustrated to aid in understanding the operations performed by the video encoder 200. The units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. A fixed-function circuit refers to a circuit that provides a specific function and is preset for the operations that may be performed. A programmable circuit refers to a circuit that may be programmed to perform various tasks and provides flexible functionality in the operations that may be performed. For example, a programmable circuit may execute software or firmware that causes the programmable circuit to operate in a manner defined by the software or firmware instructions. Although a fixed-function circuit may execute software instructions (e.g., to receive parameters or output parameters), the types of operations that the fixed-function circuit performs are generally invariant. In some examples, one or more of the units may be different circuit blocks (fixed function or programmable), and in some examples, one or more of the units may be integrated circuits.
[0111] The video encoder 200 may include an arithmetic logic unit (ALU), an elementary function unit (EFU), digital circuits, analog circuits, and / or a programmable core formed from programmable circuits. In examples in which the operations of the video encoder 200 are performed using software executed by programmable circuits, the memory 106 (FIG. 1) may store instructions for the software (e.g., object code) that the video encoder 200 receives and executes, or another memory (not shown) within the video encoder 200 may store such instructions.
[0112] The video data memory 230 is configured to store the received video data. The video encoder 200 may retrieve pictures of the video data from the video data memory 230 and provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data memory 230 may be raw video data to be encoded.
[0113] 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. By way of example, the mode selection unit 202 may include a palette unit, an intra block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.
[0114] The mode selection unit 202 typically coordinates multiple encoding passes to test combinations of encoding parameters and resulting rate-distortion values for such combinations. The encoding parameters may include partitioning of the CTU into CUs, prediction modes for the CUs, transform types for residual data of the CUs, quantization parameters for residual data of the CUs, etc. The mode selection unit 202 may ultimately select a combination of encoding parameters that has a better rate-distortion value than the other tested combinations.
[0115] Video encoder 200 may partition a picture retrieved from video data memory 230 into a series of CTUs and encapsulate one or more CTUs within a slice. Mode select unit 202 may partition the CTUs of a picture according to a tree structure, such as the MTT structure, QTBT structure, superblock structure, or quadtree structure described above. As described above, video encoder 200 may form one or more CUs from partitioning the CTUs according to the tree structure. Such a CU may also be generally referred to as a "video block" or "block."
[0116] In general, the mode selection unit 202 also controls its components (e.g., motion estimation unit 222, motion compensation unit 224, and intra prediction unit 226) to generate a prediction block for a current block (e.g., a current CU, or in HEVC, an overlapping portion of a PU and a TU). In the case of inter prediction of the current block, the motion estimation unit 222 may perform 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 may calculate a value representing how similar a potential reference block is to the current block according to, for example, a sum of absolute differences (SAD), a sum of squared differences (SSD), a mean absolute difference (MAD), a mean squared difference (MSD), etc. The motion estimation unit 222 may generally perform these calculations using a sample-by-sample difference between the current block and the reference block under consideration. Motion estimation unit 222 may identify the reference block having the lowest value resulting from these calculations, which indicates the reference block that most closely matches the current block.
[0117] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of a reference block in a reference picture relative to the position of a current block in a current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, in the case of unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, while in the case of bidirectional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then generate a predictive block using the motion vectors. For example, the motion compensation unit 224 may use the motion vectors to retrieve data of the reference block. As another example, in the case of a motion vector having fractional sample precision, the motion compensation unit 224 may interpolate values for the predictive block according to one or more interpolation filters. Furthermore, in the case of bidirectional inter prediction, the motion compensation unit 224 may retrieve data for the two reference blocks identified by the respective motion vectors and combine the retrieved data, for example, by sample-wise averaging or weighted averaging.
[0118] When operating according to the AV1 video coding format, the motion estimation unit 222 and the motion compensation unit 224 may be configured to encode coding blocks of video data (e.g., both luma coding blocks and chroma coding blocks) using translational motion compensation, affine motion compensation, overlapped block motion compensation (OBMC), and / or hybrid inter-intra prediction.
[0119] As another example, for intra prediction or intra predictive coding, the intra prediction unit 226 may generate a predictive block from samples neighboring the current block. For example, for a directional mode, the intra prediction unit 226 may generally mathematically combine values of neighboring samples and populate these calculated values in a defined direction across the current block to generate a predictive block. As another example, for a DC mode, the intra prediction unit 226 may calculate an average of the neighboring samples for the current block and generate a predictive block to include this resulting average for each sample of the predictive block.
[0120] When operating according to the AV1 video coding format, the intra prediction unit 226 may be configured to encode coding blocks of video data (e.g., both luma coding blocks and chroma coding blocks) using directional intra prediction, non-directional intra prediction, recursive filter intra prediction, chroma-from-luma (CFL) prediction, intra block copy (IBC), and / or color palette modes. The mode selection unit 202 may include additional functional units for performing video prediction according to other prediction modes.
[0121] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives a raw, 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 sample-by-sample differences between the current block and the prediction block. The resulting sample-by-sample differences define a residual block for the current block. In some examples, the residual generation unit 204 may also determine differences between sample values in the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some examples, the residual generation unit 204 may be formed using one or more subtractor circuits that perform binary subtraction.
[0122] In an example where the mode selection unit 202 partitions a 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 having various sizes. As indicated above, the size of a CU may refer to the size of the luma coding block of the CU, and the size of a 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 a PU size of 2N×2N or N×N for intra prediction, and a symmetric PU size of 2N×2N, 2N×N, N×2N, N×N, or similar for inter prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning for PU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter prediction.
[0123] In examples where the mode selection unit 202 does not further partition the CUs into PUs, each PU may be associated with a luma coding block and a corresponding chroma coding block. As described above, the size of a CU may refer to the size of the luma coding block of the CU. The video encoder 200 and the video decoder 300 may support CU sizes of 2N×2N, 2N×N, or N×2N.
[0124] For other video coding techniques, such as intra block copy mode coding, affine mode coding, and linear model (LM) mode coding, as some examples, the mode selection unit 202 generates a predictive block for the current block being coded via a respective unit associated with the coding technique. In some examples, such as palette mode coding, the mode selection unit 202 may not generate a predictive block, but instead generate syntax elements that indicate how to reconstruct the block based on a selected palette. In such modes, the mode selection unit 202 may provide these syntax elements to the entropy coding unit 220 to be coded.
[0125] As described above, the residual generation unit 204 receives video data for a current block and a corresponding predictive 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 sample-by-sample differences between the predictive block and the current block.
[0126] Transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 may apply various transforms to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform to the residual block. In some examples, transform processing unit 206 may perform multiple transforms, e.g., a primary transform and a secondary transform, such as a rotation transform, on the residual block. In some examples, transform processing unit 206 does not apply a transform to the residual block.
[0127] According to the techniques of this disclosure, transform processing unit 206 may receive data representing a size and prediction mode (e.g., intra-prediction mode) for a current block of video data. Transform processing unit 206 may determine an MTS group from MTS groups 232 according to the size and prediction mode of the current block. For example, transform processing unit 206 may determine a size group that includes the size of the current block, e.g., according to Table 1 as described above. As another example, in addition or alternatively, transform processing unit 206 may determine a mode group that includes the intra-prediction mode for the current block, e.g., according to Table 2 above. Transform processing unit 206 may then select an MTS group from MTS groups 232 to which the size and intra-prediction mode (e.g., size group and / or mode group) are mapped, e.g., as described above with respect to Table 3. Similarly, in some examples, the transform processing unit 206 may exploit symmetry in block sizes and / or intra prediction modes, and a block of size M×N may be mapped to the same MTS group as a block of size N×M, e.g., as described above.
[0128] The transform processing unit 206 may evaluate each of the MTS schemes in the determined MTS group. The transform processing unit 206 may select one of the MTS schemes from the group, resulting in a transform block with the lowest energy (e.g., a transform block with the most zero-value coefficients or the lowest average coefficient value). The transform processing unit 206 may then send an index value to be coded as a transform index to the entropy coding unit 220, where the transform index identifies the determined MTS scheme in the MTS group. The transform processing unit 206 may also provide the index value to the inverse transform processing unit 212.
[0129] When operating according to AV1, transform processing unit 206 may apply one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 may apply various transforms to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply a combination of horizontal / vertical transforms, which may include a discrete cosine transform (DCT), an asymmetric discrete sine transform (ADST), an inverse ADST (e.g., a reverse ADST), and an identity transform (IDTX). When using an identity transform, a transform is skipped in one of the vertical or horizontal directions. In some examples, transform processing may be skipped.
[0130] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to generate 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 result in loss of information, and thus the quantized transform coefficients may have less precision than the original transform coefficients generated by transform processing unit 206.
[0131] 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 that corresponds to the current block (possibly with some distortion) based on the reconstructed residual block and the predictive 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 from the predictive block generated by the mode selection unit 202 to generate the reconstructed block.
[0132] According to the techniques of this disclosure, inverse transform processing unit 212 may receive data representing a size and prediction mode (e.g., intra-prediction mode) for a current block of video data. Inverse transform processing unit 212 may determine an MTS group from MTS groups 232 according to the size and prediction mode of the current block. For example, inverse transform processing unit 212 may determine a size group including a size of the current block, e.g., according to Table 1 as described above. As another example, in addition or alternatively, inverse transform processing unit 212 may determine a mode group including an intra-prediction mode for the current block, e.g., according to Table 2 above. Inverse transform processing unit 212 may further receive a transform index from transform processing unit 206. Inverse transform processing unit 212 may use the transform index to determine an MTS scheme among the MTS groups from MTS groups 232 to which the size and intra-prediction mode (e.g., size group and / or mode group) are mapped, e.g., as described above with respect to Table 3. Similarly, in some examples, the inverse transform processing unit 212 may exploit symmetry of block sizes and / or intra prediction modes, and a block of size M×N may be mapped to the same MTS group as a block of size N×M, e.g., as described above. The inverse transform processing unit 212 may inverse transform the transform block using the determined MTS scheme.
[0133] Filter unit 216 may perform one or more filter operations on the reconstructed blocks. For example, filter unit 216 may perform a deblocking operation to reduce blockiness artifacts along the edges of a CU. The operations of filter unit 216 may be skipped in some examples.
[0134] When operating according to AV1, filter unit 216 may perform one or more filter operations on the reconstructed blocks. For example, filter unit 216 may perform a deblocking operation to reduce blockiness artifacts along the edges of the CU. In other examples, filter unit 216 may apply a constrained directional enhancement filter (CDEF), which may be applied after deblocking, and may include application of a non-separable nonlinear low-pass directional filter based on the estimated edge direction. Filter unit 216 may also include a loop restoration filter applied after CDEF, and may include a separable symmetric normalized Wiener filter or a dual autoinduction filter.
[0135] The video encoder 200 stores the reconstructed blocks in the DPB 218. For example, in examples where the operations of the filter unit 216 are not performed, the reconstruction unit 214 may store the reconstructed blocks in the DPB 218. In examples where the operations of the filter unit 216 are performed, the filter unit 216 may store the filtered and reconstructed blocks in the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 may retrieve reference pictures formed from the reconstructed (and possibly filtered) blocks from the DPB 218 to inter predict blocks of a later-encoded picture. In addition, the intra prediction unit 226 may use the reconstructed blocks in the DPB 218 of the current picture to intra predict other blocks in the current picture.
[0136] In general, the entropy encoding unit 220 may entropy encode syntax elements received from other functional components of the video encoder 200. For example, the entropy encoding unit 220 may entropy encode quantized transform coefficient blocks from the quantization unit 208. As another example, the entropy encoding unit 220 may entropy encode predictive syntax elements (e.g., motion information for inter prediction or intra mode information for intra prediction) from the mode selection unit 202. The entropy encoding unit 220 may perform one or more entropy encoding operations on syntax elements, which are another example of video data, to generate entropy encoded data. For example, the entropy encoding 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 partitioned entropy (PIPE) coding operation, an exponential-Golomb coding operation, or another type of entropy coding operation on the data. In some examples, the entropy encoding unit 220 may operate in a bypass mode in which syntax elements are not entropy coded.
[0137] The video encoder 200 may output a bitstream that includes entropy-encoded syntax elements needed to reconstruct blocks of a slice or picture. In particular, the entropy encoding unit 220 may output the bitstream.
[0138] According to AV1, the entropy coding unit 220 may be configured as an inter-symbol adaptive multi-symbol arithmetic coder. A syntax element in AV1 includes an alphabet of N elements, and a context (e.g., a probability model) includes a set of N probabilities. The entropy coding unit 220 may store the probabilities as n-bit (e.g., 15-bit) cumulative distribution functions (CDFs). The entropy coding unit 220 may perform recursive scaling with an update factor based on the alphabet size to update the context.
[0139] The operations described above are described with respect to blocks. Such descriptions should be understood as being operations for luma coding blocks and / or chroma coding blocks. As described above, in some examples, the luma coding blocks and chroma coding blocks are luma and chroma components of a CU. In some examples, the luma coding blocks and chroma coding blocks are luma and chroma components of a PU.
[0140] In some examples, operations performed with respect to luma coding blocks do not need to be repeated for chroma coding blocks. As an example, operations for identifying motion vectors (MVs) and reference pictures for luma coding blocks do not need to be repeated to identify MVs and reference pictures for chroma coding blocks. Rather, the MVs for the luma coding blocks may be scaled to determine the MVs for the chroma coding blocks, and the reference pictures may be the same. As another example, the intra prediction process may be the same for luma coding blocks and chroma coding blocks.
[0141] Video encoder 200 may be configured to apply any of the techniques of this disclosure for determining and signaling an MTS scheme for a block of video data.
[0142] 8 is a block diagram illustrating an example video decoder 300 that may perform techniques of this disclosure. FIG. 8 is provided for purposes of explanation and not to limit the techniques as broadly illustrated and described in this disclosure. For purposes of explanation, this disclosure describes a video decoder 300 according to VVC (ITU-T H.266 under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be performed by video coding devices configured according to other video coding standards.
[0143] In the example of FIG. 8, the video decoder 300 includes a coded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, an MTS group 322, 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, the MTS group 322, and the DPB 314 may be implemented in one or more processors or processing circuits. For example, the units of the video decoder 300 may be implemented as one or more circuits or logic elements as part of a hardware circuit, or as part of a processor, ASIC, or FPGA. Additionally, the video decoder 300 may include additional or alternative processors or processing circuits for performing these and other functions.
[0144] 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 prediction according to other prediction modes. By way of example, the prediction processing unit 304 may include a palette unit, an intra block copy unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.
[0145] When operating according to AV1, the motion compensation unit 316 may be configured to decode coding blocks of the video data (e.g., both luma coding blocks and chroma coding blocks) using translational motion compensation, affine motion compensation, OBMC, and / or hybrid inter-intra prediction as described above. The intra prediction unit 318 may be configured to decode coding blocks of the video data (e.g., both luma coding blocks and chroma coding blocks) using directional intra prediction, non-directional intra prediction, recursive filter intra prediction, CFL prediction, intra block copy (IBC), and / or color palette mode as described above.
[0146] 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 obtained, for example, from the computer-readable medium 110 (FIG. 1). The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from the encoded video bitstream. The CPB memory 320 may also store video data other than syntax elements of a coded picture, such as temporary data representing output from various units of the video decoder 300. The DPB 314 generally stores decoded pictures that 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 dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The CPU memory 320 and the DPB 314 may be provided by the same memory device or separate memory devices. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300 or off-chip relative to those components.
[0147] Additionally or alternatively, in some examples, video decoder 300 may retrieve coded video data from memory 120 (FIG. 1). That is, memory 120 may store data such as those described above with respect to CPB memory 320. Similarly, memory 120 may store instructions to be executed by video decoder 300 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.
[0148] The various units shown in FIG. 8 are illustrated to aid in understanding the operations performed by the video decoder 300. The units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. As with FIG. 7, fixed-function circuits refer to circuits that provide specific functions and are preset for operations that may be performed. Programmable circuits refer to circuits that may be programmed to perform various tasks and provide flexible functionality in the operations that may be performed. For example, a programmable circuit may execute software or firmware that causes the programmable circuit to operate in a manner defined by the software or firmware instructions. Although a fixed-function circuit may execute software instructions (e.g., to receive parameters or output parameters), the types of operations that the fixed-function circuit performs are generally invariant. In some examples, one or more of the units may be different circuit blocks (fixed function or programmable), and in some examples, one or more of the units may be an integrated circuit.
[0149] The video decoder 300 may include a programmable core formed from ALUs, EFUs, digital circuits, analog circuits, and / or programmable circuits. In examples in which the operations of the video decoder 300 are performed by software executing on programmable circuits, on-chip or off-chip memory may store instructions of the software (e.g., object code) that the video decoder 300 receives and executes.
[0150] The entropy decoding unit 302 may receive the encoded video data from the CPB and entropy decode the video data to recover the syntax elements. The prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, and the filter unit 312 may generate decoded video data based on the syntax elements extracted from the bitstream.
[0151] In general, 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 (wherein the block currently being reconstructed, i.e., decoded, may be referred to as the “current block”).
[0152] The entropy decoding unit 302 may entropy decode the quantized transform coefficients of the quantized transform coefficient block, as well as syntax elements defining transform information, such as a quantization parameter (QP) and / or a transform mode indication. The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine the degree of quantization and, similarly, the degree of inverse quantization that the inverse quantization unit 306 should 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.
[0153] After the inverse quantization unit 306 forms the transform coefficient block, the inverse transform processing unit 308 may apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, the inverse transform processing unit 308 may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotational transform, an inverse transform, or another inverse transform to the transform coefficient block.
[0154] According to the techniques of this disclosure, the inverse transform processing unit 308 may receive data representing a size and a prediction mode (e.g., an intra-prediction mode) for a current block of video data from the entropy decoding unit 302 and / or the prediction processing unit 304. The inverse transform processing unit 308 may determine an MTS group from the MTS groups 322 according to the size and prediction mode of the current block. For example, the inverse transform processing unit 308 may determine a size group including a size of the current block, for example, according to Table 1 as described above. As another example, in addition or alternatively, the inverse transform processing unit 308 may determine a mode group including an intra-prediction mode for the current block, for example, according to Table 2 above. The inverse transform processing unit 308 may further receive a transform index from the entropy decoding unit 302. The inverse transform processing unit 308 may use the transform index to determine an MTS scheme among the MTS groups from the MTS groups 322 to which the size and intra prediction mode (e.g., size group and / or mode group) are mapped, e.g., as described above with respect to Table 3. Similarly, in some examples, the inverse transform processing unit 308 may exploit symmetry of block sizes and / or intra prediction modes, e.g., a block of size M×N may be mapped to the same MTS group as a block of size N×M, e.g., as described above. The inverse transform processing unit 308 may inverse transform the transform block using the determined MTS scheme.
[0155] Further, prediction processing unit 304 generates a prediction block according to 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 may generate a prediction block. In this case, the prediction information syntax element may indicate a reference picture in DPB 314 from which to retrieve a reference block, as well as a motion vector that identifies the location of the reference block in the reference picture relative to the location of the current block in the current picture. Motion compensation unit 316 may generally perform an inter prediction process in a manner substantially similar to that described with respect to motion compensation unit 224 (FIG. 7).
[0156] 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 predictive block according to the intra prediction mode indicated by the prediction information syntax element. Again, the intra prediction unit 318 may generally perform an intra prediction process in a manner substantially similar to that described with respect to the intra prediction unit 226 (FIG. 7). The intra prediction unit 318 may retrieve data of neighboring samples for the current block from the DPB 314.
[0157] The reconstruction unit 310 may reconstruct the current block using the predictive block and the residual block. For example, the reconstruction unit 310 may add samples of the residual block to corresponding samples of the predictive block to reconstruct the current block.
[0158] Filter unit 312 may perform one or more filter operations on the reconstructed blocks. For example, filter unit 312 may perform a deblocking operation to reduce blockiness artifacts along the edges of the reconstructed blocks. The operations of filter unit 312 may not be performed in all instances.
[0159] The video decoder 300 may store the reconstructed blocks in the DPB 314. For example, in examples where the operations of the filter unit 312 are not performed, the reconstruction unit 310 may store the reconstructed blocks in the DPB 314. In examples where the operations of the filter unit 312 are performed, the filter unit 312 may store the refined, filtered, and reconstructed blocks in 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 prediction and previously decoded pictures (e.g., decoded video) for subsequent motion compensation. Additionally, the video decoder 300 may output the decoded pictures from the DPB 314 for later presentation on a display device, such as the display device 118 of FIG. 1.
[0160] In this manner, the video decoder 300 represents an example of a device for decoding video data including a memory configured to store video data; and one or more processors implemented in a circuit configured to: determine a size of a current block of video data; determine an intra-prediction mode for the current block of video data; determine a mode group including the determined intra-prediction mode, where the mode group is one of a plurality of mode groups, each mode group among the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups; determine a set of available multiple transform selection (MTS) schemes for the current block according to the size and intra-prediction mode for the current block, where the set of available MTS schemes is one set of available MTS schemes among a plurality of sets of MTS schemes; determine an MTS scheme from the set of available MTS schemes according to the determined mode group; apply a transform of the MTS scheme to a transform block of the current block to generate a residual block for the current block; and decode the current block using the residual block.
[0161] 9 is a flowchart illustrating an example method for encoding a current block according to the techniques of this disclosure. The current block may include a current CU. Although described with respect to video encoder 200 (FIGS. 1 and 7), it should be understood that other devices may be configured to perform a method similar to that of FIG.
[0162] In this example, video encoder 200 may first predict a current block (350). For example, video encoder 200 may form a predictive block for the current block using an intra-prediction mode. Video encoder 200 may then calculate a residual block for the current block (352). To calculate the residual block, video encoder 200 may calculate a difference between an original uncoded block and a predictive block for the current block. Video encoder 200 may then transform the residual block and quantize transform coefficients of the residual block (354). Specifically, video encoder 200 may determine an MTS scheme to apply to the residual block according to any of the various techniques of this disclosure, e.g., according to the size of the block and the intra-prediction mode for the block. Video encoder 200 may then scan the quantized transform coefficients of the residual block (356). During or following the scan, video encoder 200 may entropy code the transform coefficients (358). For example, the video encoder 200 may encode the transform coefficients using CAVLC or CABAC. The video encoder 200 may then output entropy coded data for the block (360).
[0163] Video encoder 200 may also decode the current block after encoding it to use the decoded version of the current block as reference data for later coded data (e.g., in inter-prediction or intra-prediction modes). Accordingly, video encoder 200 may inverse quantize and inverse transform the coefficients to reconstruct the residual block (362). Video encoder 200 may combine the residual block with the predictive block to form a decoded block (364). Video encoder 200 may then store the decoded block in DPB 218 (366).
[0164] 10 is a flowchart illustrating an example method for decoding a current block of video data in accordance with the techniques of this disclosure. The current block may include a current CU. Although described with respect to video decoder 300 (FIGS. 1 and 8), it should be understood that other devices may be configured to perform a method similar to that of FIG.
[0165] The video decoder 300 may receive entropy coded data for the current block, such as the entropy coded prediction information and the entropy coded data of the transform coefficients of the residual block corresponding to the current block (370). The video decoder 300 may entropy decode the entropy coded data to determine the prediction information for the current block and to reconstruct the transform coefficients of the residual block (372). The video decoder 300 may predict the current block, e.g., using an intra prediction mode as indicated by the prediction information for the current block, to compute a predictive block for the current block (374). The video decoder 300 may then inverse scan the reconstructed transform coefficients to create a block of quantized transform coefficients (376). The video decoder 300 may use the intra prediction mode and the size of the block to determine an MTS scheme for the block according to any of the various techniques of this disclosure. The video decoder 300 may then inverse quantize the transform coefficients and apply an inverse transform to the transform coefficients using the MTS scheme to generate the residual block (378). Video decoder 300 may finally decode the current block by combining the predictive block and the residual block (380).
[0166] FIG. 11 is a flowchart illustrating an example method of decoding a block of video data according to techniques of this disclosure. The method of FIG. 11 may be performed by a video decoder 300 (FIGS. 1 and 8) and will be described with respect to the video decoder 300 as an example. The video encoder 200 of FIG. 1 and FIG. 7 and other video coding (encoding and / or decoding) devices may be configured to perform this method or similar methods. The method of FIG. 11 may be performed as part of the method of FIG. 9 (e.g., steps 354 and / or 362) or as part of the method of FIG. 10 (e.g., step 378).
[0167] First, the video decoder 300 determines a size of a current block of video data (400). For example, the video decoder 300 may determine a width W and height H of the current block, where W and H represent the number of samples along corresponding dimensions of the current block. The video decoder 300 may also determine a current intra-prediction mode for the current block (402). For example, the video decoder 300 may decode one or more intra-prediction mode syntax elements that represent the intra-prediction mode for the current block. Alternatively, the video decoder 300 may use any of the various techniques described above with respect to Figures 3 through 6 to determine the intra-prediction mode.
[0168] The video decoder 300 may then determine a mode group that includes the determined intra-prediction mode (404). For example, the video decoder 300 may determine the mode group according to Table 2, as described above. In other examples, other mode groupings may be used that may include more or fewer groups and / or more or fewer modes within each group.
[0169] The video decoder 300 may then determine a set of available MTS schemes for the current block according to the mode group and size of the current block (406). For example, the video decoder 300 may determine the set of available MTS schemes according to Table 3 above. That is, the set of available MTS schemes may be one of multiple sets of available MTS schemes. Each of the sets (also referred to as "groups") may include four MTS schemes, as described above. For example, as shown in the example g_aucTrSet data structure above, there may be 80 different sets of MTS schemes. Each of the sets of available MTS schemes may include a value representing an MTS scheme, such as, for example, an index into a set of 25 possible MTS schemes, as described above with respect to the g_aucTrIdxToTr data structure.
[0170] The video decoder 300 may further determine one of the MTS schemes of the determined set of MTS schemes to be applied to the current block, i.e., the transform block of the current block (408). For example, the video decoder 300 may decode a transform index that represents which of the four MTS schemes of the determined set of MTS schemes should be applied to the current block.
[0171] The video decoder 300 may then apply the determined MTS scheme to the transform block for the current block (410). For example, the video decoder 300 may apply the vertical and horizontal transforms of the MTS scheme to the transform block. Application of the MTS scheme may result in a reconstructed residual block. The video decoder 300 may then decode the current block using the residual block, e.g., by combining the residual block with the predictive block on a sample-by-sample basis (412).
[0172] 11 represents an example of a method for decoding video data, including the steps of: determining a size of a current block of video data; determining an intra-prediction mode for the current block of video data; determining a mode group including the determined intra-prediction mode, where the mode group is one of a plurality of mode groups, each mode group among the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups; determining a set of available multiple transform selection (MTS) schemes for the current block according to the size and intra-prediction mode for the current block, where the set of available MTS schemes is one set of available MTS schemes among a plurality of sets of MTS schemes; determining an MTS scheme from the set of available MTS schemes according to the determined mode group; applying a transform of the MTS scheme to a transform block of the current block to generate a residual block for the current block; and decoding the current block using the residual block.
[0173] FIG. 12 is a flowchart illustrating an example method of decoding a block of video data according to techniques of this disclosure. The method of FIG. 12 may be performed by a video decoder 300 (FIGS. 1 and 8) and is described with respect to the video decoder 300 as an example. The video encoder 200 of FIG. 1 and FIG. 7 and other video coding (encoding and / or decoding) devices may be configured to perform this method or similar methods. The method of FIG. 12 may be performed as part of the method of FIG. 9 (e.g., steps 354 and / or 362) or as part of the method of FIG. 10 (e.g., step 378). The method of FIG. 12 may be performed in some examples together with the method of FIG. 11.
[0174] First, the video decoder 300 determines a size of a current block of video data (420). For example, the video decoder 300 may determine a width W and height H of the current block, where W and H represent the number of samples along corresponding dimensions of the current block. The video decoder 300 may also determine a current intra-prediction mode for the current block (422). For example, the video decoder 300 may decode one or more intra-prediction mode syntax elements that represent the intra-prediction mode for the current block. Alternatively, the video decoder 300 may use any of the various techniques described above with respect to Figures 3 through 6 to determine the intra-prediction mode.
[0175] The video decoder 300 may then determine a size group to include the determined intra-prediction mode (424). For example, the video decoder 300 may determine the size group according to Table 1, as described above. In other examples, other size groupings may be used that may include more or fewer groups and / or more or fewer sizes within each group.
[0176] The video decoder 300 may then determine a set of available MTS schemes for the current block according to the size group and intra-prediction mode for the current block (426). For example, the video decoder 300 may determine the set of available MTS schemes according to Table 3 above. That is, the set of available MTS schemes may be one of multiple sets of available MTS schemes. Each of the sets (also referred to as "groups") may include four MTS schemes, as described above. For example, there may be 80 different sets of MTS schemes, as shown in the example g_aucTrSet data structure above.
[0177] The video decoder 300 may further determine one of the MTS schemes of the determined set of MTS schemes to be applied to the current block, i.e., the transform block of the current block (428). For example, the video decoder 300 may decode a transform index that represents which of the four MTS schemes of the determined set of MTS schemes should be applied to the current block.
[0178] The video decoder 300 may then apply the determined MTS scheme to the transform block for the current block (430). For example, the video decoder 300 may apply the vertical and horizontal transforms of the MTS scheme to the transform block. Application of the MTS scheme may result in a reconstructed residual block. The video decoder 300 may then decode the current block using the residual block, e.g., by combining the residual block with the predictive block on a sample-by-sample basis (432).
[0179] FIG. 13 is a flowchart illustrating an example method of decoding a block of video data according to techniques of this disclosure. The method of FIG. 13 may be performed by a video decoder 300 (FIGS. 1 and 8) and will be described with respect to the video decoder 300 as an example. The video encoder 200 of FIG. 1 and FIG. 7 and other video coding (encoding and / or decoding) devices may be configured to perform this method or similar methods. The method of FIG. 13 may be performed as part of the method of FIG. 9 (e.g., steps 354 and / or 362) or as part of the method of FIG. 10 (e.g., step 378).
[0180] First, the video decoder 300 determines a size W×H of a current block of video data (440). For example, the video decoder 300 may determine a width W and height H of the current block, where W and H represent the number of samples along corresponding dimensions of the current block. The video decoder 300 may also determine a current intra-prediction mode for the current block (442). For example, the video decoder 300 may decode one or more intra-prediction mode syntax elements that represent the intra-prediction mode for the current block. Alternatively, the video decoder 300 may use any of the various techniques described above with respect to Figures 3 through 6 to determine the intra-prediction mode.
[0181] The video decoder 300 may then determine a symmetric size (H×W) and an intra-prediction mode (444). Specifically, if the actual size and intra-prediction mode of the current block are not included in Table 3, the video decoder 300 may use the symmetric size and intra-prediction mode to determine the MTS scheme. By simply flipping W×H to H×W, the video decoder 300 may obtain a symmetric block size. The symmetry of the intra-prediction mode may be determined according to the mirror image of modes 2 to 34 as shown in FIG. 2, assuming that the mirror is parallel to mode 34 and crosses the upper left and lower right corners of the block in FIG. 2. Thus, for example, mode 66 is symmetric to mode 2, mode 65 is symmetric to mode 3, and so on, up to mode 33 is symmetric to mode 35 (mode 34 becomes symmetric to itself).
[0182] The video decoder 300 may then determine a set of available MTS schemes for the current block according to the symmetric block size (H×W) and the symmetric intra-prediction mode (446). For example, the video decoder 300 may determine the set of available MTS schemes according to Table 3 above. That is, the set of available MTS schemes may be one of a plurality of sets of available MTS schemes. Each of the sets (also referred to as "groups") may include four MTS schemes, as described above. For example, as shown in the example g_aucTrSet data structure above, there may be 80 different sets of MTS schemes. Each of the sets of available MTS schemes may include a value representing an MTS scheme, such as, for example, an index into a set of 25 possible MTS schemes, as described above with respect to the g_aucTrIdxToTr data structure. For example, if the current block has a size of 8x32 and 58 intra-prediction modes, the video decoder 300 may determine that the symmetric size is 32x8, the symmetric intra-prediction modes are 10, and the MTS scheme set is the 66th entry of the g_aucTrSet data structure according to the example of Table 3.
[0183] The video decoder 300 may further determine one of the MTS schemes of the determined set of MTS schemes to be applied to the current block, i.e., the transform block of the current block (448). For example, the video decoder 300 may decode a transform index that represents which of the four MTS schemes of the determined set of MTS schemes should be applied to the current block.
[0184] The video decoder 300 may then apply the determined MTS scheme to the transform block for the current block (450). For example, the video decoder 300 may apply the vertical and horizontal transforms of the MTS scheme to the transform block. Application of the MTS scheme may result in a reconstructed residual block. The video decoder 300 may then decode the current block using the residual block, e.g., by combining the residual block with the predictive block on a sample-by-sample basis (452).
[0185] Various examples of the techniques of this disclosure are summarized in the following paragraphs.
[0186] Clause 1: A method for decoding video data, comprising the steps of: determining a size of a current block of video data; determining an intra-prediction mode for the current block of video data; determining a set of available multiple transform selection (MTS) schemes for the current block according to the size and intra-prediction mode for the current block, wherein the set of available MTS schemes is a set of available MTS schemes among a plurality of sets of MTS schemes; determining an MTS scheme from the set of available MTS schemes; applying a transform of the MTS scheme to a transform block of the current block to generate a residual block for the current block; and decoding the current block using the residual block.
[0187] Clause 2: The method of clause 1, including a size group where the size of the current block depends on the current block width and the current block height.
[0188] Clause 3: The method of clause 2, wherein the size group of the current block is selected from one of a plurality of size groups including: 4x4, 4x8, 4x16, 4xN, 8x4, 8x8, 8x16, 8xN, 16x4, 16x8, 16x16, 16xN, Nx4, Nx8, Nx16, NxN, where N is an integer power of 2 and greater than 16.
[0189] Clause 4: The method of clause 3, wherein determining the set of available MTS schemes according to a size of the current block comprises determining the set of available MTS schemes according to a size group for the current block.
[0190] Clause 5: Any of the methods of clauses 1 to 4, wherein the step of determining an intra-prediction mode includes a step of determining a mode group including the intra-prediction mode, and the step of determining a set of available MTS schemes according to the intra-prediction mode for the current block includes a step of determining a set of available MTS schemes according to the mode group for the current block.
[0191] Clause 6: The method of clause 5, wherein the mode group is selected from one of a plurality of mode groups including a first group including intra-prediction modes 0 and 1, a second group including intra-prediction modes 2 to 12, a third group including intra-prediction modes 13 to 23, a fourth group including intra-prediction modes 24 to 34, and a fifth group including matrix intra-prediction (MIP) modes.
[0192] Clause 7: The method of any one of clauses 1 to 6, further comprising the step of decoding an MTS index value representing an MTS scheme from a set of available MTS schemes, and wherein determining the MTS scheme comprises determining the MTS scheme using the MTS index value.
[0193] Clause 8: The MTS index values have values between 0 and 3 inclusive, and the sets of MTS schemes are: { 17, 18, 23, 24}, { 3, 7, 18, 22}, { 2, 17, 18, 22}, { 3, 15, 17, 18}, { 3, 12, 18, 19}, { 12, 18, 19, 23}, { 2, 12, 17, 18}, { 2, 17, 18, 22}, { 2, 11, 17, 18}, { 12, 18, 19, 23}, { 12, 13, 16, 24}, { 2, 11, 16, 23}, { 2, 13, 17, 22}, { 2, 11, 17, 21}, { 13, 16, 19, 22}, { 7, 12, 13, 18}, { 1, 11, 12, 16}, { 3, 13, 17, 22}, { 1, 6, 12, 22}, { 12, 13, 15, 16}, { 18, 19, 23, 24}, { 2, 17, 18, 24}, { 3, 4, 17, 22}, { 12, 18, 19, 23}, { 12, 18, 19, 23}, { 6, 12, 18, 24}, { 2, 6, 12, 21}, { { 1, 11, 17, 22}, { 3, 11, 16, 17}, { 8, 12, 19, 23}, { 7, 13, 16, 23}, { 1, 6, 11, 12}, { 1, 11, 17, 21}, { 6, 11, 17, 21}, { 8, 11, 14, 17}, { 6, 11, 12, 21}, { 1, 6, 11, 12}, { 2, 6, 11, 12}, { 1, 6, 11, 21}, { 7, 11, 12, 16}, { 8, 12, 19, 24}, { 1, 13, 18, 22}, { 2, 6, 17, 21}, { 11, 12, 16, 19}, { 8, 12, 17, 24}, { 6, 12, 19, 21}, { 6, 12, 13, 21}, { 2, 16, 17, 21}, { 6, 17, 19, 23}, { 6, 12, 14, 17}, { 6, 7, 11, 21}, { 1, 11, 12, 16}, { 1, 6, 11, 12}, { 6, 11, 12, 21}, { 7, 8, 9, 11}, { 6, 7, 11, 12}, { 6,7, 11, 12}, { 1, 11, 12, 16}, { 6, 11, 17, 21}, { 6, 7, 11, 12}, { 12, 14, 18, 21}, { 1, 11, 16, 22}, { 1, 11, 16, 22}, { 7, 13, 15, 16}, { 1, 8, 12, 19}, { 6, 7, 9, 12}, { 2, 6, 12, 13}, { 1, 12, 16, 21}, { 7, 11, 16, 19}, { 7, 8, 11, 12}, { 6, 7, 11, 12}, { 6, 7, 11, 12}, { 1, 6, 11, 12}, { 6, 7, 11, 16}, { 6, 7, 11, 12}, { 6, 7, 11, 12}, { 6, 11, 12, 21}, { 1, 6, 11, 12}, { 6, 7, 11, 12}, { 6, 7, 11, 12}, and the MTS index is { DCT8, DCT8}, { DCT8, DST7}, { DCT8, DCT5}, { DCT8, DST4}, {DCT8, DST1}, { DST7, DCT8}, { DST7, DST7}, { DST7, DCT5}, { DST7, DST4}, {DST7, DST1}, { DCT5, DCT8}, { DCT5, DST7}, { DCT5, DCT5}, { DCT5, DST4}, {DCT5, DST1}, { DST4, DCT8}, { DST4, DST7}, { DST4, DCT5}, { DST4, DST4}, {DST4, DST1}, { DST1, DCT8}, { DST1, DST7}, { DST1, DCT5}, { DST1, DST4}, {DST1, DST1}, { D ...
[0194] Clause 9: Any of the methods of clauses 1 to 8, wherein each of the sets of MTS methods includes four respective transform pair options.
[0195] Clause 10: The method of any of clauses 1 to 9, further comprising determining a number of transformation pair options in the set of available MTS schemes according to a shape of the current block.
[0196] Clause 11. The method of any of clauses 1 to 10, further comprising determining a number of transform pair options in the set of available MTS schemes according to a quantization parameter of the current block.
[0197] Clause 12: The method of any of clauses 1 to 11, wherein the current block includes a first block, the MTS scheme includes a transform pair including a horizontal transform and a vertical transform, the first block has a size of W×H, W is not equal to H, the intra prediction mode includes I1, and is an angular intra prediction mode, and the method further includes the steps of determining that the second block has a size of H×W, determining that the second block has an intra prediction mode of (68-I1), determining a set of available MTS schemes for the second block according to the size of H×W and the intra prediction mode of (68-I1) for the second block, determining an MTS scheme for the second block, applying the horizontal transform of the MTS scheme as the vertical transform to the second block, and applying the vertical transform of the MTS scheme as the horizontal transform to the second block.
[0198] Clause 13: The method of any of clauses 1 to 11, wherein the current block includes a first block, the MTS scheme includes a transform pair including a horizontal transform and a vertical transform, the first block has a size of W×H, W is not equal to H, and the intra prediction mode includes a matrix intra prediction (MIP) mode with a first transpose flag value, and the method further includes the steps of determining that a second block has a size of H×W, determining that the intra prediction mode for the second block is a MIP intra prediction mode with a second transpose flag value different from the first transpose flag value, determining a set of available MTS schemes for the second block according to the MIP intra prediction mode having a size of H×W and the second transpose flag value for the second block, determining an MTS scheme for the second block from the set of available MTS schemes, applying the horizontal transform of the MTS scheme as the vertical transform to the second block, and applying the vertical transform of the MTS scheme as the horizontal transform to the second block.
[0199] Clause 14: Any of the methods of clauses 1 to 11, wherein when the current block is coded using a decoder-side intra mode derivation and fused intra prediction (DIMD) mode, determining the set of available MTS schemes according to the intra prediction mode includes determining the set of available MTS schemes according to a dominant angle mode determined using the DIMD mode.
[0200] Clause 15: The method of clause 14, wherein the dominant angular mode comprises the mode having the highest weight.
[0201] Clause 16: The method of any of clauses 1 to 11, wherein when the current block is coded using a decoder-side intra mode derivation and fused intra prediction (DIMD) mode, determining the set of available MTS schemes according to the intra prediction mode includes determining whether a difference between two angle mode values is greater than a threshold, and when the difference is greater than the threshold, determining the intra prediction mode includes determining the intra prediction mode to be a planar mode when determining the set of available MTS schemes, or when the difference is less than or equal to the threshold, determining the intra prediction mode includes determining the intra prediction mode to be a dominant angle mode determined using the DIMD mode.
[0202] Clause 17: Any of the methods of clauses 1 to 11, wherein when the intra-prediction mode includes a wide-angle intra-prediction mode, determining the set of available MTS schemes according to the intra-prediction mode includes determining the set of available MTS schemes according to a conventional intra-prediction mode having an angle closest to the angle of the wide-angle intra-prediction mode.
[0203] Clause 18: Determining a set of available MTS schemes according to a size and an intra-prediction mode for the current block includes determining a set of available MTS schemes according to the following table:
[0204] [Table 4]
[0205] 18. The method of any of clauses 1 to 17, wherein N is an integer value equal to or greater than 32.
[0206] Clause 19: The method of any of clauses 1 to 18, wherein determining the intra-prediction mode includes determining the intra-prediction mode according to a template-based intra-mode derivation (TIMD) mode.
[0207] Clause 20: The method of clause 19, wherein when the TIMD mode uses a fusion of two intra prediction modes, determining the set of available MTS schemes includes determining the set of available MTS schemes according to a dominant intra prediction mode of the two intra prediction modes.
[0208] Clause 21: The method of clause 19, wherein when the TIMD mode uses a fusion of two intra prediction modes, determining the set of available MTS schemes includes determining the set of available MTS schemes according to a planar mode when a difference between the two intra prediction modes is greater than a threshold, or determining the set of available MTS schemes according to a dominant intra prediction mode of the two intra prediction modes when the difference between the two intra prediction modes is less than or equal to the threshold.
[0209] Clause 22: The method of any of clauses 20 and 21, wherein the dominant intra-prediction mode comprises the intra-prediction mode of the two intra-prediction modes that results in lower distortion.
[0210] Clause 23: The method of any of clauses 19 to 22, wherein determining the set of available MTS schemes includes determining the set of available MTS schemes according to a table that maps the scaled intra-prediction mode angles to the set of available MTS schemes.
[0211] Clause 24: A method for decoding video data, comprising: determining a size of a current block of video data; determining an intra-prediction mode for the current block of video data; determining a mode group including the determined intra-prediction mode, where the mode group is one of a plurality of mode groups, each mode group among the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups; determining a set of available multiple transform selection (MTS) schemes for the current block according to the size and intra-prediction mode for the current block, where the set of available MTS schemes is one set of available MTS schemes among a plurality of sets of MTS schemes; determining an MTS scheme from the set of available MTS schemes according to the determined mode group; applying a transform of the MTS scheme to a transform block of the current block to generate a residual block for the current block; and decoding the current block using the residual block.
[0212] Clause 25: The method of clause 24, wherein the plurality of mode groups includes a first mode group including intra-prediction modes 0 and 1, a second group including intra-prediction modes 2 through 12, a third group including intra-prediction modes 13 through 23, a fourth group including intra-prediction modes 24 through 34, and a fifth group including matrix intra-prediction (MIP) modes.
[0213] Clause 26: The method of clause 24, wherein the size of the current block includes a width of the current block and a height of the current block, and the size of the current block is included in the size group.
[0214] Clause 27: The method of clause 26, wherein a size group for the current block is selected from one of a plurality of size groups including: 4×4, 4×8, 4×16, 4×N, 8×4, 8×8, 8×16, 8×N, 16×4, 16×8, 16×16, 16×N, N×4, N×8, N×16, and N×N, where N is an integer power of 2 and is greater than 16.
[0215] Clause 28: The method of clause 27, wherein determining the set of available MTS schemes according to a size of the current block comprises determining the set of available MTS schemes according to a size group for the current block.
[0216] Clause 29: The method of clause 24, further comprising the step of decoding an MTS index value representing an MTS scheme from a set of available MTS schemes, and wherein determining the MTS scheme comprises determining the MTS scheme using the MTS index value.
[0217] Clause 30: The MTS index values have values between 0 and 3 inclusive, and the sets of MTS schemes are: { 17, 18, 23, 24}, { 3, 7, 18, 22}, { 2, 17, 18, 22}, { 3, 15, 17, 18}, { 3, 12, 18, 19}, { 12, 18, 19, 23}, { 2, 12, 17, 18}, { 2, 17, 18, 22}, { 2, 11, 17, 18}, { 12, 18, 19, 23}, { 12, 13, 16, 24}, { 2, 11, 16, 23}, { 2, 13, 17, 22}, { 2, 11, 17, 21}, { 13, 16, 19, 22}, { 7, 12, 13, 18}, { 1, 11, 12, 16}, { 3, 13, 17, 22}, { 1, 6, 12, 22}, { 12, 13, 15, 16}, { 18, 19, 23, 24}, { 2, 17, 18, 24}, { 3, 4, 17, 22}, { 12, 18, 19, 23}, { 12, 18, 19, 23}, { 6, 12, 18, 24}, { 2, 6, 12, 21}, { 1, 11, 17, 22}, { 3, 11, 16, 17}, { 8, 12, 19, 23}, { 7, 13, 16, 23}, { 1, 6, 11, 12}, { 1, 11, 17, 21}, { 6, 11, 17, 21}, { 8, 11, 14, 17}, { 6, 11, 12, 21}, { 1, 6, 11, 12}, { 2, 6, 11, 12}, { 1, 6, 11, 21}, { 7, 11, 12, 16}, { 8, 12, 19, 24}, { 1, 13, 18, 22}, { 2, 6, 17, 21}, { 11, 12, 16, 19}, { 8, 12, 17, 24}, { 6, 12, 19, 21}, { 6, 12, 13, 21}, { 2, 16, 17, 21}, { 6, 17, 19, 23}, { 6, 12, 14, 17}, { 6, 7, 11, 21}, { 1, 11, 12, 16}, { 1, 6, 11, 12}, { 6, 11, 12, 21}, { 7, 8, 9, 11}, { 6, 7, 11,12}, { 6, 7, 11, 12}, { 1, 11, 12, 16}, { 6, 11, 17, 21}, { 6, 7, 11, 12}, { 12, 14, 18, 21}, { 1, 11, 16, 22}, { 1, 11, 16, 22}, { 7, 13, 15, 16}, { 1, 8, 12, 19}, { 6, 7, 9, 12}, { 2, 6, 12, 13}, { 1, 12, 16, 21}, { 7, 11, 16, 19}, { 7, 8, 11, 12}, { 6, 7, 11, 12}, { 6, 7, 11, 12}, { 1, 6, 11, 12}, { 6, 7, 11, 16}, { 6, 7, 11, 12}, { 6, 7, 11, 12}, { 6, 11, 12, 21}, { 1, 6, 11, 12}, { 6, 7, 11, 12}, { 6, 7, 11, 12}, { 6, 7, 11, 12}, and the MTS index is { DCT8, DCT8}, { DCT8, DST7}, { DCT8, DCT5}, { DCT8, DST4}, {DCT8, DST1}, { DST7, DCT8}, { DST7, DST7}, { DST7, DCT5}, { DST7, DST4}, {DST7, DST1}, { DCT5, DCT8}, { DCT5, DST7}, { DCT5, DCT5}, { DCT5, DST4}, {DCT5, DST1}, { DST4, DCT8}, { DST4, DST7}, { DST4, DCT5}, { DST4, DST4}, {DST4, DST1}, { DST1, DCT8}, { DST1, DST7}, { DST1, DCT5}, { DST1, DST4}, {DST1, DST1}, the set of transformation pairs for the MTS schemes available according to the method of clause 29.
[0218] Clause 31: The method of clause 24, wherein each of the set of MTS schemes includes four respective transform pair options.
[0219] Clause 32: The method of clause 24, further comprising determining a number of transform pair options in the set of available MTS schemes according to a shape of the current block.
[0220] Clause 33. The method of clause 24, further comprising determining a number of transform pair options in the set of available MTS schemes according to a quantization parameter of the current block.
[0221] Clause 34: The method of clause 24, wherein the current block includes a first block, the MTS scheme includes a transform pair including a horizontal transform and a vertical transform, the first block has a size of W×H, W is not equal to H, the intra prediction mode includes I1, and is an angular intra prediction mode, and the method further includes the steps of determining that the second block has a size of H×W, determining that the second block has an intra prediction mode of (68-I1), determining a set of available MTS schemes for the second block according to the size of H×W and the intra prediction mode of (68-I1) for the second block, determining an MTS scheme for the second block, applying the horizontal transform of the MTS scheme as the vertical transform to the second block, and applying the vertical transform of the MTS scheme as the horizontal transform to the second block.
[0222] Clause 35: The method of clause 24, wherein the current block includes a first block, the MTS scheme includes a transform pair including a horizontal transform and a vertical transform, the first block has a size of W×H, W is not equal to H, and the intra prediction mode includes a matrix intra prediction (MIP) mode with a first transpose flag value, and the method further includes the steps of determining that a second block has a size of H×W, determining that the intra prediction mode for the second block is a MIP intra prediction mode with a second transpose flag value different from the first transpose flag value, determining a set of available MTS schemes for the second block according to the MIP intra prediction mode having a size of H×W and the second transpose flag value for the second block, determining an MTS scheme for the second block from the set of available MTS schemes, applying the horizontal transform of the MTS scheme as the vertical transform to the second block, and applying the vertical transform of the MTS scheme as the horizontal transform to the second block.
[0223] Clause 36: The method of clause 24, wherein when the current block is coded using a decoder-side intra mode derivation and fused intra prediction (DIMD) mode, determining the set of available MTS schemes according to the intra prediction mode includes determining the set of available MTS schemes according to a dominant angle mode determined using the DIMD mode.
[0224] Clause 37: The method of clause 36, wherein the dominant angular mode comprises the mode having the highest weight.
[0225] Clause 38: The method of clause 24, wherein when the current block is coded using a decoder-side intra mode derivation and fused intra prediction (DIMD) mode, determining a set of available MTS schemes according to the intra prediction mode includes determining whether a difference between two angle mode values is greater than a threshold, and when the difference is greater than the threshold, determining the intra prediction mode includes determining the intra prediction mode to be a planar mode when determining the set of available MTS schemes, or when the difference is less than or equal to the threshold, determining the intra prediction mode includes determining the intra prediction mode to be a dominant angle mode determined using the DIMD mode.
[0226] Clause 39: The method of clause 24, wherein when the intra-prediction mode includes a wide-angle intra-prediction mode, determining a set of available MTS schemes according to the intra-prediction mode includes determining a set of available MTS schemes according to a conventional intra-prediction mode having an angle closest to the angle of the wide-angle intra-prediction mode.
[0227] Clause 40: Determining a set of available MTS schemes according to a size and an intra-prediction mode for the current block includes determining a set of available MTS schemes according to the following table:
[0228] [Table 5]
[0229] 25. The method of clause 24, wherein N is an integer value equal to or greater than 32.
[0230] Clause 41: The method of clause 24, wherein determining the intra-prediction mode includes determining the intra-prediction mode according to a template-based intra-mode derivation (TIMD) mode.
[0231] Clause 42: The method of clause 41, wherein when the TIMD mode uses a fusion of two intra prediction modes, determining the set of available MTS schemes includes determining the set of available MTS schemes according to a dominant intra prediction mode of the two intra prediction modes.
[0232] Clause 43: The method of clause 41, wherein when the TIMD mode uses a fusion of two intra prediction modes, determining the set of available MTS schemes includes determining the set of available MTS schemes according to a planar mode when a difference between the two intra prediction modes is greater than a threshold, or determining the set of available MTS schemes according to a dominant intra prediction mode of the two intra prediction modes when the difference between the two intra prediction modes is less than or equal to the threshold.
[0233] Clause 44: The method of clause 43, wherein the dominant intra-prediction mode comprises the intra-prediction mode of the two intra-prediction modes that results in a lower distortion.
[0234] Clause 45: The method of clause 43, wherein determining the set of available MTS schemes comprises determining the set of available MTS schemes according to a table that maps the scaled intra-prediction mode angles to the set of available MTS schemes.
[0235] Clause 46: The method of clause 24, wherein decoding the current block includes forming a prediction block for the current block using an intra prediction mode and adding samples of the prediction block to corresponding samples of the residual block.
[0236] Clause 47: The method of clause 24, further comprising the step of encoding the current block prior to decoding the current block.
[0237] Clause 48: A device for decoding video data, comprising: a memory configured to store the video data; and one or more processors implemented in a circuit configured to: determine a size of a current block of the video data; determine an intra-prediction mode for the current block of the video data; determine a mode group including the determined intra-prediction mode, where the mode group is one of a plurality of mode groups, each mode group among the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups; determine a set of available multiple transform selection (MTS) schemes for the current block according to the size and the intra-prediction mode for the current block, where the set of available MTS schemes is one set of available MTS schemes among a plurality of sets of MTS schemes; determine an MTS scheme from the set of available MTS schemes according to the determined mode group; apply a transform of the MTS scheme to a transform block of the current block to generate a residual block for the current block; and decode the current block using the residual block.
[0238] Clause 49: The device of clause 48, wherein the plurality of mode groups includes a first mode group including intra-prediction modes 0 and 1, a second group including intra-prediction modes 2 through 12, a third group including intra-prediction modes 13 through 23, a fourth group including intra-prediction modes 24 through 34, and a fifth group including a matrix intra-prediction (MIP) mode.
[0239] Clause 50: The device of clause 48, wherein the size of the current block comprises a current block width and a current block height, and the size of the current block is included in a size group.
[0240] Clause 51: The device of clause 48, wherein the one or more processors are further configured to decode an MTS index value representing an MTS scheme from a set of available MTS schemes, and the one or more processors are configured to determine the MTS scheme using the MTS index value.
[0241] Clause 52: The device of clause 48, wherein the current block includes a first block, the MTS scheme includes a transform pair including a horizontal transform and a vertical transform, the first block has a size of W×H, W is not equal to H, the intra prediction mode includes I1, and is an angular intra prediction mode, and the one or more processors are further configured to: determine that a second block has a size of H×W; determine that the second block has an intra prediction mode of (68-I1); determine a set of available MTS schemes for the second block according to the size of H×W and the intra prediction mode of (68-I1) for the second block; determine an MTS scheme for the second block; apply the horizontal transform of the MTS scheme as the vertical transform to the second block; and apply the vertical transform of the MTS scheme as the horizontal transform to the second block.
[0242] Clause 53: The device of clause 48, wherein the current block includes a first block, the MTS scheme includes a transform pair including a horizontal transform and a vertical transform, the first block has a size of W×H, where W is not equal to H, and the intra prediction mode includes a matrix intra prediction (MIP) mode with a first transpose flag value, and the one or more processors are further configured to: determine that a second block has a size of H×W; determine that the intra prediction mode for the second block is a MIP intra prediction mode with a second transpose flag value different from the first transpose flag value; determine a set of available MTS schemes for the second block according to the MIP intra prediction mode having a size of H×W and the second transpose flag value for the second block; determine an MTS scheme for the second block from the set of available MTS schemes; apply the horizontal transform of the MTS scheme as the vertical transform to the second block; and apply the vertical transform of the MTS scheme as the horizontal transform to the second block.
[0243] Clause 54: The device of clause 48, wherein the one or more processors are further configured to encode the current block before decoding the current block.
[0244] Clause 55: The device of clause 48, further comprising a display configured to display the decoded video data.
[0245] Clause 56: The device of clause 48, wherein the device includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0246] Clause 57: A computer-readable storage medium having stored thereon instructions which, when executed, cause a processor of a device for decoding video data to: determine a size of a current block of video data; determine an intra-prediction mode for the current block of video data; determine a mode group including the determined intra-prediction mode, where the mode group is one of a plurality of mode groups, each mode group among the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups; determine a set of available multiple transform selection (MTS) schemes for the current block according to the size and intra-prediction mode for the current block, where the set of available MTS schemes is one set of available MTS schemes among a plurality of sets of MTS schemes; determine an MTS scheme from the set of available MTS schemes according to the determined mode group; apply a transform of the MTS scheme to a transform block of the current block to generate a residual block for the current block; and decode the current block using the residual block.
[0247] Clause 58: The computer-readable storage medium of clause 57, wherein the plurality of mode groups include a first mode group including intra-prediction modes 0 and 1, a second group including intra-prediction modes 2 to 12, a third group including intra-prediction modes 13 to 23, a fourth group including intra-prediction modes 24 to 34, and a fifth group including a matrix intra-prediction (MIP) mode.
[0248] Clause 59: The computer-readable storage medium of clause 57, wherein the size of the current block comprises a width of the current block and a height of the current block, and the size of the current block is included in the size group.
[0249] Clause 60: The computer-readable storage medium of clause 57, further comprising instructions for causing the processor to decode an MTS index value representing an MTS scheme from a set of available MTS schemes, wherein the instructions for causing the processor to determine the MTS scheme comprise instructions for causing the processor to determine the MTS scheme using the MTS index value.
[0250] Clause 61: The device of clause 48, further comprising instructions to cause the processor to: determine that the second block has a size of H×W; determine that the second block has an intra prediction mode of (68-I1); determine a set of available MTS schemes for the second block according to the size of H×W and the intra prediction mode of (68-I1) for the second block; determine an MTS scheme for the second block; apply the horizontal transform of the MTS scheme as the vertical transform to the second block; and apply the vertical transform of the MTS scheme as the horizontal transform to the second block.
[0251] 62. The device of clause 48, wherein the current block comprises a first block, the MTS scheme comprises a transform pair comprising a horizontal transform and a vertical transform, the first block has a size of W×H, where W is not equal to H, and the intra prediction mode comprises a matrix intra prediction (MIP) mode with a first transpose flag value, and further comprising instructions to cause the processor to determine that a second block has a size of H×W, determine that the intra prediction mode for the second block is a MIP intra prediction mode with a second transpose flag value different from the first transpose flag value, determine a set of available MTS schemes for the second block according to the MIP intra prediction mode having a size of H×W and the second transpose flag value for the second block, determine an MTS scheme for the second block from the set of available MTS schemes, apply the horizontal transform of the MTS scheme as the vertical transform to the second block, and apply the vertical transform of the MTS scheme as the horizontal transform to the second block.
[0252] Clause 63: The device of clause 48, further comprising instructions that cause the processor to encode the current block before decoding the current block.
[0253] Clause 64: A device for decoding video data, comprising: means for determining a size of a current block of the video data; means for determining an intra-prediction mode for the current block of the video data; means for determining a mode group including the determined intra-prediction mode, where the mode group is one of a plurality of mode groups, each mode group among the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups; means for determining a set of available multiple transform selection (MTS) schemes for the current block according to the size and the intra-prediction mode for the current block, where the set of available MTS schemes is one set of available MTS schemes among a plurality of sets of MTS schemes; means for determining an MTS scheme from the set of available MTS schemes according to the determined mode group; means for applying a transform of the MTS scheme to a transform block of the current block to generate a residual block for the current block; and means for decoding the current block using the residual block.
[0254] Clause 65: A method for decoding video data, comprising the steps of: determining a size of a current block of video data; determining an intra-prediction mode for the current block of video data; determining a mode group including the determined intra-prediction mode, where the mode group is one of a plurality of mode groups, each mode group among the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups; determining a set of available multiple transform selection (MTS) schemes for the current block according to the size and intra-prediction mode for the current block, where the set of available MTS schemes is one set of available MTS schemes among a plurality of sets of MTS schemes; determining an MTS scheme from the set of available MTS schemes according to the determined mode group; applying a transform of the MTS scheme to a transform block of the current block to generate a residual block for the current block; and decoding the current block using the residual block.
[0255] Clause 66: The method of clause 65, wherein the plurality of mode groups includes a first mode group including intra-prediction modes 0 and 1, a second group including intra-prediction modes 2 through 12, a third group including intra-prediction modes 13 through 23, a fourth group including intra-prediction modes 24 through 34, and a fifth group including matrix intra-prediction (MIP) modes.
[0256] Clause 67: Any of the methods of clauses 65 and 66, wherein the size of the current block includes the width of the current block and the height of the current block, and the size of the current block is included in the size group.
[0257] Clause 68: The method of clause 67, wherein a size group for the current block is selected from one of a plurality of size groups including: 4×4, 4×8, 4×16, 4×N, 8×4, 8×8, 8×16, 8×N, 16×4, 16×8, 16×16, 16×N, N×4, N×8, N×16, and N×N, where N is an integer power of 2 and greater than 16.
[0258] Clause 69: The method of clause 68, wherein determining the set of available MTS schemes according to a size of the current block comprises determining the set of available MTS schemes according to a size group for the current block.
[0259] Clause 70: The method of any of clauses 65 to 69, further comprising the step of decoding an MTS index value representing an MTS scheme from a set of available MTS schemes, and wherein determining the MTS scheme comprises determining the MTS scheme using the MTS index value.
[0260] Clause 71: The MTS index values have values between 0 and 3 inclusive, and the sets of MTS schemes are: { 17, 18, 23, 24}, { 3, 7, 18, 22}, { 2, 17, 18, 22}, { 3, 15, 17, 18}, { 3, 12, 18, 19}, { 12, 18, 19, 23}, { 2, 12, 17, 18}, { 2, 17, 18, 22}, { 2, 11, 17, 18}, { 12, 18, 19, 23}, { 12, 13, 16, 24}, { 2, 11, 16, 23}, { 2, 13, 17, 22}, { 2, 11, 17, 21}, { 13, 16, 19, 22}, { 7, 12, 13, 18}, { 1, 11, 12, 16}, { 3, 13, 17, 22}, { 1, 6, 12, 22}, { 12, 13, 15, 16}, { 18, 19, 23, 24}, { 2, 17, 18, 24}, { 3, 4, 17, 22}, { 12, 18, 19, 23}, { 12, 18, 19, 23}, { 6, 12, 18, 24}, { 2, 6, 12, 21}, { 1, 11, 17, 22}, { 3, 11, 16, 17}, { 8, 12, 19, 23}, { 7, 13, 16, 23}, { 1, 6, 11, 12}, { 1, 11, 17, 21}, { 6, 11, 17, 21}, { 8, 11, 14, 17}, { 6, 11, 12, 21}, { 1, 6, 11, 12}, { 2, 6, 11, 12}, { 1, 6, 11, 21}, { 7, 11, 12, 16}, { 8, 12, 19, 24}, { 1, 13, 18, 22}, { 2, 6, 17, 21}, { 11, 12, 16, 19}, { 8, 12, 17, 24}, { 6, 12, 19, 21}, { 6, 12, 13, 21}, { 2, 16, 17, 21}, { 6, 17, 19, 23}, { 6, 12, 14, 17}, { 6, 7, 11, 21}, { 1, 11, 12, 16}, { 1, 6, 11, 12}, { 6, 11, 12, 21}, { 7, 8, 9, 11}, { 6, 7, 11,12}, { 6, 7, 11, 12}, { 1, 11, 12, 16}, { 6, 11, 17, 21}, { 6, 7, 11, 12}, { 12, 14, 18, 21}, { 1, 11, 16, 22}, { 1, 11, 16, 22}, { 7, 13, 15, 16}, { 1, 8, 12, 19}, { 6, 7, 9, 12}, { 2, 6, 12, 13}, { 1, 12, 16, 21}, { 7, 11, 16, 19}, { 7, 8, 11, 12}, { 6, 7, 11, 12}, { 6, 7, 11, 12}, { 1, 6, 11, 12}, { 6, 7, 11, 16}, { 6, 7, 11, 12}, { 6, 7, 11, 12}, { 6, 11, 12, 21}, { 1, 6, 11, 12}, { 6, 7, 11, 12}, { 6, 7, 11, 12}, { 6, 7, 11, 12}, and the MTS index is { DCT8, DCT8}, { DCT8, DST7}, { DCT8, DCT5}, { DCT8, DST4}, {DCT8, DST1}, { DST7, DCT8}, { DST7, DST7}, { DST7, DCT5}, { DST7, DST4}, {DST7, DST1}, { DCT5, DCT8}, { DCT5, DST7}, { DCT5, DCT5}, { DCT5, DST4}, {DCT5, DST1}, { DST4, DCT8}, { DST4, DST7}, { DST4, DCT5}, { DST4, DST4}, {DST4, DST1}, { DST1, DCT8}, { DST1, DST7}, { DST1, DCT5}, { DST1, DST4}, {DST1, DST1}, the method of clause 70 showing the transformation pairs of the set of MTS methods available according to
[0261] Clause 72: The method of any of clauses 65 to 71, wherein each of the sets of MTS methods includes four respective transform pair options.
[0262] Clause 73: The method of any of clauses 65 to 72, further comprising determining a number of transformation pair options in the set of available MTS schemes according to a shape of the current block.
[0263] Clause 74: The method of any of clauses 65 to 73, further comprising determining a number of transform pair options in the set of available MTS schemes according to a quantization parameter of the current block.
[0264] Clause 75: The method of any of clauses 65 to 74, wherein the current block comprises a first block, the MTS scheme comprises a transform pair including a horizontal transform and a vertical transform, the first block has a size of W×H, W is not equal to H, the intra prediction mode comprises I1, and is an angular intra prediction mode, and the method further comprises the steps of determining that the second block has a size of H×W, determining that the second block has an intra prediction mode of (68-I1), determining a set of available MTS schemes for the second block according to the size of H×W and the intra prediction mode of (68-I1) for the second block, determining an MTS scheme for the second block, applying the horizontal transform of the MTS scheme as the vertical transform to the second block, and applying the vertical transform of the MTS scheme as the horizontal transform to the second block.
[0265] Clause 76: The method of any of clauses 65 to 74, wherein the current block comprises a first block, the MTS scheme comprises a transform pair including a horizontal transform and a vertical transform, the first block has a size of W×H, W is not equal to H, and the intra prediction mode comprises a matrix intra prediction (MIP) mode with a first transpose flag value, and the method further comprises the steps of determining that a second block has a size of H×W, determining that the intra prediction mode for the second block is a MIP intra prediction mode with a second transpose flag value different from the first transpose flag value, determining a set of available MTS schemes for the second block according to the MIP intra prediction mode having a size of H×W and the second transpose flag value for the second block, determining an MTS scheme for the second block from the set of available MTS schemes, applying the horizontal transform of the MTS scheme as the vertical transform to the second block, and applying the vertical transform of the MTS scheme as the horizontal transform to the second block.
[0266] Clause 77: The method of any of clauses 65 to 76, wherein when the current block is coded using a decoder-side intra mode derivation and fused intra prediction (DIMD) mode, determining the set of available MTS schemes according to the intra prediction mode includes determining the set of available MTS schemes according to a dominant angle mode determined using the DIMD mode.
[0267] Clause 78: The method of clause 77, wherein the dominant angular mode comprises the mode having the highest weight.
[0268] Clause 79: Any of the methods of clauses 65 to 78, wherein when the current block is coded using a decoder-side intra mode derivation and fused intra prediction (DIMD) mode, determining the set of available MTS schemes according to the intra prediction mode includes determining whether a difference between two angle mode values is greater than a threshold, and when the difference is greater than the threshold, determining the intra prediction mode includes determining the intra prediction mode to be a planar mode when determining the set of available MTS schemes, or when the difference is less than or equal to the threshold, determining the intra prediction mode includes determining the intra prediction mode to be a dominant angle mode determined using the DIMD mode.
[0269] Clause 80: Any of the methods of clauses 65 to 79, wherein when the intra-prediction mode includes a wide-angle intra-prediction mode, determining the set of available MTS schemes according to the intra-prediction mode includes determining the set of available MTS schemes according to a conventional intra-prediction mode having an angle closest to the angle of the wide-angle intra-prediction mode.
[0270] Clause 81: Determining a set of available MTS schemes according to a size and an intra-prediction mode for a current block includes determining a set of available MTS schemes according to the following table:
[0271] [Table 6]
[0272] 81. The method of any of clauses 65 to 80, wherein N is an integer value equal to or greater than 32.
[0273] Clause 82: The method of any of clauses 65 to 81, wherein determining the intra-prediction mode includes determining the intra-prediction mode according to a template-based intra-mode derivation (TIMD) mode.
[0274] Clause 83: The method of clause 82, wherein when the TIMD mode uses a fusion of two intra prediction modes, determining the set of available MTS schemes includes determining the set of available MTS schemes according to a dominant intra prediction mode of the two intra prediction modes.
[0275] Clause 84: The method of clause 82, wherein when the TIMD mode uses a fusion of two intra prediction modes, determining the set of available MTS schemes includes determining the set of available MTS schemes according to a planar mode when a difference between the two intra prediction modes is greater than a threshold, or determining the set of available MTS schemes according to a dominant intra prediction mode of the two intra prediction modes when the difference between the two intra prediction modes is less than or equal to the threshold.
[0276] Clause 85: The method of clause 84, wherein the dominant intra-prediction mode comprises the intra-prediction mode of the two intra-prediction modes that results in a lower distortion.
[0277] Clause 86: The method of any of clauses 84 and 85, wherein determining the set of available MTS schemes includes determining the set of available MTS schemes according to a table that maps the scaled intra-prediction mode angles to the set of available MTS schemes.
[0278] Clause 87: Any of the methods of clauses 65 to 86, wherein the step of decoding the current block includes the step of forming a prediction block for the current block using an intra prediction mode, and adding samples of the prediction block to corresponding samples of the residual block.
[0279] Clause 88: The method of any of clauses 65 to 87, further comprising the step of encoding the current block prior to decoding the current block.
[0280] Clause 89: A device for decoding video data, comprising: a memory configured to store the video data; and one or more processors implemented in a circuit configured to: determine a size of a current block of the video data; determine an intra-prediction mode for the current block of the video data; determine a mode group including the determined intra-prediction mode, where the mode group is one of a plurality of mode groups, each mode group among the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups; determine a set of available multiple transform selection (MTS) schemes for the current block according to the size and the intra-prediction mode for the current block, where the set of available MTS schemes is one set of available MTS schemes among a plurality of sets of MTS schemes; determine an MTS scheme from the set of available MTS schemes according to the determined mode group; apply a transform of the MTS scheme to a transform block of the current block to generate a residual block for the current block; and decode the current block using the residual block.
[0281] Clause 90: The device of clause 89, wherein the plurality of mode groups includes a first mode group including intra-prediction modes 0 and 1, a second group including intra-prediction modes 2 through 12, a third group including intra-prediction modes 13 through 23, a fourth group including intra-prediction modes 24 through 34, and a fifth group including a matrix intra-prediction (MIP) mode.
[0282] Clause 91: A device of any of clauses 89 and 90, wherein the size of the current block includes the width of the current block and the height of the current block, and the size of the current block is included in the size group.
[0283] Clause 92: The device of any of clauses 89 to 91, wherein the one or more processors are further configured to decode an MTS index value representing an MTS scheme from a set of available MTS schemes, and the one or more processors are configured to determine the MTS scheme using the MTS index value.
[0284] Clause 93: The device of any of clauses 89 to 92, wherein the current block includes a first block, the MTS scheme includes a transform pair including a horizontal transform and a vertical transform, the first block has a size of W×H, W is not equal to H, the intra prediction mode includes I1, and is an angular intra prediction mode, and the one or more processors are further configured to: determine that a second block has a size of H×W; determine that the second block has an intra prediction mode of (68-I1); determine a set of available MTS schemes for the second block according to the size of H×W and the intra prediction mode of (68-I1) for the second block; determine an MTS scheme for the second block; apply the horizontal transform of the MTS scheme as the vertical transform to the second block; and apply the vertical transform of the MTS scheme as the horizontal transform to the second block.
[0285] Clause 94: The device of any of clauses 89 to 93, wherein the current block includes a first block, the MTS scheme includes a transform pair including a horizontal transform and a vertical transform, the first block has a size of W×H, where W is not equal to H, and the intra prediction mode includes a matrix intra prediction (MIP) mode with a first transpose flag value, and the one or more processors are further configured to: determine that a second block has a size of H×W; determine that the intra prediction mode for the second block is a MIP intra prediction mode with a second transpose flag value different from the first transpose flag value; determine a set of available MTS schemes for the second block according to the MIP intra prediction mode having a size of H×W and the second transpose flag value for the second block; determine an MTS scheme for the second block from the set of available MTS schemes; apply the horizontal transform of the MTS scheme as the vertical transform to the second block; and apply the vertical transform of the MTS scheme as the horizontal transform to the second block.
[0286] Clause 95: The device of any of clauses 89 to 94, wherein the one or more processors are further configured to encode the current block before decoding the current block.
[0287] Clause 96: The device of any of clauses 89 to 95, further comprising a display configured to display the decoded video data.
[0288] Clause 97: Any of clauses 89 to 96, wherein the device includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0289] Clause 98: A computer-readable storage medium having stored thereon instructions which, when executed, cause a processor of a device for decoding video data to: determine a size of a current block of video data; determine an intra-prediction mode for the current block of video data; determine a mode group including the determined intra-prediction mode, where the mode group is one of a plurality of mode groups, each mode group among the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups; determine a set of available multiple transform selection (MTS) schemes for the current block according to the size and intra-prediction mode for the current block, where the set of available MTS schemes is one set of available MTS schemes among a plurality of sets of MTS schemes; determine an MTS scheme from the set of available MTS schemes according to the determined mode group; apply a transform of the MTS scheme to a transform block of the current block to generate a residual block for the current block; and decode the current block using the residual block.
[0290] Clause 99: The computer-readable storage medium of clause 98, wherein the plurality of mode groups include a first mode group including intra-prediction modes 0 and 1, a second group including intra-prediction modes 2 through 12, a third group including intra-prediction modes 13 through 23, a fourth group including intra-prediction modes 24 through 34, and a fifth group including a matrix intra-prediction (MIP) mode.
[0291] Clause 100: The computer-readable storage medium of any of clauses 98 and 99, wherein the size of the current block includes a width of the current block and a height of the current block, and the size of the current block is included in a size group.
[0292] Clause 101: The computer-readable storage medium of any of clauses 98 to 100, further comprising instructions for causing a processor to decode an MTS index value representing an MTS scheme from a set of available MTS schemes, wherein the instructions for causing the processor to determine the MTS scheme comprise instructions for causing the processor to determine the MTS scheme using the MTS index value.
[0293] Clause 102: The device of any of clauses 98 to 101, further comprising instructions to cause the processor to: determine that the second block has a size of H×W; determine that the second block has an intra prediction mode of (68-I1); determine a set of available MTS schemes for the second block according to the size of H×W and the intra prediction mode of (68-I1) for the second block; determine an MTS scheme for the second block; apply the horizontal transform of the MTS scheme as the vertical transform to the second block; and apply the vertical transform of the MTS scheme as the horizontal transform to the second block.
[0294] Clause 103: The device of any of clauses 98-102, further comprising instructions to cause the processor to determine that the second block has a size of H×W; determine that the intra prediction mode for the second block is a MIP intra prediction mode with a second transpose flag value different from the first transpose flag value; determine a set of available MTS schemes for the second block according to the MIP intra prediction mode having a size of H×W and the second transpose flag value for the second block; determine an MTS scheme for the second block from the set of available MTS schemes; apply the horizontal transform of the MTS scheme as the vertical transform to the second block; and apply the vertical transform of the MTS scheme as the horizontal transform to the second block.
[0295] Clause 104: The device of any of clauses 98 to 103, further comprising instructions that cause the processor to encode the current block before decoding the current block.
[0296] Clause 105: A device for decoding video data, comprising: means for determining a size of a current block of the video data; means for determining an intra-prediction mode for the current block of the video data; means for determining a mode group including the determined intra-prediction mode, where the mode group is one of a plurality of mode groups, each mode group among the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups; means for determining a set of available multiple transform selection (MTS) schemes for the current block according to the size and intra-prediction mode for the current block, where the set of available MTS schemes is one set of available MTS schemes among a plurality of sets of MTS schemes; means for determining an MTS scheme from the set of available MTS schemes according to the determined mode group; means for applying a transform of the MTS scheme to a transform block of the current block to generate a residual block for the current block; and means for decoding the current block using the residual block.
[0297] It should be appreciated that, depending on the example, some acts or events of any of the techniques described herein may be performed in a different sequence, or may be added, combined, or omitted entirely (e.g., not all acts or events described are necessary to the practice of the techniques). Furthermore, in some examples, acts or events may be performed simultaneously rather than sequentially, e.g., through multi-threaded processing, interrupt processing, or multiple processors.
[0298] 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 on or transmitted via a computer-readable medium as one or more instructions or code and executed by a hardware-based processing unit. A computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium, such as a data storage medium, or a communication medium including any medium that facilitates transfer of a computer program from one place to another, for example according to a communication protocol. Thus, a computer-readable medium may generally correspond to (1) a tangible computer-readable storage medium that is non-transitory, or (2) a communication medium such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code and / or data structures for implementation of the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0299] By way of example and not limitation, such computer-readable storage media may comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that may be used to store desired program code in the form of instructions or data structures and that may be accessed by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead cover non-transitory tangible storage media. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks typically reproduce data magnetically and discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer readable media.
[0300] The 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 circuitry. Thus, the terms "processor" and "processing circuitry" as used herein may refer to any of the above structures or any other structures 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 may be incorporated into a composite codec. Also, the techniques may be fully implemented in one or more circuits or logic elements.
[0301] The techniques of the present disclosure may be implemented in a wide variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs) or sets of ICs (e.g., chipsets). Various components, modules, or units have been described in this disclosure to highlight functional aspects of devices configured to perform the disclosed techniques, but they do not necessarily require realization by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit or may be provided by a collection of interoperable hardware units including one or more processors as described above, along with suitable software and / or firmware.
[0302] Various examples have been described. These and other examples are within the scope of the following claims. [Explanation of symbols]
[0303] 100 Video Encoding and Decoding System 102 Source Device 104 Video Sources 106 Memory 108 Output Interface 110 Computer-readable medium 112 Storage Devices 114 File Server 116 Destination Device 118 Display Devices 120 Memory 122 Input Interface 129 Rectangular Block 130A, 130B Sample 132A,132B Averaging Samples 136 Intermediate Prediction Blocks 138 predicted blocks 140A,140B Histogram 150 Final prediction block 160 Current CU 200 Video Encoder 202 Mode Selection Unit 204 Residual Generation Unit 206 Conversion Processing Unit 208 Quantization Units 210 Inverse Quantization Unit 212 Inverse Transformation Processing Unit 214 Reconstruction Unit 216 Filter unit 218 Decoded Picture Buffer (DPB) 220 Entropy Coding Unit 222 Motion Estimation Unit 224 Motion Compensation Unit 226 intra prediction units 230 Video Data Memory 232 Multiple Transformation Selection (MTS) Group 300 Video Decoder 302 Entropy Decoding Unit 304 Prediction Processing Unit 306 Inverse Quantization Unit 308 Inverse Transformation Processing Unit 310 Reconstruction Unit 312 Filter unit 314 Decoded Picture Buffer (DPB) 316 Motion Compensation Unit 318 Intra Prediction Units 320 Coded Picture Buffer (CPB) Memory 322 MTS Group
Claims
1. 1. A method for decoding video data, comprising the steps of: determining a size of a current block of video data; determining an intra-prediction mode for the current block of video data; determining a mode group including the determined intra-prediction mode, the mode group being one of a plurality of mode groups, each mode group in the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups, the plurality of mode groups including a first mode group including intra-prediction modes 0 and 1, a second group including intra-prediction modes 2 to 12, a third group including intra-prediction modes 13 to 23, a fourth group including intra-prediction modes 24 to 34, and a fifth group including a matrix intra-prediction (MIP) mode; determining a set of available multiple transform selection (MTS) schemes for the current block according to the size and the mode group for the current block, where the set of available MTS schemes is a set of available MTS schemes among a plurality of sets of MTS schemes, and each MTS scheme includes a horizontal transform and a vertical transform; determining an MTS scheme from the set of available MTS schemes; applying the MTS-based transform to a transform block of the current block to generate a residual block for the current block; decoding the current block using the residual block; The method includes:
2. the size of the current block includes a width of the current block and a height of the current block, the size of the current block being included in a size group; Preferably, the size group of the current block is selected from one of a plurality of size groups including: 4x4, 4x8, 4x16, 4xN, 8x4, 8x8, 8x16, 8xN, 16x4, 16x8, 16x16, 16xN, Nx4, Nx8, Nx16, NxN, where N is an integer power of 2 and is greater than 16; Preferably, the step of determining a set of available MTS schemes according to the size of the current block comprises the step of determining the set of available MTS schemes according to the size group for the current block. The method of claim 1.
3. and decoding an MTS index value representing the MTS scheme from the set of available MTS schemes, wherein the step of determining an MTS scheme includes determining the MTS scheme using the MTS index value; Preferably, the MTS index value has a value between 0 and 3 inclusive, and the plurality of sets of MTS schemes comprises: { 17, 18, 23, 24}、 { 3, 7, 18, 22}、 { 2, 17, 18, 22}、 { 3, 15, 17, 18}、 { 3, 12, 18, 19}、 { 12, 18, 19, 23}、 { 2, 12, 17, 18}、 { 2, 17, 18, 22}、 { 2, 11, 17, 18}、 { 12, 18, 19, 23}、 { 12, 13, 16, 24}、 { 2, 11, 16, 23}、 { 2, 13, 17, 22}、 { 2, 11, 17, 21}、 { 13, 16, 19, 22}、 { 7, 12, 13, 18}、 { 1, 11, 12, 16}、 { 3, 13, 17, 22}、 { 1, 6, 12, 22}、 { 12, 13, 15, 16}、 { 18, 19, 23, 24}、 { 2, 17, 18, 24}、 { 3, 4, 17, 22}、 { 12, 18, 19, 23}、 { 12, 18, 19, 23}、 { 6, 12, 18, 24}、 { 2, 6, 12, 21}、 { 1, 11, 17, 22}、 { 3, 11, 16, 17}、 { 8, 12, 19, 23}、 { 7, 13, 16, 23}、 { 1, 6, 11, 12}、 { 1, 11, 17, 21}、 { 6, 11, 17, 21}、 { 8, 11, 14, 17}、 { 6, 11, 12, 21}、 { 1, 6, 11, 12}、 { 2, 6, 11, 12}、 { 1, 6, 11, 21}、 { 7, 11, 12, 16}、 { 8, 12, 19, 24}、 { 1, 13, 18, 22}、 { 2, 6, 17, 21}、 { 11, 12, 16, 19}、 { 8, 12, 17, 24}、 { 6, 12, 19, 21}、 { 6, 12, 13, 21}、 { 2, 16, 17, 21}、 { 6, 17, 19, 23}、 { 6, 12, 14, 17}、 { 6, 7, 11, 21}、 { 1, 11, 12, 16}、 { 1, 6, 11, 12}、 { 6, 11, 12, 21}、 { 7, 8, 9, 11}、 { 6, 7, 11, 12}、 { 6, 7, 11, 12}、 { 1, 11, 12, 16}、 { 6, 11, 17, 21}、 { 6, 7, 11, 12}、 { 12, 14, 18, 21}、 { 1, 11, 16, 22}、 { 1, 11, 16, 22}、 { 7, 13, 15, 16}、 { 1, 8, 12, 19}、 { 6, 7, 9, 12}、 { 2, 6, 12, 13}、 { 1, 12, 16, 21}、 { 7, 11, 16, 19}、 { 7, 8, 11, 12}、 { 6, 7, 11, 12}、 { 6, 7, 11, 12}、 { 1, 6, 11, 12}、 { 6, 7, 11, 16}、 { 6, 7, 11, 12}、 { 6, 7, 11, 12}、 { 6, 11, 12, 21}、 { 1, 6, 11, 12}、 { 6, 7, 11, 12}、 { 6, 7, 11, 12} Including, The MTS index is { DCT8, DCT8}, { DCT8, DST7}, { DCT8, DCT5}, { DCT8, DST4}, {DCT8, DST1}, { DST7, DCT8}, { DST7, DST7}, { DST7, DCT5}, { DST7, DST4}, {DST7, DST1}, { DCT5, DCT8}, { DCT5, DST7}, { DCT5, DCT5}, { DCT5, DST4}, {DCT5, DST1}, { DST4, DCT8}, { DST4, DST7}, { DST4, DCT5}, { DST4, DST4}, {DST4, DST1}, { DST1, DCT8}, { DST1, DST7}, { DST1, DCT5}, { DST1, DST4}, {DST1, DST1} , the transformation pairs of the set of available MTS schemes are shown according to The method of claim 1.
4. determining a number of transform pair options in the set of available MTS schemes according to a shape of the current block or a quantization parameter of the current block; The method of claim 1.
5. The current block includes a first block, the MTS scheme includes a transform pair including a horizontal transform and a vertical transform, the first block has a size of W×H, W is not equal to H, and the intra prediction mode is I 1 , which is an angular intra prediction mode, The method further comprising: determining that the second block has a size of H×W; The second block is (68-I 1 ) intra prediction modes; The H×W size for the second block and the (68-I 1 determining the set of available MTS schemes for the second block according to an intra prediction mode of the first block; determining the MTS scheme for the second block; applying the horizontal transform of the MTS scheme as a vertical transform to the second block; applying the vertical transform of the MTS scheme as a horizontal transform to the second block; The method of claim 1, further comprising:
6. the current block comprises a first block, the MTS scheme comprises a transform pair including a horizontal transform and a vertical transform, the first block has a size of W×H, W is not equal to H, and the intra prediction mode comprises a matrix intra prediction (MIP) mode with a first transpose flag value; The method further comprising: determining that the second block has a size of H×W; determining that an intra prediction mode for the second block is a MIP intra prediction mode having a second transpose flag value different from the first transpose flag value; determining the set of available MTS schemes for the second block according to the MIP intra prediction mode having the H×W size and the second transposition flag value for the second block; determining the MTS scheme for the second block from the set of available MTS schemes; applying the horizontal transform of the MTS scheme as a vertical transform to the second block; applying the vertical transform of the MTS scheme as a horizontal transform to the second block; The method of claim 1, further comprising:
7. When the current block is coded using a decoder-side intra mode derivation and fused intra prediction (DIMD) mode, the step of determining a set of available MTS schemes according to the intra prediction mode includes: determining the set of available MTS schemes according to a dominant angular mode determined using the DIMD mode; or the dominant angular mode comprises the mode having the highest weight, or determining whether a difference between two angle mode values is greater than a threshold; When the difference is greater than the threshold, the step of determining an intra-prediction mode includes determining the intra-prediction mode as a planar mode when determining the set of available MTS schemes; or When the difference is less than or equal to the threshold, determining the intra-prediction mode includes determining the intra-prediction mode as being a dominant angle mode determined using the DIMD mode. The method of claim 1.
8. 2. The method of claim 1, wherein when the intra prediction mode includes a wide-angle intra prediction mode, determining a set of available MTS schemes according to the intra prediction mode includes determining the set of available MTS schemes according to a conventional intra prediction mode having an angle closest to an angle of the wide-angle intra prediction mode.
9. Determining a set of available MTS schemes according to the size and the intra prediction mode for the current block includes determining the set of available MTS schemes according to the following table: 【Table 1】 2. The method of claim 1, wherein N is an integer value equal to or greater than 32.
10. determining an intra-prediction mode according to a template-based intra-mode derivation (TIMD) mode; Preferably, when the TIMD mode uses a fusion of two intra prediction modes, the step of determining a set of available MTS schemes includes a step of determining the set of available MTS schemes according to a dominant intra prediction mode of the two intra prediction modes.
11. The method of claim 10, wherein determining an intra-prediction mode comprises determining the intra-prediction mode according to a template-based intra-mode derivation (TIMD) mode. Preferably, When the TIMD mode uses a fusion of two intra prediction modes, the step of determining a set of available MTS schemes further comprises: determining the set of available MTS schemes according to a planar mode when the difference between the two intra prediction modes is greater than a threshold; or determining the set of available MTS schemes according to a dominant intra-prediction mode of the two intra-prediction modes when the difference between the two intra-prediction modes is less than or equal to the threshold value; Including, Preferably, the dominant intra prediction mode comprises the intra prediction mode of the two intra prediction modes that results in lower distortion, or The step of determining a set of available MTS schemes includes determining the set of available MTS schemes according to a table that maps the scaled intra-prediction mode angles to a set of available MTS schemes. The method of claim 1.
12. 4. The method of claim 3, wherein the step of decoding the current block further comprises: forming a prediction block for the current block using the intra-prediction mode; adding samples of the prediction block to corresponding samples of the residual block; 2. The method of claim 1, comprising:
13. The method of claim 1 , further comprising the step of encoding the current block before decoding the current block.
14. 1. A device for decoding video data, comprising: a memory configured to store video data; One or more processors implemented in circuitry, determining a size of a current block of video data; determining an intra-prediction mode for the current block of video data; determining a mode group including the determined intra-prediction mode, the mode group being one of a plurality of mode groups, each mode group in the plurality of mode groups including a respective set of intra-prediction modes such that each possible intra-prediction mode is included in only one of the mode groups, the plurality of mode groups including a first mode group including intra-prediction modes 0 and 1, a second group including intra-prediction modes 2 through 12, a third group including intra-prediction modes 13 through 23, a fourth group including intra-prediction modes 24 through 34, and a fifth group including a matrix intra-prediction (MIP) mode; determining a set of available multiple transform selection (MTS) schemes for the current block according to the size and the mode group for the current block, where the set of available MTS schemes is a set of available MTS schemes among a plurality of sets of MTS schemes, each MTS scheme including a horizontal transform and a vertical transform; determining an MTS scheme from the set of available MTS schemes according to the determined mode group; applying the MTS-based transform to a transform block of the current block to generate a residual block for the current block; decoding the current block using the residual block; one or more processors configured to 16. A device comprising:
15. The processor is further configured to perform a method according to any one of claims 2 to 13.
15. The device of claim 14.