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: generating, for a conversion between a video unit of a video and a bitstream of the video, a prediction or reconstruction of the video unit by applying a fractional block vector to the video unit; and performing the conversion based on the prediction or reconstruction of the video unit.

FIELDS

Embodiments of the present disclosure relates generally to video processing techniques, and more particularly, to fractional block vector.

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: generating, for a conversion between a video unit of a video and a bitstream of the video, a prediction or reconstruction of the video unit by applying a fractional block vector to the video unit; and performing the conversion based on the prediction or reconstruction of the video unit. In this way, it is beneficial for camera/natural content or mixed content.

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: generating a prediction or reconstruction of a video unit of the video by applying a fractional block vector to the video unit; and generating the bitstream based on the prediction or reconstruction of the video unit.

In a fifth aspect, a method for storing a bitstream of a video is proposed. The method comprises: generating a prediction or reconstruction of a video unit of the video by applying a fractional block vector to the video unit; generating the bitstream based on the prediction or reconstruction of the video unit; and storing the bitstream in a non-transitory computer-readable recording 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

This disclosure is related to video coding technologies. Specifically, it is related to fractional block vector, and whether to/how to use it for intra block copy or intra template matching prediction, and other coding tools in image/video coding. It may be applied to the existing video coding standard like HEVC, or Versatile Video Coding (VVC). 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, Joint Video Exploration Team (JVET) was founded by VCEG and MPEG jointly in 2015. Since then, many new methods have been adopted by JVET and put into the reference software named Joint Exploration Model (JEM). In April 2018, the Joint Video Expert Team (JVET) between VCEG (Q6/16) and ISO/IEC JTC1 SC29/WG11 (MPEG) was created to work on the VVC standard targeting at 50% bitrate reduction compared to HEVC. ITU-T VCEG (Q6/16) and ISO/IEC MPEG (JTC 1/SC 29/WG 5) are studying the potential need for standardization of future video coding technology with a compression capability that significantly exceeds that of the current VVC standard. Such future standardization action could either take the form of additional extension(s) of VVC or an entirely new standard. The groups are working together on this exploration activity in a joint collaboration effort known as the Joint Video Exploration Team (JVET) to evaluate compression technology designs proposed by their experts in this area. New coding features and encoding methods implemented in Enhanced Compression Model (ECM) software that are under coordinated exploration study by the Joint Video Exploration Team (JVET) of ITU-T VCEG and ISO/IEC MPEG as potential enhanced video coding technology beyond the capabilities of VVC.

2.1. Color Space and Chroma Subsampling

Color space, also known as the color model (or color system), is an abstract mathematical model which simply describes the range of colors as tuples of numbers, typically as 3 or 4 values or color components (e.g. RGB). Basically speaking, color space is an elaboration of the coordinate system and sub-space.

For video compression, the most frequently used color spaces are YCbCr and RGB.

YCbCr, Y′CbCr, or Y Pb/Cb Pr/Cr, also written as YCBCR or Y′CBCR, is a family of color spaces used as a part of the color image pipeline in video and digital photography systems. Y′ is the luma component and CB and CR are the blue-difference and red-difference chroma components. Y′ (with prime) is distinguished from Y, which is luminance, meaning that light intensity is nonlinearly encoded based on gamma corrected RGB primaries.

Chroma subsampling is the practice of encoding images by implementing less resolution for chroma information than for luma information, taking advantage of the human visual system's lower acuity for color differences than for luminance.

Each of the three Y′CbCr components have the same sample rate, thus there is no chroma subsampling. This scheme is sometimes used in high-end film scanners and cinematic post production.

The two chroma components are sampled at half the sample rate of luma: the horizontal chroma resolution is halved while the vertical chroma resolution is unchanged. This reduces the bandwidth of an uncompressed video signal by one-third with little to no visual difference. An example of nominal vertical and horizontal locations of 4:2:2 color format is depicted in FIG. 4 in VVC working draft.

In 4:2:0, the horizontal sampling is doubled compared to 4:1:1, but as the Cb and Cr channels are only sampled on each alternate line in this scheme, the vertical resolution is halved. The data rate is thus the same. Cb and Cr are each subsampled at a factor of 2 both horizontally and vertically. There are three variants of 4:2:0 schemes, having different horizontal and vertical siting.

SubWidthC and SubHeightC values derived from

chrome

2.2. Coding Flow of a Typical Video Codec

FIG. 5 shows an example of encoder block diagram of VVC, which contains three in-loop filtering blocks: deblocking filter (DF), sample adaptive offset (SAO) and ALF. Unlike DF, which uses predefined filters, SAO and ALF utilize the original samples of the current picture to reduce the mean square errors between the original samples and the reconstructed samples by adding an offset and by applying a finite impulse response (FIR) filter, respectively, with coded side information signalling the offsets and filter coefficients. ALF is located at the last processing stage of each picture and can be regarded as a tool trying to catch and fix artifacts created by the previous stages.

2.3. Intra Mode Coding with 67 Intra Prediction Modes

To capture the arbitrary edge directions presented in natural video, the number of directional intra modes is extended from 33, as used in HEVC, to 65, as shown in FIG. 6, 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 the 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.3.1. Wide Angle Intra Prediction

Although 67 modes are defined in the VVC, the exact prediction direction for a given intra prediction mode index is further dependent on the block shape. 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. 7A and FIG. 7B.

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 2-2.

Intra prediction modes replaced by wide-angular modes

Aspect ratio
Replaced intra prediction modes

As shown in FIG. 8, 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.

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.

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 sub-blocks. 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 sub-blocks 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 signalled as IBC AMVP mode or IBC skip/merge mode as follows:

2.6. IBC Motion Candidates

The term ‘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 or a video processing unit comprising multiple samples/pixels. A block may be rectangular or non-rectangular.

For an IBC coded block, a block vector (BV) is used to indicate the displacement from the current block to a reference block, which is already reconstructed inside the current picture.

W and H are the width and height of current block (e.g., luma block).

The non-adjacent spatial candidates of current coding block are adjacent spatial candidates of a virtual block in the ith search round (as shown in FIG. 9A and FIG. 9B). The width and height of the virtual block for the ith search round are calculated by: newWidth=i×2×gridX+W, newHeight=i×2×gridY+H. Obviously, the virtual block is the current block if the search round i is 0.

In the following, a BV predictor also is a BV candidate. The skip mode also is the merge mode.

The BV candidates can be divided into several groups according to some criterions. Each group is called a subgroup. For example, we can take adjacent spatial and temporal BV candidates as a first subgroup and take the remaining BV candidates as a second subgroup; In another example, we can also take the first N (N≥2) BV candidates as a first subgroup, take the following M (M≥2) BV candidates as a second subgroup, and take the remaining BV candidates as a third subgroup.

2.7. 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 regular 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 MMVD candidate flag is signalled to specify which one is used between the first and second merge candidates.

Distance index specifies motion magnitude information and indicate the pre-defined offset from the starting point. As shown in FIG. 9A and FIG. 9B, 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 2-3.

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 2-4. 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 2-4 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), and the difference of POC in list 0 is greater than the one in list 1, the sign in Table 2-4 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. Otherwise, if the difference of POC in list 1 is greater than list 0, the sign in Table 2-4 specifies the sign of MV offset added to the list1 MV component of starting MV and the sign for the list0 MV has opposite value. The MVD is scaled according to the difference of POCs in each direction. If the differences of POCs in both lists are the same, no scaling is needed. Otherwise, if the difference of POC in list 0 is larger than the one of list 1, the MVD for list 1 is scaled, by defining the POC difference of L0 as td and POC difference of L1 as tb, described in FIG. 26. If the POC difference of L1 is greater than L0, the MVD for list 0 is scaled in the same way. If the starting MV is uni-predicted, the MVD is added to the available MV.

Sign of MV offset specified by direction index

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:

1. At slice level, variables BiDirPredFlag, RefIdxSymL0 and RefIdxSymL1 are derived as follows:

2. At CU level, a symmetrical mode flag indicating whether symmetrical mode is used or not is explicitly signaled if the CU is bi-prediction coded and BiDirPredFlag is equal to 1.

When the symmetrical mode flag is true, only mvp_l1_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.

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:

The distances (i.e. POC difference) from two reference pictures to the current picture are same.

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,

k=0,1, of the two prediction signals are computed by directly calculating the difference between two neighboring samples, i.e.,

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

└·┘ 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. 11, 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.

2.10. Combined Inter and Intra Prediction (CIIP)

2.11. Affine Motion Compensated Prediction

In HEVC, only translation motion model is applied for motion compensation prediction (MCP). While in the real world, there are many kinds of motion, e.g., zoom in/out, rotation, perspective motions and the other irregular motions. In VVC, a block-based affine transform motion compensation prediction is applied. As shown FIG. 12A and FIG. 12B, the affine motion field of the block is described by motion information of two control point (4-parameter) or three control point motion vectors (6-parameter).

For 4-parameter affine motion model, motion vector at sample location (x, y) in a block is derived as:

For 6-parameter affine motion model, motion vector at sample location (x, y) in a block is derived as:

Where (mv0x, mv0y) is motion vector of the top-left corner control point, (mv1x, mv1y) is motion vector of the top-right corner control point, and (mv2x, mv2y) is motion vector of the bottom-left corner control point.

In order to simplify the motion compensation prediction, block based affine transform prediction is applied. To derive motion vector of each 4×4 luma subblock, the motion vector of the center sample of each subblock, as shown in FIG. 13, is calculated according to above equations, and rounded to 1/16 fraction accuracy. Then the motion compensation interpolation filters are applied to generate the prediction of each subblock with derived motion vector. The subblock size of chroma-components is also set to be 4×4. The MV of a 4×4 chroma subblock is calculated as the average of the MVs of the four corresponding 4×4 luma subblocks.

As done for translational motion inter prediction, there are also two affine motion inter prediction modes: affine merge mode and affine AMVP mode.

AF_MERGE mode can be applied for CUs with both width and height larger than or equal to 8. In this mode the CPMVs of the current CU is generated based on the motion information of the spatial neighbouring CUs. There can be up to five CPMVP candidates and an index is signalled to indicate the one to be used for the current CU. The following three types of CPVM candidate are used to form the affine merge candidate list:

Inherited affine merge candidates that extrapolated from the CPMVs of the neighbour CUs.

In VVC, there are maximum two inherited affine candidates, which are derived from affine motion model of the neighbouring blocks, one from left neighbouring CUs and one from above neighbouring CUs. The candidate blocks are shown in FIG. 14. For the left predictor, the scan order is A0->A1, and for the above predictor, the scan order is B0->B1->B2. Only the first inherited candidate from each side is selected. No pruning check is performed between two inherited candidates. When a neighbouring affine CU is identified, its control point motion vectors are used to derive the CPMVP candidate in the affine merge list of the current CU. As shown in, if the neighbour left bottom block A is coded in affine mode, the motion vectors v2, v3 and v4 of the top left corner, above right corner and left bottom corner of the CU which contains the block A are attained. When block A is coded with 4-parameter affine model, the two CPMVs of the current CU are calculated according to v2, and v3. In case that block A is coded with 6-parameter affine model, the three CPMVs of the current CU are calculated according to v2, v3 and v4. FIG. 15 shows control point motion vector inheritance.

Constructed affine candidate means the candidate is constructed by combining the neighbour translational motion information of each control point. The motion information for the control points is derived from the specified spatial neighbours and temporal neighbour shown in FIG. 16. CPMVk (k=1, 2, 3, 4) represents the k-th control point. For CPMV1, the B2->B3->A2 blocks are checked and the MV of the first available block is used. For CPMV2, the B1->B0 blocks are checked and for CPMV3, the A1->A0 blocks are checked. For TMVP is used as CPMV4 if it's available.

After MVs of four control points are attained, affine merge candidates are constructed based on that motion information. The following combinations of control point MVs are used to construct in order:

The combination of 3 CPMVs constructs a 6-parameter affine merge candidate and the combination of 2 CPMVs constructs a 4-parameter affine merge candidate. To avoid motion scaling process, if the reference indices of control points are different, the related combination of control point MVs is discarded.

After inherited affine merge candidates and constructed affine merge candidate are checked, if the list is still not full, zero MVs are inserted to the end of the list.

Affine AMVP mode can be applied for CUs with both width and height larger than or equal to 16. An affine flag in CU level is signalled in the bitstream to indicate whether affine AMVP mode is used and then another flag is signalled to indicate whether 4-parameter affine or 6-parameter affine. In this mode, the difference of the CPMVs of current CU and their predictors CPMVPs is signalled in the bitstream. The affine AVMP candidate list size is 2 and it is generated by using the following four types of CPVM candidate in order:

The checking order of inherited affine AMVP candidates is same to the checking order of inherited affine merge candidates. The only difference is that, for AVMP candidate, only the affine CU that has the same reference picture as in current block is considered. No pruning process is applied when inserting an inherited affine motion predictor into the candidate list.

Constructed AMVP candidate is derived from the specified spatial neighbours shown in FIG. 16. The same checking order is used as done in affine merge candidate construction. In addition, reference picture index of the neighbouring block is also checked. The first block in the checking order that is inter coded and has the same reference picture as in current CUs is used. There is only one When the current CU is coded with 4-parameter affine mode, and mvo and mvi are both available, they are added as one candidate in the affine AMVP list. When the current CU is coded with 6-parameter affine mode, and all three CPMVs are available, they are added as one candidate in the affine AMVP list. Otherwise, constructed AMVP candidate is set as unavailable.

If affine AMVP list candidates is still less than 2 after inherited affine AMVP candidates and Constructed AMVP candidate are checked, mv0, mv1, and mv2 will be added, in order, as the translational MVs to predict all control point MVs of the current CU, when available. Finally, zero MVs are used to fill the affine AMVP list if it is still not full.

2.11.3. Affine Motion Information Storage

In VVC, the CPMVs of affine CUs are stored in a separate buffer. The stored CPMVs are only used to generate the inherited CPMVPs in affine merge mode and affine AMVP mode for the lately coded CUs. The subblock MVs derived from CPMVs are used for motion compensation, MV derivation of merge/AMVP list of translational MVs and de-blocking.

To avoid the picture line buffer for the additional CPMVs, affine motion data inheritance from the CUs from above CTU is treated differently to the inheritance from the normal neighbouring CUs. If the candidate CU for affine motion data inheritance is in the above CTU line, the bottom-left and bottom-right subblock MVs in the line buffer instead of the CPMVs are used for the affine MVP derivation. In this way, the CPMVs are only stored in local buffer. If the candidate CU is 6-parameter affine coded, the affine model is degraded to 4-parameter model. As shown in FIG. 17, along the top CTU boundary, the bottom-left and bottom right subblock motion vectors of a CU are used for affine inheritance of the CUs in bottom CTUs.

2.11.4. Prediction Refinement with Optical Flow for Affine Mode

Subblock based affine motion compensation can save memory access bandwidth and reduce computation complexity compared to pixel-based motion compensation, at the cost of prediction accuracy penalty. To achieve a finer granularity of motion compensation, prediction refinement with optical flow (PROF) is used to refine the subblock based affine motion compensated prediction without increasing the memory access bandwidth for motion compensation. In VVC, after the subblock based affine motion compensation is performed, luma prediction sample is refined by adding a difference derived by the optical flow equation. The PROF is described as following four steps:

Since the affine model parameters and the sample location relative to the subblock center are not changed from subblock to subblock, Δv(i, j) can be calculated for the first subblock, and reused for other subblocks in the same CU. Let dx(i, j) and dy(i, j) be the horizontal and vertical offset from the sample location (i, j) to the center of the subblock (xSB, ySB), Δv(x, y) can be derived by the following equation,

In order to keep accuracy, the enter of the subblock (xSB, ySB) is calculated as ((WSB−1)/2, (HSB−1)/2), where WSB and HSB are the subblock width and height, respectively.

PROF is not be applied in two cases for an affine coded CU: 1) all control point MVs are the same, which indicates the CU only has translational motion; 2) the affine motion parameters are greater than a specified limit because the subblock based affine MC is degraded to CU based MC to avoid large memory access bandwidth requirement.

A fast encoding method is applied to reduce the encoding complexity of affine motion estimation with PROF. PROF is not applied at affine motion estimation stage in following two situations: a) if this CU is not the root block and its parent block does not select the affine mode as its best mode, PROF is not applied since the possibility for current CU to select the affine mode as best mode is low; b) if the magnitude of four affine parameters (C, D, E, F) are all smaller than a predefined threshold and the current picture is not a low delay picture, PROF is not applied because the improvement introduced by PROF is small for this case. In this way, the affine motion estimation with PROF can be accelerated.

VVC supports the subblock-based temporal motion vector prediction (SbTMVP) method. Similar to the temporal motion vector prediction (TMVP) in HEVC, SbTMVP uses the motion field in the collocated picture to improve motion vector prediction and merge mode for CUs in the current picture. The same collocated picture used by TMVP is used for SbTVMP. SbTMVP differs from TMVP in the following two main aspects:

The SbTVMP process is illustrated in FIG. 19A and FIG. 19B. SbTMVP predicts the motion vectors of the sub-CUs within the current CU in two steps. In the first step, the spatial neighbor A1 in FIG. 19A is examined. If A1 has a motion vector that uses the collocated picture as its reference picture, this motion vector is selected to be the motion shift to be applied. If no such motion is identified, then the motion shift is set to (0, 0).

In the second step, the motion shift identified in Step 1 is applied (i.e., added to the current block's coordinates) to obtain sub-CU-level motion information (motion vectors and reference indices) from the collocated picture as shown in FIG. 19B. FIG. 16B illustrates deriving sub-CU motion field by applying a motion shift from spatial neighbor and scaling the motion information from the corresponding collocated sub-CUs. The example in FIG. 19B assumes the motion shift is set to block A1's motion. Then, for each sub-CU, the motion information of its corresponding block (the smallest motion grid that covers the center sample) in the collocated picture is used to derive the motion information for the sub-CU. After the motion information of the collocated sub-CU is identified, it is converted to the motion vectors and reference indices of the current sub-CU in a similar way as the TMVP process of HEVC, where temporal motion scaling is applied to align the reference pictures of the temporal motion vectors to those of the current CU.

In VVC, a combined subblock based merge list which contains both SbTVMP candidate and affine merge candidates is used for the signalling of subblock based merge mode. The SbTVMP mode is enabled/disabled by a sequence parameter set (SPS) flag. If the SbTMVP mode is enabled, the SbTMVP predictor is added as the first entry of the list of subblock based merge candidates, and followed by the affine merge candidates. The size of subblock based merge list is signalled in SPS and the maximum allowed size of the subblock based merge list is 5 in VVC.

The sub-CU size used in SbTMVP is fixed to be 8×8, and as done for affine merge mode, SbTMVP mode is only applicable to the CU with both width and height are larger than or equal to 8.

The encoding logic of the additional SbTMVP merge candidate is the same as for the other merge candidates, that is, for each CU in Por B slice, an additional RD check is performed to decide whether to use the SbTMVP candidate.

2.13. Adaptive Motion Vector Resolution (AMVR)

In HEVC, motion vector differences (MVDs) (between the motion vector and predicted motion vector of a CU) are signalled in units of quarter-luma-sample when use_integer_mv_flag is equal to 0 in the slice header. In VVC, a CU-level adaptive motion vector resolution (AMVR) scheme is introduced. AMVR allows MVD of the CU to be coded in different precision. Dependent on the mode (normal AMVP mode or affine AVMP mode) for the current CU, the MVDs of the current CU can be adaptively selected as follows:

The CU-level MVD resolution indication is conditionally signalled if the current CU has at least one non-zero MVD component. If all MVD components (that is, both horizontal and vertical MVDs for reference list L0 and reference list L1) are zero, quarter-luma-sample MVD resolution is inferred.

For a CU that has at least one non-zero MVD component, a first flag is signalled to indicate whether quarter-luma-sample MVD precision is used for the CU. If the first flag is 0, no further signaling is needed and quarter-luma-sample MVD precision is used for the current CU. Otherwise, a second flag is signalled to indicate half-luma-sample or other MVD precisions (integer or four-luma sample) is used for normal AMVP CU. In the case of half-luma-sample, a 6-tap interpolation filter instead of the default 8-tap interpolation filter is used for the half-luma sample position. Otherwise, a third flag is signalled to indicate whether integer-luma-sample or four-luma-sample MVD precision is used for normal AMVP CU. In the case of affine AMVP CU, the second flag is used to indicate whether integer-luma-sample or 1/16 luma-sample MVD precision is used. In order to ensure the reconstructed MV has the intended precision (quarter-luma-sample, half-luma-sample, integer-luma-sample or four-luma-sample), the motion vector predictors for the CU will be rounded to the same precision as that of the MVD before being added together with the MVD. The motion vector predictors are rounded toward zero (that is, a negative motion vector predictor is rounded toward positive infinity and a positive motion vector predictor is rounded toward negative infinity).

The encoder determines the motion vector resolution for the current CU using RD check. To avoid always performing CU-level RD check four times for each MVD resolution, in VTM11, the RD check of MVD precisions other than quarter-luma-sample is only invoked conditionally. For normal AVMP mode, the RD cost of quarter-luma-sample MVD precision and integer-luma sample MV precision is computed first. Then, the RD cost of integer-luma-sample MVD precision is compared to that of quarter-luma-sample MVD precision to decide whether it is necessary to further check the RD cost of four-luma-sample MVD precision. When the RD cost for quarter-luma-sample MVD precision is much smaller than that of the integer-luma-sample MVD precision, the RD check of four-luma-sample MVD precision is skipped. Then, the check of half-luma-sample MVD precision is skipped if the RD cost of integer-luma-sample MVD precision is significantly larger than the best RD cost of previously tested MVD precisions. For affine AMVP mode, if affine inter mode is not selected after checking rate-distortion costs of affine merge/skip mode, merge/skip mode, quarter-luma-sample MVD precision normal AMVP mode and quarter-luma-sample MVD precision affine AMVP mode, then 1/16 luma-sample MV precision and 1-pel MV precision affine inter modes are not checked. Furthermore, affine parameters obtained in quarter-luma-sample MV precision affine inter mode is used as starting search point in 1/16 luma-sample and quarter-luma-sample MV precision affine inter modes.

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 L0and 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.

Local illumination compensation (LIC) is a coding tool to address the issue of local illumination changes between current picture and its temporal reference pictures. The LIC is based on a linear model where a scaling factor and an offset are applied to the reference samples to obtain the prediction samples of a current block. Specifically, the LIC can be mathematically modeled by the following equation:

where P(x, y) is the prediction signal of the current block at the coordinate (x, y); Pr(x+vx, y+vy) is the reference block pointed by the motion vector (vx, vy); α and β are the corresponding scaling factor and offset that are applied to the reference block. FIG. 20 illustrates the LIC process. In FIG. 20, when the LIC is applied for a block, a least mean square error (LMSE) method is employed to derive the values of the LIC parameters (i.e., α and β) by minimizing the difference between the neighboring samples of the current block (i.e., the template T in FIG. 20) and their corresponding reference samples in the temporal reference pictures (i.e., either T0 or T1 in FIG. 20). Additionally, to reduce the computational complexity, both the template samples and the reference template samples are subsampled (adaptive subsampling) to derive the LIC parameters, i.e., only the shaded samples in FIG. 20 are used to derive a and B.

To improve the coding performance, no subsampling for the short side is performed as shown in FIG. 21.

2.16. Decoder Side Motion Vector Refinement (DMVR)

In order to increase the accuracy of the MVs of the merge mode, a bilateral-matching (BM) 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. 22, the SAD between the two blocks based on each MV candidate (e.g., MV0′ and MV1′) 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 application of DMVR is restricted and is only applied for the CUs which are coded with following modes and features:

CIIP mode is not used for the current block.

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.16.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 1/4 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.16.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 an 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.16.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.

In this contribution, a multi-pass decoder-side motion vector refinement is applied instead of DMVR. In the first pass, bilateral matching (BM) is applied to a coding block. In the second pass, BM is applied to each 16×16subblock within the coding block. In the third pass, MV in each 8×8 subblock is refined by applying bi-directional optical flow (BDOF). The refined MVs are stored for both spatial and temporal motion vector prediction.

2.17.1. First Pass—Block Based Bilateral Matching MV Refinement

In the first pass, a refined MV is derived by applying BM to a coding block. Similar to decoder-side motion vector refinement (DMVR), the refined MV is searched around the two initial MVs (MV0 and MV1) in the reference picture lists L0 and L1. The refined MVs (MV0_pass1 and MV1_pass1) are derived around the initiate MVs based on the minimum bilateral matching cost between the two reference blocks in L0 and L1.

BM performs local search to derive integer sample precision intDeltaMV and half-pel sample precision halfDeltaMv. The local search applies a 3×3 square search pattern to loop through the search range [−sHor, sHor] in a horizontal direction and [−sVer, sVer] in a vertical direction, wherein, the values of sHor and sVer are determined by the block dimension, and the maximum value of sHor and sVer is 8.

The bilateral matching cost is calculated as: bilCost=mvDistanceCost+sadCost. When the block size cbW* cbH is greater than 64, MRSAD cost function is applied to remove the DC effect of the distortion between the reference blocks. When the bilCost at the center point of the 3×3 search pattern has the minimum cost, the intDeltaMV or halfDeltaMV local search is terminated. Otherwise, the current minimum cost search point becomes the new center point of the 3×3 search pattern and the search for the minimum cost continues, until it reaches the end of the search range.

The existing fractional sample refinement is further applied to derive the final deltaMV. The refined MVs after the first pass are then derived as:

2.17.2. Second Pass—Subblock Based Bilateral Matching MV Refinement

In the second pass, a refined MV is derived by applying BM to a 16×16 grid subblock. For each subblock, the refined MV is searched around the two MVs (MV0_pass1 and MV1_pass1), obtained on the first pass for the reference picture list L0 and L1. The refined MVs (MV0_pass2(sbIdx2) and MV1_pass2(sbIdx2)) are derived based on the minimum bilateral matching cost between the two reference subblocks in L0 and L1.

For each subblock, BM performs full search to derive integer sample precision intDeltaMV. The full search has a search range [−sHor, sHor] in a horizontal direction and [−sVer, sVer] in a vertical direction, wherein, the values of sHor and s Ver are determined by the block dimension, and the maximum value of sHor and sVer is 8. The bilateral matching cost is calculated by applying a cost factor to the SATD cost between the two reference subblocks, as: bilCost=satdCost*costFactor. The search area (2*sHor+1)*(2*sVer+1) is divided up to 5 diamond shape search regions shown on FIG. 23. Each search region is assigned a costFactor, which is determined by the distance (intDeltaMV) between each search point and the starting MV, and each diamond region is processed in the order starting from the center of the search area. In each region, the search points are processed in the raster scan order starting from the top left going to the bottom right corner of the region. When the minimum bilCost within the current search region is less than a threshold equal to sbW*sbH, the int-pel full search is terminated, otherwise, the int-pel full search continues to the next search region until all search points are examined.

BM performs local search to derive half sample precision halfDeltaMv. The search pattern and cost function are the same as defined in 2.9.1.

The existing VVC DMVR fractional sample refinement is further applied to derive the final deltaMV (sbIdx2). The refined MVs at second pass is then derived as:

2.17.3. Third Pass—Subblock Based Bi-Directional Optical Flow MV Refinement

In the third pass, a refined MV is derived by applying BDOF to an 8×8 grid subblock. For each 8×8 subblock, BDOF refinement is applied to derive scaled Vx and Vy without clipping starting from the refined MV of the parent subblock of the second pass. The derived bioMv(Vx, Vy) is rounded to 1/16 sample precision and clipped between −32 and 32.

The refined MVs (MV0_pass3(sbIdx3) and MV1_pass3(sbIdx3)) at third pass are derived as:

In the sample-based BDOF, instead of deriving motion refinement (Vx, Vy) on a block basis, it is performed per sample. The coding block is divided into 8×8 subblocks. For each subblock, whether to apply BDOF or not is determined by checking the SAD between the two reference subblocks against a threshold. If decided to apply BDOF to a subblock, for every sample in the subblock, a sliding 5×5 window is used and the existing BDOF process is applied for every sliding window to derive Vx and Vy. The derived motion refinement (Vx, Vy) is applied to adjust the bi-predicted sample value for the center sample of the window.

2.19. 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.19.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 FIG. 24. 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, AO, 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. 25 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. 26, 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. 27. 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, and the identical HMVP is inserted to the last entry of the table.

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:

Number of HMPV candidates is used for merge list generation is set as (N<=4)?M: (8−N), wherein N indicates number of existing candidates in the merge list and M indicates number of available HMVP candidates in the table.

Once the total number of available merge candidates reaches the maximally allowed merge candidates minus 1, the merge candidate list construction process from HMVP is terminated.

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.19.5. 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.20. New Merge Candidates

In VVC, five spatially neighboring blocks shown in FIG. 28 as well as one temporal neighbor are used to derive merge candidates. FIG. 29 illustrates the relationship between the virtual block and the current block.

It is proposed to derive the additional merge candidates from the positions non-adjacent to the current block using the same pattern as that in VVC. To achieve this, for each search round i, a virtual block is generated based on the current block as follows:

First, the relative position of the virtual block to the current block is calculated by:

Second, the width and height of the virtual block are calculated by:

After generating the virtual block, the blocks Ai, Bi, Ci, Di and Ei can be regarded as the VVC spatial neighboring blocks of the virtual block and their positions are obtained with the same pattern as that in VVC. Obviously, the virtual block is the current block if the search round i is 0. In this case, the blocks Ai, Bi, Ci, Di and Ei are the spatially neighboring blocks that are used in VVC merge mode.

When constructing the merge candidate list, the pruning is performed to guarantee each element in merge candidate list to be unique. The maximum search round is set to 1, which means that five non-adjacent spatial neighbor blocks are utilized.

Non-adjacent spatial merge candidates are inserted into the merge list after the temporal merge candidate in the order of B1->A1->C1->D1->E1.

It is proposed to derive an averaging candidate as STMVP candidate using three spatial merge candidates and one temporal merge candidate.

STMVP is inserted before the above-left spatial merge candidate.

The STMVP candidate is pruned with all the previous merge candidates in the merge list.

For the spatial candidates, the first three candidates in the current merge candidate list are used.

For the temporal candidate, the same position as VTM/HEVC collocated position is used.

For the spatial candidates, the first, second, and third candidates inserted in the current merge candidate list before STMVP are denoted as F, S, and T.

The temporal candidate with the same position as VTM/HEVC collocated position used in TMVP is denoted as Col.

The motion vector of the STMVP candidate in prediction direction X (denoted as mvLX) is derived as follows:

Note: If the temporal candidate is unavailable, the STMVP mode is off.

2.20.3. Merge List Size

If considering both non-adjacent and STMVP merge candidates, the size of merge list is signalled in sequence parameter set header and the maximum allowed size of merge list is 8.

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. 30). 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. The uni-prediction motion for each partition is derived using the process described in section 2.21.1.

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 as in section 2.21.2. 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 as in section 2.21.3.

2.21.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 in section 2.19. 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. 31. 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.21.2. Blending Along the Geometric Partitioning Edge

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:

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 in FIG. 32.

2.21.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:

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:

Otherwise, if Mv1 and Mv2 are from the same list, only uni-prediction motion Mv2 is stored.

In multi-hypothesis prediction (MHP), up to two additional predictors are signalled on top of inter AMVP mode, regular merge mode, affine merge and MMVD mode. The resulting overall prediction signal is accumulated iteratively with each additional prediction signal.

The weighting factor a is specified according to the following Table 2-5.

weighting factor for MHP

For inter AMVP mode, MHP is only applied if non-equal weight in BCW is selected in bi-prediction mode. The additional hypothesis can be either merge or AMVP mode. In the case of merge mode, the motion information is indicated by a merge index, and the merge candidate list is the same as in the Geometric Partition Mode. In the case of AMVP mode, the reference index, MVP index, and MVD are signaled.

The non-adjacent spatial merge candidates are inserted after the TMVP in the regular merge candidate list. The pattern of the spatial merge candidates is shown on FIG. 33. The distances between the non-adjacent spatial candidates and the current coding block are based on the width and height of the current coding block.

Template matching (TM) is a decoder-side MV derivation method to refine the motion information of the current CU by finding the closest match between a template (i.e., top and/or left neighbouring blocks of the current CU) in the current picture and a block (i.e., same size to the template) in a reference picture. As illustrated in FIG. 34, a better MV is to be searched around the initial motion of the current CU within a [−8,+8]-pel search range. The template matching that was proposed two modifications: search step size is determined based on AMVR mode and TM can be cascaded with bilateral matching process in merge modes. In AMVP mode, an MVP candidate is determined based on template matching error to pick up the one which reaches the minimum difference between current block template and reference block template, and then TM performs only for this particular MVP candidate for MV refinement. TM refines this MVP candidate, starting from full-pel MVD precision (or 4-pel for 4-pel AMVR mode) within a [−8, +8]-pel search range by using iterative diamond search. The AMVP candidate may be further refined by using cross search with full-pel MVD precision (or 4-pel for 4-pel AMVR mode), followed sequentially by half-pel and quarter-pel ones depending on AMVR mode as specified in Table 2-6. This search process ensures that the MVP candidate still keeps the same MV precision as indicated by AMVR mode after TM process.

Search patterns of AMVR and merge mode with AMVR.

Search
AMVR mode
Merge mode

4-pel diamond
v

4-pel cross
v

v
v
v
v
v

diamond

v
v
v
v
v

v
v
v
v

cross

In merge mode, similar search method is applied to the merge candidate indicated by the merge index. As Table 2-6 shows, TM may perform all the way down to 1/8-pel MVD precision or skipping those beyond half-pel MVD precision, depending on whether the alternative interpolation filter (that is used when AMVR is of half-pel mode) is used according to merged motion information. Besides, when TM mode is enabled, template matching may work as an independent process or an extra MV refinement process between block-based and subblock-based bilateral matching (BM) methods, depending on whether BM can be enabled or not according to its enabling condition check.

Overlapped Block Motion Compensation (OBMC) has previously been used in H.263. In the JEM, unlike in H.263, OBMC can be switched on and off using syntax at the CU level. When OBMC is used in the JEM, the OBMC is performed for all motion compensation (MC) block boundaries except the right and bottom boundaries of a CU. Moreover, it is applied for both the luma and chroma components. In the JEM, a MC block is corresponding to a coding block. When a CU is coded with sub-CU mode (includes sub-CU merge, affine and FRUC mode), each sub-block of the CU is a MC block. To process CU boundaries in a uniform fashion, OBMC is performed at sub-block level for all MC block boundaries, where sub-block size is set equal to 4×4, as illustrated in FIG. 35.

When OBMC applies to the current sub-block, besides current motion vectors, motion vectors of four connected neighbouring sub-blocks, if available and are not identical to the current motion vector, are also used to derive prediction block for the current sub-block. These multiple prediction blocks based on multiple motion vectors are combined to generate the final prediction signal of the current sub-block.

Prediction block based on motion vectors of a neighbouring sub-block is denoted as PN, with N indicating an index for the neighbouring above, below, left and right sub-blocks and prediction block based on motion vectors of the current sub-block is denoted as PC. When PN is based on the motion information of a neighbouring sub-block that contains the same motion information to the current sub-block, the OBMC is not performed from PN. Otherwise, every sample of PN is added to the same sample in PC, i.e., four rows/columns of PN are added to PC. The weighting factors {1/4, 1/8, 1/16, 1/32} are used for PN and the weighting factors {3/4, 7/8, 15/16, 31/32} are used for PC. The exception are small MC blocks, (i.e., when height or width of the coding block is equal to 4 or a CU is coded with sub-CU mode), for which only two rows/columns of PN are added to PC. In this case weighting factors {1/4, 1/8} are used for PN and weighting factors {3/4, 7/8} are used for PC. For PN generated based on motion vectors of vertically (horizontally) neighbouring sub-block, samples in the same row (column) of PN are added to PC with a same weighting factor.

In the JEM, for a CU with size less than or equal to 256 luma samples, a CU level flag is signalled to indicate whether OBMC is applied or not for the current CU. For the CUs with size larger than 256 luma samples or not coded with AMVP mode, OBMC is applied by default. At the encoder, when OBMC is applied for a CU, its impact is taken into account during the motion estimation stage. The prediction signal formed by OBMC using motion information of the top neighbouring block and the left neighbouring block is used to compensate the top and left boundaries of the original signal of the current CU, and then the normal motion estimation process is applied.

2.26. 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 2-7 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 2-8. 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 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. 36. For SBT-V (or SBT-H), the TU width (or height) may equal to half of the CU width (or height) or 1/4 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. 36. 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.28. Template Matching Based Adaptive Merge Candidate Reorder

To improve the coding efficiency, after the merge candidate list is constructed, the order of each merge candidate is adjusted according to the template matching cost. The merge candidates are arranged in the list in accordance with the template matching cost of ascending order. It is operated in the form of sub-group.

The template matching cost is measured by the SAD (Sum of absolute differences) between the neighbouring samples of the current CU and their corresponding reference samples. If a merge candidate includes bi-predictive motion information, the corresponding reference samples are the average of the corresponding reference samples in reference list0 and the corresponding reference samples in reference list1, as illustrated in FIG. 37. If a merge candidate includes sub-CU level motion information, the corresponding reference samples consist of the neighbouring samples of the corresponding reference sub-blocks, as illustrated in FIG. 38.

The sorting process is operated in the form of sub-group, as illustrated in FIG. 39. The first three merge candidates are sorted together. The following three merge candidates are sorted together.

The template size (width of the left template or height of the above template) is 1. The sub-group size is 3.

2.29. Adaptive Merge Candidate List

We can assume the number of the merge candidates is 8. We take the first 5 merge candidates as a first subgroup and take the following 3 merge candidates as a second subgroup (i.e., the last subgroup).

For the encoder, after the merge candidate list is constructed, some merge candidates are adaptively reordered in an ascending order of costs of merge candidates as shown in FIG. 40.

More specifically, the template matching costs for the merge candidates in all subgroups except the last subgroup are computed; then reorder the merge candidates in their own subgroups except the last subgroup; finally, the final merge candidate list will be got.

For the decoder, after the merge candidate list is constructed, some/no merge candidates are adaptively reordered in ascending order of costs of merge candidates as shown in FIG. 41. In FIG. 41, the subgroup the selected (signaled) merge candidate located in is called the selected subgroup.

More specifically, if the selected merge candidate is located in the last subgroup, the merge candidate list construction process is terminated after the selected merge candidate is derived, no reorder is performed and the merge candidate list is not changed; otherwise, the execution process is as follows: The merge candidate list construction process is terminated after all the merge candidates in the selected subgroup are derived; compute the template matching costs for the merge candidates in the selected subgroup; reorder the merge candidates in the selected subgroup; finally, a new merge candidate list will be got.

For both encoder and decoder, a template matching cost is derived as a function of T and RT, wherein T is a set of samples in the template and RT is a set of reference samples for the template.

When deriving the reference samples of the template for a merge candidate, the motion vectors of the merge candidate are rounded to the integer pixel accuracy.

The reference samples of the template (RT) for bi-directional prediction are derived by weighted averaging of the reference samples of the template in reference list0 (RT0) and the reference samples of the template in reference list1 (RT1) as follows.

If the Local Illumination Compensation (LIC) flag of the merge candidate is true, the reference samples of the template are derived with LIC method.

The template matching cost is calculated based on the sum of absolute differences (SAD) of T and RT.

The template size is 1. That means the width of the left template and/or the height of the above template is 1.

If the coding mode is MMVD, the merge candidates to derive the base merge candidates are not reordered.

If the coding mode is GPM, the merge candidates to derive the uni-prediction candidate list are not reordered.

2.30. IBC with Extended Reference Area

An IBC reference area design is proposed that does not increase the current memory area required by ECM-3 and tests the performance.

FIG. 42 illustrates the design. In the figure, the blue square denotes the current CTU and the green ones denote CTUs that may be used by IBC reference. Specifically, assume that W denotes the maximum horizontal CTU index and the current CTU index is (m, n), for coding units in the current CTU, CTUs with index (0, n) . . . (m, n) and (m−1, n) . . . (W, n) defines the reference area that can be used by IBC. One reason to have such a design is that in the current ECM, the left, above and upper-left CTUs are being used and thus need to be saved. To achieve this, all CTUs to the right of the above CTU in the above CTU row (for CTUs to be coded in the current CTU row) and all CTUs to the left of the current CTU in the current CTU row (for CTUs to be coded in the next CTU row) must be kept. It means that such a design does not increase the buffer size required by the current ECM.

2.31. IBC with Template Matching

It is proposed to also use Template Matching with IBC for both IBC merge mode and IBC AMVP mode.

The IBC-TM merge list has been modified compared to the one used by regular IBC merge mode such that the candidates are selected according to a pruning method with a motion distance between the candidates as in the regular TM merge mode. The ending zero motion fulfillment (which is a nonsense regarding Intra coding) has been replaced by motion vectors to the left (−W, 0), top (0, −H) and top-left (−W, −H) CUs, then, if necessary, the list is fulfilled with the left one without pruning.

In the IBC-TM merge mode, the selected candidates are refined with the Template Matching method prior to the RDO or decoding process. The IBC-TM merge mode has been put in competition with the regular IBC merge mode and a TM-merge flag is signaled.

In the IBC-TM AMVP mode, up to 3 candidates are selected from the IBC merge list. Each of those 3 selected candidates are refined using the Template Matching method and sorted according to their resulting Template Matching cost. Only the 2 first ones are then considered in the motion estimation process as usual.

The Template Matching refinement for both IBC-TM merge and AMVP modes is quite simple since IBC motion vectors are constrained to be integer and within a reference region as shown in FIG. 43. So, in IBC-TM merge mode, all refinements are performed at integer precision, and in IBC-TM AMVP mode, they are performed either at integer or 4-pel precision. In both cases, the refined motion vectors in each refinement step must respect the constraint of the reference region.

Screen content coding tools like Intra Block Copy (IBC) generate a prediction block by directly copying a prior coded reference region in the same picture. Symmetry is often observed in video content, especially in text character regions and computer-generated graphics in screen content sequences, as shown in FIG. 44. Therefore, a specific screen content coding tool considering the symmetry would be efficient to compress such kinds of video contents.

A Reconstruction-Reordered IBC (RR-IBC) mode is proposed for screen content video coding. When it is applied, the samples in a reconstruction block are flipped according to a flip type of the current block. At the encoder side, the original block is flipped before motion search and residual calculation, while the prediction block is derived without flipping. At the decoder side, the reconstruction block is flipped back to restore the original block.

Two flip methods, horizontal flip and vertical flip, are supported for RR-IBC coded blocks. A syntax flag is firstly signalled for an IBC AMVP coded block, indicating whether the reconstruction is flipped, and if it is flipped, another flag is further signaled specifying the flip type. For IBC merge, the flip type is inherited from neighbouring blocks, without syntax signalling. Considering the horizontal or vertical symmetry, the current block and the reference block are normally aligned horizontally or vertically. Therefore, when a horizontal flip is applied, the vertical component of the BV is not signaled and inferred to be equal to 0. Similarly, the horizontal component of the BV is not signaled and inferred to be equal to 0 when a vertical flip is applied.

To better utilize the symmetry property, a flip-aware BV adjustment approach is applied to refine the block vector candidate. For example, as shown in FIG. 45A and FIG. 45B, (xnbr, ynbr) and (xcur, ycur) represent the coordinates of the center sample of the neighboring block and the current block, respectively, BVnbr and BVcur denotes the BV of the neighboring block and the current block, respectively. Instead of directly inheriting the BV from a neighbouring block, the horizontal component of BVcur is calculated by adding a motion shift to the horizontal component of BVnbr (denoted as BVnbrh) in case that the neighbouring block is coded with a horizontal flip, i.e., BVcurh=2(xnbr−xcur)+BVnbrh. Similarly, the vertical component of BVcur is calculated by adding a motion shift to the vertical component of BVnbr (denoted as BVnbrh) in case that the neighbouring block is coded with a vertical flip, i.e., BVcurv=2(ynbr−ycur)+BVnbrv.

2.33. Intra Template Matching Prediction

Intra template matching prediction (IntraTMP) 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. 46 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.34. Intra Prediction Fusion

Intra prediction fusion method uses multiple predictors generated from different modes/reference lines.

In sub-test a, multiple intra predictors are generated and then fused by weighted averaging. The process of deriving the predictors to be used in the fusion process is described as follows:

In sub-test b, intra prediction fusion is performed on reference lines instead of prediction blocks. Two reference lines (referred to as rline and rline+1) are used for intra prediction fusion. DeltaInt of the corresponding intra prediction angle is considered in the fusion process. Each value in the fused reference line (rfusion[i]) is derived from:

The proposed intra prediction fusion is applied to luma blocks when angular intra mode has non-integer slope (required reference samples interpolation) and the block size is greater than 16, it is used with MRL and not applied for ISP coded blocks. In the method studied in the sub-test a, PDPC is applied for the intra prediction mode using the closest to the current block reference line.

The proposed TMRL mode includes the following aspects:

a) Extended Reference Line Candidate List and Intra-Prediction-Mode Candidate List.

The extended reference line candidate list used in this proposal is {1, 3, 5, 7, 12}. The restriction on the top CTU row is unchanged. The size of the intra-prediction-mode candidate list is 10. The construction of the intra-prediction-mode candidate list is similar to MPM. The differences are:

PL ANAR mode is excluded from the proposed intra-prediction-mode candidate list.

DC mode is added after the 5 neighboring PUs' modes and DIMD modes if it has not been included.

The angular modes with delta angles from ±1 to ±4 (compared to the existing angular modes in the intra-prediction-mode candidate list) are added.

b) Construction of the TMRL Candidate List.

There are 5×10=50 combinations of the extended reference line and the allowed intra-prediction modes for a block. Since the extended reference line starts from reference line 1, the area covered by reference line 0 is used for template matching. The SAD costs over the template area (see FIG. 47) are calculated between the predictions (generated by 50 combinations) and the reconstructions. The 20 combinations with the least SAD cost are selected in an ascending order to form the TMRL candidate list.

Instead of coding the reference line and the intra mode directly, an index to the TMRL candidate list is coded to indicate which combination of the reference line and prediction mode is used for coding the current block. In the proposed TMRL mode, a truncated Golomb-Rice coding with a divisor 4 is employed to code selected combinations from the combination list. The binarization process and the codewords are shown in Table 2-9.

Tthe binarization process of the TMRL index

Index
Bin string (prefix)
Bin string (suffix)

Encoder-side modification is tested to further improve the coding efficiency. For intra blocks larger than 8×8, an additional TMRL RDO is added if no TMRL modes are selected by SATD comparison.

It is proposed to apply convolutional cross-component model (CCCM) to predict chroma samples from reconstructed luma samples in a similar spirit as done by the current CCLM modes. As with CCLM, the reconstructed luma samples are down-sampled to match the lower resolution chroma grid when chroma sub-sampling is used.

Also, similarly to CCLM, there is an option of using a single model or multi-model variant of CCCM. The multi-model variant uses two models, one model derived for samples above the average luma reference value and another model for the rest of the samples (following the spirit of the CCLM design). Multi-model CCCM mode can be selected for PUs which have at least 128 reference samples available.

The proposed convolutional 7-tap filter consist of a 5-tap plus sign shape spatial component, a nonlinear term and a bias term. The input to the spatial 5-tap component of the filter consists of a center (C) luma sample which is collocated with the chroma sample to be predicted and its above/north (N), below/south(S), left/west (W) and right/east (E) neighbors as illustrated below in FIG. 48.

The nonlinear term P is represented as power of two of the center luma sample C and scaled to the sample value range of the content:

That is, for 10-bit content it is calculated as:

The bias term B represents a scalar offset between the input and output (similarly to the offset term in CCLM) and is set to middle chroma value (512 for 10-bit content).

Output of the filter is calculated as a convolution between the filter coefficients ci and the input values and clipped to the range of valid chroma samples:

2.36.2. Calculation of Filter Coefficients

The filter coefficients ci are calculated by minimising MSE between predicted and reconstructed chroma samples in the reference area. FIG. 49 illustrates the reference area which consists of 6 lines of chroma samples above and left of the PU. Reference area extends one PU width to the right and one PU height below the PU boundaries. Area is adjusted to include only available samples. The extensions to the area shown in blue are needed to support the “side samples” of the plus shaped spatial filter and are padded when in unavailable areas.

The MSE minimization is performed by calculating autocorrelation matrix for the luma input and a cross-correlation vector between the luma input and chroma output. Autocorrelation matrix is LDL decomposed and the final filter coefficients are calculated using back-substitution. The process follows roughly the calculation of the ALF filter coefficients in ECM, however LDL decomposition was chosen instead of Cholesky decomposition to avoid using square root operations. The proposed approach uses only integer arithmetic.

Usage of the mode is signalled with a CABAC coded PU level flag. One new CABAC context was included to support this. When it comes to signalling, CCCM is considered a sub-mode of CCLM. That is, the CCCM flag is only signalled if intra prediction mode is LM_CHROMA_IDX (to enable single mode CCCM) or MMLM_CHROMA_IDX (to enable multi-model CCCM).

Compared with the CCLM, instead of down-sampled luma values, the GLM utilizes luma sample gradients to derive the linear model. Specifically, when the GLM is applied, the input to the CCLM process, i.e., the down-sampled luma samples L, are replaced by luma sample gradients G. The other parts of the CCLM (e.g., parameter derivation, prediction sample linear transform) are kept unchanged.

For signaling, when the CCLM mode is enabled to the current CU, two flags are signaled separately for Cb and Cr components to indicate whether GLM is enabled to each component; if the GLM is enabled for one component, one syntax element is further signaled to select one of 4 gradient filters for the gradient calculation.

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

In ECM-6.0, the intra prediction modes for chroma components include 6 cross component linear model (LM) modes, convolution cross component model (CCCM) mode, gradient linear model (GLM) mode, DIMD mode, direct mode (DM), and four default intra prediction modes.

In the signaling of chroma intra mode, an intra_chroma_pred_mode is signaled to indicate the specific coding mode, as shown in Table 2-10.

The binarization process for

intra_chroma_pred_mode
bin string
chroma intra mode

ECM6.0 includes a method of chroma prediction using block vector in MODE_IBC. In single tree partition, the prediction process of IBC is applied for both luma and chroma components, and the chroma block vector is derived from the corresponding luma block vector depending on the chroma format sampling structure. In dual tree partition, the prediction process of IBC is only applied for luma component.

This contribution proposes a method to improve the coding efficiency of chroma intra prediction for screen content, namely direct block vector (DBV) mode.

For chroma components, when chroma dual tree is activated in intra slice, if one of the luma blocks (the following five locations in FIG. 51) 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 as shown in FIG. 52. A CU level flag is signaled to indicate whether the proposed DBV mode is applied as shown in Table 2-11.

The binarization process for

intra_chroma_pred_mode in the proposed method

intra_chroma_pred_mode
bin string
chroma intra mode

In multiple-candidates IntraTMP, a candidate list is constructed, and the candidate BVs are ranked in ascending order of their template matching costs. An index is signaled in the bit-stream to indicate which candidate BV is actually used for current block. This method uses template matching to select a shortlist of promising candidates from a huge amount of possible BVs and allows the encoder, who can refer to the original current block, to make the final decision.

In IntraTMP fusion, multiple IntraTMP matched blocks and then fuses them to produce a better overall predictor. In another IntraTMP fusion method, IntraTMP is fused with intra prediction to produce a new predictor.

In filtered IntraTMP, a 6-tap filter is used for the IntraTMP prediction. The filter input consists of 5 spatial luma samples and a bias term. Filter coefficients are derived via regression based MSE minimization on reconstructed samples over the template areas of the current and reference blocks. The mode is signalled with a flag conditioned on IntraTMP flag.

In current design of ECM, integer precision of block vector is used for IBC and IntraTMP. It is beneficial for compressing screen content. However, it may be less beneficial for camera/natural content or mixed content since typically there are some noises in the camera/natural content video.

4. Detailed Description

The detailed embodiments below should be considered as examples to explain general concepts. These embodiments should not be interpreted in a narrow way. Furthermore, these embodiments can be combined in any manner. In this disclosure, IntraTMP may not be limited to the current IntraTMP technology, but may be interpreted as the technology that reference (or prediction) block is obtained with samples in the current slice/tile/subpicture/picture/other video unit (e.g., CTU row) excluding the conventional intra prediction methods.

Candidate/block vector for IntraTMP: a displacement offset relative to the top-left position of the current template of the current block, which refer to the position of the reference template. And the candidate/block vector is used to obtain the prediction block for current block similar to the method in IBC.

In the following discussion, IntraTMP may be replaced by other coding tools that rely on coded/decoded/reconstructed information within the same region, e.g., palette, intra block copy (IBC).

Precision of Fractional Block Vector

g) In the example, the signaling may be a part or a branch of signaling the precision of MV/MVD.

Fractional Block Vector for Different Colour Components/Colour Formats

1. In one example, 2-tap interpolation filter may be used.

General Aspects

As used herein, the term “video unit” or “video block” may be a sequence, a picture, a slice, a tile, a brick, a subpicture, a coding tree unit (CTU)/coding tree block (CTB), a CTU/CTB row, one or multiple coding units (CUs)/coding blocks (CBs), one or multiple CTUs/CTBs, one or multiple Virtual Pipeline Data Unit (VPDU), a sub-region within a picture/slice/tile/brick. In the following discussion, IntraTMP may be replaced by other coding tools that rely on coded/decoded/reconstructed information within the same region, e.g., palette, intra block copy (IBC).

FIG. 53 illustrates a flowchart of a method 5300 for video processing in accordance with embodiments of the present disclosure. The method 5300 is implemented during a conversion between a video unit of a video and a bitstream of the video.

At block 5310, for a conversion between a video unit of a video and a bitstream of the video, a prediction or reconstruction of the video unit is generated by applying a fractional block vector to the video unit.

At block 5320, the conversion is perfomred based on the prediction or reconstruction of the video unit. In some embodiments, the conversion may include encoding the video unit into the bitstream. Alternatively, or in addition, the conversion may include decoding the video unit from the bitstream. In this way, it can be more beneficial for camera/natural content or mixed content, thereby improving coding performance.

In some embodiments, a precision of the fractional block vector is 1/2N, where N is an integer larger than 0. For example, N is equal to one of: 1, 2, 3, 4, 5, 6, 7, or 8.

In some embodiments, one or two components of the fractional block vector are fractional. In some embodiments, at least one of: bvX or bvY of the fractional block vector is fractional, and where bvX and bvY denote the two components of the fractional block vector. In some embodiments, precisions of the two components of the fractional block vector are same.

In some embodiments, whether to and/or how to use the fractional block vector are indicated in the bitstream. In some embodiments, amplitudes of the fractional block vector are indicated directly.

In some embodiments, an integer part of the fractional block vector is derived, and a fractional part of the fractional block vector is indicated. In some other embodiments, an integer part of the fractional block vector is indicated, and a fractional part of the fractional block vector is derived.

In some embodiments, costs (i.e., template matching cost) associated with a plurality of fractional locations are calculated, and the one yielding the least or highest cost is determined as the fractional part of the fractional block vector. In some embodiments, the fractional part is derived based on costs associated with one or more integer block vectors. In some embodiments, the costs comprise at least one of: a template matching cost, a sum of absolute differences (SAD), a sum of absolute transformed differences (SATD), a mean squared error (MSE), or a median absolute deviation (MAD).

In some embodiments, a determination of whether a block vector is integer or precision of the block vector, or which integer block vector is used to derive the fractional block vector is indicated.

Alternatively, the determination of whether the block vector is integer or precision of the block vector, or which integer block vector is used to derive the fractional block vector is derived. In some other embodiments, the determination of whether the block vector is integer or precision of the block vector, or which integer block vector is used to derive the fractional block vector is in a combination of indication and derivation.

In some embodiments, the determination of whether the block vector is integer or precision of the block vector, or which integer block vector is used to derive the fractional block vector is indicated in the bitstream. In some other embodiments, the determination of whether the block vector is integer or precision of the block vector, or which integer block vector is used to derive the fractional block vector is derived. Alternatively, the determination of whether the block vector is integer or precision of the block vector, or which integer block vector is used to derive the fractional block vector is derived by template matching.

In some embodiments, N integer block vectors used to derive the fractional block vector are derived by template matching, and the best integer block vector is indicated. In this case, N may be an integer number.

In some embodiments, one or more syntax elements are signalled to indicate whether to use the fractional block vector, or a precision of the fractional block vector. For example, the precision of the fractional block vector is one of: 1/2, 1/4, 1/8, or 1/16.

In some embodiments, the one or more syntax elements are used for one or more video units. In some embodiments, a first set of syntax elements is parsed from one of: a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter sets (APS), a slice header, or a picture header, and a second set of syntax elements is parsed from a video unit, and wherein whether to and/or how to use the fractional block vector is dependent on the one or more syntax elements from the first and second sets of syntax elements.

In some embodiments, the one or more syntax elements exist in one of the first and second sets of syntax elements. In some embodiments, only syntax elements from one set are used to determine whether to and/or how to use the fractional block vector.

In some embodiments, a precision of at least one of: block vector (BV) or block vector difference (BVD) is indicated in a same manner as a precision of at least one of: motion vector (MV) or motion vector difference (MVD). In some embodiments, which integer samples are used to generate the prediction using the fractional block vector is signalled. In some embodiments, one or more neighbouring fractional directions or positions of an integer block vector are signalled. In some embodiments, the neighbouring fractional directions comprise at least one of: left, right, above, bottom, left-bottom, left-above, above-right, or bottom right.

In some embodiments, a parameter that is able to indicate a neighbouring fractional direction is signalled. In some embodiments, one or more neighbouring fractional directions or positions of an integer block vector are derived by template matching, and the best neighbouring fractional direction or position is signalled.

In some embodiments, an adaptive block vector resolution or precision is used, wherein the fractional block vector is allowed to be used. In some embodiments, a plurality of block vector resolutions or precisions is allowed to be used for at least one video unit, and which block vector resolution or precision is used for the video unit is signalled or derived.

In some embodiments, one or more sets of block vector resolutions or precisions are pre-defined. Alternatively, one or more sets of block vector resolutions or precisions are signalled. In some other embodiments, one or more sets of block vector resolutions or precisions are derived.

In some embodiments, a set of block vector resolutions or precisions includes an integer block vector. In some embodiments, the integer block vector comprises at least one of: 1-pel, 2-pel, 4-pel, or 8-pel.

In some embodiments, a set of block vector resolutions or precisions includes a fractional block vector. In some embodiments, the fractional block vector comprises at least one of: 1/2-pel, 1/4-pel, 1/8-pel, or 1/16-pel.

In some embodiments, a set of block vector resolutions or precisions includes both integer block vector and fractional block vector. In some embodiments, one or more block vector resolutions or precisions in a set of block vector resolutions or precisions are updated during a coding process. In some embodiments, a predictive way is used. For example, a difference between a first block vector resolution or precision of a left block and a second block vector resolution or precision of a current block is signaled for the current block. For example, Precision A is used for a left block and Precision B is used for the current block. Instead of signal Precision B directly for the current block, a difference between Precision A and Precision B is signaled for the current block. In some embodiments, the one or more block vector resolutions or precisions are inherited or reused from video units coded before the video unit.

In some embodiments, which set of block vector resolution or precisions is used is signalled in one of: SPS, PPS, APS, tile, slice, coding tree unit (CTU), or CTU row. In some other embodiments, the signaling of which block vector resolution/precision is used is in a same manner as the precision of MV or MVD. In some embodiments, the signaling of which block vector resolution/precision is used is a part or a branch of signaling the precision of MV or MVD.

In some embodiments, precisions of the fractional block vector depend on coding information. In some embodiments, the coding information comprises at least one of: a resolution of the video, or a video content. In some embodiments, the video unit inherits a precision of block vector from one of: an already-coded frame, an already-coded block, an already-coded unit, or an already-coded region.

In some embodiments, one or more interpolation filters are used for the fractional block vector to generate the prediction or reconstruction. In some embodiments, an interpolation filter of the fractional block vector is also used to generate prediction samples of a fractional MV.

In some embodiments, the interpolation filter is an interpolation filter for luma, or wherein the interpolation filter is an interpolation filter for chroma. Alternatively, the interpolation filter is an interpolation filter for reference picture resampling (RPR). In some other embodiments, the interpolation filter is an interpolation filter for affine. In some further embodiments, the interpolation filter is an interpolation filter for adaptive half-pixel.

In some embodiments, the fractional block vector is used to generate the prediction or reconstruction of the video unit. In some embodiments, the fractional block vector is used to generate a prediction of neighbouring samples of the video unit. In some embodiments, M-tap interpolation filter is used, where M is an integer larger than 1.

In some embodiments, one interpolation filter is used for at least two precisions of fractional block vectors. In some embodiments, one interpolation filter is used for all precisions of fractional block vectors. In some embodiments, a plurality of interpolation filters is used.

In some embodiments, different interpolation filters are used for different precisions of fractional block vectors. In some embodiments, the one or more interpolation filters are different for two components of the fractional block vector.

In some embodiments, the one or more interpolation filters are different, if precisions of bvX and bvY are same. In some embodiments, the one or more interpolation filters for two components of the fractional block vector are same.

In some embodiments, a padding method is used, if an interpolation filter is used to generate the prediction or reconstruction. In some embodiments, a repetitive padding or a mirror padding is used. In some other embodiments, a padding method is not used. In some embodiments, one or more samples from integer positions are directly used as samples of a fractional position.

In some embodiments, the video unit is coded with one of: an intra block copy (IBC) mode, an intra template matching prediction (IntraTMP) mode, or other coding mode using block vector to generate the prediction or reconstruction.

In some embodiments, a precision of the fractional block vector is 1/M. In this case, M may be an integer larger than 1.

In some embodiments, whether to and/or how to use the fractional block vector is derived. In some embodiments, neighbouring reconstruction samples are used. In some embodiments, a plurality of fractional block vectors is sorted, and the best fractional block vector is used. In some embodiments, which integer samples are used to generate the prediction using the fractional block vector is derived.

In some embodiments, reordering is used to derive or indicate the fractional block vector. In some embodiments, the reordering is used to derive or indicate one or more signs of the fractional block vector. In some embodiments, the reordering is used to derive or indicate amplitudes of one or more components of the fractional block vector. In some embodiments, the reordering is used to derive whether to use the fractional block vector, or a precision of the fractional block vector.

In some embodiments, a plurality of prediction or reconstruction signals is generated using different precisions of block vectors. In some embodiments, blending weights to combine the plurality of prediction or reconstruction signals are indicated. Alternatively, the blending weights to combine the plurality of prediction or reconstruction signals are pre-defined. In some other embodiments, the blending weights to combine the plurality of prediction or reconstruction signals are derived.

In some embodiments, whether to and/how to use the different precisions of block vectors to generate the plurality of prediction or reconstruction signals are signalled. Alternatively, whether to and/how to use the different precisions of block vectors to generate the plurality of prediction or reconstruction signals are pre-defined. In some other embodiments, whether to and/how to use the different precisions of block vectors to generate the plurality of prediction or reconstruction signals are derived.

In some embodiments, different interpolation filters for fractional block vectors are used on a template and on the video unit. In some embodiments, bi-linear filters are used for the fractional block vectors on a template.

In some embodiments, the fractional block vector is used for one or more video units. In some embodiments, the fractional block vector is used to construct at least one of: an IBC advanced motion vector prediction (AMVP) candidate list, or an IBC merge candidate list. In some embodiments, the fractional block vector is directly used, if the fractional block vector is used for IBC or IntraTMP.

In some embodiments, the fractional block vector is rounded to integer block vector and used. In some embodiments, the fractional block vector is used to update a history based motion vector prediction (HMVP) table for IBC. In some embodiments, a rounded block vector of the fractional block vector is used. In some embodiments, the fractional block vector is not used to update the HMVP table for IBC.

In some embodiments, the fractional block vector is used for other coding tool. In some embodiments, the other coding tool comprises IntraTMP.

In some embodiments, a block vector candidate list is constructed for IntraTMP. In some embodiments, the fractional block vector is used to construct the block vector candidate list.

In some embodiments, a HMVP table is used for IntraTMP, and the fractional block vector is stored in the HMVP table for IntraTMP. In some embodiments, a fractional block vector of luma component is used for chroma component. In some embodiments, one or more block vectors at different positions of luma video units are used.

In some embodiments, the fractional block vector is allowed to be used with a coding tool. In some embodiments, the coding tool comprises an IBC coding tool or an IntraTMP coding tool. Alternatively, the fractional block vector is not allowed to be used with one or more the IBC coding tool or the IntraTMP coding tool.

In some embodiments, the IBC coding tool comprises at least one of: an IBC AMVP mode, an IBC merge mode, an IBC template matching (TM) merge mode, an IBC-merge block vector difference (MBVD) mode, a reconstruction-reordered IBC (RR-IBC) mode, an IBC-combined inter and intra prediction (IBC-CIIP) mode, an IBC-local illumination compensation (IBC-LIC) mode, an IBC-geometric partitioning mode (IBC-GPM) mode, or a direct block vector (DBV) mode. In some embodiments, the IntraTMP coding toolcomprsies at least one of: an IntraTMP, a multiple-candidate IntraTMP, an IntraTMP fusion, or a filtering based IntraTMP.

In some embodiments, the prediction or reconstruction generated using the fraction block vector is combined with a prediction or reconstruction signal generated by the coding tool. In some embodiments, the coding tool comprises at least one of: intra prediction, inter prediction, IBC, IntraTMP, palette, block-based differential pulse-code modulation (BDPCM), or other coding tools except for that using fractional block vector.

In some embodiments, whether to and/or how to use the fractional block vector depend on colour component or colour format. In some embodiments, the fractional block vector is used to all colour components. In some embodiments, the fractional block vector is used for luma component, but not for chroma components.

In some embodiments, the luma component refers to Y in YCbCr colour space or G in RGB colour space. In some embodiments, the chroma components comprise Cb and/or Cr in YcbCr colour space, or R and/or B in RGB colour space.

In some embodiments, whether to and/or how to use the fractional block vector for a first component depends on whether to use the fractional block vector for a second component. In some embodiments, the first component comprises chroma component, and the second component comprise luma component. In some embodiments, a way to use the fractional block vector for the first component is same as the second component. In some embodiments, a precision of the fractional block vector for the first component is same as the second component.

In some embodiments, a way to use the fractional block vector for the first component is different from the second component. In some embodiments, a precision of the fractional block vector for the first component is different from a precision of the fractional block vector for the second component.

In some embodiments, the precision of the fraction block vector for the first component is less than the precision of the fraction block vector for the second component. Alternatively, the precision of the fraction block vector for the first component is equal to the precision of the fraction block vector for the second component. In some other embodiments, the precision of the fraction block vector for the first component is larger than the precision of the fraction block vector for the second component.

In some embodiments, a precision of the chroma component depends on colour format. In some embodiments, bvCX=bvX*2/SubWidthC, and where bvCX represents a chroma component, bvX represents a component of a block vector, and SubWidthC represents a subblock width. In some embodiments, bvCY=bvY*2/SubHeightC, and where bvCY represents a chroma component, bvY represents a component of a block vector, and SubHidthC represents a subblock height. In some embodiments, SubWidthC and SubHeightC depend on colour format and are defined in following table.

chrome

In some embodiments, if the chroma format is 4:2:0, the precision of the chroma component is half of a precision of a luma component. In some embodiments, the determination of whether to and/or how to use the fractional block vector for a first video unit in the first component depends on a second video unit in the second component. In some embodiments, the second video unit is a collocated luma video unit of the first video unit.

In some embodiments, PL(x, y)=PC(x*SubWidthC, y*SubHeightC), wherein PC and PL denote positions of the first video unit and the second video unit, respectively. In some embodiments, wherein PC(x,y))=(W/2−1, H/2+1), or (PC(x,y))=(W/2+1, H/2−1), or (PC(x,y))=(W/2−1, H/2+1), or (PC(x,y))=(W/2+1, H/2+1), or (PC(x,y))=(W/2, H/2), and where (PC(x,y)) represents one of: a center position, a left-top position, a right-top position, a left-bottom position, or a right-bottom position of a chroma video unit, and W represents a width of the chroma video unit, H represents a height of the chroma video unit, x is in the range of 0 and W−1, inclusive, and y is in the range of 0 and H−1, inclusive.

In some embodiments, the second video unit is a collocated luma video unit, or a spatial neighbouring luma video units of the collocated luma video unit. In some embodiments, the spatial neighbouring luma video units comprises at least one of: to left, left-below, left-above, above, or above-right neighbouring luma video units. In some embodiments, the spatial neighbouring luma video units of the collocated luma video unit is used, if the collocated luma video unit is not coded with IBC mode, or IntraTMP mode. In some embodiments, the fractional block vector is used for the first video unit, if the second video unit is coded with IBC mode, or IntraTMP mode.

In some embodiments, if a luma BV is used for chroma components, the luma BV is modified depending on a colour format. In some embodiments, the luma BV is integer or fractional. In some embodiments, BVC =(BVL (x, y) X>>(SubWidthC−1), BVL (x, y) Y>>(SubHeightC-1)), or BVC=(BVL (x+1, y+1) X>>(SubWidthC−1), BVL (x+1, y+1) Y>>(SubHeightC-1)), or BVC=(BVL (x−1, y−1) X>>(SubWidthC−1), BVL (x−1, y−1) Y>>(SubHeightC-1)), or BVC=(BVL (x+1, y−1) X>>(SubWidthC−1), BVL (x+1, y−1) Y>>(SubHeightC-1)), or BVC=(BVL (x-1,y+1) X>>(SubWidthC−1), BVL (x-1,y+1) Y>>(SubHeightC-1)), and where BVC represents a chroma block vector, BVL represents a luma block vector, and W represents a width of the chroma video unit, H represents a height of the chroma video unit, x is in the range of 0 and W−1, inclusive, and y is in the range of 0 and H−1, inclusive.

In some embodiments, BVC is used to derive a prediction of the chroma video unit. In some embodiments, if BVC is a fractional BV, BVC is rounded to an integer BV. In some embodiments, a clipping operation is during rounding the fractional BV. In some embodiments, fractional BV is still used to derive a reference template.

In some embodiments, a same interpolation method is used to derive the reference template as an interpolation method to generate the prediction of the chroma video unit. In some embodiments, a different interpolation method is used to derive the reference template as an interpolation method to generate the prediction of the video unit. In some embodiments, 2-tap interpolation filter is used.

In some embodiments, the video unit comprises at least one of: a color component, a prediction block (PB), a transform block (TB), a coding block (CB), a prediction unit (PU), a transform unit (TU), a coding tree block (CTB), a coding unit (CU), a coding tree unit (CTU), a CTU row, groups of CTU, a slice, a tile, a sub-picture, a block, a sub-region within a block, or a region containing more than one sample or pixel.

In some embodiments, an indication of whether to and/or how to generate the prediction or reconstruction of the video unit by applying the fractional block vector to the video unit 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 generate the prediction or reconstruction of the video unit by applying the fractional block vector to the video unit 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, the method 5300 further comprises: determining whether to and/or how to generate the prediction or reconstruction of the video unit by applying the fractional block vector to the video unit based on at least one of the followings: a message indicated in one of: DPS, SPS, VPS, PPS, APS, picture header, slice header, tile group header, largest coding unit (LCU), coding unit (CU), LCU row, group of LCUs, TU, PU block, video coding unit, a position of one of: CU, PU, TU, block, video coding unit, a block dimension of current block and/or its neighbouring blocks, a block shape of current block and/or its neighbouring blocks, a coded mode of the video unit, an indication of colour format, a coding tree structure a slice type, a tile group type, a picture type, a colour component, a temporal layer identity, profiles or levels or Tiers of a standard.

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: generating a prediction or reconstruction of a video unit of the video by applying a fractional block vector to the video unit; and generating the bitstream based on the prediction or reconstruction of the video unit.

According to still further embodiments of the present disclosure, a method for storing bitstream of a video is provided. The method comprises: generating a prediction or reconstruction of a video unit of the video by applying a fractional block vector to the video unit; generating the bitstream based on the prediction or reconstruction of the video unit; and storing the bitstream in a non-transitory computer-readable recording 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: generating, for a conversion between a video unit of a video and a bitstream of the video, a prediction or reconstruction of the video unit by applying a fractional block vector to the video unit; and performing the conversion based on the prediction or reconstruction of the video unit.

Clause 2. The method of clause 1, wherein a precision of the fractional block vector is 1/2N, wherein N is an integer larger than 0.

Clause 3. The method of clause 2, wherein N is equal to one of: 1, 2, 3, 4, 5, 6, 7, or 8.

Clause 4. The method of clause 1, wherein one or two components of the fractional block vector are fractional.

Clause 5. The method of clause 4, wherein at least one of: bvX or bvY of the fractional block vector is fractional, and wherein bvX and bvY denote the two components of the fractional block vector.

Clause 6. The method of clause 4, wherein precisions of the two components of the fractional block vector are same.

Clause 7. The method of clause 1, wherein whether to and/or how to use the fractional block vector are indicated in the bitstream.

Clause 8. The method of clause 1, wherein amplitudes of the fractional block vector are indicated directly.

Clause 9. The method of clause 1, wherein an integer part of the fractional block vector is derived, and a fractional part of the fractional block vector is indicated.

Clause 10. The method of clause 9, wherein costs associated with a plurality of fractional locations are calculated, and the one yielding the least or highest cost is determined as the fractional part of the fractional block vector.

Clause 11. The method of clause 9, wherein the fractional part is derived based on costs associated with one or more integer block vectors.

Clause 12. The method of clause 11, wherein the costs comprise at least one of: a template matching cost, a sum of absolute differences (SAD), a sum of absolute transformed differences (SATD), a mean squared error (MSE), or a median absolute deviation (MAD).

Clause 13. The method of clause 1, wherein an integer part of the fractional block vector is indicated, and a fractional part of the fractional block vector is derived.

Clause 14. The method of clause 1, wherein a determination of whether a block vector is integer or precision of the block vector, or which integer block vector is used to derive the fractional block vector is indicated, or wherein the determination of whether the block vector is integer or precision of the block vector, or which integer block vector is used to derive the fractional block vector is derived, or wherein the determination of whether the block vector is integer or precision of the block vector, or which integer block vector is used to derive the fractional block vector is in a combination of indication and derivation.

Clause 15. The method of clause 14, wherein the determination of whether the block vector is integer or precision of the block vector, or which integer block vector is used to derive the fractional block vector is indicated in the bitstream.

Clause 16. The method of clause 14, wherein the determination of whether the block vector is integer or precision of the block vector, or which integer block vector is used to derive the fractional block vector is derived.

Clause 17. The method of clause 16, wherein the determination of whether the block vector is integer or precision of the block vector, or which integer block vector is used to derive the fractional block vector is derived by template matching.

Clause 18. The method of clause 14, wherein N integer block vectors used to derive the fractional block vector are derived by template matching, and the best integer block vector is indicated, and wherein N is an integer number.

Clause 19. The method of clause 7, wherein one or more syntax elements are signalled to indicate whether to use the fractional block vector, or a precision of the fractional block vector.

Clause 20. The method of clause 19, wherein the precision of the fractional block vector is one of: 1/2, 1/4, 1/8, or 1/16.

Clause 21. The method of clause 19, wherein the one or more syntax elements are used for one or more video units.

Clause 22. The method of clause 19, wherein a first set of syntax elements is parsed from one of: a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter sets (APS), a slice header, or a picture header, and a second set of syntax elements is parsed from a video unit, and wherein whether to and/or how to use the fractional block vector is dependent on the one or more syntax elements from the first and second sets of syntax elements.

Clause 23. The method of clause 22, wherein the one or more syntax elements exist in one of the first and second sets of syntax elements.

Clause 24. The method of clause 22, wherein only syntax elements from one set are used to determine whether to and/or how to use the fractional block vector.

Clause 25. The method of clause 7, wherein a precision of at least one of: block vector (BV) or block vector difference (BVD) is indicated in a same manner as a precision of at least one of: motion vector (MV) or motion vector difference (MVD).

Clause 26. The method of clause 7, wherein which integer samples are used to generate the prediction using the fractional block vector is signalled.

Clause 27. The method of clause 26, wherein one or more neighbouring fractional directions or positions of an integer block vector are signalled.

Clause 28. The method of clause 27, wherein the neighbouring fractional directions comprise at least one of: left, right, above, bottom, left-bottom, left-above, above-right, or bottom right.

Clause 29. The method of clause 27, wherein a parameter that is able to indicate a neighbouring fractional direction is signalled.

Clause 30. The method of clause 26, wherein one or more neighbouring fractional directions or positions of an integer block vector are derived by template matching, and the best neighbouring fractional direction or position is signalled.

Clause 31. The method of clause 1, wherein an adaptive block vector resolution or precision is used, wherein the fractional block vector is allowed to be used.

Clause 32. The method of clause 31, wherein a plurality of block vector resolutions or precisions is allowed to be used for at least one video unit, and wherein which block vector resolution or precision is used for the video unit is signalled or derived.

Clause 33. The method of clause 32, wherein one or more sets of block vector resolutions or precisions are pre-defined, or wherein one or more sets of block vector resolutions or precisions are signalled, or wherein one or more sets of block vector resolutions or precisions are derived.

Clause 34. The method of clause 33, wherein a set of block vector resolutions or precisions includes an integer block vector.

Clause 35. The method of clause 34, wherein the integer block vector comprises at least one of: 1-pel, 2-pel, 4-pel, or 8-pel.

Clause 36. The method of clause 33, wherein a set of block vector resolutions or precisions includes a fractional block vector.

Clause 37. The method of clause 36, wherein the fractional block vector comprises at least one of: 1/2-pel, 1/4-pel, 1/8-pel, or 1/16-pel.

Clause 38. The method of clause 33, wherein a set of block vector resolutions or precisions includes both integer block vector and fractional block vector.

Clause 39. The method of clause 33, wherein one or more block vector resolutions or precisions in a set of block vector resolutions or precisions are updated during a coding process.

Clause 40. The method of clause 39, wherein a difference between a first block vector resolution or precision of a left block and a second block vector resolution or precision of a current block is signaled for the current block.

Clause 41. The method of clause 39, wherein the one or more block vector resolutions or precisions are inherited or reused from video units coded before the video unit.

Clause 42. The method of clause 33, wherein which set of block vector resolution or precisions is used is signalled in one of: SPS, PPS, APS, tile, slice, coding tree unit (CTU), or CTU row.

Clause 43. The method of clause 33, wherein the signaling of which block vector  resolution/precision is used is in a same manner as the precision of MV or MVD.

Clause 44. The method of clause 33, wherein the signaling of which block vector resolution/precision is used is a part or a branch of signaling the precision of MV or MVD.

Clause 45. The method of clause 32, wherein precisions of the fractional block vector depend on coding information.

Clause 46. The method of clause 45, wherein the coding information comprises at least one of: a resolution of the video, or a video content.

Clause 47. The method of clause 32, wherein the video unit inherits a precision of block vector from one of: an already-coded frame, an already-coded block, an already-coded unit, or an already-coded region.

Clause 48. The method of clause 1, wherein one or more interpolation filters are used for the fractional block vector to generate the prediction or reconstruction.

Clause 49. The method of clause 48, wherein an interpolation filter of the fractional block vector is also used to generate prediction samples of a fractional MV.

Clause 50. The method of clause 49, wherein the interpolation filter is an interpolation filter for luma, or wherein the interpolation filter is an interpolation filter for chroma, or wherein the interpolation filter is an interpolation filter for reference picture resampling (RPR), or wherein the interpolation filter is an interpolation filter for affine, or wherein the interpolation filter is an interpolation filter for adaptive half-pixel.

Clause 51. The method of clause 48, wherein the fractional block vector is used to generate the prediction or reconstruction of the video unit.

Clause 52. The method of clause 48, wherein the fractional block vector is used to generate a prediction of neighbouring samples of the video unit.

Clause 53. The method of clause 48, wherein M-tap interpolation filter is used, wherein M is an integer larger than 1.

Clause 54. The method of clause 48, wherein one interpolation filter is used for at least two precisions of fractional block vectors.

Clause 55. The method of clause 54, wherein one interpolation filter is used for all precisions of fractional block vectors.

Clause 56. The method of clause 48, wherein a plurality of interpolation filters is used.

Clause 57. The method of clause 56, wherein different interpolation filters are used for different precisions of fractional block vectors.

Clause 58. The method of clause 48, wherein the one or more interpolation filters are different for two components of the fractional block vector.

Clause 59. The method of clause 58, wherein the one or more interpolation filters are different, if precisions of bvX and bvY are same.

Clause 60. The method of clause 58, wherein the one or more interpolation filters for two components of the fractional block vector are same.

Clause 61. The method of clause 48, wherein a padding method is used, if an interpolation filter is used to generate the prediction or reconstruction.

Clause 62. The method of clause 61, wherein a repetitive padding or a mirror padding is used.

Clause 63. The method of clause 48, wherein a padding method is not used.

Clause 64. The method of clause 63, wherein one or more samples from integer positions are directly used as samples of a fractional position.

Clause 65. The method of clause 1, wherein the video unit is coded with one of: an intra block copy (IBC) mode, an intra template matching prediction (IntraTMP) mode, or other coding mode using block vector to generate the prediction or reconstruction.

Clause 66. The method of clause 1, wherein a precision of the fractional block vector is 1/M, wherein M is an integer larger than 1.

Clause 67. The method of clause 1, wherein whether to and/or how to use the fractional block vector is derived.

Clause 68. The method of clause 67, wherein neighbouring reconstruction samples are used.

Clause 69. The method of clause 67, wherein a plurality of fractional block vectors is sorted, and the best fractional block vector is used.

Clause 70. The method of clause 67, wherein which integer samples are used to generate the prediction using the fractional block vector is derived.

Clause 71. The method of clause 1, wherein reordering is used to derive or indicate the fractional block vector.

Clause 72. The method of clause 71, wherein the reordering is used to derive or indicate one or more signs of the fractional block vector.

Clause 73. The method of clause 71, wherein the reordering is used to derive or indicate amplitudes of one or more components of the fractional block vector.

Clause 74. The method of clause 71, wherein the reordering is used to derive whether to use the fractional block vector, or a precision of the fractional block vector.

Clause 75. The method of clause 1, wherein a plurality of prediction or reconstruction signals is generated using different precisions of block vectors.

Clause 76. The method of clause 75, wherein blending weights to combine the plurality of prediction or reconstruction signals are indicated, or wherein the blending weights to combine the plurality of prediction or reconstruction signals are pre-defined, or wherein the blending weights to combine the plurality of prediction or reconstruction signals are derived.

Clause 77. The method of 75, wherein whether to and/how to use the different precisions of block vectors to generate the plurality of prediction or reconstruction signals are signalled, or wherein whether to and/how to use the different precisions of block vectors to generate the plurality of prediction or reconstruction signals are pre-defined, or wherein whether to and/how to use the different precisions of block vectors to generate the plurality of prediction or reconstruction signals are derived.

Clause 78. The method of clause 1, wherein different interpolation filters for fractional block vectors are used on a template and on the video unit.

Clause 79. The method of clause 78, wherein bi-linear filters are used for the fractional block vectors on a template.

Clause 80. The method of clause 1, wherein the fractional block vector is used for one or more video units.

Clause 81. The method of clause 80, wherein the fractional block vector is used to construct at least one of: an IBC advanced motion vector prediction (AMVP) candidate list, or an IBC merge candidate list.

Clause 82. The method of clause 81, wherein the fractional block vector is directly used, if the fractional block vector is used for IBC or IntraTMP.

Clause 83. The method of clause 80, wherein the fractional block vector is rounded to integer block vector and used.

Clause 84. The method of clause 80, wherein the fractional block vector is used to update a history based motion vector prediction (HMVP) table for IBC.

Clause 85. The method of clause 80, wherein a rounded block vector of the fractional block vector is used.

Clause 86. The method of clause 80, wherein the fractional block vector is not used to update the HMVP table for IBC.

Clause 87. The method of clause 80, wherein the fractional block vector is used for other coding tool.

Clause 88. The method of clause 87, wherein the other coding tool comprises IntraTMP.

Clause 89. The method of clause 80, wherein a block vector candidate list is constructed for IntraTMP.

Clause 90. The method of clause 89, wherein the fractional block vector is used to construct the block vector candidate list.

Clause 91. The method of clause 80, wherein a HMVP table is used for IntraTMP, and the fractional block vector is stored in the HMVP table for IntraTMP.

Clause 92. The method of clause 80, wherein a fractional block vector of luma component is used for chroma component.

Clause 93. The method of clause 80, wherein one or more block vectors at different positions of luma video units are used.

Clause 94. The method of clause 1, wherein the fractional block vector is allowed to be used with a coding tool.

Clause 95. The method of clause 94, wherein the coding tool comprises an IBC coding tool or an IntraTMP coding tool, or wherein the fractional block vector is not allowed to be used with one or more the IBC coding tool or the IntraTMP coding tool.

Clause 96. The method of clause 95, wherein the IBC coding tool comprises at least one of: an IBC AMVP mode, an IBC merge mode, an IBC template matching (TM) merge mode, an IBC-merge block vector difference (MBVD) mode, a reconstruction-reordered IBC (RR-IBC) mode, an IBC-combined inter and intra prediction (IBC-CIIP) mode, an IBC-local illumination compensation (IBC-LIC) mode, an IBC-geometric partitioning mode (IBC-GPM) mode, or a direct block vector (DBV) mode.

Clause 97. The method of clause 95, wherein the IntraTMP coding toolcomprsies at least one of: an IntraTMP, a multiple-candidate IntraTMP, an IntraTMP fusion, or a filtering based IntraTMP.

Clause 98. The method of clause 94, wherein the prediction or reconstruction generated using the fraction block vector is combined with a prediction or reconstruction signal generated by the coding tool.

Clause 99. The method of clause 98, wherein the coding tool comprises at least one of: intra prediction, inter prediction, IBC, IntraTMP, palette, block-based differential pulse-code modulation (BDPCM), or other coding tools except for that using fractional block vector.

Clause 100. The method of clause 1, wherein whether to and/or how to use the fractional block vector depend on colour component or colour format.

Clause 101. The method of clause 100, wherein the fractional block vector is used to all colour components.

Clause 102. The method of clause 100, wherein the fractional block vector is used for luma component, but not for chroma components.

Clause 103. The method of clause 102, wherein the luma component refers to Y in YCbCr colour space or G in RGB colour space.

Clause 104. The method of clause 102, wherein the chroma components comprise Cb and/or Cr in YcbCr colour space, or R and/or B in RGB colour space.

Clause 105. The method of clause 100, wherein whether to and/or how to use the fractional block vector for a first component depends on whether to use the fractional block vector for a second component.

Clause 106. The method of clause 105, wherein the first component comprises chroma component, and the second component comprise luma component.

Clause 107. The method of clause 105, wherein a way to use the fractional block vector for the first component is same as the second component.

Clause 108. The method of clause 107, wherein a precision of the fractional block vector for the first component is same as the second component.

Clause 109. The method of clause 105, wherein a way to use the fractional block vector for the first component is different from the second component.

Clause 110. The method of clause 109, wherein a precision of the fractional block vector for the first component is different from a precision of the fractional block vector for the second component.

Clause 111. The method of clause 110, wherein the precision of the fraction block vector for the first component is less than the precision of the fraction block vector for the second component, or wherein the precision of the fraction block vector for the first component is equal to the precision of the fraction block vector for the second component, or wherein the precision of the fraction block vector for the first component is larger than the precision of the fraction block vector for the second component.

Clause 112. The method of clause 105, wherein a precision of the chroma component depends on colour format.

Clause 113. The method of clause 112, wherein bvCX=bvX*2/Sub WidthC, and wherein bvCX represents a chroma component, bvX represents a component of a block vector, and SubWidthC represents a subblock width.

Clause 114. The method of clause 112, wherein bvCY=bvY*2/SubHeightC, and wherein bvCY represents a chroma component, bvY represents a component of a block vector, and SubHidthC represents a subblock height.

Clause 115. The method of clause 113 or 114, wherein SubWidthC and SubHeightC depend on colour format and are defined in following table.

chrome

Clause 116. The method of clause 105, wherein if the chroma format is 4:2:0, the precision of the chroma component is half of a precision of a luma component.

Clause 117. The method of clause 105, wherein the determination of whether to and/or how to use the fractional block vector for a first video unit in the first component depends on a second video unit in the second component.

Clause 118. The method of clause 117, wherein the second video unit is a collocated luma video unit of the first video unit.

Clause 119. The method of clause 118, wherein PL(x, y)=PC(x* SubWidthC, y*SubHeightC), wherein PC and PL denote positions of the first video unit and the second video unit, respectively.

Clause 120. The method of clause 118, wherein PC(x, y))=(W/2−1, H/2+1), or wherein (PC(x,y))=(W/2+1, H/2−1), or wherein (PC(x,y))=(W/2−1, H/2+1), or wherein (PC(x,y))=(W/2+1, H/2+1), or wherein (PC(x,y))=(W/2, H/2), and wherein (PC(x, y)) represents one of: a center position, a left-top position, a right-top position, a left-bottom position, or a right-bottom position of a chroma video unit, and W represents a width of the chroma video unit, H represents a height of the chroma video unit, x is in the range of 0 and W−1, inclusive, and y is in the range of 0 and H−1, inclusive.

Clause 121. The method of clause 118, wherein the second video unit is a collocated luma video unit, or a spatial neighbouring luma video units of the collocated luma video unit.

Clause 122. The method of clause 121, wherein the spatial neighbouring luma video units comprises at least one of: to left, left-below, left-above, above, or above-right neighbouring luma video units.

Clause 123. The method of clause 121, wherein the spatial neighbouring luma video units of the collocated luma video unit is used, if the collocated luma video unit is not coded with IBC mode, or IntraTMP mode.

Clause 124. The method of clause 121, wherein the fractional block vector is used for the first video unit, if the second video unit is coded with IBC mode, or IntraTMP mode.

Clause 125. The method of clause 100, wherein if a luma BV is used for chroma components, the luma BV is modified depending on a colour format.

Clause 126. The method of clause 125, wherein the luma BV is integer or fractional.

Clause 127. The method of clause 125, wherein

Clause 128. The method of clause 127, wherein BVC is used to derive a prediction of the chroma video unit.

Clause 129. The method of clause 127, wherein if BVC is a fractional BV, BVC is rounded to an integer BV.

Clause 130. The method of clause 129, wherein a clipping operation is during rounding the fractional BV.

Clause 131. The method of clause 127, wherein fractional BV is still used to derive a reference template.

Clause 132. The method of clause 131, wherein a same interpolation method is used to derive the reference template as an interpolation method to generate the prediction of the chroma video unit.

Clause 133. The method of clause 131, wherein a different interpolation method is used to derive the reference template as an interpolation method to generate the prediction of the video unit.

Clause 134. The method of clause 133, wherein 2-tap interpolation filter is used.

Clause 135. The method of any of clauses 1-134, wherein the video unit comprises at least one of: a color component, a prediction block (PB), a transform block (TB), a coding block (CB), a prediction unit (PU), a transform unit (TU), a coding tree block (CTB), a coding unit (CU), a coding tree unit (CTU), a CTU row, groups of CTU, a slice, a tile, a sub-picture, a block, a sub-region within a block, or a region containing more than one sample or pixel.

Clause 136. The method of any of clauses 1-135, wherein an indication of whether to and/or how to generate the prediction or reconstruction of the video unit by applying the fractional block vector to the video unit is indicated at one of the followings: sequence level, group of pictures level, picture level, slice level, or tile group level.

Clause 137. The method of any of clauses 1-135, wherein an indication of whether to and/or how to generate the prediction or reconstruction of the video unit by applying the fractional block vector to the video unit 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 138. The method of any of clauses 1-135, further comprising: determining whether to and/or how to generate the prediction or reconstruction of the video unit by applying the fractional block vector to the video unit based on at least one of the followings: a message indicated in one of: DPS, SPS, VPS, PPS, APS, picture header, slice header, tile group header, largest coding unit (LCU), coding unit (CU), LCU row, group of LCUs, TU, PU block, video coding unit, a position of one of: CU, PU, TU, block, video coding unit, a block dimension of current block and/or its neighbouring blocks, a block shape of current block and/or its neighbouring blocks, a coded mode of the video unit, an indication of colour format, a coding tree structure a slice type, a tile group type, a picture type, a colour component, a temporal layer identity, profiles or levels or Tiers of a standard.

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

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

Clause 141. 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-140.

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

Clause 143. 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, where in the method comprises: generating a prediction or reconstruction of a video unit of the video by applying a fractional block vector to the video unit; and generating the bitstream based on the prediction or reconstruction of the video unit.

Clause 144. A method for storing a bitstream of a video, comprising: generating a prediction or reconstruction of a video unit of the video by applying a fractional block vector to the video unit; generating the bitstream based on the prediction or reconstruction of the video unit; and storing the bitstream in a non-transitory computer-readable recording medium.

Example Device

FIG. 54 illustrates a block diagram of a computing device 5400 in which various embodiments of the present disclosure can be implemented. The computing device 5400 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 5400 shown in FIG. 54 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. 54, the computing device 5400 includes a general-purpose computing device 5400. The computing device 5400 may at least comprise one or more processors or processing units 5410, a memory 5420, a storage unit 5430, one or more communication units 5440, one or more input devices 5450, and one or more output devices 5460.

In some embodiments, the computing device 5400 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 (PC S) 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 5400 can support any type of interface to a user (such as “wearable” circuitry and the like).

The processing unit 5410 may be a physical or virtual processor and can implement various processes based on programs stored in the memory 5420. 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 5400. The processing unit 5410 may also be referred to as a central processing unit (CPU), a microprocessor, a controller or a microcontroller.

The computing device 5400 typically includes various computer storage medium. Such medium can be any medium accessible by the computing device 5400, including, but not limited to, volatile and non-volatile medium, or detachable and non-detachable medium. The memory 5420 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 5430 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 5400.

The computing device 5400 may further include additional detachable/non-detachable, volatile/non-volatile memory medium. Although not shown in FIG. 54, 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 5440 communicates with a further computing device via the communication medium. In addition, the functions of the components in the computing device 5400 can be implemented by a single computing cluster or multiple computing machines that can communicate via communication connections. Therefore, the computing device 5400 can operate in a networked environment using a logical connection with one or more other servers, networked personal computers (PC s) or further general network nodes.

The input device 5450 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 5460 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 5440, the computing device 5400 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 5400, or any devices (such as a network card, a modem and the like) enabling the computing device 5400 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 5400 may be used to implement video encoding/decoding in embodiments of the present disclosure. The memory 5420 may include one or more video coding modules 5425 having one or more program instructions. These modules are accessible and executable by the processing unit 5410 to perform the functionalities of the various embodiments described herein.

In the example embodiments of performing video encoding, the input device 5450 may receive video data as an input 5470 to be encoded. The video data may be processed, for example, by the video coding module 5425, to generate an encoded bitstream. The encoded bitstream may be provided via the output device 5460 as an output 5480.

In the example embodiments of performing video decoding, the input device 5450 may receive an encoded bitstream as the input 5470. The encoded bitstream may be processed, for example, by the video coding module 5425, to generate decoded video data. The decoded video data may be provided via the output device 5460 as the output 5480.