Method and apparatus of regression-based prediction refinement with multiple modes in video coding systems

Regression-based prediction refinement methods address inefficiencies in video coding by utilizing residual terms and multiple modes, enhancing coding efficiency and video quality.

WO2026139012A1PCT designated stage Publication Date: 2026-07-02MEDIATEK INC

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
MEDIATEK INC
Filing Date
2025-12-26
Publication Date
2026-07-02

AI Technical Summary

Technical Problem

Existing video coding systems face inefficiencies in prediction refinement, particularly in handling complex motion models and illumination variations, which affect coding efficiency and video quality.

Method used

Implementing regression-based prediction refinement methods that utilize residual terms, weight parameters, and template regions to enhance prediction accuracy, combined with multiple prediction refinement modes for improved coding efficiency.

Benefits of technology

Enhances coding efficiency by refining prediction samples using regression-based models, leading to improved video quality and reduced computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025145901_02072026_PF_FP_ABST
    Figure CN2025145901_02072026_PF_FP_ABST
Patent Text Reader

Abstract

A method and apparatus for prediction refinement with on / off control of prediction refinement are disclosed. In one embodiment, if the prediction refinement is applied: a set of residual terms associated with a set of neighbouring positions of a target position of the current block are derived and one or more weight parameters are derived for a linear equation. Prediction refinement is derived for a target prediction sample according to the linear equation comprising the obtained one or more weight parameters and the set of residual terms. The target prediction sample is refined using the prediction refinement to generate a refined prediction sample. In another embodiment, a target prediction refinement mode among multiple prediction refinement modes is determined. Prediction refinement for a target prediction sample is derived according to the target prediction refinement mode. The target prediction sample is refined using the prediction refinement to generate a refined prediction sample.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD AND APPARATUS OF REGRESSION-BASED PREDICTION REFINEMENT WITH MULTIPLE MODES IN VIDEO CODING SYSTEMSCROSS 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 / 738,887 filed on December 26, 2024 and U.S. Provisional Patent Application No. 63 / 738,890 filed on December 26, 2024. The U.S. Provisional Patent Applications are hereby incorporated by reference in their entireties.FIELD OF THE INVENTION

[0002] The present invention relates to video coding system. In particular, the present invention relates to on / off control of regression-based prediction refinement and multiple prediction refinement modes to improve coding efficiency.BACKGROUND

[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 some of the functional blocks as the encoder. For example, the decoder can reuse Inverse Quantization 124 and Inverse Transform 126; however, Transform 118 and Quantization 120 are not needed at the decoder. 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] In VVC, the Sequence Parameter Set (SPS) and the Picture Parameter Set (PPS) contain high-level syntax elements that apply to entire coded video sequences and pictures, respectively. The Picture Header (PH) and Slice Header (SH) contain high-level syntax elements that apply to a current coded picture and a current coded slice, respectively.

[0008] In VVC, a coded picture is partitioned into non-overlapped square block regions represented by the associated coding tree units (CTUs) . A coded picture can be represented by a collection of slices, each comprising an integer number of CTUs. The individual CTUs in a slice are processed in raster-scan order. A bi-predictive (B) slice may be decoded using intra prediction or inter prediction with at most two motion vectors and reference indices to predict the sample values of each block. A predictive (P) slice is decoded using intra prediction or inter prediction with at most one motion vector and reference index to predict the sample values of each block. An intra (I) slice is decoded using intra prediction only.

[0009] 1.1 Affine Motion Compensated Prediction

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

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

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

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

[0014] In order to simplify the motion compensation prediction, block based affine transform prediction is applied. To derive motion vector of each 4×4 luma subblock, the motion vector of the centre sample of each subblock, as shown in Fig. 3, is calculated according to above equations, and rounded to 1 / 16 fraction accuracy. Then, the motion compensation interpolation filters are applied to generate the prediction of each subblock with the derived motion vector. The subblock size of chroma-components is also set to be 4×4. The MV of a 4×4 chroma subblock is calculated as the average of the MVs of the top-left and bottom-right luma subblocks in the collocated 8x8 luma region.

[0015] As is for translational-motion inter prediction, there are also two affine motion inter prediction modes: affine merge mode and affine AMVP mode.

[0016] 1.2 Bi-prediction with CU-level Weight (BCW)

[0017] In HEVC, the bi-prediction signal is generated by averaging two prediction signals obtained from two different reference pictures and / or using two different motion vectors. In VVC, the bi-prediction mode is extended beyond simple averaging to allow weighted averaging of the two prediction signals: Pbi-pred= ( (8-w) *P0+w*P1+4) >>3.    (3)

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

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

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

[0021] 1.3 Inter Merge Prediction

[0022] In JVET-T2002, inter merge prediction is disclosed. The technique includes following aspects.

[0023] 1.3.1 Spatial candidate derivation

[0024] Spatial merge candidates are selected among candidates located in the positions depicted in Fig. 4.

[0025] 1.3.2 Temporal candidate derivation

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

[0027] 1.3.3 Non-adjacent spatial candidate

[0028] The pattern of spatial non-adjacent merge candidates is shown in the following Fig. 6. The distances between non-adjacent spatial candidates and current coding block are based on the width and height of current coding block. The line buffer restriction is not applied.

[0029] 1.3.4 History-based candidates

[0030] A history-based table is maintained to include the recently coded motion information, and the table is reset at the beginning of each CTU row. If the current list is not full after including spatial adjacent and non-adjacent candidates, the candidates in the history-based table are added into the merge list.

[0031] 1.4 Multi-Pass Decoder-side Motion Vector Refinement (MP-DMVR)

[0032] In ECM-2.0, a multi-pass decoder-side motion vector refinement (DMVR) method is applied in regular merge mode if the selected merge candidate meets the DMVR conditions. In the first pass, bilateral matching (BM) is applied to the coding block. In the second pass, BM is applied to each 16x16 subblock within the coding block. In the third pass, MV in each 8x8 subblock is refined by applying bi-directional optical flow (BDOF) .

[0033] Similar to the DMVR in VVC, BM refined a pair of motion vectors MV0 and MV1 under the constrain that MVD0 (MV0’ -MV0) is just the opposite sign of MVD1 (MV1’ -MV1) , as illustrated in Fig. 7. In bi-prediction operation, a refined MV is searched around the initial MVs (732 and 734) in the reference picture list L0 712 and the reference picture list L1 714 for a current block 720 in the current picture 710. The collocated blocks 722 and 724 in L0 and L1 are determined according to the initial MVs 732 and 734) and the location of the current block 720 in the current picture as shown in Fig. 7. The BM method calculates the distortion between the two candidate blocks (742 and 744) in the reference picture list L0 and list L1. The locations of the two candidate blocks (742 and 744) are determined by adding two opposite offset (762 and 764) to the two initial MVs (732 and 734) to derive the two candidate MVs (752 and 754) . As illustrated in Fig. 7, the SAD between the candidate blocks (742 and 744) based on each MV candidate around the initial MV (732 or 734) is calculated. The MV candidate (752 or 754) with the lowest SAD becomes the refined MV and used to generate the bi-predicted signal.

[0034] 1.5 Geometric Partitioning Mode (GPM)

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

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

[0037] 1.5.1 GPM blending along the geometric partitioning edge

[0038] After predicting each part of a geometric partition using its own motion, blending is applied to the two prediction signals to derive samples around geometric partition edge. The blending weight for each position of the CU are derived based on the distance between individual position and the partition edge.

[0039] The distance for a position (x, y) to the partition edge are derived as: where i, j are the indices for angle and offset of a geometric partition, which depend on the signalled geometric partition index. The sign of ρx, j and ρy, j depend on angle index i.

[0040] The weights for each part of a geometric partition are derived as following: wIdxL (x, y) =partIdx ? 32+d (x, y) : 32-d (x, y)  (8) w1 (x, y) =1-w0 (x, y)   (10)

[0041] The partIdx depends on the angle index i. One example of weigh w0 is illustrated in Fig. 9. In Fig. 9, line 940 corresponds to the GPM partition boundary and two thresholds (i.e., -τand τ) correspond to lines 942 and 944 in Fig 9. Furthermore, the angle  910 and offset ρi 920 are indicated for GPM index i and point 930 corresponds to the centre of the block.

[0042] 1.6 Local Illumination Compensation (LIC)

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

[0044] The local illumination compensation proposed in JVET-O0066 is used for inter-coded CUs with the following modifications. ● Intra neighbour samples can be used in LIC parameter derivation. ● LIC is disabled for blocks with less than 32 luma samples. ● Samples of the reference block template are generated by using MC with the block MV without rounding it to integer-pel precision.

[0045] 1.7 Overlapped Block Motion Compensation (OBMC)

[0046] When OBMC is applied, top and left boundary pixels of a CU are refined using neighbouring block’s motion information with a weighted prediction as described in JVET-L0101.

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

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

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

[0050] When OBMC mode is used in CIIP mode with LMCS (Luma Mapping with Chroma Scaling) , inter blending is performed prior to LMCS mapping of inter samples. LMCS is applied to blended inter samples which are combined with LMCS applied intra samples in CIIP mode, where InterpredY represents the samples predicted by the motion of current block in the original domain, IntrapredY represents the samples predicted in the mapped domain, OBMCpredY represents the samples predicted by the motion of neighbouring blocks in the original domain, and w0 and w1 are the weights.

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

[0052] 1.8 Combined Inter and Intra prediction (CIIP)

[0053] In VVC, when a CU is coded in merge Mode, if the CU contains at least 64 luma samples (that is, CU width times CU height is equal to or larger than 64) , and if both CU width and CU height are less than 128 luma samples, an additional flag is signalled to indicate if the combined inter / intra prediction (CIIP) mode is applied to the current CU. As its name indicates, the CIIP prediction combines an inter prediction signal with an intra prediction signal. The inter prediction signal in the CIIP mode Pinter is derived using the same inter prediction process applied to regular merge mode; and the intra prediction signal Pintra is derived following the regular intra prediction process with the planar mode. Then, the intra and inter prediction signals are combined using weighted averaging, where the weight value is calculated depending on the coding modes of the top and left neighbouring blocks (shown in Fig. 10) as follows: - If the top neighbour is available and intra coded, then set isIntraTop to 1, otherwise set isIntraTop to 0; - If the left neighbour is available and intra coded, then set isIntraLeft to 1, otherwise set isIntraLeft to 0; - If (isIntraLeft + isIntraTop) is equal to 2, then wt is set to 3; - Otherwise, if (isIntraLeft + isIntraTop) is equal to 1, then wt is set to 2; - Otherwise, set wt to 1.

[0054] The CIIP prediction is formed as follows: PCIIP= ( (4-wt) *Pinter+wt*Pintra+2) >>2.

[0055] 1.9 Multi-Hypothesis Prediction (MHP)

[0056] In the multi-hypothesis inter prediction mode (JVET-M0425) , one or more additional motion-compensated prediction signals are signalled, in addition to the conventional bi-prediction signal. The resulting overall prediction signal is obtained by sample-wise weighted superposition. With the bi-prediction signal pbi and the first additional inter prediction signal / hypothesis h3, the resulting prediction signal p3 is obtained as follows: p3= (1-α) pbi+αh3.

[0057] The weighting factor α is specified by the new syntax element add_hyp_weight_idx, according to the following mapping table: Table 1. Mapping between syntax element add_hyp_weight_idx, and weighting factor α

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

[0059] The resulting overall prediction signal is obtained as the last pn (i.e., the pn having the largest index n) . Up to two additional prediction signals can be used (i.e., n is limited to 2) .

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

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

[0062] Combination of MHP and BDOF is possible, however the BDOF is only applied to the bi-prediction signal part of the prediction signal (i.e., the ordinary first two hypotheses) .

[0063] In the present invention, techniques of prediction refinement with on / off control of regression-based prediction refinement and multiple prediction refinement modes to improve coding efficiency are disclosed. BRIEF SUMMARY OF THE INVENTION

[0064] A method and apparatus of video coding for prediction refinement using regression-based method to improve coding efficiency are disclosed, where the prediction refinement is derived based on input signals comprising one or more residual terms. According to one method, input data associated with a current block is received, wherein the input data comprise pixel data for the current block to be encoded at an encoder side or coded data associated with the current block to be decoded at a decoder side. Whether prediction refinement is applied to the current block is determined. In response to the prediction refinement being applied to the current block: a set of residual terms associated with a set of neighbouring positions of a target position of the current block is derived; one or more weight parameters for a linear equation is obtained; the prediction refinement for a target prediction sample is derived according to the linear equation comprising said one or more weight parameters obtained and the set of residual terms; the target prediction sample is refined using the prediction refinement to generate a refined prediction sample; and the current block is encoded or decoded by using prediction comprising the refined prediction sample.

[0065] In one embodiment, whether the prediction refinement is applied to the current block is determined according to a prediction refinement flag explicitly signalled. In one embodiment, the prediction refinement flag is only signalled for the current block belonging to a set of specific coding modes. In one embodiment, when the prediction refinement flag is not signalled for the current block, the prediction refinement flag is inferred to be false indicating that the prediction refinement is not applied to the current block. In one embodiment, the set of specific coding modes comprises one or more non-merge modes. In one embodiment, when the current block is coded in a merge mode, the prediction refinement flag is inherited from a merge candidate.

[0066] In one embodiment, the prediction refinement flag is only signalled for the current block with an area or a QP (Quantization Parameter) value greater than a predefined threshold. In one embodiment, a high-level syntax is signalled or parsed for enabling the regression-based prediction refinement. In one embodiment, the high-level syntax is signalled in SPS (Sequence Parameter Set) , PPS (Picture Parameter Set) , PH (Picture Header) or SH (Slice Header) to indicate whether the prediction refinement is allowed for a current sequence, picture, or slice.

[0067] In one embodiment, whether the prediction refinement is applied to the current block is determined implicitly by checking a block size or a QP value of the current block.

[0068] In one embodiment, whether the prediction refinement is applied to the current block is determined implicitly by checking a difference between a first motion vector of the current block and a second motion vector of a neighbouring block. In one embodiment, the prediction refinement is regression-based.

[0069] A method and apparatus of using multiple prediction refinement modes are disclosed. According to one method, input data associated with a current block is received, wherein the input data comprise pixel data for the current block to be encoded at an encoder side or coded data associated with the current block to be decoded at a decoder side. A target prediction refinement mode among multiple prediction refinement modes is determined. Prediction refinement for a target prediction sample is derived according to the target prediction refinement mode. The target prediction sample is refined using the prediction refinement to generate a refined prediction sample. The current block is encoded or decoded by using prediction comprising the refined prediction sample.

[0070] In one embodiment, the multiple prediction refinement modes comprise one or more first methods of using a template region to derive model parameters for the prediction refinement, one or more second methods of directly using offline trained models for the prediction refinement, or one or more third methods of using different model formulas.

[0071] In one embodiment, if a prediction refinement enabling flag of the current block is true, a second flag or syntax is signalled or parsed after the prediction refinement enabling flag, and wherein the second flag or syntax is used for indicating which of the multiple prediction refinement modes is used for the current block.

[0072] In one embodiment, the target prediction refinement mode is selected from the multiple prediction refinement modes implicitly. In one embodiment, the target prediction refinement mode is selected from the multiple prediction refinement modes implicitly by checking a block size or a QP value of the current block, or a motion vector difference between the current block and a neighbouring block.BRIEF DESCRIPTION OF THE DRAWINGS

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

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

[0075] Fig. 2A illustrates an example of the affine motion field of a block described by motion information of two control point (4-parameter) .

[0076] Fig. 2B illustrates an example of the affine motion field of a block described by motion information of three control point motion vectors (6-parameter) .

[0077] Fig. 3 illustrates an example of block based affine transform prediction, where the motion vector of each 4×4 luma subblock is derived from the control-point MVs.

[0078] Fig. 4 illustrates the neighbouring blocks used for deriving spatial merge candidates for VVC.

[0079] Fig. 5 shows candidate positions for temporal merge candidate, C0 and C1.

[0080] Fig. 6 illustrates an example of spatial neighbouring blocks used to derive the spatial non-adjacent merge candidates.

[0081] Fig. 7 illustrates an example of bilateral matching process.

[0082] Fig. 8 illustrates an example of the GPM splits grouped by identical angles.

[0083] Fig. 9 illustrates an exemplified generation of a bending weight w_0 using geometric partitioning mode.

[0084] Fig. 10 illustrates top and left neighbouring blocks used in CIIP weight derivation.

[0085] Fig. 11A-B illustrate two examples of residual terms in the regression-based prediction refinement model.

[0086] Fig. 12 illustrates a flowchart of an exemplary video coding system that uses prediction refinement with on / off control of regression-based prediction refinement to improve coding efficiency according to an embodiment of the present invention.

[0087] Fig. 13 illustrates a flowchart of an exemplary video coding system that uses multiple prediction refinement modes to improve coding efficiency according to an embodiment of the present invention.DETAILED DESCRIPTION OF THE INVENTION

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

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

[0090] PROPOSED METHOD

[0091] In this disclosure, several inventions using regression-based methods for the problem of prediction refinement are proposed.

[0092] 2. Regression-based Prediction Refinement Model

[0093] 2.1 Formula of regression-based prediction refinement model

[0094] In one embodiment, the input of the regression-based prediction refinement model may contain one or more residual terms. The residual term can be a difference between the reconstructed sample and the prediction sample generated by the motion information of the current block, as shown in the following formula: res (x, y) =rec (x, y) -pred (x, y) .

[0095] In one embodiment, the input of the regression-based prediction refinement model contains one or more prediction terms. The prediction term can be prediction sample generated by the motion information of the current block at the corresponding position.

[0096] In one embodiment, the input of the regression-based prediction refinement model contains one bias term B, and the definition of bias term is shown in the following formula: B=1<< (BitDepth-1) .

[0097] In one embodiment, the input of the regression-based prediction refinement model contains one or more position terms. The position term can be the horizontal or vertical relative position of the current sample.

[0098] For one example, position terms X and Y are calculated with respect to the top-left coordinates of the current block, as shown in the following formula: X=x-xblock Y=y-yblock

[0099] For another example, position terms X and Y are calculated with respect to the top-left coordinates of the template region, as shown in the following formula: X=x-xtemplate Y=y-ytemplate.

[0100] In another embodiment, the position terms in the regression-based prediction refinement model can be normalized by the current block size. For example, some definitions of position terms X and Y are shown in the following formula:

[0101] In another embodiment, the position terms in the regression-based prediction refinement model can be normalized by the current block size, and then be scaled by a predefined value s. For example, some definitions of position terms X and Y are shown in the following formula:

[0102] In one embodiment, the input of the regression-based prediction refinement model contains one or more similarity term. The similarity term S (x, y, i) can be the difference between the prediction of the current position pred (x, y) and the prediction of a neighbouring position pred (x+Δxi, y+Δyi) , as shown in the following formula: S (x, y, i) =pred (x, y) -pred (x+Δxi, y+Δyi) .

[0103] In another embodiment, the similarity term S (x, y, i) can be the absolute value of the difference between the prediction of the current position pred (x, y) and the prediction of a neighbouring position pred (x+Δxi, y+Δyi) , as shown in the following formula: S (x, y, i) =|pred (x, y) -pred (x+Δxi, y+Δyi) |.

[0104] In another embodiment, the absolute operation in the similarity term S (x, y, i) can be replaced by the square operation, so the similarity term can be the square of the difference between the prediction of the current position pred (x, y) and the prediction of a neighbouring position pred (x+Δxi, y+Δyi) , as shown in the following formula: S (x, y, i) =(pred (x, y) -pred (x+Δxi, y+Δyi) ) 2

[0105] In another embodiment, the similarity term S (x, y, i) mentioned above can be further multiplied by a residual term of a neighbouring position res (x+Δxi, y+Δyi) , as shown in the following formula: S (x, y, i) =|pred (x, y) -pred (x+Δxi, y+Δyi) |*res (x+Δxi, y+Δyi) S (x, y, i) =(pred (x, y) -pred (x+Δxi, y+Δyi) ) 2*res (x+Δxi, y+Δyi) .

[0106] In one embodiment, the input of the regression-based prediction refinement model contains one or more OBMC term. The OBMC term can be the prediction sample generated by the motion information of the neighbouring block, as shown in the following formula: OBMC (x, y) =predOBMC (x, y) .

[0107] In another embodiment, the OBMC term can be the difference between the reconstructed sample and the prediction sample generated by the motion information of the neighbouring block, as shown in the following formula: OBMC (x, y) =rec (x, y) -predOBMC (x, y) .

[0108] In one embodiment, the regression-based prediction refinement model may have N residual terms corresponding to the N neighbouring positions, where N is a positive integer. Each residual term can have its corresponding parameter ci, as shown in the following formula:

[0109] For one example, there are 14 residual terms in the regression model, as illustrated in Fig. 11A. The position marked with “T” is the current position where the regression model will be used to derive the prediction refinement, and the positions marked with numbers are the corresponding positions of each residual terms. For another example, there are 8 residual terms in the regression model, as illustrated in Fig. 11B.

[0110] In another embodiment, the regression-based prediction refinement model may have one bias term and N residual terms corresponding to the N neighbouring positions, where N is a positive integer:

[0111] In another embodiment, the regression-based prediction refinement model may have M residual terms at the closest line in the above template region, and / or N residual terms at the closest line in the left template region, where M and N are positive integers:

[0112] In another embodiment, the regression-based prediction refinement model may have one bias term, M residual terms at the closest line in the above template region, and / or N residual terms at the closest line in the left template region, where M and N are positive integers:

[0113] In one embodiment, the regression-based prediction refinement model may have M residual terms corresponding to the M neighbouring positions, and N prediction terms corresponding to the N neighbouring positions, where M and N are positive integers:

[0114] In one embodiment, the regression-based prediction refinement model may have one bias term, M residual terms corresponding to the M neighbouring positions, and N prediction terms corresponding to the N neighbouring positions, where M and N are positive integers:

[0115] In one embodiment, the regression-based prediction refinement model may have one bias term, two position terms, and M residual terms corresponding to the M neighbouring positions, where M is a positive integer:

[0116] In one embodiment, the regression-based prediction refinement model may have one bias term, M residual terms corresponding to the M neighbouring positions, and N similarity terms corresponding to the N neighbouring positions, where M and N are positive integers:

[0117] In one embodiment, the regression-based prediction refinement model may have one bias term, M residual terms corresponding to the M neighbouring positions, and N OBMC terms corresponding to the N neighbouring positions, where M and N are positive integers:

[0118] In one embodiment, the regression-based prediction refinement model may be any combination of the terms mentioned above.

[0119] In one embodiment, if the corresponding position of a residual term has not been encoded or decoded, and the reconstructed sample at this position is not available, the residual term at this position can be replaced with 0.

[0120] In another embodiment, if the corresponding position of a residual term has not been encoded or decoded, and the reconstructed sample at this position is not available, the residual term at this position can be replaced with the refinement generated by the regression-based prediction refinement model for that position.

[0121] 2.1.2 Derive regression-based model using the template region

[0122] As with other regression-based methods, the samples in the template region may be used to derive the parameters of the regression-based prediction refinement model.

[0123] In one embodiment, only the samples in the above template region may be used to derive the parameters of the regression-based prediction refinement model.

[0124] In another embodiment, only the samples in the left template region may be used to derive the parameters of the regression-based prediction refinement model.

[0125] In another embodiment, the samples in the above template region and the left template region may be used to derive the parameters of the regression-based prediction refinement model.

[0126] In another embodiment, the samples in the above template region, the left template region and the above-left template region may be used to derive the parameters of the regression-based prediction refinement model.

[0127] In one embodiment, the reconstructed samples in the template region may be used to derive the parameters of the regression-based prediction refinement model.

[0128] In another embodiment, the prediction samples in the template region may be used to derive the parameters of the regression-based prediction refinement model. The prediction samples in the template region are generated using the same coding method as the current block.

[0129] In another embodiment, the difference between the reconstructed samples and the prediction samples in the template region may be used to derive the parameters of the regression-based prediction refinement model.

[0130] In one embodiment, when deriving the optimal parameter of the regression model using the samples in the template region, the difference between the reconstructed samples and the prediction samples of one position may be the regression target, and the difference between the reconstructed samples and the prediction samples of its neighbouring positions may be the input of the regression model.

[0131] In one embodiment, an auto-correlation matrix A and a cross-correlation vector b are prepared by collecting training data pairs in the template region, and then we may derive the optimal parameters of the regression-based prediction refinement model by solving the matrix equation Ax=b.

[0132] In one embodiment, LDL decomposition method may be used to solve the matrix equation Ax=b to derive the optimal parameters of the regression-based prediction refinement model.

[0133] In another embodiment, Gaussian elimination decomposition method may be used to solve the matrix equation Ax=b to derive the optimal parameters of the regression-based prediction refinement model.

[0134] 2.1.3 Offline derived regression-based model

[0135] In one embodiment, the parameters of the regression-based prediction refinement model may be loaded from memory, and the parameters in memory are derived offline.

[0136] In one embodiment, the parameters of the regression-based prediction refinement model may be position dependent. The horizontal position x and the vertical position y may be used as indexes of memory.

[0137] In one embodiment, the parameters of the regression-based prediction refinement model may be block size dependent. The block width and the block height may be used as indexes of memory.

[0138] 2.1.4 Residual clipping in template region

[0139] Since the residual value of the template is calculated by the reconstructed sample and the prediction sample generated by the motion information of the current block, if the object corresponding to a position in the template region has different motion than the current block, these positions may generate some extremely high or extremely low residual values. Several methods are proposed to deal with this problem.

[0140] In one embodiment, when finishing the calculation of the residual value of the template region, a clipping operation may be added to the residual value. The residual value will be clipped within a range (min, max) , where min and max may be two pre-defined integers: res′ (x, y) =Clip (res (x, y) , min, max) .

[0141] In another embodiment, when finishing the calculation of the residual value of the template region, a clipping operation may be added to the residual value. The residual value will be clipped within a range (min, max) , where min and max are derived from the residual value of the template region.

[0142] For one example, the upper bound value max may be the maximum value of the line closest to the current block in the template region, and the lower bound value min may be the minimum value of the line closest to the current block in the template region.

[0143] For another example, the upper bound value max may be the maximum value of the M lines closest to the current block in the template region, and the lower bound value min may be the minimum value of the N lines closest to the current block in the template region, where M and N are positive integers.

[0144] 2.2 Regression-based Prediction Refinement

[0145] 2.2.1 Weighting prediction refinement

[0146] In one embodiment, after deriving the optimal parameters of the regression-based prediction refinement model, the regression model may be applied to the current block to generate the prediction refinement refinement (x, y) , and then the final prediction pred′ (x, y) may be obtained by adding the original prediction pred (x, y) and the sample-wise prediction refinement refinement (x, y) , as shown in the following formula: pred′ (x, y) =pred (x, y) +refinement (x, y) .

[0147] In one embodiment, the prediction refinement derived from the regression model may be further multiplied by a weight w (x, y) before being added to the original prediction, as shown in the following formula: pred′ (x, y) =pred (x, y) +refinement (x, y) *w (x, y) .

[0148] In one embodiment, the weight w (x, y) is related to the horizontal position x and the vertical position y, where the horizontal position x and the vertical position y may be calculated with respect to the top-left coordinates of the current block. As the horizontal position x and / or the vertical position y increases, the weight w (x, y) will decrease or remain unchanged.

[0149] For one example, the weight may linearly decrease as horizontal position x and / or the vertical position y increases. For another example, the weight may exponentially decrease as horizontal position x and / or the vertical position y increases.

[0150] In another embodiment, the weight w (x, y) may be obtained from a lookup table, and the horizontal position x and the vertical position y can be used as indexes of the lookup table.

[0151] 2.2.2 Prediction refinement with clipping

[0152] In one embodiment, the prediction refinement derived from the regression model may be clipped within a range (min, max) before being added to the original prediction, as shown in the following formula. The upper bound and the lower bound of the range may be found in the template region: pred′ (x, y) =pred (x, y) +Clip (refinement (x, y) , min, max) .

[0153] For one example, the upper bound value max may be the maximum value of the line closest to the current block in the template region, and the lower bound value min may be the minimum value of the line closest to the current block in the template region.

[0154] For another example, the upper bound value max may be the maximum value of the M lines closest to the current block in the template region, and the lower bound value min may be the minimum value of the N lines closest to the current block in the template region, where M and N are positive integers.

[0155] 2.2.3 Combinations

[0156] In one embodiment, the weighting prediction refinement and the prediction refinement with clipping may be combined. The prediction refinement derived from the regression model may be firstly multiplied by a weight w (x, y) , and then it may be clipped within a range (min, max) before being added to the original prediction, as shown in the following formula: pred′ (x, y) =pred (x, y) +Clip (refinement (x, y) *w (x, y) , min, max) .

[0157] In another embodiment, the weighting prediction refinement and the prediction refinement with clipping may be combined. The prediction refinement derived from the regression model may be firstly clipped within a range (min, max) , and then it may be multiplied by a weight w (x, y) before being added to the original prediction, as shown in the following formula: pred′ (x, y) =pred (x, y) +Clip (refinement (x, y) , min, max) *w (x, y) .

[0158] 2.3 Regularization for Regression-based Prediction Refinement

[0159] To stabilize the regression process and prevent the overfitting problem, some regularization terms may be added to the MSE formula and used to constrain the value of some parameters of regression model from being too large or too small.

[0160] In one embodiment, N regularization terms are added to the MSE formula to constrain the value of parameters ci from being too large or too small. One example is shown in the following formula, where λ0 is the strength of the regularization:

[0161] In another embodiment, an auto-correlation matrix A and a cross-correlation vector b are prepared, and then we may derive the optimal parameters of the regression-based prediction refinement model by solving the matrix equation Ax=b. The regularization terms mentioned above may be combined into the auto-correlation matrix and the cross-correlation vector as the following formula:

[0162] In one embodiment, the strength of the regularization λ0 may be a predefined fixed value.

[0163] In another embodiment, the strength of the regularization λ0 may depend on the number of the samples in the template region.

[0164] For one example, if the number of samples in the template region is greater than N, where N is a positive integer, the strength λ0 is equal to the first value λa. Otherwise, the strength λ0 is equal to the second value λb. The first value λa may be greater than the second value λb.

[0165] For another example, if the number of samples in the template region is greater than N, where N is a positive integer, the strength λ0 is equal to the first value λa. Otherwise, the strength λ0 is equal to the second value λb. The first value λa may be less than the second value λb.

[0166] In one embodiment, the strength of the regularization λ0 may be different for each parameter of the residual terms. For one example, residual terms whose corresponding positions are far away from the current position may have a greater strength of the regularization. For another example, residual terms whose corresponding positions are far away from the current position may have a smaller strength of the regularization.

[0167] 2.4 Syntax Design for Prediction Refinement

[0168] In one embodiment, a prediction refinement flag may be signalled for each block to indicate whether the proposed regression-based prediction refinement method is used or not.

[0169] In one embodiment, only blocks coded by certain specific coding modes need to signal the prediction refinement flag. If the block is not coded by certain specific coding modes, the prediction refinement flag may infer to be false, and the proposed regression-based prediction refinement method will not be applied.

[0170] For one example, certain specific coding modes may be non-merge mode. For another example, certain specific coding modes may be non-LIC mode. For another example, certain specific coding modes may be non-affine mode.

[0171] In another embodiment, only blocks coded by non-merge modes may signal the prediction refinement flag to indicate whether the proposed regression-based prediction refinement method is used or not. For the blocks coded by merge modes, the prediction refinement flag may be inherited from the merge candidate.

[0172] In one embodiment, if the prediction refinement flag is true, a flag may be further signalled after the prediction refinement flag to indicate whether the template residual clipping method is used or not.

[0173] In one embodiment, only blocks with an area greater than a predefined threshold TH may signal the prediction refinement flag to indicate whether the proposed regression-based prediction refinement method is used or not. For the blocks with an area less than TH, the prediction refinement flag may infer to be true, and the proposed regression-based prediction refinement method will be always applied or always not applied.

[0174] In another embodiment, only blocks with an area less than a predefined threshold TH may signal the prediction refinement flag to indicate whether the proposed regression-based prediction refinement method is used or not. For the blocks with an area greater than TH, the prediction refinement flag may infer to be true, and the proposed regression-based prediction refinement method will be always applied or always not applied.

[0175] In another embodiment, only blocks with a QP value greater than a predefined threshold TH may signal the prediction refinement flag to indicate whether the proposed regression-based prediction refinement method is used or not. For the blocks with QP less than TH, the prediction refinement flag may infer to be true, and the proposed regression-based prediction refinement method will be always applied or always not applied.

[0176] In another embodiment, only blocks with QP less than a predefined threshold TH may signal the prediction refinement flag to indicate whether the proposed regression-based prediction refinement method is used or not. For the blocks with a QP value greater than TH, the prediction refinement flag may infer to be true, and the proposed regression-based prediction refinement method will be always applied or always not applied.

[0177] In one embodiment, whether the proposed regression-based prediction refinement method is applied to the current block may be implicitly determined by checking the block size.

[0178] For one example, if the block area is less than a predefined threshold TH, the regression-based prediction refinement method may be applied to the current block. Otherwise, the regression-based prediction refinement method may not be applied to the current block.

[0179] For another example, if the block area is greater than a predefined threshold TH, the regression-based prediction refinement method may be applied to the current block. Otherwise, the regression-based prediction refinement method may not be applied to the current block.

[0180] In one embodiment, whether the proposed regression-based prediction refinement method is applied to the current block may be implicitly determined by checking the QP value.

[0181] For one example, if the QP value of the block is less than a predefined threshold TH, the regression-based prediction refinement method may be applied to the current block. Otherwise, the regression-based prediction refinement method may not be applied to the current block.

[0182] For another example, if the QP value of the block is greater than a predefined threshold TH, the regression-based prediction refinement method may be applied to the current block. Otherwise, the regression-based prediction refinement method may not be applied to the current block.

[0183] In one embodiment, whether the proposed regression-based prediction refinement method is applied to the current block may be implicitly determined by checking the difference between the motion of the current block and the motion vector of the neighbouring block. For one example, the difference may be the Euclidean distance as shown in the following formula, where (mv′x, mv′y) is the motion vector of the current block, and (mvx, mvy) is the motion vector of the neighbouring block:

[0184] For one example, if the motion vector difference is less than a predefined threshold TH, the regression-based prediction refinement method may be applied to the current block. Otherwise, the regression-based prediction refinement method may not be applied to the current block.

[0185] For another example, if the motion vector difference is greater than a predefined threshold TH, the regression-based prediction refinement method may be applied to the current block. Otherwise, the regression-based prediction refinement method may not be applied to the current block.

[0186] In one embodiment, a high-level syntax may be signalled for enabling the prediction refinement. This high-level syntax may be signalled in SPS, PPS, PH or SH to indicate if the proposed method is allowed for the current sequence, picture, or slice.

[0187] 2.5 Multiple Prediction Refinement Modes

[0188] In one embodiment, multiple prediction refinement methods may be selected to refine the prediction of the current block.

[0189] For one example, multiple prediction refinement methods may include methods of using the template region to derive the model parameters, and methods of directly using offline trained models.

[0190] For another example, multiple prediction refinement methods may include methods of using different model formulas.

[0191] For another example, multiple prediction refinement methods may include methods of using different template regions to derive the model parameters.

[0192] In one embodiment, if the prediction refinement enabling flag of the current block is true, and there are multiple prediction refinement methods, a flag or syntax may be signalled after the prediction refinement enabling flag for indicating which prediction refinement method is used for the current block.

[0193] In another embodiment, if the prediction refinement method is always enabled, and there are multiple prediction refinement methods, a flag or syntax may be signalled for indicating which prediction refinement method is used for the current block.

[0194] In one embodiment, if there are multiple prediction refinement methods, which prediction refinement method is applied to the current block may be implicitly determined by checking the block size.

[0195] In another embodiment, if there are multiple prediction refinement methods, which prediction refinement method is applied to the current block may be implicitly determined by checking the QP value.

[0196] In another embodiment, if there are multiple prediction refinement methods, which prediction refinement method is applied to the current block may be implicitly determined by checking the difference between the motion of the current block and the motion vector of the neighbouring block. For one example, the difference may be the Euclidean distance.

[0197] In one embodiment, if there are multiple prediction refinement methods, multiple prediction refinements may be first generated by applying multiple prediction refinement methods to the current block, and then the final prediction refinement may be generated by fusing multiple prediction refinements.

[0198] In one embodiment, two prediction refinement methods are applied to the current block. The samples close to the template region may use the prediction refinement model derived from the template region, and the other samples may use the offline trained prediction refinement model.

[0199] In one embodiment, a high-level syntax may be signalled for enabling multiple prediction refinement methods. This high-level syntax may be signalled in SPS, PPS, PH or SH to indicate if the proposed method is allowed for the current sequence, picture, or slice.

[0200] Any of the foregoing proposed methods of regression-based prediction refinement can be implemented in encoders and / or decoders. For example, any of the proposed methods can be implemented in an inter / intra / prediction module of an encoder, and / or an inter / intra / prediction module of a decoder. Alternatively, any of the proposed methods can be implemented as a circuit coupled to the inter / intra / prediction module of the encoder and / or the inter / intra / prediction module of the decoder, so as to provide the information needed by the inter / intra / prediction module

[0201] With reference to the exemplary encoder and decoder in Fig. 1A and Fig 1B, the proposed methods can be implemented in the intra / inter prediction modules. For example, in the encoder side, the required processing can be implemented as part of the Inter-Pred. unit 112 or Intra Pred. unit 110 as shown in Fig. 1A. However, the encoder may also use additional processing unit to implement the required processing. For the decoder side, the required processing can be implemented as part of the MC unit 152 or Intra Pred. 150 as shown in Fig. 1B.However, the decoder may also use additional processing unit to implement the required processing. Alternatively, any of the proposed methods can be implemented as a circuit coupled to the inter / intra / prediction module of the encoder and / or the inter / intra / prediction module of the decoder, so as to provide the information needed by the inter / intra / prediction module. While the Inter-Pred. 112 and Intra Pred. 110 in the encoder side and MC 152 and Intra Pred. 150 in the decoder side are shown as individual processing units, they may correspond to executable software or firmware codes stored on a media, such as hard disk or flash memory, for a CPU (Central Processing Unit) or programmable devices (e.g. DSP (Digital Signal Processor) or FPGA (Field Programmable Gate Array) ) .

[0202] Fig. 12 illustrates a flowchart of an exemplary video coding system that uses prediction refinement with on / off control of regression-based prediction refinement to improve coding efficiency 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 one method, input data associated with a current block is received in step 1210, wherein the input data comprise pixel data for the current block to be encoded at an encoder side or coded data associated with the current block to be decoded at a decoder side. Whether prediction refinement is applied to the current block is determined in step 1220. If the prediction refinement being applied to the current block (i.e., the “Yes” path from step 1220) , steps 1230 to 1270 are performed. Otherwise (i.e., the “No” path from step 1220) , steps 1230 to 1270 are skipped. In step 1230, a set of residual terms associated with a set of neighbouring positions of a target position of the current block is derived. In step 1240, one or more weight parameters for a linear equation are obtained. In step 1250, prediction refinement for a target prediction sample is derived according to the linear equation comprising said one or more weight parameters obtained and the set of residual terms. In step 1260, the target prediction sample is refined using the prediction refinement to generate a refined prediction sample. In step 1270, the current block is encoded or decoded by using prediction comprising the refined prediction sample.

[0203] Fig. 13 illustrates a flowchart of an exemplary video coding system that uses multiple prediction refinement modes to improve coding efficiency according to an embodiment of the present invention. According to one method, input data associated with a current block is received in step 1310, wherein the input data comprise pixel data for the current block to be encoded at an encoder side or coded data associated with the current block to be decoded at a decoder side. A target prediction refinement mode among multiple prediction refinement modes is determined in step 1320. Prediction refinement for a target prediction sample is derived according to the target prediction refinement mode in step 1330. The target prediction sample is refined using the prediction refinement to generate a refined prediction sample in step 1340. The current block is encoded or decoded by using prediction comprising the refined prediction sample in step 1350.

[0204] The flowcharts shown are 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.

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

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

[0207] 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 associated with a current block, wherein the input data comprise pixel data for the current block to be encoded at an encoder side or coded data associated with the current block to be decoded at a decoder side;determining whether prediction refinement is applied to the current block;in response to the prediction refinement being applied to the current block:deriving a set of residual terms associated with a set of neighbouring positions of a target position of the current block;obtaining one or more weight parameters for a linear equation;deriving the prediction refinement for a target prediction sample according to the linear equation comprising said one or more weight parameters obtained and the set of residual terms;refining the target prediction sample using the prediction refinement to generate a refined prediction sample; andencoding or decoding the current block by using prediction comprising the refined prediction sample.2.The method of Claim 1, wherein whether the prediction refinement is applied to the current block is determined according to a prediction refinement flag explicitly signalled.3.The method of Claim 2, wherein the prediction refinement flag is only signalled for the current block belonging to a set of specific coding modes.4.The method of Claim 3, wherein when the prediction refinement flag is not signalled for the current block, the prediction refinement flag is inferred to be false indicating that the prediction refinement is not applied to the current block.5.The method of Claim 3, wherein the set of specific coding modes comprises one or more non-merge modes.6.The method of Claim 5, wherein when the current block is coded in a merge mode, the prediction refinement flag is inherited from a merge candidate.7.The method of Claim 2, wherein the prediction refinement flag is only signalled for the current block with an area or a QP (Quantization Parameter) value greater than a predefined threshold.8.The method of Claim 2, wherein a high-level syntax is signalled or parsed for enabling the prediction refinement.9.The method of Claim 8, wherein the high-level syntax is signalled in SPS (Sequence Parameter Set) , PPS (Picture Parameter Set) , PH (Picture Header) or SH (Slice Header) to indicate whether the prediction refinement is allowed for a current sequence, picture, or slice.10.The method of Claim 1, wherein whether the prediction refinement is applied to the current block is determined implicitly by checking a block size or a QP value of the current block.11.The method of Claim 1, wherein whether the prediction refinement is applied to the current block is determined implicitly by checking a difference between a first motion vector of the current block and a second motion vector of a neighbouring block.12.The method of Claim 1, wherein the prediction refinement is regression-based.13.An apparatus for video coding, the apparatus comprising one or more electronic circuits or processors arranged to:receive input data associated with a current block, wherein the input data comprise pixel data for the current block to be encoded at an encoder side or coded data associated with the current block to be decoded at a decoder side;determine whether prediction refinement is applied to the current block;in response to the prediction refinement being applied to the current block:derive a set of residual terms associated with a set of neighbouring positions of a target position of the current block;obtain one or more weight parameters for a linear equation;derive the prediction refinement for a target prediction sample according to the linear equation comprising said one or more weight parameters obtained and the set of residual terms;refine the target prediction sample using the prediction refinement to generate a refined prediction sample; andencode or decode the current block by using prediction comprising the refined prediction sample.14.A method of video coding, the method comprising:receiving input data associated with a current block, wherein the input data comprise pixel data for the current block to be encoded at an encoder side or coded data associated with the current block to be decoded at a decoder side;determining a target prediction refinement mode among multiple prediction refinement modes;deriving prediction refinement for a target prediction sample according to the target prediction refinement mode;refining the target prediction sample using the prediction refinement to generate a refined prediction sample; andencoding or decoding the current block by using prediction comprising the refined prediction sample.15.The method of Claim 14, wherein the multiple prediction refinement modes comprise one or more first methods of using a template region to derive model parameters for the prediction refinement, one or more second methods of directly using offline trained models for the prediction refinement, or one or more third methods of using different model formulas.16.The method of Claim 14, wherein if a prediction refinement enabling flag of the current block is true, a second flag or syntax is signalled or parsed after the prediction refinement enabling flag, and wherein the second flag or syntax is used for indicating which of the multiple prediction refinement modes is used for the current block.17.The method of Claim 14, wherein the target prediction refinement mode is selected from the multiple prediction refinement modes implicitly.18.The method of Claim 17, wherein the target prediction refinement mode is selected from the multiple prediction refinement modes implicitly by checking a block size or a QP value of the current block, or a motion vector difference between the current block and a neighbouring block.19.An apparatus for video coding, the apparatus comprising one or more electronic circuits or processors arranged to:receive input data associated with a current block, wherein the input data comprise pixel data for the current block to be encoded at an encoder side or coded data associated with the current block to be decoded at a decoder side;determine a target prediction refinement mode among multiple prediction refinement modes;derive prediction refinement for a target prediction sample according to the target prediction refinement mode;refine the target prediction sample using the prediction refinement to generate a refined prediction sample; andencode or decode the current block by using prediction comprising the refined prediction sample.