Method, apparatus, and medium for video processing

Subblock-based spatial motion vector prediction enhances coding efficiency in video processing by utilizing spatial information, addressing inefficiencies in existing video coding technologies.

WO2026136861A1PCT designated stage Publication Date: 2026-06-25BYTEDANCE INC

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
BYTEDANCE INC
Filing Date
2025-12-19
Publication Date
2026-06-25

AI Technical Summary

Technical Problem

Existing video coding technologies, such as MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4 AVC, ITU-T H.265 HEVC, and VVC, require improvements in coding efficiency.

Method used

Implementing subblock-based spatial motion vector prediction (sb-SMVP) to enhance coding performance and efficiency by utilizing spatial information in video processing.

Benefits of technology

Improves coding performance and efficiency in video processing by leveraging spatial information for motion vector prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US2025060634_25062026_PF_FP_ABST
    Figure US2025060634_25062026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a solution for video processing. 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 subblock-based spatial motion vector prediction (sb-SMVP) candidate of the video unit based on motion information of at least one block in a current picture of the video, wherein the at least one block is neighboring to the video unit; and performing the conversion based on the sb-SMVP prediction candidate.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD, APPARATUS, AND MEDIUM FOR VIDEO PROCESSING FIELDS[OOOlJEmbodiments of the present disclosure relates generally to video processing techniques, and more particularly, to subblock based spatial motion vector prediction.BACKGROUND

[0002] In nowadays, digital video capabilities are being applied in various aspects of peoples’ lives. Multiple types of video compression technologies, such as motion picture expert group (MPEG) -2, MPEG-4, international telecommunication union - telecommunication standardization sector (ITU-T) H.263, ITU-T H.264 / MPEG-4 Part 10 advanced video coding (AVC), ITU-T H.265 high efficiency video coding (HEVC) 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 improve.SUMMARY

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

[0004] 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 subblock -based spatial motion vector prediction (sb-SMVP) candidate of the video unit based on motion information of at least one block in a current picture of the video, wherein the at least one block is neighboring to the video unit; and performing the conversion based on the sb-SMVP prediction candidate. The method in accordance with the first aspect of the present disclosure can improve coding performance and coding efficiency by using spatial information in generating subblock-based MVP.

[0005] 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.

[0006] 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.

[0007] 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 subblock¬ based spatial motion vector prediction (sb-SMVP) candidate of a video unit of the video based on motion information of at least one block in a current picture of the video, wherein the at least one block is neighboring to the video unit; and generating the bitstream based on the sb-SMVP prediction candidate.1 F1257162PCT

[0008] In a fifth aspect, a method for storing a bitstream of a video is proposed. The method comprises: generating a subblock -based spatial motion vector prediction (sb-SMVP) candidate of a video unit of the video based on motion information of at least one block in a current picture of the video, wherein the at least one block is neighboring to the video unit; generating the bitstream based on the sb-SMVP prediction candidate; and storing the bitstream in a non-transitory computer-readable recording medium.

[0009] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description, This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.BRIEF DESCRIPTION OF THE DRA WINGS[OOlOJThrough the following detailed description with reference to the accompanying drawings, the above and other objectives, features, and advantages of example embodiments of the present disclosure will become more apparent. In the example embodiments of the present disclosure, the same reference numerals usually refer to the same components.

[0011] Fig. 1 illustrates a block diagram of an example video coding system in accordance with some embodiments of the present disclosure;

[0012] Fig. 2 illustrates a block diagram of an example video encoder in accordance with some embodiments of the present disclosure;

[0013] Fig. 3 illustrates a block diagram of an example video decoder in accordance with some embodiments of the present disclosure;

[0014] Fig 4 illustrates an illustration of the effect of the slope adjustment parameter “u” where model created w'ith the current CCLM is at left and model updated as proposed is at right;[OOlSJFig. 5 illustrates neighboring sblocks (L, A, BL, AR, AL) used in the derivation of a general MPM list;

[0016] Fig 6 illustrates neighboring reconstructed samples used for decoder side intra mode derivation (DIMD) chroma mode;

[0017] Fig 7 illustrates intra template matching search area used;

[0018] Fig. 8 illustrates the use of Intra template matching prediction (IntraTMP) block vector for IBC block;

[0019] Fig. 9A illustrates the division method for angular modes;

[0020] Fig. 9B illustrates the division method for angular modes;

[0021] Fig. 10 illustrates an extended multiple reference line (MRL) candidate list;

[0022] Fig. 11 illustrates an illustration of the template area;2 F1257162PCT

[0023] Fig 12 illustrates a spatial part of the convolutional filter;

[0024] Fig. 13 illustrates reference area (with its paddings) used to derive the filter coefficients;

[0025] Fig 14 illustrates four Sobel based gradient patterns for gradient linear model (GLM);

[0026] Fig. 15 illustrates non-downsampled luma samples;

[0027] Fig. 16 illustrates reference area for block vector guided convolutional cross-component model (BVG-CCCM);

[0028] Fig. 17 illustrates spatial samples used for gradient and location based convolutional cross¬ component model (GL-CCCM);

[0029] Fig. 18 illustrates various downsampling filters used in cross-component models;

[0030] Fig. 19 illustrates filter on samples of multi-model based cross-component linear model (MM- CCLM) / multi-model based convolutional cross-component model (MM-CCCM);

[0031] Fig 20 illustrates the template adjacent to the current chroma coding unit (CU);[0032 JFig. 21 illustrates spatial geometric portioning mode (GPM) candidates;

[0033] Fig 22 illustrates an GPM template;[0034 JFig. 23 illustrates an GPM blending;

[0035] Fig. 24 illustrates a transform selection process for directional planar modes;

[0036] Fig. 25 illustrates luma blocks used to derive direct block vector;

[0037] Fig. 26 illustrates three extrapolation filter-based intra prediction (EIP) filter shapes;

[0038] Fig. 27 illustrates three types of reconstructed area for EIP filter;

[0039] Fig. 28 illustrates L shaped neighborhood for a given predicted block;[0040JFig. 29 illustrates spatial neighboring blocks used to derive the spatial merge candidates;

[0041] Fig. 30 illustrates subblock templates generation of subblock-based temporal motion vector prediction (SbTMVP);

[0042] Fig 31 illustrates possible MVs of the proposed mode;[0043JFig. 32 illustrates template matching performs on a search area around initial MV;

[0044] Fig 33 illustrates diamond regions in the search area;[0045JFig. 34 illustrates a template;

[0046] Fig 35 illustrates first history parameter table (HPT) and the second HPT;[0047JFig. 36 illustrates spatial neighbors for deriving affine merge / advanced motion vector predictionF1257162PCT(AMVP) candidates;

[0048] Fig. 37 illustrates from non-adjacent neighbors to the first ty pe of constructed affine merge / AMVP candidates;

[0049] Fig. 38 illustrates frequency responses of the interpolation filter and the VVC interpolation filter at half-pel phase;

[0050] Fig. 39 illustrates template and reference samples of the template in reference pictures;

[0051] Fig. 40 illustrates template and reference samples of the template for block with sub -block motion using the motion information of the subblocks of the current block;[0052JFig. 41 illustrates additional directions along k*x / 8 diagonal angles;

[0053] Fig. 42 illustrates the neighboring 4x4 subblocks that are used for regression based motion vector field (RMVF) parameter derivation;

[0054] Fig 43 illustrates the ramp function for the weights for GPM blending;[0055 JFig. 44 illustrates GPM with inter and intra prediction;

[0056] Fig. 45 illustrates the edge on templates;[0057JFig. 46 illustrates an example of how to derive auto relocated block vector prediction (AR-BVP);

[0058] Fig. 47 illustrates five positions in Bn;[0059 JFig. 48 illustrates padding candidates for the replacement of the zero-vector in the intra block copy (IBC) list;[0060JFig. 49 illustrates an IBC candidate clustering based on the L2 distance and the TM cost;[006 IJFig. 50 illustrates an IBC reference region depending on current CU position;

[0062] Fig. 51 illustrates a reference area for IBC;

[0063] Fig. 52 illustrates a prediction of block vector difference (BVD);

[0064] Fig. 53 illustrates a motion compensated boundary padding method;

[0065] Fig. 54 illustrates an example of deriving a M*4 padding block w ith a left padding direction;

[0066] Fig. 55 illustrates block vector (B V) adjustment;

[0067] Fig. 56 illustrates the InterCCCM method on the decoder;

[0068] Fig. 57 illustrates luma samples L0 to L5 in relation to the chroma sample C;

[0069] Fig. 58A illustrates an example of sbSMVP with vertical MV prediction;

[0070] Fig. 58B illustrates an example of sbSMVP with horizontal MV prediction;4 F1257162PCT

[0071] Fig 58C illustrates an example of sbSMVP with diagonal MV prediction;

[0072] Fig. 58D illustrates an example of sbSMVP with inverse-diagonal MV prediction from above neighbouring blocks;

[0073] Fig. 58E illustrates an example of sbSMVP with inverse -diagonal MV prediction from left neighbouring blocks;

[0074] Fig. 58F illustrates example of sbSMVP with vertical MV prediction from non-adjacent neighbouring blocks;

[0075] Fig. 58G illustrates example of sbSMVP with horizontal MV prediction from non-adjacent neighbouring blocks;

[0076] Fig 59 illustrates a flowchart of a method for video processing in accordance with some embodiments of the present disclosure; and

[0077] Fig. 60 illustrates a block diagram of a computing device in which various embodiments of the present disclosure can be implemented.

[0078] Throughout the drawings, the same or similar reference numerals usually refer to the same or similar elements.DETAILED DESCRIPTION

[0079] Principle of the present disclosure will now be described with reference to some embodiments. It is to be understood that these embodiments are described only for the purpose of illustration and help those skilled in the art to understand and implement the present disclosure, without suggesting any limitation as to the scope of the disclosure. The disclosure described herein can be implemented in various manners other than the ones described below.

[0080] ln the following description and claims, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skills in the art to which this disclosure belongs.

[0081] References in the present disclosure to “one embodiment,’’ “an embodiment,” “an example embodiment,” and the like indicate that the embodiment described may include a particular feature, structure, or characteristic, but it is not necessary that every embodiment includes the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an example embodiment, it is submitted that it is within the knowledge of one skilled in the art to affect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.

[0082] It shall be understood that although the terms “first” and “second” etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second 5 F1257162PCTelement, and similarly, a second element could be termed a first element, without departing from the scope of example embodiments. As used herein, the term “and / or” includes any and all combinations of one or more of the listed terms.

[0083] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises”, “comprising”, “has”, “having”, “includes” and / or “including”, when used herein, specify the presence of stated features, elements, and / or components etc,, but do not preclude the presence or addition of one or more other features, elements, components and / or combinations thereof.Example Environment

[0084] 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.

[0085] 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.

[0086] 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.

[0087] 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.

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

[0089] 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.

[0090] 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.

[0091] In some embodiments, the video encoder 200 may include a partition unit 201, a prediction 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.

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

[0093] 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.

[0094] 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.

[0095] 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 combined inter and intra prediction (CUP) mode in which the prediction is based on an inter prediction signal and an intra prediction 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 -prediction.

[0096] 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.7 F1257162PCT

[0097] 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 pic ture. 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.[0098 Jin 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.

[0099] 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. [OlOOJIn 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.[0101 Jin 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.

[0102] In another example, the motion estimation unit 204 may identify, in a syntax structure associated with the current video block, another video block and a motion vector difference (MVD). The motion vector difference indicates a difference between the motion vector of the current video block and the 8 F1257162PCTmotion vector of the indicated video block. The video decoder 300 may use the motion vector of the indicated video block and the motion vector difference to determine the motion vector of the current video block.

[0103] 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 prediction (AMVP) and merge mode signaling.

[0104] 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.[OlOSJThe residual generation unit 207 may generate residual data for the current video block by subtracting (e.g., indicated by the minus sign) the predicted video block (s) of the current video block from the current video block. The residual data of the current video block may include residual video blocks that correspond to different sample components of the samples in the current video block.

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

[0107] The transform 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.

[0108] After the transform 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.

[0109] 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 prediction unit 202 to produce a reconstructed video block associated with the current video block for storage in the buffer 213.[OUOJAfter the reconstruction unit 212 reconstructs the video block, loop filtering operation may be performed to reduce video blocking artifacts in the video block.[OlUJThe 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 9 F1257162PCTthat includes the entropy encoded data.

[0112] 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.

[0113] 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,

[0114] 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 transform unit 305, 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.

[0115] 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.[Oil 6]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.

[0117] 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.

[0118] 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 10 F1257162PCTinformation 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.[Oil 9]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.

[0120] 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 intraprediction 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 prediction and also produces decoded video for presentation on a display device.

[0121] Some example 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

[0122] The present disclosure is related to video coding technologies. Specifically, it is about motion vector prediction in image / video coding. It may be applied to the existing video coding standard like HEVC, VVC, and etc. It may be also applicable to future video coding standards or video codec.2. Introduction

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

[0124] In intra prediction the smallest chroma intra prediction unit (SCIPU) constraint in VVC is removed. In addition, the VPDU constraint for reducing CCLM prediction latency is also removed,2.1.1.1. Multi-model LM (MMLM)[0125JCCLM included in V VC is extended by adding three Multi-model LM (MMLM) modes. In each MMLM mode, the reconstructed neighboring samples are classified into two classes using a threshold which is the average of the luma reconstructed neighboring samples. The linear model of each class is derived using the Least-Mean-Square (LMS) method. For the CCLM mode, the LMS method is also used to derive the linear model. A slope adjustment to is applied to cross -component linear model (CCLM) and to Multi-model LM prediction. The adjustment is tilting the linear function which maps luma values to chroma values with respect to a center point determined by the average luma value of the reference samples.2.1.1.2. Slope adjustment of CCLM[0126JCCLM uses a model with 2 parameters to map luma values to chroma values. The slope parameter “a” and the bias parameter “b” define the mapping as follows:chromaVal:::a * lumaVal -t- b

[0127] An adjustment “u” to the slope parameter is signaled to update the model to the following form:chromaVal = a’ * lumaVal -t- b’wherea = a + ub’ =b - u * yr.

[0128] With this selection the mapping function is tilted or rotated around the point with luminance value yr. The average of the reference luma samples used in the model creation as yrin order to provide a meaningful modification to the model. Picture below illustrates the process. Fig. 4 illustrates an illustration of the effect of the slope adjustment parameterc‘u”. Left: model created with the current CCLM. Right: model updated as proposed.Implementation

[0129] Slope adjustment parameter is provided as an integer between -4 and 4, inclusive, and signaled in the bitstream. The unit of the slope adjustment parameter is 1 / 8 of a chroma sample value per one luma sample value (for 10-bit content).12 F1257162PCT

[0130] Adjustment is available for the CCLM models that are using reference samples both above and left of the block (“LM CHROMA IDX” and “MMLM CHROMA IDX”), but not for the “single side” modes. This selection is based on coding efficiency vs. complexity7trade-off considerations.

[0131] When slope adjustment is applied for a multimode CCLM model, both models can be adjusted and thus up to two slope updates are signaled for a single chroma block.Encoder approach

[0132] The proposed encoder approach performs an SATD based search for the best value of the slope update for Cr and a similar SATD based search for Cb. If either one results as anon-zero slope adjustment parameter, the combined slope adjustment pair (SATD based update for Cr, SATD based update for Cb) is included in the list of RD checks for the TU.2.1.1.3. Gradient PDPC

[0133] In VVC, for a few scenarios, PDPC may not be applied due to the unavailability of the secondary7reference samples. In these cases, a gradient based PDPC, extended from horizontal / vertical mode, is applied. The PDPC weights (wT / wL) and nScale parameter for determining the decay in PDPC weights with respect to the distance from left / top boundary are set equal to corresponding parameters in horizontal / vertical mode, respectively. When the secondary reference sample is at a fractional sample position, bilinear interpolation is applied.2.1.1.4. Primary and Secondary MPM

[0134] Secondary MPM lists is introduced. The existing primary MPM (PMPM) list consists of 6 entries and the secondary MPM (SMPM) list includes 16 entries. A general MPM list with 22 entries is constructed first, and then the first 6 entries in this general MPM list are included into the PMPM list, and the rest of entries form the SMPM list. The first entry in the general MPM list is the Planar mode. The remaining entries are composed of the intra modes of the left (L), above (A), below-left (BL), above¬ right (AR), and above-left (AL) neighbouring blocks as shown in Fig. 5, and DIMD modes which are sorted in ascending order of SAD cost. Up to 5 modes with the smallest SAD cost are added. The SAD cost is computed between the prediction and the reconstruction samples of the template. The sorted directional modes with added offset are added into the general MPM list, and then the default modes, until the general MPM list with 22 entries is constructed.

[0135] If a CU block is vertically oriented, the order of neighbouring blocks is A, L, BL, AR, AL; otherwise, it is L, A, BL, AR, AL.[0136JMPM list is equally divided into four groups and the group index is parsed first. Then, a mode index is further parsed to indicate which mode in the selected group is used.2.1.1.5. Reference sample interpolation and smoothing for intra-prediction

[0137] The 4-tap cubic interpolation is replaced with a 6-tap cubic interpolation filter for the derivation of predicted samples from the reference samples.

[0138] For reference sample filtering, a 6-tap gaussian filter is applied for larger blocks (W 32 and 13 F1257162PCTH >=32), existing VVC 4-tap gaussian interpolation filter is applied otherwise. The extended intra reference samples are derived using the 4-tap interpolation filter instead of the nearest neighbor rounding.2.1.1.6. Decoder side intra mode derivation (DIMD)

[0139] When DIMD is applied, up to five intra modes are derived from the reconstructed neighbor samples, and those five predic tors are combined with the non-directional predictor (planar or block vector based predictor) with the weights derived from the histogram of gradients. The decision between for the non-directional modes is taken according to the template cost. Specifically, the block vectors of all adjacent and non-adjacent merge candidates (coded in IntraTMP or 1BC) are compared to planar prediction on the reconstructed template. The template cost (SATD) is used to select the best predictor among them.

[0140] The division operations in weight derivation are performed utilizing the same lookup table (LUT) based integerization scheme used by the CCLM. For example, the division operation in the orientation calculationOrient — Gy / Gxis computed by the following LUT -based scheme:x = Floor( Log2( Gx ) )nonnDiff = ( ( Gx« 4 ) » x ) & 15x +=( 3 + ( nomiDiff!= 0 )? 1: 0 )Orient = (Gy* ( DivSigTable[ nonnDiff ] i 8 ) + ( 1«( x-1 ) )) » x whereDivSigTable

[0016] - { 0, 7, 6, 5,5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0 }.

[0141] For a block of size VF x / - / , the weight for each of the five derived modes is modified if the one the above or left histogram magnitudes is twice larger than the other one. In this case, the weights are location dependent and computed as follows:If the above histogram is twice the left, then:tv((x,y) = wDimdi + A, -- 2A.?.If the left histogram is twice the above, then:wf(x,y) = wDimdi + Af- 2Af™™,where wDimdi is the unmodified uniform weight of the DIMD selected, Afis pre-defined and set to 10.

[0142] Deri ved intra modes are included into the primary list of intra most probable modes (MPM), so the DIMD process is performed before the MPM list is constructed. The primary derived intra mode of a DIMD block is stored with a block and is used for MPM list construction of the neighboring blocks.

[0143] Finally, note the region of neighboring reconstructed samples used for computing the histogram of gradients is modified, depending on reconstructed samples availability. The region of decoded reference samples of current WxH luma CB is extended towards the above-right side if available, up to 14 F1257162PCTW additional columns. It is extended towards the bottom -left side if available, up to H additional rows.2.1.1.6.1. DIMD chroma mode

[0144] The DIMD chroma mode uses the DIMD derivation method to derive the chroma intra prediction mode of the current block based on the neighboring reconstructed Y, Cb and Cr samples in the second neighboring row' and column. Specifically, a horizontal gradient and a vertical gradient are calculated for each collocated reconstructed luma sample of the current chroma block, as w ell as the reconstructed Cb and Cr samples, to build a HoG. Then the intra prediction mode with the largest histogram amplitude values is used for performing chroma intra prediction of the current chroma block. Fig. 6 illustrates neighboring reconstructed samples used for DIMD chroma mode.

[0145] When the intra prediction mode derived from the DIMD chroma mode is the same as the intra prediction mode derived from the DM mode, the intra prediction mode with the second largest histogram amplitude value is used as the DIMD chroma mode. A CU level flag is signaled to indicate whether the proposed DIMD chroma mode is applied.

[0146] Finally, the luma region of reconstructed samples used for computing the histogram of gradients for chroma DIMD mode. For a WxH pair of chroma CBs to predict, to build the histogram of gradients associated to the collocated luma CB, the pairs of a vertical gradient and a horizontal gradient are extracted from the second and third lines in this luma CB instead of being extracted from the regular set of DIMD decoded reference samples around this luma CB,2.1.1.7. Fusion of chroma intra prediction modes

[0147] In ECM, t 'o chroma intra prediction signals can be fused together. One of the two chroma intra prediction signals is predicted using one of the DM mode, DIMD chroma mode and the four default modes (non-LM mode ). The other chroma intra prediction signal is predicted using cross -component linear prediction modes (LM mode). Two different methods are supported.

[0148] In the first method, the LM mode can be either MM-CCLM or MM-CCCM, and the final predictor is derived as follows:predc(i,f) — (wO x pred0(i,f) + wl x predl(i ) + (1 « (shift — 1))) » shift w here predO(i,j~) is the predictor obtained by applying the non-LM mode, predl(i ') is the predictor obtained by applying the LM mode and predci,j) is the final predictor of the current chroma block. The two weights, wO and wl are determined by the intra prediction mode of adjacent chroma blocks and shift is set equal to 2. Specifically, w'hen the above and left adjacent blocks are both coded with LM modes, {wO, wl}={l, 3}; when the above and left adjacent blocks are both coded with non-LM modes, { wO, l H{3, I}; otherwise, {wO, wl}={2, 2}. Two template costs are calculated by fusing the angular chroma prediction with MM-CCLM or MM-CCCM, respectively, and the one of the two CCPs which provides a smaller template cost is utilized to derive predl.

[0149] In the second method, the LM mode can be either MMLM or CCLM mode, and the final predictor is derived as follows:predc(i,f) = a0x pred.0(i,j) + a1x recL' (i,j) + a2x ft15 F1257162PCTwhere predO(i,j) is the predictor obtained by applying the non-LM mode, recL'(i, ) is the set of downsampled reconstructed luma samples at co-located positions and predc(i, ) is the final predictor of the current chroma block. / ? is a fixed value and is set equal to 512 for 10-bit content. The three weights, a0, ctj and a2are derived from the adjacent luma and chroma samples using the same LDL derivation method as in CCCM.

[0150] For the syntax design, one index is signaled to indicate whether fusion is applied and which method is used. It is noted that for I slices, the non-LM mode can be DM mode, DIMD chroma mode and the four default modes. For non-I slices, only DIMD chroma mode is allowed to be fused with LM modes.Index value Name0 No fusion1 First method2 Second method with CCLMSecond method with3MMLM2.1.1.8. Intra template matching

[0151] 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 fra e 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.

[0152] The prediction signal is generated by matching the L -shaped, Top-only or Left-Only causal neighbor of the current block with another block in a predefined search area. There are 6 predefined search areas, i.e., RI to R6 in Fig. 7 which contain the reconstructed samples from the top and left CTUs as well as part of the reconstructed samples within the current CTU that are located above, left, bottom -left and top-right to the current block.

[0153] IntraTMP employs an implicit merge mode, where merge candidates are considered without signaling a merge flag or index. Specifically, the reference positions pointed by the block vectors of all the adjacent and non-adjacent merge candidates (coded in IntraTMP or IBC mode) are used as additional candidates beyond the default search areas. The same template matching cost is used to compare the merge positions and the defaults ones. For bi-directional IBC merge candidate, two candidates are retained corresponding to each reference frame. Similarly, for IntraTMP, two candidates are considered corresponding to the best candidate by template search and the coded candidate.

[0154] Sum of absolute differences (SAD) is used as a cost function.

[0155] A given search order of the 6 regions is utilized, i.e., R4, R5, R6, Rl, R2, and R3. Within each region, the decoder constructs a candidate list of up to "‘19” template matching block vectors that are ranked in ascending order according to the template cost (SAD). The following modes are supported:16 F1257162PCT1- Single predictor: A single predictor is selected from the candidate list.2- Fusion of multiple predictors: multiple predictors are blended multiple to derive the final prediction block. The blending weights are either computed from the template matching cost of each predictor, or with Wiener-filter based weight derivation method.3- Sub-pel precision: When single predictor is used, sub-pel precision can be used with 1 / 2 -pel precision, 1 / 4-pel precision and 3 / 4-pel precision, each with 8 possible directions.4- linear filter model: A linear filter can be learned between the reference template and current template and be applied the linear model to reference block. This mode can be used for single predictor when sub-pel precision is not used.

[0156] Additionally, IntraTMP with local illumination compensation is allowed. The following considerations are taken:1- Usages of LIC and FLM (CCCM-like filtering) are mutually exclusive for a given CU.2- Usages of LIC together with fusion in intra TMP is allowed,3- Top-only and Left-only template usage for LIC model determination is allowed for screen content cod¬ ing. For camera-captured coding, only the top-left template is employed,4- Multi Mode Linear Model (MMLM) is suppored similarly to IBC-LIC, for screen content coding.

[0157] When LIC is used for a given CU, the Intra TMP search process employs MRSAD rather than SAD distortion function.

[0158] 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:SearchRange w = min(64,a * BlkW)SearchRange __h = min(64,a * BlkH)Where ‘a’ is a constant that controls the gain / complexity trade-off. In practice, ‘a’is equal to 5.

[0159] To speed-up the template matching process, the search range of all search regions is subsampled by a factor of 4,. After finding the best match, a refinement process is performed. The refinement is done via a second template matching search around the best match with a reduced range.

[0160] 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.

[0161] The Intra template matching prediction mode is signaled at CU level through a dedicated flag when DIMD is not used for current CU.2.1.1.8.1. IntraTMP derived block vector candidates for IBC

[0162] In this method block vector (BV) derived from the intra template matching prediction (IntraTMP) is used for intra block copy (IBC). The stored IntraTMP BV of the neighbouring blocks along with IBC BV are used as spatial BV candidates in IBC candidate list construction.17 F1257162PCT

[0163] IntraTMP block vector is stored in the IBC block vector buffer and, the current IBC block can use both IBC BV and IntraTMP BV of neighbouring blocks as BV candidate for IBC BV candidate list as shown in Fig. 8.

[0164] IntraTMP block vectors are added to IBC block vector candidate list as spatial candidates. IntraTMP block vectors are stored in quarter-pel resolution for coding of IBC block vectors and IIMVP.2.1.1.9. Fusion for template-based intra mode derivation (TIMD)

[0165] For each intra prediction mode in MPMs, as well as the wide-angle modes if the above-right and / or bottom-left reference samples are available, SATD between the prediction and reconstruction samples of the template is calculated. First two intra prediction modes with the minimum SATD and one non -angular intra prediction mode (i.e. DC or Planar) with the lowest SATD cost are selected as the TIMD modes. These three TIMD modes are fused with the weights after applying PDPC process, and such weighted intra prediction is used to code the current CU. Position dependent intra prediction combination (PDPC) is included in the derivation of the TIMD modes.

[0166] The conditions below are checked to determine whether the non -angular intra prediction mode is used in fusion:the non-angular intra prediction mode is different from the two selected intra prediction modes. costMode3 < 1.5*costModel, where the costMode3 is the SATD cost ofthe non-angular intra prediction mode and costModel is the SATD cost of the first intra prediction mode.

[0167] If both of the conditions are true, three intra prediction modes are used to generate the prediction. And the 'weights of each intra prediction mode are computed from SATD cost:weighty — sumSATD = costModei.u 12XsumSATD1

[0168] Otherwise, the non-angular intra prediction mode is not used in prediction. And the costs of the t o selected modes are compared with a threshold, in the test the cost factor of 2 is applied as follows:costMode2 < 2*costModel.

[0169] If this condition is true, the fusion is applied, otherwise the only model is used.

[0170] Weights of the modes are computed from their SATD costs as follow s:weightl = costMode2 / (costModel+ costMode2)eight 2 = 1 - weightlThe division operations are conducted using the same lookup table (LUT) based integerization scheme used by the CCLM.

[0171] Besides, location-dependent sample-based fusion used in DIMD fusion process is used for the TIMD fusion but the location-dependent criterion applying to amplitudes of the selected predictors is replaced by a SATD cost-based criteria. The location-dependent criterion is determined from a ratio of the normalized SATD of the selected TIMD predictors computed in above and left template area.18 F1257162PCT2.1.1.10. Intra prediction fusion

[0172] This intra prediction method derives predicted samples as a weighted combination of multiple predictors generated from different reference lines. In this process 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:1) For angular intra prediction modes including the single mode case of TIMD and DIMD, the proposed method derives intra prediction by weighting intra predictions obtained from multiple reference lines represented as PfUSjOn= WoPtme +wiPiine+i, where piineis the intra prediction from the default ref¬ erence line and pune +1is the prediction from the line above the default reference line. The weights are set as w0= 3 / 4 and w = 1 / 4.2) For TIMD mode with blending, Puneis used for the first mode (w0= 1, wt= 0) and Pune+i is used for the second mode (w0= 0, ivt= 1).3) For DIMD mode with blending, the number of predictors selected for a weighted average is increased from 3 to 6.

[0173] The angular intra prediction fusion method 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.

[0174] The TIMD mode with blending method is applied when all the following conditions are satisfied:both the first and second modes are angular prediction mode.the current block is not ISP coded block.all of the following conditions are false:o abs(predModeIntrai - predModelntat) is greater than Threshold. The value of Threshold is set to 8 or 4 depending on block size.o (predModelntrai - EXT IIOR IDX) * (predModeIntra2 - EXT HOR __IDX) is less than 0. o (predModelntrai - EXT VER IDX) * (predModelntraz - EXT VER IDX) is less than 0. 2.1.1.11. Improvements of CUP2.1.1.11.1. Subblock CUP[0175JA subblock-based merge candidate may be used to generate the inter signal of CUP, where the same subblock-based merge candidate list used by affine and sbTMVP is utilized.

[0176] When CUP flag is true and CIIP-TM flag is false, a subblock -based CUP flag is signalled. If subblock -based CUP flag is true, an index indicating specific candidate in the subblock -based merge list is signalled, and TIMD is used to generate intra signal by default thus no CIIP-PDPC flag signalled any19 F1257162PCTmore.2.1.1.11.2. Combination of CUP with TIMD and TM merge

[0177] In CUP mode, the prediction samples are generated by weighting an inter prediction signal predicted using CIIP-TM merge candidate and an intra prediction signal predicted using TIMD derived intra prediction mode. The method is only applied to coding blocks with an area less than or equal to 1024.

[0178] The TIMD derivation method is used to derive the intra prediction mode in CUP. Specifically, the intra prediction mode with the smallest SATD values in the TIMD mode list is selected and mapped to one of the 67 regular intra prediction modes,

[0179] In addition, it is also proposed to modify the weights (wlntra, winter) for the two tests if the derived intra prediction mode is an angular mode. For near-horizontal modes (2 <= angular mode index < 34), the cun'ent block is vertically divided as shown in Fig. 9A; for near-vertical modes (34 <= angular mode index <= 66), the current block is horizontally divided as shown in Fig. 9B.

[0180] The (wlntra, winter) for different sub-blocks are shown in Table I.Table I. The modified weights used for angular modes.The sub-block index (wlntra, winter)0 (6, 2)I (5.3)2 (3, 5)3 (2, 6)[0181JWith C11P-TM, a CIIP-TM merge candidate list is built for the CIIP-TM mode. The merge candidates are refined by template matching. The CIIP-TM merge candidates are also reordered by the ARMC method as regular merge candidates. The maximum number of CIIP-TM merge candidates is equal to two.2.1.1.12. Extended multiple reference line (MRL) list[0182JMRL list in VVC is extended to include more reference lines for intra prediction. The extended reference line list consists of line indices {1, 3, 5, 7, 12}. For template -based intra mode derivation (TIMD), instead of the full MRL candidate list, only the first two reference line candidates, i.e., {1, 3}, are used. Fig. 10 illustrates extended MRL candidate list,2.1.1.13. Template-based multiple reference line intra prediction

[0183] Template-based multiple reference line intra prediction (TMRL) mode combines reference line and prediction mode together and uses a template matching method to construct a list of candidate combinations. An index to the candidate combination list is coded to indicate which reference line and prediction mode is used in coding the current block. The regular multiple reference line (MRL) for the non-TIMD part is replaced by TMRL mode.

[0184] The TMRL mode extends reference line candidate list and the intra -prediction-mode candidate list.20 F1257162PCTThe extended reference line candidate list 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 except the PLANAR mode is excluded from the intraprediction-mode candidate list, DC mode is added after 5 neighboring PUs’ modes and DIMD modes if its not included and the angular modes with delta angles from ±1 to ±4 (compared the existing angular modes in the intra-prediction-mode candidate list) are added. The precision of angular prediction is extended from 65 to 129. Additionally non-adjacent positions are added as candidates in constructing the intra candidate list. If the neighbouring or non-adjacent blocks are coded with SGPM or GPM modes, the intra modes of the blocks are replaced by the partitioning angles.

[0185] The TMRL candidate is constructed as follows. There are 5x10=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 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. Fig. 11 illustrates an illustration of the template area.

[0186] For TMR signalling 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 reference line and prediction mode is used for coding the current block.2.1.1.14. Convolutional cross-component intra prediction model

[0187] In this method convolutional cross-component model (CCCM) is applied 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. Similar to CCLM top, left or top and left reference samples are used as templates for model derivation.

[0188] 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.2.1.1.14.1. Convolutional filter

[0189] The 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. Fig. 12 illustrates spatial part of the convolutional filter.

[0190] 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:21 F1257162PCTP = ( C*C + midVal ) » bitDepthThat is, for 10-bit content it is calculated as:P = ( C*C + 512 ) » 10

[0191] 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).

[0192] Output of the filter is calculated as a convolution between the filter coefficients c> and the input values and clipped to the range of valid chroma samples:predChromaVal = c₀C + c₁N + c₂S + c₃E + c₄W + c₅P + c₆B.2.1.1.14.2. Calculation of filter coefficients

[0193] The filter coefficients Ci are calculated by minimising MSE between predicted and reconstructed chroma samples in the reference area. Fig. 13 illustrates the reference area which consists of 2 or 6 lines of chroma samples above and left of the PU. Whether to use 6 lines or 2 lines of neighbouring samples to derive the CCCM model parameters in the single model CCCM is determined by a template cost. Similarly, for the multi-model CCCM mode, the two candidates use 6 lines neighbouring luma samples or luma samples collocated to the current chroma block to derive mean values which separate samples into two groups. The cost is derived by applying the candidate CCP (either 2 or 6 lines) on a template, calculating the sum of absolute difference (SAD) between CCP predicted samples and reconstructed samples in the template.

[0194] 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.

[0195] 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.

[0196] The autocorrelation matrix is calculated using the reconstructed values of luma and chroma samples. These samples are full range (e.g. between 0 and 1023 for 10 -bit content) resulting in relatively large values in the autocorrelation matrix. This requires high bit depth operation during the model parameters calculation. It is proposed to remove fixed offsets from luma and chroma samples in each PU for each model. This is driving down the magnitudes of the values used in the model creation and allows reducing the precision needed for the fixed-point arithmetic. As a result, 16-bit decimal precision is proposed to be used instead of the 22 -bit precision of the original CCCM implementation.

[0197] Reference sample values just outside of the top-left corner of the PU are used as the offsets 22 F1257162PCT(offsetLuma, offsetCb and offsetCr) for simplicity. The samples values used in both model creation and final prediction (i.e., luma and chroma in the reference area, and luma in the current PU) are reduced by these fixed values, as follows:C' = C - offsetLumaN' = N - offsetLumaS’ S - offsetLumaE' = E - offsetLumaW' = W - offsetLumaP' = nonLinear(C')B = midValue = 1 « (bitDepth - 1)and the chroma value is predicted using the following equation, where offsetChroma is equal to offsetCr and offsetCb for Cr and Cb components, respectively:predChromaVal = coC + ciN' + c -S’ + c< E' + C4W' + C5P' + csB + offsetChroma.

[0198] In order to avoid any additional sample level operations, the luma offset is removed during the luma reference sample interpolation. This can be done, for example, by substituting the rounding term used in the luma reference sample interpolation with an updated offset including both the rounding term and the offsetLuma. The chroma offset can be removed by deducting the chroma offset directly from the reference chroma samples. As an alternative way, impact of the chroma offset can be removed from the cross-component vector giving identical result. In order to add the chroma offset back to the output of the convolutional prediction operation the chroma offset is added to the bias term of the convolutional model.

[0199] The process of CCCM model parameter calculation requires division operations. Division operations are not always considered implementation friendly. The division operation are replaced with multiplication (with a scale factor) and shift operation, where scale factor and number of shifts are calculated based on denominator similar to the method used in calculation of CCLM parameters.2.1.1.14.5. Gradient Linear Model

[0200] For YUV 4:2:0 color format, a gradient linear model (GLM) method can be used to predict the chroma samples from luma sample gradients. Two modes are supported: a two -parameter GLM mode and a three -parameter GLM mode.

[0201] Compared with the CCLM, instead of down-sampled luma values, the two -parameter GLM utilizes luma sample gradients to derive the linear model. Specifically, when the two -parameter 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.23 F1257162PCTC = a. ■ G +

[0202] In the three-parameter GLM, a chroma sample can be predicted based on both the luma sample gradients and down-sampled luma values with different parameters. The model parameters of the three- parameter GLM are derived from 6 rows and columns adjacent samples by the LDL decomposition based MSE minimization method as used in the CCCM.C~ (Xo • G + ct-j ■ L + C&2 "

[0203] For signaling, when the CCLM mode is enabled to the current CU, one flag is signaled to indicate whether GLM is enabled for both Cb and Cr components; if the GLM is enabled, another flag is signaled to indicate which of the two GLM modes is selected and one syntax element is further signaled to select one of 4 gradient filters for the gradient calculation. Four gradient filters are enabled for the GLM. Fig.14 illustrates four Sobel based gradient patterns for GLM.2.1.1.14.4. CCCM signalling

[0204] 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.2.1.1.14.5. CCCM using non-downsampled luma samples

[0205] CCCM mode with 3x2 filter using non-downsampled luma samples is used, which consists of 6-tap spatial terms, four nonlinear terms and a bias term. The 6-tap spatial terms correspond to 6 neighboring luma samples (i.e., L₀, L₁, L₅) around the chroma sample (i.e., C) to be predicted, the four non-linear terms are derived from the samples Lo, Li, L2, and L3. Fig. 15 illustrates non-downsampled luma samples.5 9C = a(- ■ (L[ — offsetLuma) + ■ (((Li-4 —offsetLuma)2+ / ?)i=o i-6» bitDepth) + «10■ p + offsetChromawhere αiis the coefficient, p is the offset. Same to the existing CCCM design, up to 6 lines / columns of chroma samples above and left to the current CU are applied to derive the filter coefficients. The filter coefficients are derived based on the same LDL decomposition method used in CCCM. The proposed method is signaled as an additional CCCM model besides the existing one, when the CCCM is selected, one single flag is signaled and used for both two chroma components to indicate whether the default CCCM model or the proposed CCCM model is applied. Additionally, SPS signaling is introduced to indicate whether the CCCM using non-downsampled luma samples is enabled.2.1.1.14.6. Block-vector guided CCCM (BVG-CCCM)

[0206] When the co-located luma prediction is coded with IBC or IntraTMP in Intra slices, the BVG- CCCM mode can be used. In this mode, the block vectors of the co-located luma blocks, coded in IBC or intraTMP modes, are used to determine the reference area for calculating the CCCM parameters. The 24 F1257162PCTprediction is performed using uses the calculated model parameters and co -located luma samples. Fig.16 illustrates the reference area in BVG-CCCM method.

[0207] The BVG-CCCM mode uses an 11-tap filter for cross-component prediction as below:predChromaVal = c₀C + c₁N + c₂S + c₃E + c₄W + c₅P(C) + c₆P(N) + c₇P(S) + c₈P(W) + c₉P(E) + c₁₀B

[0208] 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 in Fig. 12.

[0209] The nonlinear term P is represented as power of two of the corresponding luma sample and B is the bias term.

[0210] Similar to Direct Block Vector (DBV) mode, five locations in the collocated luma block area are scanned and the associated block vectors are then used for determining the reference area for parameter calculation in BVG-CCCM method,2.1.1.14.7. Gradient and Location based convolutional cross-component model (GL-CCCM)

[0211] This method maps luma values into chroma values using a filter with inputs consisting of one spatial luma sample, two gradient values, two location information, a nonlinear term, and a bias term. The GL-CCCM method uses gradient and location information instead of the 4 spatial neighbor samples used in the CCCM filter. The GL-CCCM filter used for the prediction is:predChromaVal = c0C + c1Gy+ c2Gx+ c3Y + c4X + c5P + c6B Where G. and Gxare the vertical and horizontal gradients, respectively, and are calculated as Fig. 17:Gy= (2 / V + NW + NE) - (2S + SW + SE)Gx= (2W + NW + SW) — (2E + NE + SE)

[0212] Moreover, the Y and X are the spatial coordinates of the center luma sample.

[0213] The rest of the parameters are the same as CCCM tool. The reference area for the parameter calculation is the same as CCCM method.

[0214] The usage of the mode is signalled with a CABAC coded PU level flag. When it comes to signalling, GL-CCCM is considered a sub-mode of CCCM. That is, the GL-CCCM flag is only signalled if original CCCM flag is true.

[0215] Similar to the CCCM, GL-CCCM tool has 6 modes for calculating the parameters:• Single-model GL-CCCM from above and left templates• Single-model GL-CCCM from above template• Single-model GL-CCCM from left template• Multi-model GL-CCCM from above and left templates• Multi-model GL-CCCM from above template25 F1257162PCTMulti-model GL-CCCM from left template.

[0216] The encoder performs SATD search for the 6 GL-CCCM modes along with the existing CCCM modes to find the best candidates for full RD tests.2.1.1.14.8. CCCM with Multiple Downsampling Filters

[0217] Multiple downsampling filters are applied to a group of reconstructed luma samples in a CCCM. The linear combination of these downsampled reconstructed samples is multiplied by derived filter coefficients to form the final chroma predictor. The horizontal or vertical location of the center luma sample are also considered in the tested model. The cross-component models shown below are tested as additional CCCM modes with a mode index signalled in the bitstream:(1) Model 1: predChroma = cO * H(C) + cl * G1 (C) + c2 * G2(C) +c3 * G3(C) +c4 * P(H(C)) + c5 * P(G1(C)) +C6 * P(G2(C)) + c7 * X + c8 * Y + c9 * B(2) Model 2: predChroma = cO * H(C) + cl * H(W) + c2 * 11(E) + c3 * G1(C) + c4 * G1(W) + c5 * G1(E) + c6 * P(H(C)) + c7 * P(H(W)) + c8 * P(H(E)) + c9 * X + cl0 * B(3) Model 3: predChroma = cO * H(C) + cl * H(NE) + c2 * H(SW) + c3 * G3(C) + c4 * G3(NE) + c5 * G3(SW) + c6 * P(H(C)) + c7 * P(H(NE)) + c8 * P(H(SW)) + c9 * Y + cl 0 * Bwhere H(-), Gl( ), G2( ), G3( ) are various downsampling filters as indicated in Fig. 18, C denotes the current chroma sample position, and N, S, W, E, NE, SW are the positions around C, c: are filter coefficients, P and B are nonlinear term and bias term, and X and Y are the horizontal and vertical locations of the center luma sample with respect to the top-left coordinates of the block.2.1.1.15. Local-Boosting Cross-Component Prediction (LB-CCP)

[0218] Prediction samples of MM-CCLM / MM-CCCM can be filtered with neighbouring samples. As shown in Fig. 19, a 3x3 low-pass filter is applied to filter prediction samples generated by MM- CCLM / MM-CCCM. For a sample at a top / left boundary, the filtering window may involve neighbouring reconstructed samples. For inner samples, the filtering window only involves prediction samples, which may be padded. A flag is signaled to indicate whether filtering is applied or not for a block coded with MM-CCLM / MM-CCCM,2.1.1.16. Cross-Component Prediction (CCP) merge (a.k.a., non-local CCP) mode

[0219] For chroma coding, a flag is signalled to indicate whether CCP mode (including the CCLM, CCCM, GLM and their variants) or non-CCP mode (conventional chroma intra prediction mode, fusion of chroma intra prediction mode) is used. If the CCP mode is selected, one more flag is signalled to indicate how to derive the CCP type and parameters, i.e., either from a CCP merge list or signalled / derived on-the-fly. A CCP merge candidate list is constructed from the spatial adjacent, temporal, spatial non -adjacent, history-based or shifted temporal candidates. After including these candidates, default models are further included to fill the remaining empty positions in the merge list. In order to remove redundant CCP models in the list, pruning operation is applied. After constructing the list, the CCP models in the list are reordered depending on the SAD costs, which are obtained using the neighbouring template of the current 26 F1257162PCTblock. More details are described below.Spatial adjacent and non-adjacent candidates

[0220] The positions and inclusion order of the spatial adjacent and non-adjacent candidates are the same as those defined in ECM for regular inter merge prediction candidates.Temporal and shifted temporal candidates

[0221] Temporal candidates are selected from the collocated picture. The position and inclusion order of the temporal candidates are the same as those defined in ECM for regular inter merge prediction candidates. The shifted temporal candidates are also selected from the collocated picture. The position of temporal candidates is shifted by a selected motion vector which is derived from motion vectors of neighboring blocks.History-based candidates

[0222] A history-based table is maintained to include the recently used CCP models, and the table is reset at the beginning of each CTU row. If the current list is not full after including spatial adjacent and non-adjacent candidates, the CCP models in the history-based table are added into the list.Default candidates

[0223] CCLM candidates with default scaling parameters are considered, only when the list is not full after including the spatial adjacent, spatial non-adjacent, or history-based candidates. If the current list has no candidates with the single model CCLM mode, the default scaling parameters are {0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8, -3 / 8, 4 / 8, -4 / 8, 5 / 8, -5 / 8, 6 / 8}. Otherwise, the default scaling parameters are {0, the scaling parameter of the first CCLM candidate + {1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8, -3 / 8, 4 / 8, -4 / 8, 5 / 8, -5 / 8, 6 / 8}.

[0224] It is noted that the LB-CCP flag is inherited from a CCP candidate in the CCP merge candidate list.

[0225] A flag is signaled to indicate whether the CCP merge mode is applied or not. If CCP merge mode is applied, an index is signaled to indicate which candidate model is used by the current block. In addition, CCP merge mode is not allowed for the current chroma coding block when the current CU is coded by intra sub -partitions (ISP) with single tree, or the current chroma coding block size is less than or equal to 16. For a CCP merge coded block, one CCP-merge fusion flag is further signalled to indicate whether a fusion mode is applied. In the fusion mode, the final prediction is generated by a weighted sum of the CCP-merge prediction and either the MM-CCCM prediction or the DIMD prediction. A CCP-merge fusion type flag is further signalled if the CCP-merge fusion flag is true, to indicate whether the MM-CCCM prediction or the DIMD prediction is selected and fused with the CCP-merge prediction.2.1.1.17. Decoder derived CCP mode

[0226] In this method, a candidate list of cross -component prediction (CCP) modes is constructed, and to select the best candidate from the list a template cost is calculated to compare the reconstructed samples and the prediction values generated by the evaluated CCP mode. The template is shown in Fig. 20.

[0227] The CCP mode list is constructed from the already existed in ECM modes by single model CCLM,27 F1257162PCTsingle model CCCM, multi -model CCCM, single model GLCCCM, single model CCCM applied with LBCCP, and multi-model CCCM applied with LBCCP.

[0228] In the second aspect of the method, various decoder-derived CCP fusion candidates are added. A fusion candidate is the combination of two CCP modes selected from the existing CCP mode lists reordered by template costs. Mode flag and a fusion flag are signalled to indicate the mode usage. 2.1.1.18. Spatial Geometric partitioning mode (SGPM)

[0229] SGPM is an intra mode that resembles the inter coding tool of GPM, where the two prediction parts are generated from intra predicted process. In this mode, a candidate list is built with each entry containing one partition split and two intra prediction modes as shown in Fig. 21. 26 partition modes and 9 of intra prediction modes are used to form the combinations, the length of the candidate list is set equal to 16. The selected candidate index is signalled.

[0230] The list is reordered using template where SAD between the prediction and reconstruction of the template is used for ordering. The template size is fixed to 1. Fig. 22 illustrates an GPM template.

[0231] For each partition mode, an IPM list is derived for each part using the same intra-inter GPM list derivation. The IPM list size is set to 3. In the list, TIMD derived mode is replaced by 2 derived modes with horizontal and vertical orientations. The list is further augmented with block -vector based prediction candidates obtained from the adjacent and non-adjacent merge candidates coded in IntraTMP or IBC mode. The template cost is employed to select the up to 6 block vectors. The final list contains up to 9 predictors: 3 regular intra modes and up to 6 block vectors based predictors.

[0232] The SGPM mode is applied with a restricted blocks size: 4<=width<=64, 4<=height<=64, width<height*8, height<width*8, width*height>=32.

[0233] A PPS flag is coded to indicate whether no blending of two intra predictions is allowed. When this PPS flag is set to false, the following adaptive blending is also used for spatial GPM, where blending depth r is derived as follows:® If min(width, height)==4, 1 / 2 r is selected® else if min(width, height)^8, T is selected® else if min(width, height)— 16, 2 r is selected® else if min(width, height)— 32, 4 r is selected® else, 8 r is selected.

[0234] Otherwise (the PPS flag is set to true), 1 / 4 r is always used for spatial GPM coded blocks to make sure no blending is used when SGPM block has partition angle completely horizontal or vertical, and much narrower blending width is used when SGPM block has other partition angles. It is noted that the flag is set to true in current Common Test Conditions (CTC) for the screen content videos. Fig. 23 illustrates an GPM blending.28 F1257162PCT2.1.1.19. Directional planar mode

[0235] Two additional planar modes where only the horizontal interpolation or only the vertical interpolation are used to obtain the predicted samples.

[0236] For planar horizontal mode, only the horizontal linear interpolation is performed based on the left reference sample and the top-right reference sample to predict the current sample as:pred(x,y) — ((l¥ — 1 — x) * rec(— l,y) + (x + 1) * rec(W, —1) + (W » 1)) » log2(W)

[0237] For planar vertical mode, only the vertical linear interpolation is performed based on the above reference sample and the bottom-left reference sample to predict the current sample as: pred(x,y) — ((# — 1 — y) * rec(x, —1) + (y + 1) * rec(—l, H) + (H » 1)) » log^- H).

[0238] The transform kernel selection for planar horizontal and planar vertical mode is shown in Fig. 24, If an intra prediction mode of a current block is the planar vertical mode, the horizontal intra prediction mode is used to derive a transform kernel in MTS set and LFNST set. Also, if an intra prediction mode of a current block is the planar horizontal mode, the vertical intra prediction mode is used to derive a transform kernel in MTS set and LFNST set.2.1.1.20. Direct block vector (DBV) for chroma block

[0239] The direct block vector is used for chroma blocks. A flag is signaled to indicate whether a chroma block is coded using 1BC mode. If one of the luma blocks in five locations shown in Fig. 25 is coded with IBC or intraTMP mode, its block vector is scaled and is used as block vector for the chroma block. Template matching is used to perform block vector scaling.2.1.1.21. Extrapolation filter-based intra prediction (EIP) mode

[0240] In the EIP mode, the samples in a CU are predicted from the top-left position to the bottom-right position by applying an extrapolation filter to neighboring reconstructed samples or predicted samples. The EIP mode uses a 1 -tap filter for prediction as below:14predfey)t(x-offsetXi,y-offset¥t)), where pred^y) is the predicted value at position (x, y) in the CU, ctis the filter coefficient, and the^(x-offsetXi.y-offsetYi) is reconstructed samples or predicted samples.

[0241] The EIP filter can be derived from the neighboring reconstructed samples or be inherited from the previous EIP coded blocks. There are three EIP filter shapes and three types of reconstructed area supported in ECM. Fig. 26 illustrates three EIP filter shapes. Fig. 27 illustrates three types of reconstructed area for EIP filter.

[0242] For a CU coded in the EIP mode, an EIP merge flag is signaled to indicate whether the EIP filter is inherited from previous blocks coded in EIP mode. When the EIP merge flag is true, an EIP merge list is constructed from the spatial adjacent, spatial non-adjacent, temporal and history candidates. The position and inclusion order of these candidates are the same as those used in CCP merge candidate list.29 F1257162PCTAn EIP merge index is further signaled to indicate which EIP merge candidate is selected. The filter shape and the filter coefficients of the selected candidate are then inherited to code the CU.

[0243] When the EIP merge flag is false, the EIP filter is derived from the neighboring reconstructed samples and the relevant syntax element is signaled to indicate which one of the three types of reconstructed area and which one of the three filter shapes are used for the CU. The selected filter moves in the selected reconstructed area either horizontally or vertically with a one -pixel step to construct the auto-correlation matrix and the cross-correlation vector. The calculation of coefficients from the autocorrelation matrix and the cross -correlation vector is the same as that in CCCM.

[0244] After generating the prediction samples of the CU using the EIP filter, an intra prediction mode is derived by applying the DIMD process to the prediction samples. Specifically, a horizontal gradient and a vertical gradient are calculated for each predicted sample to build a histogram of gradient. Then the intra prediction mode corresponding to the largest histogram count is used to determine the LFNST, NSPT or MTS transform set.2.1.1.22. Matrix based position dependent intra prediction (PDP) replacing conventional intra modes

[0245] A matrix of weights, which are defined for a block shape and intra mode, is introduced, those weights are multiplied by the neighbour reference template to derive the prediction samples replacing conventional intra prediction. The weights are applied to the reference samples of the L shaped causal neighborhood template as shown in the Fig. 28.

[0246] The reference samples in the causal neighborhood are denoted as r, and F(x,y) is the matrix of weights. Then the prediction P(x,y) can be derived asP(x,y) = £k F(x,y,k)*r(k),where k denotes the index of the reference sample in the template.

[0247] In the test, this prediction is used for block size with both width and height up to 32 (except for 4x32,32x4, 8x32 and 32x8). The template size is 2 for blocks with both width and height up to 16 and it is only used for mode 0, 1, and (2+2*k). For other blocks, template size is set to 1; is used for mode 0, 1, and (2+4*k); prediction is only performed for 16x16 positions, and the rest of the samples are generated by bilinear interpolation. For all block sizes, block shape and mode -based symmetry is used. Reference length is set to W and H for modes greater than 18 and less than 50 and set to 2*W and 2*H otherwise.2.1.2. Inter prediction2.1.2.1. Local illumination compensation (LIC)

[0248] LIC is an inter prediction technique to model local illumination variation between current block and its prediction block as a function of that between current block template and reference block template. The parameters of the function can be denoted by a scale a and an offset, which forms a linear equation, that is, a*p[x]+β to compensate illumination changes, where p[x] is a reference sample pointed to by MV at a location x on reference picture. When wrap around motion compensation is enabled, the MV shall be clipped with wrap around offset taken into consideration. Since a and p can be derived based on 30 F1257162PCTcurrent block template and reference block template, no signaling overhead is required for them, except that an LIC flag is signaled for AMVP mode to indicate the use of LIC. For the merge mode, the LIC flag is not inherited from a merge candidate, instead, it is derived on-the-fly. More specifically, of a merge candidate is derived by comparing two template costs: a SAD-based template cost, denoted as CO, and a Mean Removal SAD (MRSAD)-based template cost, denoted as Cl. The LIC flag is set to be false, if CO <= Cl and is set to be time, if CO > Cl. To favor the inherited LIC flag, CO is multiplied by a if the inherited LIC flag is false while Cl is multiplied by a if the inherited LIC flag is true, where a < 1,

[0249] The local illumination compensation is used for inter CUs with the following modifications, • Intra neighbor samples can be used in LIC parameter derivation.• LIC is disabled for blocks with less than 32 luma samples.• For both non-subblock and affine modes, LIC parameter derivation is performed based on the template block samples corresponding to the current CU, instead of partial template block samples corresponding to first top-left 16x16 unit.• Samples of the reference block template are generated by using MC with the block MV without rounding it to integer-pel precision.• The LIC parameters could be adjusted instead of directly using the derived values. Similar to the slope adjustment of CCLM, an adjustment parameter for the uni-predicted LIC coded block is used to modify parameters of LIC. The adjustment parameter is signalled for AMVP mode.

[0250] For the bi-predictive inter CUs, two sets of LIC parameters are separately derived for L0 and LI prediction samples. An iterative manner to derive the L0 and LI LIC parameters is applied. Specifically, L0 LIC parameters are firstly derived by minimizing difference between L0 template prediction To and the template T and the samples in T are updated by subtracting the corresponding samples in T o. Then, the LI parameters are calculated that minimizes the difference between LI template prediction T i and the updated template. Finally, the L0 parameter is refined again in the same way.

[0251] For inter-prediction merge modes, the LIC flag value could be either signalled for regular merge mode, affine merge mode and TM merge mode or inherited from a merge candidate. The signalled flag indicates if the original inherited LIC flag or the reverse LIC flag value is used for a merge candidate. Also, LIC is enabled with PU level BDMVR and BDOF.

[0252] Non-local illumination compensation (NLIC) is applied in ECM wherein the linear model is derived from the previously coded inter CUs by minimizing the difference between their reconstruction and prediction samples. When constructing the merge lists, up to 16 and 6 NLIC candidates (obtained from both spatial adjacent and non-adjacent positions) are inserted to the lists of regular merge and subblock merge respectively, and reordered with the existing merge candidates. The lengths of the output merge lists are kept unchanged. The same pattern used for non-adjacent merge mode is reused to locate the non-adjacent positions in the scheme.31 F1257162PCT2.1.2.2. Non-adjacent spatial candidate

[0253] The non-adjacent spatial merge candidates are inserted after the temporal motion vector prediction (TMVP) in the regular merge candidate list. The pattern of spatial merge candidates is shown in Fig. 29. The distances between non-adjacent spatial candidates and current coding block are based on the width and height of current coding block. The line buffer restriction is not applied.2.1.2.3. Temporal motion information derivation

[0254] In VVC, the Temporal Motion Vector Prediction (TMVP) for the AMVP and merge mode is derived by fetching the motion information from the center or the bottom -right of the collocated block in a signaled collocated picture. Similarly, for the Subblock -based Temporal Motion Vector Prediction (SbTMVP) mode, the motion information from the left neighboring position is used as a motion shift, which is then employed to obtain TMVPs at sub-CU level.

[0255] In ECM, to further improve the coding efficiency of TMVP, two aspects are modified. Firstly, two collocated pictures are utilized which are the two reference frames with the least POC distance relative to the to-be-coded frame. Secondly, the motion shift to locate TMVP is adaptively determined from multiple locations according to template costs. More specifically, two motion shift candidate lists are constructed respectively for the two collocated frames. The motion shifts with the minimum template matching cost are used to derive SbTMVP or TMVP candidates. At most 4 SbTMVP candidates are included in the sub-block-based merge list. The SbTMVP candidate with the least template matching cost derived from the first collocated frame is placed in the first entry without reordering, while other SbTMVP candidates are sorted together with affine candidates. In addition, the prediction direction of each subblock template is determined based on the center subblock. As illustrated in Fig. 30, if the center subblock is uni-predicted, then all the subblock templates are uni-predicted, and vice versa. If the motion vector of corresponding adjacent subblock at the determined reference list is not available for a subblock template, zero MV is used for that subblock template.2.1.2.4. AMVP with SbTMVP mode

[0256] The concept of SbTMVP mode is extended to AMVP. Given a CU coded in AMVP with SbTMVP mode, the CU is predicted in a similar way as that of SbTMVP in merge mode except that the motion shift is signaled in the bitstream instead of being derived from neighboring blocks The motion shift is obtained using MVP with a signaled MVD. The number of MVDs is determined according to the percentage of the area of the blocks coded in the the AMVP with SbTMVP mode in the previous coded picture with the same temporal layer as follows:If the current picture is the first coded picture in a temporal layer, the number of MVD is set to 8.Otherwise, if the percentage of the area of the proposed mode is smaller than 4%, the number of MVD is set to 4.Otherwise, if the percentage of the area of the proposed mode is smaller than 7%, the number of MVD is set to 8.32 F1257162PCTOtherwise, the number of MVD is set to 12. Fig. 31 illustrates possible MVs of the proposed mode.

[0257] Same as SbTMVP mode, the CU is split into 4x4 subblocks, and each subblock derives its own motion from a corresponding subblock in the collocated picture. One collocated picture is used for non-low delay pictures, whereas two collocated pictures are used for low delay pictures. When deriving the motion for subblocks, the reference pictures are fixed to the one with the reference picture index equal to 0.

[0258] When the AMVP with SbTMVP mode is applied to the CU, LIC and MHP are always disabled, and OBMC is always enabled for the CU. Besides, the AMVR is enabled for picture resolution larger than or equal to 3840x2160 luma samples. When the AMVR is enabled for a AMVP with SbTMVP coded block, the MVD magnitudes are increased from {4, 8, 12} -pel to {16, 24, 32}-pel.2.1.2.5. Template matching (TM)

[0259] 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. 32, a better MV is searched around the initial motion of the current CU within a [- 8, +8] -pel search range. The template matching method is used with the following modifications: search step size is determined based on AMVR mode and TM can be cascaded with bilateral matching process in merge modes.

[0260] In AMVP mode, an MVP candidate is determined based on template matching error to select the one which reaches the minimum difference between the current block template and the reference block template, and then TM is performed 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 16-point 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. This search process ensures that the MVP candidate still keeps the same MV precision as indicated by the AMVR mode after TM process. In the search process, if the difference between the previous minimum cost and the current minimum cost in the iteration is less than a threshold that is equal to the area of the block, the search process terminates.Table 2. Search patterns of AMVR and merge mode with AMVR.AMVR mode Merge modeSearch pattern 4-pel Full-pel Half- Quarter- AItIF=0 Al- pel pel tIF=lV4-pel diamondV4-pel cross33 F1257162PCTV V V V V Full-pel diamondV V V V VFull-pel crossV V V VHalf-pel crossV VQuarter-pelcrossV1 / 8-pel cross

[0261] In merge mode, similar search method is applied to the merge candidate indicated by the merge index. 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.

[0262] When TM is applied to bi-predictive blocks, an iterative process is used. Specifically, the initial motion vectors of L0 and LI are firstly refined and TM costs Costo and Cost1 are calculated for L0 and LI, respectively. When Costo is larger than Cost. the refined motion vector of LI (MV’l) is used to derive a further refined motion vector of L0 (MV"0). Then, the MV’l is further refined using MV’O. Similarly, when Costo is not larger than Costi, the refined motion vector of L0 (MV’O) is used to derive a further refined motion vector of LI (MV’l), and the MV’O is further refined using MV’l. Besides, TM for bi-prediction is enabled when DMVR condition is satisfied.2.1.2.5.1. TM-based subblock motion refinement

[0263] It is proposed to apply the template matching to subblock based motion tools, including the affine and SbTMVP mode. More specifically, the control point motion vectors (CPMVs) of uni-predicted affine merge candidates and the motion shift of SbTMVP candidates are refined using TM. For a uni-predicted affine merge candidate, a same MV offset is assigned to all the CPMVs, and the TM cost of the affine candidate is calculated accordingly. The optimal CPMV offset with the minimum TM cost can be used to refine the corresponding affine candidate. For a SbTMVP candidate, the initial motion shift can be refined with TM, and then the refined motion shift will be utilized to derive subblock temporal motion information.2.1.2.6. Multi-pass decoder-side motion vector refinement

[0264] A multi-pass decoder-side motion vector refinement is applied. In the first pass, bilateral matching (BM) is applied to the coding block. In the second pass, BM is applied to each 16x16 subblock within the coding block. In the third pass, MV in each 8x8 subblock is refined by applying bi-directional optical flow (BDOF). The refined MVs are stored for both spatial and temporal motion vector prediction.34 F1257162PCT2.1.2.6.1. First pass - Block based bilateral matching MV refinement

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

[0266] BM performs local search to derive integer sample precision intDeltaMV. The local search applies a 3x3 square search pattern to loop through the search range [-sHor, sHor] in horizontal direction and [-sVer, sVer] in 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.

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

[0268] The existing fractional sample refinement is further applied to derive the final deltaMV. The refined MVs after the first pass is then derived as:® MV0_pass1 ~ MVO + deltaMV• MV1_pass1 = MV1 - deltaMV.2.1.2.6.2. Second pass - Subblock based bilateral matching MV refinement

[0269] In the second pass, a refined MV is derived by applying BM to a 16x16 grid subblock. For each subblock, a refined MV is searched around the two MVs (MV0_pass1 and MV1_pass1), obtained on the first pass, in the reference picture list L0 and LI. The refined MVs (MVO pass2(sbldx2) and MV1 jpass2(sbldx2)) are derived based on the minimum bilateral matching cost between the two reference subblocks in L0 and LI.

[0270] For each subblock, BM performs full search to derive integer sample precision intDeltaMV. The full search has a search range [-sHor, sHor] in horizontal direction and [- sVer, sVer] in 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.

[0271] The bilateral matching cost is calculated by applying a cost factor to the SATD cost between two reference subblocks, as: bilCost = satdCost * costF actor. The search area (2*sHor + 1) * (2*sVer + 1) is divided up to 5 diamond shape search regions. 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 35 F1257162PCTsearch 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. Additionally, if the difference between the previous minimum cost and the current minimum cost in the iteration is less than a threshold that is equal to the area of the block, the search process terminates. Fig. 33 illustrates diamond regions in the search area.

[0272] The existing VVC DMVR fractional sample refinement is further applied to derive the final deltaMV(sb!dx2). The refined MVs at second pass is then derived as:® MV0_pass2(sbIdx2) = MV0_pass1 + deltaMV(sbIdx2)® MVl_pass2(sbIdx2) = MV1_pass1 - deltaMV(sbIdx2).2.1.2.6.3. Third pass - Subblock based bi-directional optical flow MV refinement

[0273] In the third pass, a refined MV is derived by applying BDOF to an 8x8 grid subblock. For each 8x8 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.

[0274] The refined MVs (MV0_pass3(sbIdx3) and MVl_pass3(sbIdx3)) at third pass are derived as:« MVO pass3(sbldx3) = MVO pass2(sbldx2) + bioMv» MVl_pass3(sbldx3) = MV0_pass2(sbIdx2) - bioMv2.1.2.6.4. Fourth pass - Adaptive subblock based bi-directional optical flow MV refinement

[0275] In the fourth pass, a refined MV is derived by applying BDOF to an 4x4 or 8x8 or 16x16 grid subblock. When a block is smaller than 1024 pixels, the 4x4 grid subblock is used. Otherwise, 8x8 grid subblock is used. The MV of each subblock is refined in the same way as that used in third pass,

[0276] In all aforementioned sub- clauses, when wrap around motion compensation is enabled, the motion vectors shall be clipped with wrap around offset taken into consideration. It is noted that in ECM, the DMVR is extended to non -equal POC distance cases, and the mean removed equations are utilized to derive the BDOF MV refinement parameters as:(SGx. Gx+Rl) * vx + EGx. Gy * vy = Sdl. Gx. (SGx. Gx+Rl) * vx + SGx. Gy * vy = Sdl. Gx - dM. £Gx SGx. Gy * vx + (SGy. Gy+Rl) * vy- Sdl. Gy -» SGx. Gy * vx + (ZGy. Gy+Rl) * vy = Sdl. Gy - dM. ZGy2.1.2.7. Adaptive decoder-side motion vector refinement

[0277] Adaptive decoder side motion vector refinement method is an extension of multi-pass DMVR which consists of the two new merge modes to refine MV only in one direction, either L0 or LI, of the 36 F1257162PCTbi-prediction for the merge candidates that meet the DMVR conditions. The multi-pass DMVR process is applied for the selected merge candidate to refine the motion vectors, however either MVDO or MVD1 is set to zero in the 1stpass (i.e., PU level) DMVR.

[0278] The merge candidates for the new merge mode are derived from spatial neighboring coded blocks, TMVPs, non-adjacent blocks, IIMVPs, pair-wise candidate, similar as in the regular merge mode. The difference is that only those meet DMVR conditions are added into the candidate list. The same merge candidate list is used by the two new merge modes. If the list of BM candidates contains the inherited BCW weights and DMVR process is unchanged except the computation of the distortion is made using MRSAD or MRSATD if the weights are non -equal and the bi-prediction is weighted with BCW weights. Merge index is coded as in regular merge mode.2.1.2.8. OBMC

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

[0280] Conditions of not applying OBMC are as follows:® When OBMC is disabled at SPS level• When current block has intra mode or IBC mode• When current luma block area is smaller or equal to 32.

[0281] Additionally OBMC is adaptively controlled on a block level as follows:• OBMC flag is inherited from a neighboring affine block for affine merge mode,• OBMC is not applied to a block if there is a neighbor block coded with IBC, palette, or BDPCM modes, • When applying OBMC to a block, block boundary check whether OBMC is applied to the boundary is further made based on the reference samples of the current block. If any absolute difference between the prediction sample and non-interpolated (integer pel) reference sample is greater than a threshold, the OBMC is not applied to that boundary.

[0282] A subblock-boundary OBMC is performed by applying the same blending to the top, left, bottom, and right subblock boundary’ pixels using neighboring subblocks’ motion information. It is enabled for the subblock based coding tools:• Affine AMVP modes:• Affine merge modes and subblock-based temporal motion vector prediction (SbTMVP);• Subblock-based bilateral matching.

[0283] When OBMC mode is used in CUP mode with LMCS, inter blending is performed prior to LMCS mapping of inter samples. LMCS is applied to blended inter samples which are combined with LMCS applied intra samples in CUP mode,F1257162PCT;(128 - w x InterpredY+ x OBMCpredYInterpredY=128PredY- ~W°X FwdMaPinterpredy) +woxlntrapredYre' 4, where InterpredYrepresents the samples predicted by the motion of current block in the original domain, IntrapredYrepresents the samples predicted in the mapped domain, OBMCpredYrepresents the samples pre¬ dicted by the motion of neighboring blocks in the original domain, and w0and wq are the weights.

[0284] When OBMC mode is used in a LIC coded block, the LIC parameters are applied to generate the corresponding prediction samples for the OBMC of the LIC coded block. Besides, to reduce the complexity, the OBMC is only applied to the top and left CU boundaries while being always disabled for the boundaries of the internal sub-blocks of the LIC coded block.2.1.2.9. Template matching based OBMC

[0285] In template matching based OBMC scheme, instead of directly using the weighted prediction, the prediction value of CU boundary samples derivation approach is decided according to the template matching costs, including using current block’s motion information only, or using neighboring block’s motion information as well with one of the blending modes.

[0286] In this scheme for each block with a size of 4x4 at the top CU boundary, the above template size equals to 4x1. If N adjacent blocks have the same motion information, then the above template size is enlarged to 4A"x 1 since the MC operation can be processed at one time. For each left block with a size of 4x4 at the left CU boundary, the left template size equals to 1 x4 or 1×4N. Fig. 34 illustrates a template,

[0287] For each 4x4 top block (or N 4x4 blocks group), the prediction value of boundary samples is derived following the below steps.

[0288] Take block A as the current block and its above neighboring block AboveNeighbor A for example. The operation for left blocks is conducted in the same manner.

[0289] First, three template matching costs (Costl, Cost2, Cost3) are measured by SAD between the reconstructed samples of a template and its corresponding reference samples derived by MC process according to the following three types of motion information:Costl is calculated according to A’s motion information.Cost is calculated according to AboveNeighbor A's motion information.Cost3 is calculated according to weighted prediction of A’s and AboveNeighbor A’s motion information with weighting factors asand respectively.

[0290] Second, choose one approach to calculate the final prediction results of boundary samples by comparing Costl, Cost2 and Cost 3.

[0291] The original MC result using current block’s motion information is denoted as Pixell, and the MC result using neighboring block’s motion information is denoted as Pixel2. The final prediction result is denoted as New Pixel.38 F1257162PCTIf Cost! is minimum, then NewPixel(i,f) = P ixeH(j,jIf (Cost2 + (Cost2 » 2) + ((2ost2 » 3)) <= Costl, then blending mode 1 is used.For luma blocks, the number of blending pixel rows is 4.NewPixel(i, 0) ~ (26 x PixelKj, 0) + 6 x Pixel2(j, 0) + 16) » 5NewPixelj, 1) = (7 x Pixellji, 1) + Pixel2(j, 1) + 4) » 3NewPixe j, 2) = (15 x PixelKj, 2) + Pixel2(j, 2) + 8) » 4NewPixel(i, 3) — (31 x PixelKj, 3) + Pixel2(j, 3) + 16) » 5For chroma blocks, the number of blending pixel rows is 1.NewPixel(i, 0) — (26 x PixelKj, 0) + 6 x Pixel2(i, 0) + 16) » 5If Costl <~ Cost2, then blending mode 2 is used.For luma blocks, the number of blending pixel row?s is 2.NewPixel(i, 0) ~ (15 x PixelKi, 0) + Pixel2(j, 0) + 8) » 4NewPixelj, 1) = (31 x PixelKj, 1 ) + Pixel2(i, 1) + 16) » 5For chroma blocks, the number of blending pixel rows / columns is 1.NewPixelj, 0) = (15 x PixelKj 0) + Pixel2(i, 0) + 8) » 4Otherw ise, blending mode 3 is used.For luma blocks, the number of blending pixel rows is 4.NewPixe j, 1) — (7 x Pixell(i, 1) + Pixel2(i, 1) + 4) » 3NewPixel(i, 2) ~ (15 x PixelKi, 2) + Pixel2(j, 2) + 8) » 4NewPixetfj, 3) = (31 x PixelKj, 3) + Pixel2(i, 3) + 16) » 5For chroma blocks, the number of blending pixel rows is 1.NewPixetfj, 0) = (7 x PixelKj; 0) + Pixel2(j, 0) + 4) » 32.1.2.10. History-parameter-based affine model inheritance and non-adjacent affine mode

[0292] History-parameter-based affine model inheritance (HAMI) allows the affine model to be inherited from a previously affine-coded block which may not be neighboring to the current block. Similar to the enhanced regular merge mode, non-adjacent affine mode (NA-AFF) is introduced.

[0293] A first history-para eter table (HPT) is established. An entry of the first HPT stores a set of affine parameters: a, b, c and d, each of which is represented by a 16-bit signed integer. Entries in HPT is categorized by reference list and reference index. Five reference indices are supported for each reference list in HPT. In a formulating way, the category of HPT (denoted as HPTCat) is calculated as HPTCat(RefList, RefIdx) 5xRefList + min (Refldx, 4), wherein RefList and Refldx represents a reference picture list (0 or 1) and a reference index, respectively. For each category, at most seven entries can be stored, resulting in 70 entries totally in HPT. At the beginning of each CTU row, the number of entries for each category is initialized as zero. After decoding an affine-coded39 F1257162PCTCU with reference list RefListcurand RefIdxcur, the affine parameters are utilized to update entries in the category HPTCat(RefListcur, RefIdxcur) in a way similar to HMVP table updating.

[0294] A history-affine-parameter-based candidate (HAPC) is derived from one of the seven neighbouring 4x4 blocks denoted as AO, Al, A2, BO, Bl, B2 or B3 in Fig. 35 and a set of affine parameters stored in a corresponding entry in the first HPT. The MV of a neighbouring 4x4 block served as the base MV. In a formulating way, the MV of the current block at position(x, is calculated as:<vh(x, v) - a(x - xbase) + c( v - ybase) + mvbasemv (x, y) = b(x- xbase)+d(y- ybase) + m^asewhere represents the MV of the neighbouring 4x4 block,represents the center position of the neighbouring 4x4 block.can be the top-left, top-right and bottom-left corner of the current block to obtain the comer-position MVs (CPMVs) for the current block, or it can be the center of the current block to obtain a regular MV for the current block.

[0295] A second history-parameter table (HPT) with base MV information is also appended. There are nine entries in the second HPT, wherein an entry comprises a base MV, a reference index and four affine parameters for each reference list, and a base position. An additional merge HAPC can be generated from the second HPT with the base MV information the corresponding affine models stored in an entry’.

[0296] Moreover, pair-wised affine merge candidates are generated by two affine merge candidates which are history-derived or not history -derived. A pair-wised affine merge candidates is generated by averaging the CPMVs of existing affine merge candidates in the list.

[0297] As a response to new HAPCs being introduced, the size of sub -block -based merge candidate list is increased from five to fifteen, which are all involved in the ARMC process.

[0298] In NA-AFF, the pattern of obtaining non-adjacent spatial neighbors is shown in Fig. 36. Same as the existing non-adjacent regular merge candidates, the distances between non-adjacent spatial neighbors and current coding block in the NA-AFF are also defined based on the width and height of current CU.

[0299] The motion information of the non-adjacent spatial neighbors in Fig, 36 is utilized to generate additional inherited and constructed affine merge / AMVP candidates. Specifically, for inherited candidates, the same derivation process of the inherited affine merge / AMVP candidates in the VVC is kept unchanged except that the CPMVs are inherited from non-adjacent spatial neighbors. The non- adjacent spatial neighbors are checked based on their distances to the current block, i.e., from near to far. At a specific distance, only the first available neighbor (that is coded with the affine mode) from each side (e.g., the left and above) of the current block is included for inherited candidate derivation. The checking orders of the neighbors on the left and above sides are bottom -to-up and right-to-left, respectively.

[0300] For the first type of constructed candidates, the positions of one left and above non-adjacent spatial neighbors are firstly determined independently; After that, the location of the top -left neighbor can be determined accordingly which can enclose a rectangular virtual block together with the left and above 40 F1257162PCTnon-adjacent neighbors. Then, the motion information of the three non -adjacent neighbors is used to form the CPMVs at the top-left (A), top-right (B) and bottom-left (C) of the virtual block, which is finally projected to the current CU to generate the corresponding constructed candidates.

[0301] The NA-AFF candidates are inserted into the existing affine merge candidate list and affine AMVP candidate list according to the following orders:Affine merge mode:1. SbTMVP candidate, if available2. Inherited from adjacent neighbors3. Inherited from non-adj acent neighbors4. Constructed from adjacent neighbors5. The first type of constructed affine candidates from non-adjacent neighbors6. Zero MVs.Affine AMVP mode:1. Inherited from adjacent neighbors2. Constructed from adjacent neighbors3. Translational MA’s from adjacent neighbors4. Translational MVs from temporal neighbors5. Inherited from non-adjacent neighbors6. The first type of constructed affine candidates from non-adjacent neighbors7. Zero MVs.

[0302] Due to the inclusion of the additional candidates generated by NA-AFF, the size of the affine merge candidate list is increased from 5 to 15. The subgroup size of ARMC for the affine merge mode is increased from 3 to 15. Fig. 36 illustrates spatial neighbors for deriving affine merge / AMVP candidates: (a) for deriving inherited candidates (b) for deriving the first type of constructed candidates. Fig. 37 illustrates from non-adjacent neighbors to the first type of constructed affine merge / AMVP candidates.

[0303] In NA-AFF:1, The area from where the non-adjacent neighbors come is restricted to be within the current CTU (i.e., no additional storage requirements for line buffer).2, The storage granularity for affine motion information, including CPM Vs and reference indexes, is re¬ duced from 8x8 to 16x16 (i.e., only the affine motion from the top-left 8x8 block is saved). Additionally, the saved CPMVs are projected to each 16x16 block before storage, such that the position and size information are not needed.41 F1257162PCT3. Only the top-left and top-right CPMVs are stored (i.e., always using 4-parameter affine model for NA- AFF).2.1.2.11. Sample-based BDOF

[0304] In the sample-based BDOF, instead of deriving motion refinement (Vx, Vy) on a block basis, it is performed per sample.

[0305] The coding block is divided into 8x8 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 5x5 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.1.2.12. Interpolation

[0306] The 8-tap interpolation filter used in VVC is replaced with a 12 -tap filter. The interpolation filter is derived from the sine function of which the frequency response is cut off at Nyquist frequency and cropped by a cosine window function.Table 3. Filter coefficients of the 12-tap interpolation filter1 / 16 -1 2 -3 6 -14 254 16 -7 4 -2 1 0 2 / 16 -1 3 -7 12 -26 249 35 -15 8 -4 2 0 3 / 16 -2 5 -9 17 -36 241 54 -22 12 -6 3 -1 4 / 16 -2 5 -11 21 -43 230 75 -29 15 -8 4 -1 5 / 16 -2 6 -13 24 -48 216 97 -36 19 -10 4 -1 6 / 16 -2 7 -14 25 -51 200 119 -42 22 -12 5 -1 7 / 16 -2 7 -14 26 -51 181 140 -46 24 -13 6 -2 8 / 16 -2 6 -13 25 -50 162 162 -50 25 -13 6 -2 9 / 16 -2 6 -13 24 -46 140 181 -51 26 -14 7 -2 10 / 16 -1 5 -12 22 -42 119 200 -51 25 -14 7 -2 11 / 16 -1 4 -10 19 -36 97 216 -48 24 -13 6 -2 12 / 16 -1 4 -8 15 -29 75 230 -43 21 -11 5 -2 13 / 16 -1 3 -6 12 -22 54 241 -36 17 -9 5 -2 14 / 16 0 2 -4 8 -15 35 249 -26 12 -7 3 -1 15 / 16 0 1 -2 4 -7 16 254 -14 6 -3 2 -1

[0307] Fig. 38 illustrates frequency responses of the interpolation filter and the VVC interpolation filter at half-pel phase. For chroma interpolation additional longer 6 -tap filters are used.42 F1257162PCTTable 4. The coefficients of the 6-tap interpolation filter for chroma components. Fractional position Coefficients (6 taps)1 / 32 [0, 0, 256, 0, 0, 0},2 / 32 {1, -6, 256, 7, -2, 0},3 / 32 {2, -11, 253, 15, -4, 1},4 / 32 {3, -16, 251, 23, -6, 1},5 / 32 {4, -21, 248, 33, -10, 2},6 / 32 {5, -25, 244, 42, -12, 2},7 / 32 {7, -30, 239, 53, -17, 4},8 / 32 {7, -32, 234, 62, -19, 4},6 / 32 {8, -35, 227, 73, -22, 5},7 / 32 {9, -38, 220, 84, -26, 7},8 / 32 {10, -40, 213, 95, -29, 7},9 / 32 {10, -41, 204, 106, -31, 8},10 / 32 {10, -42, 196, 117, -34, 9},11 / 32 {10, -41, 187, 127, -35, 8},12 / 32 {11, -42, 177, 138, -38, 10},13 / 32 {10, -41, 168, 148, -39, 10},14 / 32 {10, -40, 158, 158, -40, 10},15 / 32 {10, -39, 148, 168, -41, 10},16 / 32 {10, -38, 138, 177, -42, 11},17 / 32 {8, -35, 127, 187, -41, 10},18 / 32 [9, -34, 117, 196, -42, 10},19 / 32 {8, -31, 106, 204, -41, 10},20 / 32 {7, -29, 95, 213, -40, 10},21 / 32 [7, -26, 84, 220, -38, 9},22 / 32 {5, -22, 73, 227, -35, 8},23 / 32 {4, -19, 62, 234, -32, 7},24 / 32 {4, -17, 53, 239, -30, 7},25 / 32 {2, -12, 42, 244, -25, 5},26 / 32 {2, -10, 33, 248, -21, 4},27 / 32 {1, -6, 23, 251, -16, 3},28 / 32 {1, -4, 15, 253, -11, 2},31 / 32 {0, -2, 7, 256, -6, 1},2.1.2.13. Multi-hypothesis prediction (MHP)

[0308] In the multi-hypothesis inter prediction mode, one or more additional motion -compensated43 F1257162PCTprediction signals are signaled, in addition to the conventional bi -prediction signal. The resulting overall prediction signal is obtained by sample-wise weighted superposition. With the bi-prediction signal pbiand the first additional inter prediction signal / hypothesis h3, the resulting prediction signal p3is obtained as follows:p3= (1 - a)pbi+ ah3

[0309] The weighting factor a is specified by the new syntax element add hyp weight idx, according to the following mapping:add hyp weight idx a0 1 / 41 -1 / 8

[0310] Analogously to above, more than one additional prediction signal can be used. The resulting overall prediction signal is accumulated iteratively with each additional prediction signal.Pn+i = (1 - an+1)pn+ an+1hn+1

[0311] The resulting overall prediction signal is obtained as the last pn(i.e., the pnhaving the largest index n). Within this EE, up to two additional prediction signals can be used (i.e., n is limited to 2).

[0312] The motion parameters of each additional prediction hypothesis can be signaled either explicitly by specifying the reference index, the motion vector predictor index, and the motion vector difference, or implicitly by specifying a merge index. A separate multi-hypothesis merge flag distinguishes between these two signalling modes.

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

[0314] Combination of MHP and BDOF is possible, however the BDOF is only applied to the bi¬ prediction signal part of the prediction signal (i.e., the ordinary first two hypotheses).2.1.2.14. Pixel based affine motion compensation

[0315] The minimum affine subblock size is changed from 4x4 to 1x1 for both luma and chroma components, 1x1 subblock size allows pixel based affine MC. When affine subblock width or height is smaller than 4, PROF is disabled.2.1.2.15. Affine subblock BDOF refinement

[0316] BDOF subblock MV refinement and sample adjustment is applied to an affine or SbTMVP coded block with subblock MC when BDOF condition is satisfied.

[0317] An affine coded block, e.g. affine regular merge mode, affine BM merge mode, affine AMVP mode, derives MVs for each 4x4 subblock from the affine model. The BDOF process starts with the 4x4 subblocks grouping with identical MVs. The first iteration of BDOF MV refinement is processed in 8x8 subblock grid as in ECM-10.0. When the grouped subblock size is less than 256, the second iteration of 44 F1257162PCTBDOF MV refinement is processed in 4x4 subblock grid, and otherwise in 8x8 subblock grid. When the grouped subblock size is 4xN or Nx4, the first iteration of BDOF MV refinement is bypassed.2.1.2.16. Adaptive reordering of merge candidates with template matching (ARMC-TM)

[0318] The merge candidates are adaptively reordered with template matching (TM). The reordering method is applied to regular merge mode, TM merge mode, and affine merge mode (excluding the SbTMVP candidate). For the TM merge mode, merge candidates are reordered before the refinement process.

[0319] An initial merge candidate list is firstly constructed according to given checking order, such as spatial, TMVPs, non-adjacent, HM VPs, pairwise, virtual merge candidates. Then the candidates in the initial list are divided into several subgroups. For the template matching (TM) merge mode, adaptive DMVR mode, each merge candidate in the initial list is firstly refined by using TM / multi-pass DMVR. Merge candidates in each subgroup are reordered to generate a reordered merge candidate list and the reordering is according to cost values based on template matching. The index of selected merge candidate in the reordered merge candidate list is signalled to the decoder. For simplification, merge candidates in the last but not the first subgroup are not reordered. All the zero candidates from the ARMC reordering process are excluded during the construction of Merge motion vector candidates list. The subgroup size is set to 5 for regular merge mode and TM merge mode. The subgroup size is set to 3 for affine merge mode,• Cost calculation

[0320] The template matching cost of a merge candidate during the reordering process is measured by the SAD between samples of a template of the current block and their corresponding reference samples. The template comprises a set of reconstructed samples neighboring to the current block. Reference samples of the template are located by the motion information of the merge candidate. When a merge candidate utilizes bi-directional prediction, the reference samples of the template of the merge candidate are also generated by bi-prediction.* Refinement of the initial merge candidate list

[0321] When multi-pass DMVR is used to derive the refined motion to the initial merge candidate list only the first pass (i.e., PU level) of multi-pass DMVR is applied in reordering. When template matching is used to derive the refined motion, the template size is set equal to 1. Only the above or left template is used during the motion refinement of TM when the block is flat with block width greater than 2 times of height or narrow with height greater than 2 times of width. TM is extended to perform 1 / 16 -pel MVD precision. The first four merge candidates are reordered with the refined motion in TM merge mode. Fig.39 illustrates template and reference samples of the template in reference pictures.

[0322] For subblock-based merge candidates with subblock size equal to Wsub x Hsub, the above template comprises several sub-templates with the size of Wsub x 1 and the left template comprises several sub-templates with the size of 1 x Hsub. The motion information of the subblocks in the first row and the first column of current block is used to derive the reference samples of each sub -template.45 F1257162PCTReordering criteria

[0323] In the reordering process, a candidate is considered as redundant if the cost difference between a candidate and its predecessor is inferior to a lambda value e.g. |D 1 -D2j < X, where DI and D2 are the costs obtained during the first ARMC ordering and X is the Lagrangian parameter used in the RD criterion at encoder side.

[0324] The proposed algorithm is defined as the following:Determine the minimum cost difference between a candidate and its predecessor among all candidates in the list• If the minimum cost difference is superior or equal to X, the list is considered diverse enough and the reordering stops.• If this minimum cost difference is inferior to X, the candidate is considered as redundant, and it is moved at a further position in the list. This further position is the first position where the candidate is diverse enough compared to its predecessor.The algorithm stops after a finite number of iterations (if the minimum cost difference is not inferior to X).

[0325] This algorithm is applied to the Regular, TM, BM and Affine merge modes. A similar algorithm is applied to the Merge MMVD and sign MVD prediction methods which also use ARMC for the reordering.

[0326] The value of X is set equal to the X of the rate distortion criterion used to select the best merge candidate at the encoder side for low delay configuration and to the value X corresponding to a another QP for Random Access configuration, A set of X values corresponding to each signaled QP offset is provided in the SPS or in the Slice Header for the QP offsets which are not present in the SPS.• Extension to AMVP modes

[0327] The ARMC design is also applicable to the AMVP mode wherein the AMVP candidates are reordered according to the TM cost. For the template matching for advanced motion vector prediction (TM-AMVP) mode, an initial AMVP candidate list is constructed, followed by a refinement from TM to construct a refined AMVP candidate list. In addition, an MVP candidate with a TM cost larger than a threshold, which is equal to five times of the cost of the first MVP candidate, is skipped.

[0328] Note, when wrap around motion compensation is enabled, the MV candidate shall be clipped with wrap around offset taken into consideration. Fig. 40 illustrates template and reference samples of the template for block with sub-block motion using the motion information of the subblocks of the current block.2.1.2.17. MV candidate type based ARMC

[0329] Merge candidates of one single candidate ty pe, e.g., TMVP or non -adjacent MVP (NA-MVP), are 46 F1257162PCTreordered based on the ARMC TM cost values. The reordered candidates are then added into the merge candidate list. The TMVP candidate type adds more TMVP candidates with more temporal positions and different inter prediction directions to perform the reordering and the selection. Moreover, NA-MVP candidate type is further extended with more spatially non-adjacent positions. The target reference picture of the TMVP candidate can be selected from any one of reference picture in the list according to scaling factor. The selected reference picture is the one whose scaling factor is the closest to 1,2.1.2.18. TM based reordering for MMVD and affine MMVD

[0330] The MMVD offsets are extended for MMVD and affine MMVD modes. Additional refinement positions along kxjr / 8 diagonal angles are added, thus increasing the number of directions from 4 to 16. Second, based on the SAD cost between the template (one row above and one column left to the current block) and its reference for each refinement position, all the possible MMVD refinement positions (16x6) for each base candidate are reordered. Finally, the top 1 / 8 refinement positions with the smallest template SAD costs are kept as available positions, consequently for MMVD index coding. The MMVD index is binarized by the rice code with the parameter equal to 2. The affine MMVD reordering is extended, in which additional refinement positions along kx?r / 4 diagonal angles are added. After reordering top 1 / 2 refinement positions with the smallest template S AD costs are kept,

[0331] The first N motion candidates in the candidate list before being reordered are utilized as the base candidates for MMVD and affine MMVD. N is equal to 3 for MMVD, and [1, 3] depending on the neighboring block affine flags for affine MMVD. Two ways of adding MMVD offsets are allowed, including the ‘two-side’ and ‘one-side’, depending on whether the offset of the other reference picture list is mirrored or directly set to zero. Which way is applied to one block is dependent on the TM cost. Fig. 41 illustrates additional directions along kx?t / 8 diagonal angles.2.1.2.19. Regression based affine candidate derivation

[0332] The Regression based Motion Vector Field (RMVF) derivation method provides a new variety of subblock-based merge candidate. The motion vectors and center positions from the neighboring subblocks of the current CU, are used as the input to the linear regression process to derive a set of linear model parameters. Fig. 42 illustrates the neighboring 4 x 4 subblocks that are used for RMVF parameter derivation. W and H are the width and height of the current CU.

[0333] The subblock motion field from a previous coded affine CU and the motion vectors from the adjacent subblocks of current CU are used as the input for the regression process. The predicted CPMVs for current block are derived as output.

[0334] The regression based affine merge candidates are derived and added to the affine merge list. Subblock motion field from a previously coded affine CU and motion information from adjacent subblocks of a current CU are used as the input to the regression process to derive proposed affine candidates.

[0335] The previously coded affine CU can be identified from scanning through non-adjacent positions and the affine HMVP table.47 F1257162PCT

[0336] Adjacent subblock information of current CU is fetched from 4x4 sub -blocks. For each sub-block, given a reference list, the corresponding motion vector and center coordinate of the sub -block may be used.

[0337] For each affine CU, up to 2 affine candidates can be derived. One with adjacent subblock information and one without. All the linear-regression-generated candidates are pruned and collected into one candidate sub-group, TM cost based ARMC process is applied when ARMC is enabled. Afterwards, up to N linear-regression-generated candidates are added to the affine merge list when N affine CUs are found. The number of affine candidates for ARMC is 30, the output list size is 15.2,1.2.20. Geometric partitioning mode (GPM)2.1.2.20.1. Geometric partitioning mode (GPM) with merge motion vector differences (MMVD)[0338JGPM in VVC is extended by applying motion vector refinement on top of the existing GPM unidirectional MVs. A flag is first signalled for a GPM CU, to specify whether this mode is used. If the mode is used, each geometric partition of a GPM CU can further decide whether to signal MVD or not. If MVD is signalled for a geometric partition, after a GPM merge candidate is selected, the motion of the partition is further refined by the signalled MVDs information. All other procedures are kept the same as in GPM.

[0339] The MVD is signaled as a pair of distance and direction, similar as in MMVD. There are nine candidate distances (‘A-pel, Vi-pel, 1-pel, 2 -pel, 3-pel, 4-pel, 6-pel, 8-pel, 16-pel), and eight candidate directions (four horizontal / vertical directions and four diagonal directions) involved in GPM with MMVD (GPM-MMVD). In addition, when pic fpel mmvd enabled flag is equal to 1, the MVD is left shifted by 2 as in MMVD.2.1.2.20.1.1 Geometric partitioning mode (GPM) with adaptive blending

[0340] In VVC, the final prediction samples are generated with by blending the prediction of the two prediction signals using weighted average. Two integer blending matrices (Wo and W>) are used. The weights in the GPM blending matrices are derived from the ramp function based on the displacement from a predicted sample position to the GPM partitioning boundary. The blending area size is fixed to two (2 samples on each side of the GPM partition split boundary).

[0341] The blending process in ECM is improved by adding four extra blending area sizes (quarter, half, double, and quadrupole of the existing area size). A CU level flag is coded to signal the selected blending area size is signalled. Furthermore, the extended weighting precision is utilized, in which the maximum value of the weighs is changed from 8 (in VVC) to 32 to accommodate the extended blending area sizes. Fig. 43 illustrates the ramp function for the weights for GPM blending based on the displacement (d) from a predicted sample position to the GPM partitioning boundary and the blending area size (r).2.1.2.20.2. Geometric partitioning mode ( GPM) with template matching (TM)

[0342] Template matching is applied to GPM, When GPM mode is enabled for a CU, a CU-level flag is signaled to indicate whether TM is applied to both geometric partitions. Motion information for each geometric partition is refined using TM. When TM is chosen, a template is constructed using left, above 48 F1257162PCTor left and above neighboring samples according to partition angle. The motion is then refined by minimizing the difference between the current template and the template in the reference picture using the same search pattern of merge mode with half -pel interpolation filter disabled.Table 5. Template for the 1st and 2nd geometric partitions, where A represents using above samples, L represents using left samples, and L+A represents using both left and above samples. Partition angle 0 2 3 4 5 8 11 12 13 14 Istpartition A A A A L+A L+A L+A L+A A A 2ndpartition L+A L+A L+A L L L L L+A L+A L+A Partition angle 16 18 19 20 21 24 27 28 29 30 Istpartition A A A A L+A L+A L+A L+A A A 2ndpartition L+A L+A L+A L L L L L+A L+A L+A

[0343] A GPM candidate list is constructed as follows:1. Interleaved List-0 MV candidates and List- 1 MV candidates are derived directly from the regular merge candidate list, where List-0 MV candidates are higher priority than List-1 MV candidates. A pruning method with an adaptive threshold based on the current CU size is applied to remove redundant MV candidates.2. Interleaved List- 1 MV candidates and List-0 MV candidates are further derived directly from the regular merge candidate list, where List-1 MV candidates are higher priority than List-0 MV candidates. The same pruning method with the adaptive threshold is also applied to remove redundant MV candidates.3. Zero MV candidates are padded until the GPM candidate list is full.

[0344] The GPM-MMVD and GPM-TM are exclusively enabled to one GPM CU. This is done by firstly signaling the GPM-MMVD syntax. When both two GPM-MMVD control flags are equal to false (i.e., the GPM-MMVD are disabled for two GPM partitions), the GPM-TM flag is signaled to indicate whether the template matching is applied to the two GPM partitions. Otherwise (at least one GPM-MMVD flag is equal to true), the value of the GPM-TM flag is inferred to be false.2.1.2.20.3. GPM with inter and intra prediction

[0345] In GPM wdth inter and intra prediction, the final prediction samples are generated by weighting inter predicted samples and intra predicted samples for each GPM-separated region. The inter predicted samples are derived by inter GPM whereas the intra predicted samples are derived by an intra prediction mode (IPM) candidate list and an index signaled from the encoder. The IPM candidate list size is pre¬ defined as 3, The available IPM candidates are the parallel angular mode against the GPM block boundary (Parallel mode), the perpendicular angular mode against the GPM block boundary (Perpendicular mode), and the Planar mode. Furthermore, GPM with intra and intra prediction is restricted to reduce the signalling overhead for IPMs and avoid an increase in the size of the intra prediction circuit on the hardware decoder. In addition, a direct motion vector and IPM storage on the GPM-blending area is 49 F1257162PCTintroduced to further improve the coding performance. Fig. 44 illustrates GPM with inter and intra prediction. Available IPM candidates (a) ~ (c). (d) Example of GPM with intra and intra prediction.

[0346] In DIMD and neighboring mode based IPM derivation Parallel mode is registered first. Therefore, max two IPM candidates derived from the decoder-side intra mode derivation (DIMD) method and / or the neighboring blocks can be registered if there is not the same IPM candidate in the list. As for the neighboring mode derivation, there are five positions for available neighboring blocks at most, but they are restricted by the angle of GPM block boundary', which are already used for GPM with template matching (GPM-TM).Table 6. The position of available neighboring blocks for IPM candidate derivation based on the angle of GPM block boundary'. A and L denotes the above and left side of the prediction block.Angle of GPM 0 2 3 4 5 8 II 12 13 14 1st partition A A A A L+A L+A L+A L+A A A 2nd partition L+A L+A L+A L L L L L+A L+A L+A Partition angle 16 18 19 20 21 24 27 28 29 30 1st partition A A A A L+A L+A L+A L+A A A 2nd partition L+A L+A L+A L L L L L+A L+A L+A

[0347] GPM-intra can be combined with GPM with merge with motion vector difference (GPM-MMVD). TIMD is used for on IPM candidates of GPM-intra to further improve the coding performance. The Parallel mode can be registered first, then IPM candidates of TIMD, DIMD, and neighboring blocks. 2.1.2.20.4. Template matching based reordering for GPM split modes

[0348] In template matching based reordering for GPM split modes, given the motion information of the current GPM block, the respective TM cost values of GPM split modes are computed. Then, all GPM split modes are reordered in ascending ordering based on the TM cost values. Instead of sending GPM split mode, an index using Golomb-Rice code to indicate where the exact GPM split mode located in the reordering list is signaled.

[0349] The reordering method for GPM split modes is a two-step process performed after the respective reference templates of the two GPM partitions in a coding unit are generated, as follows:• extending GPM partition edge into the reference templates of the two GPM partitions, resulting in 64 reference templates and computing the respective TM cost for each of the 64 reference templates;» reordering GPM split modes based on their TM cost values in ascending order and marking the best 32 split modes as available split modes.

[0350] The edge on the template is extended from that of the current CU, but GPM blending process is not used in the template area across the edge. Fig. 45 illustrates the edge on templates.50 F1257162PCT

[0351] After ascending reordering using TM cost, an index is signaled.2,1.2.20.5. Bi-predictive GPM

[0352] The GPM design in VVC relies on uni -predictive motion vectors to generate motion compensated prediction samples for each inter GPM partition. In ECM, such a design has been extended to allow usage of bi-predictive motion vectors.

[0353] When constructing a GPM candidate list, the extraction process that extracts uni -predictive motion vectors from the initial merge list is invoked only for small blocks 8x8, 16x8 and 8x16. For larger blocks, the extraction process is bypassed, so the initial merge list (which may contain merged Bi-MVs) is directly used as the final GPM merge list. The generation of the initial merge list is the same as before (i.e., the normal merge list generation without any candidate reordering) except that when generating the initial merge list for larger blocks (i.e., blocks with the extraction process bypassed), the motion vector difference threshold for controlling whether a candidate can be added into the list is increased to be one full sample distance.

[0354] BDOF based motion vector refinement as in the multi-pass DMVR is used when generating motion compensated prediction samples.

[0355] W’hen GPM-MMVD is used for a GPM partition and its base motion vector is bi-predictive, for low-delay pictures, the signalled MVD is applied on top of the L0 and LI motion vector as in the existing merge MMVD design. For non-low-delay pictures, the bi-predictive motion vector is converted into a uni-predictive motion vector first and then the MVD is applied on top.2.1.2.20.6. AMC-GPM

[0356] In ECM, the GPM is further extended to enable affine motion compensation (AMC). Therefore, a GPM partition can be predicted by AMC inter-prediction, non-AMC inter-prediction or intra-prediction. In addition, a GPM partition predicted by AMC can be combined with the other GPM partition predicted by AMC, non-AMC, or intra-prediction.

[0357] WTien AMC is applied, a uni-prediction affine merge candidate list is constructed from the subblock-based merge candidate list after discarding sub-TMVP candidates, similar to the uni-prediction merge candidate list construction for GPM in VVC. AMC is performed for a GPM partition using the control point motion vectors (CPMVs) of a merge candidate in the uni-prediction affine merge candidate list. The length of the uni -prediction affine merge candidate list is signalled in SPS. When ARMC is applicable, the uni-prediction affine merge candidate list is reordered according to the template costs.[0358JA gpm affine flag is signaled for each GPM partition to indicate whether AMC is applied for the GPM partition. A merge candidate index for the GPM partition is signaled using individual arithmetic context models depending on whether AMC or non-AMC is applied.[0359JAMC is not allowed for GPM-MMVD and GPM-TM.2.1.2.20.7. Implicit GPM51 F1257162PCT

[0360] In the implicit GPM, the two integer blending matrices (ILL and FFy) are derived from the template (I line above, 1 column left). The blending matrices are modelled as an affine linear function of the sample positions (x,y) in the current CU:Wofcy) = a.x + b.y + c and Wj(x,y) = 1 - Wo(x,y)

[0361] The parameters (a,b,c) are derived from the reference template using the same solver (MSE minimization) as the one used for CCCM, GLM or GL-CCCM. A list of pair of candidates is built from the regular GPM candidates and re-ordered with the template cost.The GPM implicit mode is signaled by a CU-level flag ( gpm implicit Jlag). If gpm implicit Jlag is true, a merge-idx is coded to signal the pair of GPM candidates to be used. If gpm implicit Jlag is false, the regular GPM syntax elements are signaled.2.1.2.21. Bilateral matching AMVP -merge mode

[0362] The bi-directional predictor is composed of an AMVP predictor in one direction and a merge predictor in the other direction. The mode can be enabled to a coding block when the selected merge predictor and the AMVP predictor satisfy DMVR condition, where there is at least one reference picture from the past and one reference picture from the future relatively to the current picture and the distances from two reference pictures to the current picture are the same, the bilateral matching MV refinement is applied for the merge MV candidate and AMVP MVP as a starting point. Otherwise, if template matching functionality is enabled, template matching MV refinement is applied to the merge predictor or the AMVP predictor which has a higher template matching cost.[0363JAMVP part of the mode is signaled as a regular uni -directional AMVP, i.e. reference index and MVD are signaled, and it has a derived MVP index if template matching is used or MVP index is signaled when template matching is disabled.

[0364] For AMVP direction LX, X can be 0 or I, the merge part in the other direction (1 - LX) is implicitly derived by minimizing the bilateral matching cost between the AMVP predictor and a merge predictor, i.e., for a pair of the AMVP and a merge motion vectors. For every merge candidate in the merge candidate list which has that other direction (1 - LX) motion vector, the bilateral matching cost is calculated using the merge candidate MV and the AMVP MV, The merge candidate with the smallest cost is selected. The bilateral matching refinement is applied to the coding block with the selected merge candidate MV and the AMVP MV as a starting point.

[0365] The third pass of multi pass DMVR which is sub-PU BDOF refinement of the multi-pass DMVR is enabled to AMVP -merge mode coded block. Sub-PU size of BDOF is adaptively selected depending on the widthxheight. For blocks smaller than 256, subblock size of 4x4, and othemise 8x8 is used. In addition, the following high-precision equations to derive the BDOF MV refinement parameters are utilized:EGx. Gx * vx + ZGx. Gy * vy = Sdl. Gx si * vx + s2 * vy = s3EGx. Gy * vx + EGy. Gy * vy = Sdl. Gy s2 * vx + s5 * vy = s652 F1257162PCTwhere Gx / Gy are the summation of the 2 horizontal / vertical gradients derived for each reference block.

[0366] Summations (E) are weighted sums, where weights depend on the position in the target region Q. The weights can also be applied to derive vx / vy in other cases.

[0367] The mode is indicated by a flag, if the mode is enabled AMVP direction LX is further indicated by a flag.

[0368] When bilateral matching (BM) AMVP -merge mode is used for the current block and template matching is enabled, MVD is not signalled. An additional pair of AMVP -merge MVPs is introduced. The merge candidate list is sorted based on the BM cost in increase order. An index (0 or 1) is signaled to indicate which merge candidate in the sorted merge candidate list to use. When there is only one candidate in merge candidate list, the pair of AMVP MVP and merge MVP without bilateral matching MV refinement is padded.2,1.2.22. IBC merge / AMVP list construction

[0369] The IBC merge / AMVP list construction compared to VVC is modified as follows:• Only if an IBC merge / AMVP candidate is valid, it can be inserted into the IBC merge / AMVP candidate list.» Above-right, bottom-left, and above-left spatial candidates (belonging to the adjacent spatial candidate category) and one pairwise average candidate can be added into the IBC merge / AMVP candidate list.• Template based adaptive reordering (ARMC-TM) is applied to IBC merge list.• Candidates from non-adjacent spatial neighboring blocks (a.k.a., non-adjacent candidates) can be added to the candidate lists of IBC merge modes and IBC AMVP. These non-adjacent candidates are inserted between the adjacent spatial candidates and the HBVP candidates for both IBC merge and IBC AMVP. The same reference area of non-adjacent merge in regular inter mode is reused for the IBC.• Auto-relocated block vector prediction (AR-BVP) candidates are added to the IBC merge and AMVP candidate list right after the HBVP candidates. A guiding block vector BVo.i (i.e., an existing BVP already in the candidate list) associated with the current block Bo points to a reference block Bi. If Bi has a BV denoted as BV1,2 pointing to a reference block B2, then BVo.2, given by BVo,2 BV 0,1 +BV1.2, is defined as the AR-BVP, guided by BVo.i. When deriving BVn,n+i guided by BVo,n, all five positions including top-left (e.g., LT), top-right (e.g., RT), center (e.g., Ctr), bottom-left (e.g., LB), and bottomright (e.g., RB) positions of Bnare checked to find BVn,n+1■.• Restriction that adjacent spatial candidates cannot be used for IBC merge of a 4x4 CU is removed.

[0370] The HMVP table size for IBC is increased to 25. After up to 20 IBC merge candidates are derived with full pruning, they are reordered together. After reordering, the first 6 candidates with the lowest template matching costs are selected as the final candidates in the IBC merge list.[0371 JThe zero vectors’ candidates to pad the IBC Merge / AMVP list are replaced wdth a set of BVP 53 F1257162PCTcandidates located in the IBC reference region. A zero vector is invalid as a block vector in IBC merge mode, and consequently, it is discarded as BVP in the IBC candidate list.Three candidates are located on the nearest comers of the reference region, and three additional candidates are determined in the middle of the three sub-regions (A, B, and C), whose coordinates are determined by the width, and height of the current block and the AX and AY parameters. Fig. 46 illustrates an example of how to derive AR-B VP. Fig. 47 illustrates the five positions in Bn (n is set to 1),

[0372] During the IBC AMVP list construction, a clustering of the BVP candidates may be applied when both BV candidate components are non-zero. The clustering with 1.2 distance is applied if there are more than 2 valid BV candidates and up to 6 candidates are clustered, the clustering radius is defined as Radius = log2(cbWidth ■ cbHeight) '» MIN_PU_SIZE).

[0373] The clustering method is applied in the candidate list order, and the candidates assigned to a group are removed from the list for the subsequent clusters. In each group, the BVP with a lowest TM cost is selected as the representative candidate of that group. Finally, the representative candidates of the two first groups are chosen as the candidates for the IBC AMVP list.

[0374] Furthermore, if one of BV candidate components is zero or block is coded in RRIBC, a flag is signalled to indicate this case with a directional flag indicating horizontal or vertical component is nonzero. Instead of usual IBC AMVP list, two new BVP candidates are derived, and the sign of the non-zero BV component is derived at decoder side. The AMVP BVPO is set to the nearest valid location to the current block (-cbWidth or -cbHeight), so the non-zero BVD is always negative, pointing to the left for a BV with a zero vertical component or to the above for a BV with a zero horizontal component. Likewise, the AMVP BVP1 is set to the farthest position from the current block in the valid reference region, that is the left boundary or the top boundary’ of the IBC search region. Consequently, if the BVP1 is selected, the BVD is always positive, pointing to the right for BV with a zero vertical component or to the bottom for BV with a zero -horizontal component. Fig. 48 illustrates padding candidates for the replacement of the zero-vector in the IBC listRadius — log2((cbWidth ■ cbHeight) » M1N_PU_S1ZE).

[0375] Fig. 49 illustrates IBC candidate clustering based on the L2 distance and the TM cost. The optimal IBC AMVP index is signalled, which allows deriving the sign of the non-zero BVD component at the decoder side. The absolute magnitude of non-zero BVD component is further signalled. In RRIBC, the direction of the flipping mode is derived from the signalled directional flag.2.1.2.23. IBC with Template Matching

[0376] Template Matching is used in IBC for both IBC merge mode and IBC AMVP mode,

[0377] The IBC-TM merge list is modified compared to the one used by regular IBC merge mode such that the candidates are selected according to a pinning method with a motion distance between the candidates as in the regular TM merge mode. The ending zero motion fulfillment is replaced by motion vectors to the left (-W, 0), top (0, -H) and top-left (-W, -H), where W is the width and H the height of the current CU.54 F1257162PCT

[0378] 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.

[0379] In the IBC-TM AMVP mode, up to 3 candidates are selected from the IBC-TM 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.

[0380] The Template Matching refinement for both IBC-TM merge and AMVP modes is quite simple since IBC motion vectors are constrained (i) to be integer and (ii) within a reference region. 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 depending on the AMVR value. Such a refinement accesses only to samples without interpolation. In both cases, the refined motion vectors and the used template in each refinement step must respect the constraint of the reference region. Fig. 50 illustrates IBC reference region depending on current CU position.2.1.2.24. IBC reference area

[0381] The reference area for IBC is extended to two CTU rows above. Specifically, for CTU (m, n) to be coded, the reference area includes CTUs with index (m-2, n-2)...(W, n-2),(0, n-l)...(W, n-l),(0, n),,. (m, n), where W denotes the maximum horizontal index within the current tile, slice or picture. When CTU size is 256, the reference area is limited to one CTU row above. This setting ensures that for CTU size being 128 or 256, IBC does not require extra memory in the current ETM platform. The per -sample block vector search (or called local search) range is limited to [--(C « 1), C » 2] horizontally and [ -C, C » 2] vertically to adapt to the reference area extension, where C denotes the CTU size. Fig. 51 illustrates reference area for IBC when CTU (m, n) is coded. The black block denotes the current CTU; grey blocks denote the reference area; and the white blocks denote invalid reference area.2.1.2.25. Fractional pel IBC

[0382] The option of block vector resolutions is extended to include quarter -pel resolution in additional to full-pel and 4-pel. Like inter AMVR syntax, the first bin is signalled to indicate whether BV is in quarter-pel resolution, and the second bin is signalled to switch between full-pel and 4-pel resolutions. The interpolation filters applied to the luma (8 -tap) and chroma (6-tap existed inter interpolation) components of an IBC block. For template-based IBC tools, a 2-tap bilinear interpolation filter is applied to generate template prediction blocks. Reference sample padding is performed when some of them are located outside IBC reference area. When needed, it performs in horizontal direction first and then vertical direction.2.1.2.26. Filtered IBC prediction

[0383] Additional filtered IBC mode is introduced, where a filter is applied to IBC predictor, which is derived by minimizing MSE between current and reference template.

[0384] Output of the filter is calculated as follows:55 F1257162PCTpredLumaVal = cOC + clN + c2S + c3E + c4W + c5P + c6B

[0385] The nonlinear term P is represented as power of two of the center sample C and scaled to the sample value range of the content:P = ( C*C + midVal ) » bitDepth

[0386] The bias term B represents a scalar offset between the input and output and is set to middle luma value (512 for 10-bit content).

[0387] This filtered mode is used as an additional mode for non-merge IBC blocks, and it is not used together with IBC-LIC, IBC-CIIP or RR-IBC. For IBC merge modes, this filtering mode is inherited when merge mode list is constructed. The mode flag is signalled before the IBC-LIC flag.2.1.2.27. MVD prediction

[0388] ln this method, possible MVD sign combinations and possible combinations of the first 6 most significant suffix bins of MVD magnitudes are sorted according to the template matching cost and index corresponding to the true MVD sign and MVD magnitudes is derived and context coded. At decoder side, the MVD are derived as following:1. Parse the magnitude of MVD components2. Parse context coded MVD prediction index3. Build MV candidates by creating combination between possible signs and possible MVD magnitudes and add it to the MV predictor4. Derive MVD prediction cost for each derived MV based on template matching cost and sort5. Use the signaled index to pick the true MVD.

[0389] MVD prediction is applied to inter AMVP, affine AMVP, MMVD and affine MMVD modes. Note, when wrap around motion compensation is enabled, the MV candidate shall be clipped with wrap around offset taken into consideration.2.1.2.28. BVD prediction

[0390] Similar to MVD prediction, possible B VD sign combinations of IBC mode are sorted according to the template matching cost. Moreover, the first 4 most significant suffix bins of exponential Golomb code used to represent BVD magnitudes is also sorted according to the TM cost. Template matching operation is used to determine a BVD candidate with the best cost and indicate in the bitstream whether the best candidate is predicted correctly or not. Fig. 52 illustrates prediction of BVD.2.1.2.29. Enhanced bi-directional motion compensation

[0391] In bi-directional motion compensation the out of boundary (OOB) prediction samples are discarded and only the non-OOB predictors, when available, are used to generate the final predictor. Specifically, let Pos_Xi and Pos_yi denote the position of one prediction sample in one current block,Mvj-j and Mv_y-j (x = 0,1) denote the MV of the current block; PosLeftBdry, PosRightBdry, PosTopBdry56 F1257162PCTand PosBottomBdryare the positions of four boundaries of the picture. One prediction sample is regarded as OOB when at least one of the following conditions is satisfied:(Pos^Xij + )>(FosB!-g / !tBdf.y+. W / ji?xe / ),(Pos_X[j + M v_x-j )<(PosLeftBdry- half pixel),(Posyi:j+ Mv_yff )>(PosBottomBdry+ halfpixel),(Pos_yij + Mv_y^)<(PosTopBdry- half pixel)where half pixel is equal to 8 that represents the half-pel sample distance in the 1 / 16-pel sample precision.

[0392] After examining the OOB condition for each sample, the final prediction samples of one bi¬ directional block are generated as follows:Ift‘>j is OOB and PfL> Jj is non-OOBpfinal __ pLielse if P f is non-OOB and P / ',1is OOBpfinal _pL0ri,jriJelsep / mai=(pLO+pLl+1) » 1OOB checking process is also applicable when BCW is enabled.

[0393] Finally, note this sample-adaptive bi-prediction process only applies to prediction units for which at least a reference bock is first detected as partially or entirely out-of-bounds. Thus, a block-level OOB criteria is first checked. If both prediction blocks are non-OOB, then the usual bi-prediction takes place, 2.1.2.30. Motion compensated picture boundary padding

[0394] The samples outside of the picture boundary are derived by motion compensation instead of using only repetitive padding. In the implementation, the total padded area size is increased by 16 compared to repetitive padding. This is to keep MV clipping, which implements repetitive padding. Fig. 53 illustrates motion compensated boundary padding method.

[0395] For motion compensation padding, MV of a 4x4 boundary block is utilized to derive a Mx4 or 4xM padding block. The value M is derived as the distance of the reference block to the picture boundary. Moreover, M is set at least equal to 4 as soon as the motion vector points to a position internal to the reference picture bounds. If boundary block is intra coded, then MV is not available, and M is set equal to 0. If M is less than 16, the rest of the padded area is filled with the repetitive padded samples. Fig. 54 illustrates an example of deriving a Mx4 padding block with a left padding direction.

[0396] In case of bi-directional inter prediction, only one prediction direction, which has a motion vector pointing to the pixel position farther away from the picture boundary in the reference picture in terms of the padding direction, is used in MC boundary padding.

[0397] The pixels in MC padding block are corrected with an offset, which is equal to the difference 57 F1257162PCTbetween the DC values of the reconstructed boundary block and its corresponding reference block. 2.1.2.31. Block level reference picture list reordering[0398JA block level reference picture reordering method based on template matching is used. For the uni-prediction AMVP mode, the reference pictures in List 0 and List 1 are interweaved to generate a joint list. For each hypothesis of the reference picture in the joint list template matching is performed to calculate the cost. The joint list is reordered based on ascending order of the template matching cost. The index of the selected reference picture in the reordered joint list is signaled in the bitstream. For the bi-prediction AMVP mode, a list of pairs of reference pictures from List 0 and List 1 is generated and similarly reordered based on the template matching cost. The index of the selected pair is signaled. 2.1.2.32. Reference picture resampling (RPR)

[0399] Reference picture resampling is inherited from VVC. Compared to the filter lengths in VVC, e.g., 8, 6 and 4 taps for luma affine coded blocks, luma non-affine coded blocks and chroma respectively, the corresponding RPR filters in ECM are increased to 12, 10 and 6 taps.

[0400] The LIC and template-based inter reordering tools, including ARMC, MMVD and affine MMVD reordering, template-based BCW derivation, block level reference picture list reordering and MVD prediction, are enabled when any of reference pictures is in different resolution to the current picture.2.1.2.33. Reconstruction-Reordered IBC (RR-IBC)[0401JA Reconstruction -Reordered IBC (RR-IBC) mode is allowed for IBC coded blocks. When RR-IBC 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.

[0402] 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.

[0403] To better utilize the symmetry property, a flip-aware BV adjustment approach is applied to refine the block vector candidate. For example, (x„hr, ynb,) and (xca,, ycur) represent the coordinates of the center sample of the neighbouring block and the current block, respectively, BVnbrand BVcurdenotes the BV of the neighbouring block and the current block, respectively. Instead of directly inheriting the BV from a neighbouring block, the horizontal component of BVeuris 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(x„br-Xcm) +. Similarly, the vertical component of Bycuris calculated 58 F1257162PCTby adding a motion shift to the vertical component of BVnbr(denoted as in case that the neighbouring block is coded with a vertical flip, i.e., BVct"v=2(ynbr -yCur) + BVnbrv. Fig. 55 illustrates BV adjustment for (a) horizontal flip, and (b) vertical flip, respectively.2.1.2.34. Combination of IBC with other coding tools2.1.2.34.1. IBC merge mode with block vector differences (IBC-MBVD)

[0404] Affine-MMVD and GPM-MMVD have been adopted to ECM as an extension of regular MMVD mode. It is natural to extend the MMVD mode to the IBC merge mode.

[0405] In IBC-MBVD, the distance set is { 1 -pel, 2-pel, 4-pel, 8-pel, I2-pel, 16-pel, 24-pel, 32-pel, 40- pel, 48-pel, 56-pel, 64-pel, 72-pel, 80-pel, 88-pel, 96-pel, 104-pel, 112-pel, 120-pel, 128-pel}, and the BVD directions are two horizontal and two vertical directions.

[0406] The base candidates are selected from the first five candidates in the reordered IBC merge list. And based on the SAD cost between the template (one row above and one column left to the current block) and its reference for each refinement position, all the possible MBVD refinement positions (20x4) for each base candidate are reordered. Finally, the top 8 refinement positions with the lowest template SAD costs are kept as available positions, consequently for MBVD index coding. The MBVD index is binarized by the rice code with the parameter equal to I.

[0407] In IBC-MBVD list derivation, adaptive BVD offsets along MVBD directions are enabled for IBC MBVD mode. The MBVD candidates search is a two-step process, which starts with checking template SAD costs of offsets added to BVP along each direction with the interval of 1-pel. The second step of the search checks template SAD costs with 1 / 4-pel interv al for the candidates around the selected candidates from the first step. For the integer MBVD (when existed in ECM ph fpel mbvd enabled flag is 0), those intervals are multiplied by 4. The candidates with the lowest TM cost are included into the final MBVD list.

[0408] An IBC-MBVD coded block does not inherit flip type from a RR-IBC coded neighbor block. 2.1.2.34.2. Combined intra block copy and intra prediction

[0409] Combined intra block copy and intra prediction (IBC-CIIP) is a coding tool for a CU which uses IBC and intra prediction to obtain two prediction signals, and the two prediction signals are weighted summed to generate the final prediction as follows:P = ( ibc * Pibc + ((1 « shift) - wibc) * Pintra+ (1 « (shift - 1))) » shift wherein Pibcand Pintra denote the IBC prediction signal and intra prediction signal. (wibc, shift) are set equal to (13, 4) and (I, I) for IBC merge mode and IBC AMVP mode.

[0410] An intra prediction mode (IPM) candidate list is used to generate the intra prediction signal, and the IPM candidate list size is pre-defined as 2. An IPM index is signalled to indicate which IPM is used.2.1.2.34.3. IBC with Geometry Partitioning

[0411] Intra block copy with geometry partitioning mode (IBC-GPM) is a coding tool which divides a CU into two sub-partitions geometrically. The prediction signals of the two sub-partitions are generated 59 F1257162PCTusing IBC and intra prediction. IBC-GPM can be applied to regular IBC merge mode or IBC TM merge mode. An intra prediction mode (IPM) candidate list is constructed using the same method as GPM with inter and intra prediction for intra prediction, and the IPM candidate list size is pre -defined as 3. There are 48 geometry partitioning modes in total, which are divided into two geometry’ partitioning mode sets as follows:T able 7: Geometry’ partitioning modes in the first geometry partitioning mode set ibc _gpm partition _idx 0 1 2 3 4 5 6 7angleldx 0 0 8 8 16 16 24 24distanceldx 1 3 1 3 1 3 1 3Table 8: Geometry’ partitioning modes in the second geometry’ partitioning mode set i b c gpm pa rtition idx 0 1 2 3 4 5 6 7 8 9 angleldx 2 2 2 3 3 3 4 4 4 5 distanceldx 0 1 3 0 1 3 0 1 3 0 ibc gpm partition idx 10 11 12 13 14 15 16 17 18 19 angleldx 5 5 11 11 11 12 12 12 1313 distanceldx 1 3 0 1 3 0 1 3 01 ibc gpm partition idx 20 21 22 23 24 25 26 27 28 29 angleldx 13 14 14 14 18 18 19 19 20 20 distanceldx 3 0 1 3 1 3 1 3 I 3 ibc gpm partition idx 30 31 32 33 34 35 36 37 38 39 angleldx 21 21 27 27 28 28 29 29 30 30 distanceldx 1 3 1 1 3 1 3 1 3

[0412] When IBC-GPM is used, an IBC-GPM geometry partitioning mode set flag is signalled to indicate whether the first or the second geometry partitioning mode set is selected, followed by the geometry partitioning mode index. An IBC-GPM intra flag is signalled to indicate whether intra prediction is used for the first sub-partition. When intra prediction is used for a sub-partition, an intra prediction mode index is signalled. When IBC is used for a sub-partition, a merge index is signalled.

[0413] In bi-predictive IBC GPM, two flags are signalled to indicate the prediction modes of two partitions, the first flag indicates whether the first partition is intra predicted, and if not then the second flag is signalled to indicate whether intra prediction is used for the second partition. This method is applied to SCC only.2.1.2.34.4. IBC BVP-merge and bi-predictive IBC merge

[0414] IBC-BVP-merge is similar to AMVP-merge, derives one BV from IBC block vector prediction (BVP) and the second BV from IBC merge to form bi-prediction for IBC. Two different indices for the IBC BVP and the IBC merge candidates are signalled.

[0415] Bi-predictive IBC merge is enabled together with MBVD and uni -merge. In bi-predictive IBC 60 F1257162PCTmerge, two BVs from the existing IBC merge candidate list are derived, utilizing two different indices, which are signalled. Bi-predictive IBC merge is applied to IBC regular merge and IBC MBVD. Bi-predictive IBC merge, IBC MBVD, and IBC uni -merge are enabled for non-SCC classes.2.1.2.34.5. IBC MBVD list derivation

[0416] In the test 2.4a, adaptive BVD offsets along MVBD directions and enabled for IBC MBVD mode. The MBVD candidates search is a two-step process, which starts with checking template SAD costs of offsets added to BVP along each direction with the interval of 1 -pel. The second step of the search checks template SAD costs with 1 / 4-pel interval for the candidates around the selected candidates from the first step. For the integer MBVD (when existed in ECM ph fpel mbvd enabled flag is 0), those intervals are multiplied by 4. The candidates with the lowest TM cost are included into the final MBVD list.2.1.2.34.6. IBC with Local Illumination Compensation

[0417] Intra block copy with local illumination compensation (IBC-LIC) is a coding tool which compensates the local illumination variation within a picture between the CU coded with IBC and its prediction block with a linear equation. The parameters of the linear equation are derived same as LIC for inter prediction except that the reference template is generated using block vector in IBC -LIC. IBC-LIC can be applied to IBC AMVP mode and IBC merge mode. For IBC AMVP mode, an IBC-LIC flag is signalled to indicate the use of IBC-LIC. Top-only, left-only, or L-shape templates are allowed for deriving the single model parameters. MMLM is extended to IBC-LIC, which allows IBC-LIC to have two linear models in one CLT. And only L-shape template is used in IBC-LIC MMLM. A mode index is signalled. For IBC merge mode, the IBC-LIC flag is inferred from the merge candidate. The IBC-LIC flag is inherited from an IBC FIMVP candidate to harmonize IBC HMVP and IBC-LIC similar to the inter LIC case.2.1.2.35. Template matching based BCW index derivation for merge mode

[0418] The BCW index for merge coded CUs is derived based on template matching cost instead of being derived from neighboring blocks. Given a selected merge candidate, the TM cost values are calculated with different bi-prediction weights, and then, the bi-prediction weight with minimum TM cost value is used to predict the merge CU.

[0419] When calculating TM cost for bi-predicted weights, the following rales are applied:Since the inherited bi-predicted weight is likely to have higher accuracy than others, only the inherited bi- prediction weight and its two neighboring weights (i.e. ±1) are considered. For example, if the inherited bi- predicted weight is 4, then only three weights {3, 4, 5 } are involved in TM cost calculation.The TM cost of the inherited BCW index is multiplied with 0.90625, that is, the cost is reduced by 3 / 32. The TM cost of the equal weight is multiplied with 0.90625 since bi-predicted samples are beneficial for BDOF and BDOF is only applied to CU with equal weights.

[0420] The template matching based BCW index derivation is applied to CUs coded in regular merge, template matching, adaptive decoder-side motion vector refinement and MMVD modes.F1257162PCTIn addition, the bi-prediction weights for merge mode are extended from {-2, 3, 4, 5, 10} to {1, 2, 3, 4, 5, 6, 7}. Furthermore, the negative bi-predicted weights for non-merge mode {-2, 10} are replaced with positive weights {1, 7}.2.1.2.36. DMVR for affine merge coded blocks

[0421] DMVR is applied to affine merge coded blocks and affine MMVD coded blocks when DMVR condition is satisfied. It is also extended to adaptive BM merge mode.

[0422] An affine motion field is modelized as follows (6-parameters affine case):mv-i r-mvnr mv2X-mvriX mv =« - ™x +“ - ™y+ mvmv— - mvlv--mvoy1.x- mv2yz --mv0vy + mvwherein(mvz, mvy) is tire motion vector at location (x, y) and (mvOx, mvOy) is the base MV representing the.. •,i i n < mvlx-mvoxmv2x~mv0xmv-,y-mvtranslation motion of the affine model. Parameters - 14 / . - H. - - -o ymv2y-mv0y14 / and - - - H - rep:resent the non-translation parameters (rotation, scaling).

[0423] Motion vectors (mvOx,mvOy), (mvlx,mvlyand (mt>2x,7nv2y) are called the control point motionvectors (CPMVs) of the considered affine coding unit. In the DMVR process applied to affine, the bilateral matching cost is calculated per subblock. Then, the subblock bilateral matching costs and refined subblock MVs are used to determine the overall best refined CPMVs for the affine block. More specific, the CPMVs are refined according to the following steps:1) Perform integer-pel bilateral matching for subblocks. Accumulate the subblock bilateral matching cost to determine the best integer-pel MV offset.2) Perform half-pel bilateral matching search using the best integer MV offset as initial offset and output the best MV offset that minimizes the bilateral matching cost for the same set of the subblocks of step 1.3) Perform linear regression using the refined subblock MVs from step 1 as input and output a set of control-point motion vectors.4) Compare the bilateral matching cost of the output of the steps 2 and 3 to select the one with the smallest cost.

[0424] In addition, the non-translation parameters of affine model are refined after the base MV are determined. Each of CPMVs is fixed as base MV in turn, and an offset is added to the non-translation parameter of affine model by minimizing the bilateral matching cost, and then the other two CPMVs are calculated according to based MV and refined non-translation parameters.

[0425] For affine merge and affine MMVD modes, both CPMVs and non-translation parameters refinements are applied. When applying to affine MMVD mode, the MMVD offset is added to the affine DMVR refined affine merge base candidate if the base candidate meets the affine DMVR refinement condition. For adaptive BM merge mode, an affine merge list that only contains affine merge candidates that meet the affine DMVR conditions are constructed and then CPMVs refinement and non-translation 62 F1257162PCTparameters refinment are applied.2.1.2.37. InterCCCM

[0426] InterCCCM applies the CCCM method for predicting chroma samples from reconstructed luma samples when the CU uses inter prediction or intra block copy (IBC). The cross -component filters are derived using the prediction blocks of luma and chroma. The derived filters are applied to the reconstructed luma block and blended with the prediction blocks of chroma to produce the final chroma prediction blocks. In the blending process the filtered reconstructed luma blocks use blending weight of 0.75 and chroma prediction blocks use blending weight of 0.25. Fig, 56 illustrates the InterCCCM method on the decoder.

[0427] The 8-tap filter consist of 6 spatial luma samples, a nonlinear term, and a bias term. The spatial luma samples (L0,..., L5) are obtained from the luma grid selecting the 6 luma samples closest to the chroma position C without down sampling. The predicted chroma value is obtained as, predChromaVal = coLO ciLl + c? L2 + cjL3 + C4L.4 + csL5 + c6- nonlinear((L0+L3+ 1) » 1) + C7B, where nonlinear is CCCM’s nonlinear operator and B is bias. The filter coefficients are derived using ECM’s division-free Gaussian elimination method and the necessary offsets are applied to samples prior to filter deri¬ vation. The offsets for division-free Gaussian elimination method are obtained using a four-point average of the lum and chrom a prediction blocks, where the four points correspond to the top-left, top-right, bottom -left and bottom-right corners of the blocks. For filter coefficient derivation at most 256 chroma samples are used. Fig. 57 illustrates luma samples L0 to L5 in relation to the chroma sample C.

[0428] Usage of the mode is signalled with a CABAC coded TU level flag. One new CABAC context was included to support this. The InterCCCM flag is only signalled if the TU’s luma Cbf is non -zero and the CU’s predMode is either MODE INTER or MODE IBC.

[0429] The encoder performs an RD decision in the transform selection loop for the chroma components when luma Cbf is non-zero and the CU’s predMode is either MODE INTER or MODE IBC.2.1.2.38. CCP merge for chroma inter blocks

[0430] The cross-component prediction merge mode is extended to chroma inter coding. The CCP models including CCLM, MMLM, CCCM, GLM, chroma fusion, CCP merge modes, and inter CCCM are stored and inherited for the following coding chroma intra and inter blocks. Similar to the CCP merge for chroma intra blocks, a flag is signaled to indicate whether a chroma inter block is coded using this mode. If the CCP merge mode is used, a CCP merge list is constructed in a similar way as that for chroma intra blocks except that additional shifted temporal candidate and on-the-fly derived candidates are included in the CCP merge list. The additional shifted temporal candidates are derived from the collocated picture. And, the position of these candidates are the same as those defined in ECM for regular inter merge prediction candidates with a shift obtained from the motion vector of the current block. The on-the-fly derived candidates are only used for low delay pictures and are obtained using the neighboring reconstructed samples of the current block. At most 1 on-the-fly derived candidates including single / multi -model CCCM and single / multi-model CCLM are added to the CCP merge list. After the CCP merge list is 63 F1257162PCTconstructed, the candidate with the lowest template cost is selected for the chroma inter block. The chroma inter block is then predicted in the same way as that of inter CCCM. That is, the motion compensation predicted samples are blended with the cross -component predicted samples to form the final prediction.3. Problems

[0431] In ECM, subblock-based MVP can either be generated by temporal information as a sbTMVP candidate, or by using an affine model as an affine candidate. It is worthwhile to explore how to generate subblock-based MVP by using more spatial information.4, Detailed solutions

[0432] 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,

[0433] The terms “video unit’" or “coding unit’" or “block” may represent a picture, a slice, a tile, a coding tree block (CTB), a coding tree unit (CTU), a coding block (CB), a CU, a PU, a TU, a PB, or a TB.

[0434] The term “pre iction unit” may represent a prediction block, or a prediction sample.

[0435] The term “chained motion vector” may refer to a motion vector (or block vector) derived by at least one guided motion vector (or block vector). It may also refer to an accumulated motion vector derived by adding up at least one motion vector (or block vector) and at least one guided motion vector (or block vector).

[0436] The term “CCP” may refer to any cross-component prediction method such as any kind of LM / intraCCLM / interCCCM / MMLM / CCCM / GLM / GL-CCCM / BVG- CCCM / intraCCPmerge / interCCPmerge. It could be used for an intra block, inter block, or IBC block. It could be a type of CCP based fusion mode.

[0437] The term “a subblock-based motion candidate” may prefer any motion candidate which may divide a block into multiple subblocks to apply motion compensation or get motion vector prediction, such as an affine motion candidate or a subblock -based temporal motion vector prediction (sb-TMVP).

[0438] The term “motion information” may refer to any information used in motion compensation, such as motion vector(s), inter-prediction direction (such as uni -prediction to L0, uni -prediction to LI or Biprediction), reference picture index, LIC flag, OBMC flag, weighting value used in Bi-prediction, motion vector resolution, the indication of affine-coding, the indication of sb-TMVP coding and block vector (BV).

[0439] In the following discussion, all the disclosure about “inter prediction” can be replaced by “IBC prediction”. All the disclosure about “inter coding” can be replaced by “IBC coding”. All the disclosure about “MV"’ can be replaced by “BV”,[0440JIt is noted that the terminologies mentioned below7are not limited to the specific ones defined in 64 F1257162PCTexisting standards. Any variance of the coding tool is also applicable.

[0441] Fig. 58A to Fig. 58F illustrate examples of sbSMVP, respectively. Fig. 58A illustrates an example of sbSMVP with vertical MV prediction. Each small block represents a subblock. The grey blocks are neighbouring to the white blocks, which are inside the current block. Fig. 58B illustrates an example of sbSMVP with horizontal MV prediction. Each small block represents a subblock. The grey blocks are neighbouring to the white blocks, which are inside the current block. Fig. 58C illustrates an example of sbSMVP with diagonal MV prediction. Each small block represents a subblock. The grey blocks are neighbouring to the white blocks, which are inside the current block. Fig. 58D illustrates an example of sbSMVP with inverse-diagonal MV prediction from above neighbouring blocks. Each small block represents a subblock. The grey blocks are neighbouring to the white blocks, which are inside the current block. Fig. 58E illustrates an example of sbSMVP with inverse -diagonal MV prediction from left neighbouring blocks. Each small block represents a subblock. The grey blocks are neighbouring to the white blocks, which are inside the current block. Fig. 58F illustrates an example of sbSMVP with vertical MV prediction from non-adjacent neighbouring blocks. Each small block represents a subblock. The grey blocks are neighbouring to the white blocks, which are inside the current block. Fig. 58G illustrates an example of sbSMVP with horizontal MV prediction from non-adjacent neighbouring blocks. Each small block represents a subblock. The grey blocks are neighbouring to the white blocks, which are inside the current block.1. A subblock-based spatial motion vector (sb-SMVP) prediction candidate may be generated using motion information of at least one block in the current picture, which may be neighbouring to the current block.1) For example, the motion information of a subblock inside the current block may be generated with the motion information of neighbouring blocks in a directional way.a. For example, the motion information of a subblock inside the current block may be generated with the motion information of neighbouring blocks in a vertical w?ay.i. For example, the motion information of a subblock inside the current block may be copied or derived w th the neighbouring block in the same column, as shown in Fig. 58A, b. For example, the motion information of a subblock inside the current block may be generated with the motion information of neighbouring blocks in a horizontal way.i. For example, the motion information of a subblock inside the current block may be copied or derived with the neighbouring block in the same row, as shown in Fig. 58B.c. For example, the motion information of a subblock inside the current block may be generated w ith the motion information of neighbouring blocks in a diagonal w ay.i. For example, the motion information of a subblock inside the current block may be copied or derived with the neighbouring block in the same diagonal line, as show a in Fig. 58C.d. For example, the motion information of a subblock inside the current block may be generated with the motion infor ation of neighbouring blocks in an inverse diagonal way.65 F1257162PCTi. For example, the motion information of a subblock inside the current block may be copied or derived with the above neighbouring block in the same inverse diagonal line, as shown in Fig.58D.ii. For example, the motion information of a subblock inside the current block may be copied or derived with the left neighbouring block in the same inverse diagonal line, as shown in Fig. 58E.2) For example, the motion information of a subblock inside the current block may be generated w ith the motion information of neighbouring blocks non-adjacent to the current block.a. For example, the motion information of a subblock inside the current block may be generated w ith the motion information of non-adjacent neighbouring blocks in a directional way.i. For example, the motion information of a subblock inside the current block may be copied or derived with the non-adjacent neighbouring block in the same column, as shown in Fig. 58F. ii. For example, the motion information of a subblock inside the current block may be copied or derived with the non-adjacent neighbouring block in the same row’, as shown in Fig. 58G. 3) For example, the motion information of a subblock inside the current block may be generated with the motion information stored in a table.a. The motion information of a subblock inside the current block may be generated with or copied from the motion information HMVP table.A subblock-based spatial motion vector prediction candidate may be put into a first candidate list.1) For example, the first candidate list may be the sub-block merge list.2) For example, the first candidate list may be the merge list.3) For example, the first candidate list may be the advanced MVP (AMVP) list.4) For example, the first candidate list may be the Combined Inter-Intra Prediction (CUP) merge list. 5) For example, the first candidate list may be the Template Matching (TM)-merge list,6) For example, the first candidate list may be the GPM merge list.7) For example, the first candidate list may be the GPM-affine list.Whether a sb-SMVP candidate is available may depend on the neighbouring blocks.1) For example, a sb-SMVP candidate is available only if all neighbouring blocks required to generate motion information inside the current block are valid.a. A neighbouring block is not valid if one or some of the conditions below is true:i. It is inaccessible.ii. It is not inter-coded.iii. It has no motion information.iv. It is coded by a specific coding mode, such as GPM-intra or affine.2) For example, a sb-SMVP candidate is available only if the motion information of at least two subblocks inside the current block are different.66 F1257162PCTa. The motion information of two subblocks are different ifi. the inter-prediction directions of two subblocks are different.ii. At least one reference picture of the first subblock is different from that of that of the second subblock.iii. At least one MV of the first subblock is different from that of the second subblock.(i)Two MVs (MVxl, MVyl) and (MVx2, MVy2) are defined to be different if iMVxl - MVx2| > Tx or |M Vyl - MVy2| > Ty, wherein Tx and Ty are integers. E.g. Tx = Ty = 1. A sb-SMVP candidate may be checked and put into the candidate list at a specific position.2) A sb-SMVP candidate can be put into the candidate list only if it is available after checking.3) The position may be fixed,a. A sb-SMVP candidate may be checked and put into the candidate list after all sb-TMVP candi¬ dates,b. A sb-SMVP candidate ay be checked and put into the candidate list before all sb-TMVP candi¬ dates.c. A sb-SMVP candidate may be checked and put into the candidate list after the first N sb-TMVP candidates, where N is sin integer such as 3.d. A sb-SMVP candidate may be checked and put into the candidate list after all affine candidates. e. A sb-SMVP candidate may be checked and put into the candidate list after the first N affine can¬ didates, where N is an integer such as 3.4) The position may be adaptive.a. A sb-SMVP candidate may be checked and put into the candidate list after the first N affine candidates, where N may depend on the number of affine-coded blocks neighbouring to the current block,i. If N is equal to 0, the sb-SMVP candidate may be checked and put into the candidate list before all affine candidates.The information of whether to and / or how to apply at least one sb-SMVP candidate, may be signalled from the encoder to the decoder.2) The information may be signalled at sequence level (such as in a SPS or a sequence header), or picture level (such as in a PPS or a picture header), or slice level (such as in a slice header), or block level (such as in a CTU or a CU or a PU or a TH).3) For example, the information may comprise whether one sb-SMVP is applicable.4) For example, the information may comprise the maximum number of sb-SMVP candidates.5) For example, the information may comprise the types of allowed sb-SMVP candidates.A first subblock-based candidate which may be a sb-TMVP candidate or an affine candidate or a sb-SMVP candidate may be compared with at least one other subblock -based candidate already in the subblock-based candidate list.F1257162PCT2) A first subblock-based candidate cannot be put into the candidate list if it is the same or similar to at least one other candidate already in the candidate list.a. A first candidate is not same or similar to a second candidate if:i. At least in one subblock, the inter-prediction direction of the first candidate is different from that of the second candidate.ii. At least in one subblock, at least one reference picture of the first candidate is different from that of that of the second candidate.iii. At least in one subblock, at least one MV of the first candidate is different from that of the second candidate.(i)Two MVs (MVxl, MVyl) and (MVx2, MVy2) are defined to be different if iMVxl - MVx2i > Tx or |MVyl - MVy2| > Ty, wherein Tx and Ty are integers. E.g. Tx = Ty = 1.3) Whether to and / or how to apply the comparison may depend on the types of the two candidates (whether it is a sb-TMVP candidate or an affine candidate a sb-SMVP candidate).4) Whether to and / or how to apply the comparison may depend on the position of the two candidates in the list.A sb-SMVP candidate may be involved in the ARMC procedure.2) For example, the TM cost of a sb-SMVP candidate may be calculated in the same way as a sb-TMVP candidate or an affine candidate.3) A sb-SMVP candidate may be reordered with all other candidates in the list comprising the sb-SMVP candidate.4) A sb-SMVP candidate may be reordered with a group of some candidates in the list comprising the sb- SMVP candidate.a. The group may comprise at least one other sb-SMVP candidate.b. The group may comprise at least one sb-TMVP candidate.c. The group may comprise at least one affine candidate.The final prediction may be generated by fusing a first prediction derived with the subblock-based spatial motion vector prediction candidate and a second prediction.2) Two predictions are fused by applying a weighted sum on the two predictions, such as P WOxPO+ TxPl, wherein P is the final prediction, P0 and Pl are the first and second prediction, re¬ spectively.a. The weighting values may be fixed, such as W0= W1 = 'A,3) The second prediction may be intra-prediction.4) The second prediction may be another inter-prediction.a. It may be subblock-based inter-prediction such as affine prediction or sb-TMVP prediction.68 F1257162PCTb. It may be regular inter-prediction.The sb-SMVP prediction may be further processed by at least a refinement procedure before being used.2) The refinement procedure may be TM refinement.3) The refinement procedure may be DMVR refinement.4) The refinement procedure may be BDOF refinement.5) The refinement procedure may be OBMC refinement.6) The refinement procedure may be MHP refinement.7) The refinement procedure may be biliteral filtering or any other filtering refinement.The width and / or height of a subblock used in Sb-SMVP may be fixed or adaptive.2) For example, width and / or height of a subblock may be fixed, such as 4-4 or 8x8.3) For example, width and / or height of a subblock may be adaptive,a. For example, width and / or height of a subblock may be signaled in the bitstream,b. For example, width and / or height of a subblock may depend on the width / height of the current block.c. For example, width and / or height of a subblock may depend on how to derive the sb-SMVP. i. For example, the subblock size is set to be UxH if the motion information of a subblock inside the current block is generated with the motion information of neighbouring blocks in a vertical way as shown in Fig. 58A, where U is the width of a subblock, e.g. U 4 and H is the height of the current block.ii. For example, the subblock size is set to be WXU if the motion information of a subblock inside the current block is generated with the motion information of neighbouring blocks in a horizontal way as shown in Fig. 58B, where U is the width of a subblock, e.g. U = 4 and W is the width of the current block.Whether to and / or how to apply sb-SSMVP may depend on color format and / or color components.2) For example, the width and / or height of a subblock may be different for luma and chroma components.a. For example, the subblock size is 2Nx2N for luma but NxN for chroma. E.g. N = 2.3) For example, the width and / or height of a subblock may be the same for luma and chroma components.a. For example, the subblock size is 4x4 for luma and for chroma.b. In one example, if a chroma subblock corresponds to multiple luma subblocks, the motion infor¬ mation of the chroma subblock may be set to be that of one of the corresponding luma subblocks. The current block may be divided into multiple subblocks, wherein the motion information of at least two subblocks are derived with different methods.2) For example, the motion information of the first subblock in the current block may be derived in the way of sb-SMVP and a second subblock in the current block may be derived in the way of sb-TMVP.69 F1257162PCT3) For example, the motion information of the first subblock in the current block may be derived in the wav of sb-SMVP and a second subblock in the current block may be derived in the way of affine prediction.4) For example, the motion information of the first subblock in the current block may be derived in the way of sb-TMVP and a second subblock in the current block may be derived in the way of affine prediction.13. sb-TMVP can be applied if the reference picture is the current picture.2) sb-TMVP er be applied if at least one subblock of the sb-TMVP candidate is IBC-predicted.General aspects:14. The disclosed method may be used for single tree coding.15. The disclosed method may be used for dual tree coding.16. The disclosed method may be used for chroma coding.17. The disclosed method may be used for luma coding.18. The disclosed method may be used for inter block coding.19. The disclosed method may be used for IBC / intraTMP / DBV block coding,20. The disclosed method may be used in an intra (such as I) slice,21. The disclosed method may be used in an inter (such as B or P or low-delay B) slice.22. Whether to and / or how to apply the disclosed methods above may be signalled at sequence level / group of pictures level / picture level / slice level / tile group level, such as in sequence header / picture header / SPS / VPS / DPS / DCI / PPS / APS / slice header / tile group header.23. Whether to and / or how to apply the disclosed methods above may be signalled at PB / TB / CB / PU / TU / CU / VPDU / CTLVCTU row / slice / tile / sub-picture / other kinds of region contain more than one sample or pixel,24. Whether to and / or how to apply the disclosed methods above may be dependent on coded information, such as block size, colour format, single / dual tree partitioning, colour component, slice / picture type.

[0442] Fig 59 illustrates a flowchart of a method 5900 for video processing in accordance with embodiments of the present disclosure. The method 5900 is implemented during a conversion between a video unit of a video and a bitstream of the video.

[0443] At block 5910. for a conversion between a video unit of a video and a bitstream of the video, a subblock -based spatial motion vector prediction (sb-SMVP) candidate of the video unit is generated based on motion information of at least one block in a current picture of the video. The at least one block is neighboring to the video unit.

[0444] At block 5920, the conversion is performed based on the sb-SMVP prediction candidate. In some embodiments, the conversion may include encoding the video unit into the bitstream. Alternatively, the conversion may include decoding the video unit from the bitstream. In this way, spatial information can 70 F1257162PCTbe used in the subblock-based motion vector prediction, thereby improving coding performance and efficiency.

[0445] In some embodiments, motion information of a subblock inside the video unit is generated based on motion information of at least one neighbouring block in a directional way. For example, the motion information of the subblock inside the video unit is generated based on the motion information of the at least one neighbouring block in a vertical way. In some embodiments, the motion information of the subblock inside the video unit is copied or derived with the at least one neighbouring block in a same column as the video unit, for example, as shown in Fig, 58A.

[0446] Alternatively or in addition, the motion information of the subblock inside the video unit is generated based on the motion information of the at least one neighbouring block in a horizontal way. For example, the motion information of the subblock inside the video unit is copied or derived with the at least one neighbouring block in a same row as the video unit, for example, as shown in Fig. 58B.

[0447] In some embodiments, the motion information of the subblock inside the video unit is generated based on the motion information of the at least one neighbouring block in a diagonal way. For example, the motion information of the subblock inside the video unit is copied or derived with the at least one neighbouring block in a same diagonal line as the video unit, for example as shown in Fig. 58C.

[0448] Alternatively or in addition, the motion information of the subblock inside the video unit is generated based on the motion information of the at least one neighbouring block in an inverse diagonal way. For example, the motion information of the subblock inside the video unit is copied or derived with the at least one above neighbouring block in a same inverse diagonal line as the video unit, which is shown in Fig. 58D. As another example, the motion information of the subblock inside the video unit is copied or derived with the at least one left neighbouring block in a same inverse diagonal line as the video unit, which is shown in Fig. 58E.

[0449] In some embodiments, motion information of a subblock inside the video unit is generated based on motion information of at least one non-adjacent neighbouring block to the video unit. For example, the motion information of the subblock inside the video unit is generated based on the motion information of at least one non-adjacent neighbouring block in a directional way. In some embodiments, the motion information of the subblock inside the video unit is copied or derived with the at least one non -adjacent neighbouring block in a same column as the video unit, which is shown in Fig. 58F. In some other embodiments, the motion information of the subblock inside the video unit is copied or derived with the at least one non-adjacent neighbouring block in a same row as the video unit, which is shown in Fig. 58G.

[0450] In some embodiments, motion information of a subblock inside the video unit is generated based on motion information stored in a table. For example, the motion information of the subblock inside the video unit is generated with or copied from the motion information in a history -based motion vector prediction (HMVP) table.

[0451] In some embodiments, the sb-SMVP prediction candidate is put into a first candidate list. For 71 F1257162PCTexample, the first candidate list is at least one one of: a sub-block merge list, a merge list, an advanced motion vector prediction (AMVP) list, a combined inter-mtra prediction (CIIP) merge list, a template matching (TM)-merge list, a geometric partitioning mode (GPM) merge list, or a GPM -affine list.

[0452] In some embodiments, whether the sb-SMVP candidate is available depends on the at least one neighbouring block. For example, the sb-SMVP candidate is available if all neighbouring blocks required to generate motion information inside the video unit are valid. In some embodiments, if the condition is satisfied, the neighbouring block is not valid, in which the condition comprises at least one of: the neighbouring block is inaccessible, the neighbouring block is not inter-coded, the neighbouring block has no motion information, or the neighbouring block is coded by a coding mode. In some other embodiments, the coding mode is GPM-intra or affine.

[0453] In some embodiments, the sb-SMVP candidate is available, if the motion information of at least two subblocks inside the video unit are different. For example, if a condition is satisfied, the motion information of two subblocks are different. The condition may include at least one of: inter-prediction directions of two subblocks are different, at least one reference picture of a first subblock is different from at least one reference picture of a second subblock, or at least one motion vector (MV) of a first subblock is different from at least one MV of a second subblock. In some embodiments, two MV s (MVxl, MVyl) and (MVx2, MVy2) are different if |MVxl - MVx2| > Tx or |MVyl - MVy2| > Ty, where Tx and Ty are integers. In some embodiments, Tx = Ty = 1,

[0454] In some embodiments, the sb-SMVP candidate is checked and put into a candidate list at a specific position. For example, the sb-SMVP candidate is put into the candidate list if it is available after checking.

[0455] In some embodiments, the position is fixed. For example, the sb-SMVP candidate is checked and put into the candidate list after all subblock -based temporal motion vector prediction (sb-TMVP) candidates. As another example, the sb-SMVP candidate is checked and put into the candidate list before all sb-TMVP candidates. As another example, the sb-SMVP candidate is checked and put into the candidate list after first N sb-TMVP candidates, where N is an integer. In some embodiments, N = 3. As another example, the sb-SMVP candidate is checked and put into the candidate list after all affine candidates. As another example, the sb-SMVP candidate is checked and put into the candidate list after first N affine candidates, where N is an integer. In some embodiments, N = 3.

[0456] Alternatively or in addition, the position is adaptive. For example, the sb-SMVP candidate is checked and put into the candidate list after first N affine candidates. In this case, N depends on the number of affine-coded blocks neighbouring to the video unit. In some embodiments, if N is equal to 0, the sb-SMVP candidate is checked and put into the candidate list before all affine candidates.

[0457] In some embodiments, information of whether to and / or an approach to apply at least one sb-SMVP candidate is signalled from an encoder to a decoder. For example, the information is signalled at one of: a sequence level, a picture level, a slice level, or a block level. In some embodiments, the information is signalled in a sequence parameter set (SPS) or a sequence header. In some other embodiments, the information is signalled in a picture parameter set (PPS) or a picture header. In some 72 F1257162PCTother embodiments, the information is signalled in a slice header. In some other embodiments, the information is signalled in a coding tree unit (CTU) or a coding unit (CU) or a prediction unit (PU)or a transform unit (TU).

[0458] In some embodiments, the information comprise whether one sb-SMVP candidate is applicable. In some other embodiments, the information comprise the maximum number of sb-SMVP candidates. In some further embodiments, the information comprise types of allowed sb-SMVP candidates.

[0459] In some embodiments, a first subblock-based candidate which is a sb-TMVP candidate or an affine candidate or a sb-SMVP candidate is compared with at least one other subblock -based candidate already in a subblock-based candidate list. For example, the first subblock -based candidate is not put into the subblock-based candidate list if it is the same or similar to at least one other candidate already in the subblock-based candidate list.

[0460] In some embodiments, if a condition is satisfied, a first candidate is not same or similar to a second candidate. The condition may include at least one of: at least in one subblock, an inter-prediction direction of the first candidate is different from an inter-prediction direction of the second candidate, at least in one subblock, at least one reference picture of the first candidate is different from at least one reference picture of that of the second candidate, or at least in one subblock, at least one MV of the first candidate is different from at least one MV of the second candidate. Alternately, two MVs (MVxl, MVyl) and (MVx2, MVy2) are different if |MVxl - MVx2| > Tx or |MVyl - MVy2| > Ty, Tx and Ty are integers. In some embodiments, Tx = Ty = 1.

[0461] In some embodiments, whether to and / or an approach to apply the comparison depends on types of two candidates. For example, at least one of the two candidates is a sb-TMVP candidate or an affine candidate or a sb-SMVP candidate. In some embodiments, whether to and / or an approach to apply the comparison depends on a position of the two candidates in the subblock -based candidate list.

[0462] In some embodiments, the sb-SMVP candidate is involved in an adaptive reordering of merge candidates (ARMC) procedure. For example, a TM cost of the sb-SMVP candidate is calculated in a same way as a sb-TMVP candidate or an affine candidate. In some embodiments, the sb-SMVP candidate is reordered with all other candidates in a candidate list comprising the sb-SMVP candidate.

[0463] In some embodiments, the sb-SMVP candidate is reordered with a group of candidates in the candidate list comprising the sb-SMVP candidate. For example, the group of candidates comprise at least one of: at least one other sb-SMVP candidate, at least one sb-TMVP candidate, or at least one affine candidate.

[0464] In some embodiments, a final prediction is generated by fusing a first prediction derived with the sb-SMVP candidate and a second prediction. For example, two predictions are fused by applying a weighted sum on the first and second predictions. In some embodiments, P = WOxPO+WlxPl, where P represents the final prediction, P0 and PI represent the first and second predictions, respectively, WO and W1 represent weighting values, respectively. In some embodiments, the weighting values are fixed. In 73 F1257162PCTsome embodiments, W0= Wl=.

[0465] In some embodiments, the second prediction is an intra -prediction. Alternately, the second prediction is another inter-prediction. For example, the inter-prediction is a subblock -based interprediction. In some embodiments, the subblock-based inter-prediction is affine prediction or sb-TMVP prediction. As another example, the inter-prediction is regular inter-prediction.

[0466] In some embodiments, the sb-SMVP candidate is further processed by at least a refinement procedure before being used. For example, the refinement may include at least one of: a TM refinement, a decoder-side motion vector refinement (DMVR) refinement, a bi-directional optical flow (BDOF) refinement, an overlapped block motion compensation (OBMC) refinement, a multi -hypothesis prediction (MHP) refinement, or a biliteral filtering or any other filtering refinement.

[0467] In some embodiments, a width and / or height of a subblock used in sb-SMVP is fixed or adaptive. In some embodiments, the width and / or height of the subblock is fixed. For example, the width and / or height of the subblock is 4x4 or 8x8.

[0468] In some embodiments, the width and / or height of the subblock is adaptive. For example, the width and / or height of the subblock is signaled in the bitstream. As another example, the width and / or height of the subblock depend on a width / height of the video unit.

[0469] In some embodiments, the width and / or height of the subblock depend on how to derive the sb- SMVP. For example, a subblock size is set to be UxH if motion information of the subblock inside the video unit is generated based on motion information of at least one neighbouring block in a vertical way, in which U represents the width of the subblock and H represents the height of the video unit. In some embodiments, U = 4. As another example, a subblock size is set to be WxU if motion information of the subblock inside the video unit is generated based on motion information of at least one neighbouring block in a horizontal way where U represents the width of the subblock and W represents the width of the video unit. In some embodiments, U = 4.

[0470] In some embodiments, whether to and / or an approach to apply sb-SMVP depend on at least one of: color format or color components. For example, a width and / or height of the subblock is different for luma and chroma components. In some embodiments, a subblock size is 2Nx2N for luma component but NxN for chroma component. In some embodiments, N = 2,

[0471] In some embodiments, a width and / or height of the subblock is the same for luma and chroma components. For example, the subblock size is 4x4 for luma component and for chroma component. As another example, if a chroma subblock corresponds to multiple luma subblocks, motion information of the chroma subblock is set to be motion information of one of the corresponding luma subblocks.

[0472] In some embodiments, the video unit is divided into multiple subblocks. In this case, motion information of at least two subblocks may be derived with different approaches. For example, motion information of a first subblock in the video unit is derived in a way of sb-SMVP and a second subblock in the video unit is derived in a way of sb-TMVP. As another example, motion information of a first 74 F1257162PCTsubblock in the video unit is derived in a way of sb-SMVP and a second subblock in the video unit is derived in a way of affine prediction. As another example, motion information of a first subblock in the video unit is derived in a way of sb-TMVP and a second subblock in the video unit is derived in a way of affine prediction.

[0473] In some embodiments, the sb-TMVP is applied if a reference pic ture is the current picture. In some embodiments, the sb-TMVP is applied if at least one subblock of the sb-TMVP candidate is intra block copy (IBC)-predicted.

[0474] In some embodiments, generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture is used for at least one of the following: single tree coding, dual tree coding, chroma coding, luma coding, inter block coding, IBC, intra template matching prediction (intraTMP), or direct block vector (DBV) block coding.

[0475] In some embodiments, generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture is used in at least one of the following: an intra slice, or an inter slice. In some embodiments, the intra slice is I. In some other embodiments, the inter slice is B or P or low-delay B.

[0476] In some embodiments, an indication of whether to and / or how to apply the generating the sb- SMVP candidate based on the motion information of the at least one block in the current picture 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 apply the generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture is indicated in one of the followings: a sequence header, a picture header, a sequence parameter set (SPS), a video parameter set (VPS), a decoding parameter set (DPS), decoding capability information (DCI), a picture parameter set (PPS), an adaptation parameter set (APS), a slice header, or a tile group header.

[0477] In some embodiments, the generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture is signalled at least one of the following: a color component, a sub-picture, a slice, a tile, a coding tree unit (CTU), a CTU row, a group of CTU, a coding unit (CU), a prediction unit (PU), a transform unit (TU), a coding tree block (CTB), a coding block (CB), a prediction block (PB), a transform block (TB), a block, a sub-block of a block, a sub-region within a block, a region containing more than one sample or pixel, a video sequence, a group of pictures (GOP), a region, one or more CTU rows, or one or more CTB rows.

[0478] In some embodiments, whether to and / or how to apply the generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture depends on coded information. In some embodiments, the code information comprises at least one of the following: block size, color format, single tree partitioning, dual tree partitioning, colour component, slice type, or picture type.

[0479] In some embodiments, the conversion includes encoding the video unit into the bitstream. In some 75 F1257162PCTother embodiments, the conversion includes decoding the video unit from the bitstream.

[0480] 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 subblock -based spatial motion vector prediction (sb-SMVP) candidate of a video unit of the video based on motion information of at least one block in a current picture of the video, where the at least one block is neighboring to the video unit; and generating the bitstream based on the sb-SMVP prediction candidate.

[0481] According to still further embodiments of the present disclosure, a method for storing bitstream of a video is provided. The method comprises: generating a subblock-based spatial motion vector prediction (sb-SMVP) candidate of a video unit of the video based on motion information of at least one block in a current picture of the video, where the at least one block is neighboring to the video unit; generating the bitstream based on the sb-SMVP prediction candidate; and storing the bitstream in a non- transitory’ computer-readable recording medium.

[0482] 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.

[0483] Clause 1. A method for video processing, comprising: generating, for a conversion between a video unit of a video and a bitstream of the video, a subblock -based spatial motion vector prediction (sb-SMVP) candidate of the video unit based on motion information of at least one block in a current picture of the video, wherein the at least one block is neighboring to the video unit; and performing the conversion based on the sb-SMVP prediction candidate.

[0484] Clause 2. The method of clause 1, wherein motion information of a subblock inside the video unit is generated based on motion information of at least one neighbouring block in a directional way.

[0485] Clause 3. The method of clause 2, wherein the motion information of the subblock inside the video unit is generated based on the motion information of the at least one neighbouring block in a vertical way.

[0486] Clause 4. The method of clause 3, wherein the motion information of the subblock inside the video unit is copied or derived with the at least one neighbouring block in a same column as the video unit.

[0487] Clause 5. The method of clause 2, wherein the motion information of the subblock inside the video unit is generated based on the motion information of the at least one neighbouring block in a horizontal way.

[0488] Clause 6, The method of clause 5, wherein the motion information of the subblock inside the video unit is copied or derived with the at least one neighbouring block in a same row as the video unit.

[0489] Clause 7. The method of clause 2, wherein the motion information of the subblock inside the video unit is generated based on the motion information of the at least one neighbouring block in a diagonal 76 F1257162PCTway.

[0490] Clause 8. The method of clause 7, wherein the motion information of the subblock inside the video unit is copied or derived with the at least one neighbouring block in a same diagonal line as the video unit.

[0491] Clause 9. The method of clause 2, wherein the motion information of the subblock inside the video unit is generated based on the motion information of the at least one neighbouring block in an inverse diagonal way.

[0492] Clause 10. The method of clause 9, wherein the motion information of the subblock inside the video unit is copied or derived with the at least one above neighbouring block in a same inverse diagonal line as the video unit.

[0493] Clause 11. The method of clause 9, wherein the motion information of the subblock inside the video unit is copied or derived with the at least one left neighbouring block in a same inverse diagonal line as the video unit.

[0494] Clause 12. The method of clause 1, wherein motion information of a subblock inside the video unit is generated based on motion information of at least one non -adjacent neighbouring block to the video unit.

[0495] Clause 13. The method of clause 12, wherein the motion information of the subblock inside the video unit is generated based on the motion information of at least one non -adjacent neighbouring block in a directional way,

[0496] Clause 14. The method of clause 13, wherein the motion information of the subblock inside the video unit is copied or derived with the at least one non -adjacent neighbouring block in a same column as the video unit.

[0497] Clause 15. The method of clause 13, wherein the motion information of the subblock inside the video unit is copied or derived w’ith the at least one non-adjacent neighbouring block in a same row’ as the video unit.

[0498] Clause 16. The method of clause 1, wherein motion information of a subblock inside the video unit is generated based on motion information stored in a table.

[0499] Clause 17. The method of clause 16, wherein the motion information of the subblock inside the video unit is generated with or copied from the motion information in a history -based motion vector prediction (HMVP) table.

[0500] Clause 18. The method of any of clauses 1-17, wherein the sb-SMVP prediction candidate is put into a first candidate list.

[0501] Clause 19. The method of clause 18, wherein the first candidate list is one of: a sub -block merge list, a merge list, an advanced motion vector prediction (AMVP) list, a combined inter-intra predictionF1257162PCT(CUP) merge list, a template matching (TM)-merge list, a geometric partitioning mode (GPM) merge list, or a GPM-affine list.

[0502] Clause 20. The method of any of clauses 1-19, wherein whether the sb-SMVP candidate is available depends on the at least one neighbouring block.

[0503] Clause 21. The method of clause 20, wherein the sb-SMVP candidate is available if all neighbouring blocks required to generate motion information inside the video unit are valid.

[0504] Clause 22. The method of clause 21, wherein in accordance with that the condition is satisfied, the neighbouring block is not valid, wherein the condition comprises at least one of: the neighbouring block is inaccessible, the neighbouring block is not inter-coded, the neighbouring block has no motion information, or the neighbouring block is coded by a coding mode.

[0505] Clause 23. The method of clause 22, wherein the coding mode is GPM-intra or affine.

[0506] Clause 24. The method of clause 20, wherein the sb-SMVP candidate is available, if the motion information of at least two subblocks inside the video unit are different.

[0507] Clause 25. The method of clause 24, wherein in accordance with that a condition is satisfied, the motion information of two subblocks are different, wherein the condition comprises at least one of: inter -prediction directions of two subblocks are different, at least one reference picture of a first subblock is different from at least one reference picture of a second subblock, or at least one motion vector (MV) of a first subblock is different from at least one MV of a second subblock.

[0508] Clause 26. The method of clause 25, wherein two MVs (MVx1, MVy1) and (MVx2, MVy2) are different if |MVx1 - MVx2| > Tx or |MVy1 - MVy2| > Ty, wherein Tx and Ty are integers.

[0509] Clause 27. The method of clause 26, wherein Tx = Ty = 1.

[0510] Clause 28. The method of any of clauses 1-27, wherein the sb-SMVP candidate is checked and put into a candidate list at a specific position.

[0511] Clause 29. The method of clause 28, wherein the sb-SMVP candidate is put into the candidate list if it is available after checking.

[0512] Clause 30. The method of clause 28, wherein the position is fixed,

[0513] Clause 31. The method of clause 30, wherein the sb-SMVP candidate is checked and put into the candidate list after all subblock -based temporal motion vector prediction (sb-TMVP) candidates.

[0514] Clause 32. The method of clause 30, wherein the sb-SMVP candidate is checked and put into the candidate list before all sb-TMVP candidates.

[0515] Clause 33. The method of clause 30, wherein the sb-SMVP candidate is checked and put into the candidate list after first N sb-TMVP candidates, where N is an integer.

[0516] Clause 34. The method of clause 33, wherein N = 3.78 F1257162PCT

[0517] Clause 35. The method of clause 30, wherein the sb-SMVP candidate is checked and put into the candidate list after all affine candidates.

[0518] Clause 36. The method of clause 30, wherein the sb-SMVP candidate is checked and put into the candidate list after first N affine candidates, where N is an integer.

[0519] Clause 37. The method of clause 36, wherein N = 3.

[0520] Clause 38. The method of clause 28, wherein the position is adaptive.

[0521] Clause 39. The method of clause 38, wherein the sb-SMVP candidate is checked and put into the candidate list after first N affine candidates, where N depends on the number of affine -coded blocks neighbouring to the video unit.

[0522] Clause 40. The method of clause 39, wherein if N is equal to 0, the sb-SMVP candidate is checked and put into the candidate list before all affine candidates.

[0523] Clause 41. The method of any of clauses 1-40, wherein information of whether to and / or an approach to apply at least one sb-SMVP candidate is signalled from an encoder to a decoder,

[0524] Clause 42. The method of clause 41, wherein the information is signalled at one of: a sequence level, a picture level, a slice level, or a block level.

[0525] Clause 43. The method of clause 42, wherein the information is signalled in a sequence parameter set (SPS) or a sequence header.

[0526] Clause 44. The method of clause 42, wherein the information is signalled in a picture parameter set (PPS) or a picture header.

[0527] Clause 45. The method of clause 42, wherein the information is signalled in a slice header.

[0528] Clause 46. The method of clause 42, wherein the information is signalled in a coding tree unit (CTU) or a coding unit (CU) or a prediction unit (PU)or a transform unit (TU).

[0529] Clause 47. The method of clause 41, wherein the information comprise whether one sb-SMVP candidate is applicable.

[0530] Clause 48. The method of clause 41, wherein the information comprise the maximum number of sb-SMVP candidates.

[0531] Clause 49. The method of clause 41, wherein the information comprise types of allowed sb-SMVP candidates.

[0532] Clause 50. The method of any of clauses 1-49, wherein a first subblock-based candidate which is a sb-TMVP candidate or an affine candidate or a sb-SMVP candidate is compared with at least one other subblock-based candidate already in a subblock-based candidate list.

[0533] Clause 51. The method of clause 50, wherein the first subblock -based candidate is not put into the 79 F1257162PCTsubblock-based candidate list if it is the same or similar to at least one other candidate already in the subblock-based candidate list.

[0534] Clause 52. The method of clause 51, wherein in accordance with that a condition is satisfied, a first candidate is not same or similar to a second candidate, wherein the condition comprises at least one of: at least in one subblock, an inter-prediction direction of the first candidate is different from an inter¬ prediction direction of the second candidate, at least in one subblock, at least one reference picture of the first candidate is different from at least one reference picture of that of the second candidate, or at least in one subblock, at least one MV of the first candidate is different from at least one MV of the second candidate.

[0535] Clause 53. The method of clause 52, wherein two MVs (MVxl, MVyl) and (MVx2, MVy2) are different if |MVx1 - MVx2| > Tx or |MVy1 - MVy2| > Ty, wherein Tx and Ty are integers.

[0536] Clause 54. The method of clause 53, wherein Tx = Ty = 1.

[0537] Clause 55. The method of clause 50, wherein whether to and / or an approach to apply the comparison depends on types of two candidates.

[0538] Clause 56. The method of clause 55, wherein at least one of the two candidates is a sb-TMVP candidate or an affine candidate or a sb-SMVP candidate.

[0539] Clause 57. The method of clause 50, wherein whether to and / or an approach to apply the comparison depends on a position of the two candidates in the subblock -based candidate list.

[0540] Clause 58. The method of any of clauses 1-57, wherein the sb-SMVP candidate is involved in an adaptive reordering of merge candidates (ARMC) procedure.

[0541] Clause 59. The method of clause 58, wherein a TM cost of the sb-SMVP candidate is calculated in a same way as a sb-TMVP candidate or an affine candidate.

[0542] Clause 60. The method of clause 58, wherein the sb-SMVP candidate is reordered with all other candidates in a candidate list comprising the sb-SMVP candidate.

[0543] Clause 61. The method of clause 58, wherein the sb-SMVP candidate is reordered with a group of candidates in the candidate list comprising the sb-SMVP candidate.

[0544] Clause 62. The method of clause 61, wherein the group of candidates comprise at least one of: at least one other sb-SMVP candidate, at least one sb-TMVP candidate, or at least one affine candidate.

[0545] Clause 63. The method of any of clauses 1 -62, wherein a final prediction is generated by fusing a first prediction derived with the sb-SMVP candidate and a second prediction.

[0546] Clause 64. The method of clause 63, wherein two predictions are fused by applying a weighted sum on the first and second predictions.

[0547] Clause 65. The method of clause 64, wherein P = W0xP0+W1xP1, wherein P represents the final 80 F1257162PCTprediction, P0 and Pl represent the first and second predictions, respectively, WO and W1 represent weighting values, respectively.

[0548] Clause 66. The method of clause 64, wherein the weighting values are fixed.

[0549] Clause 67. The method of clause 66, wherein W0= W1= ½.

[0550] Clause 68. The method of clause 64, wherein the second prediction is an intra-prediction.

[0551] Clause 69. The method of clause 64, wherein the second prediction is another inter -prediction.

[0552] Clause 70. The method of clause 69, wherein the inter -prediction is a subblock-based inter¬ prediction.

[0553] Clause 71. The method of clause 70, wherein the subblock -based inter -prediction is affine prediction or sb-TMVP prediction.

[0554] Clause 72. The method of clause 69, wherein the inter -prediction is regular inter-prediction.

[0555] Clause 73. The method of any of clauses 1-72, wherein the sb-SMVP candidate is further processed by at least a refinement procedure before being used, wherein the refinement comprises at least one of: a TM refinement, a decoder-side motion vector refinement (DMVR) refinement, a bi-directional optical flow (BDOF) refinement, an overlapped block motion compensation (OBMC) refinement, a multihypothesis prediction (MHP) refinement, or a biliteral filtering or any other filtering refinement.

[0556] Clause 74. The method of any of clauses 1-73, wherein a width and / or height of a subblock used in sb-SMVP is fixed or adaptive.

[0557] Clause 75. The method of clause 74, wherein the width and / or height of the subblock is fixed.

[0558] Clause 76. The method of clause 75, wherein the width and / or height of the subblock is 4x4 or 8x8.

[0559] Clause 77. The method of clause 74, wherein the width and / or height of the subblock is adaptive.

[0560] Clause 78. The method of clause 77, wherein the width and / or height of the subblock is signaled in the bitstream.

[0561] Clause 79. The method of clause 77, wherein the width and / or height of the subblock depend on a width / height of the video unit.

[0562] Clause 80. The method of clause 77, wherein the width and / or height of the subblock depend on how to derive the sb-SMVP.

[0563] Clause 81. The method of clause 80, wherein a subblock size is set to be UXH if motion information of the subblock inside the video unit is generated based on motion information of at least one neighbouring block in a vertical way, wherein U represents the width of the subblock and H represents the height of the video unit.81 F1257162PCT

[0564] Clause 82. The method of clause 81, wherein U = 4.

[0565] Clause 83. The method of clause 80, wherein a subblock size is set to be W*U if motion information of the subblock inside the video unit is generated based on motion information of at least one neighbouring block in a horizontal way where U represents the width of the subblock and W represents the width of the video unit.

[0566] Clause 84. The method of clause 83, wherein U = 4.

[0567] Clause 85. The method of any of clauses 1-84, wherein whether to and / or an approach to apply sb-SMVP depend on at least one of: color format or color components.

[0568] Clause 86. The method of clause 85, wherein a width and / or height of the subblock is different for luma and chroma components.

[0569] Clause 87. The method of clause 86, wherein a subblock size is 2NX2N for luma component but NxN for chroma component.

[0570] Clause 88. The method of clause 87, wherein N = 2,

[0571] Clause 89. The method of clause 85, wherein a width and / or height of the subblock is the same for luma and chroma components.

[0572] Clause 90. The method of clause 89, wherein the subblock size is 4×4 for luma component and for chroma component.

[0573] Clause 91. The method of clause 89, wherein if a chroma subblock corresponds to multiple luma subblocks, motion information of the chroma subblock is set to be motion information of one of the corresponding luma subblocks.

[0574] Clause 92. The method of any of clauses 1-91, wherein the video unit is divided into multiple subblocks, wherein motion information of at least two subblocks are derived with different approaches.

[0575] Clause 93. The method of clause 92, wherein motion information of a first subblock in the video unit is derived in a way of sb-SMVP and a second subblock in the video unit is derived in a way of sb-TMVP.

[0576] Clause 94, The method of clause 92, wherein motion information of a first subblock in the video unit is derived in a way of sb-SMVP and a second subblock in the video unit is derived in a way of affine prediction.

[0577] Clause 95. The method of clause 92, wherein motion information of a first subblock in the video unit is derived in a way of sb-TMVP and a second subblock in the video unit is derived in a way of affine prediction.

[0578] Clause 96. The method of any of clauses 1-95, wherein the sb-TMVP is applied if a reference picture is the current picture.82 F1257162PCT

[0579] Clause 97. The method of clause 96, wherein the sb-TMVP is applied if at least one subblock of the sb-TMVP candidate is intra block copy (IBC)-predicted.

[0580] Clause 98. The method of any of clauses 1-97, wherein generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture is used for at least one of the following: single tree coding, dual tree coding, chroma coding, luma coding, inter block coding, IBC, intra template matching prediction (intraTMP), or direct block vector (DBV) block coding.

[0581] Clause 99. The method of any of clauses 1-97, wherein generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture is used in at least one of the following: an intra slice, or an inter slice.

[0582] Clause 100. The method of clause 99, wherein the intra slice is 1.

[0583] Clause 101. The method of clause 99, wherein the inter slice is B or P or low -delay B.

[0584] Clause 102. The method of any of clauses 1-97, wherein an indication of whether to and / or how to apply the generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture is indicated at one of the followings: sequence level, group of pictures level, picture level, slice level, or tile group level.

[0585] Clause 103. The method of any of clauses 1-97, wherein an indication of whether to and / or how to apply the generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture is indicated in one of the followings: a sequence header, a picture header, a sequence parameter set (SPS), a video parameter set (VPS), a decoding parameter set (DPS), decoding capability information (DCI), a picture parameter set (PPS), an adaptation parameter set (APS), a slice header, or tile group header.

[0586] Clause 104. The method of any of clauses 1 -97, wherein the generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture is signalled at least one of the following: a color component, a sub -picture, a slice, a tile, a coding tree unit (CTU), a CTU row, a group of CTU, a coding unit (CU), a prediction unit (PU), a transform unit (TU), a coding tree block (CTB), a coding block (CB), a prediction block (PB), a transform block (TB), a block, a sub -block of a block, a sub-region within a block, a region containing more than one sample or pixel, a video sequence, a group of pictures (GOP), a region, one or more CTU rows, or one or more CTB rows.

[0587] Clause 105. The method of any of clauses 1-97, wherein whether to and / or how to apply the generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture depends on coded information.

[0588] Clause 106. The method of clause 105, wherein the code information comprises at least one of the following: block size, color format, single tree partitioning, dual tree partitioning, colour component, slice type, or picture type.

[0589] Clause 107. The method of any of clauses 1-106, wherein the conversion includes encoding the 83 F1257162PCTvideo unit into the bitstream.

[0590] Clause 108. The method of any of clauses 1-106, wherein the conversion includes decoding the video unit from the bitstream.

[0591] Clause 109. 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-108.

[0592] Clause 110. A non-transitory computer-readable storage medium storing instructions that cause a processor to perform a method in accordance with any of clauses 1-108.

[0593] Clause 111. A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by an apparatus for video processing, wherein the method comprises: generating a subblock-based spatial motion vector prediction (sb-SMVP) candidate of a video unit of the video based on motion information of at least one block in a current picture of the video, wherein the at least one block is neighboring to the video unit; and generating the bitstream based on the sb-SMVP prediction candidate.

[0594] Clause 112. A method for storing a bitstream of a video, comprising: generating a subblock-based spatial motion vector prediction (sb-SMVP) candidate of a video unit of the video based on motion information of at least one block in a current picture of the video, wherein the at least one block is neighboring to the video unit; generating the bitstream based on the sb-SMVP prediction candidate; and storing the bitstream in a non-transitory computer-readable recording medium.Example Device[0595 JFig. 60 illustrates a block diagram of a computing device 6000 in which various embodiments of the present disclosure can be implemented. The computing device 6000 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).

[0596] It would be appreciated that the computing device 6000 shown in Fig. 60 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.

[0597] As shown in Fig. 60, the computing device 6000 includes a general-purpose computing device 6000. The computing device 6000 may at least comprise one or more processors or processing units 6010, a memory 6020, a storage unit 6030, one or more communication units 6040, one or more input devices 6050, and one or more output devices 6060.[0598Jln some embodiments, the computing device 6000 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 84 F1257162PCTbe any type of mobile terminal, fixed terminal, or portable terminal, including a mobile phone, station, unit, device, multimedia computer, multimedia tablet, Internet node, communicator, desktop computer, laptop computer, notebook computer, netbook computer, tablet computer, personal communication system (PCS) device, personal navigation device, personal digital assistant (PDA), audio / video player, digital camera / video camera, positioning device, television receiver, radio broadcast receiver, E -book device, gaming device, or any combination thereof, including the accessories and peripherals of these devices, or any combination thereof. It would be contemplated that the computing device 6000 can support any type of interface to a user (such as “wearable” circuitry and the like).

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

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

[0601] The computing device 6000 may further include additional detachable / non -detachable, volatile / non-volatile memory' medium. Although not shown in Fig. 60, 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.

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

[0603] The input device 6050 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 6060 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 6040, the computing device 6000 can further communicate with one or more external devices (not 85 F1257162PCTshown) such as the storage devices and display device, with one or more devices enabling the user to interact with the computing device 6000, or any devices (such as a network card, a modem and the like) enabling the computing device 6000 to communicate with one or more other computing devices, if required. Such communication can be performed via input / output (I / O) interfaces (not shown).

[0604] In some embodiments, instead of being integrated in a single device, some or all components of the computing device 6000 may also be arranged in cloud computing architecture. In the cloud computing architecture, the components may be provided remotely and work together to implement the functionalities described in the present disclosure. In some embodiments, cloud computing provides computing, software, data access and storage service, which will not require end users to be aware of the physical locations or conFigurations of the systems or hardware providing these services. In various embodiments, the cloud computing provides the services via a wide area netw ork (such as Internet) using suitable protocols. For example, a cloud computing provider provides applications over the wide area network, which can be accessed through a web brow ser or any other computing components. The software or components of the cloud computing architecture and corresponding data may be stored on a server at a remote position. The computing resources in the cloud computing environment may be merged or distributed at locations in a remote data center. Cloud computing infrastructures may provide the services through a shared data center, though they behave as a single access point for the users. Therefore, the cloud computing architectures may be used to provide the components and functionalities described herein from a service provider at a remote location. Alternatively, they may be provided from a conventional server or installed directly or otherwise on a client device.

[0605] The computing device 6000 may be used to implement video encoding / decoding in embodiments of the present disclosure. The memory 6020 may include one or more video coding modules 6025 having one or more program instructions. These modules are accessible and executable by the processing unit 6010 to perform the functionalities of the various embodiments described herein.

[0606] In the example embodiments of performing video encoding, the input device 6050 may receive video data as an input 6070 to be encoded. The video data may be processed, for example, by the video coding module 6025, to generate an encoded bitstream. The encoded bitstream may be provided via the output device 6060 as an output 6080.

[0607] In the example embodiments of performing video decoding, the input device 6050 may receive an encoded bitstream as the input 6070. The encoded bitstream may be processed, for example, by the video coding module 6025, to generate decoded video data. The decoded video data may be provided via the output device 6060 as the output 6080.

[0608] While this disclosure has been particularly shown and described with references to example embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application as defined by the appended claims. Such variations are intended to be covered by the scope of this present application. As such, the foregoing description of embodiments of the present application is not intended 86 F1257162PCTto be limiting.87 F1257162PCT

Claims

I / We Claim:

1. A method for video processing, comprising:generating, for a conversion between a video unit of a video and a bitstream of the video, a subblock¬ based spatial motion vector prediction (sb-SMVP) candidate of the video unit based on motion information of at least one block in a current picture of the video, wherein the at least one block is neighboring to the video unit; andperforming the conversion based on the sb-SMVP prediction candidate.

2. The method of claim 1, wherein motion information of a subblock inside the video unit is generated based on motion information of at least one neighbouring block in a directional way.

3. The method of claim 2, wherein the motion information of the subblock inside the video unit is generated based on the motion information of the at least one neighbouring block in a vertical way.

4. The method of claim 3, wherein the motion information of the subblock inside the video unit is copied or derived with the at least one neighbouring block in a same column as the video unit.

5. The method of claim 2, wherein the motion information of the subblock inside the video unit is generated based on the motion information of the at least one neighbouring block in a horizontal way.

6. The method of claim 5, wherein the motion information of the subblock inside the video unit is copied or derived with the at least one neighbouring block in a same row as the video unit.

7. The method of claim 2, wherein the motion information of the subblock inside the video unit is generated based on the motion information of the at least one neighbouring block in a diagonal way.

8. The method of claim 7, wherein the motion information of the subblock inside the video unit is copied or derived with the at least one neighbouring block in a same diagonal line as the video unit.

9. The method of claim 2, wherein the motion information of the subblock inside the video unit is generated based on the motion information of the at least one neighbouring block in an inverse diagonal way.

10. The method of claim 9, wherein the motion information of the subblock inside the video unit is copied or derived with the at least one above neighbouring block in a same inverse diagonal line as the video unit,11. The method of claim 9, wherein the motion information of the subblock inside the video unit is copied or derived with the at least one left neighbouring block in a same inverse diagonal line as the video unit.88 F1257162PCT12. The method of claim 1, wherein motion information of a subblock inside the video unit is generated based on motion information of at least one non-adjacent neighbouring block to the video unit.

13. The method of claim 12, wherein the motion information of the subblock inside the video unit is generated based on the motion information of at least one non-adjacent neighbouring block in a directional way,14. The method of claim 13, wherein the motion information of the subblock inside the video unit is copied or derived with the at least one non-adjacent neighbouring block in a same column as the video unit.

15. The method of claim 13, wherein the motion information of the subblock inside the video unit is copied or derived with the at least one non-adjacent neighbouring block in a same row as the video unit.

16. The method of claim 1, wherein motion information of a subblock inside the video unit is generated based on motion information stored in a table,17. The method of claim 16, wherein the motion information of the subblock inside the video unit is generated with or copied from the motion information in a history -based motion vector prediction (HMVP) table.

18. The method of any of claims 1-17, wherein the sb-SMVP prediction candidate is put into a first candidate list.

19. The method of claim 18, wherein the first candidate list is one of:a sub-block merge list,a merge list,an advanced motion vector prediction (AMVP) list,a combined inter-intra prediction (CUP) merge list,a template matching (TM)-merge list,a geometric partitioning mode (GPM) merge list, ora GPM -affine list.

20. The method of any of claims 1-19, wherein whether the sb-SMVP candidate is available depends on the at least one neighbouring block.

21. The method of claim 20, wherein the sb-SMVP candidate is available if all neighbouring blocks required to generate motion information inside the video unit are valid.

22. The method of claim 21, wherein in accordance with that the condition is satisfied, the neighbouring block is not valid, wherein the condition comprises at least one of:89 F1257162PCTthe neighbouring block is inaccessible,the neighbouring block is not inter-coded,the neighbouring block has no motion information, orthe neighbouring block is coded by a coding mode.

23. The method of claim 22, wherein the coding mode is GPM-intra or affine,24. The method of claim 20, wherein the sb-SMVP candidate is available, if the motion information of at least two subblocks inside the video unit are different.

25. The method of claim 24, wherein in accordance with that a condition is satisfied, the motion information of two subblocks are different, wherein the condition comprises at least one of:inter-prediction directions of two subblocks are different,at least one reference picture of a first subblock is different from at least one reference picture of a second subblock, orat least one motion vector (MV) of a first subblock is different from at least one MV of a second subblock.

26. The method of claim 25, whereintwo MVs (MVxl, MVvl) and (MVx2, MVy2) are different if |MVxl - MVx2| > Tx or |MVyl - MVy2| > Ty, wherein Tx and Ty are integers.

27. The method of claim 26, wherein Tx - Ty - 1.

28. The method of any of claims 1-27, wherein the sb-SMVP candidate is checked and put into a candidate list at a specific position.

29. The method of claim 28, wherein the sb-SMVP candidate is put into the candidate list if it is available after checking.

30. The method of claim 28, wherein the position is fixed.

31. The method of claim 30, wherein the sb-SMVP candidate is checked and put into the candidate list after all subblock-based temporal motion vector prediction (sb-TMVP) candidates.

32. The method of claim 30, wherein the sb-SMVP candidate is checked and put into the candidate list before all sb-TMVP candidates.

33. The method of claim 30, wherein the sb-SMVP candidate is checked and put into the candidate list after first N sb-TMVP candidates, where N is an integer.90 F1257162PCT34, The method of claim 33, wherein N = 3.

35. The method of claim 30, wherein the sb-SMVP candidate is checked and put into the candidate list after all affine candidates.

36. The method of claim 30, wherein the sb-SMVP candidate is checked and put into the candidate list after first N affine candidates, where N is an integer.

37. The method of claim 36, wherein N = 3.

38. The method of claim 28, wherein the position is adaptive.

39. The method of claim 38, wherein the sb-SMVP candidate is checked and put into the candidate list after first N affine candidates, where N depends on the number of affine-coded blocks neighbouring to the video unit.

40. The method of claim 39, wherein if N is equal to 0, the sb-SMVP candidate is checked and put into the candidate list before all affine candidates.

41. The method of any of claims 1-40, wherein information of whether to and / or an approach to apply at least one sb-SMVP candidate is signalled from an encoder to a decoder.

42. The method of claim 41, wherein the information is signalled at one of:a sequence level,a picture level,a slice level, ora block level.

43. The method of claim 42, wherein the information is signalled in a sequence parameter set (SPS) or a sequence header,44. The method of claim 42, wherein the information is signalled in a picture parameter set (PPS) or a picture header.

45. The method of claim 42, wherein the information is signalled in a slice header.

46. The method of claim 42, wherein the information is signalled in a coding tree unit (CTU) or a coding unit (CU) or a prediction unit (PU)or a transform unit (TU).91 F1257162PCT47. The method of claim 41, wherein the information comprise whether one sb-SMVP candidate is applicable.

48. The method of claim 41, wherein the information comprise the maximum number of sb-SMVP candidates.

49. The method of claim 41, wherein the information comprise types of allowed sb-SMVP candidates.

50. The method of any of claims 1-49, wherein a first subblock-based candidate which is a sb-TMVP candidate or an affine candidate or a sb-SMVP candidate is compared with at least one other subblock -based candidate already in a subblock-based candidate list.

51. The method of claim 50, wherein the first subblock-based candidate is not put into the subblock¬ based candidate list if it is the same or similar to at least one other candidate already in the subblock -based candidate list.

52. The method of claim 51, wherein in accordance with that a condition is satisfied, a first candidate is not same or similar to a second candidate, wherein the condition comprises at least one of:at least in one subblock, an inter-prediction direction of the first candidate is different from an inter¬ prediction direction of the second candidate,at least in one subblock, at least one reference picture of the first candidate is different from at least one reference picture of that of the second candidate, orat least in one subblock, at least one MV of the first candidate is different from at least one MV of the second candidate.

53. The method of claim 52, wherein two MVs (MVxl, MVyl) and (MVx2, MVy2) are different if |MVxl -- MVx2j > Tx or iMVyl -• MVy2j > Ty, wherein Tx and Ty are integers.

54. The method of claim 53, wherein Tx = Ty = 1.

55. The method of claim 50, wherein whether to and / or an approach to apply the comparison depends on types of two candidates.

56. The method of claim 55, wherein at least one of the two candidates is a sb-TMVP candidate or an affine candidate or a sb-SMVP candidate.

57. The method of claim 50, wherein whether to and / or an approach to apply the comparison depends on a position of the two candidates in the subblock-based candidate list.92 F1257162PCT58. The method of any of claims 1-57, wherein the sb-SMVP candidate is involved in an adaptive reordering of merge candidates (ARMC) procedure.

59. The method of claim 8, wherein a TM cost of the sb-SMVP candidate is calculated in a same way as a sb-TMVP candidate or an affine candidate.

60. The method of claim 58, wherein the sb-SMVP candidate is reordered with all other candidates in a candidate list comprising the sb-SMVP candidate.

61. The method of claim 58, wherein the sb-SMVP candidate is reordered with a group of candidates in the candidate list comprising the sb-SMVP candidate.

62. The method of claim 61, wherein the group of candidates comprise at least one of:at least one other sb-SMVP candidate,at least one sb-TMVP candidate, orat least one affine candidate.

63. The method of any of claims 1-62, wherein a final prediction is generated by fusing a first prediction derived with the sb-SMVP candidate and a second prediction.

64. The method of claim 63, wherein two predictions are fused by applying a weighted sum on the first and second predictions.

65. The method of claim 64, wherein P = W0xP0+Wl Pi, wherein P represents the final prediction, P0 and Pl represent the first and second predictions, respectively, WO and W1 represent weighting values, respectively.

66. The method of claim 64, wherein the weighting values are fixed.

67. The method of claim 66, wherein W0= Wl= ‘A.

68. The method of claim 64, wherein the second prediction is an intra-prediction.

69. The method of claim 64, wherein the second prediction is another inter-prediction.

70. The method of claim 69, wherein the inter-prediction is a subblock-based inter-prediction.

71. ’The method of claim 70, wherein the subblock-based inter-prediction is affine prediction or sb-TMVP prediction.93 F1257162PCT72. The method of claim 69, wherein the inter-prediction is regular inter-prediction.

73. The method of any of claims 1-72, wherein the sb-SMVP candidate is further processed by at least a refinement procedure before being used, wherein the refinement comprises at least one of:a TM refinement,a decoder-side motion vector refinement (DMVR) refinement,a bi-directional optical flow (BDOF) refinement,an overlapped block motion compensation (OBMC) refinement,a multi-hypothesis prediction (MHP) refinement, ora biliteral filtering or any other filtering refinement.

74. The method of any of claims 1-73, wherein a width and / or height of a subblock used in sb-SMVP is fixed or adaptive.

75. The method of claim 74, wherein the width and / or height of the subblock is fixed.

76. The method of claim 75, wherein the width and / or height of the subblock is 4x4 or 8x8.

77. The method of claim 74, wherein the width and / or height of the subblock is adaptive.

78. The method of claim 77, wherein the width and / or height of the subblock is signaled in the bitstream.

79. The method of claim 77, wherein the width and / or height of the subblock depend on a width / height of the video unit.

80. The method of claim 77, wherein the width and / or height of the subblock depend on how to derive the sb-SMVP.

81. The method of claim 80, wherein a subblock size is set to be UXH if motion information of the subblock inside the video unit is generated based on motion information of at least one neighbouring block in a vertical way, wherein U represents the width of the subblock and H represents the height of the video unit.

82. The method of claim 81, wherein U = 4.

83. The method of claim 80, wherein a subblock size is set to be WXU if motion information of the subblock inside the video unit is generated based on motion information of at least one neighbouring block in a horizontal way where U represents the width of the subblock and W represents the width of the video unit.94 F1257162PCT84. The method of claim 83, wherein U = 4.

85. The method of any of claims 1-84, wherein whether to and / or an approach to apply sb-SMVP depend on at least one of: color format or color components.

86. The method of claim 85, wherein a width and / or height of the subblock is different for luma and chroma components.

87. The method of claim 86, wherein a subblock size is 2N x 2N for luma component but N *N for chroma component.

88. The method of claim 87, wherein N 2.

89. The method of claim 85, wherein a width and / or height of the subblock is the same for luma and chroma components,90. The method of claim 89, wherein the subblock size is 4x4 for luma component and for chroma component.

91. The method of claim 89, wherein if a chroma subblock corresponds to multiple luma subblocks, motion information of the chroma subblock is set to be motion information of one of the corresponding luma subblocks.

92. The method of any of claims 1-91, wherein the video unit is divided into multiple subblocks, wherein motion information of at least two subblocks are derived with different approaches.

93. The method of claim 92, wherein motion information of a first subblock in the video unit is derived in a way of sb-SMVP and a second subblock in the video unit is derived in a way of sb-TMVP.

94. The method of claim 92, wherein motion information of a first subblock in the video unit is derived in a way of sb-SMVP and a second subblock in the video unit is derived in a way of affine prediction.

95. The method of claim 92, wherein motion information of a first subblock in the video unit is derived in a way of sb-TMVP and a second subblock in the video unit is derived in a way of affine prediction.

96. The method of any of claims 1-95, wherein the sb-TMVP is applied if a reference picture is the current picture.95 F1257162PCT97. The method of claim 96, wherein the sb-TMVP is applied if at least one subblock of the sb-TMVP candidate is intra block copy (IBC)-predicted.

98. The method of any of claims 1-97, wherein generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture is used for at least one of the following:single tree coding,dual tree coding,chroma coding,luma coding,inter block coding, IBC,intra template matching prediction (intraTMP), ordirect block vector (DBV) block coding.

99. The method of any of claims 1-97, wherein generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture is used in at least one of the following:an intra slice, oran inter slice.

100. The method of claim 99, wherein the intra slice is I.

101. The method of claim 99, wherein the inter slice is B or P or low-delay B.

102. The method of any of claims 1-97, wherein an indication of whether to and / or how to apply the generating the sb-SMVP candidate based on the motion information of the at least one block in the cun-ent picture is indicated at one of the followings:sequence level,group of pictures level,picture level,slice level, ortile group level.

103. The method of any of claims 1-97, wherein an indication of whether to and / or how to apply the generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture is indicated in one of the followings:a sequence header,a picture header,a sequence parameter set (SPS),a video parameter set (VPS),a decoding parameter set (DPS),96 F1257162PCTdecoding capability information (DCI),a picture parameter set (PPS),an adaptation parameter set (APS),a slice header, ora tile group header.

104. The method of any of claims 1-97, wherein the generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture is signalled at least one of the following: a color component,a sub-picture,a slice,a tile,a coding tree unit (CTU),a CTU row,a group of CTU,a coding unit (CU),a prediction unit (PU),a transform unit (TU),a coding tree block (CTB),a coding block (CB),a prediction block (PB),a transform block (IB),a block,a sub-block of a block,a sub-region within a block,a region containing more than one sample or pixel,a video sequence,a group of pictures (GOP),a region,one or more CTU rows, orone or more CTB rows.

105. The method of any of claims 1-97, wherein whether to and / or how to apply the generating the sb-SMVP candidate based on the motion information of the at least one block in the current picture depends on coded information.

106. The method of claim 105, wherein the code information comprises at least one of the following: block size,color format,F1257162PCTsingle free partitioning,dual free partitioning,colour component,slice type, orpicture type.

107. The method of any of claims 1 -106, wherein the conversion includes encoding the video unit into the bitstream.

108. The method of any of claims 1-106, wherein the conversion includes decoding the video unit from the bitstream.

109. An apparatus for video processing comprising a processor and a non-fransitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to perform a method in accordance with any of claims 1-108.

110. A non-fransitory computer-readable storage medium storing instructions that cause a processor to perform a method in accordance with any of claims 1-108.

111. A non-fransitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by an apparatus for video processing, wherein the method comprises:generating a subblock-based spatial motion vector prediction (sb-SMVP) candidate of a video unit of the video based on motion information of at least one block in a current picture of the video, wherein the at least one block is neighboring to the video unit; andgenerating the bitstream based on the sb-SMVP prediction candidate.

112. A method for storing a bitstream of a video, comprising:generating a subblock-based spatial motion vector prediction (sb-SMVP) candidate of a video unit of the video based on motion information of at least one block in a current picture of the video, wherein the at least one block is neighboring to the video unit;generating the bitstream based on the sb-SMVP prediction candidate; andstoring the bitstream in anon-transitory’ computer-readable recording medium.98 F1257162PCT