Method and apparatus for decoding video data, and method and apparatus for encoding video data
By adopting tree-based transformation unit (TU) segmentation technology in video encoding and decoding technology, the problem of inflexible residual block segmentation in the prior art is solved, and more efficient video data encoding and decoding and compression effects are achieved.
Patent Information
- Application Number
- CN202411695093.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-12-16
- Filing Date
- 2019-12-17
- Publication Date
- 2025-02-28
AI Technical Summary
When existing video encoding and decoding technologies process video data, it is difficult to achieve flexible segmentation of residual blocks, resulting in low encoding and decoding efficiency.
By adopting a tree-based transformation unit (TU) segmentation technology, by receiving segmentation information in the bit stream, it determines whether the residual block is divided and the type of the tree, so as to divide the residual block into a plurality of residual sub-blocks, and generate residual data based on these sub-blocks for decoding.
It improves the encoding and decoding efficiency of video data, realizes more flexible and efficient video data processing, and enhances video compression performance.
Smart Images

Figure CN119544983A_ABST
Abstract
Description
[0001] This application is a divisional application of an invention patent application with an application date of December 17, 2019, application number 201980082308.6, and invention name “Tree-based transform unit (TU) partitioning for video coding and decoding”.
[0002] CROSS-REFERENCE TO RELATED APPLICATIONS
[0003] This application claims the benefit of U.S. Application No. 16 / 715,274, filed on December 16, 2019, and U.S. Provisional Application No. 62 / 782,292, filed on December 19, 2018, each of which is incorporated herein by reference in its entirety. Technical Field
[0004] The present disclosure relates to video encoding and video decoding. Background Art
[0005] Digital video capabilities can be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio telephones, so-called "smart phones", video teleconferencing devices, video streaming devices, etc. Digital video devices implement video coding techniques, such as those described in the standards defined by the following: MPEG-2; MPEG-4; ITU-T H.263; ITU-T H.264 / MPEG-4 Part 10, Advanced Video Coding (AVC); ITU-T H.265 / High Efficiency Video Coding (HEVC) and extensions of such standards. By implementing such video coding techniques, video devices can more efficiently transmit, receive, encode, decode and / or store digital video information.
[0006] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) can be partitioned into video blocks, which can 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 neighboring blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture can use spatial prediction relative to reference samples in neighboring blocks in the same picture, or temporal prediction relative to reference samples in other reference pictures. Pictures can be referred to as frames, and reference pictures can be referred to as reference frames. Summary of the invention
[0007] In general, this disclosure describes techniques related to transform codecs, which are elements of modern video compression standards. Example techniques may provide more flexible partitioning of residual blocks such as transform units (TUs), and may improve codec gain.
[0008] In one example, a method for decoding video data includes receiving, in a bitstream including an encoded representation of the video data, information indicating whether a residual block is partitioned, and information indicating a partition tree type for the residual block based on the residual block being partitioned, wherein the residual block indicates a difference between a current block and a prediction block. The method also includes determining, based on the received information that the residual block is partitioned and the partition tree type for the residual block, a plurality of residual sub-blocks into which the residual block is partitioned according to the partition tree type. The method also includes generating residual data for a current block based at least in part on the residual block being partitioned into a plurality of residual sub-blocks according to the partition tree type. The method also includes decoding the current block using the residual data.
[0009] In another example, a device for decoding video data includes a memory configured to store video data. The device also includes a processor implemented in a circuit system and configured to perform the following operations: receiving information indicating whether a residual block is partitioned in a bitstream including an encoded representation of the video data, and information indicating a partition tree type for the residual block based on the residual block being partitioned, wherein the residual block indicates a difference between a current block and a prediction block; based on the received information that the residual block is partitioned and the partition tree type for the residual block, determining a plurality of residual sub-blocks into which the residual block is partitioned according to the partition tree type; generating residual data for a current block based at least in part on the residual block being partitioned into the plurality of residual sub-blocks according to the partition tree type; and decoding the current block using the residual data.
[0010] In another example, a computer-readable storage medium having instructions stored thereon that, when executed, cause a processor to: receive, in a bitstream comprising an encoded representation of video data, information indicating whether a residual block is partitioned, and information indicating a partitioning tree type for the residual block based on the residual block being partitioned, wherein the residual block indicates a difference between a current block and a prediction block; determine, based on the received information that the residual block is partitioned and the partitioning tree type for the residual block, a plurality of residual sub-blocks into which the residual block is partitioned according to the partitioning tree type; generate residual data for a current block based at least in part on the residual block being partitioned into the plurality of residual sub-blocks according to the partitioning tree type; and decode the current block using the residual data.
[0011] In another example, a device for decoding video data includes: a component for receiving information indicating whether a residual block is partitioned in a bitstream including an encoded representation of the video data, and information indicating a partition tree type for the residual block based on the residual block being partitioned, wherein the residual block indicates a difference between a current block and a prediction block. The device also includes: a component for determining, based on the received information that the residual block is partitioned and the partition tree type for the residual block, a plurality of residual sub-blocks into which the residual block is partitioned according to the partition tree type. The device also includes: a component for generating residual data for a current block based at least in part on the residual block being partitioned into a plurality of residual sub-blocks according to the partition tree type. The device also includes: a component for decoding the current block using the residual data.
[0012] In another example, a method for encoding video data includes: determining that a residual block for a current block of the video data is partitioned into a plurality of residual sub-blocks according to a partition tree type. The method also includes: encoding a bitstream as an encoded representation of the video data, the bitstream signaling information indicating whether the residual block is partitioned, and further signaling information indicating a partition tree type for the partitioned residual block.
[0013] In another example, a device for encoding video data includes a memory configured to store the video data. The device also includes a processor implemented in a circuit system and configured to perform the following operations: determine that a residual block for a current block of the video data is partitioned into a plurality of residual sub-blocks according to a partition tree type; and encode a bitstream as an encoded representation of the video data, the bitstream signaling information indicating whether the residual block is partitioned, and further signaling information indicating the partition tree type for the partitioned residual block.
[0014] In another example, a method for decoding video data includes: receiving information indicating whether a residual block is partitioned in a bitstream including an encoded representation of the video data, and information indicating a partition tree type for the residual block based on the residual block being partitioned, wherein the residual block indicates a difference between a current block and a prediction block; based on the received information, namely that the residual block is partitioned and the partition tree type for the residual block, determining a plurality of residual sub-blocks into which the residual block is partitioned according to the partition tree type, the partition tree type for the residual block comprising a ternary tree; generating residual data for the current block based at least in part on the residual block being partitioned into the plurality of residual sub-blocks according to the partition tree type; and decoding the current block using the residual data.
[0015] In another example, a device for decoding video data includes: a memory configured to store video data; and a processor implemented in a circuit system and configured to perform the following operations: receiving information indicating whether a residual block is partitioned in a bitstream including an encoded representation of the video data, and information indicating a partition tree type for the residual block based on the residual block being partitioned, wherein the residual block indicates a difference between a current block and a prediction block; based on the received information, namely, that the residual block is partitioned and the partition tree type for the residual block, determining a plurality of residual sub-blocks into which the residual block is partitioned according to the partition tree type, the partition tree type for the residual block comprising a ternary tree; generating residual data for the current block based at least in part on the residual block being partitioned into the plurality of residual sub-blocks according to the partition tree type; and using the residual data to decode the current block.
[0016] In another example, a device for encoding video data includes: a memory configured to store video data; and a processor implemented with a circuit system and configured to perform the following operations: determine that a residual block for a current block of video data is partitioned into multiple residual sub-blocks according to a partition tree type, and the partition tree type for the residual block includes a ternary tree; and encode a bitstream as an encoded representation of the video data, the bitstream signaling information indicating whether the residual block is partitioned, and also signaling information indicating the partition tree type for the residual block that is partitioned.
[0017] The details of one or more examples are set forth in the accompanying drawings and the description below.Other features, objects, and advantages will be apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1is a block diagram illustrating an example video encoding and decoding system that may perform the techniques of this disclosure.
[0019] Figure 2A and Figure 2B is a conceptual diagram illustrating an example quadtree binary tree (QTBT) structure and a corresponding codec tree unit (CTU).
[0020] Figure 3A and Figure 3B is a conceptual diagram illustrating an example transform scheme based on HEVC's residual quadtree.
[0021] Figure 4 is a block diagram illustrating an example system for hybrid video coding with adaptive transform selection.
[0022] Figure 5A and Figure 5B is a conceptual diagram showing horizontal transform and vertical transform implemented as separate transforms.
[0023] Figure 6 It is a conceptual diagram showing transformation signaling notification.
[0024] Figure 7 is a conceptual diagram showing a corresponding tree-based partitioning of a block.
[0025] Figure 8 is a conceptual diagram showing examples of quadtree-based partitioning, binary tree partitioning, and ternary tree partitioning.
[0026] Fig. 9 is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure.
[0027] Fig.10 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure.
[0028] Fig.11 is a flow chart illustrating an example method for encoding a current block.
[0029] Fig.12 is a flow chart illustrating an example method for decoding a current block of video data.
[0030] Fig.13 is a flow chart illustrating an example method for decoding a current block having data of a residual block partitioned according to a partition tree type.
[0031] Fig.14 is a flow chart illustrating an example method for encoding a current block having data of a residual block partitioned according to a partition tree type. DETAILED DESCRIPTION
[0032] The present disclosure relates to transform coding. In transform coding, for a video encoder, there is a block of residual data (e.g., the residual between the current block being encoded and the predicted block). The residual data is transformed from the spatial domain to the frequency domain, producing a transform coefficient block of transform coefficients. A video decoder receives the transform coefficient block (or possibly a quantized transform coefficient block) and performs inverse quantization (if necessary) and inverse transform to reconstruct the residual data back into the spatial domain of values.
[0033] A transform unit (TU) comprises a transform block of luma samples and a transform block of corresponding chroma samples. A transform block may be a rectangular M×N block of samples resulting from a transform in a decoding process, and the transform may be part of a decoding process, by which a block of transform coefficients is converted into a block of spatial domain values. Thus, a residual block may be an example of a TU. A residual block may be residual data transformed from a sample domain to a frequency domain, and comprises a plurality of transform coefficients. Transform coding is described in more detail in High Efficiency Video Coding: Coding Tools and Specification, M. Wien, Springer-Verlag, Berlin, 2015.
[0034] As described in more detail, in one or more examples described in the present disclosure, several tree-based partitioning designs can be used for transform codecs that utilize a transform scheme called Adaptive Multi (or Multi-core) Transform (AMT) or Multi-Transform Set (MTS). AMT and MTS can refer to the same transform tool, and due to name changes between video codec standards, AMT is now referred to as MTS.
[0035] Example transformation schemes are described in U.S. Patent Publication No. 2016 / 0219290 and Enhanced Multiple Transforms for Prediction Residuals by X. Zhao, S. Lee, J. Chen, L. Zhang, X. Li, Y. Chen, M. Karczewicz, and H. Liu, January 2015, and Improved Look-up Table for Enhanced Multiple Transforms by X. Zhao, V. Seregin, M. Karczewicz, and J. Chen, July 2016. Transform (Improved Lookup Table for Enhanced Multiple Transforms) and is also described in U.S. application No. 16 / 426,749 filed on May 30, 2019 and in Adaptive multiple transforms with reduced signaling overhead by HE Gilmez, Y.-H. Chao, A. Said, V. Seregin, and M. Karczewicz.
[0036] As described in more detail, in some examples, the residual block may be partitioned into a plurality of residual sub-blocks (e.g., sub-TUs). The present disclosure describes example techniques in which a video encoder may signal that a residual block is partitioned into residual sub-blocks and a video decoder may determine the manner in which a residual block is partitioned into residual sub-blocks, as well as the manner in which the residual block is partitioned (e.g., the partitioning type). In addition, there may be multiple transform types that a video encoder may utilize to transform residual data in a sample domain to a frequency domain, and multiple transform types that a video decoder may utilize to transform (e.g., inverse transform) frequency domain data back to residual data in a sample domain. The present disclosure describes example ways of determining transform types.
[0037] Figure 1 1 is a block diagram illustrating an example video encoding and decoding system 100 that can perform the techniques of the present disclosure. The techniques of the present disclosure generally relate to encoding and decoding (encoding and / or decoding) video data. Generally, video data includes any data used to process video. Therefore, video data can include original unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling notification data.
[0038] like Figure 1As shown, in this example, system 100 includes a source device 102 that provides encoded video data for decoding and display by a destination device 116. Specifically, source device 102 provides video data to destination device 116 via computer-readable medium 110. Source device 102 and destination device 116 may include any of a wide range of devices, including desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, telephone handsets such as smart phones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some cases, source device 102 and destination device 116 may be equipped for wireless communication, and thus may be referred to as wireless communication devices.
[0039] exist Figure 1 In the example of , the source device 102 includes a video source 104, a memory 106, a video encoder 200, and an output interface 108. The destination device 116 includes an input interface 122, a video decoder 300, a memory 120, and a display device 118. According to the present disclosure, the video encoder 200 of the source device 102 and the video decoder 300 of the destination device 116 can be configured to apply a tree-based transform unit segmentation technique for video encoding and decoding. Therefore, the source device 102 represents an example of a video encoding device, and the destination device 116 represents an example of a video decoding device. In other examples, the source device and the destination device may include other components or arrangements. For example, the source device 102 may receive video data from an external video source such as an external camera. Similarly, the destination device 116 may be connected to an external display device interface (interface) instead of including an integrated display device.
[0040] like Figure 1 The system 100 shown is only one example. In general, any digital video encoding and / or decoding device can perform the technology for tree-based transform unit segmentation for video encoding and decoding. The source device 102 and the destination device 116 are only examples of such codec devices, wherein the source device 102 generates encoded and decoded video data for transmission to the destination device 116. The present disclosure refers to a "codec" device as a device that performs encoding and decoding (encoding and / or decoding) of data. Therefore, the video encoder 200 and the video decoder 300 represent examples of codec devices, specifically, examples of video encoders and video decoders, respectively. In some examples, the source device 102 and the destination device 116 can operate in a substantially symmetrical manner, so that each of the source device 102 and the destination device 116 includes a video encoding and decoding component. Therefore, the system 100 can support one-way or two-way video transmission between the source device 102 and the destination device 116, for example, for video streaming, video playback, video broadcasting, or video telephony.
[0041] Typically, video source 104 represents the source of video data (i.e., original, uncoded video data), and provides a continuous series of pictures (also referred to as "frames") of video data to video encoder 200, which encodes the data for these pictures. Video source 104 of source device 102 may include a video capture device such as a video camera, a video archive containing previously captured original video, and / or a video feed interface for receiving video from a video content provider. As a further alternative, video source 104 may generate computer graphics-based data as source video, or a combination of live video, archived video, and computer-generated video. In each case, video encoder 200 encodes captured, pre-captured, or computer-generated video data. Video encoder 200 may rearrange pictures from a received order (sometimes referred to as "display order") into a codec order for encoding and decoding. Video encoder 200 may generate a bitstream comprising encoded video data. Source device 102 may then output the encoded video data onto computer-readable medium 110 via output interface 108 for receipt and / or retrieval by, for example, input interface 122 of destination device 116 .
[0042] The memory 106 of the source device 102 and the memory 120 of the destination device 116 represent general purpose memory. In some examples, the memory 106, 120 can store original video data, for example, the original video from the video source 104 and the original, decoded video data from the video decoder 300. In addition or alternatively, the memory 106, 120 can store software instructions that can be executed by, for example, the video encoder 200 and the video decoder 300, respectively. Although the memory 106 and the memory 120 are shown separately from the video encoder 200 and the video decoder 300 in this example, it should be understood that the video encoder 200 and the video decoder 300 can also include internal memory for functionally similar or equivalent purposes. In addition, the memory 106, 120 can store, for example, encoded video data output from the video encoder 200 and input to the video decoder 300. In some examples, portions of the memory 106, 120 can be allocated as one or more video buffers, for example to store original, decoded and / or encoded video data.
[0043] The computer-readable medium 110 may represent any type of medium or device capable of transmitting 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 send the encoded video data directly to the destination device 116 in real time, for example, via a radio frequency network or a computer-based network. According to a communication standard such as a wireless communication protocol, the output interface 108 can modulate a transmission signal including the encoded video data, and the input interface 122 can demodulate the received transmission signal. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include a router, a switch, a base station, or any other equipment that may be useful to facilitate communication from the source device 102 to the destination device 116.
[0044] In some examples, source device 102 may output the encoded data from output interface 108 to storage device 112. Similarly, destination device 116 may access the encoded data from storage device 112 via input interface 122. Storage device 112 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, Blu-ray disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.
[0045] In some examples, the source device 102 may output the encoded video data to a file server 114 or another intermediate storage device that may store the encoded video generated by the source device 102. The destination device 116 may access the stored video data from the file server 114 via streaming or downloading. The file server 114 may be any type of server device capable of storing the encoded video data and transmitting the encoded video data to the destination device 116. The file server 114 may represent a web server (e.g., for a website), a file transfer protocol (FTP) server, a content delivery network device, or a network attached storage (NAS) device. The destination device 116 may access the encoded video data from the file server 114 via any standard data connection including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a digital subscriber line (DSL), a cable modem, etc.), or a combination of both suitable for accessing the encoded video data stored on the file server 114. The file server 114 and input interface 122 may be configured to operate according to a streaming transfer protocol, a download transfer protocol, or a combination thereof.
[0046] Output interface 108 and input interface 122 may represent wireless transmitters / receivers, modems, wired networking components (e.g., Ethernet cards), wireless communication components that operate according to any of the various IEEE 802.11 standards, or other physical components. In examples where output interface 108 and input interface 122 include wireless components, output interface 108 and input interface 122 may be configured to communicate data such as encoded video data in accordance with cellular communication standards such as 4G, 4G-LTE (Long Term Evolution), Advanced LTE, 5G, etc. In certain examples where output interface 108 includes a wireless transmitter, output interface 108 and input interface 122 may be configured to communicate data such as encoded video data in accordance with cellular communication standards such as IEEE 802.11 specifications, IEEE 802.15 specifications (e.g., ZigBee TM ),Bluetooth TM The source device 102 and / or the destination device 116 may include a corresponding system-on-a-chip (SoC) device. For example, the source device 102 may include a SoC device for performing the functionality attributed to the video encoder 200 and / or the output interface 108, while the destination device 116 may include a SoC device for performing the functionality attributed to the video decoder 300 and / or the input interface 122.
[0047] The techniques of the present disclosure may be applied to support video encoding and decoding for any of a variety of multimedia applications such as over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission such as dynamic adaptive streaming over HTTP (DASH), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0048] The input interface 122 of the destination device 116 receives an encoded video bitstream from the computer-readable medium 110 (e.g., a communication medium, a storage device 112, a file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200 and also used by the video decoder 300, such as syntax elements with values describing characteristics and / or processing of video blocks or other encoded and decoded units (e.g., slices, pictures, groups of pictures, sequences, etc.). The display device 118 displays decoded pictures of the decoded video data to a user. The display device 118 may represent any of a variety of display devices, such as a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.
[0049] although Figure 1 2. Although not shown in the figure, in some examples, the video encoder 200 and the video decoder 300 may each be integrated with an audio encoder and / or an audio decoder, and may include appropriate MUX-DEMUX units or other hardware and / or software to process multiplexed streams including both audio and video in a common data stream. If applicable, the MUX-DEMUX unit may conform to the ITU H.223 multiplexer protocol or other protocols, such as the user datagram protocol (UDP).
[0050] The video encoder 200 and the video decoder 300 can each be implemented as any of a variety of suitable encoder and / or decoder circuit systems, such as one or more microprocessors, digital signal processors (digital signal processor, DSP), application specific integrated circuits (application specific integrated circuit, ASIC), field programmable gate arrays (field programmable gate array, FPGA), discrete logic, software, hardware, firmware or any combination thereof. When the technology is partially implemented in software, the device can store instructions for the software in a suitable non-transitory computer-readable medium, and use one or more processors to execute these instructions in hardware to perform the technology of the present disclosure. Each of the video encoder 200 and the video decoder 300 can be included in one or more encoders or decoders, any of which can be integrated as part of a combined encoder / decoder (combined encoder / decoder, CODEC) in the corresponding device. The device including the video encoder 200 and / or the video decoder 300 may include an integrated circuit, a microprocessor and / or a wireless communication device, such as a cellular phone.
[0051] The video encoder 200 and the video decoder 300 may operate according to a video codec standard, such as ITU-T H.265, also known as High Efficiency Video Coding (HEVC), or its extensions, such as multi-view and / or scalable video codec extensions. Alternatively, the video encoder 200 and the video decoder 300 may operate according to other private or industrial standards, such as the Joint Exploration Test Model (JEM) or ITU-T H.266, also known as Versatile Video Coding (VVC). At the 15th meeting of the Joint Video Experts Group (JVET) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11: Gothenburg, SE, July 3-12, 2019, JVET-O2001-vE, Bross et al. described a draft of the VVC standard in "(Versatile Video Coding (Draft 6))" (hereinafter referred to as "VVC Draft 6"). At the 16th meeting of the Joint Video Experts Group (JVET) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11: Geneva, CH, October 1-11, 2019, JVET-P2001-v9, Bross et al. described a newer draft of the VVC standard in "Generic Video Codec (Draft 7)" (hereinafter referred to as "VVC Draft 7"). However, the technology of the present disclosure is not limited to any particular codec standard.
[0052] Typically, the video encoder 200 and the video decoder 300 can perform block-based encoding and decoding of pictures. The term "block" generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used in the encoding and / or decoding process). For example, a block may include a two-dimensional matrix of samples of luminance data and / or chrominance data. Typically, the video encoder 200 and the video decoder 300 can encode and decode video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, the video encoder 200 and the video decoder 300 can encode and decode luminance components and chrominance components instead of encoding and decoding red, green, and blue (RGB) data for samples of a picture, wherein the chrominance components may include both red-toned and blue-toned chrominance components. In some examples, the video encoder 200 converts the received RGB formatted data into a YUV representation before encoding, and the video decoder 300 converts the YUV representation into an RGB format. Alternatively, a pre-processing unit and a post-processing unit (not shown) can perform these conversions.
[0053] The present disclosure may generally refer to the encoding and decoding of a picture (e.g., encoding and decoding), which is intended to include the process of encoding or decoding data for a picture. Similarly, the present disclosure may refer to the encoding and decoding of a block of a picture as including the process of encoding or decoding data for the block, for example, prediction and / or residual encoding and decoding. The encoded video bitstream typically includes a series of values for syntax elements that represent encoding and decoding decisions (e.g., codec modes) and the partitioning of the picture into blocks. Therefore, references to encoding and decoding a picture or a block should generally be understood as encoding and decoding the values of the syntax elements that form the picture or block.
[0054] HEVC defines various blocks, including codec units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video codec (such as video encoder 200) partitions a codec tree unit (CTU) into CUs according to a quadtree structure. That is, the video codec partitions the CTU and CU into four equal non-overlapping squares, and each node of the quadtree has zero or four child nodes. A node without child nodes may be referred to as a "leaf node", and the CU of such a leaf node may include one or more PUs and / or one or more TUs. The video codec may further partition the PU and TU. For example, in HEVC, a residual quadtree (RQT) represents the partitioning of a TU. In HEVC, a PU represents inter-frame prediction data, and a TU represents residual data. An intra-predicted CU includes intra-frame prediction information, such as an intra-frame mode indication.
[0055] As another example, the video encoder 200 and the video decoder 300 may be configured to operate according to JEM or VVC. According to JEM or VVC, a video codec (such as the video encoder 200) partitions a picture into a plurality of codec tree units (CTUs). The video encoder may partition the CTU according to a tree structure such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure. The QTBT structure removes the concept of multiple partition types, such as the distinction between CU, PU, and TU of HEVC. However, in some examples, TU and CU may be partitioned differently. That is, TU may include a plurality of sub-TUs having shapes and sizes different from CU. The QTBT structure includes two levels: a first level partitioned according to quadtree partitioning, and a second level partitioned according to binary tree partitioning. The root node of the QTBT structure corresponds to the CTU. The leaf nodes of the binary tree correspond to the codec unit (CU).
[0056] In the MTT partitioning structure, blocks can be partitioned using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of triple tree (TT) (also known as ternary tree (TT) partitioning). Triple tree or ternary tree partitioning is a partitioning in which a block is partitioned into three sub-blocks. In some examples, the ternary tree or ternary tree partitioning divides the block into three sub-blocks instead of dividing the original block through the center. The partitioning types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.
[0057] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT structure or MTT structure to represent each of the luma component and the chroma component, while in other examples, the video encoder 200 and the video decoder 300 may use two or more QTBT structures or MTT structures, such as one QTBT / MTT structure for the luma component and another QTBT / MTT structure for the two chroma components (or two QTBT / MTT structures for corresponding chroma components).
[0058] The video encoder 200 and the video decoder 300 may be configured to use quadtree segmentation, QTBT segmentation, MTT segmentation, or other segmentation structures in accordance with HEVC. For purposes of explanation, the description of the disclosed technology is presented with respect to QTBT segmentation. However, it should be understood that the disclosed technology may also be applied to a video codec configured to use quadtree segmentation or other types of segmentation.
[0059] Blocks (e.g., CTUs or CUs) can be grouped in various ways in a picture. As an example, a brick may refer to a rectangular area of a CTU row within a particular tile in a picture. A tile may be a rectangular area of a CTU within a particular tile column and a particular tile row in a picture. A tile column refers to a rectangular area of a CTU having a height equal to the height of the picture and a width specified by a syntax element (e.g., such as in a picture parameter set). A tile row refers to a rectangular area of a CTU having a height specified by a syntax element (e.g., such as in a picture parameter set) and a width equal to the width of the picture.
[0060] In some examples, a tile may be partitioned into multiple blocks, each of which may include one or more CTU rows within the tile. A tile that is not partitioned into multiple blocks may also be referred to as a tile. However, a block that is a true subset of a tile may not be referred to as a tile.
[0061] The blocks in a picture can also be arranged in slices. A slice can be an integer number of blocks of a picture that can be exclusively contained in a single network abstraction layer (NAL) unit. In some examples, a slice includes a continuous sequence of multiple complete blocks or just complete blocks of one tile.
[0062] This disclosure uses "N×N" and "N by N" interchangeably to refer to the sample dimensions of a block (such as a CU or other video block) in terms of vertical and horizontal dimensions, for example, 16×16 samples or 16 by 16 samples. Typically, a 16×16 CU will have 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an N×N CU typically has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. The samples in a CU can be arranged in rows and columns. In addition, a CU does not necessarily need to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may include N×M samples, where M is not necessarily equal to N.
[0063] The video encoder 200 encodes video data representing prediction and / or residual information and other information for a CU. The prediction information indicates how the CU will be predicted in order to form a prediction block for the CU. The residual information generally represents the sample-by-sample difference between the samples of the CU before encoding and the prediction block.
[0064] In order to predict a CU, the video encoder 200 can generally form a prediction block for the CU by inter-frame prediction or intra-frame prediction. Inter-frame prediction generally refers to predicting a CU from data of a previously coded picture, while intra-frame prediction generally refers to predicting a CU from previously coded data of the same picture. In order to perform inter-frame prediction, the video encoder 200 can use one or more motion vectors to generate a prediction block. The video encoder 200 can generally perform a motion search to identify a reference block that closely matches the CU, for example, based on the difference between the CU and the reference block. The video encoder 200 can use the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD) or other such difference calculations to calculate a difference metric to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 can use unidirectional prediction or bidirectional prediction to predict the current CU.
[0065] Some examples of JEM and VVC also provide an affine motion compensation mode, which can be considered an inter-prediction mode. In the affine motion compensation mode, the video encoder 200 can determine two or more motion vectors representing non-translational motion such as: enlargement or reduction, rotation, perspective motion, or other irregular motion types.
[0066] To perform intra prediction, the video encoder 200 can select an intra prediction mode to generate a prediction block. Certain examples of JEM and VVC provide sixty-seven intra prediction modes, including various directional modes, as well as a plane mode and a DC mode. Typically, the video encoder 200 selects the following intra prediction modes: neighboring samples describing a current block (e.g., a block of a CU) to predict samples of the current block. Assuming that the video encoder 200 encodes and decodes CTUs and CUs in a raster scan order (from left to right, from top to bottom), such samples can typically be located above, to the upper left, or to the left of the current block in the same picture as the current block.
[0067] The video encoder 200 encodes data representing a prediction mode for the current block. For example, for an inter-frame prediction mode, the video encoder 200 may encode data representing which of various available inter-frame prediction modes to use, and motion information for the corresponding mode. For example, for unidirectional or bidirectional inter-frame prediction, the video encoder 200 may encode motion vectors using advanced motion vector prediction (AMVP) or merge mode. For an affine motion compensation mode, the video encoder 200 may use a similar mode to encode motion vectors.
[0068] After prediction of a block, such as intra prediction or inter prediction of a block, the video encoder 200 may calculate residual data for the block. Residual data such as a residual block represents the sample-by-sample difference between the block and a prediction block for the block formed using a corresponding prediction mode. The video encoder 200 may apply one or more transforms to the residual block to produce transformed data in a transform domain rather than a sample domain. The result of the transform of the residual block may be a residual block in a transform domain (also referred to as a frequency domain). A residual block is an example of a TU, and in one or more instances, a TU may be further partitioned into a plurality of sub-TUs (e.g., residual sub-blocks).
[0069] As an example, the video encoder 200 may apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. Additionally, the video encoder 200 may apply a secondary transform after the primary transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), etc. The video encoder 200 generates transform coefficients after applying one or more transforms. The use of DCT is provided as an example and should not be considered limiting. There may be other transform types, and the examples described in the present disclosure may utilize one or more of these transform types. For example, the video encoder 200 may be configured to select a transform type for a transform from a sample domain to a transform (e.g., frequency) domain, and the video decoder 300 may be configured to select a transform type for a transform (e.g., inverse transform) from a transform domain back to a sample domain. In some examples, video encoder 200 may be configured to select a transform type, and video decoder 300 may be configured to infer the transform type to be used based on various criteria, such that video encoder 200 and video decoder 300 select the same transform type. By inferring the transform type, video encoder 200 may not need to explicitly signal information indicating the transform type, and video decoder 300 may not need to receive information indicating the transform type.
[0070] As described above, after any transform used to produce transform coefficients, the video encoder 200 can perform quantization of the transform coefficients. Quantization generally refers to the process of quantizing the transform coefficients to possibly reduce the amount of data used to represent the transform coefficients, thereby providing further compression. By performing the quantization process, the video encoder 200 can reduce the bit depth associated with some or all of the transform coefficients. For example, the video encoder 200 can round down an n-bit value to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, the video encoder 200 can perform a bit-by-bit right shift of the value to be quantized.
[0071] After quantization, the video encoder 200 can scan the transform coefficients to generate a one-dimensional vector from a two-dimensional matrix including the quantized transform coefficients. The scan can be designed to place higher energy (and therefore lower frequency) transform coefficients in front of the vector and lower energy (and therefore higher frequency) transform coefficients in the back of the vector. In some examples, the video encoder 200 can scan the quantized transform coefficients using a predefined scan order to generate a serialized vector, and then entropy encode the quantized transform coefficients of the vector. In other examples, the video encoder 200 can perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, the video encoder 200 can entropy encode the one-dimensional vector, for example, according to context-adaptive binary arithmetic coding (CABAC). The video encoder 200 can also entropy encode values for syntax elements, which describe metadata associated with the encoded video data for use by the video decoder 300 when decoding the video data.
[0072] To perform CABAC, the video encoder 200 may assign context within a context model to a symbol to be sent. The context may relate to, for example, whether neighboring values of the symbol are zero values. The probability determination may be based on the context assigned to the symbol.
[0073] The video encoder 200 may further generate, for example, block-based syntax data, picture-based syntax data, and sequence-based syntax data or other syntax data such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS) to the video decoder 300 in a picture header, a block header, a slice header. The video decoder 300 may also decode such syntax data to determine how to decode the corresponding video data.
[0074] In this way, the video encoder 200 can generate a bitstream that includes encoded video data, such as syntax elements describing the partitioning of a picture into blocks (e.g., CUs) and prediction and / or residual information for the blocks. Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.
[0075] In general, the video decoder 300 performs a process that is the reverse of that performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 may decode values for syntax elements of the bitstream using CABAC in a manner that is reversed but substantially similar to the CABAC encoding process of the video encoder 200. The syntax elements may define partitioning information of a picture into CTUs, and partitioning of each CTU according to a corresponding partitioning structure such as a QTBT structure to define CUs of the CTU. The syntax elements may further define prediction and residual information for a block (e.g., CU) of video data.
[0076] The residual information may be represented by, for example, quantized transform coefficients. The video decoder 300 may inverse quantize and inverse transform the quantized transform coefficients of the block to reproduce a residual block for the block. The video decoder 300 uses the signaled prediction mode (intra-frame or inter-frame prediction) and related prediction information (e.g., motion information for inter-frame prediction) to form a prediction block for the block. The video decoder 300 may then combine the prediction block and the residual block (on a sample-by-sample basis) to reproduce the original block. The video decoder 300 may perform additional processing, such as performing a deblocking process to reduce visual artifacts along the boundaries of the blocks.
[0077] According to the technology of the present disclosure, a residual block (e.g., TU) can be partitioned to form multiple residual sub-blocks (e.g., sub-TUs). For example, a TU can be partitioned into one of the following: four square sub-TUs (such as quadtree partitioning), two rectangular sub-TUs (such as binary partitioning), or three rectangular sub-TUs (such as ternary partitioning). Another example may be a TU partitioned into four rectangular sub-TUs. In addition, there may be a variety of different transform types (e.g., different types of discrete cosine transforms (DCT) and discrete sine transforms (DST).
[0078] This disclosure describes example ways in which the video encoder 200 can signal whether a residual block (e.g., a TU) is partitioned and the video decoder 300 can determine whether the residual block is partitioned, as well as ways in which the residual block is partitioned (e.g., determining a partition tree type). Likewise, this disclosure describes example ways in which a transform type (also referred to as a transform kernel) to be used is determined.
[0079] For example, the video decoder 300 may receive information indicating whether a residual block is partitioned in a bitstream including an encoded representation of video data, and information indicating a partition tree type for the residual block based on the residual block being partitioned, wherein the residual block indicates a difference between a current block and a prediction block. The video decoder 300 may determine, based on the received information that the residual block is partitioned and the partition tree type for the residual block, a plurality of residual sub-blocks into which the residual block is partitioned according to the partition tree type. The video decoder 300 may generate residual data for the current block based at least in part on the residual block being partitioned into a plurality of residual sub-blocks according to the partition tree type. The video decoder 300 may use the residual data to decode the current block.
[0080] In another example, the video encoder 200 may determine that a residual block for a current block of video data is partitioned into a plurality of residual sub-blocks according to a partition tree type. The video encoder 200 may encode a bitstream as an encoded representation of the video data, the bitstream signaling information indicating whether the residual block is partitioned, and further signaling information indicating a partition tree type for the partitioned residual block.
[0081] The present disclosure may generally involve "signaling" certain information, such as syntax elements. The term "signaling" may generally relate to the communication of values for syntax elements and / or other data used to decode encoded video data. That is, the video encoder 200 may signal values for syntax elements in a bitstream. Typically, signaling involves generating values in a bitstream. As described above, the source device 102 may transmit the bitstream to the destination device 116 substantially in real time or in non-real time, such as may occur when storing syntax elements to the storage device 112 for later retrieval by the destination device 116.
[0082] Figure 2A and Figure 2Bis a conceptual diagram showing an example quadtree binary tree (QTBT) structure 130, and a corresponding codec tree unit (CTU) 132. Solid lines represent quadtree partitions, while dashed lines indicate binary tree partitions. In each partition (i.e., non-leaf) node of the binary tree, a flag is signaled to indicate which partition type (i.e., horizontal or vertical) is used, where in this example, 0 indicates horizontal partitioning and 1 indicates vertical partitioning. For quadtree partitioning, there is no need to indicate the partition type because the quadtree node divides the block horizontally and vertically into 4 equally sized sub-blocks. Accordingly, the video encoder 200 can encode and the video decoder 300 can decode syntax elements (such as partition information) for the regional tree level (i.e., solid line) of the QTBT structure 130 and syntax elements (such as partition information) for the prediction tree level (i.e., dashed line) of the QTBT structure 130. The video encoder 200 may encode and the video decoder 300 may decode video data such as prediction and transform data for the CU represented by the terminal leaf node of the QTBT structure 130 .
[0083] generally, Figure 2B The CTU 132 may be associated with parameters defining the size of blocks corresponding to nodes of the first and second levels in the QTBT structure 130. These parameters may include a CTU size (in terms of samples, indicating the size of the CTU 132), a minimum quadtree size (MinQTSize, indicating the minimum allowed quadtree leaf node size), a maximum binary tree size (MaxBTSize, indicating the maximum allowed binary tree root node size), a maximum binary tree depth (MaxBTDepth, indicating the maximum allowed binary tree depth), and a minimum binary tree size (MinBTSize, indicating the minimum allowed binary tree leaf node size).
[0084] The root node of the QTBT structure corresponding to the CTU can have four child nodes at the first level of the QTBT structure, each of which can be segmented according to the quadtree segmentation. That is, the nodes of the first level are leaf nodes (no child nodes) or have four child nodes. The example of the QTBT structure 130 represents such nodes as a parent node and a child node including a solid line for branching. If the nodes of the first level are not larger than the maximum allowed binary tree root node size (MaxBTSize), these nodes can be further segmented by the corresponding binary tree. The binary tree partitioning of a node can be iterated until the node obtained by the partition reaches the minimum allowed binary tree leaf node size (MinBTSize) or the maximum allowed binary tree depth (MaxBTDepth). The example of the QTBT structure 130 represents such nodes as having a dotted line for branching. The binary tree leaf node is called a codec unit (CU), which is used for prediction (e.g., intra-picture or inter-picture prediction) and transformation without any further segmentation. As described above, a CU may also be referred to as a "video block" or "block".
[0085] In one example of a QTBT partitioning structure, the CTU size is set to 128×128 (luminance sample and two corresponding 64×64 chrominance samples), MinQTSize is set to 16×16, MaxBTSize is set to 64×64, MinBTSize (for both width and height) is set to 4, and MaxBTDepth is set to 4. Quadtree partitioning is first applied to the CTU to generate a quadtree leaf node. The quadtree leaf node can have a size from 16×16 (i.e., MinQTSize) to 128×128 (i.e., CTU size). If the leaf quadtree node is 128×128, the leaf quadtree node will not be further divided by the binary tree because the size exceeds MaxBTSize (i.e., 64×64 in this example). Otherwise, the leaf quadtree node will be further divided by the binary tree. Therefore, the quadtree leaf node is also the root node for the binary tree and has a binary tree depth of 0. When the binary tree depth reaches MaxBTDepth (4 in this example), no further splitting is allowed. When a binary tree node has a width equal to MinBTSize (4 in this example), this means that no further horizontal splitting is allowed. Similarly, a binary tree node with a height equal to MinBTSize means that no further vertical splitting is allowed for the binary tree node. As described above, the leaf nodes of the binary tree are called CUs and are further processed according to prediction and transformation without further segmentation.
[0086] As described above, the video encoder 200 can apply one or more transforms to the residual block to produce transformed data in the transform domain rather than the sample domain (e.g., to generate the residual block in the transform domain). Examples of transforms such as discrete sine transform (DST) and discrete cosine transform (DCT) are described below. Transform schemes used in HEVC are also described.
[0087] Transformation indicates the process of deriving an alternative representation of the input signal. Given an N-point vector x = [x0, x1, ..., x N-1 ] T and given vectors {φ0,φ1,…,φ M-1}, we can use φ0,φ1,…,φ M-1 The linear combination of can be used to approximate or accurately represent x. The formula can be as follows:
[0088]
[0089] In the above, It can be an approximation or equivalent of x. The vector f = [f i ,f2,..,f M-1 ] is called the transform coefficient vector, and {φ0,φ1,…,φ M-1} are the transformation basis vectors.
[0090] In the case of video coding, transform coefficients are substantially uncorrelated and sparse. For example, the energy of the input vector x is concentrated only on a few transform coefficients, while the remaining majority of transform coefficients are typically close to zero.
[0091] The input data used for the transform by the video encoder 200 and the video decoder 300 may be different. For example, for the video encoder 200, the input data being transformed is residual data to generate a transform coefficient block by converting spatial domain values of the residual into frequency domain values (e.g., coefficient values) of a transform coefficient block. For the video decoder 300, the input data being transformed is a transform coefficient block (e.g., possibly after dequantization) to generate residual data by converting frequency domain values of the transform coefficient block into spatial domain values of the residual. Because the video decoder 300 performs the inverse process of the process of the video encoder 200, the transform performed by the video decoder 300 may be considered an inverse transform. For convenience, the present disclosure describes a transform of input data, while it should be understood that the input data for the video encoder 200 and the video decoder 300 are different, and the transform performed by the video decoder 300 may be the inverse of the transform of the video encoder 200.
[0092] Given specific input data, the optimal transformation in terms of energy compaction is the so-called Karnan-Loev transform (KLT), which uses the eigenvectors of the covariance matrix of the input data as transformation basis vectors. Therefore, KLT is a data-dependent transformation and does not have a general mathematical formula. However, under certain assumptions (for example, such as when the input data forms a first-order stationary Markov process), the corresponding KLT is actually a member of the sinusoidal family of unitary transforms, which was introduced in U.S. application No. 16 / 426,749 filed on May 30, 2019 and in Adaptive multiple transforms with reduced signaling overhead by HE Gilmez, Y.-H. Chao, A. Said, V. Seregin and M. Karczewicz. The sinusoidal family of unitary transforms indicates a transformation using a transformation basis vector with the formula:
[0093] φ m (k) = A·e ikθ +B·e -ikθ
[0094] In the above, 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.
[0095] Several well-known transforms including discrete Fourier, cosine, sine, and KLT (for first order stationary Markov processes) are members of this sinusoidal family of unitary transforms. According to Jain, AK's sinusoidal family of unitary transforms, IEEE Trans. on Pattern Analysis and Machine Intelligence, 1,356, 1979, the full set of 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 θ), and the complete definitions of the different types of DCT and DST are given below.
[0096] Assume that the input N-point vector is represented as x=[x0,x1,…,x N-1 ] T , and it is transformed into y=[y0,y1,…,y N-1 ]T Another N-point transformation coefficient vector, the process can be further described according to one of the following transformation formulas, where k ranges from 0 to N-1, and the formula includes:
[0097] DCT Type-I (DCT-1):
[0098]
[0099] in,
[0100]
[0101] DCT Type-II (DCT-2):
[0102]
[0103] in,
[0104] DCT Type-III (DCT-3):
[0105]
[0106] in,
[0107] DCT Type-IV (DCT-4):
[0108]
[0109] DCT type-V (DCT-5):
[0110]
[0111] in, DCT Type-VI (DCT-6):
[0112]
[0113] in, DCT Type-VII (DCT-7):
[0114]
[0115] in, DCT Type-VIII (DCT-8):
[0116]
[0117] DST Type-I (DST-1):
[0118]
[0119] DST Type-II (DST-2):
[0120]
[0121] in, DST Type-III (DST-3):
[0122]
[0123] in,
[0124] DST Type-IV (DST-4):
[0125]
[0126] DST Type-V (DST-5):
[0127]
[0128] DST Type-VI (DST-6):
[0129]
[0130] DST Type-VII (DST-7):
[0131]
[0132] DST Type-VIII (DST-8):
[0133]
[0134] in,
[0135] 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.
[0136] Without loss of generality, all of the above transformation types can be expressed using the following general formula:
[0137]
[0138] In the above equation, T is the transform matrix specified by the definition of a particular transform (e.g., DCT Type-I to DCT Type-VIII, or DST Type-I to DST Type-VIII), and the row vectors of T (e.g., [T i,0 ,T i,1,T i,2 ,…,T i,N-1 ]) is the i-th transformation basis vector. A transformation applied to an N-point input vector is called an N-point transformation.
[0139] Also note that the above transformation formula applied to 1-D input data x can be expressed in matrix multiplication form as follows
[0140] y=T·x
[0141] In the above equation, T indicates a transform matrix, x indicates an input data vector, and y indicates an output transform coefficient vector.
[0142] Transformations for two-dimensional (2-D) input data are described below. The transformations described above can be applied to 1-D input data, and the transformations can also be extended for 2-D input data sources. For example, assume that X is an input M×N data array. Some methods of applying transformations to 2-D input data include separable and non-separable 2-D transformations.
[0143] The separable 2-D transform sequentially applies a 1-D transform to the horizontal and vertical vectors of X, as follows:
[0144] Y=C·X·R T
[0145] In the above equations, C and R represent the given M×M and N×N transformation matrices, respectively. From the formula, C applies a 1-D transformation to the column vector of X, and R applies a 1-D transformation to the row vector of X. In the present disclosure, for simplicity, C and R are represented as the left (vertical) transformation and the right (horizontal) transformation, and the two of them form a transformation pair. There is a case where C is equal to R and is an orthogonal matrix. In such a case, the separable 2-D transformation is determined by only one transformation matrix.
[0146] A non-separable 2-D transform first regroups all elements of X into a single vector, X', by performing the following mathematical mapping (as an example):
[0147] X′ (i·N+j) =X i,j
[0148] The 1-D transformation T' is then applied to X' as follows:
[0149] Y=T′·X
[0150] In the above equation, T' is a (M*N)×(M*N) transformation matrix.
[0151] In video codecs, separable 2-D transform is always applied because it requires fewer operation (addition, multiplication) counts compared to 1-D transform.
[0152] The following describes the transform types applied in HEVC. In some video codecs such as H.264 / AVC, 4-point and 8-point discrete cosine transform (DCT) type-II integer approximations are always applied to both intra-frame prediction residuals and inter-frame prediction residuals. In order to better adapt to various statistics of residual samples, more flexible transform types other than DCT type-II are used in later video codecs. For example, in HEVC, an integer approximation of a 4-point type-VII discrete sine transform (DST) is used for intra-frame prediction residuals, which is theoretically confirmed and experimentally verified in SA Martucci's "Symmetric convolution and the discrete sine and cosine transforms" in IEEE Trans. Sig. Processing SP-42, 1038-1051 (1994) that for residual vectors generated along the intra-frame prediction direction, DST type-VII is more efficient than DCT type-II (for example, for row residual vectors generated by the horizontal intra-frame prediction direction, DST type-VII is more efficient than DCT type-II). In HEVC, for 4×4 luma intra-frame prediction residual blocks, only the integer approximation of the 4-point DST type-VII is applied. The 4-point DST-VII used in HEVC is shown below,
[0153] 4x4 DST-VII:
[0154] {29,55,74,84}
[0155] {74,74,0,-74}
[0156] {84,-29,-74,55}
[0157] {55,-84,74,-29}
[0158] In HEVC, for residual blocks that are not 4×4 luma intra prediction residual blocks, integer approximations of 4-point, 8-point, 16-point, and 32-point DCT type-II are also applied as follows:
[0159] 4-Point DCT-II:
[0160] {64,64,64,64}
[0161] {83,36,-36,-83}
[0162] {64,-64,-64,64}
[0163] {36,-83,83,-36}
[0164] 8-point DCT-II:
[0165] {64,64,64,64,64,64,64,64}
[0166] {89,75,50,18,-18,-50,-75,-89}
[0167] {83,36,-36,-83,-83,-36,36,83}
[0168] {75,-18,-89,-50,50,89,18,-75}
[0169] {64,-64,-64,64,64,-64,-64,64}
[0170] {50,-89,18,75,-75,-18,89,-50}
[0171] {36,-83,83,-36,-36,83,-83,36}
[0172] {18,-50,75,-89,89,-75,50,-18}
[0173] 16-point DCT-II:
[0174] {64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64}
[0175] {90,87,80,70,57,43,25,9,-9,-25,-43,-57,-70,-80,-87,-90}
[0176] {89,75,50,18,-18,-50,-75,-89,-89,-75,-50,-18,18,50,75,89}
[0177] {87,57,9,-43,-80,-90,-70,-25,25,70,90,80,43,-9,-57,-87}
[0178] {83,36,-36,-83,-83,-36,36,83,83,36,-36,-83,-83,-36,36,83}
[0179] {80,9,-70,-87,-25,57,90,43,-43,-90,-57,25,87,70,-9,-80}
[0180] {75,-18,-89,-50,50,89,18,-75,-75,18,89,50,-50,-89,-18,75}
[0181] {70,-43,-87,9,90,25,-80,-57,57,80,-25,-90,-9,87,43,-70}
[0182] {64,-64,-64,64,64,-64,-64,64,64,-64,-64,-64,64,-64,64,-64,64}
[0183] {57,-80,-25,90,-9,-87,43,70,-70,-43,87,9,-90,25,80,-57}
[0184] {50,-89,18,75,-75,-18,89,-50,-50,89,-18,-75,75,18,-89,50}
[0185] {43,-90,57,25,-87,70,9,-80,80,-9,-70,87,-25,-57,90,-43}
[0186] {36,-83,83,-36,-36,83,-83,36,36,-83,83,-36,-36,83,-83,36}
[0187] {25,-70,90,-80,43,9,-57,87,-87,57,-9,-43,80,-90,70,-25}
[0188] {18,-50,75,-89,89,-75,50,-18,-18,50,-75,89,-89,75,-50,18}
[0189] {9,-25,43,-57,70,-80,87,-90,90,-87,80,-70,57,-43,25,-9}
[0190] 32-point DCT-II:
[0191] {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,6,64,64,64,64}
[0192] {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}
[0193] {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}
[0194] {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}
[0195] {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}
[0196] {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}
[0197] {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}
[0198] {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}
[0199] {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}
[0200] {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}
[0201] {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}
[0202] {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}
[0203] {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}
[0204] {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}
[0205] {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}
[0206] {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}
[0207] {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}
[0208] {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}
[0209] {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}
[0210] {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}
[0211] {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}
[0212] {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}
[0213] {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}
[0214] {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}
[0215] {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}
[0216] {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}
[0217] {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}
[0218] {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}
[0219] {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}
[0220] {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}
[0221] {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}
[0222] {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}
[0223] Figure 3A and Figure 3Bis a conceptual diagram showing an example transform scheme based on HEVC's residual quadtree. In HEVC, a transform codec structure using a residual quadtree (RQT) is applied to accommodate various characteristics of residual blocks, which is briefly described in "Towards jointly optimal spatial prediction and adaptive transform in video / image coding" by J. Han, A. Saxena, and K. Rose, IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), March 2010, pp. 726-729. Additional information about RQT can be found at: http: / / www.hhi.fraunhofer.de / fields-of-competence / image-processing / research-groups / image-video-coding / hevc-high-efficiency-video-coding / transform-coding-using-the-residual-quadtree-rqt.html.
[0224] In RQT, each picture is divided into codec tree units (CTUs), which are encoded and decoded in raster scan order for a specific tile or slice. CTU is a square block and represents the root of a quadtree (i.e., a codec tree). The size of a CTU can range from 8×8 to 64×64 luminance samples, but 64×64 is typically used. Each CTU can be further divided into smaller square blocks called codec units (CUs). After the CTU is recursively divided into CUs, each CU is further divided into prediction units (PUs) and transform units (TUs). The partitioning of CUs into TUs is performed recursively based on a quadtree method, so the residual signal of each CU is encoded and decoded through a tree structure (i.e., a residual quadtree (RQT)). The TU size allowed by RQT is from 4×4 to 32×32 luminance samples.
[0225] Figure 3A An example is depicted in which CU 134 includes 10 TUs labeled with letters a through j, and the corresponding block partitioning. Figure 3B Each node of the RQT 136 shown actually corresponds to Figure 3AEach TU is processed in a depth-first tree traversal order. Figure 3A , which follows a recursive Z-scan with a depth-first traversal. The quadtree approach enables the transform to adapt to the varying spatial frequency characteristics of the residual signal.
[0226] In general, a larger transform block size with a larger spatial support provides better frequency resolution. However, a smaller transform block size with a smaller spatial support provides better spatial resolution. The trade-off between spatial resolution and frequency resolution is chosen by the encoder mode decision, for example, based on rate-distortion optimization techniques. The rate-distortion optimization technique calculates the weighted sum of the encoding and decoding bits and the reconstruction distortion, i.e., the rate-distortion cost, for each codec mode (e.g., a specific RQT partition structure), and selects the codec mode with the minimum rate-distortion cost as the best mode.
[0227] Three parameters are defined in the 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 from 4×4 to 32×32 samples, which corresponds to the supported block transforms mentioned in the previous paragraph. The maximum allowed depth of the RQT limits the number of TUs. A maximum depth equal to zero means that a codec block (CB) cannot be further divided if each included TB reaches the maximum allowed transform size (e.g., 32×32).
[0228] All these parameters interact and affect the RQT structure. Consider the case 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 will result in a 64×64 TB, which is not allowed. The RQT parameters, i.e., maximum RQT depth, minimum and maximum transform size are signaled in the bitstream at the sequence parameter set level. Regarding the RQT depth, different values may be specified and signaled for intra- and inter-coded CUs.
[0229] The quadtree transform is applied to both intra residual blocks and inter residual blocks. Typically, a DCT-II transform of the same size as the current residual quadtree partition is applied to the residual block. However, if the current residual quadtree block is 4×4 and is generated by intra prediction, the above-mentioned 4×4 DST-VII transform is applied.
[0230] In HEVC, larger size transforms (eg, 64x64 transforms) are not adopted, primarily due to their limited benefit considerations and relatively high complexity for relatively small resolution videos.
[0231] Figure 4 is a block diagram illustrating an example system 140 for hybrid video coding with adaptive transform selection. The example techniques described in this disclosure are applicable to Figure 4 A typical adaptive transform coding scheme is shown, in which for each block of prediction residual, the encoder can choose a different transform, and the choice of transform is encoded as side information for signaling.
[0232] In this example, the system 140 includes a block separation unit 142, a block transformation unit 144, a quantization unit 146, a block prediction unit 148, a transform bank 150, an entropy encoding and decoding unit 152, a frame buffer 154, an inverse transformation unit 156, an inverse quantization unit 158, a residual generation unit 160 and a block reproduction unit 162.
[0233] Typically, block separation unit 142 generates blocks from a picture (i.e., frame) of video data. Block prediction unit 148 generates a prediction block (p) for a current block, and residual generation unit 160 generates a residual block (r) from the current (uncoded) block and the prediction block (p). Frame buffer 154 (also referred to as a decoded picture buffer (DPB) stores decoded data for the current picture and previously decoded frames (if any). Block prediction unit 148 can generate a prediction block from previously decoded data for one or more pictures stored in frame buffer 154.
[0234] The block transform unit 144 transforms one or more transforms (T (t) ) is applied to a residual block including residual data in the spatial domain to generate a transform block (T) representing residual data in the frequency domain. (t) r). Transform( T(t) ) may be, for example, a discrete cosine transform (DCT), a discrete sine transform (DST), a horizontal and / or vertical transform, a Karnjan-Loeve transform (KLT), or any other such transform. Block transform unit 144 provides transform blocks (T (t) r), and provides an indication of the transform (t) to the transform library 150 and the entropy codec unit 152. The transform library 150 provides one or more transform matrices to the block transform unit 144 and the inverse transform unit 156.
[0235] According to the technology of the present disclosure, the block transform unit 144 can partition the residual block of the current block into multiple residual sub-blocks according to the partition tree type (such as one of the following: quadtree partition, binary tree partition, ternary tree partition or four TU partition), and the block transform unit can provide an indication of the partition of the residual block to the entropy encoding and decoding unit 152.
[0236] The quantization unit 146 quantizes the transform coefficients of the transform block and provides the quantized transform block to the entropy codec unit 152 and the inverse quantization unit 158. The entropy codec unit 152 encodes syntax elements representing, for example, a transform indication (t), quantized transform coefficients, prediction information (e.g., a prediction mode and corresponding information such as a location of reference data to be used in the prediction mode, e.g., motion information for inter prediction).
[0237] The entropy encoding and decoding unit 152 can use the technology of the present disclosure to entropy encode syntax elements, which indicate: for a residual block, whether the residual block is partitioned, and if the residual block is partitioned, how the residual block is partitioned. The entropy encoding and decoding unit 152 can encode a flag for the residual block to signal whether the residual block is partitioned. When the residual block is partitioned into multiple sub-blocks, the entropy encoding and decoding unit 152 can also encode an index value indicating the partition type for the residual block. For example, the block transformation unit 144 can be configured to construct a list including information for a set of tree types. The set of tree types includes one or more of quadtree partitioning and binary tree partitioning. The set of tree types can also include ternary tree partitioning and four TU partitioning. Examples of different tree types are described in more detail below. The block transformation unit 144 can determine an index value identifying the partition type from the set of tree types, and the entropy encoding and decoding unit 152 can encode the index value. The entropy encoding and decoding unit 152 may also encode any other partitioning information for the residual block, such as whether the residual block is partitioned horizontally or vertically, whether the partitioning is symmetric or asymmetric, and the like.
[0238] The inverse quantization unit 158 may inverse quantize (i.e., dequantize) the quantized transform coefficients received from the quantization unit 146. The inverse transform unit 156 may determine the partitioning of the residual block based on the entropy-encoded syntax elements indicating whether and how the partitioned block is partitioned to determine the partitioning of the residual block, and may apply an inverse transform scheme to the transform coefficients received from the inverse quantization unit 158 to reproduce the residual block (r') for the current block. The block reproduction unit 162 further combines the prediction block (p) from the block prediction unit 148 with the reproduced residual block (r') to form a decoded block, which is stored in the frame buffer 154.
[0239] The techniques of this disclosure may be performed by system 140 or a corresponding decoding system. In general, the techniques of this disclosure are applicable to adaptive transform coding schemes, where for each block of prediction residuals, a different transform may be selected by video encoder 200, signaled as side information, and determined by video decoder 300 using the side information. The side information is an example and should not be considered limiting.
[0240] In practice, to reduce computational complexity, block transforms are often computed in a separable manner, i.e., horizontal and vertical lines are transformed independently, e.g. Figure 5A and Figure 5B shown. Figure 5A and Figure 5B is a conceptual diagram showing horizontal transform and vertical transform implemented as separate transforms. Figure 5A represents a set of H horizontal transforms 170, and Figure 5B Denotes a set of W vertical transforms 172. Specifically, horizontal and vertical lines of residual values may be independently transformed using horizontal transform 170 and vertical transform 172, respectively.
[0241] In video codec standards prior to HEVC, only fixed separable transforms were used, where DCT-2 was used both vertically and horizontally. In HEVC, in addition to DCT-2, DST-7 is also used for 4×4 blocks as a fixed separable transform. U.S. Patent Publication No. 2016 / 0219290 and U.S. Patent Publication No. 2018 / 0020218 cover adaptive extensions of those fixed transforms, and the example of AMT in U.S. Patent Publication No. 2016 / 0219290 has been adopted in the Joint Experimental Model (JEM) of the Joint Video Experts Group (JVET), see X. Zhao, J. Chen, M. Karczewicz, L. Zhang, X. Li and W.-J. Chien, "Enhanced multiple transform for video coding", Proc. Data Compression Conference, March 2016, pp. 73-82.
[0242] The AMT design described in U.S. Patent Publication No. 2016 / 0219290 and U.S. Patent Publication No. 2018 / 0020218 provides the video encoder 200 with 5 transform options to select on a per-block basis (this selection is usually made based on a rate-distortion metric). The selected transform index is then signaled to the video decoder 300.
[0243] Figure 6 is a conceptual diagram showing the transformation signaling notification. For example, Figure 6The signaling proposed in U.S. Patent Publication No. 2016 / 0219290 and U.S. Patent Publication No. 2018 / 0020218 is shown, where 1 bit is used to signal the default transformation, and 2 additional bits (i.e., 3 bits in total) are used to signal 4 transformations. For example, 0 (i.e., 1 bit) is used to signal one of the five transformations (the default transformation), and 3 bits (i.e., 100, 101, 110, and 111) are used to signal the other four transformations.
[0244] In U.S. Patent Publication No. 2016 / 0219290 and U.S. Patent Publication No. 2018 / 0020218, the default transform is selected as a separable 2-D DCT, which applies DCT-2 both vertically and horizontally. The rest of the AMT is defined based on the intra mode information in U.S. Patent Publication No. 2016 / 0219290. U.S. Patent Publication No. 2018 / 0020218 proposes an extension to U.S. Patent Publication No. 2016 / 0219290 by defining the set of those 4 transforms based on prediction mode and block size information.
[0245] In the VVC reference software version VTM 3.0, Figure 6 The signaling scheme shown is used. Specifically, for each codec unit (CU), a single bit (flag) is used to determine whether (i) DCT2 is used in both the horizontal and vertical directions, or (ii) two additional bits (called AMT / MTS index) are used to specify a 1-D transform applied horizontally or vertically. The four transforms are defined by assigning DST-7 / DCT-8 to be applied to the rows / columns of a given block. For example, MTS index = 0 corresponds to a separable transform in which DST-7 is applied both horizontally and vertically, while MTS index = 1 corresponds to applying DCT-8 horizontally and DST-7 vertically.
[0246] Currently in VVC (and reference software VTM-3.0), the transform scheme may not have a flexible partitioning method for transform units (TUs), where the transform block size is the same as the codec unit (CU) size. In fact, TU partitioning techniques such as (described above) RQT can be used to achieve better compression performance, because the partitioning allows the transform to capture energy located in different areas via a more flexible partitioning. The present disclosure discloses various tree-based partitioning designs that adapt to the AMT / MTS scheme currently adopted in VVC (VTM-3.0).
[0247] Various aspects of the present disclosure describe a more flexible partitioning scheme for transform units (TUs) that enables better compression performance and describes how to select transforms for such partitioning. Example techniques may be performed by the video encoder 200 and / or the video decoder 300. For example, in conjunction with Figure 7 and Figure 8 To describe the example. For example, Figure 7 is a conceptual diagram showing the corresponding tree-based partitioning of a block. Figure 8 is a conceptual diagram showing examples of quadtree-based segmentation, binary tree segmentation, and ternary tree segmentation. Figure 8 As shown, in ternary tree-based partitioning, a transform unit (TU) such as block 192A or block 192B is partitioned into three sub-TUs (e.g., P0, P1, and P2). In quadtree partitioning, a TU such as block 192C is partitioned into four square sub-TUs (e.g., P0, P1, P2, and P3). In binary tree partitioning, a TU such as block 192D, block 192E, block 192F, and / or block 192D is partitioned into two sub-TUs (e.g., P0 and P1).
[0248] A TU may be partitioned into one level or into multiple levels (depth > 0). Thus, a TU may be partitioned into multiple sub-TUs, and one or more of the multiple sub-TUs may themselves be further partitioned, and so on. Alternatively, a TU may not be partitioned, and the block size for a TU may be the same as the block size for a CU (depth = 0). Throughout this disclosure, the terms "residual block" and "residual sub-block" are used. It should be understood that a TU is an example of a residual block, and multiple sub-TUs are examples of multiple residual sub-blocks, and the techniques discussed herein with respect to residual blocks apply equally to TUs. Similarly, the techniques discussed herein with respect to TUs apply equally to residual blocks.
[0249] TUs at a particular level of partitioning can be partitioned based on a tree. Examples of trees and corresponding partitions include Figure 7 180B is a block partition based on the quadtree 184, in which a square or non-square TU is partitioned into four sub-TUs by partitioning the TU both horizontally and vertically. For example, block 190A is partitioned into four square blocks of equal size according to the quadtree partition 181A. Four-TU partition 181B is a block partition based on the quadtree 184, in which a square or non-square TU is partitioned into four sub-TUs by partitioning the TU only horizontally or only vertically. For example, block 190B is vertically partitioned into four vertical rectangular partitions according to the four-TU partition, and block 190C is horizontally partitioned into four horizontal rectangular partitions according to the four-TU partition. In this way, a residual block such as a TU can be partitioned according to at least one of the quadtree partition 181A and the four-TU partition 181B.
[0250] The binary tree partitioning 181C is a partitioning of a block based on a binary tree 186, in which a square or non-square TU is partitioned into two sub-TUs obtained by partitioning the TU horizontally or vertically. Blocks 190D and 190G are each vertically partitioned into two vertical rectangular partitions according to the binary tree partitioning 181C, and blocks 190E and 190F are each horizontally partitioned into two horizontal rectangular partitions according to the binary tree partitioning 181C. Blocks 190D and 190E are partitioned symmetrically to cause blocks 190D and 190E to each have two partitions of the same size. At the same time, blocks 190F and 190G are partitioned asymmetrically to cause blocks 190F and 190G to each have two partitions of different sizes. In this way, residual blocks such as TUs can be partitioned according to the binary tree partitioning 181C. The ternary tree partitioning 181D (also referred to as ternary tree partitioning) is a partitioning of a block based on a ternary tree 188 (also referred to as a ternary tree), in which a square or non-square TU is partitioned into three sub-TUs obtained by partitioning the TU horizontally or vertically at two separate positions. For example, the block 190H is horizontally partitioned into three horizontal rectangular partitions according to the ternary tree partitioning, and the block 190I is vertically partitioned into three vertical rectangular partitions according to the ternary tree partitioning. In this way, a residual block such as a TU can be partitioned according to the ternary tree partitioning 181D.
[0251] TU partitioning may be applied to square or non-square TU blocks. Figure 7 An example partitioning of a square block is shown, but these techniques also apply to non-square blocks, such that rectangular, and therefore non-square, TUs can be partitioned identically according to the partitioning trees described throughout this disclosure. For example, if a square TU is partitioned into two rectangular TUs according to a binary tree, one or both of the rectangular TUs can also be partitioned according to one of the partitioning trees. In this way, residual blocks such as TUs can be square or non-square, and both square and non-square residual blocks can be partitioned identically according to the techniques disclosed herein.
[0252] To signal the partition information, a flag (e.g., a partition flag) may be signaled in the bitstream to determine whether a partition exists in the TU. If the TU is partitioned (i.e., if the partition flag is enabled), additional partition / partition information may be signaled to specify the type of partition. Such additional index information may be the type of tree (e.g., a quadtree, a binary tree, a ternary tree, and / or a four-TU partition).
[0253] For example, the video encoder 200 may determine that a residual block for a current block of video data is partitioned into a plurality of residual sub-blocks according to a partition tree type; and may encode a bitstream as an encoded representation of the video data, the bitstream signaling information indicating whether the residual block is partitioned, and further signaling information indicating a partition tree type for the partitioned residual block. Similarly, a video decoder may receive information indicating whether the residual block is partitioned, and information indicating a partition tree type for the residual block based on the residual block being partitioned, in a bitstream including an encoded representation of the video data, wherein the residual block indicates a difference between a current block and a prediction block.
[0254] For a given / signaled tree type, the partition type may be further signaled. For example, for a ternary tree case (e.g., ternary tree partition 181D), a single bit may be used to specify whether the TU is partitioned horizontally (such as in block 190H) or vertically (such as in block 190I). For a binary tree case (e.g., binary tree partition 181C), the signaling may specify whether the TU is partitioned horizontally (such as in blocks 190E and 190F) or vertically (such as in blocks 190D and 190G), and whether the TU is partitioned symmetrically (such as in blocks 190D and 190E) or asymmetrically (such as in blocks 190F and 190G).
[0255] For example, the bitstream that signals the information indicating the partition tree type for the residual block may include index information into a set of tree types, and the set information of the tree types may include one or more of quadtree partitioning and binary tree partitioning. In addition, when the information indicating the partition tree type for the residual block indicates that the partition tree type is one of the binary tree partitions, the bitstream may further signal information indicating whether the residual block is horizontally partitioned or vertically partitioned.
[0256] In some examples, given a set of sub-TUs obtained after partitioning a TU, the coded block flag (referred to as cbf in VVC) may be inferred and / or limited depending on the prediction mode, partition tree type, partition type, or any other side information encoded in the bitstream. Figure 8 The subTU denoted as P1 in blocks 192A and 192B of can be constrained to always have a disable cbf flag (flag=0) so that no cbf signaling is required for P1. A similar scheme can also be used to infer or constrain the transform skip flag for each subTU.
[0257] In some examples, given a set of subTUs obtained after partitioning, an AMT / MTS index may be signaled for each subTU to specify a separable transform to apply to the subTU. In this way, multiple transforms may be applied to each subTU.
[0258] In some examples, even if a TU is partitioned into sub-TUs, transform selections such as AMT / MTS indexes and / or flags may still be signaled at the TU level. In these examples, each sub-TU may use the signaled transform selection. In this case, overhead may be saved for each sub-TU, and the advantages of finer granular transforms may still be utilized.
[0259] In some examples, given a set of sub-TUs obtained after partitioning, the transform kernels for the sub-TUs may be constrained or inferred in the horizontal direction, the vertical direction, or both directions. One example of a restriction or inference is based on a prediction mode, a partition tree type, a partition type, or any other side information. In this case, the AMT / MTS index (or transform definition) may be constrained or inferred based on the prediction mode, the partition tree type, the partition type, or any other side information.
[0260] In some examples, instead of restricting or inferring a specific transform basis, context modeling can be applied based on restriction / inference rules. In one example, when restriction rules are applied, contexts are assigned for situations where transform selection is still possible (different from when this transform selection is not possible due to restriction), but contexts are assigned to signal this transform selection, and as a result, transform overhead may be more efficiently encoded and decoded and all transform selections are available. The assigned context may be a separate context from the context that already exists in the transform selection signaling.
[0261] In the following example of limitation, the same rules can be used to transform context assignments in the selection overhead signaling. Examples of such designs include the following.
[0262] Given a quadtree partitioned TU (as in Figure 7 is shown as block 190A and Figure 8 The transform of sub-TU P0 may be restricted so that DCT-8 is used both vertically and horizontally, the transform of sub-TU P1 may be restricted so that DCT-7 is applied horizontally and DST-8 is used vertically, the transform of sub-TU P2 may be restricted so that DCT-8 is applied horizontally and DST-7 is used vertically, and the transform of sub-TU P3 may be restricted so that DST-7 is used both vertically and horizontally.
[0263] Given a quadtree partitioned TU (as in Figure 7 is shown as block 190A and Figure 8In the example shown as block 192C), all sub-TUs (P0, P1, P2, and P3) may be constrained so that DST-7 is used both vertically and horizontally. In another example, DCT-2 may be used instead of DST-7 or DCT-8.
[0264] Given a binary tree partitioned TU (such as in Figure 7 are shown as blocks 190D-190G and Figure 8 ), the transformation of the sub-TU may be inferred / constrained as follows. Figure 7 Blocks 190E and 190F and Figure 8 For horizontal partitioning of blocks 192E and 192F in FIG. 1 , DCT-2 may be used horizontally and DCT-8 may be used vertically to transform sub-TU P0, and DCT-2 may be used horizontally and DCT-7 may be used vertically to transform sub-TU P1. Figure 7 are shown as blocks 190D and 190G and in Figure 8 In the vertical partitioning shown as blocks 192D and 192G in FIG. 1 , DCT-8 may be used horizontally and DCT-2 may be used vertically to transform sub-TU P0, and DST-7 may be used horizontally and DCT-2 may be used vertically to transform sub-TU P1. Instead of DCT-2, DST-7 or DCT-8 may also be used as the transform for the above two cases.
[0265] One or a combination of the above methods may be used only for intra-predicted CUs. One or a combination of the above methods may be used only for inter-predicted CUs. One or a combination of the above methods may be used for both intra-predicted and inter-predicted CUs. One or a combination of the above methods may be used for luma channels or chroma channels or both. TU partitioning and associated transform schemes may be defined based on one or a combination of the above methods.
[0266] Fig. 9 is a block diagram illustrating an example video encoder 200 that may perform the techniques of this disclosure. Fig. 9 The present disclosure describes the video encoder 200 in the context of video codec standards such as the HEVC video codec standard and the developing H.266 video codec standard. However, the techniques of the present invention are not limited to these video codec standards and are generally applicable to video encoding and decoding.
[0267] exist Fig. 9In the example of , the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a decoded picture buffer (DPB) 218, and an entropy coding unit 220. Any or all of the video data memory 230, the mode selection unit 202, the residual generation unit 204, the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the filter unit 216, the DPB 218, and the entropy coding unit 220 can be implemented in one or more processors or processing circuit systems. For example, the units of the video encoder 200 can be implemented as one or more circuits or logic elements as part of a hardware circuit system, or as part of a processor of an FPGA, an ASIC. In addition, the video encoder 200 may include additional or alternative processors or processing circuit systems to perform these and other functions.
[0268] The video data memory 230 may store video data to be encoded by the components of the video encoder 200. The video encoder 200 may receive video data from, for example, the video source 104 ( Figure 1 ) receives video data stored in video data memory 230. DPB218 can act as a reference picture memory for storing reference video data for prediction of subsequent video data performed by video encoder 200. Video data memory 230 and DPB 218 can be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. Video data memory 230 and DPB 218 can be provided by the same memory device or separate memory devices. In various examples, video data memory 230 can be located on-chip with other components of video encoder 200, as shown, or off-chip relative to those components.
[0269] In the present disclosure, references to the video data memory 230 should not be construed as limited to memory internal to the video encoder 200, unless specifically described as such, or memory external to the video encoder 200, unless specifically described as such. Rather, references to the video data memory 230 should be understood as a reference memory that stores video data received by the video encoder 200 for encoding (e.g., video data for a current block to be encoded). Figure 1 The memory 106 may also provide temporary storage for outputs from the various units of the video encoder 200 .
[0270] Fig. 9 Various units are shown to help understand the operations performed by the video encoder 200. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Fixed-function circuits refer to circuits that provide specific functionality and preset the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functionality in the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., to receive parameters or output parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more of the units may be different circuit blocks (fixed-function or programmable), while in some examples, one or more of the units may be integrated circuits.
[0271] The video encoder 200 may include an arithmetic logic unit (ALU), an elementary function unit (EFU), a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example where the operation of the video encoder 200 is performed using software executed by a programmable circuit, the memory 106 ( Figure 1 ) may store instructions (eg, object code) for software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 may store such instructions.
[0272] The video data memory 230 is configured to store the received video data. The video encoder 200 may retrieve the picture 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.
[0273] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra prediction unit 226. The mode selection unit 202 may include additional functional units for performing video prediction according to other prediction modes. As an example, the mode selection unit 202 may include a palette unit, an intra block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, and the like.
[0274] The mode selection unit 202 typically coordinates multiple encoding passes to test combinations of encoding parameters and resulting rate-distortion values for such combinations. The encoding parameters may include the partitioning of CTUs into CUs, the prediction mode for a CU, the transform type for the residual data of a CU, the quantization parameter for the residual data of a CU, etc. The mode selection unit 202 may ultimately select a combination of encoding parameters that has a better rate-distortion value than other tested combinations.
[0275] The video encoder 200 may partition a picture retrieved from the video data memory 230 into a series of CTUs and encapsulate one or more CTUs in a slice. The mode selection unit 202 may partition the CTUs of the picture according to a tree structure such as the QTBT structure or quadtree structure of HEVC described above. As described above, the video encoder 200 may form one or more CUs by partitioning the CTUs according to the tree structure. Such CUs may also be generally referred to as "video blocks" or "blocks".
[0276] Typically, the mode selection unit 202 also controls its components (e.g., the motion estimation unit 222, the motion compensation unit 224, and the intra prediction unit 226) to generate a prediction block for the current block (e.g., the current CU, or the overlapping portion of the PU and TU in HEVC). For inter-frame prediction of the current block, the motion estimation unit 222 can perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously coded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 can calculate a value indicating how similar the potential reference block is to the current block, for example, based on the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), etc. The motion estimation unit 222 can generally perform these calculations using the sample-by-sample difference between the current block and the reference block under consideration. The motion estimation unit 222 can identify the reference block with the lowest value obtained from these calculations, indicating the reference block that most closely matches the current block.
[0277] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of a reference block in a reference picture relative to the position of a current block in a current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, for unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, and for bidirectional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then use the motion vectors to generate a prediction block. For example, the motion compensation unit 224 may use the motion vectors to retrieve data for the reference block. As another example, if the motion vectors have fractional sample precision, the motion compensation unit 224 may interpolate values for the prediction block according to one or more interpolation filters. In addition, for bidirectional inter prediction, the motion compensation unit 224 may retrieve data for two reference blocks identified by the corresponding motion vectors and combine the retrieved data, for example, by sample-by-sample averaging or weighted averaging.
[0278] As another example, for intra prediction or intra prediction codec, the intra prediction unit 226 can generate a prediction block from samples adjacent to the current block. For example, for directional mode, the intra prediction unit 226 can generally mathematically combine the values of adjacent samples and fill these calculated values in a defined direction across the current block to produce a prediction block. As another example, for DC mode, the intra prediction unit 226 can calculate the average of adjacent samples for the current block and generate a prediction block such that for each sample of the prediction block, this resulting average is included.
[0279] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives the original uncoded version of the current block from the video data memory 230 and receives the prediction block from the mode selection unit 202. The residual generation unit 204 calculates the sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines a residual block for the current block. In some examples, the residual generation unit 204 can also determine the difference between the sample values in the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some examples, the residual generation unit 204 can be formed using one or more subtractor circuits that perform binary subtraction.
[0280] In an example in which the mode selection unit 202 partitions the CU into PUs, each PU may be associated with a luma prediction unit and a corresponding chroma prediction unit. The video encoder 200 and the video decoder 300 may support PUs of various sizes. As described above, the size of the CU may refer to the size of the luma codec block of the CU, and the size of the PU may refer to the size of the luma prediction unit of the PU. Assuming that the size of a particular CU is 2N×2N, the video encoder 200 may support PUs of size 2N×2N or N×N for intra-frame prediction, and symmetric PUs of size 2N×2N, 2N×N, N×2N, N×N, or similar sizes for inter-frame prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning of PUs of size 2N×nU, 2N×nD, nL×2N, and nR×2N for inter-frame prediction.
[0281] In an example where the mode selection unit 202 does not further partition the CU into PUs, each CU may be associated with a luma codec block and a corresponding chroma codec block. As described above, the size of a CU may refer to the size of the luma codec block of the CU. The video encoder 200 and the video decoder 300 may support CUs of size 2N×2N, 2N×N, or N×2N.
[0282] For other video codec techniques such as intra block copy mode codec, affine mode codec, and linear model (LM) mode codec, as several examples, the mode selection unit 202 generates a prediction block for the current block being encoded via a corresponding unit associated with the codec technique. In some examples, such as palette mode codec, the mode selection unit 202 may not generate a prediction block, but instead generate syntax elements indicating a manner for reconstructing the block based on the selected palette. In such modes, the mode selection unit 202 may provide these syntax elements to the entropy coding unit 220 for encoding.
[0283] As described above, the residual generation unit 204 receives video data for a current block and a corresponding prediction block. The residual generation unit 204 then generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates the sample-by-sample difference between the prediction block and the current block.
[0284] According to the techniques of the present disclosure, as part of generating a residual block (i.e., a transform unit) for a current block, the residual generation unit 204 may partition the residual block for the current block into a plurality of residual sub-blocks (i.e., transform units) according to a partition tree type. The residual generation unit 204 may perform such partitioning on a square residual block as well as a non-square residual block (e.g., a rectangular residual block) to generate square and non-square residual sub-blocks, and the residual generation unit 204 may further partition one or more of the residual sub-blocks.
[0285] As mentioned above, the partition blocks can be based on Figure 7 and Figure 8 In some examples, the partition block may be partitioned into residual sub-blocks according to one or more of quadtree partitioning, binary tree partitioning, ternary tree partitioning, or four TU partitioning as shown in . In some examples, the partition block may be partitioned into residual sub-blocks according to one or more of quadtree partitioning or binary tree partitioning.
[0286] When the residual generation unit 204 divides the residual block according to binary tree partitioning, ternary tree partitioning, or four TU partitioning, the residual generation unit 204 may divide the residual block horizontally or vertically. Figure 7 Blocks 190C, 190E, 190F, and 190H of FIG. 1 show examples of horizontal partitioning, while Figure 7 Blocks 190B, 190D, 190G, and 190I illustrate an example of vertical partitioning.
[0287] When the residual generation unit 204 divides the residual block horizontally or vertically according to the binary tree partitioning or the ternary tree partitioning, the residual generation unit 204 may divide the residual block symmetrically or may divide the residual block asymmetrically. Figure 7 Blocks 190D and 190E show examples of symmetric partitioning, while Figure 7 Blocks 190F and 190G show an example of asymmetric partitioning.
[0288] 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 Karnen-Loev transform (KLT), or a conceptually similar transform to the residual block. In some examples, the transform processing unit 206 may perform multiple transforms on the residual block, for example, a primary transform and a secondary transform, such as a rotation transform. In some examples, the transform processing unit 206 does not apply a transform to the residual block.
[0289] In some examples, the transform processing unit 206 may apply multiple transforms of a multi-transform (MT) scheme to the residual block for the current block, including applying multiple transforms of the MT scheme to each of the multiple residual sub-blocks resulting from partitioning of the residual block. The MT scheme may define, for example, a primary transform and a secondary transform to be applied to the residual block. Additionally or alternatively, the MT scheme may define a horizontal transform and a vertical transform, such as discussed above. Figure 5A and Figure 5B In any case, transform processing unit 206 may apply each transform of the MT scheme to the residual block to generate transform coefficients for a transform coefficient block.
[0290] For example, the transform processing unit 206 may select a transform for each of the plurality of residual sub-blocks, wherein the selection of the transform for a corresponding residual block in the plurality of residual sub-blocks is a multiple transform selection (MTS) index for the corresponding residual block. In this way, multiple transforms may be selected for each residual sub-block.
[0291] In another example, the transform processing unit 206 may select a transform for the residual block that is applied to each of the plurality of residual sub-blocks resulting from the partitioning of the residual block. For example, multiple transforms applied to each residual sub-block resulting from the partitioning of the residual block may be selected for the residual block. Figure 8 In the example of block 192C in FIG. 1 , the selected multiple transform for block 192C may be applied to each of the residual sub-blocks P0 , P1 , P2 , and P3 .
[0292] According to the techniques of this disclosure, the transform processing unit 206 may determine a coded block flag (cbf) and / or a transform skip flag for each of the plurality of residual sub-blocks. The coded block flag may signal information about whether at least one non-zero coefficient transform level is sent for the residual sub-block. The transform skip flag may signal information about whether the transform is skipped for the residual sub-block.
[0293] According to the techniques of this disclosure, transform processing unit 206 may determine transform kernels for multiple residual sub-blocks resulting from partitioning the residual block based at least in part on one of the following: a partition tree type for the residual block or a partition type for the residual block.
[0294] According to the techniques of this disclosure, transform processing unit 206 may determine context assignments for multiple residual subblocks based at least in part on one of the following: a partition tree type for the residual block or a partition type for the residual block. In some examples, transform processing unit 206 may determine context assignments for multiple residual subblocks for a luma component of a current block and / or a chroma component of a current block.
[0295] In one example, when the transform processing unit 206 determines that the residual block is partitioned into four residual sub-blocks according to quadtree partitioning, the transform processing unit 206 may determine that: for a first residual sub-block among the multiple residual sub-blocks, DCT-8 is used as both a horizontal transform and a vertical transform; for a second residual sub-block among the multiple residual sub-blocks, DST-7 is used for a horizontal transform, while DST-8 is used as a vertical transform; for a third residual sub-block among the multiple residual sub-blocks, DCT-8 is used for a horizontal transform, while DST-7 is used as a vertical transform; and for a fourth residual sub-block among the multiple residual sub-blocks, DST-7 is used as both a horizontal transform and a vertical transform.
[0296] In another example, when the transform processing unit 206 determines that the residual block is partitioned into four residual sub-blocks according to quadtree partitioning, the transform processing unit 206 may determine that DST-7 is used as both horizontal transform and vertical transform for each of the plurality of residual sub-blocks.
[0297] In another example, when the transform processing unit 206 determines that the residual block is partitioned into four residual sub-blocks according to the quadtree partitioning, the transform processing unit 206 may determine that for one or more of the plurality of residual sub-blocks, DCT-2 is used as at least one of the horizontal transform or the vertical transform. Thus, for example, for one or more of the plurality of residual sub-blocks, DCT-2 may be used as the horizontal transform, while DST-7 or DCT-8 may be used as the vertical transform, and for one or more of the plurality of residual sub-blocks, DCT-2 may be used as the vertical transform, while DST-7 or DCT-8 may be used as the horizontal transform.
[0298] In another example, when the transform processing unit 206 determines that the residual block is split into two residual sub-blocks according to a binary tree partitioning, and the partition type for the residual block is horizontal partitioning, the transform processing unit 206 may determine that: for a first residual sub-block among multiple residual sub-blocks, DCT-2 is used as a horizontal transform, and DCT-8 is used as a vertical transform; and for a second residual sub-block among the multiple residual sub-blocks, DCT-2 is used as a horizontal transform, and DST-7 is used as a vertical transform.
[0299] In another example, when the transform processing unit 206 determines that the residual block is split into two residual sub-blocks according to a binary tree partitioning, and the partition type for the residual block is vertical partitioning, the transform processing unit 206 may determine that: for a first residual sub-block among multiple residual sub-blocks, DCT-8 is used as a horizontal transform, and DCT-2 is used as a vertical transform; and for a second residual sub-block among the multiple residual sub-blocks, DST-7 is used as a horizontal transform, and DCT-2 is used as a vertical transform.
[0300] In another example, when the transform processing unit 206 determines that the residual block is partitioned into two residual sub-blocks according to the binary tree partitioning, the transform processing unit 206 may determine that for one or more of the plurality of residual sub-blocks, one of DST-7 or DCT-8 is used as at least one of the horizontal transform or the vertical transform. In the above example of binary tree partitioning, the use of DST-7 or DCT-8 may replace DCT-2.
[0301] In some examples, the inverse transform processing unit 206 may determine the context assignment for the residual block based at least in part on the size of the residual block. For example, when the residual block has a small size, such as less than or equal to 16 samples (e.g., a 4×4 block of size 16 samples), and when the residual block is partitioned according to a binary tree partition, the inverse transform processing unit 206 may determine the context assignment for the plurality of residual sub-blocks such that for each of the plurality of residual sub-blocks, DST-7 is used as both a horizontal transform and a vertical transform.
[0302] In another example, when the residual block has a large size, such as greater than or equal to 16 samples (e.g., a 4×8 block of size 32 samples), and when the residual block is partitioned according to a binary tree partitioning, the transform processing unit 206 may determine context assignments for the plurality of residual sub-blocks such that, for a first residual sub-block of the plurality of residual sub-blocks, DCT-2 is used as a horizontal transform and DST-7 is used as a vertical transform, and for a second residual sub-block of the plurality of residual sub-blocks, DCT-2 is used as a vertical transform and DST-7 is used as a horizontal transform.
[0303] In another example, when the residual block has a horizontal size or a vertical size less than or equal to 2 samples (eg, a 2×8 block), the transform processing unit 206 may determine that no transform is applied to the plurality of residual sub-blocks.
[0304] In some examples, transform processing unit 206 may determine context assignments for multiple residual subblocks based on the current block being an intra-predicted block. In some examples, transform processing unit 206 may determine context assignments for multiple residual subblocks based on the current block being an inter-predicted block.
[0305] Quantization unit 208 may quantize transform coefficients in a transform coefficient block to produce a quantized transform coefficient block. 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. Video encoder 200 (e.g., via mode selection unit 202) may adjust the degree of quantization applied to the transform coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may introduce information loss, and therefore, the quantized transform coefficients may have lower precision than the original transform coefficients produced by transform processing unit 206.
[0306] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform, respectively, to the quantized transform coefficient block to reconstruct a residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (albeit potentially with some degree of distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 may add samples of the reconstructed residual block to corresponding samples of the prediction block generated by the mode selection unit 202 to generate a reconstructed block.
[0307] Filter unit 216 may perform one or more filter operations on the reconstructed block. For example, filter unit 216 may perform a deblocking operation to reduce blockiness artifacts along the edges of the CU. In some examples, the operations of filter unit 216 may be skipped.
[0308] The video encoder 200 stores the reconstructed blocks in the DPB 218. For example, in examples where the operation of the filter unit 216 is not required, the reconstruction unit 214 can store the reconstructed blocks to the DPB 218. In examples where the operation of the filter unit 216 is required, the filter unit 216 can store the filtered reconstructed blocks to the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 can retrieve a reference picture formed by the reconstructed (and possibly filtered) blocks from the DPB 218 to perform inter-frame prediction on blocks of subsequent encoded pictures. In addition, the intra-frame prediction unit 226 can use the reconstructed blocks of the current picture in the DPB 218 to perform intra-frame prediction on other blocks in the current picture.
[0309] In general, the entropy coding unit 220 may entropy encode syntax elements received from other functional components of the video encoder 200. For example, the entropy coding unit 220 may entropy encode quantized transform coefficient blocks from the quantization unit 208. As another example, the entropy coding unit 220 may entropy encode prediction syntax elements (e.g., motion information for inter-prediction or intra-mode information for intra-prediction) from the mode selection unit 202. The entropy coding unit 220 may perform one or more entropy coding operations on syntax elements, which is another example of video data, to generate entropy-coded data. For example, the entropy coding unit 220 may perform a context-adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable-to-variable (V2V) length coding operation, a syntax-based context-adaptive binary arithmetic coding (SBAC) operation, a probability interval partitioning entropy (PIPE) coding operation, an exponential-Golomb coding operation, or another type of entropy coding operation on the data. In some examples, the entropy coding unit 220 may operate in a bypass mode in which syntax elements are not entropy encoded.
[0310] According to the technology of the present disclosure, the entropy encoding unit 220 may entropy encode the partition information associated with the residual block for the residual block. Such partition information associated with the residual block may indicate whether the residual block is partitioned. If the residual block is partitioned, the entropy encoded partition information may further indicate the partition tree type used for the residual block. The partition tree type may be one of: quadtree partition, binary tree partition, ternary tree partition, or four TU partition. In order to indicate the partition tree type, the entropy encoded partition information may include an index into a list of possible partition types. If the partition tree type is one of binary tree partition, ternary tree partition, or four TU partition, the entropy encoded partition information may further signal information indicating the partition type for the residual block, which indicates whether the residual block is divided horizontally or vertically. In addition, if the partition tree type for the residual block is binary tree partition or ternary tree partition, the entropy encoded information may further signal information indicating whether the TU is divided symmetrically or asymmetrically.
[0311] The entropy coding unit 220 may also entropy encode other information associated with the residual block for the residual block. For example, the entropy coding unit 220 may encode an indication of a transform selected for each of a plurality of residual sub-blocks resulting from the partitioning of the residual block (such as an MTS index for each of the corresponding residual sub-blocks). In another example, the entropy coding unit 220 may encode an indication of a transform selected for the residual block, wherein the selected transform is applied to each of the plurality of residual sub-blocks resulting from the partitioning of the residual block.
[0312] According to certain aspects of the present disclosure, the entropy coding unit 220 may refrain from encoding information associated with context assignments for a plurality of residual sub-blocks resulting from the partitioning of the residual block or transform kernels for the plurality of residual sub-blocks. Instead, the video decoder 300 may infer such information about the residual block based on other information associated with the residual block encoded by the entropy coding unit 220, such as whether the residual block is partitioned, the partition tree type according to which the residual block is partitioned, the partition type of the residual block, and other side information entropy encoded by the entropy coding unit 220.
[0313] The video encoder 200 may output a bitstream including entropy-encoded syntax elements required to reconstruct a block of a slice or picture. Specifically, according to the technology of the present disclosure, the entropy coding unit 220 may output a bitstream including, for example, entropy-encoded segmentation information associated with a residual block. In this way, once the encoder 200 has determined that a residual block for a current block of video data is partitioned into a plurality of residual sub-blocks according to a partition tree type, the entropy coding unit 220 may encode a bitstream as an encoded representation of the video data, the bitstream signaling information indicating whether the residual block is partitioned, and further signaling information indicating the partition tree type used for the partitioned residual block.
[0314] The operations described above are described with respect to blocks. Such descriptions should be understood as operations for luma codec blocks and / or chroma codec blocks. As described above, in some examples, the luma codec block and the chroma codec block are the luma component and chroma component of the CU. In some instances, the luma codec block and the chroma codec block are the luma component and chroma component of the PU.
[0315] In some examples, operations performed with respect to luma codec blocks need not be repeated for chroma codec blocks. As an example, operations for identifying motion vectors (MVs) and reference pictures for luma codec blocks need not be repeated for identifying MVs and reference pictures for chroma codec blocks. Specifically, the MVs for luma codec blocks may be scaled to determine MVs for chroma blocks, while the reference pictures may be the same. As another example, the intra prediction process may be the same for luma codec blocks and chroma codec blocks.
[0316] The video encoder 200 represents an example of a device configured to encode video data, the device including a memory configured to store the video data, and one or more processing units implemented in a circuit system and configured to perform the following operations: determine that a residual block for a current block of the video data is partitioned into multiple residual sub-blocks according to a partition tree type, and encode a bitstream as an encoded representation of the video data, the bitstream signaling information indicating whether the residual block is partitioned, and further signaling information indicating the partition tree type used for the residual block.
[0317] Fig.10 is a block diagram illustrating an example video decoder 300 that may perform the techniques of this disclosure. Fig.10 The above description is provided for the purpose of explanation and is not intended to limit the techniques extensively illustrated and described in this disclosure. For the purpose of explanation, this disclosure describes a video decoder 300 according to techniques of JEM, VVC, and HEVC. However, the techniques of this disclosure may be performed by video codec devices configured for other video codec standards.
[0318] exist Fig.10 In the example of , the video decoder 300 includes a coded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. Any or all of the CPB memory 320, the entropy decoding unit 302, the prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, the filter unit 312, and the DPB 314 can be implemented in one or more processors or processing circuit systems. For example, the units of the video decoder 300 can be implemented as one or more circuits or logic elements as part of a hardware circuit system, or as part of a processor of an FPGA, an ASIC. In addition, the video decoder 300 may include additional or alternative processors or processing circuit systems to perform these and other functions.
[0319] The prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. The prediction processing unit 304 may include additional units for performing predictions according to other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, an intra block copy unit (which may be part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.
[0320] The CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by components of the video decoder 300. The video data stored in the CPB memory 320 may be, for example, received from the computer-readable medium 110 ( Figure 1 ) is obtained. The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from an encoded video bitstream. Similarly, the CPB memory 320 may store video data other than syntax elements of encoded and decoded pictures, such as temporary data representing outputs from various units of the video decoder 300. The DPB 314 typically stores decoded pictures, which the video decoder 300 may output and / or use as reference video data when decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and the DPB 314 may be formed by any of a variety of memory devices, such as DRAM, including SDRAM, MRAM, RRAM, or other types of memory devices. The CPB memory 320 and the DPB 314 may be provided by the same memory device or a separate memory device. In various examples, the CPB memory 320 may be located on-chip with other components of the video decoder 300, or off-chip relative to those components.
[0321] Additionally or alternatively, in some examples, video decoder 300 may retrieve the video from memory 120 ( Figure 1 ) to retrieve the encoded and decoded video data. That is, memory 120 may store data as discussed above in conjunction with CPB memory 320. Likewise, when some or all of the functionality of video decoder 300 is implemented in software for execution by the processing circuitry of video decoder 300, memory 120 may store instructions for execution by video decoder 300. As such, CPB memory 320, together with Fig.10 Together with the other components of video decoder 300 , represent examples of components for receiving a bitstream.
[0322] Fig.10 The various units shown in FIG. 3 are shown to help understand the operations performed by the video decoder 300. These units may be implemented as fixed function circuits, programmable circuits, or a combination thereof. Fig. 9Similarly, a fixed-function circuit refers to a circuit that provides specific functionality and has preset operations that can be performed. A programmable circuit refers to a circuit that can be programmed to perform various tasks and provides flexible functionality in the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (for example, to receive parameters or output parameters), but the type of operations performed by the fixed-function circuits is generally immutable. In some examples, one or more of the units can be different circuit blocks (fixed-function or programmable), while in some examples, one or more of the units can be integrated circuits.
[0323] The video decoder 300 may include an ALU, an EFU, a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example where the operation of the video decoder 300 is performed by software executed on a programmable circuit, an on-chip or off-chip memory may store instructions (e.g., object code) of the software received and executed by the video decoder 300.
[0324] Entropy decoding unit 302 may receive encoded video data from the CPB and entropy decode the video data to reproduce syntax elements. Prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, and filter unit 312 may generate decoded video data based on syntax elements extracted from the bitstream.
[0325] Typically, the video decoder 300 reconstructs a picture on a block-by-block basis. The video decoder 300 may perform a reconstruction operation on each block individually (where the block currently being reconstructed (ie, decoded) may be referred to as a "current block").
[0326] The entropy decoding unit 302 may entropy decode syntax elements defining quantized transform coefficients of a quantized transform coefficient block and transform information such as a quantization parameter (QP) and / or transform mode indication(s).
[0327] According to the technology of the present disclosure, the video decoder 300 can receive information indicating whether a residual block is partitioned in a bitstream including an encoded representation of video data, and information indicating a partition tree type for the residual block based on the residual block being partitioned, wherein the residual block indicates a difference between a current block and a prediction block. The information indicating whether the residual block is partitioned and the information indicating the partition tree type for the residual block can be syntax elements that signal whether the residual block is partitioned and, if so, the partition tree type for the residual block.
[0328] In some examples, the information indicating the partition tree type for the residual block may be index information into a set of tree types, and the entropy decoding unit 302 may determine the partition tree type based on the received index information. For example, the set information of the tree type may include one or more of quadtree partitioning and binary tree partitioning.
[0329] In some examples, the bitstream received by the video decoder 300 may further include information indicating whether the residual block is divided horizontally or vertically, and / or whether the residual block is divided symmetrically or asymmetrically.
[0330] For example, for a residual block, the bitstream may include a flag that signals whether the residual block is segmented. If the flag is enabled, the bitstream may include an index into a list of segmentation tree types to indicate the segmentation tree type used to segment the residual block, such as indexing into a list of the following segmentation tree types via multiple bits: quadtree segmentation, binary tree segmentation, ternary tree segmentation, and four TU segmentation. If necessary, the bitstream may then also include a flag that signals whether the residual block is horizontally or vertically divided, and whether the residual block is symmetrically or asymmetrically divided.
[0331] The entropy decoding unit 302 may entropy decode the partition information associated with the residual block for the current block of data being decoded from the bitstream. Specifically, the entropy decoding unit 302 may decode the partition information to determine whether the residual block is partitioned. If the partition information for the residual block in the bitstream signals that the residual block is partitioned, the entropy decoding unit 302 may further decode the partition information to determine a partition tree type for the residual block. Depending on the partition tree type of the residual block, the entropy decoding unit 302 may decode the partition information for the residual block in the bitstream to determine whether the residual block is partitioned horizontally or vertically, and whether the residual block is partitioned symmetrically or asymmetrically. In this way, the entropy decoding unit 302, together with the Fig.10 Together with other components of the video decoder 300 , examples of components for determining that a residual block is partitioned into a plurality of residual sub-blocks according to a partition tree type.
[0332] In addition, in some examples, the entropy decoding unit 302 may also entropy decode other information associated with the residual block for the current block of data. For example, the entropy decoding unit 302 may decode an indication of a transform selected for each of a plurality of residual sub-blocks resulting from partitioning of the residual block (such as an MTS index for each of the corresponding residual sub-blocks).
[0333] In another example, the entropy decoding unit 302 may decode an indication of a transform selected for the residual block, wherein the selected transform is applied to each of the plurality of residual sub-blocks resulting from the partitioning of the residual block. Such a transform selected for the residual block may be signaled in the bitstream at the residual block level, thereby saving the overhead caused by having to indicate a separate transform for each of the residual sub-blocks, while maintaining the ability to partition the residual block into a plurality of residual sub-blocks.
[0334] According to the technology of the present disclosure, the entropy decoding unit 302 can infer or restrict the coded block flag (cbf) and / or the transform skip flag for each of the plurality of residual sub-blocks based on information such as the prediction mode for the current block, the partition tree type for the residual block, the partition type for the residual block, or any other side information included in the bitstream. The coded block flag can signal information about whether at least one non-zero coefficient transform level is sent for the residual sub-block. The transform skip flag can signal information about whether the transform is skipped for the residual sub-block. For example, the entropy decoding unit 302 can restrict the residual sub-block to always have a disabled coded block flag (flag = 0) so that no cbf signaling is required for the residual sub-block.
[0335] Entropy decoding unit 302 may provide such information associated with the residual block to inverse transform processing unit 308. Thus, after inverse quantization unit 306 forms a transform coefficient block, inverse transform processing unit 308 may use such information associated with the residual block along with one or more transform coefficient blocks provided by inverse quantization unit 306 to generate a residual block associated with the current block.
[0336] The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine a degree of quantization, and likewise, determine a degree of inverse quantization to apply for the inverse quantization unit 306. The inverse quantization unit 306 may, for example, perform a bitwise left shift operation to inverse quantize the quantized transform coefficients. The inverse quantization unit 306 may thereby form a transform coefficient block including the transform coefficients.
[0337] After the inverse quantization unit 306 forms the transform coefficient block, the inverse transform processing unit 308 may apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, the inverse transform processing unit 308 may apply an inverse DCT, an inverse integer transform, an inverse Karnau-Loev transform (KLT), an inverse rotational transform, an inverse directional transform, or another inverse transform to the transform coefficient block. In this manner, the inverse transform processing unit 308, in conjunction with Fig.10 Together with other components of the video decoder 300 , represent examples of means for generating residual data for a current block based at least in part on partitioning the residual block into a plurality of residual sub-blocks according to a partitioning tree type.
[0338] According to the technology of the present disclosure, the inverse transform processing unit 308 can receive the partition information associated with the residual block for the current block of data from the entropy decoding unit 302, and can determine the partition of the residual block into multiple residual sub-blocks. As described above, the entropy decoding unit 302 can decode the partition information of the residual block for the current block, which indicates whether the residual block is partitioned, whether the residual block is horizontally divided or vertically divided, and whether the residual block is symmetrically divided or asymmetrically divided. The inverse processing unit 308 can use such information to determine multiple residual sub-blocks resulting from the partition of the residual block for the current block of data.
[0339] The inverse transform processing unit 308 may apply one or more inverse transforms to the one or more transform coefficient blocks based at least in part on the partitioning information to generate a residual block for the current block of video data, including generating a plurality of residual sub-blocks resulting from the partitioning for the residual block of the current block data. In this manner, the inverse transform processing unit 308 generates residual data for the current block of video data.
[0340] In some examples, the inverse transform processing unit 308 may apply one or more inverse transforms indicated by information decoded from the bitstream by the entropy decoding unit 302. For example, if the bitstream includes information indicating a transform selected for each of a plurality of residual sub-blocks resulting from partitioning of the residual block, such as an MTS index for each of the corresponding residual sub-blocks, the inverse transform processing unit 308 may apply the selected transform to the plurality of residual sub-blocks. In another example, if the bitstream includes information indicating a transform selected for the residual block, the inverse transform processing unit 308 may apply the selected transform to each of the plurality of residual sub-blocks in the residual block.
[0341] In some examples, the inverse transform processing unit 308 may infer or constrain transform kernels for the plurality of residual sub-blocks in at least one of a horizontal direction or a vertical direction based at least in part on the partition information and / or other side information for the residual block included in the bitstream. Inferring or constraining the transform kernels for the plurality of residual sub-blocks includes inferring or constraining MTS indices or transform definitions for the plurality of residual sub-blocks based at least in part on the partition information and / or other side information for the residual block included in the bitstream.
[0342] Inferring or restricting a transform kernel means that the transform kernel is not explicitly signaled in the bitstream. Instead, the transform kernel may be inferred or restricted based at least in part on other information in the bitstream. In one example, the transform kernel may be inferred or restricted based on a partition tree type of a residual block signaled by the bitstream (such as based on whether the residual block is partitioned according to a binary tree partition, a four-TU partition, or a ternary tree partition), based on a partition type of the residual block (such as based on whether the residual tree is partitioned horizontally or vertically), and / or based on any other side information signaled in the bitstream. The inverse transform processing unit 308 may apply one or more inverse transforms to one or more transform coefficient blocks to generate a residual block for a current block of video data based at least in part on the inferred or restricted transform kernels for multiple residual sub-blocks.
[0343] In some examples, the inverse transform processing unit 308 may infer or restrict context assignments for multiple residual sub-blocks based at least in part on partitioning information and / or other side information for the residual block included in the bitstream, and the inverse transform processing unit 308 may apply one or more inverse transforms to one or more transform coefficient blocks to generate a residual block for the current block of video data based at least in part on the inferred or restricted context assignments for the multiple residual sub-blocks.
[0344] When context assignment is inferred or restricted, transform selection for multiple residual subblocks may still be possible, where context is assigned to signal such transform selection. The assigned context may be a separate context different from the context already present in the transform selection signaling. As a result, the transform overhead may be more efficiently encoded and decoded and all transform selections may be available.
[0345] Inferring or limiting context assignments for multiple residual sub-blocks means that the context assignments are not explicitly signaled in the bitstream. Instead, the context assignments can be inferred or limited based at least in part on other information in the bitstream. In one example, the context assignments can be inferred or limited based on a partition tree type of the residual block signaled by the bitstream (such as based on whether the residual block is partitioned according to a quadtree partition, a binary tree partition, a four-TU partition, or a ternary tree partition), based on a partition type of the residual block (such as based on whether the residual tree is partitioned horizontally or vertically), and / or based on any other side information signaled in the bitstream. In some examples, the inverse transform processing unit 308 can infer or limit context assignments for multiple residual sub-blocks for a luminance component of a current block and / or a chrominance component of a current block.
[0346] In one example, when the inverse transform processing unit 308 determines that the residual block is partitioned into four residual sub-blocks according to quadtree partitioning, the inverse transform processing unit 308 may infer or restrict context assignments for the plurality of residual sub-blocks such that: for a first residual sub-block among the plurality of residual sub-blocks, DCT-8 is used as both a horizontal transform and a vertical transform; for a second residual sub-block among the plurality of residual sub-blocks, DST-7 is used for a horizontal transform, while DST-8 is used as a vertical transform; for a third residual sub-block among the plurality of residual sub-blocks, DCT-8 is used for a horizontal transform, while DST-7 is used as a vertical transform; and for a fourth residual sub-block among the plurality of residual sub-blocks, DST-7 is used as both a horizontal transform and a vertical transform.
[0347] In another example, when the inverse transform processing unit 308 determines that the residual block is partitioned into four residual sub-blocks according to a quadtree partitioning, the inverse transform processing unit 308 may infer or restrict context assignments for the plurality of residual sub-blocks such that: for each of the plurality of residual sub-blocks, DST-7 is used as both a horizontal transform and a vertical transform.
[0348] In another example, when the inverse transform processing unit 308 determines that the residual block is partitioned into four residual sub-blocks according to the quadtree partitioning, the inverse transform processing unit 308 may infer or restrict the context assignment for the plurality of residual sub-blocks so that: for one or more of the plurality of residual sub-blocks, DCT-2 is used as at least one of the horizontal transform and the vertical transform. Thus, for example, for one or more of the plurality of residual sub-blocks, DCT-2 may be inferred or restricted as the horizontal transform, while DST-7 or DCT-8 may be inferred or restricted as the vertical transform, and for one or more of the plurality of residual sub-blocks, DCT-2 may be inferred or restricted as the vertical transform, while DST-7 or DCT-8 may be inferred or restricted as the horizontal transform.
[0349] In another example, when the inverse transform processing unit 308 determines that the residual block is split into two residual sub-blocks according to a binary tree partitioning, and the partition type for the residual block is horizontal partitioning, the inverse transform processing unit 308 can infer or restrict the context assignment for the multiple residual sub-blocks so that: for a first residual sub-block among the multiple residual sub-blocks, DCT-2 is used as a horizontal transform and DCT-8 is used as a vertical transform; and for a second residual sub-block among the multiple residual sub-blocks, DCT-2 is used as a horizontal transform and DCT-7 is used as a vertical transform.
[0350] In another example, when the inverse transform processing unit 308 determines that the residual block is split into two residual sub-blocks according to a binary tree partition, and the partition type for the residual block is vertical partitioning, the inverse transform processing unit 308 can infer or restrict the context assignment for the multiple residual sub-blocks so that: for a first residual sub-block among the multiple residual sub-blocks, DCT-8 is used as a horizontal transform and DCT-2 is used as a vertical transform; and for a second residual sub-block among the multiple residual sub-blocks, DST-7 is used as a horizontal transform and DCT-2 is used as a vertical transform.
[0351] In another example, when the inverse transform processing unit 308 determines that the residual block is partitioned into two residual sub-blocks according to the binary tree partitioning, the inverse transform processing unit 308 can infer or restrict the context assignment for the plurality of partitioned sub-blocks so that: for one or more of the plurality of residual sub-blocks, one of DST-7 or DCT-8 is used as at least one of the horizontal transform and the vertical transform. In the above example of binary tree partitioning, the use of DST-7 or DCT-8 can replace DCT-2.
[0352] In some examples, the inverse transform processing unit 308 may infer or restrict context assignments for the residual block based at least in part on the size of the residual block. For example, when the residual block has a small size, such as less than or equal to 16 samples (e.g., a 4×4 block having a size of 16 samples), and when the residual block is partitioned according to a binary tree partition, the inverse transform processing unit 308 may infer or restrict context assignments for multiple residual sub-blocks such that for each of the multiple residual sub-blocks, DST-7 is used as both a horizontal transform and a vertical transform.
[0353] In another example, when the residual block has a large size, such as greater than or equal to 16 samples (e.g., a 4×8 block of size 32 samples), and when the residual block is partitioned according to a binary tree partitioning, the inverse transform processing unit 308 may infer or restrict context assignments for the plurality of residual sub-blocks such that, for a first residual sub-block of the plurality of residual sub-blocks, DCT-2 is used as a horizontal transform and DST-7 is used as a vertical transform, and for a second residual sub-block of the plurality of residual sub-blocks, DCT-2 is used as a vertical transform and DST-7 is used as a horizontal transform.
[0354] In another example, when the residual block has a horizontal dimension or a vertical dimension that is less than or equal to 2 samples (eg, a 2×8 block), the inverse transform processing unit 308 may infer or restrict that no transform is applied to the plurality of residual sub-blocks.
[0355] In some examples, the inverse transform processing unit 308 may infer context assignments for the plurality of residual sub-blocks based on the current block being an intra-predicted video block. In other examples, the inverse transform processing unit 308 may infer context assignments for the plurality of residual sub-blocks based on the current block being an inter-predicted video block. In another example, the inverse transform processing unit 308 may infer context assignments for the plurality of residual sub-blocks based on the current block being an inter-predicted video block or an intra-predicted video block.
[0356] In addition, prediction processing unit 304 generates a prediction block based on the prediction information syntax elements entropy decoded by entropy decoding unit 302. For example, if the prediction information syntax elements indicate that the current block is inter-predicted, motion compensation unit 316 can generate the prediction block. In this case, the prediction information syntax elements can indicate a reference picture in 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. Motion compensation unit 316 can generally use the same syntax elements as those for motion compensation unit 224 ( Fig. 9 ) and the inter-frame prediction process is performed in a manner basically similar to the described method.
[0357] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, the intra-prediction unit 318 can generate a prediction block according to the intra-prediction mode indicated by the prediction information syntax element. Again, the intra-prediction unit 318 can generally be used with respect to the intra-prediction unit 226 ( Fig. 9 ) and the like. The intra prediction unit 318 may retrieve data for neighboring samples of the current block from the DPB 314.
[0358] 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. Fig.10 Together with other components of the video decoder 300 , represent examples of components for decoding a current block using residual data.
[0359] The filter unit 312 may perform one or more filter operations on the reconstructed block. For example, the filter unit 312 may perform a deblocking operation to reduce blocking artifacts along the edges of the reconstructed block. The operations of the filter unit 312 need not be performed in all examples.
[0360] The video decoder 300 may store the reconstructed block in the DPB 314. For example, in an example where the operation of the filter unit 312 is not performed, the reconstruction unit 310 may store the reconstructed block to the DPB 314. In an example where the operation of the filter unit 312 is performed, the filter unit 312 may store the filtered reconstructed block to the DPB 314. As described above, the DPB 314 may provide reference information to the prediction processing unit 304, such as samples of the current picture for intra-frame prediction and previously decoded pictures for subsequent motion compensation. Moreover, the video decoder 300 may output a decoded picture (e.g., a decoded video) from the DPB 314 for use in, for example, Figure 1 Subsequent presentation on a display device such as display device 118.
[0361] In this way, the video decoder 300 represents an example of a video decoding device, including a memory configured to store video data, and one or more processing units implemented in a circuit system and configured to perform the following operations: receiving information indicating whether a residual block is partitioned, and information indicating a partition tree type for the residual block based on the residual block being partitioned, in a bitstream including an encoded representation of the video data, wherein the residual block indicates a difference between a current block and a prediction block; based on the received information, namely, whether the residual block is partitioned and the partition tree type for the residual block, determining a plurality of residual sub-blocks into which the residual block is partitioned according to the partition tree type; generating residual data for a current block based at least in part on the residual block being partitioned into a plurality of residual sub-blocks according to the partition tree type; and using the residual data to decode the current block.
[0362] Fig.11 2 is a flowchart illustrating an example method for encoding a current block. The current block may include a current CU. Although with respect to the video encoder 200 ( Figure 1 and Fig. 9 ), but it should be understood that other devices may be configured to perform the same Fig.11 A similar approach to the one used in this paper.
[0363] In this example, initially, the video encoder 200 predicts the current block (350). For example, the video encoder 200 may form a prediction block for the current block. The video encoder 200 may then calculate a residual block for the current block (352). In order to calculate the residual block, the video encoder 200 may calculate the difference between the original uncoded block and the prediction block for the current block. As part of calculating the residual block, the video encoder 200 may partition the residual block into a plurality of residual sub-blocks according to at least one of quadtree partitioning or binary tree partitioning. If the video encoder 200 partitions the residual block according to binary tree partitioning, the video encoder 200 may partition the residual block horizontally or vertically. In addition, if the video encoder 200 partitions the residual block according to binary tree partitioning, the video encoder 200 may partition the residual block symmetrically or asymmetrically.
[0364] The video encoder 200 may then transform and quantize the coefficients of the residual block (354). Next, the video encoder 200 may scan the quantized transform coefficients of the residual block (356). During or after the scan, the video encoder 200 may entropy encode the transform coefficients (358). For example, the video encoder 200 may encode the transform coefficients using CAVLC or CABAC. The video encoder 200 may then output entropy encoded data for the block (360). The video encoder 200 may output the entropy encoded data for the block as a bitstream. The bitstream may signal, for the residual block, whether the residual block is partitioned, the partition tree type used to partition the residual block, information indicating whether the residual block is partitioned, and information indicating the partition tree type used for the partitioned residual block.
[0365] Fig.12 is a flowchart illustrating an example method for decoding a current block of video data. The current block may include a current CU. Although with respect to the video decoder 300 ( Figure 1 and Fig.10 ), but it should be understood that other devices may be configured to perform the same Fig.12 A similar approach to the one used in this paper.
[0366] The video decoder 300 may receive entropy coded data for a current block, such as a bitstream including entropy coded prediction information corresponding to the current block and entropy coded data for coefficients of a residual block (370). The video decoder 300 may entropy decode the entropy coded data to determine prediction information for the current block and reproduce coefficients of the residual block (372). The video decoder 300 may determine whether the bitstream for the residual block of the current block includes information indicating whether the residual block is partitioned, and information indicating a partition tree type for the residual block based on the residual block being partitioned.
[0367] The video decoder 300 may predict the current block (374), for example, using an intra-prediction or inter-prediction mode as indicated by the prediction information for the current block, to compute a prediction block for the current block. The video decoder 300 may then inverse scan the reproduced coefficients (376) to create a block of quantized transform coefficients. The video decoder 300 may then inverse quantize and inverse transform the transform coefficients to produce a residual block (378). The video decoder 300 may use such information about the partitioning of the residual block to infer or restrict context assignments and transform selections for the residual block in order to inverse transform the transform coefficients to produce the residual block. The video decoder 300 may finally decode the current block by combining the prediction block and the residual block (380).
[0368] Fig.13 is a flowchart illustrating an example method for decoding a current block having data of a residual block partitioned according to a partition tree type. Although with respect to the video decoder 300 ( Figure 1 and Fig.10 ), but it should be understood that other devices may be configured to perform the same Fig.13 In some examples, the video decoder 300 may include one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box. In some examples, the video decoder 300 includes at least one of: an integrated circuit, a microprocessor, or a wireless communication device. In some examples, the video decoder 300 includes a display configured to display the decoded video data.
[0369] The video decoder 300 may receive, in a bitstream including an encoded representation of video data, information indicating whether a residual block is partitioned, and information indicating a partitioning tree type for the residual block based on the residual block being partitioned, wherein the residual block indicates a difference between a current block and a prediction block (400).
[0370] In some examples, receiving information indicating a partition tree type may include receiving index information in a set of tree types, and the video decoder 300 may determine the partition tree type based on the received index information. In some examples, the set information of the tree type includes one or more of quadtree partitioning and binary tree partitioning. In some examples, determining the partition tree type may include determining that the partition tree type is one of binary tree partitioning, and the video decoder 300 may receive information indicating whether the residual block is horizontally partitioned or vertically partitioned.
[0371] The video decoder 300 may determine, based on the received information that the residual block is partitioned and the partition tree type used for the residual block, a plurality of residual sub-blocks into which the residual block is partitioned according to the partition tree type ( 402 ).
[0372] The video decoder 300 may generate residual data for the current block based at least in part on the residual block being partitioned into a plurality of residual sub-blocks according to a partition tree type (404). In some examples, the video decoder 300 may infer a transform kernel for the plurality of residual sub-blocks in at least one of a horizontal direction or a vertical direction from the bitstream based at least in part on the partition tree type for the residual block or the partition type for the residual block, wherein generating the residual data for the current block may further include generating the residual data based at least in part on the transform kernel for the plurality of residual sub-blocks.
[0373] Video decoder 300 may use the residual data to decode the current block (406).
[0374] In some examples, to decode the current block using residual data, the video decoder 300 may decode data representing a prediction mode for the current block, generate a prediction block for the current block using the prediction mode, and combine the prediction block with the residual data to reproduce the current block.
[0375] In some examples, the current block is inter-predicted or intra-predicted. In some examples, the current block includes a luma block of a coding unit (CU). In some examples, the current block is a coding unit (CU) or a block of a CU, the residual for the current block is a transform unit (TU) or a block of a TU, and the plurality of residual sub-blocks are non-square sub-TUs and have a different size than the CU.
[0376] Fig.14 is a flowchart illustrating an example method for encoding a current block having data of a residual block partitioned according to a partition tree type. Although with respect to the video encoder 200 ( Figure 1 and Fig. 9 ), but it should be understood that other devices may be configured to perform the same Fig.14 In some examples, the video encoder 200 includes at least one of an integrated circuit, a microprocessor, or a wireless communication device. In some examples, the video encoder 200 may include a camera configured to capture video data. In some examples, the video encoder 200 may include one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0377] The video encoder 200 may determine that a residual block for a current block of video data is partitioned into a plurality of residual sub-blocks according to a partition tree type (450). The video encoder 200 may encode a bitstream as an encoded representation of the video data, the bitstream signaling information indicating whether the residual block is partitioned, and further signaling information indicating a partition tree type for the partitioned residual block (452).
[0378] In some examples, as a bitstream of the encoded representation of the video data, the bitstream signals information indicating whether the residual block is partitioned, and further signals information indicating a partition tree type for the partitioned residual block. In some examples, the set information of the tree type includes one or more of a quadtree partition and a binary tree partition. In some examples, when the information indicating the partition tree type for the residual block indicates that the partition tree type is one of the binary tree partitions, the bitstream further signals information indicating whether the residual block is partitioned horizontally or vertically.
[0379] In some examples, the current block is a coding unit (CU) or a block of a CU, the residual block for the current block is a transform unit (TU) or a block of a TU, and the multiple residual sub-blocks are non-square sub-TUs and have a different size than the CU.
[0380] It should be appreciated that, depending on the example, certain actions or events of any of the techniques described herein may be performed in a different sequence, may be added, combined, or omitted entirely (e.g., not all described actions or events are necessary for the practice of the techniques). In addition, in some examples, actions or events may be performed concurrently, such as through multithreading, interrupt handling, or multiple processors, rather than sequentially.
[0381] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored or sent as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media such as data storage media; or communication media, including any media that facilitates the transfer of a computer program from one place to another, for example, according to a communication protocol. In this manner, computer-readable media may generally correspond to (1) non-transitory tangible computer-readable storage media or (2) communication media such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in the present disclosure. A computer program product may include a computer-readable medium.
[0382] As an example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store the required program code in the form of instructions or data structures and can be accessed by a computer. Similarly, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, optical cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, microwaves are used to send instructions from a website, server or other remote source, then coaxial cable, optical cable, twisted pair, DSL, or wireless technologies such as infrared, radio and microwaves are included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carriers, signals or other transient media, but are directed to non-transient, tangible storage media. Disks and optical disks used herein include compact disks (CDs), laser disks, optical disks, digital versatile disks (DVDs), floppy disks and blue-ray disks, wherein disks are usually magnetically regenerated data, while optical disks are optically regenerated data with lasers. The combination of the above items should also be included in the scope of computer-readable media.
[0383] Instructions may be executed by one or more processors such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Accordingly, the terms "processor" and "processing circuitry" as used herein may refer to any of the aforementioned structures or any other structure suitable for implementing the techniques described herein. In addition, in some aspects, the functionality described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Similarly, the technology may be fully implemented in one or more circuits or logic elements.
[0384] The techniques of the present disclosure may be implemented in a variety of devices or apparatuses, including wireless handheld devices, integrated circuits (ICs) or IC sets (e.g., chipsets). Various components, modules, or units are described in the present disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but do not necessarily need to be implemented by different hardware units. More specifically, as described above, the various units may be combined in a codec hardware unit or provided by a collection of interoperable hardware units including one or more processors as described above in combination with appropriate software and / or firmware.
[0385] Various examples have been described. These and other examples are within the scope of the following claims.
Claims
1. A method for decoding video data, the method comprising: receiving, in a bitstream comprising an encoded representation of the video data, information indicating whether a residual block is partitioned and information indicating a partitioning tree type for the residual block based on the residual block being partitioned, wherein the residual block indicates a difference between a current block and a predicted block; Determine, based on the received information that the residual block is segmented and the segmentation tree type for the residual block, a plurality of residual sub-blocks into which the residual block is segmented according to the segmentation tree type, the segmentation tree type for the residual block comprising a ternary tree; generating residual data for the current block based at least in part on partitioning the residual block into the plurality of residual subblocks according to the partitioning tree type; as well as The current block is decoded using the residual data.
2. The method of claim 1, wherein receiving information indicating the partition tree type comprises receiving index information in a set of tree types, the method further comprising determining the partition tree type based on the received index information. 3 . The method of claim 2 , wherein determining the partition tree type comprises determining that the partition tree type is a binary tree partition, the method further comprising receiving information indicating whether the residual block is partitioned horizontally or vertically. The method of claim 1 , wherein the current block is inter-predicted or intra-predicted.
5. The method of claim 1, wherein: The current block is a codec unit (CU) or a block of the CU; The residual block for the current block is a transform unit (TU) or a block of the TU; and The plurality of residual sub-blocks are non-square sub-TUs and have a different size from that of the CU.
6. The method of claim 1, wherein decoding the current block comprises: decoding data representing a prediction mode for the current block; generating the prediction block for the current block using the prediction mode; as well as The prediction block is combined with the residual data to reproduce the current block.
7. A device for decoding video data, the device comprising: a memory configured to store video data; as well as A processor implemented in a circuit system and configured to: receiving, in a bitstream comprising an encoded representation of the video data, information indicating whether a residual block is partitioned and information indicating a partitioning tree type for the residual block based on the residual block being partitioned, wherein the residual block indicates a difference between a current block and a predicted block; Determine, based on the received information that the residual block is segmented and the segmentation tree type for the residual block, a plurality of residual sub-blocks into which the residual block is segmented according to the segmentation tree type, the segmentation tree type for the residual block comprising a ternary tree; generating residual data for the current block based at least in part on partitioning the residual block into the plurality of residual subblocks according to the partitioning tree type; as well as The current block is decoded using the residual data.
8. The apparatus of claim 7, wherein: The processor configured to receive information indicating the partitioning tree type is further configured to receive index information in a set of tree types; as well as The processor is further configured to determine the partition tree type based on the received index information.
9. The apparatus of claim 7, wherein the set of tree types comprises one or more of ternary tree partitioning, quadtree partitioning, or binary tree partitioning.
10. The apparatus of claim 9, wherein: The processor configured to determine the partition tree type is further configured to determine that the partition tree type is a binary tree partition; and The processor is further configured to receive information indicating whether the residual block is split horizontally or vertically.
11. The apparatus of claim 7, wherein: The current block is a codec unit (CU) or a block of the CU; The residual block for the current block is a transform unit (TU) or a block of the TU; and The plurality of residual sub-blocks are non-square sub-TUs and have a different size from that of the CU.
12. The apparatus of claim 7, wherein the processor configured to decode the current block is further configured to: decoding data representing a prediction mode for the current block; generating the prediction block for the current block using the prediction mode; and The prediction block is combined with the residual data to reproduce the current block.
13. The apparatus of claim 7, further comprising a display configured to display the decoded current block.
14. The device of claim 7, wherein the device comprises at least one of: integrated circuit; microprocessor; or Wireless communication equipment.
15. A method for encoding video data, the method comprising: Determining that a residual block for a current block of video data is partitioned into a plurality of residual sub-blocks according to a partition tree type; as well as A bitstream is encoded as an encoded representation of the video data, the bitstream signaling information indicating whether the residual block is partitioned, and further signaling information indicating the partition tree type for the residual block that is partitioned.
16. The method of claim 15, wherein: The bitstream signaling information indicating the partition tree type for the residual block includes index information to a set of tree types.
17. The method of claim 15, wherein the set of tree types includes one or more of ternary tree partitioning, quadtree partitioning, or binary tree partitioning.
18. The method of claim 17, wherein: When the information indicating the partition tree type for the residual block indicates that the partition tree type is the binary tree partition, the bitstream further signals information indicating whether the residual block is horizontally partitioned or vertically partitioned.
19. The method of claim 15, wherein: The current block is a codec unit (CU) or a block of the CU; The residual block for the current block is a transform unit (TU) or a block of the TU; and The plurality of residual sub-blocks are non-square sub-TUs and have a different size from that of the CU.
20. A device for encoding video data, the device comprising: a memory configured to store video data; as well as A processor implemented in a circuit system and configured to: determining that a residual block for a current block of video data is partitioned into a plurality of residual sub-blocks according to a partition tree type, the partition tree type for the residual block comprising a ternary tree; as well as A bitstream is encoded as an encoded representation of the video data, the bitstream signaling information indicating whether the residual block is partitioned and also signaling information indicating the partition tree type for the residual block that is partitioned.
21. The apparatus of claim 20, wherein: The bitstream signaling information indicating the partition tree type for the residual block includes index information to a set of tree types.
22. The apparatus of claim 20, wherein the set of tree types includes one or more of ternary tree partitioning, quadtree partitioning, and binary tree partitioning.
23. The apparatus of claim 20, wherein: The current block is a codec unit (CU) or a block of the CU; The residual block for the current block is a transform unit (TU) or a block of the TU; and The plurality of residual sub-blocks are non-square sub-TUs and have a different size from that of the CU.
24. The device of claim 20, wherein the device comprises at least one of: integrated circuit; microprocessor; or Wireless communication equipment.
Citation Information
Patent Citations
Coding adaptive multiple transform information for video coding
US10986340B2
Enhanced multiple transforms for prediction residual
US20160219290A1
Look-up table for enhanced multiple transform
US20180020218A1