Quadratic Transform Design for Split Transform Units in Video Coding
By adopting secondary transformation design and intraframe sub-segmentation in video encoding and decoding technologies, the problem of insufficient encoding gain in the prior art is solved, and more efficient video data compression is achieved.
Patent Information
- Application Number
- CN202080011500.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-01-30
- Filing Date
- 2020-01-31
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2040-01-31
AI Technical Summary
Existing video encoding and decoding technologies are difficult to effectively improve encoding gain when processing video data, especially in the context of advanced video codecs.
The secondary transformation design is adopted, combined with intra-frame sub-segmentation, and decide whether to apply secondary transformation to improve coding efficiency. The specific steps include determining whether the intra-frame sub-segment is applied to the current block of video data, deciding whether to apply a secondary transformation based on the size of the main transformation coefficient, and decoding the video data based on this.
By improving encoding gain, the compression efficiency of video data is optimized and is suitable for advanced video codecs and next-generation video decoding standards.
Smart Images

Figure CN113383546B_ABST
Abstract
Description
[0001] This application claims the benefit of U.S. Application No. 16 / 777,267, filed on January 30, 2020, and U.S. Provisional Patent Application 62 / 800,247, filed on February 1, 2019, the entire contents of both of which are incorporated herein by reference. Technical Field
[0002] This disclosure relates to video encoding and video decoding. Background Art
[0003] Digital video capabilities can be incorporated into a wide variety of devices, including digital televisions, digital live systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radiotelephones (so-called "smart phones"), video teleconferencing devices, video streaming devices, etc. Digital video devices implement video decoding techniques (such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 (Part 10, Advanced Video Coding (AVC)), ITU-T H.265 / High Efficiency Video Coding (HEVC)) and extensions of such standards). By implementing such video decoding techniques, video devices can more efficiently transmit, receive, encode, decode, and / or store digital video information.
[0004] Video decoding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in a video sequence. For block-based video decoding, a video slice (e.g., a video picture or a portion of a video picture) can be divided into video blocks, which may also be referred to as coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial prediction relative to reference samples in adjacent blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture can be encoded using spatial prediction relative to reference samples in adjacent blocks in the same picture or temporal prediction relative to reference samples in other reference pictures. A picture may be referred to as a frame, and a reference picture may be referred to as a reference frame. Summary of the Invention
[0005] In general, the present disclosure describes techniques for transform coding in video coding. Transform coding is an element of modern video compression standards. In some examples, transform coding includes a secondary transform design that can be used in conjunction with a split transform coding scheme applied to transform units (TUs). The present disclosure describes a secondary transform design that can improve coding gain and can be used in the context of advanced video codecs such as extensions of HEVC or next-generation video coding standards (e.g., H.266 / Multiview Video Coding (VVC)).
[0006] In one example, a method includes: determining whether intra-subdivision is applied to a current block of video data; applying a primary transform to the current block of video data to generate primary transform coefficients; determining whether the size of the primary transform is at least a predetermined size based on the application of intra-subdivision; applying a secondary transform to the primary transform coefficients based on the application of intra-subdivision and the size of the primary transform being at least the predetermined size; and decoding the current block of video data based on the secondary transform.
[0007] In another example, a device includes: a memory configured to store video data; and one or more processors implemented in circuitry and communicatively coupled to the memory, the one or more processors configured to: determine whether intra-subdivision is applied to a current block of video data; apply a primary transform to the current block of video data to generate primary transform coefficients; determine whether the size of the primary transform is at least a predetermined size based on the application of intra-subdivision; apply a secondary transform to the primary transform coefficients based on the application of intra-subdivision and the size of the primary transform being at least the predetermined size; and decode the current block of video data based on the secondary transform.
[0008] In yet another example, a computer-readable storage medium includes instructions stored thereon that, when executed, cause one or more processors to: determine whether intra-subdivision is applied to a current block of video data; apply a primary transform to the current block of video data to generate primary transform coefficients; determine whether the size of the primary transform is at least a predetermined size based on the application of intra-subdivision; apply a secondary transform to the primary transform coefficients based on the application of intra-subdivision and the size of the primary transform being at least the predetermined size; and decode the current block of video data based on the secondary transform.
[0009] Details of one or more examples are set forth in the accompanying drawings and the following description. Other features, objects, and advantages will be apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 is a block diagram showing an example video encoding and decoding system that can implement the techniques of the present disclosure.
[0011] Figure 2A and Figure 2B is a conceptual diagram showing an example quadtree binary tree (QTBT) structure and a corresponding coding tree unit (CTU).
[0012] Figure 3 is a block diagram showing an example video encoder that can implement the techniques of the present disclosure.
[0013] Figure 4 is a block diagram showing an example video decoder that can implement the techniques of the present disclosure.
[0014] Figure 5 is a conceptual diagram showing a transform scheme based on a residual quadtree partitioning structure.
[0015] Figure 6 is a block diagram showing an exemplary hybrid video coding system with adaptive transform selection.
[0016] Figure 7 is a block diagram showing the use of a secondary transform at the encoder and decoder.
[0017] Figure 8 is a conceptual diagram showing an example secondary transform for a 1x16 block.
[0018] Figure 9 is a conceptual diagram showing an example secondary transform for a 2x16 block.
[0019] Figure 10 is a conceptual diagram showing two example secondary transforms for a 2x16 block.
[0020] Figure 11 is a conceptual diagram showing different types of tree-based partitioning of a square block.
[0021] Figure 12 is a flowchart showing the techniques of the present disclosure.
[0022] Figure 13 is a flowchart showing an example video encoding method.
[0023] Figure 14 is a flowchart showing an example video decoding method. Detailed Description
[0024] Figure 1FIG. 0 is a block diagram showing an example video encoding and decoding system 100 that can implement the techniques of the present disclosure. Generally speaking, the techniques of the present disclosure relate to decoding (encoding and / or decoding) video data. Typically, video data includes any data for processing video. Thus, video data can include raw, unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata (e.g., signaling data).
[0025] As Figure 1 shown, in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. Specifically, source device 102 provides the video data to destination device 116 via a computer-readable medium 110. Source device 102 and destination device 116 can include any of a variety of devices, including desktop computers, notebook computers (i.e., laptop computers), tablet computers, set-top boxes, cellular phones such as smart phones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some cases, source device 102 and destination device 116 can be equipped for wireless communication and can thus be referred to as wireless communication devices.
[0026] In Figure 1 the example, source device 102 includes a video source 104, a memory 106, a video encoder 200, and an output interface 108. Destination device 116 includes an input interface 122, a video decoder 300, a memory 120, and a display device 118. According to the present disclosure, video encoder 200 of source device 102 and video decoder 300 of destination device 116 can be configured to apply techniques for transform coding. Thus, source device 102 represents an example of a video encoding device, and destination device 116 represents an example of a video decoding device. In other examples, source device and destination device can include other components or arrangements. For example, source device 102 can receive video data from an external video source such as an external camera. Similarly, destination device 116 can interface with an external display device instead of including an integrated display device.
[0027] As Figure 1The illustrated system 100 is merely an example. In general, any digital video encoding and / or decoding device may perform techniques for transform coding. Source device 102 and destination device 116 are merely examples of such coding devices, where source device 102 generates encoded video data for transmission to destination device 116. This disclosure refers to a "coding" device as a device that performs coding (e.g., encoding and / or decoding) of data. Thus, video encoder 200 and video decoder 300 represent examples of coding devices (specifically, a video encoder and a video decoder), respectively. In some examples, source device 102 and destination device 116 may operate in a substantially symmetric manner such that each of source device 102 and destination device 116 includes video encoding and decoding components. Thus, system 100 may support one-way or two-way video transmission between source device 102 and destination device 116, e.g., for video streaming, video playback, video broadcast, or video telephony.
[0028] In general, video source 104 represents a source of video data (i.e., raw, unencoded video data) and provides a sequential series of pictures (also referred to as "frames") of the video data to video encoder 200, which encodes the data for the pictures. Video source 104 of source device 102 may include a video capture device, such as a camera, a video archival unit containing previously captured raw video, and / or a video feed interface for receiving video from a video content provider. As another alternative, video source 104 may generate computer graphics-based data as source video, or a combination of live video, archived video, and computer-generated video. In each case, video encoder 200 may encode the captured, pre-captured, or computer-generated video data. Video encoder 200 may reorder the pictures from the received order (sometimes referred to as "display order") to a coding order for coding. Video encoder 200 may generate a bitstream including the encoded video data. Then, source device 102 may output the encoded video data via output interface 108 onto a computer-readable medium 110 for reception and / or retrieval by, e.g., input interface 122 of destination device 116.
[0029] The memories 106 of the source device 102 and 120 of the destination device 116 represent general memories. In some examples, the memories 106 and 120 may store raw video data, e.g., raw video from the video source 104 and raw decoded video data from the video decoder 300. Additionally or alternatively, the memories 106 and 120 may store software instructions that may be executed by, e.g., the video encoder 200 and the video decoder 300, respectively. Although shown as separate from the video encoder 200 and the video decoder 300 in this example, it should be understood that the video encoder 200 and the video decoder 300 may also include internal memories for functionally similar or equivalent purposes. Further, the memories 106 and 120 may store, e.g., encoded video data output from the video encoder 200 and input to the video decoder 300. In some examples, portions of the memories 106 and 120 may be allocated as one or more video buffers, e.g., to store raw decoded and / or encoded video data.
[0030] The computer-readable medium 110 may represent any type of medium or device capable of conveying the encoded video data from the source device 102 to the destination device 116. In one example, the computer-readable medium 110 represents a communication medium that enables the source device 102 to directly send the encoded video data to the destination device 116 in real time, e.g., via a radio-frequency network or a computer-based network. The output interface 108 may demodulate the transmission signal including the encoded video data according to a communication standard such as a wireless communication protocol, and the input interface 122 may modulate the received transmission signal according to a communication standard such as a wireless communication protocol. The communication medium may include any wireless or wired communication medium, e.g., the radio-frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include routers, switches, base stations, or any other device that may be useful for facilitating communication from the source device 102 to the destination device 116.
[0031] In some examples, the source device 102 may output the encoded data from the output interface 108 to the storage device 112. Similarly, the destination device 116 may access the encoded data from the storage device 112 via the input interface 122. The storage device 112 may include any of a variety of distributed or locally accessible data storage media, such as a hard disk drive, a Blu-ray disc, a DVD, a CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing the encoded video data.
[0032] In some examples, the source device 102 may output the encoded video data to a file server 114 or to another intermediate storage device that may store the encoded video generated by the source device 102. The destination device 116 may access the stored video data from the file server 114 via streaming or downloading. The file server 114 may be any type of server device capable of storing the encoded video data and sending the encoded video data to the destination device 116. The file server 114 may represent a web server (e.g., for a website), a File Transfer Protocol (FTP) server, a content delivery network device, or a Network Attached Storage (NAS) device. The destination device 116 may access the encoded video data from the file server 114 via any standard data connection, including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., DSL, cable modem, etc.), or a combination of both, suitable for accessing the encoded video data stored on the file server 114. The file server 114 and the input interface 122 may be configured to operate according to: a streaming protocol, a download transfer protocol, or a combination thereof.
[0033] The output interface 108 and the input interface 122 may represent a wireless transmitter / receiver, a modem, a wired networking component (e.g., an Ethernet card), a wireless communication component operating according to any one of the various IEEE 802.11 standards, or other physical components. In examples where the output interface 108 and the input interface 122 include wireless components, the output interface 108 and the input interface 122 may be configured to transmit data (such as encoded video data) according to a cellular communication standard, such as 4G, 4G-LTE (Long Term Evolution), enhanced LTE, 5G, etc. In some examples where the output interface 108 includes a wireless transmitter, the output interface 108 and the input interface 122 may be configured to transmit data (such as encoded video data) according to other wireless standards, such as the IEEE 802.11 specifications, the IEEE 802.15 specifications (e.g., ZigBee TM )、Bluetooth TM standards, etc.). In some examples, the source device 102 and / or the destination device 116 may include respective System-on-Chip (SoC) devices. For example, the source device 102 may include an SoC device for performing the functions ascribed to the video encoder 200 and / or the output interface 108, and the destination device 116 may include an SoC device for performing the functions ascribed to the video decoder 300 and / or the input interface 122.
[0034] The techniques of the present disclosure may be applied to video coding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission (such as HTTP-based Dynamic Adaptive Streaming over HTTP (DASH)), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0035] The input interface 122 of the destination device 116 receives an encoded video bitstream from a computer-readable medium 110 (e.g., storage device 112, file server 114, etc.). The computer-readable medium 110 of the encoded video bitstream may include signaling information such as the following syntax elements (which are also used by the video decoder 300) defined by the video encoder 200: The syntax elements have values that describe the characteristics and / or processing of video blocks or other coding units (e.g., slices, pictures, groups of pictures, sequences, etc.). The display device 118 displays the decoded pictures of the decoded video data to a user. The display device 118 may represent any of a variety of display devices, such as a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or another type of display device.
[0036] Although not shown in Figure 1 In some examples, the video encoder 200 and the video decoder 300 may each be integrated with an audio encoder and / or an audio decoder and may include appropriate MUX-DEMUX units or other hardware and / or software to process a multiplexed stream that includes both audio and video in a common data stream. If applicable, the MUX-DEMUX unit may follow the ITU H.223 multiplexer protocol or other protocols (such as the User Datagram Protocol (UDP)).
[0037] Video encoder 200 and video decoder 300 may each be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When the technology is implemented partially in software, the device may store instructions for the software in a suitable non-transitory computer-readable medium and use one or more processors to execute the instructions in hardware to perform the techniques of the present disclosure. Each of video encoder 200 and video decoder 300 may be included in one or more encoders or decoders, and any of the encoders or decoders may be integrated as part of a combined encoder / decoder (CODEC) in a corresponding device. Devices including video encoder 200 and / or video decoder 300 may include integrated circuits, microprocessors, and / or wireless communication devices (such as cellular phones).
[0038] Video encoder 200 and video decoder 300 may operate according to a video coding standard, such as ITU-T H.265 (also known as the High Efficiency Video Coding (HEVC) standard) or an extension thereof (such as multi-view and / or scalable video coding extensions). Alternatively, video encoder 200 and video decoder 300 may operate according to other proprietary or industry standards, such as the Joint Exploration Test Model (JEM) or the ITU-T H.266 standard, also known as Versatile Video Coding (VVC). The most recent draft of the VVC standard is described in the following document: Bross et al., "Versatile Video Coding (Draft 3)", Joint Video Team (JVT) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 12th meeting: Macau, China, October 3-12, 2018, JVET-L1001-v9 (hereinafter referred to as "VVC Draft 3"). However, the techniques of the present disclosure are not limited to any particular coding standard.
[0039] Generally, video encoder 200 and video decoder 300 may perform block-based coding of pictures. The term "block" generally refers to a structure that includes data to be processed (e.g., data to be encoded, decoded, or otherwise used during an encoding and / or decoding process). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Generally, video encoder 200 and video decoder 300 may code video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, rather than coding the red, green, and blue (RGB) data of the samples for a picture, video encoder 200 and video decoder 300 may code the luminance and chrominance components, where the chrominance components may include both a red hue and a blue hue chrominance component. In some examples, video encoder 200 converts the received RGB-formatted data to a YUV representation before encoding, and video decoder 300 converts the YUV representation to an RGB format. Alternatively, preprocessing and postprocessing units (not shown) may perform these conversions.
[0040] Generally speaking, the present disclosure may relate to coding (e.g., encoding and decoding) of pictures to include a process of encoding or decoding data of a picture. Similarly, the present disclosure may relate to coding of blocks of a picture to include a process of encoding or decoding data for a block (e.g., prediction and / or residual coding). An encoded video bitstream generally includes a series of values for representing coding decisions (e.g., coding modes) and syntax elements that partition a picture into blocks. Thus, a reference to coding a picture or a block should generally be understood as coding the values of the syntax elements that form the picture or the block.
[0041] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video coder (such as video encoder 200) divides a coding tree unit (CTU) into CUs according to a quadtree structure. That is, the video coder divides the CTU and CUs into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. A node without child nodes may be referred to as a "leaf node", and a CU of such a leaf node may include one or more PUs and / or one or more TUs. The video coder may further divide PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents the partitioning of TUs. In HEVC, a PU represents inter-prediction data, while a TU represents residual data. An intra-predicted CU includes intra-prediction information, such as an intra-mode indication.
[0042] As another example, video encoder 200 and video decoder 300 may be configured to operate according to JEM or VVC. According to JEM or VVC, a video coder (such as video encoder 200) divides a picture into multiple coding tree units (CTUs). Video encoder 200 may divide a CTU according to a tree structure (such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure). The QTBT structure removes the concept of multiple partitioning types, such as the separation between CUs, PUs, and TUs in HEVC. The QTBT structure includes two levels: a first level divided according to quadtree partitioning and a second level divided according to binary tree partitioning. The root node of the QTBT structure corresponds to the CTU. The leaf nodes of the binary tree correspond to coding units (CUs).
[0043] In the MTT partitioning structure, quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of ternary tree (TT) partitioning may be used to partition blocks. Ternary tree partitioning is a partitioning in which a block is divided into three sub-blocks. In some examples, ternary tree partitioning divides a block into three sub-blocks without dividing the original block through the center. The partitioning types in MTT (e.g., QT, BT, and TT) may be symmetric or asymmetric.
[0044] In some examples, video encoder 200 and video decoder 300 may use a single QTBT or MTT structure to represent each of the luminance and chrominance components, while in other examples, video encoder 200 and video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luminance component and another QTBT / MTT structure for the two chrominance components (or two QTBT / MTT structures for the respective chrominance components).
[0045] Video encoder 200 and video decoder 300 may be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, or other partitioning structures per HEVC. For purposes of explanation, a description of the techniques of the present disclosure is given with respect to QTBT partitioning. However, it should be understood that the techniques of the present disclosure may also be applied to video coders configured to use quadtree partitioning or also other types of partitioning.
[0046] The present disclosure may interchangeably use "NxN" and "N by N" to refer to the sample size of a block (such as a CU or other video block) in terms of vertical and horizontal dimensions. For example, 16x16 samples or 16 by 16 samples. Generally, a 16x16 CU will have 16 samples in the vertical direction (y = 16) and 16 samples in the horizontal direction (x = 16). Similarly, an NxN CU generally has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non - negative integer value. The samples in a CU can be arranged in rows and columns. Additionally, a CU does not necessarily need to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU can include NxM samples, where M does not necessarily equal N.
[0047] Video encoder 200 encodes video data for a CU's representation prediction and / or residual information and other information. The prediction information indicates how the CU is to be predicted to form a prediction block for the CU. The residual information generally represents the sample - by - sample difference between the samples of the CU before encoding and the prediction block.
[0048] To predict a CU, video encoder 200 can generally form a prediction block for the CU through either inter - frame prediction or intra - frame prediction. Inter - frame prediction generally refers to predicting a CU based on the data of previously decoded pictures, while intra - frame prediction generally refers to predicting a CU based on the previously decoded data of the same picture. To perform inter - frame prediction, video encoder 200 can use one or more motion vectors to generate a prediction block. Video encoder 200 can generally perform a motion search to identify a reference block that closely matches the CU, for example, in terms of the difference between the CU and the reference block. Video encoder 200 can use the sum of absolute differences (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared difference (MSD), or other such difference calculations to compute a difference metric to determine whether the reference block closely matches the current CU. In some examples, video encoder 200 can use uni - directional prediction or bi - directional prediction to predict the current CU.
[0049] Some examples of JEM and VVC also provide an affine motion compensation mode, which can be considered an inter - frame prediction mode. In the affine motion compensation mode, video encoder 200 can determine two or more motion vectors representing non - translational motion (such as zooming in or out, rotation, perspective motion, or other irregular motion types).
[0050] To perform intra prediction, video encoder 200 may select an intra prediction mode to generate a prediction block. Some examples of JEM and VVC provide sixty-seven intra prediction modes, including various directional modes, as well as planar mode and DC mode. Generally, video encoder 200 selects an intra prediction mode that describes the neighboring samples of the current block (e.g., a block of a CU) from which samples of the current block are to be predicted. Assuming that video encoder 200 decodes CTUs and CUs in raster scan order (from left to right, top to bottom), such samples can typically be above, top-left, or left of the current block in the same picture as the current block.
[0051] Video encoder 200 encodes data representing the prediction mode for the current block. For example, for an inter prediction mode, video encoder 200 may encode data representing which one of the various available inter prediction modes is used and the motion information for the corresponding mode. For uni-directional or bi-directional inter prediction, for example, video encoder 200 may use advanced motion vector prediction (AMVP) or merge mode to encode the motion vectors. Video encoder 200 may use a similar mode to encode the motion vectors for the affine motion compensation mode.
[0052] After prediction such as intra prediction or inter prediction of a block, video encoder 200 may compute residual data for the block. The residual data (such as a residual block) represents the sample-by-sample difference between the block and the prediction block for the block, which is formed using the corresponding prediction mode. Video encoder 200 may apply one or more transforms to the residual block to produce transformed data in the transform domain rather than in the sample domain. For example, video encoder 200 may apply a discrete cosine transform (DCT), integer transform, wavelet transform, or conceptually similar transform to the residual video data. Additionally, video encoder 200 may apply a second transform after the first transform, such as a mode-dependent non-separable second transform (MDNSST), signal-dependent transform, Karhunen-Loeve transform (KLT), etc. Video encoder 200 produces transform coefficients after applying one or more transforms.
[0053] As described above, after any transformation to produce transform coefficients, video encoder 200 may perform quantization of the transform coefficients. Quantization generally refers to the process in which the transform coefficients are quantized to potentially reduce the amount of data used to represent the coefficients, thereby providing further compression. By performing the quantization process, video encoder 200 may reduce the bit depth associated with some or all of the coefficients. For example, video encoder 200 may round an n-bit value down to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, video encoder 200 may perform a bitwise right shift on the value to be quantized.
[0054] After quantization, video encoder 200 may scan the transform coefficients to produce a one-dimensional vector from the two-dimensional matrix including the quantized transform coefficients. The scan may be designed to place higher energy (and thus lower frequency) coefficients at the front of the vector and lower energy (and thus higher frequency) transform coefficients at the back of the vector. In some examples, video encoder 200 may use a predefined scan order to scan the quantized transform coefficients to produce a serialized vector, and then entropy code the quantized transform coefficients of the vector. In other examples, video encoder 200 may perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, video encoder 200 may entropy code the one-dimensional vector, for example, according to context-adaptive binary arithmetic coding (CABAC). Video encoder 200 may also entropy code the values of syntax elements used to describe metadata associated with the encoded video data for use by video decoder 300 when decoding the video data.
[0055] To perform CABAC, video encoder 200 may assign a context within a context model to the symbol to be sent. The context may relate to, for example, whether the neighboring values of the symbol are zero values. Probability determination may be based on the context assigned to the symbol.
[0056] Video encoder 200 may also generate syntax data (such as block-based syntax data, picture-based syntax data, and sequence-based syntax data) or other syntax data (such as sequence parameter set (SPS), picture parameter set (PPS), or video parameter set (VPS)) for video decoder 300, for example, in a picture header, a block header, a slice header. Similarly, video decoder 300 may decode such syntax data to determine how to decode the corresponding video data.
[0057] In this manner, video encoder 200 may generate a bitstream that includes encoded video data, e.g., syntax elements that describe partitioning of a picture into blocks (e.g., CUs) and prediction and / or residual information for the blocks. Ultimately, video decoder 300 may receive the bitstream and decode the encoded video data.
[0058] Typically, video decoder 300 performs a process opposite to that performed by video encoder 200 to decode the encoded video data of the bitstream. For example, video decoder 300 may use CABAC to decode values of syntax elements for the bitstream in a manner that is substantially similar to, but opposite of, the CABAC encoding process of video encoder 200. The syntax elements may define partitioning information for partitioning a picture into CTUs and for further partitioning each CTU according to a corresponding partitioning structure (such as a QTBT structure) to define CUs of the CTU. The syntax elements may also define prediction and residual information for blocks (e.g., CUs) of the video data.
[0059] The residual information may be represented by, e.g., quantized transform coefficients. Video decoder 300 may inverse-quantize and inverse-transform the quantized transform coefficients of a block to reproduce a residual block for the block. Video decoder 300 uses a signalized prediction mode (intra prediction or inter prediction) and associated prediction information (e.g., motion information for inter prediction) to form a prediction block for the block. Video decoder 300 may then combine the prediction block and the residual block (on a sample-by-sample basis) to reproduce the original block. Video decoder 300 may perform additional processing, such as performing a deblocking process to reduce visual artifacts along block boundaries.
[0060] According to the techniques of the present disclosure, video encoder 200 and video decoder 300 may be configured to decode blocks of video data using one or more of a primary transform and a secondary transform according to the techniques of the present disclosure described below.
[0061] Generally, the present disclosure may relate to “signaling” certain information, such as syntax elements. The term “signaling” may generally refer to the conveyance of values of syntax elements and / or other data used to decode encoded video data. That is, video encoder 200 may signal values for syntax elements in the bitstream. Generally, signaling refers to generating values in the bitstream. As described above, source device 102 may transmit the bitstream to destination device 116 substantially in real time or not in real time (such as may occur when storing syntax elements to storage device 112 for later retrieval by destination device 116).
[0062] Figure 2A and 2BIt is a conceptual diagram showing an example quadtree binary tree (QTBT) structure 124 and a corresponding coding tree unit (CTU) 126. Solid lines represent quadtree splitting, while dashed lines indicate binary tree splitting. In each splitting (i.e., non-leaf) node of the binary tree, a flag is signaled to indicate which splitting type (i.e., horizontal or vertical) is used, where, in this example, 0 indicates a horizontal splitting and 1 indicates a vertical splitting. For quadtree splitting, since a quadtree node splits a block horizontally and vertically into 4 sub-blocks of equal size, there is no need to indicate the splitting type. Thus, the video encoder 200 can encode the following, and the video decoder 300 can decode the following: syntax elements (such as splitting information) for the region tree level (i.e., solid lines) of the QTBT structure 124, and syntax elements (such as splitting information) for the prediction tree level (i.e., dashed lines) of the QTBT structure 124. The video encoder 200 can encode video data (such as prediction and transform data) for a CU represented by a terminal leaf node of the QTBT structure 124, and the video decoder 300 can decode the video data.
[0063] Generally, Figure 2B The CTU 126 can be associated with parameters that define the size of blocks corresponding to nodes at the first and second levels of the QTBT structure 124. These parameters can include the CTU size (representing the size of the CTU 126 in samples), the minimum quadtree size (MinQTSize, which represents the minimum allowable quadtree leaf node size), the maximum binary tree size (MaxBTSize, which represents the maximum allowable binary tree root node size), the maximum binary tree depth (MaxBTDepth, which represents the maximum allowable binary tree depth), and the minimum binary tree size (MinBTSize, which represents the minimum allowable binary tree leaf node size).
[0064] The root node corresponding to the CTU in the QTBT structure can have four child nodes at the first level of the QTBT structure, and each child node can be divided according to the quadtree division. That is, the nodes at the first level are leaf nodes (without child nodes) or have four child nodes. An example of the QTBT structure 124 represents such a node as including a parent node and child nodes with solid branches. If the nodes at the first level are not larger than the maximum allowable binary tree root node size (MaxBTSize), these nodes can be further divided by the corresponding binary tree. The binary tree splitting of a node can be iterated until the nodes generated from the splitting reach the minimum allowable binary tree leaf node size (MinBTSize) or the maximum allowable binary tree depth (MaxBTDepth). An example of the QTBT structure 124 represents such a node as having dashed branches. The binary tree leaf nodes are called coding units (CUs), which are used for prediction (e.g., intra-picture or inter-picture prediction) and transformation without any further division. As discussed above, the CU can also be referred to as a "video block" or a "block".
[0065] In an example of the QTBT segmentation structure, the CTU size is set to 128x128 (luminance samples and two corresponding 64x64 chrominance samples), MinQTSize is set to 16x16, MaxBTSize is set to 64x64, MinBTSize (for both width and height) is set to 4, and MaxBTDepth is set to 4. First, quadtree division is applied to the CTU to generate quadtree leaf nodes. The quadtree leaf nodes can have sizes ranging from 16x16 (i.e., MinQTSize) to 128x128 (i.e., CTU size). If the leaf quadtree node is 128x128, since this size exceeds MaxBTSize (i.e., 64x64 in this example), the leaf quadtree node will not be further split by the binary tree. Otherwise, the leaf quadtree node will be further divided by the binary tree. Therefore, the quadtree leaf nodes are also the root nodes for the binary tree and have a binary tree depth of 0. When the binary tree depth reaches MaxBTDepth (4 in this example), further splitting is not allowed. When a binary tree node has a width equal to MinBTSize (4 in this example), it means that no further horizontal splitting is allowed. Similarly, a binary tree node with a height equal to MinBTSize means that no further vertical splitting is allowed for this binary tree node. As described above, the leaf nodes of the binary tree are called CUs and are further processed according to prediction and transformation without further division.
[0066] Figure 3 is a block diagram showing an example video encoder 200 that can execute the techniques of the present disclosure. Figure 3is provided for illustrative purposes and should not be considered to limit the techniques generally exemplified and described in this disclosure. For illustrative purposes, this disclosure describes video encoder 200 in the context of video coding standards such as the HEVC video coding standard and the H.266 video coding standard under development. However, the techniques of this disclosure are not limited to these video coding standards and generally apply to video encoding and decoding.
[0067] In Figure 3 the example of, video encoder 200 includes video data memory 230, mode selection unit 202, residual generation unit 204, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, decoded picture buffer (DPB) 218, and entropy coding unit 220. Any one or all of video data memory 230, mode selection unit 202, residual generation unit 204, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, DPB 218, and entropy coding unit 220 may be implemented in one or more processors or in processing circuitry. Additionally, video encoder 200 may include additional or alternative processors or processing circuitry to perform these and other functions.
[0068] Video data memory 230 may store video data to be encoded by components of video encoder 200. Video encoder 200 may receive the video data stored in video data memory 230 from, for example, video source 104 ( Figure 1 ). DPB 218 may act as a reference picture memory that stores reference video data for use in predicting subsequent video data by video encoder 200. Video data memory 230 and DPB 218 may be formed from any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. Video data memory 230 and DPB 218 may be provided by the same memory device or separate memory devices. In various examples, video data memory 230 may be on-chip (as shown) with other components of video encoder 200 or off-chip relative to those components.
[0069] In the present disclosure, a reference to the video data memory 230 should not be construed as limited to a memory internal to the video encoder 200 (unless so specifically described), or limited to a memory external to the video encoder 200 (unless so specifically described). Rather, a reference to the video data memory 230 should be understood as a reference memory that stores video data received by the video encoder 200 for encoding (e.g., video data for a current block to be encoded). Figure 1 The memory 106 may also provide temporary storage for the outputs from the various units of the video encoder 200.
[0070] is shown Figure 3 The various units of to assist in understanding the operations performed by the video encoder 200. These units may be implemented as fixed-function circuitry, programmable circuitry, or a combination thereof. Fixed-function circuitry refers to circuitry that provides a specific function and is pre-set with respect to the operations that can be performed. Programmable circuitry refers to circuitry that can be programmed to perform various tasks and provides flexible functionality with respect to the operations that can be performed. For example, programmable circuitry may execute software or firmware that causes the programmable circuitry to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuitry may execute software instructions (e.g., to receive parameters or output parameters), but the type of operations performed by fixed-function circuitry is generally immutable. In some examples, one or more of these units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more of the units may be an integrated circuit.
[0071] The video encoder 200 may include an arithmetic logic unit (ALU), a basic function unit (EFU), digital circuitry, analog circuitry, and / or a programmable core formed from programmable circuitry. In examples where software executed by programmable circuitry is used to perform the operations of the video encoder 200, the memory 106( Figure 1 ) may store the object code of the software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 may store such instructions.
[0072] The video data memory 230 is configured to store the received video data. The video encoder 200 may retrieve pictures of the video data from the video data memory 230 and provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data memory 230 may be the original video data to be encoded.
[0073] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra prediction unit 226. The mode selection unit 202 may include additional functional units that perform video prediction according to other prediction modes. As an example, the mode selection unit 202 may include a palette unit, a block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.
[0074] The mode selection unit 202 generally coordinates multiple encoding passes to test combinations of encoding parameters and the rate-distortion values obtained for such combinations. The encoding parameters may include splitting the CTU into CUs, the prediction mode for the CU, the transform type for the residual data of the CU, the quantization parameter for the residual data of the CU, etc. The mode selection unit 202 may ultimately select the combination of encoding parameters that has a better rate-distortion value than other tested combinations.
[0075] The video encoder 200 may split the pictures retrieved from the video data memory 230 into a series of CTUs and encapsulate one or more CTUs within slices. The mode selection unit 202 may split the CTUs of the picture according to a tree structure such as the QTBT structure or the quadtree structure of HEVC described above. As described above, the video encoder 200 may form one or more CUs by splitting the CTUs according to a tree structure. Such CUs may also generally be referred to as "video blocks" or "blocks".
[0076] Generally, the mode selection unit 202 also controls its components (e.g., the motion estimation unit 222, the motion compensation unit 224, and the intra prediction unit 226) to generate a prediction block for the current block (e.g., the current CU, or the overlapping portion of the PU and TU in HEVC). For inter prediction of the current block, the motion estimation unit 222 may perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously decoded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 may calculate a value representing how closely a potential reference block will resemble the current block, for example, according to the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), etc. The motion estimation unit 222 may generally use the per-sample differences between the current block and the considered reference block to perform these calculations. The motion estimation unit 222 may identify the reference block with the lowest value obtained from these calculations, which indicates the reference block that most closely matches the current block.
[0077] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of a reference block in a reference picture relative to the position of a current block in a current picture. Then, the motion estimation unit 222 may provide the motion vectors to the motion compensation unit 224. For example, for uni-directional inter prediction, the motion estimation unit 222 may provide a single motion vector, and for bi-directional inter prediction, the motion estimation unit 222 may provide two motion vectors. Then, the motion compensation unit 224 may use the motion vectors to generate a prediction block. For example, the motion compensation unit 224 may use the motion vectors to retrieve data of the reference block. As another example, if the motion vectors have fractional sample precision, the motion compensation unit 224 may interpolate values for the prediction block according to one or more interpolation filters. Further, for bi-directional inter prediction, the motion compensation unit 224 may retrieve data of two reference blocks identified by the respective motion vectors and combine the retrieved data, for example, by per-sample averaging or weighted averaging.
[0078] As another example, for intra prediction or intra prediction coding, the intra prediction unit 226 may generate a prediction block according to samples adjacent to the current block. For example, for a directional mode, the intra prediction unit 226 may generally mathematically combine values of adjacent samples and fill the calculated values in a defined direction across the current block to produce a prediction block. As another example, for a DC mode, the intra prediction unit 226 may calculate an average of adjacent samples of the current block and generate a prediction block to include the obtained average for each sample of the prediction block.
[0079] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives an original, unencoded version of the current block from the video data memory 230 and receives the prediction block from the mode selection unit 202. The residual generation unit 204 calculates the per-sample difference between the current block and the prediction block. The obtained per-sample difference defines a residual block for the current block. In some examples, the residual generation unit 204 may also determine differences between sample values in the residual block to generate the residual block using residual differential pulse coding modulation (RDPCM). In some examples, one or more subtractor circuits performing binary subtraction may be used to form the residual generation unit 204.
[0080] In an example where the mode selection unit 202 divides a CU into PUs, each PU may be associated with a luminance prediction unit and a corresponding chrominance prediction unit. The video encoder 200 and the video decoder 300 may support PUs of various sizes. As pointed out above, the size of a CU may refer to the size of the luminance decoding block of the CU, and the size of a PU may refer to the size of the luminance prediction unit of the PU. Assuming that the size of a specific CU is 2Nx2N, the video encoder 200 may support PU sizes of 2Nx2N or NxN for intra prediction, and 2Nx2N, 2NxN, Nx2N, NxN, 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 2NxnU, 2NxnD, nLx2N, and nRx2N for inter prediction.
[0081] In an example where the mode selection unit 202 does not further divide a CU into PUs, each CU may be associated with a luminance decoding block and a corresponding chrominance decoding block. As described above, the size of a CU may refer to the size of the luminance decoding block of the CU. The video encoder 200 and the video decoder 300 may support CU sizes of 2Nx2N, 2NxN, or Nx2N.
[0082] For other video decoding techniques (to name a few examples such as in-block copy mode decoding, affine mode decoding, and linear model (LM) mode decoding), the mode selection unit 202 generates a prediction block for the current block being encoded via a corresponding unit associated with the decoding technique. In some examples (such as palette mode decoding), the mode selection unit 202 may not generate a prediction block, but instead generate a syntax element indicating the way to reconstruct the block based on the selected palette. In such a mode, the mode selection unit 202 may provide these syntax elements to the entropy coding unit 220 for encoding.
[0083] As described above, the residual generation unit 204 receives video data for the current block and the corresponding prediction block. Then, the residual generation unit 204 generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates the sample-by-sample difference between the prediction block and the current block.
[0084] The transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). The transform processing unit 206 may apply various transforms to the residual block to form a transform coefficient block. For example, the transform processing unit 206 may apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform to the residual block. In some examples, the transform processing unit 206 may apply multiple transforms to the residual block, such as a primary transform and a secondary transform (such as a rotation transform). In some examples, the transform processing unit 206 may apply the primary transform and the secondary transform according to examples of the present disclosure. For example, the video encoder 200 may determine whether intra-subdivision is applied to the current block of video data. The video encoder 200 may also determine whether the primary transform size of the current block of video data is at least a predetermined size, such as 4x4, 8x8, 16x16, or any other predetermined size. The transform processing unit 206 of the video encoder 200 may apply a secondary transform to the primary transform coefficients based on applying intra-subdivision and the primary transform size being at least the predetermined size. The video encoder 200 may encode the current block of video data based on at least one of the primary transform coefficients and the secondary transform. In some examples, the transform processing unit 206 does not apply a transform to the residual block.
[0085] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to produce a quantized transform coefficient block. The quantization unit 208 may quantize the transform coefficients of the transform coefficient block according to a quantization parameter (QP) value associated with the current block. The video encoder 200 (e.g., via the mode selection unit 202) may adjust the degree of quantization applied to the transform coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may cause information loss, and thus, the quantized transform coefficients may have lower precision compared to the original transform coefficients generated by the transform processing unit 206.
[0086] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform to the quantized transform coefficient block, respectively, to reconstruct the residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (although potentially with some degree of distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 may add the samples of the reconstructed residual block to the corresponding samples from the prediction block generated by the mode selection unit 202 to produce the reconstructed block.
[0087] Filter unit 216 may perform one or more filtering operations on the reconstructed block. For example, filter unit 216 may perform a deblocking operation to reduce block effect artifacts along the edges of the CU. In some examples, the operation of filter unit 216 may be skipped.
[0088] Video encoder 200 stores the reconstructed block in DPB 218. For example, in an example where the operation of filter unit 216 is not performed, reconstruction unit 214 may store the reconstructed block into DPB 218. In an example where the operation of filter unit 216 is performed, filter unit 216 may store the filtered reconstructed block into DPB 218. Motion estimation unit 222 and motion compensation unit 224 may retrieve a reference picture formed by the reconstructed (and potentially filtered) blocks from DPB 218 to perform inter prediction on blocks of a subsequently encoded picture. Additionally, intra prediction unit 226 may use the reconstructed blocks of the current picture in DPB 218 to perform intra prediction on other blocks in the current picture.
[0089] Generally, entropy coding unit 220 may perform entropy coding on syntax elements received from other functional components of video encoder 200. For example, entropy coding unit 220 may perform entropy coding on the quantized transform coefficient blocks from quantization unit 208. As another example, entropy coding unit 220 may perform entropy coding on prediction syntax elements (e.g., motion information for inter prediction or intra mode information for intra prediction) from mode selection unit 202. Entropy coding unit 220 may perform one or more entropy coding operations on syntax elements as another example of video data to generate entropy-coded data. For example, entropy coding unit 220 may perform context adaptive variable length coding (CAVLC) operations, CABAC operations, variable-variable (V2V) length coding operations, syntax-based context adaptive binary arithmetic coding (SBAC) operations, probability interval partitioning entropy (PIPE) coding operations, exponential Golomb coding operations, or another type of entropy coding operation on the data. In some examples, entropy coding unit 220 may operate in a bypass mode where the syntax elements are not entropy coded.
[0090] Video encoder 200 may output a bitstream that includes the entropy-coded syntax elements needed to reconstruct the blocks of a slice or picture. For example, entropy coding unit 220 may output the bitstream.
[0091] The above operations are described with respect to blocks. Such a description should be understood as operations for luminance decoding blocks and / or chrominance decoding blocks. As described above, in some examples, the luminance decoding block and the chrominance decoding block are the luminance component and the chrominance component of a CU. In some examples, the luminance decoding block and the chrominance decoding block are the luminance component and the chrominance component of a PU.
[0092] In some examples, it is not necessary to repeat the operations performed on the luma coding blocks for the chroma coding blocks. As an example, it is not necessary to repeat the operations for identifying the motion vectors (MVs) and reference pictures for the luma coding blocks to identify the MVs and reference pictures for the chroma blocks. Rather, the MVs for the luma coding blocks can be scaled to determine the MVs for the chroma blocks, and the reference pictures can be the same. As another example, for the luma coding blocks and the chroma coding blocks, the intra prediction process can be the same.
[0093] Video encoder 200 represents an example of a device configured to encode video data, the device including: a memory configured to store video data; and one or more processing units implemented in circuitry and communicatively coupled to the memory and configured to: determine whether intra sub - partitioning is applied to a current block of the video data; apply a primary transform to the current block of the video data to generate primary transform coefficients; determine whether the size of the primary transform is at least a predetermined size based on the application of intra sub - partitioning; apply a secondary transform to the primary transform coefficients based on the application of intra sub - partitioning and the size of the primary transform being at least the predetermined size; and decode the current block of the video data based on the secondary transform.
[0094] Figure 4 is a block diagram illustrating an example video decoder 300 that can perform the techniques of the present disclosure. Figure 4 is provided for explanatory purposes and does not limit the techniques generally exemplified and described in the present disclosure. For explanatory purposes, the present disclosure describes video decoder 300 in terms of the techniques of JEM, VVC, and HEVC. However, the techniques of the present disclosure can be performed by video coding devices configured for other video coding standards.
[0095] In Figure 4 an example, video decoder 300 includes a coded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. Any one or all of CPB memory 320, entropy decoding unit 302, prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, filter unit 312, and DPB 314 can be implemented in one or more processors or in processing circuitry. Additionally, video decoder 300 can include additional or alternative processors or processing circuitry to perform these and other functions.
[0096] The prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. The prediction processing unit 304 may include an addition unit that performs prediction according to other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, a block copy unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.
[0097] The CPB memory 320 may store video data to be decoded by components of the video decoder 300, such as an encoded video bitstream. For example, the video data stored in the CPB memory 320 may be obtained from a computer-readable medium 110( Figure 1 ). The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from the encoded video bitstream. In addition, the CPB memory 320 may store video data other than the syntax elements of the decoded pictures, such as temporary data representing the outputs from the respective units of the video decoder 300. The DPB 314 generally stores decoded pictures, and the video decoder 300 may output decoded pictures and / or use the decoded pictures as reference video data when decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and the DPB 314 may be formed of any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The CPB memory 320 and the DPB 314 may be provided by the same memory device or separate memory devices. In various examples, the CPB memory 320 may be on-chip or off-chip relative to the other components of the video decoder 300.
[0098] Additionally or alternatively, in some examples, the video decoder 300 may retrieve decoded video data from the memory 120( Figure 1 ). That is, the memory 120 may utilize the CPB memory 320 to store data as discussed above. Similarly, when some or all of the functions of the video decoder 300 are implemented in software to be executed by the processing circuitry of the video decoder 300, the memory 120 may store instructions to be executed by the video decoder 300.
[0099] is shown Figure 4 the respective units shown in to assist in understanding the operations performed by the video decoder 300. These units may be implemented as fixed-function circuitry, programmable circuitry, or a combination thereof. Similar to Figure 3, A fixed - function circuit refers to a circuit that provides a specific function and is pre - set with respect to the operations that can be performed. A programmable circuit refers to a circuit that can be programmed to perform various tasks and provides flexible functionality with respect to the operations that can be performed. For example, a programmable circuit can execute software or firmware, and the software or firmware causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. A fixed - function circuit can execute software instructions (e.g., to receive parameters or output parameters), but the type of operations performed by the fixed - function circuit is generally immutable. In some examples, one or more of these units can be different circuit blocks (fixed - function or programmable), and in some examples, one or more units can be integrated circuits.
[0100] The video decoder 300 can include an ALU, EFU, digital circuits, analog circuits, and / or programmable cores formed by programmable circuits. In an example where the operations of the video decoder 300 are performed by software executed on the programmable circuit, on - chip or off - chip memory can store the instructions (e.g., object code) of the software that the video decoder 300 receives and executes.
[0101] The entropy decoding unit 302 can receive the encoded video data from the CPB and perform entropy decoding on the video data to reproduce the syntax elements. The prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, and filter unit 312 can generate the decoded video data based on the syntax elements extracted from the bitstream.
[0102] Generally, the video decoder 300 reconstructs pictures block - by - block. The video decoder 300 can perform the reconstruction operation on each block individually (where the block that is currently being reconstructed (i.e., decoded) can be referred to as the “current block”).
[0103] The entropy decoding unit 302 can perform entropy decoding on the syntax elements that define the quantized transform coefficient block of the quantized transform coefficients and transform information such as quantization parameter (QP) and / or transform mode indication. The inverse quantization unit 306 can use the QP associated with the quantized transform coefficient block to determine the quantization level, and similarly, determine the inverse quantization level to be applied by the inverse quantization unit 306. The inverse quantization unit 306 can, for example, perform a bit - shift - left operation to inverse - quantize the quantized transform coefficients. The inverse quantization unit 306 can thus form a transform coefficient block including the transform coefficients.
[0104] 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 rotation transform, an inverse direction transform, or another inverse transform to the coefficient block. In some examples, the inverse transform processing unit 308 may apply a secondary inverse transform and a primary inverse transform according to the techniques of the present disclosure. For example, the video decoder 300 may determine whether intra sub-division is applied to the current block of video data. The video decoder 300 may also determine whether the primary transform size of the current block of video data is at least a predetermined size, e.g., 4x4, 8x8, 16x16, or any other predetermined size. The inverse transform processing unit 308 may apply the secondary inverse transform to the inverse quantized data based on applying intra sub-division and the primary transform size being at least the predetermined size. The video decoder 300 may decode the current block of video data based on at least one of the primary transform coefficients or the secondary transform.
[0105] In addition, the prediction processing unit 304 generates a prediction block according to the prediction information syntax element (the prediction information syntax element entropy decoded by the entropy decoding unit 302). For example, if the prediction information syntax element indicates that the current block is inter predicted, the motion compensation unit 316 may generate a prediction block. In this case, the prediction information syntax element may indicate a reference picture in the DPB 314 from which to retrieve the reference block, and a motion vector that identifies the position of the reference block in the reference picture relative to the position of the current block in the current picture. The motion compensation unit 316 may generally perform the inter prediction process in a manner substantially similar to the manner described with respect to the motion compensation unit 224 ( Figure 3 ).
[0106] 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 the manner described with respect to the intra prediction unit 226 ( Figure 3 ). The intra prediction unit 318 may retrieve data of adjacent samples of the current block from the DPB 314.
[0107] The reconstruction unit 310 may use the prediction block and the residual block to reconstruct the current block. For example, the reconstruction unit 310 may add the samples of the residual block to the corresponding samples of the prediction block to reconstruct the current block.
[0108] Filter unit 312 may perform one or more filtering operations on the reconstructed block. For example, filter unit 312 may perform a deblocking operation to reduce block effect artifacts along the edges of the reconstructed block. The operations of filter unit 312 are not necessarily performed in all examples.
[0109] Video decoder 300 may store the reconstructed block in DPB 314. As discussed above, DPB 314 may provide reference information (such as samples of the current picture for intra prediction and previously decoded pictures for subsequent motion compensation) to prediction processing unit 304. In addition, video decoder 300 may output the decoded picture from DPB 314 for subsequent presentation on a display device such as Figure 1 display device 118.
[0110] In this way, video decoder 300 represents an example of a video decoding device that includes: a memory configured to store video data; and one or more processing units implemented in circuitry and configured to: determine whether intra sub - partitioning is applied to a current block of video data; determine whether a size of an inverse main transform is at least a predetermined size based on applying intra sub - partitioning; apply secondary inverse transform coefficients based on applying intra sub - partitioning and the size of the main transform being at least the predetermined size; apply the inverse main transform; and decode the current block of video data based on the inverse main transform and the secondary inverse transform.
[0111] In the next section, the present disclosure provides an overview of the discrete sine transform and the discrete cosine transform (DCT and DST). In addition, a brief discussion of the transform schemes used in the HEVC standard is provided.
[0112] A particular transform defines a process for deriving an alternative representation of an input signal. Given an N - point vector x = [x 0 , x 1 , …, x N-1 T and a set of vectors {φ 0 , φ 1 , …, φ M-1}, x can be approximated or exactly represented using a linear combination of φ 0 , φ 1 , …, Φ M-1 , and its formula can be as follows:
[0113]
[0114] where can be an approximation or equivalent value of x, and vector f = [f i , f 2 ,.., f M-1 is the transform coefficient vector, and {φ 0 , φ 1 , …, Φ M-1} is the transform basis vector.
[0115] In video coding, the transform coefficients are basically uncorrelated and sparse. In other words, the energy of the input vector x is only compressed onto a few transform coefficients, and most of the remaining transform coefficients are usually close to zero.
[0116] Given specific input data, the best transform in terms of energy compaction is the KLT, which uses the eigenvectors of the covariance matrix of the input data as the transform basis vectors. Thus, the KLT is actually a data-dependent transform and there is no general mathematical formula. However, under certain assumptions, for example, the input data forms a first-order stationary Markov process, it has been shown that the corresponding KLT is actually a member of the family of sinusoidal unitary transforms, which is introduced in the following reference: Jain, A.K., Family of sinusoidal unitary transforms, IEEE Transactions on Pattern Analysis and Machine Intelligence, 1, 1356, (1979). The family of sinusoidal unitary transforms indicates a transform using transform basis vectors, and its formula is as follows:
[0117] Φ m (k) = A · e ikθ + B · e -ikθ ,
[0118] where e is the base of the natural logarithm, approximately equal to 2.71828, A, B, and θ are usually complex numbers and depend on the value of m, and k represents the frequency component.
[0119] Several well-known transforms (including the discrete Fourier, cosine, sine, and KLT) (for a first-order stationary Markov process) are members of this family of sinusoidal unitary transforms. According to the literature (e.g., S.A. Martucci, "Symmetric convolution and the discrete sine and cosine transforms," IEEE Transactions on Signal Processing, SP-42, pp. 1038 - 1051 (1994)), the complete set of the discrete cosine transform (DCT) and discrete sine transform (DST) families includes a total of 16 transforms based on different types (i.e., different values of A, B, and θ). The complete definitions of different types of DCT and DST are given below.
[0120] Assume the input N - point vector is represented as x = [x 0 , x 1 , …, x N-1 T , and it is transformed by multiplying a matrix to be represented as y = [y 0 , y 1 ,…,y N-1 T Another N-point transform coefficient vector, and the process can be further illustrated according to one of the following transform formulas, where the range of k is from 0 to N-1 (inclusive):
[0121] DCT Type-I (DCT-1):
[0122]
[0123] where
[0124]
[0125] DCT Type-II (DCT-2):
[0126]
[0127] where
[0128] DCT Type-III (DCT-3):
[0129]
[0130] where
[0131] DCT Type-IV (DCT-4):
[0132]
[0133] DCT Type-V (DCT-5):
[0134]
[0135] where
[0136] DCT Type-VI (DCT-6):
[0137]
[0138] where
[0139] DCT Type-VII (DCT-7):
[0140]
[0141] where
[0142] DCT Type-VIII (DCT-8):
[0143]
[0144] DST Type-I (DST-1):
[0145]
[0146] DST Type-II (DST-2):
[0147]
[0148] where
[0149] DST Type-III (DST-3):
[0150]
[0151] where
[0152] DST Type-IV (DST-4):
[0153]
[0154] DST Type-V (DST-5):
[0155]
[0156] DST Type-VI (DST-6):
[0157]
[0158] DST Type-VII (DST-7):
[0159]
[0160] DST Type-VIII (DST-8):
[0161]
[0162] where
[0163] The transform type is specified by the mathematical formula of the transform basis function. For example, 4-point DST-VII and 8-point DST-VII have the same transform type, regardless of the value of N.
[0164] All of the above transform types can be represented by the following general formula:
[0165]
[0166] where T is a transformation matrix specified by the definition of a particular transformation, such as DCT type I, DCT type VIII, DST type I, or DST type VIII, and the row vectors of T (e.g., [T i,0 , T i,1 , T i,2 , …, T i,N-1 ) are the i-th transformation basis vectors. The transformation applied to the N-point input vector is called an N-point transformation.
[0167] It should also be noted that the above transformation formula applied to the 1-D input data x can be represented in matrix multiplication form as follows:
[0168] y = T · x,
[0169] where T indicates the transformation matrix, x indicates the input data vector, and y indicates the output transformation coefficient vector.
[0170] Apply the transformation discussed above to the 1-D input data. The transformation can also be extended to 2-D input data sources. For example, define X as the input MxN data array. Example methods for applying the transformation to 2-D input data include using separable and non-separable 2-D transformations.
[0171] The separable 2-D transformation sequentially applies the 1-D transformation to the horizontal and vertical vectors of X, with the formula as follows:
[0172] Y = C · X · R T ,
[0173] where C and R represent the given MxM and NxN transformation matrices, respectively.
[0174] From the above formula, it can be seen that C applies the 1-D transformation to the column vectors of X, while R applies the 1-D transformation to the row vectors of X. In the later part of this disclosure, for simplicity, C and R are represented as the left (vertical) transformation and the right (horizontal) transformation. Together, they form a transformation pair. There are cases where C is equal to R and is an orthogonal matrix. In such cases, the separable 2-D transformation is determined by only one transformation matrix. For example, the video encoder 200 can apply the left (vertical) transformation and the right (horizontal) transformation to the video data, and in the case of C = R, the video encoder 200 can apply one transformation matrix. The video decoder 300 can apply the relevant inverse transformation to reconstruct the video data.
[0175] The non-separable 2-D transformation first reorganizes all the elements of X into a single vector, i.e., X’, for example, by performing the following mathematical mapping:
[0176] X′ (i·N+j) = X i,j
[0177] Then, apply a 1-D transform T' to X', as follows:
[0178] Y = T'·X,
[0179] where T' is an (M*N)x(M*N) transform matrix. For example, video encoder 200 can reorganize the elements of X into a single vector X' and apply the 1-D transform T' to X. In video decoding, separable 2-D transforms are often applied because they require far fewer arithmetic (e.g., addition, multiplication) operations compared to 1-D transforms. For example, video encoder 200 can apply separable 2-D transforms because they require fewer operations.
[0180] In some example video codecs (such as video codecs implementing H.264 / AVC), integer approximations of 4-point and 8-point discrete cosine transform (DCT) type II are applied to both intra and inter prediction residuals. For example, video encoder 200 can apply integer approximations of 4-point and 8-point discrete cosine transform (DCT) type II to both intra and inter prediction residuals.
[0181] To better adapt to the various statistics of residual samples, more flexible transform types other than DCT type II are utilized in some new-generation video codecs (e.g., HEVC and VVC). For example, in HEVC, an integer approximation of 4-point type VII discrete sine transform (DST) is utilized for intra prediction residuals. For residual vectors generated along the intra prediction direction, DST type VII is more efficient than DCT type II. For example, for row residual vectors generated by the horizontal intra prediction direction, DST type VII is more efficient than DCT type II. In HEVC, the integer approximation of 4-point DST type VII is applied only to 4x4 luminance intra prediction residual blocks. For example, video encoder 200 can apply the integer approximation of 4-point DST type VII only to 4x4 luminance intra prediction residual blocks. The 4-point DST-VII used in HEVC is shown below,
[0182] 4x4 DST-VII:
[0183] {29,55,74,84}
[0184] {74,74,0,-74}
[0185] {84,-29,-74,55}
[0186] {55,-84,74,-29}
[0187] In HEVC, for residual blocks that are not 4x4 luma intra prediction residual blocks, integer approximations of 4-point, 8-point, 16-point, and 32-point DCT type II are also applied. For example, video encoder 200 may apply integer approximations of 4-point, 8-point, 16-point, and 32-point DCT type II for residual blocks that are not 4x4 luma intra prediction residual blocks. The integer approximations of 4-point, 8-point, 16-point, and 32-point DCT type II are shown below:
[0188] 4-point DCT-II:
[0189] {64,64,64,64}
[0190] {83,36,-36,-83}
[0191] {64,-64,-64,64}
[0192] {36,-83,83,-36}
[0193] 8-point DCT-II:
[0194] {64,64,64,64,64,64,64,64}
[0195] {89,75,50,18,-18,-50,-75,-89}
[0196] {83,36,-36,-83,-83,-36,36,83}
[0197] {75,-18,-89,-50,50,89,18,-75}
[0198] {64,-64,-64,64,64,-64,-64,64}
[0199] {50,-89,18,75,-75,-18,89,-50}
[0200] {36,-83,83,-36,-36,83,-83,36}
[0201] {18,-50,75,-89,89,-75,50,-18}
[0202] 16-point DCT-II:
[0203] {64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64}
[0204] {90,87,80,70,57,43,25,9,-9,-25,-43,-57,-70,-80,-87,-90}
[0205] {89,75,50,18,-18,-50,-75,-89,-89,-75,-50,-18,18,50,75,89}
[0206] {87,57,9,-43,-80,-90,-70,-25,25,70,90,80,43,-9,-57,-87}
[0207] {83,36,-36,-83,-83,-36,36,83,83,36,-36,-83,-83,-36,36,83}
[0208] {80,9,-70,-87,-25,57,90,43,-43,-90,-57,25,87,70,-9,-80}
[0209] {75,-18,-89,-50,50,89,18,-75,-75,18,89,50,-50,-89,-18,75}
[0210] {70,-43,-87,9,90,25,-80,-57,57,80,-25,-90,-9,87,43,-70}
[0211] {64,-64,-64,64,64,-64,-64,64,64,-64,-64,64,64,-64,-64,64}
[0212] {57,-80,-25,90,-9,-87,43,70,-70,-43,87,9,-90,25,80,-57}
[0213] {50,-89,18,75,-75,-18,89,-50,-50,89,-18,-75,75,18,-89,50}
[0214] {43,-90,57,25,-87,70,9,-80,80,-9,-70,87,-25,-57,90,-43}
[0215] {36,-83,83,-36,-36,83,-83,36,36,-83,83,-36,-36,83,-83,36}
[0216] {25,-70,90,-80,43,9,-57,87,-87,57,-9,-43,80,-90,70,-25}
[0217] {18,-50,75,-89,89,-75,50,-18,-18,50,-75,89,-89,75,-50,18}
[0218] {9,-25,43,-57,70,-80,87,-90,90,-87,80,-70,57,-43,25,-9}
[0219] 32 - point DCT - II:
[0220] {64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64}
[0221] {90,90,88,85,82,78,73,67,61,54,46,38,31,22,13,4,-4,-13,-22,-31,-38,-46,-54,-61,-67,-73,-78,-82,-85,-88,-90,-90}
[0222] {90,87,80,70,57,43,25,9,-9,-25,-43,-57,-70,-80,-87,-90,-90,-87,-80,-70,-57,-43,-25,-9,9,25,43,57,70,80,87,90}
[0223] {90,82,67,46,22,-4,-31,-54,-73,-85,-90,-88,-78,-61,-38,-13,13,38,61,78,88,90,85,73,54,31,4,-22,-46,-67,-82,-90}
[0224] {89,75,50,18,-18,-50,-75,-89,-89,-75,-50,-18,18,50,75,89,89,75,50,18,-18,-50,-75,-89,-89,-75,-50,-18,18,50,75,89}
[0225] {88,67,31,-13,-54,-82,-90,-78,-46,-4,38,73,90,85,61,22,-22,-61,-85,-90,-73,-38,4,46,78,90,82,54,13,-31,-67,-88}
[0226] {87,57,9,-43,-80,-90,-70,-25,25,70,90,80,43,-9,-57,-87,-87,-57,-9,43,80,90,70,25,-25,-70,-90,-80,-43,9,57,87}
[0227] {85,46,-13,-67,-90,-73,-22,38,82,88,54,-4,-61,-90,-78,-31,31,78,90,61,4,-54,-88,-82,-38,22,73,90,67,13,-46,-85}
[0228] {83,36,-36,-83,-83,-36,36,83,83,36,-36,-83,-83,-36,36,83,83,36,-36,-83,-83,-36,36,83,83,36,-36,-83,-83,-36,36,83}
[0229] {82,22,-54,-90,-61,13,78,85,31,-46,-90,-67,4,73,88,38,-38,-88,-73,-4,67,90,46,-31,-85,-78,-13,61,90,54,-22,-82}
[0230] {80,9,-70,-87,-25,57,90,43,-43,-90,-57,25,87,70,-9,-80,-80,-9,70,87,25,-57,-90,-43,43,90,57,-25,-87,-70,9,80}
[0231] {78,-4,-82,-73,13,85,67,-22,-88,-61,31,90,54,-38,-90,-46,46,90,38,-54,-90,-31,61,88,22,-67,-85,-13,73,82,4,-78}
[0232] {75,-18,-89,-50,50,89,18,-75,-75,18,89,50,-50,-89,-18,75,75,-18,-89,-50,50,89,18,-75,-75,18,89,50,-50,-89,-18,75}
[0233] {73,-31,-90,-22,78,67,-38,-90,-13,82,61,-46,-88,-4,85,54,-54,-85,4,88,46,-61,-82,13,90,38,-67,-78,22,90,31,-73}
[0234] {70,-43,-87,9,90,25,-80,-57,57,80,-25,-90,-9,87,43,-70,-70,43,87,-9,-90,-25,80,57,-57,-80,25,90,9,-87,-43,70}
[0235] {67,-54,-78,38,85,-22,-90,4,90,13,-88,-31,82,46,-73,-61,61,73,-46,-82,31,88,-13,-90,-4,90,22,-85,-38,78,54,-67}
[0236] {64,-64,-64,64,64,-64,-64,64,64,-64,-64,64,64,-64,-64,64,64,-64,-64,64,64,-64,-64,64,64,-64,-64,64,64,-64,-64,64}
[0237] {61,-73,-46,82,31,-88,-13,90,-4,-90,22,85,-38,-78,54,67,-67,-54,78,38,-85,-22,90,4,-90,13,88,-31,-82,46,73,-61}
[0238] {57,-80,-25,90,-9,-87,43,70,-70,-43,87,9,-90,25,80,-57,-57,80,25,-90,9,87,-43,-70,70,43,-87,-9,90,-25,-80,57}
[0239] {54,-85,-4,88,-46,-61,82,13,-90,38,67,-78,-22,90,-31,-73,73,31,-90,22,78,-67,-38,90,-13,-82,61,46,-88,4,85,-54}
[0240] {50,-89,18,75,-75,-18,89,-50,-50,89,-18,-75,75,18,-89,50,50,-89,18,75,-75,-18,89,-50,-50,89,-18,-75,75,18,-89,50}
[0241] {46,-90,38,54,-90,31,61,-88,22,67,-85,13,73,-82,4,78,-78,-4,82,-73,-13,85,-67,-22,88,-61,-31,90,-54,-38,90,-46}
[0242] {43,-90,57,25,-87,70,9,-80,80,-9,-70,87,-25,-57,90,-43,-43,90,-57,-25,87,-70,-9,80,-80,9,70,-87,25,57,-90,43}
[0243] {38,-88,73,-4,-67,90,-46,-31,85,-78,13,61,-90,54,22,-82,82,-22,-54,90,-61,-13,78,-85,31,46,-90,67,4,-73,88,-38}
[0244] {36,-83,83,-36,-36,83,-83,36,36,-83,83,-36,-36,83,-83,36,36,-83,83,-36,-36,83,-83,36,36,-83,83,-36,-36,83,-83,36}
[0245] {31,-78,90,-61,4,54,-88,82,-38,-22,73,-90,67,-13,-46,85,-85,46,13,-67,90,-73,22,38,-82,88,-54,-4,61,-90,78,-31}
[0246] {25,-70,90,-80,43,9,-57,87,-87,57,-9,-43,80,-90,70,-25,-25,70,-90,80,-43,-9,57,-87,87,-57,9,43,-80,90,-70,25}
[0247] {22,-61,85,-90,73,-38,-4,46,-78,90,-82,54,-13,-31,67,-88,88,-67,31,13,-54,82,-90,78,-46,4,38,-73,90,-85,61,-22}
[0248] {18,-50,75,-89,89,-75,50,-18,-18,50,-75,89,-89,75,-50,18,18,-50,75,-89,89,-75,50,-18,-18,50,-75,89,-89,75,-50,18}
[0249] {13,-38,61,-78,88,-90,85,-73,54,-31,4,22,-46,67,-82,90,-90,82,-67,46,-22,-4,31,-54,73,-85,90,-88,78,-61,38,-13}
[0250] {9,-25,43,-57,70,-80,87,-90,90,-87,80,-70,57,-43,25,-9,-9,25,-43,57,-70,80,-87,90,-90,87,-80,70,-57,43,-25,9}
[0251] {4,-13,22,-31,38,-46,54,-61,67,-73,78,-82,85,-88,90,-90,90,-90,88,-85,82,-78,73,-67,61,-54,46,-38,31,-22,13,-4}
[0252] To adapt to the various characteristics of the residual block, a transform decoding structure using RQT is applied in HEVC. In RQT, the video encoder 200 can divide each picture into CTUs, where the CTUs are decoded in raster scan order for a specific tile or slice. A CTU is a square block and represents the root of a quadtree (i.e., a decoding tree). The CTU size can range from 8×8 to 64×64 luma samples, but is typically 64×64. Each CTU can be further divided into smaller square blocks, called CUs. After the CTU is recursively split into CUs, each CU is further divided into PUs and TUs. The splitting of the CU into TUs is performed recursively based on the quadtree method. Thus, the residual signal of each CU is decoded by a tree structure called RQT. RQT allows the TU size to range from 4×4 to 32×32 luma samples.
[0253] Figure 5 An example is shown in which a CU includes 10 TUs (labeled with letters a to j) and the corresponding block splitting. Each node of the RQT is actually a TU. The individual TUs are processed in depth-first tree traversal order (which is shown alphabetically in Figure 5 ), and this depth-first tree traversal order follows a recursive Z-scan with depth-first traversal. The quadtree method enables the transform to adapt to the varying spatial frequency characteristics of the residual signal.
[0254] Generally, a larger transform block size (which has a larger spatial support) provides better frequency resolution. However, a smaller transform block size (which has a smaller spatial support) provides better spatial resolution. The trade-off between spatial resolution and frequency resolution is selected by the encoder mode decision, e.g., based on rate-distortion optimization techniques. For example, by performing rate-distortion optimization techniques, the mode selection unit 202 of the video encoder 200 can determine to use a larger transform block size to provide better frequency resolution, or can determine to use a smaller transform block size to provide better spatial resolution. The mode selection unit 202 of the video encoder 200 can utilize rate-distortion optimization techniques, which can calculate the weighted sum of the decoding bits and the reconstruction distortion (i.e., the rate-distortion cost) for each decoding mode (e.g., a specific RQT split structure), and select the decoding mode with the minimum rate-distortion cost as the best mode.
[0255] Three parameters can be defined in RQT: the maximum depth of the tree, the minimum allowed transform size, and the maximum allowed transform size. The minimum and maximum transform sizes can vary in the range of 4×4 to 32×32 samples, which corresponds to the supported block transforms mentioned in the previous paragraphs. The maximum allowed depth of the RQT limits the number of TUs. A maximum depth equal to zero means that if each included transform block (TB) reaches the maximum allowed transform size (e.g., 32x32), the CB cannot be further split.
[0256] All these parameters can interact with each other and affect the RQT structure. Consider the following situation: where the root CB size is 64×64, the maximum depth is equal to zero, and the maximum transform size is equal to 32×32. In this case, the CB must be split at least once because otherwise it would result in a 64×64 TB, which is not allowed in HEVC. The RQT parameters (i.e., the maximum RQT depth, the minimum and maximum transform sizes) are sent in the bitstream at the SPS level. For example, the video encoder 200 can send the RQT parameters in the SPS, and the video decoder 300 can determine the RQT parameters by reading the RQT parameters in the SPS. Regarding the RQT depth, different values can be specified and signaled for the CUs of intra and inter prediction. For example, the video encoder 200 can signal different RQT depth values for the CUs of intra and inter prediction.
[0257] The quadtree transform can be applied to both intra and inter residual blocks. Generally, the DCT-II transform of the same size as the current residual quadtree split is applied to the residual block. For example, the video encoder 200 can apply the DCT-II transform of the same size as the current residual quadtree split to the residual block. However, if the current residual quadtree block is 4x4 and is generated by intra prediction, the above 4x4 DST-VII transform can be applied.
[0258] In HEVC, larger-size transforms (e.g., 64x64 transform) are not adopted mainly because their benefits are limited and their complexity is relatively high for videos with relatively small resolutions.
[0259] The techniques of the present disclosure are applicable to Figure 6 the typical adaptive transform decoding scheme shown. Figure 3 The video encoder 200 of Figure 6 can be configured to operate using the adaptive transform decoding scheme shown. Figure 6 The video encoder includes a block separation unit 130, a residual generation unit 148, a block transform unit 132, a quantization unit 134, an entropy decoding unit 136, an inverse quantization unit 138, an inverse transform unit 140, a frame buffer 144, a block prediction unit 146, and a transform library unit 142. For example, the block separation unit 130 can provide a block of video data to the residual generation unit 148. The residual generation unit 148 can receive a block of video data and prediction information from the block prediction unit 146 and generate a residual r. The block transform unit 132 can select a transform t from the transform library unit 142 and can signal the selected transform in the bitstream output from the entropy decoding unit 136. The block transform unit 132 can apply the transform selected from the transform library unit 142 to create transform coefficients T(t) r. In some examples, the block transform unit 132 may apply a secondary transform (which may also be in the transform library unit 142) after applying the primary transform. The transform coefficients may be provided to the quantization unit 134. The quantization unit 134 may quantize the transform coefficients and provide the quantized transform coefficients to the entropy coding unit 136 and the inverse quantization unit 138. The entropy coding unit 136 may entropy code the quantized transform coefficients and output the entropy-coded information to the bitstream. The inverse quantization unit 138 may inverse quantize the quantized transform coefficients to recreate the transform coefficients and provide the transform coefficients to the inverse transform unit 140. The inverse transform unit 140 may inverse transform the transform coefficients and provide the video data to the frame buffer 144. The frame buffer 144 may provide the video data to the block prediction unit 146, and the block prediction unit 146 may predict the current block of the video data.
[0260] In Figure 6 it, for each block of the prediction residual, the video encoder 200 may select a different transform from the transform library unit 142. The video encoder 200 may encode the selection of the transform as side information for signaling. For example, the video encoder 200 may signal the selection of the transform, and the video decoder 300 may determine the selection of the transform by reading the signal.
[0261] In video coding standards prior to HEVC, only fixed separable transforms were used in the vertical and horizontal directions with DCT-2. In HEVC, in addition to DCT-2, DST-7 is also used as a fixed separable transform for 4x4 blocks. U.S. Patent Publication No. 2016 / 0219290, published on July 28, 2016, U.S. Patent Publication No. 2018 / 0020218, published on January 18, 2018, and U.S. Provisional Patent Application No. 62 / 679,570, filed on June 1, 2018 (the entire contents of each of which are incorporated herein by reference) describe adaptive extensions of these fixed transforms, and an example of the Adaptive Multiple Transform (AMT) described in the following document has been adopted in the Joint Exploration Model (JEM-7.0) of the Joint Video Exploration Team (JVET) (e.g., see the Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, JEM software): X. Zhao, S. Lee, J. Chen, L. Zhang, X. Li, Y. Chen, M. Karczewicz, and H. Liu, "Enhanced Multiple Transforms for Prediction Residuals," January 2015. A simplified version of AMT, called Multiple Transform Selection (MTS), is also adopted in VVC. In addition, a quadratic transform is used in JEM-7.0 to further improve coding efficiency, where the implementation is based on the Hypercube Givens Transform (HyGT) described in U.S. Patent Publication No. 2017 / 0238013, published on August 17, 2017 (see also U.S. Patent Publication No. 2017 / 0094313, published on March 30, 2017, U.S. Patent Publication No. 2017 / 0094314, published on March 30, 2017, U.S. Patent Publication No. 2017 / 0238014, published on August 17, 2017, U.S. Provisional Patent Application No. 62 / 668,105, filed on May 7, 2018, and U.S. Provisional Patent Application No. 62 / 648,321, filed on March 26, 2018, the entire contents of each of which are incorporated herein by reference for alternative designs and additional details of the quadratic transform). For the VVC standard, the quadratic transform is still under study and may be incorporated into the VVC standard in subsequent JVET meeting cycles.
[0262] In the recent JVET meeting, a partitioning method for TUs has been adopted in VVC (which will be available in the VTM-4.0 reference software), where the intra-coded TU blocks can be further horizontally or vertically partitioned according to the intra prediction mode and block size (referred to as intra sub-partitioning in this paper). In the adopted method, multiple horizontal / vertical partitions are allowed, and the size of the TU can be 1x16 and 16x1. However, the existing secondary transform designs (including the secondary transform design in JEM-7.0) implicitly assume that the minimum TU size is 4x4. Therefore, for the current secondary transform designs, the secondary transform may not be applicable to some sizes of TUs, including 1x16, 16x1, 2x8, and 8x2.
[0263] The technology of the present disclosure can allow the application of the secondary transform to TUs of sizes 1x16, 16x1, 2x8, and 8x2 to achieve better coding gain.
[0264] The present disclosure describes a secondary transform design that can be applied to any encoder / decoder (e.g., video encoder 200 and video decoder 300) that supports various TU (block) sizes (e.g., 1x16, 16x1, 2x8, 8x2). The techniques described below can be used alone or in any combination with each other. Figure 7 is a block diagram showing the use of the secondary transform on the encoder and decoder sides. For example, the video encoder 200 can apply a primary transform (150), a secondary transform (152), and quantization (154) to video data. The transform processing unit 206 of the video encoder 200 can apply the primary transform and the secondary transform to the video data, and the quantization unit 208 can quantize the transform coefficients. The video decoder 300 can perform inverse quantization (156), secondary inverse transform (158), and primary inverse transform (160) on the video data received in the bitstream. The inverse quantization unit 306 of the video decoder 300 can perform inverse quantization on the video data in the bitstream, and the inverse transform processing unit 308 of the video decoder 300 can apply the secondary inverse transform and the primary inverse transform to the inverse-quantized video data.
[0265] In an example of the present disclosure, when intra sub-partitioning is applied to a block, the secondary transform is not applied. In this case, the secondary transform overhead can be not signaled. For example, when the video encoder 200 applies intra sub-partitioning to a block, the video encoder 200 may not apply the secondary transform to the block. In this example, the video encoder 200 can not signal the secondary transform overhead, and the video decoder 300 can not read the secondary transform overhead signaling. In other words, intra sub-partitioning and the secondary transform can not be used together.
[0266] In another example of the present disclosure, a secondary transform can be applied to the overall primary transform coefficients without considering the intra sub - partitioning method. That is, the primary transform is applied to all sub - blocks, and the secondary transform is applied to the primary transform coefficients. In this case, the secondary transform can be applied across the primary transform blocks, or can be applied only to a portion of the multiple primary transform blocks. For example, the video encoder 200 can apply the secondary transform across all primary transform blocks or to less than all primary transform blocks.
[0267] In another example of the present disclosure, the video encoder 200 can apply a secondary transform to a subset of coefficients obtained from a primary transform (such as the primary transform defined by AMT / MTS). In this example, the video decoder 300 first applies the secondary inverse transform and then applies the primary inverse transform. As described above, Figure 7 illustrates secondary transform schemes for video encoders and video decoders (such as video encoder 200 and video decoder 300).
[0268] In another example of the present disclosure, a secondary transform of size K can be implemented based on matrix multiplication, HyGT, or hierarchical decomposition, as described in U.S. Patent Publication No. 2017 / 0094313, published on March 30, 2017, U.S. Patent Publication No. 2017 / 0094314, published on March 30, 2017, U.S. Patent Publication No. 2017 / 0238014, published on August 17, 2017, U.S. Provisional Patent Application No. 62 / 668,105, filed on May 7, 2018, and U.S. Provisional Patent Application No. 62 / 648,321, filed on March 26, 2018. For example, the video encoder 200 can apply a secondary transform of size K to the primary transform coefficients.
[0269] In another example of the present disclosure, the secondary transform can be a separable transform or a non - separable transform. For example, the video encoder 200 can apply a separable secondary transform to the primary transform coefficients. In other examples, the video encoder 200 can apply a non - separable secondary transform to the primary transform coefficients.
[0270] In another example of the present disclosure, if TU partitioning is used or signaled, the secondary transform may not be applied. For example, if the TU size is the same as the CU size, the secondary transform can be used. For example, if the video encoder 200 uses TU partitioning on a given CU, the video encoder 200 may not use the secondary transform, and if the video encoder 200 does not use TU partitioning on a given CU, the video encoder 200 can use the secondary transform.
[0271] In other examples of the present disclosure, the secondary transform can be applied regardless of whether the TU is split. The following are specific examples where the video encoder 200 can apply the secondary transform regardless of whether the TU is split.
[0272] For example, if the TU is not split, the secondary transform can be applied to a subset of samples. For example, if a given TU is not split, the video encoder 200 can apply the secondary transform to a subset of samples. Examples include the designs described in U.S. Patent Application No. 16 / 020,511 filed on June 27, 2018. As another example, the secondary transform in JEM-7.0 can be applied when the TU size is the same as the CU size. For example, when the TU size is the same as the CU size, the video encoder 200 can apply the secondary transform described in JEM-7.0.
[0273] In another example, if the split results in a TU of size 1xN or Nx1, where N>1, the secondary transform can be applied to a subset of N samples / pixels, denoted by K<N. Figure 8 An example where N = 16 and K = 8 is shown, where the subset of samples / pixels is represented by the shaded boxes. For example, if the split results in a TU of size 1xN or Nx1, the video encoder 200 can apply the secondary transform to a subset of N samples / pixels.
[0274] In another example, if the split results in a TU of size 2xN or 2xN, where N>2, the secondary transform can be applied to a subset of 2N samples / pixels, denoted by K<2N. Figure 9 An example where 2N = 32 and K = 16 is shown, where the subset of samples / pixels is represented by the shaded boxes. Figure 10 Two examples where 2N = 32 and K = 8 are shown, where the subset of samples / pixels is represented by the shaded boxes. For example, if the split results in a TU of size 2xN or Nx2, the video encoder 200 can apply the secondary transform to a subset of 2N samples / pixels.
[0275] In another example of the present disclosure, the secondary transform can be applied to the K lowest-frequency coefficients obtained from the primary transform. For example, the video encoder 200 can apply the secondary transform to the K lowest-frequency coefficients obtained from the primary transform, where K is an integer.
[0276] In another example of the present disclosure, the secondary transform can be applied to any subset of samples obtained from the primary transform. For example, the video encoder 200 can apply the secondary transform to any subset of samples obtained from the primary transform.
[0277] In another example of the present disclosure, the secondary transform may be applied to a certain type of segmentation or certain types of segmentation. For example, if the segmentation is obtained based on a binary tree or a quadtree, the secondary transform may be applied. In some examples, if the segmentation is defined based on a ternary tree, the secondary transform may not be allowed (for examples of tree-based segmentation, see Figure 11 ). Figure 11 Illustrates different types of tree-based segmentation on a square block. For example, the quadtree segmentation 162 is depicted using its corresponding example CTU 170, the binary tree segmentation 164 is depicted using the corresponding example CTUs (CTU 172 and CTU 174), the binary tree segmentation 166 is depicted using the corresponding example CTUs (CTU 176 and CTU 178), and the ternary tree segmentation 168 is depicted using the corresponding example CTUs (CTU 180 and CTU 182). For example, if the segmentation is a binary tree segmentation or a quadtree segmentation, the video encoder 200 may apply the secondary transform, but if the segmentation is a ternary tree segmentation, the video encoder 200 may not apply the secondary transform.
[0278] In some examples, one or a combination of the above techniques may be used only for CUs with intra prediction. For example, the video encoder 200 may apply any one of the above techniques only for CUs with intra prediction.
[0279] In some examples, one or a combination of the above techniques may be used only for CUs with inter prediction. For example, the video encoder 200 may apply any one of the above techniques only for CUs with inter prediction.
[0280] In some examples, one or a combination of the above techniques may be used for both CUs with intra prediction and CUs with inter prediction. For example, the video encoder 200 may apply any one of the above techniques for both CUs with intra prediction and CUs with inter prediction.
[0281] In some examples, one or a combination of the above techniques may be used for the luminance channel or the chrominance channel or both. For example, the video encoder 200 may apply any one of the above techniques for the luminance channel or the chrominance channel or both.
[0282] In another example of the present disclosure, for the intra sub - partition mode, the primary transform size (width x height) can be a multiple of 16, so the transform block can be rearranged before applying the secondary transform. For example, 1x16 or 16x1 primary transform coefficients can be rearranged into 4x4 coefficient blocks before applying the secondary transform. For example, the video encoder 200 can limit the primary transform size to a multiple of 16. In the case of 1x16 or 16x1 primary transform coefficients, the video encoder 200 can rearrange the primary transform coefficients into 4x4 coefficient blocks and then apply the secondary transform. Various methods (such as various scan patterns) can be used to rearrange the blocks. The rearrangement method can depend on the intra sub - partition block size and / or the intra mode.
[0283] In other alternatives, the secondary transform can be applied only if the primary transform size is at least a predetermined size (such as 4x4, 8x8, 16x16, or any other predetermined size) in the intra sub - partition method. Otherwise, the secondary transform can not be applied and the secondary transform overhead can not be signaled. For example, the video encoder 200 can apply the secondary transform only if the primary transform size is at least 4x4, and if the primary transform size is not at least 4x4, the video encoder 200 can not apply the secondary transform or signal the secondary transform overhead.
[0284] Figure 12 is a flowchart showing an example method according to the technology of the present disclosure. The video encoder 200 can determine whether intra sub - partition is used for the current block of video data (184). The video encoder 200 can apply the primary transform to the current block of video data (186). The video encoder can also determine whether the primary transform size is at least a predetermined size (188). If the video encoder 200 determines that intra sub - partition is not used (the "no" path from diamond 184), or if the video encoder 200 determines that the primary transform size is not at least a predetermined size (e.g., 4x4, 8x8, 16x16, or any other predetermined size) (the "no" path from diamond 188), then the transform processing unit 206 of the video encoder 200 can not apply the secondary transform (194). Since the secondary transform is not applied, the video encoder 200 can decode the current block of video data based on the primary transform coefficients (192). In the case where the video encoder 200 determines that intra sub - partition is used (the "yes" path from diamond 184) and the primary transform is at least a predetermined size (the "yes" path from diamond 188), the transform processing unit 206 of the video encoder 200 can apply the secondary transform to the primary transform coefficients (190). In the case where the secondary transform is applied, the video encoder 200 can decode the current block of video data based on the secondary transform (192).
[0285] Figure 13is a flowchart showing an example method for encoding a current block. The current block may include a current CU. Although described with respect to video encoders 200 ( Figure 1 and 2), it should be understood that other devices may be configured to perform methods similar to those of Figure 13 .
[0286] In this example, video encoder 200 initially predicts the current block (350). For example, video encoder 200 may form a prediction block for the current block. Then, video encoder 200 may calculate a residual block (352) for the current block. To calculate the residual block, video encoder 200 may calculate the difference between the original, unencoded block and the prediction block for the current block. Then, video encoder 200 may transform and quantize the coefficients of the residual block (354). For example, video encoder 200 may determine whether intra-subdivision is applied to the current block of video data. The transform processing unit 206 of video encoder 200 may apply a primary transform. Video encoder 200 may also determine whether the primary transform size of the current block of video data is at least a predetermined size. The transform processing unit 206 of video encoder 200 may apply a secondary transform to the primary transform coefficients based on applying intra-subdivision and the primary transform size being at least the predetermined size, and video encoder 200 may encode the current block of video data based on the secondary transform. Next, video encoder 200 may scan the quantized transform coefficients of the residual block (356). During or after the scan, video encoder 200 may entropy encode the coefficients (358). For example, video encoder 200 may use CAVLC or CABAC to encode the coefficients. Then, video encoder 200 may output the entropy-coded data of the block (360).
[0287] Figure 14 is a flowchart showing an example method for decoding a current block of video data. The current block may include a current CU. Although described with respect to video decoders 300 ( Figure 1 and 3 ), it should be understood that other devices may be configured to perform methods similar to those of Figure 14 .
[0288] Video decoder 300 may receive entropy-coded data for a current block (such as entropy-coded prediction information and entropy-coded data of coefficients for a residual block corresponding to the current block) (370). Video decoder 300 may perform entropy decoding on the entropy-coded data to determine prediction information for the current block and reproduce the coefficients of the residual block (372). Video decoder 300 may predict the current block, for example, using an intra or inter prediction mode indicated by the prediction information for the current block (374), to calculate a prediction block for the current block. Then, video decoder 300 may perform inverse scanning on the reproduced coefficients (376) to create a block of quantized transform coefficients. Then, video decoder 300 may perform inverse quantization and inverse transformation on the coefficients to generate a residual block (378). For example, video decoder 300 may determine whether intra sub-division is applied to the current block of video data. Video decoder 300 may also determine whether a primary transform size of the current block of video data is at least a predetermined size. Inverse transform processing unit 308 may apply a secondary inverse transform to the inverse-quantized data based on applying intra sub-division and the primary transform size being at least the predetermined size. The inverse transform processing unit may also perform a primary inverse transform on the data that has undergone the secondary inverse transform. Video decoder 300 may decode the current block of video data based on the secondary transform. Finally, video decoder 300 may decode the current block by combining the prediction block and the residual block (380).
[0289] Examples according to the present disclosure include the following examples:
[0290] Example 1. A method for decoding video data, the method comprising: decoding a block of video data using one or more of a primary transform and a secondary transform according to the techniques of the present disclosure.
[0291] Example 2. The method according to Example 1, wherein intra sub-division is applied to the block of video data, and the method further comprises: decoding the block of video data using only the primary transform.
[0292] Example 3. The method according to Example 1, wherein decoding the block of video data using one or more of the primary transform and the secondary transform comprises: applying the primary transform to the block of video data, including sub-blocks; and applying the secondary transform to the primary transform coefficients.
[0293] Example 4. The method according to Example 1, wherein decoding the block of video data using one or more of the primary transform and the secondary transform comprises: applying the primary transform to the block of video data; and applying the secondary transform to a subset of coefficients obtained from the primary transform.
[0294] Example 5. The method according to Example 1, wherein decoding a block of the video data using one or more of the primary transform and the secondary transform includes: decoding a block of the video data using a secondary transform of size K, wherein the secondary transform is based on matrix multiplication, HyGT, or hierarchical decomposition.
[0295] Example 6. The method according to Example 1, wherein the secondary transform is a separable transform.
[0296] Example 7. The method according to Example 1, wherein the secondary transform is a non-separable transform.
[0297] Example 8. The method according to Example 1, wherein decoding a block of the video data using one or more of the primary transform and the secondary transform includes: when the block of the video data is a transform unit having the same size as the decoding unit, decoding the block of the video data using the secondary transform.
[0298] Example 9. The method according to Example 1, wherein decoding a block of the video data using one or more of the primary transform and the secondary transform includes: when the block of the video data is a transform unit not having the same size as the decoding unit, decoding the block of the video data using a secondary transform on a subset of samples.
[0299] Example 10. The method according to Example 1, further comprising: applying the primary transform to a block of the video data; and applying the secondary transform to the K lowest frequency coefficients obtained from the primary transform.
[0300] Example 11. The method according to Example 1, further comprising: applying the primary transform to a block of the video data; and applying the secondary transform to all frequency coefficients or samples obtained from the primary transform.
[0301] Example 12. Any combination of the techniques according to Examples 1-11.
[0302] Example 13. An apparatus for decoding video data, the apparatus including one or more units for performing the method according to any one of Examples 1-12.
[0303] Example 14. The apparatus according to Example 13, wherein the one or more units include one or more processors implemented in a circuit.
[0304] Example 15. The apparatus according to any one of Examples 13 and 14, further comprising: a memory for storing the video data.
[0305] Example 16. The apparatus according to any one of Examples 13-15 further comprises: a display configured to display the decoded video data.
[0306] Example 17. The apparatus according to any one of Examples 13-16, wherein the apparatus comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0307] Example 18. The apparatus according to any one of Examples 13-17, wherein the apparatus comprises a video decoder.
[0308] Example 19. The apparatus according to any one of Examples 13-18, wherein the apparatus comprises a video encoder.
[0309] Example 20. A computer-readable storage medium having instructions stored thereon that, when executed, cause one or more processors to perform the method according to any one of Examples 1-12.
[0310] It should be recognized that, according to the examples, certain actions or events of any of the techniques described herein may be performed in a different order, may be added, combined, or entirely omitted (e.g., not all described actions or events are necessary for implementing the techniques). Additionally, in certain examples, the actions or events may be performed, for example, concurrently rather than sequentially by multi-threading, interrupt processing, or multiple processors.
[0311] In one or more examples, the described functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functionality may be stored on or transmitted via a computer-readable medium as one or more instructions or code and executed by a hardware-based processing unit. The computer-readable medium may include a computer-readable storage medium, which corresponds to a tangible medium such as a data storage medium, or a communication medium, which includes any medium that facilitates transfer of a computer program from one place to another, for example, according to a communication protocol. In this manner, the computer-readable medium generally may correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium such as a signal or a carrier wave. The data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to obtain instructions, code, and / or data structures for implementing the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0312] By way of example and not limitation, such a computer-readable storage medium can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and that can be accessed by a computer. Additionally, any connection is properly termed a computer-readable medium. For example, if instructions are transmitted using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies (such as infrared, radio, and microwave) are included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but instead are directed to non-transitory, tangible storage media. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc, where disks typically reproduce data magnetically, while discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0313] The instructions can be executed by one or more processors, such as one or more digital signal processors (DSPs), general microprocessors, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Thus, as used herein, the terms "processor" and "processing circuitry" can refer to any one of the foregoing structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described herein can be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Further, the techniques can be implemented entirely in one or more circuits or logic elements.
[0314] The techniques of the present disclosure can be implemented in a variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a group of ICs (e.g., a chipset). Various components, modules, or units are described in the present disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but need not be implemented by different hardware units. Rather, as described above, the various units can be combined in a codec hardware unit, or provided by a collection of interoperable hardware units (including one or more processors as described above) in conjunction with appropriate software and / or firmware.
[0315] Various examples have been described. These and other examples are within the scope of the appended claims.
Claims
1. A method for encoding video data, the method comprises: determining whether intra-subdivision is applied to a current block of video data; applying a primary transform to the current block of video data to generate primary transform coefficients; determining whether the size of the primary transform is at least a predetermined size based on the application of intra-subdivision; based on determining that intra-subdivision is applied and the size of the primary transform is at least the predetermined size, applying a secondary transform to the primary transform coefficients and signaling secondary transform overhead, and encoding the current block of video data based on at least one of the primary transform and the secondary transform; and based on determining that intra-subdivision is not applied or the size of the primary transform is not at least the predetermined size, not applying any secondary transform and not signaling secondary transform overhead, and encoding the current block of video data based on the primary transform.
2. The method according to claim 1, wherein, the predetermined size is 4x4.
3. The method according to claim 1, wherein, applying the secondary transform to the primary transform coefficients includes applying the secondary transform to all of the primary transform coefficients of the current block of video data.
4. The method according to claim 1, wherein, applying the secondary transform to the primary transform coefficients includes applying the secondary transform to less than all of the primary transform coefficients of the current block of video data.
5. The method according to claim 1, wherein, the secondary transform is a non-separable transform.
6. The method according to claim 1, wherein, the secondary transform is a separable transform.
7. The method according to claim 1, wherein, determining whether to apply intra-subdivision further includes: determining a segmentation type for the current block of video data, and applying the secondary transform is based on the segmentation type for the current block of video data.
8. The method according to claim 7, wherein, the segmentation type used is binary tree segmentation or quadtree segmentation.
9. An apparatus for encoding video data, the apparatus comprises: a memory configured to store video data; and one or more processors implemented in circuitry and communicating with the memory, the one or more processors being configured to: determine whether intra-subdivision is applied to a current block of video data; apply a primary transform to the current block of video data to generate primary transform coefficients; determine whether the size of the primary transform is at least a predetermined size based on the application of intra-subdivision; based on determining that intra-subdivision is applied and the size of the primary transform is at least the predetermined size, apply a secondary transform to the primary transform coefficients and signal secondary transform overhead, and encode the current block of video data based on at least one of the primary transform and the secondary transform; and Based on determining that intra-subdivision is not applied or the size of the primary transform is not at least the predetermined size, no secondary transform is applied and the secondary transform overhead is not signaled, and the current block of the video data is encoded based on the primary transform.
10. The apparatus according to claim 9, wherein, the predetermined size is 4x4.
11. The apparatus according to claim 9, wherein, applying the secondary transform to the primary transform coefficients includes applying the secondary transform to all of the primary transform coefficients of the current block of the video data.
12. The apparatus according to claim 9, wherein, applying the secondary transform to the primary transform coefficients includes applying the secondary transform to less than all of the primary transform coefficients of the current block of the video data.
13. The apparatus according to claim 9, wherein, the secondary transform is a non-separable transform.
14. The apparatus according to claim 9, wherein, the secondary transform is a separable transform.
15. The apparatus according to claim 9, wherein, the one or more processors are further configured to: determine a segmentation type for the current block of the video data; and wherein, the one or more processors further apply the secondary transform based on the segmentation type for the current block of the video data.
16. The apparatus according to claim 15, wherein, the segmentation type used is binary tree segmentation or quadtree segmentation.
17. A computer-readable storage medium having instructions stored thereon that, when executed, cause one or more processors to perform the following operations: determine whether intra-subdivision is applied to a current block of video data; apply a primary transform to the current block of the video data to generate primary transform coefficients; determine whether the size of the primary transform is at least a predetermined size based on applying intra-subdivision; based on determining that intra-subdivision is applied and the size of the primary transform is at least the predetermined size, apply a secondary transform to the primary transform coefficients and signal the secondary transform overhead, and encode the current block of the video data based on at least one of the primary transform and the secondary transform; and based on determining that intra-subdivision is not applied or the size of the primary transform is not at least the predetermined size, do not apply any secondary transform and do not signal the secondary transform overhead, and encode the current block of the video data based on the primary transform.
18. The computer-readable storage medium according to claim 17, wherein, the predetermined size is 4x4.
19. The computer-readable storage medium according to claim 17, wherein, the secondary transform is a non-separable transform.
Citation Information
Patent Citations
Enhanced multiple transforms for prediction residual
US20160219290A1
Non-separable secondary transform for video coding
US20170094313A1
Non-separable secondary transform for video coding with reorganizing
US20170094314A1
Multi-pass non-separable transforms for video coding
US20170238013A1
Efficient parameter storage for compact multi-pass tranforms
US20170238014A1