CN103702127B - Motion estimation search range Forecasting Methodology based on motion vector dependency and system - Google Patents
Motion estimation search range Forecasting Methodology based on motion vector dependency and system Download PDFInfo
- Publication number
- CN103702127B CN103702127B CN201310744084.5A CN201310744084A CN103702127B CN 103702127 B CN103702127 B CN 103702127B CN 201310744084 A CN201310744084 A CN 201310744084A CN 103702127 B CN103702127 B CN 103702127B
- Authority
- CN
- China
- Prior art keywords
- search range
- motion vector
- mvph
- mvpv
- srbasic
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本发明提供了基于运动向量相关性的运动估计搜索范围预测方法和系统,该方法包括步骤:S1、预先设定最大搜索范围SRmax和最小搜索范围SRmin;S2、计算不同模式下预测单元PU的拟合系数;S3、根据当前PU的模式,获取对应的拟合系数;S4、根据当前PU的模式,获取对应的运动向量预测子以及可用的空域和时域相关候选运动向量;S5、计算运动向量预测子和每个可用的空域和时域相关候选运动向量的累加差;S6、根据S2中的拟合系数,S4中的运动向量预测子,S5中的累加差,计算基本搜索范围;S7、根据基本搜索范围、预先设定的最大搜索范围SRmax和最小搜索范围SRmin确定最终搜索范围SRk。该发明能够动态调整搜索范围,从而达到减少计算量和缩短搜索时间的目的。
The present invention provides a motion estimation search range prediction method and system based on motion vector correlation. The method includes steps: S1, presetting the maximum search range SR max and the minimum search range SR min ; S2, calculating the prediction unit PU in different modes S3, according to the mode of the current PU, obtain the corresponding fitting coefficient; S4, according to the mode of the current PU, obtain the corresponding motion vector predictor and available space and time domain related candidate motion vectors; S5, calculate The cumulative difference between the motion vector predictor and each available spatial and temporal correlation candidate motion vector; S6, according to the fitting coefficient in S2, the motion vector predictor in S4, and the cumulative difference in S5, calculate the basic search range; S7. Determine the final search range SR k according to the basic search range, the preset maximum search range SR max and the minimum search range SR min . The invention can dynamically adjust the search range, so as to achieve the purpose of reducing the calculation amount and shortening the search time.
Description
技术领域technical field
本发明涉及视频处理技术领域,尤其涉及基于运动向量相关性的运动估计搜索范围预测方法和系统。The invention relates to the technical field of video processing, in particular to a motion estimation search range prediction method and system based on motion vector correlation.
背景技术Background technique
随着技术的发展,高清晰度、高帧率的视频渐渐成为了人们新的需求。高效率视频编码(HEVC,High Efficiency Video Coding)是由动态图像专家组(MPEG,Moving Pictures Experts Group)和国际电信联盟远程通信标准化组织(ITU-T,ITU-T for ITU TelecommunicationStandardization Sector)的视频编码专家组(VCEG,Video Coding ExpertsGroup)共同组成的视频编码联合组(JCT-VC,Joint Collaborative Teamon Video Coding)联合开发的新一代视频压缩标准。HEVC旨在保证视频画质基本不下降的前提下能够将比特率压缩到上一代视频编码标准H.264/MPEG-4AVC的50%。但是,比特率下降的代价则是编码复杂度的急剧提高。尽管有许多的方法可以用来降低巨大的计算量,但是还有需要许多的工作来进一步加快编码的速率。HEVC采用了编码树单元(CTU,Coding Tree Unit)结构。每个CTU内部可以包含一个或多个编码单元(CU,Coding Unit),而每一个CU都对应着预测单元(PU,Prediction Unit)和变换单元(TU,Transform Unit)。在运动估计(ME,Motion Estimation)时,当前的PU通过需要在已编码的参考帧中搜索最匹配的部分。With the development of technology, high-definition, high-frame-rate video has gradually become a new demand of people. High Efficiency Video Coding (HEVC, High Efficiency Video Coding) is a video coding developed by the Moving Pictures Experts Group (MPEG, Moving Pictures Experts Group) and the International Telecommunications Union Telecommunication Standardization Organization (ITU-T, ITU-T for ITU Telecommunications Standardization Sector). A new-generation video compression standard jointly developed by the Video Coding Joint Group (JCT-VC, Joint Collaborative Team Video Coding) jointly formed by the Expert Group (VCEG, Video Coding Experts Group). HEVC aims to compress the bit rate to 50% of the previous generation video coding standard H.264/MPEG-4AVC without reducing the video quality. However, the cost of bit rate reduction is a sharp increase in encoding complexity. Although there are many methods that can be used to reduce the huge amount of computation, there is still much work to be done to further speed up the encoding. HEVC adopts a coding tree unit (CTU, Coding Tree Unit) structure. Each CTU can contain one or more coding units (CU, Coding Unit), and each CU corresponds to a prediction unit (PU, Prediction Unit) and a transformation unit (TU, Transform Unit). During motion estimation (ME, Motion Estimation), the current PU needs to search for the best matching part in the coded reference frame.
目前,PU优化搜索过程的方式主要是在一个固定的搜索范围内通过搜索获得较好的位置,这种方法存在的问题:At present, the way of PU to optimize the search process is mainly to obtain a better position by searching within a fixed search range. There are problems with this method:
1、没有考虑当前PU本身的运动情况,也就不能根据当前PU的运动情况合理的限制搜索的范围;1. Without considering the motion of the current PU itself, the search range cannot be reasonably limited according to the motion of the current PU;
2、没有考虑当前PU和周围的CU的运动的一致性,也就不能自适应的调整搜索范围;2. Without considering the consistency of motion between the current PU and the surrounding CUs, the search range cannot be adaptively adjusted;
发明内容Contents of the invention
针对现有技术的不足,本发明提供基于模式预处理的帧内编码优化方法和系统,使得在HEVC编码操作过程中能稳定地加快编码速度。Aiming at the deficiencies of the prior art, the present invention provides an intra-frame encoding optimization method and system based on mode preprocessing, so that the encoding speed can be stably accelerated during the HEVC encoding operation.
为实现上述目的,本发明通过以下技术方案予以实现:To achieve the above object, the present invention is achieved through the following technical solutions:
基于运动向量相关性的运动估计搜索范围预测方法,包括以下步骤:A motion estimation search range prediction method based on motion vector correlation, comprising the following steps:
S1、预先设定最大搜索范围SRmax和最小搜索范围SRmin;S1. Presetting the maximum search range SR max and the minimum search range SR min ;
S2、计算不同模式下预测单元PU的拟合系数ahk,avk和bhk,bvk,其中预测单元PU的模式总数为Q,0≤k<Q;S2. Calculate the fitting coefficients ah k , av k and bh k , bv k of the prediction unit PU in different modes, where the total number of modes of the prediction unit PU is Q, 0≤k<Q;
S3、根据当前PU的模式k,获取对应的拟合系数ahk,avk和bhk,bvk;S3. Obtain corresponding fitting coefficients ah k , av k and bh k , bv k according to the mode k of the current PU;
S4、根据当前PU的模式k,获取对应的运动向量预测子(MVPhk,MVPvk)以及可用的空域和时域相关候选运动向量(MVChki,MVCvki),其中,iCountk表示可用的空域和时域相关候选运动向量的总个数,0≤i<iCountk;S4. According to the mode k of the current PU, obtain the corresponding motion vector predictor (MVPh k , MVPv k ) and available spatial and temporal related candidate motion vectors (MVCh ki , MVCv ki ), where iCount k represents the available spatial domain The total number of candidate motion vectors related to the time domain, 0≤i<iCount k ;
S5、计算运动向量预测子(MVPhk,MVPvk)和每个可用的空域和时域相关候选运动向量(MVChki,MVCvki)的累加差(ΔMVThk,ΔMVTvk);S5. Calculate the cumulative difference (ΔMVTh k , ΔMVTv k ) between the motion vector predictor (MVPh k , MVPv k ) and each available spatial and temporal domain related candidate motion vector (MVCh ki , MVCv ki );
S6、根据S2中的拟合系数ahk,avk和bhk,bvk,S4中的运动向量预测子(MVPhk,MVPvk),S5中的累加差(ΔMVThk,ΔMVTvk),计算基本搜索范围SRBasick;S6. According to the fitting coefficients ah k , av k and bh k , bv k in S2, the motion vector predictor (MVPh k , MVPv k ) in S4, and the cumulative difference (ΔMVTh k , ΔMVTv k ) in S5, calculate basic search scope SRBasic k ;
S7、根据S6中的基本搜索范围SRBasick和S1中的最大搜索范围SRmax和最小搜索范围SRmin确定最终搜索范围SRk。S7. Determine the final search range SR k according to the basic search range SRBasic k in S6 and the maximum search range SR max and minimum search range SR min in S1.
进一步地,所述步骤S2包括:Further, the step S2 includes:
S21、确定预测单元PU的所有模式;S21. Determine all modes of the prediction unit PU;
S22、获取测试序列中PUjk的可用的空域和时域运动相关的候选运动向量(MVChijk,MVCvijk),0≤k<Q,j表示第k种模式下的第j个PU,Q为预测单元的总模式数;S22. Obtain the available spatial and temporal motion-related candidate motion vectors (MVCh ijk , MVCv ijk ) of PU jk in the test sequence, where 0≤k<Q, j represents the jth PU in the kth mode, and Q is The total number of modes of the prediction unit;
S23、获取PUjk的运动向量预测子(MVPhjk,MVPvjk)和实际运动向量(MVhjk,MVvjk);S23. Obtain the motion vector predictor (MVPh jk , MVPv jk ) and the actual motion vector (MVh jk , MVv jk ) of the PU jk ;
S24、计算运动向量预测子(MVPhjk,MVPvjk)和每一个可用的空域和时域相关候选运动向量(MVChijk,MVCvijk)的差,取绝对值后求和:S24. Calculate the difference between the motion vector predictor (MVPh jk , MVPv jk ) and each available space-domain and time-domain related candidate motion vector (MVCh ijk , MVCv ijk ), and sum after taking the absolute value:
其中,iCountjk表示可用的空域和时域相关候选运动向量的个数;Among them, iCount jk represents the number of available spatial domain and temporal domain related candidate motion vectors;
S25、计算PUjk实际的运动向量(MVhjk,MVvjk)和运动向量预测子(MVPhjk,MVPvjk)的差,并取绝对值:S25. Calculate the difference between the actual motion vector (MVh jk , MVv jk ) of PU jk and the motion vector predictor (MVPh jk , MVPv jk ), and take the absolute value:
ΔMVhjk=|MVhjk-MVPhjk|ΔMVh jk =|MVh jk -MVPh jk |
ΔMVvjk=|MVvjk-MVPvjk|ΔMVv jk =|MVv jk -MVPv jk |
S26、构造以下两个方程组:S26, construct the following two equations:
ahk×|MVPhjk|+bhk×ΔMVThjk=ΔMVhjk ah k ×|MVPh jk |+bh k ×ΔMVTh jk =ΔMVh jk
avk×|MVPvjk|+bvk×ΔMVTvjk=ΔMVvjk av k ×|MVPv jk |+bv k ×ΔMVTv jk =ΔMVv jk
利用最小二乘拟合算法计算得到ahk,avk和bhk,bvk。Ah k , av k and bh k , bv k are calculated by least squares fitting algorithm.
进一步地,所述步骤S5包括:Further, the step S5 includes:
计算运动向量预测子(MVPhk,MVPvk)和每个可用的空域和时域相关候选运动向量(MVChki,MVCvki)的差,取绝对值后求和:Calculate the difference between the motion vector predictor (MVPh k , MVPv k ) and each available spatially and temporally correlated candidate motion vector (MVCh ki , MVCv ki ), taking the absolute value and summing:
其中,iCountk表示可用的空域和时域相关候选运动向量的个数。Among them, iCount k represents the number of available spatial and temporal correlation candidate motion vectors.
进一步地,所述步骤S6包括:Further, the step S6 includes:
根据S2中的拟合系数ahk,avk和bhk,bvk,S4中的运动向量预测子(MVPhk,MVPvk),S5中的累加差(ΔMVThk,ΔMVTvk),计算基本搜索范围:Based on the fitting coefficients ah k , av k and bh k , bv k in S2, the motion vector predictor (MVPh k , MVPv k ) in S4, and the cumulative difference (ΔMVTh k , ΔMVTv k ) in S5, calculate the basic search scope:
SRhk-basic=|ahk×ΔMVThk+bhk×|MVPhk||SRh k-basic =|ah k ×ΔMVTh k +bh k ×|MVPh k ||
SRvk-basic=|avk×ΔMVTvk+bvk×|MVPvk||。SRv k-basic =|av k ×ΔMVTv k +bv k ×|MVPv k ||.
SRBasick=SRhk-basic+SRvk-basic SRBasic k = SRh k-basic + SRv k-basic
进一步地,所述步骤S7包括:Further, the step S7 includes:
根据基本搜索范围SRBasick和预先设定的最大搜索范围SRmax和最小搜索范围SRmin确定最终搜索范围SRk为:Determine the final search range SR k according to the basic search range SRBasic k and the preset maximum search range SR max and minimum search range SR min as follows:
基于运动向量相关性的运动估计搜索范围预测系统,该系统包括:Motion estimation search range prediction system based on motion vector correlation, the system includes:
预先搜索范围设定模块,用于预先设定最大搜索范围SRmax和最小搜索范围SRmin;The pre-search range setting module is used to pre-set the maximum search range SR max and the minimum search range SR min ;
拟合系数计算模块,用于计算不同模式下预测单元PU的拟合系数ahk,avk和bhk,bvk,其中预测单元PU的模式总数为Q,0≤k<Q;The fitting coefficient calculation module is used to calculate the fitting coefficients ah k , av k and bh k , bv k of the prediction unit PU in different modes, wherein the total number of modes of the prediction unit PU is Q, and 0≤k<Q;
对应模式的拟合系数获取模块,用于根据当前PU的模式k,获取对应的拟合系数ahk,avk和bhk,bvk;The fitting coefficient acquisition module of the corresponding mode is used to obtain the corresponding fitting coefficients ah k , av k and bh k , bv k according to the mode k of the current PU;
对应模式的预测子和相关运动向量获取模块,用于根据当前PU的模式k,获取对应的运动向量预测子(MVPhk,MVPvk)以及可用的空域和时域相关候选运动向量(MVChki,MVCvki),其中,iCountk表示可用的空域和时域相关候选运动向量的总个数,0≤i<iCountk;The predictor and related motion vector acquisition module of the corresponding mode is used to acquire the corresponding motion vector predictor (MVPh k , MVPv k ) and available spatial and temporal related candidate motion vectors (MVCh ki , MVCv ki ), wherein, iCount k represents the total number of available spatial domain and time domain related candidate motion vectors, 0≤i<iCount k ;
相关性计算模块,用于计算运动向量预测子(MVPhk,MVPvk)和每个可用的空域和时域相关候选运动向量(MVChki,MVCvki)的累加差(ΔMVThk,ΔMVTvk);a correlation calculation module for calculating the cumulative difference (ΔMVTh k , ΔMVTv k ) between the motion vector predictor (MVPh k , MVPv k ) and each available spatial and temporal correlation candidate motion vector (MVCh ki , MVCv ki );
基本搜索范围计算模块,用于根据对应模式的拟合系数获取模块中的拟合系数ahk,avk和bhk,bvk,对应模式的预测子和相关运动向量获取模块中的运动向量预测子(MVPhk,MVPvk),相关性计算模块中的累加差(ΔMVThk,ΔMVTvk),计算基本搜索范围SRBasick;The basic search range calculation module is used to obtain the fitting coefficient ah k , av k and bh k , bv k in the module according to the fitting coefficient of the corresponding mode, the predictor of the corresponding mode and the motion vector prediction in the related motion vector acquisition module Sub (MVPh k , MVPv k ), the cumulative difference (ΔMVTh k , ΔMVTv k ) in the correlation calculation module, calculates the basic search range SRBasic k ;
最终搜索范围确定模块,用于根据基本搜索范围计算模块中的基本搜索范围SRBasick和预先搜索范围设定模块中的最大搜索范围SRmax和最小搜索范围SRmin确定最终搜索范围SRk。The final search range determination module is used to determine the final search range SR k according to the basic search range SRBasic k in the basic search range calculation module and the maximum search range SR max and the minimum search range SR min in the pre-search range setting module.
进一步地,所述拟合系数计算模块包括:Further, the fitting coefficient calculation module includes:
PU模式确定单元,用于确定预测单元PU的所有模式;A PU mode determination unit, configured to determine all modes of the prediction unit PU;
相关运动向量获取单元,用于获取测试序列中PUjk的可用的空域和时域运动相关的候选运动向量(MVChijk,MVCvijk),0≤k<Q,j表示第k种模式下的第j个PU,k为当前预测单元的模式;The related motion vector acquisition unit is used to acquire the available space domain and time domain motion related candidate motion vectors (MVCh ijk , MVCv ijk ) of PU jk in the test sequence, 0≤k<Q, and j represents the kth mode in the kth mode j PUs, k is the mode of the current prediction unit;
预测子和实际运动向量获取单元,用于获取PUjk的运动向量预测子(MVPhjk,MVPvjk)和实际运动向量(MVhjk,MVvjk);A predictor and actual motion vector acquisition unit, configured to acquire the motion vector predictor (MVPh jk , MVPv jk ) and actual motion vector (MVh jk , MVv jk ) of the PU jk ;
相关性计算单元,用于计算运动向量预测子(MVPhjk,MVPvjk)和每一个可用的空域和时域相关候选运动向量(MVChijk,MVCvijk)的差,取绝对值后求和:The correlation calculation unit is used to calculate the difference between the motion vector predictor (MVPh jk , MVPv jk ) and each available spatial and temporal correlation candidate motion vector (MVCh ijk , MVCv ijk ), and sum after taking the absolute value:
其中,iCountjk表示可用的空域和时域相关候选运动向量的个数;Among them, iCount jk represents the number of available spatial domain and temporal domain related candidate motion vectors;
差值计算单元,用于计算PUjk实际的运动向量(MVhjk,MVvjk)和运动向量预测子(MVPhjk,MVPvjk)的差,并取绝对值:The difference calculation unit is used to calculate the difference between the actual motion vector (MVh jk , MVv jk ) and the motion vector predictor (MVPh jk , MVPv jk ) of the PU jk , and take the absolute value:
系数拟合单元,用于构造以下两个方程组:The coefficient fitting unit is used to construct the following two equation systems:
ahk×|MVPhjk|+bhk×ΔMVThjk=ΔMVhjk ah k ×|MVPh jk |+bh k ×ΔMVTh jk =ΔMVh jk
avk×|MVPvjk|+bvk×ΔMVTvjk=ΔMVvjk av k ×|MVPv jk |+bv k ×ΔMVTv jk =ΔMVv jk
利用最小二乘拟合算法计算得到ahk,avk和bhk,bvk。Ah k , av k and bh k , bv k are calculated by least squares fitting algorithm.
其中,所述相关性计算模块用于计算运动向量预测子(MVPhk,MVPvk)和每个可用的空域和时域相关候选运动向量(MVChki,MVCvki)的差,取绝对值后求和:Wherein, the correlation calculation module is used to calculate the difference between the motion vector predictor (MVPh k , MVPv k ) and each available spatial and temporal correlation candidate motion vector (MVCh ki , MVCv ki ), and obtain the absolute value and:
其中,iCountk表示可用的空域和时域相关候选运动向量的个数。Among them, iCount k represents the number of available spatial and temporal correlation candidate motion vectors.
进一步地,所述基本搜索范围计算模块用于根据对应模式的拟合系数获取模块中的拟合系数ahk,avk和bhk,bvk,对应模式的预测子和相关运动向量获取模块中的运动向量预测子(MVPhk,MVPvk),相关性计算模块中的累加差(ΔMVThk,ΔMVTvk),计算基本搜索范围SRBasick:Further, the basic search range calculation module is used to acquire the fitting coefficients ah k , av k and bh k , bv k in the fitting coefficient acquisition module of the corresponding mode, and in the predictor and related motion vector acquisition module of the corresponding mode The motion vector predictor (MVPh k , MVPv k ), the cumulative difference (ΔMVTh k , ΔMVTv k ) in the correlation calculation module, calculates the basic search range SRBasic k :
SRhk-basic=|ahk×ΔMVThk+bhk×|MVPhk||SRh k-basic =|ah k ×ΔMVTh k +bh k ×|MVPh k ||
SRvk-basic=|avk×ΔMVTvk+bvk×|MVPvk||。SRv k-basic =|av k ×ΔMVTv k +bv k ×|MVPv k ||.
SRBasick=SRhk-basic+SRvk-basic SRBasic k = SRh k-basic + SRv k-basic
进一步地,所述最终搜索范围确定模块用于根据基本搜索范围SRBasick和预先设定的最大搜索范围SRmax和最小搜索范围SRmin确定最终搜索范围SRk:Further, the final search range determination module is used to determine the final search range SR k according to the basic search range SRBasic k and the preset maximum search range SR max and minimum search range SR min :
本发明具有如下的有益效果:The present invention has following beneficial effect:
本发明通过利用当前PU的运动向量预测子(MVPhk,MVPvk)、可用的空域和时域相关候选运动向量(MVChki,MVCvki)、拟合系数ahk,avk和bhk,bvk动态调整基本搜索范围SRBasick,最后由预先设定的最大搜索范围SRmax、最小搜索范围SRmin和动态调整的基本搜索范围SRBasick共同确定最终的搜索范围SRk。由于本发明利用了空域和时域上相关候选运动向量和当前PU的运动向量预测子联合来预测当前PU的运动估计搜索范围,因此能够根据实际情况实时动态地调整搜索范围,从而减少计算量,同时也减少了搜索时间。The present invention utilizes the motion vector predictor (MVPh k , MVPv k ) of the current PU, the available spatial and temporal correlation candidate motion vectors (MVCh ki , MVCv ki ), fitting coefficients ah k , av k and bh k , bv k dynamically adjusts the basic search range SRBasic k , and finally the final search range SR k is jointly determined by the preset maximum search range SR max , the minimum search range SR min and the dynamically adjusted basic search range SRBasic k . Since the present invention utilizes the joint candidate motion vectors in space and time domains and the motion vector predictor of the current PU to predict the motion estimation search range of the current PU, it can dynamically adjust the search range in real time according to the actual situation, thereby reducing the amount of calculation. It also reduces search time.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are For some embodiments of the present invention, those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1是本发明实施例1中基于运动向量相关性的运动估计搜索范围预测方法的流程图;FIG. 1 is a flowchart of a motion estimation search range prediction method based on motion vector correlation in Embodiment 1 of the present invention;
图2是本发明实施例2中基于运动向量相关性的运动估计搜索范围预测方法的流程图;2 is a flow chart of a motion estimation search range prediction method based on motion vector correlation in Embodiment 2 of the present invention;
图3是本发明实施例2中所述的空域相关的候选运动向量的相对位置示意图;FIG. 3 is a schematic diagram of relative positions of candidate motion vectors related to space domain described in Embodiment 2 of the present invention;
图4是本发明实施例2中所述的时域相关的候选运动向量的相对位置示意图;FIG. 4 is a schematic diagram of relative positions of candidate motion vectors related to time domain described in Embodiment 2 of the present invention;
图5是本发明实施例3中基于运动向量相关性的运动估计搜索范围预测系统的结构示意图。Fig. 5 is a schematic structural diagram of a motion estimation search range prediction system based on motion vector correlation in Embodiment 3 of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
实施例1Example 1
本发明实施例1提出了基于运动向量相关性的运动估计搜索范围预测方法,参见图1,包括如下步骤:Embodiment 1 of the present invention proposes a motion estimation search range prediction method based on motion vector correlation, as shown in FIG. 1 , including the following steps:
步骤101:预先设定最大搜索范围SRmax和最小搜索范围SRmin。Step 101: Preset the maximum search range SR max and the minimum search range SR min .
步骤102:计算不同模式下预测单元PU的拟合系数ahk,avk和bhk,bvk,其中预测单元PU的模式总数为Q,0≤k<Q。Step 102: Calculate the fitting coefficients ah k , av k and bh k , bv k of the prediction unit PU in different modes, where the total number of modes of the prediction unit PU is Q, and 0≤k<Q.
步骤103:根据当前PU的模式k,获取对应的拟合系数ahk,avk和bhk,bvk。Step 103: Obtain the corresponding fitting coefficients ah k , av k and bh k , bv k according to the mode k of the current PU.
步骤104:根据当前PU的模式k,获取对应的运动向量预测子(MVPhk,MVPvk)以及可用的空域和时域相关候选运动向量(MVChki,MVCvki),其中,iCountk表示可用的空域和时域相关候选运动向量的总个数,0≤i<iCountk。Step 104: According to the mode k of the current PU, obtain the corresponding motion vector predictor (MVPh k , MVPv k ) and available spatial and temporal related candidate motion vectors (MVCh ki , MVCv ki ), where iCount k represents the available The total number of candidate motion vectors related to space domain and time domain, 0≤i<iCount k .
步骤105:计算运动向量预测子(MVPhk,MVPvk)和每个可用的空域和时域相关候选运动向量(MVChki,MVCvki)的累加差(ΔMVThk,ΔMVTvk)。Step 105: Calculate the cumulative difference (ΔMVTh k , ΔMVTv k ) of the motion vector predictor (MVPh k , MVPv k ) and each available spatially and temporally correlated candidate motion vector (MVCh ki , MVCv ki ).
步骤106:根据步骤102中的拟合系数ahk,avk和bhk,bvk,步骤104中的运动向量预测子(MVPhk,MVPvk),步骤105中的累加差(ΔMVThk,ΔMVTvk),计算基本搜索范围SRBasick。Step 106: According to the fitting coefficients ah k , av k and bh k , bv k in step 102, the motion vector predictor (MVPh k , MVPv k ) in step 104, the accumulated difference (ΔMVTh k , ΔMVTv k ), calculate the basic search range SRBasic k .
步骤107:根据基本搜索范围SRBasick和预先设定的最大搜索范围SRmax和最小搜索范围SRmin确定最终搜索范围SRk。Step 107: Determine the final search range SR k according to the basic search range SRBasic k and the preset maximum search range SR max and minimum search range SR min .
可见,本发明实施例通过利用当前PU的运动向量预测子(MVPhk,MVPvk)、可用的空域和时域相关候选运动向量(MVChki,MVCvki)、拟合系数ahk,avk和bhk,bvk动态调整基本搜索范围SRBasick,最后由预先设定的最大搜索范围SRmax、最小搜索范围SRmin和动态调整的基本搜索范围SRBasick共同确定最终的搜索范围SRk。综上描述可见,由于本发明实施例利用了空域和时域上相关候选运动向量来预测当前PU的运动估计搜索范围,因此能够根据实际情况实时动态地调整搜索范围,从而达到了减少计算量的目的。It can be seen that the embodiment of the present invention utilizes the motion vector predictor (MVPh k , MVPv k ) of the current PU, the available spatial and temporal correlation candidate motion vectors (MVCh ki , MVCv ki ), fitting coefficients ah k , av k and bh k , bv k dynamically adjust the basic search range SRBasic k , and finally the final search range SR k is jointly determined by the preset maximum search range SR max , the minimum search range SR min and the dynamically adjusted basic search range SRBasic k . From the above description, it can be seen that since the embodiment of the present invention uses the relevant candidate motion vectors in the space domain and the time domain to predict the motion estimation search range of the current PU, the search range can be dynamically adjusted in real time according to the actual situation, thereby achieving the goal of reducing the amount of calculation. Purpose.
实施例2Example 2
下面通过实施例2来更为详细的说明本发明的一个较佳实施例的实现过程。参见图2,该过程包括如下步骤:The implementation process of a preferred embodiment of the present invention will be described in more detail through Embodiment 2 below. Referring to Figure 2, the process includes the following steps:
步骤201:预先设定最大搜索范围SRmax和最小搜索范围SRmin。Step 201: Preset the maximum search range SR max and the minimum search range SR min .
在本步骤中,SRmax的取值可以参考现有技术的固定搜索范围,例如,在没有使用本发明进行优化之前的固定搜索范围设置为64,那么此处的SRmax也设置为64;由于在进行预测时有可能得到的搜索范围很小接近于零,如果直接使用预测的搜索范围,搜索的结果可能不好,此时使用限定一个最小的搜索范围SRmin,可以通过限定的SRmin来适当的增大搜索范围获得一个较稳定的结果。一般SRmin取4是一个比较合适的值。In this step, the value of SR max can refer to the fixed search range of the prior art. For example, if the fixed search range is set to 64 before using the present invention for optimization, then the SR max here is also set to 64; because When making predictions, the search range that may be obtained is very small and close to zero. If the predicted search range is used directly, the search result may not be good. At this time, a minimum search range SR min is used to limit the search range, which can be obtained through the limited SR min Appropriately increase the search range to obtain a more stable result. Generally, taking 4 for SR min is a more appropriate value.
步骤202:确定预测单元PU的所有模式。Step 202: Determine all modes of the prediction unit PU.
在本步骤中,确定所有不同预测单元(PU,Prediction Unit)的模式:参考HM软件,例如,对于64x64的CTU,PU的模式Q=20,分别为:In this step, determine the modes of all different prediction units (PU, Prediction Unit): refer to the HM software, for example, for a 64x64 CTU, the mode Q=20 of the PU is respectively:
4×8,4×16,4×8,8×8,8×16,4×8,4×16,4×8,8×8,8×16,
8×32,12×16,16×4,16×8,16×12,8×32,12×16,16×4,16×8,16×12,
16×16,16×32,24×32,32×8,32×16,16×16,16×32,24×32,32×8,32×16,
32×24,32×32,32×64,64×32,64×64。32×24, 32×32, 32×64, 64×32, 64×64.
由于不同模式的PU所包含的区域的运动情况不同,所以对于不同模式的PU采用不同的拟合系数能够获得比较好的效果。Since the motion conditions of the areas included in the PUs of different modes are different, better results can be obtained by using different fitting coefficients for the PUs of different modes.
步骤203:获取测试序列中PUjk的可用的空域和时域运动相关的候选运动向量(MVChijk,MVCvijk),0≤k<Q,j表示第k种模式下的第j个PU,Q为预测单元的模式总数。Step 203: Obtain the available spatial and temporal motion-related candidate motion vectors (MVCh ijk , MVCv ijk ) of PU jk in the test sequence, where 0≤k<Q, j represents the jth PU in the kth mode, Q is the total number of modes of the prediction unit.
在本步骤中,确定合适的测试序列,获得测试序列中不同模式的PUjk可用的空域和时域运动相关的候选运动向量(MVChijk,MVCvijk),包括当前PUjk空域左边(L)、左下(LD)、上边(U)、右上(RU)以及左上(LU)5个CU的运动向量(如图3所示)以及时域右下(RD)或中心(C)两者中的1个CU的运动向量(如图4所示),其中时域运动向量中右下的优先级高于中心的,并记录空域和时域运动相关的候选运动向量的数目iCountjk,其中j表示第j个PU,0≤k<Q表示第k种模式的PU。在实施过程中,由于PU所处的位置不同,实际可用的候选运动向量的个数iCountjk也不同。可用的候选运动向量获得后依次存放在存储位置的前面,同时会记录最终可用的候选运动向量的个数iCountjk;而不可用的候选运动向量设置为(0,0),存放在存储位置的后面。在计算时由于只是使用前面iCountjk个候选运动向量,没有使用存储在后面的候选运动向量,所以不管实际获得几个运动向量,该方法都能够正确的处理。In this step, an appropriate test sequence is determined, and candidate motion vectors (MVCh ijk , MVCv ijk ) related to the spatial domain and time domain motion available to PU jk in different modes in the test sequence are obtained, including the left side of the current PU jk spatial domain (L), The motion vectors of the lower left (LD), upper (U), upper right (RU) and upper left (LU) CUs (as shown in Figure 3) and 1 of the lower right (RD) or center (C) in the time domain motion vectors of a CU (as shown in Figure 4), where the priority of the lower right in the time domain motion vector is higher than that of the center, and record the number iCount jk of the candidate motion vectors related to the space domain and time domain motion, where j represents the first j PUs, 0≤k<Q means the PU of the kth mode. During the implementation process, due to the different positions of the PU, the number iCount jk of the actually available candidate motion vectors is also different. After the available candidate motion vectors are obtained, they are stored in front of the storage location in sequence, and the number iCount jk of the final available candidate motion vectors will be recorded at the same time; the unusable candidate motion vectors are set to (0,0), and stored in the storage location later. Since only the previous iCount jk candidate motion vectors are used in the calculation, the candidate motion vectors stored in the back are not used, so no matter how many motion vectors are actually obtained, the method can be processed correctly.
步骤204:获取PUjk的运动向量预测子(MVPhjk,MVPvjk)和实际运动向量(MVhjk,MVvjk)。Step 204: Obtain the motion vector predictor (MVPh jk , MVPv jk ) and the actual motion vector (MVh jk , MVv jk ) of the PU jk .
本步骤中,HEVC测试模型HM会以运动向量预测子为中心,在SRmax范围内搜索得到最佳的匹配位置,这个最佳的位置就是实际运动向量。这一步其实是运动估计的过程:在运动估计之前只知道运动向量预测子,通过运动向量预测子得到实际的运动向量,记录下来这两组值即可。In this step, the HEVC test model HM will center on the motion vector predictor and search for the best matching position within the range of SR max . This best position is the actual motion vector. This step is actually the process of motion estimation: before motion estimation, only the motion vector predictor is known, the actual motion vector is obtained through the motion vector predictor, and these two sets of values are recorded.
步骤205:计算运动向量预测子(MVPhjk,MVPvjk)和每一个可用的空域和时域相关候选运动向量(MVChijk,MVCvijk)的累加差。Step 205: Calculate the accumulated difference between the motion vector predictor (MVPh jk , MVPv jk ) and each available spatial and temporal correlation candidate motion vector (MVCh ijk , MVCv ijk ).
在本步骤中,按照下面的方式求解:In this step, solve as follows:
步骤206:计算PUjk实际的运动向量(MVhjk,MVvjk)和运动向量预测子(MVPhjk,MVPvjk)的差,并取绝对值。Step 206: Calculate the difference between the actual motion vector (MVh jk , MVv jk ) of PU jk and the motion vector predictor (MVPh jk , MVPv jk ), and take the absolute value.
在本步骤中,按照下列方式求解:In this step, solve as follows:
ΔMVhjk=|MVhjk-MVPhjk|ΔMVh jk =|MVh jk -MVPh jk |
ΔMVvjk=|MVvjk-MVPvjk|ΔMVv jk =|MVv jk -MVPv jk |
步骤207:构造方程组,利用最小二乘拟合算法得到拟合系数ahk,avk和bhk,bvk。Step 207: Construct a system of equations, and use the least squares fitting algorithm to obtain fitting coefficients ah k , av k and bh k , bv k .
在本步骤中,构造以下两个方程组:In this step, the following two systems of equations are constructed:
ahk×|MVPhjk|+bhk×ΔMVThjk=ΔMVhjk ah k ×|MVPh jk |+bh k ×ΔMVTh jk =ΔMVh jk
avk×|MVPvjk|+bvk×ΔMVTvjk=ΔMVvjk av k ×|MVPv jk |+bv k ×ΔMVTv jk =ΔMVv jk
其中k表示不同的PU模式,j表示所有属于模式k的值,利用最小二乘拟合算法计算得到ahk,avk和bhk,bvk。Where k represents different PU modes, j represents all the values belonging to mode k, ah k , av k and bh k , bv k are calculated by using the least squares fitting algorithm.
步骤208:根据当前PU的模式k,获取对应的运动向量预测子(MVPhk,MVPvk)以及可用的空域和时域相关候选运动向量(MVChki,MVCvki),其中,iCountk表示可用的空域和时域相关候选运动向量的总个数,0≤i<iCountk。Step 208: According to the mode k of the current PU, obtain the corresponding motion vector predictor (MVPh k , MVPv k ) and available spatial and temporal related candidate motion vectors (MVCh ki , MVCv ki ), where iCount k represents the available The total number of candidate motion vectors related to space domain and time domain, 0≤i<iCount k .
在本步骤中,获得当前PU的运动向量预测子(MVPhk,MVPvk)以及可用的空域和时域相关候选运动向量(MVChki,MVCvki),包括当前PU空域左边(L)、左下(LD)、上边(U)、右上(RU)以及左上(LU)5个CU的运动向量(如图3所示)以及时域右下(RD)或中心(C)两者中的1个CU的运动向量(如图4所示),其中时域运动向量中右下的优先级高于中心的,其中i表示所有可用的空域和时域相关候选运动向量中的一个,并记录运动向量的数目iCountk;In this step, the motion vector predictor (MVPh k , MVPv k ) of the current PU and the available spatial and temporal related candidate motion vectors (MVCh ki , MVCv ki ) of the current PU are obtained, including the left (L), lower left ( LD), upper (U), upper right (RU), and upper left (LU) motion vectors of 5 CUs (as shown in Figure 3) and 1 CU in the time domain lower right (RD) or center (C) motion vector (as shown in Figure 4), where the priority of the lower right in the time domain motion vector is higher than that of the center, where i represents one of all available spatial and temporal domain related candidate motion vectors, and records the motion vector number iCount k ;
步骤209:计算运动向量预测子(MVPhk,MVPvk)和每个可用的空域和时域相关候选运动向量(MVChki,MVCvki)的累加差(ΔMVThk,ΔMVTvk)。Step 209: Calculate the cumulative difference (ΔMVTh k , ΔMVTv k ) of the motion vector predictor (MVPh k , MVPv k ) and each available spatially and temporally correlated candidate motion vector (MVCh ki , MVCv ki ).
在本步骤中,按照以下方式求解累加差(ΔMVThk,ΔMVTvk):In this step, the cumulative difference (ΔMVTh k , ΔMVTv k ) is solved as follows:
步骤210:根据步骤207中的拟合系数ahk,avk和bhk,bvk,步骤208中的运动向量预测子(MVPhk,MVPvk),步骤209中的累加差(ΔMVThk,ΔMVTvk),计算基本搜索范围SRBasick。Step 210: According to the fitting coefficients ah k , av k and bh k , bv k in step 207, the motion vector predictor (MVPh k , MVPv k ) in step 208, the cumulative difference (ΔMVTh k , ΔMVTv k ), calculate the basic search range SRBasic k .
在本步骤中,按照以下方式求解基本搜索范围SRBasick:In this step, the basic search range SRBasic k is solved as follows:
SRhk-basic=|ahk×ΔMVThk+bhk×|MVPhk||SRh k-basic =|ah k ×ΔMVTh k +bh k ×|MVPh k ||
SRvk-basic=|avk×ΔMVTvk+bvk×|MVPvk||SRv k-basic =|av k ×ΔMVTv k +bv k ×|MVPv k ||
SRBasick=SRhk-basic+SRvk-basic SRBasic k = SRh k-basic + SRv k-basic
(ΔMVThk,ΔMVTvk)表示了当前PU与空域和时域相关的CU的运动相关性:如果两个值都比较小,说明当前PU运动情况与空域和时域相关的CU的比较一致,搜索范围应该较小;否则,说明它们运动情况不一致,搜索范围应该变大。(MVPhk,MVPvk)表示了当前PU可能的运动情况:两个值比较小,说明当前PU本身的运动比较平缓或是背景无运动,那么搜索范围可以适当的减小;否则,说明当前PU本身的运动比较剧烈,那么搜索范围应该较大。(ΔMVTh k , ΔMVTv k ) represents the motion correlation between the current PU and the CU related to the space domain and the time domain: if both values are relatively small, it means that the motion of the current PU is consistent with that of the CU related to the space domain and the time domain. Search The range should be smaller; otherwise, it means that their motions are not consistent, and the search range should be larger. (MVPh k , MVPv k ) indicates the possible motion of the current PU: the two values are relatively small, indicating that the current PU itself is moving smoothly or there is no motion in the background, then the search range can be appropriately reduced; otherwise, the current PU The movement itself is more intense, so the search range should be larger.
步骤211:根据基本搜索范围SRBasick和预先设定的最大搜索范围SRmax和最小搜索范围SRmin确定最终搜索范围SRk。Step 211: Determine the final search range SR k according to the basic search range SRBasic k and the preset maximum search range SR max and minimum search range SR min .
在本步骤中,按照以下方式进行求解最终搜索范围SRk:In this step, the final search range SR k is solved in the following manner:
通过实时的调整SR的大小,能够有效的减少整数点搜索的时间。测试结果显示,该方法能够减少20%到55%的整数点搜索时间,同时能够保证信号的失真率在0.08dB以下。By adjusting the size of the SR in real time, the time for integer point search can be effectively reduced. Test results show that this method can reduce the search time of integer points by 20% to 55%, and at the same time ensure that the signal distortion rate is below 0.08dB.
本发明实施例通过利用当前PU的运动向量预测子(MVPhk,MVPvk)、可用的空域和时域相关候选运动向量(MVChki,MVCvki)、拟合系数ahk,avk和bhk,bvk动态调整基本搜索范围SRBasick,最后由预先设定的最大搜索范围SRmax、最小搜索范围SRmin和动态调整的基本搜索范围SRBasick共同确定最终的搜索范围SRk。综上描述可见,由于本发明实施例利用了空域和时域上相关候选运动向量来预测当前PU的运动估计搜索范围,因此能够根据实际情况实时动态地调整搜索范围,从而达到了减少计算量和缩短搜索时间的目的。In the embodiment of the present invention, by using the motion vector predictor (MVPh k , MVPv k ) of the current PU, the available spatial and temporal correlation candidate motion vectors (MVCh ki , MVCv ki ), fitting coefficients ah k , av k and bh k ,bv k dynamically adjusts the basic search range SRBasic k , and finally the final search range SR k is jointly determined by the preset maximum search range SR max , the minimum search range SR min and the dynamically adjusted basic search range SRBasic k . From the above description, it can be seen that since the embodiment of the present invention uses the relevant candidate motion vectors in the space domain and the time domain to predict the motion estimation search range of the current PU, the search range can be dynamically adjusted in real time according to the actual situation, thereby reducing the amount of calculation and The purpose of shortening the search time.
实施例3Example 3
本发明实施例3还提出了基于运动向量相关性的运动估计搜索范围预测系统,参见图5,该系统包括:Embodiment 3 of the present invention also proposes a motion estimation search range prediction system based on motion vector correlation, see FIG. 5, the system includes:
搜索范围预先设定模块501,用于预先设定最大搜索范围SRmax和最小搜索范围SRmin;Search range preset module 501, used to preset the maximum search range SR max and the minimum search range SR min ;
拟合系数计算模块502,用于计算不同模式下预测单元PU的拟合系数ahk,avk和bhk,bvk,其中预测单元PU的模式总数为Q,0≤k<Q;The fitting coefficient calculation module 502 is used to calculate the fitting coefficients ah k , av k and bh k , bv k of the prediction unit PU in different modes, wherein the total number of modes of the prediction unit PU is Q, 0≤k<Q;
对应模式的拟合系数获取模块503,用于根据当前PU的模式k,获取对应的拟合系数ahk,avk和bhk,bvk;The fitting coefficient acquisition module 503 of the corresponding mode is used to acquire the corresponding fitting coefficients ah k , av k and bh k , bv k according to the mode k of the current PU;
对应模式的预测子和相关运动向量获取模块504,用于根据当前PU的模式k,获取对应的运动向量预测子(MVPhk,MVPvk)以及可用的空域和时域相关候选运动向量(MVChki,MVCvki),其中,iCountk表示可用的空域和时域相关候选运动向量的总个数,0≤i<iCountk;The predictor and related motion vector acquisition module 504 of the corresponding mode is used to acquire the corresponding motion vector predictor (MVPh k , MVPv k ) and available spatial and temporal related candidate motion vectors (MVCh ki , MVCv ki ), wherein, iCount k represents the total number of available space and time domain related candidate motion vectors, 0≤i<iCount k ;
相关性计算模块505,用于计算运动向量预测子(MVPhk,MVPvk)和每个可用的空域和时域相关候选运动向量(MVChki,MVCvki)的累加差(ΔMVThk,ΔMVTvk);The correlation calculation module 505 is used to calculate the cumulative difference (ΔMVTh k , ΔMVTv k ) between the motion vector predictor (MVPh k , MVPv k ) and each available spatial and temporal correlation candidate motion vector (MVCh ki , MVCv ki ) ;
基本搜索范围计算模块506,用于根据对应模式的拟合系数获取模块中的拟合系数ahk,avk和bhk,bvk,对应模式的预测子和相关运动向量获取模块中的运动向量预测子(MVPhk,MVPvk),相关性计算模块中的累加差(ΔMVThk,ΔMVTvk),计算基本搜索范围SRBasick;The basic search range calculation module 506 is used to obtain the fitting coefficient ah k , av k and bh k , bv k in the module according to the fitting coefficient of the corresponding mode, and obtain the motion vector in the module according to the predictor and the related motion vector of the corresponding mode The predictor (MVPh k , MVPv k ), the cumulative difference (ΔMVTh k , ΔMVTv k ) in the correlation calculation module, calculates the basic search range SRBasic k ;
最终搜索范围确定模块507,用于根据基本搜索范围计算模块中的基本搜索范围SRBasick和预先搜索范围设定模块中的最大搜索范围SRmax和最小搜索范围SRmin确定最终搜索范围SRk。The final search range determination module 507 is used to determine the final search range SR k according to the basic search range SRBasic k in the basic search range calculation module and the maximum search range SR max and the minimum search range SR min in the pre-search range setting module.
其中,所述拟合系数计算模块502包括:Wherein, the fitting coefficient calculation module 502 includes:
PU模式确定单元5020,用于确定预测单元PU的所有模式:The PU mode determination unit 5020 is configured to determine all modes of the prediction unit PU:
在该单元中,参考HM软件,例如,对于64x64的CTU,PU的模式Q=20,分别为:In this unit, refer to the HM software, for example, for a 64x64 CTU, the PU mode Q=20, respectively:
4×8,4×16,4×8,8×8,8×16,4×8,4×16,4×8,8×8,8×16,
8×32,12×16,16×4,16×8,16×12,8×32,12×16,16×4,16×8,16×12,
16×16,16×32,24×32,32×8,32×16,16×16,16×32,24×32,32×8,32×16,
32×24,32×32,32×64,64×32,64×64。32×24, 32×32, 32×64, 64×32, 64×64.
由于不同模式的PU所包含的区域的运动情况不同,所以对于不同模式的PU采用不同的拟合系数能够获得比较好的效果。Since the movement conditions of the areas included in the PUs of different modes are different, better results can be obtained by using different fitting coefficients for the PUs of different modes.
相关运动向量获取单元5021,用于获取测试序列中PUjk的可用的空域和时域运动相关的候选运动向量(MVChijk,MVCvijk),0≤k<Q,j表示第k种模式下的第j个PU,Q为预测单元的总模式数;The related motion vector acquisition unit 5021 is used to acquire the available space domain and time domain motion related candidate motion vectors (MVCh ijk , MVCv ijk ) of PU jk in the test sequence, where 0≤k<Q, and j represents the motion vector in the kth mode For the jth PU, Q is the total number of modes of the prediction unit;
在该单元中,首先确定合适的测试序列,然后获得测试序列中不同模式的PUjk可用的空域和时域运动相关的候选运动向量(MVChijk,MVCvijk),包括当前PUjk空域左边(L)、左下(LD)、上边(U)、右上(RU)以及左上(LU)5个CU的运动向量(如图3所示)以及时域右下(RD)或中心(C)两者中的1个CU的运动向量(如图4所示),其中时域运动向量中右下的优先级高于中心的,并记录空域和时域运动相关的候选运动向量的数目iCountjk,其中j表示第j个PU,0≤k<Q表示第k种模式的PU。在实施过程中,由于PU所处的位置不同,实际可用的候选运动向量的个数iCountjk也不同。可用的候选运动向量获得后依次存放在存储位置的前面,同时会记录最终可用的候选运动向量的个数iCountjk;而不可用的候选运动向量设置为(0,0),存放在存储位置的后面。在计算时由于只是使用前面iCountjk个候选运动向量,没有使用存储在后面的候选运动向量,所以不管实际获得几个运动向量,该方法都能够正确的处理。In this unit, first determine the appropriate test sequence, and then obtain the candidate motion vectors (MVCh ijk , MVCv ijk ) related to the spatial and temporal motions available to PU jk of different modes in the test sequence, including the left side of the current PU jk spatial domain (L ), lower left (LD), upper (U), upper right (RU) and upper left (LU) 5 CU motion vectors (as shown in Figure 3) and time domain lower right (RD) or center (C) in both The motion vector of 1 CU (as shown in Figure 4), where the priority of the lower right in the time domain motion vector is higher than that of the center, and record the number of candidate motion vectors iCount jk related to spatial and temporal motion, where j Indicates the jth PU, and 0≤k<Q indicates the kth mode of the PU. During the implementation process, due to the different positions of the PU, the number iCount jk of the actually available candidate motion vectors is also different. After the available candidate motion vectors are obtained, they are stored in front of the storage location in sequence, and the number iCount jk of the final available candidate motion vectors will be recorded at the same time; the unusable candidate motion vectors are set to (0,0), and stored in the storage location later. Since only the previous iCount jk candidate motion vectors are used in the calculation, the candidate motion vectors stored in the back are not used, so no matter how many motion vectors are actually obtained, the method can be processed correctly.
预测子和实际运动向量获取单元5022,用于获取PUjk的运动向量预测子(MVPhjk,MVPvjk)和实际运动向量(MVhjk,MVvjk);A predictor and actual motion vector acquisition unit 5022, configured to acquire the motion vector predictor (MVPh jk , MVPv jk ) and actual motion vector (MVh jk , MVv jk ) of the PU jk ;
相关性计算单元5023,用于计算运动向量预测子(MVPhjk,MVPvjk)和每一个可用的空域和时域相关候选运动向量(MVChijk,MVCvijk)的差,取绝对值后求和:The correlation calculation unit 5023 is used to calculate the difference between the motion vector predictor (MVPh jk , MVPv jk ) and each available space-domain and time-domain correlation candidate motion vector (MVCh ijk , MVCv ijk ), and sum after taking the absolute value:
其中,iCountjk表示可用的空域和时域相关候选运动向量的个数;Among them, iCount jk represents the number of available spatial domain and temporal domain related candidate motion vectors;
差值计算单元5024,用于计算PUjk实际的运动向量(MVhjk,MVvjk)和运动向量预测子(MVPhjk,MVPvjk)的差,并取绝对值:The difference calculation unit 5024 is used to calculate the difference between the actual motion vector (MVh jk , MVv jk ) of PU jk and the motion vector predictor (MVPh jk , MVPv jk ), and take the absolute value:
系数拟合单元5025,用于构造以下两个方程组:The coefficient fitting unit 5025 is used to construct the following two equations:
ahk×|MVPhjk|+bhk×ΔMVThjk=ΔMVhjk ah k ×|MVPh jk |+bh k ×ΔMVTh jk =ΔMVh jk
avk×|MVPvjk|+bvk×ΔMVTvjk=ΔMVvjk av k ×|MVPv jk |+bv k ×ΔMVTv jk =ΔMVv jk
利用最小二乘拟合算法计算得到ahk,avk和bhk,bvk。Ah k , av k and bh k , bv k are calculated by least squares fitting algorithm.
其中,所述相关性计算模块505用于计算运动向量预测子(MVPhk,MVPvk)和每个可用的空域和时域相关候选运动向量(MVChki,MVCvki)的差,取绝对值后求和:Wherein, the correlation calculation module 505 is used to calculate the difference between the motion vector predictor (MVPh k , MVPv k ) and each available spatial and temporal correlation candidate motion vector (MVCh ki , MVCv ki ), after taking the absolute value Summing:
其中,iCountk表示可用的空域和时域相关候选运动向量的个数。Among them, iCount k represents the number of available spatial and temporal correlation candidate motion vectors.
其中,所述基本搜索范围计算模块506用于根据对应模式的拟合系数获取模块中的拟合系数ahk,avk和bhk,bvk,对应模式的预测子和相关运动向量获取模块中的运动向量预测子(MVPhk,MVPvk),相关性计算模块中的累加差(ΔMVThk,ΔMVTvk),计算基本搜索范围SRBasick:Wherein, the basic search range calculation module 506 is used in the predictor and related motion vector acquisition module of the corresponding mode according to the fitting coefficient ah k , av k and bh k , bv k in the fitting coefficient acquisition module of the corresponding mode The motion vector predictor (MVPh k , MVPv k ), the cumulative difference (ΔMVTh k , ΔMVTv k ) in the correlation calculation module, calculates the basic search range SRBasic k :
SRhk-basic=|ahk×ΔMVThk+bhk×|MVPhk||SRh k-basic =|ah k ×ΔMVTh k +bh k ×|MVPh k ||
SRvk-basic=|avk×ΔMVTvk+bvk×|MVPvk||。SRv k-basic =|av k ×ΔMVTv k +bv k ×|MVPv k ||.
SRBasick=SRhk-basic+SRvk-basic SRBasic k = SRh k-basic + SRv k-basic
其中,所述最终搜索范围确定模块507用于根据基本搜索范围SRBasick和预先设定的最大搜索范围SRmax和最小搜索范围SRmin确定最终搜索范围SRk:Wherein, the final search range determination module 507 is used to determine the final search range SR k according to the basic search range SRBasic k and the preset maximum search range SR max and minimum search range SR min :
本发明实施例所述的系统,利用当前PU的运动向量预测子(MVPhk,MVPvk)、可用的空域和时域相关候选运动向量(MVChki,MVCvki)、拟合系数ahk,avk和bhk,bvk动态调整基本搜索范围SRBasick,最后由预先设定的最大搜索范围SRmax、最小搜索范围SRmin和动态调整的基本搜索范围SRBasick共同确定最终的搜索范围SRk。综上描述可见,由于利用了空域和时域上相关候选运动向量来预测当前PU的运动估计搜索范围,因此能够根据实际情况实时动态地调整搜索范围,从而减少计算量,同时也意味着减少了搜索时间。The system described in the embodiment of the present invention uses the motion vector predictor (MVPh k , MVPv k ) of the current PU, the available spatial and temporal correlation candidate motion vectors (MVCh ki , MVCv ki ), fitting coefficients ah k , av k and bh k , bv k dynamically adjust the basic search range SRBasic k , and finally the final search range SR k is jointly determined by the preset maximum search range SR max , the minimum search range SR min and the dynamically adjusted basic search range SRBasic k . From the above description, it can be seen that since the motion estimation search range of the current PU is predicted by using the relevant candidate motion vectors in the space domain and the time domain, the search range can be dynamically adjusted in real time according to the actual situation, thereby reducing the amount of calculation, and also means reducing Search time.
以上实施例仅用于说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be described in the foregoing embodiments Modifications are made to the recorded technical solutions, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310744084.5A CN103702127B (en) | 2013-12-30 | 2013-12-30 | Motion estimation search range Forecasting Methodology based on motion vector dependency and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310744084.5A CN103702127B (en) | 2013-12-30 | 2013-12-30 | Motion estimation search range Forecasting Methodology based on motion vector dependency and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103702127A CN103702127A (en) | 2014-04-02 |
CN103702127B true CN103702127B (en) | 2016-10-12 |
Family
ID=50363512
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310744084.5A Active CN103702127B (en) | 2013-12-30 | 2013-12-30 | Motion estimation search range Forecasting Methodology based on motion vector dependency and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103702127B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107087171B (en) * | 2017-05-26 | 2020-02-07 | 中国科学技术大学 | HEVC integer pixel motion estimation method and device |
CN111385583B (en) * | 2018-12-28 | 2022-04-22 | 展讯通信(上海)有限公司 | Image motion estimation method, device and computer readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101001377A (en) * | 2007-01-09 | 2007-07-18 | 浙江大学 | Method of H.264 quick motion estimation based on multi-reference frame |
CN101102493A (en) * | 2007-08-07 | 2008-01-09 | 华亚微电子(上海)有限公司 | A method for chip storage applicable motion estimation |
CN103024392A (en) * | 2012-12-26 | 2013-04-03 | 清华大学 | Method and device for intra-frame mode prediction based on two-dimensional Hadamard transformation |
EP2597874A1 (en) * | 2010-07-20 | 2013-05-29 | Ntt Docomo, Inc. | Image prediction encoding device, image prediction encoding method, image prediction encoding program, image prediction decoding device, image prediction decoding method, and image prediction decoding program |
-
2013
- 2013-12-30 CN CN201310744084.5A patent/CN103702127B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101001377A (en) * | 2007-01-09 | 2007-07-18 | 浙江大学 | Method of H.264 quick motion estimation based on multi-reference frame |
CN101102493A (en) * | 2007-08-07 | 2008-01-09 | 华亚微电子(上海)有限公司 | A method for chip storage applicable motion estimation |
EP2597874A1 (en) * | 2010-07-20 | 2013-05-29 | Ntt Docomo, Inc. | Image prediction encoding device, image prediction encoding method, image prediction encoding program, image prediction decoding device, image prediction decoding method, and image prediction decoding program |
CN103024392A (en) * | 2012-12-26 | 2013-04-03 | 清华大学 | Method and device for intra-frame mode prediction based on two-dimensional Hadamard transformation |
Non-Patent Citations (2)
Title |
---|
Motion Feature and Hadamard Coefficient-Based Fast Multiple Reference Frame Motion Estimation for H.264;Zhenyu Liu等;《IEEE Transactions on Circuits and Systems for Video Technology》;20080531;第18卷(第5期);620-632 * |
一种快速HEVC帧内预测算法;成益龙等;《电视技术》;20121102;第36卷(第21期);4-7 * |
Also Published As
Publication number | Publication date |
---|---|
CN103702127A (en) | 2014-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101553850B1 (en) | / Video encoding/decoding apparatus and method and apparatus of adaptive overlapped block motion compensation using adaptive weights | |
CN102137263B (en) | Distributed video coding and decoding methods based on classification of key frames of correlation noise model (CNM) | |
CN101860748B (en) | System and method for generating side information based on distributed video coding | |
CN107396102B (en) | A kind of inter-frame mode fast selecting method and device based on Merge technological movement vector | |
CN104769947B (en) | A Multi-hypothesis Motion Compensation Coding Method Based on P Frames | |
CN103327325B (en) | The quick self-adapted system of selection of intra prediction mode based on HEVC standard | |
CN103248895B (en) | A kind of quick mode method of estimation for HEVC intraframe coding | |
CN105959699A (en) | Fast inter-frame prediction method based on motion estimation and temporal-spatial correlation | |
CN110062239B (en) | A reference frame selection method and device for video coding | |
CN107105278A (en) | The coding and decoding video framework that motion vector is automatically generated | |
CN104488271A (en) | P frame-based multi-hypothesis motion compensation method | |
CN102045571B (en) | Fast iterative search algorithm for stereo video coding | |
CN102752588B (en) | Video encoding and decoding method using space zoom prediction | |
CN107071421B (en) | A Video Coding Method Combined with Video Stabilization | |
CN109688411B (en) | A method and apparatus for estimating rate-distortion cost of video coding | |
CN101600109A (en) | H.264 Downsizing Transcoding Method Based on Texture and Motion Features | |
CN101299818B (en) | N-level sub-pixel search method based on integer pixel search results | |
CN102186081B (en) | H.264 intra-frame mode selection method based on gradient vector | |
CN102256133A (en) | Distributed video coding and decoding method based on side information refining | |
CN101304529A (en) | Method and device for selecting macroblock mode | |
CN107222742B (en) | Method and device for fast selection of Merge mode in video coding based on spatiotemporal correlation | |
CN110177282A (en) | A kind of inter-frame prediction method based on SRCNN | |
CN104811729A (en) | Multi-reference-frame encoding method for videos | |
CN102595132A (en) | Distributed video encoding and decoding method applied to wireless sensor network | |
CN103702127B (en) | Motion estimation search range Forecasting Methodology based on motion vector dependency and system |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220726 Address after: 100084 Tsinghua University, Beijing, Haidian District Patentee after: TSINGHUA University Patentee after: Huawei Cloud Computing Technologies Co.,Ltd. Address before: 100084 mailbox, 100084-82 Tsinghua Yuan, Beijing, Haidian District, Beijing Patentee before: TSINGHUA University Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd. |