CPC H04N 19/132 (2014.11) [H04N 19/117 (2014.11); H04N 19/159 (2014.11); H04N 19/176 (2014.11); H04N 19/82 (2014.11)] | 25 Claims |
1. A method of video coding implemented in a decoding device or an encoding device, the method comprising:
obtaining a pair of initial motion vectors for a current block;
obtaining two first prediction blocks for the current block based on the pair of initial motion vectors;
calculating a first matching cost according to the two first prediction blocks;
obtaining a pair of refined motion vectors and a second matching cost corresponding to the pair of refined motion vectors;
obtaining two second prediction blocks for the current block according to the refined motion vectors:
determining whether an optical flow refinement process should be performed, according to at least one preset condition, the at least one preset condition comprising a condition of whether the second matching cost is equal to or larger than a threshold value; and
performing an optical flow refinement process based on the two second prediction blocks for obtaining a final inter prediction for the current block, in response to determining that the optical flow refinement process should be performed;
when it is determined that the optical flow refinement process should not be performed, the final inter prediction is obtained by a weighted sum of the two second prediction blocks.
|