Method and apparatus of adaptive cost function selection for MV refinement and candidate reordering of merge mode in video coding

Adaptive cost function selection for motion vector refinement and merge candidate reordering in video coding systems addresses inefficiencies by tailoring cost functions to block characteristics, enhancing performance and resource utilization.

WO2025218539A1PCT designated stage Publication Date: 2025-10-23MEDIATEK INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/087927
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-22
Filing Date
2025-04-09
Publication Date
2025-10-23

AI Technical Summary

Technical Problem

Existing video coding systems, such as VVC, face inefficiencies in motion vector refinement and merge candidate reordering due to the use of fixed cost functions, which do not adapt to varying block sizes, aspect ratios, and coding parameters, leading to suboptimal performance.

Method used

Adaptive selection of cost functions for motion vector refinement and merge candidate reordering based on coding parameters like block size, aspect ratio, temporal ID, frame type, and variance, allowing for explicit or implicit determination of the most suitable cost function for each merge candidate.

Benefits of technology

Improves coding efficiency by optimizing motion vector refinement and merge candidate reordering, leading to better performance and reduced computational resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025087927_23102025_PF_FP_ABST
    Figure CN2025087927_23102025_PF_FP_ABST
Patent Text Reader

Abstract

A method and apparatus for video coding using adaptive selection of cost function for MV refinement and / or candidate reordering of merge candidates are disclosed. According to the method, a target cost function from multiple cost functions is determined, wherein the target cost function is selected for MV refinement of merge candidates in a merge candidate list and / or the target cost function is used for candidate reordering of the merge candidate list, and wherein at least two different cost functions are used for two different merge candidates. An initial MV of a target merge candidate is refined into a refined MV according to the target cost function or reordering multiple candidates in the merge candidate list into a reordered merge candidate list according to the target cost function. The current block is encoded or decoded by using coding information comprising the refined MV and / or the reordered merge candidate list.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD AND APPARATUS OF ADAPTIVE COST FUNCTION SELECTION FOR MV REFINEMENT AND CANDIDATE REORDERING OF MERGE MODE IN VIDEO CODINGCROSS 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 / 633,983, filed on April 15, 2024 and U.S. Provisional Patent Application No. 63 / 636,971, filed on April 22, 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 systems using merge candidates. In particular, the present invention relates to cost function selection for motion vector refinement or merge candidate reordering. BACKGROUND AND RELATED ART

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

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

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

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

[0007] According to VVC, an input picture is partitioned into non-overlapped square block regions referred as CTUs (Coding Tree Units) , similar to HEVC. Each CTU can be partitioned into one or multiple smaller size coding units (CUs) . The resulting CU partitions can be in square or rectangular shapes. Also, VVC divides a CTU into prediction units (PUs) as a unit to apply prediction process, such as Inter prediction, Intra prediction, etc.

[0008] The VVC standard incorporates various new coding tools to further improve the coding efficiency over the HEVC standard. Among various new coding tools, some coding tools relevant to the present invention are reviewed as follows.

[0009] 1. Multi-Pass Decoder-Side Motion Vector Refinement (MP-DMVR)

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

[0011] First pass –Block based bilateral matching MV refinement

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

[0013] BM performs local search to derive integer sample precision intDeltaMV. The local search applies a 3×3 square search pattern to loop through the search range [–sHor, sHor] in the horizontal direction and [–sVer, sVer] in the vertical direction, wherein, the values of sHor and sVer are determined by the block dimension, and the maximum value of sHor and sVer is 8.

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

[0015] The existing fractional sample refinement is further applied to derive the final deltaMV. The refined MVs after the first pass are then derived as: MV0_pass1 = MV0 + deltaMV MV1_pass1 = MV1 –deltaMV

[0016] Second pass –Subblock based bilateral matching MV refinement

[0017] In the second pass, a refined MV is derived by applying BM to a 16×16 grid subblock. For each subblock, a refined MV is searched around the two MVs (e.g. MV0_pass1 and MV1_pass1) , obtained during the first pass, in the reference picture list L0 and L1. The refined MVs (i.e., MV0_pass2 (sbIdx2) and MV1_pass2 (sbIdx2) ) are derived based on the minimum bilateral matching cost between the two reference subblocks in L0 and L1.

[0018] For each subblock, BM performs full search to derive integer sample precision intDeltaMV. The full search has a search range [–sHor, sHor] in the horizontal direction and [–sVer, sVer] in the vertical direction, wherein, the values of sHor and sVer are determined by the block dimension, and the maximum value of sHor and sVer is 8.

[0019] The bilateral matching cost is calculated by applying a cost factor to the SATD cost between two reference subblocks, as: bilCost = satdCost *costFactor. The search area (2*sHor + 1) * (2*sVer + 1) is divided up to 5 diamond shape search regions shown on Fig. 2, where the 5 search regions are shown in 5 different shades. Each search region is assigned a costFactor, which is determined by the distance (intDeltaMV) between each search point and the starting MV, and each diamond region is processed in the order starting from the centre of the search area. In each region, the search points are processed in the raster scan order starting from the top left going to the bottom right corner of the region. When the minimum bilCost within the current search region is less than a threshold equal to sbW *sbH, the int-pel full search is terminated; otherwise, the int-pel full search continues to the next search region until all search points are examined. Additionally, if the difference between the previous minimum cost and the current minimum cost in the iteration is less than a threshold that is equal to the area of the block, the search process terminates.

[0020] The existing VVC DMVR fractional sample refinement is further applied to derive the final deltaMV (sbIdx2) . The refined MVs at second pass is then derived as: ● MV0_pass2 (sbIdx2) = MV0_pass1 + deltaMV (sbIdx2) ● MV1_pass2 (sbIdx2) = MV1_pass1 –deltaMV (sbIdx2)

[0021] Third pass –Subblock based bi-directional optical flow MV refinement

[0022] In the third pass, a refined MV is derived by applying BDOF to an 8×8 grid subblock. For each 8×8 subblock, BDOF refinement is applied to derive scaled Vx and Vy without clipping starting from the refined MV of the parent subblock of the second pass. The derived bioMv (Vx, Vy) is rounded to 1 / 16 sample precision and clipped between -32 and 32.

[0023] The refined MVs (e.g. MV0_pass3 (sbIdx3) and MV1_pass3 (sbIdx3) ) at third pass are derived as: ● MV0_pass3 (sbIdx3) = MV0_pass2 (sbIdx2) + bioMv ● MV1_pass3 (sbIdx3) = MV0_pass2 (sbIdx2) –bioMv

[0024] Fourth pass –Adaptive subblock based bi-directional optical flow MV refinement

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

[0026] In all aforementioned sub-clauses, when wrap around motion compensation is enabled, the motion vectors shall be clipped with wrap around offset taken into consideration. It is noted that in ECM, the DMVR is extended to non-equal POC distance cases, and the mean removed equations are utilized to derive the BDOF MV refinement parameters as: (∑Gx·Gx+R1) *vx + ∑Gx·Gy *vy = ∑dI ·Gx → (∑Gx·Gx+R1) *vx + ∑Gx·Gy *vy = ∑dI ·Gx -dM ·∑Gx ∑Gx·Gy *vx + (∑Gy·Gy+R1) *vy= ∑dI ·Gy → ∑Gx·Gy *vx + (∑Gy·Gy+R1) *vy = ∑dI ·Gy -dM ·∑Gy

[0027] 2. Adaptive Decoder-Side Motion Vector Refinement

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

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

[0030] 3. Sample-based BDOF

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

[0032] The coding block is divided into 8×8 subblocks. For each subblock, whether to apply BDOF or not is determined by checking the SAD between the two reference subblocks against a threshold. If decided to apply BDOF to a subblock, for every sample in the subblock, a sliding 5×5 window is used and the existing BDOF process is applied for every sliding window to derive Vx and Vy. The derived motion refinement (Vx, Vy) is applied to adjust the bi-predicted sample value for the centre sample of the window.

[0033] 4. Adaptive Reordering of Merge Candidates with Template Matching (ARMC-TM)

[0034] The merge candidates are adaptively reordered according to costs evaluated using template matching (TM) . The reordering method can be applied to the regular merge mode, template matching (TM) merge mode, and affine merge mode (excluding the SbTMVP candidate) . For the TM merge mode, merge candidates are reordered before the refinement process.

[0035] An initial merge candidate list is firstly constructed according to given checking order, such as spatial, TMVPs, non-adjacent, HMVPs, pairwise, and virtual merge candidates. Then, the candidates in the initial list are divided into multiple 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.

[0036] Cost calculation

[0037] The template matching cost of a merge candidate during the reordering process is measured according to the SAD 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. 3. In Fig. 3, block 312 corresponds to a current block in current picture 310, blocks 322 and 332 correspond to reference blocks in reference pictures 320 and 330 in list 0 and list 1 respectively. Templates 314 and 316 are for current block 312, templates 324 and 326 are for reference block 322, and templates 334 and 336 are for reference block 332. Motion vectors 340, 342 and 344 are merge candidates in list 0 and motion vectors 360, 362 and 364 are merge candidates in list 1.

[0038] Refinement of the initial merge candidate list

[0039] When multi-pass DMVR is used to derive the refined motion for 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 wide with block width greater than 2 times of the height, or narrow with block height greater than 2 times of the 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.

[0040] 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. 4, 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. 4, block 412 corresponds to a current block in current picture 410 and block 422 corresponds to a collocated block in reference picture 420.

[0041] Reordering criteria

[0042] 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, such as |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.

[0043] The ARMC-TM 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 to 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 λ) .

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

[0045] 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 a 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.

[0046] Extension to AMVP modes

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

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

[0049] 5. MV Candidate Type Based ARMC

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

[0051] In the present invention, schemes to adaptively select cost function for MV refinement and / or candidate reordering of merge candidates are disclosed. BRIEF SUMMARY OF THE INVENTION

[0052] A method and apparatus for video coding using adaptive selection of cost function for MV refinement and / or candidate reordering of merge candidates are disclosed. According to the method, input data associated with a current block are received, where the input data comprise pixel data for the current block to be encoded at an encoder side or encoded data associated with the current block to be decoded at a decoder side. A target cost function from multiple cost functions is determined, wherein the target cost function is selected for MV (Motion Vector) refinement of merge candidates in a merge candidate list and / or the target cost function is used for candidate reordering of the merge candidate list, and wherein at least two different cost functions are used for two different merge candidates. An initial MV of a target merge candidate is refined into a refined MV according to the target cost function or multiple candidates in the merge candidate list are reordered into a reordered merge candidate list according to the target cost function. The current block is encoded or decoded by using coding information comprising the refined MV and / or the reordered merge candidate list.

[0053] In one embodiment, the target cost function is selected from the multiple cost functions implicitly. In one embodiment, the target cost function is selected from the multiple cost functions according to coding parameters associated with the current block. In one embodiment, the coding parameters comprise block size, aspect ratio, temporal ID, frame type, variance, merge index associated with the current block, or a combination thereof. In one embodiment, when the coding parameters comprise the block size, different on / off setting of coding tools are determined for the current block for different sizes of the current block. In one embodiment, when the coding tools comprise BDOF (Bi-Directional Optical Flow) , the BDOF is enabled for the current block if width and height of the current block are greater than or equal to a first threshold, or aspect ratio calculated by dividing the width by the height is greater than a second threshold; otherwise, the BDOF is disabled.

[0054] In one embodiment, weighted SAD (Sum of Absolute Differences) is used as the target cost function when width and height of the current block are greater than a first threshold or aspect ratio calculated by dividing the width by the height is greater than a second threshold; otherwise, SAD is used as the target cost function.

[0055] In one embodiment, the target cost function is selected from the multiple cost functions by explicit signalling. For example, one index to select a specified cost function for a specific merge mode is explicitly signalled or parsed, and wherein the specified cost function is used to perform first-stage and second-stage candidate reordering in ARMC (Adaptive Reordering of Merge Candidates) for the specified merge mode. In another example, two indexes to select a first specified cost function and a second specified cost function for a specific merge mode are explicitly signalled or parsed, and the first specified cost function is used to perform first-stage candidate reordering in ARMC and the second specified cost function is used to perform second-stage candidate reordering in the ARMC for the specified merge mode.

[0056] In yet another example, three indexes to select a first specified cost function, a second specified cost function, and a third specified cost function for a specific merge mode or all merge modes are explicitly signalled or parsed, and the first specified cost function and the second specified cost function are used to perform first-stage candidate reordering in ARMC (and the third specified cost function is used to perform second-stage candidate reordering in the ARMC for the specified merge mode. In this case, the first specified cost function is used to sort the merge candidates in the merge candidate list to form a first-sorted merge candidate list and the second specified cost function is then used to sort a sublist of the first-sorted merge candidate list, and wherein the sublist of the first-sorted merge candidate list corresponds to a modular set for target candidate / candidates having a same remainder after applying a modular operation to merge indexes of the merge candidates in the first-sorted merge candidate list. Furthermore, the third specified cost function is used to sort second-sorted candidates formed by the first-sorted merge candidate list with the sublist of the first-sorted merge candidate list sorted by the second specified cost function.

[0057] In one embodiment, syntax for selecting the target cost function from the multiple cost functions is used for each merge candidate or shared by multiple merge candidates. In one embodiment, the explicit signalling is at a sequence level, frame level, CTU level, CU level, or a combination thereof.

[0058] In one embodiment, a first target cost function is determined for first MV refinement of first merge candidates in a first merge candidate list prior to target candidate reordering and a second target cost function is determined for second MV refinement of second merge candidates in a second merge candidate list after the target candidate reordering. In one embodiment, the first target cost function is the same as the second target cost function. In one embodiment, the first target cost function is different from the second target cost function.BRIEF DESCRIPTION OF THE DRAWINGS

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

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

[0061] Fig. 2 illustrates an example of diamond-shaped regions in the search area, where the search area is divided into 5 diamond-shaped regions.

[0062] Fig. 3 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) .

[0063] Fig. 4 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.

[0064] Fig. 5 illustrates an example of how to divide merge candidate list into 3 sublists according to an embodiment of the present invention.

[0065] Fig. 6 illustrates an example of a first-stage reordering of ARMC according to an embodiment of the present invention, where all the merge candidates are sorted according to SAD and then a sublist associated with a modular remainder is sorted by weighted SAD.

[0066] Fig. 7 illustrates an example of a second-stage reordering by combining a first sublist associated with (merge index) mod 2 == 1 sorted according to SAD and a second sublist associated with (merge index) mod 2 == 0 sorted according to weighted SAD.

[0067] Fig. 8 illustrates a flowchart of an exemplary video coding system that adaptively selects cost function for MV refinement and / or candidate reordering of merge candidates according to an embodiment of the present invention.DETAILED DESCRIPTION OF THE INVENTION

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

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

[0070] In the current implementation of ECM, the cost function used to refine the motion vector of merge candidates in the merge candidate list is fixed. One idea behind the present invention is to use different cost functions for different merge candidates to refine motion vector and the different cost functions may achieve better performance. Therefore, we propose to explicitly signal or implicitly derive the cost function used for each merge candidate in the candidate list. The idea is similar to candidate reordering of merge candidates.

[0071] Method 1: Adaptive Cost Function Selection for MV Refinement of Merge Mode

[0072] The cost function for MV refinement can be SAD, weighted SAD, SSE, weighted SSE, SATD and weighted SATD.

[0073] The proposed Methods 1-1 to 1-8 can be applied to regular merge mode, template matching merge mode, bilateral matching merge mode, and affine merge mode.

[0074] Method 1-1

[0075] We propose to use merge index mod N to indicate the cost function that is used to refine the corresponding merge candidate or use merge index mod N to indicate whether a specific coding tool is enabled. The N is a positive integer and “mod” represents modulo operation. The “merge index mod N” operation will result in a remainder between 0 and (N-1) . Accordingly, the “merge index mod N” operation will divide the merge candidates into N sets (named N modular sets) . Note that the cost function can be implicitly derived at the decoder side by using a merge index. In one embodiment, SAD is used as the cost function when the merge index is an even number; otherwise, weighted SAD is used. In another embodiment, SAD is used when the merge index mod 3 equals 0, weighted SAD is used when the merge index mod 3 equals 1, and SSD is used when the merge index mod 3 equals 2. In yet another embodiment, SAD is used as the cost function with BDOF enabled when the merge index mod 2 equals 0, while weighted SAD is used with BDOF disabled when the merge index mod 2 equals 1.

[0076] Method 1-2

[0077] We propose dividing the merge candidate list into multiple sublists and applying different cost functions to merge candidates in each sublist. The cost function can be implicitly derived on the decoder side using the merge index.

[0078] For example, assume the original merge candidate list contains 12 candidates. We divide this list into three sublists, as illustrated in the following figure. The first sublist uses SAD as the cost function, while the second sublist uses SSD.

[0079] The cost function of the third sublist is SATD. Additionally, different on / off settings of coding tools can be applied to merge candidates in different sublists. For example, assume the original merge candidate list contains 12 candidates. We divide this list into three sublists. The first sublist uses SAD as the cost function, while the second sublist uses SSD.

[0080] The cost function of the third sublist is SATD. BDOF is enabled for the first and the second sublists while disabled for the third sublist.

[0081] Fig. 5 illustrates an example how to divide merge candidate list into 3 sublists.

[0082] Method 1-3

[0083] We propose to implicitly derive the cost function for MV refinement according to the size of the current PU / CU. Namely, we use different cost functions for PU / CU with different size. There is an example embodiment:

[0084] Weighted SAD is used as the cost function when width and height of current PU / CU are larger than or equal to a given threshold; otherwise SAD is used as the cost function. Note that we can also use different on / off settings of coding tools for PU / CU with different sizes. An exemplary embodiment is shown as follow: - Weighted SAD is used as the cost function when width and height of current PU / CU are larger  than or equal to a given threshold; otherwise SAD is used as the cost function. BDOF is enabled when width and height of current PU / CU are larger than or equal to a given threshold; otherwise it is disabled.

[0085] Method 1-4

[0086] We propose to implicitly derive the cost function for MV refinement according to the aspect ratio of current PU / CU. Namely, we use different cost functions for PU / CU with different aspect ratios. For example, weighted SAD is used as the cost function when the height of PU / CU divided by the width of PU / CU is larger than or equal to a given threshold; otherwise SAD is used as the cost function. Note that we can also use different on / off settings of coding tools for PU / CU with different aspect ratios. For example, weighted SAD is used as the cost function when the height of PU / CU divided by the width of PU / CU is larger than or equal to a given threshold; otherwise SAD is used as the cost function. BDOF is enabled when the height of PU / CU divided by the width of PU / CU is larger than or equal to a given threshold; otherwise it is disabled.

[0087] Method 1-5

[0088] We propose to implicitly derive the cost function for MV refinement according to temporal ID. For example, weighted SAD is used as the cost function when TID is larger than or equal to N; otherwise SAD is used as the cost function. Where N is a positive integer. Note that we can also use different on / off settings of coding tools for PU / CU with different temporal ID. For example, weighted SAD is used as the cost function when TID is larger than or equal to N; otherwise SAD is used as the cost function. BDOF is enabled when TID is larger than or equal to N; otherwise it is disabled. Where N is a positive integer.

[0089] Method 1-6

[0090] We propose to implicitly derive the cost function for MV refinement according to the frame type.

[0091] For example, weighted SAD is used as the cost function for P frame or B frame, and SAD is used as the cost function for Intra frame. Note that we can also use different on / off settings of coding tools for different frame type. For example, weighted SAD is used as the cost function for P frame or B frame and SAD is used as the cost function for Intra frame. BDOF is enabled for P frame or B frame, and it is disabled for Intra frame.

[0092] Method 1-7

[0093] We propose to implicitly derive the cost function for MV refinement according to slice QP.

[0094] For example, weighted SAD is used as the cost function when slice QP < 32; otherwise SAD is used as the cost function. Note that we can also use different on / off settings of coding tools for different slice QP. For example, weighted SAD is used as the cost function when slice QP < 32; otherwise SAD is used as the cost function. BDOF is enabled when slice QP < 32; otherwise it is disabled.

[0095] Method 1-8

[0096] We propose to implicitly derive the cost function for MV refinement according to the variance of current PU / CU. According to this method, we use different cost functions for PU / CU with different variances. For example, weighted SAD is used as the cost function when the variance of current PU / CU is larger than a given threshold; otherwise SAD is used as the cost function. Note that, we can also use different on / off settings of coding tools for PU / CU with different variances. For example, weighted SAD is used as the cost function when the variance of current PU / CU is larger than a given threshold; otherwise SAD is used as the cost function. BDOF is enabled when the variance of current PU / CU is larger than a given threshold; otherwise it is disabled.

[0097] Note that each merge mode can apply different methods to implicitly derive the cost function. For example, we can use proposed Method 1-1 for the affine merge mode and use proposed Method 1-2 for the template matching mode.

[0098] Method 1-9

[0099] We propose to explicitly signal the rule of deriving the cost function for a given merge mode. The signalling can be at the sequence level, frame level, CTU level or CU level. Note that each merge mode can apply different cost function settings. In other words, we can explicitly signal the rule of deriving the cost function for each merge mode or signal a shared rule of deriving the cost function for all merge modes. For example, a flag called pps_costFunctionForAffineMerge can be signalled at PPS level, which represents the rule of deriving the cost function for affine merge mode in the current picture. Table1. Sample semantic of pps_costFunctionForAffineMerge

[0100] For another example, a flag called pps_costFunctionForAffineMerge is signalled at PPS level, which represents the rule of deriving the cost function for affine merge mode in the current picture. Two flags, pps_FunctionOneForAffineMerge and pps_FunctionTwoForAffineMerge, are signalled at the PPS level, representing function one and function two, respectively. Table2. Sample semantic of pps_costFunctionForAffineMerge and  pps_FunctionOneForAffineMerge and pps_FunctionTwoForAffineMerge

[0101] Method 2: Adaptive Cost Function Selection for Candidate Reordering of Merge Mode

[0102] The cost function for candidate reordering can be SAD, weighted SAD, SSE, weighted SSE, SATD and weighted SATD.

[0103] The proposed Methods 2-1 to 2-5 can be applied to regular merge mode, template matching merge mode, bilateral matching merge mode, and affine merge mode.

[0104] Method 2-1

[0105] We propose to explicitly signal the index of cost function for a specific merge mode at the sequence level, picture level, CTU level, or CU level. We use the specified cost function to perform the first stage and second stage candidate reordering in ARMC for the specified merge mode. For example, we can signal a syntax called pps_costFunctionForAdjustAffineMergeCand at picture level which represents for the cost function used for candidate reordering in ARMC for affine merge mode. Table 3. Sample semantic of pps_costFunctionForAdjustAffineMergeCand

[0106] Method 2-2

[0107] We propose to explicitly signal the index of cost function for all merge modes at the sequence level or picture level or CTU level or CU level. The specified cost function is then used for both the first-stage and second-stage candidate reordering in ARMC for all merge modes. For example, we can signal a syntax called pps_costFunctionForAdjustMergeCand at the picture level, which represents the cost function used for candidate reordering in ARMC for all merge modes.

[0108] Method 2-3

[0109] We propose to explicitly signal the index of two cost functions used in ARMC for a specific merge mode at the sequence level or picture level, CTU level, or CU level. We use the first cost function to do the first stage candidate reordering in ARMC and use the second cost function to do the second stage candidate reordering in ARMC for the specified merge mode. For example, we signal a syntax called pps_firstCostFunctionForAdjustAffineMergeCand at the picture level, which represents the first cost function used for the first stage candidate reordering in ARMC for affine merge mode. We signal a syntax called pps_secondCostFunctionForAdjustAffineMergeCand at the picture level, which represents the second cost function used for the second stage candidate reordering in ARMC for affine merge mode.

[0110] Method 2-4

[0111] We propose to explicitly signal the index of two cost functions used in ARMC for all merge modes at the sequence level or picture level, CTU level, or CU level. We use the first cost function to do the first stage candidate reordering in ARMC and use the second cost function to do the second stage candidate reordering in ARMC for all merge modes. For example, we signal a syntax called pps_firstCostFunctionForAdjustMergeCand at the picture level, which represents the first cost function used for the first stage candidate reordering in ARMC for all merge modes. We signal a syntax called pps_secondCostFunctionForAdjustMergeCand at the picture level, which represents the second cost function used for the second stage candidate reordering in ARMC for all merge modes.

[0112] Method 2-5

[0113] We propose to explicitly signal the index of two cost functions used in ARMC for a specific merge mode at the sequence level, picture level, CTU level, or CU level. In the first stage candidate reordering of ARMC, we use the first cost function to sort all merge candidates 610 in the merge candidate list of the specified merge mode as shown in Fig. 6. Then, we use the second cost function to sort merge candidates with merge index mod 2 equal to N, where N can be 0 or 1 (candidates 620 in Fig. 6 corresponding to N equal to 0) . In the second stage candidate reordering of ARMC, we conduct diversity reordering for merge candidates with merge index mod 2 equal to 1-N and the criterion is the first cost function. We also conduct diversity reordering for merge candidates with merge index mod 2 equal to N (candidates 710 in Fig. 7 corresponding to N equal to 0 and candidates 720 in Fig. 7 corresponding to N equal to 1) and the criterion is the second cost function.

[0114] Method 2-6

[0115] We propose to explicitly signal the index of two cost functions used in ARMC for all merge modes at the sequence level, picture level, CTU level, or CU level. In the first stage candidate reordering of ARMC, we use the first cost function to sort all merge candidates in the merge candidate list. Then, we use the second cost function to sort merge candidates with merge index mod 2 equal to N, where N can be 0 or 1. In the second stage candidate reordering of ARMC, we conduct diversity reordering for merge candidates with merge index mod 2 equal to 1-N and the criterion is the first cost function. We also conduct diversity reordering for merge candidates with merge index mod 2 equal to N and the criterion is the second cost function.

[0116] Method 2-7

[0117] We propose to explicitly signal the index of three cost functions used in ARMC for a specific merge mode at the sequence level, picture level, CTU level, or CU level. In the first stage candidate reordering of ARMC, we use the first cost function to sort all merge candidates in the merge candidate list of the specified merge mode. Then, we use the second cost function to sort merge candidates with merge index mod 2 equal to N, where N can be 0 or 1. In the second stage candidate reordering of ARMC, we conduct diversity reordering for all merge candidates and the criterion is the third cost function. Note that, if the third cost function and the first cost function are the same or the third cost function and the second cost function are the same, then we only need to signal the index of the first cost function and the second cost function.

[0118] Method 2-8

[0119] We propose to explicitly signal the index of three cost functions used in ARMC for all merge modes at the sequence level, picture level, CTU level, or CU level. In the first stage candidate reordering of ARMC, we use the first cost function to sort all merge candidates in the merge candidate list. Then, we use the second cost function to sort merge candidates with merge index mod 2 equal to N, where N can be 0 or 1. In the second stage candidate reordering of ARMC, we conduct diversity reordering for all merge candidates and the criterion is the third cost function. Note that, if the third cost function and the first cost function are the same or the third cost function and the second cost function are the same, then we only need to signal the index of the first cost function and the second cost function.

[0120] Method 2-9

[0121] We propose to implicitly derive the cost function for candidate reordering according to the size of current PU / CU. Namely, we use different cost functions for PU / CU with different sizes. In one embodiment, weighted SAD is used as the cost function for candidate reordering in ARMC when width and height of current PU / CU are larger than or equal to a given threshold; otherwise SAD is used as the cost function. Note that, we can also use different on / off settings of coding tools for PU / CU with different size. In another embodiment, weighted SAD is used as the cost function for candidate reordering in ARMC when width and height of current PU / CU are larger than or equal to a given threshold; otherwise SAD is used as the cost function. BDOF is enabled when width and height of current PU / CU are larger than or equal to a given threshold; otherwise it is disabled.

[0122] Method 2-10

[0123] We propose to implicitly derive the cost function for candidate reordering according to the aspect ratio of current PU / CU. According to this method, we use different cost functions for PU / CU with different aspect ratios. For example, weighted SAD is used as the cost function for candidate reordering in ARMC when height of PU / CU divided by width of PU / CU is larger than or equal to a given threshold; otherwise SAD is used as the cost function. Note that, we can also use different on / off settings of coding tools for PU / CU with different aspect ratios. For example, weighted SAD is used as the cost function for candidate reordering in ARMC when height of PU / CU divided by width of PU / CU is larger than or equal to a given threshold; otherwise SAD is used as the cost function. BDOF is enabled when height of PU / CU divided by width of PU / CU is larger than or equal to a given threshold; otherwise it is disabled.

[0124] Method 2-11

[0125] We propose to implicitly derive the cost function for candidate reordering according to temporal ID. For example, weighted SAD is used as the cost function for candidate reordering in ARMC when TID is larger than or equal to N; otherwise SAD is used as the cost function, where N is a positive integer. Note that we can also use different on / off settings of coding tools for PU / CU with different temporal ID. For example, weighted SAD is used as the cost function for candidate reordering in ARMC when TID is larger than or equal to N; otherwise SAD is used as the cost function. BDOF is enabled when TID is larger than or equal to N; otherwise it is disabled, where N is a positive integer.

[0126] Method 2-12

[0127] We propose to implicitly derive the cost function for candidate reordering according to the frame type. For example, for P frames or B frames, weighted SAD is used as the cost function for candidate reordering in ARMC. For I frames, SAD is used as the cost function. Note that, we can also use different on / off settings of coding tools for different frame type. For example, for P frames or B frames, weighted SAD is used as the cost function for candidate reordering in ARMC. For I frames, SAD is used as the cost function. BDOF is enabled for P frame or B frame and it is disabled for Intra frames.

[0128] Method 2-13

[0129] We propose to implicitly derive the cost function for candidate reordering according to the variance of current PU / CU. According to this method, we use different cost functions for PU / CU with different variances. For example, weighted SAD is used as the cost function for candidate reordering in ARMC when the variance of current PU / CU is larger than a given threshold; otherwise SAD is used as the cost function. Note that, we can also use different on / off settings of coding tools for PU / CU with different variances. For example, weighted SAD is used as the cost function for candidate reordering in ARMC when the variance of current PU / CU is larger than a given threshold; otherwise SAD is used as the cost function. BDOF is enabled when the variance of current PU / CU is larger than a given threshold; otherwise it is disabled.

[0130] Method 2-14

[0131] We propose to implicitly derive the cost function for candidate reordering according to slice QP. For example, weighted SAD is used as the cost function for candidate reordering in ARMC when slice QP is larger than or equal to N; otherwise SAD is used as the cost function, where N is a positive integer. Note that, we can also use different on / off settings of coding tools for PU / CU with different slice QP. For example, weighted SAD is used as the cost function for candidate reordering in ARMC when slice QP is larger than or equal to N; otherwise SAD is used as the cost function. BDOF is enabled when slice QP is larger than or equal to N; otherwise it is disabled, where N is a positive integer.

[0132] Method 3: Combination of Method 1 and Method 2

[0133] Each proposed method of the Method 3 is composed of Method 1 and Method 2. In addition, a special embodiment is disclosed as follows. According to this special embodiment, there can be at least two MV refinement processes. At least one is before candidate reordering. At least one is after candidate reordering. We propose to use the same cost function, which is denoted as f1 for all merge candidates to do MV refinement before candidate reordering. We also propose to use the same cost function, which is denoted as f2 for all merge candidates to do candidate reordering, where f1 and f2 can be the same or two different cost functions. At last, we propose to adaptively select the cost function for each merge candidate to do MV refinement after candidate reordering. We can use any of the methods mentioned in proposed Method 1 to adaptively select the cost function for each merge candidate.

[0134] The proposed methods of adaptive cost function selection for MV refinement or candidate reordering of merge candidates can be implemented in encoders and / or decoders. For example, the proposed method can be implemented in an inter / intra coding module of an encoder, and / or an inter / intra coding module of a decoder. Alternatively, any of the proposed methods can be implemented as a circuit coupled to the predictor derivation module of the encoder and / or the predictor derivation module of the decoder, so as to provide the information needed by the predictor derivation module.

[0135] With reference to the exemplary encoder in Fig. 1A and exemplary decoder in Fig. 1B, any of the proposed methods can be implemented in a predictor derivation module of an encoder, and / or a predictor derivation module of a decoder. Alternatively, any of the proposed methods can be implemented as a circuit coupled to the predictor derivation module of the encoder and / or the predictor derivation module of the decoder, so as to provide the information needed by the predictor derivation module. For example, any of the proposed adaptive cost function selection methods can be implemented in an inter coding module and / or a merge / AMVP candidate derivation module of an encoder (e.g. Inter Pred. 112 in Fig. 1A) , or a motion compensation module (e.g., MC 152 in Fig. 1B) and / or a merge / AMVP candidate derivation module of a decoder. Alternatively, any of the proposed methods can be implemented as a circuit coupled to the inter coding module and / or a merge / AMVP candidate derivation module of an encoder and / or motion compensation module and / or a merge / AMVP candidate derivation module of the decoder. While the Inter-Pred. 112 and MC 152 are shown as individual processing units to support the adaptive cost function selection methods, 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) ) .

[0136] Fig. 8 illustrates a flowchart of an exemplary video coding system that adaptively selects cost function for MV refinement and / or candidate reordering of merge candidates according to an embodiment of the present invention. The steps shown in the flowchart may be implemented as program codes executable on one or more processors (e.g., one or more CPUs) at the encoder side. The steps shown in the flowchart may also be implemented based hardware such as one or more electronic devices or processors arranged to perform the steps in the flowchart. According to this method, input data associated with a current block are received in step 810, wherein the input data comprise pixel data for the current block to be encoded at an encoder side or prediction residual data associated with the current block to be decoded at a decoder side. A target cost function from multiple cost functions is determined in step 820, wherein the target cost function is selected for MV (Motion Vector) refinement of merge candidates in a merge candidate list and / or the target cost function is used for candidate reordering of the merge candidate list, and wherein at least two different cost functions are used for two different merge candidates. An initial MV of a target merge candidate is refined into a refined MV according to the target cost function or multiple candidates in the merge candidate list are reordered into a reordered merge candidate list according to the target cost function in step 830. The current block is encoded or decoded by using coding information comprising the refined MV and / or the reordered merge candidate list in step 840.

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

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

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

[0140] 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 encoded data associated with the current block to be decoded at a decoder side;determining a target cost function from multiple cost functions, wherein the target cost function is selected for MV (Motion Vector) refinement of merge candidates in a merge candidate list and / or the target cost function is used for candidate reordering of the merge candidate list, and wherein at least two different cost functions are used for two different merge candidates;refining an initial MV of a target merge candidate into a refined MV according to the target cost function or reordering multiple candidates in the merge candidate list into a reordered merge candidate list according to the target cost function; andencoding or decoding the current block by using coding information comprising the refined MV and / or the reordered merge candidate list.2.The method of Claim 1, wherein the target cost function is selected from the multiple cost functions implicitly.3.The method of Claim 2, wherein the target cost function is selected from the multiple cost functions according to coding parameters associated with the current block.4.The method of Claim 3, wherein the coding parameters comprise block size, aspect ratio, temporal ID, frame type, variance, merge index associated with the current block, or a combination thereof.5.The method of Claim 4, wherein when the coding parameters comprise the block size, aspect ratio, temporal ID, frame type, variance, merge index associated with the current block, or a combination thereof, different on / off setting of coding tools are determined according to these coding parameters.6.The method of Claim 5, wherein when the coding tools comprise BDOF (Bi-Directional Optical Flow) , the BDOF is enabled for the current block if width and height of the current block are greater than or equal to a first threshold, or aspect ratio calculated by dividing the width by the height is greater than a second threshold; otherwise, the BDOF is disabled.7.The method of Claim 2, wherein weighted SAD (Sum of Absolute Differences) is used as the target cost function when width and height of the current block are greater than a first threshold or aspect ratio calculated by dividing the width by the height is greater than a second threshold; otherwise, SAD is used as the target cost function.8.The method of Claim 1, wherein the target cost function is selected from the multiple cost functions by explicit signalling.9.The method of Claim 8, wherein syntax for selecting the target cost function from the multiple cost functions is used for each merge candidate or shared by multiple merge candidates.10.The method of Claim 8, wherein the explicit signalling is at a sequence level, frame level, CTU level, CU level, or a combination thereof.11.The method of Claim 8, wherein one index to select a specified cost function for a specific merge mode is explicitly signalled or parsed, and wherein the specified cost function is used to perform first-stage and second-stage candidate reordering in ARMC (Adaptive Reordering of Merge Candidates) for the specified merge mode.12.The method of Claim 8, wherein two indexes to select a first specified cost function and a second specified cost function for a specific merge mode are explicitly signalled or parsed, and the first specified cost function is used to perform first-stage candidate reordering in ARMC (Adaptive Reordering of Merge Candidates) and the second specified cost function is used to perform second-stage candidate reordering in the ARMC for the specified merge mode.13.The method of Claim 8, wherein three indexes to select a first specified cost function, a second specified cost function, and a third specified cost function for a specific merge mode or all merge modes are explicitly signalled or parsed, and the first specified cost function and the second specified cost function are used to perform first-stage candidate reordering in ARMC (Adaptive Reordering of Merge Candidates) and the third specified cost function is used to perform second-stage candidate reordering in the ARMC for the specified merge mode.14.The method of Claim 13, wherein the first specified cost function is used to sort the merge candidates in the merge candidate list to form a first-sorted merge candidate list and the second specified cost function is then used to sort a sublist of the first-sorted merge candidate list, and wherein the sublist of the first-sorted merge candidate list corresponds to a modular set for target candidate / candidates having a same remainder after applying a modular operation to merge indexes of the merge candidates in the first-sorted merge candidate list.15.The method of Claim 14, wherein the third specified cost function is used to sort second-sorted candidates formed by the first-sorted merge candidate list with the sublist of the first-sorted merge candidate list sorted by the second specified cost function.16.The method of Claim 1, wherein a first target cost function is determined for first MV refinement of first merge candidates in a first merge candidate list prior to target candidate reordering and a second target cost function is determined for second MV refinement of second merge candidates in a second merge candidate list after the target candidate reordering.17.The method of Claim 16, wherein the first target cost function is the same as the second target cost function.18.The method of Claim 16, wherein the first target cost function is different from the second target cost function.19.An apparatus for video coding using MVP (Motion Vector Prediction) , 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 prediction residual data associated with the current block to be decoded at a decoder side;determine a target cost function from multiple cost functions, wherein the target cost function is selected for MV (Motion Vector) refinement of merge candidates in a merge candidate list and / or the target cost function is used for candidate reordering of the merge candidate list, and wherein at least two different cost functions are used for two different merge candidates;refine an initial MV of a target merge candidate into a refined MV according to the target cost function or reordering multiple candidates in the merge candidate list into a reordered merge candidate list according to the target cost function; andencode or decode the current block by using coding information comprising the refined MV and / or the reordered merge candidate list.

Citation Information

Patent Citations

  • Video coding and decoding

    GB2611367A

  • Motion vector (MV) candidate reordering

    US20230103767A1

  • Method, device, and medium for video processing

    WO2023060913A1

  • Method and apparatus for video coding

    WO2024051725A1