METHOD, APPARATUS, AND MEDIUM FOR VIDEO PROCESSING

Embodiments of the disclosure provide a solution for video processing. A method for video processing is proposed. The method includes: determining, for a conversion between a video unit of a video and a bitstream of the video, whether an overlap subblock based motion compensation (OBMC) is applied to a current block of the video unit based on at least one of: sample values of samples inside the current block, sample values of samples neighboring to the current block, template costs, or motion vector precision of the current block; and performing the conversion based on the determining.

FIELDS

Embodiments of the present disclosure relates generally to video processing techniques, and more particularly, to block level adaptive overlap subblock based motion compensation (OBMC) in video coding sample value dependent.

BACKGROUND

In nowadays, digital video capabilities are being applied in various aspects of peoples' lives. Multiple types of video compression technologies, such as MPEG-2, MPEG-4, ITU-TH.263, ITU-TH.264/MPEG-4 Part 10 Advanced Video Coding (AVC), ITU-TH.265 high efficiency video coding (HEVC) standard, versatile video coding (VVC) standard, have been proposed for video encoding/decoding. However, coding efficiency of video coding techniques is generally expected to be further improved.

SUMMARY

Embodiments of the present disclosure provide a solution for video processing.

In a first aspect, a method for video processing is proposed. The method comprises: determining, for a conversion between a video unit of a video and a bitstream of the video, whether an overlap subblock based motion compensation (OBMC) is applied to a current block of the video unit based on at least one of: sample values of samples inside the current block, sample values of samples neighboring to the current block, template costs, or motion vector precision of the current block; and performing the conversion based on the determining. In this way, block level adaptive OBMC which considers the block characteristics based on the already decoded information may bring higher coding gain and improve coding efficiency.

In a second aspect, an apparatus for video processing is proposed. The apparatus comprises a processor and a non-transitory memory with instructions thereon. The instructions upon execution by the processor, cause the processor to perform a method in accordance with the first aspect of the present disclosure.

In a third aspect, a non-transitory computer-readable storage medium is proposed. The non-transitory computer-readable storage medium stores instructions that cause a processor to perform a method in accordance with the first aspect of the present disclosure.

In a fourth aspect, another non-transitory computer-readable recording medium is proposed. The non-transitory computer-readable recording medium stores a bitstream of a video which is generated by a method performed by an apparatus for video processing. The method comprises: determining whether an overlap subblock based motion compensation (OBMC) is applied to a current block of a video unit of the video based on at least one of: sample values of samples inside the current block, sample values of samples neighboring to the current block, template costs, or motion vector precision of the current block; and generating the bitstream based on the determining.

In a fifth aspect, a method for storing a bitstream of a video is proposed. The method comprises: determining whether an overlap subblock based motion compensation (OBMC) is applied to a current block of a video unit of the video based on at least one of: sample values of samples inside the current block, sample values of samples neighboring to the current block, template costs, or motion vector precision of the current block; generating the bitstream based on the determining; and storing the bitstream in a non-transitory computer-readable medium.

Throughout the drawings, the same or similar reference numerals usually refer to the same or similar elements.

DETAILED DESCRIPTION

Example Environment

FIG. 1 is a block diagram that illustrates an example video coding system 100 that may utilize the techniques of this disclosure. As shown, the video coding system 100 may include a source device 110 and a destination device 120. The source device 110 can be also referred to as a video encoding device, and the destination device 120 can be also referred to as a video decoding device. In operation, the source device 110 can be configured to generate encoded video data and the destination device 120 can be configured to decode the encoded video data generated by the source device 110. The source device 110 may include a video source 112, a video encoder 114, and an input/output (I/O) interface 116.

The video source 112 may include a source such as a video capture device. Examples of the video capture device include, but are not limited to, an interface to receive video data from a video content provider, a computer graphics system for generating video data, and/or a combination thereof.

The video data may comprise one or more pictures. The video encoder 114 encodes the video data from the video source 112 to generate a bitstream. The bitstream may include a sequence of bits that form a coded representation of the video data. The bitstream may include coded pictures and associated data. The coded picture is a coded representation of a picture. The associated data may include sequence parameter sets, picture parameter sets, and other syntax structures. The I/O interface 116 may include a modulator/demodulator and/or a transmitter. The encoded video data may be transmitted directly to destination device 120 via the I/O interface 116 through the network 130A. The encoded video data may also be stored onto a storage medium/server 130B for access by destination device 120.

The destination device 120 may include an I/O interface 126, a video decoder 124, and a display device 122. The I/O interface 126 may include a receiver and/or a modem. The I/O interface 126 may acquire encoded video data from the source device 110 or the storage medium/server 130B. The video decoder 124 may decode the encoded video data. The display device 122 may display the decoded video data to a user. The display device 122 may be integrated with the destination device 120, or may be external to the destination device 120 which is configured to interface with an external display device.

The video encoder 114 and the video decoder 124 may operate according to a video compression standard, such as the High Efficiency Video Coding (HEVC) standard, Versatile Video Coding (VVC) standard and other current and/or further standards.

FIG. 2 is a block diagram illustrating an example of a video encoder 200, which may be an example of the video encoder 114 in the system 100 illustrated in FIG. 1, in accordance with some embodiments of the present disclosure.

The video encoder 200 may be configured to implement any or all of the techniques of this disclosure. In the example of FIG. 2, the video encoder 200 includes a plurality of functional components. The techniques described in this disclosure may be shared among the various components of the video encoder 200. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure.

In some embodiments, the video encoder 200 may include a partition unit 201, a predication unit 202 which may include a mode select unit 203, a motion estimation unit 204, a motion compensation unit 205 and an intra-prediction unit 206, a residual generation unit 207, a transform unit 208, a quantization unit 209, an inverse quantization unit 210, an inverse transform unit 211, a reconstruction unit 212, a buffer 213, and an entropy encoding unit 214.

In other examples, the video encoder 200 may include more, fewer, or different functional components. In an example, the predication unit 202 may include an intra block copy (IBC) unit. The IBC unit may perform predication in an IBC mode in which at least one reference picture is a picture where the current video block is located.

Furthermore, although some components, such as the motion estimation unit 204 and the motion compensation unit 205, may be integrated, but are represented in the example of FIG. 2 separately for purposes of explanation.

The partition unit 201 may partition a picture into one or more video blocks. The video encoder 200 and the video decoder 300 may support various video block sizes.

The mode select unit 203 may select one of the coding modes, intra or inter, e.g., based on error results, and provide the resulting intra-coded or inter-coded block to a residual generation unit 207 to generate residual block data and to a reconstruction unit 212 to reconstruct the encoded block for use as a reference picture. In some examples, the mode select unit 203 may select a combination of intra and inter predication (CIIP) mode in which the predication is based on an inter predication signal and an intra predication signal. The mode select unit 203 may also select a resolution for a motion vector (e.g., a sub-pixel or integer pixel precision) for the block in the case of inter-predication.

To perform inter prediction on a current video block, the motion estimation unit 204 may generate motion information for the current video block by comparing one or more reference frames from buffer 213 to the current video block. The motion compensation unit 205 may determine a predicted video block for the current video block based on the motion information and decoded samples of pictures from the buffer 213 other than the picture associated with the current video block.

The motion estimation unit 204 and the motion compensation unit 205 may perform different operations for a current video block, for example, depending on whether the current video block is in an I-slice, a P-slice, or a B-slice. As used herein, an “I-slice” may refer to a portion of a picture composed of macroblocks, all of which are based upon macroblocks within the same picture. Further, as used herein, in some aspects, “P-slices” and “B-slices” may refer to portions of a picture composed of macroblocks that are not dependent on macroblocks in the same picture.

In some examples, the motion estimation unit 204 may perform uni-directional prediction for the current video block, and the motion estimation unit 204 may search reference pictures of list 0 or list 1 for a reference video block for the current video block. The motion estimation unit 204 may then generate a reference index that indicates the reference picture in list 0 or list 1 that contains the reference video block and a motion vector that indicates a spatial displacement between the current video block and the reference video block. The motion estimation unit 204 may output the reference index, a prediction direction indicator, and the motion vector as the motion information of the current video block. The motion compensation unit 205 may generate the predicted video block of the current video block based on the reference video block indicated by the motion information of the current video block.

Alternatively, in other examples, the motion estimation unit 204 may perform bi-directional prediction for the current video block. The motion estimation unit 204 may search the reference pictures in list 0 for a reference video block for the current video block and may also search the reference pictures in list 1 for another reference video block for the current video block. The motion estimation unit 204 may then generate reference indexes that indicate the reference pictures in list 0 and list 1 containing the reference video blocks and motion vectors that indicate spatial displacements between the reference video blocks and the current video block. The motion estimation unit 204 may output the reference indexes and the motion vectors of the current video block as the motion information of the current video block. The motion compensation unit 205 may generate the predicted video block of the current video block based on the reference video blocks indicated by the motion information of the current video block.

In some examples, the motion estimation unit 204 may output a full set of motion information for decoding processing of a decoder. Alternatively, in some embodiments, the motion estimation unit 204 may signal the motion information of the current video block with reference to the motion information of another video block. For example, the motion estimation unit 204 may determine that the motion information of the current video block is sufficiently similar to the motion information of a neighboring video block.

In one example, the motion estimation unit 204 may indicate, in a syntax structure associated with the current video block, a value that indicates to the video decoder 300 that the current video block has the same motion information as the another video block.

As discussed above, video encoder 200 may predictively signal the motion vector. Two examples of predictive signaling techniques that may be implemented by video encoder 200 include advanced motion vector predication (AMVP) and merge mode signaling.

The intra prediction unit 206 may perform intra prediction on the current video block. When the intra prediction unit 206 performs intra prediction on the current video block, the intra prediction unit 206 may generate prediction data for the current video block based on decoded samples of other video blocks in the same picture. The prediction data for the current video block may include a predicted video block and various syntax elements.

In other examples, there may be no residual data for the current video block for the current video block, for example in a skip mode, and the residual generation unit 207 may not perform the subtracting operation.

The transform processing unit 208 may generate one or more transform coefficient video blocks for the current video block by applying one or more transforms to a residual video block associated with the current video block.

After the transform processing unit 208 generates a transform coefficient video block associated with the current video block, the quantization unit 209 may quantize the transform coefficient video block associated with the current video block based on one or more quantization parameter (QP) values associated with the current video block.

The inverse quantization unit 210 and the inverse transform unit 211 may apply inverse quantization and inverse transforms to the transform coefficient video block, respectively, to reconstruct a residual video block from the transform coefficient video block. The reconstruction unit 212 may add the reconstructed residual video block to corresponding samples from one or more predicted video blocks generated by the predication unit 202 to produce a reconstructed video block associated with the current video block for storage in the buffer 213.

After the reconstruction unit 212 reconstructs the video block, loop filtering operation may be performed to reduce video blocking artifacts in the video block.

The entropy encoding unit 214 may receive data from other functional components of the video encoder 200. When the entropy encoding unit 214 receives the data, the entropy encoding unit 214 may perform one or more entropy encoding operations to generate entropy encoded data and output a bitstream that includes the entropy encoded data.

FIG. 3 is a block diagram illustrating an example of a video decoder 300, which may be an example of the video decoder 124 in the system 100 illustrated in FIG. 1, in accordance with some embodiments of the present disclosure.

The video decoder 300 may be configured to perform any or all of the techniques of this disclosure. In the example of FIG. 3, the video decoder 300 includes a plurality of functional components. The techniques described in this disclosure may be shared among the various components of the video decoder 300. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure.

In the example of FIG. 3, the video decoder 300 includes an entropy decoding unit 301, a motion compensation unit 302, an intra prediction unit 303, an inverse quantization unit 304, an inverse transformation unit 305, and a reconstruction unit 306 and a buffer 307. The video decoder 300 may, in some examples, perform a decoding pass generally reciprocal to the encoding pass described with respect to video encoder 200.

The entropy decoding unit 301 may retrieve an encoded bitstream. The encoded bitstream may include entropy coded video data (e.g., encoded blocks of video data). The entropy decoding unit 301 may decode the entropy coded video data, and from the entropy decoded video data, the motion compensation unit 302 may determine motion information including motion vectors, motion vector precision, reference picture list indexes, and other motion information. The motion compensation unit 302 may, for example, determine such information by performing the AMVP and merge mode. AMVP is used, including derivation of several most probable candidates based on data from adjacent PBs and the reference picture. Motion information typically includes the horizontal and vertical motion vector displacement values, one or two reference picture indices, and, in the case of prediction regions in B slices, an identification of which reference picture list is associated with each index. As used herein, in some aspects, a “merge mode” may refer to deriving the motion information from spatially or temporally neighboring blocks.

The motion compensation unit 302 may produce motion compensated blocks, possibly performing interpolation based on interpolation filters. Identifiers for interpolation filters to be used with sub-pixel precision may be included in the syntax elements.

The motion compensation unit 302 may use the interpolation filters as used by the video encoder 200 during encoding of the video block to calculate interpolated values for sub-integer pixels of a reference block. The motion compensation unit 302 may determine the interpolation filters used by the video encoder 200 according to the received syntax information and use the interpolation filters to produce predictive blocks.

The motion compensation unit 302 may use at least part of the syntax information to determine sizes of blocks used to encode frame(s) and/or slice(s) of the encoded video sequence, partition information that describes how each macroblock of a picture of the encoded video sequence is partitioned, modes indicating how each partition is encoded, one or more reference frames (and reference frame lists) for each inter-encoded block, and other information to decode the encoded video sequence. As used herein, in some aspects, a “slice” may refer to a data structure that can be decoded independently from other slices of the same picture, in terms of entropy coding, signal prediction, and residual signal reconstruction. A slice can either be an entire picture or a region of a picture.

The intra prediction unit 303 may use intra prediction modes for example received in the bitstream to form a prediction block from spatially adjacent blocks. The inverse quantization unit 304 inverse quantizes, i.e., de-quantizes, the quantized video block coefficients provided in the bitstream and decoded by entropy decoding unit 301. The inverse transform unit 305 applies an inverse transform.

The reconstruction unit 306 may obtain the decoded blocks, e.g., by summing the residual blocks with the corresponding prediction blocks generated by the motion compensation unit 302 or intra-prediction unit 303. If desired, a deblocking filter may also be applied to filter the decoded blocks in order to remove blockiness artifacts. The decoded video blocks are then stored in the buffer 307, which provides reference blocks for subsequent motion compensation/intra predication and also produces decoded video for presentation on a display device.

Some exemplary embodiments of the present disclosure will be described in detailed hereinafter. It should be understood that section headings are used in the present document to facilitate ease of understanding and do not limit the embodiments disclosed in a section to only that section. Furthermore, while certain embodiments are described with reference to Versatile Video Coding or other specific video codecs, the disclosed techniques are applicable to other video coding technologies also. Furthermore, while some embodiments describe video coding steps in detail, it will be understood that corresponding steps decoding that undo the coding will be implemented by a decoder. Furthermore, the term video processing encompasses video coding or compression, video decoding or decompression and video transcoding in which video pixels are represented from one compressed format into another compressed format or at a different compressed bitrate.

1. Brief Summary

The present disclosure is related to video coding technologies. Specifically, it is about Overlap subblock based motion compensation (OBMC) and related techniques in image/video coding. It may be applied to the existing video coding standard like HEVC, VVC, and etc. It may be also applicable to future video coding standards or video codec.

Video coding standards have evolved primarily through the development of the well-known ITU-T and ISO/IEC standards. The ITU-T produced H.261 and H.263, ISO/IEC produced MPEG-1 and MPEG-4 Visual, and the two organizations jointly produced the H.262/MPEG-2 Video and H.264/MPEG-4 Advanced Video Coding (AVC) and H.265/HEVC standards. Since H.262, the video coding standards are based on the hybrid video coding structure wherein temporal prediction plus transform coding are utilized. To explore the future video coding technologies beyond HEVC, the Joint Video Exploration Team (JVET) was founded by VCEG and MPEG jointly in 2015. The JVET meeting is concurrently held once every quarter, and the new video coding standard was officially named as Versatile Video Coding (VVC) in the April 2018 JVET meeting, and the first version of VVC test model (VTM) was released at that time. The VVC working draft and test model VTM are then updated after every meeting. The VVC project achieved technical completion (FDIS) at the July 2020 meeting.

2.1. Existing Coding Tools

2.1.1.1. Intra Mode Coding with 67 Intra Prediction Modes

To capture the arbitrary edge directions presented in natural video, the number of directional intra modes in VVC is extended from 33, as used in HEVC, to 65. The new directional modes not in HEVC are depicted as red dotted arrows in FIG. 4, and the planar and DC modes remain the same. These denser directional intra prediction modes apply for all block sizes and for both luma and chroma intra predictions.

In VVC, several conventional angular intra prediction modes are adaptively replaced with wide-angle intra prediction modes for the non-square blocks.

In HEVC, every intra-coded block has a square shape and the length of each of its side is a power of 2. Thus, no division operations are required to generate an intra-predictor using DC mode. In VVC, blocks can have a rectangular shape that necessitates the use of a division operation per block in the general case. To avoid division operations for DC prediction, only the longer side is used to compute the average for non-square blocks.

2.1.1.2. Intra Mode Coding

To keep the complexity of the most probable mode (MPM) list generation low, an intra mode coding method with 6 MPMs is used by considering two available neighboring intra modes. The following three aspects are considered to construct the MPM list:

A unified 6-MPM list is used for intra blocks irrespective of whether MRL and ISP coding tools are applied or not. The MPM list is constructed based on intra modes of the left and above neighboring block. Suppose the mode of the left is denoted as Left and the mode of the above block is denoted as Above, the unified MPM list is constructed as follows:

Besides, the first bin of the mpm index codeword is CABAc Context Coded. In Total Three Contexts are Used, corresponding to whether the current intra block is MRL enabled, ISP enabled, or a normal intra block. During 6 MPM list generation process, pruning is used to remove duplicated modes so that only unique modes can be included into the MPM list. For entropy coding of the 61 non-MPM modes, a Truncated Binary Code (TBC) is used.

Conventional angular intra prediction directions are defined from 45 degrees to −135 degrees in clockwise direction. In VVC, several conventional angular intra prediction modes are adaptively replaced with wide-angle intra prediction modes for non-square blocks. The replaced modes are signalled using the original mode indexes, which are remapped to the indexes of wide angular modes after parsing. The total number of intra prediction modes is unchanged, i.e., 67, and the intra mode coding method is unchanged.

To support these prediction directions, the top reference with length 2W+1, and the left reference with length 2H+1, are defined as shown in FIG. 5.

The number of replaced modes in wide-angular direction mode depends on the aspect ratio of a block. The replaced intra prediction modes are illustrated in Table 1.

Intra prediction modes replaced by wide-angular modes

Aspect ratio
Replaced intra prediction modes

As shown in FIG. 6, two vertically-adjacent predicted samples may use two non-adjacent reference samples in the case of wide-angle intra prediction. Hence, low-pass reference samples filter and side smoothing are applied to the wide-angle prediction to reduce the negative effect of the increased gap Δpα. If a wide-angle mode represents a non-fractional offset. There are 8 modes in the wide-angle modes satisfy this condition, which are [−14, −12, −10, −6, 72, 76, 78, 80]. When a block is predicted by these modes, the samples in the reference buffer are directly copied without applying any interpolation. With this modification, the number of samples needed to be smoothing is reduced. Besides, it aligns the design of non-fractional modes in the conventional prediction modes and wide-angle modes.

In VVC, 4:2:2 and 4:4:4 chroma formats are supported as well as 4:2:0. Chroma derived mode (DM) derivation table for 4:2:2 chroma format was initially ported from HEVC extending the number of entries from 35 to 67 to align with the extension of intra prediction modes. Since HEVC specification does not support prediction angle below-135 degree and above 45 degree, luma intra prediction modes ranging from 2 to 5 are mapped to 2. Therefore chroma DM derivation table for 4:2:2: chroma format is updated by replacing some values of the entries of the mapping table to convert prediction angle more precisely for chroma blocks.

Four-tap intra interpolation filters are utilized to improve the directional intra prediction accuracy. In HEVC, a two-tap linear interpolation filter has been used to generate the intra prediction block in the directional prediction modes (i.e., excluding Planar and DC predictors). In VVC, simplified 6-bit 4-tap Gaussian interpolation filter is used for only directional intra modes. Non-directional intra prediction process is unmodified. The selection of the 4-tap filters is performed according to the MDIS condition for directional intra prediction modes that provide non-fractional displacements, i.e. to all the directional modes excluding the following: 2, HOR_IDX, DIA_IDX, VER_IDX, 66.

Depending on the intra prediction mode, the following reference samples processing is performed:

2.1.1.5. Position Dependent Intra Prediction Combination

In VVC, the results of intra prediction of DC, planar and several angular modes are further modified by a position dependent intra prediction combination (PDPC) method. PDPC is an intra prediction method which invokes a combination of the un-filtered boundary reference samples and HEVC style intra prediction with filtered boundary reference samples. PDPC is applied to the following intra modes without signalling: planar, DC, horizontal, vertical, bottom-left angular mode and its eight adjacent angular modes, and top-right angular mode and its eight adjacent angular modes.

The prediction sample pred (x′,y′) is predicted using an intra prediction mode (DC, planar, angular) and a linear combination of reference samples according to the Equation 3-8 as follows:

where Rx,−1, R−1,y represent the reference samples located at the top and left boundaries of current sample (x, y), respectively, and R−1,−1 represents the reference sample located at the top-left corner of the current block. If PDPC is applied to DC, planar, horizontal, and vertical intra modes, additional boundary filters are not needed, as required in the case of HEVC DC mode boundary filter or horizontal/vertical mode edge filters. PDPC process for DC and Planar modes is identical and clipping operation is avoided. For angular modes, pdpc scale factor is adjusted such that range check is not needed and condition on angle to enable pdpc is removed (scale>=0 is used). In addition, PDPC weight is based on 32 in all angular mode cases. The PDPC weights are dependent on prediction modes and are shown in Table 2. PDPC is applied to the block with both width and height greater than or equal to 4.

FIGS. 7A-7D illustrate the definition of reference samples (Rx,−1, R−1,y and R−1,−1) for PDPC applied over various prediction modes. The prediction sample pred (x′, y′) is located at (x′, y′) within the prediction block. As an example, the coordinate x of the reference sample Rx,−1 is given by: x=x′+y′+1, and the coordinate y of the reference sample R−1,y is similarly given by: y=x′+y′+1 for the diagonal modes. For the other annular mode, the reference samples Rx,−1 and R−1,y could be located in fractional sample position. In this case, the sample value of the nearest integer sample location is used.

Example of PDPC weights according to prediction modes

Prediction modes
wT
wL
wTL

2.1.1.6. Multiple Reference Line (MRL) Intra Prediction

Multiple reference line (MRL) intra prediction uses more reference lines for intra prediction. In FIG. 8, an example of 4 reference lines is depicted, where the samples of segments A and F are not fetched from reconstructed neighbouring samples but padded with the closest samples from Segment B and E, respectively. HEVC intra-picture prediction uses the nearest reference line (i.e., reference line 0). In MRL, 2 additional lines (reference line 1 and reference line 3) are used.

The index of selected reference line (mrl_idx) is signalled and used to generate intra predictor. For reference line idx, which is greater than 0, only include additional reference line modes in MPM list and only signal mpm index without remaining mode. The reference line index is signalled before intra prediction modes, and Planar mode is excluded from intra prediction modes in case a nonzero reference line index is signalled.

MRL is disabled for the first line of blocks inside a CTU to prevent using extended reference samples outside the current CTU line. Also, PDPC is disabled when additional line is used. For MRL mode, the derivation of DC value in DC intra prediction mode for non-zero reference line indices is aligned with that of reference line index 0. MRL requires the storage of 3 neighboring luma reference lines with a CTU to generate predictions. The Cross-Component Linear Model (CCLM) tool also requires 3 neighboring luma reference lines for its downsampling filters. The definition of MLR to use the same 3 lines is aligned as CCLM to reduce the storage requirements for decoders.

The intra sub-partitions (ISP) divides luma intra-predicted blocks vertically or horizontally into 2 or 4 sub-partitions depending on the block size. For example, minimum block size for ISP is 4×8 (or 8×4). If block size is greater than 4×8 (or 8×4) then the corresponding block is divided by 4 sub-partitions. It has been noted that the M×128 (with M≤64) and 128×N (with N≤64) ISP blocks could generate a potential issue with the 64×64 VDPU. For example, an M×128 CU in the single tree case has an M×128 luma TB and two corresponding

chroma IBS. II the Cu uses ISP, then the luma TB will be divided into four M×32 TBs (only the horizontal split is possible), each of them smaller than a 64×64 block. However, in the current design of ISP chroma blocks are not divided. Therefore, both chroma components will have a size greater than a 32×32 block. Analogously, a similar situation could be created with a 128×N CU using ISP. Hence, these two cases are an issue for the 64×64 decoder pipeline. For this reason, the CU sizes that can use ISP is restricted to a maximum of 64×64. FIGS. 9A and 9B show examples of the two possibilities. All sub-partitions fulfill the condition of having at least 16 samples.

In ISP, the dependence of 1×N/2×N subblock prediction on the reconstructed values of previously decoded 1×N/2×N subblocks of the coding block is not allowed so that the minimum width of prediction for subblocks becomes four samples. For example, an 8×N (N>4) coding block that is coded using ISP with vertical split is split into two prediction regions each of size 4×N and four transforms of size 2×N. Also, a 4×N coding block that is coded using ISP with vertical split is predicted using the full 4×N block; four transform each of 1×N is used. Although the transform sizes of 1×N and 2×N are allowed, it is asserted that the transform of these blocks in 4×N regions can be performed in parallel. For example, when a 4×N prediction region contains four 1×N transforms, there is no transform in the horizontal direction; the transform in the vertical direction can be performed as a single 4×N transform in the vertical direction. Similarly, when a 4×N prediction region contains two 2×N transform blocks, the transform operation of the two 2×N blocks in each direction (horizontal and vertical) can be conducted in parallel. Thus, there is no delay added in processing these smaller blocks than processing 4×4 regular-coded intra blocks.

Entropy coding coefficient group size

Block Size
Coefficient group Size

All other possible M × N cases
4 × 4

For each sub-partition, reconstructed samples are obtained by adding the residual signal to the prediction signal. Here, a residual signal is generated by the processes such as entropy decoding, inverse quantization and inverse transform. Therefore, the reconstructed sample values of each sub-partition are available to generate the prediction of the next sub-partition, and each sub-partition is processed repeatedly. In addition, the first sub-partition to be processed is the one containing the top-left sample of the CU and then continuing downwards (horizontal split) or rightwards (vertical split). As a result, reference samples used to generate the sub-partitions prediction signals are only located at the left and above sides of the lines. All sub-partitions share the same intra mode. The followings are summary of interaction of ISP with other coding tools.

Transform selection depends on intra mode

Intra mode
tH
tv

In ISP mode, all 67 intra modes are allowed. PDPC is also applied if corresponding width and height is at least 4 samples long. In addition, the condition for intra interpolation filter selection doesn't exist anymore, and Cubic (DCT-IF) filter is always applied for fractional position interpolation in ISP mode.

Matrix weighted intra prediction (MIP) method is a newly added intra prediction technique into VVC. For predicting the samples of a rectangular block of width W and height H, matrix weighted intra prediction (MIP) takes one line of H reconstructed neighbouring boundary samples left of the block and one line of W reconstructed neighbouring boundary samples above the block as input. If the reconstructed samples are unavailable, they are generated as it is done in the conventional intra prediction. The generation of the prediction signal is based on the following three steps, which are averaging, matrix vector multiplication and linear interpolation as shown in FIG. 10.

Averaging Neighboring Samples

Among the boundary samples, four samples or eight samples are selected by averaging based on block size and shape. Specifically, the input boundaries

are reduced to smaller boundaries

by averaging neighboring boundary samples according to predefined rule depends on block size. Then, the two reduced boundaries

are concatenated to a reduced boundary vector bdryred which is thus of size four for blocks of shape 4×4 and of size eight for blocks of all other shapes. If mode refers to the MIP-mode, this concatenation is defined as follows:

Matrix Multiplication

A matrix vector multiplication, followed by addition of an offset, is carried out with the averaged samples as an input. The result is a reduced prediction signal on a subsampled set of samples in the original block. Out of the reduced input vector bdryred a reduced prediction signal predred, which is a signal on the downsampled block of width Wred and height Hred is generated. Here, Wred and Hred are defined as:

The reduced prediction signal predred is computed by calculating a matrix vector product and adding an offset:

Here, A is a matrix that has Wred·Hred rows and 4 columns if W=H=4 and 8 columns in all other cases. b is a vector of size Wred·Hred. The matrix A and the offset vector b are taken from one of the sets S0, S1, S2. One defines an index idx=idx(W,H) as follows:

Here, each coefficient of the matrix A is represented with 8 bit precision. The set S0 consists of 16 matrices A0i,i∈{0, . . . , 15} each of which has 16 rows and 4 columns and 16 offset vectors b0i,i∈{0, . . . , 16} each of size 16. Matrices and offset vectors of that set are used for blocks of size 4×4. The set S1 consists of 8 matrices A1i,i∈{0, . . . , 7}, each of which has 16 rows and 8 columns and 8 offset vectors b1i,i∈{0, . . . , 7} each of size 16. The set S2 consists of 6 matrices A2i,i∈{0, . . . , 5}, each of which has 64 rows and 8 columns and of 6 offset vectors b2i,i∈{0, . . . , 5} of size 64.

Interpolation

The prediction signal at the remaining positions is generated from the prediction signal on the subsampled set by linear interpolation which is a single step linear interpolation in each direction. The interpolation is performed firstly in the horizontal direction and then in the vertical direction regardless of block shape or block size.

Signaling of MIP Mode and Harmonization with Other Coding Tools

For each Coding Unit (CU) in intra mode, a flag indicating whether an MIP mode is to be applied or not is sent. If an MIP mode is to be applied, MIP mode (predModeIntra) is signaled. For an MIP mode, a transposed flag (isTransposed), which determines whether the mode is transposed, and MIP mode Id (modeId), which determines which matrix is to be used for the given MIP mode is derived as follows

MIP coding mode is harmonized with other coding tools by considering following aspects:

In spatial GPM, a candidate list is built which includes partition split and two intra prediction modes. Up to 11 MPMs of intra prediction modes are used to form the combinations, the length of the candidate list is set equal to 16. The selected candidate index is signalled.

The list is reordered using template shown in the FIG. 11. GPM blending process is not used in the template, and SAD between the prediction and reconstruction of the template is used for ordering. FIG. 12 shows GPM template. FIG. 13 shows GPM partitioning boundary.

The SGPM mode is applied to blocks whose width and height meet the same restrictions as in inter GPM.

The following items are considered:

Intra Prediction Mode Selection:

Template Size (Left and Above): 1 or 4

Extended Block Size:

For each inter-predicted CU, motion parameters consisting of motion vectors, reference picture indices and reference picture list usage index, and additional information needed for the new coding feature of VVC to be used for inter-predicted sample generation. The motion parameter can be signalled in an explicit or implicit manner. When a CU is coded with skip mode, the CU is associated with one PU and has no significant residual coefficients, no coded motion vector delta or reference picture index. A merge mode is specified whereby the motion parameters for the current CU are obtained from neighbouring CUs, including spatial and temporal candidates, and additional schedules introduced in VVC. The merge mode can be applied to any inter-predicted CU, not only for skip mode. The alternative to merge mode is the explicit transmission of motion parameters, where motion vector, corresponding reference picture index for each reference picture list and reference picture list usage flag and other needed information are signalled explicitly per each CU.

Beyond the inter coding features in HEVC, VVC includes a number of new and refined inter prediction coding tools listed as follows:

The following text provides the details on those inter prediction methods specified in VVC.

2.1.2.1. Extended Merge Prediction

In VVC, the merge candidate list is constructed by including the following five types of candidates in order:

The size of merge list is signalled in sequence parameter set header and the maximum allowed size of merge list is 6. For each CU code in merge mode, an index of best merge candidate is encoded using truncated unary binarization (TU). The first bin of the merge index is coded with context and bypass coding is used for other bins.

The derivation process of each category of merge candidates is provided in this session. As done in HEVC, VVC also supports parallel derivation of the merging candidate lists for all CUs within a certain size of area.

2.1.2.1.1. Spatial Candidates Derivation

The derivation of spatial merge candidates in VVC is same to that in HEVC except the positions of first two merge candidates are swapped. A maximum of four merge candidates are selected among candidates located in the positions depicted in the FIG. 14. The order of derivation is B0, A0, B1, A1 and B2. Position B2 is considered only when one or more than one CUs of position B0, A0, B1, A1 are not available (e.g. because it belongs to another slice or tile) or is intra coded. After candidate at position A1 is added, the addition of the remaining candidates is subject to a redundancy check which ensures that candidates with same motion information are excluded from the list so that coding efficiency is improved. To reduce computational complexity, not all possible candidate pairs are considered in the mentioned redundancy check. Instead only the pairs linked with an arrow in FIG. 15 are considered and a candidate is only added to the list if the corresponding candidate used for redundancy check has not the same motion information.

In this step, only one candidate is added to the list. Particularly, in the derivation of this temporal merge candidate, a scaled motion vector is derived based on co-located CU belonging to the collocated reference picture. The reference picture list to be used for derivation of the co-located CU is explicitly signalled in the slice header. The scaled motion vector for temporal merge candidate is obtained as illustrated by the dotted line in FIG. 16, which is scaled from the motion vector of the co-located CU using the POC distances, tb and td, where tb is defined to be the POC difference between the reference picture of the current picture and the current picture and td is defined to be the POC difference between the reference picture of the co-located picture and the co-located picture. The reference picture index of temporal merge candidate is set equal to zero.

The position for the temporal candidate is selected between candidates C0 and C1, as depicted in FIG. 17. If CU at position C0 is not available, is intra coded, or is outside of the current row of CTUs, position C1 is used. Otherwise, position C0 is used in the derivation of the temporal merge candidate.

The history-based MVP (HMVP) merge candidates are added to merge list after the spatial MVP and TMVP. In this method, the motion information of a previously coded block is stored in a table and used as MVP for the current CU. The table with multiple HMVP candidates is maintained during the encoding/decoding process. The table is reset (emptied) when a new CTU row is encountered. Whenever there is a non-subblock inter-coded CU, the associated motion information is added to the last entry of the table as a new HMVP candidate.

The HMVP table size S is set to be 6, which indicates up to 6 History-based MVP (HMVP) candidates may be added to the table. When inserting a new motion candidate to the table, a constrained first-in-first-out (FIFO) rule is utilized wherein redundancy check is firstly applied to find whether there is an identical HMVP in the table. If found, the identical HMVP is removed from the table and all the HMVP candidates afterwards are moved forward.

HMVP candidates could be used in the merge candidate list construction process. The latest several HMVP candidates in the table are checked in order and inserted to the candidate list after the TMVP candidate. Redundancy check is applied on the HMVP candidates to the spatial or temporal merge candidate. To reduce the number of redundancy check operations, the following simplifications are introduced:

Pairwise average candidates are generated by averaging predefined pairs of candidates in the existing merge candidate list, and the predefined pairs are defined as {(0, 1), (0, 2), (1, 2), (0, 3), (1, 3), (2, 3)}, where the numbers denote the merge indices to the merge candidate list. The averaged motion vectors are calculated separately for each reference list. If both motion vectors are available in one list, these two motion vectors are averaged even when they point to different reference pictures; if only one motion vector is available, use the one directly; if no motion vector is available, keep this list invalid.

When the merge list is not full after pair-wise average merge candidates are added, the zero MVPs are inserted in the end until the maximum merge candidate number is encountered.

2.1.2.2. Merge Estimation Region

Merge estimation region (MER) allows independent derivation of merge candidate list for the CUs in the same merge estimation region (MER). A candidate block that is within the same MER to the current CU is not included for the generation of the merge candidate list of the current CU. In addition, the updating process for the history-based motion vector predictor candidate list is updated only if (xCb+cbWidth)>>Log2ParMrgLevel is greater than xCb>>Log2ParMrgLevel and (yCb+cbHeight)>>Log2ParMrgLevel is great than (yCb>>Log2ParMrgLevel) and where (xCb, yCb) is the top-left luma sample position of the current CU in the picture and (cbWidth, cbHeight) is the CU size. The MER size is selected at encoder side and signalled as log2_parallel_merge_level_minus2 in the sequence parameter set.

2.1.2.3. Merge Mode with MVD (MMVD)

In addition to merge mode, where the implicitly derived motion information is directly used for prediction samples generation of the current CU, the merge mode with motion vector differences (MMVD) is introduced in VVC. A MMVD flag is signalled right after sending a skip flag and merge flag to specify whether MMVD mode is used for a CU.

In MMVD, after a merge candidate is selected, it is further refined by the signalled MVDs information. The further information includes a merge candidate flag, an index to specify motion magnitude, and an index for indication of motion direction. In MMVD mode, one for the first two candidates in the merge list is selected to be used as MV basis. The merge candidate flag is signalled to specify which one is used.

Distance index specifies motion magnitude information and indicate the pre-defined offset from the starting point. As shown in FIG. 18, an offset is added to either horizontal component or vertical component of starting MV. The relation of distance index and pre-defined offset is specified in Table 5.

The relation of distance index and pre-defined offset

Direction index represents the direction of the MVD relative to the starting point. The direction index can represent of the four directions as shown in Table 6. It's noted that the meaning of MVD sign could be variant according to the information of starting MVs. When the starting MVs is an un-prediction MV or bi-prediction MVs with both lists point to the same side of the current picture (i.e. POCs of two references are both larger than the POC of the current picture, or are both smaller than the POC of the current picture), the sign in Table 6 specifies the sign of MV offset added to the starting MV. When the starting MVs is bi-prediction MVs with the two MVs point to the different sides of the current picture (i.e. the POC of one reference is larger than the POC of the current picture, and the POC of the other reference is smaller than the POC of the current picture), the sign in Table 6 specifies the sign of MV offset added to the list0 MV component of starting MV and the sign for the list1 MV has opposite value.

Sign of MV offset specified by direction index

In HEVC, the bi-prediction signal is generated by averaging two prediction signals obtained from two different reference pictures and/or using two different motion vectors. In VVC, the bi-prediction mode is extended beyond simple averaging to allow weighted averaging of the two prediction signals.

Five weights are allowed in the weighted averaging bi-prediction, w∈{−2, 3, 4, 5, 10}. For each bi-predicted CU, the weight w is determined in one of two ways: 1) for a non-merge CU, the weight index is signalled after the motion vector difference; 2) for a merge CU, the weight index is inferred from neighbouring blocks based on the merge candidate index. BCW is only applied to CUs with 256 or more luma samples (i.e., CU width times CU height is greater than or equal to 256). For low-delay pictures, all 5 weights are used. For non-low-delay pictures, only 3 weights (w∈{3,4,5}) are used.

The BCW weight index is coded using one context coded bin followed by bypass coded bins. The first context coded bin indicates if equal weight is used; and if unequal weight is used, additional bins are signalled using bypass coding to indicate which unequal weight is used.

Weighted prediction (WP) is a coding tool supported by the H.264/AVC and HEVC standards to efficiently code video content with fading. Support for WP was also added into the VVC standard. WP allows weighting parameters (weight and offset) to be signalled for each reference picture in each of the reference picture lists L0 and L1. Then, during motion compensation, the weight(s) and offset(s) of the corresponding reference picture(s) are applied. WP and BCW are designed for different types of video content. In order to avoid interactions between WP and BCW, which will complicate VVC decoder design, if a CU uses WP, then the BCW weight index is not signalled, and w is inferred to be 4 (i.e. equal weight is applied). For a merge CU, the weight index is inferred from neighbouring blocks based on the merge candidate index. This can be applied to both normal merge mode and inherited affine merge mode. For constructed affine merge mode, the affine motion information is constructed based on the motion information of up to 3 blocks. The BCW index for a CU using the constructed affine merge mode is simply set equal to the BCW index of the first control point MV.

In VVC, CIIP and BCW cannot be jointly applied for a CU. When a CU is coded with CIIP mode, the BCW index of the current CU is set to 2, e.g. equal weight.

The bi-directional optical flow (BDOF) tool is included in VVC. BDOF, previously referred to as BIO, was included in the JEM. Compared to the JEM version, the BDOF in VVC is a simpler version that requires much less computation, especially in terms of number of multiplications and the size of the multiplier. BDOF is used to refine the bi-prediction signal of a CU at the 4×4 subblock level. BDOF is applied to a CU if it satisfies all the following conditions:

BDOF is only applied to the luma component. As its name indicates, the BDOF mode is based on the optical flow concept, which assumes that the motion of an object is smooth. For each 4×4 subblock, a motion refinement (vx,vy) is calculated by minimizing the difference between the L0 and L1 prediction samples. The motion refinement is then used to adjust the bi-predicted sample values in the 4×4 subblock. The following steps are applied in the BDOF process.

First, the horizontal and vertical gradients, of the two prediction signals are computed by directly calculating the difference between two neighboring samples, i.e.,

where I(k)(i, j) are the sample value at coordinate (i, j) of the prediction signal in list k, k=0,1, and shift1 is calculated based on the luma bit depth, bitDepth, as shift1=max (6, bitDepth-6).

Then, the auto- and cross-correlation of the gradients, S1, S2, S3, S5 and S6, are calculated as

where

where Ω is a 6×6 window around the 4×4 subblock, and the values of na and nb are set equal to min(1, bitDepth−11) and min(4, bitDepth−8), respectively.

The motion refinement (vx,vy) is then derived using the cross- and auto-correlation terms using the following:

where

└·┘ is the floor function, and ns2=12. Based on the motion refinement and the gradients, the following adjustment is calculated for each sample in the 4×4 subblock:

Finally, the BDOF samples of the CU are calculated by adjusting the bi-prediction samples as follows:

These values are selected such that the multipliers in the BDOF process do not exceed 15-bit, and the maximum bit-width of the intermediate parameters in the BDOF process is kept within 32-bit.

In order to derive the gradient values, some prediction samples I(k)(i, j) in list k (k=0,1) outside of the current CU boundaries need to be generated. As depicted in FIG. 19, the BDOF in VVC uses one extended row/column around the CU's boundaries. In order to control the computational complexity of generating the out-of-boundary prediction samples, prediction samples in the extended area (white positions) are generated by taking the reference samples at the nearby integer positions (using floor ( ) operation on the coordinates) directly without interpolation, and the normal 8-tap motion compensation interpolation filter is used to generate prediction samples within the CU (gray positions). These extended sample values are used in gradient calculation only. For the remaining steps in the BDOF process, if any sample and gradient values outside of the CU boundaries are needed, they are padded (i.e. repeated) from their nearest neighbors.

When the width and/or height of a CU are larger than 16 luma samples, it will be split into subblocks with width and/or height equal to 16 luma samples, and the subblock boundaries are treated as the CU boundaries in the BDOF process. The maximum unit size for BDOF process is limited to 16×16. For each subblock, the BDOF process could skipped. When the SAD of between the initial L0 and L1 prediction samples is smaller than a threshold, the BDOF process is not applied to the subblock. The threshold is set equal to (8*W*(H>>1), where W indicates the subblock width, and H indicates subblock height. To avoid the additional complexity of SAD calculation, the SAD between the initial L0 and L1 prediction samples calculated in DVMR process is re-used here.

If BCW is enabled for the current block, i.e., the BCW weight index indicates unequal weight, then bi-directional optical flow is disabled. Similarly, if WP is enabled for the current block, i.e., the luma_weight_lx_flag is 1 for either of the two reference pictures, then BDOF is also disabled. When a CU is coded with symmetric MVD mode or CIIP mode, BDOF is also disabled.

In VVC, besides the normal unidirectional prediction and bi-directional prediction mode MVD signalling, symmetric MVD mode for bi-predictional MVD signalling is applied. In the symmetric MVD mode, motion information including reference picture indices of both list-0 and list-1 and MVD of list-1 are not signaled but derived.

The decoding process of the symmetric MVD mode is as follows:

FIG. 20 is an illustration for symmetrical MVD mode. When the symmetrical mode flag is true, only mvp_l0_flag, mvp_l1_flag and MVD0 are explicitly signaled. The reference indices for list-0 and list-1 are set equal to the pair of reference pictures, respectively. MVD1 is set equal to (−MVD0). The final motion vectors are shown in below formula.

In the encoder, symmetric MVD motion estimation starts with initial MV evaluation. A set of initial MV candidates comprising of the MV obtained from uni-prediction search, the MV obtained from bi-prediction search and the MVs from the AMVP list. The one with the lowest rate-distortion cost is chosen to be the initial MV for the symmetric MVD motion search.

2.1.2.7. Decoder Side Motion Vector Refinement (DMVR)

In order to increase the accuracy of the MVs of the merge mode, a bilateral-matching based decoder side motion vector refinement is applied in VVC. In bi-prediction operation, a refined MV is searched around the initial MVs in the reference picture list L0 and reference picture list L1. The BM method calculates the distortion between the two candidate blocks in the reference picture list L0 and list L1. As illustrated in FIG. 21, the SAD between the red blocks based on each MV candidate around the initial MV is calculated. The MV candidate with the lowest SAD becomes the refined MV and used to generate the bi-predicted signal.

In VVC, the DMVR can be applied for the CUs which are coded with following modes and features:

The refined MV derived by DMVR process is used to generate the inter prediction samples and also used in temporal motion vector prediction for future pictures coding. While the original MV is used in deblocking process and also used in spatial motion vector prediction for future CU coding.

The additional features of DMVR are mentioned in the following sub-clauses.

2.1.2.7.1. Searching Scheme

In DVMR, the search points are surrounding the initial MV and the MV offset obey the MV difference mirroring rule. In other words, any points that are checked by DMVR, denoted by candidate MV pair (MV0, MV1) obey the following two equations:

where MV_offset represents the refinement offset between the initial MV and the refined MV in one of the reference pictures. The refinement search range is two integer luma samples from the initial MV. The searching includes the integer sample offset search stage and fractional sample refinement stage.

25 points full search is applied for integer sample offset searching. The SAD of the initial MV pair is first calculated. If the SAD of the initial MV pair is smaller than a threshold, the integer sample stage of DMVR is terminated. Otherwise SADs of the remaining 24 points are calculated and checked in raster scanning order. The point with the smallest SAD is selected as the output of integer sample offset searching stage. To reduce the penalty of the uncertainty of DMVR refinement, it is proposed to favor the original MV during the DMVR process. The SAD between the reference blocks referred by the initial MV candidates is decreased by ¼ of the SAD value.

The integer sample search is followed by fractional sample refinement. To save the calculational complexity, the fractional sample refinement is derived by using parametric error surface equation, instead of additional search with SAD comparison. The fractional sample refinement is conditionally invoked based on the output of the integer sample search stage. When the integer sample search stage is terminated with center having the smallest SAD in either the first iteration or the second iteration search, the fractional sample refinement is further applied.

In parametric error surface based sub-pixel offsets estimation, the center position cost and the costs at four neighboring positions from the center are used to fit a 2-D parabolic error surface equation of the following form

where (xmin,ymin) corresponds to the fractional position with the least cost and C corresponds to the minimum cost value. By solving the above equations by using the cost value of the five search points, the (xmin,ymin) is computed as:

The value of xmin and ymin are automatically constrained to be between −8 and 8 since all cost values are positive and the smallest value is E(0,0). This corresponds to half peal offset with 1/16th-pel MV accuracy in VVC. The computed fractional (xmin,ymin) are added to the integer distance refinement MV to get the sub-pixel accurate refinement delta MV.

2.1.2.7.2. Bilinear-Interpolation and Sample Padding

In VVC, the resolution of the MVs is 1/16 luma samples. The samples at the fractional position are interpolated using a 8-tap interpolation filter. In DMVR, the search points are surrounding the initial fractional-pel MV with integer sample offset, therefore the samples of those fractional position need to be interpolated for DMVR search process. To reduce the calculation complexity, the bi-linear interpolation filter is used to generate the fractional samples for the searching process in DMVR. Another important effect is that by using bi-linear filter is that with 2-sample search range, the DVMR does not access more reference samples compared to the normal motion compensation process. After the refined MV is attained with DMVR search process, the normal 8-tap interpolation filter is applied to generate the final prediction. In order to not access more reference samples to normal MC process, the samples, which is not needed for the interpolation process based on the original MV but is needed for the interpolation process based on the refined MV, will be padded from those available samples.

2.1.2.7.3. Maximum DMVR Processing Unit

When the width and/or height of a CU are larger than 16 luma samples, it will be further split into subblocks with width and/or height equal to 16 luma samples. The maximum unit size for DMVR searching process is limit to 16×16.

2.1.2.8. Combined Inter and Intra Prediction (CIIP)

In VVC, when a CU is coded in merge mode, if the CU contains at least 64 luma samples (that is, CU width times CU height is equal to or larger than 64), and if both CU width and CU height are less than 128 luma samples, an additional flag is signalled to indicate if the combined inter/intra prediction (CIIP) mode is applied to the current CU. FIG. 22 shows top and left neighboring blocks used in CIIP weight derivation. As its name indicates, the CIIP prediction combines an inter prediction signal with an intra prediction signal. The inter prediction signal in the CIIP mode Pinter is derived using the same inter prediction process applied to regular merge mode; and the intra prediction signal Pintra is derived following the regular intra prediction process with the planar mode. Then, the intra and inter prediction signals are combined using weighted averaging, where the weight value is calculated depending on the coding modes of the top and left neighbouring blocks as follows:

The CIIP prediction is formed as follows:

Up to two additional predictors are signalled on top of inter AMVP mode, regular merge mode, and MMVD mode. The resulting overall prediction signal is accumulated iteratively with each additional prediction signal.

The weighting factor α is specified according to the following table:

For inter AMVP mode, MHP is only applied if non-equal weight in BCW is selected in bi-prediction mode.

When OBMC is applied, top and left boundary pixels of a CU are refined using neighboring block's motion information with a weighted prediction.

Conditions of not applying OBMC are as follows:

A subblock-boundary OBMC is performed by applying the same blending to the top, left, bottom, and right subblock boundary pixels using neighboring subblocks' motion information. It is enabled for the subblock based coding tools:

LIC is an inter prediction technique to model local illumination variation between current block and its prediction block as a function of that between current block template and reference block template. The parameters of the function can be denoted by a scale α and an offset β, which forms a linear equation, that is, α*p[x]+β to compensate illumination changes, where p[x] is a reference sample pointed to by MV at a location x on reference picture. When wrap around motion compensation is enabled, the MV shall be clipped with wrap around offset taken into consideration. Since α and β can be derived based on current block template and reference block template, no signaling overhead is required for them, except that an LIC flag is signaled for AMVP mode to indicate the use of LIC.

The local illumination compensation proposed in JVET-00066 is used for uni-prediction inter CUs with the following modifications.

In VVC, a geometric partitioning mode is supported for inter prediction. The geometric partitioning mode is signalled using a CU-level flag as one kind of merge mode, with other merge modes including the regular merge mode, the MMVD mode, the CIIP mode and the subblock merge mode. In total 64 partitions are supported by geometric partitioning mode for each possible CU size w×h=2m×2n with m, n∈{3 . . . 6} excluding 8×64 and 64×8.

When this mode is used, a CU is split into two parts by a geometrically located straight line (FIG. 23). The location of the splitting line is mathematically derived from the angle and offset parameters of a specific partition. Each part of a geometric partition in the CU is inter-predicted using its own motion; only uni-prediction is allowed for each partition, that is, each part has one motion vector and one reference index. The uni-prediction motion constraint is applied to ensure that same as the conventional bi-prediction, only two motion compensated prediction are needed for each CU.

If geometric partitioning mode is used for the current CU, then a geometric partition index indicating the partition mode of the geometric partition (angle and offset), and two merge indices (one for each partition) are further signalled. The number of maximum GPM candidate size is signalled explicitly in SPS and specifies syntax binarization for GPM merge indices. After predicting each of part of the geometric partition, the sample values along the geometric partition edge are adjusted using a blending processing with adaptive weights. This is the prediction signal for the whole CU, and transform and quantization process will be applied to the whole CU as in other prediction modes. Finally, the motion field of a CU predicted using the geometric partition modes is stored.

2.1.2.12.1. Uni-Prediction Candidate List Construction

The uni-prediction candidate list is derived directly from the merge candidate list constructed according to the extended merge prediction process. Denote n as the index of the uni-prediction motion in the geometric uni-prediction candidate list. The LX motion vector of the n-th extended merge candidate, with X equal to the parity of n, is used as the n-th uni-prediction motion vector for geometric partitioning mode. These motion vectors are marked with “x” in FIG. 24. In case a corresponding LX motion vector of the n-the extended merge candidate does not exist, the L(1−X) motion vector of the same candidate is used instead as the uni-prediction motion vector for geometric partitioning mode.

2.1.2.12.2. Blending Along the Geometric Partitioning Edge

FIG. 25 shows exemplified generation of a bending weight w0 using geometric partitioning mode. After predicting each part of a geometric partition using its own motion, blending is applied to the two prediction signals to derive samples around geometric partition edge. The blending weight for each position of the CU are derived based on the distance between individual position and the partition edge.

The distance for a position (x,y) to the partition edge are derived as:

where i, j are the indices for angle and offset of a geometric partition, which depend on the signaled geometric partition index. The sign of ρx,j and ρy,j depend on angle index i.

The weights for each part of a geometric partition are derived as following:

The partIdx depends on the angle index i. One example of weigh w0 is illustrated below.

2.1.2.12.3. Motion Field Storage for Geometric Partitioning Mode

Mv1 from the first part of the geometric partition, Mv2 from the second part of the geometric partition and a combined Mv of Mv1 and Mv2 are stored in the motion filed of a geometric partitioning mode coded CU. The stored motion vector type for each individual position in the motion filed are determined as:

where motionIdx is equal to d(4x+2, 4y+2). The partIdx depends on the angle index i.

If sType is equal to 0 or 1, Mv0 or Mv1 are stored in the corresponding motion field, otherwise if sType is equal to 2, a combined Mv from Mv0 and Mv2 are stored. The combined Mv are generated using the following process:

2.1.2.12.4. GPM with Inter and Intra Prediction (GPM Inter-Intra)

With the GPM inter-intra, pre-defined intra prediction modes against geometric partitioning line can be selected in addition to merge candidates for each non-rectangular split region in the GPM-applied CU. In the proposed method, whether intra or inter prediction mode is determined for each GPM-separated region with a flag from the encoder. When the inter prediction mode, a uni-prediction signal is generated by MVs from the merge candidate list. On the other hand, when the intra prediction mode, a uni-prediction signal is generated from the neighboring pixels for the intra prediction mode specified by an index from the encoder. The variation of the possible intra prediction modes is restricted by the geometric shapes. Finally, the two uni-prediction signals are blended with the same way of ordinary GPM.

2.1.3. Screen Content Coding Tools

Intra block copy (IBC) is a tool adopted in HEVC extensions on SCC. It is well known that it significantly improves the coding efficiency of screen content materials. Since IBC mode is implemented as a block level coding mode, block matching (BM) is performed at the encoder to find the optimal block vector (or motion vector) for each CU. Here, a block vector is used to indicate the displacement from the current block to a reference block, which is already reconstructed inside the current picture. The luma block vector of an IBC-coded CU is in integer precision. The chroma block vector rounds to integer precision as well. When combined with AMVR, the IBC mode can switch between 1-pel and 4-pel motion vector precisions. An IBC-coded CU is treated as the third prediction mode other than intra or inter prediction modes. The IBC mode is applicable to the CUs with both width and height smaller than or equal to 64 luma samples.

At the encoder side, hash-based motion estimation is performed for IBC. The encoder performs RD check for blocks with either width or height no larger than 16 luma samples. For non-merge mode, the block vector search is performed using hash-based search first. If hash search does not return valid candidate, block matching based local search will be performed.

In the hash-based search, hash key matching (32-bit CRC) between the current block and a reference block is extended to all allowed block sizes. The hash key calculation for every position in the current picture is based on 4×4 subblocks. For the current block of a larger size, a hash key is determined to match that of the reference block when all the hash keys of all 4×4 subblocks match the hash keys in the corresponding reference locations. If hash keys of multiple reference blocks are found to match that of the current block, the block vector costs of each matched reference are calculated and the one with the minimum cost is selected.

In block matching search, the search range is set to cover both the previous and current CTUs.

At CU level, IBC mode is signalled with a flag and it can be signaled as IBC AMVP mode or IBC skip/merge mode as follows:

2.1.3.1.1. IBC Reference Region

To reduce memory consumption and decoder complexity, the IBC in VVC allows only the reconstructed portion of the predefined area including the region of current CTU and some region of the left CTU. FIG. 26 illustrates the reference region of IBC Mode, where each block represents 64×64 luma sample unit.

Depending on the location of the current coding CU location within the current CTU, the following applies:

This restriction allows the IBC mode to be implemented using local on-chip memory for hardware implementations.

2.1.3.1.2. IBC Interaction with Other Coding Tools

The interaction between IBC mode and other inter coding tools in VVC, such as pairwise merge candidate, history based motion vector predictor (HMVP), combined intra/inter prediction mode (CIIP), merge mode with motion vector difference (MMVD), and geometric partitioning mode (GPM) are as follows:

Unlike in the HEVC screen content coding extension, the current picture is no longer included as one of the reference pictures in the reference picture list 0 for IBC prediction. The derivation process of motion vectors for IBC mode excludes all neighboring blocks in inter mode and vice versa. The following IBC design aspects are applied:

A virtual buffer concept is used to describe the allowable reference region for IBC prediction mode and valid block vectors. Denote CTU size as ctbSize, the virtual buffer, ibcBuf, has width being wIbcBuf=128×128/ctbSize and height hIbcBuf=ctbSize. For example, for a CTU size of 128×128, the size of ibcBuf is also 128×128; for a CTU size of 64×64, the size of ibcBuf is 256×64; and a CTU size of 32×32, the size of ibcBuf is 512×32.

The size of a VPDU is min(ctbSize, 64) in each dimension, Wv=min(ctbSize, 64).

The virtual IBC buffer, ibcBuf is maintained as follows.

After decoding a CU contains (x, y) relative to the top-left corner of the picture, set

For a block covering the coordinates (x, y), if the following is true for a block vector bv=(bv[0], bv[1]), then it is valid; otherwise, it is not valid:

2.1.3.2. Block Differential Pulse Coded Modulation (BDPCM)

VVC supports block differential pulse coded modulation (BDPCM) for screen content coding. At the sequence level, a BDPCM enable flag is signalled in the SPS; this flag is signalled only if the transform skip mode (described in the next section) is enabled in the SPS.

When BDPCM is enabled, a flag is transmitted at the CU level if the CU size is smaller than or equal to MaxTsSize by MaxTsSize in terms of luma samples and if the CU is intra coded, where MaxTsSize is the maximum block size for which the transform skip mode is allowed. This flag indicates whether regular intra coding or BDPCM is used. If BDPCM is used, a BDPCM prediction direction flag is transmitted to indicate whether the prediction is horizontal or vertical. Then, the block is predicted using the regular horizontal or vertical intra prediction process with unfiltered reference samples. The residual is quantized and the difference between each quantized residual and its predictor, i.e. the previously coded residual of the horizontal or vertical (depending on the BDPCM prediction direction) neighbouring position, is coded.

For a block of size M (height)×N (width), let ri,j, 0≤i≤M−1, 0≤j≤N−1 be the prediction residual. Let Q(ri,j), 0≤i≤M−1, 0≤j≤N−1 denote the quantized version of the residual ri,j. BDPCM is applied to the quantized residual values, resulting in a modified M×N array {tilde over (R)} with elements {tilde over (r)}i,j, where {tilde over (r)}i,j is predicted from its neighboring quantized residual value. For vertical BDPCM prediction mode, for 0≤j≤(N−1), the following is used to derive {tilde over (r)}i,j:

For horizontal BDPCM prediction mode, for 0≤i≤(M−1), the following is used to derive {tilde over (r)}i,j:

At the decoder side, the above process is reversed to compute Q−1(ri,j), 0≤i≤M−1, 0≤j≤N−1, as follows:

The inverse quantized residuals, Q−1(Q(ri,j)), are added to the intra block prediction values to produce the reconstructed sample values.

The predicted quantized residual values {tilde over (r)}i,j are sent to the decoder using the same residual coding process as that in transform skip mode residual coding. For lossless coding, if slice_ts_residual_coding_disabled_flag is set to 1, the quantized residual values are sent to the decoder using regular transform residual coding. In terms of the MPM mode for future intra mode coding, horizontal or vertical prediction mode is stored for a BDPCM-coded CU if the BDPCM prediction direction is horizontal or vertical, respectively. For deblocking, if both blocks on the sides of a block boundary are coded using BDPCM, then that particular block boundary is not deblocked.

2.1.3.3. Residual Coding for Transform Skip Mode

VVC allows the transform skip mode to be used for luma blocks of size up to MaxTsSize by MaxTsSize, where the value of MaxTsSize is signaled in the PPS and can be at most 32. When a CU is coded in transform skip mode, its prediction residual is quantized and coded using the transform skip residual coding process. This process is modified from the transform coefficient coding process. In transform skip mode, the residuals of a TU are also coded in units of non-overlapped subblocks of size 4×4. For better coding efficiency, some modifications are made to customize the residual coding process towards the residual signal's characteristics. The following summarizes the differences between transform skip residual coding and regular transform residual coding:

For each subblock, if the coded_subblock_flag is equal to 1 (i.e., there is at least one non-zero quantized residual in the subblock), coding of the quantized residual levels is performed in three scan passes (see FIG. 27):

The bins in scan passes #1 and #2 (the first scan pass and the greater-than-x scan pass) are context coded until the maximum number of context coded bins in the TU have been exhausted. The maximum number of context coded bins in a residual block is limited to 1.75*block_width*block_height, or equivalently, 1.75 context coded bins per sample position on average. The bins in the last scan pass (the remainder scan pass) are bypass coded. A variable, RemCcbs, is first set to the maximum number of context-coded bins for the block and is decreased by one each time a context-coded bin is coded. While RemCcbs is larger than or equal to four, syntax elements in the first coding pass, which includes the sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag and par_level_flag, are coded using context-coded bins. If RemCcbs becomes smaller than 4 while coding the first pass, the remaining coefficients that have yet to be coded in the first pass are coded in the remainder scan pass (pass #3).

After completion of first pass coding, if RemCcbs is larger than or equal to four, syntax elements in the second coding pass, which includes abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, and abs_level_gt9_flag, are coded using context coded bins. If the RemCcbs becomes smaller than 4 while coding the second pass, the remaining coefficients that have yet to be coded in the second pass are coded in the remainder scan pass (pass #3).

FIG. 27 illustrates the transform skip residual coding process. The star marks the position when context coded bins are exhausted, at which point all remaining bins are coded using bypass coding.

Further, for a block not coded in the BDPCM mode, a level mapping mechanism is applied to transform skip residual coding until the maximum number of context coded bins has been reached. Level mapping uses the top and left neighbouring coefficient levels to predict the current coefficient level in order to reduce signalling cost.

For a given residual position, denote absCoeff as the absolute coefficient level before mapping and absCoeffMod as the coefficient level after mapping. Let X0 denote the absolute coefficient level of the left neighbouring position and let X1 denote the absolute coefficient level of the above neighbouring position. The level mapping is performed as follows:

Then, the absCoeffMod value is coded as described above. After all context coded bins have been exhausted, level mapping is disabled for all remaining scan positions in the current block.

In VVC, the palette mode is used for screen content coding in all of the chroma formats supported in a 4:4:4 profile (that is, 4:4:4, 4:2:0, 4:2:2 and monochrome). When palette mode is enabled, a flag is transmitted at the CU level if the CU size is smaller than or equal to 64×64, and the amount of samples in the CU is greater than 16 to indicate whether palette mode is used. Considering that applying palette mode on small CUs introduces insignificant coding gain and brings extra complexity on the small blocks, palette mode is disabled for CU that are smaller than or equal to 16 samples. A palette coded coding unit (CU) is treated as a prediction mode other than intra prediction, inter prediction, and intra block copy (IBC) mode.

If the palette mode is utilized, the sample values in the CU are represented by a set of representative colour values. The set is referred to as the palette. For positions with sample values close to the palette colours, the palette indices are signalled. It is also possible to specify a sample that is outside the palette by signalling an escape symbol. For samples within the CU that are coded using the escape symbol, their component values are signalled directly using (possibly) quantized component values. This is illustrated in FIG. 28. The quantized escape symbol is binarized with fifth order Exp-Golomb binarization process (EG5).

For coding of the palette, a palette predictor is maintained. The palette predictor is initialized to 0 at the beginning of each slice for non-wavefront case. For WPP case, the palette predictor at the beginning of each CTU row is initialized to the predictor derived from the first CTU in the previous CTU row so that the initialization scheme between palette predictors and CABAC synchronization is unified. For each entry in the palette predictor, a reuse flag is signalled to indicate whether it is part of the current palette in the CU. The reuse flags are sent using run-length coding of zeros. After this, the number of new palette entries and the component values for the new palette entries are signalled. After encoding the palette coded CU, the palette predictor will be updated using the current palette, and entries from the previous palette predictor that are not reused in the current palette will be added at the end of the new palette predictor until the maximum size allowed is reached. An escape flag is signaled for each CU to indicate if escape symbols are present in the current CU. If escape symbols are present, the palette table is augmented by one and the last index is assigned to be the escape symbol.

In a similar way as the coefficient group (CG) used in transform coefficient coding, a CU coded with palette mode is divided into multiple line-based coefficient group, each consisting of m samples (i.e., m=16), where index runs, palette index values, and quantized colors for escape mode are encoded/parsed sequentially for each CG. Same as in HEVC, horizontal or vertical traverse scan can be applied to scan the samples, as shown in FIG. 29.

The encoding order for palette run coding in each segment is as follows: For each sample position, 1 context coded bin run_copy_flag=0 is signalled to indicate if the pixel is of the same mode as the previous sample position, i.e., if the previously scanned sample and the current sample are both of run type COPY_ABOVE or if the previously scanned sample and the current sample are both of run type INDEX and the same index value. Otherwise, run_copy_flag=1 is signaled. If the current sample and the previous sample are of different modes, one context coded bin copy_above_palette_indices_flag is signaled to indicate the run type, i.e., INDEX or COPY_ABOVE, of the current sample. Here, decoder doesn't have to parse run type if the sample is in the first row (horizontal traverse scan) or in the first column (vertical traverse scan) since the INDEX mode is used by default. With the same way, decoder doesn't have to parse run type if the previously parsed run type is COPY_ABOVE. After palette run coding of samples in one coding pass, the index values (for INDEX mode) and quantized escape colors are grouped and coded in another coding pass using CABAC bypass coding. Such separation of context coded bins and bypass coded bins can improve the throughput within each line CG.

For slices with dual luma/chroma tree, palette is applied on luma (Y component) and chroma (Cb and Cr components) separately, with the luma palette entries containing only Y values and the chroma palette entries containing both Cb and Cr values. For slices of single tree, palette will be applied on Y, Cb, Cr components jointly, i.e., each entry in the palette contains Y, Cb, Cr values, unless when a CU is coded using local dual tree, in which case coding of luma and chroma is handled separately. In this case, if the corresponding luma or choma blocks are coded using palette mode, their palette is applied in a way similar to the dual tree case (this is related to non-4:4:4 coding and will be further explained in 2.1.3.4.1).

For slices coded with dual tree, the maximum palette predictor size is 63, and the maximum palette table size for coding of the current CU is 31. For slices coded with dual tree, the maximum predictor and palette table sizes are halved, i.e., maximum predictor size is 31 and maximum table size is 15, for each of the luma palette and the chroma palette. For deblocking, the palette coded block on the sides of a block boundary is not deblocked.

2.1.3.4.1. Palette Mode for Non-4:4:4 Content

Palette mode in VVC is supported for all chroma formats in a similar manner as the palette mode in HEVC SCC. For non-4:4:4 content, the following customization is applied:

2.1.3.4.2. Encoder Algorithm for Palette Mode

At the encoder side, the following steps are used to produce the palette table of the current CU

Given the palette table of the current CU, the encoder selects the palette index of each sample position in the CU. For each sample position, the encoder checks the RD cost of all index values corresponding to the palette table entries, as well as the index representing the escape symbol, and selects the index with the smallest RD cost using the following equation:

After deciding the index map of the current CU, each entry in the palette table is checked to see if it is used by at least one sample position in the CU. Any unused palette entry will be removed.

After the index map of the current CU is decided, trellis RD optimization is applied to find the best values of run_copy_flag and run type for each sample position by comparing the RD cost of three options: same as the previously scanned position, run type COPY_ABOVE, or run type INDEX. When calculating the SAD values, sample values are scaled down to 8 bits, unless the CU is coded in lossless mode, in which case the actual input bit depth is used to calculate the SAD. Further, in the case of lossless coding, only rate is used in the rate-distortion optimization steps mentioned above (because lossless coding incurs no distortion).

2.1.3.5. Adaptive Color Transform

In HEVC SCC extension, adaptive color transform (ACT) was applied to reduce the redundancy between three color components in 444 chroma format. The ACT is also adopted into the VVC standard to enhance the coding efficiency of 444 chroma format coding. Same as in HEVC SCC, the ACT performs in-loop color space conversion in the prediction residual domain by adaptively converting the residuals from the input color space to YCgCo space. FIG. 30 illustrates the decoding flowchart with the ACT being applied. Two color spaces are adaptively selected by signaling one ACT flag at CU level. When the flag is equal to one, the residuals of the CU are coded in the YCgCo space; otherwise, the residuals of the CU are coded in the original color space. Additionally, same as the HEVC ACT design, for inter and IBc CUs, the ACT is only enabled when there is at least one non-zero coefficient in the CU. For intra CUs, the ACT is only enabled when chroma components select the same intra prediction mode of luma component, i.e., DM mode.

2.1.3.5.1. ACT Mode

In HEVC SCC extension, the ACT supports both lossless and lossy coding based on lossless flag (i.e., cu_transquant_bypass_flag). However, there is no flag signalled in the bitstream to indicate whether lossy or lossless coding is applied. Therefore, YCgCo-R transform is applied as ACT to support both lossy and lossless cases. The YCgCo-R reversible colour transform is shown as below.

GBR to YCgCo
YCgCo to GBR

Since the YCgCo-R transform are not normalized. To compensate the dynamic range change of residuals signals before and after color transform, the QP adjustments of (−5, 1, 3) are applied to the transform residuals of Y, Cg and C0 components, respectively. The adjusted quantization parameter only affects the quantization and inverse quantization of the residuals in the CU. For other coding processes (such as deblocking), original QP is still applied.

Additionally, because the forward and inverse color transforms need to access the residuals of all three components, the ACT mode is always disabled for separate-tree partition and ISP mode where the prediction block size of different color component is different. Transform skip (TS) and block differential pulse coded modulation (BDPCM), which are extended to code chroma residuals, are also enabled when the ACT is applied.

2.1.3.5.2. ACT Fast Encoding Algorithms

To avoid brutal R-D search in both the original and converted color spaces, the following fast encoding algorithms are applied in the VTM reference software to reduce the encoder complexity when the ACT is enabled.

Intra template matching prediction (IntraTM) is a special intra prediction mode that copies the best prediction block from the reconstructed part of the current frame, whose L-shaped template matches the current template. For a predefined search range, the encoder searches for the most similar template to the current template in a reconstructed part of the current frame and uses the corresponding block as a prediction block. The encoder then signals the usage of this mode, and the same prediction operation is performed at the decoder side. The prediction signal is generated by matching the L-shaped causal neighbor of the current block with another block in a predefined search area in FIG. 31 consisting of:

SAD is used as a cost function.

Within each region, the decoder searches for the template that has least SAD with respect to the current one and uses its corresponding block as a prediction block.

The dimensions of all regions (SearchRange_w, SearchRange_h) are set proportional to the block dimension (BlkW, BlkH) to have a fixed number of SAD comparisons per pixel. That is:

where ‘a’ is a constant that controls the gain/complexity trade-off. In practice, ‘a’ is equal to 5.

The Intra template matching tool is enabled for CUs with size less than or equal to 64 in width and height. This maximum CU size for Intra template matching is configurable.

The Intra template matching prediction mode is signaled at CU level through a dedicated flag when DIMD is not used for current CU.

2.1.3.6.1. Using Block Vector Derived from IntraTMP for IBC

Block vector (BV) derived from the intra template matching prediction (IntraTMP) is used for intra block copy (IBC). The stored IntraTMP BV of the neighboring blocks along with IBC BV are used as spatial BV candidates in IBC candidate list construction.

2.1.3.6.2. Direct Block Vector (DBV) Mode for Chroma Prediction

For chroma components, when chroma dual tree is activated in intra slice, if one of the luma blocks (the five locations) is coded with MODE_IBC, its block vector bvL is used and scaled to derive chroma block vector bvC. The scaling factor depends on the chroma format sampling structure.

Then, by using the position of the current chroma block (xCb, yCb) and its bvC, the corresponding offset position (xCb+bvC[0], yCb+bvC[1]) is determined, and a block copying prediction is performed. FIG. 32 shows the five locations in reconstructed luma samples. FIG. 33 shows the prediction process of DBV mode. A CU level flag is signaled to indicate whether the proposed DBV mode is applied as shown in Table 7.

The binarization process for intra—

chroma_pred_mode in the proposed method

intra_chroma_pred_mode
bin string
chroma intra mode

2.1.4. Transform and Quantization

In VVC, large block-size transforms, up to 64×64 in size, are enabled, which is primarily useful for higher resolution video, e.g., 1080p and 4K sequences. High frequency transform coefficients are zeroed out for the transform blocks with size (width or height, or both width and height) equal to 64, so that only the lower-frequency coefficients are retained. For example, for an M×N transform block, with M as the block width and N as the block height, when M is equal to 64, only the left 32 columns of transform coefficients are kept. Similarly, when N is equal to 64, only the top 32 rows of transform coefficients are kept. When transform skip mode is used for a large block, the entire block is used without zeroing out any values. In addition, transform shift is removed in transform skip mode. The VTM also supports configurable max transform size in SPS, such that encoder has the flexibility to choose up to 32-length or 64-length transform size depending on the need of specific implementation.

2.1.4.2. Multiple Transform Selection (MTS) for Core Transform

In addition to DCT-II which has been employed in HEVC, a Multiple Transform Selection (MTS) scheme is used for residual coding both inter and intra coded blocks. It uses multiple selected transforms from the DCT8/DST7. The newly introduced transform matrices are DST-VII and DCT-VIII. Table 8 shows the basis functions of the selected DST/DCT.

Transform basis functions of DCT-II/VIII and DSTVII for N-point input

In order to keep the orthogonality of the transform matrix, the transform matrices are quantized more accurately than the transform matrices in HEVC. To keep the intermediate values of the transformed coefficients within the 16-bit range, after horizontal and after vertical transform, all the coefficients are to have 10-bit.

In order to control MTS scheme, separate enabling flags are specified at SPS level for intra and inter, respectively. When MTS is enabled at SPS, a CU level flag is signalled to indicate whether MTS is applied or not. Here, MTS is applied only for luma. The MTS signaling is skipped when one of the below conditions is applied.

If MTS CU flag is equal to zero, then DCT2 is applied in both directions. However, if MTS CU flag is equal to one, then two other flags are additionally signalled to indicate the transform type for the horizontal and vertical directions, respectively. Transform and signalling mapping table as shown in Table 9. Unified the transform selection for ISP and implicit MTS is used by removing the intra-mode and block-shape dependencies. If current block is ISP mode or if the current block is intra block and both intra and inter explicit MTS is on, then only DST7 is used for both horizontal and vertical transform cores. When it comes to transform matrix precision, 8-bit primary transform cores are used. Therefore, all the transform cores used in HEVC are kept as the same, including 4-point DCT-2 and DST-7, 8-point, 16-point and 32-point DCT-2. Also, other transform cores including 64-point DCT-2, 4-point DCT-8, 8-point, 16-point, 32-point DST-7 and DCT-8, use 8-bit primary transform cores.

Transform and signalling mapping table

flag
flag
flag
Horizontal
Vertical

To reduce the complexity of large size DST-7 and DCT-8, High frequency transform coefficients are zeroed out for the DST-7 and DCT-8 blocks with size (width or height, or both width and height) equal to 32. Only the coefficients within the 16×16 lower-frequency region are retained.

As in HEVC, the residual of a block can be coded with transform skip mode. To avoid the redundancy of syntax coding, the transform skip flag is not signalled when the CU level MTS_CU_flag is not equal to zero. Note that implicit MTS transform is set to DCT2 when LFNST or MIP is activated for the current CU. Also the implicit MTS can be still enabled when MTS is enabled for inter coded blocks.

In VVC, LFNST is applied between forward primary transform and quantization (at encoder) and between de-quantization and inverse primary transform (at decoder side). In LFNST, 4×4 non-separable transform or 8×8 non-separable transform is applied according to block size. For example, 4×4 LFNST is applied for small blocks (i.e., min(width, height)<8) and 8×8 LFNST is applied for larger blocks (i.e., min(width, height)>4). FIG. 34 shows Low-Frequency Non-Separable Transform (LFNST) process.

Application of a non-separable transform, which is being used in LFNST, is described as follows using input as an example. To apply 4×4 LFNST, the 4×4 input block X

is first represented as a vector :

The non-separable transform is calculated as =T·, where  indicates the transform coefficient vector, and T is a 16×16 transform matrix. The 16×1 coefficient vector  is subsequently re-organized as 4×4 block using the scanning order for that block (horizontal, vertical or diagonal). The coefficients with smaller index will be placed with the smaller scanning index in the 4×4 coefficient block.

LFNST (low-frequency non-separable transform) is based on direct matrix multiplication approach to apply non-separable transform so that it is implemented in a single pass without multiple iterations. However, the non-separable transform matrix dimension needs to be reduced to minimize computational complexity and memory space to store the transform coefficients. Hence, reduced non-separable transform (or RST) method is used in LFNST. The main idea of the reduced non-separable transform is to map an N (N is commonly equal to 64 for 8×8 NSST) dimensional vector to an R dimensional vector in a different space, where N/R (R<N) is the reduction factor. Hence, instead of N×N matrix, RST matrix becomes an R×N matrix as follows:

where the R rows of the transform are R bases of the N dimensional space. The inverse transform matrix for RT is the transpose of its forward transform. For 8×8 LFNST, a reduction factor of 4 is applied, and 64×64 direct matrix, which is conventional 8×8 non-separable transform matrix size, is reduced to 16×48 direct matrix. Hence, the 48×16 inverse RST matrix is used at the decoder side to generate core (primary) transform coefficients in 8×8 top-left regions. When 16×48 matrices are applied instead of 16×64 with the same transform set configuration, each of which takes 48 input data from three 4×4 blocks in a top-left 8×8 block excluding right-bottom 4×4 block. With the help of the reduced dimension, memory usage for storing all LFNST matrices is reduced from 10 KB to 8 KB with reasonable performance drop. In order to reduce complexity LFNST is restricted to be applicable only if all coefficients outside the first coefficient sub-group are non-significant. Hence, all primary-only transform coefficients have to be zero when LFNST is applied. This allows a conditioning of the LFNST index signalling on the last-significant position, and hence avoids the extra coefficient scanning in the current LFNST design, which is needed for checking for significant coefficients at specific positions only. The worst-case handling of LFNST (in terms of multiplications per pixel) restricts the non-separable transforms for 4×4 and 8×8 blocks to 8×16 and 8×48 transforms, respectively. In those cases, the last-significant scan position has to be less than 8 when LFNST is applied, for other sizes less than 16. For blocks with a shape of 4×N and N×4 and N>8, the proposed restriction implies that the LFNST is now applied only once, and that to the top-left 4×4 region only. As all primary-only coefficients are zero when LFNST is applied, the number of operations needed for the primary transforms is reduced in such cases. From encoder perspective, the quantization of coefficients is remarkably simplified when LFNST transforms are tested. A rate-distortion optimized quantization has to be done at maximum for the first 16 coefficients (in scan order), the remaining coefficients are enforced to be zero.

There are totally 4 transform sets and 2 non-separable transform matrices (kernels) per transform set are used in LFNST. The mapping from the intra prediction mode to the transform set is pre-defined as shown in Table 10. If one of three CCLM modes (INTRA_LT_CCLM, INTRA_T_CCLM or INTRA_L_CCLM) is used for the current block (81<=predModeIntra<=83), transform set 0 is selected for the current chroma block. For each transform set, the selected non-separable secondary transform candidate is further specified by the explicitly signalled LFNST index. The index is signalled in a bit-stream once per Intra CU after transform coefficients.

Transform selection table

2.1.4.3.3. LFNST Index Signaling and Interaction with Other Tools

Since LFNST is restricted to be applicable only if all coefficients outside the first coefficient sub-group are non-significant, LFNST index coding depends on the position of the last significant coefficient. In addition, the LFNST index is context coded but does not depend on intra prediction mode, and only the first bin is context coded. Furthermore, LFNST is applied for intra CU in both intra and inter slices, and for both Luma and Chroma. If a dual tree is enabled, LFNST indices for Luma and Chroma are signaled separately. For inter slice (the dual tree is disabled), a single LFNST index is signaled and used for both Luma and Chroma.

Considering that a large CU greater than 64×64 is implicitly split (TU tiling) due to the existing maximum transform size restriction (64×64), an LFNST index search could increase data buffering by four times for a certain number of decode pipeline stages. Therefore, the maximum size that LFNST is allowed is restricted to 64×64. Note that LFNST is enabled with DCT2 only. The LFNST index signaling is placed before MTS index signaling.

The use of scaling matrices for perceptual quantization is not evident that the scaling matrices that are specified for the primary matrices may be useful for LFNST coefficients. Hence, the uses of the scaling matrices for LFNST coefficients are not allowed. For single-tree partition mode, chroma LFNST is not applied.

In VTM, subblock transform is introduced for an inter-predicted CU. In this transform mode, only a sub-part of the residual block is coded for the CU. When inter-predicted CU with cu_cbf equal to 1, cu_sbt_flag may be signaled to indicate whether the whole residual block or a sub-part of the residual block is coded. In the former case, inter MTS information is further parsed to determine the transform type of the CU. In the latter case, a part of the residual block is coded with inferred adaptive transform and the other part of the residual block is zeroed out.

When SBT is used for an inter-coded CU, SBT type and SBT position information are signaled in the bitstream. There are two SBT types and two SBT positions, as indicated in FIG. 35. For SBT-V (or SBT-H), the TU width (or height) may equal to half of the CU width (or height) or ¼ of the CU width (or height), resulting in 2:2 split or 1:3/3:1 split. The 2:2 split is like a binary tree (BT) split while the 1:3/3:1 split is like an asymmetric binary tree (ABT) split. In ABT splitting, only the small region contains the non-zero residual. If one dimension of a CU is 8 in luma samples, the 1:3/3:1 split along that dimension is disallowed. There are at most 8 SBT modes for a CU.

Position-dependent transform core selection is applied on luma transform blocks in SBT-V and SBT-H (chroma TB always using DCT-2). The two positions of SBT-H and SBT-V are associated with different core transforms. More specifically, the horizontal and vertical transforms for each SBT position is specified in FIG. 35. For example, the horizontal and vertical transforms for SBT-V position 0 is DCT-8 and DST-7, respectively. When one side of the residual TU is greater than 32, the transform for both dimensions is set as DCT-2. Therefore, the subblock transform jointly specifies the TU tiling, cbf, and horizontal and vertical core transform type of a residual block.

The SBT is not applied to the CU coded with combined inter-intra mode.

2.1.4.5. Maximum Transform Size and Zeroing-Out of Transform Coefficients

Both CTU size and maximum transform size (i.e., all MTS transform kernels) are extended to 256, where the maximum intra coded block can have a size of 128×128. The maximum CTU size is set to 256 for UHD sequences and it is set to 128, otherwise. In the primary transformation process, there is no normative zeroing out operation applied on transform coefficients. However, if LFNST is applied, the primary transform coefficients outside the LFNST region are normatively zeroed-out.

2.1.4.6. Enhanced MTS for Intra Coding

In the current VVC design [1], for MTS, only DST7 and DCT8 transform kernels are utilized which are used for intra and inter coding.

Additional primary transforms including DCT5, DST4, DST1, and identity transform (IDT) are employed. Also MTS set is made dependent on the TU size and intra mode information. 16 different TU sizes are considered, and for each TU size 5 different classes are considered depending on intra-mode information. For each class, 4 different transform pairs are considered, the same as that of VVC. Note, although a total of 80 different classes are considered, some of those different classes often share exactly same transform set. So there are 58 (less than 80) unique entries in the resultant LUT.

For angular modes, a joint symmetry over TU shape and intra prediction is considered. So, a mode i (i>34) with TU shape A×B will be mapped to the same class corresponding to the mode j=(68−i) with TU shape B×A. However, for each transform pair the order of the horizontal and vertical transform kernel is swapped. For example, for a 16×4 block with mode 18 (horizontal prediction) and a 4×16 block with mode 50 (vertical prediction) are mapped to the same class. However, the vertical and horizontal transform kernels are swapped. For the wide-angle modes the nearest conventional angular mode is used for the transform set determination. For example, mode 2 is used for all the modes between −2 and −14. Similarly, mode 66 is used for mode 67 to mode 80.

MTS index [0,3] is signalled with 2 bit fixed-length coding.

2.1.4.7. Secondary Transformation: LFNST Extension with Large Kernel

The LFNST design in VVC is extended as follows:

The kernel dimensions are specified by:

The forward LFNST is applied to top-left low frequency region, which is called Region-Of-Interest (ROI). When LFNST is applied, primary-transformed coefficients that exist in the region other than ROI are zeroed out, which is not changed from the VVC standard.

The ROI for LFNST16 is depicted in FIG. 36. It consists of six 4×4 sub-blocks, which are consecutive in scan order. Since the number of input samples is 96, transform matrix for forward LFNST16 can be R×96. R is chosen to be 32 in this contribution, 32 coefficients (two 4×4 sub-blocks) are generated from forward LFNST16 accordingly, which are placed following coefficient scan order.

The ROI for LFNST8 is shown in FIG. 37. The forward LFNST8 matrix can be R×64 and R is chosen to be 32.

The generated coefficients are located in the same manner as with LFNST16.

The mapping from intra prediction modes to these sets is shown in below table,

Mapping of intra prediction modes to LFNST set index

2.1.4.8. Non-Separable Primary Transform for Intra Coding (NSPT)

DCT-II+LFNST is replaced by NSPT for the block sizes 4×4, 4×8, 8×4 and 8×8. The NSPTs follows the design of LFNST, i.e. 3 candidates and 35 sets, chosen based on the intra mode. The kernel sizes are as follows:

2.1.4.9. Sign Prediction

The basic idea of the coefficient sign prediction method (JVET-D0031 and JVET-J0021) is to calculate reconstructed residual for both negative and positive sign combinations for applicable transform coefficients and select the hypothesis that minimizes a cost function.

To derive the best sign, the cost function is defined as discontinuity measure across block boundary shown on FIG. 38. It is measured for all hypotheses, and the one with the smallest cost is selected as a predictor for coefficient signs.

The cost function is defined as a sum of absolute second derivatives in the residual domain for the above row and left column as follows:

where R is reconstructed neighbors, P is prediction of the current block, and r is the residual hypothesis. The term (−R−1+2R0−P1) can be calculated only once per block and only residual hypothesis is subtracted.

In ECM-7.0, OBMC may be applied to inter coded blocks, no matter it is inter AMVP coded or inter MERGE coded. For inter AMVP coded blocks, a syntax flag may be signaled at block level, indicating whether OBMC is applied. For inter MERGE coded blocks, it is implicitly inferred that OBMC is applied regardless the block characteristics and neighbor blocks' coding information. However, there might be a case that some inter MERGE coded blocks don't prefer OBMC mode. For example, blocks contain sharp edges, or few gradients, or few colors may not prefer OBMC mode.

Block level adaptive OBMC which considers the prediction modes of neighboring blocks may bring higher coding gain.

4. Detailed Solutions

The detailed solutions below should be considered as examples to explain general concepts. These solutions should not be interpreted in a narrow way. Furthermore, these solutions can be combined in any manner.

The terms ‘video unit’ or ‘coding unit’ or ‘block’ may represent a coding tree block (CTB), a coding tree unit (CTU), a coding block (CB), a CU, a PU, a TU, a PB, a TB.

It is noted that the terminologies mentioned below are not limited to the specific ones defined in existing standards. Any variance of the coding tool is also applicable.

FIG. 39 illustrates a flowchart of a method 3900 for video processing in accordance with embodiments of the present disclosure. The method 3900 is implemented during a conversion between a target video block of a video and a bitstream of the video.

At block 3910, for a conversion between a video unit of a video and a bitstream of the video, whether an overlap subblock based motion compensation (OBMC) is applied to a current block of the video unit is determined based on at least one of: sample values of samples inside the current block, sample values of samples neighboring to the current block, template costs, or motion vector precision of the current block. In some embodiments, the current block is inter merge coded. Alternatively, the current block is inter advanced motion vector prediction (AMVP) coded.

At block 3920, the conversion is performed based on the determining. In some embodiments, the conversion may include encoding the video unit from the bitstream. Alternatively, or in addition, the conversion may include decoding the video unit from the bitstream. In this way, block level adaptive OBMC which considers the block characteristics based on the already decoded information may bring higher coding gain and improve coding efficiency.

In some embodiments, whether OBMC is applied to the current block is based on a first non-blended template cost and a second blended template cost. In some embodiments, the first non-blended template cost is determined based on a sum of absolute differences (SAD) between a current template and a reference template. In some embodiments, the reference template is identified by adding a current motion vector to a position of the current template.

In some embodiments, the second blended template cost is determined based on a SAD between a current template and a blended reference template. In some embodiments, the blended reference template is generated by blending a template identified by a current motion vector and a template identified by a neighbor motion vector.

In some embodiments, if the first non-blended template cost is smaller, the OBMC is applied to the current block. In some other embodiments, if the second blended template cost is smaller, the OBMC is applied to the current block.

In some embodiments, whether the OBMC is applied to the current block is based on prediction samples of the current block before the OBMC is applied. In some embodiments, whether the OBMC is applied to the current block is based on prediction samples neighboring to the current block. In some embodiments, whether the OBMC is applied to the current block is based on reconstruction sample neighboring to the current block.

In some embodiments, whether the OBMC is applied to the current block is based on at least one of: gradients of samples inside the current block, directions of samples inside the current block, angles of samples inside the current block, histogram of gradients of samples inside the current block, histogram of directions of samples inside the current block, histogram of angles of samples inside the current block, gradients of samples neighboring to the current block, directions of samples neighboring to the current block, angles of samples neighboring to the current block, histogram of gradients of samples neighboring to the current block, histogram of directions of samples neighboring to the current block, or histogram of angles of samples neighboring to the current block.

In some embodiments, current prediction samples before the OBMC are used to determine whether the OBMC is applied to the current block. In some embodiments, neighbor reconstruction samples are used to determine whether the OBMC is applied to the current block.

In some embodiments, the histogram of at least one of: gradients, directions or angles is determined based on counting gradients along target directions or angles. In some embodiments, the target directions or angles are pre-defined. Alternatively, the target directions or angles are based on directions of intra prediction angular modes in video coding.

In some embodiments, for a target direction or angle, a gradient amplitude is determined based on counting gradients or amplitudes of the gradients of at least one sample in the current block. In some embodiments, a gradient or an amplitude of the gradient at a target position (for example, center) in the current block is counted.

In some embodiments, a gradient or an amplitude of the gradient at a series of target positions in the current block is counted. In some embodiments, gradients or the amplitudes of the gradients of all samples in the current block are counted. In some embodiments, gradients or the amplitudes of the gradients of all samples except first row, last row, first column, last column samples in the current block are counted.

In some embodiments, for a target direction or angle, a gradient amplitude is determined based on counting gradients or the amplitudes of the gradients of at least one sample neighboring to the current block. In some embodiments, a gradient or the amplitude of the gradient at target position neighboring to the current block is counted. In some embodiments, gradients or the amplitudes of the gradients of all samples neighboring to the current block are counted. In some embodiments, the samples are on left and/or top of the current block.

In some embodiments, the histogram of at least one of: gradients, directions, angles is determined based on dividing an entire range of directions or angles into a series of intervals or bins. In some embodiments, the histogram of at least one of: gradients, directions, angles is determined based on counting gradients or amplitudes of the gradients in each interval or each bin or each direction or each angle.

In some embodiments, whether the OBMC is applied to the current block is based on at least one of: colors of samples inside the current block, luminance of samples inside the current block, intensity of samples inside the current block, histogram of colors of samples inside the current block, histogram of luminance of samples inside the current block, histogram of intensity of samples inside the current block, colors of samples neighboring to the current block, luminance of samples neighboring to the current block, intensity of samples neighboring to the current block, histogram of colors of samples neighboring to the current block, histogram of luminance of samples neighboring to the current block, or histogram of intensity of samples neighboring to the current block.

In some embodiments, current prediction samples before the OBMC are used to determine whether the OBMC is applied to the current block. In some embodiments, neighboring reconstruction samples are used to determine whether the OBMC is applied to the current block.

In some embodiments, the histogram of at least one of: colors, luminance, or intensity is determined based on counting sample values in at least one of: Y, U or V component domain. Alternatively, or in addition, the histogram of at least one of: colors, luminance, or intensity is determined based on counting sample values in at least one of: R, G or B component domain.

In some embodiments, sample values at a series of target positions in the current block are counted. In some embodiments, sample values of all samples in the current block are counted.

In some embodiments, sample values at target positions neighboring to the current block are counted. In some embodiments, sample values of all samples neighboring to the current block are counted. In some embodiments, the samples are on left and/or top of the current block.

In some embodiments, the histogram of colors is determined based on dividing an entire range of colors into a series of intervals or bins. Alternatively, or in addition, the histogram of luminance is determined based on dividing an entire range of luminance into a series of intervals or bins. Alternatively, or in addition, the histogram of intensity is determined based on dividing an entire range of intensity into a series of intervals or bins. In some embodiments, the histogram of at least one of: colors, luminance, or intensity is determined based on counting the number of samples in each interval or bin.

In some embodiments, whether the OBMC is applied to the current block is based on at least one of: the number of main gradients of samples inside the current block, the number of main directions of samples inside the current block, the number of main angles of samples inside the current block, the number of main colors of samples inside the current block, the number of main luminance of samples inside the current block, the number of main intensity of samples inside the current block, the number of main gradients of samples neighboring to the current block, the number of main directions of samples neighboring to the current block, the number of main angles of samples neighboring to the current block, the number of main colors of samples neighboring to the current block, the number of main luminance of samples neighboring to the current block, or the number of main intensity of samples neighboring to the current block.

In some embodiments, the number of at least one of: main gradients, directions, angles, colors, luminance or intensity is determined based on prediction samples inside the current block before the OBMC is applied. In some embodiments, the number of at least one of: main gradients, directions, angles, colors, luminance or intensity is determined based on reconstruction samples neighboring to the current block.

In some embodiments, at least one of: the main gradients, directions, angles, colors, luminance, or intensity is derived based on the histogram of at least one of: gradients, directions, angles, colors, luminance, or intensity. In some embodiments, at least one of: the main gradients, directions, angles, colors, luminance, or intensity is derived based on how many intervals or bins in the histogram show values greater than a threshold.

In some embodiments, at least one of: the main gradients, directions, angles, colors, luminance, or intensity is derived based on how many intervals or bins in the histogram provide greater values (e.g., gradient amplitudes, color values, luminance values) than the values of other intervals or bins.

In some embodiments, the values of intervals or bins in the histogram are sorted. In some embodiments, if Xi>=a*(Xi+1), then the intervals or bins from 0 to i may be treated as main gradients, where a denotes a scale factor, the values after sorting are represented by X0, X1, X2 . . . , Xn-2, Xn-1, n intervals/bins are included in the histogram. In some embodiments, a is equal to a constant between 2 and 20. For example, the values of intervals/bins in the histogram may be sorted firstly-assume the values after sorting (e.g., from large to small) are represented by X0, X1, X2 . . . , Xn-2, Xn-1, where n intervals/bins are included in the histogram—if Xi>=a*(Xi+1), then the intervals/bins from 0 to i may be treated as main gradients, where a denotes a scale factor (e.g., a may be equal to a constant between 2 and 20).

In some embodiments, if the number of at least one of: main gradients, directions, angles, colors, luminance, or intensity is less than a threshold number, the OBMC is not applied to the current block. In some embodiments, the threshold number is one of: 1, 2, 3, 4, 5, 6, 7, 8, or 9.

In some embodiments, whether the OBMC is applied to the current block is based on whether motion vectors of the current block are integer precision motion vectors. In some embodiments, whether the OBMC is applied to the current block is based on whether motion vector differences of the current block are integer precision motion vector differences.

In some embodiments, an indication of whether to and/or how to determine whether the OBMC is applied to the current block is indicated at one of the followings: sequence level, group of pictures level, picture level, slice level, or tile group level. In some embodiments, an indication of whether to and/or how to determine whether the OBMC is applied to the current block is indicated in one of the following: a sequence header, a picture header, a sequence parameter set (SPS), a video parameter set (VPS), a decoding parameter set (DPS), a decoding capability information (DCI), a picture parameter set (PPS), an adaptation parameter sets (APS), a slice header, or a tile group header. In some embodiments, an indication of whether to and/or how to determine whether the OBMC is applied to the current block is included in one of the following: a prediction block (PB), a transform block (TB), a coding block (CB), a prediction unit (PU), a transform unit (TU), a coding unit (CU), a virtual pipeline data unit (VPDU), a coding tree unit (CTU), a CTU row, a slice, a tile, a sub-picture, or a region containing more than one sample or pixel.

In some embodiments, the method 3900 further comprises: determining, based on coded information of the video unit, whether and/or how to determine whether the OBMC is applied to the current block, the coded information including at least one of: a block size, a colour format, a single and/or dual tree partitioning, a colour component, a slice type, or a picture type.

According to further embodiments of the present disclosure, a non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video which is generated by a method performed by an apparatus for video processing. The method comprises: determining whether an overlap subblock based motion compensation (OBMC) is applied to a current block of a video unit of the video based on at least one of: sample values of samples inside the current block, sample values of samples neighboring to the current block, template costs, or motion vector precision of the current block; and generating the bitstream based on the determining.

According to still further embodiments of the present disclosure, a method for storing bitstream of a video is provided. The method comprises: determining whether an overlap subblock based motion compensation (OBMC) is applied to a current block of a video unit of the video based on at least one of: sample values of samples inside the current block, sample values of samples neighboring to the current block, template costs, or motion vector precision of the current block; generating the bitstream based on the determining; and storing the bitstream in a non-transitory computer-readable medium.

Implementations of the present disclosure can be described in view of the following clauses, the features of which can be combined in any reasonable manner.

Clause 1. A method of video processing, comprising: determining, for a conversion between a video unit of a video and a bitstream of the video, whether an overlap subblock based motion compensation (OBMC) is applied to a current block of the video unit based on at least one of: sample values of samples inside the current block, sample values of samples neighboring to the current block, template costs, or motion vector precision of the current block; and performing the conversion based on the determining.

Clause 2. The method of clause 1, wherein the current block is inter merge coded, or the current block is inter advanced motion vector prediction (AMVP) coded.

Clause 3. The method of clause 1 or 2, wherein whether OBMC is applied to the current block is based on a first non-blended template cost and a second blended template cost.

Clause 4. The method of clause 3, wherein the first non-blended template cost is determined based on a sum of absolute differences (SAD) between a current template and a reference template.

Clause 5. The method of clause 4, wherein the reference template is identified by adding a current motion vector to a position of the current template.

Clause 6. The method of clause 3, wherein the second blended template cost is determined based on a SAD between a current template and a blended reference template.

Clause 7. The method of clause 6, wherein the blended reference template is generated by blending a template identified by a current motion vector and a template identified by a neighbor motion vector.

Clause 8. The method of clause 3, wherein if the first non-blended template cost is smaller, the OBMC is applied to the current block.

Clause 9. The method of clause 3, wherein if the second blended template cost is smaller, the OBMC is applied to the current block.

Clause 10. The method of clause 1 or 2, wherein whether the OBMC is applied to the current block is based on prediction samples of the current block before the OBMC is applied.

Clause 11. The method of clause 1 or 2, wherein whether the OBMC is applied to the current block is based on prediction samples neighboring to the current block.

Clause 12. The method of clause 1 or 2, wherein whether the OBMC is applied to the current block is based on reconstruction sample neighboring to the current block.

Clause 13. The method of clause 1 or 2, wherein whether the OBMC is applied to the current block is based on at least one of: gradients of samples inside the current block, directions of samples inside the current block, angles of samples inside the current block, histogram of gradients of samples inside the current block, histogram of directions of samples inside the current block, histogram of angles of samples inside the current block, gradients of samples neighboring to the current block, directions of samples neighboring to the current block, angles of samples neighboring to the current block, histogram of gradients of samples neighboring to the current block, histogram of directions of samples neighboring to the current block, or histogram of angles of samples neighboring to the current block.

Clause 14. The method of clause 13, wherein current prediction samples before the OBMC are used to determine whether the OBMC is applied to the current block.

Clause 15. The method of clause 13, wherein neighbor reconstruction samples are used to determine whether the OBMC is applied to the current block.

Clause 16. The method of clause 13, wherein the histogram of at least one of: gradients, directions or angles is determined based on counting gradients along target directions or angles.

Clause 17. The method of clause 16, wherein the target directions or angles are pre-defined, or wherein the target directions or angles are based on directions of intra prediction angular modes in video coding.

Clause 18. The method of clause 16, wherein for a target direction or angle, a gradient amplitude is determined based on counting gradients or amplitudes of the gradients of at least one sample in the current block.

Clause 19. The method of clause 18, wherein a gradient or an amplitude of the gradient at a target position in the current block is counted.

Clause 20. The method of clause 18, wherein a gradient or an amplitude of the gradient at a series of target positions in the current block is counted.

Clause 21. The method of clause 18, wherein gradients or the amplitudes of the gradients of all samples in the current block are counted.

Clause 22. The method of clause 18, wherein gradients or the amplitudes of the gradients of all samples except first row, last row, first column, last column samples in the current block are counted.

Clause 23. The method of clause 16, wherein for a target direction or angle, a gradient amplitude is determined based on counting gradients or the amplitudes of the gradients of at least one sample neighboring to the current block.

Clause 24. The method of clause 23, wherein a gradient or the amplitude of the gradient at target position neighboring to the current block is counted.

Clause 25. The method of clause 23, wherein gradients or the amplitudes of the gradients of all samples neighboring to the current block are counted.

Clause 26. The method of clause 25, wherein the samples are on left and/or top of the current block.

Clause 27. The method of clause 13, wherein the histogram of at least one of: gradients, directions, angles is determined based on dividing an entire range of directions or angles into a series of intervals or bins.

Clause 28. The method of clause 13, wherein the histogram of at least one of: gradients, directions, angles is determined based on counting gradients or amplitudes of the gradients in each interval or each bin or each direction or each angle.

Clause 29. The method of clause 1 or 2, wherein whether the OBMC is applied to the current block is based on at least one of: colors of samples inside the current block, luminance of samples inside the current block, intensity of samples inside the current block, histogram of colors of samples inside the current block, histogram of luminance of samples inside the current block, histogram of intensity of samples inside the current block, colors of samples neighboring to the current block, luminance of samples neighboring to the current block, intensity of samples neighboring to the current block, histogram of colors of samples neighboring to the current block, histogram of luminance of samples neighboring to the current block, or histogram of intensity of samples neighboring to the current block.

Clause 30. The method of clause 29, wherein current prediction samples before the OBMC are used to determine whether the OBMC is applied to the current block.

Clause 31. The method of clause 29, wherein neighboring reconstruction samples are used to determine whether the OBMC is applied to the current block.

Clause 32. The method of clause 29, wherein the histogram of at least one of: colors, luminance, or intensity is determined based on counting sample values in at least one of: Y, U or V component domain, and/or wherein the histogram of at least one of: colors, luminance, or intensity is determined based on counting sample values in at least one of: R, G or B component domain.

Clause 33. The method of clause 32, wherein sample values at a series of target positions in the current block are counted.

Clause 34. The method of clause 32, wherein sample values of all samples in the current block are counted.

Clause 35. The method of clause 32, wherein sample values at target positions neighboring to the current block are counted.

Clause 36. The method of clause 32, wherein sample values of all samples neighboring to the current block are counted.

Clause 37. The method of clause 36, wherein the samples are on left and/or top of the current block.

Clause 38. The method of clause 29, wherein the histogram of colors is determined based on dividing an entire range of colors into a series of intervals or bins, and/or wherein the histogram of luminance is determined based on dividing an entire range of luminance into a series of intervals or bins, and/or wherein the histogram of intensity is determined based on dividing an entire range of intensity into a series of intervals or bins.

Clause 39. The method of clause 29, wherein the histogram of at least one of: colors, luminance, or intensity is determined based on counting the number of samples in each interval or bin.

Clause 40. The method of clause 1 or 2, wherein whether the OBMC is applied to the current block is based on at least one of: the number of main gradients of samples inside the current block, the number of main directions of samples inside the current block, the number of main angles of samples inside the current block, the number of main colors of samples inside the current block, the number of main luminance of samples inside the current block, the number of main intensity of samples inside the current block, the number of main gradients of samples neighboring to the current block, the number of main directions of samples neighboring to the current block, the number of main angles of samples neighboring to the current block, the number of main colors of samples neighboring to the current block, the number of main luminance of samples neighboring to the current block, or the number of main intensity of samples neighboring to the current block.

Clause 41. The method of clause 40, wherein the number of at least one of: main gradients, directions, angles, colors, luminance or intensity is determined based on prediction samples inside the current block before the OBMC is applied.

Clause 42. The method of clause 40, wherein the number of at least one of: main gradients, directions, angles, colors, luminance or intensity is determined based on reconstruction samples neighboring to the current block.

Clause 43. The method of clause 40, wherein at least one of: the main gradients, directions, angles, colors, luminance, or intensity is derived based on the histogram of at least one of: gradients, directions, angles, colors, luminance, or intensity.

Clause 44. The method of clause 40, wherein at least one of: the main gradients, directions, angles, colors, luminance, or intensity is derived based on how many intervals or bins in the histogram show values greater than a threshold.

Clause 45. The method of clause 40, wherein at least one of: the main gradients, directions, angles, colors, luminance, or intensity is derived based on how many intervals or bins in the histogram provide greater values than the values of other intervals or bins.

Clause 46. The method of clause 45, wherein the values of intervals or bins in the histogram are sorted.

Clause 47. The method of clause 46, wherein if Xi>=a*(Xi+1), then the intervals or bins from 0 to i is treated as main gradients, wherein a denotes a scale factor, the values after sorting are represented by X0, X1, X2 . . . , Xn-2, Xn-1, n intervals/bins are included in the histogram.

Clause 48. The method of clause 47, wherein a is equal to a constant between 2 and 20.

Clause 49. The method of clause 40, wherein if the number of at least one of: main gradients, directions, angles, colors, luminance, or intensity is less than a threshold number, the OBMC is not applied to the current block.

Clause 51. The method of clause 1 or 2, wherein whether the OBMC is applied to the current block is based on whether motion vectors of the current block are integer precision motion vectors.

Clause 52. The method of clause 1 or 2, wherein whether the OBMC is applied to the current block is based on whether motion vector differences of the current block are integer precision motion vector differences.

Clause 53. The method of any of clauses 1-52, wherein an indication of whether to and/or how to determine whether the OBMC is applied to the current block is indicated at one of the followings: sequence level, group of pictures level, picture level, slice level, or tile group level.

Clause 54. The method of any of clauses 1-52, wherein an indication of whether to and/or how to determine whether the OBMC is applied to the current block is indicated in one of the following: a sequence header, a picture header, a sequence parameter set (SPS), a video parameter set (VPS), a decoding parameter set (DPS), a decoding capability information (DCI), a picture parameter set (PPS), an adaptation parameter sets (APS), a slice header, or a tile group header.

Clause 55. The method of any of clauses 1-52, wherein an indication of whether to and/or how to determine whether the OBMC is applied to the current block is included in one of the following: a prediction block (PB), a transform block (TB), a coding block (CB), a prediction unit (PU), a transform unit (TU), a coding unit (CU), a virtual pipeline data unit (VPDU), a coding tree unit (CTU), a CTU row, a slice, a tile, a sub-picture, or a region containing more than one sample or pixel.

Clause 56. The method of any of clauses 1-52, further comprising: determining, based on coded information of the video unit, whether and/or how to determine whether the OBMC is applied to the current block, the coded information including at least one of: a block size, a colour format, a single and/or dual tree partitioning, a colour component, a slice type, or a picture type.

Clause 57. The method of any of clauses 1-56, wherein the conversion includes encoding the video unit into the bitstream.

Clause 58. The method of any of clauses 1-56, wherein the conversion includes decoding the video unit from the bitstream.

Clause 59. An apparatus for video processing comprising a processor and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to perform a method in accordance with any of clauses 1-58.

Clause 60. A non-transitory computer-readable storage medium storing instructions that cause a processor to perform a method in accordance with any of clauses 1-58.

Clause 61. A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by an apparatus for video processing, wherein the method comprises: determining whether an overlap subblock based motion compensation (OBMC) is applied to a current block of a video unit of the video based on at least one of: sample values of samples inside the current block, sample values of samples neighboring to the current block, template costs, or motion vector precision of the current block; and generating the bitstream based on the determining.

Clause 62. A method for storing a bitstream of a video, comprising: determining whether an overlap subblock based motion compensation (OBMC) is applied to a current block of a video unit of the video based on at least one of: sample values of samples inside the current block, sample values of samples neighboring to the current block, template costs, or motion vector precision of the current block; generating the bitstream based on the determining; and storing the bitstream in a non-transitory computer-readable medium.

Example Device

FIG. 40 illustrates a block diagram of a computing device 4000 in which various embodiments of the present disclosure can be implemented. The computing device 4000 may be implemented as or included in the source device 110 (or the video encoder 114 or 200) or the destination device 120 (or the video decoder 124 or 300).

It would be appreciated that the computing device 4000 shown in FIG. 40 is merely for purpose of illustration, without suggesting any limitation to the functions and scopes of the embodiments of the present disclosure in any manner.

As shown in FIG. 40, the computing device 4000 includes a general-purpose computing device 4000. The computing device 4000 may at least comprise one or more processors or processing units 4010, a memory 4020, a storage unit 4030, one or more communication units 4040, one or more input devices 4050, and one or more output devices 4060.

In some embodiments, the computing device 4000 may be implemented as any user terminal or server terminal having the computing capability. The server terminal may be a server, a large-scale computing device or the like that is provided by a service provider. The user terminal may for example be any type of mobile terminal, fixed terminal, or portable terminal, including a mobile phone, station, unit, device, multimedia computer, multimedia tablet, Internet node, communicator, desktop computer, laptop computer, notebook computer, netbook computer, tablet computer, personal communication system (PCS) device, personal navigation device, personal digital assistant (PDA), audio/video player, digital camera/video camera, positioning device, television receiver, radio broadcast receiver, E-book device, gaming device, or any combination thereof, including the accessories and peripherals of these devices, or any combination thereof. It would be contemplated that the computing device 4000 can support any type of interface to a user (such as “wearable” circuitry and the like).

The processing unit 4010 may be a physical or virtual processor and can implement various processes based on programs stored in the memory 4020. In a multi-processor system, multiple processing units execute computer executable instructions in parallel so as to improve the parallel processing capability of the computing device 4000. The processing unit 4010 may also be referred to as a central processing unit (CPU), a microprocessor, a controller or a microcontroller.

The computing device 4000 typically includes various computer storage medium. Such medium can be any medium accessible by the computing device 4000, including, but not limited to, volatile and non-volatile medium, or detachable and non-detachable medium. The memory 4020 can be a volatile memory (for example, a register, cache, Random Access Memory (RAM)), a non-volatile memory (such as a Read-Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), or a flash memory), or any combination thereof. The storage unit 4030 may be any detachable or non-detachable medium and may include a machine-readable medium such as a memory, flash memory drive, magnetic disk or another other media, which can be used for storing information and/or data and can be accessed in the computing device 4000.

The computing device 4000 may further include additional detachable/non-detachable, volatile/non-volatile memory medium. Although not shown in FIG. 40, it is possible to provide a magnetic disk drive for reading from and/or writing into a detachable and non-volatile magnetic disk and an optical disk drive for reading from and/or writing into a detachable non-volatile optical disk. In such cases, each drive may be connected to a bus (not shown) via one or more data medium interfaces.

The communication unit 4040 communicates with a further computing device via the communication medium. In addition, the functions of the components in the computing device 4000 can be implemented by a single computing cluster or multiple computing machines that can communicate via communication connections. Therefore, the computing device 4000 can operate in a networked environment using a logical connection with one or more other servers, networked personal computers (PCs) or further general network nodes.

The input device 4050 may be one or more of a variety of input devices, such as a mouse, keyboard, tracking ball, voice-input device, and the like. The output device 4060 may be one or more of a variety of output devices, such as a display, loudspeaker, printer, and the like. By means of the communication unit 4040, the computing device 4000 can further communicate with one or more external devices (not shown) such as the storage devices and display device, with one or more devices enabling the user to interact with the computing device 4000, or any devices (such as a network card, a modem and the like) enabling the computing device 4000 to communicate with one or more other computing devices, if required. Such communication can be performed via input/output (I/O) interfaces (not shown).

The computing device 4000 may be used to implement video encoding/decoding in embodiments of the present disclosure. The memory 4020 may include one or more video coding modules 4025 having one or more program instructions. These modules are accessible and executable by the processing unit 4010 to perform the functionalities of the various embodiments described herein.

In the example embodiments of performing video encoding, the input device 4050 may receive video data as an input 4070 to be encoded. The video data may be processed, for example, by the video coding module 4025, to generate an encoded bitstream. The encoded bitstream may be provided via the output device 4060 as an output 4080.

In the example embodiments of performing video decoding, the input device 4050 may receive an encoded bitstream as the input 4070. The encoded bitstream may be processed, for example, by the video coding module 4025, to generate decoded video data. The decoded video data may be provided via the output device 4060 as the output 4080.