CN1319384C - Optimizing distribution method in moving evaluation for hardware computing power resource - Google Patents

Optimizing distribution method in moving evaluation for hardware computing power resource Download PDF

Info

Publication number
CN1319384C
CN1319384C CNB2005100492613A CN200510049261A CN1319384C CN 1319384 C CN1319384 C CN 1319384C CN B2005100492613 A CNB2005100492613 A CN B2005100492613A CN 200510049261 A CN200510049261 A CN 200510049261A CN 1319384 C CN1319384 C CN 1319384C
Authority
CN
China
Prior art keywords
macroblock
macroblocks
motion estimation
current
computing power
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
CNB2005100492613A
Other languages
Chinese (zh)
Other versions
CN1649414A (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CNB2005100492613A priority Critical patent/CN1319384C/en
Publication of CN1649414A publication Critical patent/CN1649414A/en
Application granted granted Critical
Publication of CN1319384C publication Critical patent/CN1319384C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present invention discloses an optimizing allocation method of hardware computing power resources in moving evaluation. H. 264 is a new video coding standard which absorbs the advantages of existing video coding standards, simultaneously provides many new algorithms and greatly enhances coding efficiency and image quality; however, the H. 264 enhances coding efficiency by increasing computation complexity and needs to be supported by different hardware; therefore, for aiming at different hardware and different computing capacity, the present invention carries out optimization aiming at the motion estimation aspect in the H. 264 for reaching good allocation of hardware resources, and further, optimized peak value signal-to-noise ratio and optimized code rate are obtained; simultaneously, the present invention has certain extendibility and can realize the isostatic adjustment between arithmetic complexity and prediction precision.

Description

硬件计算能力资源在运动估计中的优化分配方法Optimal Allocation Method of Hardware Computing Power Resources in Motion Estimation

技术领域technical field

本发明涉及在不同硬件条件支持下的多媒体技术领域,特别是涉及一种硬件计算能力资源在运动估计中的优化分配方法。The invention relates to the field of multimedia technology supported by different hardware conditions, in particular to a method for optimally allocating hardware computing power resources in motion estimation.

背景技术Background technique

H.264是ITU-T和MPEG组联合专家组JVT制定的目前最新的视频编码标准,这一编码标准可以获得很高的编码效率,尤其是在低码率方面比MPEG-4有明显的提高,非常适合低宽带、高质量网络视频应用的需要。但是,H.264为了提高编码效率,采用了许多高计算复杂度的算法,使得编解码计算量很大,因此对软硬件的要求甚高,同时也加大了编解码的难度。因为在通常情况下,很多方法无法实现在有限硬件支持的条件下,使得编码质量达到最优。H.264 is the latest video coding standard formulated by JVT, a joint expert group of ITU-T and MPEG. This coding standard can obtain high coding efficiency, especially in terms of low bit rate, which is significantly improved compared with MPEG-4. , very suitable for low-bandwidth, high-quality network video applications. However, in order to improve the encoding efficiency, H.264 adopts many algorithms with high computational complexity, which makes the encoding and decoding calculations very heavy, so the requirements for software and hardware are very high, and it also increases the difficulty of encoding and decoding. Because under normal circumstances, many methods cannot achieve the optimal encoding quality under the condition of limited hardware support.

为了使H.264能比较容易的在低码率高时性的应用系统中实现,必须对其编码算法进行优化。对H.264编码器各个算法模块进行分析可以得出,运动估计模块的计算量占了整个编码器运算量的80%以上。因此,要对整个编码器进行优化,运动估计模块应作为首选。In order to make H.264 easier to implement in low-bit-rate high-time application systems, its coding algorithm must be optimized. An analysis of each algorithm module of the H.264 encoder shows that the calculation amount of the motion estimation module accounts for more than 80% of the calculation amount of the entire encoder. Therefore, to optimize the entire encoder, the motion estimation module should be the first choice.

H.264在进行运动估计时,首选进行运动向量预测,经预测获得初始运动向量以后,把这个初始的运动向量作为搜索中心进行块匹配搜索,收缩时采用全搜索算法,即给出搜索中心周围的一个范围,对该范围内矩形区域内的所有的点,都要计算一次匹配结果,从中选出最佳匹配点作为整像素搜索的结果。H.264的全搜索算法,优点是可以找到限定范围内的全局最优匹配结果,运动估计精度很高。其不足在于算法的复杂度太高,成为整个编码体系中最为耗时的一部分,因此,在尽可能小的质量损失前提下,提高运动估计搜索速度,是对H.264进行优化的关键。When H.264 performs motion estimation, motion vector prediction is the first choice. After the initial motion vector is obtained through prediction, the initial motion vector is used as the search center for block matching search. A range of , all the points in the rectangular area within the range must calculate a matching result, and select the best matching point as the result of the integer pixel search. The full search algorithm of H.264 has the advantage that it can find the global optimal matching result within a limited range, and the motion estimation accuracy is very high. Its shortcoming is that the complexity of the algorithm is too high, which becomes the most time-consuming part of the entire coding system. Therefore, the key to optimizing H.264 is to improve the search speed of motion estimation with as little quality loss as possible.

目前由于各种硬件设备的特性不同,因此其运算能力和工作能力也不同,例如随着便携移动设备的普及,基于便携移动设备的多媒体应用大量涌现。由于便携移动设备存在计算能力弱等问题,而多媒体中,视频解码的计算复杂度相对较高,因此传统的视频编码方式用于便携移动设备,无法满足用户对多媒体尤其是视频技术相关应用的需求。因此针对不同硬件设备计算能力的不同,需要在运动估计时进行优化,从而达到较好的硬件资源分配的目的,进而取得最优化的PSNR和码率。At present, due to the different characteristics of various hardware devices, their computing capabilities and working capabilities are also different. For example, with the popularization of portable mobile devices, a large number of multimedia applications based on portable mobile devices have emerged. Due to the weak computing power of portable mobile devices, and the relatively high computational complexity of video decoding in multimedia, the traditional video encoding method used in portable mobile devices cannot meet the needs of users for multimedia, especially video technology-related applications. . Therefore, according to the different computing capabilities of different hardware devices, it is necessary to optimize the motion estimation, so as to achieve the purpose of better hardware resource allocation, and then obtain the optimized PSNR and code rate.

发明内容Contents of the invention

本发明的目的在于提供一种硬件计算能力资源在运动估计中的优化分配方法,针对现有硬件具有不同计算能力的情况,在H.264做运动估计时需要进行优化,达到有限硬件资源的合理分配,最终取的最优的效果。The purpose of the present invention is to provide a method for optimizing the allocation of hardware computing power resources in motion estimation. In view of the situation that existing hardware has different computing power, it needs to be optimized when doing motion estimation in H.264, so as to achieve a reasonable allocation of limited hardware resources. Allocation, and finally take the best effect.

本发明采用的技术方案如下:The technical scheme that the present invention adopts is as follows:

(1)基于宏块的绝对误差和的大小进行优先级划分,根据帧的大小分割成16×16的宏块,然后对当前帧的一个宏块与前一帧对应的宏块进行差值,得到绝对误差和,根据所计算的绝对误差和的大小对宏块进行优先级划分,并且当两个宏块的绝对误差和的差值在100的范围内时,认为这两个宏块的优先级等同,同时规定绝对误差和大的宏块其优先级越高,反之则越低,绝对误差和的计算公式如下:(1) Prioritize based on the absolute error sum of the macroblocks, divide the frame into 16×16 macroblocks according to the size of the frame, and then perform a difference between a macroblock of the current frame and the corresponding macroblock of the previous frame, The absolute error sum is obtained, and the macroblocks are prioritized according to the calculated absolute error sum, and when the difference between the absolute error sums of two macroblocks is within the range of 100, the priority of the two macroblocks is considered At the same time, it is stipulated that the priority of the absolute error sum and the large macroblock is higher, and vice versa. The calculation formula of the absolute error sum is as follows:

SADSAD == ΣΣ ii == 00 1515 ΣΣ jj == 00 1515 || ff (( ii ,, jj )) -- gg (( ii ,, jj )) ||

其中in

SAD是绝对误差和,SAD is the sum of absolute errors,

f是当前帧的像素函数,f is the pixel function of the current frame,

g为前一帧的像素函数;g is the pixel function of the previous frame;

(2)根据优先级的大小对当前优先级最高的宏块E(如果有相同最高优先级的宏块,则选择比较居中的宏块作为目标宏块)的左边A、上方B、右上方C的相邻宏进行运动估计,再把所得到的相邻宏块A、B、C的运动矢量MVA、MVB、MVC和MVmedian作为宏块E的候选预测点,最后对当前宏块E进行运动估计,计算当前宏块和其匹配的各参考宏块的误差,选择误差最小的宏块为最佳参考宏块,最后得到当前宏块E的运动矢量;(2) According to the size of the priority, the left side A, the top B, and the top right C of the macroblock E with the highest priority (if there is a macroblock with the same highest priority, select the macroblock in the middle as the target macroblock) The adjacent macros of the macroblocks are motion estimated, and then the obtained motion vectors MVA, MV B , MV C and MV median of the adjacent macroblocks A, B , C are used as the candidate prediction points of the macroblock E, and finally the current macroblock E performs motion estimation, calculates the error between the current macroblock and its matching reference macroblocks, selects the macroblock with the smallest error as the best reference macroblock, and finally obtains the motion vector of the current macroblock E;

(3)如果当前有相同最高优先级的宏块,根据它们各自的相邻宏块(左边A、上方B、右上方C)已知的MV数目的多少进行选择,如果某宏块E相邻宏块已知的运动矢量数目越多,则把该宏块E作为目标宏块;(3) If there are currently macroblocks with the same highest priority, select according to the number of known MV numbers of their respective adjacent macroblocks (left A, upper B, upper right C), if a certain macroblock E is adjacent The greater the number of known motion vectors of the macroblock, the macroblock E is used as the target macroblock;

(4)根据当前计算能力的现况做出是否停止对该帧宏块的运动估计,如果判断为停止,则对剩下没有做运动估计的宏块认为其运动矢量等于0,同时准备对下一帧继续进行运动估计。(4) Make whether to stop the motion estimation of the macroblock of this frame according to the current situation of the current computing power, if it is judged to stop, then consider the motion vector of the remaining macroblocks without motion estimation to be equal to 0, and prepare for the next Motion estimation continues for one frame.

步骤(2)中在第一次选择最高优先级宏块时,如果当前有相同最高优先级的宏块,则把比较居中的宏块作为目标宏块E;In step (2), when selecting the highest priority macroblock for the first time, if there is currently a macroblock with the same highest priority, then the macroblock in the middle is used as the target macroblock E;

步骤(2)中对当前宏块E需要求出其左边A、上方B、右上方C相邻宏块的运动矢量。如果右上方C不在当前帧中,则选择左上方的宏块C’代替右上方宏块C;In step (2), for the current macroblock E, it is necessary to obtain the motion vectors of its left A, upper B, and upper right C adjacent macroblocks. If the upper right C is not in the current frame, then select the upper left macroblock C' to replace the upper right macroblock C;

步骤(2)中对当前宏块E的左边A、上方B、右上方C的相邻宏块求MV时,如果其SAD<事先预设的值,则采用水平垂直搜索方法,否则采用菱形搜索法;In step (2), when calculating the MV of the adjacent macroblocks on the left A, upper B, and upper right C of the current macroblock E, if its SAD<preset value, then use the horizontal and vertical search method, otherwise use the diamond search method Law;

步骤(2)中对当前宏块E做预测时,候选预测点有(0,0)、MVA、MVB、MVC、MVmedianWhen the current macroblock E is predicted in step (2), the candidate prediction points are (0, 0), MV A , MV B , MV C , MV median ;

步骤(2)中对当前宏块E做运动估计时,计算当前宏块和其匹配的各参考宏块的绝对误差和,选择绝对误差和最小的宏块为最佳参考宏块,最后得到当前宏块E的运动矢量;When performing motion estimation on the current macroblock E in step (2), calculate the absolute error sum of the current macroblock and its matching reference macroblocks, select the macroblock with the smallest absolute error sum as the best reference macroblock, and finally obtain the current The motion vector of the macroblock E;

步骤(3)中如果当前有相同最高优先级的宏块,则根据它们的相邻宏块(左边A、上方B、右上方C)已知的运动矢量数目的多少进行选择,如果某宏块的相邻宏块已知的运动矢量越多,则把该宏块作为目标宏块。In step (3), if there are currently macroblocks with the same highest priority, they are selected according to the number of known motion vectors of their adjacent macroblocks (A on the left, B on the top, and C on the right). If a macroblock The more motion vectors are known for the neighboring macroblocks, the macroblock is taken as the target macroblock.

本发明具有的有益的效果是:可以对各种格式的视频信号进行运动估计,尤其在硬件计算能力有限的情况下更能体现出该发明的优越性,如果在硬件计算能力很强的情况下,本发明并不影响运动估计后得到的最终优化结果,因为此时对于每一帧中的每一个宏块都做了运动估计。相反,如果在硬件计算能力有限的情况下,本发明充分体现了其内在的优越性,因为本发明提出的方法使一帧中那些绝对误差和较大的宏块首先进行运动估计,按优先级从大到小对各宏块进行运动估计,当然在运动估计期间,本发明也充分考虑到硬件的计算能力的限度,所以采用各种方法进行处理,从而达到最优化的效果。The beneficial effects of the present invention are: motion estimation can be performed on video signals in various formats, especially in the case of limited hardware computing power, which can better reflect the superiority of the invention, if the hardware computing power is strong , the present invention does not affect the final optimization result obtained after motion estimation, because motion estimation is performed for each macroblock in each frame at this time. On the contrary, if the hardware computing power is limited, the present invention fully demonstrates its inherent superiority, because the method proposed by the present invention makes those absolute errors and larger macroblocks in a frame firstly perform motion estimation, according to priority Motion estimation is performed on each macroblock from large to small. Of course, during the motion estimation, the present invention fully considers the limitation of hardware computing power, so various methods are used for processing, so as to achieve the optimal effect.

附图说明Description of drawings

图1为已有的空间域中当前宏块与相邻宏块的位置关系示意图;FIG. 1 is a schematic diagram of the positional relationship between a current macroblock and adjacent macroblocks in the existing spatial domain;

图2为本发明的宏块优先级判定方法示意图;Fig. 2 is a schematic diagram of the macroblock priority determination method of the present invention;

图3为已有的菱形搜索方法示意图;Fig. 3 is the schematic diagram of existing rhombus search method;

图4为已有的水平垂直搜索方法示意图;FIG. 4 is a schematic diagram of an existing horizontal and vertical search method;

图5为本发明的目标宏块选择方法一示意图;FIG. 5 is a schematic diagram of a target macroblock selection method of the present invention;

图6为本发明的目标宏块选择方法二示意图;FIG. 6 is a schematic diagram of a second method for selecting a target macroblock in the present invention;

图7为本发明的目标宏块选择方法三示意图。FIG. 7 is a schematic diagram of a third method for selecting a target macroblock according to the present invention.

具体实施方式Detailed ways

本发明提出的用于在硬件计算能力有限的前提下对运动估计进行硬件计算能力资源合理分配的方法主要适用于具有不同计算能力硬件支持的条件下使用。主要按如下步骤进行:The method proposed by the present invention for rationally allocating hardware computing power resources for motion estimation under the premise of limited hardware computing power is mainly applicable to use under the condition of hardware support with different computing power. Mainly proceed as follows:

1.宏块优先级的划分1. Division of macroblock priority

把当前帧进行宏块的划分,分成16×16的宏块,然后把当前帧的一个宏块与前一帧对应的宏块进行差值,得到绝对误差和。再根据绝对误差和的大小对宏块进行优先级划分。当两个宏块的绝对误差和的差值在100的范围内时,认为这两个宏块的优先级等同。同时规定绝对误差和大的宏块其优先级越高,反之则越低。其中当前宏块与相邻宏块的位置关系见图1。The current frame is divided into macroblocks and divided into 16×16 macroblocks, and then the difference between one macroblock of the current frame and the corresponding macroblock of the previous frame is obtained to obtain the sum of absolute errors. Then the macroblocks are prioritized according to the size of the absolute error sum. When the difference between the absolute error sums of two macroblocks is within the range of 100, the priorities of the two macroblocks are considered to be equal. At the same time, it is stipulated that the priority of the absolute error and the large macroblock is higher, and vice versa. The positional relationship between the current macroblock and adjacent macroblocks is shown in FIG. 1 .

2.第一次选择优先级最高的目标宏块2. Select the target macroblock with the highest priority for the first time

选择当前优先级最高的宏块E时,如果没有相同优先级的宏块,则直接选择优先级最高的宏块作为目标宏块,否则如果有相同最高优先级的宏块,则选择比较居中的宏块作为目标宏块E。如图2所示当前有相同优先级的两个宏块E1和E2,它们的绝对误差和分别为S1、S2,如果|S2-S1|<=S(S=100)时,则选择居中的宏块E1作为目标宏块。When selecting the macroblock E with the highest priority, if there is no macroblock with the same priority, directly select the macroblock with the highest priority as the target macroblock; otherwise, if there is a macroblock with the same highest priority, select the middle one The macroblock serves as the target macroblock E. As shown in Figure 2, there are currently two macroblocks E1 and E2 with the same priority, and their absolute error sums are S1 and S2 respectively. If |S2-S1|<=S (S=100), then select the middle one Macroblock E1 serves as a target macroblock.

3.采用不同的搜索方法3. Use a different search method

针对宏块不同的绝对误差和,采用不同的搜索方法,这是因为这样可以避免搜索多余和搜索不足。For different absolute error sums of macroblocks, different search methods are used, because in this way redundant and insufficient searches can be avoided.

1)采用菱形搜索法在绝对误差和较大情况下使用,从而可以快速找到最优点。分三种情况,图3a是x或y方向平移搜索,图3b是斜向平移搜索,图3c向中心搜索,分别如图3所示。1) The diamond search method is used when the absolute error and the sum are large, so that the optimal point can be found quickly. There are three cases, Fig. 3a is a translational search in the x or y direction, Fig. 3b is an oblique translational search, and Fig. 3c is a search towards the center, as shown in Fig. 3 respectively.

2)采用水平垂直搜索方法可以减少搜索点,并且达到较理想的效果。如图4所示:设一起始点,首先在其水平方向上寻找绝对误差和最小的点,再在水平最优点的垂直方向上寻找绝对误差和最小的点,搜索的结果为最终的最优点。因此搜索过程如下:搜索中心为1号点,在其左边与2号点比较,得出1号点的绝对误差和更小,再与1点的右边3号点进行比较,得出1号点绝对误差和最小,因此1号点为水平方向上的最优点,同理,继续在1号点的垂直方向上搜索,最终结果为5号点是最优点。2) The horizontal and vertical search method can reduce the search points and achieve better results. As shown in Figure 4: set a starting point, first find the point with the minimum absolute error sum in the horizontal direction, and then find the point with the minimum absolute error sum in the vertical direction of the horizontal optimal point, and the search result is the final optimal point. Therefore, the search process is as follows: the search center is point 1, compared with point 2 on the left side, the absolute error sum of point 1 is smaller, and then compared with point 3 on the right side of point 1, point 1 is obtained The absolute error sum is the smallest, so point No. 1 is the best point in the horizontal direction. Similarly, continue to search in the vertical direction of point No. 1, and the final result is that point No. 5 is the best point.

4.截止(Half-Stop)准则4. Cutoff (Half-Stop) criterion

当运动估计点的绝对误差和(SAD)<T时,运动估计过程截止,其中T是域值,试验中针对16×16的宏块取定值为400。例如当检测到某个点的绝对误差和(SAD)为300,中止搜索过程,确认为最佳搜索匹配点。When the sum of absolute errors (SAD) of the motion estimation points <T, the motion estimation process is terminated, where T is a threshold value, and the fixed value is 400 for a 16×16 macroblock in the experiment. For example, when it is detected that the sum of absolute errors (SAD) of a certain point is 300, the search process is stopped and it is confirmed as the best search matching point.

5.选择优先级最高的目标宏块5. Select the target macroblock with the highest priority

如果当前有相同最高优先级且离散出现的宏块Ei、Ei+1、…、Ej(记为集合A,且1≤i,j≤M×N、i≤j,其中M×N是一帧总的宏块数,图中取6×6),则根据它们的相邻宏块(左边A、上方B、右上方C,其中i≤p≤j)已知的运动矢量数目的多少进行选择。在判断过程中可能有多种情况,如下所示:If there are currently discrete macroblocks E i , E i+1 , ..., E j with the same highest priority (denoted as set A, and 1≤i, j≤M×N, i≤j, where M×N is the total number of macroblocks in one frame, 6×6 in the figure), then according to the number of known motion vectors of their adjacent macroblocks (left A, upper B, upper right C, where i≤p≤j) How much to choose. There may be many situations in the judgment process, as follows:

1)在这些优先级相同的宏块中,第一种情况希望找到唯一的一个宏块Ep,它的相邻宏块已知的运动矢量最多,此时可以把该宏块Ep直接作为目标宏块;如图5所示:Ep的相邻宏块A、B、C中有3个MV已知,而除Ep外的其它宏块E的相邻宏块已知的MV个数都不超过3个。所以选择Ep为目标宏块。1) Among the macroblocks with the same priority, in the first case, it is hoped to find a unique macroblock E p , whose adjacent macroblocks have the most known motion vectors. At this time, the macroblock E p can be directly used as Target macroblock; as shown in Figure 5: there are 3 MVs known in the adjacent macroblocks A, B, C of E p , and the known MVs of the adjacent macroblocks of other macroblocks E except E p No more than 3. So choose E p as the target macroblock.

2)在这些优先级相同的宏块中,如果上述情况无法满足,即如果有多个离散出现的宏块Em、Em+1、…、En,同时它们的相邻宏块已知的运动矢量数目相同。则在这些宏块Em、Em+1、…、En中如果它们中的某一个宏块的相邻宏块已知MV≠0数目最多,则选择该宏块为目标宏块,如图6所示:Eq的相邻宏块有3个已知的MV且都不等于0,而除Eq外的其它宏块E的相邻宏块的已知MV都存在等于0的情况。所以选择Eq为目标宏块。2) Among the macroblocks with the same priority, if the above conditions cannot be satisfied, that is, if there are multiple discretely occurring macroblocks Em , Em+1 , ..., E n , and their adjacent macroblocks are known The number of motion vectors is the same. Then among these macroblocks E m , Em+1 ,..., E n , if the adjacent macroblocks of a certain macroblock among them are known to have the largest number of MV≠0, then this macroblock is selected as the target macroblock, such as As shown in Figure 6: the adjacent macroblocks of E q have 3 known MVs and none of them are equal to 0, while the known MVs of the adjacent macroblocks of other macroblocks E except E q are all equal to 0 . So choose E q as the target macroblock.

3)如果上述两个方法都无法选择出目标宏块时,则选择比较居中的宏块作为目标宏块。如图7所示:比较当前优先级相同的宏块Et和E,选择比较居中的宏块Et作为目标宏块。这样做的理由是居中的宏块作为其他宏块的预测值出现的概率比较大。3) If neither of the above two methods can select the target macroblock, then select the relatively centered macroblock as the target macroblock. As shown in FIG. 7 : macroblocks E t and E with the same current priority are compared, and the macroblock E t in the middle is selected as the target macroblock. The reason for this is that the centered macroblock has a relatively high probability of appearing as the predicted value of other macroblocks.

本发明已在自主开发的H.264编码器上测试通过,该编码器采用了H.264中如下技术:The present invention has passed the test on the self-developed H.264 encoder, which adopts the following technologies in H.264:

1)参考帧个数:1个;1) Number of reference frames: 1;

2)2)帧类型:I帧、P帧;2) 2) Frame type: I frame, P frame;

3)3)率失真优化(RDO);3) 3) Rate Distortion Optimization (RDO);

4)采用CAVAL熵编码;4) CAVAL entropy coding is adopted;

5)整像素运动估计范围:16;5) Integer pixel motion estimation range: 16;

6)运动估计模式:16×16;6) Motion estimation mode: 16×16;

7)整像素搜索。7) Integer pixel search.

本发明方法的试验结果表明:在E-Sitsang-PXA255硬件的支持下,用foreman,mobile,news等视频系列进行测试,格式为CIF(352×288),结果可达35fps左右。同时获得比较好的信噪比值和码率。The test result of the inventive method shows: under the support of E-Sitsang-PXA255 hardware, test with video series such as foreman, mobile, news, format is CIF (352 * 288), the result can reach about 35fps. At the same time, a relatively good signal-to-noise ratio and code rate are obtained.

Claims (7)

1.一种硬件计算能力资源在运动估计中的优化分配方法,其特征在于:1. A method for optimal allocation of hardware computing power resources in motion estimation, characterized in that: (1)基于宏块的绝对误差和的大小进行优先级划分,根据帧的大小分割成16×16的宏块,然后对当前帧的一个宏块与前一帧对应的宏块进行差值,得到绝对误差和,根据所计算的绝对误差和的大小对宏块进行优先级划分,并且当两个宏块的绝对误差和的差值在100的范围内时,认为这两个宏块的优先级等同,同时规定绝对误差和大的宏块其优先级越高,反之则越低,绝对误差和的计算公式如下:(1) Prioritize based on the absolute error sum of the macroblocks, divide the frame into 16×16 macroblocks according to the size of the frame, and then perform a difference between a macroblock of the current frame and the corresponding macroblock of the previous frame, The absolute error sum is obtained, and the macroblocks are prioritized according to the calculated absolute error sum, and when the difference between the absolute error sums of two macroblocks is within the range of 100, the priority of the two macroblocks is considered At the same time, it is stipulated that the priority of the absolute error sum and the large macroblock is higher, and vice versa. The calculation formula of the absolute error sum is as follows: SADSAD == &Sigma;&Sigma; ii == 00 1515 &Sigma;&Sigma; jj == 00 1515 || ff (( ii ,, jj )) -- gg (( ii ,, jj )) || 其中in SAD是绝对误差和,SAD is the sum of absolute errors, f是当前帧的像素函数,f is the pixel function of the current frame, g为前一帧的像素函数;g is the pixel function of the previous frame; (2)根据优先级的大小对当前优先级最高的宏块E的左边A、上方B、右上方C的相邻宏块进行运动估计,再把所得到的相邻宏块A、B、C的运动矢量MVA、MVB、MVC和MVmedian作为宏块E的候选预测点,最后对当前宏块E进行运动估计,计算当前宏块和其匹配的各参考宏块的误差,选择误差最小的宏块为最佳参考宏块,最后得到当前宏块E的运动矢量;(2) Perform motion estimation on the adjacent macroblocks on the left A, upper B, and upper right C of the current highest priority macroblock E according to the size of the priority, and then obtain the adjacent macroblocks A, B, C The motion vectors MV A , MV B , MV C and MV median are used as the candidate prediction points of the macroblock E, and finally the motion estimation is performed on the current macroblock E, and the errors between the current macroblock and its matching reference macroblocks are calculated, and the selection error The smallest macroblock is the best reference macroblock, and finally the motion vector of the current macroblock E is obtained; (3)如果当前有相同最高优先级的宏块,根据它们各自的相邻宏块左边A、上方B、右上方C已知的MV数目的多少进行选择,如果某宏块E相邻宏块已知的运动矢量数目越多,则把该宏块E作为目标宏块;(3) If there are currently macroblocks with the same highest priority, select according to the number of known MV numbers of their respective adjacent macroblocks on the left A, above B, and above right C. If a certain macroblock E is adjacent to the macroblock The greater the number of known motion vectors, the macroblock E is used as the target macroblock; (4)根据当前计算能力的现况做出是否停止对该帧宏块的运动估计,如果判断为停止,则对剩下没有做运动估计的宏块认为其运动矢量等于0,同时准备对下一帧继续进行运动估计。(4) Make whether to stop the motion estimation of the macroblock of this frame according to the current situation of the current computing power, if it is judged to stop, then consider the motion vector of the remaining macroblocks without motion estimation to be equal to 0, and prepare for the next Motion estimation continues for one frame. 2.根据权利要求1所述的一种硬件计算能力资源在运动估计中的优化分配方法,其特征在于:步骤(2)中在第一次选择最高优先级宏块时,如果当前有相同最高优先级的宏块,则把比较居中的宏块作为目标宏块E。2. A method for optimally allocating hardware computing power resources in motion estimation according to claim 1, characterized in that: when selecting the highest priority macroblock for the first time in step (2), if there is currently the same highest priority macroblock For macroblocks with priority, the macroblock in the center is taken as the target macroblock E. 3.根据权利要求1所述的一种硬件计算能力资源在运动估计中的优化分配方法,其特征在于:步骤(2)中对当前宏块E需要求出其左边A、上方B、右上方C相邻宏块的运动矢量,如果右上方C不在当前帧中,则选择左上方的宏块C’代替右上方宏块C。3. A method for optimally allocating hardware computing power resources in motion estimation according to claim 1, characterized in that: in step (2), current macroblock E needs to find its left A, top B, and top right The motion vector of the adjacent macroblock of C, if the upper right C is not in the current frame, select the upper left macroblock C' to replace the upper right macroblock C. 4.根据权利要求1所述的一种硬件计算能力资源在运动估计中的优化分配方法,其特征在于步骤(2)中对当前宏块E的左边A、上方B、右上方C的相邻宏块求MV时,如果其SAD<事先预设的值,则采用水平垂直搜索方法,否则采用菱形搜索法。4. The optimal allocation method of a kind of hardware computing power resources in motion estimation according to claim 1, characterized in that in the step (2), the neighbors of left A, top B, and top right C of the current macroblock E When calculating the MV of a macroblock, if its SAD<preset value, the horizontal and vertical search method is used; otherwise, the diamond search method is used. 5.根据权利要求1所述的一种硬件计算能力资源在运动估计中的优化分配方法,其特征在于:步骤(2)中对当前宏块E做预测时,候选预测点有(0,0)、MVA、MVB、MVC、Mvmedian5. The optimal allocation method of a kind of hardware computing power resources in motion estimation according to claim 1, characterized in that: when the current macroblock E is predicted in the step (2), the candidate prediction points have (0,0 ), MV A , MV B , MV C , MV median . 6.根据权利要求1所述的一种硬件计算能力资源在运动估计中的优化分配方法,其特征在于:步骤(2)中对当前宏块E做运动估计时,计算当前宏块和其匹配的各参考宏块的绝对误差和,选择绝对误差和最小的宏块为最佳参考宏块,最后得到当前宏块E的运动矢量。6. The optimal allocation method of a kind of hardware computing capacity resource in motion estimation according to claim 1, it is characterized in that: when doing motion estimation to current macroblock E in step (2), calculate current macroblock and its matching The absolute error sum of each reference macroblock, select the macroblock with the smallest absolute error sum as the best reference macroblock, and finally obtain the motion vector of the current macroblock E. 7.根据权利要求1所述的一种硬件计算能力资源在运动估计中的优化分配方法,其特征在于:步骤(3)中如果当前有相同最高优先级的宏块,则根据它们的相邻宏块,左边A、上方B、右上方C,已知的运动矢量数目的多少进行选择,如果某宏块的相邻宏块已知的运动矢量越多,则把该宏块作为目标宏块。7. A method for optimally allocating hardware computing power resources in motion estimation according to claim 1, characterized in that: in step (3), if there are currently macroblocks with the same highest priority, then according to their adjacent Macroblocks, A on the left, B on the top, and C on the right, the number of known motion vectors is selected. If the adjacent macroblocks of a certain macroblock have more known motion vectors, this macroblock will be used as the target macroblock. .
CNB2005100492613A 2005-01-27 2005-01-27 Optimizing distribution method in moving evaluation for hardware computing power resource Expired - Fee Related CN1319384C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100492613A CN1319384C (en) 2005-01-27 2005-01-27 Optimizing distribution method in moving evaluation for hardware computing power resource

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100492613A CN1319384C (en) 2005-01-27 2005-01-27 Optimizing distribution method in moving evaluation for hardware computing power resource

Publications (2)

Publication Number Publication Date
CN1649414A CN1649414A (en) 2005-08-03
CN1319384C true CN1319384C (en) 2007-05-30

Family

ID=34876549

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100492613A Expired - Fee Related CN1319384C (en) 2005-01-27 2005-01-27 Optimizing distribution method in moving evaluation for hardware computing power resource

Country Status (1)

Country Link
CN (1) CN1319384C (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8699562B2 (en) 2008-10-06 2014-04-15 Lg Electronics Inc. Method and an apparatus for processing a video signal with blocks in direct or skip mode
CN102118612B (en) * 2009-12-31 2012-11-14 Tcl集团股份有限公司 Method and system for acquiring memory resource of audio and video hard decoding chip
CN102227132B (en) * 2011-05-25 2017-04-12 深圳市云宙多媒体技术有限公司 Motion vector prediction coding and decoding method, apparatus thereof and coding and decoding system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1117694A (en) * 1993-12-11 1996-02-28 德国汤姆森-勃朗特有限公司 Method of making a hierarchical estimate of the movement in a television signal
JPH11122624A (en) * 1997-10-16 1999-04-30 Matsushita Electric Ind Co Ltd Method and system for reducing video decoder processing amount
CN1440200A (en) * 2003-03-03 2003-09-03 清华大学 Non-uniform multilayer hexaploid lattice full pixel kinematic search method
CN1440204A (en) * 2002-02-21 2003-09-03 三星电子株式会社 Method and device for computing coding dynamic images at fixed complicacy

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1117694A (en) * 1993-12-11 1996-02-28 德国汤姆森-勃朗特有限公司 Method of making a hierarchical estimate of the movement in a television signal
JPH11122624A (en) * 1997-10-16 1999-04-30 Matsushita Electric Ind Co Ltd Method and system for reducing video decoder processing amount
CN1440204A (en) * 2002-02-21 2003-09-03 三星电子株式会社 Method and device for computing coding dynamic images at fixed complicacy
CN1440200A (en) * 2003-03-03 2003-09-03 清华大学 Non-uniform multilayer hexaploid lattice full pixel kinematic search method

Also Published As

Publication number Publication date
CN1649414A (en) 2005-08-03

Similar Documents

Publication Publication Date Title
CN111385569B (en) Coding and decoding method and equipment thereof
CN101860754B (en) Method and device for encoding and decoding motion vectors
RU2381630C2 (en) Method and device for determining block conformity quality
CN108134939B (en) Motion estimation method and device
CN100551073C (en) Decoding method and device, image element interpolation processing method and device
CN101179728B (en) Method and apparatus for determining interframe encoding mode
JP5081305B2 (en) Method and apparatus for interframe predictive coding
US8630351B2 (en) Method and apparatus for encoding and decoding motion vector
CN100468982C (en) Method and apparatus for performing high quality fast predictive motion search
CN103202014B (en) Method and device for obtaining related information of motion vector
CN108419082B (en) Motion estimation method and device
CN113709488B (en) Encoding and decoding method, device and equipment
WO2012020800A1 (en) Video encoding method, video decoding method, video encoding device, video decoding device, and programs for same
CN101304529A (en) Method and device for selecting macroblock mode
Zhao et al. Fast mode decision based on mode adaptation
Zhang et al. Merge mode for deformable block motion information derivation
CN110365988B (en) H.265 coding method and device
US20130128954A1 (en) Encoding method and apparatus
CN101237580A (en) A Fast Hybrid Search Method for Integer Pixels Based on Center Prediction
CN112954365A (en) HEVC interframe motion estimation pixel search improvement method
CN101867818B (en) Selection method and device of macroblock mode
CN1319384C (en) Optimizing distribution method in moving evaluation for hardware computing power resource
CN102547258B (en) Method for searching sub-pixels in interframe codes, motion searching method and module thereof
KR100802207B1 (en) Motion Estimation Method and Motion Estimator for Motion Estimation of Video
CN100568977C (en) Motion Vector Prediction Method in Video Coding

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20070530

Termination date: 20160127

EXPY Termination of patent right or utility model