CN100385957C - A Method of Motion Vector Prediction - Google Patents
A Method of Motion Vector Prediction Download PDFInfo
- Publication number
- CN100385957C CN100385957C CNB2004100475350A CN200410047535A CN100385957C CN 100385957 C CN100385957 C CN 100385957C CN B2004100475350 A CNB2004100475350 A CN B2004100475350A CN 200410047535 A CN200410047535 A CN 200410047535A CN 100385957 C CN100385957 C CN 100385957C
- Authority
- CN
- China
- Prior art keywords
- motion vector
- distance
- block
- motion
- blocks
- 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
Links
- 230000033001 locomotion Effects 0.000 title claims abstract description 124
- 239000013598 vector Substances 0.000 title claims abstract description 113
- 238000000034 method Methods 0.000 title claims abstract description 25
- 238000001914 filtration Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 6
- 239000013074 reference sample Substances 0.000 description 4
- 239000000523 sample Substances 0.000 description 4
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 238000005457 optimization Methods 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
技术领域 technical field
本发明涉及视频图像处理技术领域,特别是一种运动矢量预测的方法。The invention relates to the technical field of video image processing, in particular to a method for motion vector prediction.
背景技术 Background technique
随着多媒体技术的飞速发展和广泛应用,各种视频数据得到越来越广泛的应用。由于原始视频数据所需带宽极大,同时又具有很大的冗余性,因此通常通过编码压缩后再存储或传输。其中帧间预测是去除时间冗余的关键技术,如果帧间预测的运动矢量场和实际的运动矢量场一致,那么视频编码的压缩效率也就得到大大的增加,否则帧间冗余不一定能够得到有效的去除,从而也就影响了整个系统的编码效率。运动矢量预测是计算运动矢量场的起始点,如果能够有效的预测运动矢量场,那么一方面减少了运动估计的复杂度和计算量,另一方面也有利于去除帧间冗余,提高整个系统的编码效率。With the rapid development and wide application of multimedia technology, various video data are used more and more widely. Since the original video data requires a huge bandwidth and has a lot of redundancy, it is usually stored or transmitted after being compressed by encoding. Among them, inter-frame prediction is the key technology to remove temporal redundancy. If the motion vector field of inter-frame prediction is consistent with the actual motion vector field, then the compression efficiency of video coding will be greatly increased. Otherwise, inter-frame redundancy may not be able to It is effectively removed, thus affecting the coding efficiency of the entire system. Motion vector prediction is the starting point for calculating the motion vector field. If the motion vector field can be effectively predicted, on the one hand, the complexity and calculation amount of motion estimation will be reduced. On the other hand, it will also help to remove inter-frame redundancy and improve the overall system coding efficiency.
视频编码从80年代末开始,从MPEG-1、H.261到现在的MPEG-4、H.264已经有很长的研究历史,提出了很多国际标准,但是基本思想仍然是分块压缩和运动估计。运动矢量预测技术都是对相邻宏块的运动矢量进行标量中值滤波得到。但是在实际的视频编码中,相邻宏块的运动不仅在X方向上具有一致性,而且在Y方向上也具有一致性,它们应该是不可分,本发明就是基于这样的出发点来做运动矢量预测的。Video coding began in the late 1980s. From MPEG-1, H.261 to the current MPEG-4, H.264, there has been a long research history, and many international standards have been proposed, but the basic idea is still block compression and motion estimate. Motion vector prediction techniques are obtained by performing scalar median filtering on motion vectors of adjacent macroblocks. However, in actual video coding, the motions of adjacent macroblocks are not only consistent in the X direction, but also consistent in the Y direction, and they should be inseparable. The present invention is based on such a starting point for motion vector prediction of.
在视频编码中,块匹配运动估计初始位置的确定,即运动矢量的预测,决定了整个编码系统的性能。如果预测得到的运动矢量逼近于真实的运动矢量场,那么运动估计的准确性就非常的高,当前块和预测块的残差也就非常的小,从而提高了帧间预测的编码效率;反之如果预测得到的运动矢量和实际的运动矢量场相差较大,在运动估计搜索的过程中,可能会陷入局部极小值,从而影响了整个编码系统的性能。In video coding, the determination of the initial position of the block matching motion estimation, that is, the prediction of the motion vector, determines the performance of the entire coding system. If the predicted motion vector is close to the real motion vector field, then the accuracy of motion estimation is very high, and the residual error between the current block and the predicted block is very small, thus improving the coding efficiency of inter-frame prediction; on the contrary If there is a big difference between the predicted motion vector and the actual motion vector field, it may fall into a local minimum during the motion estimation search process, thus affecting the performance of the entire coding system.
发明内容 Contents of the invention
本发明的目的在于提供一种运动矢量预测的方法。The purpose of the present invention is to provide a method for motion vector prediction.
一种基于矢量中值滤波的运动矢量预测方法,它能够根据周围宏块或块的运动矢量来预测当前宏块或块的预测矢量。它首先计算左边宏块或块,上边宏块或块以及右上宏块或块的运动矢量之间的距离,然后对他们的距离进行排序,选择中间距离所对应的运动矢量为当前宏块或块的运动矢量,以此预测得到的运动矢量为中心再进行运动搜索,计算得到最终的预测矢量。A motion vector prediction method based on vector median filtering, which can predict the prediction vector of the current macroblock or block according to the motion vectors of the surrounding macroblocks or blocks. It first calculates the distance between the motion vectors of the left macroblock or block, the upper macroblock or block, and the upper right macroblock or block, then sorts their distances, and selects the motion vector corresponding to the middle distance as the current macroblock or block The motion vector of the predicted motion vector is centered on the motion search, and the final predicted vector is calculated.
本方法的特征是首先计算相邻块或宏块的运动矢量之间的距离,根据他们之间的距离关系,选择某一个相邻宏块或块的运动矢量作为当前块或宏块的运动矢量。该方法主要包括相邻宏块运动矢量之间距离的计算;根据运动矢量之间的距离关系选择其中一个宏块或块的运动矢量作为当前宏块或块的预测运动矢量。本方法适用于任何帧间预测的视频编码中。The feature of this method is to first calculate the distance between the motion vectors of adjacent blocks or macroblocks, and select the motion vector of a certain adjacent macroblock or block as the motion vector of the current block or macroblock according to the distance relationship between them . The method mainly includes calculating the distance between motion vectors of adjacent macroblocks; selecting the motion vector of one of the macroblocks or blocks as the predicted motion vector of the current macroblock or block according to the distance relationship between the motion vectors. This method is applicable to any video coding with inter-frame prediction.
一种运动矢量预测的方法,使用相邻宏块或块的运动矢量之间的距离作为判断准则来选择当前宏块或块的运动矢量,步骤如下:A method for motion vector prediction, using the distance between the motion vectors of adjacent macroblocks or blocks as a criterion to select the motion vector of the current macroblock or block, the steps are as follows:
(1)分别计算相邻宏块或块的运动矢量之间的距离;(1) Calculate the distance between the motion vectors of adjacent macroblocks or blocks, respectively;
(2)对它们之间的距离进行排序并进行比较,选择与中间距离对应块或宏块的运动矢量作为当前块或宏块的运动矢量预测值。(2) Sorting and comparing the distances between them, and selecting the motion vector of the block or macroblock corresponding to the intermediate distance as the motion vector predictor of the current block or macroblock.
计算相邻宏块或块的运动矢量之间的距离。Computes the distance between motion vectors of adjacent macroblocks or blocks.
对运动矢量之间的距离进行排序,进行矢量中值滤波。Sort the distance between motion vectors and perform vector median filtering.
矢量中值滤波得到的运动矢量作为当前块或宏块的预测运动矢量。The motion vector obtained by vector median filtering is used as the predicted motion vector of the current block or macroblock.
以预测的运动矢量为起始点,在参考图像中对当前宏块或块进行运动估计。With the predicted motion vector as the starting point, motion estimation is performed on the current macroblock or block in the reference image.
附图说明: Description of drawings:
图1是本发明的运动估计示意图。FIG. 1 is a schematic diagram of motion estimation in the present invention.
图2是本发明的当前块和周围块的位置关系图。Fig. 2 is a positional diagram of the current block and surrounding blocks in the present invention.
图3是本发明的运动矢量预测示意图。Fig. 3 is a schematic diagram of motion vector prediction in the present invention.
图4是本发明的运动搜索示意图。Fig. 4 is a schematic diagram of motion search in the present invention.
图5是本发明的运动矢量预测的方法的流程图。Fig. 5 is a flow chart of the method for motion vector prediction in the present invention.
具体实施方式 Detailed ways
图1为运动估计示意图。当对大小为NxN的当前样本块做运动估计,搜索范围为R时,以当前样本块左上角的样本坐标为原点,水平向左为X坐标正方向,垂直向下为Y坐标正方向,从(-R,-R)至(N+R,N+R)的范围内选择一个NxN的参考样本最佳匹配块,使得当前样本块与参考样本块之间的失真最小,或者在进行率失真优化的情况下选择编码效率最高的参考样本块。图1中两个粗黑线方块分别为对应运动矢量为(R,R)和(-R,-R)的参考样本块。Figure 1 is a schematic diagram of motion estimation. When performing motion estimation on the current sample block with a size of NxN, when the search range is R, the sample coordinate of the upper left corner of the current sample block is taken as the origin, the positive direction of the X coordinate is horizontally to the left, and the positive direction of the Y coordinate is vertically downward, from Select an NxN reference sample best matching block in the range of (-R, -R) to (N+R, N+R), so that the distortion between the current sample block and the reference sample block is the smallest, or when performing rate distortion In the case of optimization, the reference sample block with the highest coding efficiency is selected. The two blocks with thick black lines in FIG. 1 are reference sample blocks corresponding to motion vectors (R, R) and (-R, -R) respectively.
图2是块和周围块的位置关系。在运动估计的过程中,运动估计的起始位置就是由相邻块的运动矢量预测得到的,在图2中,当前块的运动矢量就是由相邻块A,B和C的运动矢量预测得到的。如果C块的运动矢量不可用时,用D块的运动矢量来替代。Figure 2 shows the positional relationship between the blocks and surrounding blocks. In the process of motion estimation, the starting position of motion estimation is obtained by predicting the motion vectors of adjacent blocks. In Figure 2, the motion vector of the current block is obtained by predicting the motion vectors of adjacent blocks A, B and C of. If the motion vector of block C is not available, the motion vector of block D is used instead.
图3是运动矢量预测示意图,图示中的X轴表示水平方向的运动矢量,Y轴表示垂直方向的运动矢量。Va,Vb和Vc分别表示块A,块B和块C的运动矢量,它们包含有X方向和Y方向。他们之间的连线长度表示相应的运动矢量之间的距离,然后对他们之间距离进行排序,选择中间距离的那条边对应的运动矢量作为最终的运动矢量,如图3所示,对VaVb,VbVc和VcVa进行排序,中间距离的那条边为VcVa,它所对应的B块的运动矢量Vb就最为当前块的运动矢量预测值。Fig. 3 is a schematic diagram of motion vector prediction, in which the X-axis represents the motion vector in the horizontal direction, and the Y-axis represents the motion vector in the vertical direction. Va, Vb, and Vc represent motion vectors of block A, block B, and block C, respectively, and they include the X direction and the Y direction. The length of the line between them represents the distance between the corresponding motion vectors, and then the distance between them is sorted, and the motion vector corresponding to the side of the middle distance is selected as the final motion vector, as shown in Figure 3, for VaVb, VbVc and VcVa are sorted, the side of the middle distance is VcVa, and the motion vector Vb of the B block corresponding to it is the motion vector predictor value of the current block.
通过以上步骤得到的运动矢量作为当前块的预测运动矢量,运动搜索的过程如图4所示,以预测得到的运动矢量为中心,按照图中所示的顺序,依次对各个位置的块进行匹配,在一定的范围内搜索一个与当前块最匹配的块作为当前块的预测块。The motion vector obtained through the above steps is used as the predicted motion vector of the current block. The motion search process is shown in Figure 4, with the predicted motion vector as the center, and the blocks at each position are sequentially matched according to the sequence shown in the figure. , within a certain range to search for a block that best matches the current block as the prediction block of the current block.
图5是运动矢量预测的方法,其具体步骤如下:Fig. 5 is the method for motion vector prediction, and its specific steps are as follows:
步骤S1,假设当前块或者宏块的左边相邻块A的运动矢量为(Vax,Vay),上面相邻块B的运动矢量为(Vbx,Vby),右上角相邻块C的运动矢量为(Vcx,Vcy);它们的位置关系如图2所示。Step S1, assuming that the motion vector of the left adjacent block A of the current block or macroblock is (Vax, Vay), the motion vector of the upper adjacent block B is (Vbx, Vby), and the motion vector of the upper right adjacent block C is (Vcx, Vcy); their positional relationship is shown in Figure 2.
步骤S2,按照下面的方法计算相邻块之间的运动矢量之间的距离:Step S2, calculate the distance between motion vectors between adjacent blocks according to the following method:
DISTANCE(A,B)=|Vax-Vbx|+|Vay-Vby|DISTANCE(A, B)=|Vax-Vbx|+|Vay-Vby|
DISTANCE(B,C)=|Vbx-Vcx|+|Vby-Vcy|DISTANCE(B, C)=|Vbx-Vcx|+|Vby-Vcy|
DISTANCE(C,A)=|Vcx-Vax|+|Vcy-Vay|DISTANCE(C,A)=|Vcx-Vax|+|Vcy-Vay|
步骤S3,对运动矢量之间的距离DISTANCE(A,B),DISTANCE(B,C)和DISTANCE(C,A)进行排序,选择和中间距离对应的运动矢量作为当前块的预测运动矢量;例如:如果DISTANCE(A,B)<DISTANCE(B,C)<DISTANCE(C,A),则选择与DISTANCE(B,C)对应块A的运动矢量作为当前块的运动矢量;Step S3, sorting the distance DISTANCE (A, B), DISTANCE (B, C) and DISTANCE (C, A) between the motion vectors, and selecting the motion vector corresponding to the intermediate distance as the predicted motion vector of the current block; for example : if DISTANCE (A, B) < DISTANCE (B, C) < DISTANCE (C, A), then select the motion vector of block A corresponding to DISTANCE (B, C) as the motion vector of the current block;
步骤S4,以当前块的预测运动矢量为起始点,对当前块进行运动估计。Step S4, taking the predicted motion vector of the current block as the starting point, performing motion estimation on the current block.
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2004100475350A CN100385957C (en) | 2004-05-21 | 2004-05-21 | A Method of Motion Vector Prediction |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2004100475350A CN100385957C (en) | 2004-05-21 | 2004-05-21 | A Method of Motion Vector Prediction |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1585487A CN1585487A (en) | 2005-02-23 |
| CN100385957C true CN100385957C (en) | 2008-04-30 |
Family
ID=34602026
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB2004100475350A Expired - Fee Related CN100385957C (en) | 2004-05-21 | 2004-05-21 | A Method of Motion Vector Prediction |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN100385957C (en) |
Families Citing this family (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100366092C (en) * | 2005-04-08 | 2008-01-30 | 北京中星微电子有限公司 | A Search Method Based on Motion Vector Prediction in Video Coding |
| CN100473168C (en) * | 2005-06-21 | 2009-03-25 | 中国科学院计算技术研究所 | Motion Vector Spatial Prediction Method for Video Coding |
| JP4813517B2 (en) * | 2008-05-29 | 2011-11-09 | オリンパス株式会社 | Image processing apparatus, image processing program, image processing method, and electronic apparatus |
| KR101279573B1 (en) | 2008-10-31 | 2013-06-27 | 에스케이텔레콤 주식회사 | Motion Vector Encoding/Decoding Method and Apparatus and Video Encoding/Decoding Method and Apparatus |
| US8675736B2 (en) * | 2009-05-14 | 2014-03-18 | Qualcomm Incorporated | Motion vector processing |
| KR20110008653A (en) * | 2009-07-20 | 2011-01-27 | 삼성전자주식회사 | Motion vector prediction method and image encoding / decoding apparatus and method using same |
| KR101452859B1 (en) | 2009-08-13 | 2014-10-23 | 삼성전자주식회사 | Method and apparatus for encoding and decoding motion vector |
| EP2773112B1 (en) * | 2011-10-27 | 2018-08-08 | Sun Patent Trust | Image encoding method, image decoding method, image encoding apparatus, and image decoding apparatus |
| JP5383958B2 (en) | 2011-10-28 | 2014-01-08 | パナソニック株式会社 | Decoding method and decoding apparatus |
| EP2782341B1 (en) | 2011-10-28 | 2020-01-01 | Sun Patent Trust | Image encoding method, image decoding method, image encoding device, and image decoding device |
| WO2021056225A1 (en) * | 2019-09-24 | 2021-04-01 | Oppo广东移动通信有限公司 | Inter-frame prediction method and apparatus, device and storage medium |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1132983A (en) * | 1994-10-10 | 1996-10-09 | 汤姆森多媒体公司 | Process for coding or decoding motion vectors and coding or decoding device implementing said process |
| US6414995B2 (en) * | 1999-07-29 | 2002-07-02 | Mitsubishi Denki Kabushiki Kaisha | Motion vector detection system |
| CN1436002A (en) * | 2002-01-26 | 2003-08-13 | Lg电子株式会社 | Adaptive motion vector search range determining method |
| WO2004013985A1 (en) * | 2002-08-06 | 2004-02-12 | Motorola, Inc. | Method and apparatus for performing high quality fast predictive motion search |
| CN1487747A (en) * | 2002-07-18 | 2004-04-07 | Lg������ʽ���� | Method for calculating predicted motion vector |
-
2004
- 2004-05-21 CN CNB2004100475350A patent/CN100385957C/en not_active Expired - Fee Related
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1132983A (en) * | 1994-10-10 | 1996-10-09 | 汤姆森多媒体公司 | Process for coding or decoding motion vectors and coding or decoding device implementing said process |
| US6414995B2 (en) * | 1999-07-29 | 2002-07-02 | Mitsubishi Denki Kabushiki Kaisha | Motion vector detection system |
| CN1436002A (en) * | 2002-01-26 | 2003-08-13 | Lg电子株式会社 | Adaptive motion vector search range determining method |
| CN1487747A (en) * | 2002-07-18 | 2004-04-07 | Lg������ʽ���� | Method for calculating predicted motion vector |
| WO2004013985A1 (en) * | 2002-08-06 | 2004-02-12 | Motorola, Inc. | Method and apparatus for performing high quality fast predictive motion search |
Also Published As
| Publication number | Publication date |
|---|---|
| CN1585487A (en) | 2005-02-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100926205B1 (en) | Method and apparatus of temporal error concealment for p-frame | |
| CN108134939B (en) | Motion estimation method and device | |
| US11336915B2 (en) | Global motion vector video encoding systems and methods | |
| CN102075760B (en) | Quick movement estimation method and device | |
| CN100385957C (en) | A Method of Motion Vector Prediction | |
| CN108419082B (en) | Motion estimation method and device | |
| CN102291581B (en) | Realizing method of self-adaptive motion estimation supporting frame field | |
| CN102883160A (en) | Method, device and equipment for acquiring video image motion information, and template construction method | |
| CN101860754A (en) | Method and apparatus for encoding and decoding motion vector | |
| CN102474619A (en) | Motion vector prediction method, and apparatus and method for encoding and decoding image using the same | |
| CN109660799A (en) | Method for estimating, device, electronic equipment and storage medium in Video coding | |
| CN104837019B (en) | AVS to HEVC optimization video transcoding methods based on SVMs | |
| JP2003244707A (en) | Adaptive decision method of motion vector search range | |
| CN105898332B (en) | For the fast deep figure frame mode decision method of 3D-HEVC coding standards | |
| CN103327327B (en) | For the inter prediction encoding unit selection method of high-performance video coding HEVC | |
| TWI722465B (en) | Boundary enhancement for sub-block | |
| CN102215387B (en) | Video image processing method and coder/decoder | |
| CN111479110A (en) | Fast Affine Motion Estimation Method for H.266/VVC | |
| CN100579227C (en) | A system and method for selecting an intra prediction mode | |
| CN110636290A (en) | Video image motion vector codec method and codec/decoder | |
| CN100568977C (en) | Motion Vector Prediction Method in Video Coding | |
| CN109040756A (en) | A kind of rapid motion estimating method based on HEVC image content complexity | |
| CN100584010C (en) | Power optimized collocated motion estimation method | |
| CN102143362A (en) | Video transcoding processing method and video transcoding processing device from MPEG2 format or H. 263 format to H. 264 format | |
| Lin et al. | A fast and adaptive search algorithm based on rood pattern and gradient descent |
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 | ||
| ASS | Succession or assignment of patent right |
Owner name: BEIJING ZHONGKE ZHIYUAN YUCHENG INFORMATION TECHNO Free format text: FORMER OWNER: INST. OF COMPUTING TECHNOLOGY, CHINESE ACADEMY OF SCIENCES Effective date: 20100910 |
|
| C41 | Transfer of patent application or patent right or utility model | ||
| COR | Change of bibliographic data |
Free format text: CORRECT: ADDRESS; FROM: 100080 NO.6, KEXUEYUAN SOUTH ROAD, ZHONGGUANCUN, BEIJING TO: 100190 NO.6, KEXUEYUAN SOUTH ROAD, ZHONGGUANCUN, HAIDIAN DISTRICT, BEIJING |
|
| TR01 | Transfer of patent right |
Effective date of registration: 20100910 Address after: 100190 Haidian District, Zhongguancun Academy of Sciences, South Road, No. 6, No. Patentee after: Beijing Zhongke Zhiyuan bred Information Technology Co. Ltd. Address before: 100080 No. 6 South Road, Zhongguancun Academy of Sciences, Beijing Patentee before: Institute of Computing Technology, Chinese Academy of Sciences |
|
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20080430 Termination date: 20160521 |