Image decoding method, image encoding method, encoder, decoder, and medium

By utilizing the motion information and reference points of the reference image to determine the affine model during image encoding and decoding, the problem of poor prediction performance caused by building models based on the motion information of adjacent reconstructed blocks in existing technologies is solved, thereby improving the quality and efficiency of encoding and decoding.

WO2026000381A1PCT designated stage Publication Date: 2026-01-02GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/102620
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

In existing technologies, constructing affine models based on the motion information of adjacent reconstructed blocks may result in poor prediction performance and affect encoding and decoding quality.

Method used

By utilizing the motion information and reference points of the reference image of the current block, the affine model of the current block is determined, providing more available affine models to improve prediction accuracy.

Benefits of technology

This improves the quality and efficiency of image encoding and decoding, ensuring that the encoder can determine the affine model that is more suitable for the current block for prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024102620_02012026_PF_FP_ABST
    Figure CN2024102620_02012026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of image encoding and decoding. Disclosed are an image decoding method, an image encoding method, an encoder, a decoder, and a medium. The image encoding method and the image decoding method each comprise: determining an affine model of a current block on the basis of motion information of a reference image of the current block, and a reference point; obtaining a plurality of motion vectors on the basis of the affine model of the current block; and predicting the current block on the basis of the plurality of motion vectors. By means of the solution provided in the embodiments of the present application, the image encoding and decoding efficiency and performance can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Image decoding, encoding method, codec and medium TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of image coding, and particularly relate to an image decoding, encoding method, codec and medium. BACKGROUND

[0002] In an inter prediction process, a decoder can determine motion information of sub-blocks in a current block based on an affine model of the current block, and predict the current block based on the motion information.

[0003] In related technologies, the affine model is constructed based on motion information of reconstructed blocks adjacent to the current block in a current image.

[0004] SUMMARY

[0005] Embodiments of the present application provide an image decoding, encoding method, codec and medium. The technical solutions are as follows:

[0006] In one aspect, an embodiment of the present application provides an image decoding method, which comprises:

[0007] determining an affine model of a current block based on motion information of a reference image of the current block and a reference point;

[0008] obtaining a plurality of motion vectors based on the affine model of the current block;

[0009] predicting the current block based on the plurality of motion vectors.

[0010] In another aspect, an embodiment of the present application provides an image encoding method, which comprises:

[0011] determining an affine model of a current block based on motion information of a reference image of the current block and a reference point;

[0012] obtaining a plurality of motion vectors based on the affine model of the current block;

[0013] predicting the current block based on the plurality of motion vectors.

[0014] In another aspect, an embodiment of the present application provides a decoding device, which comprises:

[0015] a decoding unit configured to determine an affine model of a current block based on motion information of a reference image of the current block and a reference point;

[0016] the decoding unit is configured to obtain a plurality of motion vectors based on the affine model of the current block;

[0017] The decoding unit is configured to predict the current block based on the plurality of motion vectors.

[0018] In another aspect, an embodiment of the present disclosure provides an encoding device, which comprises:

[0019] An encoding unit is configured to determine an affine model of the current block based on motion information of a reference image of the current block and a reference point.

[0020] The encoding unit is configured to obtain a plurality of motion vectors based on the affine model of the current block.

[0021] The encoding unit is configured to predict the current block based on the plurality of motion vectors.

[0022] In another aspect, an embodiment of the present disclosure provides a decoder, which comprises a memory and a processor, wherein the memory is configured to store a computer program running on the processor; and the processor is configured to execute an image decoding method as described in the above aspect when running the computer program.

[0023] In another aspect, an embodiment of the present disclosure provides an encoder, which comprises a memory and a processor, wherein the memory is configured to store a computer program running on the processor; and the processor is configured to execute an image encoding method as described in the above aspect when running the computer program.

[0024] In another aspect, an embodiment of the present disclosure provides a non-volatile computer readable storage medium storing a code stream, wherein the code stream is generated by using an image encoding method of an encoder, or the code stream is decoded by using an image decoding method of a decoder, wherein the image encoding method comprises an image encoding method as described in the above aspect, and the image decoding method comprises an image decoding method as described in the above aspect.

[0025] In another aspect, an embodiment of the present disclosure provides a computer program product, which comprises computer instructions stored in a computer readable storage medium, wherein a processor acquires the computer instructions from the computer readable storage medium, and executes the computer instructions to implement an image decoding method as described in the above aspect, or an image encoding method as described in the above aspect.

[0026] In the embodiments of the present application, since the reference image of the current image can have the same or similar motion information as the current block, the affine model of the current block is determined based on the motion information of the reference image and the reference point, which can provide more available affine models for the codec, and thus the encoder can determine a more suitable affine model for the current block and use the affine model to predict the current block, which is helpful to improve the quality and efficiency of image coding. BRIEF DESCRIPTION OF DRAWINGS

[0027] FIG. 1 is a schematic diagram of an encoding process at an encoding end according to an example embodiment of the present application;

[0028] FIG. 2 is a schematic diagram of a decoding process at a decoding end according to an example embodiment of the present application;

[0029] FIG. 3 is a flowchart of an image decoding method according to an example embodiment of the present application;

[0030] FIG. 4 is a schematic diagram of a control point according to an example embodiment of the present application;

[0031] FIG. 5 is a flowchart of an affine model determination process according to an example embodiment of the present application;

[0032] FIG. 6 is a schematic diagram of a virtual control point according to an example embodiment of the present application;

[0033] FIG. 7 is a schematic diagram of a reference point motion vector determination process according to an example embodiment of the present application;

[0034] FIG. 8 is a schematic diagram of a reference point motion vector determination process according to another example embodiment of the present application;

[0035] FIG. 9 is a schematic diagram of offset processing based on a second offset according to an example embodiment of the present application;

[0036] FIG. 10 is a schematic diagram of a scaling process according to an example embodiment of the present application;

[0037] FIG. 11 is a flowchart of an affine model determination process according to another example embodiment of the present application;

[0038] FIG. 12 is a flowchart of an image encoding method according to an example embodiment of the present application;

[0039] FIG. 13 is a flowchart of an affine model index encoding process according to an example embodiment of the present application;

[0040] FIG. 14 is a flowchart of an affine model determination process according to another example embodiment of the present application;

[0041] FIG. 15 shows a structural block diagram of an image decoding apparatus according to an example embodiment of the present application;

[0042] FIG. 16 shows a structural block diagram of an image encoding apparatus according to an example embodiment of the present application;

[0043] FIG. 17 shows a structural block diagram of a decoder according to an example embodiment of the present application;

[0044] FIG. 18 shows a structural block diagram of an encoder according to an example embodiment of the present application. DETAILED DESCRIPTION

[0045] For the purpose of making the purpose, technical scheme and advantages of the present application more clear, the embodiments of the present application will be described in further detail below with reference to the drawings.

[0046] “Multiple” mentioned herein refers to two or more. “And / or” describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. The character “ / ” generally represents that the associated objects before and after it are in an “or” relationship.

[0047] The currently common video coding standards all adopt a hybrid coding framework based on blocks. A frame image in a video is divided into square maximum coding units (LCU) or coding tree units (CTU) of the same size (such as 256x256, 128x128, 64x64, etc.). The maximum coding unit or coding tree unit can be divided into rectangular coding units (CU) according to rules. The coding unit can also be divided into prediction units (PU), transform units (TU), etc.

[0048] The hybrid coding framework includes modules such as prediction, transform, quantization, entropy coding, in loop filter, etc. The prediction module includes intra prediction and inter prediction. Inter prediction includes motion estimation and motion compensation. Due to the strong correlation between adjacent pixels in the same frame image, the method of intra prediction can be used in video coding technology to eliminate the spatial redundancy between adjacent pixels. Due to the strong similarity between adjacent frame images in a video, the method of inter prediction can be used in video coding technology to eliminate the temporal redundancy between adjacent frame images, thereby improving the coding efficiency.

[0049] At the encoding end, as shown in FIG. 1, the encoder first divides the image into multiple coding blocks, then uses an intra or inter prediction (including motion estimation and motion compensation) algorithm to generate a prediction block of the current block, and uses the original block of the current block to subtract the prediction block to obtain a residual block, so as to perform transform and quantization on the residual block to obtain quantization coefficients, and finally encode the quantization coefficients into a bitstream through entropy coding. In addition, the encoder reconstructs the reconstructed block based on the inverse quantization / inverse transform result and the prediction block, and performs in loop filtering on the reconstructed block to make up for the distortion information and provide a better reference for subsequent encoding.

[0050] At the decoding end, as shown in FIG. 2, the decoder predicts the prediction block of the current block using an intra or inter prediction algorithm, and on the other hand, entropy decodes the bitstream to obtain the quantization coefficients, and inverse quantizes and inverse transforms the quantization coefficients to obtain the residual block, so as to add the prediction block and the residual block to obtain the reconstructed block. For the reconstructed block, the decoder further performs in loop filtering on the reconstructed block, and finally generates a decoded image according to the reconstructed block after the in loop filtering.

[0051] In inter prediction, motion information is used to represent "motion". The basic motion information includes the information of a reference image and the information of a motion vector (MV). Based on the motion information, the encoding and decoding end can perform single-direction inter prediction or bi-directional inter prediction on the current block.

[0052] Since the motion in the real world includes not only translation but also other motion forms such as zooming in, zooming out, and rotating, in order to achieve more fine-grained prediction, an affine motion compensation scheme is proposed.

[0053] Compared with the motion compensation of the current block, the affine only needs to derive the motion vector of each sub-block (even pixel) in the current block by means of a small number of control points, and then performs motion compensation based on the motion vector of each sub-block (even pixel).

[0054] The encoding end can construct a plurality of candidate affine models, then select the affine model with the optimal prediction quality from the plurality of candidate affine models, and write the model index of the selected affine model into a bitstream. The decoding end also constructs a plurality of candidate affine models, determines the model index of the affine model selected by the encoding end by parsing the bitstream, and then performs motion compensation by using the affine model consistent with the encoding end. In the related art, the encoding and decoding ends construct the affine model based on the motion information of the reconstructed blocks adjacent to the current block in the current image.

[0055] However, there can be a large difference between the motion information of the current block and the motion information of the adjacent reconstructed blocks, and therefore, constructing the affine model based only on the motion information of the adjacent reconstructed blocks can result in poor prediction effect, and thus affect the coding quality.

[0056] Considering that the reference image of the current image can have the same or similar motion information as the current block, in the embodiments of the present application, the affine model of the current block is determined based on the motion information of the reference image and the reference point of the current block, which can provide more available affine models for the encoder, and thus enable the encoder to determine the affine model more suitable for the current block, and help to improve the quality and efficiency of image coding.

[0057] Please refer to FIG. 3, which shows a flowchart of an image decoding method provided by an example embodiment of the present application. The method is applied to a decoder, and the method can include the following steps:

[0058] Step 301: determining the affine model of the current block based on the motion information of the reference image of the current block and the reference point.

[0059] In some embodiments, the decoder determines the reference image of the current block in the current image by parsing a bitstream. The bitstream can include a reference image index of the reference image of the current block, and the decoder can determine the reference image indicated by the reference image index from a reference image list (Reference Picture List).

[0060] Optionally, the reference image can be a forward reference image determined from a forward prediction reference image list, or a forward reference image and a backward reference image determined from a bidirectional prediction reference image list.

[0061] In the embodiments of the present application, the reference image of the current block stores motion information used for prediction of the current block. The motion information can include a motion vector.

[0062] In some embodiments, the decoder determines a reference point in the current image, and obtains the reference point coordinates and the reference point motion vector of the reference point, which are used to determine the affine model of the current block together with the motion information of the reference image.

[0063] As to the representation of the affine model, in one possible design, the affine model can be represented by at least two control points, for example, the affine model can be represented by a 6-parameter model (CPMV0, CPMV1, CPMV2) or a 4-parameter model (CPMV0, CPMV1). Here, CPMVn represents the motion vector of the nth control point, i.e., the affine model can be represented by the motion vectors of 3 or 2 control points.

[0064] In another possible design, the affine model can be represented by {reference point information + a, b, c, d}, where the reference point information includes the reference point coordinates and the reference point motion vector, and a, b, c, d are the variation rates of the motion vector with respect to the coordinates, which are determined based on the motion information of the reference image.

[0065] In other possible designs, the affine model can be represented by a combination of the above two representations.

[0066] Step 302: obtaining a plurality of motion vectors based on the affine model of the current block.

[0067] In one possible implementation, the decoder determines the affine model actually used by the current block (consistent with the affine model used at the encoding end) from a plurality of candidate affine models (including the affine model constructed based on the reference image and the affine model constructed based on the current image), and obtains the plurality of motion vectors based on the affine model.

[0068] Optionally, the plurality of motion vectors can be the motion vectors of different sub-blocks in the current block, or the motion vectors of a plurality of coordinate positions in the current block.

[0069] For example, when the current block is divided into 4x4 sub-blocks, the decoder can determine the motion vectors of the 16 sub-blocks based on the affine model. Alternatively, the decoder can determine the motion vectors of samples at each coordinate position in the current block based on the affine model.

[0070] Step 303: predicting the current block based on the plurality of motion vectors.

[0071] In a possible implementation, the decoder determines, based on the motion vector of the sub-block in the current block, a reference sub-block corresponding to the sub-block in the reference picture, and thus determines the prediction value of the sub-block based on the reconstructed value of the reference sub-block.

[0072] In another possible implementation, the decoder determines, based on the motion vector of the current coordinate position in the current block, a reference coordinate position corresponding to the current coordinate position in the reference picture, and thus determines the prediction value of the current coordinate position based on the reconstructed value of the reference coordinate position.

[0073] Optionally, the decoder determines, based on the position (or the current coordinate position) of the current sub-block and the motion vector, a reference sub-block (reference coordinate position) corresponding to the current sub-block (current coordinate position) in the reference picture, and determines the reconstructed sub-block (or the reconstructed value of the reference coordinate position) of the reference sub-block as the prediction sub-block (or the sample prediction value) of the current sub-block (or the reference coordinate position).

[0074] Further, based on the respective prediction sub-block (or the sample prediction value) and the difference value parsed from the bitstream, the decoder determines the reconstructed sub-block (or the sample reconstructed value) of each sub-block (or coordinate position), and further generates the reconstructed block of the current block based on the respective reconstructed sub-block (or the sample reconstructed value), to complete the decoding of the current block.

[0075] To sum up, in the embodiments of the present application, because the reference picture of the current picture can include motion information that is the same as or similar to that of the current block, the affine model of the current block is determined based on the motion information of the reference picture and the reference point, which can provide more available affine models for the codec, and thus the encoder can determine a more suitable affine model for the current block and use the affine model to predict the current block, which helps to improve the quality and efficiency of image coding.

[0076] In a possible implementation, in the affine mode, the codec end constructs a candidate list including a plurality of candidate affine models, and determines an affine model used for affine processing of the current block from the candidate list. In the step 302, the process of determining the motion vector based on the affine model can include the following sub-steps:

[0077] Sub-step 1, add the affine model of the current block to the candidate list.

[0078] In some embodiments, the candidate list is a sub-block merge candidate list, which includes a plurality of candidate affine models. In this embodiment, the candidate list includes an affine model constructed based on the motion vector of the neighboring block of the current block in the current picture, and an affine model constructed based on the motion vector of the reference picture and the reference point.

[0079] It should be noted that the same method is used by the encoding and decoding ends to construct the candidate list to ensure consistency of the affine model finally adopted by the encoding and decoding ends.

[0080] Sub-step 2, parsing the code stream to determine the affine model index.

[0081] The encoding end encodes the affine model index of the affine model adopted by the current block in the candidate list into the code stream in the encoding process. Correspondingly, the decoder parses the code stream to obtain the affine model index corresponding to the current block.

[0082] Sub-step 3, obtaining a plurality of motion vectors based on the affine model indicated by the affine model index in the candidate list.

[0083] Each candidate affine model in the candidate list has a respective affine model index, and the decoder determines the affine model indicated by the affine model index based on the parsed affine model index from the candidate list, and obtains a plurality of motion vectors using the affine model.

[0084] In some embodiments, the decoder determines an affine relationship representing the correspondence between the coordinate position and the motion vector at the coordinate position based on the affine model indicated by the affine model index, and thereby determines a plurality of motion vectors based on the affine relationship.

[0085] The plurality of motion vectors can be motion vectors corresponding to a plurality of sub-blocks in the current block, or motion vectors corresponding to a plurality of coordinate positions in the current block.

[0086] The affine model has the following forms:

[0087] Form 1: the affine model of the current block includes a reference point coordinate of a reference point, a reference point motion vector, a first parameter, a second parameter, a third parameter, and a fourth parameter.

[0088] In some embodiments, for a 4-parameter model, the motion vector of (x, y) in the current block can be determined using the following formula:

[0089] For a 6-parameter model, the motion vector of (x, y) in the current block can be determined using the following formula:

[0090] wherein, is the motion vector of the control point at the top left corner of the current block, is the motion vector of the control point at the top right corner of the current block, is the motion vector of the control point at the bottom left corner of the current block, and the superscripts h and v represent the horizontal component and the vertical component of the motion vector. W is the width of the current block, and H is the height of the current block.

[0091] Rewriting the above formula, we can get:

[0092] That is, the motion vector of each sub-block or each coordinate position in the current block can be determined by determining the values of a, b, c, d and the motion vector of the control point at the top-left corner of the current block.

[0093] where, for the 4-parameter model, for the 6-parameter model,

[0094] The above formula can be further rewritten by extending the control point at the top-left corner to any point as follows:

[0095] where (x base , y base ) is the coordinate of the reference point, and are the horizontal component and the vertical component of the motion vector of the reference point, respectively.

[0096] As can be seen from the above formula, the motion vector of each sub-block or each coordinate position in the current block can be determined by determining the values of a, b, c, d, the reference point coordinate of the reference point, and the motion vector of the reference point.

[0097] Therefore, the affine model of the current block can be represented by the reference point coordinate of the reference point, the motion vector of the reference point, the first parameter, the second parameter, the third parameter, and the fourth parameter. The first parameter, the second parameter, the third parameter, and the fourth parameter correspond to a, b, c, d in the above formula, respectively.

[0098] In some embodiments, the first parameter is used to represent the rate of change of the horizontal component of the motion vector with respect to the x-axis coordinate, the second parameter is used to represent the rate of change of the horizontal component of the motion vector with respect to the y-axis coordinate, the third parameter is used to represent the rate of change of the vertical component of the motion vector with respect to the x-axis coordinate, and the fourth parameter is used to represent the rate of change of the vertical component of the motion vector with respect to the y-axis coordinate.

[0099] In some embodiments, the first parameter, the second parameter, the third parameter, and the fourth parameter are represented by variables dHorX, dHorY, dVerX, and dVerY, respectively.

[0100] Form 2: The affine model of the current block includes the control point motion vector of at least two control points.

[0101] In some embodiments, in the case of two control points, as shown in FIG. 4, the two control points can be the top-left control point 41 and the top-right control point 42 of the current block, and the affine model is represented as {CPMV0,CPMV1}; in the case of three control points, the three control points can be the top-left control point 41, the top-right control point 42 and the bottom-left control point 43 of the current block, and the affine model is represented as {CPMV0,CPMV1,CPMV2}.

[0102] Form 3: the affine model of the current block includes the reference point motion vector of the reference point, the first parameter, the second parameter, the third parameter and the fourth parameter.

[0103] In some embodiments, in the case of a fixed reference point, the reference point coordinates of the reference point can not be included in the affine model. For example, the fixed reference point can be the top-left vertex of the current block (with reference point coordinates (0, 0). Of course, the fixed reference point can be another vertex or a non-vertex of the current block, which is not limited in the present embodiment.

[0104] It should be noted that the affine models of the above forms can be converted into each other. For example, the affine model of Form 1 can be first constructed, and then converted from Form 1 to Form 2. Alternatively, the affine model of Form 3 can be first constructed, and then converted from Form 3 to Form 2.

[0105] The processes of the affine models of the above forms will be described below by using embodiments.

[0106] Please refer to FIG. 5, which shows a flowchart of an affine model determination process according to an example embodiment of the present application. The method is applied to a decoder, and the method can include the following steps:

[0107] Step 501: based on the motion vector of the reference image of the current block, determine the first parameter, the second parameter, the third parameter and the fourth parameter.

[0108] Determination of the reference image

[0109] Different from determining the first parameter, the second parameter, the third parameter and the fourth parameter (representing the rate of change of the motion vector with respect to the coordinates, hereinafter referred to as the rate parameter) of the current block based on the neighboring blocks of the current block in the current image, since the motions followed by the current block and the neighboring blocks in the current image can be quite different, and there can be a part in the reference image that follows the same or similar motion as the current block, therefore, in the present embodiment, the decoder determines the above rate parameters based on the reference image of the current block.

[0110] Since the motion information of the reference picture needs to be applied in determining the above parameters, in some embodiments, the decoder determines a collocated picture of the current block, and determines the rate of change parameter based on the motion vector of the collocated picture.

[0111] wherein the collocated picture is a reference picture of the current picture, and the collocated picture has a motion vector when being predicted (the collocated picture is reconstructed before the current picture), i.e., the motion vector of the collocated picture relative to the reference picture of the collocated picture.

[0112] In some embodiments, the decoder parses the bitstream to determine the collocated picture of the current block.

[0113] In some embodiments, the number of the collocated pictures is at least one, and the collocated picture is indicated by the encoding end through the bitstream. For example, the bitstream contains a collocated picture index of the collocated picture, and the decoder determines the collocated picture from the reference picture list based on the collocated picture index, and obtains the motion information of the collocated picture.

[0114] In some embodiments, in the case where there are multiple collocated pictures, the decoder determines at least one affine model of the current block, wherein different affine models are determined based on different collocated pictures.

[0115] Optionally, the decoder applies the present solution to each of the multiple collocated pictures to determine the affine model corresponding to each of the multiple collocated pictures, or the decoder applies the present solution to part of the multiple collocated pictures to determine the affine model corresponding to the part of the multiple collocated pictures, wherein the part of the multiple collocated pictures can be indicated by the encoding end in the bitstream.

[0116] For the convenience of description, the following embodiments are described by taking a single collocated picture as an example.

[0117] Description of virtual control point position

[0118] When determining the rate of change parameter based on the current picture, at least two control points need to be determined. In the present embodiment, when determining the rate of change based on the collocated picture, at least two points in the collocated picture of the current block also need to be determined. The at least two points in the collocated picture can be referred to as virtual control points (VCP). In the following embodiments, the virtual control points are used to represent the at least two points in the collocated picture for the convenience of representation.

[0119] After the at least two points in the collocated reference picture are determined, the decoder determines the first parameter, the second parameter, the third parameter and the fourth parameter based on motion vectors of the at least two points in the collocated reference picture.

[0120] In a possible implementation, the decoder determines the virtual control points in the collocated reference picture in groups, where each group of virtual control points contains 2 or 3 virtual control points.

[0121] For each group of virtual control points, the decoder determines a set of variation rate parameters based on motion vectors of the virtual control points in the group. The variation rate parameters determined for different groups of virtual control points can be different, and thus the decoder can determine multiple affine models for the current block based on different groups of virtual control points.

[0122] Optionally, when a group of virtual control points contains 2 virtual control points, the 2 virtual control points are located at the top-left corner and the top-right corner of the formed rectangle; and when a group of virtual control points contains 3 virtual control points, the 3 virtual control points are located at the top-left corner, the top-right corner and the bottom-left corner of the formed rectangle, respectively.

[0123] Optionally, the rectangle formed by the virtual control points (which can be referred to as a virtual block) has the same size as the current block, or has a different size; and the position of the rectangle formed by the virtual control points in the collocated reference picture is the same as the position of the current block in the current picture, or is different.

[0124] In some embodiments, the virtual control points in a group of virtual control points can be located in different directions of the collocated block in the collocated reference picture, such as the top, the bottom, the left or the right.

[0125] Since the motion information of the blocks to the right and below the current block cannot be obtained when the affine model is constructed based on the motion information of the current picture (because the blocks to the right and below the current block have not been coded and decoded), in a possible implementation, at least one of the n groups of points determined satisfies the following condition: the points in the group are located in the bottom-right region of the current block.

[0126] Since the motion information of the blocks to the right and below the collocated block in the reference picture can be used when the variation rate parameters are determined based on the group of points satisfying the above condition (which is the information referred to when the affine model is constructed based on the current picture), the affine model determined based on the group of points can serve as a powerful supplement to the affine model constructed based on the current picture.

[0127] In one illustrative example, as shown in FIG. 6, the current block in the current picture corresponds to a collocated block 62 in a collocated reference picture 61, and other positions represent motion vectors used in merge mode. Taking the example of determining a virtual control point group containing three virtual control points, the decoder can select the virtual control points numbered {9, 8, 7}, {15, 13, 14}, and {6 (middle position of the collocated block), 17, 18} to form the virtual control point group. Among them, the virtual control points in the virtual control point groups {9, 8, 7} and {15, 13, 14} are located at the top left of the collocated block, and the virtual control points in the virtual control point group {6 (middle position of the collocated block), 17, 18} are located at the bottom right of the collocated block.

[0128] Explanation of virtual control point availability

[0129] To ensure that the change rate parameter can be determined based on the virtual control points (avoiding that the determined change rate parameter is 0), at least two points in the collocated reference picture are located in at least two regions with a predetermined size.

[0130] Among them, when two virtual control points are determined, the two virtual control points are located in two regions with a predetermined size, respectively.

[0131] When three virtual control points are determined, the three virtual control points are located in three regions with a predetermined size, respectively, or two virtual control points of the three virtual control points are located in the same region with a predetermined size, and the other virtual control point is located in another region with a predetermined size.

[0132] In some embodiments, the region with a predetermined size can be a motion information minimum storage unit. Among them, the coordinate positions in the same motion information minimum storage unit have the same motion information.

[0133] For example, the minimum storage unit is 8x8, which means that each 8x8 block stores a set of motion information, i.e., each coordinate position in the 8x8 block has the same motion information. Of course, the minimum storage unit can have a larger or smaller size, such as 16x16 (lower implementation cost and lower motion vector accuracy), 4x4 (higher implementation cost and higher motion vector accuracy), or even 1x1, which is not limited in the present embodiment.

[0134] In one possible implementation, the decoder determines whether the virtual control points in the virtual control point group are located in the same motion information minimum storage unit based on the coordinates of the virtual control points in the virtual control point group and the size of the motion information minimum storage unit.

[0135] If the virtual control points in the virtual control point group are located in at least two motion information minimum storage units, it is determined that the virtual control point group is available, and the variation rate parameter is determined based on the virtual control point group; if the virtual control points in the virtual control point group are located in the same motion information minimum storage unit, it is determined that the virtual control point group is unavailable, and the variation rate parameter is not determined based on the virtual control point group.

[0136] Illustratively, in the case that the motion information minimum storage unit is 4x4, and the coordinates of point A are (x1, y1), and the coordinates of point B are (x2, y2), if floor(x1 / 4)=floor(x2 / 4) and floor(y1 / 4)=floor(y2 / 4), it is determined that the two points are located in the same motion information minimum storage unit; if floor(x1 / 4)≠floor(x2 / 4) and / or floor(y1 / 4)≠floor(y2 / 4), it is determined that the two points are located in different motion information minimum storage units.

[0137] In step 502, the reference point coordinates and the reference point motion vector of the reference point are determined.

[0138] The reference point can be located in the current block or outside the current block.

[0139] In some embodiments, in the case that the reference point is located in the current block, the reference point is the top-left corner vertex, the top-right corner, or the bottom-left corner vertex of the current block.

[0140] In the case that the height of the current block is H and the width of the current block is W, if the reference point is the top-left corner vertex of the current block, the reference point coordinates are (0, 0); if the reference point is the top-right corner of the current block, the reference point coordinates are (W, 0); if the reference point is the bottom-left corner vertex of the current block, the reference point coordinates are (0, H).

[0141] As to the determination manner of the reference point motion vector of the reference point, in one possible implementation, in the case that the neighboring block of the current block supports the affine mode, the decoder determines the reference point motion vector of the reference point based on the affine model of the neighboring block.

[0142] Optionally, in the case that the current block supports the merge mode and the neighboring block supports the affine mode, the decoder substitutes the coordinates of the reference point in the current block into the affine model of the neighboring block to obtain the reference motion vector of the reference point.

[0143] As shown in FIG. 7, the neighboring blocks of the current block include A0, A1, B0, B1, and B2. The decoder can determine the reference point motion vector of the top-left reference point based on the affine model of the neighboring block B2, or determine the reference point motion vector of the top-right reference point based on the affine model of the neighboring block B0 or B1, or determine the reference point motion vector of the bottom-left reference point based on the affine model of the neighboring block A0 or A1.

[0144] In another possible implementation, the decoder can determine the reference point motion vector of the reference point based on the available motion vectors in the neighboring blocks of the current block.

[0145] Optionally, the decoder can determine the reference point motion vector of the reference point in the current block by fitting based on at least two available motion vectors in the neighboring blocks of the current block.

[0146] As shown in FIG. 8, the neighboring blocks of the current block include A0, A1, A2, B0, B1, B2, and B3. The decoder can determine the reference point motion vector of the top-left reference point based on the available motion vectors in the neighboring blocks B2, B3, and A2, determine the reference point motion vector of the top-right reference point based on the available motion vectors in the neighboring blocks B0 and B1, and determine the reference point motion vector of the bottom-left reference point based on the available motion vectors in the neighboring blocks A0 and A1.

[0147] In some embodiments, the decoder constructs an affine model in the form of {(x, y), MV, a, b, c, d}, where (x, y) is the reference point coordinate, MV is the reference point motion vector, and a, b, c, and d are the first to fourth parameters respectively.

[0148] In some embodiments, when the reference point is a fixed reference point, the decoder only needs to determine the reference point motion vector of the reference point, thereby constructing an affine model in the form of {MV, a, b, c, d}, where MV is the reference point motion vector, and a, b, c, and d are the first to fourth parameters respectively. This embodiment will not be described here.

[0149] In this embodiment, the decoder determines the virtual control point group from the bottom-right region of the current block when determining the change rate parameter based on the motion vectors of the virtual control point group in the same position reference image, so that the motion information of the bottom-right region which cannot be referenced when the affine model is constructed based on the current image can be used when the change rate parameter is calculated, and the affine model constructed by this solution can serve as a powerful supplement to the existing affine model.

[0150] In addition, the decoder ensures that the change rate parameter is available for subsequent calculation of the motion vector based on the virtual control point by detecting whether the virtual control point is located in at least two motion information minimum storage units (i.e., a region with a predetermined size), which helps to improve the quality of the subsequently constructed affine model.

[0151] In the above embodiments, the process of determining the plurality of motion vectors by using the affine model including the reference point coordinate, the reference point motion vector, the first parameter, the second parameter, the third parameter, and the fourth parameter can include:

[0152] Step 1, determining an affine relationship based on the affine model of the current block, the affine relationship being used to represent the correspondence between the coordinate position and the motion vector at the coordinate position.

[0153] In some embodiments, the affine relationship can be expressed as:

[0154] where (x base , y base ) is the reference point coordinate, and are the horizontal component and the vertical component of the reference point motion vector respectively, and abcd are the first to fourth parameters respectively.

[0155] After the affine relationship is determined, the decoder can obtain the motion vector at the coordinate position by substituting the coordinate into the affine relationship.

[0156] Step 2, determining the motion vector of a plurality of sub-blocks in the current block or determining the motion vector of a plurality of coordinate positions in the current block based on the affine relationship.

[0157] In some embodiments, if the current block is divided into a plurality of sub-blocks, for each coordinate position in the sub-block, the decoder determines the motion vector at each coordinate position based on the affine relationship, and determines the average value of the motion vectors at the coordinate positions in the same sub-block as the motion vector of the sub-block.

[0158] In some embodiments, without sub-block division, for any coordinate position in the current block, the decoder can also determine the motion vector at each coordinate position based on the affine relationship.

[0159] The at least two points (i.e., virtual control points) in the reference image can be determined in at least one of the following ways:

[0160] Way 1, determining the at least two points in the same position reference image based on the vertex coordinates of the current block in the current image.

[0161] In some embodiments, the decoder determines a virtual control point as a co-located vertex of the control point in the current block in the collocated reference picture, when the image content changes slowly.

[0162] In some embodiments, the decoder determines 2 virtual control points from the collocated reference picture based on the vertex coordinates of the top-left vertex and the top-right vertex of the current block, or determines 3 virtual control points from the collocated reference picture based on the vertex coordinates of the top-left vertex, the top-right vertex and the bottom-left vertex of the current block.

[0163] In some embodiments, the decoder determines a first virtual control point based on the vertex coordinates of the top-left vertex of the current block, a second virtual control point based on the vertex coordinates of the top-left vertex and the width of the current block, and a third virtual control point based on the vertex coordinates of the top-left vertex and the height of the current block.

[0164] Method 2, determining at least two points in the collocated reference picture based on the vertex coordinates of the current block in the current picture and a first offset.

[0165] The first offset is used to represent the coordinate offset of the virtual control point from the vertex of the current block. Optionally, the first offset includes an x-axis direction offset and a y-axis direction offset.

[0166] Optionally, the first offset is a coordinate offset relative to a specified vertex in the current block. For example, the specified vertex can be the top-left vertex, the top-right vertex, the bottom-left vertex, etc. of the current block.

[0167] In some embodiments, the decoder determines m virtual control points in the collocated reference picture based on the vertex coordinates of the top-left vertex of the current block and m first offsets.

[0168] For example, the vertex coordinates of the top-left vertex of the current block are (xCb, yCb), the decoder determines the coordinates of the first virtual control point as (xCb+x1, yCb+y1) based on the first offset (x1, y1), the coordinates of the second virtual control point as (xCb+x2, yCb+y2) based on the first offset (x2, y2), and the coordinates of the third virtual control point as (xCb+x3, yCb+y3) based on the first offset (x3, y3). The first virtual control point, the second virtual control point and the third virtual control point are the top-left vertex, the top-right vertex and the bottom-left vertex of the virtual block, respectively.

[0169] Method 3, determining at least two points in the collocated reference picture based on the vertex coordinates of the current block in the current picture and a second offset.

[0170] The second offset is determined based on a motion vector of a neighboring block of the current block.

[0171] For a neighboring block of the current block, if the neighboring block has the same collocated reference picture as the current block, the motion vector of the neighboring block can be similar to the motion vector of the current block. Therefore, in order to select a more suitable virtual control point, in one possible implementation, the decoder determines the motion vector of the neighboring block of the current block, and in the case that the motion vector of the neighboring block points to the collocated reference picture of the current block, the decoder determines the second offset based on the motion vector of the neighboring block.

[0172] The neighboring block is a block that is reconstructed before the current block, and the motion vector of the neighboring block is a difference between coordinates of the neighboring block and coordinates of a reference block of the neighboring block in the collocated reference picture.

[0173] Further, the decoder offsets the vertex coordinates of the current block based on the second offset to obtain coordinates of the virtual control point in the collocated reference picture. Optionally, the decoder can offset the vertex coordinates of different vertices in the current block based on the second offset to obtain coordinates of a plurality of virtual coordinate points.

[0174] For example, as shown in FIG. 9, the current block has neighboring blocks A0, A1, A2, B0, B1, B2, and B3. The motion vector of the neighboring block A0 points to the collocated reference picture of the current block, and the motion vector is mv A0 If the coordinates of the top-left vertex of the current block are (xCb, yCb), the point with coordinates in the collocated reference picture is determined as the virtual coordinate point, where are horizontal and vertical components, respectively.

[0175] Optionally, the first offset and the second offset are determined based on the motion vector of the neighboring block of the current block.

[0176] In some embodiments, in the case that there is a motion vector of a neighboring block pointing to the collocated reference picture of the current block, the decoder offsets the vertex coordinates of the current block based on the first offset and the second offset to obtain coordinates of the virtual control point in the collocated reference picture. In the case that there is no motion vector of a neighboring block pointing to the collocated reference picture of the current block, the decoder offsets the vertex coordinates of the current block based on the first offset.

[0177] Determination of the rate-of-change parameter

[0178] As shown in FIG. 10, the motion vector of the collocated block (col_cu) on the collocated reference picture (col_pic) is a vector between the collocated reference picture and the reference picture of the collocated block (col_ref). As for the current block (curr_CU), the motion vector needed is a vector between the current picture (curr_pic) and the reference picture of the current block (curr_ref).

[0179] Let the POC distance between col_pic and col_ref be td, and the POC distance between curr_pic and curr_ref be tb. In the case that the motion on the collocated block is the same as the motion on the current block, the scaling ratio can be determined according to td and tb. Let the motion vector of the collocated block be (col_mv_x, col_mv_y), then the temporal motion vector prediction (tmvp_x, tmvp_y) can be derived as follows:

[0180] tmvp_x = col_mv_x * tb / td, tmvp_y = col_mv_y * tb / td

[0181] Based on the derivation above, it can be seen that the current picture can scale the motion information of the collocated picture from the collocated reference picture to obtain the temporal motion information of the current picture. Further, based on the motion information of the collocated reference picture, after determining the change rate parameter corresponding to the collocated reference picture, the change rate parameter can be scaled to obtain the change rate parameter corresponding to the current picture.

[0182] In a possible implementation, the decoder determines the fifth parameter, the sixth parameter, the seventh parameter and the eighth parameter based on the motion vectors of at least two points (i.e. virtual control points) in the collocated reference picture, and scales the fifth parameter, the sixth parameter, the seventh parameter and the eighth parameter to obtain the first parameter, the second parameter, the third parameter and the fourth parameter.

[0183] The fifth to eighth parameters are used to represent the change rate of the motion vector of a coordinate position in a virtual block (a block composed of virtual control points) with respect to the coordinate.

[0184] As for the determination of the scaling ratio for scaling, in a possible implementation, the decoder determines a first picture interval between the current picture and the reference picture of the current picture, and determines a second picture interval between the collocated reference picture and the reference picture of the collocated reference picture. The fifth parameter, the sixth parameter, the seventh parameter and the eighth parameter are scaled based on the ratio of the first picture interval and the second picture interval to obtain the first parameter, the second parameter, the third parameter and the fourth parameter.

[0185] The first image interval is used to represent a POC distance between the current image and a reference image of the current image, and the second image interval is used to represent a POC distance between the collocated reference image and a reference image of the collocated reference image.

[0186] In some embodiments, a scaling ratio is determined based on the first image interval and the second image interval. The fifth parameter is scaled based on the scaling ratio to obtain the first parameter; the sixth parameter is scaled based on the scaling ratio to obtain the second parameter; the seventh parameter is scaled based on the scaling ratio to obtain the third parameter; and the eighth parameter is scaled based on the scaling ratio to obtain the fourth parameter.

[0187] Illustratively, if a POC distance between the col_pic and the col_ref is td, a POC distance between the curr_pic and the curr_ref is tb, and the change rate parameters corresponding to the virtual blocks in the collocated reference image are a', b', c', and d' respectively based on the motion vectors of the virtual control points in the collocated reference image, then the change rate parameters a, b, c, and d corresponding to the current block in the current image are a = a' * tb / td, b = b' * tb / td, c = c' * tb / td, and d = d' * tb / td respectively.

[0188] Referring to FIG. 11, a flowchart of an affine model determination process according to another exemplary embodiment of the present application is shown. The method is applied to a decoder, and the method can include the following steps:

[0189] In step 1101, the first parameter, the second parameter, the third parameter, and the fourth parameter are determined based on the motion vector of the reference image of the current block.

[0190] The implementation of this step can refer to step 501, and thus is not described herein.

[0191] In step 1102, the control point motion vectors of the at least two control points are determined based on the first parameter, the second parameter, the third parameter, the fourth parameter, and the reference point.

[0192] Since the motion vector of any coordinate position in the current block can be determined based on the change rate parameters, the reference point coordinates, and the reference point motion vector, when the affine model of the form 2 is needed, the decoder can determine the control point motion vectors of the at least two control points.

[0193] Optionally, the at least two control points are control points belonging to the current block. For example, a first control point located at the top-left corner of the current block, a second control point determined based on the top-left corner coordinates and the width of the current block, and a third control point determined based on the top-left corner coordinates and the height of the current block.

[0194] Optionally, the at least two control points are control points required by the expression of the affine model. For example, when the 4-parameter affine model is used, the at least two control points include the top-left corner and the top-right corner of the current block; when the 6-parameter affine model is used, the at least two control points include the top-left corner, the top-right corner and the bottom-left corner of the current block.

[0195] In a possible implementation, the decoder determines the affine relationship based on the first parameter, the second parameter, the third parameter, the fourth parameter, the reference point coordinates and the reference point motion vector, where the affine relationship is used to represent the correspondence between the coordinate position and the motion vector at the coordinate position.

[0196] In some embodiments, the affine relationship can be expressed as:

[0197] where (x base , y base ) are the coordinates of the reference point, and are the horizontal component and the vertical component of the motion vector of the reference point respectively, and abcd are the first to fourth parameters respectively.

[0198] In some other embodiments, when the reference point is a fixed reference point, the decoder determines the affine relationship based on the first parameter, the second parameter, the third parameter, the fourth parameter and the reference point motion vector.

[0199] After the affine relationship is determined, the decoder determines the control point motion vector of the at least two control points based on the affine relationship and the control point coordinates of the at least two control points, i.e., the control point motion vector of the control point can be obtained by substituting the coordinates of the control point into the affine relationship.

[0200] Illustratively, when the height of the current block is H and the width of the current block is W, the decoder substitutes the control point coordinates (0, 0) of the top-left corner control point of the current block into the above affine relationship to obtain the control point motion vector CPMV0 of the top-left corner control point; substitutes the control point coordinates (W, 0) of the top-right corner control point into the above affine relationship to obtain the control point motion vector CPMV1 of the top-right corner control point; and substitutes the control point coordinates (0, H) of the bottom-left corner control point into the above affine relationship to obtain the control point motion vector CPMV2 of the bottom-left corner control point.

[0201] In some embodiments, when the 4-parameter affine model is used, the decoder constructs an affine model in the form of {CPMV0, CPMV1}; and when the 6-parameter affine model is used, the decoder constructs an affine model in the form of {CPMV0, CPMV1, CPMV2}.

[0202] In the above embodiments, the affine model is constructed based on the control point motion vectors of the at least two control points, and the process of determining the motion vector can comprise:

[0203] Step 1, determining the first parameter, the second parameter, the third parameter and the fourth parameter based on the affine model of the current block.

[0204] Similar to the determination of the change rate parameter based on the control points in the above embodiments, the decoder determines the first parameter, the second parameter, the third parameter and the fourth parameter based on the control point motion vectors of the at least two control points in the affine model.

[0205] Since the change rate parameter has been determined in the process of constructing the affine model, in a possible implementation, the decoder directly uses the previously determined change rate parameter.

[0206] Step 2, determining the affine relationship based on the first parameter, the second parameter, the third parameter and the fourth parameter, the affine relationship being used to represent the corresponding relationship between the coordinate position and the motion vector at the coordinate position.

[0207] Since the control point motion vector of the top-left corner control point of the current block is included in the affine model, the decoder can determine the affine relationship based on the first parameter, the second parameter, the third parameter, the fourth parameter and the control point motion vector of the top-left corner control point.

[0208] In some embodiments, the determined affine relationship is as follows:

[0209] wherein, and are the components of the motion vector of the top-left corner control point in the horizontal and vertical directions.

[0210] Step 3, determining the motion vector of each sub-block in the current block or the motion vector of each coordinate position in the current block based on the affine relationship.

[0211] In some embodiments, if the current block is divided into several sub-blocks, for each coordinate position in a sub-block, the decoder determines the motion vector at each coordinate position based on the affine relationship, and determines the average value of the motion vectors at each coordinate position in the same sub-block as the motion vector of the sub-block.

[0212] In some embodiments, without sub-block division, for any coordinate position in the current block, the decoder can also determine the motion vector at each coordinate position based on the affine relationship.

[0213] The image encoding process is described below using exemplary embodiments.

[0214] Please refer to FIG. 12, which shows a flow chart of an image encoding method according to an example embodiment of the present application. The method is applied to an encoder, and can include the following steps:

[0215] In step 1201, an affine model of the current block is determined based on motion information of a reference image of the current block and the reference point.

[0216] In some embodiments, the encoder determines a reference image of the current block in the current image. The reference image belongs to a reference picture list (Reference Picture List).

[0217] Optionally, the reference image can be a forward reference image determined from a forward prediction reference picture list, or a forward reference image and a backward reference image determined from a bidirectional prediction reference picture list.

[0218] In the embodiments of the present application, the reference image of the current block stores motion information used for prediction of the reference image. The motion information is motion information of a certain block in the reference image used for prediction of the certain block. The motion information can include a motion vector.

[0219] In some embodiments, the encoder determines the reference point in the current image, and obtains reference point coordinates and a reference point motion vector of the reference point, which are used to determine the affine model of the current block together with the motion information of the reference image.

[0220] As to the form of the affine model, in one possible design, the affine model can be represented by at least two control points, for example, the affine model can be represented by a 6-parameter model (CPMV0, CPMV1, CPMV2) or a 4-parameter model (CPMV0, CPMV1). CPMVn represents a motion vector of the nth control point, i.e., the affine model can be represented by motion vectors of 3 or 2 control points.

[0221] In another possible design, the affine model can be represented by {reference point information+a, b, c, d}. The reference point information includes reference point coordinates and a reference point motion vector, and abcd are variation rates of motion vectors varying with coordinates determined based on the motion information of the reference image.

[0222] In other possible designs, the affine model can be represented by a combination of the above two forms.

[0223] In step 1202, a plurality of motion vectors are obtained based on the affine model of the current block.

[0224] In a possible implementation, the encoder constructs a plurality of candidate affine models (including an affine model constructed based on the reference image and an affine model constructed based on the current image). For each candidate affine model, the encoder obtains a plurality of motion vectors using the affine model.

[0225] Optionally, the plurality of motion vectors of the current block can be motion vectors of different sub-blocks in the current block, or motion vectors of a plurality of coordinate positions in the current block.

[0226] For example, when the current block is divided into 4x4 sub-blocks, the encoder can determine 16 motion vectors of the 16 sub-blocks using the affine model. Alternatively, the encoder can determine a motion vector of a sample at each coordinate position in the current block using the affine model.

[0227] At step 1203, the current block is predicted based on the plurality of motion vectors.

[0228] In a possible implementation, the encoder determines a reference sub-block corresponding to a sub-block in the current block from the reference image based on the motion vector of the sub-block, and determines a prediction value of the sub-block based on a reconstructed value of the reference sub-block.

[0229] In another possible implementation, the encoder determines a reference coordinate position corresponding to a current coordinate position in the current block from the reference image based on the motion vector of the current coordinate position, and determines a prediction value of the current coordinate position based on a reconstructed value of the reference coordinate position.

[0230] Optionally, the encoder determines a reference sub-block (reference coordinate position) corresponding to the current sub-block (current coordinate position) from the reference image based on the position (or the current coordinate position) of the current sub-block and the motion vector, and determines a reconstructed sub-block of the reference sub-block (or a reconstructed value of the reference coordinate position) as a prediction sub-block (or a sample prediction value) of the current sub-block (or the reference coordinate position).

[0231] To sum up, in the embodiments of the present application, because the reference image of the current image can have the same or similar motion information as the current block, the affine model of the current block is determined based on the motion information of the reference image and the reference point, which can provide more available affine models for the codec, and thus the encoder can determine a more suitable affine model for the current block and use the affine model to predict the current block, which helps to improve the quality and efficiency of image coding.

[0232] In a possible implementation, in the affine mode, the encoding end constructs a candidate list including a plurality of candidate affine models, and determines an affine model suitable for the current block from the candidate list, and further performs image prediction coding based on the affine model. As shown in FIG. 13, the method can further include the following steps:

[0233] Step 1204, add the affine model of the current block to the candidate list.

[0234] In some embodiments, the candidate list is a subblock merge candidate list, which contains multiple affine models. In this embodiment, the candidate list includes an affine model constructed based on the motion vector of a neighboring block of the current block in the current image, and an affine model constructed based on the motion information of a reference image and a reference point.

[0235] It should be noted that the same method is used by the encoding and decoding ends to construct the candidate list, so as to ensure consistency of the affine model finally adopted by the encoding and decoding ends.

[0236] Each affine model in the candidate list has a respective affine model index.

[0237] Step 1205, determine the encoding cost of each affine model in the candidate list based on the prediction result of the current block by the affine model.

[0238] The encoder uses each affine model in the candidate list to predict the current block, and obtains the prediction block of the current block when different affine models are used. The encoder determines the encoding cost when the affine model is used based on the prediction block of the current block and the original block of the current block.

[0239] In some embodiments, the encoder determines the residual between the prediction block and the original block, and quantitatively encodes the residual, so as to determine the encoding cost based on the result of the quantitative encoding. The encoding cost can be represented by rate, distortion or complexity.

[0240] Step 1206, determine the affine model index based on the encoding cost of each affine model.

[0241] In some embodiments, the encoder determines the respective encoding cost of each affine model in the candidate list, determines the affine model most suitable for predicting the current block, and obtains the affine model index of the affine model.

[0242] Optionally, the encoder determines the affine model index corresponding to the affine model with the minimum encoding cost.

[0243] Step 1207, encode the affine model index to the bitstream.

[0244] In order to instruct the decoding end to use the same affine model as the encoding end to predict the current block, the encoder encodes the affine model index of the affine model in the candidate list to the bitstream.

[0245] It should be noted that, in addition to encoding the affine model index, the encoding end will use the affine model to perform prediction and determine the obtained residual to be quantized and coded into the code stream.

[0246] Similar to the decoding end, the affine model constructed by the encoder can include the reference point coordinates of the reference point, the reference point motion vector, the first parameter, the second parameter, the third parameter, and the fourth parameter; or, the affine model constructed by the encoder can include the reference point motion vector of the reference point, the first parameter, the second parameter, the third parameter, and the fourth parameter; or, the affine model includes the control point motion vector of at least two control points. The specific form of the affine model can refer to the embodiments of the decoder, and this embodiment will not be repeated here.

[0247] Please refer to FIG. 14, which shows a flowchart of an affine model determination process according to an example embodiment of the present application. The method is applied to an encoder, and the method can include the following steps:

[0248] Step 1401, based on the motion vector of the reference image of the current block, determine the first parameter, the second parameter, the third parameter, and the fourth parameter.

[0249] Selection of reference image

[0250] Unlike the determination of the first parameter, the second parameter, the third parameter, and the fourth parameter (representing the rate of change of the motion vector with the change of the coordinates, hereinafter referred to as the rate of change parameter) of the current block based on the neighboring blocks of the current block in the current image, since the motion followed by the current block and the neighboring blocks in the current image can have a large difference, and there can be a part in the reference image that follows the same or similar motion as the current block, therefore, in this embodiment, the encoder determines the above-mentioned rate of change parameter based on the reference image of the current block.

[0251] Since the motion information of the reference image needs to be applied in the process of determining the above-mentioned parameters, in some embodiments, the encoder determines the collocated picture of the current block, and then determines the rate of change parameter based on the motion vector of the collocated picture.

[0252] The collocated picture belongs to the reference image of the current image, and has a motion vector when performing prediction (the collocated picture is reconstructed before the current image), that is, the motion vector of the collocated picture relative to the reference image of the collocated picture.

[0253] In some embodiments, the encoder determines the collocated picture of the current block. The number of collocated pictures is at least one.

[0254] In some embodiments, in the presence of multiple collocated reference pictures, the encoder determines at least one affine model for the current block, wherein different affine models are determined based on different collocated reference pictures.

[0255] Optionally, the encoder applies the present solution to each of the multiple collocated reference pictures to determine an affine model corresponding to each of the multiple collocated reference pictures, or the encoder applies the present solution to part of the multiple collocated reference pictures to determine an affine model corresponding to the part of the multiple collocated reference pictures.

[0256] For convenience of description, the following embodiments are described by taking a single collocated reference picture as an example.

[0257] In addition, after the collocated reference picture is determined, the encoder encodes an image index of the collocated reference picture into a bitstream to indicate that the decoder determines an affine model based on the collocated reference picture consistent with the encoder. The image index encoding is used to represent a position of the collocated reference picture in a reference picture list.

[0258] Description of virtual control point position

[0259] In the determination of the variation rate parameter based on the current picture, at least two control points need to be determined. In the present embodiment, in the determination of the variation rate based on the collocated reference picture, at least two points in the collocated reference picture of the current block also need to be determined. The at least two points in the collocated reference picture can be referred to as virtual control points (VCP). In the following embodiments, the virtual control points are used to represent the at least two points in the collocated reference picture for convenience of representation.

[0260] After the at least two points in the collocated reference picture are determined, the encoder determines a first parameter, a second parameter, a third parameter, and a fourth parameter based on motion vectors of the at least two points in the collocated reference picture.

[0261] In a possible implementation, the encoder determines the virtual control points in the collocated reference picture in groups, wherein each group of virtual control points contains 2 or 3 virtual control points.

[0262] For each group of virtual control points, the encoder determines a group of variation rate parameters based on motion vectors of the virtual control points in the group of virtual control points. The variation rate parameters calculated for different groups of virtual control points can be different, and thus the encoder can subsequently determine multiple affine models for the current block based on different groups of virtual control points.

[0263] Optionally, when the virtual control point group contains 2 virtual control points, the 2 virtual control points are located at the upper left corner and the upper right corner of the formed rectangle; when the virtual control point group contains 3 virtual control points, the 3 virtual control points are located at the upper left corner, the upper right corner and the lower left corner of the formed rectangle respectively.

[0264] Optionally, the rectangle formed by the virtual control points (which can be referred to as a virtual block) has the same size as the current block, or has different size; the position of the rectangle formed by the virtual control points in the collocated reference image is the same as the position of the current block in the current image, or is different.

[0265] In some embodiments, the virtual control points in the virtual control point group can be located in each direction of the collocated block in the collocated reference image, such as the upper side, the lower side, the left side or the right side.

[0266] Since when constructing the affine model based on the motion information of the current image, the motion information can be obtained from the neighboring blocks on the left side and the upper side of the current block, but cannot be obtained from the blocks on the right side and the lower side of the current block (since the blocks on the right side and the lower side have not been coded and decoded), therefore in one possible implementation, in the determined n point groups, there is at least one point group satisfying the following condition: the points contained in the point group are located in the lower right region of the current block.

[0267] Since when determining the variation rate parameter based on the point group satisfying the above condition, the motion information of the collocated block in the reference image can be utilized (which is the information referred to when constructing the affine model based on the current image), therefore the affine model determined based on the point group can serve as a powerful supplement to the affine model constructed based on the current image.

[0268] In one illustrative example, as shown in FIG. 6, the current block in the current image is collocated with the block 62 in the collocated reference image 61, and the motion vectors used in the merge mode are indicated at other positions. Taking the example of determining that the virtual control point group contains 3 virtual control points, the encoder can select the virtual control points numbered {9, 8, 7}, {15, 13, 14} and {6 (the middle position of the collocated block), 17, 18} to form the virtual control point group. Among them, the virtual control points in the virtual control point groups {9, 8, 7} and {15, 13, 14} are located at the upper left side of the collocated block, and the virtual control points in the virtual control point group {6 (the middle position of the collocated block), 17, 18} are located at the lower right side of the collocated block.

[0269] Explanation of virtual control point availability

[0270] In order to ensure that the variation rate parameter can be determined based on the virtual control points (avoiding that the determined variation rate parameter is 0), at least two points in the collocated reference image are located in at least two regions with a predetermined size.

[0271] wherein, when the two virtual control points are determined, the two virtual control points are located in two regions with predetermined sizes respectively.

[0272] When the three virtual control points are determined, the three virtual control points are located in three regions with predetermined sizes respectively, or two virtual control points of the three virtual control points are located in a same region with predetermined size, and the other virtual control point is located in another region with predetermined size.

[0273] In some embodiments, the region with predetermined size can be a minimum storage unit of motion information. Wherein, the coordinate positions in a same minimum storage unit of motion information have the same motion information.

[0274] For example, the minimum storage unit is 8x8, which means that each 8x8 block stores a group of motion information, i.e. each coordinate position in the 8x8 block has the same motion information. Of course, the minimum storage unit can have a larger or smaller size, such as 16x16 (lower implementation cost and lower motion vector accuracy), 4x4 (higher implementation cost and higher motion vector accuracy), or even 1x1, which is not limited in the present embodiment.

[0275] In a possible implementation, the encoder determines whether the virtual control points in the virtual control point group are located in a same minimum storage unit of motion information based on the coordinates of the virtual control points in the virtual control point group and the size of the minimum storage unit of motion information.

[0276] If the virtual control points in the virtual control point group are located in at least two minimum storage units of motion information, it is determined that the virtual control point group is available, and thus the variation rate parameter is determined based on the virtual control point group; if the virtual control points in the virtual control point group are located in a same minimum storage unit of motion information, it is determined that the virtual control point group is unavailable, and thus the variation rate parameter will not be determined based on the virtual control point group.

[0277] Illustratively, in the case where the minimum storage unit of motion information is 4x4, and the coordinates of point A are (x1, y1) and the coordinates of point B are (x2, y2), if floor(x1 / 4)=floor(x2 / 4) and floor(y1 / 4)=floor(y2 / 4), it is determined that the two points are located in a same minimum storage unit of motion information; if floor(x1 / 4)≠floor(x2 / 4) and / or floor(y1 / 4)≠floor(y2 / 4), it is determined that the two points are located in different minimum storage units of motion information.

[0278] Step 1402, determining the reference point coordinates and the reference point motion vector of the reference point.

[0279] The reference point of the current block can be located within the current block, or located outside the current block.

[0280] In some embodiments, when the reference point is located within the current block, the reference point is the top-left corner, the top-right corner or the bottom-left corner of the current block.

[0281] When the height of the current block is H and the width of the current block is W, if the reference point is the top-left corner of the current block, the reference point coordinates are (0, 0); if the reference point is the top-right corner of the current block, the reference point coordinates are (W, 0); if the reference point is the bottom-left corner of the current block, the reference point coordinates are (0, H).

[0282] As to the determination of the reference point motion vector of the reference point, in one possible implementation, when the neighboring blocks of the current block support the affine mode, the encoder determines the reference point motion vector of the reference point based on the affine model of the neighboring blocks.

[0283] Optionally, when the current block supports the merge mode and the neighboring blocks support the affine mode, the encoder substitutes the coordinates of the reference point in the current block into the affine model of the neighboring blocks to obtain the reference motion vector of the reference point.

[0284] Illustratively, as shown in FIG. 7, the neighboring blocks of the current block include A0, A1, B0, B1 and B2. The encoder can determine the reference point motion vector of the top-left corner reference point based on the affine model of the neighboring block B2, or determine the reference point motion vector of the top-right corner reference point based on the affine model of the neighboring block B0 or B1, or determine the reference point motion vector of the bottom-left corner reference point based on the affine model of the neighboring block A0 or A1.

[0285] In another possible implementation, the encoder can determine the reference point motion vector of the reference point based on the available motion vectors in the neighboring blocks of the current block.

[0286] Optionally, the encoder can determine the reference point motion vector of the reference point in the current block by fitting based on at least two available motion vectors in the neighboring blocks of the current block.

[0287] Illustratively, as shown in FIG. 8, the neighboring blocks of the current block include A0, A1, A2, B0, B1, B2 and B3. The decoder can determine the reference point motion vector of the top-left corner reference point based on the available motion vectors in the neighboring blocks B2, B3 and A2, determine the reference point motion vector of the top-right corner reference point based on the available motion vectors in the neighboring blocks B0 and B1, and determine the reference point motion vector of the bottom-left corner reference point based on the available motion vectors in the neighboring blocks A0 and A1.

[0288] In some embodiments, the encoder constructs an affine model in the form of {(x, y), MV, a, b, c, d}, where (x, y) is the reference point coordinate, MV is the reference point motion vector, and a, b, c, d are the first to fourth parameters respectively.

[0289] In some embodiments, when the reference point is a fixed reference point, the decoder only needs to determine the reference point motion vector of the reference point, thereby constructing an affine model in the form of {MV, a, b, c, d}, where MV is the reference point motion vector, and a, b, c, d are the first to fourth parameters respectively. This embodiment will not be repeated here.

[0290] In this embodiment, when determining the change rate parameter based on the motion vector of the virtual control point group in the co-located reference image, the encoder determines the virtual control point group from the lower right region of the current block, so that when calculating the change rate parameter, the motion information of the lower right region which cannot be referenced when constructing the affine model based on the current image can be utilized, and the affine model constructed by this scheme can serve as a powerful supplement to the existing affine model.

[0291] In addition, the encoder ensures that the subsequent change rate parameter calculated based on the motion vector of the virtual control point is available by detecting whether the virtual control point is located in at least two motion information minimum storage units (i.e., regions with a predetermined size), which helps to improve the quality of the affine model constructed subsequently.

[0292] In the above embodiments, the process of determining a plurality of motion vectors using the affine model containing the reference point coordinate, the reference point motion vector, the first parameter, the second parameter, the third parameter, and the fourth parameter can include:

[0293] Step 1, determining an affine relationship based on the affine model of the current block, the affine relationship being used to represent the correspondence between the coordinate position and the motion vector at the coordinate position.

[0294] In some embodiments, the affine relationship can be expressed as:

[0295] where (x base , y base ) is the reference point coordinate, and are the horizontal component and the vertical component of the reference point motion vector respectively, and a, b, c, d are the first to fourth parameters respectively.

[0296] After determining the affine relationship, the encoder can obtain the motion vector at the coordinate position by substituting the coordinate into the affine relationship.

[0297] Step 2, determining the motion vector of a plurality of sub-blocks in the current block or determining the motion vector of a plurality of coordinate positions in the current block based on the affine relationship.

[0298] In some embodiments, if the current block is divided into several sub-blocks, for each coordinate position in a sub-block, the encoder determines the motion vector at the coordinate position based on the affine relationship, and determines the motion vector of the sub-block as the average of the motion vectors at the coordinate positions in the sub-block.

[0299] In some embodiments, without sub-block division, for any coordinate position in the current block, the encoder can also determine the motion vector at the coordinate position based on the affine relationship.

[0300] In a possible implementation, the affine models in different forms can be converted to each other. When the affine model needs to be expressed by at least two control points, after determining the variation rate parameters of the current block and the reference point by the above steps, the encoder can determine the control point motion vectors of the at least two control points based on the first parameter, the second parameter, the third parameter, the fourth parameter and the reference point information, and determine the affine model of the current block based on the control point motion vectors of the at least two control points.

[0301] Optionally, the at least two control points are control points meeting the form requirement of the affine model. For example, when a 4-parameter affine model is used, the at least two control points include the top-left corner vertex and the top-right corner vertex of the current block; when a 6-parameter affine model is used, the at least two control points include the top-left corner vertex, the top-right corner vertex and the bottom-left corner vertex of the current block.

[0302] In a possible implementation, the encoder determines an affine relationship based on the first parameter, the second parameter, the third parameter, the fourth parameter and the reference point, and the affine relationship is used to represent the correspondence between the coordinate position and the motion vector at the coordinate position.

[0303] In some embodiments, the affine relationship can be expressed as:

[0304] where (x base , y base ) is the coordinate of the reference point, and are the horizontal component and the vertical component of the motion vector of the reference point respectively, and abcd are the first to fourth parameters.

[0305] After determining the affine relationship, the encoder determines the control point motion vectors of the at least two control points based on the affine relationship and the control point coordinates of the at least two control points, i.e., the control point motion vector of a control point can be obtained by substituting the coordinate of the control point into the affine relationship.

[0306] Illustratively, when the height of the current block is H and the width of the current block is W, the encoder substitutes the control point coordinate (0, 0) of the top-left corner control point in the current block into the above affine relationship to obtain the control point motion vector CPMV0 of the top-left corner control point; substitutes the control point coordinate (W, 0) of the top-right corner control point into the above affine relationship to obtain the control point motion vector CPMV1 of the top-right corner control point; and substitutes the control point coordinate (0, H) of the bottom-left corner control point into the above affine relationship to obtain the control point motion vector CPMV2 of the bottom-left corner control point.

[0307] In some embodiments, when the 4-parameter affine model is adopted, the encoder constructs an affine model in the form of {CPMV0, CPMV1}; and when the 6-parameter affine model is adopted, the encoder constructs an affine model in the form of {CPMV0, CPMV1, CPMV2}.

[0308] Correspondingly, when the affine model is constructed based on the control point motion vectors of the at least two control points, and the motion vectors of the plurality of sub-blocks or the motion vectors of the plurality of coordinate positions in the current block are determined based on the affine relationship, the encoder determines the first parameter, the second parameter, the third parameter and the fourth parameter based on the control point motion vectors in the affine model of the current block, and determines the affine relationship based on the first parameter, the second parameter, the third parameter and the fourth parameter.

[0309] Since the variation rate parameter has been determined in the process of constructing the affine model, in one possible implementation, the encoder directly uses the previously determined variation rate parameter.

[0310] Moreover, since the control point motion vector of the top-left corner control point in the current block is included in the 4-parameter or 6-parameter affine model, the encoder can determine the affine relationship based on the first parameter, the second parameter, the third parameter, the fourth parameter and the control point motion vector of the top-left corner control point.

[0311] In some embodiments, the determined affine relationship is as follows:

[0312] wherein, and are the components of the motion vector of the top-left corner control point in the horizontal and vertical directions.

[0313] The determination of the virtual control points in the reference image can be performed in at least one of the following manners:

[0314] Manner 1: determining at least two points (virtual control points) in the co-located reference image based on the vertex coordinates of the current block in the current image.

[0315] In this way, the virtual block formed by the virtual control points has the same position and size as the current block.

[0316] In a second way, at least two points (virtual control points) in the co-located reference image are determined based on the coordinates of the vertices of the current block in the current image and a first offset. The first offset is an offset of the coordinates relative to a specified vertex in the current block.

[0317] In a third way, at least two points (virtual control points) in the co-located reference image are determined based on the coordinates of the vertices of the current block in the current image and a second offset.

[0318] In a fourth way, at least two points (virtual control points) in the co-located reference image are determined based on the coordinates of the vertices of the current block in the current image, the first offset and the second offset.

[0319] In a possible implementation, the encoder determines the motion vector of a neighboring block of the current block, and in a case where the motion vector of the neighboring block points to the co-located reference image of the current block, the encoder determines the second offset based on the motion vector of the neighboring block. In a case where the second offset is determined, the encoder determines the virtual control points in the co-located reference image by using the above-described third or fourth way; in a case where the second offset is not determined, the encoder determines the virtual control points in the co-located reference image by using the above-described first or second way.

[0320] The specific ways of determining the virtual control points can refer to the decoding-side embodiments, which will not be described herein.

[0321] Determination of the variation rate parameter

[0322] In a possible implementation, the encoder determines the fifth parameter, the sixth parameter, the seventh parameter and the eighth parameter based on the motion vectors of the at least two points (virtual control points) in the co-located reference image, and scales the fifth parameter, the sixth parameter, the seventh parameter and the eighth parameter to obtain the first parameter, the second parameter, the third parameter and the fourth parameter.

[0323] The fifth to eighth parameters are used to represent the variation rate of the motion vector of a coordinate position in the virtual block (a block determined by the virtual control points) with respect to the coordinate.

[0324] As to the determination of the scaling ratio for scaling, in a possible implementation, the encoder determines a first image interval between the current image and a reference image of the current image, and determines a second image interval between the co-located reference image and a reference image of the co-located reference image. The fifth parameter, the sixth parameter, the seventh parameter and the eighth parameter are scaled based on the ratio of the first image interval and the second image interval to obtain the first parameter, the second parameter, the third parameter and the fourth parameter.

[0325] wherein the first picture interval is used to represent a POC distance between the current picture and a reference picture of the current picture, and the second picture interval is used to represent a POC distance between the collocated reference picture and a reference picture of the collocated reference picture.

[0326] In some embodiments, the encoder determines a scaling ratio based on the first picture interval and the second picture interval. The fifth parameter is scaled based on the scaling ratio to obtain the first parameter; the sixth parameter is scaled based on the scaling ratio to obtain the second parameter; the seventh parameter is scaled based on the scaling ratio to obtain the third parameter; and the eighth parameter is scaled based on the scaling ratio to obtain the fourth parameter.

[0327] Illustratively, if a POC distance between the col_pic and the col_ref is td, a POC distance between the curr_pic and the curr_ref is tb, and the change rate parameters corresponding to the virtual blocks in the collocated reference picture are a', b', c', d' based on the motion vectors of the virtual control points in the collocated reference picture, then the change rate parameters a, b, c, d corresponding to the current block in the current picture are a=a' * td / td, b=b' * tb / td, c=c' * tb / td, d=d' * tb / td.

[0328] Referring to FIG. 15, a structural block diagram of an image decoding apparatus is shown according to an example embodiment of the present application. The image decoding apparatus includes:

[0329] A decoding unit 1501 is configured to determine an affine model of a current block based on motion information of a reference picture of the current block and a reference point.

[0330] The decoding unit 1501 is configured to obtain a plurality of motion vectors based on the affine model of the current block.

[0331] The decoding unit 1501 is configured to predict the current block based on the plurality of motion vectors.

[0332] Optionally, the affine model of the current block includes reference point coordinates of the reference point, a reference point motion vector, a first parameter, a second parameter, a third parameter, and a fourth parameter.

[0333] Optionally, the affine model of the current block includes a reference point motion vector of the reference point, a first parameter, a second parameter, a third parameter, and a fourth parameter.

[0334] Optionally, the affine model of the current block includes control point motion vectors of at least two control points.

[0335] Optionally, the decoding unit 1501 is configured to:

[0336] determine the first parameter, the second parameter, the third parameter and the fourth parameter based on a motion vector of a reference image of the current block;

[0337] determine the reference point motion vector of the reference point.

[0338] Optionally, the decoding unit 1501 is configured to:

[0339] determine the first parameter, the second parameter, the third parameter and the fourth parameter based on a motion vector of a reference image of the current block;

[0340] determine the reference point motion vector of the reference point.

[0341] Optionally, the decoding unit 1501 is configured to:

[0342] determine the first parameter, the second parameter, the third parameter and the fourth parameter based on a motion vector of a reference image of the current block;

[0343] determine the control point motion vector of the at least two control points based on the first parameter, the second parameter, the third parameter, the fourth parameter and the reference point.

[0344] Optionally, the decoding unit 1501 is configured to:

[0345] determine at least two points in a co-located reference image of the current block;

[0346] determine the first parameter, the second parameter, the third parameter and the fourth parameter based on motion vectors of the at least two points in the co-located reference image.

[0347] Optionally, the decoding unit 1501 is configured to:

[0348] determine the at least two points in the co-located reference image based on a vertex coordinate of the current block in a current image;

[0349] determine the at least two points in the co-located reference image based on a vertex coordinate of the current block in a current image and a first offset;

[0350] determine the at least two points in the co-located reference image based on a vertex coordinate of the current block in a current image and a second offset;

[0351] determine the at least two points in the co-located reference image based on a vertex coordinate of the current block in a current image, a first offset and a second offset;

[0352] The first offset is used to represent a coordinate offset of a top point of the current block, and the second offset is determined based on a motion vector of a neighboring block of the current block.

[0353] Optionally, the decoding unit 1501 is configured to:

[0354] determine a motion vector of a neighboring block of the current block.

[0355] In a case where the motion vector of the neighboring block points to the co-located reference image of the current block, the second offset is determined based on the motion vector of the neighboring block.

[0356] Optionally, at least two points in the co-located reference image are located in at least two regions with a predetermined size.

[0357] Optionally, coordinate positions in a same region with a predetermined size have the same motion information.

[0358] Optionally, the co-located reference image contains n point groups, and each point group contains 2 or 3 points, n being a positive integer.

[0359] Optionally, at least one point group in the n point groups satisfies a condition that points in the point group are located in a lower right region of the current block.

[0360] Optionally, the decoding unit 1501 is configured to:

[0361] parse a bitstream to determine the co-located reference image of the current block.

[0362] Optionally, the decoding unit 1501 is configured to:

[0363] In a case where there are multiple co-located reference images, determine at least one affine model of the current block, wherein different affine models are determined based on different co-located reference images.

[0364] Optionally, the decoding unit 1501 is configured to:

[0365] determine a fifth parameter, a sixth parameter, a seventh parameter and an eighth parameter based on motion vectors of at least two points in the co-located reference image.

[0366] scale the fifth parameter, the sixth parameter, the seventh parameter and the eighth parameter to obtain the first parameter, the second parameter, the third parameter and the fourth parameter.

[0367] Optionally, the decoding unit 1501 is configured to:

[0368] determine a first inter-image interval between a current image and a reference image of the current image.

[0369] determining a second picture interval between the collocated reference picture and a reference picture of the collocated reference picture;

[0370] scaling the fifth parameter, the sixth parameter, the seventh parameter and the eighth parameter based on a ratio of the first picture interval and the second picture interval, to obtain the first parameter, the second parameter, the third parameter and the fourth parameter.

[0371] Optionally, the decoding unit 1501 is configured to:

[0372] determining an affine relationship based on the first parameter, the second parameter, the third parameter, the fourth parameter and the reference point, the affine relationship being used to represent a corresponding relationship between a coordinate position and a motion vector at the coordinate position;

[0373] determining the control point motion vector of the at least two control points based on the affine relationship and control point coordinates of the at least two control points.

[0374] Optionally, the decoding unit 1501 is configured to:

[0375] determining an affine relationship based on the affine model of the current block, the affine relationship being used to represent a corresponding relationship between a coordinate position and a motion vector at the coordinate position;

[0376] determining a motion vector of a plurality of sub-blocks in the current block or a motion vector of a plurality of coordinate positions in the current block based on the affine relationship.

[0377] Optionally, the decoding unit 1501 is configured to:

[0378] determining a first parameter, a second parameter, a third parameter and a fourth parameter based on the affine model of the current block;

[0379] determining an affine relationship based on the first parameter, the second parameter, the third parameter and the fourth parameter, the affine relationship being used to represent a corresponding relationship between a coordinate position and a motion vector at the coordinate position;

[0380] determining a motion vector of a plurality of sub-blocks in the current block or a motion vector of a plurality of coordinate positions in the current block based on the affine relationship.

[0381] Optionally, the reference point is located within the current block.

[0382] or,

[0383] the reference point is located outside the current block.

[0384] Optionally, the reference point is a top-left corner vertex, a top-right corner or a bottom-left corner vertex of the current block.

[0385] Optionally, the decoding unit 1501 is configured to:

[0386] In a case where a neighboring block of the current block supports the affine mode, determine a reference point motion vector of the reference point based on an affine model of the neighboring block.

[0387] Optionally, the decoding unit 1501 is configured to:

[0388] determine a reference sub-block corresponding to the sub-block in the current block from the reference picture based on the motion vector of the sub-block, and determine the prediction value of the sub-block based on a reconstructed value of the reference sub-block;

[0389] or,

[0390] determine a reference coordinate position corresponding to the current coordinate position in the current block from the reference picture based on the motion vector of the current coordinate position, and determine the prediction value of the current coordinate position based on a reconstructed value of the reference coordinate position.

[0391] Optionally, the decoding unit 1501 is configured to:

[0392] add the affine model of the current block to a candidate list;

[0393] parse a bitstream to determine an affine model index;

[0394] obtain the plurality of motion vectors based on an affine model indicated by the affine model index in the candidate list.

[0395] Please refer to FIG. 16, which shows a structural block diagram of an image encoding apparatus provided by an example embodiment of the present application. The image encoding apparatus comprises:

[0396] an encoding unit 1601 configured to determine an affine model of a current block based on motion information of a reference picture of the current block and a reference point;

[0397] the encoding unit 1601 is configured to obtain a plurality of motion vectors based on the affine model of the current block;

[0398] the encoding unit 1601 is configured to predict the current block based on the plurality of motion vectors.

[0399] Optionally, the affine model of the current block comprises a reference point coordinate of the reference point, a reference point motion vector, a first parameter, a second parameter, a third parameter and a fourth parameter.

[0400] Optionally, the affine model of the current block comprises a reference point motion vector of the reference point, the first parameter, the second parameter, the third parameter and the fourth parameter.

[0401] Optionally, the affine model of the current block comprises a control point motion vector of at least two control points.

[0402] Optionally, the encoding unit 1601 is configured to determine the first parameter, the second parameter, the third parameter and the fourth parameter based on a motion vector of a reference image of the current block.

[0403] Optionally, the encoding unit 1601 is configured to determine the reference point coordinate and the reference point motion vector of the reference point.

[0404] Optionally, the encoding unit 1601 is configured to:

[0405] Optionally, the encoding unit 1601 is configured to determine the first parameter, the second parameter, the third parameter and the fourth parameter based on a motion vector of a reference image of the current block.

[0406] Optionally, the encoding unit 1601 is configured to determine the reference point motion vector of the reference point.

[0407] Optionally, the encoding unit 1601 is configured to:

[0408] Optionally, the encoding unit 1601 is configured to determine the first parameter, the second parameter, the third parameter and the fourth parameter based on a motion vector of a reference image of the current block.

[0409] Optionally, the encoding unit 1601 is configured to determine the control point motion vector of at least two control points based on the first parameter, the second parameter, the third parameter, the fourth parameter and the reference point.

[0410] Optionally, the encoding unit 1601 is configured to:

[0411] Optionally, the encoding unit 1601 is configured to determine at least two points in a co-located reference image of the current block.

[0412] Optionally, the encoding unit 1601 is configured to determine the first parameter, the second parameter, the third parameter and the fourth parameter based on motion vectors of the at least two points in the co-located reference image.

[0413] Optionally, the encoding unit 1601 is configured to:

[0414] Optionally, the encoding unit 1601 is configured to determine the at least two points in the co-located reference image based on a vertex coordinate of the current block in a current image.

[0415] Optionally, the encoding unit 1601 is configured to determine the at least two points in the co-located reference image based on a vertex coordinate of the current block in a current image and a first offset.

[0416] determine at least two points in the co-located reference picture based on the coordinates of the top vertex of the current block in the current picture and a second offset;

[0417] determine at least two points in the co-located reference picture based on the coordinates of the top vertex of the current block in the current picture, a first offset and a second offset;

[0418] wherein the first offset is used to represent a coordinate offset of the top vertex of the current block, and the second offset is determined based on a motion vector of a neighboring block of the current block.

[0419] Optionally, the encoding unit 1601 is configured to:

[0420] determine a motion vector of a neighboring block of the current block;

[0421] in a case that the motion vector of the neighboring block points to the co-located reference picture of the current block, determine the second offset based on the motion vector of the neighboring block.

[0422] Optionally, the at least two points in the co-located reference picture are located in at least two regions with a predetermined size.

[0423] Optionally, coordinate positions in a same region with a predetermined size have the same motion information.

[0424] Optionally, the co-located reference picture contains n point groups, and each point group contains 2 or 3 points, n being a positive integer.

[0425] Optionally, there is at least one point group in the n point groups that satisfies the following condition: the points in the point group are located in a lower right region of the current block.

[0426] Optionally, the encoding unit 1601 is configured to:

[0427] determine the co-located reference picture of the current block;

[0428] encode an image index of the co-located reference picture into a bitstream.

[0429] Optionally, the encoding unit 1601 is configured to:

[0430] in a case that there are multiple co-located reference pictures, determine at least one affine model of the current block, wherein different affine models are determined based on different co-located reference pictures.

[0431] Optionally, the encoding unit 1601 is configured to:

[0432] determine a fifth parameter, a sixth parameter, a seventh parameter and an eighth parameter based on motion vectors of the at least two points in the co-located reference picture.

[0433] scaling the fifth parameter, the sixth parameter, the seventh parameter and the eighth parameter to obtain the first parameter, the second parameter, the third parameter and the fourth parameter.

[0434] Optionally, the encoding unit 1601 is configured to:

[0435] determine a first picture interval between the current picture and a reference picture of the current picture;

[0436] determine a second picture interval between the collocated reference picture and a reference picture of the collocated reference picture;

[0437] scaling the fifth parameter, the sixth parameter, the seventh parameter and the eighth parameter based on a ratio of the first picture interval and the second picture interval to obtain the first parameter, the second parameter, the third parameter and the fourth parameter.

[0438] Optionally, the encoding unit 1601 is configured to:

[0439] determine an affine relationship based on the first parameter, the second parameter, the third parameter, the fourth parameter and the reference point, the affine relationship being used to represent a corresponding relationship between a coordinate position and a motion vector at the coordinate position;

[0440] determine the control point motion vector of the at least two control points based on the affine relationship and control point coordinates of the at least two control points.

[0441] Optionally, the encoding unit 1601 is configured to:

[0442] determine an affine relationship based on the affine model of the current block, the affine relationship being used to represent a corresponding relationship between a coordinate position and a motion vector at the coordinate position;

[0443] determine a motion vector of a plurality of sub-blocks in the current block or a motion vector of a plurality of coordinate positions in the current block based on the affine relationship.

[0444] Optionally, the encoding unit 1601 is configured to:

[0445] determine a first parameter, a second parameter, a third parameter and a fourth parameter based on the affine model of the current block;

[0446] determine an affine relationship based on the first parameter, the second parameter, the third parameter and the fourth parameter, the affine relationship being used to represent a corresponding relationship between a coordinate position and a motion vector at the coordinate position;

[0447] Determine motion vectors of sub-blocks in the current block based on the affine relationship, or determine motion vectors of coordinate positions in the current block.

[0448] Optionally, the reference point is located within the current block.

[0449] Alternatively,

[0450] The reference point is located outside the current block.

[0451] Optionally, the reference point is a top-left corner vertex, a top-right corner or a bottom-left corner of the current block.

[0452] Optionally, the encoding unit 1601 is configured to:

[0453] In a case where a neighboring block of the current block supports an affine mode, determine a reference point motion vector of the reference point based on an affine model of the neighboring block.

[0454] Optionally, the encoding unit 1601 is configured to:

[0455] Determine a reference sub-block corresponding to a sub-block in the current block from the reference image based on a motion vector of the sub-block, and determine a prediction value of the sub-block based on a reconstructed value of the reference sub-block.

[0456] Alternatively,

[0457] Determine a reference coordinate position corresponding to a current coordinate position in the current block from the reference image based on a motion vector of the current coordinate position, and determine a prediction value of the current coordinate position based on a reconstructed value of the reference coordinate position.

[0458] Optionally, the encoding unit 1601 is configured to:

[0459] Add the affine model of the current block to a candidate list.

[0460] Determine an encoding cost corresponding to each affine model in the candidate list based on a prediction result of the current block by each affine model.

[0461] Determine an affine model index based on the encoding cost corresponding to each affine model.

[0462] Encode the affine model index into a bitstream.

[0463] It should be noted that the decoding unit performs the image decoding process can refer to the above-mentioned image decoding method embodiments, and the encoding unit performs the image encoding process can refer to the above-mentioned image encoding method embodiments, which will not be repeated here.

[0464] Referring to FIG. 17, a structural block diagram of a decoder is shown according to an example embodiment of the present application. The decoder can include one or more of the following components: a processor 1701, a memory 1702. The components are coupled by a bus system. It is understood that the bus system is used for interconnecting these components and is used for communication between them. The bus system includes a data bus, a power bus, a control bus, and a state signal bus.

[0465] The memory 1702 is configured to store a computer program capable of running on the processor 1701; and the processor 1701 is configured to execute the following steps when running the computer program:

[0466] constructing an affine model of the current block based on motion information of a reference image of the current block and a reference point of the current block;

[0467] performing motion vector affine based on the affine model of the current block to obtain a plurality of motion vectors of the current block;

[0468] performing prediction on the current block based on the plurality of motion vectors of the current block.

[0469] It is to be appreciated that the memory 1702 in the embodiments of this application can be volatile, nonvolatile, or a combination of both. By way of example, the nonvolatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which acts as external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double-Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), SynchBurst DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The memory 1702 described herein are intended to include, without being limited to, these and any other suitable types of memory.

[0470] The processor 1701 can be an integrated circuit chip including a processing capability of signals. In the implementation process, each step of the image decoding method described above can be completed by integrated logic circuits of hardware in the processor 1701 or instructions in the form of software. The processor 1701 described above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory 1702, and the processor 1701 reads the information in the memory 1702 and combines the hardware to complete the steps of the method described above. It can be understood that the embodiments described in the present application can be realized by hardware, software, firmware, middleware, microcode or their combination. For hardware implementation, the processing unit can be realized in one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, general processors, controllers, microcontrollers, microprocessors, other electronic units for executing functions described in the present application or their combination. For software implementation, the technology described in the present application can be realized by modules (such as processes, functions, etc.) for executing functions described in the present application. The software code can be stored in the memory and executed by the processor. The memory can be realized in the processor or outside the processor. Alternatively, as another embodiment, the processor 1701 is also configured to execute the image decoding method described in any one of the preceding embodiments when running the computer program.

[0471] Please refer to FIG. 18, which shows a structural block diagram of an encoder provided by an example embodiment of the present application. The encoder can include one or more of the following components: a processor 1801, a memory 1802. The components are coupled together by a bus system. It can be understood that the bus system is used to realize the connection and communication between the components. In addition to the data bus, the bus system also includes a power bus, a control bus and a status signal bus.

[0472] a memory 1802, configured to store a computer program capable of running on the processor 1801; and the processor 1801, configured to execute the following steps when running the computer program:

[0473] constructing an affine model of the current block based on motion information of a reference image of the current block and a reference point of the current block;

[0474] performing motion vector affine based on the affine model of the current block to obtain a plurality of motion vectors of the current block;

[0475] predicting the current block based on the plurality of motion vectors of the current block.

[0476] It can be understood that the memory 1802 in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) or a flash memory. The volatile memory can be a random access memory (Random Access Memory, RAM) used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchlink DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM). The description of the memory 1802 herein is intended to include but not limited to these and any other suitable types of memory.

[0477] The processor 1801 can be an integrated circuit chip having a processing capability of signals. In implementation, each step of the image encoding method described above can be completed by integrated logic circuits of hardware in the processor 1801 or instructions in the form of software. The processor 1801 described above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory 1802, and the processor 1801 reads the information in the memory 1802 and combines the hardware to complete the steps of the method described above. It can be understood that the embodiments described in the present application can be realized by hardware, software, firmware, middleware, microcode or their combination. For hardware implementation, the processing unit can be realized in one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, general processors, controllers, microcontrollers, microprocessors, other electronic units for executing functions described in the present application or their combination. For software implementation, the technology described in the present application can be realized by modules (such as processes, functions, etc.) for executing functions described in the present application. The software code can be stored in the memory and executed by the processor. The memory can be realized in the processor or outside the processor. Alternatively, as another embodiment, the processor 1801 is also configured to execute the image encoding method described in any one of the preceding embodiments when running the computer program.

[0478] The embodiments of the present application also provide a non-volatile computer readable storage medium for storing a code stream, the code stream being generated by using an image encoding method of an encoder, or the code stream being decoded by using an image decoding method of a decoder, wherein the image encoding method comprises the image encoding method described in the above embodiments, and the image decoding method comprises the image decoding method described in the above embodiments.

[0479] The embodiment of the present application further provides a computer program product, which comprises computer instructions stored in a computer readable storage medium, and a processor acquires the computer instructions from the computer readable storage medium, and executes the computer instructions to implement the image decoding method or the image encoding method as described in the above embodiment.

[0480] Those skilled in the art can realize that, in one or more examples described above, the functions described in the embodiments of the present application can be implemented by hardware, software, firmware or any combination thereof. When implemented by software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or codes on a computer readable medium. The computer readable medium includes a computer storage medium and a communication medium, wherein the communication medium includes any medium that facilitates the transfer of computer programs from one place to another. The storage medium can be any available medium accessible by a general or special purpose computer.

[0481] The above description is only optional embodiments of the present application, and does not limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. An image decoding method, characterized in that, The method includes: Based on the motion information of the reference image of the current block and the reference point, the affine model of the current block is determined; Multiple motion vectors are obtained based on the affine model of the current block; The current block is predicted based on the multiple motion vectors.

2. The method according to claim 1, characterized in that, The affine model of the current block includes the reference point coordinates, the reference point motion vector, the first parameter, the second parameter, the third parameter, and the fourth parameter.

3. The method according to claim 1, characterized in that, The affine model of the current block includes the reference point motion vector, the first parameter, the second parameter, the third parameter, and the fourth parameter.

4. The method according to claim 1, characterized in that, The affine model of the current block includes control point motion vectors for at least two control points.

5. The method according to claim 2, characterized in that, The determination of the affine model of the current block based on the motion information of the reference image of the current block and the reference point includes: Based on the motion vector of the reference image of the current block, the first parameter, the second parameter, the third parameter, and the fourth parameter are determined; Determine the coordinates of the reference point and the motion vector of the reference point.

6. The method according to claim 3, characterized in that, The determination of the affine model of the current block based on the motion information of the reference image of the current block and the reference point includes: Based on the motion vector of the reference image of the current block, the first parameter, the second parameter, the third parameter, and the fourth parameter are determined; Determine the motion vector of the reference point.

7. The method according to claim 4, characterized in that, The construction of an affine model of the current block based on motion information from a reference image and reference points includes: Based on the motion vector of the reference image of the current block, the first parameter, the second parameter, the third parameter, and the fourth parameter are determined; Based on the first parameter, the second parameter, the third parameter, the fourth parameter, and the reference point, the control point motion vector of at least two control points is determined.

8. The method according to any one of claims 5 to 7, characterized in that, The determination of the first parameter, the second parameter, the third parameter, and the fourth parameter based on the motion vector of the reference image of the current block includes: Identify at least two points in the co-location reference image of the current block; The first parameter, the second parameter, the third parameter, and the fourth parameter are determined based on the motion vectors of at least two points in the co-located reference image.

9. The method according to claim 8, characterized in that, Determining at least two points in the co-location reference image of the current block includes at least one of the following methods: Based on the vertex coordinates of the current block in the current image, determine at least two points in the co-located reference image; Based on the vertex coordinates of the current block in the current image and the first offset, at least two points in the co-located reference image are determined; Based on the vertex coordinates of the current block in the current image and the second offset, at least two points in the co-located reference image are determined; Based on the vertex coordinates, first offset, and second offset of the current block in the current image, at least two points in the co-located reference image are determined; The first offset is used to characterize the coordinate offset from the vertex of the current block, and the second offset is determined based on the motion vector of the adjacent blocks of the current block.

10. The method according to claim 9, characterized in that, The method further includes: Determine the motion vectors of the adjacent blocks of the current block; When the motion vector of the adjacent block points to the co-position reference image of the current block, the second offset is determined based on the motion vector of the adjacent block.

11. The method according to claim 8, characterized in that, At least two points in the co-located reference image are located in at least two regions of predetermined size.

12. The method according to claim 11, characterized in that, The coordinate positions within the same area of ​​a predetermined size have the same motion information.

13. The method according to claim 8, characterized in that, The co-position reference image contains n point groups, and each point group contains 2 or 3 points, where n is a positive integer.

14. The method according to claim 13, characterized in that, Among the n point groups, at least one point group satisfies the following condition: the points in the point group are located in the lower right region of the current block.

15. The method according to claim 8, characterized in that, The method further includes: Parse the bitstream to determine the co-location reference image of the current block.

16. The method according to claim 15, characterized in that, Determining the affine model of the current block includes: In the presence of multiple co-located reference images, at least one affine model of the current block is determined, wherein different affine models are determined based on different co-located reference images.

17. The method according to claim 8, characterized in that, The determination of the first parameter, the second parameter, the third parameter, and the fourth parameter based on the motion vectors of at least two points in the co-located reference image includes: Based on the motion vectors of at least two points in the co-located reference image, the fifth, sixth, seventh, and eighth parameters are determined. The fifth parameter, the sixth parameter, the seventh parameter, and the eighth parameter are scaled to obtain the first parameter, the second parameter, the third parameter, and the fourth parameter.

18. The method according to claim 17, characterized in that, The scaling of the fifth, sixth, seventh, and eighth parameters to obtain the first, second, third, and fourth parameters includes: Determine a first image interval between the current image and a reference image of the current image; Determine a second image interval between the co-position reference image and the reference image of the co-position reference image; Based on the ratio of the first image interval to the second image interval, the fifth parameter, the sixth parameter, the seventh parameter, and the eighth parameter are scaled to obtain the first parameter, the second parameter, the third parameter, and the fourth parameter.

19. The method according to claim 7, characterized in that, The step of determining the control point motion vector based on the first parameter, the second parameter, the third parameter, the fourth parameter, and the reference point, including: Based on the first parameter, the second parameter, the third parameter, the fourth parameter, and the reference point, an affine relation is determined, which is used to characterize the correspondence between the coordinate position and the motion vector at the coordinate position. Based on the affine relation and the coordinates of the control points of at least two control points, determine the motion vectors of the control points of at least two control points.

20. The method according to claim 2 or 3, characterized in that, The affine model based on the current block yields multiple motion vectors, including: The affine relation is determined based on the affine model of the current block, and the affine relation is used to characterize the correspondence between the coordinate position and the motion vector at the coordinate position; Based on the affine relationship, determine the motion vectors of multiple sub-blocks in the current block, or determine the motion vectors of multiple coordinate positions in the current block.

21. The method according to claim 4, characterized in that, The affine model based on the current block yields multiple motion vectors, including: Based on the affine model of the current block, determine the first parameter, the second parameter, the third parameter, and the fourth parameter; Based on the first parameter, the second parameter, the third parameter, and the fourth parameter, an affine relation is determined, which is used to characterize the correspondence between the coordinate position and the motion vector at the coordinate position. Based on the affine relationship, determine the motion vectors of multiple sub-blocks in the current block, or determine the motion vectors of multiple coordinate positions in the current block.

22. The method according to any one of claims 1 to 21, characterized in that, The reference point is located within the current block; or, The reference point is located outside the current block.

23. The method according to claim 22, characterized in that, The reference point is the top left, top right, or bottom left corner of the current block.

24. The method according to claim 22, characterized in that, The method includes: If the neighboring blocks of the current block support affine mode, the reference point motion vector of the reference point is determined based on the affine model of the neighboring blocks.

25. The method according to any one of claims 1 to 24, characterized in that, The prediction of the current block based on the plurality of motion vectors includes: Based on the motion vector of the sub-block in the current block, a reference sub-block corresponding to the sub-block is determined from the reference image; based on the reconstructed value of the reference sub-block, the predicted value of the sub-block is determined; or, Based on the motion vector of the current coordinate position in the current block, the reference coordinate position corresponding to the current coordinate position is determined from the reference image; the predicted value of the current coordinate position is determined based on the reconstructed value of the reference coordinate position.

26. The method according to any one of claims 1 to 25, characterized in that, The affine model based on the current block yields multiple motion vectors, including: Add the affine model of the current block to the candidate list; Analyze the bitstream to determine the affine model index; The plurality of motion vectors are obtained based on the affine model indicated by the affine model index in the candidate list.

27. An image encoding method, characterized in that, The method includes: Based on the motion information of the reference image of the current block and the reference point, the affine model of the current block is determined; Multiple motion vectors are obtained based on the affine model of the current block; The current block is predicted based on the multiple motion vectors.

28. The method according to claim 27, characterized in that, The affine model of the current block includes the reference point coordinates, the reference point motion vector, the first parameter, the second parameter, the third parameter, and the fourth parameter.

29. The method according to claim 27, characterized in that, The affine model of the current block includes the reference point motion vector, the first parameter, the second parameter, the third parameter, and the fourth parameter.

30. The method according to claim 27, characterized in that, The affine model of the current block includes control point motion vectors for at least two control points.

31. The method according to claim 28, characterized in that, The determination of the affine model of the current block based on the motion information of the reference image of the current block and the reference point includes: Based on the motion vector of the reference image of the current block, the first parameter, the second parameter, the third parameter, and the fourth parameter are determined; Determine the coordinates of the reference point and the motion vector of the reference point.

32. The method according to claim 29, characterized in that, The determination of the affine model of the current block based on the motion information of the reference image of the current block and the reference point includes: Based on the motion vector of the reference image of the current block, the first parameter, the second parameter, the third parameter, and the fourth parameter are determined; Determine the motion vector of the reference point.

33. The method according to claim 30, characterized in that, The determination of the affine model of the current block based on the motion information of the reference image of the current block and the reference point includes: Based on the motion vector of the reference image of the current block, the first parameter, the second parameter, the third parameter, and the fourth parameter are determined; Based on the first parameter, the second parameter, the third parameter, the fourth parameter, and the reference point, the control point motion vector of at least two control points is determined.

34. The method according to any one of claims 31 to 33, characterized in that, The determination of the first parameter, the second parameter, the third parameter, and the fourth parameter based on the motion vector of the reference image of the current block includes: Identify at least two points in the co-location reference image of the current block; The first parameter, the second parameter, the third parameter, and the fourth parameter are determined based on the motion vectors of at least two points in the co-located reference image.

35. The method according to claim 34, characterized in that, Determining at least two points in the co-location reference image of the current block includes at least one of the following methods: Based on the vertex coordinates of the current block in the current image, determine at least two points in the co-located reference image; Based on the vertex coordinates of the current block in the current image and the first offset, at least two points in the co-located reference image are determined; Based on the vertex coordinates of the current block in the current image and the second offset, at least two points in the co-located reference image are determined; Based on the vertex coordinates, first offset, and second offset of the current block in the current image, at least two points in the co-located reference image are determined; The first offset is used to characterize the coordinate offset from the vertex of the current block, and the second offset is determined based on the motion vector of the adjacent blocks of the current block.

36. The method according to claim 35, characterized in that, The method further includes: Determine the motion vectors of the adjacent blocks of the current block; When the motion vector of the adjacent block points to the co-position reference image of the current block, the second offset is determined based on the motion vector of the adjacent block.

37. The method according to claim 34, characterized in that, At least two points in the co-located reference image are located in at least two regions of predetermined size.

38. The method according to claim 37, characterized in that, The coordinate positions within the same area of ​​a predetermined size have the same motion information.

39. The method according to claim 34, characterized in that, The co-position reference image contains n point groups, and each point group contains 2 or 3 points, where n is a positive integer.

40. The method according to claim 39, characterized in that, Among the n point groups, at least one point group satisfies the following condition: the points in the point group are located in the lower right region of the current block.

41. The method according to claim 34, characterized in that, The method further includes: Determine the co-position reference image of the current block; The image index of the corresponding reference image is encoded into the bitstream.

42. The method according to claim 41, characterized in that, Determining the affine model of the current block includes: In the presence of multiple co-located reference images, at least one affine model of the current block is determined, wherein different affine models are determined based on different co-located reference images.

43. The method according to claim 34, characterized in that, The determination of the first parameter, the second parameter, the third parameter, and the fourth parameter based on the motion vectors of at least two points in the co-located reference image includes: Based on the motion vectors of at least two points in the co-located reference image, the fifth, sixth, seventh, and eighth parameters are determined. The fifth parameter, the sixth parameter, the seventh parameter, and the eighth parameter are scaled to obtain the first parameter, the second parameter, the third parameter, and the fourth parameter.

44. The method according to claim 43, characterized in that, The scaling of the fifth, sixth, seventh, and eighth parameters to obtain the first, second, third, and fourth parameters includes: Determine a first image interval between the current image and a reference image of the current image; Determine a second image interval between the co-position reference image and the reference image of the co-position reference image; Based on the ratio of the first image interval to the second image interval, the fifth parameter, the sixth parameter, the seventh parameter, and the eighth parameter are scaled to obtain the first parameter, the second parameter, the third parameter, and the fourth parameter.

45. The method according to claim 33, characterized in that, The step of determining the control point motion vector based on the first parameter, the second parameter, the third parameter, the fourth parameter, and the reference point, including: Based on the first parameter, the second parameter, the third parameter, the fourth parameter, and the reference point, an affine relation is determined, which is used to characterize the correspondence between the coordinate position and the motion vector at the coordinate position. Based on the affine relation and the coordinates of the control points of at least two control points, determine the motion vectors of the control points of at least two control points.

46. ​​The method according to claim 28 or 29, characterized in that, The affine model based on the current block yields multiple motion vectors, including: The affine relation is determined based on the affine model of the current block, and the affine relation is used to characterize the correspondence between the coordinate position and the motion vector at the coordinate position; Based on the affine relationship, determine the motion vectors of multiple sub-blocks in the current block, or determine the motion vectors of multiple coordinate positions in the current block.

47. The method according to claim 30, characterized in that, The affine model based on the current block yields multiple motion vectors, including: Based on the affine model of the current block, determine the first parameter, the second parameter, the third parameter, and the fourth parameter; Based on the first parameter, the second parameter, the third parameter, and the fourth parameter, an affine relation is determined, which is used to characterize the correspondence between the coordinate position and the motion vector at the coordinate position. Based on the affine relationship, determine the motion vectors of multiple sub-blocks in the current block, or determine the motion vectors of multiple coordinate positions in the current block.

48. The method according to any one of claims 27 to 47, characterized in that, The reference point is located within the current block; or, The reference point is located outside the current block.

49. The method according to claim 48, characterized in that, The reference point is the top left, top right, or bottom left corner of the current block.

50. The method according to claim 48, characterized in that, The method includes: If the neighboring blocks of the current block support affine mode, the reference point motion vector of the reference point is determined based on the affine model of the neighboring blocks.

51. The method according to any one of claims 27 to 50, characterized in that, The prediction of the current block based on the plurality of motion vectors includes: Based on the motion vector of the sub-block in the current block, a reference sub-block corresponding to the sub-block is determined from the reference image; based on the reconstructed value of the reference sub-block, the predicted value of the sub-block is determined; or, Based on the motion vector of the current coordinate position in the current block, the reference coordinate position corresponding to the current coordinate position is determined from the reference image; the predicted value of the current coordinate position is determined based on the reconstructed value of the reference coordinate position.

52. The method according to any one of claims 27 to 51, characterized in that, The method further includes: Add the affine model of the current block to the candidate list; Based on the prediction results of each affine model in the candidate list for the current block, the encoding cost corresponding to each affine model is determined. Determine the affine model index based on the encoding cost corresponding to each affine model; The affine model index is encoded into the bitstream.

53. A decoding device, characterized in that, The device includes: The decoding unit is used to determine the affine model of the current block based on the motion information of the reference image of the current block and the reference point; The decoding unit is used to obtain multiple motion vectors based on the affine model of the current block; The decoding unit is used to predict the current block based on the plurality of motion vectors.

54. An encoding device, characterized in that, The device includes: An encoding unit is used to determine the affine model of the current block based on motion information of a reference image of the current block and a reference point; The encoding unit is used to obtain multiple motion vectors based on the affine model of the current block; The encoding unit is used to predict the current block based on the plurality of motion vectors.

55. A decoder, characterized in that, The decoder includes a memory and a processor, the memory being used to store a computer program running on the processor; the processor being used to execute the image decoding method as described in any one of claims 1 to 26 when running the computer program.

56. An encoder, characterized in that, The encoder includes a memory and a processor, the memory being used to store a computer program running on the processor; the processor being used to execute the image encoding method as described in any one of claims 27 to 52 when running the computer program.

57. A non-volatile computer-readable storage medium for storing a bitstream, characterized in that, The bitstream is generated by using an image encoding method of an encoder, or the bitstream is decoded by using an image decoding method of a decoder, wherein the image encoding method includes the image encoding method as described in any one of claims 27 to 52, and the image decoding method includes the image decoding method as described in any one of claims 1 to 26.

58. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, a processor retrieving the computer instructions from the computer-readable storage medium, and the processor executing the computer instructions to implement the image decoding method as claimed in any one of claims 1 to 26, or the image encoding method as claimed in any one of claims 27 to 52.

Citation Information

Patent Citations

  • Motion vector prediction method and device based on affine motion model

    CN110891176A

  • Folding fan fan drone

    KR1020250178785A

  • Video encoder, video decoder and corresponding method

    WO2020042604A1

  • Inter-frame prediction method, encoder, decoder, and computer storage medium

    WO2022022278A1

  • Method and device for video coding adaptively using motion compensation filter in affine model-based prediction

    WO2024117693A1