Implicit Transform Selection in Video Coding
By inferring the transformation type of video blocks, including size and ISP judgment, selecting appropriate discrete sinusoidal transformation, and transforming the video block, the problem of large signaling overhead in the prior art is solved and the efficiency of video encoding and decoding is improved.
Patent Information
- Application Number
- CN202080018569.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-03-11
- Filing Date
- 2020-03-12
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2040-03-12
AI Technical Summary
When handling the transformation of video blocks, existing video encoding and decoding technologies need to explicitly signal the transformation type, resulting in an increase in signaling overhead and affecting efficiency.
By inferring the transformation type, including determining the size of the current transform block and whether to use in-subblock division (ISP), selecting a specific discrete sinusoidal transform (DST) as the transformation type when the size threshold is satisfied, and the transformation type is applied to transform the video block.
It is implemented to determine the transformation type used by the video encoder and decoder without explicit signaling, improving the efficiency of video encoding and decoding.
Smart Images

Figure CN113545053B_ABST
Abstract
Description
[0001] This application claims priority to U.S. Patent Application No. 16 / 815,920, filed on Mar. 11, 2020, which claims the benefit of U.S. Provisional Patent Application No. 62 / 817,397, filed on Mar. 12, 2019, the entire contents of which are hereby incorporated by reference. Technical Field
[0002] This disclosure relates to video encoding and video decoding. Background Art
[0003] Digital video capabilities can be incorporated into a variety of devices, including digital televisions, digital live systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radiotelephones (so-called “smart phones”), video teleconferencing devices, video streaming devices, etc. Digital video devices implement video decoding techniques (such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 (Part 10, Advanced Video Coding (AVC)), ITU-T H.265 / High Efficiency Video Coding (HEVC)) and extensions of such standards). By implementing such video decoding techniques, video devices can send, receive, encode, decode, and / or store digital video information more efficiently.
[0004] Video decoding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in a video sequence. For block-based video decoding, a video slice (e.g., a video picture or a portion of a video picture) can be divided into video blocks, which 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 adjacent 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 adjacent blocks in the same picture, or temporal prediction relative to reference samples in other reference pictures. A picture can be referred to as a frame, and a reference picture can be referred to as a reference frame. Summary of the Invention
[0005] In one example, a method includes: inferring a transform type for a current transform block of a current video block from a plurality of transform types including one or more discrete cosine transforms (DCTs) and one or more discrete sine transforms (DSTs), wherein inferring the transform type includes: determining a size of the current transform block; determining whether the current video block is segmented using intra-subblock partitioning (ISP); and in response to determining that the size of the current transform block meets a size threshold and determining that the current video block is segmented using ISP, selecting a particular DST from the one or more DSTs as the selected transform type; transforming the current transform block using the selected transform type to obtain a block of reconstructed residual data for the video block; and reconstructing the video block based on the reconstructed residual data for the video block.
[0006] In another example, a device includes: a memory configured to store video blocks; and one or more processors implemented in circuitry and configured to: infer a transform type for a current transform block of a current video block from a plurality of transform types including one or more DCTs and one or more DSTs, wherein, to infer the transform type, the one or more processors are configured to: determine a size of the current transform block; determine whether the current video block is segmented using ISP; and in response to determining that the size of the current transform block meets a size threshold and determining that the current video block is segmented using ISP, select a particular DST from the one or more DSTs as the selected transform type; transform the current transform block using the selected transform type to obtain a block of reconstructed residual data for the video block; and reconstruct the video block based on the reconstructed residual data for the video block.
[0007] In another example, a computer-readable storage medium stores instructions that, when executed, cause one or more processors of a video coding device to perform the following operations: infer a transform type for a current transform block of a current video block from a plurality of transform types including one or more DCTs and one or more DSTs, wherein the instructions that cause the one or more processors to infer the transform type include instructions that cause the one or more processors to perform the following operations: determine a size of the current transform block; determine whether the current video block is segmented using ISP; and in response to determining that the size of the current transform block meets a size threshold and determining that the current video block is segmented using ISP, select a particular DST from the one or more DSTs as the selected transform type; transform the current transform block using the selected transform type to obtain a block of reconstructed residual data for the video block; and reconstruct the video block based on the reconstructed residual data for the video block.
[0008] Details of one or more examples of the present disclosure are set forth in the accompanying drawings and the following description. Other features, objects, and advantages of the various aspects of the technology will be apparent from the description, the drawings, and the claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 is a block diagram illustrating an example video encoding and decoding system that may implement the technology of the present disclosure.
[0010] Figure 2A and Figure 2B is a conceptual diagram illustrating an example quadtree binary tree (QTBT) structure and corresponding coding tree units (CTUs).
[0011] Figure 2C is a conceptual diagram illustrating another example quadtree structure and corresponding tree units.
[0012] Figure 3 is a block diagram illustrating an example video encoder that may implement the technology of the present disclosure.
[0013] Figure 4 is a block diagram illustrating an example video decoder that may implement the technology of the present disclosure.
[0014] Figure 5 is a block diagram illustrating a system for hybrid video coding with adaptive transform selection.
[0015] Figure 6 is a conceptual diagram illustrating a separable transform implementation in which horizontal and vertical lines are independently transformed.
[0016] Figure 7 is a conceptual diagram illustrating example blocks for which a video decoder according to one or more techniques of the present disclosure may implicitly derive a transform.
[0017] Figure 8 is a conceptual diagram illustrating intra prediction directions.
[0018] Figure 9 is a flowchart illustrating an example method for encoding a current block.
[0019] Figure 10 is a flowchart illustrating an example method for decoding a current block.
[0020] Figure 11 is a flowchart illustrating an example method for inferring a transform type of a transform block for a video block according to one or more techniques of the present disclosure. DETAILED DESCRIPTION
[0021] Generally speaking, the present disclosure describes techniques for implicit transform selection in video coding. As discussed further below in detail, after prediction such as intra prediction or inter prediction of a block, a video encoder may compute residual data for the block. The residual data (such as a residual block) represents the sample-by-sample difference between the block and a predicted block formed for the block using a corresponding prediction mode. The video encoder may apply one or more transforms to the residual block to produce transformed data in the transform domain rather than the sample domain. For example, the video encoder may apply a discrete cosine transform (DCT). In some examples, the video encoder may utilize different types of transforms. For example, the video encoder may use various types of DCTs.
[0022] The video decoder may apply an inverse transform when decoding video data. In cases where the video decoder may utilize different types of transforms, the video decoder may have to determine which transform the video encoder used. In some examples, the video encoder may explicitly signal which type of transform was used when transforming the residual data (e.g., encoded using a syntax element with a value indicating which type of transform was used when transforming the residual data). However, in some examples, it may not be desirable to explicitly signal the type of transform used (e.g., due to signaling overhead).
[0023] According to one or more techniques of the present disclosure, the video decoder may implicitly determine which type of transform was used when transforming the residual data. For example, the video decoder may apply a set of rules to determine which type of transform was used when transforming the residual data based on side information available at the video decoder (e.g., explicitly signaled or implicitly derived from the signaled information). The video encoder may apply the same rules when determining which type of transform to use. Thus, both the video encoder and the video decoder can determine which type of transform to use without explicit signaling of the transform type.
[0024] Figure 1 is a block diagram illustrating an example video encoding and decoding system 100 that may perform the techniques of the present disclosure. Generally speaking, the techniques of the present disclosure relate to coding (encoding and / or decoding) video data. Typically, video data includes any data for processing video. Thus, video data may include raw unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata (e.g., signaling data).
[0025] As Figure 1As shown, in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. Specifically, the source device 102 provides the video data to the destination device 116 via a computer-readable medium 110. The source device 102 and the destination device 116 can include any of a variety of devices, including desktop computers, notebook computers (i.e., laptop computers), tablet computers, set-top boxes, cellular phones such as smart phones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some cases, the source device 102 and the destination device 116 can be equipped for wireless communication and can thus be referred to as wireless communication devices.
[0026] In Figure 1 the example, 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 techniques for implicit transform selection. Thus, the source device 102 represents an example of a video encoding device, while the destination device 116 represents an example of a video decoding device. In other examples, the source device and the destination device can include other components or arrangements. For example, the source device 102 can receive video data from an external video source such as an external camera. Similarly, the destination device 116 can interface with an external display device instead of including an integrated display device.
[0027] As Figure 1 shown, the system 100 is merely an example. Generally, any digital video encoding and / or decoding device can perform techniques for implicit transform selection. The source device 102 and the destination device 116 are merely examples of such encoding devices, where the source device 102 generates encoded video data for transmission to the destination device 116. The present disclosure refers to an "encoding" device as a device that performs encoding (e.g., encoding and / or decoding) of data. Thus, the video encoder 200 and the video decoder 300 represent examples of encoding devices (specifically, a video encoder and a video decoder), respectively. In some examples, the devices 102 and 116 can operate in a substantially symmetric manner such that each of the devices 102, 116 includes video encoding and decoding components. Thus, the system 100 can support one-way or two-way video transmission between the video devices 102, 116, e.g., for video streaming, video playback, video broadcast, or video telephony.
[0028] Typically, video source 104 represents a source of video data (i.e., raw, unencoded video data) and provides a sequential series of pictures (also referred to as "frames") of the video data to video encoder 200, which encodes the data for the pictures. The video source 104 of source device 102 may include a video capture device, such as a camera, a video archival unit containing previously captured raw video, and / or a video feed interface for receiving video from a video content provider. As an additional alternative, video source 104 may generate computer graphics-based data as the source video, or generate a combination of live video, archived video, and computer-generated video. In each case, video encoder 200 may encode the captured, pre-captured, or computer-generated video data. Video encoder 200 may reorder the pictures from the received order (sometimes referred to as "display order") to a decoding order for decoding. Video encoder 200 may generate a bitstream including the encoded video data. Then, source device 102 may output the encoded video data to computer-readable medium 110 via output interface 108 for reception and / or retrieval by, for example, input interface 122 of destination device 116.
[0029] The memory 106 of source device 102 and the memory 120 of destination device 116 represent general-purpose memories. In some examples, memories 106, 120 may store raw video data, e.g., raw video from video source 104 and raw decoded video data from video decoder 300. Additionally or alternatively, memories 106, 120 may store software instructions that may be executed, for example, by video encoder 200 and video decoder 300, respectively. Although shown as separate from video encoder 200 and video decoder 300 in this example, it should be understood that video encoder 200 and video decoder 300 may also include internal memories for functionally similar or equivalent purposes. Further, memories 106, 120 may store, for example, the encoded video data output from video encoder 200 and input to video decoder 300. In some examples, portions of memories 106, 120 may be allocated as one or more video buffers, e.g., to store raw decoded and / or encoded video data.
[0030] Computer-readable medium 110 may represent any type of medium or device capable of conveying the encoded video data from source device 102 to destination device 116. In one example, computer-readable medium 110 represents a communication medium such that source device 102 can send the encoded video data directly to destination device 116 in real time, for example, via a radio frequency network or a computer-based network. Output interface 108 may modulate a transmission signal including the encoded video data according to a communication standard such as a wireless communication protocol, and input interface 122 may demodulate the received transmission signal according to a communication standard such as a wireless communication protocol. The communication medium may include any wireless or wired communication medium, for example, the radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network such as: a local area network, a wide area network, or a global network such as the Internet. The communication medium may include routers, switches, base stations, or any other devices that may be useful for facilitating communication from source device 102 to destination device 116.
[0031] In some examples, source device 102 may output the encoded data from output interface 108 to storage device 116. Similarly, destination device 116 may access the encoded data from storage device 116 via input interface 122. Storage device 116 may include any of a variety of distributed or locally accessible data storage media, such as a hard disk drive, a Blu-ray disc, a DVD, a CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing the encoded video data.
[0032] In some examples, the source device 102 may output the encoded video data to a file server 114 or to another intermediate storage device that can store the encoded video generated by the source device 102. The destination device 116 may access the stored video data from the file server 114 via streaming or downloading. The file server 114 may be any type of server device capable of storing the encoded video data and sending the encoded video data to the destination device 116. The file server 114 may represent a web server (e.g., for a website), a File Transfer Protocol (FTP) server, a content delivery network device, or a Network Attached Storage (NAS) device. The destination device 116 may access the encoded video data from the file server 114 via any standard data connection, including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., DSL, cable modem, etc.), or a combination of both, suitable for accessing the encoded video data stored on the file server 114. The file server 114 and the input interface 122 may be configured to operate according to: a streaming protocol, a download transfer protocol, or a combination thereof.
[0033] The output interface 108 and the input interface 122 may represent a wireless transmitter / receiver, a modem, a wired networking component (e.g., an Ethernet card), a wireless communication component operating according to any one of the various IEEE 802.11 standards, or other physical components. In examples where the output interface 108 and the input interface 122 include wireless components, the output interface 108 and the input interface 122 may be configured to transmit data (such as encoded video data) according to a cellular communication standard (such as 4G, 4G-LTE (Long Term Evolution), enhanced LTE, 5G, etc.). In some examples where the output interface 108 includes a wireless transmitter, the output interface 108 and the input interface 122 may be configured to transmit data (such as encoded video data) according to other wireless standards (such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee TM )、Bluetooth TM standard, etc.). In some examples, the source device 102 and / or the destination device 116 may include respective System-on-Chip (SoC) devices. For example, the source device 102 may include an SoC device for performing the functions ascribed to the video encoder 200 and / or the output interface 108, and the destination device 116 may include an SoC device for performing the functions ascribed to the video decoder 300 and / or the input interface 122.
[0034] The techniques of the present disclosure can be applied to video coding to support any of a variety of multimedia applications, such as over-the-air television broadcasts, cable television transmissions, satellite television transmissions, Internet streaming video transmissions (such as HTTP-based Dynamic Adaptive Streaming over HTTP (DASH)), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0035] The input interface 122 of the destination device 116 receives the encoded video bitstream from a computer-readable medium 110 (e.g., a storage device 112, a file server 114, etc.). The computer-readable medium 110 of the encoded video bitstream may include signaling information defined by the video encoder 200 and also used by the video decoder 300, such as syntax elements having values for describing the characteristics and / or processing of video blocks or other coding units (e.g., slices, pictures, groups of pictures, sequences, etc.). The display device 118 displays the decoded pictures of the decoded video data to a user. The display device 118 may represent any of a variety of display devices, such as a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.
[0036] Although not shown in Figure 1 In some examples, the video encoder 200 and the video decoder 300 may each be integrated with an audio encoder and / or an audio decoder and may include appropriate MUX-DEMUX units or other hardware and / or software to process a multiplexed stream including both audio and video in a common data stream. If applicable, the MUX-DEMUX unit may follow the ITU H.223 multiplexer protocol or other protocols (such as the User Datagram Protocol (UDP)).
[0037] Video encoder 200 and video decoder 300 can each be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When the technology is implemented partially in software, the device may store instructions for the software in a suitable non-transitory computer-readable medium and use one or more processors to execute the instructions in hardware to perform the techniques of the present disclosure. Each of video encoder 200 and video decoder 300 may be included in one or more encoders or decoders, and any of the encoders or decoders may be integrated as part of a combined encoder / decoder (CODEC) in a corresponding device. Devices including video encoder 200 and / or video decoder 300 may include integrated circuits, microprocessors, and / or wireless communication devices (such as cellular telephones).
[0038] Video encoder 200 and video decoder 300 may operate according to a video coding standard, such as ITU-T H.265 (also known as the High Efficiency Video Coding (HEVC) standard) or an extension thereof (such as multi-view and / or scalable video coding extensions). Alternatively, video encoder 200 and video decoder 300 may operate according to other proprietary or industry standards, such as the Joint Exploration Test Model (JEM) or the ITU-T H.266 standard, also known as Versatile Video Coding (VVC). The latest draft of the VVC standard is described in the following document: Bross et al., “Versatile Video Coding (Draft 4)”, Joint Video Team (JVT) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 13th meeting: Marrakesh, Morocco, January 9-18, 2019, JVET-M1001-v6 (hereinafter referred to as “VVC Draft 4”). However, the techniques of the present disclosure are not limited to any particular coding standard.
[0039] Generally, video encoder 200 and video decoder 300 may perform block-based coding of pictures. The term "block" generally refers to a structure including data to be processed (e.g., to be encoded, decoded, or otherwise used during an encoding and / or decoding process). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Generally, video encoder 200 and video decoder 300 may code video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, instead of coding the red, green, and blue (RGB) data of the samples for a picture, video encoder 200 and video decoder 300 may code the luminance and chrominance components, where the chrominance components may include both a red hue and a blue hue chrominance component. In some examples, video encoder 200 converts the received RGB-formatted data to a YUV representation before encoding, and video decoder 300 converts the YUV representation to an RGB format. Alternatively, a preprocessing unit and a postprocessing unit (not shown) may perform these conversions.
[0040] Generally speaking, the present disclosure may relate to coding (e.g., encoding and decoding) of pictures to include a process of encoding or decoding data of a picture. Similarly, the present disclosure may relate to coding of blocks of a picture to include a process of encoding or decoding data for a block (e.g., prediction and / or residual coding). An encoded video bitstream generally includes a series of values for representing coding decisions (e.g., coding modes) and syntax elements that partition a picture into blocks. Thus, a reference to coding a picture or a block should generally be understood as coding the values of the syntax elements used to form the picture or the block.
[0041] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video coder (such as video encoder 200) divides a coding tree unit (CTU) into CUs according to a quadtree structure. That is, the video coder divides the CTU and CUs into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. A node without child nodes may be referred to as a "leaf node", and a CU of such a leaf node may include one or more PUs and / or one or more TUs. The video coder may further divide PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents the division of TUs. In HEVC, a PU represents inter-prediction data, while a TU represents residual data. An intra-predicted CU includes intra-prediction information, such as an intra-mode indication.
[0042] As another example, video encoder 200 and video decoder 300 may be configured to operate according to JEM or VVC. According to JEM or VVC, a video coder (such as video encoder 200) divides a picture into multiple coding tree units (CTUs). Video encoder 200 may divide a CTU according to a tree structure (such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure). The QTBT structure removes the concept of multiple partitioning types, such as the separation between CUs, PUs, and TUs in HEVC. The QTBT structure includes two levels: a first level divided according to quadtree partitioning and a second level divided according to binary tree partitioning. The root node of the QTBT structure corresponds to the CTU. The leaf nodes of the binary tree correspond to coding units (CUs).
[0043] In the MTT partitioning structure, quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of ternary tree (TT) partitioning may be used to partition a block. Ternary tree partitioning is a partitioning in which a block is split into three sub-blocks. In some examples, ternary tree partitioning divides a block into three sub-blocks without dividing the original block through the center. The partitioning types in MTT (e.g., QT, BT, and TT) may be symmetric or asymmetric.
[0044] In some examples, video encoder 200 and video decoder 300 may use a single QTBT or MTT structure to represent each of the luminance component and the chrominance components, while in other examples, video encoder 200 and video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luminance component and another QTBT / MTT structure for the two chrominance components (or two QTBT / MTT structures for the respective chrominance components).
[0045] Video encoder 200 and video decoder 300 may be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, or other partitioning structures per HEVC. For purposes of explanation, a description of the techniques of the present disclosure is given with respect to QTBT partitioning. However, it should be understood that the techniques of the present disclosure may also be applied to video coders configured to use quadtree partitioning or also other types of partitioning.
[0046] The present disclosure may interchangeably use "NxN" and "N by N" to refer to the sample dimensions of a block (such as a CU or other video block) in terms of vertical and horizontal dimensions. For example, 16x16 samples or 16 by 16 samples. Generally, a 16x16 CU will have 16 samples in the vertical direction (y = 16) and 16 samples in the horizontal direction (x = 16). Similarly, an NxN CU generally has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. The samples in a CU can be arranged in rows and columns. Additionally, a CU does not necessarily need to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU can include NxM samples, where M does not necessarily equal N.
[0047] Video encoder 200 encodes video data for the representation prediction and / or residual information of a CU and other information. The prediction information indicates how the CU is to be predicted to form a prediction block for the CU. The residual information generally represents the sample-by-sample difference between the samples of the CU before encoding and the prediction block.
[0048] To predict a CU, video encoder 200 can generally form a prediction block for the CU through inter-frame prediction or intra-frame prediction. Inter-frame prediction generally refers to predicting a CU based on the data of previously decoded pictures, while intra-frame prediction generally refers to predicting a CU based on the previously decoded data of the same picture. To perform inter-frame prediction, video encoder 200 can use one or more motion vectors to generate a prediction block. Video encoder 200 can generally perform a motion search to identify, for example, a reference block that closely matches the CU in terms of the difference between the CU and the reference block. Video encoder 200 can use the following to calculate a difference metric to determine whether the reference block closely matches the current CU: sum of absolute differences (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared difference (MSD), or other such difference calculations. In some examples, video encoder 200 can use uni-directional prediction or bi-directional prediction to predict the current CU.
[0049] Some examples of JEM and VVC also provide an affine motion compensation mode, which can be considered an inter-frame prediction mode. In the affine motion compensation mode, video encoder 200 can determine two or more motion vectors for representing non-translational motion (such as zooming in or out, rotation, perspective motion, or other irregular motion types).
[0050] To perform intra prediction, the video encoder 200 may select an intra prediction mode to generate a prediction block. Some examples of JEM and VVC provide sixty-seven intra prediction modes, including various directional modes, as well as planar mode and DC mode. Generally, the video encoder 200 selects an intra prediction mode that describes the neighboring samples of the current block (e.g., the block of a CU) according to which the samples of the current block are to be predicted. Assuming that the video encoder 200 decodes CTUs and CUs in raster scan order (from left to right, top to bottom), such samples can generally be above, top-left, or to the left of the current block in the same picture as the current block.
[0051] The video encoder 200 encodes data representing the prediction mode for the current block. For example, for an inter prediction mode, the video encoder 200 may encode data representing which one of the various available inter prediction modes is used, as well as the motion information for the corresponding mode. For unidirectional or bidirectional inter prediction, for example, the video encoder 200 may use advanced motion vector prediction (AMVP) or merge mode to encode the motion vectors. The video encoder 200 may use a similar mode to encode the motion vectors for the affine motion compensation mode.
[0052] After prediction such as intra prediction or inter prediction of a block, the video encoder 200 may calculate the residual data for the block. The residual data (such as a residual block) represents the sample-by-sample difference between the block and the prediction block for the block, and the prediction block is formed using the corresponding prediction mode. The video encoder 200 may apply one or more transforms to the residual block to produce transformed data in the transform domain rather than in the sample domain. For example, 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 second transform after the first transform, such as a mode-dependent non-separable second transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), etc. The video encoder 200 produces transform coefficients after applying one or more transforms.
[0053] As described above, a video encoder (such as the video encoder 200) may apply various types of transforms to transform the residual data. The following is an overview of discrete sine and cosine transforms (DCT and DST). In addition, the transform scheme used in the HEVC standard is briefly discussed.
[0054] Discrete sine and cosine transforms.
[0055] A transform indicates a process of deriving an alternative representation of an input signal. Given an N-point vector x = [x0, x1, …, x N-1T and a given set of vectors {Φ0, Φ1, …, Φ M-1}, x can be approximately or exactly represented using a linear combination of Φ0, Φ1, …, Φ M-1 as follows:
[0056]
[0057] where can be an approximate or equivalent value of x, the vector f = [f i , f2, .., f M-1 is called the transformation coefficient vector, and {Φ0, Φ1, …, Φ M-1} are the transformation basis vectors.
[0058] In the context of video coding, the transformation coefficients are generally uncorrelated and sparse, i.e., the energy of the input vector x is compressed only in a few transformation coefficients, and most of the remaining transformation coefficients are typically close to 0.
[0059] Given specific input data, the optimal transformation in terms of energy compaction is the so-called Karhunen-Loeve transform (KLT), which uses the eigenvectors of the covariance matrix of the input data as the transformation basis vectors. Thus, the KLT is actually a data-dependent transformation and does not have a general mathematical formula. However, under certain assumptions, e.g., the input data forms a first-order stationary Markov process, it has been shown in the literature that the corresponding KLT is actually a member of the family of sine unitary transforms. The family of sine unitary transforms uses transformation basis vectors formulated as follows to indicate the transformation:
[0060] Φ m (k) = A · e ikθ + B · e -ikθ
[0061] where e is the base of the natural logarithm, approximately equal to 2.71828, and A, B, and θ are usually complex numbers and depend on the value of m.
[0062] Example transforms include the discrete Fourier transform, the cosine transform, the sine transform, and the KLT transform (for a first-order stationary Markov process) which is a member of the family of sine unitary transforms. According to S.A. Martucci, "Symmetric convolution and the discrete sine and cosine transforms," IEEE Transactions on Signal Processing SP-42, 1038-1051 (1994), a complete set of the discrete cosine transform (DCT) and discrete sine transform (DST) families consists of 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.
[0063] Assume the input N-point vector is represented as x = [x0, x1, …, x N-1 T , and it is transformed into another N-point transform coefficient vector, represented as y = [y0, y1, …, y N-1 T , by multiplying with a matrix. The process can be further illustrated by one of the following transform formulas, where k ranges from 0 to N-1 (inclusive):
[0064] DCT Type-I (DCT-1):
[0065]
[0066] where
[0067]
[0068] DCT Type-II (DCT-2):
[0069]
[0070] where
[0071] DCT Type-III (DCT-3):
[0072]
[0073] where
[0074] DCT Type-IV (DCT-4):
[0075]
[0076] DCT Type-V (DCT-5):
[0077]
[0078] Among them
[0079] DCT type - VI (DCT - 6):
[0080]
[0081] Among them
[0082] DCT type - VII (DCT - 7):
[0083]
[0084] Among them DCT type - VIII (DCT - 8):
[0085]
[0086] DST type - I (DST - 1):
[0087]
[0088] DST type - II (DST - 2):
[0089]
[0090] Among them
[0091] DST type - III (DST - 3):
[0092]
[0093] Among them
[0094] DST type - IV (DST - 4):
[0095]
[0096] DST type - V (DST - 5):
[0097]
[0098] DST type - VI (DST - 6):
[0099]
[0100] DST type - VII (DST - 7):
[0101]
[0102] DST Type - VIII (DST - 8):
[0103]
[0104] where
[0105] The transform type is specified by the mathematical formula of the transform basis function. For example, the 4 - point DST - VII and the 8 - point DST - VII have the same transform type, regardless of the value of N.
[0106] Without loss of generality, the following general formula can be used to represent all of the above - mentioned transform types:
[0107]
[0108] where T is the transform matrix specified by the definition of a particular transform, such as DCT Type - I through DCT Type - VIII, or DST Type - I through DST Type - VIII, and the row vectors of T (e.g., [T i,0 , T i,1 , T i,2 , …, T i,N-1 ) are the i - th transform basis vectors. The transform applied to an N - point input vector is called an N - point transform.
[0109] It should also be noted that the above - mentioned transform formula applied to 1 - D input data x can be represented in the form of matrix multiplication as shown below:
[0110] y = T · x
[0111] where T indicates the transform matrix, x indicates the input data vector, and y indicates the output transform coefficient vector.
[0112] Transform for two - dimensional (2 - D) input data.
[0113] Apply the transform introduced in the previous section to 1 - D input data, and the transform can also be extended for 2 - D input data sources. Assume X is the input MxN data array. Typical methods for applying the transform to 2 - D input data include separable and non - separable 2 - D transforms.
[0114] The separable 2 - D transform applies the 1 - D transform sequentially to the horizontal and vertical vectors of X, as follows:
[0115] Y = C · X · R T
[0116] Where C and R represent given MxM and NxN transformation matrices respectively. As can be seen from the formula, C applies a 1-D transformation to the column vectors of X, while R applies a 1-D transformation to the row vectors of X. In the later part of this document, for simplicity, C and R are represented as left (vertical) and right (horizontal) transformations, and the two of them form a transformation pair. There are cases where C is equal to R and is an orthogonal matrix. In such cases, the separable 2-D transformation is determined by only one transformation matrix.
[0117] The non-separable 2D transformation first reorganizes all the elements of X into a single vector, i.e., X’, for example, by performing the following mathematical mapping:
[0118] X′ (i·N+j) =X i,j
[0119] Then a 1-D transformation T' is applied to X’, as follows:
[0120] Y=T′·X
[0121] where T’ is an (M*N)x(M*N) transformation matrix.
[0122] In video coding, separable 2-D transformations can be applied because, compared with 1-D transformations, they can use much fewer arithmetic (addition, multiplication) counts.
[0123] In conventional video codecs such as H.264 / AVC, integer approximations of 4-point and 8-point discrete cosine transform (DCT) type-II are always applied to intra- and inter-frame prediction residuals. To better adapt to the various statistical information of the residual samples, more flexible transform types other than DCT type-II are utilized in newer video codecs. For example, in HEVC, an integer approximation of 4-point type-VII discrete sine transform (DST) is used for intra-frame prediction residuals, which has been theoretically proven and experimentally verified that for the residual vectors generated along the intra-frame prediction direction, DST type-VII is more efficient than DCT type-II. For example, for the row residual vectors generated by the horizontal intra-frame prediction direction, DST type-VII is more efficient than DCT type-II. In HEVC, the integer approximation of 4-point DST type-VII is only applicable to 4x4 luma intra-frame prediction residual blocks. The 4-point DST-VII used in HEVC is shown below,
[0124] 4x4 DST-VII:
[0125] {29,55,74,84}
[0126] {74,74,0,-74}
[0127] {84, -29, -74, 55}
[0128] {55, -84, 74, -29}
[0129] In HEVC, for residual blocks that are not 4x4 luma intra prediction residual blocks, integer approximations of 4-point, 8-point, 16-point, and 32-point DCT type-II are also applied as follows:
[0130] 4-point DCT-II:
[0131] {64, 64, 64, 64}
[0132] {83, 36, -36, -83}
[0133] {64, -64, -64, 64}
[0134] {36, -83, 83, -36}
[0135] 8-point DCT-II:
[0136] {64, 64, 64, 64, 64, 64, 64, 64}
[0137] {89, 75, 50, 18, -18, -50, -75, -89}
[0138] {83, 36, -36, -83, -83, -36, 36, 83}
[0139] {75, -18, -89, -50, 50, 89, 18, -75}
[0140] {64, -64, -64, 64, 64, -64, -64, 64}
[0141] {50, -89, 18, 75, -75, -18, 89, -50}
[0142] {36, -83, 83, -36, -36, 83, -83, 36}
[0143] {18, -50, 75, -89, 89, -75, 50, -18}
[0144] 16-point DCT-II:
[0145] {64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64}
[0146] {90,87,80,70,57,43,25,9,-9,-25,-43,-57,-70,-80,-87,-90}
[0147] {89,75,50,18,-18,-50,-75,-89,-89,-75,-50,-18,18,50,75,89}
[0148] {87,57,9,-43,-80,-90,-70,-25,25,70,90,80,43,-9,-57,-87}
[0149] {83,36,-36,-83,-83,-36,36,83,83,36,-36,-83,-83,-36,36,83}
[0150] {80,9,-70,-87,-25,57,90,43,-43,-90,-57,25,87,70,-9,-80}
[0151] {75,-18,-89,-50,50,89,18,-75,-75,18,89,50,-50,-89,-18,75}
[0152] {70,-43,-87,9,90,25,-80,-57,57,80,-25,-90,-9,87,43,-70}
[0153] {64,-64,-64,64,64,-64,-64,64,64,-64,-64,64,64,-64,-64,64}
[0154] {57,-80,-25,90,-9,-87,43,70,-70,-43,87,9,-90,25,80,-57}
[0155] {50,-89,18,75,-75,-18,89,-50,-50,89,-18,-75,75,18,-89,50}
[0156] {43,-90,57,25,-87,70,9,-80,80,-9,-70,87,-25,-57,90,-43}
[0157] {36,-83,83,-36,-36,83,-83,36,36,-83,83,-36,-36,83,-83,36}
[0158] {25, -70, 90, -80, 43, 9, -57, 87, -87, 57, -9, -43, 80, -90, 70, -25}
[0159] {18, -50, 75, -89, 89, -75, 50, -18, -18, 50, -75, 89, -89, 75, -50, 18}
[0160] {9, -25, 43, -57, 70, -80, 87, -90, 90, -87, 80, -70, 57, -43, 25, -9}
[0161] 32 - point DCT - II:
[0162] {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, 64}
[0163] {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}
[0164] {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}
[0165] {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}
[0166] {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}
[0167] {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}
[0168] {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}
[0169] {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}
[0170] {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}
[0171] {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}
[0172] {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}
[0173] {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}
[0174] {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}
[0175] {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}
[0176] {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}
[0177] {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}
[0178] {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}
[0179] {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}
[0180] {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}
[0181] {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}
[0182] {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}
[0183] {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}
[0184] {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}
[0185] {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}
[0186] {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}
[0187] {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}
[0188] {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}
[0189] {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}
[0190] {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}
[0191] {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}
[0192] {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}
[0193] {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}
[0194] Residual quad-tree based transform scheme in HEVC.
[0195] To accommodate various characteristics of residual blocks, a transform coding structure using a Residual QuadTree (RQT) is applied in HEVC, which is briefly described 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. In RQT, each picture is partitioned into Coding Tree Units (CTUs), and the CTUs are decoded for a specific tile or slice in raster scan order. A CTU is a square block and represents the root of a quadtree (i.e., the coding tree). The CTU size can be between 8×8 and 64×64 luminance samples, but 64×64 is typically used. Each CTU can be further split into smaller square blocks, which are called Coding Units (CUs). After recursively splitting a CTU into CUs, each CU is further partitioned into Prediction Units (PUs) and Transform Units (TUs).
[0196] The splitting of a CU into TUs can be performed recursively based on the quadtree method, so that the residual signal of each CU is decoded by a tree structure (i.e., the Residual QuadTree (RQT)). RQT allows TU sizes from 4×4 to 32×32 luminance samples. Figure 2C An example is shown where a CU includes 10 TUs (labeled with letters a to j) and the corresponding block partitioning. Each node of the RQT is actually a Transform Unit (TU). The individual TUs can be processed in depth-first tree traversal order, which is shown as alphabetical order in the figure and follows a recursive Z-scan with depth-first traversal.
[0197] The quadtree method enables the transform to adapt to the varying spatial frequency characteristics of the residual signal. Generally, a larger transform block size (which has a larger spatial support) provides better frequency resolution. However, a smaller transform block size (which has a smaller spatial support) can provide better spatial resolution. The trade-off between these two resolutions, spatial resolution and frequency resolution, can be selected by encoder mode decision, e.g., based on rate-distortion optimization techniques. A video decoder can perform rate-distortion optimization techniques to calculate the weighted sum of the decoded bits and the reconstruction distortion (i.e., the rate-distortion cost) for each coding mode (e.g., a specific RQT split structure), and select the coding mode with the minimum rate-distortion cost as the best mode.
[0198] Three parameters can be defined in RQT: the maximum depth of the tree, the minimum allowed transform size, and the maximum allowed transform size. The minimum and maximum transform sizes can vary in the range of 4×4 to 32×32 samples, which corresponds to the supported block transforms mentioned in the previous paragraph. The maximum allowed depth of RQT limits the number of TUs. A maximum depth equal to zero means that if each included TB reaches the maximum allowed transform size (e.g., 32x32), the CB cannot be further split.
[0199] All these parameters interact and affect the RQT structure. Consider a 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, otherwise it will result in a 64×64 TB, which is not allowed. The RQT parameters (i.e., the maximum RQT depth), the minimum and maximum transform sizes are sent in the bitstream at the sequence parameter set level. Regarding the RQT depth, different values can be specified and signaled for the CUs of intra and inter prediction.
[0200] The quadtree transform is applied to intra and inter residual blocks. Generally, the DCT-II transform of the same size as the current residual quadtree split is applied to the residual block. However, if the current residual quadtree block is 4x4 and is generated by intra prediction, the above-mentioned 4x4 DST-VII transform is applied.
[0201] In HEVC, larger size transforms (e.g., 64x64 transform) are not adopted, mainly because of its limited benefits and relatively high complexity for relatively low-resolution videos.
[0202] As described above, after any transform to produce transform coefficients, the video encoder 200 can perform quantization on the transform coefficients. Quantization generally refers to the process in which the transform coefficients are quantized to potentially reduce the amount of data used to represent the coefficients, thereby providing further compression. By performing the quantization process, the video encoder 200 can reduce the bit depth associated with some or all of the 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 bitwise right shift on the value to be quantized.
[0203] After quantization, video encoder 200 may scan the transform coefficients to produce a one-dimensional vector from a two-dimensional matrix including the quantized transform coefficients. The scan may be designed to place higher-energy (and thus lower-frequency) coefficients at the front of the vector and lower-energy (and thus higher-frequency) transform coefficients at the back of the vector. In some examples, video encoder 200 may use a predefined scan order to scan the quantized transform coefficients to produce a serialized vector, and then entropy encode the quantized transform coefficients of the vector. In other examples, video encoder 200 may perform an adaptive scan. After scanning the quantized transform coefficients to form a one-dimensional vector, video encoder 200 may entropy encode the one-dimensional vector, for example, according to context-adaptive binary arithmetic coding (CABAC). Video encoder 200 may also entropy encode the values of syntax elements that are used to describe metadata associated with the encoded video data for use by video decoder 300 when decoding the video data.
[0204] To perform CABAC, video encoder 200 may assign a context within a context model to the symbol to be sent. The context may relate to, for example, whether the neighboring values of the symbol are zero values. Probability determination may be based on the context assigned to the symbol.
[0205] Video encoder 200 may also generate syntax data to video decoder 300, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, or other syntax data (such as sequence parameter set (SPS), picture parameter set (PPS), or video parameter set (VPS)), for example, in a picture header, a block header, or a slice header. Similarly, video decoder 300 may decode such syntax data to determine how to decode the corresponding video data.
[0206] In this way, video encoder 200 may generate a bitstream that includes encoded video data, for example, syntax elements for describing the partitioning of a picture into blocks (e.g., CUs) and prediction and / or residual information for the blocks. Finally, video decoder 300 may receive the bitstream and decode the encoded video data.
[0207] Typically, video decoder 300 performs a process opposite to that performed by video encoder 200 to decode the encoded video data of the bitstream. For example, video decoder 300 may use CABAC to decode the values of the syntax elements for the bitstream in a manner that is substantially similar to, but opposite to, the CABAC encoding process of video encoder 200. The syntax elements may define the segmentation information for dividing a picture into CTUs and for dividing each CTU according to a corresponding segmentation structure (such as the QTBT structure) to define the CUs of the CTU. The syntax elements may also define the prediction and residual information for the blocks (e.g., CUs) of the video data.
[0208] The residual information may be represented by, for example, quantized transform coefficients. Video decoder 300 may perform inverse quantization and inverse transformation on the quantized transform coefficients of the block to reproduce the residual block for the block. Video decoder 300 uses the signalized prediction mode (intra prediction or inter prediction) and the related prediction information (e.g., motion information for inter prediction) to form the prediction block for the block. Video decoder 300 may then combine the prediction block and the residual block (on a sample-by-sample basis) to reproduce the original block. Video decoder 300 may perform additional processing, such as performing a deblocking process to reduce visual artifacts along the boundaries of the blocks.
[0209] According to the techniques of the present disclosure, a video coder (i.e., video encoder 200 and / or video decoder 300) may derive a transform type from a plurality of transform types for a current coefficient block of a video block. The video coder may use the selected transform type to transform the current transform block (e.g., coefficient block) to obtain a block of reconstructed residual data for the video block; and reconstruct the video block based on the reconstructed residual data for the video block.
[0210] The video coder may infer the transform type based on factors other than explicit signaling of the transform type. Thus, the video coder may omit decoding of the syntax element that explicitly identifies the transform type for the current block. Some examples of the factors from which the video coder may infer the transform type include the size of the current block (e.g., the height and / or width of the current block), whether the current block is segmented using intra-sub-block segmentation (ISP), and the intra mode of the current block. The video coder may infer the transform type based on any combination of the factors. For example, the video coder may infer the transform type for the current transform block of the current video block based on the size of the current transform block and whether the current video block is segmented using ISP. In at least some examples of such examples, the video coder may infer the transform type for the current transform block regardless of the intra prediction mode used to predict the current video block.
[0211] A video encoder may select a transform type from multiple transform types including one or more discrete cosine transforms (DCTs) and one or more discrete sine transforms (DSTs). As discussed in further detail below, one or more DCTs may include one or more of DCT-1, DCT-2, DCT-3, DCT-4, DCT-5, DCT-6, DCT-7, and DCT-8, and / or one or more DSTs may include one or more of DST-1, DST-2, DST-3, DST-4, DST-5, DST-6, DST-7, and DST-8.
[0212] As described above, a video decoder may infer the transform type for a current transform block based on the size of the current transform block. For example, the video decoder may select a first transform type for the current transform block in response to determining that the size of the current transform block meets a size threshold, and select a second transform type for the current transform block in response to determining that the size of the current transform block does not meet the size threshold. In some examples, the video decoder may determine whether the size of the current transform block meets the size threshold by comparing the size of the current transform block with a single threshold value. In other examples, the video decoder may determine whether the size of the current transform block meets the size threshold by determining whether the size of the current transform block is greater than a lower limit (e.g., 2, 4, 6) and less than an upper limit (e.g., 8, 16, 32). If the size of the current transform block is greater than the lower limit and less than the upper limit, the video decoder may determine that the size of the current transform block meets the size threshold. Similarly, if the size of the current transform block is less than the lower limit or greater than the upper limit, the video decoder may determine that the size of the current transform block does not meet the size threshold.
[0213] In the case where the current video block is a coding unit (CU), the ISP may be used to split the CU into multiple sub-splits. Each sub-split may have an associated transform block. Thus, in the case where the CU is split using the ISP, multiple transform blocks may be associated with the CU. For example, a 16x16 CU may be vertically split into four splits of size 4x16, each of which is associated with a transform block of size 4x16.
[0214] As described above, the video decoder can infer the transform type of the current transform block for the current video block based on whether ISP is used to partition the current video block and based on the size of the current transform block. As an example, in response to determining that the size of the current transform block meets a size threshold and determining that the current video block is partitioned using ISP, the video decoder can select a specific DST (e.g., DST-7) from one or more DSTs as the transform type for the current transform block. As another example, in response to determining that the size of the current transform block does not meet the size threshold and determining that the current video block is partitioned using ISP, the video decoder can select a specific DCT (e.g., DCT-2) from one or more DCTs as the transform type for the current transform block. In any of the above examples, the video decoder can select the transform type, which includes: selecting the transform type regardless of the intra prediction mode used to predict the current video block (e.g., regardless of the angular, DC, or planar mode used for intra prediction of the current video block).
[0215] In some examples, the video decoder can always perform transform type inference. In other examples, the video decoder can perform transform type inference under specific conditions. For example, the video decoder can infer the transform type for the current transform block in response to determining that multi-transform selection (MTS) is enabled for the current video block. In some examples, the video decoder can determine whether MTS is enabled for the current video block based on the value of one or more syntax elements (e.g., sps_explicit_mts_intra_enabled_flag).
[0216] In some examples, the video decoder can infer the transform type for performing a horizontal transform (i.e., the transform type for horizontal use) and the transform type for performing a vertical transform (i.e., the transform type for vertical use). The video decoder can use a general algorithm to infer the transform types for horizontal and vertical use. For example, the video decoder can infer the transform type for horizontal use based on whether the width of the current transform block meets a width size threshold and whether the current video block including the current transform block is partitioned using ISP, and infer the transform type for vertical use based on whether the height of the current transform block meets a height size threshold and whether the current video block including the current transform block is partitioned using ISP. In some examples, the video decoder can use the same size threshold for both horizontal transform type inference and vertical transform type inference. For example, in the case where the size threshold includes an upper limit and a lower limit, the upper limit and the lower limit of the width size threshold can be equal to the upper limit and the lower limit of the height size threshold. As a specific example, the lower limit of both the width threshold and the height threshold can be 4, and the upper limit of both the width threshold and the height threshold can be 16.
[0217] In some examples, to derive (i.e., infer) the transform type for the current coefficient block, the video decoder may select the DST-7 transform to transform any row or column having a number of samples (e.g., luma samples) less than or equal to a threshold (e.g., 8, 16, 32), and select the DCT-2 transform to transform any row or column having a number of samples greater than the threshold.
[0218] With respect to VVC draft 4 (e.g., JVET-M1001), an example of implementing the proposed change can be achieved by replacing Table 8-15 with the following equations:
[0219] trTypeHor = (nTbW >= 2 && nTbW <= 16)? 1 : 0
[0220] trTypeVer = (nTbH >= 2 && nTbH <= 16)? 1 : 0
[0221] where "0" and "1" represent DCT-2 and DST-7 respectively.
[0222] Blocks using ISP splitting may be prohibited from having rows / columns with only two samples. Therefore, the present disclosure proposes a 2-point DST-7. The entries of the 2-point DST-7 matrix can be as follows (which only introduces 4 bytes of additional memory):
[0223] {48 77}
[0224] {77 -48}
[0225] Alternatively, an example of the proposed change can be achieved by modifying VVC draft 4 as follows:
[0226] trTypeHor = (nTbW >= 4 && nTbW <= 16 &&nTbW <= nTbH )? 1 : 0 (8-1029)
[0227] trTypeVer = (nTbH >= 4 && nTbH <= 16 &&nTbH <= nTbW )? 1 : 0 (8-1030)
[0228] where "0" and "1" represent DCT-2 and DST-7 respectively, and the changes (i.e., the deleted parts) are underlined and italicized.
[0229] Generally speaking, the present disclosure may relate to "signaling" certain information, such as syntax elements. The term "signaling" generally may refer to the conveyance of values for syntax elements and / or other data used to decode the encoded video data. That is, the video encoder 200 may signal the values for syntax elements in the bitstream. Generally, signaling refers to generating values in the bitstream. As described above, the source device 102 may transmit the bitstream to the destination device 116 substantially in real time or not in real time (such as may occur when storing the syntax elements to the storage device 112 for later retrieval by the destination device 116).
[0230] Figure 2A and 2B is a conceptual diagram showing an exemplary quadtree binary tree (QTBT) structure 130 and a corresponding coding tree unit (CTU) 132. Solid lines represent quadtree splits, and dashed lines indicate binary tree splits. In each split (i.e., non-leaf) node of the binary tree, a flag is signaled to indicate which split type (i.e., horizontal or vertical) is used, where, in this example, 0 indicates a horizontal split, and 1 indicates a vertical split. For quadtree splits, since a quadtree node splits a block horizontally and vertically into 4 sub-blocks of equal size, there is no need to indicate the split type. Thus, the video encoder 200 may encode the following, and the video decoder 300 may decode the following: syntax elements (such as split information) for the region tree level (i.e., solid lines) of the QTBT structure 130, and syntax elements (such as split information) for the prediction tree level (i.e., dashed lines) of the QTBT structure 130. The video encoder 200 may encode video data (such as prediction and transform data) for the CUs represented by the terminal leaf nodes of the QTBT structure 130, and the video decoder 300 may decode the video data.
[0231] Generally Figure 2B The CTU 132 may be associated with parameters for defining the size of the blocks corresponding to the nodes at the first and second levels of the QTBT structure 130. These parameters may include the CTU size (representing the size of the CTU 132 in samples), the minimum quadtree size (MinQTSize, which represents the minimum allowable quadtree leaf node size), the maximum binary tree size (MaxBTSize, which represents the maximum allowable binary tree root node size), the maximum binary tree depth (MaxBTDepth, which represents the maximum allowable binary tree depth), and the minimum binary tree size (MinBTSize, which represents the minimum allowable binary tree leaf node size).
[0232] The root node corresponding to the CTU in the QTBT structure can have four child nodes at the first level of the QTBT structure, and each child node can be divided according to quadtree partitioning. That is, the nodes at the first level are leaf nodes (without child nodes) or have four child nodes. An example of the QTBT structure 130 represents such nodes as including a parent node and child nodes with solid branches. If the nodes at the first level are not larger than the maximum allowable binary tree root node size (MaxBTSize), they can be further divided by the corresponding binary tree. The binary tree splitting of a node can be iterated until the nodes generated from the splitting reach the minimum allowable binary tree leaf node size (MinBTSize) or the maximum allowable binary tree depth (MaxBTDepth). An example of the QTBT structure 130 represents such nodes as having dotted lines for the branches. The binary tree leaf nodes are called coding units (CUs), which are used for prediction (e.g., intra-picture or inter-picture prediction) and transformation without any further division. As discussed above, the CU can also be referred to as a "video block" or a "block".
[0233] In an example of the QTBT partitioning structure, the CTU size is set to 128x128 (luminance samples and two corresponding 64x64 chrominance samples), MinQTSize is set to 16x16, MaxBTSize is set to 64x64, MinBTSize (for both width and height) is set to 4, and MaxBTDepth is set to 4. First, quadtree partitioning is applied to the CTU to generate quadtree leaf nodes. The quadtree leaf nodes can have sizes ranging from 16x16 (i.e., MinQTSize) to 128x128 (i.e., CTU size). If the leaf quadtree node is 128x128, since this size exceeds MaxBTSize (i.e., 64x64 in this example), the leaf quadtree node will not be further split by the binary tree. Otherwise, the leaf quadtree node will be further divided by the binary tree. Thus, the quadtree leaf nodes are also the root nodes for the binary tree and have a binary tree depth of 0. When the binary tree depth reaches MaxBTDepth (4 in this example), further splitting is not allowed. When a binary tree node has a width equal to MinBTSize (4 in this example), it means that no further horizontal splitting is allowed. Similarly, a binary tree node with a height equal to MinBTSize means that no further vertical splitting is allowed for that binary tree node. As described above, the leaf nodes of the binary tree are called CUs and are further processed according to prediction and transformation without further division.
[0234] Figure 3 is a block diagram showing an example video encoder 200 that can perform the techniques of the present disclosure. Figure 3is provided for purposes of explanation and should not be construed as limiting the techniques generally illustrated and described in this disclosure. For purposes of explanation, this disclosure describes the video encoder 200 in the context of video coding standards such as the HEVC video coding standard and the H.266 video coding standard under development. However, the techniques of this disclosure are not limited to these video coding standards and are generally applicable to video encoding and decoding.
[0235] In Figure 3 example, 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 one or all of the video data memory 230, the mode selection unit 202, the residual generation unit 204, the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the filter unit 216, the DPB 218, and the entropy coding unit 220 may be implemented in one or more processors or in processing circuitry. Additionally, the video encoder 200 may include additional or alternative processors or processing circuitry to perform these and other functions.
[0236] The video data memory 230 may store video data to be encoded by components of the video encoder 200. The video encoder 200 may receive the video data stored in the video data memory 230 from, for example, a video source 104 ( Figure 1 ). The DPB 218 may act as a reference picture memory that stores reference video data for use in predicting subsequent video data by the video encoder 200. The video data memory 230 and the DPB 218 may be formed of any one of a variety of memory devices such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The video data memory 230 and the DPB 218 may be provided by the same memory device or separate memory devices. In various examples, the video data memory 230 may be on-chip (as shown) with other components of the video encoder 200 or off-chip relative to those components.
[0237] In the present disclosure, reference to the video data memory 230 should not be construed as limited to a memory internal to the video encoder 200 (unless so specifically described), or limited to a memory external to the video encoder 200 (unless so specifically described). Rather, reference to the video data memory 230 should be understood as a reference memory that stores video data received by the video encoder 200 for encoding (e.g., video data for a current block to be encoded). Figure 1 The memory 106 can also provide temporary storage of outputs from various units of the video encoder 200.
[0238] is shown Figure 3 various units of to assist in understanding the operations performed by the video encoder 200. These units can be implemented as fixed-function circuitry, programmable circuitry, or a combination thereof. Fixed-function circuitry refers to circuitry that provides a specific function and is pre-set with respect to the operations that can be performed. Programmable circuitry refers to circuitry that can be programmed to perform various tasks and provides flexible functionality with respect to the operations that can be performed. For example, programmable circuitry can execute software or firmware that causes the programmable circuitry to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuitry can execute software instructions (e.g., to receive parameters or output parameters), but the types of operations performed by fixed-function circuitry are generally immutable. In some examples, one or more of these units can be different circuit blocks (fixed-function or programmable), and in some examples, one or more units can be integrated circuits.
[0239] The video encoder 200 can include an arithmetic logic unit (ALU), a basic function unit (EFU), digital circuitry, analog circuitry, and / or programmable cores formed by programmable circuitry. In examples where software executed by programmable circuitry is used to perform the operations of the video encoder 200, the memory 106 ( Figure 1 ) can store the object code of the software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 can store such instructions.
[0240] The video data memory 230 is configured to store the received video data. The video encoder 200 can retrieve pictures of the video data from the video data memory 230 and provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data memory 230 can be the original video data to be encoded.
[0241] 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 to perform video prediction according to other prediction modes. As an example, the mode selection unit 202 may include a palette unit, a block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.
[0242] The mode selection unit 202 generally coordinates multiple encoding passes to test combinations of encoding parameters and the resulting rate-distortion values for such combinations. The encoding parameters may include dividing a CTU 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.
[0243] The video encoder 200 may divide a picture retrieved from the video data memory 230 into a series of CTUs and encapsulate one or more CTUs within a slice. The mode selection unit 210 may divide the CTUs of the picture according to a tree structure (such as the QTBT structure or the quadtree structure of HEVC described above). As described above, the video encoder 200 may form one or more CUs by dividing the CTUs according to a tree structure. Such CUs may also generally be referred to as "video blocks" or "blocks".
[0244] Generally, the mode selection unit 202 also controls its components (e.g., the motion estimation unit 222, the motion compensation unit 224, and the intra prediction unit 226) to generate a prediction block for the current block (e.g., the current CU, or the overlapping portion of the PU and TU in HEVC). To perform inter prediction on the current block, the motion estimation unit 222 may perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously decoded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 may calculate values representing how closely a potential reference block will resemble the current block, for example, according to the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), etc. The motion estimation unit 222 may generally use the per-sample differences between the current block and the considered reference block to perform these calculations. The motion estimation unit 222 may identify the reference block having the lowest value from these calculations, which indicates the reference block that most closely matches the current block.
[0245] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of a reference block in a reference picture relative to the position of a current block in a current picture. Then, the motion estimation unit 222 may provide the motion vectors to the motion compensation unit 224. For example, for uni-directional inter prediction, the motion estimation unit 222 may provide a single motion vector, and for bi-directional inter prediction, the motion estimation unit 222 may provide two motion vectors. Then, the motion compensation unit 224 may use the motion vectors to generate a prediction block. For example, the motion compensation unit 224 may use the motion vectors to retrieve data of the reference block. As another example, if the motion vectors have fractional sample precision, the motion compensation unit 224 may interpolate values for the prediction block according to one or more interpolation filters. Further, for bi-directional inter prediction, the motion compensation unit 224 may retrieve data of two reference blocks identified by the respective motion vectors and combine the retrieved data, e.g., by per-sample averaging or weighted averaging.
[0246] As another example, for intra prediction or intra prediction coding, the intra prediction unit 226 may generate a prediction block according to samples adjacent to a current block. For example, for a directional mode, the intra prediction unit 226 may generally mathematically combine values of adjacent samples and fill the calculated values in a defined direction across the current block to produce a prediction block. As another example, for a DC mode, the intra prediction unit 226 may calculate an average value of adjacent samples of a current block and generate a prediction block to include the obtained average value for each sample of the prediction block.
[0247] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives an original, unencoded version of the current block from the video data memory 230 and receives the prediction block from the mode selection unit 202. The residual generation unit 204 calculates the per-sample difference between the current block and the prediction block. The resulting per-sample difference defines a residual block for the current block. In some examples, the residual generation unit 204 may also determine differences between sample values in the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some examples, one or more subtractor circuits performing binary subtraction may be used to form the residual generation unit 204.
[0248] In an example where the mode selection unit 202 divides a CU into PUs, each PU may be associated with a luminance prediction unit and a corresponding chrominance prediction unit. The video encoder 200 and the video decoder 300 may support PUs of various sizes. As pointed out above, the size of a CU may refer to the size of the luminance decoding block of the CU, and the size of a PU may refer to the size of the luminance prediction unit of the PU. Assuming that the size of a particular CU is 2Nx2N, the video encoder 200 may support PU sizes of 2Nx2N or NxN for intra prediction, and 2Nx2N, 2NxN, Nx2N, NxN, or similar symmetric PU sizes for inter prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning for PU sizes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter prediction.
[0249] In an example where the mode selection unit does not further divide a CU into PUs, each CU may be associated with a luminance decoding block and a corresponding chrominance decoding block. As described above, the size of a CU may refer to the size of the luminance decoding block of the CU. The video encoder 200 and the video decoder 120 may support CU sizes of 2Nx2N, 2NxN, or Nx2N.
[0250] For other video decoding techniques (to name a few examples, such as in-block copy mode decoding, affine mode decoding, and linear model (LM) mode decoding), the mode selection unit 202 generates a prediction block for the current block being encoded via a corresponding unit associated with the decoding technique. In some examples (such as palette mode decoding), the mode selection unit 202 may not generate a prediction block, but instead generates a syntax element for indicating how to reconstruct the block based on the selected palette. In such a mode, the mode selection unit 202 may provide these syntax elements to the entropy encoding unit 220 for encoding.
[0251] As described above, the residual generation unit 204 receives the video data for the current block and the corresponding prediction block. Then, the residual generation unit 204 generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates the sample-by-sample difference between the prediction block and the current block.
[0252] The transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). The transform processing unit 206 may apply various transforms to the residual block to form a transform coefficient block. For example, the transform processing unit 206 may apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform to the residual block. In some examples, the transform processing unit 206 may perform multiple transforms on the residual block, such as a primary transform and a secondary transform (such as a rotation transform). In some examples, the transform processing unit 206 does not apply a transform to the residual block. As discussed herein, the transform processing unit 206 may selectively apply different transforms to different coefficient blocks (i.e., blocks of transform coefficients).
[0253] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to produce a quantized transform coefficient block. The quantization unit 208 may quantize the transform coefficients of the transform coefficient block according to the quantization parameter (QP) value associated with the current block. The video encoder 200 (e.g., via the mode selection unit 202) may adjust the degree of quantization applied to the coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may cause information loss, and thus, the quantized transform coefficients may have lower precision than the original transform coefficients generated by the transform processing unit 206.
[0254] 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 the residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (although potentially with some degree of distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 may add the samples of the reconstructed residual block to the corresponding samples of the prediction block generated by the mode selection unit 202 to produce the reconstructed block.
[0255] The filter unit 216 may perform one or more filter operations on the reconstructed block. For example, the filter unit 216 may perform a deblocking operation to reduce block effect artifacts along the edges of the CU. In some examples, the operation of the filter unit 216 may be skipped.
[0256] Video encoder 200 stores the reconstructed blocks in DPB 218. For example, in an example where the operation of filter unit 224 is not required, reconstruction unit 214 may store the reconstructed blocks into DPB 218. In an example where the operation of filter unit 224 is required, filter unit 216 may store the filtered reconstructed blocks into DPB 218. Motion estimation unit 222 and motion compensation unit 224 may retrieve reference pictures formed from the reconstructed (and potentially filtered) blocks from DPB 218 to perform inter prediction on blocks of subsequently encoded pictures. Additionally, intra prediction unit 226 may use the reconstructed blocks of the current picture in DPB 218 to perform intra prediction on other blocks in the current picture.
[0257] Generally, entropy coding unit 220 may perform entropy coding on syntax elements received from other functional components of video encoder 200. For example, entropy coding unit 220 may perform entropy coding on the quantized transform coefficient blocks from quantization unit 208. As another example, entropy coding unit 220 may perform entropy coding on prediction syntax elements (e.g., motion information for inter prediction or intra mode information for intra prediction) from mode selection unit 202. Entropy coding unit 220 may perform one or more entropy coding operations on syntax elements as another example of video data to generate entropy-coded data. For example, entropy coding unit 220 may perform context-adaptive variable length coding (CAVLC) operations, CABAC operations, variable-to-variable (V2V) length coding operations, syntax-based context-adaptive binary arithmetic coding (SBAC) operations, probability interval partitioning entropy (PIPE) coding operations, exponential Golomb coding operations, or another type of entropy coding operation on the data. In some examples, entropy coding unit 220 may operate in a bypass mode where the syntax elements are not entropy coded.
[0258] Video encoder 200 may output a bitstream that includes the entropy-coded syntax elements needed to reconstruct the blocks of a slice or picture. Specifically, entropy coding unit 220 may output the bitstream.
[0259] The above operations are described with respect to blocks. Such a description should be understood as applying to the operations of luma decoding blocks and / or chroma decoding blocks. As described above, in some examples, the luma decoding block and the chroma decoding block are the luma and chroma components of a CU. In some examples, the luma decoding block and the chroma decoding block are the luma and chroma components of a PU.
[0260] In some examples, it is not necessary to repeat the operations performed on the luma coding blocks for the chroma coding blocks. As an example, it is not necessary to repeat the operations for identifying the motion vectors (MVs) and reference pictures for the luma coding blocks to identify the MVs and reference pictures for the chroma blocks. Instead, the MVs for the luma coding blocks can be scaled to determine the MVs for the chroma blocks, and the reference pictures can be the same. As another example, the intra prediction process can be the same for both the luma coding blocks and the chroma coding blocks.
[0261] Video encoder 200 represents an example of a device configured to encode video data, the device including: a memory configured to store video data; and one or more processing units implemented in circuitry and configured to: derive a transform type from a plurality of transform types for a current coefficient block of a video block. A video decoder may use the selected transform type to transform the current coefficient block to obtain a block of reconstructed residual data for the video block; and reconstruct the video block based on the reconstructed residual data for the video block.
[0262] Figure 4 is a block diagram showing an example video decoder 300 that may perform the techniques of the present disclosure. Figure 4 is provided for purposes of explanation and does not limit the techniques generally illustrated and described in the present disclosure. For purposes of explanation, the present disclosure describes video decoder 300 in terms of the techniques of JEM, VVC, and HEVC. However, the techniques of the present disclosure may be performed by video decoding devices configured for other video coding standards.
[0263] In Figure 4 example, video decoder 300 includes a coded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 134. Any one or all of CPB memory 320, entropy decoding unit 302, prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, filter unit 312, and DPB 134 may be implemented in one or more processors or in processing circuitry. Additionally, video decoder 300 may include additional or alternative processors or processing circuitry to perform these and other functions.
[0264] The prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. The prediction processing unit 304 may include an addition unit that performs prediction according to other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, a block copy unit (which may form part of the motion compensation unit 318), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.
[0265] The CPB memory 320 may store video data to be decoded by components of the video decoder 300, such as an encoded video bitstream. For example, the video data stored in the CPB memory 320 may be obtained from a computer-readable medium 110 ( Figure 1 ). The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from the encoded video bitstream. In addition, the CPB memory 320 may store video data other than the syntax elements of the decoded pictures, such as temporary data for representing the output of individual units from the video decoder 300. The DPB 314 generally stores decoded pictures, and the video decoder 300 may output the decoded pictures and / or use the decoded pictures as reference video data when decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and the DPB 314 may be formed of any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The CPB memory 320 and the DPB 314 may be provided by the same memory device or separate memory devices. In various examples, the CPB memory 320 may be on-chip or off-chip relative to other components of the video decoder 300.
[0266] Additionally or alternatively, in some examples, the video decoder 300 may retrieve decoded video data from a memory 120 ( Figure 1 ). That is, the memory 120 may use the CPB memory 320 to store data as discussed above. Similarly, when some or all of the functions of the video decoder 300 are implemented in software to be executed by the processing circuitry of the video decoder 300, the memory 120 may store instructions to be executed by the video decoder 300.
[0267] Shown are Figure 4 the various units shown in Figure 3, A fixed - function circuit refers to a circuit that provides a specific function and is pre - set with respect to the operations that can be performed. A programmable circuit refers to a circuit that can be programmed to perform various tasks and provides flexible functionality in terms of 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. A fixed - function circuit can execute software instructions (e.g., to receive parameters or output parameters), but the type of operations performed by the fixed - function circuit is generally immutable. In some examples, one or more of these units can be different circuit blocks (fixed - function or programmable), and in some examples, one or more units can be integrated circuits.
[0268] The video decoder 300 can include an ALU, an EFU, digital circuits, analog circuits, and / or programmable cores formed by programmable circuits. In an example where the operations of the video decoder 300 are performed by software executed on the programmable circuit, on - chip or off - chip memory can store the instructions (e.g., object code) of the software that the video decoder 300 receives and executes.
[0269] The entropy decoding unit 302 can receive the encoded video data from the CPB and perform entropy decoding on the video data to reproduce the syntax elements. The prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, and the filter unit 312 can generate the decoded video data based on the syntax elements extracted from the bitstream.
[0270] Generally, the video decoder 300 reconstructs pictures on a block - by - block basis. The video decoder 300 can perform the reconstruction operation on each block individually (where the block that is currently being reconstructed (i.e., decoded) can be referred to as the “current block”).
[0271] The entropy decoding unit 302 can perform entropy decoding on the syntax elements for the quantized transform coefficients that define the quantized transform coefficient block, as well as transform information such as the quantization parameter (QP) and / or transform mode indication. The inverse quantization unit 306 can use the QP associated with the quantized transform coefficient block to determine the quantization level, and similarly, determine the inverse quantization level to be applied by the inverse quantization unit 306. The inverse quantization unit 306 can, for example, perform a bit - shift - left operation to inverse - quantize the quantized transform coefficients. The inverse quantization unit 306 can thus form a transform coefficient block including the transform coefficients.
[0272] After the inverse quantization unit 306 forms a transform coefficient block, the inverse transform processing unit 308 can 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 can apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotation transform, an inverse direction transform, or another inverse transform to the coefficient block. As discussed herein, the transform processing unit 206 can selectively apply different transforms to different coefficient blocks (i.e., blocks of transform coefficients).
[0273] In addition, the prediction processing unit 304 generates a prediction block based on prediction information syntax elements entropy decoded by the entropy decoding unit 302. For example, if the prediction information syntax element indicates that the current block is inter-predicted, the motion compensation unit 316 can generate a prediction block. In this case, the prediction information syntax element can indicate a reference picture in the DPB 314 from which to retrieve a reference block and a motion vector for identifying the position of the reference block in the reference picture relative to the position of the current block in the current picture. The motion compensation unit 316 can generally perform the inter-prediction process in a manner substantially similar to the manner described with respect to the motion compensation unit 224 ( Figure 3 ).
[0274] 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 perform the intra-prediction process in a manner substantially similar to the manner described with respect to the intra-prediction unit 226 ( Figure 3 ). The intra-prediction unit 318 can retrieve data of adjacent samples of the current block from the DPB 314.
[0275] The reconstruction unit 310 can use the prediction block and the residual block to reconstruct the current block. For example, the reconstruction unit 310 can add the samples of the residual block to the corresponding samples of the prediction block to reconstruct the current block.
[0276] The filter unit 312 can perform one or more filter operations on the reconstructed block. For example, the filter unit 312 can perform a deblocking operation to reduce blocking effect artifacts along the edges of the reconstructed block. The operation of the filter unit 312 is not necessarily performed in all examples.
[0277] Video decoder 300 may store the reconstructed blocks in DPB 314. As discussed above, DPB 314 may provide reference information (such as the current picture for intra prediction and samples of previously decoded pictures for subsequent motion compensation) to prediction processing unit 304. Additionally, video decoder 300 may output the decoded pictures from DPB for subsequent presentation on a display device such as Figure 1 display device 118.
[0278] In this way, video decoder 300 represents an example of a video decoding device that includes: a memory configured to store video data; and one or more processing units implemented in circuitry and configured to: derive a transform type from a plurality of transform types for a current coefficient block of a current video block. The video coder may use the selected transform type to transform the current coefficient block to obtain a block of reconstructed residual data for the video block; and reconstruct the video block based on the reconstructed residual data for the video block.
[0279] Figure 5 is a block diagram illustrating a system for hybrid video coding with adaptive transform selection. Figure 5 Video encoder 200’ of Figure 1 and 3 may be regarded as illustrating a video coding system similar to video encoder 200 of Figure 3 . For example, block prediction 202’, block transform 206’, quantization 208’, inverse quantization 210’, inverse transform 212’, frame buffer 218’ and entropy decoding 220’ of video encoder 200’ may be regarded as performing operations similar to those of mode selection unit 202, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, decoded picture buffer 218 and entropy encoding unit 220 of video encoder 200 of Figure 5 . As
[0280] In some examples, transform group 207' and block transform 206' may compute the block transform in a separable manner. For example, to reduce computational complexity, transform group 207' and block transform 206' may independently transform horizontal and vertical lines, as Figure 6 shown. In other words, the samples along the Figure 6 horizontal and vertical arrows in
[0281] In video coding standards prior to HEVC, when DCT-2 is used both vertically and horizontally, only fixed separable transforms are used. In HEVC, in addition to DCT-2, DST-7 is also adopted as a fixed separable transform for 4x4 blocks. US-2016-0219290-A1 and US-2018-0020218-A1 describe adaptive extensions of these fixed transforms, and the AMT example in US-2016-0219290-A1 has been adopted in the following: the Joint Exploration Model (JEM) of the Joint Video Exploration Team (JVET), the Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, the JEM software, https: / / jvet.hhi.fraunhofer.de / svn / svn_HMJEMSoftware / tags / HM-16.6-JEM-7.0.
[0282] According to one or more techniques of the present disclosure, a video coder (e.g., a video encoder and / or a video decoder) may perform implicit transform selection. For example, the video coder may apply one or more sets of rules to implicitly select a transform for transforming residual data of a block. In this way, the video coder may improve coding efficiency. Specifically, the techniques of the present disclosure enable the video coder to obtain the benefits of using adaptive transform selection without the overhead of actually signaling the selected transform.
[0283] In VVC draft 4, there are two relatively complex implicit transform derivations that do not provide good coding performance. The present disclosure proposes simpler alternative derivations that may provide similar or even better compression / coding performance / efficiency.
[0284] The related techniques in VVC draft 4 and the reference software VTM-4.0 are discussed below.
[0285] In VVC Draft 4 / VTM-4.0, Multiple Transform Selection (MTS) uses advanced flags to determine whether the transform is (i) signaled explicitly to select among multiple candidates or (ii) implicitly derived based on the block shape. In the latter case, a combination of DST-7 and DCT-2 is used as the horizontal or vertical transform for sizes up to 16. Specifically, the following conditions depending on the block shape define the implicit MTS in VTM-4.0:
[0286] - If the width and height of the block are equal and both are less than or equal to 16, DST-7 is used in both the horizontal and vertical directions.
[0287] - If the width of the block is less than its height and less than or equal to 16, DST-7 is used in the horizontal direction and DCT-2 is used in the vertical direction.
[0288] - If the height of the block is less than its width and less than or equal to 16, DST-7 is used in the vertical direction and DCT-2 is used in the horizontal direction.
[0289] - Otherwise, DCT-2 is used in both directions.
[0290] In VVC Draft 4 / VTM-4.0, when decoding a luma block using Intra Sub-Partitioning (ISP), mode-dependent transform selection is performed, where the horizontal and vertical transforms (trTypeHor and trTypeVer) are derived based on the following table in VVC Draft 4.
[0291] Table - Specification of trTypeHor and trTypeVer depending on predModeIntra
[0292]
[0293] As described above and according to one or more techniques of the present disclosure, a video decoder may apply one or more sets of rules to implicitly derive transform selection based on available side information.
[0294] As a first example, a video decoder may determine to use DST-7 to decode a Coding Unit / Transform Unit (CU / TU) only under certain conditions. For example, if the maximum 1-D transform size allowed in the codec is N, the video decoder may determine that DST-7 can be used for all possible sizes. For example, for a given NxM block (as Figure 7 shown, having N rows each with M samples and M columns with N samples), the video decoder may determine that an N-point DST-7 can be used vertically and an M-point DST-7 can be used horizontally.
[0295] As a second example, for a selected set of dimensions, the video decoder may determine different combinations of DST-7 and DCT-2 that can be used. For example, the video decoder may determine that DST-7 can be applied to any row or column having less than or equal to K samples, while DCT-2 can be used to transform any row or column having more than K samples. For example, in the example of Figure 7 if N is less than K and M is greater than K, the video decoder may determine to use N-point DST-7 vertically and M-point DCT-2 horizontally. Additionally, in the example of Figure 7 if both N and M are less than K, the video decoder may determine to use DST-7 both horizontally and vertically.
[0296] As a third example, if a CU / TU is split, the video decoder may determine that the same implicit transform selection scheme can be used for all splits. In some examples, the video decoder may use DST-7 for all split sub-blocks (sub-TUs or sub-CUs). In some examples, the video decoder may use a combination of DST-7 and DCT-2 depending on the block dimensions after splitting. In some examples, for coded blocks using intra-sub-partitioning (ISP) in VVC (VTM-4.0), the video decoder may use a combination of DST-7 and DCT-2 depending on the block dimensions discussed above in the second example. For example, for any row or column having less than or equal to 16 samples, the video decoder may use DST-7. Otherwise, the video decoder may use DCT-2 to transform any row or column having more than 16 samples. In some examples, since ISP may have rows / columns that include two samples, the video decoder may use 2-point DST-7. In previous standards, 2-point DST-7 has not been used. Thus, the video decoder may use the modified entries of the 2-point DST-7 matrix as follows:
[0297] {48,77}
[0298] {77,-48}
[0299] As a fourth example, the video decoder may derive the transform based on the intra prediction mode (the modes are shown in Figure 8 ). For the in-plane and DC modes, the video decoder may use DST-7 in both the horizontal and vertical directions. For the diagonal in angle mode (mode index 34 in Figure 8 ), the video decoder may use DST-7 in both the horizontal and vertical directions. For angle modes with indices from 2 to 66, the video decoder may apply different DST / DCT combinations to a range of modes, such as mode indices at predefined intervals between mode indices [2, 3, …, 65, 66].
[0300] 1) For a given integer T between 2 and 30, a range of intervals consisting of all angular patterns [2, 3, …, 66] can be defined as follows:
[0301] a, R1 = [2, … (33 - T)]
[0302] b, R2 = [(34 - T), …, (34 + T)]
[0303] c, R3 = [(35 + T), …, 66]
[0304] 2) For the angular patterns within the range of R2, DST-7 can be applied both horizontally and vertically.
[0305] 3) For the angular patterns within the range of R1, DST-7 can be applied horizontally, and DCT-2 can be applied vertically.
[0306] 4) For the angular patterns within the range of R3, DCT-2 can be applied horizontally, and DST-7 can be applied vertically.
[0307] As a fifth example, in addition to DST-7 and DCT-2, a video decoder can apply a combination of different types of DCT / DST (e.g., DST-4 and DCT-8) and 1-D identity transforms.
[0308] As a sixth example, a video decoder can apply one or more combinations of the above examples only for intra-predicted CUs / TUs.
[0309] As a seventh example, a video decoder can apply one or more combinations of the above examples only for inter-predicted CUs / TUs.
[0310] As an eighth example, a video decoder can apply one or more combinations of the above examples for both intra-predicted CUs / TUs and inter-predicted CUs / TUs.
[0311] As a ninth example, a video decoder can apply one or more combinations of the above examples for a luminance or chrominance channel or both the luminance and chrominance channels.
[0312] Figure 9 is a flowchart showing an example method for encoding a current block. The current block can include a current CU. Although described with respect to video encoder 200 ( Figure 1 and 3 ), it should be understood that other devices can be configured to perform methods similar to those of Figure 9 . For example, Figure 5 the video encoder 200' of Figure 9A method similar to the method.
[0313] In this example, the video encoder 200 initially predicts the current block (350). For example, the video encoder 200 may form a prediction block for the current block. Then, the video encoder 200 may calculate a residual block (352) for the current block. To calculate the residual block, the video encoder 200 may calculate the difference between the original unencoded block and the prediction block for the current block. Then, the video encoder 200 may transform and quantize the coefficients of the residual block (354). As described above, the video encoder 200 may implicitly derive the transform type used when transforming the coefficients of the residual block. For example, the video encoder 200 may use the techniques discussed below with reference to Figure 11 to derive the transform type.
[0314] 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 coefficients (358). For example, the video encoder 200 may use CAVLC or CABAC to encode the coefficients. Then, the video encoder 200 may output the entropy-coded data of the block (360).
[0315] Figure 10 is a flowchart showing an example method for decoding a current block of video data. The current block may include a current CU. Although described with respect to the video decoder 300 ( Figure 1 and 4 ), it should be understood that other devices may be configured to perform methods similar to those of Figure 10 the method.
[0316] The video decoder 300 may receive the entropy-coded data for the current block (e.g., the entropy-coded prediction information and the entropy-coded data of the coefficients for the residual block corresponding to the current block) (370). The video decoder 300 may entropy decode the entropy-coded data to determine the prediction information for the current block and reproduce the coefficients of the residual block (372). The video decoder 300 may predict the current block (374) (e.g., using an intra or inter prediction mode indicated by the prediction information for the current block) to calculate a prediction block for the current block. Then, the video decoder 300 may inverse scan the reproduced coefficients (376) to create a block of quantized transform coefficients. Then, the video decoder 300 may inverse quantize and inverse transform the coefficients to produce a residual block (378). As described above, the video decoder 300 may implicitly derive the transform type used when transforming the coefficients of the residual block. For example, the video decoder 300 may use the techniques discussed below with reference to Figure 11The techniques discussed are used to derive the transform type. Finally, the video decoder 300 can decode the current block by combining the predicted block and the residual block (380).
[0317] Figure 11 is a flowchart showing an example method for inferring a transform type of a transform block for a video block according to one or more techniques of the present disclosure. Figure 11 The techniques can be performed by a video coder (e.g., video encoder 200 and / or video decoder 300).
[0318] The video coder can obtain a current transform block of a current video block (1102). The transform block can be a matrix of transform coefficients constructed based on one or more syntax elements decoded from a video bitstream (e.g., syntax elements included in the residual coding syntax table of VVC draft 4). The current video block can be a coding unit (CU).
[0319] The video coder can infer a transform type for the current transform block from a plurality of transform types. The plurality of transform types can include one or more discrete cosine transforms (DCTs) and one or more discrete sine transforms (DSTs).
[0320] As described above, the video coder can infer the transform type based on one or more factors such as whether the current video block is split using ISP and / or the size of the transform block. As Figure 11 shown, the video coder can determine that the current video block is split using ISP (1104). The video coder can determine that the current video block is split using ISP based on the values of one or more syntax elements (e.g., sps_isp_enabled_flag, intra_subpartitions_mode_flag, and / or intra_subpartitions_split_flag). For example, based on the intra_subpartitions_split_flag syntax element, the video coder can determine whether the current video block is not split (e.g., not divided), split horizontally, or split vertically.
[0321] In response to determining that the current video block is split using ISP (1104), the video coder can determine the size of the current transform block (1106). For example, the video coder can determine the width and / or height of the transform block. In some examples, the video coder can determine the transform block size for each sub - split separately. In other examples, the video coder can determine the transform block size for a single split and use the determined size for each split of the coding unit.
[0322] A video decoder may determine whether the size of a current transform block meets a size threshold. For example, as Figure 11 shown, the video decoder may determine whether the size of the current transform block is greater than a lower limit and less than an upper limit (i.e., whether both (size > lower limit) and (size < upper limit) are true) (1108). As described above, in some examples, the lower limit may be 4 samples, and the upper limit may be 16 samples).
[0323] In response to determining that the size of the current transform block meets the size threshold and determining that the current video block is split using ISP, the video decoder may select a specific DST among one or more DSTs as the selected transform type. For example, as Figure 11 shown, in response to determining that the size of the current transform block meets the size threshold and determining that the current video block is split using ISP, the video decoder may select DST-7 as the inferred transform type for the current transform block (the "yes" branch of 1108, 1110). Alternatively, in response to determining that the size of the current transform block does not meet the size threshold and determining that the current video block is split using ISP, the video decoder may select DCT-2 as the inferred transform type for the current transform block (the "no" branch of 1108, 1112).
[0324] The video decoder may use the selected transform type to transform the current transform block to obtain a block of reconstructed residual data for the video block (1114). For example, in the case where the selected transform type is DST-7, the video decoder (e.g., the inverse transform processing unit 212 / 212' of the video encoder 200 / 200' and / or the inverse transform processing unit 308 of the video decoder 300) may transform the coefficients of the transform block into reconstructed residual data by applying an inverse DST-7 transform.
[0325] The video decoder may reconstruct the video block based on the reconstructed residual data for the video block (1116). For example, the video decoder may add the residual data to the block of samples for intra prediction of the current block. In the case where the video block is split using ISP, the video decoder may add the corresponding block of reconstructed residual data to the corresponding block of samples for intra prediction of each corresponding sub-split of the current video block.
[0326] The following numbered examples may illustrate one or more aspects of the present disclosure:
[0327] Example 1. A method for decoding video data, the method comprising: deriving a transform type from a plurality of transform types for a current coefficient block of a video block; using the selected transform type to transform the current coefficient block to obtain a block of reconstructed residual data for the video block; and reconstructing the video block based on the reconstructed residual data for the video block.
[0328] Example 2. The method according to Example 1, wherein the plurality of transform types includes one or more discrete cosine transforms (DCTs) and / or one or more discrete sine transforms (DSTs).
[0329] Example 3. The method according to Example 2, wherein the one or more DCTs include one or more of DCT-1, DCT-2, DCT-3, DCT-4, DCT-5, DCT-6, DCT-7, and DCT-8.
[0330] Example 4. The method according to any one of Examples 2 and 3, wherein the one or more DSTs include one or more of DST-1, DST-2, DST-3, DST-4, DST-5, DST-6, DST-7, and DST-8.
[0331] Example 5. The method according to any one of Examples 1-4, wherein deriving the transform type includes: deriving the transform type based on the size of the current coefficient block.
[0332] Example 6. The method according to Example 5, wherein deriving the transform type based on the size of the current coefficient block includes: selecting the DST-7 transform type, wherein the maximum allowed 1-D transform size is N.
[0333] Example 7. The method according to Example 6, wherein the current coefficient block has dimensions of NxM, and wherein selecting the DST-7 transform type includes: selecting an N-point DST-7 transform for vertical use and selecting an M-point DST-7 transform for horizontal use.
[0334] Example 8. The method according to any combination of Examples 1-7, wherein deriving the transform type includes: selecting different combinations of the DST-7 transform and the DCT-2 transform.
[0335] Example 9. The method according to Example 8, wherein selecting different combinations of the DST-7 transform and the DCT-2 transform includes: selecting the DST-7 transform for any row or column having less than or equal to K samples; and selecting the DCT-2 transform for any row or column having more than K samples.
[0336] Example 10. The method according to any combination of Examples 1-9, further comprising: in response to determining that a video block is segmented into a plurality of segments, using a common rule set to select a corresponding transform type for the coefficient blocks of each of the plurality of segments.
[0337] Example 11. The method according to Example 10, wherein selecting a corresponding transform type for each of the plurality of segments includes: selecting DST-7 for the coefficient blocks of all of the plurality of segments.
[0338] Example 12. The method according to Example 10, wherein selecting a corresponding transform type for each of the plurality of partitions includes: selecting different combinations of DST-7 transform and DCT-2 transform based on the dimension of the partition.
[0339] Example 13. The method according to Example 12, wherein selecting different combinations of DST-7 transform and DCT-2 transform based on the dimension of the partition includes: selecting DST-7 transform for any row or column having a number of samples less than or equal to a threshold number; and selecting DCT-2 transform for any row or column having a number of samples greater than the threshold number.
[0340] Example 14. The method according to Example 13, wherein the threshold is 16.
[0341] Example 15. The method according to any combination of Examples 10-14, wherein dividing the video block into a plurality of partitions includes: dividing the video block using intra-sub-block partitioning (ISP).
[0342] Example 16. The method according to Example 15, wherein performing the transform using DST-7 transform includes: performing the transform on the current coefficient block using the following two-point DST-7 matrix:
[0343] {48, 77}
[0344] {77, -48}.
[0345] Example 17. The method according to any combination of Examples 1-16, further comprising: determining an intra prediction mode for predicting the video block, wherein deriving a transform type for the current coefficient block of the video block includes: deriving a transform type for the current coefficient block of the video block based on the intra prediction mode.
[0346] Example 18. The method according to Example 17, wherein deriving a transform type for the current coefficient block of the video block based on the intra prediction mode includes: in response to determining that the intra prediction mode is a planar mode or a DC mode, selecting DST-7 transform for the current coefficient block in both the horizontal and vertical directions.
[0347] Example 19. The method according to any one of Examples 17 or 18, wherein deriving a transform type for the current coefficient block of the video block based on the intra prediction mode includes: in response to determining that the intra prediction mode is a diagonal angle mode, selecting DST-7 transform for the current coefficient block in both the horizontal and vertical directions.
[0348] Example 20. The method according to Example 19, wherein the diagonal angle mode is mode index 34.
[0349] Example 21. In the method according to any one of Examples 17-20, wherein deriving a transform type for a current coefficient block of a video block based on an intra prediction mode includes: in response to determining that the intra prediction mode is an angular mode, selecting a transform type for the current coefficient block based on a mode index of the intra prediction mode.
[0350] Example 22. In the method according to Example 21, wherein selecting a transform type for the current coefficient block based on a mode index of the intra prediction mode includes: identifying a range among a plurality of ranges including the mode index of the intra prediction mode; and selecting a transform type for the current coefficient block based on the identified range.
[0351] Example 23. In the method according to Example 22, wherein identifying a range includes: identifying a first range in response to determining that the mode index is between a first threshold and a second threshold; identifying a second range in response to determining that the mode index is between the second threshold and a third threshold; and identifying a third range in response to determining that the mode index is between the third threshold and a fourth threshold.
[0352] Example 24. In the method according to Example 23, wherein: identifying a first range in response to determining that the mode index is between a first threshold and a second threshold includes: identifying a first range in response to determining that the mode index is within [2, …(33–T)]; identifying a second range in response to determining that the mode index is between the second threshold and a third threshold includes: identifying a second range in response to determining that the mode index is within [(34–T), …, (34+T)]; identifying a third range in response to determining that the mode index is between the third threshold and a fourth threshold includes: identifying a third range in response to determining that the mode index is within [(35+T), …, 66]; and T is an integer between 2 and 30.
[0353] Example 25. In the method according to Example 23 or Example 24, wherein selecting a transform type for the current coefficient block based on the identified range includes: selecting DST-7 for horizontal use and DCT-2 for vertical use in response to identifying the first range; selecting DST-7 for both horizontal and vertical use in response to identifying the second range; and selecting DCT-2 for horizontal use and DST-7 for vertical use in response to identifying the third range.
[0354] Example 26. In the method according to any one of Examples 1-25, wherein decoding includes decoding.
[0355] Example 27. In the method according to any one of Examples 1-26, wherein decoding includes encoding.
[0356] Example 28. An apparatus for decoding video data, the apparatus including one or more unit examples configured to perform the method according to any one of Examples 1-27.
[0357] Example 29. The apparatus according to Example 28, wherein the one or more units include one or more processors implemented in a circuit.
[0358] Example 30. The apparatus according to any one of Examples 28 and 29, further comprising: a memory for storing the video data.
[0359] Example 31. The apparatus according to any one of Examples 28-30, further comprising: a display configured to display the decoded video data.
[0360] Example 32. The apparatus according to any one of Examples 28-31, wherein the apparatus includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0361] Example 33. The apparatus according to any one of Examples 28-32, wherein the apparatus includes a video decoder.
[0362] Example 34. The apparatus according to any one of Examples 28-33, wherein the apparatus includes a video encoder.
[0363] Example 35. A computer-readable storage medium having instructions stored thereon that, when executed, cause one or more processors to perform the method according to any one of Examples 1-25.
[0364] 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 order, may be added, combined, or entirely omitted (e.g., not all described actions or events are necessary for implementing the techniques). Additionally, in certain examples, the actions or events may be performed concurrently rather than sequentially, such as by multithreading, interrupt processing, or multiple processors.
[0365] In one or more examples, the described functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functionality may be stored on or transmitted via a computer-readable medium as one or more instructions or code and executed by a hardware-based processing unit. The computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium such as a data storage medium or a communication medium including any medium that facilitates transfer of a computer program from one place to another, for example, according to a communication protocol. In this manner, the computer-readable medium generally may correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium such as a signal or carrier wave. The data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to obtain instructions, code, and / or data structures for implementing the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0366] By way of example, and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if instructions are transmitted using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead are directed to non-transitory tangible storage media. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc, where disks typically reproduce data magnetically, while discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0367] The instructions can be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Thus, as used herein, the terms "processor" and "processing circuitry" can refer to any one of the foregoing structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described herein can be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Further, the techniques can be implemented entirely in one or more circuits or logic elements.
[0368] The techniques of the present disclosure can be implemented in a variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs) or a group of ICs (e.g., a chip set). Various components, modules, or units are described in the present disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but need not necessarily be implemented by distinct hardware units. Rather, as described above, the various units can be combined in a codec hardware unit or provided by a collection of interoperable hardware units, including one or more processors as described above, in conjunction with appropriate software and / or firmware.
[0369] Various examples have been described. These and other examples are within the scope of the appended claims.
Claims
1. A method for decoding video data, the method comprising: Inferring a transform type for a current transform block of a current video block from a plurality of transform types including one or more discrete cosine transforms (DCTs) and one or more discrete sine transforms (DSTs), wherein inferring the transform type includes: Determining whether the size of the current transform block meets a size threshold, wherein when the size of the current transform block is less than or equal to 16, the size of the current transform block meets the size threshold; Determining whether the current video block is segmented using intra-subblock segmentation (ISP); In response to determining that the size of the current transform block meets the size threshold and determining that the current video block is segmented using ISP, selecting a specific DST among the one or more DSTs as the selected transform type, wherein selecting the specific DST includes: selecting the specific DST regardless of the intra-frame prediction mode selected for predicting the current video block, wherein the specific DST is DST-7; and In response to determining that the size of the current transform block does not meet the size threshold and determining that the current video block is segmented using ISP, selecting a specific DCT among the one or more DCTs as the selected transform type, wherein the specific DCT is DCT-2; Transforming the current transform block using the selected transform type to obtain a block of reconstructed residual data for the video block; and Reconstructing the video block based on the reconstructed residual data for the video block; wherein inferring the transform type for the current transform block includes: inferring the transform type for the current transform block in response to determining that multi-transform selection (MTS) is enabled for the current video block; wherein determining whether the current video block is segmented using ISP includes: determining whether the current video block is segmented using ISP based on the value of one or more syntax elements decoded from a video bitstream; wherein the size of the current transform block includes: The width of the current transform block; and The height of the current transform block; wherein selecting the transform type includes: selecting a transform type for horizontal use and selecting a transform type for vertical use, and the method further includes: In response to determining that the width of the current transform block meets a width size threshold and determining that the current video block is segmented using ISP, selecting DST-7 as the selected transform type for horizontal use; and In response to determining that the height of the current transform block meets a height size threshold and determining that the current video block is segmented using ISP, selecting DST-7 as the selected transform type for vertical use; and wherein the width size threshold is equal to the height size threshold.
2. The method according to claim 1, wherein The plurality of DCTs includes one or more of DCT-1, DCT-3, DCT-4, DCT-5, DCT-6, DCT-7, and DCT-8 and DCT-2.
3. The method according to claim 2, wherein, The plurality of DSTs includes one or more of DST-1, DST-2, DST-3, DST-4, DST-5, DST-6, and DST-8 and DST-7.
4. An apparatus for decoding video data, the apparatus comprising: a memory configured to store video blocks; and one or more processors implemented in circuitry and configured to: infer a transform type from a plurality of transform types including one or more discrete cosine transforms (DCTs) and one or more discrete sine transforms (DSTs) for a current transform block of a current video block, wherein, to infer the transform type, the one or more processors are configured to: determine whether a size of the current transform block meets a size threshold, wherein, when the size of the current transform block is less than or equal to 16, the size of the current transform block meets the size threshold; determine whether the current video block is segmented using intra-sub-block splitting (ISP); in response to determining that the size of the current transform block meets the size threshold and determining that the current video block is segmented using ISP, select a specific DST from the one or more DSTs as the selected transform type, wherein selecting the specific DST includes: selecting the specific DST regardless of an intra prediction mode selected for predicting the current video block, wherein the specific DST is DST-7; and in response to determining that the size of the current transform block does not meet the size threshold and determining that the current video block is segmented using ISP, select a specific DCT from the one or more DCTs as the selected transform type, wherein the specific DCT is DCT-2; transform the current transform block using the selected transform type to obtain a block of reconstructed residual data for the video block; and reconstruct the video block based on the reconstructed residual data for the video block; wherein, to infer the transform type for the current transform block, the one or more processors are configured to: infer the transform type for the current transform block in response to determining that multi-transform selection (MTS) is enabled for the current video block; wherein, to determine whether the current video block is segmented using ISP, the one or more processors are configured to: determine whether the current video block is segmented using ISP based on values of one or more syntax elements decoded from a video bitstream; wherein the size of the current transform block includes: a width of the current transform block; and a height of the current transform block; wherein, to select the transform type, the one or more processors are configured to: select a transform type for horizontal use and a transform type for vertical use, and wherein the one or more processors are configured: In response to determining that the width of the current transform block meets a width size threshold and determining that the current video block is segmented using ISP, select the DST-7 as the selected transform type for horizontal use; and In response to determining that the height of the current transform block meets a height size threshold and determining that the current video block is segmented using ISP, select the DST-7 as the selected transform type for vertical use; and wherein the width size threshold is equal to the height size threshold.
5. The apparatus according to claim 4, wherein, The plurality of DCTs includes one or more of DCT-1, DCT-3, DCT-4, DCT-5, DCT-6, DCT-7, and DCT-8 and DCT-2.
6. The device according to claim 5, wherein, The plurality of DSTs includes one or more of DST-1, DST-2, DST-3, DST-4, DST-5, DST-6, and DST-8 and DST-7.
7. A computer-readable storage medium storing instructions that, when executed, cause one or more processors of a video decoding device to perform the following operations: For a current transform block of a current video block, infer a transform type from a plurality of transform types including one or more discrete cosine transforms (DCTs) and one or more discrete sine transforms (DSTs), wherein, The instructions that cause the one or more processors to infer the transform type include instructions that cause the one or more processors to perform the following operations: Determine whether the size of the current transform block meets a size threshold, wherein, when the size of the current transform block is less than or equal to 16, the size of the current transform block meets the size threshold; Determine whether the current video block is segmented using in-sub-block split ISP; In response to determining that the size of the current transform block meets the size threshold and determining that the current video block is segmented using ISP, select a specific DST among the one or more DSTs as the selected transform type, wherein the instructions that cause the one or more processors to select the specific DST include: instructions that cause the one or more processors to select the specific DST regardless of the intra prediction mode selected for predicting the current video block, wherein the specific DST is DST-7; and In response to determining that the size of the current transform block does not meet the size threshold and determining that the current video block is segmented using ISP, select a specific DCT among the one or more DCTs as the selected transform type, wherein the specific DCT is DCT-2; Use the selected transform type to transform the current transform block to obtain a block of reconstructed residual data for the video block; and Reconstruct the video block based on the reconstructed residual data for the video block; wherein the instructions that cause the one or more processors to infer the transform type for the current transform block include: instructions that cause the one or more processors to infer the transform type for the current transform block in response to determining that multi-transform selection (MTS) is enabled for the current video block. The instructions that cause the one or more processors to determine whether the current video block is split using ISP include: instructions that cause the one or more processors to determine whether the current video block is split using ISP based on the values of one or more syntax elements decoded from the video bitstream; Wherein, the size of the current transform block includes: the width of the current transform block; and the height of the current transform block; Wherein, the instructions that cause the one or more processors to select the transform type include: instructions that cause the one or more processors to select a transform type for horizontal use and a transform type for vertical use, and further include instructions that cause the one or more processors to perform the following operations: selecting the DST-7 as the selected transform type for horizontal use in response to determining that the width of the current transform block meets a width size threshold and determining that the current video block is split using ISP; and selecting the DST-7 as the selected transform type for vertical use in response to determining that the height of the current transform block meets a height size threshold and determining that the current video block is split using ISP; and Wherein, the width size threshold is equal to the height size threshold.
8. The computer-readable storage medium according to claim 7, wherein, The plurality of DCTs include one or more of DCT-1, DCT-3, DCT-4, DCT-5, DCT-6, DCT-7, and DCT-8 and DCT-2.
9. The computer-readable storage medium according to claim 8, wherein, The plurality of DSTs include one or more of DST-1, DST-2, DST-3, DST-4, DST-5, DST-6, and DST-8 and DST-7.
Citation Information
Patent Citations
Enhanced multiple transforms for prediction residual
US20160219290A1
Look-up table for enhanced multiple transform
US20180020218A1