CN113727119B - Inter-frame prediction method, encoder, decoder, and computer storage medium - Google Patents
Inter-frame prediction method, encoder, decoder, and computer storage medium Download PDFInfo
- Publication number
- CN113727119B CN113727119B CN202010432096.4A CN202010432096A CN113727119B CN 113727119 B CN113727119 B CN 113727119B CN 202010432096 A CN202010432096 A CN 202010432096A CN 113727119 B CN113727119 B CN 113727119B
- Authority
- CN
- China
- Prior art keywords
- motion information
- current block
- unidirectional
- value
- new
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 142
- 230000033001 locomotion Effects 0.000 claims abstract description 1222
- 239000013598 vector Substances 0.000 claims abstract description 138
- 238000005192 partition Methods 0.000 claims description 88
- 230000015654 memory Effects 0.000 claims description 42
- 238000010276 construction Methods 0.000 claims description 34
- 238000004590 computer program Methods 0.000 claims description 22
- 230000002123 temporal effect Effects 0.000 claims description 7
- 230000004927 fusion Effects 0.000 claims description 6
- 238000004458 analytical method Methods 0.000 claims description 5
- 238000013508 migration Methods 0.000 claims 6
- 230000005012 migration Effects 0.000 claims 6
- 238000010586 diagram Methods 0.000 description 15
- 238000013139 quantization Methods 0.000 description 14
- 230000002457 bidirectional effect Effects 0.000 description 13
- 230000006870 function Effects 0.000 description 13
- 230000009466 transformation Effects 0.000 description 12
- 208000037170 Delayed Emergence from Anesthesia Diseases 0.000 description 11
- 238000004364 calculation method Methods 0.000 description 11
- 230000000694 effects Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 230000003252 repetitive effect Effects 0.000 description 5
- 230000001360 synchronised effect Effects 0.000 description 5
- 230000026058 directional locomotion Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000001914 filtration Methods 0.000 description 2
- 230000010365 information processing Effects 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 238000000638 solvent extraction Methods 0.000 description 2
- KLDZYURQCUYZBL-UHFFFAOYSA-N 2-[3-[(2-hydroxyphenyl)methylideneamino]propyliminomethyl]phenol Chemical compound OC1=CC=CC=C1C=NCCCN=CC1=CC=CC=C1O KLDZYURQCUYZBL-UHFFFAOYSA-N 0.000 description 1
- 102100035673 Centrosomal protein of 290 kDa Human genes 0.000 description 1
- 101000715664 Homo sapiens Centrosomal protein of 290 kDa Proteins 0.000 description 1
- 201000001098 delayed sleep phase syndrome Diseases 0.000 description 1
- 208000033921 delayed sleep phase type circadian rhythm sleep disease Diseases 0.000 description 1
- NUHSROFQTUXZQQ-UHFFFAOYSA-N isopentenyl diphosphate Chemical group CC(=C)CCO[P@](O)(=O)OP(O)(O)=O NUHSROFQTUXZQQ-UHFFFAOYSA-N 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
- H04N19/573—Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
- H04N19/513—Processing of motion vectors
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本申请实施例公开了一种帧间预测方法、编码器、解码器以及计算机存储介质,应用于解码器,该方法包括:解析码流,获取当前块的预测模式参数;当所述预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值时,从所述当前块的多个已知运动信息中确定至少一个单向运动信息;基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息;其中,所述预设偏移量是根据所述至少一个单向运动信息对应的水平方向矢量值和垂直方向矢量值计算得到;基于所述至少一个新的单向运动信息,构建新的运动信息候选列表;根据所述新的运动信息候选列表,确定所述当前块的帧间预测值。
The embodiment of the present application discloses an inter-frame prediction method, an encoder, a decoder, and a computer storage medium, which are applied to the decoder. The method includes: parsing the code stream to obtain the prediction mode parameters of the current block; when the prediction mode parameters Indicates that when the preset inter prediction mode is used to determine the inter prediction value of the current block, at least one unidirectional motion information is determined from a plurality of known motion information of the current block; the at least one unidirectional motion information is determined based on the preset offset performing offset processing on one unidirectional motion information to obtain at least one new unidirectional motion information; wherein, the preset offset is based on the horizontal direction vector value and the vertical direction vector value corresponding to the at least one unidirectional motion information It is calculated; based on the at least one new unidirectional motion information, constructing a new motion information candidate list; according to the new motion information candidate list, determining an inter-frame prediction value of the current block.
Description
技术领域technical field
本申请涉及视频编解码技术领域,尤其涉及一种帧间预测方法、编码器、解码器以及计算机存储介质。The present application relates to the technical field of video encoding and decoding, and in particular to an inter-frame prediction method, an encoder, a decoder, and a computer storage medium.
背景技术Background technique
在视频编解码领域,针对当前块进行编解码的过程,除了采用帧内预测方式外,还可以采用帧间预测方式。其中,帧间预测可以包括帧间几何划分预测模式(GeometricPartitioning Mode,GPM)和角度加权预测模式(Angular Weighted Prediction,AWP)等,通过将帧间的当前块划分为两个非矩形的分区(或两个块)分别进行预测后再加权融合,能够得到当前块的预测值。In the field of video coding and decoding, in addition to the intra-frame prediction method, the inter-frame prediction method can also be used in the process of coding and decoding the current block. Among them, inter-frame prediction may include inter-frame geometric partitioning prediction mode (Geometric Partitioning Mode, GPM) and angle weighted prediction mode (Angular Weighted Prediction, AWP), etc., by dividing the current block between frames into two non-rectangular partitions (or Two blocks) are predicted separately and then weighted and fused to obtain the predicted value of the current block.
目前,在GPM或AWP的预测过程中,虽然使用了空域相邻块的运动信息和时域同位置块的运动信息来构造运动信息候选列表,但是并不能够保证该运动信息候选列表可以填满。当运动信息候选列表未填满时,通常是利用最后一个有效的运动信息进行复制填满。At present, in the prediction process of GPM or AWP, although the motion information of neighboring blocks in the spatial domain and the motion information of the co-located block in the time domain are used to construct the motion information candidate list, there is no guarantee that the motion information candidate list can be filled. . When the motion information candidate list is not full, the last effective motion information is usually used for copying and filling.
这样,在两个运动不同的区域边缘,比如一些形变,如果空域相邻块的运动信息和时域同位置块的运动信息没有包含这种形变的运动信息,将会导致GPM或AWP无法发挥作用。另外,由于编码器所选择的运动信息和实际的运动信息可能存在偏差,也即当前构建的运动信息候选列表中的运动信息与当前块的实际运动信息可能存在偏差,还会影响到编解码的性能。In this way, at the edge of two areas with different motions, such as some deformations, if the motion information of adjacent blocks in the space domain and the motion information of the same position block in the time domain do not contain the motion information of this deformation, GPM or AWP will not be able to function. . In addition, since there may be a deviation between the motion information selected by the encoder and the actual motion information, that is, there may be a deviation between the motion information in the currently constructed motion information candidate list and the actual motion information of the current block, which will also affect the encoding and decoding process. performance.
发明内容Contents of the invention
本申请提出一种帧间预测方法、编码器、解码器以及计算机存储介质,可以增加运动信息候选列表中运动信息的多样性,从而提升编解码性能。The present application proposes an inter-frame prediction method, an encoder, a decoder, and a computer storage medium, which can increase the diversity of motion information in a motion information candidate list, thereby improving encoding and decoding performance.
本申请的技术方案是这样实现的:The technical scheme of the present application is realized like this:
第一方面,本申请实施例提供了一种帧间预测方法,应用于解码器,该方法包括:In the first aspect, an embodiment of the present application provides an inter-frame prediction method, which is applied to a decoder, and the method includes:
解析码流,获取当前块的预测模式参数;Parse the code stream to obtain the prediction mode parameters of the current block;
当所述预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值时,从所述当前块的多个已知运动信息中确定至少一个单向运动信息;When the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block, at least one unidirectional motion information is determined from a plurality of known motion information of the current block;
基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息;其中,所述预设偏移量是根据所述至少一个单向运动信息对应的水平方向矢量值和垂直方向矢量值计算得到;Perform offset processing on the at least one unidirectional motion information based on a preset offset to obtain at least one new unidirectional motion information; wherein the preset offset corresponds to the at least one unidirectional motion information The horizontal direction vector value and the vertical direction vector value are calculated;
基于所述至少一个新的单向运动信息,构建新的运动信息候选列表;Constructing a new motion information candidate list based on the at least one new unidirectional motion information;
根据所述新的运动信息候选列表,确定所述当前块的帧间预测值。Determine an inter-frame prediction value of the current block according to the new motion information candidate list.
第二方面,本申请实施例提供了一种帧间预测方法,应用于编码器,该方法包括:In the second aspect, the embodiment of the present application provides an inter-frame prediction method, which is applied to an encoder, and the method includes:
确定当前块的预测模式参数;determining a prediction mode parameter for the current block;
当所述预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值时,从所述当前块的多个已知运动信息中确定至少一个单向运动信息;When the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block, at least one unidirectional motion information is determined from a plurality of known motion information of the current block;
基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息;其中,所述预设偏移量是根据所述至少一个单向运动信息对应的水平方向矢量值和垂直方向矢量值计算得到;Perform offset processing on the at least one unidirectional motion information based on a preset offset to obtain at least one new unidirectional motion information; wherein the preset offset corresponds to the at least one unidirectional motion information The horizontal direction vector value and the vertical direction vector value are calculated;
基于所述至少一个新的单向运动信息,构建新的运动信息候选列表;Constructing a new motion information candidate list based on the at least one new unidirectional motion information;
根据所述新的运动信息候选列表,确定所述当前块的帧间预测值。Determine an inter-frame prediction value of the current block according to the new motion information candidate list.
第三方面,本申请实施例提供了一种解码器,该解码器包括解析单元、第一确定单元、第一偏移单元、第一构建单元和第一预测单元;其中,In a third aspect, the embodiment of the present application provides a decoder, which includes an analysis unit, a first determination unit, a first offset unit, a first construction unit, and a first prediction unit; wherein,
所述解析单元,配置为解析码流,获取当前块的预测模式参数;The parsing unit is configured to parse the code stream to obtain the prediction mode parameters of the current block;
所述第一确定单元,配置为当所述预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值时,从所述当前块的多个已知运动信息中确定至少一个单向运动信息;The first determining unit is configured to determine at least one of the known motion information of the current block when the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine the inter-frame prediction value of the current block One-way motion information;
所述第一偏移单元,配置为基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息;其中,所述预设偏移量是根据所述至少一个单向运动信息对应的水平方向矢量值和垂直方向矢量值计算得到;The first offset unit is configured to perform offset processing on the at least one unidirectional motion information based on a preset offset to obtain at least one new unidirectional motion information; wherein the preset offset is Calculated according to the horizontal direction vector value and the vertical direction vector value corresponding to the at least one unidirectional motion information;
所述第一构建单元,配置为基于所述至少一个新的单向运动信息,构建新的运动信息候选列表;The first construction unit is configured to construct a new motion information candidate list based on the at least one new unidirectional motion information;
所述第一预测单元,配置为根据所述新的运动信息候选列表,确定所述当前块的帧间预测值。The first prediction unit is configured to determine an inter-prediction value of the current block according to the new motion information candidate list.
第四方面,本申请实施例提供了一种解码器,该解码器包括第一存储器和第一处理器;其中,In a fourth aspect, an embodiment of the present application provides a decoder, where the decoder includes a first memory and a first processor; wherein,
所述第一存储器,用于存储能够在所述第一处理器上运行的计算机程序;The first memory is used to store a computer program capable of running on the first processor;
所述第一处理器,用于在运行所述计算机程序时,执行如第一方面所述的方法。The first processor is configured to execute the method as described in the first aspect when running the computer program.
第五方面,本申请实施例提供了一种编码器,该编码器包括第二确定单元、第二偏移单元、第二构建单元和第二预测单元;其中,In the fifth aspect, the embodiment of the present application provides an encoder, which includes a second determination unit, a second offset unit, a second construction unit, and a second prediction unit; wherein,
所述第二确定单元,配置为确定当前块的预测模式参数;The second determination unit is configured to determine a prediction mode parameter of the current block;
所述第二确定单元,还配置为当所述预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值时,从所述当前块的多个已知运动信息中确定至少一个单向运动信息;The second determining unit is further configured to determine at least A one-way motion message;
所述第二偏移单元,配置为基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息;其中,所述预设偏移量是根据所述至少一个单向运动信息对应的水平方向矢量值和垂直方向矢量值计算得到;The second offset unit is configured to perform offset processing on the at least one unidirectional motion information based on a preset offset to obtain at least one new unidirectional motion information; wherein the preset offset is Calculated according to the horizontal direction vector value and the vertical direction vector value corresponding to the at least one unidirectional motion information;
所述第二构建单元,配置为基于所述至少一个新的单向运动信息,构建新的运动信息候选列表;The second construction unit is configured to construct a new motion information candidate list based on the at least one new unidirectional motion information;
所述第二预测单元,配置为根据所述新的运动信息候选列表,确定所述当前块的帧间预测值。The second prediction unit is configured to determine an inter-prediction value of the current block according to the new motion information candidate list.
第六方面,本申请实施例提供了一种编码器,该编码器包括第二存储器和第二处理器;其中,In a sixth aspect, the embodiment of the present application provides an encoder, the encoder includes a second memory and a second processor; wherein,
所述第二存储器,用于存储能够在所述第二处理器上运行的计算机程序;The second memory is used to store a computer program capable of running on the second processor;
所述第二处理器,用于在运行所述计算机程序时,执行如第二方面所述的方法。The second processor is configured to execute the method as described in the second aspect when running the computer program.
第七方面,本申请实施例提供了一种计算机存储介质,该计算机存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现如第一方面所述的方法、或者被第二处理器执行时实现如第二方面所述的方法。In the seventh aspect, the embodiment of the present application provides a computer storage medium, the computer storage medium stores a computer program, and when the computer program is executed by the first processor, the method as described in the first aspect is implemented, or the computer program is executed by the second processor. The processor realizes the method described in the second aspect when executing.
本申请实施例所提供的一种帧间预测方法、编码器、解码器以及计算机存储介质,解析码流,获取当前块的预测模式参数;当所述预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值时,从所述当前块的多个已知运动信息中确定至少一个单向运动信息;基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息;其中,所述预设偏移量是根据所述至少一个单向运动信息对应的水平方向矢量值和垂直方向矢量值计算得到;基于所述至少一个新的单向运动信息,构建新的运动信息候选列表;根据所述新的运动信息候选列表,确定所述当前块的帧间预测值。这样,在得到至少一个新的单向运动信息之后,可以将新的单向运动信息填入运动信息候选列表中,能够增加运动信息候选列表中运动信息的多样性;另外,对当前块来说,运动信息候选列表中初始运动信息与实际的运动信息可能存在偏差,这时候构造新的单向运动信息将会比初始运动信息具有更好的效果,从而提升了编解码性能。An inter-frame prediction method, an encoder, a decoder, and a computer storage medium provided in the embodiments of the present application analyze the code stream to obtain the prediction mode parameters of the current block; when the prediction mode parameters indicate to use the preset inter-frame prediction When determining the inter-frame prediction value of the current block, at least one unidirectional motion information is determined from a plurality of known motion information of the current block; the at least one unidirectional motion information is offset based on a preset offset Processing, obtaining at least one new unidirectional motion information; wherein, the preset offset is calculated according to the horizontal direction vector value and the vertical direction vector value corresponding to the at least one unidirectional motion information; based on the at least one The new unidirectional motion information is used to construct a new motion information candidate list; and the inter-frame prediction value of the current block is determined according to the new motion information candidate list. In this way, after obtaining at least one new unidirectional motion information, the new unidirectional motion information can be filled in the motion information candidate list, which can increase the diversity of motion information in the motion information candidate list; in addition, for the current block , the initial motion information in the motion information candidate list may deviate from the actual motion information. At this time, constructing new unidirectional motion information will have a better effect than the initial motion information, thereby improving the encoding and decoding performance.
附图说明Description of drawings
图1为本申请实施例提供的一种视频编码系统的组成框图示意图;FIG. 1 is a schematic block diagram of a video coding system provided by an embodiment of the present application;
图2为本申请实施例提供的一种视频解码系统的组成框图示意图;FIG. 2 is a schematic block diagram of a video decoding system provided by an embodiment of the present application;
图3为本申请实施例提供的一种帧间预测方法的流程示意图;FIG. 3 is a schematic flowchart of an inter-frame prediction method provided by an embodiment of the present application;
图4为本申请实施例提供的一种典型图像组的结构示意图;FIG. 4 is a schematic structural diagram of a typical image group provided in the embodiment of the present application;
图5为本申请实施例提供的另一种帧间预测方法的流程示意图;FIG. 5 is a schematic flowchart of another inter-frame prediction method provided by an embodiment of the present application;
图6A为本申请实施例提供的一种GPM在64×64的当前块上多种划分模式的权重分配示意图;FIG. 6A is a schematic diagram of the weight distribution of multiple division modes of a GPM on a 64×64 current block provided by an embodiment of the present application;
图6B为本申请实施例提供的一种AWP在64×64的当前块上多种划分模式的权重分配示意图;FIG. 6B is a schematic diagram of the weight distribution of various division modes of an AWP on a 64×64 current block provided by the embodiment of the present application;
图7为本申请实施例提供的一种当前块与相邻块的空间位置关系示意图;FIG. 7 is a schematic diagram of a spatial position relationship between a current block and adjacent blocks provided by an embodiment of the present application;
图8为本申请实施例提供的又一种帧间预测方法的流程示意图;FIG. 8 is a schematic flowchart of another inter-frame prediction method provided by an embodiment of the present application;
图9为本申请实施例提供的一种解码器的组成结构示意图;FIG. 9 is a schematic structural diagram of a decoder provided in an embodiment of the present application;
图10为本申请实施例提供的一种解码器的硬件结构示意图;FIG. 10 is a schematic diagram of a hardware structure of a decoder provided in an embodiment of the present application;
图11为本申请实施例提供的一种编码器的组成结构示意图;FIG. 11 is a schematic diagram of the composition and structure of an encoder provided in an embodiment of the present application;
图12为本申请实施例提供的一种编码器的硬件结构示意图。FIG. 12 is a schematic diagram of a hardware structure of an encoder provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。可以理解的是,此处所描述的具体实施例仅仅用于解释相关申请,而非对该申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关申请相关的部分。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific embodiments described here are only used to explain the related application, not to limit the application. It should also be noted that, for the convenience of description, only the parts related to the relevant application are shown in the drawings.
在视频图像中,一般采用第一图像分量、第二图像分量和第三图像分量来表征当前块(Coding Block,CB);其中,这三个图像分量分别为一个亮度分量、一个蓝色色度分量和一个红色色度分量,具体地,亮度分量通常使用符号Y表示,蓝色色度分量通常使用符号Cb或者U表示,红色色度分量通常使用符号Cr或者V表示;这样,视频图像可以用YCbCr格式表示,也可以用YUV格式表示。In a video image, the current block (Coding Block, CB) is generally represented by the first image component, the second image component and the third image component; where these three image components are a luminance component and a blue chrominance component respectively And a red chrominance component, specifically, the luminance component is usually represented by the symbol Y, the blue chrominance component is usually represented by the symbol Cb or U, and the red chrominance component is usually represented by the symbol Cr or V; thus, the video image can be expressed in the YCbCr format Indicates that it can also be expressed in YUV format.
目前,通用的视频编解码标准基于都采用基于块的混合编码框架。视频图像中的每一帧被分割成相同大小(比如128×128,64×64等)的正方形的最大编码单元(LargestCoding Unit,LCU),每个最大编码单元还可以根据规则划分成矩形的编码单元(CodingUnit,CU);而且编码单元可能还会划分成更小的预测单元(Prediction Unit,PU)。具体地,混合编码框架可以包括有预测、变换(Transform)、量化(Quantization)、熵编码(EntropyCoding)、环路滤波(In Loop Filter)等模块;其中,预测模块可以包括帧内预测(intraprediction)和帧间预测(inter prediction),帧间预测可以包括运动估计(motionestimation)和运动补偿(motion compensation)。由于视频图像的一个帧内相邻像素之间存在很强的相关性,在视频编解码技术中使用帧内预测方式能够消除相邻像素之间的空间冗余;但是由于视频图像中的相邻帧之间也存在着很强的相似性,在视频编解码技术中使用帧间预测方式消除相邻帧之间的时间冗余,从而能够提高编码效率。下述本申请将以帧间预测进行详细描述。Currently, common video codec standards are based on a block-based hybrid coding framework. Each frame in the video image is divided into square largest coding units (Largest Coding Unit, LCU) of the same size (such as 128×128, 64×64, etc.), and each largest coding unit can also be divided into rectangular coding units according to the rules. Unit (CodingUnit, CU); and the coding unit may be divided into smaller prediction units (Prediction Unit, PU). Specifically, the hybrid coding framework may include prediction, transformation (Transform), quantization (Quantization), entropy coding (EntropyCoding), loop filtering (In Loop Filter) and other modules; wherein, the prediction module may include intra prediction (intraprediction) And inter prediction (inter prediction), inter prediction can include motion estimation (motionestimation) and motion compensation (motion compensation). Due to the strong correlation between adjacent pixels in a video image, the use of intra-frame prediction in video coding and decoding technology can eliminate the spatial redundancy between adjacent pixels; however, due to the adjacent There is also a strong similarity between frames. In video coding and decoding technology, inter-frame prediction is used to eliminate time redundancy between adjacent frames, thereby improving coding efficiency. The following application will use inter-frame prediction for detailed description.
应理解,本申请实施例提供一种视频编码系统,如图1所示,该视频编码系统11可以包括:变换单元111、量化单元112、模式选择和编码控制逻辑单元113、帧内预测单元114、帧间预测单元115(包括:运动补偿和运动估计)、反量化单元116、反变换单元117、环路滤波单元118、编码单元119和解码图像缓存单元120;针对输入的原始视频信号,通过编码树块(Coding Tree Unit,CTU)的划分可以得到一个视频重建块,通过模式选择和编码控制逻辑单元113确定编码模式,然后,对经过帧内或帧间预测后得到的残差像素信息,通过变换单元111、量化单元112对该视频重建块进行变换,包括将残差信息从像素域变换到变换域,并对所得的变换系数进行量化,用以进一步减少比特率;帧内预测单元114用于对该视频重建块进行帧内预测;其中,帧内预测单元114用于确定该视频重建块的最优帧内预测模式(即目标预测模式);帧间预测单元115用于执行所接收的视频重建块相对于一或多个参考帧中的一或多个块的帧间预测编码,以提供时间预测信息;其中吗,运动估计为产生运动向量的过程,所述运动向量可以估计该视频重建块的运动,然后,运动补偿基于由运动估计所确定的运动向量执行运动补偿;在确定帧间预测模式之后,帧间预测单元115还用于将所选择的帧间预测数据提供到编码单元119,而且,将所计算确定的运动向量数据也发送到编码单元119;此外,反量化单元116和反变换单元117用于该视频重建块的重构建,在像素域中重构建残差块,该重构建残差块通过环路滤波单元118去除方块效应伪影,然后,将该重构残差块添加到解码图像缓存单元120的帧中的一个预测性块,用以产生经重构建的视频重建块;编码单元119是用于编码各种编码参数及量化后的变换系数。而解码图像缓存单元120用于存放重构建的视频重建块,用于预测参考。随着视频图像编码的进行,会不断生成新的重构建的视频重建块,这些重构建的视频重建块都会被存放在解码图像缓存单元120中。It should be understood that the embodiment of the present application provides a video coding system. As shown in FIG. , inter-frame prediction unit 115 (comprising: motion compensation and motion estimation), inverse quantization unit 116, inverse transformation unit 117, loop filter unit 118, encoding unit 119 and decoded image buffer unit 120; for the original video signal input, by A video reconstruction block can be obtained by dividing the coding tree block (Coding Tree Unit, CTU), and the coding mode is determined by the mode selection and coding control logic unit 113, and then, for the residual pixel information obtained after intra-frame or inter-frame prediction, The video reconstruction block is transformed by the transformation unit 111 and the quantization unit 112, including transforming the residual information from the pixel domain to the transformation domain, and quantizing the obtained transformation coefficients to further reduce the bit rate; the intra prediction unit 114 It is used to perform intra-frame prediction on the video reconstruction block; wherein, the intra-frame prediction unit 114 is used to determine the optimal intra-frame prediction mode (ie, the target prediction mode) of the video reconstruction block; the inter-frame prediction unit 115 is used to execute the received Inter-frame prediction coding of video reconstruction blocks relative to one or more blocks in one or more reference frames to provide temporal prediction information; where, motion estimation is the process of generating motion vectors, which can estimate the The video reconstructs the motion of the block, and then motion compensation performs motion compensation based on the motion vector determined by the motion estimation; after determining the inter prediction mode, the inter prediction unit 115 is also used to provide the selected inter prediction data to the encoding unit 119, and also send the calculated and determined motion vector data to the encoding unit 119; in addition, the inverse quantization unit 116 and the inverse transformation unit 117 are used for the reconstruction of the video reconstruction block, and reconstruct the residual block in the pixel domain , the reconstructed residual block is passed through the loop filter unit 118 to remove blockiness artifacts, and then the reconstructed residual block is added to a predictive block in the frame of the decoded image buffer unit 120 to generate a reconstructed The video reconstruction block; the encoding unit 119 is used to encode various encoding parameters and quantized transform coefficients. The decoded
本申请实施例还提供一种视频解码系统,如图2所示,该视频解码系统12可以包括:解码单元121、反变换单元127,反量化单元122、帧内预测单元123、运动补偿单元124、环路滤波单元125和解码图像缓存单元126单元;输入的视频信号经过视频编码系统11进行编码处理之后,输出该视频信号的码流;该码流输入视频解码系统12中,首先经过解码单元121,用于得到解码后的变换系数;针对该变换系数通过反变换单元127与反量化单元122进行处理,以便在像素域中产生残差块;帧内预测单元123可用于基于所确定的帧内预测方向和来自当前帧或图片的先前经解码块的数据而产生当前视频解码块的预测数据;运动补偿单元124是通过剖析运动向量和其他关联语法元素来确定用于视频解码块的预测信息,并使用该预测信息以产生正被解码的视频解码块的预测性块;通过对来自反变换单元127与反量化单元122的残差块与由帧内预测单元123或运动补偿单元124产生的对应预测性块进行求和,而形成解码的视频块;该解码的视频信号通过环路滤波单元125以便去除方块效应伪影,可以改善视频质量;然后将经解码的视频块存储于解码图像缓存单元126中,解码图像缓存单元126存储用于后续帧内预测或运动补偿的参考图像,同时也用于视频信号的输出,得到所恢复的原始视频信号。The embodiment of the present application also provides a video decoding system. As shown in FIG. 2, the video decoding system 12 may include: a decoding unit 121, an inverse transformation unit 127, an inverse quantization unit 122, an intra prediction unit 123, and a motion compensation unit 124 , loop filtering unit 125 and decoded image cache unit 126 unit; after the video signal of input is coded through video encoding system 11, output the code stream of this video signal; This code stream is input in video decoding system 12, first passes through decoding unit 121, used to obtain the decoded transform coefficient; the transform coefficient is processed by the inverse transform unit 127 and the inverse quantization unit 122, so as to generate a residual block in the pixel domain; the intra prediction unit 123 can be used to Intra-prediction direction and data from previously decoded blocks of the current frame or picture to generate prediction data for the current video decoding block; the motion compensation unit 124 determines the prediction information for the video decoding block by parsing motion vectors and other associated syntax elements , and use the prediction information to generate the predictive block of the video decoding block being decoded; The corresponding predictive blocks are summed to form a decoded video block; the decoded video signal is passed through the loop filter unit 125 in order to remove block artifacts, which can improve video quality; and then the decoded video block is stored in the decoded image buffer In unit 126, the decoded image buffer unit 126 stores reference images for subsequent intra-frame prediction or motion compensation, and is also used for outputting video signals to obtain restored original video signals.
本申请实施例提供的一种帧间预测方法主要作用于视频编码系统11的帧间预测单元215和视频解码系统12的帧间预测单元,即运动补偿单元124;也就是说,如果在视频编码系统11能够通过本申请实施例提供的帧间预测方法得到一个较好的预测效果,那么,对应地,在视频解码系统12,也能够改善视频解码恢复质量。An inter-frame prediction method provided by the embodiment of the present application mainly acts on the inter-frame prediction unit 215 of the
基于此,下面结合附图和实施例对本申请的技术方案进一步详细阐述。在进行详细阐述之前,需要说明的是,说明书通篇中提到的“第一”、“第二”、“第三”等,仅仅是为了区分不同的特征,不具有限定优先级、先后顺序、大小关系等功能。Based on this, the technical solution of the present application will be further elaborated below in conjunction with the drawings and embodiments. Before elaborating in detail, it should be noted that the "first", "second", and "third" mentioned throughout the specification are only for distinguishing different features, and do not limit the priority or sequence , size relationship and other functions.
本申请实施例提供一种帧间预测方法,该方法应用于视频解码设备,即解码器。该方法所实现的功能可以通过解码器中的第一处理器调用计算机程序来实现,当然计算机程序可以保存在第一存储器中,可见,该解码器至少包括第一处理器和第一存储器。An embodiment of the present application provides an inter-frame prediction method, which is applied to a video decoding device, that is, a decoder. The functions realized by this method can be realized by calling the computer program by the first processor in the decoder. Of course, the computer program can be stored in the first memory. It can be seen that the decoder includes at least the first processor and the first memory.
参见图3,其示出了本申请实施例一种帧间预测方法的流程示意图。如图3所示,该方法可以包括:Referring to FIG. 3 , it shows a schematic flowchart of an inter-frame prediction method according to an embodiment of the present application. As shown in Figure 3, the method may include:
S301:解析码流,获取当前块的预测模式参数。S301: Parsing the code stream to obtain the prediction mode parameter of the current block.
需要说明的是,待解码图像可以划分为多个图像块,而当前待解码的图像块可以称为当前块(可以用CU表示),与当前块相邻的图像块可以称为相邻块;即在待解码图像中,当前块与相邻块之间具有相邻关系。这里,每个当前块可以包括第一图像分量、第二图像分量和第三图像分量,也即当前块表示待解码图像中当前待进行第一图像分量、第二图像分量或者第三图像分量预测的图像块。It should be noted that the image to be decoded can be divided into multiple image blocks, and the current image block to be decoded can be called the current block (may be represented by CU), and the image blocks adjacent to the current block can be called adjacent blocks; That is, in the image to be decoded, there is an adjacent relationship between the current block and adjacent blocks. Here, each current block may include a first image component, a second image component, and a third image component, that is, the current block indicates that the first image component, the second image component, or the third image component are currently to be predicted in the image to be decoded. image blocks.
其中,假定当前块进行第一图像分量预测,而且第一图像分量为亮度分量,即待预测图像分量为亮度分量,那么当前块也可以称为亮度块;或者,假定当前块进行第二图像分量预测,而且第二图像分量为色度分量,即待预测图像分量为色度分量,那么当前块也可以称为色度块。Wherein, assuming that the current block performs the first image component prediction, and the first image component is a brightness component, that is, the image component to be predicted is a brightness component, then the current block may also be called a brightness block; or, it is assumed that the current block performs the second image component prediction, and the second image component is a chroma component, that is, the image component to be predicted is a chroma component, then the current block may also be called a chroma block.
还需要说明的是,预测模式参数指示了当前块采用的预测模式以及与该预测模式相关的参数。其中,预测模式通常包括有帧间预测模式、传统帧内预测模式和非传统帧内预测模式等,而帧间预测模式又包括有普通帧间预测模式、GPM预测模式和AWP预测模式等。也就是说,编码器会选取最优的预测模式对当前块进行预编码,在这过程中就可以确定出当前块的预测模式,从而将相应的预测模式参数写入码流,由编码器传输到解码器。It should also be noted that the prediction mode parameter indicates the prediction mode adopted by the current block and parameters related to the prediction mode. Among them, the prediction mode usually includes an inter prediction mode, a traditional intra prediction mode, and a non-traditional intra prediction mode, and the inter prediction mode includes a common inter prediction mode, a GPM prediction mode, and an AWP prediction mode. That is to say, the encoder will select the optimal prediction mode to pre-encode the current block. During this process, the prediction mode of the current block can be determined, and the corresponding prediction mode parameters will be written into the code stream and transmitted by the encoder. to the decoder.
这样,在解码器侧,通过解析码流就可以直接获取到当前块的预测模式参数,根据所获取的预测模式参数用以确定当前块是否使用预设的帧间预测模式,比如GPM预测模式或AWP预测模式。In this way, on the decoder side, the prediction mode parameters of the current block can be obtained directly by parsing the code stream, and the obtained prediction mode parameters are used to determine whether the current block uses a preset inter-frame prediction mode, such as GPM prediction mode or AWP prediction mode.
S302:当所述预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值时,从所述当前块的多个已知运动信息中确定至少一个单向运动信息。S302: When the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine an inter-prediction value of the current block, determine at least one piece of unidirectional motion information from a plurality of pieces of known motion information of the current block.
需要说明的是,在解码器解析码流获取到预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值的情况下,就可以采用本申请实施例所提供的帧间预测方法。It should be noted that when the decoder parses the code stream and obtains the prediction mode parameter indicating that the preset inter prediction mode is used to determine the inter prediction value of the current block, the inter prediction provided by the embodiment of the present application can be used method.
还需要说明的是,运动信息可以包括运动矢量(Motion Vector,MV)信息和参考帧信息。具体地,对于使用帧间预测的当前块而言,该当前块所在的当前帧具有一个或多个参考帧,而当前块可以是编码单元或预测单元,可以使用一个包含一组运动矢量和参考帧信息的运动信息指示到某一参考帧内一个与当前块大小相同的像素区域,这里称之为参考块,也可以使用一个包含两组运动矢量和参考帧信息的运动信息指示到某两个可以相同也可以不同的参考帧内的两个参考块;然后运动补偿可以根据运动信息所指示的参考块得到当前块的帧间预测值。It should also be noted that the motion information may include motion vector (Motion Vector, MV) information and reference frame information. Specifically, for a current block that uses inter-frame prediction, the current frame where the current block is located has one or more reference frames, and the current block can be a coding unit or a prediction unit, and a set of motion vectors and reference frames can be used. The motion information of the frame information indicates to a pixel area of the same size as the current block in a certain reference frame, which is called a reference block here, or a motion information containing two sets of motion vectors and reference frame information can be used to indicate to a certain two Two reference blocks in the same or different reference frame; then the motion compensation can obtain the inter-frame prediction value of the current block according to the reference block indicated by the motion information.
应理解,P帧(Predictive Frame)是只能使用图像播放顺序(Picture OrderCount,POC)在当前帧之前的参考帧进行预测的帧。这时候当前参考帧只有一个参考帧列表,用RefPicList0表示;且RefPicList0中都是POC在当前帧之前的参考帧。B帧(Bi-directional Interpolated Prediction Frame)早期是可以使用POC在当前帧之前的参考帧及POC在当前帧之后的参考帧进行预测的帧。B帧有两个参考帧列表,分别用RefPicList0和RefPicList1表示;其中,RefPicList0中都是POC在当前帧之前的参考帧,RefPicList1中都是POC在当前帧之后的参考帧。对于当前块而言,可以只参考RefPicList0中某一帧的参考块,这种情况可称为前向预测;或者也可以只参考RefPicList1中某一帧的参考块,这种情况可称为后向预测;或者还可以同时参考RefPicList0中某一帧的参考块和RefPicList1中某一帧的参考块,这种情况可称为双向预测。同时参考两个参考块的一种简单方式是将两个参考块内每一个对应位置的像素进行平均以得到当前块内每一像素的帧间预测值(或者可以称为预测块)。后期B帧不再限制RefPicList0中都是POC在当前帧之前的参考帧,RefPicList1中都是POC在当前帧之后的参考帧。换句话说,RefPicList0中也可以有POC在当前帧之后的参考帧,RefPicList1中也可以有POC在当前帧之前的参考帧,也即是指当前块可以同时参考POC在当前帧之前的参考帧或者同时参考POC在当前帧之后的参考帧。但是当前块为双向预测时所使用的参考帧必须一个来自于RefPicList0,一个来自于RefPicList1;这种B帧也称为广义B帧。It should be understood that a P frame (Predictive Frame) is a frame that can only be predicted using a reference frame whose Picture Order Count (POC) is before the current frame. At this time, the current reference frame has only one reference frame list, represented by RefPicList0; and RefPicList0 is the reference frame of the POC before the current frame. A B frame (Bi-directional Interpolated Prediction Frame) is a frame that can be predicted using the reference frame of the POC before the current frame and the reference frame of the POC after the current frame. The B frame has two reference frame lists, which are respectively represented by RefPicList0 and RefPicList1; among them, RefPicList0 is the reference frame of POC before the current frame, and RefPicList1 is the reference frame of POC after the current frame. For the current block, you can only refer to the reference block of a certain frame in RefPicList0, which is called forward prediction; or you can only refer to the reference block of a certain frame in RefPicList1, which is called backward prediction prediction; or can also refer to a reference block of a certain frame in RefPicList0 and a reference block of a certain frame in RefPicList1 at the same time, and this situation can be called bidirectional prediction. A simple way to refer to two reference blocks at the same time is to average the pixels at each corresponding position in the two reference blocks to obtain an inter-frame prediction value (or may be called a prediction block) for each pixel in the current block. The later B frame is no longer limited to the reference frame of POC before the current frame in RefPicList0, and the reference frame of POC after the current frame in RefPicList1. In other words, RefPicList0 can also have a reference frame of POC after the current frame, and RefPicList1 can also have a reference frame of POC before the current frame, that is, the current block can refer to the reference frame of POC before the current frame or At the same time refer to the reference frame of the POC after the current frame. However, the reference frames used when the current block is bidirectionally predicted must come from RefPicList0 and RefPicList1; such B frames are also called generalized B frames.
由于随机访问(Random Access,RA)配置的编解码顺序与POC顺序不同,这样B帧可以同时参考当前帧之前的信息和当前帧之后的信息,能够明显提高编码性能。示例性地,RA的一种经典的图像组(Group Of Pictures,GOP)结构如图4所示,在图4中,箭头表示参考关系,由于I帧不需要参考帧,那么在POC为0的I帧解码后,将会解码POC为4的P帧,而在解码POC为4的P帧时可以参考POC为0的I帧。在POC为4的P帧解码后,然后再解码POC为2的B帧,而在解码POC为2的B帧时可以参考POC为0的I帧和POC为4的P帧,等等。这样,根据图4可以得到,POC顺序为{0 1 2 3 4 56 7 8}的情况下,其对应的解码顺序为{0 3 2 4 1 7 6 8 5}。Since the encoding and decoding order of the Random Access (RA) configuration is different from the POC order, the B frame can refer to the information before and after the current frame at the same time, which can significantly improve the encoding performance. Exemplarily, a classic group of pictures (Group Of Pictures, GOP) structure of RA is shown in Figure 4, in Figure 4, the arrow represents the reference relationship, since the I frame does not require a reference frame, then the POC is 0 After the I frame is decoded, the P frame with the POC of 4 will be decoded, and the I frame with the POC of 0 can be referred to when decoding the P frame with the POC of 4. After decoding the P frame with
另外,低延迟(Low Delay,LD)配置的编解码顺序与POC顺序是相同的,这时候当前帧只能参考当前帧之前的信息。其中,Low Delay配置又分Low Delay P和Low Delay B。LowDelay P即传统的Low Delay配置。其典型的结构是IPPP……,即先编解码一个I帧,之后解码的帧都是P帧。Low Delay B的典型结构是IBBB……,与Low Delay P的区别在于每个帧间帧都是B帧,即使用两个参考帧列表,当前块可以同时参考RefPicList0中的某一帧的参考块和RefPicList1中的某一帧的参考块。这里,当前帧的一个参考帧列表最多可以有几个参考帧,如2个、3个或4个等。当编码或解码某一个当前帧时,RefPicList0和RefPicList1内各有哪几个参考帧是由预设配置或算法决定的,但是同一个参考帧可以同时出现在RefPicList0和RefPicList1中,即编码器或解码器允许当前块同时参考同一个参考帧中的两个参考块。In addition, the codec sequence of the Low Delay (LD) configuration is the same as the POC sequence, and at this time, the current frame can only refer to the information before the current frame. Among them, the Low Delay configuration is divided into Low Delay P and Low Delay B. LowDelay P is the traditional Low Delay configuration. Its typical structure is IPPP..., that is, an I frame is coded and decoded first, and then the decoded frames are all P frames. The typical structure of Low Delay B is IBBB..., and the difference from Low Delay P is that each inter frame is a B frame, that is, two reference frame lists are used, and the current block can refer to the reference block of a certain frame in RefPicList0 at the same time and a reference block of a certain frame in RefPicList1. Here, a reference frame list of the current frame can have at most several reference frames, such as 2, 3 or 4 and so on. When encoding or decoding a current frame, the number of reference frames in RefPicList0 and RefPicList1 is determined by the preset configuration or algorithm, but the same reference frame can appear in RefPicList0 and RefPicList1 at the same time, that is, the encoder or decoder The filter allows the current block to refer to two reference blocks in the same reference frame at the same time.
在本申请实施例中,编码器或解码器通常可以使用参考帧列表里的索引值(用index表示)来对应参考帧。如果一个参考帧列表长度为4,那么index有0、1、2、3等四个值。例如,如果当前帧的RefPicList0有POC为5,4,3,0的4个参考帧,那么RefPicList0的index0为POC 5的参考帧,RefPicList0的index1为POC 4的参考帧,RefPicList0的index 2为POC3的参考帧,RefPicList0的index 3为POC 0的参考帧。In the embodiment of the present application, the encoder or the decoder can usually use the index value (indicated by index) in the reference frame list to correspond to the reference frame. If the length of a reference frame list is 4, then index has four values: 0, 1, 2, 3, etc. For example, if RefPicList0 of the current frame has 4 reference frames with POC of 5, 4, 3, and 0, then index0 of RefPicList0 is the reference frame of
目前的VVC视频编解码标准中,预设的帧间预测模式可以为GPM预测模式。目前的AVS3视频编解码标准中,预设的帧间预测模式可以为AWP预测模式。这两种预测模式虽然名称不同、具体的实现形式不同、但原理上是共通的,即这两种预测模式都可以适用本申请实施例的帧间预测方法。In the current VVC video codec standard, the preset inter-frame prediction mode may be a GPM prediction mode. In the current AVS3 video codec standard, the preset inter-frame prediction mode may be an AWP prediction mode. Although these two prediction modes have different names and different specific implementation forms, they are common in principle, that is, both prediction modes can be applied to the inter-frame prediction method of the embodiment of the present application.
具体来讲,对于GPM预测模式来说,如果使用GPM,那么码流中将会传输GPM下的预测模式参数,比如GPM具体的划分模式;通常情况下,GPM包括有64种划分模式。对于AWP预测模式来说,如果使用AWP,那么码流中将会传输AWP下的预测模式参数,比如AWP具体的划分模式;通常情况下,AWP包括有56种划分模式。Specifically, for the GPM prediction mode, if GPM is used, the prediction mode parameters under GPM will be transmitted in the code stream, such as the specific division mode of GPM; usually, GPM includes 64 division modes. For the AWP prediction mode, if AWP is used, the prediction mode parameters under AWP will be transmitted in the code stream, such as the specific division mode of AWP; usually, AWP includes 56 division modes.
在预设的预测模式下,比如GPM和AWP均需要使用两个单向运动信息查找两个参考块。目前的实现方式是在编码器侧利用当前块之前已编码/已解码部分的相关信息构建一个单向运动信息候选列表,从单向运动信息候选列表中选择单向运动信息,将这两个单向运动信息在单向运动信息候选列表中的索引值(index)写入码流。在解码器侧采用同样的方式,即利用当前块之前已解码部分的相关信息构建一个单向运动信息候选列表,这个单向运动信息候选列表与编码器侧构建的候选列表一定是相同的。如此,从码流中解析出两个单向运动信息的索引值,然后从单向运动信息候选列表中查找出这两个单向运动信息即为当前块需要使用的两个单向运动信息。In the preset prediction mode, for example, GPM and AWP need to use two unidirectional motion information to find two reference blocks. The current implementation method is to construct a unidirectional motion information candidate list on the encoder side by using the relevant information of the coded/decoded part before the current block, select unidirectional motion information from the unidirectional motion information candidate list, and combine the two unidirectional motion information Write the code stream to the index value (index) of the motion information in the unidirectional motion information candidate list. The same method is adopted on the decoder side, that is, a unidirectional motion information candidate list is constructed using the relevant information of the decoded part before the current block, and the unidirectional motion information candidate list must be the same as the candidate list constructed on the encoder side. In this way, the index values of the two unidirectional motion information are parsed from the code stream, and then the two unidirectional motion information are found out from the unidirectional motion information candidate list, which is the two unidirectional motion information to be used by the current block.
也就是说,本申请实施例所描述的单向运动信息可以包括:运动矢量信息,即(x,y)的值,以及对应的参考帧信息,即参考帧列表及在参考帧列表中的参考索引值。一种表示方式是记录两个参考帧列表的参考索引值,其中一个参考帧列表对应的参考索引值有效,如0,1,2等;另一个参考帧列表对应的参考索引值为无效,即-1。参考索引值有效的参考帧列表即为当前块的运动信息所使用的参考帧列表,根据参考索引值可以从该参考帧列表中查找到对应的参考帧。每个参考帧列表都有一个对应的运动矢量,有效的参考帧列表对应的运动矢量是有效的,无效的参考帧列表对应的运动矢量是无效的。解码器可以通过单向运动信息中的参考帧信息找到所需的参考帧,根据当前块的位置以及运动矢量即(x,y)的值可以在参考帧中找到参考块,进而确定出当前块的帧间预测值。That is to say, the unidirectional motion information described in the embodiment of the present application may include: motion vector information, that is, the value of (x, y), and corresponding reference frame information, that is, the reference frame list and the reference frame in the reference frame list. index value. One representation is to record the reference index values of two reference frame lists, where the reference index values corresponding to one reference frame list are valid, such as 0, 1, 2, etc.; the reference index values corresponding to the other reference frame list are invalid, namely -1. The reference frame list with valid reference index value is the reference frame list used by the motion information of the current block, and the corresponding reference frame can be found from the reference frame list according to the reference index value. Each reference frame list has a corresponding motion vector, the motion vector corresponding to the valid reference frame list is valid, and the motion vector corresponding to the invalid reference frame list is invalid. The decoder can find the required reference frame through the reference frame information in the unidirectional motion information, and can find the reference block in the reference frame according to the position of the current block and the value of the motion vector (x, y), and then determine the current block The inter-frame prediction value of .
实际应用中,单向运动信息候选列表的构建方式虽然使用了空域相邻块的运动信息和时域同位置块的运动信息,但是并不能保证单向运动信息候选列表一定能够填满。如果空域相邻块的运动单一,以及时域同位置块的运动信息与某些空域相邻块的运动信息相同,就可能导致单向运动信息候选列表内的单向运动信息数量小于预设数量,也就意味着单向运动信息候选列表处于未填满状态。更特殊地,如果现有方式所查找到的可用单向运动信息都相同,那么单向运动信息候选列表就会出现所有单向运动信息都相同的情况,主要是如果单向运动信息候选列表未填满,目前通常是利用最后一个有效的单向运动信息进行复制填满。但是GPM或AWP需要使用两个不同的参考块,如果查找到的两个单向运动信息均是相同的,即两个参考块是相同的,那么这样将会使得所得到的帧间预测值与原有的单向预测使用的参考块一样,然而GPM或AWP的开销更大,因为需要传输两个单向运动信息的index,以及GPM或AWP的预测模式参数,但其中有效的只有一个单向运动信息的index。这种情况下,GPM或AWP应该是不会被使用的。而且单向运动信息候选列表中的单向运动信息候选越少,可用的单向运动信息候选的组合(比如两个单向运动信息候选)就越少。但是GPM或AWP不仅在两个物体的边界会使用到,在两个运动不同区域的边缘也会使用到,比如一些形变,GPM或AWP有时候会达到不错的效果。但是如果空域相邻块的运动信息和时域同位置块的运动信息没有包含这种形变的运动信息,那么GPM或AWP就无法发挥作用。或者,针对某一当前块而言,编码器所选择的运动信息未必是最准确的运动信息,而是码率(rate)和失真(distortion)权衡最好的运动信息;因而编码的运动信息和实际的运动信息之间可能是存在偏差的,这种情况在低码率的配置下尤其明显;也就是仅通过当前的初始运动信息候选列表所构建的单向运动信息与当前块实际的运动信息可能是存在偏差的,将会影响到编解码的性能。In practical applications, although the construction method of the unidirectional motion information candidate list uses the motion information of adjacent blocks in space and the motion information of co-located blocks in time domain, it cannot guarantee that the unidirectional motion information candidate list can be filled. If the motion of adjacent blocks in the spatial domain is single, and the motion information of the same position block in the time domain is the same as that of some adjacent blocks in the spatial domain, the number of unidirectional motion information in the candidate list of unidirectional motion information may be less than the preset number , which means that the one-way motion information candidate list is not full. More specifically, if the available unidirectional motion information found by the existing method is the same, then the unidirectional motion information candidate list will have the same situation in which all the unidirectional motion information is the same, mainly if the unidirectional motion information candidate list is not Filling, currently, the last effective unidirectional motion information is usually used for copying and filling. However, GPM or AWP needs to use two different reference blocks. If the two unidirectional motion information found are the same, that is, the two reference blocks are the same, then this will make the obtained inter-frame prediction value and The original unidirectional prediction uses the same reference block, but the overhead of GPM or AWP is larger, because it needs to transmit the index of two unidirectional motion information, and the prediction mode parameters of GPM or AWP, but only one unidirectional is effective The index of the motion information. In this case, GPM or AWP should not be used. Moreover, the fewer unidirectional motion information candidates in the unidirectional motion information candidate list, the fewer available combinations of unidirectional motion information candidates (for example, two unidirectional motion information candidates). But GPM or AWP is not only used at the boundary of two objects, but also at the edge of two different areas of motion, such as some deformations, GPM or AWP can sometimes achieve good results. However, if the motion information of adjacent blocks in the space domain and the motion information of the co-located block in the time domain do not contain the motion information of this deformation, then GPM or AWP cannot play a role. Or, for a certain current block, the motion information selected by the encoder may not be the most accurate motion information, but the motion information with the best balance between the code rate (rate) and distortion (distortion); thus the coded motion information and There may be deviations between the actual motion information, which is especially obvious in low bit rate configurations; that is, the one-way motion information constructed only through the current initial motion information candidate list and the actual motion information of the current block There may be a deviation, which will affect the performance of the codec.
这时候,为了提高编解码的性能,本申请实施例就需要构造一些新的单向运动信息添加到单向运动信息候选列表中。这里的构造,可以是指不是通过已编码/已解码部分直接获取的已知运动信息,比如空域相邻块的运动信息及当前帧内当前块的相邻块的运动信息,或者更广泛一点,空域上的运动信息即当前帧已解码部分的运动信息、时域上的运动信息即其他帧(参考帧)中的运动信息,基于历史运动矢量列表中的历史运动信息等。需要注意的是,在构造出至少一个新的单向运动信息之前,首先需要从当前块的多个已知运动信息中确定出至少一个单向运动信息;而且每一个单向运动信息根据偏移信息的不同,可以构造出一个或多个新的单向运动信息。At this time, in order to improve the performance of encoding and decoding, the embodiment of the present application needs to construct some new unidirectional motion information and add it to the unidirectional motion information candidate list. The construction here can refer to known motion information that is not directly obtained through the encoded/decoded part, such as the motion information of adjacent blocks in the spatial domain and the motion information of adjacent blocks of the current block in the current frame, or more generally, The motion information in the space domain is the motion information of the decoded part of the current frame, the motion information in the time domain is the motion information in other frames (reference frames), based on the historical motion information in the historical motion vector list, etc. It should be noted that before constructing at least one new unidirectional motion information, at least one unidirectional motion information needs to be determined from multiple known motion information of the current block; and each unidirectional motion information is based on the offset According to different information, one or more new one-way motion information can be constructed.
在一些实施例中,当前块的多个已知运动信息至少可以包括:初始运动信息候选列表内的运动信息,和/或,所述当前块的空域运动信息,和/或,所述当前块的时域运动信息,和/或,所述当前块的历史运动信息。In some embodiments, the plurality of known motion information of the current block may at least include: motion information in the initial motion information candidate list, and/or, spatial domain motion information of the current block, and/or, the current block Time-domain motion information of the current block, and/or, historical motion information of the current block.
这里,针对初始运动信息候选列表,在一些实施例中,该方法还包括:基于当前块的相邻块的运动信息,确定初始运动信息候选列表。Here, for the initial motion information candidate list, in some embodiments, the method further includes: determining the initial motion information candidate list based on the motion information of adjacent blocks of the current block.
需要说明的是,初始运动信息候选列表中存在有至少一个单向运动信息。在解码器侧,当初始运动信息候选列表不包括重复的单向运动信息且初始运动信息候选列表内已有的单向运动信息数量小于预设数量时,表明了单向运动信息候选列表处于未填满状态时,可以从初始运动信息候选列表内选择运动信息,以得到至少一个单向运动信息;或者,也可以从已解码部分获取运动信息,比如从当前块的空域运动信息和/或当前块的时域运动信息和/或当前块的历史运动信息中获取运动信息,以得到至少一个单向运动信息。It should be noted that there is at least one piece of unidirectional motion information in the initial motion information candidate list. On the decoder side, when the initial motion information candidate list does not include repeated unidirectional motion information and the number of existing unidirectional motion information in the initial motion information candidate list is less than the preset number, it indicates that the unidirectional motion information candidate list is in the When the state is full, motion information can be selected from the initial motion information candidate list to obtain at least one unidirectional motion information; or, motion information can also be obtained from the decoded part, such as from the spatial domain motion information of the current block and/or the current The motion information is obtained from the time-domain motion information of the block and/or the historical motion information of the current block to obtain at least one piece of unidirectional motion information.
还需要说明的是,由于当前块的已知运动信息可以是单向运动信息,还可以是双向运动信息,需要对其进行判断。具体地,在一些实施例中,该方法还可以包括:It should also be noted that since the known motion information of the current block may be one-way motion information or two-way motion information, it needs to be judged. Specifically, in some embodiments, the method may also include:
若从初始运动信息候选列表内选择运动信息,则确定所选择的运动信息为单向运动信息;If motion information is selected from the initial motion information candidate list, then determining that the selected motion information is unidirectional motion information;
若从当前块的空域运动信息和/或所述当前块的时域运动信息和/或所述当前块的历史运动信息内选择运动信息,则判断所选择的运动信息是否为双向运动信息;If motion information is selected from the spatial motion information of the current block and/or the temporal motion information of the current block and/or the historical motion information of the current block, then judging whether the selected motion information is bidirectional motion information;
当所选择的运动信息为双向运动信息时,将所选择的运动信息拆分为两个单向运动信息,以执行从所述当前块的多个已知运动信息中确定至少一个单向运动信息的步骤。When the selected motion information is bidirectional motion information, the selected motion information is split into two unidirectional motion information, so as to determine at least one unidirectional motion information from a plurality of known motion information of the current block. step.
也就是说,在确定至少一个单向运动信息时,如果是从初始运动信息候选列表中选取运动信息,那所选取的运动信息为单向运动信息。如果是根据空域信息、时域信息、历史运动信息等,那么需要确定所选取的运动信息是否为单向;如果这个运动信息是双向运动信息,即两个参考帧列表的参考索引值都是有效值,这时候需要把它拆成两个单向运动信息分别处理。That is to say, when at least one unidirectional motion information is determined, if the motion information is selected from the initial motion information candidate list, the selected motion information is unidirectional motion information. If it is based on spatial information, time domain information, historical motion information, etc., then it is necessary to determine whether the selected motion information is one-way; if the motion information is two-way motion information, that is, the reference index values of the two reference frame lists are valid. value, at this time it needs to be split into two one-way motion information to be processed separately.
应理解,对于构造新的单向运动信息来说,主要涉及到至少一个单向运动信息的确定。下面将提供几种可能的实施方式来说明如何确定至少一个单向运动信息。It should be understood that the construction of new unidirectional motion information mainly involves the determination of at least one unidirectional motion information. Several possible implementations will be provided below to illustrate how to determine at least one piece of unidirectional motion information.
在一种可能的实施方式中,对于S302来说,所述从所述当前块的多个已知运动信息中确定至少一个单向运动信息,可以包括:In a possible implementation manner, for S302, the determining at least one unidirectional motion information from multiple known motion information of the current block may include:
从所述当前块的多个已知运动信息中,选择至少一个初始单向运动信息;Selecting at least one initial unidirectional motion information from a plurality of known motion information of the current block;
确定候选参考帧,将所选择的至少一个初始单向运动信息缩放到所述候选参考帧,得到至少一个缩放后的单向运动信息;determining a candidate reference frame, and scaling the selected at least one initial unidirectional motion information to the candidate reference frame to obtain at least one scaled unidirectional motion information;
将所述至少一个缩放后的单向运动信息确定为所述至少一个单向运动信息,且所述至少一个单向运动信息对应的参考帧信息均为所述候选参考帧。The at least one scaled unidirectional motion information is determined as the at least one unidirectional motion information, and the reference frame information corresponding to the at least one unidirectional motion information is the candidate reference frame.
需要说明的是,以一个单向运动信息为例,在从当前块的多个已知运动信息中任意选择一个初始单向运动信息后,首先选定一个候选参考帧,然后将该初始单向运动信息缩放到候选参考帧上,这时候所确定的一个单向运动信息即为缩放后的单向运动信息,而且对应的参考帧信息为候选参考帧;在这种情况下,根据这一个单向运动信息通过偏移方式所得到至少一个新的单向运动信息,这至少一个新的单向运动信息对应的参考帧信息也为候选参考帧。这里,候选参考帧是预先任意选定的参考帧。It should be noted that, taking a unidirectional motion information as an example, after arbitrarily selecting an initial unidirectional motion information from multiple known motion information of the current block, a candidate reference frame is first selected, and then the initial unidirectional motion information The motion information is scaled to the candidate reference frame. At this time, the determined one-way motion information is the scaled one-way motion information, and the corresponding reference frame information is the candidate reference frame; in this case, according to this one-way At least one new unidirectional motion information is obtained by offsetting the directional motion information, and the reference frame information corresponding to the at least one new unidirectional motion information is also a candidate reference frame. Here, the candidate reference frame is an arbitrarily selected reference frame in advance.
在另一种可能的实施方式中,,对于S302来说,所述从所述当前块的多个已知运动信息中确定至少一个单向运动信息,可以包括:In another possible implementation manner, for S302, the determining at least one unidirectional motion information from multiple pieces of known motion information of the current block may include:
确定候选参考帧;determining candidate reference frames;
从所述当前块的多个已知运动信息中选择所述至少一个单向运动信息,且所述至少一个单向运动信息对应的参考帧信息为所述候选参考帧。Selecting the at least one unidirectional motion information from multiple pieces of known motion information of the current block, and the reference frame information corresponding to the at least one unidirectional motion information is the candidate reference frame.
需要说明的是,仍以一个单向运动信息为例,可以首先选定一个候选参考帧,然后从当前块的多个已知运动信息中直接选择参考帧信息为候选参考帧的初始单向运动信息,这时候所确定的一个单向运动信息即为所选择的单向运动信息,而且对应的参考帧信息为候选参考帧;在这种情况下,根据这一个单向运动信息通过偏移方式所得到至少一个新的单向运动信息,这至少一个新的单向运动信息对应的参考帧信息也为候选参考帧。It should be noted that, still taking a unidirectional motion information as an example, a candidate reference frame can be selected first, and then the reference frame information can be directly selected from multiple known motion information of the current block as the initial unidirectional motion of the candidate reference frame Information, the one-way motion information determined at this time is the selected one-way motion information, and the corresponding reference frame information is the candidate reference frame; in this case, according to this one-way motion information through the offset method At least one new unidirectional motion information is obtained, and the reference frame information corresponding to the at least one new unidirectional motion information is also a candidate reference frame.
除此之外,本申请实施例还可以从当前块的多个已知运动信息中直接选择一个初始单向运动信息,这时候无需确定候选参考帧,但是后续所构造的至少一个新的单向运动信息对应的参考帧信息与所选择的初始单向运动信息对应的参考帧信息相同。In addition, the embodiment of the present application can also directly select an initial unidirectional motion information from a plurality of known motion information of the current block. At this time, there is no need to determine a candidate reference frame, but at least one new unidirectional motion information constructed subsequently The reference frame information corresponding to the motion information is the same as the reference frame information corresponding to the selected initial unidirectional motion information.
如此,在确定出至少一个单向运动信息之后,后续可以通过偏移方式构造出至少一个新的单向运动信息。In this way, after at least one piece of unidirectional motion information is determined, at least one new piece of unidirectional motion information may be subsequently constructed in an offset manner.
S303:基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息。S303: Perform offset processing on the at least one unidirectional motion information based on a preset offset to obtain at least one new unidirectional motion information.
需要说明的是,在得到至少一个单向运动信息之后,可以对其进行偏移处理,以得到至少一个新的单向运动信息;而且每一个单向运动信息根据偏移信息的不同,可以构造出一个或多个新的单向运动信息。这里,预设偏移量可以是根据所述至少一个单向运动信息对应的水平方向矢量值和垂直方向矢量值计算得到。It should be noted that after at least one unidirectional motion information is obtained, offset processing can be performed on it to obtain at least one new unidirectional motion information; and each unidirectional motion information can be constructed according to the difference of offset information Generate one or more new unidirectional motion messages. Here, the preset offset may be calculated according to the horizontal direction vector value and the vertical direction vector value corresponding to the at least one piece of unidirectional motion information.
在一些实施例中,对于S303来说,所述基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息,可以包括:In some embodiments, for S303, performing offset processing on the at least one unidirectional motion information based on a preset offset to obtain at least one new unidirectional motion information may include:
基于至少一个预设方向,按照预设偏移量对所述至少一个单向运动信息进行偏移处理,得到所述至少一个新的单向运动信息;其中,所述至少一个新的单向运动信息与所述至少一个单向运动信息对应的参考帧信息相同。Based on at least one preset direction, perform offset processing on the at least one unidirectional motion information according to a preset offset to obtain the at least one new unidirectional motion information; wherein, the at least one new unidirectional motion information The information is the same as the reference frame information corresponding to the at least one piece of unidirectional motion information.
需要说明的是,预设方向至少可以包括:向上方向,和/或,向下方向,和/或,向左方向,和/或,向右方向;这样,针对不同的预设方向,按照预设偏移量对至少一个单向运动信息进行偏移,那么可以得到不同新的单向运动信息。It should be noted that the preset direction may at least include: an upward direction, and/or, a downward direction, and/or, a leftward direction, and/or, a rightward direction; If the offset is used to offset at least one unidirectional motion information, different new unidirectional motion information can be obtained.
通常而言,可以根据当前块的已知运动信息来构造新的单向运动信息并加入运动信息候选列表。当运动信息候选列表中存在有运动信息时,可以根据运动信息候选列表中的运动信息进行构造;或者也可以根据通过已解码部分获取的运动信息进行构造,比如根据空域信息、时域信息、历史运动信息(即基于历史信息所得到的运动信息)等进行构造,以得到至少一个新的单向运动信息。也就是说,可以对已有MV进行偏移得到新的MV。假定已有MV的值为(x,y)。水平方向的预设偏移量用offsetx表示,竖直方向的预设偏移量用offsety表示,那么新的MV的值为(x+offsetx,y+offsety)。Generally speaking, new unidirectional motion information can be constructed according to the known motion information of the current block and added to the motion information candidate list. When there is motion information in the motion information candidate list, it can be constructed according to the motion information in the motion information candidate list; or it can be constructed according to the motion information obtained through the decoded part, such as according to spatial information, time domain information, history The motion information (that is, the motion information obtained based on the historical information) etc. is constructed to obtain at least one new unidirectional motion information. That is to say, an existing MV can be offset to obtain a new MV. Assume that the value of the existing MV is (x,y). The preset offset in the horizontal direction is represented by offsetx, and the preset offset in the vertical direction is represented by offsety, so the value of the new MV is (x+offsetx, y+offsety).
在一种可能的实施方式中,针对已有MV分别进行向上、向下、向左和向右的偏移得到不同的MV。如果针对已有MV进行向上偏移,预设偏移量的绝对值是offset,那么所构造的新的MV为(x,y-offset);如果针对已有MV进行向下偏移,预设偏移量的绝对值是offset,那么所构造的新的MV为(x,y+offset);如果针对已有MV进行向左偏移,预设偏移量的绝对值是offset,那么所构造的新的MV为(x-offset,y);如果针对已有MV进行向右偏移,预设偏移量的绝对值是offset,那么所构造的新的MV为(x+offset,y)。In a possible implementation manner, the existing MVs are respectively shifted upward, downward, leftward, and rightward to obtain different MVs. If an upward offset is performed for the existing MV, the absolute value of the preset offset is offset, then the constructed new MV is (x, y-offset); if a downward offset is performed for the existing MV, the preset The absolute value of the offset is offset, then the constructed new MV is (x, y+offset); if the existing MV is shifted to the left, the absolute value of the preset offset is offset, then the constructed The new MV is (x-offset, y); if the existing MV is shifted to the right, the absolute value of the default offset is offset, then the constructed new MV is (x+offset, y) .
由于运动信息候选列表中每一个单向运动信息不仅包括有MV,还有对应的参考帧信息。通常确定参考帧信息的方式是利用参考帧列表和在参考帧列表中对应的参考索引值。具体地,针对新构造出的单向运动信息,可以是让新构造出的单向运动信息与用于构造的已知运动信息对应的参考帧信息相同,或者是新构造出的单向运动信息与用于构造的已知运动信息对应的参考帧列表和参考索引值相同。Because each unidirectional motion information in the motion information candidate list includes not only MV, but also corresponding reference frame information. Usually, the way to determine the reference frame information is to use the reference frame list and the corresponding reference index value in the reference frame list. Specifically, for the newly constructed unidirectional motion information, the newly constructed unidirectional motion information may be the same as the reference frame information corresponding to the known motion information used for construction, or the newly constructed unidirectional motion information The list of reference frames corresponding to the known motion information used for construction is the same as the reference index value.
在另一种可能的实施方式中,将已知运动信息缩放到与该运动信息对应的参考帧不同的参考帧上,然后再进行MV的偏移,以得到新的单向运动信息。In another possible implementation manner, the known motion information is scaled to a reference frame different from the reference frame corresponding to the motion information, and then the MV is shifted to obtain new unidirectional motion information.
需要注意的是,本申请实施例主要适用于单向运动信息,但是同样适用于双向运动信息。如果运动信息是双向的,那么在两个方向的MV偏移方向可以是相同的,或者是相反的;预设偏移量可以是各自确定,也可以是共同确定。It should be noted that the embodiment of the present application is mainly applicable to unidirectional motion information, but is also applicable to bidirectional motion information. If the motion information is bidirectional, the MV offset directions in the two directions can be the same or opposite; the preset offsets can be determined separately or jointly.
还需要说明的是,预设偏移量可以是预先设定的固定值,或者,预设偏移量还可以是根据预设算法得到的,本申请实施例不作具体限定。It should also be noted that the preset offset may be a preset fixed value, or the preset offset may be obtained according to a preset algorithm, which is not specifically limited in this embodiment of the present application.
这里,针对预设偏移量而言,可以采用下述几种实施方式来确定。Here, for the preset offset, the following several implementation manners may be used to determine it.
在一种可能的实施方式中,预设偏移量可以为预设的固定值,比如固定的1、2、3、4、5、6、7、8等其中的某一值。In a possible implementation manner, the preset offset may be a preset fixed value, such as a fixed value of 1, 2, 3, 4, 5, 6, 7, 8, and the like.
在另一种可能的实施方式中,该方法还可以包括:In another possible implementation manner, the method may also include:
针对所述至少一个单向运动信息,确定每一单向运动信息对应的水平方向矢量值和垂直方向矢量值;For the at least one unidirectional motion information, determine a horizontal direction vector value and a vertical direction vector value corresponding to each unidirectional motion information;
在所述预设方向为向上方向和/或向下方向的情况下,判断所述垂直方向矢量值是否等于0;When the preset direction is an upward direction and/or a downward direction, it is judged whether the value of the vertical direction vector is equal to 0;
当所述垂直方向矢量值不等于0时,根据所述垂直方向矢量值的绝对值与第一预设值的除法运算,得到每一单向运动信息对应的预设偏移量;When the vector value in the vertical direction is not equal to 0, according to the division operation between the absolute value of the vector value in the vertical direction and the first preset value, the preset offset corresponding to each unidirectional motion information is obtained;
或者,or,
在所述预设方向为向左方向和/或向右方向的情况下,判断所述水平方向矢量值是否等于0;When the preset direction is a leftward direction and/or a rightward direction, determine whether the horizontal direction vector value is equal to 0;
当所述水平方向矢量值不等于0时,根据所述水平方向矢量值的绝对值与第二预设值的除法运算,得到每一单向运动信息对应的预设偏移量。When the horizontal direction vector value is not equal to 0, the preset offset corresponding to each unidirectional motion information is obtained according to the division operation between the absolute value of the horizontal direction vector value and the second preset value.
需要说明的是,预设偏移量可以与用于构造新MV的已有MV的(x,y)有关。其中,x表示水平方向矢量值,y表示垂直方向矢量值。It should be noted that the preset offset may be related to (x, y) of the existing MV used to construct the new MV. Among them, x represents the vector value in the horizontal direction, and y represents the vector value in the vertical direction.
在预设方向为向上方向和/或向下方向的情况下,如果对已有MV进行向上偏移,预设偏移量的绝对值是offset,那么offset的一种推导方式是如果y不等于0,那么offset=|y|/N,N可能是2,4,8等;如果y等于0,那么offset可以为固定值,这时候所构造的新的MV为(x,y-offset)。如果对已有MV进行向下偏移,预设偏移量的绝对值是offset,那么offset的一种推导方式是如果y不等于0,那么offset=|y|/N,N可能是2,4,8等;如果y等于0,那么offset可以为固定值,这时候所构造的新的MV为(x,y+offset)。In the case where the preset direction is the upward direction and/or the downward direction, if the existing MV is shifted upwards, the absolute value of the preset offset is offset, then one way of deriving the offset is if y is not equal to 0, then offset=|y|/N, N may be 2, 4, 8, etc.; if y is equal to 0, then offset can be a fixed value, and the new MV constructed at this time is (x, y-offset). If the existing MV is offset downward, the absolute value of the preset offset is offset, then one way of deriving offset is that if y is not equal to 0, then offset=|y|/N, N may be 2, 4, 8, etc.; if y is equal to 0, then offset can be a fixed value, and the new MV constructed at this time is (x, y+offset).
在预设方向为向左方向和/或向右方向的情况下,如果对已有MV进行向左偏移,预设偏移量的绝对值是offset,那么offset的一种推导方式如果x不等于0,那么offset=|x|/N,N可能是2,4,8等;如果x等于0,那么offset可以为固定值,这时候所构造的新的MV为(x-offset,y)。如果对已有MV进行向右偏移,预设偏移量的绝对值是offset,那么offset的一种推导方式是如果x不等于0,那么offset=|x|/N,N可能是2,4,8等;如果x等于0,那么offset为一个固定值,这时候所构造的新的MV为(x+offset,y)。In the case where the preset direction is leftward and/or rightward, if the existing MV is offset to the left, the absolute value of the preset offset is offset, then a way to derive offset if x is not is equal to 0, then offset=|x|/N, N may be 2, 4, 8, etc.; if x is equal to 0, then offset can be a fixed value, and the new MV constructed at this time is (x-offset, y) . If the existing MV is offset to the right, the absolute value of the preset offset is offset, then one way of deriving offset is that if x is not equal to 0, then offset=|x|/N, N may be 2, 4, 8, etc.; if x is equal to 0, then the offset is a fixed value, and the new MV constructed at this time is (x+offset, y).
在又一种可能的实施方式中,该方法还可以包括:In yet another possible implementation manner, the method may also include:
针对任意一种预设方向,将所述水平方向矢量值的绝对值和所述垂直方向矢量值的绝对值进行加法运算,得到计算和值;For any preset direction, the absolute value of the vector value in the horizontal direction and the absolute value of the vector value in the vertical direction are added to obtain a calculation sum;
判断所述计算和值是否等于0;Judging whether the calculated sum value is equal to 0;
当所述计算和值不等于0时,根据所述计算和值与第三预设值的除法运算,得到每一单向运动信息对应的预设偏移量。When the calculated sum value is not equal to 0, a preset offset corresponding to each unidirectional motion information is obtained according to a division operation between the calculated sum value and a third preset value.
需要说明的是,针对任何一个预设方向,可以预设偏移量可以与用于构造新MV的已有MV的|x|+|y|有关。其中,x表示水平方向矢量值,y表示垂直方向矢量值。It should be noted that, for any preset direction, the preset offset may be related to |x|+|y| of the existing MV used to construct the new MV. Among them, x represents the vector value in the horizontal direction, and y represents the vector value in the vertical direction.
也就是说,预设偏移量的绝对值是offset,如果|x|+|y|不等于0,那么offset=(|x|+|y|)/N,N可能是2,4,8等;如果|x|+|y|等于0,那么offset可以为固定值。That is to say, the absolute value of the preset offset is offset, if |x|+|y| is not equal to 0, then offset=(|x|+|y|)/N, N may be 2, 4, 8 etc.; if |x|+|y| is equal to 0, then offset can be a fixed value.
在又一种可能的实施方式中,该方法还可以包括:In yet another possible implementation manner, the method may also include:
针对每一单向运动信息,将所得到的预设偏移量与最小预设偏移量和最大预设偏移量分别比较;For each unidirectional motion information, comparing the obtained preset offset with the minimum preset offset and the maximum preset offset respectively;
在所得到的预设偏移量小于最小预设偏移量时,将所述最小预设偏移量确定为所述预设偏移量;When the obtained preset offset is less than the minimum preset offset, determining the minimum preset offset as the preset offset;
在所得到的预设偏移量大于最小预设偏移量时,将所述最大预设偏移量确定为所述预设偏移量。When the obtained preset offset is greater than the minimum preset offset, the maximum preset offset is determined as the preset offset.
也就是说,预设偏移量(用offset表示)的大小可能要符合一定的预设取值范围,比如在最小预设偏移量(用offsetmin表示)和最大预设偏移量(用offsetmax表示)之间的范围,即offset需要大于或等于offsetmin,offset还需要小于或等于offsetmax。如果根据上面的实施方式计算得到的offset小于offsetmin,那么将offset设定为offsetmin;如果根据上面的实施方式计算得到的offset大于offsetmax,那么将offset设定为offsetmax。这里,offsetmax和offsetmax可以为某些预设的固定值,但是本申请实施例不作限定。That is to say, the size of the preset offset (represented by offset) may conform to a certain preset value range, for example, between the minimum preset offset (represented by offset min ) and the maximum preset offset (represented by offset max indicates the range between), that is, offset needs to be greater than or equal to offset min , and offset needs to be less than or equal to offset max . If the offset calculated according to the above implementation manner is smaller than offset min , then set offset to offset min ; if the offset calculated according to the above implementation manner is greater than offset max , then set offset to offset max . Here, offset max and offset max may be some preset fixed values, but this embodiment of the present application does not limit it.
这样,可以通过以上的几种可能的实施方式构造出一个或多个单向运动信息。然后将构造出的单向运动信息填入初始运动信息候选列表,以得到新的运动信息候选列表。In this way, one or more pieces of one-way motion information can be constructed through the above several possible implementation manners. Then fill the constructed unidirectional motion information into the initial motion information candidate list to obtain a new motion information candidate list.
S304:基于所述至少一个新的单向运动信息,构建新的运动信息候选列表。S304: Based on the at least one piece of new unidirectional motion information, construct a new motion information candidate list.
需要说明的是,在得到至少一个新的单向运动信息之后,可以将其填入到初始运动信息候选列表中,以得到新的运动信息候选列表。具体地,对于S304来说,该步骤可以包括:将至少一个新的单向运动信息填入初始运动信息候选列表中,得到所述新的运动信息候选列表。It should be noted that after obtaining at least one piece of new unidirectional motion information, it may be filled into the initial motion information candidate list to obtain a new motion information candidate list. Specifically, for S304, this step may include: filling at least one piece of new unidirectional motion information into the initial motion information candidate list to obtain the new motion information candidate list.
还需要说明的是,只有所得到的新的单向运动信息与初始运动信息候选列表内所包括的原有单向运动信息不重复的情况下,才能够将其填充到该候选列表。也就是说,在一些实施例中,所述将所述至少一个新的单向运动信息填入所述初始运动信息候选列表中,可以包括:It should also be noted that only when the obtained new unidirectional motion information does not overlap with the original unidirectional motion information included in the initial motion information candidate list, can it be filled into the candidate list. That is to say, in some embodiments, the filling the at least one new unidirectional motion information into the initial motion information candidate list may include:
判断至少一个新的单向运动信息与所述初始运动信息候选列表内的运动信息是否重复;judging whether at least one new unidirectional motion information is duplicated with the motion information in the initial motion information candidate list;
在所述至少一个新的单向运动信息与所述初始运动信息候选列表内的运动信息不重复的情况下,将所述至少一个新的单向运动信息填入所述初始运动信息候选列表中。If the at least one new unidirectional motion information does not overlap with the motion information in the initial motion information candidate list, filling the at least one new unidirectional motion information into the initial motion information candidate list .
这样,初始运动信息候选列表的构建方式中,如果不重复的单向运动信息无法填满该候选列表,通常是采用该候选列表中最后一个单向运动信息来重复填充以填满该候选列表。而本申请实施例中,可以在不重复的单向运动信息且无法填满候选列表时,这时候通过构造新的单向运动信息的方式以构建出新的单向运动信息来填充候选列表;即所构造出新的单向运动信息与候选列表中原有的单向运动信息不重复的情况下才能够填充进该候选列表。In this way, in the construction method of the initial motion information candidate list, if the non-repetitive unidirectional motion information cannot fill the candidate list, the last unidirectional motion information in the candidate list is usually used to repeatedly fill the candidate list to fill the candidate list. However, in the embodiment of the present application, when there is no repeated unidirectional motion information and the candidate list cannot be filled, at this time, new unidirectional motion information can be constructed to fill the candidate list by constructing new unidirectional motion information; That is, the newly constructed one-way motion information can be filled into the candidate list only when it does not overlap with the original one-way motion information in the candidate list.
进一步地,当初始运动信息候选列表使用不重复的运动信息无法填满该初始运动信息候选列表时,可以使用构造的新的单向运动信息填充该候选列表,以得到新的运动信息候选列表。换句话说,本申请实施例的帧间预测方法是在初始运动信息候选列表不包括重复的单向运动信息且初始运动信息候选列表内已有的单向运动信息数量小于预设数量(即初始运动信息候选列表处于未填满状态)下进行的。因此,在一些实施例中,该方法还可以包括:Further, when the initial motion information candidate list cannot be filled with non-repetitive motion information, the candidate list may be filled with constructed new unidirectional motion information to obtain a new motion information candidate list. In other words, in the inter-frame prediction method of the embodiment of the present application, the initial motion information candidate list does not include repeated unidirectional motion information and the number of existing unidirectional motion information in the initial motion information candidate list is less than the preset number (that is, the initial The motion information candidate list is not filled). Therefore, in some embodiments, the method may also include:
在所述初始运动信息候选列表不包括重复的单向运动信息且所述初始运动信息候选列表内的单向运动信息数量小于预设数量时,执行所述从所述当前块的多个已知运动信息中确定至少一个单向运动信息;以及基于预设偏移量对所述至少一个单向运动信息进行运动矢量计算,获得至少一个新的单向运动信息的步骤。When the initial motion information candidate list does not include repeated unidirectional motion information and the number of unidirectional motion information in the initial motion information candidate list is less than a preset number, performing the multiple known from the current block Steps of determining at least one unidirectional motion information in the motion information; and performing motion vector calculation on the at least one unidirectional motion information based on a preset offset to obtain at least one new unidirectional motion information.
这里,预设数量表示初始运动信息候选列表内预先设置可填充的单向运动信息数量,也可以称为初始运动信息候选列表的长度。也就是说,本申请实施例主要是针对运动信息候选列表的构造,或者运动信息候选列表构造时用目前的相关技术方案查找不重复的运动信息但无法填满该候选列表的情况;在这过程中,其他流程没有变化。Here, the preset quantity indicates the preset quantity of one-way motion information that can be filled in the initial motion information candidate list, and may also be referred to as the length of the initial motion information candidate list. In other words, the embodiment of the present application is mainly aimed at the construction of the motion information candidate list, or the situation that the current related technical solutions are used to search for non-repetitive motion information but the candidate list cannot be filled when the motion information candidate list is constructed; in this process , other processes remain unchanged.
还需要说明的是,在构建运动信息候选列表的过程中,针对至少一个新的单向运动信息,主要涉及从当前块的已知运动信息中如何确定至少一个单向运动信息。例如,针对已有的初始运动信息候选列表,可以是从该候选列表内任意选择一个运动信息,比如第一个运动信息或者最后一个运动信息;也可以是从该候选列表内顺序选择运动信息等。也就是说,在一些实施例中,该方法还可以包括:It should also be noted that, in the process of constructing the motion information candidate list, for at least one new unidirectional motion information, it mainly involves how to determine at least one unidirectional motion information from the known motion information of the current block. For example, for the existing initial motion information candidate list, one motion information can be arbitrarily selected from the candidate list, such as the first motion information or the last motion information; it can also be sequentially selected from the candidate list, etc. . That is, in some embodiments, the method may also include:
从所述初始运动信息候选列表内任意选择一个运动信息,根据所述一个运动信息的偏移处理,获得所述至少一个新的单向运动信息;或者,Randomly select one piece of motion information from the initial motion information candidate list, and obtain the at least one new unidirectional motion information according to the offset processing of the one motion information; or,
从所述初始运动信息候选列表内顺序选择至少一个运动信息,根据所述至少一个运动信息的偏移处理,获得所述至少一个新的单向运动信息;或者,Sequentially select at least one piece of motion information from the initial motion information candidate list, and obtain the at least one new unidirectional motion information according to offset processing of the at least one piece of motion information; or,
从所述当前块的空域运动信息和/或所述当前块的时域运动信息和/或所述当前块的历史运动信息内顺序选择至少一个运动信息,根据所述至少一个运动信息的偏移处理,获得所述至少一个新的单向运动信息。Sequentially select at least one piece of motion information from the spatial domain motion information of the current block and/or the time domain motion information of the current block and/or the historical motion information of the current block, according to the offset of the at least one motion information Processing, obtaining the at least one new unidirectional motion information.
这样,可以从已有的初始运动信息候选列表中选择用于构造新的单向运动信息的运动信息。一种方式是只使用初始运动信息候选列表中的某一个运动信息,比如初始运动信息候选列表中的第一个运动信息,或者初始运动信息候选列表中的最后一个运动信息;另一种方式是按顺序使用初始运动信息候选列表中的运动信息来构造新的运动信息;结束条件是初始运动信息候选列表被填满或遍历结束,以得到新的运动信息候选列表。In this way, motion information for constructing new unidirectional motion information can be selected from an existing initial motion information candidate list. One way is to use only one motion information in the initial motion information candidate list, such as the first motion information in the initial motion information candidate list, or the last motion information in the initial motion information candidate list; another way is The motion information in the initial motion information candidate list is sequentially used to construct new motion information; the end condition is that the initial motion information candidate list is filled or the traversal ends to obtain a new motion information candidate list.
除此之外,本申请实施例还可以按照与当前块的相对关系选择运动信息。一种方式是只使用某一个相对位置的运动信息,比如F、G、C、A、B和D中的某一个位置的运动信息,或按照上面所述时域上的运动信息;另一种方式是对这些相对关系设置一个顺序,如果前一个相对关系的运动信息不可用,那么选择后一个可用的运动信息;再一种方式是对这些相对关系设置一个顺序,按顺序使用相对关系的运动信息来构造新的运动信息;结束条件是初始运动信息候选列表被填满或遍历结束,以得到新的运动信息候选列表。In addition, the embodiment of the present application may also select the motion information according to the relative relationship with the current block. One way is to use only the motion information of a certain relative position, such as the motion information of a certain position in F, G, C, A, B, and D, or the motion information in the time domain as described above; the other The way is to set an order for these relative relationships, if the motion information of the previous relative relationship is not available, then select the next available motion information; another way is to set an order for these relative relationships, and use the motion of the relative relationship in order information to construct new motion information; the end condition is that the initial motion information candidate list is filled or the traversal ends to obtain a new motion information candidate list.
S305:根据所述新的运动信息候选列表,确定所述当前块的帧间预测值。S305: Determine an inter-prediction value of the current block according to the new motion information candidate list.
需要说明的是,当预测模式参数指示使用GPM或AWP确定当前块的帧间预测值时,这时候可以确定出当前块的两个分区;其中,两个分区可以包括第一分区和第二分区。It should be noted that when the prediction mode parameter indicates that GPM or AWP is used to determine the inter-frame prediction value of the current block, two partitions of the current block can be determined at this time; where the two partitions can include the first partition and the second partition .
这样,在得到新的运动信息候选列表后,可以确定出当前块的第一分区对应的运动信息和所述第二分区的运动信息;然后根据第一分区对应的运动信息和所述第二分区的运动信息,能够确定出当前块的帧间预测值。In this way, after obtaining the new motion information candidate list, the motion information corresponding to the first partition of the current block and the motion information of the second partition can be determined; and then according to the motion information corresponding to the first partition and the second partition The motion information of the current block can be determined to determine the inter frame prediction value.
具体地,如图5所示,其示出了本申请实施例提供的另一种帧间预测方法的流程示意图。该方法可以包括:Specifically, as shown in FIG. 5 , it shows a schematic flowchart of another inter-frame prediction method provided by the embodiment of the present application. The method can include:
S501:解析码流,确定所述第一分区对应的第一运动信息索引值和所述第二分区对应的第二运动信息索引值;S501: Parse the code stream, and determine a first motion information index value corresponding to the first partition and a second motion information index value corresponding to the second partition;
S502:基于新的运动信息候选列表,将所述第一运动信息索引值指示的所述新的运动信息候选列表中的运动信息确定为所述第一分区的运动信息,将所述第二运动信息索引值指示的所述新的运动信息候选列表中的运动信息确定为所述第二分区的运动信息;S502: Based on the new motion information candidate list, determine the motion information in the new motion information candidate list indicated by the first motion information index value as the motion information of the first partition, and determine the motion information of the second motion information determining the motion information in the new motion information candidate list indicated by the information index value as the motion information of the second partition;
S503:利用所述第一分区的运动信息计算所述第一分区的第一预测值,利用所述第二分区的运动信息计算所述第二分区的第二预测值;S503: Calculate a first predicted value of the first partition by using the motion information of the first partition, and calculate a second predicted value of the second partition by using the motion information of the second partition;
S504:对所述第一预测值和所述第二预测值进行加权融合,得到所述当前块的帧间预测值。S504: Perform weighted fusion on the first predicted value and the second predicted value to obtain an inter-frame predicted value of the current block.
需要说明的是,传统的单向预测只是查找一个与当前块大小相同的参考块,而传统的双向预测使用两个与当前块大小相同的参考块,且预测块内每个点的像素值为两个参考块对应位置的平均值,即每一个参考块的所有点都占50%的比例。双向加权预测使得两个参考块的比例可以不同,如第一个参考块中所有点都占75%的比例,第二个参考块中所有点都占25%的比例。但同一个参考块中的所有点的比例都相同。其他一些优化方式比如采用解码端运动矢量修正(Decoder side Motion Vector Refinement,DMVR)技术、双向光流(Bi-directional Optical Flow,BIO)等会使参考像素或预测像素产生一些变化,而且GPM或AWP也使用两个与当前块大小相同的参考块,但某些像素位置100%使用第一个参考块对应位置的像素值,某些像素位置100%使用第二个参考块对应位置的像素值,而在交界区域,按一定比例使用这两个参考块对应位置的像素值。具体这些权重如何分配,由GPM或AWP的预测模式决定,或者也可以认为GPM或AWP使用两个与当前块大小不相同的参考块,即各取所需的一部分作为参考块。It should be noted that the traditional unidirectional prediction only finds a reference block with the same size as the current block, while the traditional bidirectional prediction uses two reference blocks with the same size as the current block, and the pixel value of each point in the predicted block is The average value of the corresponding positions of the two reference blocks, that is, all points of each reference block account for 50% of the proportion. Bidirectional weighted prediction makes the proportions of two reference blocks different, for example, all points in the first reference block account for 75% of the proportion, and all points in the second reference block account for 25% of the proportion. But all points in the same reference block have the same scale. Some other optimization methods, such as using Decoder side Motion Vector Refinement (DMVR) technology, bi-directional optical flow (Bi-directional Optical Flow, BIO), etc., will cause some changes in reference pixels or predicted pixels, and GPM or AWP Also use two reference blocks with the same size as the current block, but some pixel positions use 100% the pixel values of the corresponding positions of the first reference block, and some pixel positions use 100% of the pixel values of the corresponding positions of the second reference block, In the boundary area, the pixel values of the corresponding positions of the two reference blocks are used according to a certain ratio. How to allocate these weights is determined by the prediction mode of GPM or AWP, or it can also be considered that GPM or AWP uses two reference blocks that are different in size from the current block, that is, each takes a required part as a reference block.
示例性地,如图6A所示,其示出了本申请实施例提供的一种GPM在64×64的当前块上的多种划分模式的权重分配示意图。在图6A中,GPM存在有64种划分模式。如图6B所示,其示出了本申请实施例提供的一种AWP在64×64的当前块上的多种划分模式的权重分配示意图。在图6B中,AWP存在有56种划分模式。无论是图6A还是图6B,每一种划分模式下,黑色区域表示第一个参考块对应位置的权重值为0%,白色区域表示第一个参考块对应位置的权重值为100%,灰色区域则按颜色深浅的不同表示第一个参考块对应位置的权重值为大于0%且小于100%的某一个权重值,第二个参考块对应位置的权重值则为100%减去第一个参考块对应位置的权重值。Exemplarily, as shown in FIG. 6A , it shows a schematic diagram of weight distribution of multiple division modes of a GPM on a 64×64 current block provided by the embodiment of the present application. In FIG. 6A, there are 64 division patterns in GPM. As shown in FIG. 6B , it shows a schematic diagram of weight distribution of various division modes of an AWP on a 64×64 current block provided by the embodiment of the present application. In FIG. 6B, there are 56 division modes in AWP. Regardless of Figure 6A or Figure 6B, in each division mode, the black area indicates that the weight value of the corresponding position of the first reference block is 0%, the white area indicates that the weight value of the corresponding position of the first reference block is 100%, and the gray area indicates that the weight value of the corresponding position of the first reference block is 100%. The area indicates a weight value corresponding to the first reference block with a weight value greater than 0% and less than 100% according to the color depth, and the weight value corresponding to the second reference block is 100% minus the first The weight value of the corresponding position of a reference block.
应理解,早期的编解码技术中只存在矩形的划分方式,无论是CU、PU还是变换单元(Transform Unit,TU)的划分。而GPM或AWP均实现了非矩形的划分,即用一条直线可以将一个矩形块分成两个分区,根据直线的位置和角度的不同,划分的两个分区可能是三角形或梯形或矩形等,从而能使得划分更贴近物体的边缘或者两个运动不同区域的边缘。需要注意的是,这里所说的划分并不是真正意义上的划分,而更像是一种预测效果上的划分。因为这个划分只是划分了两个参考块在产生预测块时的权重,或者可以简单地理解为预测块的一部分位置来自于第一个参考块,而另一部分位置来自于第二个参考块,并没有真正按划分线把当前块划分成两个CU或PU或TU。这样,在预测之后残差的变换、量化、反变换、反量化等也都是将当前块作为一个整体进行处理。It should be understood that there is only a rectangular division method in the early codec technology, whether it is division of CU, PU or transformation unit (Transform Unit, TU). Both GPM and AWP realize non-rectangular division, that is, a rectangular block can be divided into two partitions with a straight line. According to the position and angle of the straight line, the two partitions may be triangular, trapezoidal or rectangular, etc., thus It can make the division closer to the edge of the object or the edge of two regions with different motions. It should be noted that the division mentioned here is not a division in the true sense, but more like a division of prediction effects. Because this division only divides the weight of the two reference blocks when generating the prediction block, or it can be simply understood that part of the position of the prediction block comes from the first reference block, while the other part of the position comes from the second reference block, and The current block is not really divided into two CUs or PUs or TUs according to the dividing line. In this way, after the prediction, the transformation, quantization, inverse transformation, inverse quantization, etc. of the residual are all processed on the current block as a whole.
还需要说明的是,GPM或AWP属于一种帧间预测技术,GPM或AWP需要在码流中传输一个GPM或AWP是否使用的标志(flag),该flag可以指示当前块是否使用GPM或AWP。如果使用GPM或AWP,编码器在码流中需要传输具体使用的模式,即GPM的64种划分模式之一,或AWP的56种划分模式之一;以及两个单向运动信息的索引值。也就是说,对于当前块而言,解码器通过解析码流可以得到GPM或AWP是否使用的信息,如果确定使用GPM或AWP,解码器可以解析出GPM或AWP的预测模式参数以及两个运动信息索引值,比如当前块可以划分为两个分区,那么可以解析出第一分区对应的第一运动信息索引值和第二分区对应的第二运动信息索引值。It should also be noted that GPM or AWP belongs to an inter-frame prediction technology. GPM or AWP needs to transmit a flag (flag) whether to use GPM or AWP in the code stream. The flag can indicate whether the current block uses GPM or AWP. If GPM or AWP is used, the encoder needs to transmit the specific mode used in the code stream, that is, one of the 64 division modes of GPM, or one of the 56 division modes of AWP; and the index value of two unidirectional motion information. That is to say, for the current block, the decoder can obtain information about whether GPM or AWP is used by parsing the code stream. If it is determined to use GPM or AWP, the decoder can parse out the prediction mode parameters of GPM or AWP and two motion information Index value, for example, the current block can be divided into two partitions, then the first motion information index value corresponding to the first partition and the second motion information index value corresponding to the second partition can be analyzed.
在构建新的运动信息候选列表之前,首先需要构建一个初始运动信息候选列表,下面以AVS中的AWP为例介绍初始运动信息候选列表的构建方法。Before constructing a new motion information candidate list, it is first necessary to construct an initial motion information candidate list. The following takes the AWP in AVS as an example to introduce the construction method of the initial motion information candidate list.
如图7所示,块E为当前块,而块A、块B、块C、块D、块F、块G均为块E的相邻块。其中,块E的相邻块A是样本(x0-1,y0)所在的块,块E的相邻块B是样本(x0,y0-1)所在的块,块E的相邻块C是样本(x0+1,y0-1)所在的块,块E的相邻块D是样本(x0-1,y0-1)所在的块,块E的相邻块F是样本(x0-1,y1)所在的块,块E的相邻块G是样本(x1,y0-1)所在的块。其中(x0,y0)是块E左上角样本在图像中的坐标,(x1,y0)是块E右上角样本在图像中的坐标,(x0,y1)是块E左下角样本在图像中的坐标。也就是说,块E和它的相邻块A、B、C、D、F和G的空间位置关系详见图7。As shown in FIG. 7 , block E is the current block, and block A, block B, block C, block D, block F, and block G are all adjacent blocks of block E. Among them, the adjacent block A of the block E is the block where the sample (x 0 -1, y 0 ) is located, the adjacent block B of the block E is the block where the sample (x 0 , y 0 -1) is located, and the adjacent block of the block E is the block where the sample (x 0 , y 0 -1) is located. The adjacent block C is the block where the sample (x 0 +1, y 0 -1) is located, the adjacent block D of the block E is the block where the sample (x 0 -1, y 0 -1) is located, and the adjacent block of the block E is F is the block where the sample (x 0 -1, y 1 ) is located, and the adjacent block G of the block E is the block where the sample (x 1 , y 0 -1) is located. where (x 0 , y 0 ) is the coordinates of the upper left sample of block E in the image, (x 1 , y 0 ) is the coordinates of the upper right sample of block E in the image, (x 0 , y 1 ) is the lower left of block E The coordinates of the corner samples in the image. That is to say, the spatial position relationship between block E and its adjacent blocks A, B, C, D, F and G is shown in Fig. 7 in detail.
对于图7而言,相邻块X(X表示为A、B、C、D、F或G)“存在”是指该块应在待解码图像内并且该块应与块E属于同一空间区域;否则相邻块“不存在”。可以得到,如果块“不存在”或者尚未解码,那么此块“不可用”;否则此块“可用”。或者,如果待解码图像样本所在的块“不存在”或者此样本尚未解码,那么此样本“不可用”;否则此样本“可用”。For Fig. 7, the "existence" of adjacent block X (X is denoted as A, B, C, D, F or G) means that this block should be in the image to be decoded and this block should belong to the same spatial region as block E ; otherwise the adjacent block "does not exist". It follows that a block is "not available" if it "does not exist" or has not been decoded; otherwise it is "available". Alternatively, an image sample to be decoded is "not available" if the block in which it resides "does not exist" or the sample has not been decoded; otherwise the sample is "available".
假定第一个单向运动信息表示为mvAwp0L0、mvAwp0L1、RefIdxAwp0L0和RefIdxAwp0L1。其中,mvAwp0L0表示在第一个参考帧列表RefPicList0中对应的运动矢量,RefIdxAwp0L0表示在第一个参考帧列表RefPicList0中对应的参考帧的参考索引值;mvAwp0L1表示在第二个参考帧列表RefPicList1中对应运动矢量,RefIdxAwp0L1表示在第二个参考帧列表RefPicList1中对应的参考帧的参考索引值。第二个单向运动信息以此类推。Assume that the first unidirectional motion information is expressed as mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, and RefIdxAwp0L1. Among them, mvAwp0L0 represents the corresponding motion vector in the first reference frame list RefPicList0, RefIdxAwp0L0 represents the reference index value of the corresponding reference frame in the first reference frame list RefPicList0; mvAwp0L1 represents the corresponding motion vector in the second reference frame list RefPicList1 The motion vector, RefIdxAwp0L1 represents the reference index value of the corresponding reference frame in the second reference frame list RefPicList1. The second one-way motion information and so on.
由于这里的运动信息都是单向的,所以RefIdxAwp0L0和RefIdxAwp0L1必有一个为有效值,比如0,1,2等;另一个为无效值,比如-1。如果RefIdxAwp0L0为有效值,那么RefIdxAwp0L1为-1;这时候对应的mvAwp0L0即为所需要的运动矢量,即(x,y),mvAwp0L1不需要考虑。反之亦然。Since the motion information here is unidirectional, one of RefIdxAwp0L0 and RefIdxAwp0L1 must be a valid value, such as 0, 1, 2, etc.; the other must be an invalid value, such as -1. If RefIdxAwp0L0 is a valid value, then RefIdxAwp0L1 is -1; at this time, the corresponding mvAwp0L0 is the required motion vector, ie (x, y), and mvAwp0L1 does not need to be considered. vice versa.
具体来讲,推导mvAwp0L0、mvAwp0L1、RefIdxAwp0L0、RefIdxAwp0L1、mvAwp1L0、mvAwp1L1、RefIdxAwp1L0和RefIdxAwp1L1的步骤如下:Specifically, the steps for deriving mvAwp0L0, mvAwp0L1, RefIdxAwp0L0, RefIdxAwp0L1, mvAwp1L0, mvAwp1L1, RefIdxAwp1L0, and RefIdxAwp1L1 are as follows:
第一步,如图7所示,F、G、C、A、B和D是当前块E的相邻块,确定F、G、C、A、B和D的“可用”性:The first step, as shown in Figure 7, F, G, C, A, B and D are adjacent blocks of the current block E, determine the "availability" of F, G, C, A, B and D:
(a)如果F存在且采用帧间预测模式,那么F“可用”;否则F“不可用”。(a) If F exists and uses inter prediction mode, then F is "available"; otherwise F is "unavailable".
(b)如果G存在且采用帧间预测模式,则G“可用”;否则G“不可用”。(b) G is "available" if it exists and uses inter prediction mode; otherwise, G is "unavailable".
(c)如果C存在且采用帧间预测模式,则C“可用”;否则C“不可用”。(c) If C exists and uses inter prediction mode, then C is "available"; otherwise, C is "unavailable".
(d)如果A存在且采用帧间预测模式,则A“可用”;否则A“不可用”。(d) If A exists and uses inter prediction mode, then A is "available"; otherwise, A is "unavailable".
(e)如果B存在且采用帧间预测模式,则B“可用”;否则B“不可用”。(e) If B exists and uses inter prediction mode, then B is "available"; otherwise, B is "unavailable".
(f)如果D存在且采用帧间预测模式,则D“可用”;否则D“不可用”。(f) If D exists and uses inter prediction mode, then D is "available"; otherwise, D is "unavailable".
第二步,按F、G、C、A、B和D的顺序将单向可用的运动信息放入单向运动信息候选列表(用AwpUniArray表示),直至AwpUniArray长度为3(或4)或者遍历结束。In the second step, put the one-way available motion information into the one-way motion information candidate list (indicated by AwpUniArray) in the order of F, G, C, A, B, and D until the length of AwpUniArray is 3 (or 4) or traverse Finish.
第三步,如果AwpUniArray的长度小于3(或4),按F、G、C、A、B和D的顺序将双向可用的运动信息拆分为指向参考帧列表List0的单向运动信息以及指向参考帧列表List1的单向运动信息,先进行单向运动信息查重操作,若不重复则放入AwpUniArray,直至长度为3(或4)或遍历结束。The third step, if the length of AwpUniArray is less than 3 (or 4), in the order of F, G, C, A, B, and D, the bidirectionally available motion information is split into unidirectional motion information pointing to the reference frame list List0 and pointing to Referring to the unidirectional motion information of the frame list List1, first perform the duplication check operation of the unidirectional motion information, if not repeated, put it into AwpUniArray until the length is 3 (or 4) or the traversal ends.
第四步,将时域双向的运动信息拆分为指向参考帧列表List0的单向运动信息以及指向参考帧列表List1的单向运动信息,先进行单向运动信息查重操作,若不重复则放入AwpUniArray,直至长度为4(或5)或遍历结束。The fourth step is to split the two-way motion information in the time domain into one-way motion information pointing to the reference frame list List0 and one-way motion information pointing to the reference frame list List1. Put into AwpUniArray until the length is 4 (or 5) or the traversal ends.
第五步,如果AwpUniArray的长度小于4(或5),构造新的单向运动信息,具体构造方式如下,The fifth step, if the length of AwpUniArray is less than 4 (or 5), construct new unidirectional motion information, the specific construction method is as follows,
从前到后依次取AwpUniArray中已有的每一个单向运动信息,运动信息与第一个参考帧列表对应的值用mvL0表示,与第二个参考帧列表对应的值用mvL1表示,第一个参考帧列表对应的参考帧索引用RefIdxL0表示,第二个参考帧列表对应的参考帧索引用RefIdxL1表示。假定当前取的单向运动信息为MIorg,新构造的运动信息为MInew,MInew的RefIdxL0和RefIdxL1与MIorg的RefIdxL0和RefIdxL1相同。设mvLX,如果RefIdxL0为有效值,那么mvLX为mvL0,否则mvLX为mvL1。对MIorg的mvLX依次向右、向左、向下、向上等方向偏移的预设偏移量(用offset表示,比如4个单位等)构造出MInew的mvLX。具体地,假定MIorg的mvLX的值为(x,y),如果是向右偏移,MInew的mvLX的值为(x+offset,y);如果是向左偏移,MInew的mvLX的值为(x-offset,y);如果是向下偏移,MInew的mvLX的值为(x,y+offset);如果是向上偏移,MInew的mvLX的值为(x,y-offset)。其中,offset的计算如下,如果是向左或向右偏移,那么offset=|x|/4;如果是向上或向下偏移,那么offset=|y|/4,如果offset大于16,那么offset可以等于16;如果offset小于4,那么offset等于4。这时候如果构造出的运动信息与AwpUniArray中的每一个运动信息都不重复,那么将其加入AwpUniArray中,直至长度为4(或5)或遍历结束。Take each unidirectional motion information in AwpUniArray in turn from front to back. The value corresponding to the motion information and the first reference frame list is represented by mvL0, and the value corresponding to the second reference frame list is represented by mvL1. The first The reference frame index corresponding to the reference frame list is represented by RefIdxL0, and the reference frame index corresponding to the second reference frame list is represented by RefIdxL1. Assume that the current unidirectional motion information is MI org , the newly constructed motion information is MI new , and the RefIdxL0 and RefIdxL1 of MI new are the same as the RefIdxL0 and RefIdxL1 of MI org . Suppose mvLX, if RefIdxL0 is a valid value, then mvLX is mvL0, otherwise mvLX is mvL1. The mvLX of MI org is sequentially shifted to the right, left, down, and up by the preset offset (expressed by offset, such as 4 units, etc.) to construct the mvLX of MI new . Specifically, assuming that the value of mvLX of MI org is (x, y), if it is offset to the right, the value of mvLX of MI new is (x+offset, y); if it is offset to the left, the value of mvLX of MI new is (x-offset, y); if it is a downward offset, the value of mvLX of MI new is (x, y+offset); if it is an upward offset, the value of mvLX of MI new is (x, y -offset). Among them, the calculation of offset is as follows, if it is offset to the left or right, then offset=|x|/4; if it is offset upward or downward, then offset=|y|/4, if offset is greater than 16, then offset can be equal to 16; if offset is less than 4, then offset is equal to 4. At this time, if the constructed motion information does not overlap with each motion information in AwpUniArray, then add it to AwpUniArray until the length is 4 (or 5) or the traversal ends.
第六步,如果AwpUniArray的长度小于4(或5),那么将AwpUniArray中最后一个单向运动信息进行重复填充操作,直至AwpUniArray长度为4(或5)。In the sixth step, if the length of AwpUniArray is less than 4 (or 5), then the last unidirectional motion information in AwpUniArray is repeatedly filled until the length of AwpUniArray is 4 (or 5).
第七步,将AwpUniArray中第AwpCandIdx0+1个运动信息赋值给mvAwp0L0、mvAwp0L1、RefIdxAwp0L0和RefIdxAwp0L1,将AwpUniArray中第AwpCandIdx1+1个运动信息赋值给mvAwp1L0、mvAwp1L1、RefIdxAwp1L0和RefIdxAwp1L1。The seventh step is to assign the AwpCandIdx0+1 movement information in AwpUniArray to mvAwp0L0, mvAwp0L1, RefIdxAwp0L0 and RefIdxAwp0L1, and assign the AwpCandIdx1+1 movement information in AwpUniArray to mvAwp1L0, mvAwp1L1, RefIdxAwp1L0 and RefLId.
也就是说,在构造AwpUniArray的过程中,与相关技术方案相比,新增加了第五步,即构造新的单向运动信息,且新构造的单向运动信息与AwpUniArray中的每一个单向运动信息都不重复,那么可以将其填入AwpUniArray中,直至长度为4(或5)或遍历结束。That is to say, in the process of constructing AwpUniArray, compared with related technical solutions, a fifth step is newly added, that is, constructing new unidirectional motion information, and the newly constructed unidirectional motion information is compatible with each unidirectional motion information in AwpUniArray Motion information is not repeated, so it can be filled into AwpUniArray until the length is 4 (or 5) or the traversal ends.
这样,根据解析到的两个运动信息索引值可以在上述构建出新的运动信息候选列表中找到两个单向运动信息,然后利用这两个单向运动信息可以查找到两个参考块,根据GPM或AWP使用的具体预测模式能够确定出两个参考块在每一个像素位置的权值,最后将两个参考块加权计算以得到当前块的预测块。In this way, two unidirectional motion information can be found in the newly constructed motion information candidate list according to the parsed two motion information index values, and then two reference blocks can be found by using the two unidirectional motion information, according to The specific prediction mode used by GPM or AWP can determine the weight of two reference blocks at each pixel position, and finally calculate the weight of the two reference blocks to obtain the prediction block of the current block.
进一步地,如果当前模式是跳过(skip)模式,那么预测块既是解码块,意味着当前块的解码结束。如果当前模式不是跳过模式,熵解码解析量化系数,接着反量化与反变换以得到残差块,最后将残差块与预测块相加可以得到解码块,意味着当前块的解码结束。Further, if the current mode is a skip mode, then the predicted block is a decoded block, which means that the decoding of the current block ends. If the current mode is not skip mode, entropy decoding analyzes the quantized coefficients, then inverse quantization and inverse transformation to obtain the residual block, and finally adds the residual block to the prediction block to obtain the decoded block, which means that the decoding of the current block is over.
在本申请实施例中,构造一些新的运动信息加入运动信息候选列表。根据已有运动信息进行新的运动信息的构造,可以基于预设偏移量的设置方式对已有运动信息进行偏移得到新的运动信息。当已有的初始运动信息候选列表的构建使用不重复的运动信息无法填满该候选列表时,这时候可以使用新构造的运动信息填充该候选列表。也就是说,通过使用本申请实施例的帧间预测方法构造新的单向运动矢量并填入运动信息候选列表,能够使得运动矢量候选列表中的运动矢量更多样。而且针对物体形变的情况,构造新的运动信息将会起到一定的作用。而且由于根据空域运动信息或时域运动信息或基于历史运动信息对当前块来说可能是有偏差的,从而构造新的单向运动信息可能会比原来的运动信息具有更好的效果。特别是在根据空域信息或时域信息或基于历史信息所得到的运动信息无法填满该候选列表的时候,本申请实施例的优势将更加明显。In the embodiment of the present application, some new motion information is constructed and added to the motion information candidate list. The new motion information is constructed according to the existing motion information, and the new motion information can be obtained by offsetting the existing motion information based on the setting method of the preset offset. When the construction of the existing initial motion information candidate list cannot fill the candidate list with non-repetitive motion information, the candidate list may be filled with newly constructed motion information at this time. That is to say, by using the inter-frame prediction method of the embodiment of the present application to construct a new unidirectional motion vector and fill it into the motion information candidate list, the motion vectors in the motion vector candidate list can be made more diverse. Moreover, in view of the deformation of objects, constructing new motion information will play a certain role. Moreover, since the current block may be biased based on spatial motion information, temporal motion information, or historical motion information, constructing new unidirectional motion information may have a better effect than the original motion information. Especially when the candidate list cannot be filled with the motion information obtained according to the spatial domain information, the time domain information or the historical information, the advantages of the embodiments of the present application will be more obvious.
还需要说明的是,本申请实施例的运动信息候选列表一般是指单向运动信息候选列表,但是本申请实施例单向运动信息的构造方式可以扩展到双向运动信息的构造,从而单向运动信息候选列表的构建也可以扩展到双向运动信息候选列表的构建。It should also be noted that the motion information candidate list in the embodiment of the present application generally refers to the unidirectional motion information candidate list, but the construction method of the unidirectional motion information in the embodiment of the present application can be extended to the construction of the bidirectional motion information, so that the unidirectional motion The construction of information candidate list can also be extended to the construction of two-way motion information candidate list.
本实施例提供了一种帧间预测方法,应用于解码器。解析码流,获取当前块的预测模式参数;当所述预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值时,从所述当前块的多个已知运动信息中确定至少一个单向运动信息;基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息;其中,所述预设偏移量是根据所述至少一个单向运动信息对应的水平方向矢量值和垂直方向矢量值计算得到;基于所述至少一个新的单向运动信息,构建新的运动信息候选列表;根据所述新的运动信息候选列表,确定所述当前块的帧间预测值。这样,在得到至少一个新的单向运动信息之后,可以将新的单向运动信息填入运动信息候选列表中,能够增加运动信息候选列表中运动信息的多样性;另外,对当前块来说,运动信息候选列表中初始运动信息与实际的运动信息可能存在偏差,这时候构造新的单向运动信息将会比初始运动信息具有更好的效果,从而提升了编解码性能。This embodiment provides an inter-frame prediction method, which is applied to a decoder. Parsing the code stream to obtain the prediction mode parameter of the current block; when the prediction mode parameter indicates that the preset inter prediction mode is used to determine the inter prediction value of the current block, from a plurality of known motion information of the current block Determine at least one unidirectional motion information; perform offset processing on the at least one unidirectional motion information based on a preset offset to obtain at least one new unidirectional motion information; wherein the preset offset is based on the preset offset The horizontal direction vector value and the vertical direction vector value corresponding to the at least one unidirectional motion information are calculated; based on the at least one new unidirectional motion information, a new motion information candidate list is constructed; according to the new motion information candidate list , to determine the inter-frame prediction value of the current block. In this way, after obtaining at least one new unidirectional motion information, the new unidirectional motion information can be filled in the motion information candidate list, which can increase the diversity of motion information in the motion information candidate list; in addition, for the current block , the initial motion information in the motion information candidate list may deviate from the actual motion information. At this time, constructing new unidirectional motion information will have a better effect than the initial motion information, thereby improving the encoding and decoding performance.
本申请实施例提供一种帧间预测方法,该方法应用于视频编码设备,即编码器。该方法所实现的功能可以通过编码器中的第二处理器调用计算机程序来实现,当然计算机程序可以保存在第二存储器中,可见,该编码器至少包括第二处理器和第二存储器。An embodiment of the present application provides an inter-frame prediction method, which is applied to a video encoding device, that is, an encoder. The functions realized by the method can be realized by calling the computer program by the second processor in the encoder, and of course the computer program can be stored in the second memory. It can be seen that the encoder includes at least the second processor and the second memory.
参见图8,其示出了本申请实施例又一种帧间预测方法的流程示意图。如图8所示,该方法可以包括:Referring to FIG. 8 , it shows a schematic flowchart of another inter-frame prediction method according to an embodiment of the present application. As shown in Figure 8, the method may include:
S801:确定当前块的预测模式参数;S801: Determine the prediction mode parameter of the current block;
需要说明的是,待编码图像可以划分为多个图像块,当前待编码的图像块可以称为当前块,与当前块相邻的图像块可以称为相邻块;即在待编码图像中,当前块与相邻块之间具有相邻关系。这里,每个当前块可以包括第一图像分量、第二图像分量和第三图像分量;也即当前块为待编码图像中当前待进行第一图像分量、第二图像分量或者第三图像分量预测的图像块。It should be noted that the image to be encoded can be divided into multiple image blocks, the image block currently to be encoded can be called the current block, and the image blocks adjacent to the current block can be called adjacent blocks; that is, in the image to be encoded, There is an adjacency relationship between the current block and the adjacent blocks. Here, each current block may include a first image component, a second image component, and a third image component; that is, the current block is the first image component, the second image component, or the third image component to be predicted in the image to be encoded. image blocks.
其中,假定当前块进行第一图像分量预测,而且第一图像分量为亮度分量,即待预测图像分量为亮度分量,那么当前块也可以称为亮度块;或者,假定当前块进行第二图像分量预测,而且第二图像分量为色度分量,即待预测图像分量为色度分量,那么当前块也可以称为色度块。Wherein, assuming that the current block performs the first image component prediction, and the first image component is a brightness component, that is, the image component to be predicted is a brightness component, then the current block may also be called a brightness block; or, it is assumed that the current block performs the second image component prediction, and the second image component is a chroma component, that is, the image component to be predicted is a chroma component, then the current block may also be called a chroma block.
还需要说明的是,预测模式参数指示了当前块采用的预测模式以及与该预测模式相关的参数。这里,针对预测模式参数的确定,可以采用简单的决策策略,比如根据失真值的大小进行确定;也可以采用复杂的决策策略,比如根据率失真优化(Rate DistortionOptimization,RDO)的结果进行确定,本申请实施例不作任何限定。通常而言,可以采用RDO方式来确定当前块的预测模式参数。It should also be noted that the prediction mode parameter indicates the prediction mode adopted by the current block and parameters related to the prediction mode. Here, for the determination of the prediction mode parameters, a simple decision-making strategy can be adopted, such as determining according to the magnitude of the distortion value; a complex decision-making strategy can also be adopted, such as determining according to the result of Rate Distortion Optimization (RDO). The application examples do not make any limitation. Generally speaking, the RDO method can be used to determine the prediction mode parameter of the current block.
具体地,在一些实施例中,对于S801来说,所述确定当前块的预测模式参数,可以包括:Specifically, in some embodiments, for S801, the determining the prediction mode parameter of the current block may include:
利用多种预测模式对所述当前块进行预编码处理,获得每一种预测模式对应的率失真代价值;Precoding the current block by using multiple prediction modes to obtain a rate-distortion cost value corresponding to each prediction mode;
从所获得的多个率失真代价值中选择最小率失真代价值,将所述最小率失真代价值对应的预测模式确定为当前块的预测模式参数。Select the minimum rate-distortion cost value from the obtained multiple rate-distortion cost values, and determine the prediction mode corresponding to the minimum rate-distortion cost value as the prediction mode parameter of the current block.
也就是说,在编码器侧,针对当前块可以采用多种预测模式分别对当前块进行预编码处理。这里,多种预测模式通常包括有帧间预测模式、传统帧内预测模式和非传统帧内预测模式;其中,传统帧内预测模式可以包括有直流(Direct Current,DC)模式、平面(PLANAR)模式和角度模式等,非传统帧内预测模式可以包括有基于矩阵的帧内预测(Matrix-based Intra Prediction,MIP)模式、跨分量线性模型预测(Cross-componentLinear Model Prediction,CCLM)模式、帧内块复制(Intra Block Copy,IBC)模式和PLT(Palette)模式等,而帧间预测模式可以包括有普通帧间预测模式、GPM预测模式和AWP预测模式等。That is to say, at the encoder side, multiple prediction modes may be used for the current block to respectively perform precoding processing on the current block. Here, multiple prediction modes usually include inter-frame prediction mode, traditional intra-frame prediction mode and non-traditional intra-frame prediction mode; wherein, the traditional intra-frame prediction mode may include direct current (Direct Current, DC) mode, planar (PLANAR) mode and angle mode, etc., non-traditional intra prediction modes can include matrix-based intra prediction (Matrix-based Intra Prediction, MIP) mode, cross-component linear model prediction (Cross-component Linear Model Prediction, CCLM) mode, intra Intra Block Copy (Intra Block Copy, IBC) mode and PLT (Palette) mode, etc., and the inter-frame prediction mode may include common inter-frame prediction mode, GPM prediction mode and AWP prediction mode, etc.
这样,在利用多种预测模式分别对当前块进行预编码之后,可以得到每一种预测模式对应的率失真代价值;然后从所得到的多个率失真代价值中选取最小率失真代价值,并将该最小率失真代价值对应的预测模式确定为当前块的预测模式参数。除此之外,还可以在利用多种预测模式分别对当前块进行预编码之后,得到每一种预测模式对应的失真值;然后从所得到的多个失真值中选取最小失真值,并将该最小失真值对应的预测模式确定为当前块的预测模式参数。如此,最终使用所确定的预测模式参数对当前块进行编码,而且在这种预测模式下,可以使得预测残差较小,能够提高编码效率。In this way, after precoding the current block using multiple prediction modes, the rate-distortion cost value corresponding to each prediction mode can be obtained; and then the minimum rate-distortion cost value is selected from the obtained multiple rate-distortion cost values, And the prediction mode corresponding to the minimum rate-distortion cost value is determined as the prediction mode parameter of the current block. In addition, after precoding the current block using multiple prediction modes, the distortion value corresponding to each prediction mode can be obtained; then the minimum distortion value is selected from the obtained multiple distortion values, and the The prediction mode corresponding to the minimum distortion value is determined as the prediction mode parameter of the current block. In this way, the current block is finally coded using the determined prediction mode parameters, and in this prediction mode, the prediction residual can be made smaller, and the coding efficiency can be improved.
S802:当所述预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值时,从所述当前块的多个已知运动信息中确定至少一个单向运动信息。S802: When the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine an inter-prediction value of the current block, determine at least one piece of unidirectional motion information from a plurality of pieces of known motion information of the current block.
需要说明的是,如果预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值的情况下,就可以采用本申请实施例所提供的帧间预测方法。这里,预设的帧间预测模式可以为GPM预测模式或AWP预测模式等。It should be noted that if the prediction mode parameter indicates that a preset inter-frame prediction mode is used to determine the inter-frame prediction value of the current block, the inter-frame prediction method provided in the embodiment of the present application may be used. Here, the preset inter-frame prediction mode may be a GPM prediction mode or an AWP prediction mode or the like.
还需要说明的是,运动信息可以包括运动矢量(Motion Vector,MV)信息和参考帧信息。另外,参考帧信息可以是由参考帧列表以及参考索引值共同确定所对应的参考帧。It should also be noted that the motion information may include motion vector (Motion Vector, MV) information and reference frame information. In addition, the reference frame information may jointly determine the corresponding reference frame by the reference frame list and the reference index value.
在一些实施例中,当前块的多个已知运动信息至少可以包括:初始运动信息候选列表内的运动信息,和/或,所述当前块的空域运动信息,和/或,所述当前块的时域运动信息,和/或,所述当前块的历史运动信息。In some embodiments, the plurality of known motion information of the current block may at least include: motion information in the initial motion information candidate list, and/or, spatial domain motion information of the current block, and/or, the current block Time-domain motion information of the current block, and/or, historical motion information of the current block.
这里,针对初始运动信息候选列表,在一些实施例中,该方法还可以包括:基于当前块的相邻块的运动信息,确定初始运动信息候选列表。Here, for the initial motion information candidate list, in some embodiments, the method may further include: determining the initial motion information candidate list based on the motion information of adjacent blocks of the current block.
需要说明的是,初始运动信息候选列表中存在有至少一个单向运动信息;当初始运动信息候选列表不包括重复的单向运动信息且初始运动信息候选列表内的单向运动信息数量小于预设数量时,可以从初始运动信息候选列表内选择运动信息,以得到至少一个单向运动信息;或者,也可以从已编码部分获取运动信息,比如从当前块的空域运动信息和/或当前块的时域运动信息和/或当前块的历史运动信息中获取运动信息,以得到至少一个单向运动信息。It should be noted that there is at least one unidirectional motion information in the initial motion information candidate list; when the initial motion information candidate list does not include repeated unidirectional motion information and the number of unidirectional motion information in the initial motion information candidate list is less than When the number is large, the motion information can be selected from the initial motion information candidate list to obtain at least one unidirectional motion information; or, the motion information can also be obtained from the encoded part, such as from the spatial motion information of the current block and/or the current block. The motion information is acquired from time-domain motion information and/or historical motion information of the current block to obtain at least one piece of unidirectional motion information.
还需要说明的是,由于当前块的已知运动信息可以是单向运动信息,还可以是双向运动信息,需要对其进行判断。具体地,在一些实施例中,该方法还可以包括:It should also be noted that since the known motion information of the current block may be one-way motion information or two-way motion information, it needs to be judged. Specifically, in some embodiments, the method may also include:
若从初始运动信息候选列表内选择运动信息,则确定所选择的运动信息为单向运动信息;If motion information is selected from the initial motion information candidate list, then determining that the selected motion information is unidirectional motion information;
若从当前块的空域运动信息和/或所述当前块的时域运动信息和/或所述当前块的历史运动信息内选择运动信息,则判断所选择的运动信息是否为双向运动信息;If motion information is selected from the spatial motion information of the current block and/or the temporal motion information of the current block and/or the historical motion information of the current block, then judging whether the selected motion information is bidirectional motion information;
当所选择的运动信息为双向运动信息时,将所选择的运动信息拆分为两个单向运动信息,以执行从所述当前块的多个已知运动信息中确定至少一个单向运动信息的步骤。When the selected motion information is bidirectional motion information, the selected motion information is split into two unidirectional motion information, so as to determine at least one unidirectional motion information from a plurality of known motion information of the current block. step.
也就是说,在确定至少一个单向运动信息时,如果是从初始运动信息候选列表中选取运动信息,那所选取的运动信息为单向运动信息。如果是根据空域信息、时域信息、历史运动信息等,那么需要确定所选取的运动信息是否为单向;如果这个运动信息是双向运动信息,即两个参考帧列表的参考索引值都是有效值,这时候需要把它拆成两个单向运动信息分别处理。That is to say, when at least one unidirectional motion information is determined, if the motion information is selected from the initial motion information candidate list, the selected motion information is unidirectional motion information. If it is based on spatial information, time domain information, historical motion information, etc., then it is necessary to determine whether the selected motion information is one-way; if the motion information is two-way motion information, that is, the reference index values of the two reference frame lists are valid. value, at this time it needs to be split into two one-way motion information to be processed separately.
应理解,对于构造新的单向运动信息来说,主要涉及到至少一个单向运动信息的确定。下面将提供几种可能的实施方式来说明如何确定至少一个单向运动信息。It should be understood that the construction of new unidirectional motion information mainly involves the determination of at least one unidirectional motion information. Several possible implementations will be provided below to illustrate how to determine at least one piece of unidirectional motion information.
在一种可能的实施方式中,对于S802来说,所述从所述当前块的多个已知运动信息中确定至少一个单向运动信息,可以包括:In a possible implementation manner, for S802, the determining at least one unidirectional motion information from multiple known motion information of the current block may include:
从所述当前块的多个已知运动信息中,选择至少一个初始单向运动信息;Selecting at least one initial unidirectional motion information from a plurality of known motion information of the current block;
确定候选参考帧,将所选择的至少一个初始单向运动信息缩放到所述候选参考帧,得到至少一个缩放后的单向运动信息;determining a candidate reference frame, and scaling the selected at least one initial unidirectional motion information to the candidate reference frame to obtain at least one scaled unidirectional motion information;
将所述至少一个缩放后的单向运动信息确定为所述至少一个单向运动信息,且所述至少一个单向运动信息对应的参考帧信息均为所述候选参考帧。The at least one scaled unidirectional motion information is determined as the at least one unidirectional motion information, and the reference frame information corresponding to the at least one unidirectional motion information is the candidate reference frame.
需要说明的是,以一个单向运动信息为例,在从当前块的多个已知运动信息中任意选择一个初始单向运动信息后,首先选定一个候选参考帧,然后将该初始单向运动信息缩放到候选参考帧上,这时候所确定的一个单向运动信息即为缩放后的单向运动信息,而且对应的参考帧信息为候选参考帧;在这种情况下,根据这一个单向运动信息通过偏移方式所得到至少一个新的单向运动信息,这至少一个新的单向运动信息对应的参考帧信息也为候选参考帧。It should be noted that, taking a unidirectional motion information as an example, after arbitrarily selecting an initial unidirectional motion information from multiple known motion information of the current block, a candidate reference frame is first selected, and then the initial unidirectional motion information The motion information is scaled to the candidate reference frame. At this time, the determined one-way motion information is the scaled one-way motion information, and the corresponding reference frame information is the candidate reference frame; in this case, according to this one-way At least one new unidirectional motion information is obtained by offsetting the directional motion information, and the reference frame information corresponding to the at least one new unidirectional motion information is also a candidate reference frame.
这里,候选参考帧是预先任意选定的参考帧。Here, the candidate reference frame is an arbitrarily selected reference frame in advance.
在另一种可能的实施方式中,,对于S802来说,所述从所述当前块的多个已知运动信息中确定至少一个单向运动信息,可以包括:In another possible implementation manner, for S802, the determining at least one unidirectional motion information from multiple pieces of known motion information of the current block may include:
确定候选参考帧;determining candidate reference frames;
从所述当前块的多个已知运动信息中选择所述至少一个单向运动信息,且所述至少一个单向运动信息对应的参考帧信息为所述候选参考帧。Selecting the at least one unidirectional motion information from multiple pieces of known motion information of the current block, and the reference frame information corresponding to the at least one unidirectional motion information is the candidate reference frame.
需要说明的是,仍以一个单向运动信息为例,可以首先选定一个候选参考帧,然后从当前块的多个已知运动信息中直接选择参考帧信息为候选参考帧的初始单向运动信息,这时候所确定的一个单向运动信息即为所选择的单向运动信息,而且对应的参考帧信息为候选参考帧;在这种情况下,根据这一个单向运动信息通过偏移方式所得到至少一个新的单向运动信息,这至少一个新的单向运动信息对应的参考帧信息也为候选参考帧。It should be noted that, still taking a unidirectional motion information as an example, a candidate reference frame can be selected first, and then the reference frame information can be directly selected from multiple known motion information of the current block as the initial unidirectional motion of the candidate reference frame Information, the one-way motion information determined at this time is the selected one-way motion information, and the corresponding reference frame information is the candidate reference frame; in this case, according to this one-way motion information through the offset method At least one new unidirectional motion information is obtained, and the reference frame information corresponding to the at least one new unidirectional motion information is also a candidate reference frame.
除此之外,本申请实施例还可以从当前块的多个已知运动信息中直接选择一个初始单向运动信息,这时候无需确定候选参考帧,但是后续所构造的至少一个新的单向运动信息对应的参考帧信息与所选择的初始单向运动信息对应的参考帧信息相同。In addition, the embodiment of the present application can also directly select an initial unidirectional motion information from a plurality of known motion information of the current block. At this time, there is no need to determine a candidate reference frame, but at least one new unidirectional motion information constructed subsequently The reference frame information corresponding to the motion information is the same as the reference frame information corresponding to the selected initial unidirectional motion information.
如此,在确定出至少一个单向运动信息之后,后续可以通过偏移方式构造出至少一个新的单向运动信息。In this way, after at least one piece of unidirectional motion information is determined, at least one new piece of unidirectional motion information can be subsequently constructed in an offset manner.
S803:基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息。S803: Perform offset processing on the at least one unidirectional motion information based on a preset offset to obtain at least one new unidirectional motion information.
需要说明的是,在得到至少一个单向运动信息之后,可以对其进行偏移处理,以得到至少一个新的单向运动信息;而且每一个单向运动信息根据偏移信息的不同,可以构造出一个或多个新的单向运动信息。这里,预设偏移量可以是根据所述至少一个单向运动信息对应的水平方向矢量值和垂直方向矢量值计算得到。It should be noted that after at least one unidirectional motion information is obtained, offset processing can be performed on it to obtain at least one new unidirectional motion information; and each unidirectional motion information can be constructed according to the difference of offset information Generate one or more new unidirectional motion messages. Here, the preset offset may be calculated according to the horizontal direction vector value and the vertical direction vector value corresponding to the at least one piece of unidirectional motion information.
在一些实施例中,对于S803来说,所述基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息,可以包括:In some embodiments, for S803, performing offset processing on the at least one unidirectional motion information based on a preset offset to obtain at least one new unidirectional motion information may include:
基于至少一个预设方向,按照预设偏移量对所述至少一个单向运动信息进行偏移处理,得到所述至少一个新的单向运动信息;其中,所述至少一个新的单向运动信息与所述至少一个单向运动信息对应的参考帧信息相同。Based on at least one preset direction, perform offset processing on the at least one unidirectional motion information according to a preset offset to obtain the at least one new unidirectional motion information; wherein, the at least one new unidirectional motion information The information is the same as the reference frame information corresponding to the at least one piece of unidirectional motion information.
需要说明的是,预设方向至少可以包括:向上方向,和/或,向下方向,和/或,向左方向,和/或,向右方向;这样,针对不同的预设方向,按照预设偏移量对至少一个单向运动信息进行偏移,那么可以得到不同新的单向运动信息。It should be noted that the preset direction may at least include: an upward direction, and/or, a downward direction, and/or, a leftward direction, and/or, a rightward direction; If the offset is used to offset at least one unidirectional motion information, different new unidirectional motion information can be obtained.
通常而言,可以根据当前块的已知运动信息来构造新的单向运动信息并加入运动信息候选列表。当运动信息候选列表中存在有运动信息时,可以根据运动信息候选列表中的运动信息进行构造;或者也可以根据通过已编码部分获取的运动信息进行构造,比如根据空域信息、时域信息、历史运动信息(即基于历史信息所得到的运动信息)等进行构造,以得到至少一个新的单向运动信息。也就是说,可以对已有MV进行偏移以得到新的MV。假定已有MV的值为(x,y)。水平方向的预设偏移量用offsetx表示,竖直方向的预设偏移量用offsety表示,那么新的MV的值为(x+offsetx,y+offsety)。Generally speaking, new unidirectional motion information can be constructed according to the known motion information of the current block and added to the motion information candidate list. When there is motion information in the motion information candidate list, it can be constructed according to the motion information in the motion information candidate list; or it can be constructed according to the motion information obtained through the encoded part, such as according to spatial information, time domain information, history The motion information (that is, the motion information obtained based on the historical information) etc. is constructed to obtain at least one new unidirectional motion information. That is, an existing MV can be offset to obtain a new MV. Assume that the value of the existing MV is (x,y). The preset offset in the horizontal direction is represented by offsetx, and the preset offset in the vertical direction is represented by offsety, so the value of the new MV is (x+offsetx, y+offsety).
在一种可能的实施方式中,针对已有MV分别进行向上、向下、向左和向右的偏移得到不同的MV。如果针对已有MV进行向上偏移,预设偏移量的绝对值是offset,那么所构造的新的MV为(x,y-offset);如果针对已有MV进行向下偏移,预设偏移量的绝对值是offset,那么所构造的新的MV为(x,y+offset);如果针对已有MV进行向左偏移,预设偏移量的绝对值是offset,那么所构造的新的MV为(x-offset,y);如果针对已有MV进行向右偏移,预设偏移量的绝对值是offset,那么所构造的新的MV为(x+offset,y)。In a possible implementation manner, the existing MVs are respectively shifted upward, downward, leftward, and rightward to obtain different MVs. If an upward offset is performed for the existing MV, the absolute value of the preset offset is offset, then the constructed new MV is (x, y-offset); if a downward offset is performed for the existing MV, the preset The absolute value of the offset is offset, then the constructed new MV is (x, y+offset); if the existing MV is shifted to the left, the absolute value of the preset offset is offset, then the constructed The new MV is (x-offset, y); if the existing MV is shifted to the right, the absolute value of the default offset is offset, then the constructed new MV is (x+offset, y) .
在另一种可能的实施方式中,将已知运动信息缩放到与该运动信息对应的参考帧不同的参考帧上,然后再进行MV的偏移,以得到新的单向运动信息。In another possible implementation manner, the known motion information is scaled to a reference frame different from the reference frame corresponding to the motion information, and then the MV is shifted to obtain new unidirectional motion information.
需要注意的是,本申请实施例主要适用于单向运动信息,但是同样适用于双向运动信息。如果运动信息是双向的,那么在两个方向的MV偏移方向可以是相同的,或者是相反的;预设偏移量可以是各自确定,也可以是共同确定。It should be noted that the embodiment of the present application is mainly applicable to unidirectional motion information, but is also applicable to bidirectional motion information. If the motion information is bidirectional, the MV offset directions in the two directions can be the same or opposite; the preset offsets can be determined separately or jointly.
还需要说明的是,预设偏移量可以是预先设定的固定值,或者,预设偏移量还可以是根据预设算法得到的,本申请实施例不作具体限定。It should also be noted that the preset offset may be a preset fixed value, or the preset offset may be obtained according to a preset algorithm, which is not specifically limited in this embodiment of the present application.
这里,针对预设偏移量而言,可以采用下述几种实施方式来确定。Here, for the preset offset, the following several implementation manners may be used to determine it.
在一种可能的实施方式中,预设偏移量可以为预设的固定值,比如固定的1、2、3、4、5、6、7、8等其中的某一值。In a possible implementation manner, the preset offset may be a preset fixed value, such as a fixed value of 1, 2, 3, 4, 5, 6, 7, 8, and the like.
在另一种可能的实施方式中,该方法还可以包括:In another possible implementation manner, the method may also include:
针对所述至少一个单向运动信息,确定每一单向运动信息对应的水平方向矢量值和垂直方向矢量值;For the at least one unidirectional motion information, determine a horizontal direction vector value and a vertical direction vector value corresponding to each unidirectional motion information;
在所述预设方向为向上方向和/或向下方向的情况下,判断所述垂直方向矢量值是否等于0;When the preset direction is an upward direction and/or a downward direction, it is judged whether the value of the vertical direction vector is equal to 0;
当所述垂直方向矢量值不等于0时,根据所述垂直方向矢量值的绝对值与第一预设值的除法运算,得到每一单向运动信息对应的预设偏移量;When the vector value in the vertical direction is not equal to 0, according to the division operation between the absolute value of the vector value in the vertical direction and the first preset value, the preset offset corresponding to each unidirectional motion information is obtained;
或者,or,
在所述预设方向为向左方向和/或向右方向的情况下,判断所述水平方向矢量值是否等于0;When the preset direction is a leftward direction and/or a rightward direction, determine whether the horizontal direction vector value is equal to 0;
当所述水平方向矢量值不等于0时,根据所述水平方向矢量值的绝对值与第二预设值的除法运算,得到每一单向运动信息对应的预设偏移量。When the horizontal direction vector value is not equal to 0, the preset offset corresponding to each unidirectional motion information is obtained according to the division operation between the absolute value of the horizontal direction vector value and the second preset value.
需要说明的是,预设偏移量可以与用于构造新MV的已有MV的(x,y)有关。其中,x表示水平方向矢量值,y表示垂直方向矢量值。这里,具体的实施方式可以参见解码器侧的描述。It should be noted that the preset offset may be related to (x, y) of the existing MV used to construct the new MV. Among them, x represents the vector value in the horizontal direction, and y represents the vector value in the vertical direction. Here, for the specific implementation manner, refer to the description on the decoder side.
在又一种可能的实施方式中,该方法还可以包括:In yet another possible implementation manner, the method may also include:
针对任意一种预设方向,将所述水平方向矢量值的绝对值和所述垂直方向矢量值的绝对值进行加法运算,得到计算和值;For any preset direction, the absolute value of the vector value in the horizontal direction and the absolute value of the vector value in the vertical direction are added to obtain a calculation sum;
判断所述计算和值是否等于0;Judging whether the calculated sum value is equal to 0;
当所述计算和值不等于0时,根据所述计算和值与第三预设值的除法运算,得到每一单向运动信息对应的预设偏移量。When the calculated sum value is not equal to 0, a preset offset corresponding to each unidirectional motion information is obtained according to a division operation between the calculated sum value and a third preset value.
需要说明的是,针对任何一个预设方向,可以预设偏移量可以与用于构造新MV的已有MV的|x|+|y|有关。其中,x表示水平方向矢量值,y表示垂直方向矢量值。这里,具体的实施方式可以参见解码器侧的描述。It should be noted that, for any preset direction, the preset offset may be related to |x|+|y| of the existing MV used to construct the new MV. Among them, x represents the vector value in the horizontal direction, and y represents the vector value in the vertical direction. Here, for the specific implementation manner, refer to the description on the decoder side.
在又一种可能的实施方式中,该方法还可以包括:In yet another possible implementation manner, the method may also include:
针对每一单向运动信息,将所得到的预设偏移量与最小预设偏移量和最大预设偏移量分别比较;For each unidirectional motion information, comparing the obtained preset offset with the minimum preset offset and the maximum preset offset respectively;
在所得到的预设偏移量小于最小预设偏移量时,将所述最小预设偏移量确定为所述预设偏移量;When the obtained preset offset is less than the minimum preset offset, determining the minimum preset offset as the preset offset;
在所得到的预设偏移量大于最小预设偏移量时,将所述最大预设偏移量确定为所述预设偏移量。When the obtained preset offset is greater than the minimum preset offset, the maximum preset offset is determined as the preset offset.
也就是说,预设偏移量(用offset表示)的大小可能要符合一定的预设取值范围,比如在最小预设偏移量(用offsetmin表示)和最大预设偏移量(用offsetmax表示)之间的范围,即offset需要大于或等于offsetmin,offset还需要小于或等于offsetmax。如果根据上面的实施方式计算得到的offset小于offsetmin,那么将offset设定为offsetmin;如果根据上面的实施方式计算得到的offset大于offsetmax,那么将offset设定为offsetmax。这里,offsetmax和offsetmax可以为某些预设的固定值,但是本申请实施例不作限定。That is to say, the size of the preset offset (represented by offset) may conform to a certain preset value range, for example, between the minimum preset offset (represented by offset min ) and the maximum preset offset (represented by offset max indicates the range between), that is, offset needs to be greater than or equal to offset min , and offset needs to be less than or equal to offset max . If the offset calculated according to the above implementation manner is smaller than offset min , then set offset to offset min ; if the offset calculated according to the above implementation manner is greater than offset max , then set offset to offset max . Here, offset max and offset max may be some preset fixed values, but this embodiment of the present application does not limit it.
这样,可以通过以上的几种可能的实施方式构造出一个或多个单向运动信息。然后将构造出的单向运动信息填入初始运动信息候选列表,以得到新的运动信息候选列表。In this way, one or more pieces of one-way motion information can be constructed through the above several possible implementation manners. Then fill the constructed unidirectional motion information into the initial motion information candidate list to obtain a new motion information candidate list.
S804:基于所述至少一个新的单向运动信息,构建新的运动信息候选列表。S804: Based on the at least one piece of new unidirectional motion information, construct a new motion information candidate list.
需要说明的是,在得到至少一个新的单向运动信息之后,可以将其填入到初始运动信息候选列表中,以得到新的运动信息候选列表。具体地,对于S804来说,该步骤可以包括:将至少一个新的单向运动信息填入初始运动信息候选列表中,得到所述新的运动信息候选列表。It should be noted that after obtaining at least one piece of new unidirectional motion information, it may be filled into the initial motion information candidate list to obtain a new motion information candidate list. Specifically, for S804, this step may include: filling at least one piece of new unidirectional motion information into the initial motion information candidate list to obtain the new motion information candidate list.
还需要说明的是,只有所得到的新的单向运动信息与初始运动信息候选列表内所包括的原有单向运动信息不重复的情况下,才能够将其填充到该候选列表。在一些实施例中,所述将所述至少一个新的单向运动信息填入所述初始运动信息候选列表中,可以包括:It should also be noted that only when the obtained new unidirectional motion information does not overlap with the original unidirectional motion information included in the initial motion information candidate list, can it be filled into the candidate list. In some embodiments, the filling the at least one new unidirectional motion information into the initial motion information candidate list may include:
判断至少一个新的单向运动信息与所述初始运动信息候选列表内的运动信息是否重复;judging whether at least one new unidirectional motion information is duplicated with the motion information in the initial motion information candidate list;
在所述至少一个新的单向运动信息与所述初始运动信息候选列表内的运动信息不重复的情况下,将所述至少一个新的单向运动信息填入所述初始运动信息候选列表中。If the at least one new unidirectional motion information does not overlap with the motion information in the initial motion information candidate list, filling the at least one new unidirectional motion information into the initial motion information candidate list .
这样,初始运动信息候选列表的构建方式中,如果不重复的单向运动信息无法填满该候选列表,通常是采用该候选列表中最后一个单向运动信息来重复填充以填满该候选列表。而本申请实施例中,可以在不重复的单向运动信息且无法填满候选列表时,这时候通过构造新的单向运动信息的方式以构建出新的单向运动信息来填充候选列表;即所构造出新的单向运动信息与候选列表中原有的单向运动信息不重复的情况下才能够填充进该候选列表。In this way, in the construction method of the initial motion information candidate list, if the non-repetitive unidirectional motion information cannot fill the candidate list, the last unidirectional motion information in the candidate list is usually used to repeatedly fill the candidate list to fill the candidate list. However, in the embodiment of the present application, when there is no repeated unidirectional motion information and the candidate list cannot be filled, at this time, new unidirectional motion information can be constructed to fill the candidate list by constructing new unidirectional motion information; That is, the newly constructed one-way motion information can be filled into the candidate list only when it does not overlap with the original one-way motion information in the candidate list.
换句话说,本申请实施例的帧间预测方法是在初始运动信息候选列表不包括重复的单向运动信息且初始运动信息候选列表内的单向运动信息数量小于预设数量(即初始运动信息候选列表处于未填满状态)下进行的。因此,在一些实施例中,该方法还可以包括:In other words, in the inter-frame prediction method of the embodiment of the present application, the initial motion information candidate list does not include repeated unidirectional motion information and the number of unidirectional motion information in the initial motion information candidate list is less than the preset number (that is, the initial motion information Candidate list is not filled). Therefore, in some embodiments, the method may also include:
在所述初始运动信息候选列表不包括重复的单向运动信息且所述初始运动信息候选列表内的单向运动信息数量小于预设数量时,执行所述从所述当前块的多个已知运动信息中确定至少一个单向运动信息;以及基于预设偏移量对所述至少一个单向运动信息进行运动矢量计算,获得至少一个新的单向运动信息的步骤。When the initial motion information candidate list does not include repeated unidirectional motion information and the number of unidirectional motion information in the initial motion information candidate list is less than a preset number, performing the multiple known from the current block Steps of determining at least one unidirectional motion information in the motion information; and performing motion vector calculation on the at least one unidirectional motion information based on a preset offset to obtain at least one new unidirectional motion information.
需要说明的是,在构建运动信息候选列表的过程中,针对至少一个新的单向运动信息,主要涉及从当前块的已知运动信息中如何确定至少一个单向运动信息。例如,针对已有的初始运动信息候选列表,可以是从该候选列表内任意选择一个运动信息,比如第一个运动信息或者最后一个运动信息;也可以是从该候选列表内顺序选择运动信息等。也就是说,在一些实施例中,该方法还可以包括:It should be noted that, in the process of constructing the motion information candidate list, for at least one new unidirectional motion information, it mainly involves how to determine at least one unidirectional motion information from known motion information of the current block. For example, for the existing initial motion information candidate list, one motion information can be arbitrarily selected from the candidate list, such as the first motion information or the last motion information; it can also be sequentially selected from the candidate list, etc. . That is, in some embodiments, the method may also include:
从所述初始运动信息候选列表内任意选择一个运动信息,根据所述一个运动信息的偏移处理,获得所述至少一个新的单向运动信息;或者,Randomly select one piece of motion information from the initial motion information candidate list, and obtain the at least one new unidirectional motion information according to the offset processing of the one motion information; or,
从所述初始运动信息候选列表内顺序选择至少一个运动信息,根据所述至少一个运动信息的偏移处理,获得所述至少一个新的单向运动信息;或者,Sequentially select at least one piece of motion information from the initial motion information candidate list, and obtain the at least one new unidirectional motion information according to offset processing of the at least one piece of motion information; or,
从所述当前块的空域运动信息和/或所述当前块的时域运动信息和/或所述当前块的历史运动信息内顺序选择至少一个运动信息,根据所述至少一个运动信息的偏移处理,获得所述至少一个新的单向运动信息。Sequentially select at least one piece of motion information from the spatial domain motion information of the current block and/or the time domain motion information of the current block and/or the historical motion information of the current block, according to the offset of the at least one motion information Processing, obtaining the at least one new unidirectional motion information.
这样,可以从已有的初始运动信息候选列表中选择用于构造新的单向运动信息的运动信息。一种方式是只使用初始运动信息候选列表中的某一个运动信息,比如初始运动信息候选列表中的第一个运动信息,或者初始运动信息候选列表中的最后一个运动信息;另一种方式是按顺序使用初始运动信息候选列表中的运动信息来构造新的运动信息;结束条件是初始运动信息候选列表被填满或遍历结束,以得到新的运动信息候选列表。In this way, motion information for constructing new unidirectional motion information can be selected from an existing initial motion information candidate list. One way is to use only one motion information in the initial motion information candidate list, such as the first motion information in the initial motion information candidate list, or the last motion information in the initial motion information candidate list; another way is The motion information in the initial motion information candidate list is sequentially used to construct new motion information; the end condition is that the initial motion information candidate list is filled or the traversal ends to obtain a new motion information candidate list.
除此之外,本申请实施例还可以按照与当前块的相对关系选择运动信息。一种方式是只使用某一个相对位置的运动信息,比如F、G、C、A、B和D中的某一个位置的运动信息,或按照上面所述时域上的运动信息;另一种方式是对这些相对关系设置一个顺序,如果前一个相对关系的运动信息不可用,那么选择后一个可用的运动信息;再一种方式是对这些相对关系设置一个顺序,按顺序使用相对关系的运动信息来构造新的运动信息;结束条件是初始运动信息候选列表被填满或遍历结束,以得到新的运动信息候选列表。In addition, the embodiment of the present application may also select the motion information according to the relative relationship with the current block. One way is to use only the motion information of a certain relative position, such as the motion information of a certain position in F, G, C, A, B, and D, or the motion information in the time domain as described above; the other The way is to set an order for these relative relationships, if the motion information of the previous relative relationship is not available, then select the next available motion information; another way is to set an order for these relative relationships, and use the motion of the relative relationship in order information to construct new motion information; the end condition is that the initial motion information candidate list is filled or the traversal ends to obtain a new motion information candidate list.
S805:根据所述新的运动信息候选列表,确定所述当前块的帧间预测值。S805: Determine an inter-prediction value of the current block according to the new motion information candidate list.
需要说明的是,当预测模式参数指示使用GPM或AWP确定当前块的帧间预测值时,这时候可以确定出当前块的两个分区;其中,两个分区可以包括第一分区和第二分区。It should be noted that when the prediction mode parameter indicates that GPM or AWP is used to determine the inter-frame prediction value of the current block, two partitions of the current block can be determined at this time; where the two partitions can include the first partition and the second partition .
这样,在得到新的运动信息候选列表后,可以确定出当前块的第一分区对应的运动信息和所述第二分区的运动信息;然后根据第一分区对应的运动信息和所述第二分区的运动信息,能够确定出当前块的帧间预测值。In this way, after obtaining the new motion information candidate list, the motion information corresponding to the first partition of the current block and the motion information of the second partition can be determined; and then according to the motion information corresponding to the first partition and the second partition The motion information of the current block can be determined to determine the inter frame prediction value.
具体地,在一些实施例中,对于S805来说,所述根据所述新的运动信息候选列表,确定所述当前块的帧间预测值,可以包括:Specifically, in some embodiments, for S805, the determining the inter-prediction value of the current block according to the new motion information candidate list may include:
基于所述新的运动信息候选列表,确定所述第一分区的运动信息和所述第二分区的运动信息,并将第一运动信息索引值设置为所述第一分区的运动信息在所述新的运动信息候选列表中的索引序号值,将第二运动信息索引值设置为所述第二分区的运动信息在所述新的运动信息候选列表中的索引序号值;Based on the new motion information candidate list, determine the motion information of the first partition and the motion information of the second partition, and set the first motion information index value as the motion information of the first partition in the The index number value in the new motion information candidate list, setting the second motion information index value as the index number value of the motion information of the second partition in the new motion information candidate list;
利用所述第一分区的运动信息计算所述第一分区的第一预测值,利用所述第二分区的运动信息计算所述第二分区的第二预测值;calculating a first predicted value of the first partition by using the motion information of the first partition, and calculating a second predicted value of the second partition by using the motion information of the second partition;
对所述第一预测值和所述第二预测值进行加权融合,得到所述当前块的帧间预测值。performing weighted fusion on the first predicted value and the second predicted value to obtain an inter-frame predicted value of the current block.
进一步地,在一些实施例中,该方法还可以包括:Further, in some embodiments, the method may also include:
将所述第一运动信息索引值和所述第二运动信息索引值写入码流。Writing the first motion information index value and the second motion information index value into a code stream.
需要说明的是,GPM或AWP属于一种帧间预测技术,在编码器侧,GPM或AWP需要在码流中传输一个GPM或AWP是否使用的标志(flag)以及两个运动信息索引值(比如第一运动信息索引值和第二运动信息索引值),这样后续解码器侧,能够通过解析码流直接得到GPM或AWP是否使用的flag以及两个运动信息索引值。It should be noted that GPM or AWP belongs to an inter-frame prediction technology. On the encoder side, GPM or AWP needs to transmit a flag (flag) whether to use GPM or AWP and two motion information index values (such as The first motion information index value and the second motion information index value), so that the subsequent decoder side can directly obtain the flag of whether GPM or AWP is used and the two motion information index values by parsing the code stream.
也就是说,对于当前块而言,可以尝试使用GPM或AWP进行预编码及其他可用预测模式进行预编码,确定是否使用GPM或AWP。如果GPM或AWP的预编码代价最小,那么可以使用GPM或AWP。同时,在尝试使用GPM或AWP时,还可以构建运动信息候选列表,该构建方式和解码器侧实施例所述的构建方式相同。That is to say, for the current block, you can try to use GPM or AWP for precoding and other available prediction modes for precoding to determine whether to use GPM or AWP. GPM or AWP can be used if the precoding cost of GPM or AWP is minimal. At the same time, when trying to use GPM or AWP, a motion information candidate list can also be constructed, and the construction method is the same as that described in the embodiment on the decoder side.
这样,在编码器侧,从运动信息候选列表中选择两个单向运动信息,然后从GPM或AWP的预测模式中选择一种模式进行预编码来确定GPM或AWP的预编码代价。一种可能的方式是对所有可能的单向运动信息候选的组合,基于所有可能的GPM或AWP的预测模式确定其代价,然后取代价最小的两个单向运动信息和GPM或AWP的预测模式的组合作为最终所确定的两个单向运动信息和GPM或AWP的预测模式。In this way, on the encoder side, two unidirectional motion information are selected from the motion information candidate list, and then one mode is selected from the GPM or AWP prediction mode for precoding to determine the GPM or AWP precoding cost. One possible way is to determine the cost of all possible combinations of unidirectional motion information candidates based on all possible GPM or AWP prediction modes, and then replace the two unidirectional motion information and GPM or AWP prediction modes with the smallest cost The combination of two unidirectional motion information and GPM or AWP prediction mode finally determined.
最后,在码流中写入GPM或AWP是否使用的信息。如果确定使用GPM或AWP,在码流中写入GPM或AWP的预测模式参数和两个单向运动信息索引值。如此,如果当前模式是跳过模式,那么预测块既是编码块,意味着当前块的编码结束。如果当前模式不是跳过模式,还需要在码流中写入量化系数;其中,量化系数由当前块的实际值减去帧间预测值所得到的残差而组成的残差块,并对残差块进行变换与量化得到,这时候当前块的编码结束。Finally, write the information whether GPM or AWP is used in the code stream. If it is determined to use GPM or AWP, write the prediction mode parameter of GPM or AWP and two unidirectional motion information index values in the code stream. In this way, if the current mode is the skip mode, then the prediction block is both a coding block, which means that the coding of the current block is completed. If the current mode is not skip mode, it is also necessary to write the quantization coefficient in the code stream; wherein, the quantization coefficient is a residual block composed of the residual obtained by subtracting the inter-frame prediction value from the actual value of the current block, and the residual The difference block is transformed and quantized, and the coding of the current block ends at this time.
也就是说,无论编码器或解码器,利用新的运动信息候选列表所确定的两个单向运动信息找到两个参考块,根据GPM或AWP使用的具体的模式确定两个参考块在每一个像素位置的权值,并将两个参考块加权得到当前块的预测块。在得到预测块后的处理都与相关技术方案无异。具体地,在编码器侧,如果当前模式是跳过模式,则当前块的编码结束;如果当前模式不是跳过模式,将当前块与预测块相减得到残差块,将残差块进行变换,量化,熵编码等处理;在解码器侧,如果当前模式是跳过模式,则预测块就是解码块,当前块的解码结束;如果当前模式不是跳过模式,熵解码解析量化系数,接着反量化与反变换得到残差块,将残差块与预测块相加以得到解码块,这时候当前块的编码结束。That is to say, no matter the encoder or the decoder, use the two unidirectional motion information determined by the new motion information candidate list to find two reference blocks, and determine the two reference blocks according to the specific mode used by GPM or AWP in each The weight of the pixel position, and weight the two reference blocks to obtain the prediction block of the current block. The processing after the prediction block is obtained is the same as that of the related technical solutions. Specifically, on the encoder side, if the current mode is the skip mode, the encoding of the current block ends; if the current mode is not the skip mode, the current block is subtracted from the prediction block to obtain a residual block, and the residual block is transformed , quantization, entropy coding, etc.; on the decoder side, if the current mode is skip mode, the predicted block is the decoded block, and the decoding of the current block ends; if the current mode is not skip mode, entropy decoding analyzes the quantized coefficients, and then inversely The residual block is obtained by quantization and inverse transformation, and the residual block is added to the predicted block to obtain a decoded block. At this time, the encoding of the current block ends.
还需要说明的是,本申请实施例的运动信息候选列表一般是指单向运动信息候选列表,但是本申请实施例单向运动信息的构造方式可以扩展到双向运动信息的构造,从而单向运动信息候选列表的构建也可以扩展到双向运动信息候选列表的构建。It should also be noted that the motion information candidate list in the embodiment of the present application generally refers to the unidirectional motion information candidate list, but the construction method of the unidirectional motion information in the embodiment of the present application can be extended to the construction of the bidirectional motion information, so that the unidirectional motion The construction of information candidate list can also be extended to the construction of two-way motion information candidate list.
本实施例提供了一种帧间预测方法,应用于编码器。确定当前块的预测模式参数;当所述预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值时,从所述当前块的多个已知运动信息中确定至少一个单向运动信息;基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息;其中,所述预设偏移量是根据所述至少一个单向运动信息对应的水平方向矢量值和垂直方向矢量值计算得到;基于所述至少一个新的单向运动信息,构建新的运动信息候选列表;根据所述新的运动信息候选列表,确定所述当前块的帧间预测值。这样,在得到至少一个新的单向运动信息之后,可以将新的单向运动信息填入运动信息候选列表中,能够增加运动信息候选列表中运动信息的多样性;另外,对当前块来说,运动信息候选列表中初始运动信息与实际的运动信息可能存在偏差,这时候构造新的单向运动信息将会比初始运动信息具有更好的效果,从而提升了编解码性能。This embodiment provides an inter-frame prediction method, which is applied to an encoder. Determine the prediction mode parameter of the current block; when the prediction mode parameter indicates that the inter-frame prediction value of the current block is determined using a preset inter-frame prediction mode, determine at least one unit from a plurality of known motion information of the current block One-way motion information; performing offset processing on the at least one one-way motion information based on a preset offset to obtain at least one new one-way motion information; wherein, the preset offset is based on the at least one one-way motion information The vector value in the horizontal direction and the vector value in the vertical direction corresponding to the motion information are calculated; based on the at least one new unidirectional motion information, a new motion information candidate list is constructed; according to the new motion information candidate list, the The inter predictor of the current block. In this way, after obtaining at least one new unidirectional motion information, the new unidirectional motion information can be filled in the motion information candidate list, which can increase the diversity of motion information in the motion information candidate list; in addition, for the current block , the initial motion information in the motion information candidate list may deviate from the actual motion information. At this time, constructing new unidirectional motion information will have a better effect than the initial motion information, thereby improving the encoding and decoding performance.
基于前述实施例相同的发明构思,参见图9,其示出了本申请实施例提供的一种解码器90的组成结构示意图。如图9所示,解码器90可以包括:解析单元901、第一确定单元902、第一偏移单元903、第一构建单元904和第一预测单元905;其中,Based on the same inventive concept as the foregoing embodiments, refer to FIG. 9 , which shows a schematic structural diagram of a
解析单元901,配置为解析码流,获取当前块的预测模式参数;The
第一确定单元902,配置为当所述预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值时,从所述当前块的多个已知运动信息中确定至少一个单向运动信息;The first determining
第一偏移单元903,配置为基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息;其中,所述预设偏移量是根据所述至少一个单向运动信息对应的水平方向矢量值和垂直方向矢量值计算得到;The first offset
第一构建单元904,配置为基于所述至少一个新的单向运动信息,构建新的运动信息候选列表;The
第一预测单元905,配置为根据所述新的运动信息候选列表,确定所述当前块的帧间预测值。The
在一些实施例中,所述运动信息包括运动矢量信息和参考帧信息。In some embodiments, the motion information includes motion vector information and reference frame information.
在一些实施例中,参见图9,解码器90还可以包括第一选择单元906和第一缩放单元907;其中,In some embodiments, referring to FIG. 9, the
第一选择单元906,配置为从所述当前块的多个已知运动信息中,选择至少一个初始单向运动信息;The
第一缩放单元907,配置为确定候选参考帧,将所选择的至少一个初始单向运动信息缩放到所述候选参考帧,得到至少一个缩放后的单向运动信息;The
第一确定单元902,还配置为将所述至少一个缩放后的单向运动信息确定为所述至少一个单向运动信息,且所述至少一个单向运动信息对应的参考帧信息均为所述候选参考帧。The first determining
在一些实施例中,第一选择单元906,还配置为确定候选参考帧;从所述当前块的多个已知运动信息中选择所述至少一个单向运动信息,且所述至少一个单向运动信息对应的参考帧信息为所述候选参考帧。In some embodiments, the
在一些实施例中,第一偏移单元903,配置为基于至少一个预设方向,按照预设偏移量对所述至少一个单向运动信息进行偏移处理,得到所述至少一个新的单向运动信息;其中,所述至少一个新的单向运动信息与所述至少一个单向运动信息对应的参考帧信息相同。In some embodiments, the first offset
在一些实施例中,所述预设方向至少包括:向上方向,和/或,向下方向,和/或,向左方向,和/或,向右方向。In some embodiments, the preset direction at least includes: an upward direction, and/or a downward direction, and/or a leftward direction, and/or a rightward direction.
在一些实施例中,第一确定单元902,还配置为针对所述至少一个单向运动信息,确定每一单向运动信息对应的水平方向矢量值和垂直方向矢量值;In some embodiments, the first determining
第一偏移单元903,还配置为在所述预设方向为向上方向和/或向下方向的情况下,判断所述垂直方向矢量值是否等于0;当所述垂直方向矢量值不等于0时,根据所述垂直方向矢量值的绝对值与第一预设值的除法运算,得到每一单向运动信息对应的预设偏移量;或者,在所述预设方向为向左方向和/或向右方向的情况下,判断所述水平方向矢量值是否等于0;当所述水平方向矢量值不等于0时,根据所述水平方向矢量值的绝对值与第二预设值的除法运算,得到每一单向运动信息对应的预设偏移量。The first offset
在一些实施例中,第一偏移单元903,还配置为针对任意一种预设方向,将所述水平方向矢量值的绝对值和所述垂直方向矢量值的绝对值进行加法运算,得到计算和值;判断所述计算和值是否等于0;当所述计算和值不等于0时,根据所述计算和值与第三预设值的除法运算,得到每一单向运动信息对应的预设偏移量。In some embodiments, the first offset
在一些实施例中,第一偏移单元903,还配置为针对每一单向运动信息,将所得到的预设偏移量与最小预设偏移量和最大预设偏移量分别比较;在所得到的预设偏移量小于最小预设偏移量时,将所述最小预设偏移量确定为所述预设偏移量;在所得到的预设偏移量大于最小预设偏移量时,将所述最大预设偏移量确定为所述预设偏移量。In some embodiments, the first offset
在一些实施例中,第一确定单元902,还配置为基于所述当前块的相邻块的运动信息,确定初始运动信息候选列表;In some embodiments, the first determining
第一构建单元904,配置为将所述至少一个新的单向运动信息填入所述初始运动信息候选列表中,得到所述新的运动信息候选列表。The
在一些实施例中,第一构建单元904,还配置为判断所述至少一个新的单向运动信息与所述初始运动信息候选列表内的运动信息是否重复;在所述至少一个新的单向运动信息与所述初始运动信息候选列表内的运动信息不重复的情况下,将所述至少一个新的单向运动信息填入所述初始运动信息候选列表中。In some embodiments, the
在一些实施例中,第一构建单元904,还配置为在所述初始运动信息候选列表不包括重复的单向运动信息且所述初始运动信息候选列表内的单向运动信息数量小于预设数量时,执行所述从所述当前块的多个已知运动信息中确定至少一个单向运动信息;以及基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息的步骤。In some embodiments, the
在一些实施例中,所述当前块的多个已知运动信息至少包括:所述初始运动信息候选列表内的运动信息,和/或,所述当前块的空域运动信息,和/或,所述当前块的时域运动信息,和/或,所述当前块的历史运动信息。In some embodiments, the multiple pieces of known motion information of the current block include at least: motion information in the initial motion information candidate list, and/or, spatial domain motion information of the current block, and/or, the Time-domain motion information of the current block, and/or historical motion information of the current block.
在一些实施例中,第一偏移单元903,还配置为从所述初始运动信息候选列表内任意选择一个运动信息,根据所述一个运动信息的偏移处理,获得所述至少一个新的单向运动信息;或者,从所述初始运动信息候选列表内顺序选择至少一个运动信息,根据所述至少一个运动信息的偏移处理,获得所述至少一个新的单向运动信息;或者,从所述当前块的空域运动信息和/或所述当前块的时域运动信息和/或所述当前块的历史运动信息内顺序选择至少一个运动信息,根据所述至少一个运动信息的偏移处理,获得所述至少一个新的单向运动信息。In some embodiments, the first offset
在一些实施例中,所述预设的帧间预测模式包括:几何划分预测模式GPM或角度加权预测模式AWP。In some embodiments, the preset inter-frame prediction modes include: a geometric partition prediction mode GPM or an angle weighted prediction mode AWP.
在一些实施例中,第一确定单元902,还配置为当所述预测模式参数指示使用GPM或AWP确定当前块的帧间预测值时,确定所述当前块的两个分区;其中,所述两个分区包括第一分区和第二分区;In some embodiments, the first determining
解析单元901,还配置为解析码流,确定所述第一分区对应的第一运动信息索引值和所述第二分区对应的第二运动信息索引值;The
第一确定单元902,还配置为基于所述新的运动信息候选列表,将所述第一运动信息索引值指示的所述新的运动信息候选列表中的运动信息确定为所述第一分区的运动信息,将所述第二运动信息索引值指示的所述新的运动信息候选列表中的运动信息确定为所述第二分区的运动信息;The first determining
第一预测单元905,配置为利用所述第一分区的运动信息计算所述第一分区的第一预测值,利用所述第二分区的运动信息计算所述第二分区的第二预测值;对所述第一预测值和所述第二预测值进行加权融合,得到所述当前块的帧间预测值。The
可以理解地,在本申请实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It can be understood that in the embodiments of the present application, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course it may also be a module, or it may be non-modular. Moreover, each component in this embodiment may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software function modules.
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or It is said that the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product, the computer software product is stored in a storage medium, and includes several instructions to make a computer device (which can It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, and other media capable of storing program codes.
因此,本申请实施例提供了一种计算机存储介质,应用于解码器90,该计算机存储介质存储有帧间预测程序,所述帧间预测程序被第一处理器执行时实现前述实施例中解码器侧所述的方法。Therefore, the embodiment of the present application provides a computer storage medium, which is applied to the
基于上述解码器90的组成以及计算机存储介质,参见图10,其示出了本申请实施例提供的解码器90的具体硬件结构示例,可以包括:第一通信接口1001、第一存储器1002和第一处理器1003;各个组件通过第一总线系统1004耦合在一起。可理解,第一总线系统1004用于实现这些组件之间的连接通信。第一总线系统1004除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图10中将各种总线都标为第一总线系统1004。其中,Based on the above-mentioned composition of the
第一通信接口1001,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The
第一存储器1002,用于存储能够在第一处理器1003上运行的计算机程序;The
第一处理器1003,用于在运行所述计算机程序时,执行:The
解析码流,获取当前块的预测模式参数;Parse the code stream to obtain the prediction mode parameters of the current block;
当所述预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值时,从所述当前块的多个已知运动信息中确定至少一个单向运动信息;When the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block, at least one unidirectional motion information is determined from a plurality of known motion information of the current block;
基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息;其中,所述预设偏移量是根据所述至少一个单向运动信息对应的水平方向矢量值和垂直方向矢量值计算得到;Perform offset processing on the at least one unidirectional motion information based on a preset offset to obtain at least one new unidirectional motion information; wherein the preset offset corresponds to the at least one unidirectional motion information The horizontal direction vector value and the vertical direction vector value are calculated;
基于所述至少一个新的单向运动信息,构建新的运动信息候选列表;Constructing a new motion information candidate list based on the at least one new unidirectional motion information;
根据所述新的运动信息候选列表,确定所述当前块的帧间预测值。Determine an inter-frame prediction value of the current block according to the new motion information candidate list.
可以理解,本申请实施例中的第一存储器1002可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(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 DataRate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第一存储器1002旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the
而第一处理器1003可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器1003中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器1003可以是通用处理器、数字信号处理器(Digital SignalProcessor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器1002,第一处理器1003读取第一存储器1002中的信息,结合其硬件完成上述方法的步骤。The
可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital SignalProcessing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(ProgrammableLogic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。It should be understood that the embodiments described in this application may be implemented by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing device (DSP Device, DSPD), programmable logic Device (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing the functions described in this application or a combination thereof. For software implementation, the techniques described herein can be implemented through modules (eg, procedures, functions, and so on) that perform the functions described herein. Software codes can be stored in memory and executed by a processor. Memory can be implemented within the processor or external to the processor.
可选地,作为另一个实施例,第一处理器1003还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。Optionally, as another embodiment, the
本实施例提供了一种解码器,该解码器可以包括解析单元、第一确定单元、第一偏移单元、第一构建单元和第一预测单元。在该解码器中,在得到至少一个新的单向运动信息之后,可以将新的单向运动信息填入运动信息候选列表中,能够增加运动信息候选列表中运动信息的多样性;另外,对当前块来说,运动信息候选列表中初始运动信息与实际的运动信息可能存在偏差,这时候构造新的单向运动信息将会比初始运动信息具有更好的效果,从而提升了编解码性能。This embodiment provides a decoder, and the decoder may include an analysis unit, a first determination unit, a first offset unit, a first construction unit, and a first prediction unit. In the decoder, after obtaining at least one new unidirectional motion information, the new unidirectional motion information can be filled in the motion information candidate list, which can increase the diversity of motion information in the motion information candidate list; in addition, for For the current block, there may be a deviation between the initial motion information in the motion information candidate list and the actual motion information. At this time, constructing new unidirectional motion information will have a better effect than the initial motion information, thereby improving the encoding and decoding performance.
基于前述实施例相同的发明构思,参见图11,其示出了本申请实施例提供的一种编码器110的组成结构示意图。如图11所示,该编码器110可以包括:第二确定单元1101、第二偏移单元1102、第二构建单元1103和第二预测单元1104;其中,Based on the same inventive concept as the foregoing embodiments, refer to FIG. 11 , which shows a schematic structural diagram of an
第二确定单元1101,配置为确定当前块的预测模式参数;The second determining
第二确定单元1101,还配置为当所述预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值时,从所述当前块的多个已知运动信息中确定至少一个单向运动信息;The
第二偏移单元1102,配置为基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息;其中,所述预设偏移量是根据所述至少一个单向运动信息对应的水平方向矢量值和垂直方向矢量值计算得到;The second offset
第二构建单元1103,配置为基于所述至少一个新的单向运动信息,构建新的运动信息候选列表;The
第二预测单元1104,配置为根据所述新的运动信息候选列表,确定所述当前块的帧间预测值。The
在一些实施例中,所述运动信息包括运动矢量信息和参考帧信息。In some embodiments, the motion information includes motion vector information and reference frame information.
在一些实施例中,参见图11,编码器110还可以包括预编码单元1105和第二选择单元1106;其中,In some embodiments, referring to FIG. 11 , the
预编码单元1105,配置为利用多种预测模式对所述当前块进行预编码处理,获得每一种预测模式对应的率失真代价值;The
第二选择单元1106,配置为从所获得的多个率失真代价值中选择最小率失真代价值,将所述最小率失真代价值对应的预测模式确定为当前块的预测模式参数。The
在一些实施例中,参见图11,编码器110还可以包括第二缩放单元1107;其中,In some embodiments, referring to FIG. 11 , the
第二选择单元1106,还配置为从所述当前块的多个已知运动信息中,选择至少一个初始单向运动信息;The
第二缩放单元1107,配置为确定候选参考帧,将所选择的至少一个初始单向运动信息缩放到所述候选参考帧,得到至少一个缩放后的单向运动信息;The
第二确定单元1101,还配置为将所述至少一个缩放后的单向运动信息确定为所述至少一个单向运动信息,且所述至少一个单向运动信息对应的参考帧信息均为所述候选参考帧。The second determining
在一些实施例中,第二选择单元1106,还配置为确定候选参考帧;从所述当前块的多个已知运动信息中选择所述至少一个单向运动信息,且所述至少一个单向运动信息对应的参考帧信息为所述候选参考帧。In some embodiments, the
在一些实施例中,第二偏移单元1102,配置为基于至少一个预设方向,按照预设偏移量对所述至少一个单向运动信息进行偏移处理,得到所述至少一个新的单向运动信息;其中,所述至少一个新的单向运动信息与所述至少一个单向运动信息对应的参考帧信息相同。In some embodiments, the second offset
在一些实施例中,所述预设方向至少包括:向上方向,和/或,向下方向,和/或,向左方向,和/或,向右方向。In some embodiments, the preset direction at least includes: an upward direction, and/or a downward direction, and/or a leftward direction, and/or a rightward direction.
在一些实施例中,第二确定单元1101,还配置为针对所述至少一个单向运动信息,确定每一单向运动信息对应的水平方向矢量值和垂直方向矢量值;In some embodiments, the second determining
第二偏移单元1102,还配置为在所述预设方向为向上方向和/或向下方向的情况下,判断所述垂直方向矢量值是否等于0;当所述垂直方向矢量值不等于0时,根据所述垂直方向矢量值的绝对值与第一预设值的除法运算,得到每一单向运动信息对应的预设偏移量;或者,在所述预设方向为向左方向和/或向右方向的情况下,判断所述水平方向矢量值是否等于0;当所述水平方向矢量值不等于0时,根据所述水平方向矢量值的绝对值与第二预设值的除法运算,得到每一单向运动信息对应的预设偏移量。The second offset
在一些实施例中,第二偏移单元1102,还配置为针对任意一种预设方向,将所述水平方向矢量值的绝对值和所述垂直方向矢量值的绝对值进行加法运算,得到计算和值;判断所述计算和值是否等于0;当所述计算和值不等于0时,根据所述计算和值与第三预设值的除法运算,得到每一单向运动信息对应的预设偏移量。In some embodiments, the second offset
在一些实施例中,第二偏移单元1102,还配置为针对每一单向运动信息,将所得到的预设偏移量与最小预设偏移量和最大预设偏移量分别比较;在所得到的预设偏移量小于最小预设偏移量时,将所述最小预设偏移量确定为所述预设偏移量;在所得到的预设偏移量大于最小预设偏移量时,将所述最大预设偏移量确定为所述预设偏移量。In some embodiments, the second offset
在一些实施例中,第二确定单元1101,还配置为基于所述当前块的相邻块的运动信息,确定初始运动信息候选列表;In some embodiments, the second determining
第二构建单元1103,配置为将所述至少一个新的单向运动信息填入所述初始运动信息候选列表中,得到所述新的运动信息候选列表。The
在一些实施例中,第二构建单元1103,还配置为判断所述至少一个新的单向运动信息与所述初始运动信息候选列表内的运动信息是否重复;在所述至少一个新的单向运动信息与所述初始运动信息候选列表内的运动信息不重复的情况下,将所述至少一个新的单向运动信息填入所述初始运动信息候选列表中。In some embodiments, the
在一些实施例中,第二构建单元1103,还配置为在所述初始运动信息候选列表不包括重复的单向运动信息且所述初始运动信息候选列表内的单向运动信息数量小于预设数量时,执行所述从所述当前块的多个已知运动信息中确定至少一个单向运动信息;以及基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息的步骤。In some embodiments, the
在一些实施例中,所述当前块的多个已知运动信息至少包括:所述初始运动信息候选列表内的运动信息,和/或,所述当前块的空域运动信息,和/或,所述当前块的时域运动信息,和/或,所述当前块的历史运动信息。In some embodiments, the multiple pieces of known motion information of the current block include at least: motion information in the initial motion information candidate list, and/or, spatial domain motion information of the current block, and/or, the Time-domain motion information of the current block, and/or historical motion information of the current block.
在一些实施例中,第二偏移单元1102,还配置为从所述初始运动信息候选列表内任意选择一个运动信息,根据所述一个运动信息的偏移处理,获得所述至少一个新的单向运动信息;或者,从所述初始运动信息候选列表内顺序选择至少一个运动信息,根据所述至少一个运动信息的偏移处理,获得所述至少一个新的单向运动信息;或者,从所述当前块的空域运动信息和/或所述当前块的时域运动信息和/或所述当前块的历史运动信息内顺序选择至少一个运动信息,根据所述至少一个运动信息的偏移处理,获得所述至少一个新的单向运动信息。In some embodiments, the second offset
在一些实施例中,所述预设的帧间预测模式包括:几何划分预测模式GPM或角度加权预测模式AWP。In some embodiments, the preset inter-frame prediction modes include: a geometric partition prediction mode GPM or an angle weighted prediction mode AWP.
在一些实施例中,第二确定单元1101,还配置为当所述预测模式参数指示使用GPM或AWP确定当前块的帧间预测值时,确定所述当前块的两个分区;其中,所述两个分区包括第一分区和第二分区;以及基于所述新的运动信息候选列表,确定所述第一分区的运动信息和所述第二分区的运动信息,并将第一运动信息索引值设置为所述第一分区的运动信息在所述新的运动信息候选列表中的索引序号值,将第二运动信息索引值设置为所述第二分区的运动信息在所述新的运动信息候选列表中的索引序号值;In some embodiments, the
第二预测单元1104,配置为利用所述第一分区的运动信息计算所述第一分区的第一预测值,利用所述第二分区的运动信息计算所述第二分区的第二预测值;对所述第一预测值和所述第二预测值进行加权融合,得到所述当前块的帧间预测值。The
在一些实施例中,参见图11,编码器110还可以包括写入单元1108,配置为将所述第一运动信息索引值和所述第二运动信息索引值写入码流。In some embodiments, referring to FIG. 11 , the
可以理解地,在本实施例中,“单元”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It can be understood that, in this embodiment, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course it may also be a module, or it may be non-modular. Moreover, each component in this embodiment may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software function modules.
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例提供了一种计算机存储介质,应用于编码器110,该计算机存储介质存储有帧间预测程序,所述帧间预测程序被第二处理器执行时实现前述实施例中编码器侧所述的方法。If the integrated units are implemented in the form of software function modules and are not sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, this embodiment provides a computer storage The medium is applied to the
基于上述编码器110的组成以及计算机存储介质,参见图12,其示出了本申请实施例提供的编码器110的具体硬件结构示例,可以包括:第二通信接口1201、第二存储器1202和第二处理器1203;各个组件通过第二总线系统1204耦合在一起。可理解,第二总线系统1204用于实现这些组件之间的连接通信。第二总线系统1204除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图12中将各种总线都标为第二总线系统1204。其中,Based on the composition of the above-mentioned
第二通信接口1201,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The
第二存储器1202,用于存储能够在第二处理器1203上运行的计算机程序;The
第二处理器1203,用于在运行所述计算机程序时,执行:The
确定当前块的预测模式参数;determining prediction mode parameters for the current block;
当所述预测模式参数指示使用预设的帧间预测模式确定当前块的帧间预测值时,从所述当前块的多个已知运动信息中确定至少一个单向运动信息;When the prediction mode parameter indicates that a preset inter prediction mode is used to determine an inter prediction value of the current block, at least one unidirectional motion information is determined from a plurality of known motion information of the current block;
基于预设偏移量对所述至少一个单向运动信息进行偏移处理,获得至少一个新的单向运动信息;其中,所述预设偏移量是根据所述至少一个单向运动信息对应的水平方向矢量值和垂直方向矢量值计算得到;Perform offset processing on the at least one unidirectional motion information based on a preset offset to obtain at least one new unidirectional motion information; wherein the preset offset corresponds to the at least one unidirectional motion information The horizontal direction vector value and the vertical direction vector value are calculated;
基于所述至少一个新的单向运动信息,构建新的运动信息候选列表;Constructing a new motion information candidate list based on the at least one new unidirectional motion information;
根据所述新的运动信息候选列表,确定所述当前块的帧间预测值。Determine an inter-frame prediction value of the current block according to the new motion information candidate list.
可选地,作为另一个实施例,第二处理器1203还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。Optionally, as another embodiment, the
可以理解,第二存储器1202与第一存储器1002的硬件功能类似,第二处理器1203与第一处理器1003的硬件功能类似;这里不再详述。It can be understood that the hardware function of the
本实施例提供了一种编码器,该编码器可以包括第二确定单元、第二偏移单元、第二构建单元和第二预测单元。在该编码器中,在得到至少一个新的单向运动信息之后,可以将新的单向运动信息填入运动信息候选列表中,能够增加运动信息候选列表中运动信息的多样性;另外,对当前块来说,运动信息候选列表中初始运动信息与实际的运动信息可能存在偏差,这时候构造新的单向运动信息将会比初始运动信息具有更好的效果,从而提升了编解码性能。This embodiment provides an encoder, and the encoder may include a second determination unit, a second offset unit, a second construction unit, and a second prediction unit. In the encoder, after obtaining at least one new unidirectional motion information, the new unidirectional motion information can be filled into the motion information candidate list, which can increase the diversity of motion information in the motion information candidate list; in addition, for For the current block, there may be a deviation between the initial motion information in the motion information candidate list and the actual motion information. At this time, constructing new unidirectional motion information will have a better effect than the initial motion information, thereby improving the encoding and decoding performance.
需要说明的是,在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that in this application, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements , but also includes other elements not expressly listed, or also includes elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present application are for description only, and do not represent the advantages and disadvantages of the embodiments.
本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in several method embodiments provided in this application can be combined arbitrarily to obtain new method embodiments under the condition of no conflict.
本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in several product embodiments provided in this application can be combined arbitrarily without conflict to obtain new product embodiments.
本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in several method or device embodiments provided in this application can be combined arbitrarily without conflict to obtain new method embodiments or device embodiments.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application. Should be covered within the protection scope of this application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.
Claims (37)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010432096.4A CN113727119B (en) | 2020-05-20 | 2020-05-20 | Inter-frame prediction method, encoder, decoder, and computer storage medium |
TW110114983A TW202145783A (en) | 2020-05-20 | 2021-04-26 | Inter-frame prediction method, encoder, decoder, and computer storage medium capable of enhancing variety of motion information from a list of candidate motion information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010432096.4A CN113727119B (en) | 2020-05-20 | 2020-05-20 | Inter-frame prediction method, encoder, decoder, and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113727119A CN113727119A (en) | 2021-11-30 |
CN113727119B true CN113727119B (en) | 2023-03-17 |
Family
ID=78671279
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010432096.4A Active CN113727119B (en) | 2020-05-20 | 2020-05-20 | Inter-frame prediction method, encoder, decoder, and computer storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113727119B (en) |
TW (1) | TW202145783A (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013223049A (en) * | 2012-04-13 | 2013-10-28 | Sharp Corp | Image decoding apparatus and image encoding apparatus |
CN103988509A (en) * | 2011-09-16 | 2014-08-13 | 韩国电子通信研究院 | Method for introducing predicted motion vector and device using same |
CN110326295A (en) * | 2018-04-02 | 2019-10-11 | 深圳市大疆创新科技有限公司 | Obtain the method and apparatus of video image motion vector |
CN110545424A (en) * | 2019-08-21 | 2019-12-06 | 浙江大华技术股份有限公司 | Inter-frame prediction method based on MMVD (multimedia MediaVision video) mode, video coding method, related device and equipment |
WO2020009390A1 (en) * | 2018-07-02 | 2020-01-09 | 엘지전자 주식회사 | Image processing method and device by means of inter-prediction in image coding system |
WO2020067700A1 (en) * | 2018-09-24 | 2020-04-02 | 김기백 | Image encoding/decoding method and device |
WO2020069652A1 (en) * | 2018-10-06 | 2020-04-09 | Huawei Technologies Co., Ltd. | Candidate mv construction method for hmvp mode |
WO2020069651A1 (en) * | 2018-10-05 | 2020-04-09 | Huawei Technologies Co., Ltd. | A candidate mv construction method for affine merge mode |
WO2020096425A1 (en) * | 2018-11-08 | 2020-05-14 | 주식회사 엑스리스 | Image signal encoding/decoding method, and device for same |
-
2020
- 2020-05-20 CN CN202010432096.4A patent/CN113727119B/en active Active
-
2021
- 2021-04-26 TW TW110114983A patent/TW202145783A/en unknown
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103988509A (en) * | 2011-09-16 | 2014-08-13 | 韩国电子通信研究院 | Method for introducing predicted motion vector and device using same |
JP2013223049A (en) * | 2012-04-13 | 2013-10-28 | Sharp Corp | Image decoding apparatus and image encoding apparatus |
CN110326295A (en) * | 2018-04-02 | 2019-10-11 | 深圳市大疆创新科技有限公司 | Obtain the method and apparatus of video image motion vector |
WO2020009390A1 (en) * | 2018-07-02 | 2020-01-09 | 엘지전자 주식회사 | Image processing method and device by means of inter-prediction in image coding system |
WO2020067700A1 (en) * | 2018-09-24 | 2020-04-02 | 김기백 | Image encoding/decoding method and device |
WO2020069651A1 (en) * | 2018-10-05 | 2020-04-09 | Huawei Technologies Co., Ltd. | A candidate mv construction method for affine merge mode |
WO2020069652A1 (en) * | 2018-10-06 | 2020-04-09 | Huawei Technologies Co., Ltd. | Candidate mv construction method for hmvp mode |
WO2020096425A1 (en) * | 2018-11-08 | 2020-05-14 | 주식회사 엑스리스 | Image signal encoding/decoding method, and device for same |
CN110545424A (en) * | 2019-08-21 | 2019-12-06 | 浙江大华技术股份有限公司 | Inter-frame prediction method based on MMVD (multimedia MediaVision video) mode, video coding method, related device and equipment |
Non-Patent Citations (1)
Title |
---|
History-Based Motion Vector Prediction in Versatile Video Coding;Li Zhang et.al;《2019 Data Compression Conference》;20190329;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113727119A (en) | 2021-11-30 |
TW202145783A (en) | 2021-12-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113170167B (en) | Flag indication method in intra-block copy mode | |
US20220060736A1 (en) | Method and an apparatus for processing a video signal | |
CN113545065B (en) | Use of converted uni-directional prediction candidates | |
JP2023104947A (en) | Coefficient-dependent coding of transformation matrix selection | |
US10075707B2 (en) | Video encoding and decoding | |
CN113170173A (en) | Improved method for transform quantization or quantization bypass mode | |
TW202139702A (en) | Video processing methods and apparatuses in video coding systems | |
US20140064372A1 (en) | Video encoding and decoding | |
CN112840645B (en) | Method and apparatus for combining multiple predictors for block prediction in a video coding system | |
WO2021238396A1 (en) | Inter-frame prediction methods, encoder, decoder, and computer storage medium | |
JP7311635B2 (en) | Codec method, device and equipment therefor | |
TW202139709A (en) | Inter-frame prediction method, encoder, decoder, and storage medium | |
US11785242B2 (en) | Video processing methods and apparatuses of determining motion vectors for storage in video coding systems | |
CN113709498B (en) | Inter-frame prediction method, encoder, decoder and computer storage medium | |
CN114009033A (en) | Method and apparatus for signaling symmetric motion vector difference mode | |
CN115152229A (en) | BV list construction process of IBC blocks under merge estimation region | |
WO2021258841A1 (en) | Inter-frame prediction method, coder, decoder, and computer storage medium | |
TWI870594B (en) | Frame prediction method, encoder, decoder and computer storage medium | |
CN113727119B (en) | Inter-frame prediction method, encoder, decoder, and computer storage medium | |
CN119817106A (en) | Method and apparatus for video encoding using intra-frame block copying | |
TWI882111B (en) | Frame prediction method, encoder, decoder and computer storage medium | |
TWI887420B (en) | Frame prediction method, encoder, decoder and computer storage medium | |
CN114071159B (en) | Inter prediction method, encoder, decoder, and computer-readable storage medium | |
WO2025065658A1 (en) | Encoding method, decoding method, bit stream, encoder, decoder, and storage medium | |
WO2025065522A1 (en) | Coding method and apparatus, decoding method and apparatus, coder, decoder, code stream, device, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |