[go: up one dir, main page]

WO2026000381A1 - Image decoding method, image encoding method, encoder, decoder, and medium - Google Patents

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

Info

Publication number
WO2026000381A1
WO2026000381A1 PCT/CN2024/102620 CN2024102620W WO2026000381A1 WO 2026000381 A1 WO2026000381 A1 WO 2026000381A1 CN 2024102620 W CN2024102620 W CN 2024102620W WO 2026000381 A1 WO2026000381 A1 WO 2026000381A1
Authority
WO
WIPO (PCT)
Prior art keywords
parameter
current block
image
reference image
affine model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/CN2024/102620
Other languages
French (fr)
Chinese (zh)
Inventor
王凡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to PCT/CN2024/102620 priority Critical patent/WO2026000381A1/en
Publication of WO2026000381A1 publication Critical patent/WO2026000381A1/en
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

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.

Description

图像解码、编码方法、编解码器及介质Image decoding, encoding methods, codecs and media 技术领域Technical Field

本申请实施例涉及图像编解码技术领域,特别涉及一种图像解码、编码方法、编解码器及介质。This application relates to the field of image encoding and decoding technology, and in particular to an image decoding and encoding method, an encoder/decoder, and a medium.

背景技术Background Technology

帧间预测过程中,解码器可以基于当前块的仿射(Affine)模型,确定当前块中子块的运动信息,从而基于该运动信息对当前块进行预测。During inter-frame prediction, the decoder can determine the motion information of sub-blocks in the current block based on the affine model of the current block, and then make predictions about the current block based on this motion information.

相关技术中,仿射模型基于当前图像中与当前块相邻的重建块的运动信息构建得到。In related technologies, affine models are constructed based on the motion information of reconstructed blocks adjacent to the current block in the current image.

发明内容Summary of the Invention

本申请实施例提供了一种图像解码、编码方法、编解码器及介质。所述技术方案如下:This application provides an image decoding and encoding method, a codec, and a medium. The technical solution is as follows:

一方面,本申请实施例提供了一种图像解码方法,所述方法包括:On one hand, embodiments of this application provide an image decoding method, the method comprising:

基于当前块的参考图像的运动信息,以及基准点,确定所述当前块的仿射模型;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.

另一方面,本申请实施例提供了一种图像编码方法,所述方法包括:On the other hand, embodiments of this application provide an image encoding method, the method comprising:

基于当前块的参考图像的运动信息,以及基准点,确定所述当前块的仿射模型;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.

另一方面,本申请实施例提供了一种解码装置,所述装置包括:On the other hand, embodiments of this application provide a decoding device, the device comprising:

解码单元,用于基于当前块的参考图像的运动信息,以及基准点,确定所述当前块的仿射模型;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.

另一方面,本申请实施例提供了一种编码装置,所述装置包括:On the other hand, embodiments of this application provide an encoding device, the device comprising:

编码单元,用于基于当前块的参考图像的运动信息,以及基准点,确定所述当前块的仿射模型;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.

另一方面,本申请实施例提供了一种解码器,所述解码器包括存储器和处理器,所述存储器,用于存储在所述处理器上运行的计算机程序;所述处理器,用于在运行所述计算机程序时,执行如上述方面所述的图像解码方法。On the other hand, embodiments of this application provide a decoder, the decoder including 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 above when running the computer program.

另一方面,本申请实施例提供了一种编码器,所述编码器包括存储器和处理器,所述存储器,用于存储在所述处理器上运行的计算机程序;所述处理器,用于在运行所述计算机程序时,执行如上述方面所述的图像编码方法。On the other hand, embodiments of this application provide an encoder, the encoder including a memory and a processor, the memory for storing a computer program running on the processor; the processor for executing the image encoding method as described above when running the computer program.

另一方面,本申请实施例提供了一种存储码流的非易失性计算机可读存储介质,所述码流通过利用编码器的图像编码方法而生成,或者,所述码流通过利用解码器的图像解码方法而解码,其中,所述图像编码方法包括如上述方面所述的图像编码方法,所述图像解码方法包括如上述方面所述的图像解码方法。On the other hand, embodiments of this application provide a non-volatile computer-readable storage medium for storing a bitstream, the bitstream being generated by an image encoding method using an encoder, or the bitstream being decoded by an image decoding method using a decoder, wherein the image encoding method includes the image encoding method described above, and the image decoding method includes the image decoding method described above.

另一方面,本申请实施例提供了一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中,处理器从所述计算机可读存储介质中获取所述计算机指令,所述处理器执行所述计算机指令以实现如上述方面所述的图像解码方法,或,上述方面所述的图像编码方法。On the other hand, embodiments of this application provide a computer program product, the computer program product including computer instructions, the computer instructions being stored in a computer-readable storage medium, a processor obtaining the computer instructions from the computer-readable storage medium, and the processor executing the computer instructions to implement the image decoding method as described above, or the image encoding method as described above.

本申请实施例中,由于当前图像的参考图像中可能存在与当前块具有相同或相近的运动信息,因此基于参考图像的运动信息以及基准点确定当前块的仿射模型,能够为编解码器提供更多可用的仿射模型,进而使编码器能够确定出更加适用于当前块的仿射模型并利用该仿射模型对当前块进行预测,有助于提高图像编解码的质量以及效率。In this embodiment, since the reference image of the current image may contain 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 image and the reference point. This can provide the codec with more usable affine models, thereby enabling the encoder to 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 encoding and decoding.

附图说明Attached Figure Description

图1是本申请一个示例性实施例示出的编码端编码过程的示意图;Figure 1 is a schematic diagram illustrating the encoding process at the encoding end in an exemplary embodiment of this application;

图2是本申请一个示例性实施例示出的解码端解码过程的示意图;Figure 2 is a schematic diagram illustrating the decoding process at the decoding end in an exemplary embodiment of this application;

图3是本申请一个示例性实施例示出的图像解码方法的流程图;Figure 3 is a flowchart illustrating an exemplary embodiment of the image decoding method of this application;

图4是本申请一个示例性实施例示出的控制点的示意图;Figure 4 is a schematic diagram of control points illustrating an exemplary embodiment of this application;

图5是本申请一个示例性实施例示出的仿射模型确定过程的流程图;Figure 5 is a flowchart illustrating the affine model determination process in an exemplary embodiment of this application;

图6是本申请一个示例性实施例示出的虚拟控制点的示意图;Figure 6 is a schematic diagram of a virtual control point shown in an exemplary embodiment of this application;

图7是本申请一个示例性实施例示出的基准点运动矢量确定过程的示意图; Figure 7 is a schematic diagram illustrating the process of determining the motion vector of a reference point in an exemplary embodiment of this application;

图8是本申请另一个示例性实施例示出的基准点运动矢量确定过程的示意图;Figure 8 is a schematic diagram illustrating the process of determining the motion vector of a reference point in another exemplary embodiment of this application;

图9是本申请一个示例性实施例示出的基于第二偏移量进行偏移处理的示意图;Figure 9 is a schematic diagram illustrating offset processing based on a second offset in an exemplary embodiment of this application;

图10是本申请一个示例性实施例示出的缩放过程的实施示意图;Figure 10 is a schematic diagram illustrating an implementation of the scaling process in an exemplary embodiment of this application;

图11是本申请另一个示例性实施例示出的仿射模型确定过程的流程图;Figure 11 is a flowchart illustrating the affine model determination process in another exemplary embodiment of this application;

图12是本申请一个示例性实施例示出的图像编码方法的流程图;Figure 12 is a flowchart illustrating an exemplary embodiment of the image encoding method of this application;

图13是本申请一个示例性实施例示出的仿射模型索引编码过程的流程图;Figure 13 is a flowchart illustrating the affine model index encoding process in an exemplary embodiment of this application;

图14是本申请另一个示例性实施例示出的仿射模型确定过程的流程图;Figure 14 is a flowchart illustrating the affine model determination process in another exemplary embodiment of this application;

图15示出了本申请一个示例性实施例提供的图像解码装置的结构方框图;Figure 15 shows a structural block diagram of an image decoding apparatus provided in an exemplary embodiment of this application;

图16示出了本申请一个示例性实施例提供的图像编码装置的结构方框图;Figure 16 shows a structural block diagram of an image encoding apparatus provided in an exemplary embodiment of this application;

图17示出了本申请一个示例性实施例提供的解码器的结构方框图;Figure 17 shows a structural block diagram of a decoder provided in an exemplary embodiment of this application;

图18示出了本申请一个示例性实施例提供的编码器的结构方框图。Figure 18 shows a structural block diagram of an encoder provided in an exemplary embodiment of this application.

具体实施方式Detailed Implementation

为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。In this article, "multiple" refers to two or more. "And/or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and/or B can represent: A alone, A and B simultaneously, or B alone. The character "/" generally indicates that the preceding and following related objects have an "or" relationship.

目前通用的视频编解码标准都采用基于块的混合编码框架。视频中的一帧(frame)图像被分割成相同大小(如256×256,128×128,64×64等)的正方形的最大编码单元(Largest Coding Unit,LCU)或编码树单元(Coding Tree Unit,CTU)。最大编码单元或编码树单元可根据规则划分成矩形的编码单元(Coding Unit,CU)。编码单元可能还会划分预测单元(Prediction Unit,PU),变换单元(Transform Unit,TU)等。Currently, most common video codec standards employ a block-based hybrid coding framework. A single frame in a video is divided into squares of equal size (e.g., 256×256, 128×128, 64×64) called Largest Coding Units (LCUs) or Coding Tree Units (CTUs). These LCUs or CTUs can be further subdivided into rectangular Coding Units (CUs) according to rules. Coding units may also be further divided into Prediction Units (PUs), Transform Units (TUs), etc.

混合编码框架包括预测(prediction)、变换(transform)、量化(quantization)、熵编码(entropy coding)、环路滤波(in loop filter)等模块。预测模块包括帧内预测(intra prediction)和帧间预测(inter prediction)。帧间预测包括运动估计(motion estimation)和运动补偿(motion compensation)。由于同一帧图像中相邻像素之间存在很强的相关性,因此可以在视频编解码技术中使用帧内预测的方法消除相邻像素之间的空间冗余。由于视频中的相邻帧图像之间存在较强相似性,因此可以在视频编解码技术中使用帧间预测方法消除相邻帧图像之间的时间冗余,从而提高编码效率。The hybrid coding framework includes modules such as prediction, transform, quantization, entropy coding, and in-loop filtering. The prediction module includes intra-prediction and inter-prediction. Inter-prediction includes motion estimation and motion compensation. Because there is a strong correlation between adjacent pixels in the same frame, intra-prediction can be used in video coding and decoding techniques to eliminate spatial redundancy between adjacent pixels. Because there is a strong similarity between adjacent frames in a video, inter-prediction can be used in video coding and decoding techniques to eliminate temporal redundancy between adjacent frames, thereby improving coding efficiency.

在编码端,如图1所示,编码器首先将图像被划分为多个编码块,然后对当前块使用帧内或帧间预测(包括运动估计和运动补偿)算法产生当前块的预测块,并使用当前块的原始块减去预测块得到残差块,从而对残差块进行变换、量化得到量化系数,最终通过熵编码将量化系数编码至码流中。此外,编码器基于反量化/反变换结果以及预测块进行重建,得到重建块,并对重建块进行环路滤波,以此弥补失真信息,为后续编码提供更好的参考。At the encoding end, as shown in Figure 1, the encoder first divides the image into multiple coding blocks. Then, it uses intra-frame or inter-frame prediction (including motion estimation and motion compensation) algorithms to generate a prediction block for the current block. The encoder then subtracts the prediction block from the original block to obtain a residual block. This residual block is then transformed and quantized to obtain quantization coefficients. Finally, entropy coding is used to encode these quantization coefficients into the bitstream. Furthermore, the encoder reconstructs the image based on the inverse quantization/inverse transform results and the prediction block to obtain a reconstructed block. Loop filtering is then applied to the reconstructed block to compensate for distortion information and provide a better reference for subsequent encoding.

在解码端,如图2所示,解码器一方面使用帧内或帧间预测算法预测得到当前块的预测块,另一方面对码流进行熵解码得到量化系数,并对量化系数进行反量化、反变换得到残差块,从而将预测块和残差块相加得到重建块。对于重建块,解码器进一步对重建块进行环路滤波,最终根据环路滤波后的重建块生成解码图像。At the decoding end, as shown in Figure 2, the decoder uses intra-frame or inter-frame prediction algorithms to predict the prediction block of the current block. Simultaneously, it performs entropy decoding on the bitstream to obtain quantization coefficients, and then performs inverse quantization and inverse transform on these coefficients to obtain residual blocks. The prediction block and residual blocks are then added together to obtain the reconstructed block. For the reconstructed block, the decoder further performs loop filtering, and finally generates the decoded image based on the loop-filtered reconstructed block.

在帧间预测中,使用运动信息(motion information)来表示“运动”。基本的运动信息包括参考图像(reference picture)的信息和运动矢量(MV,Motion Vector)的信息。基于运动信息,编解码端可以对当前块进行单向帧间预测或者双向帧间预测。In inter-frame prediction, motion information is used to represent "motion." Basic motion information includes information about the reference picture and information about the motion vector (MV). Based on this motion information, the encoder and decoder can perform unidirectional or bidirectional inter-frame prediction for the current block.

由于现实世界中的运动除了平移外,还包括缩小、放大、旋转等其他运动形式,因此为了能够实现更加精细的预测,提出了采用仿射进行运动补偿的方案。Since motion in the real world includes not only translation but also other forms such as shrinking, enlarging, and rotation, a motion compensation scheme using affines is proposed in order to achieve more precise predictions.

相较于对当前块进行统一的运动补偿,仿射只需要借助少量控制点,即能够推导出当前块中各个子块(甚至像素)各自的运动矢量,从而基于各个子块(甚至像素)各自的运动矢量进行运动补偿。Compared to uniform motion compensation for the current block, affine motion compensation only requires a small number of control points to derive the motion vectors of each sub-block (or even pixel) in the current block, thereby enabling motion compensation based on the motion vectors of each sub-block (or even pixel).

编码端可以构建多个候选仿射模型,然后从中选择预测质量最优的仿射模型,并将选中的仿射模型的模型索引写入码流中。解码端同样构建多个候选仿射模型,并通过解析码流确定编码端所选取的仿射模式的模型索引,进而采用与编码端一致的仿射模型进行运动补偿。相关技术中,编解码端基于当前图像中与当前块相邻的重建块的运动信息构建仿射模型。The encoder can construct multiple candidate affine models, select the affine model with the best prediction quality, and write the model index of the selected affine model into the bitstream. The decoder also constructs multiple candidate affine models and determines the model index of the affine model selected by the encoder by parsing the bitstream, then uses the same affine model as the encoder for motion compensation. In related technologies, the encoder and decoder construct affine models based on the motion information of the reconstructed blocks adjacent to the current block in the current image.

然而,与当前块与相邻的重建块的运动信息可能存在较大差异,因此仅基于相邻的重建块的运动信息构建仿射模型,可能导致预测效果不佳,进而影响编解码质量。However, the motion information of the current block and its neighboring reconstructed blocks may differ significantly. Therefore, building an affine model based solely on the motion information of neighboring reconstructed blocks may result in poor prediction performance, which in turn affects the encoding and decoding quality.

考虑到当前图像的参考图像中可能存在与当前块具有相同或相近的运动信息,因此本申请实施例中,基于参考图像的运动信息以及当前块的基准点确定当前块的仿射模型,能够为编解码器提供更多可用的仿射模型,进而使编码器能够确定出更加适用于当前块的仿射模型,有助于提高图像编解码的质量以及效率。 Considering that the reference image of the current image may contain motion information that is the same or similar to that of the current block, in this embodiment of the 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. This can provide the codec with more available affine models, thereby enabling the encoder to determine an affine model that is more suitable for the current block, which helps to improve the quality and efficiency of image encoding and decoding.

请参考图3,其示出了本申请一个示例性实施例提供的图像解码方法的流程图。该方法应用于解码器,该方法可以包括如下步骤:Please refer to Figure 3, which illustrates a flowchart of an image decoding method provided in an exemplary embodiment of this application. The method is applied to a decoder and may include the following steps:

步骤301,基于当前块的参考图像的运动信息,以及基准点,确定当前块的仿射模型。Step 301: 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.

在一些实施例中,解码器通过解析码流,确定当前图像中当前块的参考图像。其中,码流可以包含当前块的参考图像的参考图像索引,解码器可以基于该参考图像索引,从参考图像列表(Reference Picture List)中该参考图像索引所指示的参考图像。In some embodiments, the decoder determines the reference image of the current block in the current image by parsing the bitstream. The bitstream may contain a reference image index of the reference image of the current block, and the decoder may retrieve the reference image indicated by that reference image index from a reference image list.

可选的,该参考图像可以是从前向预测参考图像列表中确定得到的前向参考图像,或者,是从双向预测参考图像列表中确定得到的前向参考图像和后向参考图像。Optionally, the reference image may be a forward reference image determined from a list of forward-predicted reference images, or a forward reference image and a backward reference image determined from a list of bidirectional-predicted reference images.

本申请实施例中,当前块的参考图像保存有自身进行预测时的运动信息,该运动信息为该参考图像上的某个块进行预测时所参考到的参考图像的运动信息。其中,该运动信息可以包括运动矢量。In this embodiment, the reference image of the current block stores its own motion information during prediction. This motion information is the motion information of the reference image referenced when a certain block on the reference image is predicted. This motion information may include motion vectors.

在一些实施例中,解码器从当前图像中确定基准点,并获取基准点的基准点坐标以及基准点运动矢量,用于与参考图像的运动信息共同确定当前块的仿射模型。In some embodiments, the decoder determines a reference point from the current image and obtains the reference point coordinates and the reference point motion vector, which are used together with the motion information of the reference image to determine the affine model of the current block.

关于仿射模型的表现形式,在一种可能的设计中,仿射模型可以采用至少两个控制点表示,比如仿射模型可以采用6参数模型(CPMV0,CPMV1,CPMV2)来表示,或采用4参数模型(CPMV0,CPMV1)来表示。其中,CPMVn表示第n个控制点的运动矢量,即可以采用3个或2个控制点的运动矢量表示仿射模型。Regarding the representation of the affine model, in one possible design, the affine model can be represented using at least two control points. For example, the affine model can be represented using 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; that is, the affine model can be represented using the motion vectors of 3 or 2 control points.

在另一种可能的设计中,仿射模型可以采用{基准点信息+a,b,c,d}的表示形式,其中,基准点信息包括基准点的基准点坐标和基准点运动矢量,abcd为基于参考图像的运动信息确定得到的运动矢量随坐标变化的变化率。In another possible design, the affine model can be represented as {reference point information + a, b, c, d}, where the reference point information includes the reference point coordinates and the reference point motion vector, and abcd is the rate of change of the motion vector as a function of the coordinates, which is determined based on the motion information of the reference image.

在其他可能的设计中,仿射模型可以采用上述两种表现形式的混合形式。In other possible designs, the affine model can take the form of a combination of the two representations mentioned above.

步骤302,基于当前块的仿射模型得到多个运动矢量。Step 302: Obtain multiple motion vectors based on the affine model of the current block.

在一种可能的实施方式中,解码器从多个候选仿射模型(包括基于参考图像构建的仿射模型,以及基于当前图像构建的仿射模型)中,确定当前块实际采用的仿射模型(与编码端采用的仿射模型一致),从而利用该仿射模型得到多个运动矢量。In one possible implementation, the decoder determines the affine model actually used by the current block (consistent with the affine model used at the encoder) from multiple candidate affine models (including affine models built based on a reference image and affine models built based on the current image), thereby using the affine model to obtain multiple motion vectors.

可选的,多个运动矢量可以是当前块中不同子块的运动矢量,或者,是当前块中多个坐标位置的运动矢量。Optionally, multiple motion vectors can be motion vectors of different sub-blocks in the current block, or motion vectors of multiple coordinate positions in the current block.

比如,当当前块被划分为4×4的子块时,解码器可以利用仿射模型确定16个子块各自的运动矢量。或者,解码器可以利用仿射模型确定出当前块中每一个坐标位置处样本的运动矢量。For example, when the current block is divided into 4×4 sub-blocks, the decoder can use an affine model to determine the motion vectors of each of the 16 sub-blocks. Alternatively, the decoder can use an affine model to determine the motion vector of the sample at each coordinate position in the current block.

步骤303,基于多个运动矢量对当前块进行预测。Step 303: Predict the current block based on multiple motion vectors.

在一种可能的实施方式中,解码器基于当前块中子块的运动矢量,从参考图像中确定子块对应的参考子块,从而基于参考子块的重建值确定子块的预测值。In one possible implementation, the decoder determines a reference sub-block from a reference image based on the motion vector of the sub-block in the current block, and then determines the predicted value of the sub-block based on the reconstructed value of the reference sub-block.

在另一种可能的实施方式中,解码器基于当前块中当前坐标位置的运动矢量,从参考图像中确定当前坐标位置对应的参考坐标位置,从而基于参考坐标位置的重建值确定当前坐标位置的预测值。In another possible implementation, the decoder determines the reference coordinate position corresponding to the current coordinate position from the reference image based on the motion vector of the current coordinate position in the current block, and then determines the predicted value of the current coordinate position based on the reconstructed value of the reference coordinate position.

可选的,解码器基于当前子块的位置(或当前坐标位置)以及运动矢量,从参考图像中确定当前子块(会当前坐标位置)对应的参考子块(参考坐标位置),并将参考子块的重建子块(或参考坐标位置的重建值)确定为当前子块(或参考坐标位置)的预测子块(或样本预测值)。Optionally, the decoder determines the reference sub-block (reference coordinate position) corresponding to the current sub-block (current coordinate position) from the reference image based on the current sub-block's position (or current coordinate position) and motion vector, and determines the reconstructed sub-block (or reconstructed value of the reference coordinate position) of the reference sub-block as the predicted sub-block (or sample predicted value) of the current sub-block (or reference coordinate position).

进一步的,基于各个预测子块(或样本预测值)以及从码流中解析得到的差值,解码器确定各个子块(或坐标位置)的重建子块(或样本重建值),进而基于各个重建子块(或样本重建值)生成当前块的重建块,完成对当前块的解码。Furthermore, based on each predicted sub-block (or sample predicted value) and the difference obtained from parsing the bitstream, the decoder determines the reconstructed sub-block (or sample reconstructed value) of each sub-block (or coordinate position), and then generates the reconstructed block of the current block based on each reconstructed sub-block (or sample reconstructed value), thus completing the decoding of the current block.

综上所述,本申请实施例中,由于当前图像的参考图像中可能存在与当前块具有相同或相近的运动信息,因此基于参考图像的运动信息以及基准点确定当前块的仿射模型,能够为编解码器提供更多可用的仿射模型,进而使编码器能够确定出更加适用于当前块的仿射模型并利用该仿射模型对当前块进行预测,有助于提高图像编解码的质量以及效率。In summary, in the embodiments of this application, since the reference image of the current image may contain 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 image and the reference point. This can provide the codec with more usable affine models, thereby enabling the encoder to 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 encoding and decoding.

在一种可能的实施方式中,仿射模式下,编解码端均会构建包含多个候选仿射模型的候选列表,并从中确定出用于对当前块进行仿射处理的仿射模型。上述步骤302中,基于仿射模型确定运动矢量的过程可以包括如下子步骤:In one possible implementation, in affine mode, both the encoder and decoder construct a candidate list containing multiple candidate affine models and determine the affine model used for affine processing of the current block. Step 302 above, the process of determining the motion vector based on the affine model, may include the following sub-steps:

子步骤1、将当前块的仿射模型添加至候选列表。Sub-step 1: Add the affine model of the current block to the candidate list.

在一些实施例中,该候选列表为子块合并候选列表(subblock merge candidate list),其中包含多个候选仿射模型。本实施例中,该候选列表中包括基于当前图像中当前块的相邻块的运动矢量构建的仿射模型,以及基于参考图像的运动信息以及基准点构建的仿射模型。In some embodiments, the candidate list is a subblock merge candidate list, which contains multiple candidate affine models. In this embodiment, the candidate list includes affine models constructed based on the motion vectors of neighboring blocks of the current block in the current image, and affine models constructed based on motion information and reference points of a reference image.

需要说明的是,编解码端使用相同的方法构建候选列表,以保证编解码端最终采用的仿射模型的一致性。 It should be noted that the encoding and decoding ends use the same method to construct the candidate list to ensure the consistency of the affine model ultimately adopted by the encoding and decoding ends.

子步骤2、解析码流,确定仿射模型索引。Sub-step 2: Parse the bitstream and determine the affine model index.

编码端在编码过程中,将候选列表中,当前块所采用的仿射模型的仿射模型索引编码至码流中。相应的,解码器解析码流,得到当前块对应的仿射模型索引。During the encoding process, the encoder encodes the affine model index of the affine model used by the current block from the candidate list into the bitstream. Correspondingly, the decoder parses the bitstream to obtain the affine model index corresponding to the current block.

子步骤3、基于候选列表中仿射模型索引所指示的仿射模型,得到多个运动矢量。Sub-step 3: Based on the affine model indicated by the affine model index in the candidate list, obtain multiple motion vectors.

候选列表中各个候选仿射模型具有各自的仿射模型索引,解码器基于解析得到的仿射模型索引,从候选列表中确定该索引所指示的仿射模型,并利用该仿射模型得到多个运动矢量。Each candidate affine model in the candidate list has its own affine model index. The decoder determines the affine model indicated by the index from the candidate list based on the parsed affine model index, and uses the affine model to obtain multiple motion vectors.

在一些实施例中,解码器基于仿射模型索引所指示的仿射模型,确定表征坐标位置与坐标位置处运动矢量间对应关系的仿射关系,从而基于该仿射关系,确定出多个运动矢量。In some embodiments, the decoder determines an affine relation that characterizes the correspondence between coordinate positions and motion vectors at coordinate positions based on the affine model indicated by the affine model index, thereby determining multiple motion vectors based on the affine relation.

其中,多个运动矢量可以是当前块中多个子块对应的运动矢量,或者,当前块中多个坐标位置对应的运动矢量。Among them, multiple motion vectors can be motion vectors corresponding to multiple sub-blocks in the current block, or motion vectors corresponding to multiple coordinate positions in the current block.

仿射模型的表现形式:The representation of an affine model:

表现形式1:当前块的仿射模型包括基准点的基准点坐标、基准点运动矢量、第一参数、第二参数、第三参数以及第四参数。Representation 1: 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.

在一些实施例中,对于4参数模型,当前块中(x,y)的运动矢量可以采用如下公式确定得到:
In some embodiments, for a 4-parameter model, the motion vector (x, y) in the current block can be determined using the following formula:

对于6参数模型,当前块中(x,y)的运动矢量可以采用如下公式确定得到:
For the 6-parameter model, the motion vector (x, y) in the current block can be determined using the following formula:

其中,为当前块的左上角的控制点的运动矢量,为当前块的右上角的控制点的运动矢量,为当前块的左下角的控制点的运动矢量,上标h和v表示mv的水平分量和竖直分量。W为当前块的宽度,H为当前块的高度。in, This is the motion vector of the control point at the top left corner of the current block. This is the motion vector of the control point at the top right corner of the current block. This is the motion vector of the control point at the bottom left corner of the current block. The superscripts h and v represent the horizontal and vertical components of mv. W is the width of the current block, and H is the height of the current block.

对上述公式进行改写,可以得到:
Rewriting the above formula, we get:

即确定a、b、c、d的值,以及当前块的左上角的控制点的运动矢量,即可确定出当前块中每一个子块或者每个坐标位置的运动矢量。By determining the values of a, b, c, and d, as well as the motion vector of the control point at the top left corner of the current block, the motion vector of each sub-block or each coordinate position in the current block can be determined.

其中,对于4参数模型,对于6参数模型,
For the 4-parameter model, For the 6-parameter model

将左上角的控制点扩展到任意点,上述公式可以进一步改写为:
Extending the control point from the top left corner to any point, the above formula can be further rewritten as:

其中,(xbase,ybase)为基准点的坐标,分别为基准点的运动矢量的水平分量和竖直分量。Where (x base , y base ) are the coordinates of the reference point. and These are the horizontal and vertical components of the motion vector of the reference point, respectively.

由上述公式可知,确定a、b、c、d的值,以及一个基准点的基准点坐标和基准点运动矢量后,即可确定当前块中每一个子块或者每个坐标位置的运动矢量。As can be seen from the above formula, after determining the values of a, b, c, and d, as well as the reference point coordinates and reference point motion vector of a reference point, the motion vector of each sub-block or each coordinate position in the current block can be determined.

因此当前块的仿射模型可以采用基准点的基准点坐标、基准点运动矢量、第一参数、第二参数、第三参数以及第四参数表示。其中,第一参数、第二参数、第三参数以及第四参数分别对应上述公式中的a、b、c、d。Therefore, the affine model of the current block can be represented by the reference point coordinates, the reference point motion vector, the first parameter, the second parameter, the third parameter, and the fourth parameter. The first, second, third, and fourth parameters correspond to a, b, c, and d in the above formula, respectively.

在一些实施例中,第一参数用于表示运动矢量的水平分量随x轴坐标变化的变化率,第二参数用于表示运动矢量的水平分量随y轴坐标变化的变化率,第三参数用于表示运动矢量的竖直分量随x轴坐标变化的变化率,第四参数用于表示运动矢量的竖直分量随y轴坐标变化的变化率。In some embodiments, the first parameter represents the rate of change of the horizontal component of the motion vector with respect to the x-axis coordinate, the second parameter represents the rate of change of the horizontal component of the motion vector with respect to the y-axis coordinate, the third parameter represents the rate of change of the vertical component of the motion vector with respect to the x-axis coordinate, and the fourth parameter represents the rate of change of the vertical component of the motion vector with respect to the y-axis coordinate.

在一些实施例中,第一参数、第二参数、第三参数以及第四参数分别采用变量dHorX、dHorY、dVerX、dVerY表示。In some embodiments, the first parameter, the second parameter, the third parameter, and the fourth parameter are represented by the variables dHorX, dHorY, dVerX, and dVerY, respectively.

表现形式2:当前块的仿射模型包括至少两个控制点的控制点运动矢量。Representation 2: The affine model of the current block includes control point motion vectors of at least two control points.

在一些实施例中,在包含两个控制点的情况,如图4所示,这两个控制点可以是当前块的左上角控制点41和右上角控制点42,仿射模型表示为{CPMV0,CPMV1};在包含三个控制点的情况下,这三个控 制点可以是当前块的左上角控制点41、右上角控制点42以及左下角控制点43,仿射模型表示为{CPMV0,CPMV1,CPMV2}。In some embodiments, when there are two control points, as shown in Figure 4, these two control points can be the upper left corner control point 41 and the upper right corner control point 42 of the current block, represented by the affine model as {CPMV0, CPMV1}; when there are three control points, these three control points... 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}.

表现形式3:当前块的仿射模型包括基准点的基准点运动矢量、第一参数、第二参数、第三参数以及第四参数。Representation 3: 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.

在一些实施例中,在基准点为固定基准点的情况下,仿射模型中可以不包含基准点的基准点坐标。比如,该固定基准点可以为当前块的左上角顶点(基准点坐标为(0,0)。当然,该固定基准点可以是当前块的其他顶点,或非顶点,本实施例对此不作限定。In some embodiments, when the reference point is a fixed reference point, the affine model may not include the reference point coordinates. For example, the fixed reference point can be the top-left vertex of the current block (reference point coordinates are (0, 0)). Of course, the fixed reference point can be other vertices of the current block, or non-vertices, and this embodiment does not limit this.

需要说明的是,上述表现形式的仿射模型之间可以相互转换。比如,可以先构建表现形式1的仿射模型,再将该仿射模型由表现形式1转换为表现形式2。或者,可以先构建表现形式3的仿射模型,再将该仿射模型由表现形式3转换为表现形式2。It should be noted that the affine models of the above representations can be converted into each other. For example, you can first construct an affine model of representation 1, and then convert that affine model from representation 1 to representation 2. Or, you can first construct an affine model of representation 3, and then convert that affine model from representation 3 to representation 2.

下面采用实施例分别对上述表现形式的仿射模型的过程进行说明。The process of the affine model described above will be explained below using examples.

请参考图5,其示出了本申请一个示例性实施例提供的仿射模型确定过程的流程图。该方法应用于解码器,该方法可以包括如下步骤:Please refer to Figure 5, which illustrates a flowchart of an affine model determination process provided in an exemplary embodiment of this application. This method is applied to a decoder and may include the following steps:

步骤501,基于当前块的参考图像的运动矢量,确定第一参数、第二参数、第三参数以及第四参数。Step 501: Determine 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.

参考图像的确定Determination of reference image

不同于基于当前图像中当前图像中当前块的相邻块,确定当前块对应的第一参数、第二参数、第三参数以及第四参数(表征运动矢量随坐标变化的变化率,后续简称为变化率参数),由于当前图像中当前块和相邻块遵循的运动可能存在较大差异,而参考图像中可能存在与当前块遵循相同或相近运动的部分,因此本实施例中,解码器基于当前块的参考图像确定上述变化率参数。Unlike determining the first, second, third, and fourth parameters (characterizing the rate of change of the motion vector with 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 its neighboring blocks in the current image may be significantly different, while there may be parts in the reference image that follow the same or similar motion as the current block, in this embodiment, the decoder determines the above-mentioned rate of change parameter based on the reference image of the current block.

由于在确定上述参数过程中,需要应用到参考图像的运动信息,因此在一些实施例中,解码器确定当前块的同位参考图像(collocated picture),从而基于同位参考图像的运动矢量,确定变化率参数。Since motion information from a reference image is required in determining the above parameters, in some embodiments, the decoder determines a collocated picture for the current block, and then determines the rate of change parameter based on the motion vector of the collocated picture.

其中,同位参考图像属于当前图像的参考图像,且同位参考图像具有进行预测时的运动矢量(同位参考图像在当前图像之前完成重建),即同位参考图像相对于同位参考图像的参考图像的运动矢量。Among them, the co-position reference image is the reference image of the current image, and the co-position reference image has the motion vector when making prediction (the co-position reference image is reconstructed before the current image), that is, the motion vector of the co-position reference image relative to the reference image of the co-position reference image.

在一些实施例中,解码器解析码流,确定当前块的同位参考图像。In some embodiments, the decoder parses the bitstream to determine the co-location reference image for the current block.

在一些实施例中,同位参考图像的数量为至少一个,且该同位参考图像由编码端通过码流指示。比如,码流中包含同位参考图像的同位参考图像索引,解码器基于同位参考图像索引,从参考图像列表中确定同位参考图像,并获取同位参考图像的运动信息。In some embodiments, the number of co-position reference images is at least one, and the co-position reference image is indicated by the encoder through the bitstream. For example, the bitstream contains a co-position reference image index, and the decoder determines the co-position reference image from the reference image list based on the co-position reference image index and obtains the motion information of the co-position reference image.

在一些实施例中,在存在多个同位参考图像的情况下,解码器确定当前块的至少一个仿射模型,其中,不同仿射模型基于不同同位参考图像确定得到。In some embodiments, when multiple co-reference images exist, the decoder determines at least one affine model for the current block, wherein different affine models are determined based on different co-reference images.

可选的,解码器对多个同位参考图像中的每个同位参考图像应用本方案,以确定每个同位参考图像对应的仿射模式,或者,解码器对多个同位参考图像中的部分同位参考图像应用本方案,以确定部分同位参考图像对应的仿射模式,其中,该部分同位参考图像可以通过编码端在码流中指示。Optionally, the decoder applies this scheme to each of the multiple co-position reference images to determine the affine mode corresponding to each co-position reference image; or, the decoder applies this scheme to a portion of the multiple co-position reference images to determine the affine mode corresponding to the portion of the co-position reference images, wherein the portion of the co-position reference images can be indicated in the bitstream by the encoder.

为了方便表述,下述实施例中,以单个同位参考图像为例进行说明。For ease of explanation, the following embodiments use a single co-position reference image as an example.

虚拟控制点位置的说明Explanation of virtual control point locations

在基于当前图像确定变化率参数时,需要确定至少两个控制点,本实施例中,在基于同位参考图像确定变化率时,同样需要确定当前块的同位参考图像中的至少两个点。其中,同位参考图像中的至少两个点可以被称为虚拟控制点(Virtual Control Point,VCP)。下述实施例中为了方便表示,采用虚拟控制点指代同位参考图像中的至少两个点。When determining the rate of change parameter based on the current image, at least two control points need to be determined. In this embodiment, when determining the rate of change based on a co-located reference image, it is also necessary to determine at least two points in the co-located reference image of the current block. These at least two points in the co-located reference image can be referred to as virtual control points (VCPs). For ease of representation in the following embodiments, virtual control points are used to refer to at least two points in the co-located reference image.

确定出同位参考图像中的至少两个点后,解码器基于同位参考图像中的至少两个点的运动矢量,确定第一参数、第二参数、第三参数以及第四参数。After identifying at least two points in the co-located reference image, the decoder determines the first parameter, the second parameter, the third parameter, and the fourth parameter based on the motion vectors of the at least two points in the co-located reference image.

在一种可能的实施方式中,解码器以组为单位确定同位参考图像中的虚拟控制点,其中,每个虚拟控制点组包含2个或3个虚拟控制点。In one possible implementation, the decoder determines virtual control points in the co-located reference image in groups, where each group of virtual control points contains two or three virtual control points.

针对每一个虚拟控制点组,解码器基于该虚拟控制点组中虚拟控制点的运动矢量,确定一组变化率参数。其中,针对不同虚拟控制点组计算得到的变化率参数可能不同,因此基于不同的虚拟控制点组,解码器后续可以确定当前块的多个仿射模型。For each virtual control point group, the decoder determines a set of rate of change parameters based on the motion vectors of the virtual control points in that group. The rate of change parameters calculated for different virtual control point groups may differ; therefore, based on different virtual control point groups, the decoder can subsequently determine multiple affine models for the current block.

可选的,在虚拟控制点组包含2个虚拟控制点时,2个虚拟控制点位于所形成矩形的左上角和右上角;在虚拟控制点组包含3个虚拟控制点时,3个虚拟控制点分别位于所形成矩形的左上角、右上角和左下角。Optionally, when the virtual control point group contains 2 virtual control points, the 2 virtual control points are located at the upper left and upper right corners 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, upper right, and lower left corners of the formed rectangle, respectively.

可选的,该虚拟控制点构成的矩形(可以被称为虚拟块)与当前块的尺寸相同,或者不同;该虚拟控制点构成的矩形在同位参考图像中的位置与当前块在当前图像中的位置相同,或者不同。Optionally, the rectangle formed by the virtual control points (which may be called a virtual block) may have the same or different size as the current block; the position of the rectangle formed by the virtual control points in the co-located reference image may have the same or different position as the current block in the current image.

在一些实施例中,该虚拟控制点组中的虚拟控制点可以位于同位参考图像中同位块的各个方向,比如上方、下方、左侧或右侧。In some embodiments, the virtual control points in the virtual control point group can be located in various directions of the co-position block in the co-position reference image, such as above, below, left, or right.

由于基于当前图像的运动信息构建仿射模型时,可以从当前块的左侧和上方的相邻块获取运动信息, 而无法从当前块的右侧和下方获取运动信息(由于右侧和下方的块还未编解码),因此在一种可能的实施方式中,在确定出的n个点组中,存在至少一个点组满足如下条件:点组包含的点位于当前块的右下方区域。When constructing an affine model based on the motion information of the current image, motion information can be obtained from the adjacent blocks to the left and above the current block. Since motion information cannot be obtained from the right and bottom of the current block (because the blocks on the right and bottom have not yet been encoded or decoded), in one possible implementation, among the determined n point groups, there exists at least one point group that satisfies the following condition: the points contained in the point group are located in the lower right region of the current block.

由于基于满足上述条件点组确定变化率参数时,能够利用到参考图像中同位块右侧以及下方区域的运动信息(这是基于当前图像构建仿射模型所发参考到的信息),因此基于该点组确定得到的仿射模型,能够作为对基于当前图像构建的仿射模型的有力补充。Since the motion information of the region to the right and below the co-position block in the reference image can be used when determining the rate of change parameter based on the point set that meets the above conditions (this is the reference information used when constructing the affine model based on the current image), the affine model determined based on this point set can serve as a powerful supplement to the affine model constructed based on the current image.

在一个示意性的例子中,如图6所示,当前图像中当前块在同位参考图像61对应同位块62,且其它位置表示合并(merge)模式下合并使用的运动矢量。以确定虚拟控制点组包含3个虚拟控制点为例,解码器可以选取编号为{9,8,7}、{15,13,14}、{6(同位块中间位置),17,18}的虚拟控制点构成虚拟控制点组。其中,虚拟控制点组{9,8,7}和{15,13,14}中的虚拟控制点位于同位块的左上方,虚拟控制点组{6(同位块中间位置),17,18}中的虚拟控制点位于同位块的右下方。In an illustrative example, as shown in Figure 6, the current block in the current image corresponds to the same block 62 in the same reference image 61, and other positions represent motion vectors used for merging in merge mode. Taking the determination that a virtual control point group contains 3 virtual control points as an example, the decoder can select virtual control points numbered {9, 8, 7}, {15, 13, 14}, {6 (middle position of the same block), 17, 18} to form a 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 of the same block, and the virtual control points in the virtual control point groups {6 (middle position of the same block), 17, 18} are located at the lower right of the same block.

虚拟控制点可用性的说明Description of virtual control point availability

为了确保能够基于虚拟控制点确定出变化率参数(避免确定出的变化率参数为0),同位参考图像中的至少两个点位于至少两个具有预定尺寸的区域。To ensure that the rate of change parameter can be determined based on the virtual control points (avoiding the determined rate of change parameter being 0), at least two points in the co-located reference image are located in at least two regions of predetermined size.

其中,在确定出两个虚拟控制点时,两个虚拟控制点分别位于两个具有预定尺寸的区域。When two virtual control points are determined, each virtual control point is located in a region of a predetermined size.

在确定出三个虚拟控制点时,三个虚拟控制点分别位于三个具有预定尺寸的区域,或者,三个虚拟控制点中两个虚拟控制点位于同一具有预定尺寸的区域,另一个虚拟控制点位于另一个具有预定尺寸的区域。When three virtual control points are determined, the three virtual control points are located in three regions with predetermined dimensions, or two of the three virtual control points are located in the same region with predetermined dimensions, and the other virtual control point is located in another region with predetermined dimensions.

在一些实施例中,该具有预定尺寸的区域可以是运动信息最小存储单元。其中,同一运动信息最小存储单元内的坐标位置具有相同运动信息。In some embodiments, the region with a predetermined size can be a minimum storage unit for motion information. The coordinate positions within the same minimum storage unit for motion information contain the same motion information.

比如,该最小存储单元为8×8,表示每个8×8的块存储一组运动信息,即8×8块中各个坐标位置具有相同的运动信息。当然,最小存储单元可以采用更大或更小的尺寸,比如16×16(实现代价更低,运动矢量准确性低)、4×4(实现代价更高,运动矢量准确性高)、甚至1×1,本实施例对此不作限定。For example, the smallest storage unit is 8×8, meaning that each 8×8 block stores a set of motion information, that is, each coordinate position in the 8×8 block has the same motion information. Of course, the smallest storage unit can use a larger or smaller size, such as 16×16 (lower implementation cost, lower motion vector accuracy), 4×4 (higher implementation cost, higher motion vector accuracy), or even 1×1. This embodiment does not limit this.

在一种可能的实施方式中,解码器基于虚拟控制点组中虚拟控制点的坐标以及运动信息最小存储单元的尺寸,确定虚拟控制点是否位于同一运动信息最小存储单元中。In one possible implementation, the decoder determines whether a virtual control point is 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.

若虚拟控制点组中的虚拟控制点位于至少两个运动信息最小存储单元内,则确定该虚拟控制点组可用,从而基于该虚拟控制点组确定变化率参数;若虚拟控制点组中的虚拟控制点位于同一运动信息最小存储单元内,则确定该虚拟控制点组不可用,进而不会基于该虚拟控制点组确定变化率参数。If the virtual control points in a virtual control point group are located in at least two motion information minimum storage units, then the virtual control point group is determined to be available, and the rate of change parameter is determined based on the virtual control point group; if the virtual control points in a virtual control point group are located in the same motion information minimum storage unit, then the virtual control point group is determined to be unavailable, and the rate of change parameter will not be determined based on the virtual control point group.

示意性的,在运动信息最小存储单元为4×4,且A点坐标为(x1,y1),B点坐标为(x2,y2)的情况下,若floor(x1/4)=floor(x2/4),且floor(y1/4)=floor(y2/4),则确定这两个点的位于同一运动信息最小存储单元;若floor(x1/4)≠floor(x2/4),和/或,floor(y1/4)≠floor(y2/4),则确定这两个点的位于不同运动信息最小存储单元。To illustrate, given that the minimum storage unit for motion information is 4×4, 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), then the two points are located in the same minimum storage unit for motion information; if floor(x1/4) ≠ floor(x2/4), and/or floor(y1/4) ≠ floor(y2/4), then the two points are located in different minimum storage units for motion information.

步骤502,确定基准点的基准点坐标以及基准点运动矢量。Step 502: Determine the reference point coordinates and the reference point motion vector.

其中,基准点可以位于当前块之内,或者,位于当前块之外。The reference point can be located inside the current block or outside the current block.

在一些实施例中,在基准点位于当前块之内的情况下,基准点为当前块的左上角顶点、右上角或左下角顶点。In some embodiments, when the reference point is located within the current block, the reference point is the top-left, top-right, or bottom-left vertex of the current block.

其中,在当前块的高度为H,且宽度为W的情况下,若基准点的当前块的左上角顶点,则基准点坐标为(0,0);若基准点的当前块的右上角顶点,则基准点坐标为(W,0);若基准点的当前块的左下角顶点,则基准点坐标为(0,H)。Specifically, if the height of the current block is H and the width is W, then if the reference point is the top left corner of the current block, the coordinates of the reference point are (0, 0); if the reference point is the top right corner of the current block, the coordinates of the reference point are (W, 0); if the reference point is the bottom left corner of the current block, the coordinates of the reference point are (0, H).

关于基准点的基准点运动矢量的确定方式,在一种可能的实施方式中,在当前块的相邻块支持仿射模式的情况下,解码器基于相邻块的仿射模型,确定基准点的基准点运动矢量。Regarding the method for determining the reference point motion vector, in one possible implementation, if the adjacent blocks of the current block support affine mode, the decoder determines the reference point motion vector based on the affine model of the adjacent blocks.

可选的,在当前块支持合并模式,且相邻块支持仿射模式的情况下,解码器基于当前块中基准点相对于相邻块的坐标,将该坐标代入相邻块的仿射模型,得到基准点的基准运动矢量。Optionally, if the current block supports the merge mode and the adjacent blocks support the affine mode, the decoder uses the coordinates of the reference point in the current block relative to the adjacent blocks to substitute the coordinates into the affine model of the adjacent blocks to obtain the reference motion vector of the reference point.

示意性的,如图7所示,当前块的相邻块包括A0、A1,B0,B1,B2。解码器可以基于相邻块B2的仿射模型,确定左上角基准点的基准点运动矢量;或,基于相邻块B0或B1的仿射模型,确定右上角基准点的基准点运动矢量;或,基于相邻块A0或A1的仿射模型,确定左下角基准点的基准点运动矢量。As illustrated in Figure 7, the adjacent blocks of the current block include A0, A1, B0, B1, and B2. The decoder can determine the reference point motion vector of the upper left reference point based on the affine model of the adjacent block B2; or, based on the affine model of the adjacent blocks B0 or B1, determine the reference point motion vector of the upper right reference point; or, based on the affine model of the adjacent blocks A0 or A1, determine the reference point motion vector of the lower left reference point.

在另一种可能的实施方式中,解码器可以基于当前块的相邻块中的可用运动矢量,确定基准点的基准点运动矢量。In another possible implementation, the decoder can determine the reference point motion vector based on the available motion vectors in the adjacent blocks of the current block.

可选的,解码器可以基于当前块的相邻块中的至少两个可用运动矢量,通过拟合的方式确定当前块中基准点的基准点运动矢量。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 adjacent blocks of the current block.

示意性的,如图8所示,当前块的相邻块包括A0、A1,A2、B0,B1,B2和B3。解码器可以基于相邻块B2、B3、A2中的可用的运动矢量确定左上角基准点的基准点运动矢量;基于相邻块B0、B1中的可 用的运动矢量确定右上角基准点的基准点运动矢量;基于相邻块A0、A1中的可用的运动矢量确定左下角基准点的基准点运动矢量。As illustrated in Figure 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 neighboring blocks B2, B3, and A2; and based on the available motion vectors in neighboring blocks B0, B1, and A3... The motion vector used is used to determine the reference point motion vector of the upper right reference point; the reference point motion vector of the lower left reference point is determined based on the available motion vectors in adjacent blocks A0 and A1.

在一些实施例中,解码器构建得到形如{(x,y),MV,a,b,c,d}的仿射模型,其中,(x,y)为基准点坐标,MV为基准点运动矢量,abcd分别为上述第一至第四参数。In some embodiments, the decoder constructs an affine model of the form {(x, y), MV, a, b, c, d}, where (x, y) are the coordinates of the reference point, MV is the motion vector of the reference point, and a, b, c, d are the first to fourth parameters mentioned above, respectively.

在一些实施例中,当基准点为固定基准点时,解码器仅需要确定基准点的基准点运动矢量,从而构建得到形如{MV,a,b,c,d}的仿射模型,其中,MV为基准点运动矢量,abcd分别为上述第一至第四参数,本实施例在此不作赘述。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 of the form {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 mentioned above, which will not be elaborated here in this embodiment.

本实施例中,解码器基于同位参考图像中的虚拟控制点组的运动矢量确定变化率参数时,从当前块的右下方区域中确定虚拟控制点组,使计算变化率参数时,能够利用到原先基于当前图像构建仿射模型时所无法参考到的右下方区域的运动信息,使采用本方案构建的仿射模型能够作为对已有仿射模型的有力补充。In this embodiment, when the decoder determines the rate of change parameter based on the motion vector of the virtual control point group in the co-located reference image, it determines the virtual control point group from the lower right region of the current block. This allows the calculation of the rate of change parameter to utilize the motion information of the lower right region, which was previously unavailable when constructing the affine model based on the current image. This enables the affine model constructed using this scheme to serve as a powerful supplement to existing affine models.

此外,解码器通过检测虚拟控制点是否位于至少两个运动信息最小存储单元(即具有预定尺寸的区域),确保后续基于虚拟控制点的运动矢量计算得到可用的变化率参数,有助于提高后续构建的仿射模型的质量。Furthermore, by detecting whether the virtual control point is located in at least two minimum storage units of motion information (i.e., regions of predetermined size), the decoder ensures that the subsequent motion vector calculation based on the virtual control point yields usable rate of change parameters, which helps improve the quality of the subsequently constructed affine model.

上述实施例中,利用包含基准点坐标、基准点运动矢量、第一参数、第二参数、第三参数以及第四参数的仿射模型,确定多个运动矢量的过程可以包括:In the above embodiments, the process of determining multiple motion vectors using an affine model that includes reference point coordinates, reference point motion vectors, a first parameter, a second parameter, a third parameter, and a fourth parameter may include:

步骤1、基于当前块的仿射模型确定仿射关系,仿射关系用于表征坐标位置与坐标位置处运动矢量的对应关系。Step 1: Determine the affine relation based on the affine model of the current block. The affine relation is used to characterize the correspondence between the coordinate position and the motion vector at the coordinate position.

在一些实施例中,该仿射关系可以表示为:
In some embodiments, the affine relation can be expressed as:

其中,(xbase,ybase)为基准点坐标,分别为基准点运动矢量的水平分量和竖直分量,abcd分别为第一至第四参数。Where (x base , y base ) are the coordinates of the reference point. and These are the horizontal and vertical components of the motion vector of the reference point, respectively, and abcd are the first to fourth parameters, respectively.

确定出仿射关系后,解码器将坐标代入仿射关系后,即可得到该坐标位置处的运动矢量。Once the affine relation is determined, the decoder substitutes the coordinates into the affine relation to obtain the motion vector at that coordinate position.

步骤2、基于仿射关系,确定当前块中多个子块的运动矢量,或者,确定当前块中多个坐标位置的运动矢量。Step 2: Based on affine relations, 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.

在一些实施例中,若当前块被划分为若干子块,对于子块中的每个坐标位置,解码器基于仿射关系确定各个坐标位置处的运动矢量,并将同一子块中各个坐标位置处运动矢量的平均值,确定为该子块的运动矢量。In some embodiments, if the current block is divided into several sub-blocks, for each coordinate position in the sub-block, the decoder determines the motion vector at each coordinate position based on the affine relation, and determines the average value of the motion vectors at each coordinate position in the same sub-block as the motion vector of that sub-block.

在一些实施例中,在不进行子块划分的情况下,对于当前块中的任一坐标位置,解码器同样可以基于仿射关系确定各个坐标位置处的运动矢量。In some embodiments, without sub-block division, the decoder can also determine the motion vector at each coordinate position based on affine relation for any coordinate position in the current block.

确定参考图像中的至少两个点(即虚拟控制点)可以采用如下方式中的至少一种:Determining at least two points (i.e., virtual control points) in a reference image can be done in at least one of the following ways:

方式1、基于当前图像中当前块的顶点坐标,确定同位参考图像中的至少两个点。Method 1: Based on the vertex coordinates of the current block in the current image, determine at least two points in the corresponding reference image.

在一些实施例中,在图像内容变化较慢的情况下,解码器可以将同位参考图像中,与当前块中控制点的同位顶点确定为虚拟控制点。In some embodiments, when the image content changes slowly, the decoder can identify the vertex in the same position as the control point in the current block in the same reference image as the virtual control point.

在一些实施例中,解码器基于当前块的左上角顶点的顶点坐标,以及右上角顶点的顶点坐标,从同位参考图像中确定2个虚拟控制点;或者,基于当前块的左上角顶点的顶点坐标,右上角顶点的顶点坐标,以及左下角顶点的顶点坐标,从同位参考图像中确定3个虚拟控制点。In some embodiments, the decoder determines two virtual control points from the co-located reference image based on the vertex coordinates of the top-left vertex and the top-right vertex of the current block; or, it determines three virtual control points from the co-located reference image based on the vertex coordinates of the top-left vertex, the top-right vertex, and the bottom-left vertex of the current block.

在一些实施例中,解码器基于当前块的左上角顶点的顶点坐标确定第一虚拟控制点,基于左上角顶点的顶点坐标和当前块的宽度,确定第二虚拟控制点,基于左上角顶点的顶点坐标和当前块的高度,确定第三虚拟控制点。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.

方式2、基于当前图像中当前块的顶点坐标以及第一偏移量,确定同位参考图像中的至少两个点。Method 2: Based on the vertex coordinates of the current block in the current image and the first offset, determine at least two points in the co-located reference image.

其中,第一偏移量用于表征(虚拟控制点)与当前块的顶点的坐标偏移量。可选的,该第一偏移量包括x轴方向偏移量和y轴方向偏移量。The first offset is used to characterize the coordinate offset between the (virtual control point) and the vertex of the current block. Optionally, the first offset includes an offset in the x-axis direction and an offset in the y-axis direction.

可选的,该第一偏移量是相对于当前块中指定顶点的坐标偏移量。比如,该指定顶点可以是当前块的左上角顶点、右上角顶点、左下角顶点等等。Optionally, the first offset is a coordinate offset relative to a specified vertex in the current block. For example, the specified vertex could be the top-left vertex, top-right vertex, bottom-left vertex, etc. of the current block.

在一些实施例中,解码器基于当前块中左上角顶点的顶点坐标,以及m个第一偏移量,确定出通道参考图像中的m个虚拟控制点。In some embodiments, the decoder determines m virtual control points in the channel reference image based on the vertex coordinates of the top-left vertex in the current block and m first offsets.

示意性的,当前块的左上角顶点的顶点坐标(xCb,yCb),解码器基于第一偏移量(x1,y1),确定出第一虚拟控制点的坐标为(xCb+x1,yCb+y1);基于第一偏移量(x2,y2,),确定出第二虚拟控制点的坐标为(xCb+x2,yCb+y2);基于第一偏移量(x3,y3),确定出第三虚拟控制点的坐标为(xCb+x3,yCb+y3).其中,第一虚拟控制点、第二虚拟控制点和第三虚拟控制点分别是虚拟块的左上角顶点、右上角顶点以及 左下角顶点。Schematic representation: Given the top-left corner vertex coordinates (xCb, yCb) of the current block, the decoder determines the coordinates of the first virtual control point as (xCb+x1, yCb+y1) based on the first offset (x1, y1); the second virtual control point as (xCb+x2, yCb+y2) based on the first offset (x2, y2); and the third virtual control point as (xCb+x3, yCb+y3) based on the first offset (x3, y3). The first, second, and third virtual control points are the top-left, top-right, and bottom-right corners of the virtual block, respectively. The bottom left corner vertex.

方式3、基于当前图像中当前块的顶点坐标以及第二偏移量,确定同位参考图像中的至少两个点。Method 3: Based on the vertex coordinates of the current block in the current image and the second offset, determine at least two points in the co-located reference image.

其中,第二偏移量基于当前块的相邻块的运动矢量确定得到。The second offset is determined based on the motion vectors of the adjacent blocks of the current block.

对当前块的相邻块,若该相邻块的同位参考图像与当前块的同位参考图像相同,则该相邻块的运动矢量与当前块的运动矢量可能较为相近。因此为了选取到更加适合的虚拟控制点,在一种可能的实施方式中,解码器确定当前块的相邻块的运动矢量,在相邻块的运动矢量指向当前块的同位参考图像的情况下,解码器基于相邻块的运动矢量确定第二偏移量。For neighboring blocks of the current block, if the co-location reference image of the neighboring block is the same as that of the current block, then the motion vector of the neighboring block may be quite similar to that 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 blocks of the current block. If the motion vector of the neighboring block points to the co-location reference image of the current block, the decoder determines a second offset based on the motion vector of the neighboring block.

其中,相邻块是在当前块之前完成重建的块,且相邻块的运动矢量为相邻块的坐标与相邻块在同位参考图像中参考块之间的坐标的差值。The adjacent block is the block that was reconstructed before the current block, and the motion vector of the adjacent block is the difference between the coordinates of the adjacent block and the coordinates of the reference block in the co-located reference image.

进一步的,解码器基于第二偏移量对当前块的顶点坐标进行偏移,得到同位参考图像中虚拟控制点的坐标。可选的,解码器可以基于第二偏移量对当前块中不同顶点的顶点坐标进行偏移,从而得到多个虚拟坐标点的坐标。Furthermore, the decoder offsets the vertex coordinates of the current block based on the second offset to obtain the coordinates of the virtual control points in the co-located reference image. Optionally, the decoder can offset the vertex coordinates of different vertices in the current block based on the second offset to obtain the coordinates of multiple virtual coordinate points.

示意性的,如图9所示,当前块具有相邻块A0、A1、A2、B0、B1、B2、B3。其中,相邻块A0的运动矢量指向当前块的同位参考图像,且运动矢量为mvA0。若当前块的左上角顶点的坐标为(xCb,yCb),则将同位参考图像中坐标为的点确定为虚拟坐标点,其中,分别为水平和竖直分量。As illustrated in Figure 9, the current block has neighboring blocks A0, A1, A2, B0, B1, B2, and B3. The motion vector of neighboring block A0 points to the corresponding reference image of the current block, and the motion vector is mvA0 . If the coordinates of the top-left corner of the current block are (xCb, yCb), then the coordinates in the corresponding reference image are... The point is determined as a virtual coordinate point, where, These are the horizontal and vertical components, respectively.

方式4、基于当前图像中当前块的顶点坐标、第一偏移量以及第二偏移量,确定同位参考图像中的至少两个点。Method 4: Based on the vertex coordinates of the current block in the current image, the first offset, and the second offset, determine at least two points in the co-located reference image.

在一些实施例中,在存在相邻块的运动矢量指向当前块的同位参考图像的情况下,解码器利用第一偏移量和第二偏移量对当前块的顶点坐标进行偏移,得到同位参考图像中虚拟控制点的坐标。在不存在相邻块的运动矢量指向当前块的同位参考图像的情况下,解码器利用第一偏移量对当前块的顶点坐标进行偏移。In some embodiments, when there is a motion vector of an adjacent block pointing to a co-location reference image of the current block, the decoder uses a first offset and a second offset to offset the vertex coordinates of the current block to obtain the coordinates of the virtual control point in the co-location reference image. When there is no motion vector of an adjacent block pointing to a co-location reference image of the current block, the decoder uses the first offset to offset the vertex coordinates of the current block.

变化率参数的确定过程The process of determining the rate of change parameter

如图10所示,同位参考图像(col_pic)上的同位块(col_cu)的运动矢量是从同位参考图像到同位块的参考图像(col_ref)之间的矢量。而对当前块(curr_CU),其需要的运动矢量是从当前图像(curr_pic)到当前块的参考图像(curr_ref)之间的矢量。As shown in Figure 10, the motion vector of the co-position block (col_cu) on the co-position reference image (col_pic) is the vector between the co-position reference image and the reference image (col_ref) of the co-position block. For the current block (curr_CU), the required motion vector is the vector between the current image (curr_pic) and the reference image (curr_ref) of the current block.

设col_pic和col_ref之间的POC距离是td,curr_pic和curr_ref之间的POC距离是tb。在同位块上的运动到当前块上的运动不变的情况下,可以根据td和tb来确定缩放比例。设同位块的运动矢量为(col_mv_x,col_mv_y),则时域运动矢量预测(tmvp_x,tmvp_y)可以按如下推导:Let td be the point of convergence (POC) distance between col_pic and col_ref, and tb be the POC distance between curr_pic and curr_ref. Assuming the motion in the same block remains constant over time, the scaling factor can be determined based on td and tb. Let the motion vector of the same block be (col_mv_x, col_mv_y), then the temporal motion vector prediction (tmvp_x, tmvp_y) can be derived as follows:

tmvp_x=col_mv_x*tb/td,tmvp_y=col_mv_y*tb/tdtmvp_x=col_mv_x*tb/td, tmvp_y=col_mv_y*tb/td

基于上述推导过程可以看出,当前图像可以从同位参考图像中将同位图像的运动信息进行缩放,以获得当前图像的时域运动信息。进一步的,基于同位参考图像的运动信息,确定同位参考图像对应的变化率参数后,可以对该变化率参数进行缩放,以得到当前图像对应的变化率参数。Based on the above derivation process, it can be seen that the current image can be obtained by scaling the motion information of the corresponding reference image to obtain the temporal motion information of the current image. Furthermore, based on the motion information of the corresponding reference image, after determining the rate of change parameter corresponding to the corresponding reference image, this rate of change parameter can be scaled to obtain the rate of change parameter corresponding to the current image.

在一种可能的实施方式中,解码器基于同位参考图像中至少两个点(即虚拟控制点)的运动矢量,确定第五参数、第六参数、第七参数以及第八参数,从而对第五参数、第六参数、第七参数以及第八参数进行缩放,得到第一参数、第二参数、第三参数以及第四参数。In one possible implementation, the decoder determines the fifth, sixth, seventh, and eighth parameters based on the motion vectors of at least two points (i.e., virtual control points) in the co-located reference image, and then scales the fifth, sixth, seventh, and eighth parameters to obtain the first, second, third, and fourth parameters.

其中,第五至第八参数用于表征虚拟块(由虚拟控制点构成的块)中坐标位置的运动矢量随坐标变化的变化率。Among them, the fifth to eighth parameters are used to characterize the rate of change of the motion vector of the coordinate position in the virtual block (a block composed of virtual control points) as the coordinates change.

关于缩放所采用缩放比例的确定方式,在一种可能的实施方式中,解码器确定当前图像与当前图像的参考图像之间的第一图像间隔,以及确定同位参考图像与同位参考图像的参考图像之间的第二图像间隔。基于第一图像间隔和第二图像间隔的比例,对第五参数、第六参数、第七参数以及第八参数进行缩放,得到第一参数、第二参数、第三参数以及第四参数。Regarding the method for determining the scaling ratio, in one possible implementation, the decoder determines a first image interval between the current image and its reference image, and a second image interval between co-located reference images and their reference images. Based on the ratio of the first and second image intervals, the fifth, sixth, seventh, and eighth parameters are scaled to obtain the first, second, third, and fourth parameters.

其中,第一图像间隔用于表征当前图像与当前图像的参考图像的POC距离,第二图像间隔用于表征同位参考图像与同位参考图像的参考图像的POC距离。The first image interval is used to characterize the POC distance between the current image and its reference image, and the second image interval is used to characterize the POC distance between the co-located reference image and its reference image.

在一些实施例中,基于第一图像间隔与第二图像间隔确定缩放比例。基于缩放比例对第五参数缩放,得到第一参数;基于缩放比例对第六参数缩放,得到第二参数;基于缩放比例对第七参数缩放,得到第三参数;基于缩放比例对第八参数缩放,得到第四参数。In some embodiments, a scaling ratio is determined based on a first image interval and a second image interval. A first parameter is obtained by scaling a fifth parameter based on the scaling ratio; a second parameter is obtained by scaling a sixth parameter based on the scaling ratio; a third parameter is obtained by scaling a seventh parameter based on the scaling ratio; and a fourth parameter is obtained by scaling an eighth parameter based on the scaling ratio.

示意性的,若col_pic和col_ref之间的POC距离是td,curr_pic和curr_ref之间的POC距离是tb,且基于同位参考图像中虚拟控制点的运动矢量,确定同位参考图像中虚拟块对应的变化率参数分别为a’、b’、c’、d’,则当前图像中当前块对应的变化率参数a=a′*tb/td,b=b′*tb/td,c=c′*tb/td,d=d′*tb/td。For illustration, if the POC distance between col_pic and col_ref is td, the POC distance between curr_pic and curr_ref is tb, and the rate of change parameters corresponding to the virtual blocks in the co-position reference image are determined to be a’, b’, c’, and d’ based on the motion vector of the virtual control points in the co-position reference image, then the rate of change parameters 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.

请参考图11,其示出了本申请另一个示例性实施例提供的仿射模型确定过程的流程图。该方法应用于 解码器,该方法可以包括如下步骤:Please refer to Figure 11, which shows a flowchart of an affine model determination process provided by another exemplary embodiment of this application. This method is applied to... A decoder, the method may include the following steps:

步骤1101,基于当前块的参考图像的运动矢量,确定第一参数、第二参数、第三参数以及第四参数。Step 1101: Determine 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.

本步骤的实施方式可以参考步骤501,本实施例在此不做赘述。The implementation method of this step can be referred to step 501, and will not be repeated here in this embodiment.

步骤1102,基于第一参数、第二参数、第三参数、第四参数以及基准点,确定至少两个控制点的控制点运动矢量。Step 1102: Based on the first parameter, the second parameter, the third parameter, the fourth parameter, and the reference point, determine the control point motion vectors of at least two control points.

由于基于变化率参数、基准点坐标以及基准点运动矢量,能够确定出当前块中任一坐标位置的运动矢量,因此当需要得到表现形式2的仿射模型时,解码器可以确定至少两个控制点的控制点运动矢量。Since the motion vector of any coordinate position in the current block can be determined based on the rate of change parameter, the reference point coordinates, and the reference point motion vector, the decoder can determine the control point motion vectors of at least two control points when it is necessary to obtain the affine model of representation form 2.

可选的,至少两个控制点为属于当前块的控制点。比如,位于当前块的左上角顶点的第一控制点,基于左上角顶点坐标以及当前块的宽度确定的第二控制点,基于左上角顶点坐标以及当前块的高度确定的第三控制点。Optionally, at least two control points belong to the current block. For example, a first control point located at the top-left vertex of the current block, a second control point determined based on the coordinates of the top-left vertex and the width of the current block, and a third control point determined based on the coordinates of the top-left vertex and the height of the current block.

可选的,该至少两个控制点为符合仿射模型的表现形式要求的控制点。比如,当采用4参数仿射模型时,至少两个控制点包括当前块的左上角顶点以及右上角顶点;当采用6参数仿射模型时,至少两个控制点包括当前块的左上角顶点、右上角顶点以及左下角顶点。Optionally, the at least two control points must conform to the representation requirements of the affine model. For example, when using a 4-parameter affine model, the at least two control points include the top-left and top-right vertices of the current block; when using a 6-parameter affine model, the at least two control points include the top-left, top-right, and bottom-left vertices of the current block.

在一种可能的实施方式中,解码器基于第一参数、第二参数、第三参数、第四参数、基准点坐标以及基准点运动矢量,确定仿射关系,仿射关系用于表征坐标位置与坐标位置处运动矢量的对应关系。In one possible implementation, the decoder determines an affine relation based on the first parameter, the second parameter, the third parameter, the fourth parameter, the reference point coordinates, and the reference point motion vector. The affine relation is used to characterize the correspondence between the coordinate position and the motion vector at the coordinate position.

在一些实施例中,该仿射关系可以表示为:
In some embodiments, the affine relation can be expressed as:

其中,(xbase,ybase)为基准点的坐标,分别为基准点的运动矢量的水平分量和竖直分量,abcd分别为第一至第四参数。Where (x base , y base ) are the coordinates of the reference point. and , respectively, are the horizontal and vertical components of the motion vector of the reference point, and abcd are the first to fourth parameters, respectively.

在另一些实施例中,在基准点为固定基准点的情况下,解码器基于第一参数、第二参数、第三参数、第四参数以及基准点运动矢量确定仿射关系。In other embodiments, when the reference point is fixed, 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.

确定出仿射关系后,解码器基于仿射关系以及至少两个控制点的控制点坐标,确定至少两个控制点的控制点运动矢量,即将控制点的坐标代入仿射关系后,即可得到该控制点的控制点运动矢量。After determining the affine relation, the decoder determines the control point motion vector of at least two control points based on the affine relation and the control point coordinates of at least two control points. That is, by substituting the coordinates of the control points into the affine relation, the control point motion vector of the control point can be obtained.

示意性的,在当前块的高度为H,宽度为W时,解码器将当前块中左上角控制点的控制点坐标(0,0)代入上述仿射关系,得到左上角控制点的控制点运动矢量CPMV0;将右上角控制点的控制点坐标(W,0)代入上述仿射关系,得到右上角控制点的控制点运动矢量CPMV1;将左下角控制点的控制点坐标(0,H)代入上述仿射关系,得到左下角控制点的控制点运动矢量CPMV2。Schematic: When the height of the current block is H and the width is W, the decoder substitutes the control point coordinates (0, 0) of the top-left control point in the current block into the above affine relation to obtain the control point motion vector CPMV0 of the top-left control point; substitutes the control point coordinates (W, 0) of the top-right control point into the above affine relation to obtain the control point motion vector CPMV1 of the top-right control point; and substitutes the control point coordinates (0, H) of the bottom-left control point into the above affine relation to obtain the control point motion vector CPMV2 of the bottom-left control point.

在一些实施例中,在采用4参数仿射模型的情况下,解码器构建得到形如{CPMV0,CPMV1}的仿射模型;在采用6参数仿射模型的情况下,解码器构建得到形如{CPMV0,CPMV1,CPMV2}的仿射模型。In some embodiments, when a 4-parameter affine model is used, the decoder constructs an affine model of the form {CPMV0, CPMV1}; when a 6-parameter affine model is used, the decoder constructs an affine model of the form {CPMV0, CPMV1, CPMV2}.

上述实施例中,利用基于至少两个控制点的控制点运动矢量构建得到仿射模型,确定运动矢量的过程可以包括:In the above embodiments, an affine model is constructed using control point motion vectors based on at least two control points. The process of determining the motion vectors may include:

步骤1、基于当前块的仿射模型,确定第一参数、第二参数、第三参数以及第四参数。Step 1: Based on the affine model of the current block, determine the first parameter, the second parameter, the third parameter, and the fourth parameter.

与上述各个实施例中基于控制点确定变化率参数相类似的,解码器基于仿射模型中至少两个控制点的控制点运动矢量,确定第一参数、第二参数、第三参数以及第四参数。Similar to the determination of the rate of change parameter based on 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 vector of at least two control points in the affine model.

由于在构建仿射模型过程中,已经确定过变化率参数,因此在一种可能的实施方式中,解码器直接使用之前确定的变化率参数。Since the rate of change parameter has been determined during the construction of the affine model, in one possible implementation, the decoder directly uses the previously determined rate of change parameter.

步骤2、基于第一参数、第二参数、第三参数以及第四参数,确定仿射关系,仿射关系用于表征坐标位置与坐标位置处运动矢量的对应关系。Step 2: Based on the first parameter, the second parameter, the third parameter, and the fourth parameter, determine the affine relation. The affine relation is used to characterize the correspondence between the coordinate position and the motion vector at the coordinate position.

由于仿射模型中包含当前块左上角控制点的控制点运动矢量,因此解码器可以基于第一参数、第二参数、第三参数、第四参数以及左上角控制点的控制点运动矢量,确定仿射关系。Since the affine model contains the motion vector of the control point at the top left corner of the current block, the decoder can determine the affine relationship based on the first parameter, the second parameter, the third parameter, the fourth parameter, and the motion vector of the control point at the top left corner.

在一些实施例中,确定出的仿射关系如下:
In some embodiments, the determined affine relations are as follows:

其中,为左上角控制点的运动矢量在水平以及竖直方向的分量。in, and The components of the motion vector of the upper left control point in the horizontal and vertical directions.

步骤3、基于仿射关系,确定当前块中多个子块的运动矢量,或者,确定当前块中多个坐标位置的运动矢量。Step 3: Based on affine relations, 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.

在一些实施例中,若当前块被划分为若干子块,对于子块中的每个坐标位置,解码器基于仿射关系确定各个坐标位置处的运动矢量,并将同一子块中各个坐标位置处运动矢量的平均值,确定为该子块的运动矢量。In some embodiments, if the current block is divided into several sub-blocks, for each coordinate position in the sub-block, the decoder determines the motion vector at each coordinate position based on the affine relation, and determines the average value of the motion vectors at each coordinate position in the same sub-block as the motion vector of that sub-block.

在一些实施例中,在不进行子块划分的情况下,对于当前块中的任一坐标位置,解码器同样可以基于 仿射关系确定各个坐标位置处的运动矢量。In some embodiments, without sub-block partitioning, the decoder can also base its work on any coordinate position within the current block. Affine relations determine the motion vectors at each coordinate position.

下面采用示例性的实施例对图像编码过程进行说明。The image encoding process is illustrated below using exemplary embodiments.

请参考图12,其示出了本申请一个示例性实施例提供的图像编码方法的流程图。该方法应用于编码器,该方法可以包括如下步骤:Please refer to Figure 12, which illustrates a flowchart of an image encoding method provided in an exemplary embodiment of this application. The method is applied to an encoder and may include the following steps:

步骤1201,基于当前块的参考图像的运动信息,以及基准点,确定当前块的仿射模型。Step 1201: 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.

在一些实施例中,编码器确定当前图像中当前块的参考图像。其中,参考图像属于参考图像列表(Reference Picture List)。In some embodiments, the encoder determines a reference image for the current block in the current image. This reference image belongs to a reference picture list.

可选的,该参考图像可以是从前向预测参考图像列表中确定得到的前向参考图像,或者,是从双向预测参考图像列表中确定得到的前向参考图像和后向参考图像。Optionally, the reference image may be a forward reference image determined from a list of forward-predicted reference images, or a forward reference image and a backward reference image determined from a list of bidirectional-predicted reference images.

本申请实施例中,当前块的参考图像保存有自身进行预测时的运动信息,该运动信息为该参考图像上的某个块进行预测时所参考到的参考图像的运动信息。其中,该运动信息可以包括运动矢量。In this embodiment, the reference image of the current block stores its own motion information during prediction. This motion information is the motion information of the reference image referenced when a certain block on the reference image is predicted. This motion information may include motion vectors.

在一些实施例中,编码器从当前图像中确定基准点,并获取基准点的基准点坐标以及基准点运动矢量,用于与参考图像的运动信息共同确定当前块的仿射模型。In some embodiments, the encoder determines a reference point from the current image and obtains the reference point coordinates and the reference point motion vector, which are used together with the motion information of the reference image to determine the affine model of the current block.

关于仿射模型的表现形式,在一种可能的设计中,仿射模型可以采用至少两个控制点表示,比如仿射模型可以采用6参数模型(CPMV0,CPMV1,CPMV2)来表示,或采用4参数模型(CPMV0,CPMV1)来表示。其中,CPMVn表示第n个控制点的运动矢量,即可以采用3个或2个控制点的运动矢量表示仿射模型。Regarding the representation of the affine model, in one possible design, the affine model can be represented using at least two control points. For example, the affine model can be represented using 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; that is, the affine model can be represented using the motion vectors of 3 or 2 control points.

在另一种可能的设计中,仿射模型可以采用{基准点信息+a,b,c,d}的表示形式。其中,基准点信息包括基准点的基准点坐标以及基准点运动矢量,abcd为基于参考图像的运动信息确定得到的运动矢量随坐标变化的变化率。In another possible design, the affine model can be represented as {reference point information + a, b, c, d}. Here, the reference point information includes the reference point coordinates and the reference point motion vector, and abcd represents the rate of change of the motion vector as a function of the coordinates, determined based on the motion information from the reference image.

在其他可能的设计中,仿射模型可以采用上述两种表现方式的混合形式。In other possible designs, the affine model can take the form of a combination of the two representations mentioned above.

步骤1202,基于当前块的仿射模型得到多个运动矢量。Step 1202: Obtain multiple motion vectors based on the affine model of the current block.

在一种可能的实施方式中,编码器构建得到多个候选仿射模型(包括基于参考图像构建的仿射模型,以及基于当前图像构建的仿射模型)。对于各个候选仿射模型,编码器利用仿射模型得到多个运动矢量。In one possible implementation, the encoder constructs multiple candidate affine models (including an affine model constructed based on a reference image and an affine model constructed based on the current image). For each candidate affine model, the encoder uses the affine model to obtain multiple motion vectors.

可选的,当前块的多个运动矢量可以是当前块中不同子块的运动矢量,或者,是当前块中多个坐标位置的运动矢量。Optionally, the multiple motion vectors of the current block can be motion vectors of different sub-blocks in the current block, or motion vectors of multiple coordinate positions in the current block.

比如,当当前块被划分为4×4的子块时,编码器可以利用仿射模型确定16个子块各自的运动矢量。或者,编码器可以利用仿射模型确定出当前块中每一个坐标位置处样本的运动矢量。For example, when the current block is divided into 4×4 sub-blocks, the encoder can use an affine model to determine the motion vectors of each of the 16 sub-blocks. Alternatively, the encoder can use an affine model to determine the motion vector of the sample at each coordinate position in the current block.

步骤1203,基于多个运动矢量对当前块进行预测。Step 1203: Predict the current block based on multiple motion vectors.

在一种可能的实施方式中,编码器基于当前块中子块的运动矢量,从参考图像中确定子块对应的参考子块,从而基于参考子块的重建值确定子块的预测值。In one possible implementation, the encoder determines a reference sub-block from a reference image based on the motion vector of the sub-block in the current block, and then determines the predicted value of the sub-block based on the reconstructed value of the reference sub-block.

在另一种可能的实施方式中,编码器基于当前块中当前坐标位置的运动矢量,从参考图像中确定当前坐标位置对应的参考坐标位置,从而基于参考坐标位置的重建值确定当前坐标位置的预测值。In another possible implementation, the encoder determines the reference coordinate position corresponding to the current coordinate position from the reference image based on the motion vector of the current coordinate position in the current block, and then determines the predicted value of the current coordinate position based on the reconstructed value of the reference coordinate position.

可选的,编码器基于当前子块的位置(或当前坐标位置)以及运动矢量,从参考图像中确定当前子块(会当前坐标位置)对应的参考子块(参考坐标位置),并将参考子块的重建子块(或参考坐标位置的重建值)确定为当前子块(或参考坐标位置)的预测子块(或样本预测值)。Optionally, the encoder determines the reference sub-block (reference coordinate position) corresponding to the current sub-block (current coordinate position) from the reference image based on the position (or current coordinate position) of the current sub-block and the motion vector, and determines the reconstructed sub-block (or reconstructed value of the reference coordinate position) of the reference sub-block as the predicted sub-block (or sample predicted value) of the current sub-block (or reference coordinate position).

综上所述,本申请实施例中,由于当前图像的参考图像中可能存在与当前块具有相同或相近的运动信息,因此基于参考图像的运动信息以及基准点确定当前块的仿射模型,能够为编解码器提供更多可用的仿射模型,进而使编码器能够确定出更加适用于当前块的仿射模型并利用该仿射模型对当前块进行预测,有助于提高图像编解码的质量以及效率。In summary, in the embodiments of this application, since the reference image of the current image may contain 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 image and the reference point. This can provide the codec with more usable affine models, thereby enabling the encoder to 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 encoding and decoding.

在一种可能的实施方式中,仿射模式下,编码端会构建包含多个候选仿射模型的候选列表,并从中确定出一个适用于当前块的仿射模型,并进一步基于该仿射模型进行图像预测编码。如图13所示,该方法还可以包括如下步骤:In one possible implementation, in affine mode, the encoder constructs a candidate list containing multiple candidate affine models, determines an affine model suitable for the current block, and further performs image prediction coding based on this affine model. As shown in Figure 13, the method may also include the following steps:

步骤1204,将当前块的仿射模型添加至候选列表。Step 1204: Add the affine model of the current block to the candidate list.

在一些实施例中,该候选列表为子块合并候选列表(subblock merge candidate list),其中包含多个候选仿射模型。本实施例中,该候选列表中包括基于当前图像中当前块的相邻块的运动矢量构建的仿射模型,以及基于参考图像的运动信息以及基准点构建的仿射模型。In some embodiments, the candidate list is a subblock merge candidate list, which contains multiple candidate affine models. In this embodiment, the candidate list includes affine models constructed based on the motion vectors of neighboring blocks of the current block in the current image, and affine models constructed based on motion information and reference points of a reference image.

需要说明的是,编解码端使用相同的方法构建候选列表,以保证编解码端最终采用的仿射模型的一致性。It should be noted that the encoding and decoding ends use the same method to construct the candidate list to ensure the consistency of the affine model ultimately adopted by the encoding and decoding ends.

其中,候选列表中各个仿射模型均具有各自的仿射模型索引。Each affine model in the candidate list has its own affine model index.

步骤1205,基于候选列表中各个仿射模型对当前块的预测结果,确定各个仿射模型对应的编码代价。Step 1205: Based on the prediction results of each affine model in the candidate list for the current block, determine the encoding cost corresponding to each affine model.

编码器利用候选列表中的各个仿射模型,对当前块进行预测,得到采用不同仿射模型时当前块的预测 块。编码器基于当前块的预测块与当前块的原始块,确定采用该仿射模型时的编码代价。The encoder uses the various affine models in the candidate list to predict the current block, obtaining predictions for the current block using different affine models. Block. The encoder determines the encoding cost when using this affine model based on the predicted block of the current block and the original block of the current block.

在一些实施例中,编码器确定预测块与原始块之间的残差,并对残差进行量化编码,从而基于量化编码结果确定编码代价。其中,该编码代价可以采用率(Rate)、失真(Distortion)或者复杂度(Complexity)表征。In some embodiments, the encoder determines the residual between the predicted block and the original block, and quantizes and encodes the residual to determine the encoding cost based on the quantization and encoding result. This encoding cost can be characterized by rate, distortion, or complexity.

步骤1206,基于各个仿射模型对应的编码代价,确定仿射模型索引。Step 1206: Determine the affine model index based on the encoding cost corresponding to each affine model.

在一些实施例中,编码器确定候选列表中各个仿射模型各自对应的编码代价,确定最适合用于对当前块进行预测的仿射模型,并获取到仿射模型的仿射模型索引。In some embodiments, the encoder determines the encoding cost corresponding to each affine model in the candidate list, determines the most suitable affine model for predicting the current block, and obtains the affine model index of the affine model.

可选的,编码器确定编码代价最小的仿射模型对应的仿射模型索引。Optionally, the encoder determines the affine model index corresponding to the affine model with the lowest encoding cost.

步骤1207,将仿射模型索引编码至码流。Step 1207: Encode the affine model index into the bitstream.

为了指示解码端采用与编码端一致仿射模型对当前块进行预测,编码器将仿射模型在候选列表中的仿射模型索引编码至码流。In order to instruct the decoder to use the same affine model as the encoder to predict the current block, the encoder encodes the affine model index in the candidate list into the bitstream.

需要说明的是,除了编码仿射模型索引外,编码端将采用该仿射模型进行预测并确定得到的残差量化编码至码流中。It should be noted that, in addition to encoding the affine model index, the encoding end will use the affine model to predict and determine the residual quantization encoding into the bitstream.

与解码端类似的,编码器构建的仿射模型可以包括基准点的基准点坐标、基准点运动矢量、第一参数、第二参数、第三参数以及第四参数;或者,编码器构建的仿射模型可以包括基准点的基准点运动矢量、第一参数、第二参数、第三参数以及第四参数;或者,仿射模型包括至少两个控制点的控制点运动矢量。其中,仿射模型的具体表现形式可以参考解码器的实施例,本实施例在此不作赘述。Similar to the decoder, the affine model constructed by the encoder may include the reference point coordinates, reference point motion vector, first parameter, second parameter, third parameter, and fourth parameter; or, the affine model constructed by the encoder may include the reference point motion vector, first parameter, second parameter, third parameter, and fourth parameter; or, the affine model may include the control point motion vectors of at least two control points. The specific representation of the affine model can be found in the decoder's embodiment, which will not be elaborated upon here.

请参考图14,其示出了本申请一个示例性实施例提供的仿射模型确定过程的流程图。该方法应用于编码器,该方法可以包括如下步骤:Please refer to Figure 14, which shows a flowchart of an affine model determination process provided in an exemplary embodiment of this application. The method is applied to an encoder and may include the following steps:

步骤1401,基于当前块的参考图像的运动矢量,确定第一参数、第二参数、第三参数以及第四参数。Step 1401: Determine 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.

参考图像的选取Selection of reference image

不同于基于当前图像中当前图像中当前块的相邻块,确定当前块对应的第一参数、第二参数、第三参数以及第四参数(表征运动矢量随坐标变化的变化率,后续简称为变化率参数),由于当前图像中当前块和相邻块遵循的运动可能存在较大差异,而参考图像中可能存在与当前块遵循相同或相近运动的部分,因此本实施例中,编码器基于当前块的参考图像确定上述变化率参数。Unlike determining the first, second, third, and fourth parameters (characterizing the rate of change of the motion vector with coordinates, hereinafter referred to as the rate of change parameters) 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 its neighboring blocks in the current image may be significantly different, while there may be parts in the reference image that follow the same or similar motion as the current block, in this embodiment, the encoder determines the above-mentioned rate of change parameters based on the reference image of the current block.

由于在确定上述参数过程中,需要应用到参考图像的运动信息,因此在一些实施例中,编码器确定当前块的同位参考图像(collocated picture),从而基于同位参考图像的运动矢量,确定变化率参数。Since motion information from a reference image is required in determining the above parameters, in some embodiments, the encoder determines a collocated picture of the current block, and then determines the rate of change parameter based on the motion vector of the collocated picture.

其中,同位参考图像属于当前图像的参考图像,且同位参考图像具有进行预测时的运动矢量(同位参考图像在当前图像之前完成重建),即同位参考图像相对于同位参考图像的参考图像的运动矢量。Among them, the co-position reference image is the reference image of the current image, and the co-position reference image has the motion vector when making prediction (the co-position reference image is reconstructed before the current image), that is, the motion vector of the co-position reference image relative to the reference image of the co-position reference image.

在一些实施例中,编码器确定当前块的同位参考图像。其中,同位参考图像的数量为至少一个。In some embodiments, the encoder determines a co-location reference image for the current block. The number of co-location reference images is at least one.

在一些实施例中,在存在多个同位参考图像的情况下,编码器确定当前块的至少一个仿射模型,其中,不同仿射模型基于不同同位参考图像确定得到。In some embodiments, when multiple co-reference images exist, the encoder determines at least one affine model for the current block, wherein different affine models are determined based on different co-reference images.

可选的,编码器对多个同位参考图像中的每个同位参考图像应用本方案,以确定每个同位参考图像对应的仿射模式,或者,编码器对多个同位参考图像中的部分同位参考图像应用本方案,以确定部分同位参考图像对应的仿射模式。Optionally, the encoder applies this scheme to each of the multiple co-position reference images to determine the affine mode corresponding to each co-position reference image; or, the encoder applies this scheme to some of the multiple co-position reference images to determine the affine mode corresponding to some of the co-position reference images.

为了方便表述,下述实施例中,以单个同位参考图像为例进行说明。For ease of explanation, the following embodiments use a single co-position reference image as an example.

此外,确定出同位参考图像后,编码器将同位参考图像的图像索引编码至码流,以指示解码端基于与编码端一致的同位参考图像确定仿射模型。其中,该图像索引编码用于表征同位参考图像在参考图像列表中的位置。Furthermore, after identifying the corresponding reference image, the encoder encodes the image index of the corresponding reference image into the bitstream to instruct the decoder to determine the affine model based on the corresponding reference image consistent with the encoder. This image index encoding is used to characterize the position of the corresponding reference image in the reference image list.

虚拟控制点位置的说明Explanation of virtual control point locations

在基于当前图像确定变化率参数时,需要确定至少两个控制点,本实施例中,在基于同位参考图像确定变化率时,同样需要确定当前块的同位参考图像中的至少两个点。其中,同位参考图像中的至少两个点可以被称为虚拟控制点(Virtual Control Point,VCP)。下述实施例中为了方便表示,采用虚拟控制点指代同位参考图像中的至少两个点。When determining the rate of change parameter based on the current image, at least two control points need to be determined. In this embodiment, when determining the rate of change based on a co-located reference image, it is also necessary to determine at least two points in the co-located reference image of the current block. These at least two points in the co-located reference image can be referred to as virtual control points (VCPs). For ease of representation in the following embodiments, virtual control points are used to refer to at least two points in the co-located reference image.

确定出同位参考图像中的至少两个点后,编码器基于同位参考图像中的至少两个点的运动矢量,确定第一参数、第二参数、第三参数以及第四参数。After identifying at least two points in the co-located reference image, the encoder determines the first parameter, the second parameter, the third parameter, and the fourth parameter based on the motion vectors of the at least two points in the co-located reference image.

在一种可能的实施方式中,编码器以组为单位确定同位参考图像中的虚拟控制点,其中,每个虚拟控制点组包含2个或3个虚拟控制点。In one possible implementation, the encoder determines virtual control points in the co-location reference image in groups, wherein each group of virtual control points contains two or three virtual control points.

针对每一个虚拟控制点组,编码器基于该虚拟控制点组中虚拟控制点的运动矢量,确定一组变化率参数。其中,针对不同虚拟控制点组计算得到的变化率参数可能不同,因此基于不同的虚拟控制点组,编码器后续可以确定当前块的多个仿射模型。For each virtual control point group, the encoder determines a set of rate of change parameters based on the motion vectors of the virtual control points in that group. The rate of change parameters calculated for different virtual control point groups may differ; therefore, based on different virtual control point groups, the encoder can subsequently determine multiple affine models for the current block.

可选的,在虚拟控制点组包含2个虚拟控制点时,2个虚拟控制点位于所形成矩形的左上角和右上角; 在虚拟控制点组包含3个虚拟控制点时,3个虚拟控制点分别位于所形成矩形的左上角、右上角和左下角。Optionally, when the virtual control point group contains two virtual control points, the two virtual control points are located at the upper left and upper right corners of the formed rectangle; When a virtual control point group contains 3 virtual control points, the 3 virtual control points are located at the upper left, upper right, and lower left corners of the rectangle formed, respectively.

可选的,该虚拟控制点构成的矩形(可以被称为虚拟块)与当前块的尺寸相同,或者不同;该虚拟控制点构成的矩形在同位参考图像中的位置与当前块在当前图像中的位置相同,或者不同。Optionally, the rectangle formed by the virtual control points (which may be called a virtual block) may have the same or different size as the current block; the position of the rectangle formed by the virtual control points in the co-located reference image may have the same or different position as the current block in the current image.

在一些实施例中,该虚拟控制点组中的虚拟控制点可以位于同位参考图像中同位块的各个方向,比如上方、下方、左侧或右侧。In some embodiments, the virtual control points in the virtual control point group can be located in various directions of the co-position block in the co-position reference image, such as above, below, left, or right.

由于基于当前图像的运动信息构建仿射模型时,可以从当前块的左侧和上方的相邻块获取运动信息,而无法从当前块的右侧和下方获取运动信息(由于右侧和下方的块还未编解码),因此在一种可能的实施方式中,在确定出的n个点组中,存在至少一个点组满足如下条件:点组包含的点位于当前块的右下方区域。Since when constructing an affine model based on the motion information of the current image, motion information can be obtained from the adjacent blocks to the left and above the current block, but not from the right and below the current block (because the blocks to the right and below have not yet been encoded or decoded), in one possible implementation, among the determined n point groups, there exists at least one point group that satisfies the following condition: the points contained in the point group are located in the lower right region of the current block.

由于基于满足上述条件点组确定变化率参数时,能够利用到参考图像中同位块右侧以及下方区域的运动信息(这是基于当前图像构建仿射模型所发参考到的信息),因此基于该点组确定得到的仿射模型,能够作为对基于当前图像构建的仿射模型的有力补充。Since the motion information of the region to the right and below the co-position block in the reference image can be used when determining the rate of change parameter based on the point set that meets the above conditions (this is the reference information used when constructing the affine model based on the current image), the affine model determined based on this point set can serve as a powerful supplement to the affine model constructed based on the current image.

在一个示意性的例子中,如图6所示,当前图像中当前块在同位参考图像61对应同位块62,且其它位置表示合并(merge)模式下合并使用的运动矢量。以确定虚拟控制点组包含3个虚拟控制点为例,编码器可以选取编号为{9,8,7}、{15,13,14}、{6(同位块中间位置),17,18}的虚拟控制点构成虚拟控制点组。其中,虚拟控制点组{9,8,7}和{15,13,14}中的虚拟控制点位于同位块的左上方,虚拟控制点组{6(同位块中间位置),17,18}中的虚拟控制点位于同位块的右下方。In an illustrative example, as shown in Figure 6, the current block in the current image corresponds to the corresponding block 62 in the corresponding reference image 61, and other positions represent motion vectors used for merging in merge mode. Taking the determination that the virtual control point group contains 3 virtual control points as an example, the encoder can select virtual control points numbered {9, 8, 7}, {15, 13, 14}, {6 (middle position of the corresponding block), 17, 18} to form a 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 of the corresponding block, and the virtual control points in the virtual control point groups {6 (middle position of the corresponding block), 17, 18} are located at the lower right of the corresponding block.

虚拟控制点可用性的说明Description of virtual control point availability

为了确保能够基于虚拟控制点确定出变化率参数(避免确定出的变化率参数为0),同位参考图像中的至少两个点位于至少两个具有预定尺寸的区域。To ensure that the rate of change parameter can be determined based on the virtual control points (avoiding the determined rate of change parameter being 0), at least two points in the co-located reference image are located in at least two regions of predetermined size.

其中,在确定出两个虚拟控制点时,两个虚拟控制点分别位于两个具有预定尺寸的区域。When two virtual control points are determined, each virtual control point is located in a region of a predetermined size.

在确定出三个虚拟控制点时,三个虚拟控制点分别位于三个具有预定尺寸的区域,或者,三个虚拟控制点中两个虚拟控制点位于同一具有预定尺寸的区域,另一个虚拟控制点位于另一个具有预定尺寸的区域。When three virtual control points are determined, the three virtual control points are located in three regions with predetermined dimensions, or two of the three virtual control points are located in the same region with predetermined dimensions, and the other virtual control point is located in another region with predetermined dimensions.

在一些实施例中,该具有预定尺寸的区域可以是运动信息最小存储单元。其中,同一运动信息最小存储单元内的坐标位置具有相同运动信息。In some embodiments, the region with a predetermined size can be a minimum storage unit for motion information. The coordinate positions within the same minimum storage unit for motion information contain the same motion information.

比如,该最小存储单元为8×8,表示每个8×8的块存储一组运动信息,即8×8块中各个坐标位置具有相同的运动信息。当然,最小存储单元可以采用更大或更小的尺寸,比如16×16(实现代价更低,运动矢量准确性低)、4×4(实现代价更高,运动矢量准确性高)、甚至1×1,本实施例对此不作限定。For example, the smallest storage unit is 8×8, meaning that each 8×8 block stores a set of motion information, that is, each coordinate position in the 8×8 block has the same motion information. Of course, the smallest storage unit can use a larger or smaller size, such as 16×16 (lower implementation cost, lower motion vector accuracy), 4×4 (higher implementation cost, higher motion vector accuracy), or even 1×1. This embodiment does not limit this.

在一种可能的实施方式中,编码器基于虚拟控制点组中虚拟控制点的坐标以及运动信息最小存储单元的尺寸,确定虚拟控制点是否位于同一运动信息最小存储单元中。In one possible implementation, the encoder determines whether a virtual control point is 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.

若虚拟控制点组中的虚拟控制点位于至少两个运动信息最小存储单元内,则确定该虚拟控制点组可用,从而基于该虚拟控制点组确定变化率参数;若虚拟控制点组中的虚拟控制点位于同一运动信息最小存储单元内,则确定该虚拟控制点组不可用,进而不会基于该虚拟控制点组确定变化率参数。If the virtual control points in a virtual control point group are located in at least two motion information minimum storage units, then the virtual control point group is determined to be available, and the rate of change parameter is determined based on the virtual control point group; if the virtual control points in a virtual control point group are located in the same motion information minimum storage unit, then the virtual control point group is determined to be unavailable, and the rate of change parameter will not be determined based on the virtual control point group.

示意性的,在运动信息最小存储单元为4×4,且A点坐标为(x1,y1),B点坐标为(x2,y2)的情况下,若floor(x1/4)=floor(x2/4),且floor(y1/4)=floor(y2/4),则确定这两个点的位于同一运动信息最小存储单元;若floor(x1/4)≠floor(x2/4),和/或,floor(y1/4)≠floor(y2/4),则确定这两个点的位于不同运动信息最小存储单元。To illustrate, given that the minimum storage unit for motion information is 4×4, 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), then the two points are located in the same minimum storage unit for motion information; if floor(x1/4) ≠ floor(x2/4), and/or floor(y1/4) ≠ floor(y2/4), then the two points are located in different minimum storage units for motion information.

步骤1402,确定基准点的基准点坐标以及基准点运动矢量。Step 1402: Determine the reference point coordinates and the reference point motion vector.

其中,当前块的基准点可以位于当前块之内,或者,位于当前块之外。The reference point of the current block can be located inside the current block or outside the current block.

在一些实施例中,在基准点位于当前块之内的情况下,基准点为当前块的左上角顶点、右上角或左下角顶点。In some embodiments, when the reference point is located within the current block, the reference point is the top-left, top-right, or bottom-left vertex of the current block.

其中,在当前块的高度为H,且宽度为W的情况下,若基准点的当前块的左上角顶点,则基准点坐标为(0,0);若基准点的当前块的右上角顶点,则基准点坐标为(W,0);若基准点的当前块的左下角顶点,则基准点坐标为(0,H)。Specifically, if the height of the current block is H and the width is W, then if the reference point is the top left corner of the current block, the coordinates of the reference point are (0, 0); if the reference point is the top right corner of the current block, the coordinates of the reference point are (W, 0); if the reference point is the bottom left corner of the current block, the coordinates of the reference point are (0, H).

关于基准点的基准点运动矢量的确定方式,在一种可能的实施方式中,在当前块的相邻块支持仿射模式的情况下,编码器基于相邻块的仿射模型,确定基准点的基准点运动矢量。Regarding the method for determining the reference point motion vector, in one possible implementation, if the adjacent blocks of the current block support affine mode, the encoder determines the reference point motion vector based on the affine model of the adjacent blocks.

可选的,在当前块支持合并模式,且相邻块支持仿射模式的情况下,编码器基于当前块中基准点相对于相邻块的坐标,将该坐标代入相邻块的仿射模型,得到基准点的基准运动矢量。Optionally, if the current block supports the merging mode and the adjacent blocks support the affine mode, the encoder substitutes the coordinates of the reference point in the current block relative to the adjacent blocks into the affine model of the adjacent blocks to obtain the reference motion vector of the reference point.

示意性的,如图7所示,当前块的相邻块包括A0、A1,B0,B1,B2。编码器可以基于相邻块B2的仿射模型,确定左上角基准点的基准点运动矢量;或,基于相邻块B0或B1的仿射模型,确定右上角基准点的基准点运动矢量;或,基于相邻块A0或A1的仿射模型,确定左下角基准点的基准点运动矢量。 As illustrated in Figure 7, the adjacent blocks of the current block include A0, A1, B0, B1, and B2. The encoder can determine the reference point motion vector of the upper left reference point based on the affine model of the adjacent block B2; or, based on the affine model of the adjacent blocks B0 or B1, determine the reference point motion vector of the upper right reference point; or, based on the affine model of the adjacent blocks A0 or A1, determine the reference point motion vector of the lower left reference point.

在另一种可能的实施方式中,编码器可以基于当前块的相邻块中的可用运动矢量,确定基准点的基准点运动矢量。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 adjacent blocks of the current block.

可选的,编码器可以基于当前块的相邻块中的至少两个可用运动矢量,通过拟合的方式确定当前块中基准点的基准点运动矢量。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 adjacent blocks of the current block.

示意性的,如图8所示,当前块的相邻块包括A0、A1,A2、B0,B1,B2和B3。解码器可以基于相邻块B2、B3、A2中的可用的运动矢量确定左上角基准点的基准点运动矢量;基于相邻块B0、B1中的可用的运动矢量确定右上角基准点的基准点运动矢量;基于相邻块A0、A1中的可用的运动矢量确定左下角基准点的基准点运动矢量。As illustrated in Figure 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 upper 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 upper 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 lower left reference point based on the available motion vectors in the neighboring blocks A0 and A1.

在一些实施例中,编码器构建得到形如{(x,y),MV,a,b,c,d}的仿射模型,其中,(x,y)为基准点坐标,MV为基准点运动矢量,abcd分别为上述第一至第四参数。In some embodiments, the encoder constructs an affine model of the form {(x, y), MV, a, b, c, d}, where (x, y) are the coordinates of the reference point, MV is the motion vector of the reference point, and a, b, c, d are the first to fourth parameters mentioned above, respectively.

在一些实施例中,当基准点为固定基准点时,解码器仅需要确定基准点的基准点运动矢量,从而构建得到形如{MV,a,b,c,d}的仿射模型,其中,MV为基准点运动矢量,abcd分别为上述第一至第四参数,本实施例在此不作赘述。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 of the form {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 mentioned above, which will not be elaborated here in this embodiment.

本实施例中,编码器基于同位参考图像中的虚拟控制点组的运动矢量确定变化率参数时,从当前块的右下方区域中确定虚拟控制点组,使计算变化率参数时,能够利用到原先基于当前图像构建仿射模型时所无法参考到的右下方区域的运动信息,使采用本方案构建的仿射模型能够作为对已有仿射模型的有力补充。In this embodiment, when the encoder determines the rate of change parameter based on the motion vector of the virtual control point group in the co-located reference image, it determines the virtual control point group from the lower right region of the current block. This allows the calculation of the rate of change parameter to utilize the motion information of the lower right region, which was previously unavailable when constructing the affine model based on the current image. This enables the affine model constructed using this scheme to serve as a powerful supplement to existing affine models.

此外,编码器通过检测虚拟控制点是否位于至少两个运动信息最小存储单元(即具有预定尺寸的区域),确保后续基于虚拟控制点的运动矢量计算得到可用的变化率参数,有助于提高后续构建的仿射模型的质量。Furthermore, by detecting whether the virtual control point is located in at least two minimum motion information storage units (i.e., regions with a predetermined size), the encoder ensures that the subsequent motion vector calculation based on the virtual control point yields usable rate of change parameters, which helps improve the quality of the subsequently constructed affine model.

上述实施例中,利用包含基准点坐标、基准点运动矢量、第一参数、第二参数、第三参数以及第四参数额仿射模型,确定多个运动矢量的过程可以包括:In the above embodiments, the process of determining multiple motion vectors using an affine model that includes reference point coordinates, reference point motion vectors, a first parameter, a second parameter, a third parameter, and a fourth parameter may include:

步骤1、基于当前块的仿射模型确定仿射关系,仿射关系用于表征坐标位置与坐标位置处运动矢量的对应关系。Step 1: Determine the affine relation based on the affine model of the current block. The affine relation is used to characterize the correspondence between the coordinate position and the motion vector at the coordinate position.

在一些实施例中,该仿射关系可以表示为:
In some embodiments, the affine relation can be expressed as:

其中,(xbase,ybase)为基准点坐标,分别为基准点运动矢量的水平分量和竖直分量,abcd分别为第一至第四参数。Where (x base , y base ) are the coordinates of the reference point. and These are the horizontal and vertical components of the motion vector of the reference point, respectively, and abcd are the first to fourth parameters, respectively.

确定出仿射关系后,编码器将坐标代入仿射关系后,即可得到该坐标位置处的运动矢量。Once the affine relationship is determined, the encoder substitutes the coordinates into the affine relationship to obtain the motion vector at that coordinate position.

步骤2、基于仿射关系,确定当前块中多个子块的运动矢量,或者,确定当前块中多个坐标位置的运动矢量。Step 2: Based on affine relations, 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.

在一些实施例中,若当前块被划分为若干子块,对于子块中的每个坐标位置,编码器基于仿射关系确定各个坐标位置处的运动矢量,并将同一子块中各个坐标位置处运动矢量的平均值,确定为该子块的运动矢量。In some embodiments, if the current block is divided into several sub-blocks, for each coordinate position in the sub-block, the encoder determines the motion vector at each coordinate position based on the affine relation, and determines the average value of the motion vectors at each coordinate position in the same sub-block as the motion vector of that sub-block.

在一些实施例中,在不进行子块划分的情况下,对于当前块中的任一坐标位置,编码器同样可以基于仿射关系确定各个坐标位置处的运动矢量。In some embodiments, without sub-block division, the encoder can also determine the motion vector at each coordinate position based on affine relation for any coordinate position in the current block.

在一种可能的实施方式中,不同表现形式的仿射模型之间能够相互转换。当仿射模型需要采用至少两个控制点表示时,通过上述步骤确定出当前块的变化率参数以及基准点后,编码器可以基于第一参数、第二参数、第三参数、第四参数以及基准点信息,确定至少两个控制点的控制点运动矢量,从而基于至少两个控制点的控制点运动矢量,确定当前块的仿射模型。In one possible implementation, affine models with different representations can be converted to each other. When the affine model needs to be represented by at least two control points, after determining the rate of change parameter and reference point of the current block through the above steps, the encoder can determine the control point motion vectors of at least two control points based on the first parameter, second parameter, third parameter, fourth parameter and reference point information, and thus determine the affine model of the current block based on the control point motion vectors of at least two control points.

可选的,该至少两个控制点为符合仿射模型的表现形式要求的控制点。比如,当采用4参数仿射模型时,至少两个控制点包括当前块的左上角顶点以及右上角顶点;当采用6参数仿射模型时,至少两个控制点包括当前块的左上角顶点、右上角顶点以及左下角顶点。Optionally, the at least two control points must conform to the representation requirements of the affine model. For example, when using a 4-parameter affine model, the at least two control points include the top-left and top-right vertices of the current block; when using a 6-parameter affine model, the at least two control points include the top-left, top-right, and bottom-left vertices of the current block.

在一种可能的实施方式中,编码器基于第一参数、第二参数、第三参数、第四参数以及基准点,确定仿射关系,仿射关系用于表征坐标位置与坐标位置处运动矢量的对应关系。In one possible implementation, the encoder determines an affine relation based on a first parameter, a second parameter, a third parameter, a fourth parameter, and a reference point. The affine relation is used to characterize the correspondence between the coordinate position and the motion vector at the coordinate position.

在一些实施例中,该仿射关系可以表示为:
In some embodiments, the affine relation can be expressed as:

其中,(xbase,ybase)为基准点的坐标,分别为基准点的运动矢量的水平分量和竖直分量,abcd分别为第一至第四参数。 Where (x base , y base ) are the coordinates of the reference point. and , respectively, are the horizontal and vertical components of the motion vector of the reference point, and abcd are the first to fourth parameters, respectively.

确定出仿射关系后,编码器基于仿射关系以及至少两个控制点的控制点坐标,确定至少两个控制点的控制点运动矢量,即将控制点的坐标代入仿射关系后,即可得到该控制点的控制点运动矢量。After determining the affine relation, the encoder determines the control point motion vector of at least two control points based on the affine relation and the control point coordinates of at least two control points. That is, by substituting the coordinates of the control points into the affine relation, the control point motion vector of that control point can be obtained.

示意性的,在当前块的高度为H,宽度为W时,编码器将当前块中左上角控制点的控制点坐标(0,0)代入上述仿射关系,得到左上角控制点的控制点运动矢量CPMV0;将右上角控制点的控制点坐标(W,0)代入上述仿射关系,得到右上角控制点的控制点运动矢量CPMV1;将左下角控制点的控制点坐标(0,H)代入上述仿射关系,得到左下角控制点的控制点运动矢量CPMV2。Schematic, when the height of the current block is H and the width is W, the encoder substitutes the control point coordinates (0, 0) of the upper left control point in the current block into the above affine relation to obtain the control point motion vector CPMV0 of the upper left control point; substitutes the control point coordinates (W, 0) of the upper right control point into the above affine relation to obtain the control point motion vector CPMV1 of the upper right control point; substitutes the control point coordinates (0, H) of the lower left control point into the above affine relation to obtain the control point motion vector CPMV2 of the lower left control point.

在一些实施例中,在采用4参数仿射模型的情况下,编码器构建得到形如{CPMV0,CPMV1}的仿射模型;在采用6参数仿射模型的情况下,编码器构建得到形如{CPMV0,CPMV1,CPMV2}的仿射模型。In some embodiments, when a 4-parameter affine model is used, the encoder constructs an affine model of the form {CPMV0, CPMV1}; when a 6-parameter affine model is used, the encoder constructs an affine model of the form {CPMV0, CPMV1, CPMV2}.

相应的,利用基于至少两个控制点的控制点运动矢量构建得到仿射模型,确定多个运动矢量时,编码器基于当前块的仿射模型中的控制点运动矢量,确定第一参数、第二参数、第三参数以及第四参数,并基于第一参数、第二参数、第三参数以及第四参数,确定仿射关系(用于表征坐标位置与坐标位置处运动矢量的对应关系),从而基于仿射关系,确定当前块中多个子块的运动矢量,或者,确定当前块中多个坐标位置的运动矢量。Accordingly, an affine model is constructed using the motion vectors of control points based on at least two control points. When multiple motion vectors are determined, the encoder determines the first, second, third, and fourth parameters based on the motion vectors of the control points in the affine model of the current block. Based on the first, second, third, and fourth parameters, an affine relationship (used to characterize the correspondence between coordinate positions and motion vectors at coordinate positions) is determined. Thus, based on the affine relationship, the motion vectors of multiple sub-blocks in the current block are determined, or the motion vectors of multiple coordinate positions in the current block are determined.

由于在构建仿射模型过程中,已经确定过变化率参数,因此在一种可能的实施方式中,编码器直接使用之前确定的变化率参数。Since the rate of change parameter has been determined during the construction of the affine model, in one possible implementation, the encoder directly uses the previously determined rate of change parameter.

并且,由于4参数或6参数仿射模型中包含当前块左上角控制点的控制点运动矢量,因此编码器可以基于第一参数、第二参数、第三参数、第四参数以及左上角控制点的控制点运动矢量,确定仿射关系。Furthermore, since the 4-parameter or 6-parameter affine model contains the control point motion vector of the upper left corner control point of the current block, 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 upper left corner control point.

在一些实施例中,确定出的仿射关系如下:
In some embodiments, the determined affine relations are as follows:

其中,为左上角控制点的运动矢量在水平以及竖直方向的分量。in, and The components of the motion vector of the upper left control point in the horizontal and vertical directions.

确定参考图像中的虚拟控制点可以采用如下方式中的至少一种:Virtual control points in a reference image can be determined using at least one of the following methods:

方式1、基于当前图像中当前块的顶点坐标,确定同位参考图像中的至少两个点(虚拟控制点)。Method 1: Based on the vertex coordinates of the current block in the current image, determine at least two points (virtual control points) in the corresponding reference image.

该方式下,虚拟控制点所形成的虚拟块与当前块的位置相同,且尺寸相同。In this method, the virtual block formed by the virtual control point is in the same position and has the same size as the current block.

方式2、基于当前图像中当前块的顶点坐标以及第一偏移量,确定同位参考图像中的至少两个点(虚拟控制点)。其中,第一偏移量是相对于当前块中指定顶点的坐标偏移量。Method 2: Based on the vertex coordinates of the current block in the current image and the first offset, determine at least two points (virtual control points) in the coordinate reference image. The first offset is the coordinate offset relative to a specified vertex in the current block.

方式3、基于当前图像中当前块的顶点坐标以及第二偏移量,确定同位参考图像中的至少两个点(虚拟控制点)。Method 3: Based on the vertex coordinates of the current block in the current image and the second offset, determine at least two points (virtual control points) in the co-located reference image.

方式4、基于当前图像中当前块的顶点坐标、第一偏移量以及第二偏移量,确定同位参考图像中的至少两个点(虚拟控制点)。Method 4: Based on the vertex coordinates, first offset, and second offset of the current block in the current image, determine at least two points (virtual control points) in the co-located reference image.

在一种可能的实施方式中,编码器确定当前块的相邻块的运动矢量,在相邻块的运动矢量指向当前块的同位参考图像的情况下,编码器基于相邻块的运动矢量确定第二偏移量。在确定出第二偏移量的情况下,编码器采用上述方式3或4确定同位参考图像中的虚拟控制点;在未确定出第二偏移量的情况下,编码器采用上述方式1或2确定同位参考图像中的虚拟控制点。In one possible implementation, the encoder determines the motion vectors of neighboring blocks of the current block. If the motion vectors of the neighboring blocks point to the co-location reference image of the current block, the encoder determines a second offset based on the motion vectors of the neighboring blocks. If the second offset is determined, the encoder uses method 3 or 4 described above to determine the virtual control point in the co-location reference image; if the second offset is not determined, the encoder uses method 1 or 2 described above to determine the virtual control point in the co-location reference image.

上述确定虚拟控制点的具体方式可以参考解码侧实施例,本实施例在此不作赘述。The specific method for determining the virtual control point described above can be found in the decoding side implementation example, which will not be repeated here.

变化率参数的确定过程The process of determining the rate of change parameter

在一种可能的实施方式中,编码器基于同位参考图像中至少两个点(虚拟控制点)的运动矢量,确定第五参数、第六参数、第七参数以及第八参数,从而对第五参数、第六参数、第七参数以及第八参数进行缩放,得到第一参数、第二参数、第三参数以及第四参数。In one possible implementation, the encoder determines the fifth, sixth, seventh, and eighth parameters based on the motion vectors of at least two points (virtual control points) in the co-located reference image, and then scales the fifth, sixth, seventh, and eighth parameters to obtain the first, second, third, and fourth parameters.

其中,第五至第八参数用于表征虚拟块(由虚拟控制点确定的块)中坐标位置的运动矢量随坐标变化的变化率。Among them, the fifth to eighth parameters are used to characterize the rate of change of the motion vector of the coordinate position in the virtual block (the block determined by the virtual control points) as the coordinates change.

关于缩放所采用缩放比例的确定方式,在一种可能的实施方式中,编码器确定当前图像与当前图像的参考图像之间的第一图像间隔,以及确定同位参考图像与同位参考图像的参考图像之间的第二图像间隔。基于第一图像间隔和第二图像间隔的比例,对第五参数、第六参数、第七参数以及第八参数进行缩放,得到第一参数、第二参数、第三参数以及第四参数。Regarding the method for determining the scaling ratio, in one possible implementation, the encoder determines a first image interval between the current image and a reference image of the current image, and a second image interval between two co-located reference images. Based on the ratio of the first image interval and the second image interval, the fifth, sixth, seventh, and eighth parameters are scaled to obtain the first, second, third, and fourth parameters.

其中,第一图像间隔用于表征当前图像与当前图像的参考图像的POC距离,第二图像间隔用于表征同位参考图像与同位参考图像的参考图像的POC距离。The first image interval is used to characterize the POC distance between the current image and its reference image, and the second image interval is used to characterize the POC distance between the co-located reference image and its reference image.

在一些实施例中,编码器基于第一图像间隔与第二图像间隔确定缩放比例。基于缩放比例对第五参数缩放,得到第一参数;基于缩放比例对第六参数缩放,得到第二参数;基于缩放比例对第七参数缩放,得到第三参数;基于缩放比例对第八参数缩放,得到第四参数。In some embodiments, the encoder determines a scaling ratio based on a first image interval and a second image interval. The scaling is applied to a fifth parameter based on the scaling ratio to obtain a first parameter; to a sixth parameter based on the scaling ratio to obtain a second parameter; to a seventh parameter based on the scaling ratio to obtain a third parameter; and to an eighth parameter based on the scaling ratio to obtain a fourth parameter.

示意性的,若col_pic和col_ref之间的POC距离是td,curr_pic和curr_ref之间的POC距离是tb,且基于同位参考图像中虚拟控制点的运动矢量,确定同位参考图像中虚拟块对应的变化率参数分别为a’、b’、 c’、d’,则当前图像中当前块对应的变化率参数a=a′*td/td,b=b′*tb/td,c=c′*tb/td,d=d′*tb/td。Schematic, if the POC distance between col_pic and col_ref is td, and the POC distance between curr_pic and curr_ref is tb, and based on the motion vectors of virtual control points in the co-located reference image, the rate of change parameters corresponding to the virtual blocks in the co-located reference image are determined to be a', b', ... Given c' and d', the rate of change parameters corresponding to the current block in the current image are a = a′*td/td, b = b′*tb/td, c = c′*tb/td, and d = d′*tb/td.

请参考图15,其示出了本申请一个示例性实施例提供的图像解码装置的结构框图。该图像解码装置包括:Please refer to Figure 15, which shows a structural block diagram of an image decoding apparatus provided in an exemplary embodiment of this application. The image decoding apparatus includes:

解码单元1501,用于基于当前块的参考图像的运动信息,以及基准点,确定所述当前块的仿射模型;Decoding unit 1501 is used to determine the affine model of the current block based on motion information of the reference image of the current block and reference points;

解码单元1501,用于基于所述当前块的仿射模型得到多个运动矢量;Decoding unit 1501 is used to obtain multiple motion vectors based on the affine model of the current block;

解码单元1501,用于基于所述多个运动矢量对所述当前块进行预测。Decoding unit 1501 is used to predict the current block based on the plurality of motion vectors.

可选的,所述当前块的仿射模型包括所述基准点的基准点坐标、基准点运动矢量、第一参数、第二参数、第三参数以及第四参数。Optionally, 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.

可选的,所述当前块的仿射模型包括所述基准点的基准点运动矢量、第一参数、第二参数、第三参数以及第四参数。Optionally, the affine model of the current block includes the reference point motion vector of the reference point, a first parameter, a second parameter, a third parameter, and a fourth parameter.

可选的,所述当前块的仿射模型包括至少两个控制点的控制点运动矢量。Optionally, the affine model of the current block includes control point motion vectors for at least two control points.

可选的,解码单元1501,用于:Optionally, the decoding unit 1501 is used for:

基于所述当前块的参考图像的运动矢量,确定所述第一参数、所述第二参数、所述第三参数以及所述第四参数;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.

可选的,解码单元1501,用于:Optionally, the decoding unit 1501 is used for:

基于所述当前块的参考图像的运动矢量,确定所述第一参数、所述第二参数、所述第三参数以及所述第四参数;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.

可选的,解码单元1501,用于:Optionally, the decoding unit 1501 is used for:

基于所述当前块的参考图像的运动矢量,确定所述第一参数、所述第二参数、所述第三参数以及所述第四参数;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.

可选的,解码单元1501,用于:Optionally, the decoding unit 1501 is used for:

确定所述当前块的同位参考图像中的至少两个点;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.

可选的,解码单元1501,用于:Optionally, the decoding unit 1501 is used for:

基于当前图像中所述当前块的顶点坐标,确定所述同位参考图像中的至少两个点;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.

可选的,解码单元1501,用于:Optionally, the decoding unit 1501 is used for:

确定所述当前块的相邻块的运动矢量;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.

可选的,所述同位参考图像中的至少两个点位于至少两个具有预定尺寸的区域。Optionally, at least two points in the co-position reference image are located in at least two regions of a predetermined size.

可选的,同一具有预定尺寸的区域内的坐标位置具有相同运动信息。Optionally, coordinate positions within the same region of a predetermined size have the same motion information.

可选的,所述同位参考图像包含n个点组,且每个点组包含2个或3个点,n为正整数。Optionally, the co-position reference image contains n point groups, and each point group contains 2 or 3 points, where n is a positive integer.

可选的,所述n个点组中存在至少一个点组满足如下条件:所述点组中的点位于所述当前块的右下方区域。Optionally, at least one of the n point groups satisfies the following condition: the points in the point group are located in the lower right region of the current block.

可选的,解码单元1501,用于:Optionally, the decoding unit 1501 is used for:

解析码流,确定所述当前块的所述同位参考图像。Parse the bitstream to determine the co-location reference image of the current block.

可选的,解码单元1501,用于:Optionally, the decoding unit 1501 is used for:

在存在多个同位参考图像的情况下,确定所述当前块的至少一个仿射模型,其中,不同仿射模型基于不同同位参考图像确定得到。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.

可选的,解码单元1501,用于: Optionally, the decoding unit 1501 is used for:

基于所述同位参考图像中的至少两个点的运动矢量,确定第五参数、第六参数、第七参数以及第八参数;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.

可选的,解码单元1501,用于:Optionally, the decoding unit 1501 is used for:

确定当前图像与所述当前图像的参考图像之间的第一图像间隔;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.

可选的,解码单元1501,用于:Optionally, the decoding unit 1501 is used for:

基于所述第一参数、所述第二参数、所述第三参数、所述第四参数以及所述基准点,确定仿射关系,所述仿射关系用于表征坐标位置与坐标位置处运动矢量的对应关系;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.

可选的,解码单元1501,用于:Optionally, the decoding unit 1501 is used for:

基于所述当前块的仿射模型确定仿射关系,所述仿射关系用于表征坐标位置与坐标位置处运动矢量的对应关系;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.

可选的,解码单元1501,用于:Optionally, the decoding unit 1501 is used for:

基于所述当前块的仿射模型,确定第一参数、第二参数、第三参数以及第四参数;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.

可选的,所述基准点位于所述当前块之内;Optionally, the reference point is located within the current block;

或者,or,

所述基准点位于所述当前块之外。The reference point is located outside the current block.

可选的,所述基准点为所述当前块的左上角顶点、右上角或左下角顶点。Optionally, the reference point is the top-left, top-right, or bottom-left vertex of the current block.

可选的,解码单元1501,用于:Optionally, the decoding unit 1501 is used for:

在所述当前块的相邻块支持仿射模式的情况下,基于所述相邻块的仿射模型,确定所述基准点的基准点运动矢量。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.

可选的,解码单元1501,用于:Optionally, the decoding unit 1501 is used for:

基于所述当前块中子块的运动矢量,从所述参考图像中确定所述子块对应的参考子块;基于所述参考子块的重建值确定所述子块的预测值;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.

可选的,解码单元1501,用于:Optionally, the decoding unit 1501 is used for:

将所述当前块的仿射模型添加至候选列表;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.

请参考图16,其示出了本申请一个示例性实施例提供的图像编码装置的结构框图。该图像编码装置包括:Please refer to Figure 16, which shows a structural block diagram of an image encoding apparatus provided in an exemplary embodiment of this application. The image encoding apparatus includes:

编码单元1601,用于基于当前块的参考图像的运动信息,以及基准点,确定所述当前块的仿射模型;The encoding unit 1601 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;

编码单元1601,用于基于所述当前块的仿射模型得到多个运动矢量;Encoding unit 1601 is used to obtain multiple motion vectors based on the affine model of the current block;

编码单元1601,用于基于所述多个运动矢量对所述当前块进行预测。The encoding unit 1601 is used to predict the current block based on the plurality of motion vectors.

可选的,所述当前块的仿射模型包括所述基准点的基准点坐标、基准点运动矢量、第一参数、第二参数、第三参数以及第四参数。Optionally, 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.

可选的,所述当前块的仿射模型包括所述基准点的基准点运动矢量、第一参数、第二参数、第三参数以及第四参数。Optionally, the affine model of the current block includes the reference point motion vector of the reference point, a first parameter, a second parameter, a third parameter, and a fourth parameter.

可选的,所述当前块的仿射模型包括至少两个控制点的控制点运动矢量。Optionally, the affine model of the current block includes control point motion vectors for at least two control points.

可选的,编码单元1601,用于:基于所述当前块的参考图像的运动矢量,确定所述第一参数、所述第 二参数、所述第三参数以及所述第四参数;Optionally, the encoding unit 1601 is configured to: determine the first parameter and the second parameter based on the motion vector of the reference image of the current block. The second parameter, the third parameter, and the fourth parameter;

确定所述基准点的所述基准点坐标以及所述基准点运动矢量。Determine the coordinates of the reference point and the motion vector of the reference point.

可选的,编码单元1601,用于:Optionally, encoding unit 1601 is used for:

基于所述当前块的参考图像的运动矢量,确定所述第一参数、所述第二参数、所述第三参数以及所述第四参数;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.

可选的,编码单元1601,用于:Optionally, encoding unit 1601 is used for:

基于所述当前块的参考图像的运动矢量,确定所述第一参数、所述第二参数、所述第三参数以及所述第四参数;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.

可选的,编码单元1601,用于:Optionally, encoding unit 1601 is used for:

确定所述当前块的同位参考图像中的至少两个点;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.

可选的,编码单元1601,用于:Optionally, encoding unit 1601 is used for:

基于当前图像中所述当前块的顶点坐标,确定所述同位参考图像中的至少两个点;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.

可选的,编码单元1601,用于:Optionally, encoding unit 1601 is used for:

确定所述当前块的相邻块的运动矢量;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.

可选的,所述同位参考图像中的至少两个点位于至少两个具有预定尺寸的区域。Optionally, at least two points in the co-position reference image are located in at least two regions of a predetermined size.

可选的,同一具有预定尺寸的区域内的坐标位置具有相同运动信息。Optionally, coordinate positions within the same region of a predetermined size have the same motion information.

可选的,所述同位参考图像包含n个点组,且每个点组包含2个或3个点,n为正整数。Optionally, the co-position reference image contains n point groups, and each point group contains 2 or 3 points, where n is a positive integer.

可选的,所述n个点组中存在至少一个点组满足如下条件:所述点组中的点位于所述当前块的右下方区域。Optionally, at least one of the n point groups satisfies the following condition: the points in the point group are located in the lower right region of the current block.

可选的,编码单元1601,用于:Optionally, encoding unit 1601 is used for:

确定所述当前块的所述同位参考图像;Determine the co-position reference image of the current block;

将所述同位参考图像的图像索引编码至码流。The image index of the corresponding reference image is encoded into the bitstream.

可选的,编码单元1601,用于:Optionally, encoding unit 1601 is used for:

在存在多个同位参考图像的情况下,确定所述当前块的至少一个仿射模型,其中,不同仿射模型基于不同同位参考图像确定得到。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.

可选的,编码单元1601,用于:Optionally, encoding unit 1601 is used for:

基于所述同位参考图像中的至少两个点的运动矢量,确定第五参数、第六参数、第七参数以及第八参数;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.

可选的,编码单元1601,用于:Optionally, encoding unit 1601 is used for:

确定当前图像与所述当前图像的参考图像之间的第一图像间隔;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.

可选的,编码单元1601,用于:Optionally, encoding unit 1601 is used for:

基于所述第一参数、所述第二参数、所述第三参数、所述第四参数以及所述基准点,确定仿射关系,所述仿射关系用于表征坐标位置与坐标位置处运动矢量的对应关系;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.

可选的,编码单元1601,用于:Optionally, encoding unit 1601 is used for:

基于所述当前块的仿射模型确定仿射关系,所述仿射关系用于表征坐标位置与坐标位置处运动矢量的对应关系;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.

可选的,编码单元1601,用于:Optionally, encoding unit 1601 is used for:

基于所述当前块的仿射模型,确定第一参数、第二参数、第三参数以及第四参数;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.

可选的,所述基准点位于所述当前块之内;Optionally, the reference point is located within the current block;

或者,or,

所述基准点位于所述当前块之外。The reference point is located outside the current block.

可选的,所述基准点为所述当前块的左上角顶点、右上角或左下角顶点。Optionally, the reference point is the top-left, top-right, or bottom-left vertex of the current block.

可选的,编码单元1601,用于:Optionally, encoding unit 1601 is used for:

在所述当前块的相邻块支持仿射模式的情况下,基于所述相邻块的仿射模型,确定所述基准点的基准点运动矢量。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.

可选的,编码单元1601,用于:Optionally, encoding unit 1601 is used for:

基于所述当前块中子块的运动矢量,从所述参考图像中确定所述子块对应的参考子块;基于所述参考子块的重建值确定所述子块的预测值;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.

可选的,编码单元1601,用于:Optionally, encoding unit 1601 is used for:

将所述当前块的仿射模型添加至候选列表;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.

需要说明的是,上述解码单元进行图像解码过程可以参考上述图像解码方法实施例,上述编码单元进行图像编码的过程可以参考上述图像编码方法实施例,本实施例在此不作赘述。It should be noted that the image decoding process of the above-mentioned decoding unit can refer to the above-mentioned image decoding method embodiment, and the image encoding process of the above-mentioned encoding unit can refer to the above-mentioned image encoding method embodiment. This embodiment will not be described in detail here.

请参考图17,其示出了本申请一个示例性实施例提供的解码器的结构方框图。该解码器可以包括一个或多个如下部件:处理器1701、存储器1702。组件通过总线系统耦合在一起。可理解,总线系统用于实现这些组件之间的连接通信。总线系统除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。Please refer to Figure 17, which shows a structural block diagram of a decoder provided in an exemplary embodiment of this application. The decoder may include one or more components such as a processor 1701 and a memory 1702. The components are coupled together via a bus system. It is understood that the bus system is used to implement communication between these components. In addition to a data bus, the bus system also includes a power bus, a control bus, and a status signal bus.

存储器1702,用于存储能够在处理器1701上运行的计算机程序;处理器1701,用于在运行所述计算机程序时,执行:Memory 1702 is used to store computer programs that can run on processor 1701; processor 1701 is used to execute, when running the computer program:

基于当前块的参考图像的运动信息,以及所述当前块的基准点,构建所述当前块的仿射模型;Based on the motion information of the reference image of the current block and the reference point of the current block, an affine model of the current block is constructed.

基于所述当前块的仿射模型进行运动矢量仿射,得到所述当前块的多个运动矢量;Based on the affine model of the current block, perform affine motion vector transformation to obtain multiple motion vectors of the current block;

基于所述当前块的多个运动矢量对所述当前块进行预测。The current block is predicted based on multiple motion vectors of the current block.

可以理解,本申请实施例中的存储器1702可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述存储器1702旨在包括但不限于这些和任意其它适合类型的存储器。It is understood that the memory 1702 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1702 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

而处理器1701可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述图像解码方法的各步骤可以通过处理器1701中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器1701可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific  Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1702,处理器1701读取存储器1702中的信息,结合其硬件完成上述方法的步骤。可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个ASIC、DSP、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、FPGA、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。可选地,作为另一个实施例,处理器1701还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的图像解码方法。The processor 1701 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the aforementioned image decoding method can be completed through integrated logic circuits in the processor 1701 or through software instructions. The processor 1701 can be a general-purpose processor, a digital signal processor (DSP), or an application-specific integrated circuit (ASIC). Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 1702, and processor 1701 reads information from memory 1702 and, in conjunction with its hardware, completes the steps of the above methods. It is understood that the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more ASICs, DSPs, digital signal processing devices (DSP Devices, DSPDs), programmable logic devices (PLDs), FPGAs, general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application, or combinations thereof. For software implementation, the technology described in this application can be implemented by modules (e.g., procedures, functions, etc.) that perform the functions described in this application. Software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor. Optionally, as another embodiment, the processor 1701 is also configured to execute the image decoding method described in any of the foregoing embodiments when running the computer program.

请参考图18,其示出了本申请一个示例性实施例提供的编码器的结构方框图。该编码器可以包括一个或多个如下部件:处理器1801、存储器1802。组件通过总线系统耦合在一起。可理解,总线系统用于实现这些组件之间的连接通信。总线系统除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。Please refer to Figure 18, which shows a structural block diagram of an encoder provided in an exemplary embodiment of this application. The encoder may include one or more components such as a processor 1801 and a memory 1802. The components are coupled together via a bus system. It is understood that the bus system is used to enable communication between these components. In addition to a data bus, the bus system also includes a power bus, a control bus, and a status signal bus.

存储器1802,用于存储能够在处理器1801上运行的计算机程序;处理器1801,用于在运行所述计算机程序时,执行:Memory 1802 is used to store computer programs that can run on processor 1801; processor 1801 is used to execute, when running the computer program:

基于当前块的参考图像的运动信息,以及所述当前块的基准点,构建所述当前块的仿射模型;Based on the motion information of the reference image of the current block and the reference point of the current block, an affine model of the current block is constructed.

基于所述当前块的仿射模型进行运动矢量仿射,得到所述当前块的多个运动矢量;Based on the affine model of the current block, perform affine motion vector transformation to obtain multiple motion vectors of the current block;

基于所述当前块的多个运动矢量对所述当前块进行预测。The current block is predicted based on multiple motion vectors of the current block.

可以理解,本申请实施例中的存储器1802可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述存储器1802旨在包括但不限于这些和任意其它适合类型的存储器。It is understood that the memory 1802 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1802 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

而处理器1801可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述图像编码方法的各步骤可以通过处理器1801中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器1801可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1802,处理器1801读取存储器1802中的信息,结合其硬件完成上述方法的步骤。可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个ASIC、DSP、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、FPGA、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。可选地,作为另一个实施例,处理器1801还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的图像编码方法。The processor 1801 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the aforementioned image encoding method can be completed by the integrated logic circuitry in the hardware of the processor 1801 or by software instructions. The processor 1801 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 1802. Processor 1801 reads information from memory 1802 and, in conjunction with its hardware, completes the steps of the above method. It is understood that the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more ASICs, DSPs, digital signal processing devices (DSP Devices, DSPDs), programmable logic devices (PLDs), FPGAs, general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application, or combinations thereof. For software implementation, the technology described in this application can be implemented through modules (e.g., procedures, functions, etc.) that perform the functions described in this application. Software code can be stored in memory and executed by the processor. The memory can be implemented in the processor or external to the processor. Optionally, as another embodiment, processor 1801 is also configured to execute the image encoding method described in any of the foregoing embodiments when running the computer program.

本申请实施例还提供了一种存储码流的非易失性计算机可读存储介质,所述码流通过利用编码器的图像编码方法而生成,或者,所述码流通过利用解码器的图像解码方法而解码,其中,所述图像编码方法包括如上述实施例所述的图像编码方法,所述图像解码方法包括上述实施例所述的图像解码方法。This application also provides a non-volatile computer-readable storage medium for storing a bitstream, the bitstream being generated by an image encoding method using an encoder, or the bitstream being decoded by an image decoding method using a decoder, wherein the image encoding method includes the image encoding method described in the above embodiments, and the image decoding method includes the image decoding method described in the above embodiments.

本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中,处理器从所述计算机可读存储介质中获取所述计算机指令,所述处理器执 行所述计算机指令以实现如上述实施例所述的图像解码方法,或,图像编码方法。This application also provides a computer program product, which includes computer instructions stored in a computer-readable storage medium. A processor retrieves the computer instructions from the computer-readable storage medium and executes them. The computer instructions are executed to implement the image decoding method or image encoding method as described in the above embodiments.

本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。 The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims (58)

一种图像解码方法,其特征在于,所述方法包括: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. 根据权利要求1所述的方法,其特征在于,所述当前块的仿射模型包括所述基准点的基准点坐标、基准点运动矢量、第一参数、第二参数、第三参数以及第四参数。According to the method of claim 1, 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. 根据权利要求1所述的方法,其特征在于,所述当前块的仿射模型包括所述基准点的基准点运动矢量、第一参数、第二参数、第三参数以及第四参数。According to the method of claim 1, the affine model of the current block includes the reference point motion vector of the reference point, a first parameter, a second parameter, a third parameter, and a fourth parameter. 根据权利要求1所述的方法,其特征在于,所述当前块的仿射模型包括至少两个控制点的控制点运动矢量。The method according to claim 1 is characterized in that the affine model of the current block includes control point motion vectors of at least two control points. 根据权利要求2所述的方法,其特征在于,所述基于当前块的参考图像的运动信息,以及基准点,确定所述当前块的仿射模型,包括:The method according to claim 2, characterized in that, 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 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. 根据权利要求3所述的方法,其特征在于,所述基于当前块的参考图像的运动信息,以及基准点,确定所述当前块的仿射模型,包括:The method according to claim 3, characterized in that, 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 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. 根据权利要求4所述的方法,其特征在于,所述基于当前块的参考图像的运动信息,以及基准点,构建所述当前块的仿射模型,包括:The method according to claim 4, characterized in that, constructing 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. 根据权利要求5至7任一所述的方法,其特征在于,所述基于所述当前块的参考图像的运动矢量,确定所述第一参数、所述第二参数、所述第三参数以及所述第四参数,包括:The method according to any one of claims 5 to 7, characterized in that, determining 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. 根据权利要求8所述的方法,其特征在于,所述确定所述当前块的同位参考图像中的至少两个点,包括如下方式中的至少一种:The method according to claim 8, wherein determining at least two points in the co-location reference image of the current block comprises at least one of the following: 基于当前图像中所述当前块的顶点坐标,确定所述同位参考图像中的至少两个点;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. 根据权利要求9所述的方法,其特征在于,所述方法还包括:The method according to claim 9, characterized in that the method further comprises: 确定所述当前块的相邻块的运动矢量;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. 根据权利要求8所述的方法,其特征在于,所述同位参考图像中的至少两个点位于至少两个具有预定尺寸的区域。The method according to claim 8, wherein at least two points in the co-position reference image are located in at least two regions of predetermined size. 根据权利要求11所述的方法,其特征在于,同一具有预定尺寸的区域内的坐标位置具有相同运动信息。The method according to claim 11 is characterized in that the coordinate positions within the same region having a predetermined size have the same motion information. 根据权利要求8所述的方法,其特征在于,所述同位参考图像包含n个点组,且每个点组包含2 个或3个点,n为正整数。According to the method of claim 8, the co-position reference image comprises n point groups, and each point group comprises 2 There are one or three points, where n is a positive integer. 根据权利要求13所述的方法,其特征在于,所述n个点组中存在至少一个点组满足如下条件:所述点组中的点位于所述当前块的右下方区域。According to the method of claim 13, at least one of the n point groups satisfies the following condition: the points in the point group are located in the lower right region of the current block. 根据权利要求8所述的方法,其特征在于,所述方法还包括:The method according to claim 8, characterized in that the method further comprises: 解析码流,确定所述当前块的所述同位参考图像。Parse the bitstream to determine the co-location reference image of the current block. 根据权利要求15所述的方法,其特征在于,所述确定所述当前块的仿射模型,包括:The method according to claim 15, wherein determining the affine model of the current block comprises: 在存在多个同位参考图像的情况下,确定所述当前块的至少一个仿射模型,其中,不同仿射模型基于不同同位参考图像确定得到。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. 根据权利要求8所述的方法,其特征在于,所述基于所述同位参考图像中的至少两个点的运动矢量,确定所述第一参数、所述第二参数、所述第三参数以及所述第四参数,包括:The method according to claim 8, characterized in that, determining 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. 根据权利要求17所述的方法,其特征在于,所述对所述第五参数、所述第六参数、所述第七参数以及所述第八参数进行缩放,得到所述第一参数、所述第二参数、所述第三参数以及所述第四参数,包括:According to the method of claim 17, the scaling of 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 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. 根据权利要求7所述的方法,其特征在于,所述基于所述第一参数、所述第二参数、所述第三参数、所述第四参数以及所述基准点,确定至少两个控制点的所述控制点运动矢量,包括:According to the method of claim 7, 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 includes: 基于所述第一参数、所述第二参数、所述第三参数、所述第四参数以及所述基准点,确定仿射关系,所述仿射关系用于表征坐标位置与坐标位置处运动矢量的对应关系;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. 根据权利要求2或3所述的方法,其特征在于,所述基于所述当前块的仿射模型得到多个运动矢量,包括: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. 根据权利要求4所述的方法,其特征在于,所述基于所述当前块的仿射模型得到多个运动矢量,包括:The method according to claim 4, characterized in that, obtaining multiple motion vectors based on the affine model of the current block includes: 基于所述当前块的仿射模型,确定第一参数、第二参数、第三参数以及第四参数;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. 根据权利要求1至21任一所述的方法,其特征在于,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. 根据权利要求22所述的方法,其特征在于,所述基准点为所述当前块的左上角顶点、右上角或左下角顶点。The method according to claim 22 is characterized in that the reference point is the upper left corner, upper right corner, or lower left corner of the current block. 根据权利要求22所述的方法,其特征在于,所述方法包括:The method according to claim 22, characterized in that the method comprises: 在所述当前块的相邻块支持仿射模式的情况下,基于所述相邻块的仿射模型,确定所述基准点的基准点运动矢量。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. 根据权利要求1至24任一所述的方法,其特征在于,所述基于所述多个运动矢量对所述当前块进行预测,包括: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. 根据权利要求1至25任一所述的方法,其特征在于,所述基于所述当前块的仿射模型得到多个运动矢量,包括: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. 一种图像编码方法,其特征在于,所述方法包括: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. 根据权利要求27所述的方法,其特征在于,所述当前块的仿射模型包括所述基准点的基准点坐标、基准点运动矢量、第一参数、第二参数、第三参数以及第四参数。The method according to claim 27 is 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. 根据权利要求27所述的方法,其特征在于,所述当前块的仿射模型包括所述基准点的基准点运动矢量、第一参数、第二参数、第三参数以及第四参数。The method according to claim 27 is characterized in that the affine model of the current block includes the reference point motion vector of the reference point, a first parameter, a second parameter, a third parameter, and a fourth parameter. 根据权利要求27所述的方法,其特征在于,所述当前块的仿射模型包括至少两个控制点的控制点运动矢量。The method according to claim 27 is characterized in that the affine model of the current block includes control point motion vectors of at least two control points. 根据权利要求28所述的方法,其特征在于,所述基于当前块的参考图像的运动信息,以及基准点,确定所述当前块的仿射模型,包括:The method according to claim 28, characterized in that, 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 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. 根据权利要求29所述的方法,其特征在于,所述基于当前块的参考图像的运动信息,以及基准点,确定所述当前块的仿射模型,包括:The method according to claim 29, characterized in that, 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 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. 根据权利要求30所述的方法,其特征在于,所述基于当前块的参考图像的运动信息,以及基准点,确定所述当前块的仿射模型,包括:The method according to claim 30, characterized in that, 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 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. 根据权利要求31至33任一所述的方法,其特征在于,所述基于所述当前块的参考图像的运动矢量,确定所述第一参数、所述第二参数、所述第三参数以及所述第四参数,包括:The method according to any one of claims 31 to 33, characterized in that, determining 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. 根据权利要求34所述的方法,其特征在于,所述确定所述当前块的同位参考图像中的至少两个点,包括如下方式中的至少一种:The method according to claim 34, wherein determining at least two points in the co-location reference image of the current block comprises at least one of the following: 基于当前图像中所述当前块的顶点坐标,确定所述同位参考图像中的至少两个点;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. 根据权利要求35所述的方法,其特征在于,所述方法还包括:The method according to claim 35, characterized in that the method further comprises: 确定所述当前块的相邻块的运动矢量;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. 根据权利要求34所述的方法,其特征在于,所述同位参考图像中的至少两个点位于至少两个具有预定尺寸的区域。The method according to claim 34 is characterized in that at least two points in the co-position reference image are located in at least two regions of predetermined size. 根据权利要求37所述的方法,其特征在于,同一具有预定尺寸的区域内的坐标位置具有相同运动信息。The method according to claim 37 is characterized in that the coordinate positions within the same region having a predetermined size have the same motion information. 根据权利要求34所述的方法,其特征在于,所述同位参考图像包含n个点组,且每个点组包含2个或3个点,n为正整数。The method according to claim 34 is characterized in that the co-position reference image comprises n point groups, and each point group comprises 2 or 3 points, where n is a positive integer. 根据权利要求39所述的方法,其特征在于,所述n个点组中存在至少一个点组满足如下条件:所述点组中的点位于所述当前块的右下方区域。According to the method of claim 39, at least one of the n point groups satisfies the following condition: the points in the point group are located in the lower right region of the current block. 根据权利要求34所述的方法,其特征在于,所述方法还包括:The method according to claim 34, characterized in that the method further comprises: 确定所述当前块的所述同位参考图像;Determine the co-position reference image of the current block; 将所述同位参考图像的图像索引编码至码流。The image index of the corresponding reference image is encoded into the bitstream. 根据权利要求41所述的方法,其特征在于,所述确定所述当前块的仿射模型,包括:The method according to claim 41, wherein 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. 根据权利要求34所述的方法,其特征在于,所述基于所述同位参考图像中的至少两个点的运动矢量,确定所述第一参数、所述第二参数、所述第三参数以及所述第四参数,包括:The method according to claim 34, characterized in that, determining 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, comprises: 基于所述同位参考图像中的至少两个点的运动矢量,确定第五参数、第六参数、第七参数以及第八参数;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. 根据权利要求43所述的方法,其特征在于,所述对所述第五参数、所述第六参数、所述第七参数以及所述第八参数进行缩放,得到所述第一参数、所述第二参数、所述第三参数以及所述第四参数,包括:The method according to claim 43, characterized in that, 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 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 a 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. 根据权利要求33所述的方法,其特征在于,所述基于所述第一参数、所述第二参数、所述第三参数、所述第四参数以及所述基准点,确定至少两个控制点的所述控制点运动矢量,包括:The method according to claim 33, characterized in that, determining the control point motion vector based on the first parameter, the second parameter, the third parameter, the fourth parameter, and the reference point, includes: 基于所述第一参数、所述第二参数、所述第三参数、所述第四参数以及所述基准点,确定仿射关系,所述仿射关系用于表征坐标位置与坐标位置处运动矢量的对应关系;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. 根据权利要求28或29所述的方法,其特征在于,所述基于所述当前块的仿射模型得到多个运动矢量,包括:The method according to claim 28 or 29, characterized in that, obtaining multiple motion vectors based on the affine model of the current block includes: 基于所述当前块的仿射模型确定仿射关系,所述仿射关系用于表征坐标位置与坐标位置处运动矢量的对应关系;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. 根据权利要求30所述的方法,其特征在于,所述基于所述当前块的仿射模型得到多个运动矢量,包括:The method according to claim 30, characterized in that, obtaining multiple motion vectors based on the affine model of the current block includes: 基于所述当前块的仿射模型,确定第一参数、第二参数、第三参数以及第四参数;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. 根据权利要求27至47任一所述的方法,其特征在于,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. 根据权利要求48所述的方法,其特征在于,所述基准点为所述当前块的左上角顶点、右上角或左下角顶点。The method according to claim 48 is characterized in that the reference point is the upper left corner vertex, upper right corner vertex, or lower left corner vertex of the current block. 根据权利要求48所述的方法,其特征在于,所述方法包括: The method according to claim 48, characterized in that the method comprises: 在所述当前块的相邻块支持仿射模式的情况下,基于所述相邻块的仿射模型,确定所述基准点的基准点运动矢量。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. 根据权利要求27至50任一所述的方法,其特征在于,所述基于所述多个运动矢量对所述当前块进行预测,包括: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. 根据权利要求27至51任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 27 to 51, characterized in that the method further comprises: 将所述当前块的仿射模型添加至候选列表;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. 一种解码装置,其特征在于,所述装置包括:A decoding device, characterized in that the device comprises: 解码单元,用于基于当前块的参考图像的运动信息,以及基准点,确定所述当前块的仿射模型;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. 一种编码装置,其特征在于,所述装置包括:An encoding device, characterized in that the device comprises: 编码单元,用于基于当前块的参考图像的运动信息,以及基准点,确定所述当前块的仿射模型;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. 一种解码器,其特征在于,所述解码器包括存储器和处理器,所述存储器,用于存储在所述处理器上运行的计算机程序;所述处理器,用于在运行所述计算机程序时,执行如权利要求1至26任一所述的图像解码方法。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. 一种编码器,其特征在于,所述编码器包括存储器和处理器,所述存储器,用于存储在所述处理器上运行的计算机程序;所述处理器,用于在运行所述计算机程序时,执行如权利要求27至52任一所述的图像编码方法。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. 一种存储码流的非易失性计算机可读存储介质,其特征在于,所述码流通过利用编码器的图像编码方法而生成,或者,所述码流通过利用解码器的图像解码方法而解码,其中,所述图像编码方法包括如权利要求27至52任一所述的图像编码方法,所述图像解码方法包括如权利要求1至26任一所述的图像解码方法。A non-volatile computer-readable storage medium for storing a bitstream, characterized in that the bitstream is generated by an image encoding method using an encoder, or the bitstream is decoded by an image decoding method using 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. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中,处理器从所述计算机可读存储介质中获取所述计算机指令,所述处理器执行所述计算机指令以实现如权利要求1至26任一所述的图像解码方法,或,权利要求27至52任一所述的图像编码方法。 A computer program product, characterized in that the computer program product includes computer instructions stored in a computer-readable storage medium, a processor retrieves the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the image decoding method as described in any one of claims 1 to 26, or the image encoding method as described in any one of claims 27 to 52.
PCT/CN2024/102620 2024-06-28 2024-06-28 Image decoding method, image encoding method, encoder, decoder, and medium Pending WO2026000381A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2024/102620 WO2026000381A1 (en) 2024-06-28 2024-06-28 Image decoding method, image encoding method, encoder, decoder, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2024/102620 WO2026000381A1 (en) 2024-06-28 2024-06-28 Image decoding method, image encoding method, encoder, decoder, and medium

Publications (1)

Publication Number Publication Date
WO2026000381A1 true WO2026000381A1 (en) 2026-01-02

Family

ID=98220573

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/102620 Pending WO2026000381A1 (en) 2024-06-28 2024-06-28 Image decoding method, image encoding method, encoder, decoder, and medium

Country Status (1)

Country Link
WO (1) WO2026000381A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020042604A1 (en) * 2018-08-27 2020-03-05 华为技术有限公司 Video encoder, video decoder and corresponding method
CN110891176A (en) * 2018-09-10 2020-03-17 华为技术有限公司 Motion vector prediction method and device based on affine motion model
WO2022022278A1 (en) * 2020-07-29 2022-02-03 Oppo广东移动通信有限公司 Inter-frame prediction method, encoder, decoder, and computer storage medium
KR20240080112A (en) * 2022-11-29 2024-06-05 현대자동차주식회사 Method and Apparatus for Video Coding Using Affine Model Based Prediction
WO2024117693A1 (en) * 2022-11-29 2024-06-06 현대자동차주식회사 Method and device for video coding adaptively using motion compensation filter in affine model-based prediction

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020042604A1 (en) * 2018-08-27 2020-03-05 华为技术有限公司 Video encoder, video decoder and corresponding method
CN110891176A (en) * 2018-09-10 2020-03-17 华为技术有限公司 Motion vector prediction method and device based on affine motion model
WO2022022278A1 (en) * 2020-07-29 2022-02-03 Oppo广东移动通信有限公司 Inter-frame prediction method, encoder, decoder, and computer storage medium
KR20240080112A (en) * 2022-11-29 2024-06-05 현대자동차주식회사 Method and Apparatus for Video Coding Using Affine Model Based Prediction
WO2024117693A1 (en) * 2022-11-29 2024-06-06 현대자동차주식회사 Method and device for video coding adaptively using motion compensation filter in affine model-based prediction

Similar Documents

Publication Publication Date Title
JP7372433B2 (en) Method and apparatus for prediction refinement using optical flow
CN110651477A (en) Restricted memory access window for motion vector modification
CN112292861B (en) A sub-pixel accurate correction method based on error surface for motion vector correction at the decoding end
CN114009033A (en) Method and apparatus for signaling symmetric motion vector difference mode
CN115052161A (en) Inter-frame prediction method, encoder, decoder, and computer storage medium
CN111201795A (en) Storage access window and padding for motion vector correction
WO2019080892A1 (en) Method and device for determining motion vector of affine coding block
JP7746321B2 (en) How to derive constructed affine merge candidates
KR100694050B1 (en) Motion prediction method and device
CN113709498B (en) Inter-frame prediction method, encoder, decoder and computer storage medium
CN116368799A (en) Enhanced Motion Estimation for Inter Codec
TWI830334B (en) Method and apparatus for low-latency template matching in video coding system
WO2026000381A1 (en) Image decoding method, image encoding method, encoder, decoder, and medium
CN118661420B (en) Resolution-based decoding methods, encoding methods, decoders, and encoders
CN113727119B (en) Inter-frame prediction method, encoder, decoder, and computer storage medium
TWI901089B (en) A method of video coding with refinement for merge mode motion vector difference and a device thereof
CN114979632B (en) Block vector encoding and decoding method, encoding device, decoding device and storage medium
WO2026007084A1 (en) Coding method, decoding method, bitstream, coders, decoders and storage medium
WO2025255715A1 (en) Image decoding method and apparatus, image encoding method and apparatus, medium, and code stream
TW202602116A (en) Methods and apparatus of intra merge mode with derived modes in video coding
CN121444451A (en) Methods and apparatus for improving video encoding and decoding through stored information and implicit derivation
WO2025065670A1 (en) Encoding method, decoding method, code stream, encoder, decoder, and storage medium
WO2025065658A1 (en) Encoding method, decoding method, bit stream, encoder, decoder, and storage medium
TW202543282A (en) Methods and apparatus with similarity check in video coding system
WO2025199773A1 (en) Encoding method, decoding method, code stream, encoder, decoder, and storage medium