CPC H04N 19/136 (2014.11) [H04N 19/159 (2014.11); H04N 19/176 (2014.11)] | 13 Claims |
1. A method for inter prediction, applied to an encoder, comprising:
determining a prediction mode parameter of a current block;
when the prediction mode parameter indicates that a Geometrical Partitioning Mode (GPM) is used for determining an inter prediction value of the current block, determining a dividing angle and a distance in the current block, and setting an angle index value and a distance index value to index serial numbers corresponding to the angle and the distance in a preset mapping table respectively;
determining a value of a shifting direction indicator of the current block by using a preset model based on size information and the angle index value of the current block, wherein, the value of a shifting direction indicator is used for indicating shifting directions of different dividing lines of the current block at the angle; wherein the size information of the current block comprises a height and a width of the current block, and determining the value of a shifting direction indicator of the current block by using the preset model based on the size information and the angle index value of the current block comprises:
determining a first refinement value according to the angle index value;
obtaining a shifted height according to the first refinement value and the height of the current block;
obtaining a shifted width according to a preset offset value and the width of the current block; and
obtaining the value of the shifting direction indicator of the current block according to a size of the shifted height and a size of the shifted width; and
performing inter prediction on the current block based on the value of the shifting direction indicator and the distance index value.
|