Video coding method and apparatus for determining prediction of current block by multi-hypothesis blending

EP4677848A4Pending Publication Date: 2026-07-01MEDIATEK INC

Patent Information

Authority / Receiving Office
EP · EP
Patent Type
Applications
Current Assignee / Owner
MEDIATEK INC
Filing Date
2024-04-19
Publication Date
2026-07-01

Smart Images

  • Figure CN2024088955_24102024_PF_FP_ABST
    Figure CN2024088955_24102024_PF_FP_ABST
Patent Text Reader

Abstract

A method for video coding includes: receiving data to be encoded or decoded as a current block of pixels of a current picture of a video; and encoding or decoding the current block by a target prediction mode. The step of encoding or decoding the current block by the target prediction mode includes: obtaining multiple predictor candidates of the current block, wherein the multiple predictor candidates include at least one block vector (BV) based predictor; and determining prediction of the current block by jointly considering the multiple predictor candidates.
Need to check novelty before this filing date? Find Prior Art

Description

VIDEO CODING METHOD AND APPARATUS FOR DETERMINING PREDICTION OF CURRENT BLOCK BY MULTI-HYPOTHESIS BLENDINGBACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] This application claims the benefit of U.S. provisional application No. 63 / 497, 480 and U.S. provisional application No. 63 / 497, 482, both filed on 04 / 21 / 2023.

[0003] The present invention relates to video coding, and more particularly, to a video coding method that determines prediction of a current block by jointly considering (e.g., blending) multiple predictor candidates (which include at least one block vector (BV) based predictor) and an associated apparatus.

[0004] 2. Description of the Prior Art

[0005] The conventional video coding standards generally adopt a block based coding technique to exploit spatial and temporal redundancy. For example, the basic approach is to divide the whole source picture into a plurality of blocks, perform intra / inter prediction on each block, transform residues of each block, and perform quantization and entropy encoding. Besides, a reconstructed picture is generated in a coding loop to provide reference data used for coding following blocks. For certain video coding standards, in-loop filter (s) may be used for enhancing the image quality of the reconstructed frame.

[0006] The video decoder is used to perform an inverse operation of a video encoding operation performed by a video encoder. For example, the video decoder may have a plurality of processing circuits, such as an entropy decoding circuit, an intra prediction circuit, a motion compensation circuit, an inverse quantization circuit, an inverse transform circuit, a reconstruction circuit, and in-loop filter (s) .

[0007] Typically, the coding efficiency highly depends on accuracy of the prediction that  is responsible for finding a reconstructed block (previously coded block) as a prediction block of a current block. Thus, there is a need for an innovative prediction scheme for improving the prediction accuracy as well as the coding efficiency.SUMMARY OF THE INVENTION

[0008] One of the objectives of the claimed invention is to provide a video coding method that determines prediction of a current block by jointly considering (e.g., blending) multiple predictor candidates (which include at least one block vector (BV) based predictor) and an associated apparatus.

[0009] According to a first aspect of the present invention, an exemplary method for video coding is disclosed. The exemplary method includes: receiving data to be encoded or decoded as a current block of pixels of a current picture of a video; and encoding or decoding the current block by a target prediction mode. The step of encoding or decoding the current block by the target prediction mode includes: obtaining multiple predictor candidates of the current block, wherein the multiple predictor candidates comprise at least one block vector (BV) based predictor; and determining prediction of the current block by jointly considering the multiple predictor candidates.

[0010] According to a second aspect of the present invention, an exemplary video encoder is disclosed. The exemplary video encoder includes a video data memory and an encoding circuit. The video data memory is arranged to receive data to be encoded as a current block of pixels of a current picture of a video. The encoding circuit is arranged to perform encoding of the current block by a target prediction mode, and includes a prediction processing circuit. The prediction processing circuit is arranged to obtain multiple predictor candidates of the current block, and determine prediction of the current block by jointly considering the multiple predictor candidates, wherein the multiple predictor candidates comprise at least one block vector (BV) based predictor.

[0011] According to a third aspect of the present invention, an exemplary video decoder is disclosed. The exemplary video decoder includes a video data memory and a decoding circuit. The video data memory is arranged to receive data to be decoded as a current block of pixels of a current picture of a video. The decoding circuit is arranged to perform decoding of the current block by a target prediction mode, and includes a prediction processing circuit. The prediction processing circuit is arranged to obtain multiple predictor candidates of the current block, and determine prediction of the current block by jointly considering the multiple predictor candidates, wherein the multiple predictor candidates comprise at least one block vector (BV) based predictor.

[0012] These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.Brief Description of the Drawings

[0013] FIG. 1 is a diagram illustrating an intra template matching search area according to an embodiment of the present invention.

[0014] FIG. 2 is a diagram illustrating current picture referencing according to an embodiment of the present invention.

[0015] FIG. 3 is a diagram illustrating BV adjustment for horizontal flip and vertical flip according to an embodiment of the present invention.

[0016] FIG. 4 is a diagram illustrating one CU with four sub-blocks and its neighboring blocks according to an embodiment of the present invention.

[0017] FIG. 5 is a diagram illustrating a template and its reference samples used in TIMD according to an embodiment of the present invention.

[0018] FIG. 6 is a diagram illustrating that TM can be used to refine multiple sub-CUs coded by IBC according to an embodiment of the present invention.

[0019] FIG. 7 is a diagram illustrating that combined IBC mode can generate the final predictor by blending two predictors according to an embodiment of the present invention.

[0020] FIG. 8 is a diagram illustrating a searching process in a predefined range according to an embodiment of the present invention.

[0021] FIG. 9 is a block diagram illustrating a video encoder that supports the proposed prediction mode according to an embodiment of the present invention.

[0022] FIG. 10 is a block diagram illustrating a video decoder that supports the proposed prediction mode according to an embodiment of the present invention.

[0023] FIG. 11 is a flowchart illustrating a video coding method according to an embodiment of the present invention.DETAILED DESCRIPTION

[0024] Certain terms are used throughout the following description and claims, which refer to particular components. As one skilled in the art will appreciate, electronic equipment manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not in function. In the following description and in the claims, the terms "include" and "comprise" are used in an open-ended fashion, and thus should be interpreted to mean "include, but not limited to ... " . Also, the term "couple" is intended to mean either an indirect or direct electrical connection. Accordingly, if one device is coupled to another device, that connection may be through a direct electrical connection, or through an indirect electrical connection via other devices and connections.

[0025] Introduction

[0026] Intra template matching

[0027] Intra template matching prediction (IntraTMP) is a special intra prediction mode that copies the best prediction block from the reconstructed part of the current frame, whose L-shaped template matches the current template. For a predefined search range, the encoder searches for the most similar template to the current template in a reconstructed part of the current frame and uses the corresponding block as a prediction block. The encoder then signals the usage of this mode, and the same prediction operation is performed at the decoder side.

[0028] The prediction signal is generated by matching the L-shaped causal neighbor of the current block with another block in a predefined search area in FIG. 1 consisting of:

[0029] R1: current CTU

[0030] R2: top-left CTU

[0031] R3: above CTU

[0032] R4: left CTU

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

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

[0035] 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:

[0036] SearchRange_w = a *BlkW

[0037] SearchRange_h = a *BlkH

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

[0039] To speed-up the template matching process, the search range of all search regions is subsampled by a factor of 2. This leads to a reduction of template matching search by 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. The reduced range is defined as min (BlkW, BlkH)  / 2.

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

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

[0042] Current Picture Referencing

[0043] For a typical video with text and graphics, there are usually repetitive patterns within the same picture. Hence, intra (picture) block compensation has been observed to be very effective. A new prediction mode, i.e., the intra block copy (IBC) mode or called current picture referencing (CPR) , was thus introduced for screen content coding to utilize this characteristic. In the CPR mode, a prediction unit (PU) is predicted from a previously reconstructed block within the same picture. Further, a displacement vector (called block vector or BV) is used to signal the relative displacement from the position of the current block to that of the reference block. The prediction errors are then coded using transformation, quantization and entropy coding. An example of CPR compensation is illustrated in FIG. 2. In this technique, the reference samples correspond to the reconstructed samples of the current decoded  picture prior to in-loop filter operations, both deblocking and sample adaptive offset (SAO) filters in HEVC.

[0044] Multi-hypothesis prediction (MHP) technique

[0045] Multi-hypothesis prediction is proposed to improve the existing prediction modes in inter pictures, including uni-prediction of advanced motion vector prediction (AMVP) mode, skip and merge mode, and intra mode. The general concept is to combine an existing prediction mode with an extra merge indexed prediction. The merge indexed prediction is performed as in merge mode, where a merge index is signaled to acquire motion information for the motion compensated prediction. The final prediction is the weighted average of the merge indexed prediction and the prediction generated by the existing prediction mode, where different weights are applied depending on the combinations. Detail information can be got in JVET-K1030, or JVET-L0100.

[0046] Reconstruction-Reordered IBC (RR-IBC)

[0047] A 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.

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

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

[0050] IBC merge mode with block vector differences (IBC-MBVD)

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

[0052] In IBC-MBVD, the distance set is {1-pel, 2-pel, 4-pel, 8-pel, 12-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.

[0053] 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 (20×4) 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 1.

[0054] An IBC-MBVD coded block does not inherit flip type from a RR-IBC coded neighbor block.

[0055] IBC-LIC

[0056] In JVET-AC0112, IBC-LIC is adopted in ECM. 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. For IBC merge mode, the IBC-LIC flag is inferred from the merge candidate.

[0057] IBC-GPM

[0058] In JVET-AC0112, IBC-GPM is adopted in ECM. 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 using 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 merge list is constructed using the same method as GPM with inter and intra prediction for intra prediction, and the IPM candidate merge 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:

[0059] Table 1: Geometry partitioning modes in the first geometry partitioning mode set

[0060] Table 2: Geometry partitioning modes in the second geometry partitioning mode set

[0061] IBC-CIIP

[0062] In JVET-AC0112, IBC-CIIP is adopted in ECM. Combined intra block copy and intra prediction (IBC-CIIP) is a coding tool for a CU which uses IBC with merge mode and intra prediction to obtain two prediction signals, and the two prediction signals are weighted summed to generate the final prediction. Specifically, if the intra prediction is planar or DC mode, the final prediction is obtained as follows: P= (wibc*Pibc+ ( (1<<shift) -wibc) *Pintra+ (1<< (shift-1) ) ) >>shift

[0063] wherein Pibc and Pintra denote the IBC prediction signal and intra prediction signal, respectively. (wibc, shift) are set equal to (13, 4) and (1, 1) for IBC merge mode and IBC AMVP mode.

[0064] Adaptive reordering of merge candidates with template matching (ARMC-TM)

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

[0066] An initial candidate list (for example, an initial merge candidate merge list) is firstly constructed according to given checking order, such as spatial, TMVPs, non-adjacent, HMVPs, 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 merge list and the reordering is according to cost values based on template matching. The index of selected merge candidate in the reordered merge candidate merge 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.

[0067] 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 candidate list (for example, an initial AMVP candidate merge list) is constructed, followed by a refinement from TM to construct a refined AMVP candidate merge 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.

[0068] Note, when wrap around motion compensation is enabled, the MV candidate shall be clipped with wrap around offset taken into consideration.

[0069] Subblock-based temporal motion vector prediction (SbTMVP)

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

[0071] – TMVP predicts motion at CU level but SbTMVP predicts motion at sub-CU level;

[0072] – Whereas TMVP fetches the temporal motion vectors from the collocated block in the collocated picture (the collocated block is the bottom-right or center block relative to the current CU) , SbTMVP applies a motion shift before fetching the temporal motion information from the collocated picture, where the motion shift is obtained from the motion vector from one of the spatial neighboring blocks of the current CU.

[0073] Spatial-temporal motion vector prediction (STMVP)

[0074] In JEM-3.0, a spatial-temporal motion vector prediction (STMVP) is also included in merge mode coding. In STMVP, the motion vectors of the sub-CUs are derived recursively following raster scan order by using the temporal motion vector predictor and spatial neighbouring motion vector. FIG. 4 illustrates this concept. Let us consider an 8x8 CU which contains four 4x4 sub-CUs, A, B, C, and D. The neighbouring NxN blocks in the current frame are labeled as a, b, c, and d. The motion derivation for sub-CU A starts by identifying its two spatial neighbours. The first neighbour is NxN  block above sub-CU A (block c) . If this block c is not available or is intra coded, the other NxN blocks above sub-CU A are checked (from left to right, starting at block c) . The second neighbour is a block to the left of the sub-CU A (block b) . If block b is not available or is intra coded, other blocks to the left of sub-CU A are checked (from top to bottom, staring at block b) . The motion information obtained from the neighbouring blocks for each list is scaled to the first reference frame for a given list. Next, temporal motion vector predictor (TMVP) of sub-block A is derived by following the same procedure of TMVP derivation as specified in HEVC. The motion information of the co-located block at location D is fetched and scaled accordingly. At last, after retrieving and scaling the motion information, all available motion vectors (up to 3) are averaged separately for each reference list. The averaged motion vector is assigned as the motion vector of the current sub-CU.

[0075] Deblocking filter

[0076] Deblocking filtering process is similar to those in HEVC. In VVC, the deblocking filtering process is applied on a CU boundaries, transform subblock boundaries and prediction subblock boundaries. The prediction subblock boundaries include the prediction unit boundaries introduced by the SbTMVP and affine modes, and the transform subblock boundaries include the transform unit boundaries introduced by SBT and ISP modes, and transforms due to implicit split of large CUs.

[0077] Template-based intra mode derivation (TIMD)

[0078] Template-based intra mode derivation (TIMD) mode implicitly derived the intra prediction mode of a CU by a neighboring template at both encoder and decoder, instead of being signal exact intra prediction mode bits to the decoder. As shown in  FIG. 5, the prediction samples of the template are generated using the reference samples of the template for each candidate mode. A cost is calculated as the SATD between the prediction and the reconstruction samples of the template. The intra prediction mode with the minimum cost is selected as the TIMD mode (as the derivation method for DIMD mode) and used for intra prediction of the CU.

[0079] Decoder side intra mode derivation (DIMD)

[0080] When DIMD is applied, two intra modes are derived from the reconstructed neighbor samples (template) , and those two predictors are combined with the planar mode predictor with the weights derived from the gradients. The DIMD mode is used as an alternative prediction mode and is always checked in the high-complexity RDO mode.

[0081] To implicitly derive the intra prediction modes of a blocks, a texture gradient analysis is performed at both encoder and decoder sides. This process starts with an empty Histogram of Gradient (HoG) with 65 entries, corresponding to the 65 angular modes. Amplitudes of these entries are determined during the texture gradient analysis.

[0082] Once HoG is computed, the indices with two tallest histogram bars are selected as the two implicitly derived intra prediction modes for the block and are further combined with the Planar mode as the prediction of DIMD mode.

[0083] Proposed Method

[0084] Different modes for generating prediction of the current block are detailed as below.

[0085] IBC-subblock-TM-merge mode (subblock-based prediction mode)

[0086] In one embodiment, TM can be used to refine multiple sub-CUs coded by IBC. For example, a CU is partitioned to 2 sub-CUs. As shown in the sub-diagram (A) of FIG. 6, sub-CU A is refined by template a and template b, and sub-CU B is refined by template c. For another example, a CU is partitioned to 2 sub-CUs. As shown in the sub-diagram (B) of FIG. 6, sub-CU A is refined by template a and template b, and sub-CU B is refined by template c.

[0087] If the refined motion is invalid for current sub-CU (the to-be referenced block is overlapped with current sub-CU) , the original motion is used (motions inherited from merge candidates) .

[0088] In another embodiment, TM can be used to refine multiple sub-CUs coded by IBC. For example, a CU is partitioned to 2 sub-CUs. As shown in the sub-diagram (C) of FIG. 6, sub-CU A is refined by template a and template b, and sub-CU B is refined by template c and template d. The template d is part of predictor of sub-CU A. As shown in the sub-diagram (D) of FIG. 6, sub-CU A is refined by template a and template b, and sub-CU B is refined by template c and template d. The template d is part of predictor of sub-CU A.

[0089] In one embodiment, the template d can be the reconstruction of sub-CU A.

[0090] In one embodiment, TM can be used to refine multiple sub-CUs coded by IBC. For example, in sub-diagram (A) of FIG. 6, template a is used to represent sub-CU “A” .  For example, template a is used to determine the one or more selected candidates for generating the first predictor for sub-CU “A” . The corresponding templates of candidates in IBC merge candidate merge list will be generated. For example, each candidate generates the predictor on template a. After that, they will compare with template a, for example, comparing the predictor on template a generated from each candidate with the reconstructed samples on template a to get the cost for each candidate, and the one with smallest SAD / SATD cost will be selected to generate the first predictor. In the next step, template b is used to represent sub-CU “A” . The corresponding templates of candidates in IBC merge candidate merge list will be generated. After that, they will compare with template b, and the one with smallest SAD / SATD cost will be selected to generate the second predictor. After that, the final predictor for sub-CU “A” is generated by averaging the first predictor and the second predictor. For sub-CU “B” , template c and template b are used to recommend two predictors, and after that, the final predictor is generated by blending two predictors.

[0091] In another embodiment, a position-based weighting can be applied. For example, samples closed to the top boundary will apply larger weightings on the first predictor that is derived by top template. Samples closed to the left boundary will apply larger weightings on the second predictor that is derived by left template.

[0092] In one embodiment, a syntax is signaled to indicate whether IBC subblock mode is applied, i.e. ibc_sublk_flag. In another embodiment, not only ibc_sublk_flag is signaled, ibc_sublk_merge_idx is further signaled when ibc_sublk_flag is true. Ibc_sublk_merge_idx is used to indicate which IBC subblock mode candidate is performed. In another embodiment, no additional ibc subblock related syntax is signaled. IBC-subblock merge candidates are treated as IBC merge candidates.  IBC-subblock merge candidates can be indicated by merge_idx. Moreover, with this design, if there is no valid IBC subblock candidate, no redundant syntax will be introduced. For example, the ibc subblock mode is indicated by merge_idx equal to 0.

[0093] IBC-TM-based multi-predictors mode (CU-based prediction mode)

[0094] In one embodiment, TM can be used to derive the predictor for IBC coded block. First, the top template of current block is used to represent current CU. The corresponding templates of candidates in IBC merge candidate merge list will be generated. After that, they will compare with current top template, and the one with smallest SAD / SATD cost will be selected to generate the first predictor. In the next step, the left template is used to represent current CU. The corresponding templates of candidates in IBC merge candidate merge list will be generated. After that, they will compare with the left template, and the one with smallest SAD / SATD cost will be selected to generate the second predictor. The final predictor of current CU is generated by blending the first and the second predictors.

[0095] In one embodiment, the top and left templates of current block are used to represent current CU. The corresponding templates of candidates in IBC merge candidate merge list will be generated. After that, they will compare with current top and left template, and the one with smallest SAD / SATD cost will be selected to generate the first predictor. And the one with 2nd smallest SAD / SATD cost will be selected to generate the second predictor. After that, the final predictor of current block is generated by blending the first and the second predictors. In another embodiment, top N candidates with smaller SAD / SATD cost can be used to generate final predictor. N can be any integer larger than zero. A syntax  ibc_subblock_blend_pred_num can be signaled to indicate how many predictors are used during blending.

[0096] In one embodiment, TM can be used to derive the predictor for IBC coded block. First, the top template and left template of current block are used to represent current CU. The corresponding templates of candidates in IBC merge candidate merge list will be generated. After that, they will compare with current top template and left template, and the one with smallest SAD / SATD cost will be selected to generate the first predictor. In the next step, the templates around first predictor are generated. In that, the one with smallest SAD / SATD cost will be selected as the second predictor. The final predictor is generated by blending first predictor and second predictor. For example, if the corresponding MV of first predictor is MV_1, the candidate merge list of second predictor can be [MV_1 + MVD1, MV_1 + MVD2, MV_1 + MVD3, MV_1 + MVD4] . MVDN can be any integer pixel (i.e., MVDN = 1, 4, 8, -4, -8) . For another example, MVDN can be designed based on MV precision, CU size, CU width, or CU height.

[0097] In one embodiment, TM can be used to derive the predictor for IBC coded block. First, the top template of current block is used to represent current CU. The corresponding templates of candidates in IBC merge candidate merge list will be generated. After that, they will compare with current top template, and the one with smallest SAD / SATD cost will be selected to generate the first predictor. In the next step, the left template is used to represent current CU. The corresponding templates around first predictor are generated to calculate the TM cost with current left  template. The one with smallest SAD / SATD cost will be selected to generate the second predictor. The candidates of second predictor can be derived by a predefined MV list generated by the first derived motion. For example, if the corresponding MV of first predictor is MV_1, the candidate merge list of second predictor can be [MV_1 + MVD1, MV_1 + MVD2, MV_1 + MVD3, MV_1 + MVD4] . MVDN can be any integer pixel (i.e., MVDN = 1, 4, 8, -4, -8) . For another example, MVDN can be designed based on MV precision, CU size, CU width, or CU height.

[0098] In another embodiment, a position-based weighting can be applied. For example, samples closed to the top boundary will apply larger weightings on the first predictor that is derived by top template. Samples closed to the left boundary will apply larger weightings on the second predictor that is derived by left template.

[0099] In one embodiment, the above-mentioned IBC-TM-based-multi-predictor mode can be extended to subblock based. For example, in sub-diagram (A) of FIG. 6, we use template a, and b to represent sub-CU A. And template b, and c to represent sub-CU B.For another example, in sub-diagram (B) of FIG. 6, we use template a, and b to represent sub-CU A. And template a, and c to represent sub-CU B.

[0100] The above-mentioned IBC subblock TM merge mode syntax design can also be performed with IBC-TM-based multi-predictor mode or IBC-TM-based-subblock-multi-predictor mode.

[0101] Increase the variation of IBC blending modes (IBC-CIIP)

[0102] In one embodiment, combined IBC mode can generate the final predictor by blending two IBC merge predictors. For example, one predictor can be generated according to left neighbor’s BV. The other one predictor can be generated according to historical BV. After that, these two predictors are blended to generate IBC-CIIP final predictor. In another embodiment, combined IBC mode can generate the final predictor by blending one IBC merge predictor and one intraTMP predictor. In one embodiment, combined IBC mode can generate the final predictor by blending one IBC AMVP predictor and one intraTMP predictor.

[0103] In another embodiment, the blending weightings are designed based on two predictors’ type. For example, the first predictor is derived from neighboring block’s BV, and the second predictor is derived based on non-adjacent candidate. During blending, the first predictor will apply larger weighting than the second predictor. In another embodiment, the blending weightings are designed based on the template matching cost. For example, the blending weight can be larger for the predictor with lower template matching cost.

[0104] In another embodiment, the blending weightings are designed based on the BVs and / or the prediction modes of neighboring CUs. For example, the blending weight of IBC predictor can be larger if the top and left CUs are coded by IBC mode. On the other hand, the blending weight of intra predictor can be larger if the top and left CUs are coded by intra mode.

[0105] In another embodiment, the blending weightings are designed based on the DIMD gradient amplitudes in the neighboring region (e.g., 3 template lines) . For example, the blending weight of intra predictor can be larger if the DIMD gradient  amplitude of the selected intra prediction mode is largest or larger.

[0106] In another embodiment, FIG. 7 is a diagram illustrating that combined IBC mode can generate the final predictor by blending two predictors. Each hypothesis of prediction is and are used to form the final prediction of the current block using the blending weighting.

[0107] For example, a blended sample for one hypothesis is generated by K0 (e.g., 2) spatial gradients, K1 (e.g., 2) location terms, a nonlinear term, and a bias term. In one case, for each hypothesis, the C and / or the spatial gradients and / or location terms and / or a nonlinear term are from the prediction block referred by one block vector information. Gx = (2W + NW + SW) – (2E + NE + SE) , Gy = (2N + NW + NE) – (2S + SW + SE) , P= (C2+ (1<< (bitDepth-1) ) ) >>bitDepth,

[0108] X and Y are the vertical and horizontal relative locations,

[0109] B is a midValue set to (1<< (bitDepth-1) )

[0110] For another example, a blended sample for one hypothesis is generated by T (e.g., 5) spatial samples, a nonlinear term, and a bias term. In one case, for each hypothesis, the C and / or the spatial samples and / or a nonlinear term are from the prediction block referred by one block vector information.

[0111] B is a midValue set to (1<< (bitDepth-1) )

[0112] In another embodiment, the blending weightings (denoted as ω0 and ω1) are derived by regression model which minimizes the MSE between the blended template samples and the current template samples.

[0113] In one example of using the combined mode as illustrated in FIG. 7, a blended template sample consists of K0 (e.g., 2) spatial gradients, K1 (e.g., 2) location terms, a nonlinear term, and a bias term. That is, Gx = (2W + NW + SW) – (2E + NE + SE) , Gy = (2N + NW + NE) – (2S + SW + SE) , P= (C2+ (1<< (bitDepth-1) ) ) >>bitDepth,

[0114] X and Y are the vertical and horizontal relative locations,

[0115] B is a midValue set to (1<< (bitDepth-1) )

[0116] In another example of using the combined mode as illustrated in FIG. 7, a blended template sample consists of T (e.g., 5) spatial samples, a nonlinear term, and a bias term. That is, P= (C2+ (1<< (bitDepth-1) ) ) >>bitDepth,

[0117] B is a midValue set to (1<< (bitDepth-1) )

[0118] Increase the variation of IBC-GPM modes

[0119] In another embodiment, the final predictor of IBC-GPM mode can be generated  by combining two different IBC merge predictors. For example, one predictor can be generated according to left neighbor’s BV. The other predictor can be generated according to historical BV. After that, these two predictors are combined to generate IBC-GPM final predictor. In another embodiment, the final predictor of IBC-GPM mode can be generated by combining one IBC AMVP predictor and one intra predictor. In another embodiment, the final predictor of IBC-GPM mode can be generated by combining one IBC AMVP predictor and one intraTMP predictor.

[0120] In another embodiment, TM based reordering can be performed to reorder IBC-GPM partition group. In that, the more promising candidates’ index, for example, the codewords of the index for more promising candidates, can be further reduced to improve the coding efficiency.

[0121] In one embodiment, the final predictor of IBC-GPM mode can be generated by combining one IBC AMVP / Merge predictor and one inter predictor. The inter predictor can be regular merge, MMVD (i.e., Merge with Motion Vector Difference) , TM merge, BM (bilateral matching) merge, CIIP (i.e., Combined Inter Merge / Intra Prediction) , Affine merge / AMVP, SbtMVP or other inter modes.

[0122] In one embodiment, the blending width of the IBC-GPM can be determined by the RD cost and be signaled by bits explicitly. Or the blending width of the IBC-GPM can be determined by the TM / BM cost and derived implicitly at decoder side. The number of blending width candidates can depend on the CU size, the prediction modes of two GPM parts or the blending width of the neighboring GPM CUs. For example, if both GPM parts are IBC or intraTMP mode, the blending width should be small.

[0123] In one embodiment, the blending widths of two IBC-GPM parts can be different  and determined separately. For example, if an IBC-GPM CU is composed of one IBC predictor and one inter predictor, the blending width of IBC / IntraTMP part can be small and the blending width of inter part can be larger and selected from N blending width candidates.

[0124] In one embodiment, a joint IBC and regular merge candidate merge list is constructed which includes original regular merge candidates and IBC candidates. The IBC-GPM predictor is generated by two merge predictors from the joint IBC and regular merge list or one merge predictor from the joint list and the other predictor from intra prediction mode (IPM) candidate merge list or TM merge candidate merge list.

[0125] In one embodiment, the IBC-GPM mode can be viewed as an inter mode and share the same signaling syntax with inter GPM mode. The subblock motion vectors of the IBC-GPM CU will be determined according the non-IBC part. For example, if an IBC-GPM CU is composed of one IBC predictor and one inter predictor, the subblock motion vectors of the entire CU are set same as the inter predictor.

[0126] Improve IBC-LIC mode

[0127] In one embodiment, IBC-LIC mode can be enabled with RRIBC mode. In that, the templates of IBC-LIC shall be derived according to RRIBC’s type. For example, if horizontal flip is enabled, the templates of IBC-LIC shall be the samples on the right side of referenced block and the samples on the top of referenced block. For example, if vertical flip is enabled, the templates of IBC-LIC shall be the samples on the left side of referenced block and the samples on the bottom of referenced block.

[0128] IBC with MHP

[0129] In one embodiment, IBC predictor can be a prediction / hypothesis blending with other predictions. The IBC predictor can be generated by IBC AMVP mode or IBC merge mode. In one embodiment, it is constrained that subblock based IBC mode cannot be an additional prediction / hypothesis blending with other predictions.

[0130] In one embodiment, multiple BVs or motion shifts are considered in IBC prediction mode or IntraTMP prediction mode.

[0131] In one embodiment, multiple predictors are considered in IBC prediction mode or IntraTMP prediction mode.

[0132] In one embodiment, there can be redundancy in the multiple predictors or the multiple BVs, for example, some predictors or BVs can be the same.

[0133] In one embodiment, redundancy check will be performed during multiple predictors generation or multiple BVs generation.

[0134] In one embodiment, predictor in IBC prediction mode or IntraTMP prediction mode is multiplied with other predictors with weightings, where other predictors can be predictors in IBC prediction mode or IntraTMP prediction modes or predictors in other inter-prediction modes.

[0135] In one embodiment, BV in IBC prediction mode or IntraTMP prediction mode is multiplied with other BVs with weightings, where other BVs can be BVs in IBC prediction mode or IntraTMP prediction modes or MVs in other inter-prediction modes.

[0136] In one embodiment, predictor in IBC merge mode is multiplied with predictor in IBC AMVP mode with weighting.

[0137] In one embodiment, predictor in IBC merge mode is multiplied with predictor in  IBC merge mode with weighting.

[0138] In one embodiment, predictor in IBC AMVP mode is multiplied with predictor in IBC merge mode with weighting.

[0139] In one embodiment, predictor in IBC AMVP mode is multiplied with predictor in IBC AMVP mode with weighting.

[0140] In one embodiment, predictor is one of the IBC mode, including but not limited to, IBC merge mode, IBC AMVP mode, IBC GPM mode, IBC-CIIP mode, RRIBC mode, IBC-TM-inter mode, IBC-TM-merge mode, IBC-regular-merge mode, IBC-MBVD-merge mode, IBC-LIC mode, IBC-subblock mode, and the predictor is multiplied with other predictors with weightings, which can be predictors in other IBC mode, including but not limited to, IBC merge mode, IBC AMVP mode, IBC GPM mode, IBC-CIIP mode, RRIBC mode, IBC-TM-inter mode, IBC-TM-merge mode, IBC-regular-merge mode, IBC-MBVD-merge mode, IBC-LIC mode, IBC-subblock mode.

[0141] In one embodiment, predictor is one of the IBC mode, including but not limited to, IBC merge mode, IBC AMVP mode, IBC GPM mode, IBC-CIIP mode, RRIBC mode, IBC-TM-inter mode, IBC-TM-merge mode, IBC-regular-merge mode, IBC-MBVD-merge mode, IBC-LIC mode, IBC-subblock mode, and the predictor is multiplied with other predictors with weightings, which can be predictors in other non-IBC mode, for example, GPM mode, MMVD mode, MHP mode, affine mode, subblock mode, translational inter-prediction mode.

[0142] In one embodiment, when predictor is in reconstruction-reordered mode, the predictor can only be multiplied with other reconstruction-reordered predictors.

[0143] In one embodiment, when predictor is in reconstruction-reordered mode, the predictor cannot be multiplied with other predictors.

[0144] In one embodiment, predictors in IBC mode or IntraTMP mode can only blend with the predictors in IBC mode or IntraTMP mode.

[0145] In one embodiment, predictors can only blend with the predictors in the same prediction modes. For example, inter-predictors blend with inter-predictors, and IBC-predictors or IntraTMP predictors blend with IBC-predictors or IntraTMP predictors.

[0146] In one embodiment, blending weightings will decrease when there are more predictors. For example, 1st predictor will use the largest weighting, 2nd predictor will use the second largest weighting, and so on.

[0147] In one embodiment, blending weightings will increase when there are more predictors. For example, 1st predictor will use the smallest weighting, 2nd predictor will use the second smallest weighting, and so on.

[0148] In one embodiment, blending weightings will be some fixed values.

[0149] In one embodiment, for those predictors to be blended, firstly reorder those predictors based on some metrics, for example, template-matching costs, boundary matching costs, SSE, SATD, SAD, and reordered predictors are blended according to decreasing or increasing weightings.

[0150] IBC with NAMVP

[0151] In one embodiment, non-adjacent spatial candidates, for example, non-adjacent MVP (NAMVP) , can be used in IBC merge. Only if the to-be referenced blocks are in the valid referenced region, they can be referenced. In one embodiment, the positions of non-adjacent candidates of IBC are designed related to the boundary  position of the IBC’s valid referenced region.

[0152] In one embodiment, the similarity check can be applied on NAMVP list derivation to increase the diversity of NAMVPs. The threshold of similarity check on NAMVP list can be different from IBC merge list. For example, a strict threshold (only if the to-be inserted candidate is N pixel far away from any other candidate in the list, it can be inserted to the list. N is an integer larger than zero) will be used during the NAMVP list generation. After that, the candidates in NAMVP list are inserted to IBC merge candidate merge list with loose threshold.

[0153] IBC with diversity reordering

[0154] 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. |D1-D2| < λ, where D1 and D2 are the costs obtained during the first ARMC ordering and λ is the Lagrangian parameter used in the RD criterion at encoder side.

[0155] In one embodiment, if the reordering process is applied on IBC merge candidate merge list, the lambda value can be different from the lambda value used on inter merge candidate merge list. For example, lambda values used on IBC merge list are N times larger than lambda values used on inter merge candidate merge list. For another example, lambda values used on IBC merge list are lambda values used on inter merge candidate merge list adding an offset. For another example, lambda values used on IBC merge list can be derived by a linear function with lambda values used on inter merge candidate merge list. For another embodiment, the lambda values used on IBC merge list can be designed according to current cu size, bits depth or picture resolution.

[0156] IBC with subblock OBMC

[0157] In one embodiment, if IBC subblock mode is applied, the subblock boundary can be refined by OBMC technology. The weighting value or blending lines for IBC subblock mode can be different from inter OBMC. For example, if it is IBC coded block, the blending line numbers are subblock-size dependent.

[0158] In another embodiment, a flag is signaled to indicate the on-off of IBC with subblock OBMC.

[0159] In another embodiment, templates used for subblock OBMC can be left, top, or both left and top templates. After testing three types, the one with smallest per-sample TM cost will be selected to refine the predictor.

[0160] Derivation, selection, and storage of multiple BVs

[0161] In another embodiment, a searching process is used to derive one or more IBC candidates to generate the predictors for the current IBC block. The searching process refers to template matching. During the searching process, it finds multiple (e.g. 2) prediction blocks corresponding to the IBC candidates with smaller TM costs (e.g. the best and second-best TM costs) . In one sub-embodiment, an IBC candidate refers to the block vector information. The block vector information is used to indicate the corresponding prediction block which will be used to generate the predictors for the current block. In another sub-embodiment, generally, more than one IBC candidates are used to generate a fusing predictor (based on each hypothesis of prediction from each IBC candidate) as the final predictors for the  current block. For example, 2 IBC candidates are used to generate the predictors for the current block. In another sub-embodiment, in the following cases, only one IBC candidate is used and / or the final predictors for the current block are only based on the prediction block indicated by the only one IBC candidate. One case is that after checking the TM cost of the searched two blocks, in response of (cost2ndBest >= a threshold*cost1stBest) , the fusion is not applied and only the best prediction block is used. Cost2ndBest and cost1stBest mean the second best TM cost and the best TM cost, respectively. A threshold is pre-defined as 1.5, 2, 2.5, or any pre-defined value larger than 1. In another sub-embodiment, during fusing, the weighting for each hypothesis of prediction depends on the TM costs for the corresponding IBC candidates. A candidate with a larger cost gets a smaller weight value. For an example of using two IBC candidates with the best and second-best TM costs, w_1=cost2ndBest /  (cost1stBest+ cost2ndBest) ; w_2=1-w_1 where w_1 means the weight value for the IBC candidate with the best TM cost and w_2 means the weight value for the IBC candidate with the second best TM cost. Another case is to first calculate the fused predictors (from the IBC candidate with the best and second best TM costs) on the top template (denoted as Tf) and the fused predictors (from the IBC candidate with the best and second best TM costs) on the Left template (denoted as Lf) by using the equal weighting, second calculate the fusing TM cost for the fused predictors on the template by adding the fusing TM costs from the left and top templates, respectively, as the total fusing TM cost on the template where the fusing cost depend on SAD between the reconstructed samples and fusing predicted samples on the left or top template regions as follows.

[0162] costL = SAD between L and Lf

[0163] costT = SAD between T and Tf

[0164] A fusion on the current block is allowed only if the total fusing cost is smaller than the best TM cost (without fusing) . In another sub-embodiment, the searching process have different variations. One variation is to search in a predefined range (shown in FIG. 8 where the pre-defined range can be any subset or extension in the figure) following a pre-defined order. Another variation is two-stage searching process. For example, first in the sparse search, the sub-sampling factor is a larger value (e.g. 3) instead of original value (e.g. 2) to determine the searching points in the predefined range and the top 2N BVs are maintained where N is a pre-define positive integer; second in the refinement search, each window (e.g. 3x3 block) around each of the 2N BVs is checked, and the top N BVs are selected to form the candidate list (for example, the candidate merge list) . In another sub-embodiment, the TM cost is modified as follows. In the first search pass, the best matching block with the smallest TM cost (denoted as T_best) is selected and in the following, for the second search pass, the template golden is modified as T’ = 2*T –T_best where T is the original template golden (reconstructed samples on the template for the current block) . An explicit signalling (e.g. a separate flag) is signaled to indicate whether the second search pass with modified template is used. The purpose of the modified template achieves a better performance of fusion. In another sub-embodiment, a threshold is used to determine one or more IBC candidates according to the TM costs. The threshold can be defined as the minimum TM cost with a left shifting by K where K is 1 or any pre-defined value. The selected IBC candidates will be the candidates satisfying the checking of their TM costs smaller or equal to the threshold. If the number of the selected IBC candidates is predefined as 3, the selected IBC candidates refer to the 3 IBC candidates with smaller TM costs among the satisfied IBC candidates. Then the weight value for each selected IBC  candidate is calculated as follows.  where SAD is the TM cost and n is 3 in this example. In another embodiment, when only one IBC candidate is selected, the predictors from the one IBC candidate are further combined the predictors from one or more traditional intra prediction modes. The traditional intra prediction mode can be any one of DC, planar, horizontal, vertical, diagonal, DIMD, TIMD, or any intra prediction mode defined in the standard which is from 67, 131, or any precision. If the predictors from the traditional intra prediction mode is planar, the fusing expression can be where P_IBC refers to the predictors from IBC and P_intra refers to the predictors from planar. In another embodiment, the proposed mode is indicated with a block-level flag (e.g. CU level flag) to decide whether the proposed mode is used for the current block. The proposed mode may only be applied to any IBC sub-mode. For example, the IBC sub-mode is IBC merge, IBC AMVP, RRIBC, RR-IBC, IBC-MBVD or any IBC sub-mode which has syntax under the IBC flag equal to true. In another embodiment, the proposed mode is inserted into the candidate merge list for IBC. That is, when a candidate index selects a candidate from the candidate merge list for IBC and the selected candidate refers to a proposed mode, the proposed fusion is used. The position to insert the proposed mode can be any pre-defined position in the candidate merge list. For example, the proposed mode is at the first place of the list. When several fusing candidates for the proposed mode are inserted, a full pruning or partial pruning is applied before or after inserting into the list. The pruning process may be used to check the block vector information for the to-be-pruning candidates is similar or the same.

[0165] In another embodiment, the fusing candidates can be from all IBC candidates and / or some from inter candidates and the other from IBC candidates. For the case of fusing IBC prediction with inter prediction, the above-mentioned methods (e.g. template matching) can still be used to measure the cost for an inter candidate.

[0166] In another embodiment, when more than one IBC candidates are used to generate the predictor for the current block, several rules are designed to store the block vector information. The stored block vector information may be referenced by the following process (e.g. deblocking) for the current block and / or the subsequent coding blocks. For an example of the stored block vector information, the more than one block vector information is stored for each grid in the current block. A grid may refer to MxN subblock where M and N may be any predefined positive values such as 1, 2, 4, 8, 16, or the block width or height and / or M and N are the same or different for each other. In one sub-embodiment, only the first block vector information corresponding to the IBC candidate with the smallest cost is stored for all or any subset of the grids. In another sub-embodiment, for the grids near the top template, the block vector information corresponding to the IBC candidate with the smallest cost on the top template is stored; for the grids near the left template, the block vector information corresponding to the IBC candidate with the smallest cost on the left template is stored. In another sub-embodiment, the stored block vector information depends on the weighting for each hypothesis. If a grid has a higher weight for one hypothesis of prediction from IBC candidate A, the block information, for example, block vector information, for the IBC candidate A is stored for this grid. In another sub-embodiment, the stored information is used for deblocking. For example, the boundary strength or any threshold in the deblocking is adjusted to be higher or lower according to the stored information. For another example, the deblocking filtering process are applied on a 4x4 grid for CU boundaries and  transform subblock boundaries and on an 8x8 grid for prediction subblock boundaries. The prediction subblock boundaries include the prediction unit boundaries introduced by IBC fusion, and / or the transform subblock boundaries include the transform unit boundaries introduced by IBC fusion, and transforms due to implicit split of large CUs. For IBC subblocks, similar to the logic in PU in HEVC, the deblocking filter is applied on 8x8 grid with the consideration of the difference between block vectors and / or reference pictures of the neighboring prediction subblock. For another example, deblocking decision is adapted to smaller difference in BV. One case is to enable deblocking of a prediction unit boundary when the difference in at least one block vector component between blocks on respective side of the boundary is equal to or larger than a threshold of 1 sample. Another case is that a threshold of a half luma sample is introduced to also enable removal of blocking artifacts originating from boundaries between inter or IBC / intraTMP prediction units that have a small difference in block / motion vectors.

[0167] In another embodiment, any combination of the ideas in this section can be used for other sections in this invention and / or used for any of inter / intra / intraTMP / IBC modes.

[0168] Multi-BV assignment for IBC GPM

[0169] In VVC, an inter GPM predictor is comprised of two inter regular merge predictors blended along a partition mode. The motion fields of two GPM parts are assigned as the motion fields of the corresponding merge candidates. In this invention, we further define the motion field assignment of IBC GPM which is comprised of multiple IBC predictors (i.e., greater than two IBC predictors) or multiple IBC predictors (i.e., greater than one IBC predictor) and the predictors from inter or intra mode.

[0170] In one embodiment, for an IBC GPM predictor comprised of two IBC candidates, the motion fields of two GPM parts are assigned as the motion fields of the corresponding IBC candidates respectively. The motion field assignment includes the BV, RRIBC mode, IBC-LIC flag, multi-hypothesis information, IMV, for example, motion vector resolution such as integer motion vector, and other motion information assignment.

[0171] In one embodiment, for an IBC GPM predictor comprised of N (where N >= 2) IBC candidates and N-1 partition lines, the motion fields of multiple GPM parts are assigned as the motion fields of the corresponding IBC candidates respectively.

[0172] In one embodiment, for an IBC GPM predictor comprised of a bi-prediciton IBC candidate and a uni-prediction or bi-prediction IBC candidate, the motion fields of two GPM parts are assigned as the motion fields of the corresponding IBC candidates respectively. In the bi-prediction part, two BVs from two predictors are both assigned to each 4x4 block.

[0173] In one embodiment, for an IBC GPM predictor comprised of a multi-hypothesis IBC candidate and a uni-prediction or multi-hypothesis IBC candidate blended along a partition line, the motion fields of two GPM parts are assigned as the motion fields of the corresponding IBC candidates respectively. In the multi-hypothesis part, the first one or two BVs among all the BVs from the predictors are assigned to each 4x4 block. The order of the BVs can be determined by the weight of each predictor used for multi-hypothesis blending or the TM cost.

[0174] In one embodiment, for an IBC GPM predictor comprised of a multi-hypothesis IBC candidate and a predictor from inter / intra mode blended along a partition line, the motion fields of two GPM parts are assigned as the motion fields of the corresponding IBC or inter / intra candidates respectively. In the IBC part, the BVs of the IBC candidate are assigned to each 4x4 block. In the inter part, the reference  indices, inter prediction indicator and / or MVs of the inter candidate are assigned to each 4x4 block. In the intra part, the MV and BV are set as zero and / or the corresponding intra mode is assigned to each 4x4 block.

[0175] The foregoing proposed method can be implemented in encoders and / or decoders. For example, the proposed method can be implemented in an inter prediction module and / or intra block copy prediction module of an encoder, and / or an inter prediction module (and / or intra block copy prediction module) of a decoder.

[0176] FIG. 9 is a block diagram illustrating a video encoder that supports the proposed prediction mode according to an embodiment of the present invention. By way of example, but not limitation, the video encoder 100 may be a VVC encoder. The video encoder 100 may perform intra and inter predictive coding of video blocks within video frames. Intra predictive coding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter predictive coding relies on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence. The proposed prediction mode is a coding tool for blending predictions from multiple candidates to generate a final predictor of a current block. For example, the proposed prediction mode may modify IBC (and / or IntraTMP) by using multiple candidates (which include block vector candidate (s) ) to generate the final predictor of the current block. For another example, the proposed prediction mode may modify inter or intra by using multiple candidates (which include block vector candidate (s) ) to generate the final predictor of the current block.

[0177] As shown in FIG. 9, the video encoder 100 includes an encoding circuit 101 and a video data memory 102. The video data memory 102 is arranged to receive data to be encoded as a current block of pixels of a current picture of a video, wherein the current block may include a luma block. The encoding circuit 101 is arranged to perform encoding of the current block by using the proposed prediction mode. The encoding circuit 101 may include a prediction processing circuit 104, a residual generation circuit 106, a transform circuit (labeled by “T” ) 108, a quantization circuit (labeled by “Q” ) 110, an entropy encoding circuit (e.g., a variable-length code (VLC) encoder) 112, an inverse transform circuit (labeled by “IQ” ) 114, an inverse transform circuit (labeled by “IT” ) 116, a reconstruction circuit 118, one or more in-loop filters 120, and a decoded picture buffer (DPB) 122. For example, the in-loop filter (s) 120 may include a deblocking filter. It should be noted that the encoder architecture shown in FIG. 9 is for illustrative purposes only, and is not meant to be a limitation of the present invention. In practice, any video encoder using / supporting the proposed prediction mode falls within the scope of the present invention.

[0178] The prediction processing circuit 104 may include a partition circuit 124, a motion estimation circuit (labeled by “ME” ) 126, a motion compensation circuit (labeled by “MC” ) 128, an intra prediction circuit (labeled by “IP” ) 130, a BV-based prediction circuit (labeled by “BV-based prediction” ) 132, and a blending circuit (labeled by “Blending” ) 134. The motion estimation circuit 126 and motion compensation circuit 128 may be used to generate an inter predictor according to a regular inter prediction mode, and output the inter predictor (which is not a BV-based predictor) to the blending circuit 134. The intra prediction circuit 130 may be used to generate an intra predictor according to a regular intra prediction mode,  and output the intra predictor (which is not a BV-based predictor) to the blending circuit 134. The BV-based prediction circuit 132 may be used to generate one or more BV-based predictors, and output the BV-based predictor (s) to the blending circuit 134. For example, the BV-based prediction circuit 132 may be an IBC prediction circuit, and a BV-based predictor provided to the blending circuit 134 may be an IBC predictor. For another example, the BV-based prediction circuit 132 may be an IntraTMP prediction circuit, and a BV-based predictor provided to the blending circuit 134 may be an IntraTMP predictor.

[0179] The proposed prediction mode is supported by the prediction processing circuit 104. As the present invention is focused on the proposed prediction mode and a person skilled in the art should readily understand details of other circuit components included in the video encoder 100, further description of principles of other circuit components included in the video encoder 100 is omitted here for brevity.

[0180] The prediction processing circuit 104 is arranged to obtain multiple predictor candidates of the current block when the proposed prediction mode is selected as the target prediction mode, wherein the multiple predictor candidates include at least one BV-based predictor generated from the BV-based prediction circuit 132. After the multiple predictor candidates are obtained, the prediction processing circuit 104 (particularly, blending circuit 134 of prediction processing circuit 104) is arranged to determine prediction of the current block (e.g., a final predictor P_Final) by jointly considering the multiple predictor candidates (which include one or more BV-based predictors) . For example, the blending circuit 134 is arranged to perform a fusion function for blending the multiple predictor candidates  (which include one or more BV-based predictors) to generate the final predictor P_Final of the current block. In some embodiments of the present invention, the BV-based predictors (s) may include IBC predictor (s) . In some embodiments of the present invention, the BV-based predictors (s) may include IntraTMP predictor (s) . In some embodiments of the present invention, the BV-based predictors (s) may include IBC predictor (s) and IntraTMP predictor (s) .

[0181] In some embodiments of the present invention, the proposed prediction mode may be an IBC sub-mode such as an IBC-CIIP mode, an IBC-GPM mode, an IBC-MHP mode, an IBC-subblock mode, or an Inter-IBC mode. In a case where the IBC-CIIP mode is selected as the target prediction mode of the current block, the multiple predictor candidates include a BV-based predictor obtained by the BV-based prediction circuit 132 and an intra predictor obtained by the intra prediction circuit 130, and the blending circuit 134 generates the final predictor P_Final by blending the BV-based predictor and the intra predictor.

[0182] In a case where the IBC-GPM mode is selected as the target prediction mode of the current block, the current block is divided into a plurality of sub-partitions (e.g., two sub-partitions) geometrically. For example, the multiple predictor candidates include a plurality of BV-based predictors (e.g., IBC merge predictors) obtained by the BV-based prediction circuit 132 for different sub-partitions (e.g., two sub-partitions) in the current block, and the blending circuit 134 generates the final predictor P_Final by blending the BV-based predictors.

[0183] For another example, the multiple predictor candidates include an inter predictor that is a motion-compensated predictor output by the motion  compensation circuit 128, and a BV-based predictor (e.g., IBC merge predictor) obtained by the BV-based prediction circuit 132, where the inter predictor and the BV-based predictor are obtained for different sub-partitions (e.g., two sub-partitions) in the current block. The blending circuit 134 generates the final predictor P_Final by blending the BV-based predictor and the inter predictor.

[0184] For yet another example, the multiple predictor candidates include an intra predictor obtained by the intra prediction circuit 130, and a BV-based predictor (e.g., IBC merge predictor) obtained by the BV-based prediction circuit 132, where the intra predictor and the BV-based predictor are obtained for different sub-partitions (e.g., two sub-partitions) in the current block. The blending circuit 134 generates the final predictor P_Final by blending the BV-based predictor and the intra predictor.

[0185] In a case where the IBC-MHP mode is selected as the target prediction mode of the current block, the multiple predictor candidates include a plurality of BV-based predictors (e.g., IBC merge predictors) obtained by the BV-based prediction circuit 132 for the same current block, and the blending circuit 134 generates the final predictor P_Final by blending the BV-based predictors.

[0186] In a case where the IBC-subblock mode is selected as the target prediction mode of the current block, the multiple predictor candidates include a plurality of BV-based predictors (e.g., IBC merge predictors) of a plurality of subblocks in the same current block, respectively, and the blending circuit 134 generates the final predictor P_Final by blending / combining the BV-based predictors of the subblocks.

[0187] In a case where the Inter-IBC mode is selected as the target prediction mode of  the current block, the multiple predictor candidates include a BV-based predictor (e.g., IBC merge predictor) obtained by the BV-based prediction circuit 132 and an inter predictor (e.g., motion-compensated predictor) output by the motion compensation circuit 128, and the blending circuit 134 generates the final predictor P_Final by blending the BV-based predictor and the inter predictor.

[0188] In some embodiments of the present invention, after the prediction processing circuit 104 selects the proposed prediction mode as the target prediction mode of the current block, the prediction processing circuit 104 may output a new flag to the entropy encoding circuit 112, such that the new flag is encoded into the encoded video bitstream output from the video encoder 100. Specifically, determining to enable the target prediction mode or not depends on signalling of the new flag, where the new flag is explicitly signalled to indicate selection of the proposed prediction mode. For example, the new flag for IBC fusion is signalled under IBC or any IBC sub-mode, and the IBC fusion is applied only when the new flag indicates to use the proposed prediction mode.

[0189] In some embodiments of the present invention, selection of the proposed prediction mode may be implicitly derived without any flag signalling or selected from a list. For example, a candidate list of IBC is constructed by the prediction processing circuit 104, wherein the candidate list includes one or more fusion candidates, and each fusion candidate corresponds to a proposed prediction mode. Each fusion candidate may refer to a proposed prediction mode that uses a combination of BVs. The position to insert a fusion candidate can be any pre-defined position in the candidate list of IBC. That is, there are various positions of the fusion candidates in the candidate list of IBC. In addition, when there are several fusing  candidates, a full pruning or partial pruning is applied before or after inserting them into the candidate list of IBC, thereby reducing same or similar fusing candidates in the candidate list. The IBC fusion is applied only when a candidate index selects a fusion candidate that corresponds to a proposed prediction mode. That is, a proposed prediction mode is enabled in response to a fusion candidate that corresponds to the proposed prediction mode is selected from the candidate list of IBC.

[0190] The BV is a displacement vector that is used to signal the relative displacement from the position of the current block in the current frame to that of the prediction block (i.e., a BV-based predictor) found in the same current frame. In some embodiments of the present invention, one or more BV-based predictors provided to the blending circuit 134 may be obtained by the BV-based prediction circuit 132 through template matching. For example, the BV-based prediction circuit 132 may perform template matching to search for BV-based predictor (s) by using search rules used by traditional template matching (e.g., template matching in a regular inter merge mode) . For another example, the BV-based prediction circuit 132 may perform template matching to search for BV-based predictor (s) by using search rules used by alternative template matching (e.g., template matching in an IntraTMP mode) .

[0191] In some embodiments of the present invention, the template matching employed by the BV-based prediction circuit 132 may be multi-stage template matching. For example, the multi-stage template matching may be 2-stage template matching, including a sparse search stage and a refinement search stage following the sparse search stage. In the sparse search stage, the BV-based prediction circuit 132 may use a sub-sampling factor with a larger value (i.e., a larger search step) to  determine the searching points in the predefined range, and the top 2N BVs are maintained, where N is a pre-defined positive integer. For example, the sub-sampling factor may be set by a larger value (e.g., 3) instead of an original value (e.g., 2) . In the refinement search stage, a search window (e.g., 3x3 block) around a searching point pointed to by each of the 2N BVs is checked, and the top N BVs are selected to form the candidate list of IBC.

[0192] The template of the current block that is used in the refinement search stage and the template of the current block that is used in the sparse search stage may be the same or different. To improve the template matching accuracy in the refinement search stage, the template of the current block that is used in the refinement search stage may be derived from modifying the template of the current block that is used in the sparse search stage. The template of the current block that is used in the sparse search stage (i.e., the original template golden in the sparse search stage) is denoted by T. The template of the best matching block with the smallest TM cost that is found in the sparse search stage is denoted by T_best. The template of the current block that is used in the refinement search stage (i.e., the modified template golden in the refinement search stage) is denoted by T’. The original template golden (which include reconstructed samples on the template for the current block) can be modified as T’ = 2*T -T_best. An explicit signalling (e.g., a separate flag) may be used to indicate whether the refinement search stage with modified template is used.

[0193] As mentioned above, one or more BV-based predictors provided to the blending circuit 134 may be obtained by the BV-based prediction circuit 132, where each BV-based predictor is defined by a BV. In some embodiments of the present invention, one or more BVs found during prediction of the current block may be  stored for the following process (e.g., deblocking) of the current block and / or subsequent blocks.

[0194] In some embodiments of the present invention, BV information corresponding to a single BV-based predictor (e.g., a BV-based predictor with the smallest cost) is stored for different subblocks of the current block, where the single BV-based predictor is involved in generation of the final predictor P_Final at the blending circuit 134.

[0195] In some embodiments of the present invention, BV information corresponding to different BV-based predictors is stored for different subblocks of the current block, where the different BV-based predictors are involved in generation of the final predictor P_Final at the blending circuit 134. For example, BV information corresponding to a first BV-based predictor with the smallest cost for a first subblock of the current block is stored for the first subblock, and BV information corresponding to a second BV-based predictor with the smallest cost for a second subblock of the current block is stored for the second subblock.

[0196] In some embodiments of the present invention, the current block is divided into a plurality of sub-partitions (e.g., two sub-partitions) geometrically, and the above-mentioned IBC-GPM mode is selected as the target prediction mode of the current block. Hence, at least one BV-based predictor is obtained for at least one of the sub-partitions, and BV information corresponding to the at least one BV-based predictor may be stored for subblocks in the at least one of the sub-partitions.

[0197] For example, one BV-based predictor (e.g., IBC predictor) is obtained for one  sub-partition, and another BV-based predictor (e.g., IBC predictor) is obtained for another sub-partition. In the multi-hypothesis part, the first one or two BVs among all the BVs from the BV-based predictors (e.g., IBC predictors) are assigned to each 4x4 block. The order of BVs can be determined by the weight of each predictor used for multi-hypothesis blending or the TM cost of each predictor.

[0198] For another example, a BV-based predictor (e.g., IBC predictor) is obtained for one sub-partition, and an inter predictor (which is not a BV-based predictor) is obtained for another sub-partition. In the IBC part, the BV of the BV-based predictor (e.g., IBC predictor) is assigned to each 4x4 block. In the inter part, the reference indices, inter prediction indicator and / or MVs of the inter predictor are assigned to each 4x4 block.

[0199] For yet another example, a BV-based predictor (e.g., IBC predictor) is obtained for one sub-partition, and an intra predictor (which is not a BV-based predictor) is obtained for another sub-partition. In the IBC part, the BV of the BV-based predictor (e.g., IBC predictor) is assigned to each 4x4 block. In the intra part, the MV and BV are set as zero and / or the corresponding intra mode is assigned to each 4x4 block.

[0200] In some embodiments of the present invention, BV information corresponding to BV-based predictor (s) used for multi-hypothesis blending may be stored for a subsequent deblocking filtering process of the current block. For example, the boundary strength or any threshold in the deblocking filtering process performed at the in-loop filter (s) 120 is adjusted to be higher or lower according to the stored BV information.

[0201] FIG. 10 is a block diagram illustrating a video decoder that supports the proposed prediction mode according to an embodiment of the present invention. By way of example, but not limitation, the video decoder 200 may be a VVC decoder. The video decoder 200 includes a decoding circuit 201 and a video data memory 202. The video data memory 202 is arranged to receive data to be decoded as a current block of pixels of a current picture of a video, wherein the current block may include a luma block. The decoding circuit 201 is arranged to perform decoding of the current block by using the proposed prediction mode. The decoding circuit 201 may include an entropy decoding circuit (e.g., a VLC decoder) 204, an inverse quantization circuit (labeled by “IQ” ) 206, an inverse transform circuit (labeled by “IT” ) 208, a reconstruction circuit 210, a prediction processing circuit 212, one or more in-loop filters 214, and a decoded picture buffer (DPB) 216. For example, the in-loop filter (s) 214 may include a deblocking filter. It should be noted that the decoder architecture shown in FIG. 10 is for illustrative purposes only, and is not meant to be a limitation of the present invention. In practice, any video decoder using / supporting the proposed prediction mode falls within the scope of the present invention.

[0202] The prediction processing circuit 212 may include a motion compensation circuit (labeled by “MC” ) 218, an intra prediction circuit (labeled by “IP” ) 220, a BV-based prediction circuit (labeled by “BV-based prediction” ) 222, and a blending circuit (labeled by “Blending” ) 224. The proposed prediction mode is supported by the prediction processing circuit 212. As the present invention is focused on the proposed prediction mode and a person skilled in the art should readily understand details of other circuit components included in the video decoder 200, further description of principles of other circuit components included in the video decoder 200 is omitted here for brevity.

[0203] The motion compensation circuit 218 may be used to generate an inter predictor according to a regular inter prediction mode, and provide the inter predictor (which is not a BV-based predictor) to the blending circuit 224. The intra prediction circuit 220 may be used to generate an intra predictor according to a regular intra prediction mode, and provide the intra predictor (which is not a BV-based predictor) to the blending circuit 224. The BV-based prediction circuit 222 may be used to generate one or more BV-based predictors, and provide BV-based predictor (s) to the blending circuit 224. For example, the BV-based prediction circuit 222 may be an IBC prediction circuit, and a BV-based predictor provided to the blending circuit 224 may be an IBC predictor. For another example, the BV-based prediction circuit 222 may be an IntraTMP prediction circuit, and a BV-based predictor provided to the blending circuit 224 may be an IntraTMP predictor.

[0204] Functions of the decoder-side prediction processing circuit 212 are similar to that of the encoder-side prediction processing circuit 104. The prediction processing circuit 212 is arranged to obtain multiple predictor candidates of the current block when the proposed prediction mode is selected as the target prediction mode, wherein the multiple predictor candidates include at least one BV-based predictor generated from the BV-based prediction circuit 222. After the multiple predictor candidates are obtained, the prediction processing circuit 212 (particularly, blending circuit 224 of prediction processing circuit 212) is arranged to determine prediction of the current block (e.g., a final predictor P_Final) by jointly considering the multiple predictor candidates (which include one or more BV-based predictors) . For example, the blending circuit 224 is arranged to perform a fusion function for blending the multiple predictor candidates (which include one or more BV-based predictors) to  generate the final predictor P_Final of the current block. In some embodiments of the present invention, the BV-based predictors (s) may include IBC predictor (s) . In some embodiments of the present invention, the BV-based predictors (s) may include IntraTMP predictor (s) . In some embodiments of the present invention, the BV-based predictors (s) may include IBC predictor (s) and IntraTMP predictor (s) .

[0205] In some embodiments of the present invention, the proposed prediction mode may be an IBC sub-mode such as an IBC-CIIP mode, an IBC-GPM mode, an IBC-MHP mode, an IBC-subblock mode, or an Inter-IBC mode. In a case where the IBC-CIIP mode is selected as the target prediction mode of the current block, the multiple predictor candidates include a BV-based predictor obtained by the BV-based prediction circuit 222 and an intra predictor obtained by the intra prediction circuit 220, and the blending circuit 224 generates the final predictor P_Final by blending the BV-based predictor and the intra predictor.

[0206] In a case where the IBC-GPM mode is selected as the target prediction mode of the current block, the current block is divided into a plurality of sub-partitions (e.g., two sub-partitions) geometrically. For example, the multiple predictor candidates include a plurality of BV-based predictors (e.g., IBC merge predictors) obtained by the BV-based prediction circuit 222 for different sub-partitions (e.g., two sub-partitions) in the current block, and the blending circuit 224 generates the final predictor P_Final by blending the BV-based predictors.

[0207] For another example, the multiple predictor candidates include an inter predictor that is a motion-compensated predictor output by the motion compensation circuit 218, and a BV-based predictor (e.g., IBC merge predictor)  obtained by the BV-based prediction circuit 222, where the inter predictor and the BV-based predictor are obtained for different sub-partitions (e.g., two sub-partitions) in the current block. The blending circuit 224 generates the final predictor P_Final by blending the BV-based predictor and the inter predictor.

[0208] For yet another example, the multiple predictor candidates include an intra predictor obtained by the intra prediction circuit 220, and a BV-based predictor (e.g., IBC merge predictor) obtained by the BV-based prediction circuit 222, where the intra predictor and the BV-based predictor are obtained for different sub-partitions (e.g., two sub-partitions) in the current block. The blending circuit 224 generates the final predictor P_Final by blending the BV-based predictor and the intra predictor.

[0209] In a case where the IBC-MHP mode is selected as the target prediction mode of the current block, the multiple predictor candidates include a plurality of BV-based predictors (e.g., IBC merge predictors) obtained by the BV-based prediction circuit 222 for the same current block, and the blending circuit 224 generates the final predictor P_Final by blending the BV-based predictors.

[0210] In a case where the IBC-subblock mode is selected as the target prediction mode of the current block, the multiple predictor candidates include a plurality of BV-based predictors (e.g., IBC merge predictors) of a plurality of subblocks in the same current block, respectively, and the blending circuit 224 generates the final predictor P_Final by blending / combining the BV-based predictors of the subblocks.

[0211] In a case where the Inter-IBC mode is selected as the target prediction mode of the current block, the multiple predictor candidates include a BV-based predictor  (e.g., IBC merge predictor) obtained by the BV-based prediction circuit 222 and an inter predictor (motion-compensated predictor) obtained by the motion compensation circuit 218, and the blending circuit 224 generates the final predictor P_Final by blending the BV-based predictor and the inter predictor.

[0212] In some embodiments of the present invention, the entropy decoding circuit 204 parses a new flag from the encoded video bitstream and informs the prediction processing circuit 212 of the new flag, and the prediction processing circuit 212 refers to the new flag to select the proposed prediction mode as the target prediction mode of the current block, where the new flag is explicitly signalled from a video encoder (e.g., video encoder 100 shown in FIG. 9) to indicate selection of the proposed prediction mode. Specifically, determining to enable the target prediction mode or not depends on parsing of the signalled new flag and referring to the signalled new flag to select the target prediction mode. For example, the new flag for IBC fusion is signalled under IBC or any IBC sub-mode, and the IBC fusion is applied only when the new flag indicates to use the proposed prediction mode.

[0213] In some embodiments of the present invention, selection of the proposed prediction mode may be implicitly derived without any flag signalling or selected from a list. For example, a candidate list of IBC is constructed by the prediction processing circuit 212, wherein the candidate list includes one or more fusion candidates, and each fusion candidate corresponds to a proposed prediction mode. Each fusion candidate may refer to a proposed prediction mode that uses a combination of BVs. The position to insert a fusion candidate can be any pre-defined position in the candidate list of IBC. That is, there are various positions of the fusion candidates in the candidate list of IBC. In addition, when there are several fusing  candidates, a full pruning or partial pruning is applied before or after inserting fusing candidates into the candidate list of IBC, thereby reducing same or similar fusing candidates in the candidate list. The IBC fusion is applied only when a candidate index selects a fusion candidate that corresponds to a proposed prediction mode. That is, a proposed prediction mode is enabled in response to a fusion candidate that corresponds to the proposed prediction mode is selected from the candidate list of IBC.

[0214] The BV is a displacement vector that is used to signal the relative displacement from the position of the current block in the current frame to that of the prediction block (i.e., a BV-based predictor) found in the same current frame. In some embodiments of the present invention, one or more BV-based predictors provided to the blending circuit 224 may be obtained by the BV-based prediction circuit 222 through template matching. For example, the BV-based prediction circuit 222 may perform template matching to search for BV-based predictor (s) by using search rules used by traditional template matching (e.g., template matching in a regular inter merge mode) . For another example, the BV-based prediction circuit 222 may perform template matching to search for BV-based predictor (s) by using search rules used by alternative template matching (e.g., template matching in an IntraTMP mode) .

[0215] In some embodiments of the present invention, the template matching employed by the BV-based prediction circuit 222 may be multi-stage template matching. For example, the multi-stage template matching may be 2-stage template matching, including a sparse search stage and a refinement search stage following the sparse search stage. In the sparse search stage, the BV-based prediction circuit 222 may use a sub-sampling factor with a larger value (i.e., a larger search step) to  determine the searching points in the predefined range, and the top 2N BVs are maintained, where N is a pre-defined positive integer. For example, the sub-sampling factor may be set by a larger value (e.g., 3) instead of an original value (e.g., 2) . In the refinement search stage, a search window (e.g., 3x3 block) around a searching point pointed to by each of the 2N BVs is checked, and the top N BVs are selected to form the candidate list of IBC.

[0216] The template of the current block that is used in the refinement search stage and the template of the current block that is used in the sparse search stage may be the same or different. To improve the template matching accuracy in the refinement search stage, the template of the current block that is used in the refinement search stage may be derived from modifying the template of the current block that is used in the sparse search stage. The template of the current block that is used in the sparse search stage (i.e., the original template golden in the sparse search stage) is denoted by T. The template of the best matching block with the smallest TM cost that is found in the sparse search stage is denoted by T_best. The template of the current block that is used in the refinement search stage (i.e., the modified template golden in the refinement search stage) is denoted by T’. The original template golden (which include reconstructed samples on the template for the current block) can be modified as T’ = 2*T -T_best. The entropy decoding circuit 204 may parse an explicit signalling (e.g., a separate flag) from the encoded video bitstream, and inform the prediction processing circuit 212 of the signalled syntax that is used to indicate whether the refinement search stage with modified template is used.

[0217] As mentioned above, one or more BV-based predictors provided to the blending circuit 224 may be obtained by the BV-based prediction circuit 222, where each  BV-based predictor is defined by a BV. In some embodiments, one or more BVs found during prediction of the current block may be stored for the following process (e.g., deblocking) of the current block and / or subsequent blocks.

[0218] In some embodiments of the present invention, BV information corresponding to a single BV-based predictor (e.g., a BV-based predictor with the smallest cost) is stored for different subblocks of the current block, where the single BV-based predictor is involved in generation of the final predictor P_Final at the blending circuit 224.

[0219] In some embodiments of the present invention, BV information corresponding to different BV-based predictors is stored for different subblocks of the current block, where the different BV-based predictors are involved in generation of the final predictor P_Final at the blending circuit 224. For example, BV information corresponding to a first BV-based predictor with the smallest cost for a first subblock of the current block is stored for the first subblock, and BV information corresponding to a second BV-based predictor with the smallest cost for a second subblock of the current block is stored for the second subblock.

[0220] In some embodiments of the present invention, the current block is divided into a plurality of sub-partitions (e.g., two sub-partitions) geometrically, and the above-mentioned IBC-GPM mode is selected as the target prediction mode of the current block. Hence, at least one BV-based predictor is obtained for at least one of the sub-partitions, and BV information corresponding to the at least one BV-based predictor may be stored for subblocks in the at least one of the sub-partitions.

[0221] For example, one BV-based predictor (e.g., IBC predictor) is obtained for one sub-partition, and another BV-based predictor (e.g., IBC predictor) is obtained for another sub-partition. In the multi-hypothesis part, the first one or two BVs among all the BVs from the BV-based predictors (e.g., IBC predictors) are assigned to each 4x4 block. The order of BVs can be determined by the weight of each predictor used for multi-hypothesis blending or the TM cost of each predictor.

[0222] For another example, a BV-based predictor (e.g., IBC predictor) is obtained for one sub-partition, and an inter predictor (which is not a BV-based predictor) is obtained for another sub-partition. In the IBC part, the BV of the BV-based predictor (e.g., IBC predictor) is assigned to each 4x4 block. In the inter part, the reference indices, inter prediction indicator and / or MVs of the inter predictor are assigned to each 4x4 block.

[0223] For yet another example, a BV-based predictor (e.g., IBC predictor) is obtained for one sub-partition, and an intra predictor (which is not a BV-based predictor) is obtained for another sub-partition. In the IBC part, the BV of the BV-based predictor (e.g., IBC predictor) is assigned to each 4x4 block. In the intra part, the MV and BV are set as zero and / or the corresponding intra mode is assigned to each 4x4 block.

[0224] In some embodiments of the present invention, BV information corresponding to BV-based predictor (s) used for multi-hypothesis blending may be stored for a subsequent deblocking filtering process of the current block. For example, the boundary strength or any threshold in the deblocking filtering process performed at the in-loop filter (s) 214 is adjusted to be higher or lower according to the stored BV information.

[0225] FIG. 11 is a flowchart illustrating a video coding method according to an embodiment of the present invention. The video coding method may be employed by the video encoder 100 shown in FIG. 9 for encoding of video data or the video decoder 200 shown in FIG. 10 for decoding of encoded video bitstream. Provided that the result is substantially the same, the steps are not required to be executed in the exact order shown in FIG. 11. At step S1102, data to be encoded or decoded is received as a current block of pixels of a current picture of a video, wherein the current block includes a luma block. At step S1104, encoding or decoding of the current block is performed by using the proposed prediction mode as the target prediction mode of the current block. The step S1104 includes sub-steps S1106 and S1108. At sub-step S1106, multiple predictor candidates of the current block are obtained, wherein the multiple predictor candidates include at least one BV-based predictor. At sub-step S1108, prediction of the current block is determined by jointly considering (e.g., blending) the multiple predictor candidates (which include at least one BV-based predictor) . As a person skilled in the art can readily understand details of the video coding method after reading above paragraphs with reference to the accompanying drawings, further description is omitted here for brevity.

[0226] Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.

Claims

1.A method for video coding, comprising:receiving data to be encoded or decoded as a current block of pixels of a current picture of a video; andencoding or decoding the current block by a target prediction mode, comprising:obtaining multiple predictor candidates of the current block, wherein the multiple predictor candidates comprise at least one block vector (BV) based predictor; anddetermining prediction of the current block by jointly considering the multiple predictor candidates.2.The method of claim 1, wherein the at least one BV-based predictor comprises at least one intra block copy (IBC) predictor or at least one intra template matching prediction (IntraTMP) predictor.3.The method of claim 1, wherein the multiple predictor candidates further comprise at least one intra predictor.4.The method of claim 1, wherein the current block is divided into a plurality of sub-partitions geometrically, and the multiple predictor candidates comprise a plurality of BV-based predictors obtained for different sub-partitions of the current block, respectively.5.The method of claim 1, wherein the current block is divided into a plurality of  sub-partitions geometrically, the multiple predictor candidates further comprise an inter predictor, and the at least one BV-based predictor and the inter predictor are obtained for different sub-partitions of the current block, respectively.6.The method of claim 1, wherein the current block is divided into a plurality of sub-partitions geometrically, the multiple predictor candidates further comprise an intra predictor, and the at least one BV-based predictor and the intra predictor are obtained for different sub-partitions of the current block, respectively.7.The method of claim 1, wherein the multiple predictor candidates comprise a plurality of BV-based predictors of the current block.8.The method of claim 1, wherein the current block comprises a plurality of subblocks, and the multiple predictor candidates comprise a plurality of BV-based predictors of the plurality of subblocks, respectively.9.The method of claim 1, wherein the multiple predictor candidates further comprise at least one inter predictor.10.The method of claim 1, further comprising determining to enable the target prediction mode or not depends on:signalling a flag to indicate selection of the target prediction mode; orparsing a signalled flag and referring to the signalled flag to select the target prediction mode.11.The method of claim 1, wherein encoding or decoding the current block by the  target prediction mode further comprises:constructing a candidate list, wherein the candidate list includes a fusion candidate that corresponds to the target prediction mode; andin response to a candidate index selecting the fusion candidate from the candidate list, enabling the target prediction mode.12.The method of claim 1, wherein the at least one BV-based predictor is obtained through template matching.13.The method of claim 12, wherein the template matching is multi-stage template matching comprising a sparse search stage and a refinement search stage following the sparse search stage.14.The method of claim 13, wherein a template of the current block that is used in the refinement search stage is derived from modifying a template of the current block that is used in the sparse search stage.15.The method of claim 1, wherein encoding or decoding the current block by the target prediction mode further comprises:storing BV information corresponding to a single BV-based predictor for different subblocks of the current block, wherein the single BV-based predictor is included in the multiple predictor candidates.16.The method of claim 1, wherein encoding or decoding the current block by the target prediction mode further comprises:storing BV information corresponding to different BV-based predictors for different subblocks of the current block, wherein the different BV-based predictors are included in the multiple predictor candidates.17.The method of claim 1, wherein the current block is divided into a plurality of sub-partitions geometrically, the at least one BV-based predictor is obtained for at least one of the plurality of sub-partitions, and encoding or decoding the current block by the target prediction mode further comprises:storing BV information corresponding to the at least one BV-based predictor for subblocks of the at least one of the plurality of sub-partitions.18.The method of claim 1, wherein encoding or decoding the current block by the target prediction mode further comprises:storing BV information corresponding to the at least one BV-based predictor for a subsequent deblocking filtering process of the current block.19.A video encoder, comprising:a video data memory, arranged to receive data to be encoded as a current block of pixels of a current picture of a video; andan encoding circuit, arranged to perform encoding of the current block by a target prediction mode, wherein the encoding circuit comprises:a prediction processing circuit, arranged to obtain multiple predictor candidates of the current block, and determine prediction of the current block by jointly considering the multiple predictor candidates, wherein the multiple predictor candidates comprise at least one block vector (BV) based predictor.20.A video decoder, comprising:a video data memory, arranged to receive data to be decoded as a current block of pixels of a current picture of a video; anda decoding circuit, arranged to perform decoding of the current block by a target prediction mode, wherein the decoding circuit comprises:a prediction processing circuit, arranged to obtain multiple predictor candidates of the current block, and determine prediction of the current block by jointly considering the multiple predictor candidates, wherein the multiple predictor candidates comprise at least one block vector (BV) based predictor.