Methods and apparatus of neighbouring intra prediction in overlapped block blending and overlapped block refinement

WO2026201056A1PCT designated stage Publication Date: 2026-10-01MEDIATEK INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/086216
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-03-28
Filing Date
2026-03-26
Publication Date
2026-10-01

Smart Images

  • Figure CN2026086216_01102026_PF_FP_ABST
    Figure CN2026086216_01102026_PF_FP_ABST
Patent Text Reader

Abstract

A method and apparatus of video coding using an OBMC-like process are disclosed. According to this method, whether the neighbouring block is coded in an intra-prediction mode is determined. In response to the neighbouring block being coded in the intra-prediction mode: an intra template predictor is derived based on the intra-prediction mode for a template of the current block; an inter template predictor is derived based on the inter-prediction mode or a BV template predictor based on the BV-prediction mode for the template of the current block; reconstructed neighbouring samples are compared with generated template samples from the intra template predictor and the inter / BV template predictor; blending parameters based on a result of the comparison are determined; and an overlapped block boundary process is applied using the blending parameters to boundary samples located within a specified distance from a boundary between the current block and the neighbouring block.
Need to check novelty before this filing date? Find Prior Art

Description

METHODS AND APPARATUS OF NEIGHBOURING INTRA PREDICTION IN OVERLAPPED BLOCK BLENDING AND OVERLAPPED BLOCK REFINEMENTCROSS REFERENCE TO RELATED APPLICATIONS

[0001] The present invention is a non-Provisional Application of and claims priority to U.S. Provisional Patent Application No. 63 / 779,366, filed on March 28, 2025. The U.S. Provisional Patent Application is hereby incorporated by reference in its entirety.FIELD OF THE INVENTION

[0002] The present invention relates to video coding system using an Overlapped Block Motion Compensation (OBMC) like process. In particular, the present invention discloses a scheme to determine blending parameters for the OBMC-like process based the template cost, where the neighbouring block of the current block is coded in an inter-prediction mode. BACKGROUND AND RELATED ART

[0003] Versatile video coding (VVC) is the latest international video coding standard developed by the Joint Video Experts Team (JVET) of the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Moving Picture Experts Group (MPEG) . The standard has been published as an ISO standard: ISO / IEC 23090-3: 2021, Information technology -Coded representation of immersive media -Part 3: Versatile video coding, published Feb. 2021. VVC is developed based on its predecessor HEVC (High Efficiency Video Coding) by adding more coding tools to improve coding efficiency and also to handle various types of video sources including 3-dimensional (3D) video signals.

[0004] Fig. 1A illustrates an exemplary adaptive Inter / Intra video encoding system incorporating loop processing. For Intra Prediction 110, the prediction data is derived based on previously coded video data in the current picture. For Inter Prediction 112, Motion Estimation (ME) is performed at the encoder side and Motion Compensation (MC) is performed based on the result of ME to provide prediction data derived from other picture (s) and motion data. Switch 114 selects Intra Prediction 110 or Inter Prediction 112 and the selected prediction data is supplied to Adder 116 to form prediction errors, also called residues. The prediction error is then processed by Transform (T) 118 followed by Quantization (Q) 120. The transformed and quantized residues are then coded by Entropy Encoder 122 to be included in a video bitstream corresponding to the compressed video data. The bitstream associated with the transform coefficients is then packed with side information such as motion and coding modes associated with Intra prediction and Inter prediction, and other information such as parameters associated with loop filters applied to underlying image area. The side information associated with Intra Prediction 110, Inter prediction 112 and in-loop filter 130, is provided to Entropy Encoder 122 as shown in Fig. 1A. When an Inter-prediction mode is used, a reference picture or pictures have to be reconstructed at the encoder end as well. Consequently, the transformed and quantized residues are processed by Inverse Quantization (IQ) 124 and Inverse Transformation (IT) 126 to recover the residues. The residues are then added back to prediction data 136 at Reconstruction (REC) 128 to reconstruct video data. The reconstructed video data may be stored in Reference Picture Buffer 134 and used for prediction of other frames.

[0005] As shown in Fig. 1A, incoming video data undergoes a series of processing in the encoding system. The reconstructed video data from REC 128 may be subject to various impairments due to a series of processing. Accordingly, in-loop filter 130 is often applied to the reconstructed video data before the reconstructed video data are stored in the Reference Picture Buffer 134 in order to improve video quality. For example, deblocking filter (DF) , Sample Adaptive Offset (SAO) and Adaptive Loop Filter (ALF) may be used. The loop filter information may need to be incorporated in the bitstream so that a decoder can properly recover the required information. Therefore, loop filter information is also provided to Entropy Encoder 122 for incorporation into the bitstream. In Fig. 1A, Loop filter 130 is applied to the reconstructed video before the reconstructed samples are stored in the reference picture buffer 134. The system in Fig. 1A is intended to illustrate an exemplary structure of a typical video encoder. It may correspond to the High Efficiency Video Coding (HEVC) system, VP8, VP9, H.264 or VVC.

[0006] The decoder, as shown in Fig. 1B, can use similar or portion of the same functional blocks as the encoder except for Transform 118 and Quantization 120 since the decoder only needs Inverse Quantization 124 and Inverse Transform 126. Instead of Entropy Encoder 122, the decoder uses an Entropy Decoder 140 to decode the video bitstream into quantized transform coefficients and needed coding information (e.g. ILPF information, Intra prediction information and Inter prediction information) . The Intra prediction 150 at the decoder side does not need to perform the mode search. Instead, the decoder only needs to generate Intra prediction according to Intra prediction information received from the Entropy Decoder 140. Furthermore, for Inter prediction, the decoder only needs to perform motion compensation (MC 152) according to Inter prediction information received from the Entropy Decoder 140 without the need for motion estimation.

[0007] Overlapped Block Motion Compensation (OBMC)

[0008] Overlapped Block Motion Compensation (OBMC) is to find a Linear Minimum Mean Squared Error (LMMSE) estimate of a pixel intensity value based on motion-compensated signals derived from its nearby block motion vectors (MVs) . From estimation-theoretic perspective, these MVs are regarded as different plausible hypotheses for its true motion, and to maximize coding efficiency, their weights should minimize the mean squared prediction error subject to the unit-gain constraint.

[0009] When High Efficient Video Coding (HEVC) was developed, several proposals were made using OBMC to provide coding gain. Some of them are described as follows.

[0010] In JCTVC-C251 (Peisong Chen, et. al., “Overlapped block motion compensation in TMuC” , Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11, 3rd Meeting: Guangzhou, CN, 7-15 October, 2010, Document: JCTVC-C251) , OBMC was applied to geometry partition. In geometry partition, it is very likely that a transform block contains pixels belonging to different partitions. In geometry partition, since two different motion vectors are used for motion compensation, the pixels at the partition boundary may have large discontinuities that can produce visual artefacts similar to blockiness. This in turn decreases the transform efficiency. Let the two regions created by a geometry partition be denoted by region 1 and region 2. A pixel from region 1 (2) is defined to be a boundary pixel if any of its four connected neighbours (left, top, right, and bottom) belongs to region 2 (1) . Fig. 2 shows an example where grey-dotted pixels belong to the boundary of region 1 (grey region) and white-dotted pixels belong to the boundary of region 2 (white region) . If a pixel is a boundary pixel, the motion compensation is performed using a weighted sum of the motion predictions from the two motion vectors. The weights are 3 / 4 for the prediction using the motion vector of the region containing the boundary pixel and 1 / 4 for the prediction using the motion vector of the other region. The overlapping boundaries improve the visual quality of the reconstructed video while also providing BD-rate gain.

[0011] In JCTVC-F299 (Liwei Guo, et. al., “CE2: Overlapped Block Motion Compensation for 2NxN and Nx2N Motion Partitions” , Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11, 6th Meeting: Torino, 14-22 July, 2011, Document: JCTVC-F299) , OBMC was applied to symmetrical motion partitions. If a coding unit (CU) is partitioned into 2 2NxN or Nx2N prediction units (PUs) , OBMC is applied to the horizontal boundary of the two 2NxN prediction blocks, and the vertical boundary of the two Nx2N prediction blocks. Since those partitions may have different motion vectors, the pixels at partition boundaries may have large discontinuities, which may generate visual artefacts and also reduce the transform / coding efficiency. In JCTVC-F299, OBMC is introduced to smooth the boundaries of motion partition.

[0012] Figs. 3A-B illustrate an example of OBMC for 2NxN (Fig. 3A) and Nx2N blocks (Fig. 3B) . The grey pixels are pixels belonging to Partition 0 and white pixels are pixels belonging to Partition 1. The overlapped region in the luma component is defined as 2 rows (columns) of pixels on each side of the horizontal (vertical) boundary. For pixels which are 1 row (column) apart from the partition boundary, i.e., pixels labelled as A in Figs. 3A-B, OBMC weighting factors are (3 / 4, 1 / 4) . For pixels which are 2 rows (columns) apart from the partition boundary, i.e., pixels labelled as B in Figs. 3A-B, OBMC weighting factors are (7 / 8, 1 / 8) . For chroma components, the overlapped region is defined as 1 row (column) of pixels on each side of the horizontal (vertical) boundary, and the weighting factors are (3 / 4, 1 / 4) .

[0013] Currently, the OBMC is performed after normal MC, and BIO is also applied in these two MC processes, separately. That is, the MC results for the overlapped region between two CUs or PUs is generated by another process not in the normal MC process. BIO (Bi-Directional Optical Flow) is then applied to refine these two MC results. This can help to skip the redundant OBMC and BIO processes, when two neighbouring MVs are the same. However, the required bandwidth and MC operations for the overlapped region is increased compared to integrating the OBMC process into the normal MC process. For example, the current PU size is 16x8, the overlapped region is 16x2, and the interpolation filter in MC is 8-tap. If the OBMC is performed after normal MC, then we need (16+7) x (8+7) + (16+7) x (2+7) = 552 reference pixels per reference list for the current PU and the related OBMC. If the OBMC operations are combined with normal MC into one stage, then only (16+7) x (8+2+7) = 391 reference pixels per reference list for the current PU and the related OBMC. Therefore, in the following, in order to reduce the computation complexity or memory bandwidth of BIO, several methods are proposed, when BIO and OBMC are enabled simultaneously.

[0014] In the JEM (Joint Exploration Model) , the OBMC is also applied. In the JEM, unlike in H. 263, OBMC can be switched on and off using syntax at the CU level. When OBMC is used in the JEM, the OBMC is performed for all motion compensation (MC) block boundaries except for the right and bottom boundaries of a CU. Moreover, it is applied to both the luma and chroma components. In the JEM, a MC block corresponds to a coding block. When a CU is coded with sub-CU mode (includes sub-CU merge, affine and FRUC mode) , each sub-block of the CU is a MC block. To process CU boundaries in a uniform fashion, OBMC is performed at sub-block level for all MC block boundaries, where sub-block size is set equal to 4×4, as illustrated in Figs. 4A-B.

[0015] When OBMC is applied to the current sub-block, besides current motion vectors, motion vectors of four connected neighbouring sub-blocks, if available and are not identical to the current motion vector, are also used to derive the prediction block for the current sub-block. These multiple prediction blocks based on multiple motion vectors are combined to generate the final prediction signal of the current sub-block. Prediction block based on motion vectors of a neighbouring sub-block is denoted as PNn, with n indicating an index for the neighbouring above, below, left and right sub-blocks and prediction block based on motion vectors of the current sub-block is denoted as PC. Fig. 4A illustrates an example of OBMC for sub-blocks of the current CU 410 using a neighbouring above sub-block (i.e., PN1) , left neighbouring sub-block (i.e., PN2) , left and above sub-blocks (i.e., PN3) . Fig. 4B illustrates an example of OBMC for the ATMVP mode, where block PN of the current CU 420 uses MVs from four neighbouring sub-blocks for OBMC. When PN is based on the motion information of a neighbouring sub-block that contains the same motion information as the current sub-block, the OBMC is not performed from PN. Otherwise, every sample of PN is added to the same sample in PC, i.e., four rows / columns of PN are added to PC. The weighting factors {1 / 4, 1 / 8, 1 / 16, 1 / 32} are used for PN and the weighting factors {3 / 4, 7 / 8, 15 / 16, 31 / 32} are used for PC. The exception are small MC blocks (i.e., when height or width of the coding block is equal to 4 or a CU is coded with sub-CU mode) , for which only two rows / columns of PN are added to PC. In this case, weighting factors {1 / 4, 1 / 8} are used for PN and weighting factors {3 / 4, 7 / 8} are used for PC. For PN generated based on motion vectors of vertically (horizontally) neighbouring sub-block, samples in the same row (column) of PN are added to PC with a same weighting factor.

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

[0017] In JEM (Joint Exploration Model for VVC development) , the OBMC is applied. For example, as shown in Fig. 5, for a current block 510, if the above block and the left block are coded in an inter mode, it takes the MV of the above block to generate an OBMC block A and takes the MV of the left block to generate an OBMC block L. The predictors of OBMC block A and OBMC block L are blended with the current predictors. To reduce the memory bandwidth of OBMC, it is proposed to do the above 4-row MC and left 4-column MC with the neighbouring blocks. For example, when doing the above block MC, 4 additional rows are fetched to generate a block of (above block + OBMC block A) . The predictors of OBMC block A are stored in a buffer for coding the current block. When doing the left block MC, 4 additional columns are fetched to generate a block of (left block + OBMC block L) . The predictors of OBMC block L are stored in a buffer for coding the current block. Therefore, when doing the MC of the current block, four additional rows and four additional columns of reference pixels are fetched to generate the predictors of the current block, the OBMC block B, and the OBMC block R as shown in Fig. 6A (may also generate the OBMC block BR as shown in Fig. 6B) . The OBMC block B and the OBMC block R are stored in buffers for the OBMC process of the bottom neighbouring blocks and the right neighbouring blocks.

[0018] For an M x N block, if the MV is not integer and an 8-tap interpolation filter is applied, a reference block with size of (M+7) x (N+7) is used for motion compensation. However, if the BIO and OBMC is applied, additional reference pixels are required, which increases the worst case memory bandwidth.

[0019] There are two different schemes to implement OBMC.

[0020] In the first scheme, OBMC blocks are pre-generated when performing motion compensation for each block. These OBMC blocks will be stored in a local buffer for neighbouring blocks. In the second scheme, the OBMC blocks are generated before the blending process of each block when performing OBMC.

[0021] In both scheme, several methods are proposed to reduce the computation complexity, especially for the interpolation filtering, and additional bandwidth requirement of OBMC.

[0022] Template Matching Based OBMC

[0023] A template matching-based OBMC scheme has been proposed (JVET-Z0061) recently. As shown in Fig. 7, for each top block with a size of 4×4 at the top CU boundary, the above template size equals to 4×1. In Fig. 7, box 710 corresponds to a CU. If N adjacent blocks have the same motion information, then the above template size is enlarged to 4N×1 since the MC operation can be processed at one time, which is in the same manner in ECM-OBMC. For each left block with a size of 4×4 at the left CU boundary, the left template size equals to 1×4 or 1×4N.

[0024] For each 4×4 top block (or N 4×4 blocks group) , the prediction value of boundary samples is derived according to the following steps: – Take block A as the current block and its above neighbouring block AboveNeighbour_Afor example. The operation for left blocks is conducted in the same manner. – First, three template matching costs (Cost1, Cost2, Cost3) are measured by SAD between the reconstructed samples of a template and its corresponding reference samples derived by MC process according to the following three types of motion information: Cost1 is calculated according to A’s motion information. Cost2 is calculated according to AboveNeighbour_A’s motion information. Cost3 is calculated according to weighted prediction of A’s and AboveNeighbour_A’s motion information with weighting factors as 3 / 4 and 1 / 4 respectively. – Second, choose one out of three approaches to calculate the final prediction results of boundary samples by comparing Cost1, Cost2 and Cost 3.

[0025] The original MC result using current block’s motion information is denoted as Pixel1, and the MC result using neighbouring block’s motion information is denoted as Pixel2. The final prediction result is denoted as NewPixel. - If Cost1 is minimum, then NewPixel (i, j) = Pixel1 (i, j) . - If (Cost2 + (Cost2 >> 2) + (Cost2 >> 3) ) <= Cost1, then blending mode 1 is used. For luma blocks, the number of blending pixel rows is 4. - NewPixel (i, 0) = (26×Pixel1 (i, 0) +6×Pixel2 (i, 0) +16) >>5 - NewPixel (i, 1) = (7×Pixel1 (i, 1) +Pixel2 (i, 1) +4) >>3 - NewPixel (i, 2) = (15×Pixel1 (i, 2) +Pixel2 (i, 2) +8) >>4 - NewPixel (i, 3) = (31×Pixel1 (i, 3) +Pixel2 (i, 3) +16) >>5 For chroma blocks, the number of blending pixel rows is 1. - NewPixel (i, 0) = (26×Pixel1 (i, 0) +6×Pixel2 (i, 0) +16) >>5 - If Cost1 <= Cost2, then blending mode 2 is used. For luma blocks, the number of blending pixel rows is 2. - NewPixel (i, 0) = (15×Pixel1 (i, 0) +Pixel2 (i, 0) +8) >>4 - NewPixel (i, 1) = (31×Pixel1 (i, 1) +Pixel2 (i, 1) +16) >>5 For chroma blocks, the number of blending pixel rows / columns is 1. - NewPixel (i, 0) = (15×Pixel1 (i, 0) +Pixel2 (i, 0) +8) >>4 - Otherwise, blending mode 3 is used. For luma blocks, the number of blending pixel rows is 4. - NewPixel (i, 1) = (7×Pixel1 (i, 1) +Pixel2 (i, 1) +4) >>3 - NewPixel (i, 2) = (15×Pixel1 (i, 2) +Pixel2 (i, 2) +8) >>4 - NewPixel (i, 3) = (31×Pixel1 (i, 3) +Pixel2 (i, 3) +16) >>5 For chroma blocks, the number of blending pixel rows is 1. - NewPixel (i, 0) = (7×Pixel1 (i, 0) +Pixel2 (i, 0) +4) >>3.

[0026] JVET-AC0164 Non-EE2: Improvements on Local Illumination Compensation in ECM7.0

[0027] In ECM-7.0, local illumination compensation (LIC) is an inter coding technique that aims at addressing the illumination variations between one block and its prediction block. The LIC is based on a linear model where a scale α and an offset β are derived from the template samples neighbouring to the current block and their corresponding prediction samples. The derived LIC parameters are then applied to adjust the prediction samples of the block as P′[x, y] =α·P [x, y] +β

[0028] Currently, the LIC is only applicable to uni-predictive inter CUs which contains no less than 32 luma samples.

[0029] Additionally, overlapped block motion compensation (OBMC) is another inter tool in ECM7.0, which alleviates the discontinuities among the prediction samples of inter blocks by adjusting the boundary prediction samples of one inter block / sub-block using its neighbouring block’s MV. According to the existing ECM design, when the LIC is applied to one inter block, the OBMC is always disabled. Additionally, when a neighbouring block of the current CU applies the LIC, only its MVs are used to produce the corresponding prediction samples used for the OBMC process of the current CU.

[0030] Bi-Predictive LIC

[0031] It is proposed to extend the existing LIC design to bi-predicted CUs. Specifically, when applying the proposed method to one bi-prediction block, two different linear models are derived to compensate the illumination changes that exist between the current block and its two prediction blocks. Then, the final bi-prediction of the current block is calculated as the combination of two uni-prediction blocks after the LIC adjustment, i.e., P′[x, y] = (1-ω) ·p′0 [x, y] +ω·p′1 [x, y] , and p′0 [x, y] =α0·P0 [x, y] +β0, p′1 [x, y] =α1·P1 [x, y] +β1, where α0 and β0, and α1 and β1 indicate the scales and the offsets in L0 and L1, respectively; ωindicates the weight (as indicated by the CU-level BCW index) that is applied when combining the two uni-prediction blocks.

[0032] Same to the current LIC design, one control flag is signalled for AMVP bi-predicted CUs to indicate the enabling / disabling of the LIC while the flag is inherited from one neighbouring block for merge inter CUs (including AMVP-Merge mode) . Additionally, the LIC is disabled when decoder-side motion vector refinement (DMVR) (including multi-pass DMVR, adaptive DMVR and affine DMVR) and bi-directional optical flow (BDOF) is applied.

[0033] To reuse the linear model derivation of the existing LIC, one iterative approach is applied to alternately derive the L0 and L1 linear models. Specifically, given the two MVs of the current block, it assumes T0 and T1 are the two predictions of the current block’s template T. The method firstly derives the L0 linear model (α0 and β0) that result in the minimum difference between T0 and T; then, the L1 linear model (α1 and β1) can be calculated that minimizes the difference between T1 and the updated template. Finally, the L0 linear model is refined again in the same way.

[0034] OBMC with LIC

[0035] The following two changes are applied to better handle the interaction between the LIC and the OBMC: 1) It is proposed to enable the OBMC to the inter blocks where the LIC is applied. Additionally, to achieve a better complexity / performance trade-off, the OBMC is only applied for refining the prediction samples on the top and left boundaries of one LIC CU while the OBMC on the internal sub-block boundaries are always disabled. 2) Besides the MVs, it is proposed to also take the LIC parameters of one neighbouring block (when it is coded by the LIC) into consideration when generating its corresponding prediction samples for the OBMC of the current CU.

[0036] JVET-AJ0161 EE2-3.3: OBMC Extension with Intra Prediction

[0037] In OBMC of ECM, top and left boundary pixels of the current block are only blended with inter prediction block generated using motion information of neighbouring block. However, top and left boundary pixels adjacent to intra block remain un-refined due to the absence of motion information of neighbouring intra block. Consequently, discontinuities at these boundary pixels may still be present, which can result in large residual signals at the boundary. To address this issue, another OBMC extension was proposed in JVET-AI0154. In the proposed OBMC extension, in addition to the existing OBMC process, the top and left boundary pixels adjacent to intra block are blended with intra prediction subblock generated using the intra prediction mode derived by applying DIMD (Decoder-side Intra Mode Derivation) on the neighbouring reconstructed samples. An example of the OBMC extension with intra prediction is illustrated in Fig. 8 to show how boundary pixels adjacent to intra blocks are processed.

[0038] Furthermore, the blending of top and left boundary pixels adjacent to intra blocks is performed only when the intra prediction mode derived from DIMD falls within the range defined according to the availability of neighbouring reconstructed samples. Specifically, the blending is performed only when the mode is in [34, 66] and [2, 34] for the top and left boundary pixels, respectively. This condition limits the usage of padded reference samples for intra prediction.

[0039] OBMC extension with intra prediction

[0040] In test 3.3a, OBMC is extended to perform the refinement of the top and left boundary pixels adjacent to the intra block. These pixels are blended using an intra prediction block generated with the intra prediction mode derived by applying DIMD on the neighbouring reconstructed samples.

[0041] OBMC extension with intra prediction + DIMD with 2x2 edge operator

[0042] The 3x3 edge operator is modified to the 2x2 edge operator proposed in JVET-AI0140 to derive the intra prediction mode in DIMD. The horizontal and vertical filters of the 2x2 edge operator are defined as follows:

[0043] OBMC extension with intra prediction + using intra prediction mode of neighbouring block

[0044] Instead of deriving intra prediction mode with DIMD as in test 3.3a, intra prediction mode of the neighbouring block is used to generate the intra prediction block.

[0045] OBMC extension with intra prediction + more neighbouring blocks are checked for available motion information to generate inter subblock

[0046] The search positions for available motion information are expanded as follows: - For subblocks on the top boundary: In addition to the above block, the blocks to its left and right are also checked. - For subblocks on the left boundary: In addition to the left block, the blocks above and below are also checked.

[0047] JVET-AJ0113 Non-EE2: Intra OBMC

[0048] In order to addresses the discontinuity between two non-inter coded blocks, the intra OBMC scheme is proposed in JVET-AJ0113.

[0049] The intra OBMC is applied to top and left boundaries of the current block as follows: - For luma component: · Both the current block and the neighbouring block are coded by BV modes; · The current block is coded by a BV mode and the neighbouring block is coded by a non-BV intra mode; - For chroma components: · The current block is coded by a CCP mode and the neighbouring block is coded by a non-CCP and non-BV mode.

[0050] The BV mode includes IBC mode and intra TMP mode for luma, and DBV mode for chroma.

[0051] For 4: 2: 0 colour format, the intra OBMC is performed on 4x4 sub-block level for luma and 2x2 sub-block level for chroma. If intra OBMC is applied, each sub-block on the top and left boundaries within the current block is blended with a predictor generated by the information of the neighbouring block. If the neighbouring block is coded by a BV mode, the BV information (including BV, fusion parameters, LIC parameters etc. ) is used to generate the predictor. If the neighbouring block is coded by a non-BV intra mode, an intra prediction mode derived by applying DIMD method on the adjacent reconstructed samples is used to generate the predictor.

[0052] The blending weights for the proposed intra OBMC are identical to those used in inter OBMC when template matching-based OBMC is not applied.

[0053] The proposed intra OBMC is only applied to camera-captured sequences.

[0054] JVET-AJ0238 AHG12: OBMC Modifications

[0055] Two modifications related to OBMC operation orders are disclosed in JVET-AJ0238.

[0056] The first modification is about GPM and OBMC. In the current ECM, when the two GPM partitions are coded with non-affine inter, the GPM blending is carried out first, and then OBMC is applied on top of blended GPM samples. It is proposed to apply OBMC separately on top of each GPM partition, and then apply blending on top of OBMC modified samples of the two partitions. Furthermore, if the corresponding partition contains subblock motion, OBMC is applied on those subblock boundaries as well.

[0057] The second modification is about the order of applying OBMC on block and sub-block boundaries. In the current ECM, OBMC is first carried out on block (CU) boundaries, and is then carried out on subblock boundaries. It is proposed to swap the order to first apply OBMC on subblock boundaries (if they are present within the CU) , and then apply OBMC on CU boundaries.

[0058] In the present invention, a scheme to determine blending parameters of an OBMC-like process based the template cost for a neighbouring block of the current block coded in an inter-prediction mode is disclosed. BRIEF SUMMARY OF THE INVENTION

[0059] A method and apparatus of video coding using an OBMC-like process are disclosed. According to this method, input data comprising a current block and a neighbouring block of the current block is received, wherein the current block is coded in an inter-prediction mode or BV-prediction mode. Whether the neighbouring block is coded in an intra-prediction mode is determined. In response to the neighbouring block being coded in the intra-prediction mode: an intra template predictor is derived based on the intra-prediction mode for a template of the current block; an inter template predictor is derived based on the inter-prediction mode for the template of the current block or a BV template predictor is derived based on the BV-prediction mode for the template of the current block; reconstructed neighbouring samples are compared with generated template samples from the intra template predictor and either the inter template predictor or BV template predictor; blending parameters based on a result of the comparison are determined; and an overlapped block boundary process is applied using the blending parameters to boundary samples located within a specified distance from a boundary between the current block and the neighbouring block.

[0060] In one embodiment, the blending parameters comprise a number of blending lines and a set of blending weights.

[0061] In one embodiment, the method further comprises generating an overlapped intra predictor by blending an intra predictor derived based on the intra-prediction mode and either a current inter predictor or a current BV predictor, wherein specific reconstruction samples used to generate the overlapped intra predictor and the intra template predictor are located in a reconstruction sample line adjacent to, but not immediately adjacent to, the current block.

[0062] In one embodiment, a first set of decision rules of selecting the blending parameters is utilized when the neighbouring block is coded in the intra-prediction mode, and a second set of decision rules for selecting the blending parameters is utilized when the neighbouring block is coded in a mode other than the intra-prediction mode; wherein the first set of decision rules is different from the second set of decision rules.

[0063] In one embodiment, a set of decision rules of selecting the blending parameters is shared by a neighbouring intra-predicted block and a neighbouring inter-predicted or BV (block vector) predicted block.

[0064] In one embodiment, wherein, when the neighbouring block of the current block is coded in an intra-prediction mode, the overlapped block boundary process is performed using fewer than four blending lines or using smaller weighting strength.

[0065] In one embodiment, the intra-prediction mode of the neighbouring block is a Decoder-side Intra Mode Derivation (DIMD) mode, wherein an intra-prediction angle derived using the DIMD mode is constrained to be within a specific range of angular values.BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Fig. 1A illustrates an exemplary adaptive Inter / Intra video encoding system incorporating loop processing.

[0067] Fig. 1B illustrates a corresponding decoder for the encoder in Fig. 1A.

[0068] Fig. 2 illustrates an example of overlapped motion compensation for geometry partitions.

[0069] Figs. 3A-B illustrate an example of OBMC for 2NxN (Fig. 3A) and Nx2N blocks (Fig. 3B) .

[0070] Fig. 4A illustrates an example of the sub-blocks that OBMC is applied, where the example includes subblocks at a CU / PU boundary.

[0071] Fig. 4B illustrates an example of the sub-blocks that OBMC is applied, where the example includes subblocks coded in the AMVP mode.

[0072] Fig. 5 illustrates an example of the OBMC processing using neighbouring blocks from above and left for the current block.

[0073] Fig. 6A illustrates an example of the OBMC processing for the right and bottom part of the current block using neighbouring blocks from right and bottom.

[0074] Fig. 6B illustrates an example of the OBMC processing for the right and bottom part of the current block using neighbouring blocks from right, bottom and bottom-right.

[0075] Fig. 7 illustrates an example of Template Matching based OBMC where, for each top block with a size of 4×4 at the top CU boundary, the above template size equals to 4×1.

[0076] Fig. 8 illustrates an example of proposed OBMC extension with intra prediction according to JVET-AI0154.

[0077] Fig. 9 illustrates an example of constraint on the range of intra prediction modes for using OBMC extension with intra prediction according to JVET-AI0154.

[0078] Fig. 10 illustrates an example of TM-based OBMC-like process for neighbouring intra predicted blocks.

[0079] Fig. 11 illustrates an example of intra prediction angle of a neighbouring intra coded block and DIMD derived intra angle for generated overlapped intra predictor.

[0080] Fig. 12 illustrates the pre-defined intra angle range for CU boundary.

[0081] Fig. 13 illustrates an example of neighbouring predictor setting during predictor generation.

[0082] Fig. 14 illustrates an example of boundary matching based overlapped block refinement.

[0083] Fig. 15 illustrates a flowchart of an exemplary video coding system, that incorporates a scheme to determine blending parameters of an OBMC-like process based the template cost for a neighbouring block of the current block coded in an inter-prediction mode according to an embodiment of the present invention.DETAILED DESCRIPTION OF THE INVENTION

[0084] It will be readily understood that the components of the present invention, as generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following more detailed description of the embodiments of the systems and methods of the present invention, as represented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. References throughout this specification to “one embodiment, ” “an embodiment, ” or similar language mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present invention. Thus, appearances of the phrases “in one embodiment” or “in an embodiment” in various places throughout this specification are not necessarily all referring to the same embodiment.

[0085] Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. One skilled in the relevant art will recognize, however, that the invention can be practiced without one or more of the specific details, or with other methods, components, etc. In other examples, well-known structures, or operations are not shown or described in detail to avoid obscuring aspects of the invention. The illustrated embodiments of the invention will be best understood by reference to the drawings, wherein like parts are designated by like numerals throughout. The following description is intended only by way of example, and simply illustrates certain selected embodiments of apparatus and methods that are consistent with the invention as claimed herein.

[0086] Neighbouring Intra Prediction in Overlapped Block Motion Compensation and Overlapped Block Refinement

[0087] In ECM OBMC, when a neighbouring block is intra predicted, DIMD-like method is first performed to analyse neighbouring reconstruction samples to derive an intra prediction angle for the neighbouring block. Then an overlapped intra predictor is generated using derived intra prediction angle and then blend with current inter predictor. Since there is no available motion for neighbouring intra predicted block, a fixed rule of OBMC blending lines and blending weightings is applied when the neighbouring block is intra predicted.

[0088] Method 1: Template matching based OBMC for neighbouring intra predicted blocks

[0089] In ECM OBMC, template matching based OBMC is applied to adaptively change OBMC blending lines and blending weightings for inter-prediction coded neighbouring block. However, when the neighbouring block is intra predicted, ECM OBMC only uses a fixed number of OBMC blending lines and blending weightings, which could be too strong and may not be suitable for different neighbouring intra overlapped predictors.

[0090] In order to overcome the issue of fixed blending parameters as specified in the ECM, an adaptive OBMC-like process is disclosed in the present invention. In one embodiment, when a neighbouring block is intra predicted, template matching based OBMC can be applied by comparing neighbouring reconstruction samples with the generated template predictor from inter prediction and intra prediction, as shown in Fig. 10. In Fig. 10, the current block 1010 is in an inter prediction mode with a motion vector, CurrMV pointing to a reference block 1012. The neighbouring block 1020 is in an intra prediction mode and block 1022 corresponds to a neighbouring overlapped predictor from intra prediction. Area 1030 corresponds to the adjacent reconstruction sample region of current block 1010. Area 1024 corresponds to a template predictor from intra prediction. Area 1014 corresponds to a template predictor from inter prediction. For example, the reconstruction samples used to generate an overlapped intra predictor and template predictor are from the non-first reconstruction sample line adjacent to the current block. After generating the overlapped intra predictor and template predictor, the template predictor is used in template matching based OBMC. The non-first reconstruction sample line adjacent to the current block refers to a reconstruction sample line adjacent to the current block, but not immediately adjacent to the current block.

[0091] In another embodiment, when a neighbouring block is intra predicted, template matching based OBMC can be applied and the template matching decision rule for neighbouring intra predicted block can be different from other cases. For example, a subset of rules is used for a neighbouring intra predicted block, where the subset of rules is from a neighbouring inter predicted block or a neighbouring block vector predicted block (i.e., IBC, IntraTMP) . In other words, the neighbouring intra predicted block and the neighbouring inter predicted (or BV coded) block can share the same decision rules. For another example, only weaker blending rules are considered in template matching based OBMC when a neighbouring block is intra predicted. The weaker blending rules may comprise performing the overlapped block boundary process using fewer than four blending lines, such as using 2 blending lines or 3 blending lines. In addition, in some embodiments, the weaker blending rules may also comprise blending weights having a smaller sum or a smaller maximum value compared to the original OBMC blending rule.

[0092] Method 2: Neighbouring intra angle check in OBMC

[0093] In ECM OBMC, when generating a neighbouring overlapped intra predictor, the DIMD derived intra angle is constrained to a certain intra angle range along with block boundary. For example, for top predictor boundary, only intra prediction modes from mode 34 to mode 66 are allowed. However, as showed in Fig. 11, it is possible that the intra angle 1122 of a neighbouring intra coded block 1120 can be very different from the DIMD derived intra angle 1124. As a result, the generated overlapped intra predictor 1130 for the current block 1110 may be inconsistent with the neighbouring intra-coded block, potentially degrading the effectiveness of the OBMC process.

[0094] In one embodiment, the neighbouring intra coded block can be checked to determine whether it is within a certain pre-defined intra prediction angle range in the OBMC process. If intra prediction angle of the neighbouring block is not in the pre-defined intra prediction angle range, the OBMC process is skipped for this subblock. For example, as shown in Fig. 12, for top predictor boundary, the pre-defined intra prediction angle range is from mode 34 to mode 66 as indicated by a thick-lined box 1210, and for left predictor boundary, the pre-defined intra prediction angle range is from mode 2 to mode 34 as indicated by a dash-lined box 1220.

[0095] In another embodiment, the neighbouring intra coded block can be checked to determine whether it is within a certain pre-defined intra prediction angle range in the OBMC process. The pre-defined intra prediction angle range can be narrower than the DIMD derivation angle range. For example, only intra prediction modes from mode 42 to mode 56 are allowed for the neighbouring intra coded block.

[0096] In ECM OBMC, when a neighbouring block is intra predicted, some prediction mode information is not considered or inherited during generating an overlapped intra predictor. For example, when the neighbouring intra predicted block is a DIMD prediction mode with multiple predictor fusion, the overlapped predictor generation process will not inherit predictor fusion setting and may generate the overlapped predictor without predictor fusion. Thus, it is possible that the generated overlapped intra predictor could be very different from the neighbouring intra coded block because of inconsistent setting during overlapped predictor generation.

[0097] In one embodiment, when the neighbouring block is intra predicted and also DIMD mode predicted, the OBMC process will inherit its prediction mode information to generate an overlapped intra predictor.

[0098] In another embodiment, when neighbouring block is regular intra predicted (e.g., angular mode or DC mode or planar mode) , DIMD like analysis is skipped and the OBMC process can inherit its partial or all intra prediction information to generate the overlapped intra predictor.

[0099] In another embodiment, when the neighbouring block is intra predicted, the OBMC process will inherit its partial or all prediction mode information to generate the overlapped intra predictor.

[0100] Method 3: Neighbouring intra overlapped predictor generation

[0101] In ECM OBMC, when a neighbouring block is intra predicted, some prediction mode information is not considered or inherited during overlapped intra predictor generation, as shown in Fig. 13, where block 1310 corresponds to the current block and block 1320 corresponds to a neighbouring intra coded block. For example, when the neighbouring intra predicted block is a DIMD prediction mode with multiple predictor fusion, the overlapped predictor generation process will not inherit predictor fusion setting and may generate the overlapped predictor without predictor fusion. Thus, it is possible that the generated overlapped intra predictor could be very different from the neighbouring intra coded block because of inconsistent setting during overlapped predictor generation. In Fig. 13, area 1330 represents a generated overlapped intra predictor without predictor fusion.

[0102] In one embodiment, when a neighbouring block is intra predicted and also DIMD mode predicted, the OBMC process will inherit its prediction mode information to generate the overlapped intra predictor.

[0103] In another embodiment, when a neighbouring block is regular intra predicted (e.g., angular mode, DC mode, or planar mode) , the DIMD like analysis is skipped and the OBMC process can inherit its partial or all intra prediction information to generate the overlapped intra predictor.

[0104] In another embodiment, when a neighbouring block is intra predicted, the OBMC process will inherit its partial or all prediction mode information to generate the overlapped intra predictor.

[0105] Method 4: Boundary matching based overlapped block refinement

[0106] When the current block is intra-predicted, overlapped block refinement can be applied to refine the current intra predictor boundary using a neighbouring overlapped predictor. Similar to template matching based OBMC, it is proposed to adaptively change the blending lines and blending weightings in overlapped block refinement.

[0107] In one embodiment, when the current block is intra-predicted, boundary matching based overlapped block refinement can be applied to adaptively change the blending lines and blending weightings. For example, as shown in Fig. 14, the boundary matching cost of one block boundary can be: |2*NeighPred [0] -NeighPred [1] -CurPred [0] |+|2*CurPred [0] -CurPred [1] -NeighPred [0] |.

[0108] For another example, more lines can be involved and the boundary matching cost of one block boundary can be: |2*NeighPred [0] -NeighPred [1] -CurPred [0] |+|2*CurPred [0] -CurPred [1] -NeighPred [0] |+|4*NeighPred [0] -NeighPred [1] -NeighPred [2] -CurPred [0] -CurPred [1] |+|4*CurPred [0] -CurPred [1] -CurPred [2] -NeighPred [0] -NeighPred [1] |.

[0109] In one example, different types of cost can be used as the boundary matching costs. For example, the current predictor continuity cost = |2*CurPred [0] -CurPred [1] -NeighPred [0] | and neighbour predictor continuity cost = |2*NeighPred [0] -NeighPred [1] -CurPred [0] | can be used. The two or more costs are compared, and blending lines and blending weightings are determined according to the comparison result. For example, when the current predictor continuity cost is smaller or equal to neighbour predictor continuity cost, fewer blending lines or weaker blending weightings are used.

[0110] In another embodiment, when the current block is intra-predicted and the neighbouring block is also intra-predicted, boundary matching based overlapped block refinement can be applied to adaptively change the blending lines and blending weightings. When the neighbouring block is inter-predicted or BV predicted, template matching based overlapped block refinement can be applied.

[0111] In one example, when the neighbouring block is inter-predicted, the neighbouring block can utilize a neighbouring MV or BV to generate the template predictor from reference samples. For the current intra predictor, a sub-regional analysis method can be applied to derive an intra angle of template predictor, e.g., DIMD-like method. Then reconstruction line non-adjacent to block boundary can be used to generate the template predictor of the current intra predictor. After that, two or more template predictors can be compared, and blending lines or blending weightings can be determined according to the comparison result.

[0112] In another embodiment, when the current block is intra-predicted and the neighbouring block is also intra-predicted, boundary matching based overlapped block refinement can be applied to adaptively change the blending lines and blending weightings. When the neighbouring block is inter-predicted or BV predicted, boundary matching based overlapped block refinement can be applied.

[0113] Method 5: Enabling or disabling OBMC or overlapped block refinement

[0114] When a neighbouring block is intra predicted, OBMC can be performed to refine the boundary between the current inter predictor and the neighbouring intra predictor. When the current block is intra predicted, overlapped block refinement can be performed to refine the current intra predictor boundary. However, it is possible that the OBMC process or the overlapped block refinement process may degrade some high frequency contents or edge contents in computer generated contents, screen contents, or mixed contents from natural camera captured contents and screen contents. Thus, it is proposed to use some high-level syntax elements or control flags to enable or to disable the OBMC process or the overlapped block refinement process for some video contents.

[0115] In one embodiment, one or more high-level syntax elements or control flags in a slice header, picture header, PPS, or SPS can be signalled or inferred to enable or disable the OBMC process or the overlapped block refinement process. For example, when the current video content is detected or checked to be the screen content or mixed content from natural camera captured contents and screen contents, some syntax elements or control flags can be signalled or inferred to enable or to disable the OBMC process or the overlapped block refinement process.

[0116] In another embodiment, the OBMC process or the overlapped block refinement process can be disabled according to some specific prediction modes in some specific video contents. For example, some specific modes in screen content video or mixed content video can be one or more of the following prediction modes: skip, non-skip, merge, non-merge, AMVP, IBC, intraTMP, and so on.

[0117] In another embodiment, one or more high-level syntax elements or control flags can be signalled or inferred in a slice header, picture header, PPS, or SPS to indicate whether the OBMC process or the overlapped block refinement process can be conditionally applied or always applied. For example, if the high-level syntax or control flag is equal to a first value, the OBMC process or the overlapped block refinement process can be always applied to all predictors. If the high-level syntax or control flag is equal to a second value, the OBMC process or the overlapped block refinement process can be conditionally applied to some predictors, such as some specific prediction modes.

[0118] Any of the foregoing proposed methods of OBMC-like process for intra-coded neighbouring block can be implemented in encoders and / or decoders. For example, any of the proposed methods can be implemented in predictor derivation module of an encoder, and / or a predictor derivation module of a decoder. Alternatively, any of the proposed methods can be implemented as a circuit coupled to the predictor derivation module of the encoder and / or the predictor derivation module of the decoder, so as to provide the information needed by the predictor derivation module.

[0119] With reference to the exemplary encoder in Fig. 1A and exemplary decoder in Fig. 1B, any of the proposed methods can be implemented in a predictor derivation module of an encoder, and / or a predictor derivation module of a decoder. Alternatively, any of the proposed methods can be implemented as a circuit coupled to the predictor derivation module of the encoder and / or the predictor derivation module of the decoder, so as to provide the information needed by the predictor derivation module. For example, the process for the proposed methods can be implemented in an encoder side or a decoder side, such as the Intra / Inter coding module (e.g. Intra Pred. 150 / MC 152 in Fig. 1B) in a decoder or an Intra / Inter coding module is an encoder (e.g. Intra Pred. 110 / Inter Pred. 112 in Fig. 1A) .

[0120] Fig. 15 illustrates a flowchart of an exemplary video coding system, that incorporates a scheme to determine blending parameters of an OBMC-like process based the template cost for a neighbouring block of the current block coded in an inter-prediction mode according to an embodiment of the present invention. The steps shown in the flowchart may be implemented as program codes executable on one or more processors (e.g., one or more CPUs) at the encoder side. The steps shown in the flowchart may also be implemented based hardware such as one or more electronic devices or processors arranged to perform the steps in the flowchart. According to this method, input data comprising a current block and a neighbouring block of the current block is received in step 1510, wherein the current block is coded in an inter-prediction mode or a BV (Block Vector) -prediction mode. Whether the neighbouring block is coded in an intra-prediction mode is determined in step 1520. If the neighbouring block is coded in an intra-prediction mode (i.e., the “Yes” path from step 1520) , steps 1530 to 1570 are performed. Otherwise, (i.e., the “No” path from step 1520) , steps 1530 to 1570 are skipped. In step 1530, an intra template predictor is derived based on the intra-prediction mode for a template of the current block. In step 1540, an inter template predictor is derived based on the inter-prediction mode a BV template predictor based on the BV-prediction mode for the template of the current block. In step 1550, reconstructed neighbouring samples are compared with generated template samples from the intra template predictor and either the inter template predictor or the BV template predictor. In step 1560, blending parameters based on a result of the comparison are determined. In step 1570, an overlapped block boundary process is applied using the blending parameters to boundary samples located within a specified distance from a boundary between the current block and the neighbouring block.

[0121] The flowchart shown is intended to illustrate an example of video coding according to the present invention. A person skilled in the art may modify each step, re-arranges the steps, split a step, or combine steps to practice the present invention without departing from the spirit of the present invention. In the disclosure, specific syntax and semantics have been used to illustrate examples to implement embodiments of the present invention. A skilled person may practice the present invention by substituting the syntax and semantics with equivalent syntax and semantics without departing from the spirit of the present invention.

[0122] The above description is presented to enable a person of ordinary skill in the art to practice the present invention as provided in the context of a particular application and its requirement. Various modifications to the described embodiments will be apparent to those with skill in the art, and the general principles defined herein may be applied to other embodiments. Therefore, the present invention is not intended to be limited to the particular embodiments shown and described, but is to be accorded the widest scope consistent with the principles and novel features herein disclosed. In the above detailed description, various specific details are illustrated in order to provide a thorough understanding of the present invention. Nevertheless, it will be understood by those skilled in the art that the present invention may be practiced.

[0123] Embodiment of the present invention as described above may be implemented in various hardware, software codes, or a combination of both. For example, an embodiment of the present invention can be one or more circuit circuits integrated into a video compression chip or program code integrated into video compression software to perform the processing described herein. An embodiment of the present invention may also be program code to be executed on a Digital Signal Processor (DSP) to perform the processing described herein. The invention may also involve a number of functions to be performed by a computer processor, a digital signal processor, a microprocessor, or field programmable gate array (FPGA) . These processors can be configured to perform particular tasks according to the invention, by executing machine-readable software code or firmware code that defines the particular methods embodied by the invention. The software code or firmware code may be developed in different programming languages and different formats or styles. The software code may also be compiled for different target platforms. However, different code formats, styles and languages of software codes and other means of configuring code to perform the tasks in accordance with the invention will not depart from the spirit and scope of the invention.

[0124] The invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described examples are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.

Claims

1.A method of video coding, the method comprising:receiving input data comprising a current block and a neighbouring block of the current block, wherein the current block is coded in an inter-prediction mode or a BV (Block Vector) -prediction mode;determining whether the neighbouring block is coded in an intra-prediction mode; andin response to the neighbouring block being coded in the intra-prediction mode:deriving an intra template predictor based on the intra-prediction mode for a template of the current block;deriving an inter template predictor based on the inter-prediction mode or a BV template predictor based on the BV-prediction mode for the template of the current block;comparing reconstructed neighbouring samples with generated template samples from the intra template predictor and either the inter template predictor or the BV template predictor;determining blending parameters based on a result of the comparison; andapplying an overlapped block boundary process using the blending parameters to boundary samples located within a specified distance from a boundary between the current block and the neighbouring block.2.The method of Claim 1, wherein the blending parameters comprise a number of blending lines and a set of blending weights.3.The method of Claim 1, further comprising generating an overlapped intra predictor by blending an intra predictor derived based on the intra-prediction mode and either a current inter predictor or a current BV predictor, wherein specific reconstruction samples used to generate the overlapped intra predictor and the intra template predictor are located in a reconstruction sample line adjacent to, but not immediately adjacent to, the current block.4.The method of Claim 1, wherein a first set of decision rules of selecting the blending parameters is utilized when the neighbouring block is coded in the intra-prediction mode, and a second set of decision rules for selecting the blending parameters is utilized when the neighbouring block is coded in a mode other than the intra-prediction mode; wherein the first set of decision rules is different from the second set of decision rules.5.The method of Claim 1, wherein a set of decision rules of selecting the blending parameters is shared by a neighbouring intra-predicted block and a neighbouring inter-predicted or BV predicted block.6.The method of Claim 1, wherein, when the neighbouring block of the current block is coded in an intra-prediction mode, the overlapped block boundary process is performed using fewer than four blending lines or using smaller weighting strength.7.The method of Claim 1, wherein the intra-prediction mode of the neighbouring block is a Decoder-side Intra Mode Derivation (DIMD) mode, wherein an intra-prediction angle derived using the DIMD mode is constrained to be within a specific range of angular values.8.An apparatus for video coding, the apparatus comprising one or more electronics or processors arranged to:receive input data comprising a current block and a neighbouring block of the current block, wherein the current block is coded in an inter-prediction mode or a BV (Block Vector) -prediction mode;determine whether the neighbouring block is coded in an intra-prediction mode;in response to the neighbouring block being coded in the intra-prediction mode:derive an intra template predictor based on the intra-prediction mode for a template of the current block;derive an inter template predictor based on the inter-prediction mode or a BV template predictor based on the BV-prediction mode for the template of the current block;compare reconstructed neighbouring samples with generated template samples from the intra template predictor and either the inter template predictor or the BV template predictor;determine blending parameters based on a result of the comparison; andapply an overlapped block boundary process using the blending parameters to boundary samples located within a specified distance from a boundary between the current block and the neighbouring block.