[go: up one dir, main page]

CN106454349B - A Motion Estimation Block Matching Method Based on H.265 Video Coding - Google Patents

A Motion Estimation Block Matching Method Based on H.265 Video Coding Download PDF

Info

Publication number
CN106454349B
CN106454349B CN201610907809.1A CN201610907809A CN106454349B CN 106454349 B CN106454349 B CN 106454349B CN 201610907809 A CN201610907809 A CN 201610907809A CN 106454349 B CN106454349 B CN 106454349B
Authority
CN
China
Prior art keywords
matching
prediction unit
block
pixel
motion estimation
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
Application number
CN201610907809.1A
Other languages
Chinese (zh)
Other versions
CN106454349A (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.)
Harbin Institute of Technology Shenzhen
Original Assignee
Harbin Institute of Technology Shenzhen
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 Harbin Institute of Technology Shenzhen filed Critical Harbin Institute of Technology Shenzhen
Priority to CN201610907809.1A priority Critical patent/CN106454349B/en
Publication of CN106454349A publication Critical patent/CN106454349A/en
Application granted granted Critical
Publication of CN106454349B publication Critical patent/CN106454349B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/567Motion estimation based on rate distortion criteria

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

A kind of estimation block matching method based on H.265 Video coding, the present invention relates to estimation block matching methods.The purpose of the invention is to reduce the computation complexity of the estimation in H.265 video standard cataloged procedure and reduce the scramble time.A kind of estimation block matching method detailed process based on H.265 Video coding are as follows: Step 1: the primary election stage: according to the division feature of inter prediction unit, select corresponding down-sampling scheme, according to the threshold value of setting, candidate matches group is selected from all match blocks;Step 2: the selected stage: carrying out selecting final match block based on the selected of rate-distortion optimization criterion to the candidate matches group that the primary election stage obtains, complete the process of the Block- matching in estimation.The present invention is used for the estimation Block- matching field of Video coding.

Description

一种基于H.265视频编码的运动估计块匹配方法A Motion Estimation Block Matching Method Based on H.265 Video Coding

技术领域technical field

本发明涉及运动估计块匹配方法。The present invention relates to a motion estimation block matching method.

背景技术Background technique

近年来,随着智能移动终端的普及使得视频应用越来越多样化,视频数据量增长的速度惊人。高清图像数据量巨大,为了满足新型视频应用的需求,ITU-T与ISO/IEC合作,于2013年发布了新一代的高效视频编码标准H.265。H.265采用传统的混合视频编码框架,对该框架的各个模块进行了技术创新,包括支持更多的帧内与帧间预测模式,变换量化相互结合,样点自适应补偿,CABAC熵编码等。这些新技术使得H.265在同样编码质量下比H.264/AVC节约50%左右的码率。H.265在提高压缩率的同时带来了极大的计算复杂度,带来了解码和编码时间的增加,成为了制约H.265广泛应用的瓶颈。In recent years, with the popularization of smart mobile terminals, video applications have become more and more diverse, and the amount of video data has grown at an alarming rate. The amount of high-definition image data is huge. In order to meet the needs of new video applications, ITU-T cooperated with ISO/IEC and released a new generation of high-efficiency video coding standard H.265 in 2013. H.265 adopts the traditional hybrid video coding framework, and makes technical innovations in each module of the framework, including support for more intra-frame and inter-frame prediction modes, combination of transform and quantization, sample adaptive compensation, CABAC entropy coding, etc. . These new technologies enable H.265 to save about 50% of the code rate compared to H.264/AVC under the same encoding quality. While improving the compression rate, H.265 brings great computational complexity and increases decoding and encoding time, which has become a bottleneck restricting the wide application of H.265.

运动估计是视频压缩编码中的核心技术之一,采用运动估计和运动补偿技术可以消除视频信号的时间冗余,从而提高编码效率。然而运动估计也是H.265视频编码标准中最复杂最耗时的部分之一。Motion estimation is one of the core technologies in video compression coding. The use of motion estimation and motion compensation techniques can eliminate the temporal redundancy of video signals, thereby improving coding efficiency. However, motion estimation is also one of the most complex and time-consuming parts of the H.265 video coding standard.

发明内容SUMMARY OF THE INVENTION

本发明的目的是为了降低H.265视频标准编码过程中的运动估计的计算复杂度和减少编码时间,而提出一种基于H.265视频编码的运动估计块匹配方法。The purpose of the present invention is to propose a motion estimation block matching method based on H.265 video coding in order to reduce the computational complexity and coding time of motion estimation in the H.265 video standard coding process.

一种基于H.265视频编码的运动估计块匹配方法具体过程为:The specific process of a motion estimation block matching method based on H.265 video coding is as follows:

步骤一、初选阶段:根据帧间预测单元的划分特点,选择对应的下采样方案,根据设定的阈值,从所有匹配块中选择出候选匹配组;Step 1, the primary selection stage: according to the division characteristics of the inter-frame prediction unit, select the corresponding downsampling scheme, and select the candidate matching group from all the matching blocks according to the set threshold;

步骤二、精选阶段:对初选阶段得到的候选匹配组进行基于率失真优化准则的精选,选出最终的匹配块,完成运动估计中的块匹配的过程。Step 2: Selection stage: select the candidate matching groups obtained in the primary selection stage based on rate-distortion optimization criteria, select the final matching block, and complete the process of block matching in motion estimation.

本发明的有益效果为:The beneficial effects of the present invention are:

本发明提供了一种H.265中运动估计快速块匹配的算法设计结构。根据运动估计基本原理,在块匹配过程提出一种优化的加速算法。该算法的设计以兼顾码率的同时,加速运动估计运算为宗旨,减少块匹配的计算复杂度,进而提升编码速度。在对运动估计和块匹配算法进行研究分析后,论证了算法的可行性与实用性,提出了分步选择模式的优化算法,通过初选和精选两个步骤搜索匹配块,减少匹配的像素点数,从而达到加快编码速度的目的。The invention provides an algorithm design structure for fast block matching of motion estimation in H.265. According to the basic principle of motion estimation, an optimized acceleration algorithm is proposed in the block matching process. The design of the algorithm aims to accelerate the motion estimation operation while taking into account the code rate, reduce the computational complexity of block matching, and thus improve the coding speed. After researching and analyzing the motion estimation and block matching algorithms, the feasibility and practicability of the algorithm are demonstrated, and an optimization algorithm for the step-by-step selection mode is proposed. The matching blocks are searched through the two steps of primary selection and selection, and the matching pixels are reduced. points, so as to achieve the purpose of speeding up the encoding speed.

在测试序列中,编码时间缩短10.70%到17.94%,比特率增加了0.26%到2.67%,PSNR下降不超过0.1。In the test sequence, the encoding time is shortened by 10.70% to 17.94%, the bit rate is increased by 0.26% to 2.67%, and the PSNR does not drop by more than 0.1.

H.265帧间预测的运动估计是以预测单元进行的,不同的预测单元具有不同的特性。整个过程所需遍历的预测单元以及像素点数过多,导致运行时间过长,这对于高清视频的快速编解码要求是相当不利的,故采取优化方案加速运动估计的运算。在进行块匹配时,将匹配过程分为两步进行。在初选阶段,根据预测单元的划分大小与形状,从算法中选择不同的下采样模式,充分考虑了H.265中块划分的特性。计算当前帧和参考帧下采样模板上的像素点的差值取绝对值,累加计算的绝对值得到一个预测块的误差值。设定自适应阈值,比较误差值与自适应阈值的大小。若误差值小于阈值,则标记为候选匹配块,否则记为非候选匹配块。初选过程有效地避免了计算预测单元中所有的像素点。The motion estimation of H.265 inter-frame prediction is performed by prediction units, and different prediction units have different characteristics. The whole process needs to traverse too many prediction units and pixels, resulting in a long running time, which is quite unfavorable for the fast encoding and decoding requirements of high-definition video, so an optimization scheme is adopted to speed up the operation of motion estimation. When performing block matching, the matching process is divided into two steps. In the primary selection stage, different downsampling modes are selected from the algorithm according to the division size and shape of the prediction unit, fully considering the characteristics of block division in H.265. Calculate the difference between the pixel points on the down-sampling template of the current frame and the reference frame to take an absolute value, and accumulate the calculated absolute value to obtain an error value of a prediction block. Set the adaptive threshold and compare the error value with the adaptive threshold. If the error value is less than the threshold, it is marked as a candidate matching block, otherwise it is marked as a non-candidate matching block. The primary selection process effectively avoids computing all the pixels in the prediction unit.

在精选阶段,通过初选得到了具有匹配可能性较大的匹配组,对匹配组中的候选块再进行基于率失真优化准则的精选,选出最终的匹配块。其过程需对预测单元中的所有像素点进行计算,保证了运动估计的预测精度。初选与精选结合的匹配块搜索方法,在初选阶段减少了块匹配的大量计算,提高了运动估计中块匹配的计算速度。同时,精选阶段保证了预测块的匹配精度,避免落入局部最优点。In the selection stage, a matching group with a high matching possibility is obtained through the primary selection, and the candidate blocks in the matching group are selected based on the rate-distortion optimization criterion, and the final matching block is selected. The process needs to calculate all the pixels in the prediction unit, which ensures the prediction accuracy of motion estimation. The matching block search method, which combines primary selection and selection, reduces a large amount of calculation of block matching in the primary selection stage, and improves the calculation speed of block matching in motion estimation. At the same time, the selection stage ensures the matching accuracy of the predicted blocks and avoids falling into the local optimum.

1、可以有效地减少编码过程中运动估计的运算时间,进而减少编码时间;1. It can effectively reduce the operation time of motion estimation in the encoding process, thereby reducing the encoding time;

2、采用的算法中不含复杂特殊的运算,有利于进行硬件实现;2. The algorithm used does not contain complex and special operations, which is conducive to hardware implementation;

3、对于视频会议等类型的视频,该算法对图像质量和传输码率的影响很小。3. For video conferencing and other types of videos, the algorithm has little effect on image quality and transmission bit rate.

附图说明Description of drawings

图1为H.265运动估计块匹配初选的示意图;FIG. 1 is a schematic diagram of H.265 motion estimation block matching primary selection;

图2a为H.265帧间预测单元的M×M划分模式图;Fig. 2a is the M×M partition pattern diagram of the H.265 inter-frame prediction unit;

图2b为H.265帧间预测单元的M/2×M划分模式图;Figure 2b is an M/2×M partition mode diagram of an H.265 inter-frame prediction unit;

图2c为H.265帧间预测单元的M×M/2划分模式图;Figure 2c is an M×M/2 division pattern diagram of an H.265 inter-frame prediction unit;

图2d为H.265帧间预测单元的M/2×M/2划分模式图;FIG. 2d is an M/2×M/2 partition mode diagram of an H.265 inter-frame prediction unit;

图2e为H.265帧间预测单元的M/4×M(L)划分模式图,L为左;Fig. 2e is the M/4×M(L) division mode diagram of the H.265 inter-frame prediction unit, and L is the left;

图2f为H.265帧间预测单元的M/4×M(R)划分模式图,R为右;Figure 2f is the M/4×M(R) division pattern diagram of the H.265 inter-frame prediction unit, where R is the right;

图2g为H.265帧间预测单元的M×M/4(U)划分模式图,U为上;Figure 2g is an M×M/4(U) division pattern diagram of an H.265 inter-frame prediction unit, where U is the top;

图2h为H.265帧间预测单元的M×M/4(D)划分模式图,D为下;Figure 2h is the M×M/4(D) division pattern diagram of the H.265 inter-frame prediction unit, and D is the bottom;

图3为正方形预测块的下采样模板图;Fig. 3 is the down-sampling template diagram of square prediction block;

图4为长方形预测块的下采样模板图;Fig. 4 is a down-sampling template diagram of a rectangular prediction block;

图5为32x32和64x64块的下采样模板图;Figure 5 is a downsampling template diagram of 32x32 and 64x64 blocks;

图6为下采样模板选择流程图;Fig. 6 is a flow chart of downsampling template selection;

图7为块匹配自适应算法示意图;7 is a schematic diagram of a block matching adaptive algorithm;

图8为提前截止算法流程图;Figure 8 is a flowchart of an early cutoff algorithm;

图9为运动估计块匹配模块流程图。FIG. 9 is a flowchart of the motion estimation block matching module.

具体实施方式Detailed ways

具体实施方式一:结合图9说明本实施方式,本实施方式的一种基于H.265视频编码的运动估计块匹配方法具体过程为:Embodiment 1: This embodiment is described with reference to FIG. 9 . The specific process of a motion estimation block matching method based on H.265 video coding in this embodiment is as follows:

如图1所示,为初选的示意图。As shown in Figure 1, it is a schematic diagram of the primary selection.

步骤一、初选阶段:根据帧间预测单元的划分特点,选择对应的下采样方案,根据设定的自适应阈值,从所有匹配块中选择出候选匹配组;Step 1, the primary selection stage: according to the division characteristics of the inter-frame prediction unit, select the corresponding downsampling scheme, and select the candidate matching group from all matching blocks according to the set adaptive threshold;

步骤二、精选阶段:对初选阶段得到的候选匹配组进行基于率失真优化准则的精选,选出最终的匹配块,完成运动估计中的块匹配的过程。Step 2: Selection stage: select the candidate matching groups obtained in the primary selection stage based on rate-distortion optimization criteria, select the final matching block, and complete the process of block matching in motion estimation.

第一步通过初选可以有效地减少匹配的像素点数,选择合适的匹配块,图中为斜线方块,减少进行精选的块的个数,从而达到加快编码速度的目的;另一方面,第二步精选可以精确地得到匹配的最优块,尽可能保证了编码效率。In the first step, the number of matching pixels can be effectively reduced through the primary selection, and the appropriate matching blocks can be selected. The second step of selection can accurately obtain the optimal block that matches, and ensure the coding efficiency as much as possible.

具体实施方式二:本实施方式与具体实施方式一不同的是:所述步骤一中初选阶段:根据帧间预测单元的划分特点,选择对应的下采样方案,根据设定的阈值,从所有匹配块中选择出候选匹配组;具体过程为:Embodiment 2: The difference between this embodiment and Embodiment 1 is that: in the first step of the preliminary selection stage: according to the division characteristics of the inter-frame prediction unit, the corresponding downsampling scheme is selected, and according to the set threshold, all A candidate matching group is selected from the matching block; the specific process is:

步骤一一、帧间预测单元的划分模式如图2a、2b、2c、2d、2e、2f、2g、2h所示,在编码标准中存在八种预测单元划分,其中形状分为正方形和长方形;Step 11. The division mode of the inter-frame prediction unit is shown in Figures 2a, 2b, 2c, 2d, 2e, 2f, 2g, and 2h. There are eight kinds of prediction unit divisions in the coding standard, and the shapes are divided into squares and rectangles;

不同形状预测块的下采样模板如图3、图4所示,对于正方形的预测单元,判断正方形是否是32x32和64x64的预测单元,下采样如图5所示,如果是,采用米字形的下采样方案;如果否,采用对角线的下采样方案;The downsampling templates of prediction blocks with different shapes are shown in Figure 3 and Figure 4. For a square prediction unit, it is determined whether the square is a 32x32 or 64x64 prediction unit, and the downsampling is shown in Figure 5. Sampling scheme; if not, adopt diagonal downsampling scheme;

对于长方形的预测单元,采用十字形的下采样方案;For rectangular prediction units, a cross-shaped downsampling scheme is used;

步骤一二、其中下采样模板的选择流程如图6所示,从中选择合适的模板。计算预测单元中前一帧(t时刻)与当前帧(t+1时刻)单个像素差值的绝对值SAD_c;Steps 1 and 2: The selection process of the down-sampling template is shown in FIG. 6 , and an appropriate template is selected therefrom. Calculate the absolute value SAD_c of the single pixel difference between the previous frame (time t) and the current frame (time t+1) in the prediction unit;

将得到的每个SAD_c进行累加,与Pixel_th进行比较;若小于或者等于Pixel_th则表明这个预测单元为匹配候选块,进行步骤一三,等待精选计算;若大于Pixel_th则代表这个预测单元为非匹配候选块,不用再进行计算;Accumulate each SAD_c obtained and compare it with Pixel_th; if it is less than or equal to Pixel_th, it indicates that the prediction unit is a matching candidate block, go to Steps 1 and 3, and wait for the selection calculation; if it is greater than Pixel_th, it means that the prediction unit is non-matching Candidate blocks, do not need to be calculated again;

Pixel_th为自适应下采样阈值;Pixel_th is the adaptive downsampling threshold;

步骤一三、判断匹配候选块是否超出搜索范围,如果超出搜索范围,执行步骤二;如果未超出搜索范围,搜索下一个匹配候选块,执行步骤一一。Step 1 and 3: Determine whether the matching candidate block is beyond the search range. If it is beyond the search range, go to Step 2;

具体实施方式三:本实施方式与具体实施方式一或二不同的是:所述步骤一二中其中下采样模板的选择流程如图5所示,从中选择合适的模板。计算预测单元中前一帧(t时刻)与当前帧(t+1时刻)单个像素差值的绝对值,具体过程为利用如下公式:Embodiment 3: This embodiment is different from Embodiment 1 or 2 in that: in the step 1 and 2, the selection process of the down-sampling template is shown in FIG. 5 , and an appropriate template is selected therefrom. Calculate the absolute value of the single pixel difference between the previous frame (time t) and the current frame (time t+1) in the prediction unit, and the specific process is to use the following formula:

SAD_c=abs(piOrg[i]-piCur[i])SAD_c=abs(piOrg[i]-piCur[i])

其中,piOrg表示当前帧中的像素,piCur表示前一帧中的像素,abs为取绝对值符号,SAD_c为预测单元中前一帧(t时刻)与当前帧(t+1时刻)单个像素差值的绝对值,i为预测单元中的第i个像素点。Among them, piOrg represents the pixel in the current frame, piCur represents the pixel in the previous frame, abs is the absolute value symbol, and SAD_c is the single pixel difference between the previous frame (time t) and the current frame (time t+1) in the prediction unit The absolute value of the value, i is the ith pixel in the prediction unit.

具体实施方式四:本实施方式与具体实施方式一至三之一不同的是:所述步骤一二中自适应下采样阈值Pixel_th具体求解过程为:Embodiment 4: The difference between this embodiment and one of Embodiments 1 to 3 is that the specific solution process of the adaptive downsampling threshold Pixel_th in the steps 1 and 2 is as follows:

将图像采用编码树单元(CTU)形式进行分割,得到CTU块,对CTU块再次分割得到预测单元,若干预测单元共享一个同一阈值;The image is divided in the form of a coding tree unit (CTU) to obtain a CTU block, and the CTU block is divided again to obtain a prediction unit, and several prediction units share a same threshold;

当前自适应下采样阈值是由上一CTU中每个预测单元计算得到的误差累加求和求平均值进行估计。如图7所示。The current adaptive downsampling threshold is estimated by accumulating and averaging the errors calculated by each prediction unit in the previous CTU. As shown in Figure 7.

为了适应不同的应用场景,得到最佳的优化效果,自适应下采样阈值以一种自适应的方式进行选择;本发明采用基于编码树的自适应阈值,如图7为自适应算法的实现示意图,其中字母T表示第T个CTU块,T+1表示与第T个块相邻的CTU,字母a,b,c,d表示CTU中划分出的各个PU块。In order to adapt to different application scenarios and obtain the best optimization effect, the adaptive downsampling threshold is selected in an adaptive manner; the present invention adopts the adaptive threshold based on the coding tree, as shown in Fig. 7 is a schematic diagram of the realization of the adaptive algorithm , where the letter T represents the T-th CTU block, T+1 represents the CTU adjacent to the T-th block, and the letters a, b, c, and d represent each PU block divided in the CTU.

具体实施方式五:本实施方式与具体实施方式一至四之一不同的是:所述步骤一二中将得到的每个SAD_c进行累加的具体过程为:Embodiment 5: The difference between this embodiment and one of Embodiments 1 to 4 is that the specific process of accumulating each SAD_c obtained in the steps 1 and 2 is as follows:

其中,fi(mu,nu)为图像中坐标(mu,nu)的像素值,横纵坐标(mu,nu)为下采样模板上的像素点,横纵坐标(x,y)表示运动向量,将SAD(x,y)小于等于自适应下采样阈值的预测单元作为匹配候选组;将SAD(x,y)大于自适应下采样阈值的预测单元作为非匹配候选组;Among them, f i (m u , n u ) is the pixel value of the coordinates (m u , n u ) in the image, the horizontal and vertical coordinates (m u , n u ) are the pixels on the downsampling template, the horizontal and vertical coordinates (x , y) represents the motion vector, and the prediction unit whose SAD(x, y) is less than or equal to the adaptive downsampling threshold is used as a matching candidate group; the prediction unit whose SAD(x,y) is greater than the adaptive downsampling threshold is used as a non-matching candidate group ;

M取值为预测块的长,取值为4、8、16、32、64中任意一个,M≤4N;N取值为预测块的高,取值为4、8、16、32、64中任意一个,N≤4M。M is the length of the prediction block, which is any one of 4, 8, 16, 32, and 64, and M≤4N; N is the height of the prediction block, which is 4, 8, 16, 32, and 64. Any one of them, N≤4M.

具体实施方式六:本实施方式与具体实施方式一至五之一不同的是:所述步骤一三中搜索范围的具体求解过程为:Embodiment 6: This embodiment is different from one of Embodiments 1 to 5 in that: the specific solution process of the search range in the steps 1 and 3 is:

由上一帧得到一个预测点,以该预测点为中心得到长方形搜索范围;采用了提前截止算法对长方形搜索范围进行处理,得到搜索范围。A prediction point is obtained from the previous frame, and a rectangular search range is obtained with the prediction point as the center; an early cutoff algorithm is used to process the rectangular search range to obtain the search range.

本文还采用了提前截止算法。在官方测试代码HM中的结构体rcStrcut中定义参数CountNum,记录进行精选的次数。xTZ8PointDiamondSearch函数为进行TZSearch搜索的主要函数,在循环体中循环调用,循环次数与搜索范围相关。定义参数Count_th,若CountNum大于等于Count_th时跳出循环,不再进行块匹配搜索。提前截止算法流程图如图8所示。This paper also adopts the early cutoff algorithm. Define the parameter CountNum in the structure rcStrcut in the official test code HM to record the number of times of selection. The xTZ8PointDiamondSearch function is the main function for TZSearch search. It is called cyclically in the loop body, and the number of loops is related to the search range. Define the parameter Count_th. If CountNum is greater than or equal to Count_th, it will jump out of the loop and no longer search for block matching. The flowchart of the early deadline algorithm is shown in Figure 8.

具体实施方式七:本实施方式与具体实施方式一至六之一不同的是:所述搜索范围是在程序的配置文件中进行设置,搜索范围数值为64×64。Embodiment 7: The difference between this embodiment and one of Embodiments 1 to 6 is that the search range is set in the configuration file of the program, and the value of the search range is 64×64.

具体实施方式八:本实施方式与具体实施方式一至七之一不同的是:所述步骤二中精选阶段:对初选阶段得到的匹配组进行基于率失真优化准则的精选,选出最终的匹配块,完成运动估计中的块匹配的过程;具体过程为:Embodiment 8: The difference between this embodiment and one of Embodiments 1 to 7 is that: in the selection stage in the second step, the matching group obtained in the primary selection stage is selected based on the rate-distortion optimization criterion, and the final selection is performed. The matching block of , completes the process of block matching in motion estimation; the specific process is:

对匹配候选块中的预测单元进行基于率失真优化准则的精选,其借鉴的是H.265协议中的算法,计算公式如下:The prediction unit in the matching candidate block is selected based on the rate-distortion optimization criterion, which draws on the algorithm in the H.265 protocol. The calculation formula is as follows:

J=S(x,y)+λmotion*RmotionJ=S(x,y)+λmotion*Rmotion

式中,(m,n)为预测单元中所有的像素点,Rmotion表示预测单元编码运动信息(如MV、参考图像标号)等所需的比特数,λmotion为运动估计过程中的拉格朗日因子,编码器会选择使率失真代价J最小的值作为当前块的最终匹配块。In the formula, (m, n) are all the pixels in the prediction unit, Rmotion represents the number of bits required for the prediction unit to encode motion information (such as MV, reference image label), etc., and λmotion is the Lagrangian in the motion estimation process. factor, the encoder will choose the value that minimizes the rate-distortion cost J as the final matching block for the current block.

这里的MV代表的是运动向量Motion Vector。The MV here represents the motion vector Motion Vector.

采用以下实施例验证本发明的有益效果:Adopt the following examples to verify the beneficial effects of the present invention:

实施例一:Example 1:

表1快速块匹配算法与TZSearch算法编码性能比较Table 1 Comparison of coding performance between fast block matching algorithm and TZSearch algorithm

具体是按照以下步骤制备的:Specifically, it is prepared according to the following steps:

实验中使用哈工大微电子中心的服务器,其硬件配置为Inter XeonE54302.66GHz,内存4G,RedHat4Linux 32位操作系统。对22个视频序列使用脚本依次运行,配置文件中qp值为32。记录程序运行时间和编码性能,与现有的TZSearch优化算法进行比较。In the experiment, the server of Harbin Institute of Technology Microelectronics Center is used, and its hardware configuration is Inter XeonE54302.66GHz, memory 4G, RedHat4Linux 32-bit operating system. Use the script to run the 22 video sequences in sequence, and the qp value in the configuration file is 32. The program running time and coding performance are recorded and compared with existing TZSearch optimization algorithms.

实施例二:Embodiment 2:

表2不同qp下的测试数据Table 2 Test data under different qp

具体是按照以下步骤制备的:Specifically, it is prepared according to the following steps:

硬件配置与实施例一相同;分别取量化参数qp值为22,27,32和37,其余参数配置不变;测试在不同qp下的编码性能和运行速度,并与现有的TZSearch优化算法进行比较。The hardware configuration is the same as that of the first embodiment; the quantization parameter qp values are respectively taken as 22, 27, 32 and 37, and the rest of the parameter configurations remain unchanged; the encoding performance and running speed under different qp are tested, and the optimization algorithm is carried out with the existing TZSearch. Compare.

本发明还可有其它多种实施例,在不背离本发明精神及其实质的情况下,本领域技术人员当可根据本发明作出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。The present invention can also have other various embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and deformations according to the present invention, but these corresponding changes and deformations are all It should belong to the protection scope of the appended claims of the present invention.

Claims (2)

1.一种基于H.265视频编码的运动估计块匹配方法,其特征在于:一种基于H.265视频编码的运动估计块匹配方法具体过程为:1. a motion estimation block matching method based on H.265 video coding, is characterized in that: a kind of specific process of the motion estimation block matching method based on H.265 video coding is: 步骤一、初选阶段:根据帧间预测单元的划分特点,选择对应的下采样方案,根据设定的阈值,从所有匹配块中选择出候选匹配组;Step 1, the primary selection stage: according to the division characteristics of the inter-frame prediction unit, select the corresponding downsampling scheme, and select the candidate matching group from all the matching blocks according to the set threshold; 步骤二、精选阶段:对初选阶段得到的候选匹配组进行基于率失真优化准则的精选,选出最终的匹配块,完成运动估计中的块匹配的过程;Step 2: Selection stage: select the candidate matching groups obtained in the primary selection stage based on rate-distortion optimization criteria, select the final matching block, and complete the process of block matching in motion estimation; 所述步骤一中初选阶段:根据帧间预测单元的划分特点,选择对应的下采样方案,根据设定的阈值,从所有匹配块中选择出候选匹配组;具体过程为:The primary selection stage in the first step: according to the division characteristics of the inter-frame prediction unit, select the corresponding downsampling scheme, and select the candidate matching group from all the matching blocks according to the set threshold; the specific process is: 步骤一一、帧间预测单元PU的划分模式,在编码标准中存在八种预测单元划分,其中形状分为正方形和长方形;Step 11, the division mode of the inter-frame prediction unit PU, there are eight prediction unit divisions in the coding standard, and the shape is divided into square and rectangle; 对于正方形的预测单元,判断正方形是否是32x32和64x64的预测单元,如果是,采用米字形的下采样方案;如果否,采用对角线的下采样方案;For a square prediction unit, determine whether the square is a 32x32 and 64x64 prediction unit, if so, adopt the downsampling scheme of the glyph; if not, adopt the downsampling scheme of the diagonal; 对于长方形的预测单元,采用十字形的下采样方案;For rectangular prediction units, a cross-shaped downsampling scheme is used; 步骤一二、计算预测单元中前一帧与当前帧单个像素差值的绝对值SAD_c;Step 12: Calculate the absolute value SAD_c of the single pixel difference between the previous frame and the current frame in the prediction unit; 将得到的每个SAD_c进行累加,与Pixel_th进行比较;若小于或者等于Pixel_th则表明这个预测单元为匹配候选块,进行步骤一三,等待精选计算;若大于Pixel_th则代表这个预测单元为非匹配候选块,不用再进行计算;Accumulate each SAD_c obtained and compare it with Pixel_th; if it is less than or equal to Pixel_th, it indicates that the prediction unit is a matching candidate block, go to Steps 1 and 3, and wait for the selection calculation; if it is greater than Pixel_th, it means that the prediction unit is non-matching Candidate blocks, do not need to be calculated again; Pixel_th为自适应下采样阈值;Pixel_th is the adaptive downsampling threshold; 步骤一三、判断匹配候选块是否超出搜索范围,如果超出搜索范围,执行步骤二;如果未超出搜索范围,搜索下一个匹配候选块,执行步骤一一;Step 13: Determine whether the matching candidate block exceeds the search range, if it exceeds the search range, perform step 2; if it does not exceed the search range, search for the next matching candidate block, and perform step 11; 所述步骤一二中计算预测单元中前一帧与当前帧单个像素差值的绝对值,具体过程为利用如下公式:In the step 1 and 2, the absolute value of the single pixel difference between the previous frame and the current frame in the prediction unit is calculated, and the specific process is to use the following formula: SAD_c=abs(piOrg[i]-piCur[i])SAD_c=abs(piOrg[i]-piCur[i]) 其中,piOrg表示当前帧中的像素,piCur表示前一帧中的像素,abs为取绝对值符号,SAD_c为预测单元中前一帧与当前帧单个像素差值的绝对值,i为预测单元中的第i个像素点;Among them, piOrg represents the pixel in the current frame, piCur represents the pixel in the previous frame, abs is the symbol of the absolute value, SAD_c is the absolute value of the difference between the previous frame and the current frame single pixel in the prediction unit, and i is the prediction unit. The ith pixel of ; 所述步骤一二中自适应下采样阈值Pixel_th具体求解过程为:The specific solution process of the adaptive downsampling threshold Pixel_th in the steps 1 and 2 is as follows: 当前自适应下采样阈值是由上一CTU中每个预测单元计算得到的误差累加求和求平均值进行估计;The current adaptive downsampling threshold is estimated by accumulating and averaging the errors calculated by each prediction unit in the previous CTU; CTU为编码树单元;CTU is the coding tree unit; 所述步骤一二中将得到的每个SAD_c进行累加的具体过程为:The specific process of accumulating each SAD_c obtained in the steps 1 and 2 is as follows: 其中,fi(mu,nu)为图像中坐标(mu,nu)的像素值,横纵坐标(mu,nu)为下采样模板上的像素点,横纵坐标(x,y)表示运动向量,将SAD(x,y)小于等于自适应下采样阈值的预测单元作为匹配候选组;将SAD(x,y)大于自适应下采样阈值的预测单元作为非匹配候选组;in, f i (m u , n u ) is the pixel value of the coordinates (m u , n u ) in the image, the horizontal and vertical coordinates (m u , n u ) are the pixels on the downsampling template, the horizontal and vertical coordinates (x, y) ) represents a motion vector, and the prediction unit whose SAD(x, y) is less than or equal to the adaptive downsampling threshold is used as a matching candidate group; the prediction unit whose SAD(x, y) is greater than the adaptive downsampling threshold is used as a non-matching candidate group; M取值为预测块的长,取值为4、8、16、32、64中任意一个,M≤4N;N取值为预测块的高,取值为4、8、16、32、64中任意一个,N≤4M;M is the length of the prediction block, which is any one of 4, 8, 16, 32, and 64, and M≤4N; N is the height of the prediction block, which is 4, 8, 16, 32, and 64. Any one of them, N≤4M; 所述搜索范围数值为64×64;The value of the search range is 64×64; 所述步骤二中精选阶段:对初选阶段得到的匹配组进行基于率失真优化准则的精选,选出最终的匹配块,完成运动估计中的块匹配的过程;具体过程为:The selection stage in the second step: select the matching group obtained in the primary selection stage based on the rate-distortion optimization criterion, select the final matching block, and complete the process of block matching in motion estimation; the specific process is: 对匹配候选块中的预测单元进行基于率失真优化准则的精选,计算公式如下:The prediction unit in the matching candidate block is selected based on the rate-distortion optimization criterion, and the calculation formula is as follows: J=S(x,y)+λmotion*RmotionJ=S(x,y)+λmotion*Rmotion 式中,(m,n)为预测单元中所有的像素点,Rmotion表示预测单元编码运动信息所需的比特数,λmotion为运动估计过程中的拉格朗日因子,编码器会选择使率失真代价J最小的值作为当前块的最终匹配块。In the formula, (m, n) are all the pixels in the prediction unit, Rmotion is the number of bits required for the prediction unit to encode motion information, λmotion is the Lagrangian factor in the motion estimation process, and the encoder will choose to make rate-distortion The value with the smallest cost J is used as the final matching block of the current block. 2.根据权利要求1所述一种基于H.265视频编码的运动估计块匹配方法,其特征在于:所述步骤一三中搜索范围的具体求解过程为:2. a kind of motion estimation block matching method based on H.265 video coding according to claim 1, is characterized in that: the concrete solution process of search range in described step 13 is: 由上一帧得到一个预测点,以该预测点为中心得到长方形搜索范围;采用了提前截止算法对长方形搜索范围进行处理,得到搜索范围。A prediction point is obtained from the previous frame, and a rectangular search range is obtained with the prediction point as the center; an early cutoff algorithm is used to process the rectangular search range to obtain the search range.
CN201610907809.1A 2016-10-18 2016-10-18 A Motion Estimation Block Matching Method Based on H.265 Video Coding Active CN106454349B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610907809.1A CN106454349B (en) 2016-10-18 2016-10-18 A Motion Estimation Block Matching Method Based on H.265 Video Coding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610907809.1A CN106454349B (en) 2016-10-18 2016-10-18 A Motion Estimation Block Matching Method Based on H.265 Video Coding

Publications (2)

Publication Number Publication Date
CN106454349A CN106454349A (en) 2017-02-22
CN106454349B true CN106454349B (en) 2019-07-16

Family

ID=58177037

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610907809.1A Active CN106454349B (en) 2016-10-18 2016-10-18 A Motion Estimation Block Matching Method Based on H.265 Video Coding

Country Status (1)

Country Link
CN (1) CN106454349B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107563977A (en) * 2017-08-28 2018-01-09 维沃移动通信有限公司 A kind of image processing method, mobile terminal and computer-readable recording medium
CN110337810B (en) * 2018-04-02 2022-01-14 北京大学 Method and apparatus for video processing
CN110365988B (en) * 2018-04-11 2022-03-25 瑞芯微电子股份有限公司 H.265 coding method and device
CN109547785B (en) * 2018-10-26 2021-05-18 西安科锐盛创新科技有限公司 Self-adaptive texture gradual change prediction method in bandwidth compression
CN109561308B (en) * 2018-10-26 2021-05-18 西安科锐盛创新科技有限公司 Self-adaptive texture gradual change prediction method in bandwidth compression
CN112118444B (en) * 2019-06-20 2022-11-25 杭州海康威视数字技术股份有限公司 Encoding method and device
CN115550665B (en) * 2022-09-15 2025-03-18 翱捷科技股份有限公司 A motion estimation method and device based on brightness distribution pattern

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101409839A (en) * 2007-10-10 2009-04-15 联发科技股份有限公司 Motion estimation method applied to video compression and using pixel matching undersampling
CN102893604A (en) * 2010-02-19 2013-01-23 斯凯普公司 Data compression for video
CN103475879A (en) * 2013-09-10 2013-12-25 南京邮电大学 Side information generation method in distribution type video encoding
CN104581180A (en) * 2014-12-31 2015-04-29 乐视网信息技术(北京)股份有限公司 Video coding method and device
CN104602019A (en) * 2014-12-31 2015-05-06 乐视网信息技术(北京)股份有限公司 Video coding method and device
CN105282557A (en) * 2015-09-28 2016-01-27 天津大学 H264 rapid movement estimation method for prediction movement vector

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9584805B2 (en) * 2012-06-08 2017-02-28 Qualcomm Incorporated Prediction mode information downsampling in enhanced layer coding

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101409839A (en) * 2007-10-10 2009-04-15 联发科技股份有限公司 Motion estimation method applied to video compression and using pixel matching undersampling
CN102893604A (en) * 2010-02-19 2013-01-23 斯凯普公司 Data compression for video
CN103475879A (en) * 2013-09-10 2013-12-25 南京邮电大学 Side information generation method in distribution type video encoding
CN104581180A (en) * 2014-12-31 2015-04-29 乐视网信息技术(北京)股份有限公司 Video coding method and device
CN104602019A (en) * 2014-12-31 2015-05-06 乐视网信息技术(北京)股份有限公司 Video coding method and device
CN105282557A (en) * 2015-09-28 2016-01-27 天津大学 H264 rapid movement estimation method for prediction movement vector

Also Published As

Publication number Publication date
CN106454349A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN106454349B (en) A Motion Estimation Block Matching Method Based on H.265 Video Coding
CN106131547B (en) The high-speed decision method of intra prediction mode in Video coding
CN101267556B (en) Quick motion estimation method and video coding and decoding method
CN111556323B (en) Image coding and decoding method and device
US10448036B2 (en) Motion compensation matching for video coding
CN111147867A (en) A fast decision-making method and storage medium for multi-functional video coding CU division
CN106961606A (en) The HEVC intra-frame encoding mode systems of selection of feature are divided based on texture
CN102932642B (en) Interframe coding quick mode selection method
CN106878737B (en) Estimation accelerated method in efficient video coding
CN111479110B (en) Fast Affine Motion Estimation Method for H.266/VVC
CN102291581B (en) Realizing method of self-adaptive motion estimation supporting frame field
CN103327327B (en) For the inter prediction encoding unit selection method of high-performance video coding HEVC
CN106604035B (en) A method of the estimation for Video coding and compression
CN110351552B (en) A Fast Coding Method in Video Coding
CN107277506A (en) A kind of motion vector accuracy fast selecting method and device based on adaptive motion vector precision
CN104811729B (en) A kind of video multi-reference frame coding method
CN108353175A (en) The method and apparatus of prediction processing vision signal caused by coefficient of utilization
CN107087171A (en) HEVC Integer Pixel Motion Estimation Method and Device
CN104702959B (en) A kind of intra-frame prediction method and system of Video coding
CN102075757B (en) Video foreground object coding method by taking boundary detection as motion estimation reference
CN107483936B (en) A kind of light field video inter-prediction method based on macro pixel
CN107018412A (en) A kind of DVC HEVC video transcoding methods based on key frame coding unit partition mode
CN110149512A (en) Inter-prediction accelerated method, control device, electronic device, computer storage medium and equipment
CN101867818B (en) Selection method and device of macroblock mode
CN105791863B (en) 3D-HEVC depth map intra-frame predictive encoding method based on layer

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant