Method and apparatus of MV field derivation based on temporal motion vectors and TMVP refinement in video coding systems

By restricting MV refinement to specific stages and using spatial neighboring MVs, the complexity of TMVP is reduced, improving encoding and decoding efficiency in video coding systems.

WO2026153487A1PCT designated stage Publication Date: 2026-07-23MEDIATEK INC
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
MEDIATEK INC
Filing Date
2026-01-16
Publication Date
2026-07-23

AI Technical Summary

Technical Problem

The complexity of the MV refinement process for Temporal Motion Vector Prediction (TMVP) in video coding systems is high due to the extensive number of candidate lists and computations involved, which affects encoding and decoding efficiency.

Method used

The MV refinement process for TMVP is restricted to specific stages during candidate list generation and utilizes information from spatial neighboring MVs instead of conventional sample matching results, applying MV refinement only after certain rounds of reordering and based on template or bilateral matching costs, and considering POC distance and QP values.

Benefits of technology

This approach reduces the computational complexity of TMVP, enhancing encoding and decoding efficiency by optimizing the MV refinement process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026073069_23072026_PF_FP_ABST
    Figure CN2026073069_23072026_PF_FP_ABST
Patent Text Reader

Abstract

Methods and apparatus to reduce the complexity of the MV refinement process for TMVP are disclosed. According to one method, a candidate list comprising MVs is determined. The MVs in the candidate list are reordered according to a criterion. The reordering of MVs in the candidate list takes M rounds of reordering for generating a final candidate order, and MV refinement is only applied to one or more candidate MVs in the candidate list for TMVP after N-th round of reordering. A target candidate is selected from the candidate list in the final candidate order for coding the current block. According to another method, an initial MV for TMVP is determined. MV refinement is applied to the initial MV for the TMVP based on neighbouring MVs to derive a refined MV. The current block is coded using the refined MV or a candidate list comprising the refined MV.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD AND APPARATUS OF MV FIELD DERIVATION BASED ON TEMPORAL MOTION VECTORS AND TMVP REFINEMENT 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 / 746,307 filed on January 17, 2025 and U.S. Provisional Patent Application No. 63 / 778,469 filed on March 27, 2025. 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 using MV refinement for TMVP. In particular, the present invention relates to reducing the complexity of the MV refinement process for TMVP by restricting the MV refinement process to some stages during the candidate list generation process or by using information associated with spatial neighbouring MVs instead of the conventional sample matching results.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] Affine Merge Prediction

[0010] AF_MERGE mode can be applied for CUs with both width and height larger than or equal to 8. In this mode, the CPMVs (Control Point MVs) of the current CU is generated based on the motion information of the spatial neighbouring CUs. There can be up to five CPMVP (CPMV Prediction) candidates and an index is signalled to indicate the one to be used for the current CU. The following three types of CPMV candidate are used to form the affine merge candidate list: –Inherited affine merge candidates that are extrapolated from the CPMVs of the neighbour CUs –Constructed affine merge candidates CPMVPs that are derived using the translational MVs of the neighbour CUs –Zero MVs

[0011] In VVC, there are two inherited affine candidates at most, which are derived from the affine motion model of the neighbouring blocks, one from left neighbouring CUs and one from above neighbouring CUs. The candidate blocks are the same as those shown in Fig. 2. For the left predictor, the scan order is A0→A1, and for the above predictor, the scan order is B0→B1→B2. Only the first inherited candidate from each side is selected. No pruning check is performed between two inherited candidates. When a neighbouring affine CU is identified, its control point motion vectors are used to derive the CPMVP candidate in the affine merge list of the current CU. As shown in Fig. 3, if the neighbouring left bottom block A of the current block 310 is coded in affine mode, the motion vectors v2 , v3 and v4 of the top left corner, above right corner and left bottom corner of the CU 320 containing block A are attained. When block A is coded with 4-parameter affine model, the two CPMVs of the current CU (i.e., v0 and v1) are calculated according to v2, and v3. In case that block A is coded with 6-parameter affine model, the three CPMVs of the current CU are calculated according to v2 , v3 and v4.

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

[0013] After MVs of four control points are attained, affine merge candidates are constructed based on the motion information. The following combinations of control point MVs are used to construct in order: {CPMV1, CPMV2, CPMV3} , {CPMV1, CPMV2, CPMV4} , {CPMV1, CPMV3, CPMV4} , {CPMV2, CPMV3, CPMV4} , {CPMV1, CPMV2} , {CPMV1, CPMV3}

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

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

[0016] Subblock-based Temporal Motion Vector Prediction (SbTMVP)

[0017] VVC supports the subblock-based temporal motion vector prediction (SbTMVP) method. Similar to the temporal motion vector prediction (TMVP) in HEVC, SbTMVP uses the motion field in the collocated picture to improve motion vector prediction and merge mode for CUs in the current picture. The same collocated picture used by TMVP is used for SbTVMP. SbTMVP differs from TMVP in the following two main aspects: -TMVP predicts motion at CU level, but SbTMVP predicts motion at sub-CU level; whereas TMVP fetches the temporal motion vectors from the collocated block in the collocated picture (the collocated block is the bottom-right or centre block relative to the current CU) , SbTMVP applies a motion shift before fetching the temporal motion information from the collocated picture, where the motion shift is obtained from the motion vector from one of the spatial neighbouring blocks of the current CU. -The SbTMVP process is illustrated in Fig. 5 and Fig. 6. SbTMVP predicts the motion vectors of the sub-CUs within the current CU 612 in two steps in the current picture 610. In the first step, the spatial neighbour A1 in Fig. 6 is examined. If A1 has a motion vector 630 that uses the collocated picture 620 as its reference picture, this motion vector is selected to be the motion shift to be applied. If no such motion is identified, then the motion shift is set to (0, 0) . In the second step, the motion shift identified in Step 1 is applied (i.e. added to the current block’s coordinates) to obtain sub-CU level motion information (motion vectors and reference indices) from the collocated picture 620 as shown in Fig. 6. The example in Fig. 6 assumes the motion shift is set to block A1’s motion. Then, for each sub-CU, the motion information of its corresponding block 622 (the smallest motion grid that covers the centre sample) in the collocated picture is used to derive the motion information for the sub-CU. After the motion information of the collocated sub-CU is identified, it is converted to the motion vectors and reference indices of the current sub-CU in a similar way as the TMVP process of HEVC, where temporal motion scaling is applied to align the reference pictures of the temporal motion vectors to those of the current CU. In VVC, a combined subblock based merge list which contains both SbTMVP candidate and affine merge candidates is used for the signalling of subblock based merge mode. The SbTMVP mode is enabled / disabled by a sequence parameter set (SPS) flag. If the SbTMVP mode is enabled, the SbTMVP predictor is added as the first entry of the list of subblock based merge candidates, and followed by the affine merge candidates. The size of subblock based merge list is signalled in SPS and the maximum allowed size of the subblock based merge list is 5 in VVC. The sub-CU size used in SbTMVP is fixed to be 8x8, and as done for affine merge mode, SbTMVP mode is only applicable to the CU with both width and height are larger than or equal to 8. The encoding logic of the additional SbTMVP merge candidate is the same as for the other merge candidates, that is, for each CU in P or B slice, an additional RD check is performed to decide whether to use the SbTMVP candidate.

[0018] History-Parameter-Based Affine Model Inheritance and Non-Adjacent Affine Mode

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

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

[0021] A history-affine-parameter-based candidate (HAPC) is derived from one of the seven neighbouring 4×4 blocks denoted as A0, A1, A2, B0, B1, B2 or B3 in Fig. 4 and a set of affine parameters stored in a corresponding entry in the first HPT. The MV of a neighbouring 4×4 block serves as the base MV. The MV of the current block at position (x, y) can be calculated as: where (mvhbase, mvvbase) represents the MV of the neighbouring 4×4 block, (xbase, ybase) represents the centre position of the neighbouring 4×4 block. (x, y) can be the top-left, top-right and bottom-left corner of the current block to obtain the corner-position MVs (CPMVs) for the current block, or it can be the centre of the current block to obtain a regular MV for the current block.

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

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

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

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

[0026] The motion information of the non-adjacent spatial neighbours in Fig. 8A is utilized to generate additional inherited and constructed affine merge / AMVP candidates. Specifically, for inherited candidates, the derivation process of the inherited affine merge / AMVP candidates in the VVC is kept unchanged except that the CPMVs are inherited from non-adjacent spatial neighbours. The non-adjacent spatial neighbours are checked based on their distances to the current block (i.e., from near to far) . At a specific distance, only the first available neighbour (that is coded with the affine mode) from each side (e.g. the left and above) of the current block (block 810 in Fig. 8A and block 820 in Fig. 8B) is included for inherited candidate derivation. As indicated by the dashed arrows in Fig. 8A, the checking orders of the neighbours on the left and above sides are bottom-to-up and right-to-left, respectively. Figs. 8A-B illustrate examples of non-adjacent spatial neighbours for deriving affine merge mode (NSAM) , where the pattern of obtaining non-adjacent spatial neighbours is shown in Fig. 8A for deriving inherited affine merge candidates and in Fig. 8B for deriving constructed affine merge candidates.

[0027] For the first type of constructed candidates, as shown in the Fig. 8B, the positions of left and above non-adjacent spatial neighbours are firstly determined independently; after that, the location of the top-left neighbour can be determined accordingly, which can enclose a rectangular virtual block together with the left and above non-adjacent neighbours. Then, as shown in the Fig. 9, the motion information of the three non-adjacent neighbours is used to form the CPMVs at the top-left (A) , top-right (B) and bottom-left (C) of the virtual block, which is finally projected to the current CU to generate the corresponding constructed candidates.

[0028] The NA-AFF candidates are inserted into the existing affine merge candidate list and affine AMVP candidate list according to the following orders: Affine merge mode: 1. SbTMVP candidate, if available 2. Inherited from adjacent neighbours 3. Inherited from non-adjacent neighbours 4. Constructed from adjacent neighbours 5. The first type of constructed affine candidates from non-adjacent neighbours 6. Zero MVs Affine AMVP mode: 1. Inherited from adjacent neighbours 2. Constructed from adjacent neighbours 3. Translational MVs from adjacent neighbours 4. Translational MVs from temporal neighbours 5. Inherited from non-adjacent neighbours 6. The first type of constructed affine candidates from non-adjacent neighbours 7. Zero MVs

[0029] Due to the inclusion of the additional candidates generated by NA-AFF, the size of the affine merge candidate list is increased from 5 to 15. The subgroup size of ARMC for the affine merge mode is increased from 3 to 15.

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

[0031] Regression Based Affine Candidate Derivation

[0032] The Regression based Motion Vector Field (RMVF) derivation method provides a new variety of subblock-based merge candidate. The motion vectors and centre positions from the neighbouring subblocks of the current CU, as illustrated in Fig. 10, are used as the input to the linear regression process to derive a set of linear model parameters.

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

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

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

[0036] Adjacent subblock information of the current CU is fetched from 4x4 sub-blocks represented by the grey zone as depicted in Fig. 10. For each sub-block, given a reference list, the corresponding motion vector and centre coordinate of the sub-block may be used.

[0037] For each affine CU, up to 2 affine candidates can be derived. One with adjacent subblock information and one without. All the linear-regression-generated candidates are pruned and collected into one candidate sub-group, and TM cost based ARMC process is applied when ARMC is enabled. Afterwards, up to N linear-regression-generated candidates are added to the affine merge list when N affine CUs are found. The number of affine candidates for ARMC is 30, the output list size is 15.

[0038] MVP Extension (JVET-AI0183)

[0039] In JVET-AI0183, additional candidates using a selected reference picture with a scaled MV is proposed. For merge candidates, it adds a candidate before the default zero MV candidates with the reference index 1 when the existing candidates in the merge list has reference index 0, otherwise it adds a candidate with the reference index 0.

[0040] For TMVP and SbTMVP, it adds a candidate with a reference picture corresponding to the collocated block’s reference picture and the collocated MV is scaled accordingly, if the picture is not in the reference picture list of the current block, it selects a reference picture between the collocated picture and the collocated reference picture with the largest POC distance to the current picture.

[0041] Finally, it adds a bi-TMVP candidate (MV0, MV1 as shown in Fig. 11) after HMVP if a motion trajectory between a block in a reference picture and its reference block crosses the current block. For a given MV shown in a dashed line, which is a reference block MV, a pair of MV0 and MV1 is constructed and if it crosses the current block then those MVs are used as bi-TMVP.

[0042] JVET-AG0091: EE2-1.8: Auto-Relocated Block Vector Prediction

[0043] In EE2-1.8, auto-relocated block vector prediction (AR-BVP) is introduced into IBC merge / AMVP candidate list construction.

[0044] As shown in Fig. 12, a guiding block vector BV0, 1 associated with the current block B0 points to a reference block B1. If B1 has a BV denoted as BV1, 2 pointing to a reference block B2, then BV0, 2, given by BV0, 2 = BV0, 1 +BV1, 2, is defined as the AR-BVP, guided by BV0, 1. Similarly, BV0, n+1 can be derived by BV0, n+1 =BV0, n+BVn, n+1 = BV0, 1+BV1, 2 +…+BVn-1, n +BVn, n+1.

[0045] Three tests are conducted in this EE. In EE2-1.8a, the length of the AR-BVP trace path is 1 (i. e, n=1) . In EE2-1.8b, the length of the AR-BVP trace path is 2 (i. e, n=2) . In EE2-1.8c, there is no constraint for the length of the AR-BVP trace path.

[0046] When deriving BVn, n+1 guided by BV0, n, all five positions including top-left (e.g., LT in Fig. 13) , top-right (e.g., RT in Fig. 13) , centre (e.g., Ctr in Fig. 13) , bottom-left (e.g., LB in Fig. 13) , and bottom-right (e.g., RB in Fig. 13) positions of Bn are checked to find BVn, n+1.

[0047] In the proposed implementation, the initial guiding block vector BV0, 1 is set to be an existing BVP already in the IBC merge / AMVP candidate list.

[0048] The AR-BVP candidates are inserted after the HBVP candidates. The IBC merge / AMVP candidate list size is kept unchanged.

[0049] JVET-AG0073: Non-EE2: Chained Motion Vector Prediction

[0050] This contribution introduces a chained MV prediction (CMVP) into inter merge candidate list construction.

[0051] As shown in Fig. 14, CMVP candidates can be derived as the sum of the recursively traced MVs and BVs based on the pre-derived MVs for the inter merge candidate list. For instance, for a CMVP candidate, a set of motion vector MVk / m and reference picture RefPick / m can be derived by: MVk / m = MVk (0) + BVk (0) + MVk (1) +MVk (2) + …+ MVk (m) , RefPick / m = RefPick (m) , where k and m indicate the number of merge index and trace depths of the CMVP.

[0052] When deriving MVk / m, MVk (m) is found by checking the existence of MVs or BVs in MV / BV storage corresponding to all five position of the current block as shown in Fig. 15 (i.e., the centre, top-left, top-right, bottom-left, and bottom-right of the current block) .

[0053] When pre-derived merge candidates targeting CMVP candidates has two MVs, a MVk / m is derived for each list (i.e., L0 and L1) and each trace depth. Up to two MVs can be derived for each list and each trace depth, and the MV set is sequentially inserted into inter merge candidate list.

[0054] The traceable reference pictures are only within the reference picture list.

[0055] CMVP candidates are inserted after HMVP candidates for the regular merge and TM merge.

[0056] When deriving CMVP candidates, hpelIfIdx, bcwIdx, licFlag, and mhpFlag are not inherited. CMVP candidates are not derived when the TMVP is disabled.

[0057] JVET-AK0186: Non-EE2: Subblock-Based Spatial MVP

[0058] JVET-AK0186proposes a method of subblock-based spatial MVP (sbSMVP) to derive the subblock motion field from spatial neighbour blocks. The subblock motion field of the current CU can be inherited based on the motion of the spatial neighbour blocks. Examples of different sbSMVP candidate types, in which MVs of subblocks are inherited in a directional way, are shown in Fig. 16, where horizontal rightward direction (1610) , vertical downward direction (1620) , down-right diagonal direction (1630) , up-right diagonal direction with extended left boundary (1640) , and down-left diagonal direction with extended above boundary (1650) .

[0059] The method of sbSMVP is implemented as additional candidates in the subblock merge candidate list. In the following test, up to 5 SbSMVP candidates are added between sbTMVP candidates and affine merge candidates. If a certain SbSMVP candidate is selected, the motion data, such as motion vectors, reference indices, and prediction direction, of the corresponding neighbouring subblocks are copied to the current subblocks along a predefined direction, as depicted by the arrows in Fig. 16.

[0060] All the subblock motion candidates including sbTMVP candidates, sbSMVP candidates and affine candidates are reordered in the same way as the current ECM. Same as ECM, 20 candidates are sorted for the merge index signalling. There is no extra signalling required for the proposed method.

[0061] JVET-AK0199: Non-EE2: MV Refinement for TMVP

[0062] In JVET-AK0199, it is proposed to apply MV refinement for TMVP. The MV refinement is performed for a reference picture using collocated block as a template and the scaled collocated MV as a starting point, wherein the scaling factor is (reference picture POC –collocated picture POC)  /  (collocated reference picture POC –collocated picture POC) . A refined MV is determined by checking SATD cost between a reference template in the reference picture and the collocated block in the collocated picture. The refined MV which has the minimum SATD cost is scaled to derive TMVP MV for the current block, wherein, the scaling factor is (reference picture POC –current picture POC)  /  (reference picture POC –collocated picture POC) . When a TMVP candidate has two MVs, it derives each refined MV independently.

[0063] JVET-AJ2025: Adaptive reordering of merge candidates with template matching (ARMC-TM)

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

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

[0066] Cost Calculation

[0067] The template matching cost of a merge candidate during the reordering process is measured by the SATD between samples of a template of the current block and their corresponding reference samples. The template comprises a set of reconstructed samples neighbouring to the current block. Reference samples of the template are located by the motion information of the merge candidate. When a merge candidate utilizes bi-directional prediction, the reference samples of the template of the merge candidate are also generated by bi-prediction as shown in Fig. 17. In Fig. 17, block 1712 corresponds to a current block in current picture 1710, blocks 1722 and 1732 correspond to reference blocks in reference pictures 1720 and 1730 in list 0 and list 1 respectively. Templates 1714 and 1716 are for current block 1712, templates 1724 and 1726 are for reference block 1722, and templates 1734 and 1736 are for reference block 1732. Motion vectors 1740, 1742 and 1744 are merge candidates in list 0 and motion vectors 1760, 1762 and 1764 are merge candidates in list 1.

[0068] Refinement of the Initial Merge Candidate List

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

[0070] For subblock-based merge candidates with subblock size equal to Wsub × Hsub, the above template comprises several sub-templates with the size of Wsub × 1, and the left template comprises several sub-templates with the size of 1 × Hsub. As shown in Fig. 18, the motion information of the subblocks in the first row and the first column of current block is used to derive the reference samples of each sub-template. In Fig. 18, the motion information of the subblocks in the first row and the first column of current block is used to derive the reference samples of each sub-template. In Fig. 18, block 1812 corresponds to a current block in current picture 1810 and block 1822 corresponds to a collocated block in reference picture 1820.

[0071] Reordering Criteria

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

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

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

[0075] The value of λ is set equal to the λ of the rate distortion criterion used to select the best merge candidate at the encoder side for low delay configuration and to the value λ corresponding to another QP for Random Access configuration. A set of λ values corresponding to each signalled QP offset is provided in the SPS or in the Slice Header for the QP offsets which are not present in the SPS.

[0076] Extension to AMVP Modes

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

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

[0079] In the present invention, methods and apparatus to reduce the complexity of the MV refinement process for TMVP are disclosed. BRIEF SUMMARY OF THE INVENTION

[0080] A method and apparatus for video coding incorporating the MV refinement process for TMVP 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 candidate list comprising one or more MVs (Motion Vectors) is determined. Said one or more MVs in the candidate list are reordered according to a criterion, wherein said reordering said one or more MVs in the candidate list takes M rounds of reordering for generating a final candidate order, and MV refinement is only applied to one or more candidate MVs in the candidate list for TMVP (Temporal MV Prediction) after N-th round of reordering, and wherein M and N are positive integers and N is smaller than or equal to M. A target candidate is selected from the candidate list in the final candidate order. The current block is encoded or decoded according to the target candidate selected.

[0081] In one embodiment, the MV refinement is only applied in one or more stages during said generating the final candidate order. In one embodiment, said one or more stages correspond to a last stage, a second last stage, or last two stages during said generating the final candidate order.

[0082] In one embodiment, the MV refinement is based on template matching costs, bilateral matching costs, or a combination thereof.

[0083] In one embodiment, a process for the MV refinement corresponds to affine CPMV refinement process based on template matching costs, bilateral matching costs, or a combination thereof.

[0084] In one embodiment, the MV refinement is only applied to said one or more candidate MVs in the candidate list for TMVP after the final candidate order is generated. In one embodiment, at the decoder side, only when a final candidate used to predict the current block is a TMVP candidate, the MV refinement is applied to the final candidate.

[0085] In one embodiment, the MV refinement is only applied to said one or more candidate MVs in the candidate list for TMVP if POC (Picture Order Count) distance between a collocated picture and a current reference picture is smaller than a threshold. In one embodiment, a search range associated with the MV refinement is dependent on the POC distance between the collocated picture and the current reference picture, or a current QP (Quantization Parameter) value.

[0086] According to another 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. An initial MV (Motion Vector) for TMVP (Temporal MV Prediction) is determined. MV refinement is applied to the initial MV for the TMVP based on one or more neighbouring MVs (Motion Vectors) to derive a refined MV.The current block is encoded or decoded using the refined MV or a candidate list comprising the refined MV.

[0087] In one embodiment, the refined MV is derived based on similarity of said one or more neighboring MVs. In one embodiment, the similarity of said one or more neighboring MVs comprises similarity in MV magnitudes or MV signs of said one or more neighboring MVs. In one embodiment, the similarity of said one or more neighboring MVs comprises similarity in BCW (Bi-prediction with CU-level Weighting) indexes, LIC (Local Illumination Compensation) Flags, partition depth, or prediction modes of said one or more neighboring MVs.BRIEF DESCRIPTION OF THE DRAWINGS

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

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

[0090] Fig. 2 illustrates the neighbouring blocks used for deriving spatial merge candidates for VVC.

[0091] Fig. 3 illustrates an example of derivation for inherited affine candidates based on control-point MVs of a neighbouring block.

[0092] Fig. 4 illustrates an example of affine candidate construction by combining the translational motion information of each control point from spatial neighbours and temporal.

[0093] Fig. 5 illustrates an example of spatial neighbouring blocks used by SbTMVP.

[0094] Fig. 6 illustrates an example of deriving sub-CU motion field by applying a motion shift from spatial neighbour and scaling the motion information from the corresponding collocated sub-CUs.

[0095] Fig. 7A illustrates an example of first history-parameter table (HPT) , where each entry of the first HPT stores a set of affine parameters.

[0096] Fig. 7B illustrates an example of second history-parameter table (HPT) with base MV information also appended.

[0097] Figs. 8A-B illustrate examples of non-adjacent spatial neighbours for deriving affine merge mode (NSAM) , where the pattern of obtaining non-adjacent spatial neighbours is shown in Fig. 8A for deriving inherited affine merge candidates and in Fig. 8B for deriving constructed affine merge candidates.

[0098] Fig. 9 illustrates an example of constructed affine candidates according to non-adjacent neighbours, where the motion information of the three non-adjacent neighbours at locations A, B and C is used to form the CPMVs.

[0099] Fig. 10 illustrates an example of neighbouring 4 x 4 subblocks used for RMVF parameter derivation, where W and H are the width and height of the current CU.

[0100] Fig. 11 illustrates an example of adding a bi-TMVP candidate (MV0, MV1) after HMVP if a motion trajectory between a block in a reference picture and its reference block crosses the current block.

[0101] Fig. 12 illustrates an example of how to derive AR-BVP (Auto-Relocated Block Vector Prediction) .

[0102] Fig. 13 illustrates an example of five spatial locations checked for block Bn in order to derive block vector BVn, n+1.

[0103] Fig. 14 illustrates an example of CMVP (Chained MVP) candidates derived as the sum of the recursively traced MVs and BVs based on the pre-derived MVs for the inter merge candidate list.

[0104] Fig. 15 illustrates an example of deriving MVk (m) by checking the existence of MVs or BVs in MV / BV storage corresponding to all five positions of the current block.

[0105] Fig. 16 illustrates examples of subblock-based Spatial MVP (sbSMVP) , where the MVs are inherited along the direction of horizontal, vertical, diagonal-TL, diagonal-BL and diagonal-TR.

[0106] Fig. 17 illustrates an example of template and reference samples of the template in reference pictures for adaptive reordering of merge candidates with template matching (ARMC-TM) .

[0107] Fig. 18 illustrates an example of template and reference samples of the template for block with sub-block motion using the motion information of the subblocks of the current block.

[0108] Fig. 19 illustrates a flowchart of an exemplary video coding system that restricts the MV refinement process for TMVP to some stages during the candidate list generation process according to an embodiment of the present invention.

[0109] Fig. 20 illustrates a flowchart of an exemplary video coding system, where the MV refinement process for TMVP uses information associated with spatial neighbouring MVs instead of the conventional sample matching results according to an embodiment of the present invention.DETAILED DESCRIPTION OF THE INVENTION

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

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

[0112] Subblock Motion Field Derived by Temporal Motion Information

[0113] In JVET-AK0186, the subblock motion field of the current CU is derived by spatial neighbouring blocks.

[0114] In some embodiments, the subblock motion field of the current CU can be derived by temporal motions information.

[0115] For example, a MV referenced from a spatial neighbouring block, or a non-adjacent neighbouring block is used to find a referenced block (refBlk0) in a referenced picture (refPic0) . After that, the corresponding neighbouring blocks’ MVs of refBlk0 are used to derive the subblock motion field of the current CU. In that, MV scaling is performed. The scaling factor is derived based on current picture POC, current reference picture POC, refPic0 POC, and the reference picture’s POC of the neighbouring block of refBlk0.

[0116] For another example, the above-mentioned MV referenced from a spatial neighbouring block, or a non-adjacent neighbouring block can also be a history-based MV, a chained motion vector prediction (CMVP) , or a bi-TMVP.

[0117] In some embodiments, the subblock motion field of the current CU can be derived by some BV guided blocks.

[0118] For example, a BV uses to point to a reference block in the current picture which is already decoded. After that, the corresponding neighbouring blocks of the referenced block pointed by the BV can be used to derive the subblock motion filed of the current CU.

[0119] For another example, a combined BV uses to point to a reference block in the current picture which is already decoded. The combined BV is derived by fusing more than one BVs. After that, the corresponding neighbouring blocks of the referenced block pointed by the combined BV can be used to derive the subblock motion filed of the current CU.

[0120] The above-mentioned BV can be from an intraTMVP or IBC coded block.

[0121] In some embodiments, if the spatial neighbouring blocks’ MVs are not available, i.e., the blocks are coded by intra prediction, some default MVs can be used for sbSMVP mode.

[0122] For example, zero MV can be used as a default motion.

[0123] For another example, zero MV with reference picture index equal to 0 can be used as a default motion.

[0124] For another example, zero MV with reference picture with POC closet to the current picture can be used as a default motion.

[0125] For another example, the first left available motion, the first right available motion, the first top available motion or the first bottom available motion can be used as a default motion.

[0126] For another example, the combination of neighbouring available motions can be used as default motions, i.e., (the first left available motion + the first right available motion) >> 1

[0127] MV Refinement for TMVP

[0128] In JVET-AK0199, a MV refinement for TMVP is proposed. In that, sample matching of reference block in collocated picture and the corresponding reference block in current reference picture is performed.

[0129] In some embodiments, the refined MV derivation for TMVP can be performed according to spatial neighbouring MVs, not according to sample matching result.

[0130] For example, the MV magnitudes, or MV signs of neighbouring MVs can be considered. In that, a refined MV with most similar behaviour of neighbouring MVs will be selected.

[0131] For example, the BCW (Bi-prediction with CU-level Weighting) indexes, LIC (Local Illumination Compensation) Flags, partition depth, or prediction modes of neighbouring MVs can be considered. In that, a refined MV with most similar neighbouring MVs behaviour will be selected.

[0132] In some embodiments, the TMVP refinement can also be applied on a chain-motion vector prediction. In that, before scaling a chain-motion vector to current reference picture, the TMVP refinement is performed.

[0133] It can be constrained that only one temporal motion in a chain-motion vector trajectory can perform the TMVP refinement, but not limit to.

[0134] It can be constrained that only when the POC distance between collocated picture and current reference picture is smaller than a threshold (i.e., 2) , the TMVP refinement can be performed, but not limit to.

[0135] In some embodiments, the search range of TMVP refinement can be designed based on the POC distance between collocated picture and current reference picture, or current QP value.

[0136] In some embodiments, the collocated blocks and current reconstructed templates are both used to perform TMVP refinement. In that, the cost function of TMVP refinement will include the difference term 0 calculated by the refined block and the collocated block and the difference term 1 calculated by the reconstructed templates of current block and the templates of the collocated block.

[0137] In some embodiments, the collocated blocks and current reconstructed templates are both used to perform TMVP refinement. In that, the cost function of TMVP refinement will include the difference term 0 calculated by the refined block and the collocated block, and the difference term 1 calculated by the reconstructed templates of current block and the templates of the final referenced block after refinement. In that, the final referenced block is derived with MV scaling.

[0138] In some embodiments, the refined MV derivation for TMVP can only be applied after merge candidate list reordering. In that, the MV refinement does not need to be applied to all the candidates in merge candidate list. In the decoder, MV refinement is performed only when the final prediction candidate for the current block is a TMVP candidate.

[0139] In some embodiments, the above-mentioned refined MV derivation for TMVP can be any kind of refined MV derivation. For example, spatial MVs, temporal MVs, non-adjacent MVs, history-based MVs, pairwise MVs, CMVPs, bi-TMVPs, or MMVDs, and so on.

[0140] In some embodiments, the above-mentioned MV refinement can be template matching based refinement, or bilateral matching based refinement, or the combination.

[0141] In some embodiments, the above-mentioned merge candidate list can be any candidate list. For example, MVP candidate list, affine merge candidate list, affine opposite merge candidate list, sbTMVP motion shift candidate list, regular merge candidate list, AMVP-merge candidate list, CIIP candidate list, MMVD candidate list, or GPM candidate list.

[0142] In some embodiments, when deriving the merge or MV candidate list, the MV refinement process is not applied before the candidate orders are determined. For example, the MV reordering, and candidate selection are applied to the unrefined candidates. After the candidate list is constructed and the candidate order is determined, MV refinement may be applied to the candidates. Thus, the decoder performs MV refinement solely on the final selected candidate, rather than refining all candidates in the list.

[0143] In some embodiments, the refined MV derivation for TMVP can only be applied after Nth merge candidate list reordering. In this approach, the final candidate ordering is obtained after performing M rounds of merge-candidate list reordering. The merge candidate used to code or decode the current block is then selected based on this final ordering. N can be any integer number smaller than or equal to M.

[0144] In some embodiments, the refined MV derivation for TMVP can only be applied on one or more stages during the merge list generation process. In that, the final candidate orders are determined after M rounds of merge candidate list reordering. The merge candidate selected for coding or decoding the current block is determined based on the finalized candidate ordering. The stage applied refined MV derivation can be the last stage, the second last stage, or last two stages during the merge list generation process.

[0145] In some embodiments, the above-mentioned refined MV derivation for TMVP can also be the MV refinement process based on template matching costs or bilateral matching costs, or any other refinement process.

[0146] In some embodiments, the above-mentioned refined MV derivation for TMVP can also be the affine CPMV refinement process based on template matching costs or bilateral matching costs, or any other refinement process.

[0147] In some embodiments, the above-mentioned refined MV derivation for TMVP can also be the MMVD refinement process based on template matching costs or bilateral matching costs, or any other refinement process.

[0148] Any of the foregoing proposed methods of MV refinement for TMVP can be implemented in encoders and / or decoders. For example, any of the proposed methods can be implemented in inter coding of an encoder, and / or a decoder. Alternatively, any of the proposed methods can be implemented as a circuit coupled to the inter coding of the encoder and / or the decoder, so as to provide the information needed by the inter coding.

[0149] With reference to the exemplary encoder and decoder in Fig. 1A and Fig 1B, the proposed methods can be implemented in the inter prediction modules. For example, in the encoder side, the required processing can be implemented as part of the Inter-Pred. unit 112 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 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 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 / prediction module. While the Inter-Pred. 112 in the encoder side and MC 152 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) ) .

[0150] Fig. 19 illustrates a flowchart of an exemplary video coding system that restricts the MV refinement process for TMVP to some stages during the candidate list generation process 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 1910, 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 candidate list comprising one or more MVs (Motion Vectors) is determined in step 1920. Said one or more MVs in the candidate list are reordered according to a criterion in step 1930, wherein said reordering said one or more MVs in the candidate list takes M rounds of reordering for generating a final candidate order, and MV refinement is only applied to one or more candidate MVs in the candidate list for TMVP (Temporal MV Prediction) after N-th round of reordering, and wherein M and N are positive integers and N is smaller than or equal to M. A target candidate is selected from the candidate list in the final candidate order in step 1940. The current block is encoded or decoded according to the target candidate selected in step 1950.

[0151] Fig. 20 illustrates a flowchart of an exemplary video coding system, where the MV refinement process for TMVP uses information associated with spatial neighbouring MVs instead of the conventional sample matching results according to an embodiment of the present invention. According to this method, input data associated with a current block is received in step 2010, 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. An initial MV (Motion Vector) for TMVP (Temporal MV Prediction) is determined. in step 2020 MV refinement is applied to the initial MV for the TMVP based on one or more neighbouring MVs (Motion Vectors) to derive a refined MV in step 2030. The current block is encoded or decoded using the refined MV or a candidate list comprising the refined MV in step 2040.

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

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

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

[0155] 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 a candidate list comprising one or more MVs (Motion Vectors) ;reordering said one or more MVs in the candidate list according to a criterion, wherein said reordering said one or more MVs in the candidate list takes M rounds of reordering for generating a final candidate order, and MV refinement is only applied to one or more candidate MVs in the candidate list for TMVP (Temporal MV Prediction) after N-th round of reordering, and wherein M and N are positive integers and N is smaller than or equal to M;selecting a target candidate from the candidate list in the final candidate order; andencoding or decoding the current block according to the target candidate selected.2.The method of Claim 1, wherein the MV refinement is only applied in one or more stages during said generating the final candidate order.3.The method of Claim 2, wherein said one or more stages correspond to a last stage, a second last stage, or last two stages during said generating the final candidate order.4.The method of Claim 1, wherein the MV refinement is based on template matching costs, bilateral matching costs, or a combination thereof.5.The method of Claim 1, wherein a process for the MV refinement corresponds to affine CPMV refinement process based on template matching costs, bilateral matching costs, or a combination thereof.6.The method of Claim 1, wherein the MV refinement is only applied to said one or more candidate MVs in the candidate list for TMVP after the final candidate order is generated.7.The method of Claim 6, wherein at the decoder side, only when a final candidate used to predict the current block is a TMVP candidate, the MV refinement is applied to the final candidate.8.The method of Claim 1, wherein the MV refinement is only applied to said one or more candidate MVs in the candidate list for TMVP if POC (Picture Order Count) distance between a collocated picture and a current reference picture is smaller than a threshold.9.The method of Claim 8, wherein a search range associated with the MV refinement is dependent on the POC distance between the collocated picture and the current reference picture, or a current QP (Quantization Parameter) value.10.An apparatus for video coding, the apparatus comprising one or more electronics 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 candidate list comprising one or more MVs (Motion Vectors) ;reorder said one or more MVs in the candidate list according to a criterion, wherein reordering process of said one or more MVs in the candidate list takes M rounds of reordering for generating a final candidate order, and MV refinement is only applied to one or more candidate MVs in the candidate list for TMVP (Temporal MV Prediction) after N-th round of reordering, and wherein M and N are positive integers and N is smaller than or equal to M;select a target candidate from the candidate list in the final candidate order; andencode or decode the current block according to the target candidate selected.11.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 an initial MV (Motion Vector) for TMVP (Temporal MV Prediction) ;applying MV refinement to the initial MV for the TMVP based on one or more neighbouring MVs (Motion Vectors) to derive a refined MV; andencoding or decoding the current block using the refined MV or a candidate list comprising the refined MV.12.The method of Claim 11, wherein the refined MV is derived based on similarity of said one or more neighboring MVs.13.The method of Claim 12, wherein the similarity of said one or more neighboring MVs comprises similarity in MV magnitudes or MV signs of said one or more neighboring MVs.14.The method of Claim 12, wherein the similarity of said one or more neighboring MVs comprises similarity in BCW (Bi-prediction with CU-level Weighting) indexes, LIC (Local Illumination Compensation) Flags, partition depth, or prediction modes of said one or more neighboring MVs.15.An apparatus for video coding, the apparatus comprising one or more electronics 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 an initial MV (Motion Vector) for TMVP (Temporal MV Prediction) ;apply MV refinement to the initial MV for the TMVP based on one or more neighbouring MVs (Motion Vectors) to derive a refined MV; andencode or decode the current block using the refined MV or a candidate list comprising the refined MV.