[go: up one dir, main page]

CN100579231C - A motion vector prediction method and device - Google Patents

A motion vector prediction method and device Download PDF

Info

Publication number
CN100579231C
CN100579231C CN 200710179813 CN200710179813A CN100579231C CN 100579231 C CN100579231 C CN 100579231C CN 200710179813 CN200710179813 CN 200710179813 CN 200710179813 A CN200710179813 A CN 200710179813A CN 100579231 C CN100579231 C CN 100579231C
Authority
CN
China
Prior art keywords
current block
piece
motion vector
block
last
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.)
Expired - Fee Related
Application number
CN 200710179813
Other languages
Chinese (zh)
Other versions
CN101188766A (en
Inventor
季鹏飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vimicro Corp
Original Assignee
Vimicro Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vimicro Corp filed Critical Vimicro Corp
Priority to CN 200710179813 priority Critical patent/CN100579231C/en
Publication of CN101188766A publication Critical patent/CN101188766A/en
Application granted granted Critical
Publication of CN100579231C publication Critical patent/CN100579231C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本发明公开了一种运动矢量预测方法及装置。方法包括:当检测到当前块的上块、左块不可用,而当前块的上二块、左二块可用时,根据当前块的上二块、左二块确定当前块的预测运动矢量,所述当前块的上二块即当前块的上块的上块,所述当前块的左二块即当前块的左块的左块。本发明提高了运动矢量预测的可靠性。

Figure 200710179813

The invention discloses a motion vector prediction method and device. The method includes: when it is detected that the upper block and the left block of the current block are unavailable, but the upper two blocks and the left two blocks of the current block are available, determining the predicted motion vector of the current block according to the upper two blocks and the left two blocks, The upper two blocks of the current block are the upper blocks of the upper block of the current block, and the two left blocks of the current block are the left blocks of the left block of the current block. The invention improves the reliability of motion vector prediction.

Figure 200710179813

Description

一种运动矢量预测方法及装置 A motion vector prediction method and device

技术领域 technical field

本发明涉及视频编码技术领域,具体涉及一种运动矢量预测方法及装置。The present invention relates to the technical field of video coding, in particular to a motion vector prediction method and device.

背景技术 Background technique

在视频编码标准中,运动矢量预测采用空域相关法,即:利用当前帧中的已编码块的运动矢量作为参考,通过中值预测准则得到当前块的预测运动矢量。In the video coding standard, the spatial correlation method is used for motion vector prediction, that is, the motion vector of the coded block in the current frame is used as a reference, and the predicted motion vector of the current block is obtained through the median prediction criterion.

图1给出了现有的采用空域相关法预测运动矢量的示意图,如图1所示,其中,Curr为要编码的当前块,A、B、C、D为当前帧中已编码的块,且A为Curr的左块,B为Curr的上块,C为Curr的左上块,D为Curr的右上块。A、B、C、D与Curr的相关性从高到低依次为:B、A、D、C。Figure 1 provides a schematic diagram of the existing motion vector prediction using the spatial correlation method, as shown in Figure 1, where Curr is the current block to be encoded, A, B, C, and D are encoded blocks in the current frame, And A is the left block of Curr, B is the upper block of Curr, C is the upper left block of Curr, and D is the upper right block of Curr. The correlations between A, B, C, D and Curr from high to low are: B, A, D, C.

图2给出了现有的利用空域相关法预测Curr的运动矢量的流程图,如图2所示,其具体步骤如下:Fig. 2 has provided the flow chart of the existing motion vector of utilizing spatial correlation method to predict Curr, as shown in Fig. 2, its specific steps are as follows:

步骤201:判断A、B、D是否都可用,若是,执行步骤202,否则,执行步骤203。Step 201: Determine whether A, B, D are all available, if yes, execute step 202, otherwise, execute step 203.

通常当一个块满足以下两种情况之一时,认为该块不可用:Generally, a block is considered unavailable when it satisfies one of the following two conditions:

一、该块采用帧内预测编码得到。1. The block is obtained by intra-frame prediction coding.

二、该块不存在,如:该块与Curr不在同一条带(Slice)内,或者该块超出帧的边界。2. The block does not exist, for example, the block and Curr are not in the same slice (Slice), or the block exceeds the boundary of the frame.

步骤202:将A、B、D的运动矢量的中值作为Curr的预测运动矢量,本流程结束。Step 202: Use the median value of the motion vectors of A, B, and D as the predicted motion vector of Curr, and this process ends.

步骤203:判断是否A、B可用、D不可用,若是,执行步骤204;否则,执行步骤207。Step 203: Determine whether A and B are available, and D is unavailable, if yes, perform step 204; otherwise, perform step 207.

步骤204:判断C是否可用,若是,执行步骤205;否则,执行步骤206。Step 204: Determine whether C is available, if yes, execute step 205; otherwise, execute step 206.

步骤205:将A、B、C的运动矢量的中值作为Curr的预测运动矢量,本流程结束。Step 205: Use the median value of the motion vectors of A, B, and C as the predicted motion vector of Curr, and this process ends.

步骤206:将零矢量作为C的运动矢量,然后将A、B、C的运动矢量Step 206: Use the zero vector as the motion vector of C, and then use the motion vectors of A, B, and C

的中值作为Curr的预测运动矢量,本流程结束。The median value of is used as the predicted motion vector of Curr, and the process ends.

步骤207:判断是否A、B之一可用,若是,执行步骤208;否则,执行步骤209。Step 207: Determine whether one of A and B is available, if yes, execute step 208; otherwise, execute step 209.

步骤208:将可用的A或者B的运动矢量作为Curr的预测运动矢量,本流程结束。Step 208: Use the available motion vector of A or B as the predicted motion vector of Curr, and the procedure ends.

步骤209:判断是否A、B都不可用、D可用,若是,执行步骤210;否则,执行步骤211。Step 209: Determine whether neither A nor B is available, but D is available. If yes, perform step 210; otherwise, perform step 211.

步骤210:将D的运动矢量作为Curr的预测运动矢量,本流程结束。Step 210: Use the motion vector of D as the predicted motion vector of Curr, and the process ends.

步骤211:确定A、B、D都不可用,则将零矢量作为Curr的预测运动矢量。Step 211: If it is determined that A, B, and D are not available, the zero vector is used as the predictive motion vector of Curr.

现有的采用空域相关法预测运动矢量的缺点是,当A、B有一个不可用时,会使得对Curr的运动矢量预测的可靠性降低,这是因为:A、B是与Curr相关性最高的块,当A、B都可用时,对Curr的运动矢量的预测是最可靠的,只要A、B之一不可用,对Curr的运动矢量的预测的可靠性就会降低。The disadvantage of the existing spatial correlation method to predict the motion vector is that when one of A and B is unavailable, the reliability of the motion vector prediction for Curr will be reduced, because: A and B are the most correlated with Curr Block, when both A and B are available, the prediction of Curr's motion vector is the most reliable, as long as one of A and B is not available, the reliability of the prediction of Curr's motion vector will be reduced.

发明内容 Contents of the invention

本发明提供一种运动矢量预测方法及装置,以提高运动矢量预测的可靠性。The invention provides a motion vector prediction method and device to improve the reliability of motion vector prediction.

本发明的技术方案是这样实现的:Technical scheme of the present invention is realized like this:

一种运动矢量预测方法,该方法包括:A motion vector prediction method, the method comprising:

当检测到当前块的上块、左块不可用,而当前块的上二块、左二块可用时,根据当前块的上二块、左二块确定当前块的预测运动矢量,When it is detected that the upper block and the left block of the current block are unavailable, but the upper two blocks and the left two blocks of the current block are available, the predicted motion vector of the current block is determined according to the upper two blocks and the left two blocks of the current block,

所述当前块的上二块即当前块的上块的上块,所述当前块的左二块即当前块的左块的左块。The upper two blocks of the current block are the upper blocks of the upper block of the current block, and the two left blocks of the current block are the left blocks of the left block of the current block.

所述根据当前块的上二块、左二块确定当前块的预测运动矢量包括:The determining the predicted motion vector of the current block according to the upper two blocks and the left two blocks of the current block includes:

判断当前块的右上块是否可用,若是,将当前块的上二块、左二块、右上块的运动矢量的中值作为当前块的预测运动矢量;否则,将当前块的上二块、左二块的运动矢量的均值作为当前块的预测运动矢量。Determine whether the upper right block of the current block is available, if so, use the median of the motion vectors of the upper two blocks, the second left block, and the upper right block of the current block as the predicted motion vector of the current block; The average value of the motion vectors of the two blocks is used as the predicted motion vector of the current block.

所述方法进一步包括:当检测到当前块的上块、左块、右上块都可用时,将当前块的上块、左块、右上块的运动矢量的中值作为当前块的预测运动矢量。The method further includes: when it is detected that the upper block, the left block, and the upper right block of the current block are all available, using the median value of the motion vectors of the upper block, the left block, and the upper right block of the current block as the predicted motion vector of the current block.

所述方法进一步包括:当当前块的上块、左块都可用而右上块不可用时,将当前块的上块、左块的运动矢量的均值作为当前块的预测运动矢量。The method further includes: when both the upper block and the left block of the current block are available but the upper right block is unavailable, taking the average value of the motion vectors of the upper block and the left block of the current block as the predicted motion vector of the current block.

所述方法进一步包括:当当前块的上块、左块之一可用时,将可用的上块或左块的运动矢量作为当前块的预测运动矢量。The method further includes: when one of the upper block and the left block of the current block is available, using the motion vector of the available upper block or the left block as the prediction motion vector of the current block.

所述方法进一步包括:当当前块的上块、左块、上二块、左二块都不可用、右上块可用时,将右上块的运动矢量作为当前块的预测运动矢量。The method further includes: when the upper block, the left block, the upper two blocks, and the left two blocks of the current block are not available, and the upper right block is available, using the motion vector of the upper right block as the predicted motion vector of the current block.

所述方法进一步包括:当当前块的上块、左块、右上块、上二块、左二块都不可用时,将零矢量作为当前块的预测运动矢量。The method further includes: when the upper block, the left block, the upper right block, the second upper block, and the second left block of the current block are not available, using a zero vector as the predicted motion vector of the current block.

所述方法进一步包括:当当前块的上块、左块、右上块、上二块、左二块都不可用时,将在参考帧中所处位置与当前块在当前帧中所处位置相同的块的运动矢量作为当前块的预测运动矢量。The method further includes: when the upper block, the left block, the upper right block, the second upper block, and the second left block of the current block are not available, assigning the same position in the reference frame as the current block in the current frame The motion vector of the block is used as the predicted motion vector of the current block.

一种运动矢量预测装置,该装置包括:A motion vector prediction device, the device comprising:

块运动矢量存储模块,存储当前帧中的块的运动矢量;A block motion vector storage module stores motion vectors of blocks in the current frame;

运动矢量确定模块,当检测到当前块的上块、左块不可用,而当前块的上二块、左二块可用时,根据从块运动矢量存储模块获取的当前块的上二块、左二块的运动矢量,确定当前块的预测运动矢量。The motion vector determining module, when detecting that the upper block and the left block of the current block are unavailable, and the upper two blocks and the left two blocks of the current block are available, according to the upper two blocks and the left two blocks of the current block obtained from the block motion vector storage module The motion vector of the second block determines the predicted motion vector of the current block.

所述运动矢量确定模块包括:The motion vector determination module includes:

块可用检测模块,检测当前块的上块、左块、上二块、左二块、右上块、是否可用,将检测结果发送给确定模块;The block available detection module detects whether the upper block, left block, upper second block, left second block, and upper right block of the current block are available, and sends the detection result to the determination module;

确定模块,接收所述检测结果,若该检测结果指示上块、左块不可用、上二块、左二块可用、同时右上块可用,则将从块运动矢量存储模块获取的当前块的上二块、左二块、右上块的运动矢量的中值作为当前块的预测运动矢量;若该检测结果指示上块、左块不可用、上二块、左二块可用、同时右上块不可用,则将从块运动矢量存储模块获取的当前块的上二块、左二块的运动矢量的均值作为当前块的预测运动矢量。The determining module receives the detection result, if the detection result indicates that the upper block, the left block are unavailable, the upper two blocks, the left two block are available, and the upper right block is available at the same time, then the upper block of the current block obtained from the block motion vector storage module The median value of the motion vectors of the second block, the second left block, and the upper right block is used as the predicted motion vector of the current block; if the detection result indicates that the upper block and the left block are unavailable, the upper two blocks, the second left block are available, and the upper right block is unavailable , the mean value of the motion vectors of the upper two blocks and the two left blocks of the current block obtained from the block motion vector storage module is used as the predicted motion vector of the current block.

所述确定模块进一步包括,用于在检测结果指示当前块的上块、左块、右上块都可用时,将从块运动矢量存储模块获取的当前块的上块、左块、右上块的运动矢量的中值作为当前块的预测运动矢量的子模块。The determination module further includes, when the detection result indicates that the upper block, the left block, and the upper right block of the current block are all available, the motion of the upper block, the left block, and the upper right block of the current block obtained from the block motion vector storage module The median value of the vector is used as the sub-module of the predicted motion vector of the current block.

所述确定模块进一步包括,用于在检测结果指示当前块的上块、左块都可用而右上块不可用时,将从块运动矢量存储模块获取的当前块的上块、左块的运动矢量的均值作为当前块的预测运动矢量的子模块。The determining module further includes, when the detection result indicates that both the upper block and the left block of the current block are available but the upper right block is not available, the motion vectors of the upper block and the left block of the current block obtained from the block motion vector storage module The mean is used as a submodule of the predicted motion vector for the current block.

所述确定模块进一步包括,用于在检测到当前块的上块、左块之一可用时,将从块运动矢量存储模块获取的可用的上块或左块的运动矢量作为当前块的预测运动矢量的子模块。The determination module further includes, when it is detected that one of the upper block and the left block of the current block is available, the motion vector of the available upper block or the left block acquired from the block motion vector storage module is used as the predicted motion of the current block Vector of submodules.

所述确定模块进一步包括,用于在检测到当前块的上块、左块、上二块、左二块都不可用、右上块可用时,将右上块的运动矢量作为当前块的预测运动矢量的子模块。The determining module further includes, when it is detected that the upper block, the left block, the upper two blocks, the left two blocks, and the upper right block of the current block are unavailable, and the motion vector of the upper right block is used as the predicted motion vector of the current block of submodules.

所述确定模块进一步包括,用于在检测到当前块的上块、左块、右上块、上二块、左二块都不可用时,将零矢量作为当前块的预测运动矢量的子模块。The determining module further includes a submodule for using a zero vector as the predicted motion vector of the current block when it is detected that the upper block, the left block, the upper right block, the second upper block, and the second left block of the current block are not available.

所述确定模块进一步包括,用于在检测到当前块的上块、左块、右上块、上二块、左二块都不可用时,将从块运动矢量存储模块获取的、在参考帧中所处位置与当前块在当前帧中所处位置相同的块的运动矢量作为当前块的预测运动矢量的子模块。The determining module further includes, when it is detected that the upper block, the left block, the upper right block, the second upper block, and the second left block of the current block are not available, the information obtained from the block motion vector storage module and in the reference frame The motion vector of the block whose position is the same as that of the current block in the current frame is used as a sub-module of the predicted motion vector of the current block.

与现有技术相比,本发明当检测到当前块的上块、左块不可用,而当前块的上二块、左二块可用时,根据当前块的上二块、左二块确定当前块的预测运动矢量,提高了运动矢量预测的可靠性。Compared with the prior art, when the present invention detects that the upper block and the left block of the current block are not available, but the upper two blocks and the left two blocks of the current block are available, the current block is determined according to the upper two blocks and the left two blocks of the current block. The predicted motion vector of the block improves the reliability of the motion vector prediction.

附图说明 Description of drawings

图1为现有的采用空域相关法预测运动失量的示意图;Fig. 1 is the schematic diagram that adopts existing spatial domain correlation method to predict motion loss;

图2为现有的采用空域相关法预测运动矢量的流程图;Fig. 2 is the flow chart of existing adopting spatial domain correlation method to predict motion vector;

图3为本发明实施例提供的预测运动矢量的流程图;FIG. 3 is a flow chart of predicting a motion vector provided by an embodiment of the present invention;

图4为本发明实施例提供的帧中的块的空域相关性的示意图;FIG. 4 is a schematic diagram of spatial correlation of blocks in a frame provided by an embodiment of the present invention;

图5为本发明实施例进行运动矢量预测所采用的块的示意图;FIG. 5 is a schematic diagram of blocks used for motion vector prediction according to an embodiment of the present invention;

图6为本发明实施例提供的参考帧中的块与当前块的时域相关性的示意图;FIG. 6 is a schematic diagram of the temporal correlation between a block in a reference frame and a current block provided by an embodiment of the present invention;

图7为本发明实施例提供的运动矢量预测装置的结构组成图。Fig. 7 is a structural composition diagram of a motion vector prediction device provided by an embodiment of the present invention.

具体实施方式 Detailed ways

下面结合附图及具体实施例对本发明再作进一步详细的说明。The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

图3为本发明实施例提供的预测运动矢量的流程图,如图3所示,其具体步骤如下:Fig. 3 is the flow chart of the prediction motion vector that the embodiment of the present invention provides, as shown in Fig. 3, its specific steps are as follows:

步骤301:将A~D按照与Curr的相关性从高到低进行排序,得到:B、A、D、C。Step 301: sort A to D according to their correlation with Curr from high to low to obtain: B, A, D, C.

其中,Curr为当前块,A为Curr的左块,B为Curr的上块,C为Curr的左上块,D为Curr的右上块。Among them, Curr is the current block, A is the left block of Curr, B is the upper block of Curr, C is the upper left block of Curr, and D is the upper right block of Curr.

图4为采用现有技术得到的帧中的块的空域相关性示意图,如图4所示,其中,A、B、C、D块中的前一个数字为该块的运动矢量的水平分量与Curr的水平分量的相关系数,后一个数字为该块的运动矢量的垂直分量与Curr的垂直分量的相关系数。如:块A的运动矢量的水平分量与Curr的水平分量的相关系数为0.488,块A的垂直分量与Curr的垂直分量的相关系数为0.487。相关系数越大表示相关性越强,可以看出:A~D与Curr的相关性从高到低依次为:B、A、D、C。Figure 4 is a schematic diagram of the spatial domain correlation of the blocks in the frame obtained by using the prior art, as shown in Figure 4, wherein, the previous number in the A, B, C, D blocks is the horizontal component and the motion vector of the block The correlation coefficient of the horizontal component of Curr, and the latter number is the correlation coefficient of the vertical component of the motion vector of the block and the vertical component of Curr. For example: the correlation coefficient between the horizontal component of the motion vector of block A and the horizontal component of Curr is 0.488, and the correlation coefficient between the vertical component of block A and the vertical component of Curr is 0.487. The larger the correlation coefficient, the stronger the correlation. It can be seen that the correlation between A~D and Curr is B, A, D, and C from high to low.

步骤302:判断A、B、D是否都可用,若是,执行步骤303;否则,执行步骤304。Step 302: Determine whether A, B, and D are all available, if yes, execute step 303; otherwise, execute step 304.

步骤303:将A、B、D的运动矢量的中值作为Curr的预测运动矢量,本流程结束。Step 303: The median value of the motion vectors of A, B, and D is used as the predicted motion vector of Curr, and the procedure ends.

运动矢量由水平分量和垂直分量组成,将A、B、D的运动矢量的中值作为Curr的预测运动矢量即:取A、B、D的运动矢量的水平分量的中值作为Curr的运动矢量的水平分量,取A、B、D的运动矢量的垂直分量的中值作为Curr的运动矢量的垂直分量。The motion vector is composed of a horizontal component and a vertical component, and the median value of the motion vectors of A, B, and D is used as the predicted motion vector of Curr, that is, the median value of the horizontal components of the motion vectors of A, B, and D is used as the motion vector of Curr The horizontal component of , take the median of the vertical components of the motion vectors of A, B, and D as the vertical component of the motion vector of Curr.

例如:A的运动矢量为(a1,a2)、B的运动矢量为(b1,b2)、C的运动矢量为(c1,c2),且a1>b1>c1,c2>a2>b2,则Curr的预测运动矢量为(b1,a2)。For example: the motion vector of A is (a1, a2), the motion vector of B is (b1, b2), and the motion vector of C is (c1, c2), and a1>b1>c1, c2>a2>b2, then Curr The predicted motion vector of is (b1, a2).

步骤304:判断是否A、B可用、D不可用,若是,执行步骤305;否则,执行步骤306。Step 304: Determine whether A and B are available, and D is unavailable, if yes, perform step 305; otherwise, perform step 306.

步骤305:将A、B的运动矢量的均值作为Curr的预测运动矢量,本流程结束。Step 305: The average value of the motion vectors of A and B is used as the predicted motion vector of Curr, and the process ends.

将A、B的运动矢量的均值作为Curr的预测运动矢量即:取A、B的运动矢量的水平分量的均值作为Curr的运动矢量的水平分量,取A、B的运动矢量的垂直分量的均值作为Curr的运动矢量的垂直分量。Take the mean value of the motion vectors of A and B as the predicted motion vector of Curr, that is, take the mean value of the horizontal components of the motion vectors of A and B as the horizontal component of the motion vector of Curr, and take the mean value of the vertical components of the motion vectors of A and B As the vertical component of Curr's motion vector.

例如:A的运动矢量为(a1,a2)、B的运动矢量为(b1,b2),则Curr的预测运动矢量为

Figure C20071017981300101
For example: the motion vector of A is (a1, a2), and the motion vector of B is (b1, b2), then the predicted motion vector of Curr is
Figure C20071017981300101

步骤306:判断是否A、B都不可用、E、F可用,若是,执行步骤307;否则,执行步骤310。Step 306: Determine whether A and B are unavailable, and E and F are available, if yes, perform step 307; otherwise, perform step 310.

图5给出了本发明实施例进行运动矢量预测所采用的编码块的示意图,如图5所示,其中,E为A的左块也可称为Curr的左二块,F为B的上块也可称为Curr的上二块。Figure 5 shows a schematic diagram of the encoding block used for motion vector prediction in the embodiment of the present invention, as shown in Figure 5, where E is the left block of A and can also be called the second left block of Curr, and F is the upper block of B The block can also be called the upper two blocks of Curr.

步骤307:判断D是否可用,若是,执行步骤308;否则,执行步骤309。Step 307: Determine whether D is available, if yes, execute step 308; otherwise, execute step 309.

步骤308:将E、F、D的运动矢量的中值作为Curr的预测运动矢量,本流程结束。Step 308: Use the median value of the motion vectors of E, F, and D as the predicted motion vector of Curr, and the procedure ends.

步骤309:将E、F的运动矢量的均值作为Curr的预测运动矢量,本流程结束。Step 309: The average value of the motion vectors of E and F is used as the predicted motion vector of Curr, and the process ends.

步骤310:判断是否A、B之一可用,若是,执行步骤311;否则,执行步骤312。Step 310: Determine whether one of A and B is available, if yes, go to step 311; otherwise, go to step 312.

步骤311:将可用的A或者B的运动矢量作为Curr的预测运动矢量,本流程结束。Step 311: Use the available motion vector of A or B as the predicted motion vector of Curr, and the process ends.

步骤312:判断是否A、B、E、F都不可用、D可用,若是,执行步骤313;否则,执行步骤314。Step 312: Determine whether A, B, E, F are all unavailable, and D is available, if yes, execute step 313; otherwise, execute step 314.

步骤313:将D的运动矢量作为Curr的预测运动矢量,本流程结束。Step 313: The motion vector of D is used as the predicted motion vector of Curr, and the procedure ends.

步骤314:判断是否A、B、D、E、F都不可用、G可用,若是,执行步骤315;否则,执行步骤316。Step 314: Determine whether A, B, D, E, F are all unavailable, and G is available, and if so, execute step 315; otherwise, execute step 316.

图6为采用现有技术得到的参考帧中的块与当前块Curr的时域相关性的示意图,如图6所示,M、I、N、H、G、J、L、K、O为参考帧中的块,其中,块G在参考帧中的位置与Curr在当前帧中的位置相同。每个块中的第一个数字为该块与Curr的相关系数,可以看出,G与Curr的相关性最高。Fig. 6 is a schematic diagram of the time-domain correlation between the block in the reference frame and the current block Curr obtained by using the prior art. As shown in Fig. 6, M, I, N, H, G, J, L, K, O are Blocks in the reference frame, where the position of block G in the reference frame is the same as that of Curr in the current frame. The first number in each block is the correlation coefficient between the block and Curr. It can be seen that G has the highest correlation with Curr.

步骤315:将G的运动矢量作为Curr的预测运动矢量,本流程结束。Step 315: Use the motion vector of G as the predicted motion vector of Curr, and this process ends.

步骤316:将零矢量作为Curr的预测运动矢量。Step 316: Use the zero vector as the predicted motion vector of Curr.

在实际应用中,若只采用空域相关法预测运动失量,则在A、B、D、E、F都不可用时,将零矢量作为Curr的预测运动矢量。In practical applications, if only the spatial domain correlation method is used to predict the motion loss, when A, B, D, E, and F are not available, the zero vector is used as the predicted motion vector of Curr.

图7为本发明实施例提供的运动矢量预测装置的结构组成图,如图7所示,其主要包括:块运动矢量存储模块71和运动矢量确定模块72,其中:FIG. 7 is a structural composition diagram of a motion vector prediction device provided by an embodiment of the present invention. As shown in FIG. 7 , it mainly includes: a block motion vector storage module 71 and a motion vector determination module 72, wherein:

块运动矢量存储模块71:存储当前帧中的块的运动矢量。Block motion vector storage module 71: store motion vectors of blocks in the current frame.

运动矢量确定模块72:当检测到当前块Curr的上块B、左块A不可用,而当前块的上二块F、左二块E可用时,根据从块运动矢量存储模块71获取的F、E的运动矢量,确定Curr的预测运动矢量。Motion vector determination module 72: when it is detected that the upper block B and the left block A of the current block Curr are unavailable, and the upper two blocks F and the second left block E of the current block are available, according to the F obtained from the block motion vector storage module 71 , the motion vector of E to determine the predicted motion vector of Curr.

运动矢量确定模块72可以包括:块可用检测模块721和确定模块722,各模块的功能如下:The motion vector determination module 72 may include: a block available detection module 721 and a determination module 722, and the functions of each module are as follows:

块可用检测模块721:检测块A、B、D、E、F、G是否可用,将检测结果发送给确定模块722。Block availability detection module 721 : detect whether the blocks A, B, D, E, F, G are available, and send the detection result to the determination module 722 .

G为参考帧中所处位置与Curr在当前帧中所处位置相同的块。G is the block whose position in the reference frame is the same as that of Curr in the current frame.

确定模块722:接收块可用检测模块721发来的检测结果,若该检测结果指示A、B不可用、E、F可用、同时D可用,则将从块运动矢量存储模块71获取的块D、E、F的运动矢量的中值作为Curr的预测运动矢量;若该检测结果指示A、B不可用、E、F可用、同时D不可用,则将从块运动矢量存储模块71获取的块E、F的运动矢量的均值作为Curr的预测运动矢量。Determining module 722: receiving the detection result sent by the block availability detection module 721, if the detection result indicates that A and B are unavailable, E and F are available, and D is available at the same time, then the block D, block obtained from the block motion vector storage module 71, The median value of the motion vectors of E and F is used as the predicted motion vector of Curr; if the detection result indicates that A, B are unavailable, E, F are available, and D is unavailable simultaneously, the block E obtained from the block motion vector storage module 71 , The mean value of the motion vector of F is used as the predicted motion vector of Curr.

在实际应用中,确定模块722可以进一步包括,用于在检测结果指示块A、B、D都可用时,将从块运动矢量存储模块71获取的A、B、D的运动矢量的中值作为Curr的预测运动矢量的子模块。In practical applications, the determination module 722 may further include, when the detection result indicates that blocks A, B, and D are all available, taking the median value of the motion vectors of A, B, and D obtained from the block motion vector storage module 71 as Curr's submodule for predicting motion vectors.

在实际应用中,确定模块722还可以进一步包括,用于在检测结果指示块A、B都可用而D不可用时,将从块运动矢量存储模块71获取的A、B的运动矢量的均值作为Curr的预测运动矢量的子模块。In practical applications, the determining module 722 may further include, when the detection result indicates that both blocks A and B are available but D is unavailable, taking the mean value of the motion vectors of A and B obtained from the block motion vector storage module 71 as Curr The submodule for predicting motion vectors.

在实际应用中,确定模块722还可以进一步包括,用于在检测到块A、B之一可用时,将从块运动矢量存储模块71获取的可用的A或B的运动矢量作为Curr的预测运动矢量的子模块。In practical applications, the determination module 722 may further include, when it is detected that one of the blocks A and B is available, use the available motion vector of A or B acquired from the block motion vector storage module 71 as the predicted motion of Curr Vector of submodules.

在实际应用中,确定模块722还可以进一步包括,用于在检测到块A、B、E、F都不可用、D可用时,将D的运动矢量作为Curr的预测运动矢量的子模块。In practical applications, the determining module 722 may further include a submodule for using the motion vector of D as the predicted motion vector of Curr when it is detected that blocks A, B, E, and F are not available and D is available.

在实际应用中,确定模块722还可以进一步包括,用于在只采用空域相关法预测运动矢量时,若检测到块A、B、D、E、F都不可用时,将零矢量作为Curr的预测运动矢量的子模块。In practical applications, the determining module 722 may further include, when only the spatial domain correlation method is used to predict the motion vector, if it is detected that the blocks A, B, D, E, and F are not available, the zero vector is used as the prediction of Curr Submodule for motion vectors.

在实际应用中,确定模块722还可以进一步包括,用于在只采用空、时域相关结合法预测运动矢量时,若检测到块A、B、D、E、F都不可用时,将从块运动矢量存储模块71获取的、在参考帧中所处位置与Curr在当前帧中所处位置相同的块G的运动矢量作为Curr的预测运动矢量的子模块。In practical applications, the determination module 722 may further include: when only the space and time domain correlation method is used to predict the motion vector, if it is detected that the blocks A, B, D, E, and F are not available, the block from the block The motion vector of the block G acquired by the motion vector storage module 71 and whose position in the reference frame is the same as that of Curr in the current frame is used as a sub-module of the predictive motion vector of Curr.

从上述实施例可以看出,当A、B块都不可用、而E、F块可用时,可以以E、F块代替A、B块来预测Curr的运动矢量,由于E是与A相关性最高的块、F是与B相关性最高的块,因此,会提高运动矢量预测的可靠性。例如:在A、B、D都不可用时,仍然可以以E、F的运动矢量的均值作为Curr的预测运动矢量;而现有技术中,当A、B、D都不可用时,直接以零矢量作为Curr的预测运动矢量,显然,在这种情况下,本发明实施例会提高运动矢量预测的准确度。It can be seen from the above embodiment that when blocks A and B are not available but blocks E and F are available, the motion vector of Curr can be predicted by blocks E and F instead of blocks A and B, since E is related to A The highest block, F, is the block most correlated with B, and therefore improves the reliability of motion vector prediction. For example: when A, B, and D are not available, the mean value of the motion vectors of E and F can still be used as the predicted motion vector of Curr; and in the prior art, when A, B, and D are not available, the zero vector is directly used As Curr's predicted motion vector, obviously, in this case, the embodiments of the present invention will improve the accuracy of motion vector prediction.

以上所述仅为本发明的过程及方法实施例,并不用以限制本发明,凡在本发明的精神和原则之内所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only process and method embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of the present invention. within the scope of protection.

Claims (16)

1, a kind of method of motion vector prediction is characterized in that, this method comprises:
When the last piece that detects current block, left piece unavailable, but and last two, the second from left piece time spent of current block determine the motion vectors of current block according to last two of current block, the second from left piece,
Last two of described current block is the last piece of the last piece of current block, and the second from left piece of described current block is the left piece of the left piece of current block.
2, the method for claim 1 is characterized in that, describedly determines that according to last two of current block, the second from left piece the motion vectors of current block comprises:
Whether upper right of judging current block available, if, with last two of current block, the second from left piece, the upper right intermediate value of motion vector as the motion vectors of current block; Otherwise, with last two of current block, the average of the motion vector of the second from left piece motion vectors as current block.
3, the method for claim 1, it is characterized in that, described method further comprises: but when the last piece that detects current block, left piece, upper right time spent all, with the last piece of current block, left piece, the upper right intermediate value of motion vector as the motion vectors of current block.
4, the method for claim 1, it is characterized in that, described method further comprises: when all available and upper right when unavailable of the last piece of current block, left piece, with the average of the motion vector of the last piece of current block, the left piece motion vectors as current block.
5, the method for claim 1 is characterized in that, described method further comprises: but when one of the last piece of current block, the left piece time spent, with the motion vector of available last piece or the left piece motion vectors as current block.
6, the method for claim 1 is characterized in that, described method further comprises: but when the last piece of current block, left piece, last two, all unavailable, a upper right time spent of the second from left piece, with the motion vectors of upper right motion vector as current block.
7, the method for claim 1 is characterized in that, described method further comprises: when the last piece of current block, left piece, upper right, last two, when the second from left piece is all unavailable, with the motion vectors of zero vector as current block.
8, the method for claim 1, it is characterized in that, described method further comprises: when the last piece of current block, left piece, upper right, last two, when the second from left piece is all unavailable, will be in reference frame the motion vector of the present position piece identical with current block present position in present frame as the motion vectors of current block.
9, a kind of motion-vector prediction device is characterized in that, this device comprises:
The block motion vector memory module, the motion vector of the piece in the storage present frame;
The motion vector determination module, when the last piece that detects current block, left piece unavailable, but and last two, the second from left piece time spent of current block, according to last two of the current block that obtains from the block motion vector memory module, the motion vector of the second from left piece, determine the motion vectors of current block, wherein, last two of described current block is the last piece of the last piece of current block, and the second from left piece of described current block is the left piece of the left piece of current block.
10, device as claimed in claim 9 is characterized in that, described motion vector determination module comprises:
The available detection module of piece detects the last piece of current block, left piece, last two, the second from left piece, upper right, whether available, and testing result is sent to determination module;
Determination module, receive described testing result, if the indication of this testing result go up piece, unavailable, last two of left piece, the second from left piece available, simultaneously upper right available, then last two of the current block that will obtain from the block motion vector memory module, the second from left piece, the upper right intermediate value of motion vector are as the motion vectors of current block; If the indication of this testing result go up piece, unavailable, last two of left piece, the second from left piece available, simultaneously upper right unavailable, then last two of the current block that will obtain from the block motion vector memory module, the average of the motion vector of the second from left piece are as the motion vectors of current block.
11, device as claimed in claim 10, it is characterized in that, described determination module further comprises, but be used on testing result indication current block piece, left piece, upper right time spent all, the last piece of the current block that will obtain from the block motion vector memory module, left piece, the upper right intermediate value of motion vector are as the submodule of the motion vectors of current block.
12, device as claimed in claim 10, it is characterized in that, described determination module further comprises, be used on testing result indication current block all available and upper right when unavailable of piece, left piece, the average of the last piece of the current block that will obtain from the block motion vector memory module, the motion vector of left piece is as the submodule of the motion vectors of current block.
13, device as claimed in claim 10, it is characterized in that, described determination module further comprises, but be used for detect current block on one of piece, left piece time spent, the available last piece that will obtain from the block motion vector memory module or the motion vector of left piece are as the submodule of the motion vectors of current block.
14, device as claimed in claim 10, it is characterized in that, described determination module further comprises, but be used for detect current block on piece, left piece, on two, all unavailable, a upper right time spent of the second from left piece, with the submodule of upper right motion vector as the motion vectors of current block.
15, device as claimed in claim 10, it is characterized in that, described determination module further comprises, be used for detect current block on piece, left piece, upper right, on two, when the second from left piece is all unavailable, with the submodule of zero vector as the motion vectors of current block.
16, device as claimed in claim 10, it is characterized in that, described determination module further comprises, be used for detect current block on piece, left piece, upper right, on two, when the second from left piece is all unavailable, will obtain from the block motion vector memory module, reference frame the motion vector of the present position piece identical with current block present position in present frame as the submodule of the motion vectors of current block.
CN 200710179813 2007-12-18 2007-12-18 A motion vector prediction method and device Expired - Fee Related CN100579231C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200710179813 CN100579231C (en) 2007-12-18 2007-12-18 A motion vector prediction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200710179813 CN100579231C (en) 2007-12-18 2007-12-18 A motion vector prediction method and device

Publications (2)

Publication Number Publication Date
CN101188766A CN101188766A (en) 2008-05-28
CN100579231C true CN100579231C (en) 2010-01-06

Family

ID=39480912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200710179813 Expired - Fee Related CN100579231C (en) 2007-12-18 2007-12-18 A motion vector prediction method and device

Country Status (1)

Country Link
CN (1) CN100579231C (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2487200A (en) 2011-01-12 2012-07-18 Canon Kk Video encoding and decoding with improved error resilience
TWI580264B (en) * 2011-11-10 2017-04-21 Sony Corp Image processing apparatus and method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001251632A (en) * 1999-12-27 2001-09-14 Toshiba Corp Motion vector detection method and apparatus, and motion vector detection program

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001251632A (en) * 1999-12-27 2001-09-14 Toshiba Corp Motion vector detection method and apparatus, and motion vector detection program

Also Published As

Publication number Publication date
CN101188766A (en) 2008-05-28

Similar Documents

Publication Publication Date Title
CN112565787B (en) Coding and decoding method and equipment thereof
JP2019041418A5 (en)
CN101860754B (en) Method and device for encoding and decoding motion vectors
JP2018532317A5 (en)
CN101690171B (en) Imaging device, integrated circuit, and imaging method
RU2010129443A (en) METHOD FOR IMAGE CODING AND METHOD FOR IMAGE DECODING
RU2015120774A (en) VIDEO ENCODING AND DECODING WITH INCREASED ERROR RESISTANCE
CN101605256A (en) Method and device for video encoding and decoding
JP2005354528A5 (en)
CN102227132A (en) Motion vector prediction coding and decoding method, apparatus thereof and coding and decoding system
CN101883286A (en) Calibration method and device, and motion estimation method and device in motion estimation
CN100579231C (en) A motion vector prediction method and device
KR20190013908A (en) Interframe predictive coding method and apparatus
CN111901590B (en) Refined motion vector storage method and device for inter-frame prediction
US20070196018A1 (en) Method of multi-path block matching computing
US7852939B2 (en) Motion vector detection method and device of the same
CN107920254B (en) A motion estimation method, device and video encoder for B frames
KR101471599B1 (en) Method for estimating motion vector using threshold
Wu et al. Linear predicted hexagonal search algorithm with moments
CN103763557B (en) A Do‑NBDV acquisition method and video decoding device
CN119728987A (en) Decoding method, encoding method, apparatus, device, and storage medium
JP6398149B2 (en) Moving picture coding apparatus and program, and moving picture coding system
KR20130011609A (en) Apparatus and method for sampled pixel based motion estimation
CN112073734A (en) Encoding and decoding method, device and equipment
KR20120134083A (en) Methods for storing informaton related to the motion estimation in inter prediction mode and methods for prodicing informaton related to the motion estimation in inter prediction mode

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100106

Termination date: 20111218