Transforming video data using non-separable linear transforms
Non-separable linear transforms (NSPTs) directly applied to residual video data enhance coding efficiency by bypassing separable transforms, improving compression performance over existing methods.
Patent Information
- Application Number
- JP2025518275
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-12
- Filing Date
- 2023-10-13
- Publication Date
- 2025-11-05
AI Technical Summary
Existing video coding techniques face limitations in achieving optimal compression efficiency due to the reliance on separable transforms, which can be improved by incorporating non-separable linear transforms (NSPTs) that are applied directly to residual data without prior separable transforms.
The use of non-separable linear transforms (NSPTs) directly applied to residual video data, bypassing the need for separate transforms, to enhance coding efficiency by processing block shapes with dedicated NSPT kernels.
NSPTs improve coding efficiency by allowing larger transform kernels to be used, resulting in enhanced compression performance compared to separable transforms and low-frequency non-separable transforms (LFNSTs).
Smart Images

Figure 2025536198000001_ABST
Abstract
Description
[Technical Field]
[0001] This application claims priority to U.S. Patent Application No. 18 / 485,707, filed October 12, 2023, U.S. Provisional Patent Application No. 63 / 379,422, filed October 13, 2022, and U.S. Provisional Patent Application No. 63 / 385,678, filed December 1, 2022, the entire contents of each of which are incorporated herein by reference. U.S. Patent Application No. 18 / 485,707, filed October 12, 2023, claims the benefit of U.S. Provisional Patent Application No. 63 / 379,422, filed October 13, 2022, and U.S. Provisional Patent Application No. 63 / 385,678, filed December 1, 2022.
[0002] FIELD OF THE DISCLOSURE
[0002] This disclosure relates to video coding, including video encoding and video decoding. [Background technology]
[0003]
[0003] Digital video capabilities can be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video gaming devices, video game consoles, cellular or satellite radio telephones, so-called "smartphones," video teleconferencing devices, video streaming devices, and the like. 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 Video1 (AV1) developed by the Alliance for Open Media. By implementing such video coding techniques, video devices can more efficiently transmit, receive, encode, decode, and / or store digital video information.
[0004]
[0004] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. In 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 coded 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
[0005]
[0005] Generally, this disclosure describes techniques related to transforming video data during video coding. That is, transforms are used to convert representations of residual video data (representing the difference between an uncoded block and a predictive block) between the spatial or pixel domain and the frequency domain. For example, during video encoding, a residual block may be transformed into a transform block in the frequency domain, while during video decoding, the transform block may be transformed from the frequency domain to a reconstructed residual block in the spatial or pixel domain. This disclosure describes techniques related to using non-separable linear transforms when transforming or inverse transforming video data.
[0006]
[0006] In one embodiment, a method for decoding video data includes inversely transforming a block of transform coefficients of the block of video data using an inverse non-separable primary transform (NSPT) without using an inverse separable transform to reconstruct a residual block of the block of video data, and decoding the block of video data using the residual block.
[0007]
[0007] In another embodiment, a device for decoding video data includes a memory configured to store the video data and a processing system including one or more processors implemented in circuitry, wherein the processing system is configured to inverse transform a block of transform coefficients of the block of video data using an inverse non-separable linear transform (NSPT) without using an inverse separable transform to reconstruct a residual block of the block of video data, and to decode the block using the residual block.
[0008]
[0008] In another embodiment, a device for decoding video data includes means for inverse transforming a block of transform coefficients of a block of video data using an inverse non-separable linear transform (NSPT) without using an inverse separable transform to reconstruct a residual block of the block of video data, and means for decoding the block of video data using the residual block.
[0009] The details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description, drawings, and claims. [Brief explanation of the drawings]
[0010] [Figure 1]
[0010] FIG. 1 is a block diagram illustrating an example video encoding and decoding system capable of implementing the techniques of this disclosure. [Figure 2]
[0011] FIG. 1 is a block diagram illustrating an example video encoder capable of implementing the techniques of this disclosure. [Figure 3]
[0012] FIG. 2 is a block diagram illustrating an example video decoder capable of implementing the techniques of this disclosure. [Figure 4A]
[0013] FIG. 1 is a conceptual diagram illustrating the use of separable transforms and low-frequency non-separable transforms (LFNSTs) in encoding and decoding video data. [Figure 4B] FIG. 1 is a conceptual diagram illustrating the use of separable transforms and low-frequency non-separable transforms (LFNSTs) in encoding and decoding video data. [Figure 5]
[0014] FIG. 1 is a conceptual diagram illustrating the inverse non-separable linear transformation (NSPT) process. [Figure 6A]
[0015] FIG. 1 is a conceptual diagram illustrating an exemplary scanning pattern for rearranging dequantized coefficients before application of NSPT. [Figure 6B] FIG. 1 is a conceptual diagram illustrating an exemplary scanning pattern for rearranging dequantized coefficients before application of NSPT. [Figure 6C] FIG. 1 is a conceptual diagram illustrating an exemplary scanning pattern for rearranging dequantized coefficients before application of NSPT. [Figure 7]
[0016] A conceptual diagram showing a permuted one-dimensional array from a two-dimensional matrix. [Figure 8]
[0017] FIG. 1 is a conceptual diagram illustrating deinterlacing of a set of decoded coefficients into four one-dimensional arrays. [Figure 9]
[0018] 10 is a flowchart illustrating an exemplary method for encoding a current block, in accordance with techniques of this disclosure. [Figure 10]
[0019] 10 is a flowchart illustrating an example method for decoding a current block, in accordance with techniques of this disclosure. [Figure 11]
[0020] 1 is a flowchart illustrating an example method for encoding video data using a non-separable linear transform (NSPT), in accordance with techniques of this disclosure. [Figure 12]
[0021] 1 is a flowchart illustrating an example method for decoding video data using a non-separable linear transform (NSPT), in accordance with techniques of this disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0011]
[0022] Video coding generally involves forming predictive blocks for current blocks of video data and then calculating differences between the current and predictive blocks to form residual blocks. A video encoder may then apply one or more transforms to the residual blocks to generate transform blocks in the transform domain. A "transform block" may be a block of transform coefficients. A video decoder may perform the inverse process, meaning that the video decoder may decode the transform block, inverse transform the transform block to reconstruct a residual block, and then add the residual block to the predictive block to reconstruct the original, uncoded block of video data.
[0012]
[0023] Video coding standards prior to ITU-T H.265 / High Efficiency Video Coding (HEVC) only used fixed separate transforms, such as DCT-2, which could be used in both the vertical and horizontal directions. HEVC adds DST-7 as a possible transform in addition to DCT-2 for 4x4 blocks as a fixed separate transform. Separate transforms generally refer to performing a transform in multiple steps. For example, in a first step, a vertical transform is applied and then a horizontal transform is applied to the result, or vice versa.
[0013]
[0024] In addition to separable transforms, low-frequency non-separable transforms (LFNSTs) can also be applied to further improve coding efficiency. A non-separable transform generally refers to a transform that is applied at once (e.g., values are transformed in one step rather than split into horizontal and vertical transforms). LFNSTs are non-separable secondary transforms (NSSTs) that are applied to the primary transform coefficients resulting from applying the separable transform as the primary transform.
[0014]
[0025] In some embodiments, three LFNST classes (LFNST4, LFNST8, LFNST16) may be used depending on the shape of the blocks of video data. Each of these classes may include, for example, 35 sets and three candidates. In one embodiment, LFNST4 is applied to blocks of size 4×N / N×4 (N≧4), LFNST8 is applied to blocks of size 8×N / N×8 (N≧8), and LFNST16 is applied to blocks of size M×N (M, N≧16).
[0015]
[0026] In some embodiments, the set is selected based on the intra mode of the current block, which can be mapped to one of 35 sets according to the following lookup table: const uint8_t g_nsptLut
[97] = { / / 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
[0016]
[0027] In some embodiments, if the intra mode is >34, the corresponding block of primary transform coefficients is transposed before application of the LFNST.
[0017]
[0028] The signs of the transform coefficients can be predicted as part of the sign prediction process. In some implementations, the prediction region is adaptively selected as a 32x32 region, and the number of predicted signs is configurable for non-LFNST transform blocks. For LFNST, the prediction region can be limited to the top-left 4x4 region, and a maximum of four coefficients can be predicted.
[0018]
[0029] This disclosure describes techniques that involve using non-separable linear transforms (NSPTs) as an addition to existing transform kernels. NSPTs are an additional class of transforms that are applied directly to residual data and therefore do not require a prior separable transform. Using NSPTs can improve the coding efficiency that can be achieved using larger NSPT transform kernels (i.e., larger than separable transform kernels) as opposed to using both separable transforms and LFNSTs.
[0019]
[0030] According to the techniques of this disclosure, NSPT can be used to process affected block shapes. Each block shape can be processed by a dedicated NSPT kernel, and these NSPT kernels can have different sets and numbers of candidates. If a block shape indicates processing through NSPT, the separate linear transform and LFNST are not applied. As a result, compression efficiency can be improved.
[0020]
[0031] 1 is a block diagram illustrating an example video encoding and decoding system 100 capable of implementing the techniques of this disclosure. The techniques of this disclosure are generally directed to coding (encoding and / or decoding) video data. Generally, video data includes any data for processing video. Thus, video data may include raw uncoded video, coded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling data.
[0021]
[0032] 1 , in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. Specifically, source device 102 provides the video data to destination device 116 via a computer-readable medium 110. Source device 102 and destination device 116 may include any of a 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, etc. In some cases, source device 102 and destination device 116 may be capable of wireless communication and therefore may be referred to as wireless communication devices.
[0022]
[0033] In the example of FIG. 1 , source device 102 includes video source 104, memory 106, video encoder 200, and output interface 108. Destination device 116 includes input interface 122, video decoder 300, memory 120, and display device 118. According to this disclosure, video encoder 200 of source device 102 and video decoder 300 of destination device 116 may be configured to apply techniques for transforming video data using a non-separable linear transform. Thus, source device 102 represents an example of a video encoding device, while destination device 116 represents an example of a video decoding device. In other examples, the source device and destination device may include other components or configurations. For example, source device 102 may receive video data from an external video source, such as an external camera. Similarly, destination device 116 may interface with an external display device rather than including an integrated display device.
[0023]
[0034] System 100 as shown in FIG. 1 is merely an example. In general, any digital video encoding and / or decoding device can perform techniques for converting video data using NSPT. Source device 102 and destination device 116 are merely examples of such coding devices, in which source device 102 generates coded video data for transmission to destination device 116. In this disclosure, devices that perform coding (encoding and / or decoding) of data are referred to as “coding” devices. Thus, video encoder 200 and video decoder 300 represent examples of coding devices, specifically, examples of video encoders and video decoders, respectively. In some embodiments, source device 102 and destination device 116 may operate in a substantially symmetrical manner, such that source device 102 and destination device 116 each include video encoding and decoding components. Thus, system 100 can support unidirectional or bidirectional video transmission between source device 102 and destination device 116, e.g., for video streaming, video playback, video broadcasting, or video telephony.
[0024]
[0035] Generally, video source 104 represents a source of video data (i.e., raw, uncoded video data) and provides a sequential series of pictures (also referred to as “frames”) of that video data to video encoder 200, which encodes data related to those 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 the source video, or a combination of live video, archived video, and computer-generated video. In either 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 are received (sometimes referred to as “display order”) into a coding order for coding. Video encoder 200 may generate a bitstream including the encoded video data. The source device 102 can then output the encoded video data via the output interface 108 onto a computer-readable medium 110 for receipt and / or retrieval, for example, by the input interface 122 of the destination device 116.
[0025]
[0036] Memory 106 of source device 102 and memory 120 of destination device 116 represent general-purpose memory. In some embodiments, memories 106, 120 can store raw video data, e.g., raw video from video source 104 and raw decoded video data from video decoder 300. Additionally or alternatively, memories 106, 120 can store software instructions, e.g., executable by video encoder 200 and video decoder 300, respectively. While memory 106 and memory 120 are shown in this embodiment as separate from video encoder 200 and video decoder 300, it should be understood that video encoder 200 and video decoder 300 may also include internal memory for functionally similar or equivalent purposes. Furthermore, memories 106, 120 can store encoded video data, e.g., output from video encoder 200 and input to video decoder 300. In some embodiments, a portion of memory 106, 120 may be allocated as one or more video buffers, for example, for storing raw decoded video data and / or encoded video data.
[0026]
[0037] The computer-readable medium 110 may represent any type of medium or device capable of transferring encoded video data from the source device 102 to the destination device 116. In one embodiment, the computer-readable medium 110 represents a communication medium that enables 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 containing the encoded video data, and the input interface 122 may demodulate a received transmission signal, in accordance with a communication standard such as a wireless communication protocol. The communication medium may include any wireless or wired communication medium, such as the radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network, such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include routers, switches, base stations, or any other equipment that may be useful for facilitating communication from the source device 102 to the destination device 116.
[0027]
[0038] In some embodiments, 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.
[0028]
[0039] In some embodiments, source device 102 may output the encoded video data to file server 114 or to another intermediate storage device capable of storing 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.
[0029]
[0040] File server 114 may be any type of server device capable of storing encoded video data and transmitting the encoded video data to destination device 116. 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 also, 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.
[0030]
[0041] Destination device 116 can access the encoded video data from file server 114 over 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 encoded video data stored on file server 114. Input interface 122 may be configured to operate according to any one or more of the various protocols described above for retrieving or receiving media data from file server 114, or other such protocols for retrieving media data.
[0031]
[0042] Output interface 108 and input interface 122 may represent a wireless transmitter / receiver, a modem, a wired network 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 embodiments in which output interface 108 and input interface 122 include wireless components, output interface 108 and 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 embodiments in which output interface 108 includes a wireless transmitter, output interface 108 and 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 embodiments, source device 102 and / or destination device 116 may include corresponding system-on-chip (SoC) devices. For example, source device 102 may include an SoC device for performing functionality attributed to video encoder 200 and / or output interface 108, and destination device 116 may include an SoC device for performing functionality attributed to video decoder 300 and / or input interface 122.
[0032]
[0043] The techniques of this disclosure may be applied to video coding to support 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.
[0033]
[0044] Input interface 122 of destination device 116 receives an encoded video bitstream from computer-readable medium 110 (e.g., a communications medium, storage device 112, file server 114, etc.). The encoded video bitstream may include signaling information defined by video encoder 200, such as syntax elements having values that describe characteristics and / or processing of video blocks or other coding units (e.g., slices, pictures, groups of pictures, sequences, etc.), which signaling information is also used by video decoder 300. Display device 118 displays decoded pictures of the decoded video data to a user. Display device 118 may represent any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.
[0034]
[0045] Although not shown in FIG. 1, in some embodiments, 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 for processing multiplexed streams that include both audio and video within a common data stream.
[0035]
[0046] 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. If the techniques are implemented partially in software, a device may store instructions for the software in a suitable non-transitory computer-readable medium and execute those 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 corresponding 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 telephone.
[0036]
[0047] The video encoder 200 and the video decoder 300 may operate according to a video coding standard such as ITU-T H.265, also known as High Efficiency Video Coding (HEVC), or an extension thereof, such as multiview and / or scalable video coding extensions. 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 known as Versatile Video Coding (VVC). In other embodiments, the video encoder 200 and the video decoder 300 may operate according to a proprietary video codec / format such as AOMedia Video1 (AV1), an extension of AV1, and / or a successor version of AV1 (e.g., AV2). In other embodiments, 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 in conjunction with any video coding technique that transforms video data using NSPT.
[0037]
[0048] In general, the video encoder 200 and the video decoder 300 can perform block-based coding of pictures. The term “block” generally refers to a structure containing data to be processed (e.g., encoded, decoded, or otherwise used in the encoding and / or decoding process). For example, a block may include a two-dimensional matrix of luma and / or chroma data samples. In general, the video encoder 200 and the video decoder 300 can code video data represented in YUV (e.g., Y, Cb, Cr) format. That is, rather than coding red, green, and blue (RGB) data for picture samples, the video encoder 200 and the video decoder 300 can code luma and chroma components, which may include both red and blue hues. In some embodiments, the video encoder 200 converts received RGB-formatted data to a YUV representation before encoding, and the video decoder 300 converts the YUV representation to RGB format. Alternatively, pre-processing and post-processing units (not shown) can perform these transformations.
[0038]
[0049] This disclosure may generally refer to coding (e.g., encoding and decoding) a picture as including the process of encoding or decoding data for a picture. Similarly, this disclosure may refer to coding a block of a picture as including the process of encoding or decoding data for the block, e.g., predictive coding and / or residual coding. A coded video bitstream generally includes a series of values for syntax elements that represent coding decisions (e.g., coding modes) and the partitioning of a picture into blocks. Therefore, 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.
[0039]
[0050] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video coder (such as video encoder 200) partitions 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 with no child nodes may be referred to as 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 the partitioning of TUs. In HEVC, a PU represents inter-predicted data, while a TU represents residual data. A CU that is intra predicted includes intra prediction information such as an intra mode indication.
[0040]
[0051] 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 quadtree-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 quadtree partitioning and a second level partitioned according to binary tree partitioning. The root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary tree correspond to coding units (CUs).
[0041]
[0052] In the MTT partitioning structure, blocks can be partitioned using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of triple tree (TT) (also called ternary tree (TT)) partitioning. Triple tree or triple tree partitioning is a partitioning where a block is divided into three sub-blocks. In some embodiments, triple tree or triple tree partitioning divides a block into three sub-blocks without splitting the original block down the middle. The partitioning types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.
[0042]
[0053] When operating according to the AV1 codec, the video encoder 200 and the video decoder 300 may be configured to code video data block-by-block. In AV1, the largest coding block that can be processed is called a superblock. In AV1, a superblock can be either 128x128 luma samples or 64x64 luma samples. However, in successor video coding formats (e.g., AV2), a superblock can be defined by a different (e.g., larger) luma sample size. In some embodiments, 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 partitioning. Non-square blocks may include N / 2xN, NxN / 2, N / 4xN, and NxN / 4 blocks. Video encoder 200 and video decoder 300 may perform separate prediction and transformation processes for each of the coding blocks.
[0043]
[0054] AV1 also defines tiles of video data. A tile is a rectangular array of superblocks that can be coded independently of other tiles. That is, video encoder 200 and video decoder 300 can encode and decode coding blocks within a tile, respectively, without using video data from other tiles. However, video encoder 200 and video decoder 300 can 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.
[0044]
[0055] In some embodiments, the video encoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luma and chroma components, while in other embodiments, the video encoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luma component and another QTBT / MTT structure for both chroma components (or two QTBT / MTT structures for each chroma component).
[0045]
[0056] Video encoder 200 and video decoder 300 may be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, superblock partitioning, or other partitioning structures.
[0046]
[0057] In some embodiments, a CTU includes a coding tree block (CTB) of luma samples and two corresponding CTBs of chroma samples for a picture with three sample arrangements, or a CTB of samples for a monochrome picture, or a CTB of samples for a picture coded using three separate color planes and syntax structures used to code the samples. A CTB can be an N×N block of samples for some value of N such that the division of the components into CTBs is partitioned. A component can be one of the three arrangements (luma and two chroma) for a picture with 4:2:0, 4:2:2, or 4:4:4 color format, or a single sample from that arrangement, or an arrangement for a picture in monochrome format, or a single sample from that arrangement. In some embodiments, a 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.
[0047]
[0058] Blocks (e.g., CTUs or CUs) can be grouped in various ways within a picture. As an example, a brick may refer to a rectangular region of a row of CTUs within a particular tile within a picture. A tile may be a rectangular region of CTUs within a particular tile column and a particular tile row within 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). 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) and a width equal to the width of the picture.
[0048]
[0059] In some embodiments, a tile may be partitioned into multiple bricks, each of which may include one or more CTU rows within that 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 within a picture may also be organized as slices. A slice may be an integer number of bricks of a picture that can be contained exclusively within a single network abstraction layer (NAL) unit. In some embodiments, a slice may include any number of complete tiles or only a continuous sequence of complete bricks of one tile.
[0049]
[0060] 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 will have 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an NxN CU will generally have 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 organized in rows and columns. Furthermore, a CU need not necessarily have the same number of samples in the horizontal and vertical directions. For example, a CU may include NxM samples, where M is not necessarily equal to N.
[0050]
[0061] Video encoder 200 encodes video data for a CU, which 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 the samples of the CU before encoding and the predictive block.
[0051]
[0062] To predict a CU, the video encoder 200 may generally form a predictive block for that 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 a motion search to identify a reference block that closely matches the CU, for example, in terms of the difference between the CU and the reference block. The video encoder 200 may calculate a difference metric using the sum of absolute difference (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared differences (MSD), or other such difference calculation to determine whether the reference block closely matches the current CU. In some embodiments, video encoder 200 may predict the current CU using unidirectional prediction or bidirectional prediction.
[0052]
[0063] Some implementations of VVC also provide an affine motion compensation mode, which can be considered an inter-prediction mode. In affine motion compensation mode, video encoder 200 can determine two or more motion vectors that represent non-translational motion, such as zooming in or out, rotation, perspective movement, or other irregular motion types.
[0053]
[0064] To perform intra prediction, video encoder 200 can select an intra prediction mode to generate a predictive block. Some implementations of VVC provide 67 intra prediction modes, including various directional modes, as well as planar and DC modes. Generally, video encoder 200 selects an intra prediction mode that describes samples neighboring a current block (e.g., a block of a CU) and predicts samples of the current block from the neighboring samples. Assuming that video encoder 200 codes CTUs and CUs in raster scan order (left to right, top to bottom), such samples may generally reside above, above and to the left, or to the left of the current block within the same picture as the current block.
[0054]
[0065] The video encoder 200 encodes data representing a prediction mode for the current block. For example, in the case of an inter-prediction mode, the video encoder 200 may encode data representing which of various available inter-prediction modes is used, as well as data representing motion information for the corresponding mode. In the case of unidirectional or bidirectional inter-prediction, for example, the video encoder 200 may encode a motion vector using an advanced motion vector prediction (AMVP) mode or a merge mode. The video encoder 200 may use a similar mode to encode a motion vector for an affine motion compensation mode.
[0055]
[0066] 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.
[0056]
[0067] Following prediction, such as intra-prediction or inter-prediction, of a block, the video encoder 200 may compute residual data for the block. The residual data, such as a residual block, represents sample-by-sample differences between the block and a prediction block for the block 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. Furthermore, the video encoder 200 may apply a secondary transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, or a Karhunen-Loeve transform (KLT), following the initial transform. The video encoder 200 generates transform coefficients following the application of the one or more transforms.
[0057]
[0068] According to the techniques of this disclosure, video encoder 200 may determine to apply a non-separable linear transform (NSPT) to a residual block without applying a separate transform to the residual block before applying the NSPT. Because the NSPT is applied without a separate transform, video encoder 200 may apply the NSPT to the entire residual block. Video encoder 200 may determine to apply an NSPT according to a prediction mode used to form the corresponding prediction block and / or according to the size of the residual block. For example, video encoder 200 may determine that the residual block has one of the following sizes: 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, or 16x8. Video encoder 200 may include different NSPTs for residual blocks of different sizes and / or for different prediction modes (e.g., various intra-prediction modes). Therefore, a combination of a particular intra-prediction mode and a size of the residual block may be mapped to a particular NSPT. For blocks having sizes other than those mapped to the NSPT, and / or other prediction modes (e.g., inter-prediction or affine), the video encoder 200 may apply a conventional separable transform, followed by a low-frequency non-separable transform that the video encoder 200 may apply to only a portion of the resulting transform block.
[0058]
[0069] As described above, following any transformation to generate transform coefficients, the video encoder 200 may perform quantization of those transform coefficients. Quantization generally refers to a process in which transform coefficients are quantized to provide further compression by possibly reducing the amount of data used to represent the transform coefficients. By performing the quantization process, the video encoder 200 may reduce the bit depth associated with some or all of the transform coefficients. For example, during quantization, the video encoder 200 may truncate an n-bit value to an m-bit value, where n is greater than m. In some embodiments, to perform quantization, the video encoder 200 may perform a bitwise right shift of the value to be quantized.
[0059]
[0070] Following quantization, the video encoder 200 may generate a one-dimensional vector from a two-dimensional matrix containing the quantized transform coefficients by scanning the transform coefficients. This scanning may be designed to place higher energy (and therefore lower frequency) transform coefficients at the front of the vector and lower energy (and therefore higher frequency) transform coefficients at the back of the vector. In some embodiments, the video encoder 200 may scan the quantized transform coefficients using a predefined scanning order to generate a serialized vector and then entropy code the quantized transform coefficients of the vector. In other embodiments, the video encoder 200 may perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, the video encoder 200 may entropy code the one-dimensional vector, for example, according to context-adaptive binary arithmetic coding (CABAC). The video encoder 200 may also entropy encode values for syntax elements that describe metadata associated with the encoded video data for use by the video decoder 300 in decoding the video data.
[0060]
[0071] To perform CABAC, 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 zero values. The probability determination may be based on the context assigned to the symbol.
[0061]
[0072] Video encoder 200 may further generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, 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), to video decoder 300. Video decoder 300 may similarly decode such syntax data to determine how to decode the corresponding video data.
[0062]
[0073] In this manner, video encoder 200 may generate a bitstream that includes coded video data, e.g., syntax elements that describe the partitioning of a picture into blocks (e.g., CUs), as well as prediction and / or residual information for those blocks. Ultimately, video decoder 300 may receive the bitstream and decode the coded video data.
[0063]
[0074] In general, video decoder 300 performs a reciprocal process to that performed by video encoder 200 to decode encoded video data of a bitstream. For example, video decoder 300 can decode values for syntax elements of a bitstream using CABAC in a manner that is reciprocal but substantially similar to the CABAC encoding process of video encoder 200. The syntax elements can define partitioning information regarding the partitioning of a picture into CTUs and the partitioning of each CTU according to a corresponding partitioning structure, such as a QTBT structure, to define the CUs of the CTU. The syntax elements can further define prediction information and residual information for blocks of video data (e.g., CUs).
[0064]
[0075] The residual information may be represented by, for example, quantized transform coefficients. The video decoder 300 may reconstruct a residual block for a block by inverse quantizing and inverse transforming the quantized transform coefficients of the block. The video decoder 300 may form a predictive block for the block by using the signaled prediction mode (intra-prediction or inter-prediction) and associated prediction information (e.g., motion information for inter-prediction). The video decoder 300 may then reconstruct the original block by combining the predictive block and the residual block (sample by sample). The video decoder 300 may perform additional processing, such as performing a deblocking process, to reduce visual artifacts along block boundaries.
[0065]
[0076] According to the techniques of this disclosure, video decoder 300 may entropy decode a set of quantized transform coefficients for a current block, along with data indicating the size of the block and the prediction mode for the block. Video decoder 300 may reconstruct a transform block by inversely quantizing the quantized transform coefficients and inversely scanning the resulting transform candidates. If the size and / or prediction mode is mapped to a non-separable linear transform (NSPT), video decoder 300 may reconstruct a residual block for the block by applying to the transform block the inverse NSPT that corresponds to the NSPT to which the size and / or prediction mode is mapped.
[0066]
[0077] Alternatively, if size and / or prediction mode or other data indicating the potential use of an NSPT is not mapped to the NSPT, the video decoder 300 may determine an inverse separable transform to apply to the transform block. In some embodiments, the video decoder 300 may also determine a low-frequency non-separable transform (LFNST) to apply to the transform block. A transform block may also be referred to as a block of transform coefficients.
[0067]
[0078] This disclosure may generally refer to “signaling” particular 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 encoded video data. That is, video encoder 200 may signal values for syntax elements in a bitstream. Generally, signaling refers to generating values in the bitstream. As mentioned above, source device 102 may transfer the bitstream to destination device 116 substantially in real time, or may transfer non-real time, as may occur when syntax elements are stored in storage device 112 for later retrieval by destination device 116.
[0068]
[0079] 2 is a block diagram illustrating an example video encoder 200 capable of implementing the techniques of this disclosure. FIG. 2 is provided for illustrative purposes and should not be considered limiting of the techniques as broadly illustrated and described in this disclosure. For illustrative purposes, this disclosure describes video encoder 200 in accordance with VVC (ITU-T H.266 under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may also be performed by video encoding devices configured for other video coding standards and video coding formats, such as AV1 and successors of the AV1 video coding format.
[0069]
[0080] 2, video encoder 200 includes video data memory 230, mode select unit 202, residual generation unit 204, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, decoded picture buffer (DPB) 218, entropy coding unit 220, and transform data 232. Any or all of video data memory 230, mode select unit 202, residual generation unit 204, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, DPB 218, and entropy coding unit 220 may be implemented within one or more processors or processing circuits. For example, these units of video encoder 200 may be implemented as one or more circuits or logic elements, such as part of a hardware circuit, or as part of a processor, ASIC, or FPGA. Furthermore, video encoder 200 may include additional or alternative processors or processing circuits for performing these and other functions.
[0070]
[0081] Video data memory 230 may store video data to be encoded by components of video encoder 200. Video encoder 200 may receive video data stored in video data memory 230 from, for example, video source 104 (FIG. 1). DPB 218 may function as a reference picture memory, storing reference video data for use in predicting subsequent video data by video encoder 200. Video data memory 230 and DPB 218 may be formed by any of a variety of memory devices, such as DRAM, including synchronous dynamic random access memory (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. Video data memory 230 and DPB 218 may be provided by the same memory device or separate memory devices. In various embodiments, video data memory 230 may be on-chip with other components of video encoder 200, as shown, or may be off-chip relative to those components.
[0071]
[0082] 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, nor should they be construed as limited 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 received by video encoder 200 for encoding (e.g., video data related to a current block to be encoded). Memory 106 of FIG. 1 may also provide temporary storage for outputs from various units of video encoder 200.
[0072]
[0083] The various units in FIG. 2 are illustrated to aid in understanding the operations performed by video encoder 200. These units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. A fixed-function circuit refers to a circuit that provides specific functionality and has predefined operations that it can perform. A programmable circuit refers to a circuit that can be programmed to perform various tasks and provides flexible functionality in the operations that it can perform. 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. A fixed-function circuit may execute software instructions (e.g., to receive or output parameters), but the types of operations it performs are generally invariant. In some embodiments, one or more of the units may be discrete circuit blocks (fixed function or programmable), and in some embodiments, one or more of the units may be integrated circuits.
[0073]
[0084] Video encoder 200 may include arithmetic logic units (ALUs), elementary function units (EFUs), digital circuits, analog circuits, and / or a programmable core formed from programmable circuitry. In embodiments in which the operations of video encoder 200 are performed using software executed by programmable circuitry, memory 106 (FIG. 1) may store software instructions (e.g., object code) that video encoder 200 receives and executes, or a separate memory (not shown) within video encoder 200 may store such instructions.
[0074]
[0085] The video data memory 230 is configured to store 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.
[0075]
[0086] The mode select unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra prediction unit 226. The mode select unit 202 may include additional functional units for performing video prediction according to other prediction modes. By way of example, the mode select 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.
[0076]
[0087] The mode selection unit 202 typically adjusts multiple encoding passes to test combinations of encoding parameters and the resulting rate-distortion values for such combinations. The encoding parameters may include partitioning of CTUs into CUs, prediction modes for CUs, transform types for residual data of CUs, quantization parameters for residual data of 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 combinations tested.
[0077]
[0088] 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 the 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 CUs may also be generally referred to as "video blocks" or "blocks."
[0078]
[0089] Generally, the mode selection unit 202 also controls its components (e.g., the motion estimation unit 222, the motion compensation unit 224, and the intra prediction unit 226) to generate a prediction block for the current block (e.g., the current CU, or, in HEVC, the overlapping portion between the PU and the TU). In the case of inter prediction of the current block, the motion estimation unit 222 may perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously 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, the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute deviation (MAD), the mean squared deviation (MSD), etc. The motion estimation unit 222 may generally perform these calculations using sample-by-sample differences between the current block and the reference block under consideration. Motion estimation unit 222 may identify the reference block with the lowest value resulting from these calculations, which indicates the reference block that most closely matches the current block.
[0079]
[0090] 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 the 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 use the motion vectors to generate a predictive block. For example, the motion compensation unit 224 may use the motion vectors to retrieve data for the reference blocks. As another example, if the motion vectors have 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 corresponding motion vectors and combine the retrieved data, for example, through sample-wise averaging or weighted averaging.
[0080]
[0091] 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.
[0081]
[0092] As another example, in the case of intra prediction, or intra-predictive coding, the intra prediction unit 226 may generate a predictive block from samples neighboring the current block. For example, in the case of a directional mode, the intra prediction unit 226 may generally generate a predictive block by mathematically combining the values of neighboring samples and inputting these calculated values across the current block in a defined direction. As another example, in the case of a DC mode, the intra prediction unit 226 may calculate an average of samples neighboring the current block and generate a predictive block to include this obtained average for each sample of the predictive block.
[0082]
[0093] When operating according to the AV1 video coding format, 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-to-luma (CFL) prediction, intra block copy (IBC), and / or color palette modes. Mode select unit 202 may include additional functional units for performing video prediction according to other prediction modes.
[0083]
[0094] The mode select unit 202 provides a predictive 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 predictive block from the mode select unit 202. The residual generation unit 204 calculates sample-by-sample differences between the current block and the predictive block. The resulting sample-by-sample differences define a residual block for the current block. In some embodiments, the residual generation unit 204 may also determine differences between sample values within the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some embodiments, the residual generation unit 204 may be formed using one or more subtractor circuits that perform binary subtraction.
[0084]
[0095] In embodiments in which the mode select unit 202 partitions CUs 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 mentioned 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 may support 2N×2N, 2N×N, N×2N, N×N, or similar symmetric PU sizes 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.
[0085]
[0096] In embodiments in which mode select unit 202 does not further partition CUs into PUs, each CU may be associated with a luma coding block and a corresponding chroma coding block. As noted above, the size of a CU may refer to the size of the luma coding block of the CU. Video encoder 200 and video decoder 300 may support CU sizes of 2N×2N, 2N×N, or N×2N.
[0086]
[0097] For other video coding techniques, such as intra block copy mode coding, affine mode coding, and linear model (LM) mode coding, as some examples, mode select unit 202 generates a predictive block for the current block being coded via corresponding units associated with those coding techniques. In some examples, such as palette mode coding, mode select unit 202 does not generate a predictive block, but instead may generate syntax elements that indicate a scheme for reconstructing the block based on a selected palette. In such modes, mode select unit 202 may provide these syntax elements to entropy coding unit 220 to be coded.
[0087]
[0098] 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.
[0088]
[0099] 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 embodiments, transform processing unit 206 may perform multiple transforms on the residual block, e.g., a linear transform and a secondary transform such as a rotational transform. In some embodiments, transform processing unit 206 does not apply a transform to the residual block.
[0089]
[0100] According to the techniques of this disclosure, transform processing unit 206 can use transform data 232 to determine a transform to apply to the residual block. Transform data 232 represents one or more computer-readable media devices, e.g., memories, that store data related to various transforms, such as separable transforms, low-frequency non-separable transforms (LFNSTs), and non-separable linear transforms (NSPTs). An NSPT can be a non-separable transform that is applied directly to the residual block without an intervening separable transform. That is, transform processing unit 206 can apply an NSPT to the residual block without applying any separable transform to the block.
[0090]
[0101] Furthermore, transform data 232 may store data mapping various block characteristics to various transforms. For example, transform data 232 may store data mapping block size and / or prediction mode data to corresponding transforms. In the case of NSPT, this data may map blocks having sizes of 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, or 16x8 to the NSPT. This data may also map blocks corresponding to predictive blocks formed using various intra-prediction modes to the NSPT. Thus, in some embodiments, transform processing unit 206 may apply NSPT to residual blocks having sizes of 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, or 16x8 formed using predictive blocks generated according to an intra-prediction mode. For other modes and block sizes, transform processing unit 206 may select a separate transform according to the mapping data, and in some embodiments, may select an LFNST for subsequent application to the separate transform.
[0091]
[0102] 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, the transform is skipped in either the vertical or horizontal direction. In some embodiments, the transform process may be skipped.
[0092]
[0103] 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 select 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 therefore, the quantized transform coefficients may have lower precision than the original transform coefficients generated by the transform processing unit 206.
[0093]
[0104] The inverse quantization unit 210 and the inverse transform processing unit 212 may reconstruct a residual block from a quantized transform coefficient block by applying inverse quantization and an inverse transform, respectively, to the transform coefficient block. As mentioned above, in some embodiments, the transform processing unit 206 may have applied an NSPT to the residual block to generate a transform block. In such a case, for example, based on the size and prediction mode for the block corresponding to the transform block, the inverse transform processing unit 212 may determine an inverse NSPT to apply to the transform block to reconstruct the corresponding residual block. That is, the inverse transform processing unit 212 may apply the inverse NSPT to directly reconstruct the residual block without also applying a separation transform to reconstruct the residual block. However, if the transform processing unit 206 applied a separation transform (possibly followed by an LFNST) to the residual block, the inverse transform processing unit 212 may reconstruct the residual block by retrieving the corresponding inverse LFNST (if applicable) and the corresponding inverse separation transform from the transform data 232 and applying the inverse LFNST and the inverse separation transform to the transform block.
[0094]
[0105] The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (possibly with some distortion) based on the reconstructed residual block and the predictive block generated by the mode select unit 202. For example, the reconstruction unit 214 may generate the reconstructed block by adding samples of the reconstructed residual block to corresponding samples from the predictive block generated by the mode select unit 202.
[0095]
[0106] 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 embodiments.
[0096]
[0107] 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 a CU. In other embodiments, 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 estimated edge direction. Filter unit 216 may also include a loop restoration filter, which may be applied after the CDEF and may include a separable symmetric normalized Wiener filter or a dual self-guided filter.
[0097]
[0108] Video encoder 200 stores reconstructed blocks in DPB 218. For example, in embodiments in which the operations of filter unit 216 are not performed, reconstruction unit 214 may store reconstructed blocks in DPB 218. In embodiments in which the operations of filter unit 216 are performed, filter unit 216 may store filtered reconstructed blocks in DPB 218. Motion estimation unit 222 and motion compensation unit 224 may retrieve reference pictures formed from reconstructed (and potentially filtered) blocks from DPB 218 to inter-predict blocks of a subsequently coded picture. Furthermore, intra-prediction unit 226 may use reconstructed blocks of the current picture in DPB 218 to intra-predict other blocks in the current picture.
[0098]
[0109] 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 select unit 202. The entropy encoding unit 220 may perform one or more entropy encoding operations on syntax elements, which are other examples of video data, to generate entropy encoded data. For example, entropy encoding unit 220 may perform a context-adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable-to-variable (V2V) coding operation, a syntax-based context-adaptive binary arithmetic coding (SBAC) operation, a Probability Interval Partitioning Entropy (PIPE) coding operation, an Exponential-Golomb coding operation, or another type of entropy coding operation on the data. In some embodiments, entropy encoding unit 220 may operate in a bypass mode, in which syntax elements are not entropy coded.
[0099]
[0110] Video encoder 200 may output a bitstream that includes entropy-encoded syntax elements needed to reconstruct blocks of a slice or picture. Specifically, entropy encoding unit 220 may output the bitstream.
[0100]
[0111] According to AV1, entropy coding unit 220 can be configured as a symbol-to-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. Entropy coding unit 220 can store those probabilities as n-bit (e.g., 15-bit) cumulative distribution functions (CDFs). Entropy coding unit 22 can perform recursive scaling to update the context using an update factor based on the alphabet size.
[0101]
[0112] The above operations are described with respect to blocks. Such descriptions should be understood as operations with respect to luma coding blocks and / or chroma coding blocks. As mentioned above, in some embodiments, the luma coding blocks and chroma coding blocks are luma and chroma components of a CU. In some embodiments, the luma coding blocks and chroma coding blocks are luma and chroma components of a PU.
[0102]
[0113] In some embodiments, operations performed with respect to luma coding blocks need not be repeated with respect to chroma coding blocks. As one example, operations to identify motion vectors (MVs) and reference pictures for luma coding blocks need not be repeated to identify MVs and reference pictures for chroma blocks. Rather, MVs for luma coding blocks can be scaled to determine MVs for chroma blocks, and the reference pictures can be the same. As another example, the intra prediction process can be the same for luma coding blocks and chroma coding blocks.
[0103]
[0114] Thus, the video encoder 200 represents an example of a device for decoding video data, including a memory configured to store video data and a processing system having one or more processors (e.g., the inverse transform processing unit 212 and the reconstruction unit 214) implemented in circuitry, the processing system configured to inverse transform blocks of transform coefficients of the blocks of video data using an inverse non-separable linear transform (NSPT) without using an inverse separable transform to reconstruct residual blocks of the blocks of video data, and to decode the blocks using the residual blocks.
[0104]
[0115] 3 is a block diagram illustrating an example video decoder 300 capable of implementing the techniques of this disclosure. FIG. 3 is provided for illustrative purposes and is not intended to limit the techniques as broadly illustrated and described in this disclosure. For illustrative purposes, this disclosure describes the video decoder 300 in accordance with VVC (ITU-T H.266 under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may also be performed by video coding devices configured for other video coding standards.
[0105]
[0116] In the example of FIG. 3, 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 transformed data 322, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. Any or all of the CPB memory 320, the entropy decoding unit 302, the prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, the filter unit 312, and the DPB 314 may be implemented within one or more processors or processing circuits. For example, these 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. Furthermore, the video decoder 300 may include additional or alternative processors or processing circuits for performing these and other functions.
[0106]
[0117] Prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. Prediction processing unit 304 may include additional units for performing prediction according to other prediction modes. By way of example, prediction processing unit 304 may include a palette unit, an intra block copy unit (which may form part of motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other embodiments, video decoder 300 may include more, fewer, or different functional components.
[0107]
[0118] When operating according to AV1, compensation unit 316 may be configured to decode coding blocks of 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. Intra prediction unit 318 may be configured to decode 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, CFL, intra block copy (IBC), and / or color palette mode, as described above.
[0108]
[0119] CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by components of video decoder 300. The video data stored in CPB memory 320 may be obtained, for example, from computer-readable medium 110 (FIG. 1). CPB memory 320 may include a CPB, which stores encoded video data (e.g., syntax elements) from the encoded video bitstream. CPB memory 320 may also store video data other than syntax elements for coded pictures, such as temporary data representing output from various units of video decoder 300. DPB 314 generally stores decoded pictures that video decoder 300 can output and / or use as reference video data when decoding subsequent data or pictures in the encoded video bitstream. CPB memory 320 and 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. CPB memory 320 and DPB 314 may be provided by the same memory device or separate memory devices. In various embodiments, CPB memory 320 may be on-chip with other components of video decoder 300 or may be off-chip relative to those components.
[0109]
[0120] Additionally or alternatively, in some embodiments, 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, along with CPB memory 320. Similarly, if some or all of the functionality of video decoder 300 is implemented in software to be executed by processing circuitry of video decoder 300, memory 120 may store instructions to be executed by video decoder 300.
[0110]
[0121] The various units shown in FIG. 3 are presented to aid in understanding the operations performed by video decoder 300. These units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. As with FIG. 2, a fixed-function circuit refers to a circuit that provides specific functionality and has predefined operations that it can perform. A programmable circuit refers to a circuit that can be programmed to perform various tasks and provides flexible functionality in the operations that it can perform. 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. A fixed-function circuit may execute software instructions (e.g., to receive or output parameters), but the types of operations it performs are generally invariant. In some embodiments, one or more of the units may be discrete circuit blocks (fixed function or programmable), and in some embodiments, one or more of the units may be integrated circuits.
[0111]
[0122] Video decoder 300 may include a programmable core formed from ALUs, EFUs, digital circuits, analog circuits, and / or programmable circuits. In embodiments in which the operations of video decoder 300 are performed by software executing on programmable circuitry, on-chip or off-chip memory may store the software instructions (e.g., object code) that video decoder 300 receives and executes.
[0112]
[0123] The entropy decoding unit 302 may receive the coded 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.
[0113]
[0124] In general, video decoder 300 reconstructs a picture on a block-by-block basis, and may perform a reconstruction operation on each block individually (the block currently being reconstructed, i.e., decoded, may be referred to as the "current block").
[0114]
[0125] The entropy decoding unit 302 may entropy decode syntax elements defining the quantized transform coefficients of the quantized transform coefficient block, as well as transform information such as a quantization parameter (QP) and / or a transform mode indication(s). 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 for the inverse quantization unit 306 to apply. The inverse quantization unit 306 may, for example, perform a bitwise left-shift operation to inverse quantize the quantized transform coefficients. The inverse quantization unit 306 may thereby form a transform coefficient block including the transform coefficients.
[0115]
[0126] After the inverse quantization unit 306 forms a 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 directional transform, or another inverse transform to the transform coefficient block.
[0116]
[0127] In accordance with the techniques of this disclosure, transform data 322 includes coefficients for various inverse transforms, such as inverse separable transforms, inverse low-frequency non-separable transforms (LFNSTs), and inverse non-separable linear transforms (NSPTs). Transform data 322 also includes data mapping block characteristics to various inverse transforms, such as size and prediction mode information. In some implementations, this data may map 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, or 16x8 sizes and intra-prediction modes to inverse NSPTs, and other sizes and / or prediction modes to inverse separable transforms (and possibly inverse LFNSTs). Therefore, the inverse transform processing unit 308 can apply the inverse NSPT to a transform block (i.e., a block of transform coefficients) without using an inverse separation transform if the transform block corresponds to an intra-predicted block having one of the following sizes: 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, or 16x8, and the inverse transform processing unit 308 can apply the inverse separation transform to other transform blocks.
[0117]
[0128] Furthermore, 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 the prediction block. In this case, the prediction information syntax element may indicate a reference picture in DPB 314 for retrieving the 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 the inter-prediction process in a manner substantially similar to that described with respect to motion compensation unit 224 (FIG. 2).
[0118]
[0129] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, the intra prediction unit 318 may generate a prediction block according to the intra-prediction mode indicated by the prediction information syntax element. Again, the intra prediction unit 318 may generally perform the intra prediction process in a manner substantially similar to that described with respect to the intra prediction unit 226 (FIG. 2). The intra prediction unit 318 may retrieve data of samples neighboring the current block from the DPB 314.
[0119]
[0130] 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.
[0120]
[0131] Filter unit 312 may perform one or more filter operations on the reconstructed block. For example, filter unit 312 may perform a deblocking operation to reduce blockiness artifacts along the edges of the reconstructed block. The operations of filter unit 312 are not necessarily performed in all embodiments.
[0121]
[0132] The video decoder 300 may store the reconstructed blocks in the DPB 314. For example, in embodiments in which the operations of the filter unit 312 are not performed, the reconstruction unit 310 may store the reconstructed blocks in the DPB 314. In embodiments in which the operations of the filter unit 312 are performed, the filter unit 312 may store the filtered 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 samples of previously decoded pictures for subsequent motion compensation. Furthermore, the video decoder 300 may output the decoded pictures (e.g., decoded video) from the DPB 314 for subsequent presentation on a display device, such as the display device 118 of FIG. 1 .
[0122]
[0133] Thus, video decoder 300 represents an embodiment of a device for decoding video data, the device comprising a memory configured to store the video data and a processing system including one or more processors implemented in circuitry, the processing system configured to inverse transform blocks of transform coefficients of the blocks of video data using an inverse non-separable linear transform (NSPT) without using an inverse separable transform to reconstruct residual blocks of the blocks of video data, and to decode the blocks using the residual blocks.
[0123]
[0134] 4A and 4B are conceptual diagrams illustrating the use of separable transforms and low-frequency non-separable transforms (LFNSTs) when encoding and decoding video data. Specifically, FIG. 4A illustrates application of a separable transform 130, followed by an LFNST 132 and then quantization 134. FIG. 4B illustrates inverse quantization 136, followed by an inverse LFNST 138 and then an inverse separable transform 140. According to the techniques of this disclosure, video encoder 200 can apply separable transform 130 and LFNST 132 to blocks having sizes and / or prediction modes that do not map to an NSPT. Similarly, video decoder 300 can apply inverse LFNST 138 and inverse separable transform 140 to blocks having sizes and / or prediction modes that do not map to an NSPT.
[0124]
[0135] 5 is a conceptual diagram illustrating an inverse non-separable linear transform (NSPT) process. According to the techniques of this disclosure, after a list of two-dimensional (2-D) unquantized coefficients is obtained (based on the coefficient decoding step), the video decoder 300 can apply the inverse non-separable linear transform (NSPT) to reconstruct residual values in the 2-D block / array according to FIG. 5. That is, the inverse transform processing unit 212 of the video encoder 200 of FIG. 2 and the inverse transform processing unit 308 of the video decoder 300 of FIG. 3 can apply the inverse NSPT to reconstruct residual blocks of video data.
[0125]
[0136] As shown in Figure 5, a 2D block 150 of M transform coefficients may first be reconstructed, for example, by inverse quantizing the transform coefficients. The values of the 2D block 150 of M transform coefficients may be rearranged (152). An inverse NSPT (154) may then be applied to the rearranged block of transform coefficients. This results in a 2D block 156 having N residual values, i.e., a reconstructed residual block.
[0126]
[0137] The NSPT decoding process can be specified based on both a reorganization pattern / scan, which can be used to define how the NSPT input coefficients and output residual values are organized or grouped, and a transformation matrix, which defines the non-separable transformation to be used on all or a subset of the unquantized coefficients.
[0127]
[0138] NSPT requires organizing the 2-D block / array of decoded coefficients to align matrix entries and inputs. This can be achieved by constructing a one-dimensional (1-D) list of coefficients M from the 2-D array of coefficients, and then applying inverse NSPT (of size M×N) to the 1-D list to reconstruct the residual block.
[0128]
[0139] 6A-6C are conceptual diagrams illustrating exemplary scanning patterns for rearranging dequantized coefficients before application of NSPT. Specifically, FIG. 6A illustrates a sub-block diagonal scan 160, FIG. 6B illustrates a horizontal scan 162, and FIG. 6C illustrates a vertical scan 164.
[0129]
[0140] The input reordering can be achieved using any of the various scans of Figures 6A-6C. The reordering may also depend on the block size and / or prediction mode (e.g., intra mode). If the codec is normally configured to zero out a subset of the input coefficients, the input coefficient list for the NSPT may not include those zeroed coefficients. The reordering step can only accept coefficients that may be non-zero (i.e., coefficients that are not normally zeroed). The reordering may require deinterlacing the coefficients into multiple 1D arrays, as shown below with respect to Figure 8.
[0130]
[0141] 7 is a conceptual diagram illustrating a permuted one-dimensional array 172 constructed from a two-dimensional matrix 170. In this example, the original two-dimensional matrix 172 can be permuted into one-dimensional array 172 using the sub-block diagonal scan 160 of FIG.
[0131]
[0142] FIG. 8 is a conceptual diagram illustrating the deinterlacing of a set of decoded coefficients 180 into four one-dimensional arrays 182A-182D.
[0132]
[0143] The NSPT can be a matrix of size M×N, where M is an integer value indicating the number of basis vectors and also the number of rows, and N is an integer value indicating the number of reconstructed NSPT coefficients after applying the transform (also known as the number of support samples for the transform).
[0133]
[0144] The video encoder 200 and the video decoder 300 may rearrange the one-dimensional (1-D) list of N output NSPT coefficients based on an array (defining a pattern / scan), where each value in the array may correspond to a position / location within a 2-D block. The values in the array (used for rearrangement) may indicate the index of the 2-D block in any predefined order. As an example, the index value may correspond to a position within the 2-D block. For an index value v, the corresponding position within the 2-D block may be calculated as row index (r) = floor(v / w) and column index c = mod(v,w), where mod(x,y) represents a modulo operation that returns the remainder of dividing x by y, and w represents the width of the NSPT sub-block.
[0134]
[0145] Based on these formulas, the following rearrangement sequence may correspond to a raster order for a 4x4 block: const int raster_order
[16] = { / / 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; Therefore, the i-th element in the 1-D coefficient list is mapped to a row and column position in the 2-D block. For example, for i=0, 1, 2, ... 15, r[i]=floor(raster_order[i] / w) c[i]=mod(raster_order[i],w).
[0135]
[0146] The NSPT matrices can be grouped into sets S0, S1, S2, .... Each set may contain one or several candidates (matrices) C0, C1, C2, ... dedicated to a particular block size WxH. The number of S and C may vary in various embodiments. In one embodiment, every intra mode is associated with a particular set of S. Therefore, assuming 97 intra modes are available, there are 97 possible sets S: S0, S1, ...S 96 Therefore, a transform can be selected based on the candidate index, for example C=4.
[0136]
[0147] As another example, intra modes (0,...96) can be mapped to corresponding indices (eg, 0,...35) according to a lookup table such as: const uint8_t g_nsptLut
[97] = { / / 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 +0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }
[0137]
[0148] Therefore, in this example, there are 35 possible sets S: S0, S1, ... S 34 This mapping can be derived by considering symmetry or through other means. In the case of symmetry, the rearrangement of the residual blocks can be processed in transposed order. The NSPT matrix can be selected based on the candidate index, e.g., C=3.
[0138]
[0149] As yet another example, only certain intra-modes can be associated with an NSPT. For example, intra-mode 0 (planar), mode 1 (DC), mode 18 (horizontal), mode 50 (vertical), and mode 34 (diagonal). Therefore, there can be five sets S: S0, S1, S2, S3, S4. Only one candidate can be selected, so that no candidate index is required, and therefore C=1.
[0139]
[0150] S and C may vary depending on the block size W×H. For a particular block size, the NSPT matrix may not exist, hence S=0, C=0.
[0140]
[0151] In some embodiments, NSPT matrices exist for block sizes 4x4, 4x8, 8x4, and 8x8, i.e., NSPT4x4, NSPT4x8, NSPT8x4, and NSPT8x8. Each NSPT class may contain C=3 candidates and 35 sets S depending on the intra mode.
[0141]
[0152] Furthermore, in some embodiments, NSPT matrices exist for block sizes greater than or equal to 16x16. The following examples address the possibility of using NSPT to process larger blocks. For block size 16x16, a dedicated NSPT16x16 class is used, which contains 35 sets S and 3 candidates C. A block of size 16x16 can be separated into four subgroups of size 4x4. Each 4x4 subgroup is processed by a dedicated NSPT4x4 class, which includes 35 sets S and three candidates C. After the forward transform (performed by the video encoder 200), the coefficients of each of the four subgroups are interlaced according to their energy. The video decoder 300 can undo the interlacing (e.g., according to FIG. 8), resulting in four 1D arrays of unquantized coefficients, each of which has been inverse transformed using the dedicated NSPT4x4 class, set, and candidate. Furthermore, the 32x32 block can be separated into four subgroups of size 16x16 (processed by a dedicated NSPT16x16 transform) or 16 subgroups of size 4x4 (processed by a dedicated NSPT4x4 transform). A block of size W×H can be separated into L subgroups of any size. For example, a 32×32 block can be separated into one 24×32 subgroup (processed by NSPT24×32) and one 8×32 subgroup (processed by NSPT8×32). This separation may depend on the intra mode and block size. The 32x32 block of coefficients can be processed using a dedicated NSPT16x16. After inverse transform and reordering, a 16x16 residual block is recovered, which can be upsampled to size 32x32.
[0142]
[0153] In some embodiments, there are NSPT and LFNST matrices for block sizes 4x4, 4x8, 8x4, and 8x8. Each block size may correspond to one of three candidates (C0, C1, C2) in a set depending on the intra mode (set S of 35) that exploits symmetry. The three candidates can be either NSPT or LFNST kernels, e.g., candidate 1 is NSPT, candidate 2 and candidate 3 are LFNST, etc.
[0143]
[0154] For non-square blocks, the following special case can be applied to exploit symmetry: if the residual block is transposed, the dimensions are swapped (e.g., 4x8 → 8x4). Hence, a transposed 4x8 block can use the transformation matrix associated with a non-transposed 8x4 block, and vice versa.
[0144]
[0155] For example, a 4x8 block containing unquantized coefficients may need to be processed using NSPT. First, the coefficients may be reordered into a 1D array. Next, the intra mode of the block may be used to determine whether the encoder-side residual was transposed before the forward transform. Conceptually, vertical modes may be mapped to horizontal modes. If the intra mode is in the range (34,...,67), the block may be transposed. Two cases may occur: if the intra mode is less than 34, the reordered 1D array may be inverse transformed using the indicated set and candidates for NSPT4x8. The residual values may then be reordered into a 2D residual block without transposition. On the other hand, if the intra mode is in the range (34,...,67), the reordered 1D array may be inverse transformed using the indicated set and candidates for NSPT8x4. The residual values may be reordered into a 2D residual block, and the block may be transposed.
[0145]
[0156] The signs of the coefficients derived through application of NSPT can be predicted through sign prediction. In one embodiment, the sign prediction follows the LFNST design, i.e., only the signs of up to four coefficients can be predicted, limited to the top-left 4x4 region. In another embodiment, the signs of up to four coefficients can be predicted within an area adaptively increased to 32x32.
[0146]
[0157] For hardware implementation, the worst-case number of multiplications (per transform coefficient) can be an important complexity criterion. One simple way to reduce the worst-case number of multiplications is to canonically zero out some of the transform coefficients. However, the zeroing process may generally be undesirable unless a specific worst-case number of multiplications is required to be met. For NSPT, the range of zeroing can depend on the block size and current complexity constraints, which may change in the future. This problem defines the size M×N of the NSPT matrix.
[0147]
[0158] In some embodiments, for a 4x4 residual block, the NSPT 4x4 matrix is of size 16x16, and all 16 NSPT coefficients are retained.
[0148]
[0159] In some embodiments, for 4x8 and 8x4 residual blocks, the NSPT 4x8 and NSPT 8x4 matrices are of size 32x20. 20 of the 32 NSPT coefficients are retained. The remaining 12 coefficients are set equal to zero.
[0149]
[0160] In some embodiments, for an 8x8 residual block, the NSPT 8x8 matrix is 64x32. 32 of the 64 NSPT coefficients are retained. The remaining 32 are set to zero.
[0150]
[0161] The video encoder 200 and the video decoder 300 can be configured to apply NSPT to block sizes larger than 8x8, such as blocks of size 4x16, 16x4, 8x16, 16x8, and 16x16. These techniques can also be extended to larger sizes, such as 32xN and Nx32, but storage of the transform coefficients can become an issue. To address the storage issue as well as the computational complexity, the following techniques can be employed.
[0151]
[0162] In some embodiments, the video encoder 200 and the video decoder 300 may be configured to apply NSPT to blocks of size 4x16 and / or 16x4, and the storage requirements for the transform for these block sizes may be comparable to that for 8x8. If only 20, 24, or 32 of the resulting coefficients are to be stored and the remaining coefficients are nominally set to zero, a zeroing mechanism such as that described above may be employed. The video encoder 200 and the video decoder 300 may determine the number of coefficients to retain based on a complexity and performance tradeoff that remains below a certain worst-case computational (e.g., multiplication and addition) complexity.
[0152]
[0163] In some embodiments, the video encoder 200 and the video decoder 300 may be configured to apply NSPT to blocks of size 8x16, 16x8, or 16x16. For blocks of size 8x16 or 16x8, the zeroing mechanism described above may be employed where only 32 or 40 coefficients are kept, and for blocks of size 16x16, the resulting 32, 40, or 44 coefficients are kept. The video encoder 200 and the video decoder 300 may set the remaining coefficients to zero.
[0153]
[0164] The storage requirements for larger transforms can be reduced by using a smaller number of transform sets. This can be achieved by reducing the number of mapped intra modes from 35 as described above by clustering adjacent directional intra-prediction modes to further reduce the number of mapped intra modes. Larger transform block sizes will have a smaller number of mapped intra modes. For example, a 16x16 block may have only four mapped modes, while an 8x16 or 16x8 block may have 11 mapped modes.
[0154]
[0165] In some embodiments, for a particular block size, NSPT may be applied for certain intra modes and LFNST may be applied for other intra modes.
[0155]
[0166] Alternatively, for a particular block size and intra-prediction mode, a particular signaled transform selection index (e.g., a low-frequency non-separable transform index syntax element, lfnst_idx) may correspond to whether to use NSPT or LFNST. In some embodiments, another transform index may correspond to LFNST.
[0156]
[0167] In some embodiments, three different non-separate kernels are used for each mapped intra-prediction mode. One of the non-separate kernels may correspond to NSPT, and the other two non-separate kernels may correspond to LFNST kernels. In some embodiments, video encoder 200 and video decoder 300 may be configured to apply a mixed combination of LFNST and NSPT kernels based on the intra-prediction mode and the signaled index value.
[0157]
[0168] 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 2), it should be understood that other devices may be configured to perform a method similar to that of FIG. 9.
[0158]
[0169] In this example, the video encoder 200 first predicts a current block (350). For example, the video encoder 200 may form a predictive block for the current block. The video encoder 200 may then calculate a residual block for the current block (352). To calculate the residual block, the video encoder 200 may calculate the difference between an original uncoded block and a predictive block for the current block. The video encoder 200 may then transform the residual block and quantize the transform coefficients of the residual block (354). For example, the video encoder 200 may transform the residual block using a non-separable linear transform according to any of the various techniques of this disclosure, alone or in any combination. The video encoder 200 may then scan the quantized transform coefficients of the residual block (356). During or following the scan, the 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. Video encoder 200 may then output the entropy-coded data for the block (360).
[0159]
[0170] After encoding the current block, video encoder 200 may also decode the current block and use the decoded version of the current block as reference data for subsequently coded data (e.g., in inter-prediction or intra-prediction modes). Therefore, video encoder 200 may inverse quantize and inverse transform the coefficients to reconstruct a residual block (362). Video encoder 200 may inverse transform the coefficients using NSPT according to any of the various techniques of this disclosure. 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).
[0160]
[0171] 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 3), it should be understood that other devices may be configured to perform a method similar to that of FIG. 10.
[0161]
[0172] The video decoder 300 may receive entropy-coded data for the current block, such as entropy-coded prediction information corresponding to the current block and entropy-coded data for transform coefficients of the residual block (370). The video decoder 300 may determine prediction information for the current block and entropy decode the entropy-coded data to reconstruct transform coefficients of the residual block (372). The video decoder 300 may predict the current block using, for example, an intra-prediction mode or an inter-prediction mode as indicated by the prediction information for the current block, to calculate 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 then dequantize the transform coefficients and apply an inverse transform to the transform coefficients to generate a residual block (378). The video decoder 300 may inverse transform the coefficients using NSPT according to any of the various techniques of this disclosure. Video decoder 300 may finally decode the current block by combining the prediction block and the residual block (380).
[0162]
[0173] 11 is a flowchart illustrating an example method for encoding video data using a non-separable linear transform (NSPT) in accordance with the techniques of this disclosure. The method of FIG. 11 is described with respect to the video encoder 200 of FIGS. 1 and 2 for illustrative purposes. Other video encoding devices may be configured to perform this or similar methods. The method of FIG. 11 may generally correspond to step 354 of FIG. 9.
[0163]
[0174] First, video encoder 200 determines a prediction mode for a block of video data (400). Video encoder 200 also determines the size of the block (402). Video encoder 200 may then determine whether those sizes and prediction modes map to a non-separable linear transform (NSPT) (404). For example, sizes of 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, or 16x8 and intra-prediction modes may map to an NSPT, while other size and prediction mode combinations may map to a separable transform (and, in some cases, a low-frequency non-separable transform).
[0164]
[0175] Thus, if the size and prediction mode are mapped to an NSPT ("YES" branch of 404), video encoder 200 may apply an NSPT to the residual block to form a transform block (i.e., a block of transform coefficients) (406). On the other hand, if the size and prediction mode are not mapped to an NSPT ("NO" branch of 404), video encoder 200 may apply a separate transform to the residual block (408) and, in some cases, may apply an LFNST to at least a portion of the resulting transform block (410).
[0165]
[0176] In either case, the video encoder 200 may then quantize the resulting transform coefficients (412) and entropy encode the quantized transform coefficients, prediction mode, and size data (414).
[0166]
[0177] Thus, the method of FIG. 11 represents an embodiment of a method for encoding video data that includes transforming residual blocks of video data using a non-separable linear transform (NSPT) without using a separable transform to construct blocks of transform coefficients, and encoding the blocks of transform coefficients.
[0167]
[0178] 12 is a flowchart illustrating an example method for decoding video data using a non-separable linear transform (NSPT) in accordance with the techniques of this disclosure. The method of FIG. 12 is described with respect to the video decoder 300 of FIGS. 1 and 3 for illustrative purposes. Other video decoding devices may be configured to perform this method or a similar method. For example, the decoding loop portion of video encoder 200 may similarly perform the method of FIG. 12. The method of FIG. 12 may generally correspond to step 364 of the method of FIG. 9 or step 378 of the method of FIG. 10.
[0168]
[0179] First, the video decoder 300 entropy decodes the quantized transform coefficients (420), size data, and prediction mode for a current block of video data (420). The video decoder 300 may dequantize the quantized transform coefficients (422) to reconstruct the block of transform coefficients. The video decoder 300 may also use the entropy decoded data to determine the prediction mode for the block (424) and the size of the block (426).
[0169]
[0180] Video decoder 300 may then determine whether those sizes and prediction modes are mapped to an NSPT (428). If the sizes and prediction modes are mapped to an NSPT ("YES" branch of 428), video decoder 300 may inverse transform the block of transform coefficients using the corresponding NSPT to reconstruct a residual block for the block, i.e., without applying an inverse separable transform when reconstructing the residual block (430). On the other hand, if the sizes and prediction modes are not mapped to an NSPT ("NO" branch of 428), video decoder 300 may apply an inverse LFNST to the transform block (432) and reconstruct the residual block using the inverse separable transform (434).
[0170]
[0181] In either case, the video decoder 300 may form a predictive block using the indicated prediction mode (436) and may combine the predictive block with the residual block to reconstruct the current block (438).
[0171]
[0182] Thus, the method of FIG. 12 represents an example embodiment of a method for decoding video data that includes inverse transforming a block of transform coefficients of a block of video data using an inverse non-separable linear transform (NSPT) without using an inverse separable transform to reconstruct a residual block of the block of video data, and decoding the block of video data using the residual block.
[0172]
[0183] Various embodiments of the techniques of this disclosure are summarized in the following paragraphs.
[0173]
[0184] Clause 1: A method for decoding video data, comprising: inversely transforming a block of transform coefficients of a block of video data using an inverse non-separable linear transform (NSPT) to reconstruct a residual block of the block of video data; and decoding the block of video data using the residual block.
[0174]
[0185] Clause 2: The method of clause 1, wherein inverse transforming the block of transform coefficients includes rearranging the block of transform coefficients to form a rearranged block of transform coefficients, and inverse transforming the rearranged block of transform coefficients.
[0175]
[0186] Clause 3: Any of the methods of clauses 1 and 2, wherein inverse transforming the block of transform coefficients includes constructing a one-dimensional list of coefficients from the block of transform coefficients and applying inverse NSPT to the one-dimensional list of coefficients to reconstruct the residual block.
[0176]
[0187] Clause 4: The method of clause 3, wherein constructing the one-dimensional list of coefficients from the block of transform coefficients includes applying a sub-block diagonal scan to the block of transform coefficients.
[0177]
[0188] Clause 5: The method of clause 3, wherein constructing the one-dimensional list of coefficients from the block of transform coefficients includes applying a horizontal scan to the block of transform coefficients.
[0178]
[0189] Clause 6: The method of clause 3, wherein constructing the one-dimensional list of coefficients from the block of transform coefficients includes applying a vertical scan to the block of transform coefficients.
[0179]
[0190] Clause 7: Any of the methods of clauses 1 to 6, wherein the inverse NSPT is defined as a matrix of size M×N, where M is an integer value indicating the number of basis vectors and also the number of rows in the matrix, and N is an integer value indicating the number of support samples for the inverse NSPT.
[0180]
[0191] Clause 8: The method of clause 7, wherein the matrix includes 8-bit precision values.
[0181]
[0192] Clause 9: The method of any of clauses 1-8, further comprising selecting an inverse NSPT from a set of possible inverse NSPTs.
[0182]
[0193] Clause 10: The method of clause 9, further comprising selecting a set of possible inverse NSPTs from a plurality of sets of possible inverse NSPTs.
[0183]
[0194] Clause 11: The method of clause 10, wherein selecting the set of possible inverse NSPTs includes selecting the set of possible inverse NSPTs according to an intra-prediction mode for the block of video data.
[0184]
[0195] Clause 12: The method of any of clauses 9-11, wherein selecting the inverse NSPT includes selecting the inverse NSPT according to a size of the block of video data.
[0185]
[0196] Clause 13: The method of any of clauses 1-12, further comprising performing sign prediction to predict one or more signs for one or more of the transform coefficients.
[0186]
[0197] Clause 14: Any of the methods of clauses 1 to 13, wherein decoding the block of video data includes forming a predictive block for the block of video data and combining the predictive block with the residual block to form a decoded block for the block of video data.
[0187]
[0198] Clause 15: Any of the methods of clauses 1 to 14, wherein the block of transform coefficients is one of a 4x16 or a 16x4 block, and inverse transforming the block of transform coefficients includes inverse transforming 20, 24, or 32 non-zero-valued transform coefficients and zero-valued transform coefficients for the remaining transform coefficients.
[0188]
[0199] Clause 16: The method of clause 15, wherein if there are 20 non-zero-valued transform coefficients, the remaining transform coefficients are 44 zero-valued transform coefficients; if there are 24 non-zero-valued transform coefficients, the remaining transform coefficients are 40 zero-valued transform coefficients; or if there are 32 non-zero-valued transform coefficients, the remaining transform coefficients are 32 zero-valued transform coefficients.
[0189]
[0200] Clause 17: Any of the methods of clauses 1 to 14, wherein the block of transform coefficients is one of an 8x16 block or a 16x8 block, and inverse transforming the block of transform coefficients includes inverse transforming 32 or 40 non-zero-valued transform coefficients and zero-valued transform coefficients for the remaining transform coefficients.
[0190]
[0201] Clause 18: The method of clause 17, wherein if there are 32 non-zero-valued transform coefficients, the remaining transform coefficients are 96 zero-valued transform coefficients, or if there are 40 non-zero-valued transform coefficients, the remaining transform coefficients are 88 zero-valued transform coefficients.
[0191]
[0202] Clause 19: Any of the methods of clauses 1 to 14, wherein the block of transform coefficients is a 16x16 block, and inverse transforming the block of transform coefficients includes inverse transforming 32, 40, or 44 non-zero-valued transform coefficients and zero-valued transform coefficients for the remaining transform coefficients.
[0192]
[0203] Clause 20: The method of clause 19, wherein if there are 32 non-zero-valued transform coefficients, the remaining transform coefficients are 224 zero-valued transform coefficients; if there are 40 non-zero-valued transform coefficients, the remaining transform coefficients are 216 zero-valued transform coefficients; or if there are 44 non-zero-valued transform coefficients, the remaining transform coefficients are 212 zero-valued transform coefficients.
[0193]
[0204] Clause 21: The method of clause 1, wherein inverse transforming the block of transform coefficients comprises rearranging the block of transform coefficients to form a rearranged block of transform coefficients, and inverse transforming the rearranged block of transform coefficients.
[0194]
[0205] Clause 22: The method of clause 1, wherein inverse transforming the block of transform coefficients includes constructing a one-dimensional list of coefficients from the block of transform coefficients and applying inverse NSPT to the one-dimensional list of coefficients to reconstruct the residual block.
[0195]
[0206] Clause 23: The method of clause 16, wherein constructing the one-dimensional list of coefficients from the block of transform coefficients includes applying a sub-block diagonal scan to the block of transform coefficients.
[0196]
[0207] Clause 24: The method of clause 16, wherein constructing the one-dimensional list of coefficients from the block of transform coefficients includes applying a horizontal scan to the block of transform coefficients.
[0197]
[0208] Clause 25: The method of clause 16, wherein constructing the one-dimensional list of coefficients from the block of transform coefficients includes applying a vertical scan to the block of transform coefficients.
[0198]
[0209] Clause 26: The method of clause 1, wherein the inverse NSPT is defined as a matrix of size M x N, where M is an integer value indicating the number of basis vectors and also the number of rows in the matrix, and N is an integer value indicating the number of support samples for the inverse NSPT.
[0199]
[0210] Clause 27: The method of clause 20, wherein the matrix includes 8-bit precision values.
[0200]
[0211] Clause 28: The method of clause 1, further comprising selecting an inverse NSPT from a set of possible inverse NSPTs.
[0201]
[0212] Clause 29: The method of clause 22, further comprising selecting a set of possible inverse NSPTs from a plurality of sets of possible inverse NSPTs.
[0202]
[0213] Clause 30: The method of clause 23, wherein selecting the set of possible inverse NSPTs includes selecting the set of possible inverse NSPTs according to an intra-prediction mode for the block of video data.
[0203]
[0214] Clause 31: The method of clause 22, wherein selecting at least one of the set of possible inverse NSPTs or the inverse NSPTs includes selecting at least one of the set of possible inverse NSPTs or the inverse NSPTs according to a size of the block of video data.
[0204]
[0215] Clause 32: The method of clause 1, further comprising performing sign prediction to predict one or more signs for one or more of the transform coefficients.
[0205]
[0216] Clause 33: The method of clause 1, wherein decoding the block of video data includes forming a predictive block for the block of video data and combining the predictive block with the residual block to form a decoded block for the block of video data.
[0206]
[0217] Clause 34: The method of clause 1, wherein the block of transform coefficients is one of a 4x16 or 16x4 block, and inverse transforming the block of transform coefficients includes inverse transforming 20, 24, or 32 non-zero-valued transform coefficients and zero-valued transform coefficients for the remaining transform coefficients.
[0207]
[0218] Clause 35: The method of clause 34, wherein if there are 20 non-zero-valued transform coefficients, the remaining transform coefficients are 44 zero-valued transform coefficients; if there are 24 non-zero-valued transform coefficients, the remaining transform coefficients are 40 zero-valued transform coefficients; or if there are 32 non-zero-valued transform coefficients, the remaining transform coefficients are 32 zero-valued transform coefficients.
[0208]
[0219] Clause 36: The method of clause 1, wherein the block of transform coefficients is one of an 8x16 block or a 16x8 block, and inverse transforming the block of transform coefficients includes inverse transforming 32 or 40 non-zero-valued transform coefficients and zero-valued transform coefficients for the remaining transform coefficients.
[0209]
[0220] Clause 37: The method of clause 36, wherein if there are 32 non-zero-valued transform coefficients, the remaining transform coefficients are 96 zero-valued transform coefficients, or if there are 40 non-zero-valued transform coefficients, the remaining transform coefficients are 88 zero-valued transform coefficients.
[0210]
[0221] Clause 38: The method of clause 1, wherein the block of transform coefficients is a 16x16 block, and inverse transforming the block of transform coefficients includes inverse transforming 32, 40, or 44 non-zero-valued transform coefficients and zero-valued transform coefficients for the remaining transform coefficients.
[0211]
[0222] Clause 39: The method of clause 38, wherein if there are 32 non-zero-valued transform coefficients, the remaining transform coefficients are 224 zero-valued transform coefficients; if there are 40 non-zero-valued transform coefficients, the remaining transform coefficients are 216 zero-valued transform coefficients; or if there are 44 non-zero-valued transform coefficients, the remaining transform coefficients are 212 zero-valued transform coefficients.
[0212]
[0223] Clause 40: The method of clause 1, further comprising encoding the block of video data before decoding the block of video data.
[0213]
[0224] Clause 41: The method of any of clauses 1-39, further comprising encoding the block of video data before decoding the block of video data.
[0214]
[0225] Clause 42: A device for decoding video data, the device comprising one or more means for performing the method of any of clauses 1 to 41.
[0215]
[0226] Clause 43: The device of clause 42, wherein the one or more means include one or more processors implemented in circuitry.
[0216]
[0227] Clause 44: The device of any of clauses 42 and 43, further comprising a display configured to display the decoded video data.
[0217]
[0228] Clause 45: Any of clauses 42 to 44, wherein the device includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0218]
[0229] Clause 46: The device of clauses 42-45, further comprising a memory configured to store video data.
[0219]
[0230] Clause 47: A computer-readable storage medium storing instructions that, when executed, cause a processor of a device for decoding video data to perform any of the methods of clauses 1 to 41.
[0220]
[0231] Clause 48: A device for decoding video data, comprising: means for inverse transforming a block of transform coefficients of the block of video data using an inverse non-separable linear transform (NSPT) to reconstruct a residual block of the block of video data; and means for decoding the block of video data using the residual block.
[0221]
[0232] Clause 49: A method of decoding video data, comprising: inversely transforming a block of transform coefficients of the block of video data using an inverse non-separable linear transform (NSPT) without using an inverse separable transform to reconstruct a residual block of the block of video data; and decoding the block of video data using the residual block.
[0222]
[0233] Clause 50: The method of clause 49, further comprising: forming a prediction block for the block of video data using an intra-prediction mode; and determining an inverse NSPT according to the intra-prediction mode.
[0223]
[0234] Clause 51: The method of clause 49, further comprising determining that the size of the block of transform coefficients is one of 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, or 16x8, and selecting an inverse NSPT such that the inverse NSPT has a size corresponding to the size of the block.
[0224]
[0235] Clause 52: The method of clause 49, further comprising retrieving coefficients for the inverse NSPT from a memory storing coefficients for a plurality of inverse NSPTs, the plurality of inverse NSPTs including a 4x4 inverse NSPT, a 4x8 inverse NSPT, an 8x4 inverse NSPT, a 4x16 inverse NSPT, a 16x4 inverse NSPT, an 8x8 inverse NSPT, an 8x16 inverse NSPT, and a 16x8 inverse NSPT.
[0225]
[0236] Clause 53: The method of clause 49, wherein the block of transform coefficients includes a first block of transform coefficients having a first size, the block of video data includes a first block of video data, and the residual block includes a first residual block, the method further including: determining that the second block of transform coefficients of the second block of video data has a second size different from the first size; inverse transforming the second block of transform coefficients using an inverse separable transform and an inverse low frequency non-separable transform (LFNST) transform to reconstruct a second residual block of the second block of video data based on the second size being different from the first size; and decoding the second block of video data using the second residual block.
[0226]
[0237] Clause 54: The method of clause 49, wherein inverse transforming the block of transform coefficients comprises rearranging the block of transform coefficients to form a rearranged block of transform coefficients, and inverse transforming the rearranged block of transform coefficients.
[0227]
[0238] Clause 55: The method of clause 49, wherein inverse transforming the block of transform coefficients includes constructing a one-dimensional list of coefficients from the block of transform coefficients, and applying an inverse NSPT to the one-dimensional list of coefficients to reconstruct the residual block.
[0228]
[0239] Clause 56: The method of clause 55, wherein constructing the one-dimensional list of coefficients from the block of transform coefficients includes applying a sub-block diagonal scan to the block of transform coefficients.
[0229]
[0240] Clause 57: The method of clause 55, wherein constructing the one-dimensional list of coefficients from the block of transform coefficients includes applying a horizontal scan to the block of transform coefficients.
[0230]
[0241] Clause 58: The method of clause 55, wherein constructing the one-dimensional list of coefficients from the block of transform coefficients includes applying a vertical scan to the block of transform coefficients.
[0231]
[0242] Clause 59: The method of clause 49, wherein the inverse NSPT is defined as a matrix of size M×N, where M is an integer value indicating the number of basis vectors and also the number of rows in the matrix, and N is an integer value indicating the number of support samples for the inverse NSPT.
[0232]
[0243] Clause 60: The method of clause 59, wherein the matrix includes 8-bit precision values.
[0233]
[0244] Clause 61: The method of clause 49, further comprising selecting an inverse NSPT from a set of possible inverse NSPTs.
[0234]
[0245] Clause 62: The method of clause 61, further comprising selecting a set of possible inverse NSPTs from a plurality of sets of possible inverse NSPTs.
[0235]
[0246] Clause 63: The method of clause 62, wherein selecting the set of possible inverse NSPTs includes selecting the set of possible inverse NSPTs according to an intra-prediction mode for the block of video data.
[0236]
[0247] Clause 64: The method of clause 61, wherein selecting at least one of the set of possible inverse NSPTs or the inverse NSPTs includes selecting at least one of the set of possible inverse NSPTs or the inverse NSPTs according to a size of the block of video data.
[0237]
[0248] Clause 65: The method of clause 49, further comprising performing sign prediction to predict one or more signs for one or more of the transform coefficients.
[0238]
[0249] Clause 66: The method of clause 49, wherein decoding the block of video data includes forming a prediction block for the block of video data and combining the prediction block with the residual block to form a decoded block for the block of video data.
[0239]
[0250] Clause 67: The method of clause 49, wherein the block of transform coefficients is one of a 4x16 or a 16x4 block, and inverse transforming the block of transform coefficients includes inverse transforming 20, 24, or 32 non-zero-valued transform coefficients and zero-valued transform coefficients for the remaining transform coefficients.
[0240]
[0251] Clause 68: The method of clause 67, wherein if there are 20 non-zero-valued transform coefficients, the remaining transform coefficients are 44 zero-valued transform coefficients; if there are 24 non-zero-valued transform coefficients, the remaining transform coefficients are 40 zero-valued transform coefficients; or if there are 32 non-zero-valued transform coefficients, the remaining transform coefficients are 32 zero-valued transform coefficients.
[0241]
[0252] Clause 69: The method of clause 49, wherein the block of transform coefficients is one of an 8x16 block or a 16x8 block, and inverse transforming the block of transform coefficients includes inverse transforming 32 or 40 non-zero-valued transform coefficients and zero-valued transform coefficients for the remaining transform coefficients.
[0242]
[0253] Clause 70: The method of clause 69, wherein if there are 32 non-zero-valued transform coefficients, the remaining transform coefficients are 96 zero-valued transform coefficients, or if there are 40 non-zero-valued transform coefficients, the remaining transform coefficients are 88 zero-valued transform coefficients.
[0243]
[0254] Clause 71: The method of clause 49, wherein the block of transform coefficients is a 16x16 block, and wherein inverse transforming the block of transform coefficients includes inverse transforming 32, 40, or 44 non-zero-valued transform coefficients and zero-valued transform coefficients for the remaining transform coefficients.
[0244]
[0255] Clause 72: The method of clause 71, wherein if there are 32 non-zero-valued transform coefficients, the remaining transform coefficients are 224 zero-valued transform coefficients; if there are 40 non-zero-valued transform coefficients, the remaining transform coefficients are 216 zero-valued transform coefficients; or if there are 44 non-zero-valued transform coefficients, the remaining transform coefficients are 212 zero-valued transform coefficients.
[0245]
[0256] Clause 73: The method of claim 49, further comprising encoding the block of video data before decoding the block of video data.
[0246]
[0257] Clause 74: A device for decoding video data, comprising: a memory configured to store the video data; and a processing system including one or more processors implemented in circuitry, wherein the processing system is configured to inverse transform blocks of transform coefficients of the block of video data using an inverse non-separable linear transform (NSPT) without using an inverse separable transform to reconstruct residual blocks of the block of video data, and to decode the block using the residual blocks.
[0247]
[0258] Clause 75: The device of clause 74, wherein the processing system is further configured to form a prediction block for the block of video data using an intra-prediction mode and determine the inverse NSPT according to the intra-prediction mode.
[0248]
[0259] Clause 76: The device of clause 74, wherein the processing system is further configured to determine that the size of the block of transform coefficients is one of 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, or 16x8, and to select an inverse NSPT such that the inverse NSPT has a size corresponding to the size of the block of video data.
[0249]
[0260] Clause 77: The device of clause 74, wherein the memory is further configured to store coefficients for a plurality of inverse NSPTs, the plurality of inverse NSPTs including a 4x4 inverse NSPT, a 4x8 inverse NSPT, an 8x4 inverse NSPT, a 4x16 inverse NSPT, a 16x4 inverse NSPT, an 8x8 inverse NSPT, an 8x16 inverse NSPT, and a 16x8 inverse NSPT, and wherein the processing system is configured to retrieve coefficients for one of the plurality of inverse NSPTs from the memory.
[0250]
[0261] Clause 78: The device of clause 74, wherein the block of transform coefficients includes a first block of transform coefficients having a first size, the block of video data includes the first block of video data, and the residual block includes a first residual block, and the processing system is further configured to determine that the second block of transform coefficients of the second block of video data has a second size different from the first size, inverse transform the second block of transform coefficients using an inverse separable transform and an inverse low frequency non-separable transform (LFNST) transform to reconstruct a second residual block of the second block of video data based on the second size being different from the first size, and decode the second block of video data using the second residual block.
[0251]
[0262] Clause 79: The device of clause 74, further comprising a display configured to display the decoded video data.
[0252]
[0263] Clause 80: The device of clause 74, wherein the device includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0253]
[0264] Clause 81: A device for decoding video data, comprising: means for inverse transforming a block of transform coefficients of the block of video data using an inverse non-separable linear transform (NSPT) without using an inverse separable transform to reconstruct a residual block of the block of video data; and means for decoding the block of video data using the residual block.
[0254]
[0265] Clause 82: The device of clause 81, further comprising: means for forming a prediction block for the block of video data using an intra-prediction mode; and means for determining an inverse NSPT according to the intra-prediction mode.
[0255]
[0266] Clause 83: The device of clause 81, further comprising: means for determining that a size of a block of transform coefficients is one of 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, or 16x8; and means for selecting an inverse NSPT such that the inverse NSPT has a size corresponding to the size of the block.
[0256]
[0267] Clause 84: The device of clause 81, further comprising means for retrieving coefficients for an inverse NSPT from a memory storing coefficients for a plurality of inverse NSPTs, the plurality of inverse NSPTs including a 4x4 inverse NSPT, a 4x8 inverse NSPT, an 8x4 inverse NSPT, a 4x16 inverse NSPT, a 16x4 inverse NSPT, an 8x8 inverse NSPT, an 8x16 inverse NSPT, and a 16x8 inverse NSPT.
[0257]
[0268] Clause 85: The device of clause 81, further comprising: means for determining that the block of transform coefficients includes a first block of transform coefficients having a first size, the block of video data includes the first block of video data, the residual block includes the first residual block, and a second block of transform coefficients of a second block of video data has a second size different from the first size; means for inverse transforming the second block of transform coefficients using an inverse separable transform and an inverse low frequency non-separable transform (LFNST) transform to reconstruct a second residual block of the second block of video data based on the second size being different from the first size; and means for decoding the second block of video data using the second residual block.
[0258]
[0269] Clause 86: The device of clause 81, wherein the means for inverse transforming the block of transform coefficients comprises means for rearranging the block of transform coefficients to form a rearranged block of transform coefficients, and means for inverse transforming the rearranged block of transform coefficients.
[0259]
[0270] Clause 87: A method of decoding video data, comprising: inverse transforming a block of transform coefficients of the block of video data using an inverse non-separable linear transform (NSPT) without using an inverse separable transform to reconstruct a residual block of the block of video data; and decoding the block of video data using the residual block.
[0260]
[0271] Clause 88: The method of clause 87, further comprising: forming a prediction block for the block of video data using an intra-prediction mode; and determining an inverse NSPT according to the intra-prediction mode.
[0261]
[0272] Clause 89: The method of any of clauses 87 and 88, further comprising determining that the size of the block of transform coefficients is one of 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, or 16x8, and selecting an inverse NSPT such that the inverse NSPT has a size corresponding to the size of the block.
[0262]
[0273] Clause 90: The method of any of clauses 87-89, further comprising retrieving coefficients for an inverse NSPT from a memory storing coefficients for a plurality of inverse NSPTs, the plurality of inverse NSPTs including a 4x4 inverse NSPT, a 4x8 inverse NSPT, an 8x4 inverse NSPT, a 4x16 inverse NSPT, a 16x4 inverse NSPT, an 8x8 inverse NSPT, an 8x16 inverse NSPT, and a 16x8 inverse NSPT.
[0263]
[0274] Clause 91: The method of any of clauses 87 to 90, wherein the block of transform coefficients includes a first block of transform coefficients having a first size, the block of video data includes a first block of video data, and the residual block includes a first residual block, the method further including: determining that the second block of transform coefficients of the second block of video data has a second size different from the first size; inverse transforming the second block of transform coefficients using an inverse separable transform and an inverse low-frequency non-separable transform (LFNST) transform to reconstruct a second residual block of the second block of video data based on the second size being different from the first size; and decoding the second block of video data using the second residual block.
[0264]
[0275] Clause 92: Any of the methods of clauses 87-91, wherein inverse transforming the block of transform coefficients comprises rearranging the block of transform coefficients to form a rearranged block of transform coefficients, and inverse transforming the rearranged block of transform coefficients.
[0265]
[0276] Clause 93: Any of the methods of clauses 87 to 92, wherein inverse transforming the block of transform coefficients includes constructing a one-dimensional list of coefficients from the block of transform coefficients, and applying inverse NSPT to the one-dimensional list of coefficients to reconstruct the residual block.
[0266]
[0277] Clause 94: The method of Clause 93, wherein constructing a one-dimensional list of coefficients from the block of transform coefficients includes applying a sub-block diagonal scan to the block of transform coefficients.
[0267]
[0278] Clause 95: The method of any of clauses 93 and 94, wherein constructing a one-dimensional list of coefficients from the block of transform coefficients includes applying a horizontal scan to the block of transform coefficients.
[0268]
[0279] Clause 96: The method of any of clauses 93-95, wherein constructing a one-dimensional list of coefficients from the block of transform coefficients includes applying a vertical scan to the block of transform coefficients.
[0269]
[0280] Clause 97: Any of the methods of clauses 87 to 96, wherein the inverse NSPT is defined as a matrix of size M×N, where M is an integer value indicating the number of basis vectors and also the number of rows in the matrix, and N is an integer value indicating the number of support samples for the inverse NSPT.
[0270]
[0281] Clause 98: The method of clause 97, wherein the matrix includes 8-bit precision values.
[0271]
[0282] Clause 99: The method of any of clauses 87-98, further comprising selecting an inverse NSPT from a set of possible inverse NSPTs.
[0272]
[0283] Clause 100: The method of clause 99, further comprising selecting a set of possible inverse NSPTs from a plurality of sets of possible inverse NSPTs.
[0273]
[0284] Clause 101: The method of clause 100, wherein selecting the set of possible inverse NSPTs includes selecting the set of possible inverse NSPTs according to an intra-prediction mode for the block of video data.
[0274]
[0285] Clause 102: The method of any of clauses 100 and 101, wherein selecting at least one of the set of possible inverse NSPTs or the inverse NSPTs includes selecting at least one of the set of possible inverse NSPTs or the inverse NSPTs according to a size of the block of video data.
[0275]
[0286] Clause 103: The method of any of clauses 87-102, further comprising performing sign prediction to predict one or more signs for one or more of the transform coefficients.
[0276]
[0287] Clause 104: Any of the methods of clauses 87 to 103, wherein decoding the block of video data includes forming a predictive block for the block of video data and combining the predictive block with the residual block to form a decoded block for the block of video data.
[0277]
[0288] Clause 105: Any of the methods of clauses 87 to 104, wherein the block of transform coefficients is one of a 4x16 or 16x4 block, and inverse transforming the block of transform coefficients includes inverse transforming 20, 24, or 32 non-zero-valued transform coefficients and zero-valued transform coefficients for the remaining transform coefficients.
[0278]
[0289] Clause 106: The method of clause 105, wherein if there are 20 non-zero-valued transform coefficients, the remaining transform coefficients are 44 zero-valued transform coefficients; if there are 24 non-zero-valued transform coefficients, the remaining transform coefficients are 40 zero-valued transform coefficients; or if there are 32 non-zero-valued transform coefficients, the remaining transform coefficients are 32 zero-valued transform coefficients.
[0279]
[0290] Clause 107: Any of the methods of clauses 87 to 106, wherein the block of transform coefficients is one of an 8x16 block or a 16x8 block, and inverse transforming the block of transform coefficients includes inverse transforming 32 or 40 non-zero-valued transform coefficients and zero-valued transform coefficients for the remaining transform coefficients.
[0280]
[0291] Clause 108: The method of clause 107, wherein if there are 32 non-zero-valued transform coefficients, the remaining transform coefficients are 96 zero-valued transform coefficients, or if there are 40 non-zero-valued transform coefficients, the remaining transform coefficients are 88 zero-valued transform coefficients.
[0281]
[0292] Clause 109: Any of the methods of clauses 87-108, wherein the block of transform coefficients is a 16x16 block, and inverse transforming the block of transform coefficients includes inverse transforming 32, 40, or 44 non-zero-valued transform coefficients and zero-valued transform coefficients for the remaining transform coefficients.
[0282]
[0293] Clause 110: The method of clause 109, wherein if there are 32 non-zero-valued transform coefficients, the remaining transform coefficients are 224 zero-valued transform coefficients; if there are 40 non-zero-valued transform coefficients, the remaining transform coefficients are 216 zero-valued transform coefficients; or if there are 44 non-zero-valued transform coefficients, the remaining transform coefficients are 212 zero-valued transform coefficients.
[0283]
[0294] Clause 111: The method of any of clauses 87-110, further comprising encoding the block of video data before decoding the block of video data.
[0284]
[0295] Clause 112: A device for decoding video data, comprising: a memory configured to store the video data; and a processing system including one or more processors implemented in circuitry, wherein the processing system is configured to inverse transform blocks of transform coefficients of the block of video data using an inverse non-separable linear transform (NSPT) without using an inverse separable transform to reconstruct residual blocks of the block of video data, and to decode the block using the residual blocks.
[0285]
[0296] Clause 113: The device of clause 112, wherein the processing system is further configured to form a prediction block for the block of video data using an intra-prediction mode and determine the inverse NSPT according to the intra-prediction mode.
[0286]
[0297] Clause 114: The device of any of clauses 112 and 113, wherein the processing system is further configured to determine that the size of the block of transform coefficients is one of 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, or 16x8, and to select an inverse NSPT such that the inverse NSPT has a size corresponding to the size of the block of video data.
[0287]
[0298] Clause 115: The device of any of clauses 112-114, wherein the memory is further configured to store coefficients for a plurality of inverse NSPTs, the plurality of inverse NSPTs including a 4x4 inverse NSPT, a 4x8 inverse NSPT, an 8x4 inverse NSPT, a 4x16 inverse NSPT, a 16x4 inverse NSPT, an 8x8 inverse NSPT, an 8x16 inverse NSPT, and a 16x8 inverse NSPT, and the processing system is configured to retrieve coefficients for one of the plurality of inverse NSPTs from the memory.
[0288]
[0299] Clause 116: The device of any of clauses 112-115, wherein the block of transform coefficients includes a first block of transform coefficients having a first size, the block of video data includes the first block of video data, and the residual block includes a first residual block, and the processing system is further configured to determine that the second block of transform coefficients of the second block of video data has a second size different from the first size, inverse transform the second block of transform coefficients using an inverse separable transform and an inverse low-frequency non-separable transform (LFNST) transform to reconstruct a second residual block of the second block of video data based on the second size being different from the first size, and decode the second block of video data using the second residual block.
[0289]
[0300] Clause 117: The device of any of clauses 112 to 116, further comprising a display configured to display the decoded video data.
[0290]
[0301] Clause 118: Any of clauses 112 to 117, wherein the device includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0291]
[0302] Clause 119: A device for decoding video data, comprising: means for inverse transforming a block of transform coefficients of the block of video data using an inverse non-separable linear transform (NSPT) without using an inverse separable transform to reconstruct a residual block of the block of video data; and means for decoding the block of video data using the residual block.
[0292]
[0303] Clause 120: The device of clause 119, further comprising: means for forming a prediction block for the block of video data using an intra-prediction mode; and means for determining an inverse NSPT according to the intra-prediction mode.
[0293]
[0304] Clause 121: The device of any of clauses 119 and 120, further comprising: means for determining that the size of a block of transform coefficients is one of 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, or 16x8; and means for selecting an inverse NSPT such that the inverse NSPT has a size corresponding to the size of the block.
[0294]
[0305] Clause 122: The device of any of clauses 119 to 121, further comprising means for retrieving coefficients for an inverse NSPT from a memory storing coefficients for a plurality of inverse NSPTs, the plurality of inverse NSPTs including a 4x4 inverse NSPT, a 4x8 inverse NSPT, an 8x4 inverse NSPT, a 4x16 inverse NSPT, a 16x4 inverse NSPT, an 8x8 inverse NSPT, an 8x16 inverse NSPT, and a 16x8 inverse NSPT.
[0295]
[0306] Clause 123: The device of any of clauses 119-122, further comprising: means for determining that the block of transform coefficients includes a first block of transform coefficients having a first size, the block of video data includes the first block of video data, the residual block includes the first residual block, and a second block of transform coefficients of a second block of video data has a second size different from the first size; means for inverse transforming the second block of transform coefficients using an inverse separable transform and an inverse low-frequency non-separable transform (LFNST) transform to reconstruct a second residual block of the second block of video data based on the second size being different from the first size; and means for decoding the second block of video data using the second residual block.
[0296]
[0307] Clause 124: The device of any of clauses 119 to 123, wherein the means for inverse transforming the block of transform coefficients comprises means for rearranging the block of transform coefficients to form a rearranged block of transform coefficients, and means for inverse transforming the rearranged block of transform coefficients.
[0297]
[0308] It should be appreciated that, depending on the embodiment, certain acts or events of any of the techniques described herein may be performed in a different sequence, added, combined, or omitted entirely (e.g., not all acts or events described are required to practice the techniques). Furthermore, in certain embodiments, acts or events may be performed simultaneously rather than sequentially, for example, through multithreading, interrupt processing, or multiple processors.
[0298]
[0309] In one or more embodiments, the functions described 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. Computer-readable media may include computer-readable storage media, which correspond to tangible media, such as data storage media, or communication media, including any medium that facilitates transfer of a computer program from one place to another, for example, according to a communications protocol. In this manner, computer-readable media may generally correspond to (1) tangible computer-readable storage media that is non-transitory, or (2) communication media, such as a signal or carrier wave. Data storage media 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 implementing the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0299]
[0310] By way of example, and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can 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 within the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead cover non-transitory, tangible storage media. Disk and disc, as used herein, include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while discs reproduce data optically using a laser. Combinations of the above should also be included within the scope of computer-readable media.
[0300]
[0311] 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. Accordingly, the terms "processor" and "processing circuitry," as used herein, may refer to any of the above structures or any other structure suitable for implementing the techniques described herein. Furthermore, in some aspects, the functionality described herein may be provided in dedicated hardware and / or software modules configured for encoding and decoding, or may be incorporated into a combined codec. It is also possible for these techniques to be implemented entirely in one or more circuits or logic elements.
[0301]
[0312] The techniques of this disclosure can be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this disclosure to highlight functional aspects of devices configured to perform the disclosed techniques, but they do not necessarily require embodied in different hardware units. Rather, as described above, the various units can be combined into a codec hardware unit or can be provided by a collection of interoperable hardware units, including one or more processors as described above, in conjunction with suitable software and / or firmware.
[0302]
[0313] Various embodiments have been described. These and other embodiments are within the scope of the following claims.
Claims
1. 1. A method for decoding video data, comprising: inverse transforming blocks of transform coefficients of the blocks of video data using an inverse non-separable linear transform (NSPT) without using an inverse separable transform to reconstruct residual blocks of the blocks of video data; and decoding the block of video data using the residual block.
2. forming a prediction block for the block of video data using an intra prediction mode; determining the inverse NSPT according to the intra prediction mode; The method of claim 1 further comprising:
3. determining that the size of the block of transform coefficients is one of 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, or 16x8; selecting the inverse NSPT such that the inverse NSPT has a size corresponding to the size of the block; The method of claim 1 further comprising:
4. 2. The method of claim 1, further comprising retrieving coefficients for the inverse NSPT from a memory storing coefficients for a plurality of inverse NSPTs, the plurality of inverse NSPTs including a 4x4 inverse NSPT, a 4x8 inverse NSPT, an 8x4 inverse NSPT, a 4x16 inverse NSPT, a 16x4 inverse NSPT, an 8x8 inverse NSPT, an 8x16 inverse NSPT, and a 16x8 inverse NSPT.
5. The block of transform coefficients comprises a first block of transform coefficients having a first size, the block of video data comprises a first block of video data, and the residual block comprises a first residual block, and the method comprises: determining that a second block of transform coefficients of a second block of video data has a second size different from the first size; inverse transforming the second block of transform coefficients using the inverse separable transform and an inverse low-frequency non-separable transform (LFNST) transform to reconstruct a second residual block of the second block of video data based on the second size being different from the first size; 2. The method of claim 1, further comprising: decoding a second block of the video data using the second residual block.
6. inverse transforming the blocks of transform coefficients reordering the blocks of transform coefficients to form reordered blocks of transform coefficients; and inverse transforming the reordered blocks of transform coefficients.
7. inverse transforming the blocks of transform coefficients constructing a one-dimensional list of coefficients from said block of transform coefficients; and applying the inverse NSPT to the one-dimensional list of coefficients to reconstruct the residual block.
8. The method of claim 7 , wherein constructing the one-dimensional list of coefficients from the block of transform coefficients comprises applying a sub-block diagonal scan to the block of transform coefficients.
9. The method of claim 7 , wherein constructing the one-dimensional list of coefficients from the block of transform coefficients comprises applying a horizontal scan to the block of transform coefficients.
10. The method of claim 7 , wherein constructing the one-dimensional list of coefficients from the block of transform coefficients comprises applying a vertical scan to the block of transform coefficients.
11. 2. The method of claim 1, wherein the inverse NSPT is defined as a matrix of size M×N, where M is an integer value indicating the number of basis vectors and also the number of rows in the matrix, and N is an integer value indicating the number of support samples for the inverse NSPT.
12. The method of claim 11 , wherein the matrix includes 8-bit precision values.
13. The method of claim 1 , further comprising selecting the reverse NSPT from a set of possible reverse NSPTs.
14. The method of claim 13 , further comprising selecting the set of possible reverse NSPTs from a plurality of sets of possible reverse NSPTs.
15. The method of claim 14 , wherein selecting the set of possible inverse NSPTs comprises selecting the set of possible inverse NSPTs according to an intra-prediction mode for the block of video data.
16. The method of claim 13 , wherein selecting the inverse NSPT comprises selecting the inverse NSPT according to a size of the block of video data.
17. The method of claim 1 , further comprising performing sign prediction to predict one or more signs for one or more of the transform coefficients.
18. decoding the block of video data; forming a prediction block for the block of video data; and combining the predictive block with the residual block to form a decoded block for the block of video data.
19. 2. The method of claim 1 , wherein the block of transform coefficients is one of a 4x16 or a 16x4 block, and wherein inverse transforming the block of transform coefficients comprises inverse transforming 20, 24, or 32 non-zero-valued transform coefficients and zero-valued transform coefficients for the remaining transform coefficients.
20. If there are 20 non-zero-valued transform coefficients, the remaining transform coefficients are 44 zero-valued transform coefficients. If there are 24 non-zero-valued transform coefficients, the remaining transform coefficients are 40 zero-valued transform coefficients; or If there are 32 non-zero-valued transform coefficients, the remaining transform coefficients are 32 zero-valued transform coefficients.
20. The method of claim 19.
21. 2. The method of claim 1 , wherein the block of transform coefficients is one of an 8x16 block or a 16x8 block, and wherein inverse transforming the block of transform coefficients comprises inverse transforming 32 or 40 non-zero-valued transform coefficients and zero-valued transform coefficients for the remaining transform coefficients.
22. If there are 32 non-zero-valued transform coefficients, the remaining transform coefficients are 96 zero-valued transform coefficients; or If there are 40 non-zero-valued transform coefficients, the remaining transform coefficients are 88 zero-valued transform coefficients.
22. The method of claim 21.
23. 2. The method of claim 1 , wherein the block of transform coefficients is a 16x16 block, and wherein inverse transforming the block of transform coefficients comprises inverse transforming 32, 40, or 44 non-zero-valued transform coefficients and zero-valued transform coefficients for the remaining transform coefficients.
24. If there are 32 non-zero-valued transform coefficients, the remaining transform coefficients are 224 zero-valued transform coefficients. If there are 40 non-zero-valued transform coefficients, the remaining transform coefficients are 216 zero-valued transform coefficients; or If there are 44 non-zero-valued transform coefficients, the remaining transform coefficients are 212 zero-valued transform coefficients.
24. The method of claim 23.
25. The method of claim 1 , further comprising encoding the block of video data before decoding the block of video data.
26. 1. A device for decoding video data, comprising: a memory configured to store video data; a processing system including one or more processors implemented in circuitry, said processing system comprising: inverse transforming blocks of transform coefficients of the blocks of video data using an inverse non-separable linear transform (NSPT) without using an inverse separable transform to reconstruct residual blocks of the blocks of video data; A device configured to decode the block using the residual block.
27. the processing system comprising: forming a prediction block for the block of video data using an intra-prediction mode; The device of claim 26 , further configured to determine the inverse NSPT according to the intra-prediction mode.
28. the processing system comprising: determining that the size of the block of transform coefficients is one of 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, or 16x8; 27. The device of claim 26, further configured to select the inverse NSPT such that the inverse NSPT has a size corresponding to the size of the block of the video data.
29. 27. The device of claim 26, wherein the memory is further configured to store coefficients for a plurality of inverse NSPTs, the plurality of inverse NSPTs including a 4x4 inverse NSPT, a 4x8 inverse NSPT, an 8x4 inverse NSPT, a 4x16 inverse NSPT, a 16x4 inverse NSPT, an 8x8 inverse NSPT, an 8x16 inverse NSPT, and a 16x8 inverse NSPT, and wherein the processing system is configured to retrieve the coefficients for one of the plurality of inverse NSPTs from the memory.
30. the blocks of transform coefficients include a first block of transform coefficients having a first size, the blocks of video data include the first block of video data, the residual blocks include a first residual block, and the processing system is configured to: determining that a second block of transform coefficients for the second block of video data has a second size different from the first size; inverse transforming the second block of transform coefficients using the inverse separable transform and an inverse low-frequency non-separable transform (LFNST) transform to reconstruct a second residual block of the second block of video data based on the second size being different from the first size; 27. The device of claim 26, further configured to decode a second block of the video data using the second residual block.
31. 27. The device of claim 26, further comprising a display configured to display the decoded video data.
32. 27. The device of claim 26, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
33. 1. A device for decoding video data, comprising: means for inverse transforming blocks of transform coefficients of the blocks of video data using an inverse non-separable linear transform (NSPT) without using an inverse separable transform to reconstruct residual blocks of the blocks of video data; means for decoding the block of video data using the residual block.
34. means for forming a prediction block for said block of video data using an intra prediction mode; means for determining the inverse NSPT according to the intra prediction mode; 34. The device of claim 33, further comprising:
35. means for determining that the size of the block of transform coefficients is one of 4x4, 4x8, 8x4, 4x16, 16x4, 8x8, 8x16, or 16x8; means for selecting the inverse NSPT such that the inverse NSPT has a size corresponding to the size of the block; 34. The device of claim 33, further comprising:
36. 34. The device of claim 33, further comprising: means for retrieving coefficients for the inverse NSPT from a memory storing coefficients for a plurality of inverse NSPTs, the plurality of inverse NSPTs including a 4x4 inverse NSPT, a 4x8 inverse NSPT, an 8x4 inverse NSPT, a 4x16 inverse NSPT, a 16x4 inverse NSPT, an 8x8 inverse NSPT, an 8x16 inverse NSPT, and a 16x8 inverse NSPT.
37. the blocks of transform coefficients include a first block of transform coefficients having a first size, the blocks of video data include a first block of video data, and the residual blocks include a first residual block; means for determining that a second block of transform coefficients of a second block of video data has a second size different from the first size; means for inverse transforming the second block of transform coefficients using the inverse separable transform and an inverse low-frequency non-separable transform (LFNST) transform to reconstruct a second residual block of the second block of video data based on the second size being different from the first size; 34. The device of claim 33, further comprising: means for decoding a second block of video data using the second residual block.
38. said means for inverse transforming said blocks of transform coefficients means for reordering said blocks of transform coefficients to form reordered blocks of transform coefficients; and means for inverse transforming the reordered blocks of transform coefficients.