WO2012088811A1 - Motion prediction method and system for inter frame encoding - Google Patents

Motion prediction method and system for inter frame encoding Download PDF

Info

Publication number
WO2012088811A1
WO2012088811A1 PCT/CN2011/073504 CN2011073504W WO2012088811A1 WO 2012088811 A1 WO2012088811 A1 WO 2012088811A1 CN 2011073504 W CN2011073504 W CN 2011073504W WO 2012088811 A1 WO2012088811 A1 WO 2012088811A1
Authority
WO
WIPO (PCT)
Prior art keywords
motion
frame
macroblock
region
threshold
Prior art date
Application number
PCT/CN2011/073504
Other languages
French (fr)
Chinese (zh)
Inventor
舒倩
Original Assignee
深圳市融创天下科技股份有限公司
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 深圳市融创天下科技股份有限公司 filed Critical 深圳市融创天下科技股份有限公司
Publication of WO2012088811A1 publication Critical patent/WO2012088811A1/en

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/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/527Global motion vector estimation
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/109Selection of coding mode or of prediction mode among a plurality of temporal predictive coding modes
    • 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/136Incoming video signal characteristics or properties
    • H04N19/14Coding unit complexity, e.g. amount of activity or edge presence estimation

Definitions

  • the present invention relates to the field of video coding, and in particular to a motion prediction method and system for interframe coding. Background technique
  • the inter-frame information redundancy of the video source in video coding is extremely large, which makes the inter-frame coding method particularly important in video coding.
  • the mainstream motion compensation method based on macroblock and sub-block can achieve better results in normal motion, but when global motion occurs, the corresponding compression difficulty is improved. This problem is more serious in low-rate compression. .
  • This problem is caused by the complexity of the encoding source itself, but on the other hand, it is also the cause of the existing macroblock-based and sub-block motion compensation methods.
  • the motion compensation method based on macroblock and subblock splits the region and the global correlation, so that when there is global motion, the redundancy of the interframe information can not be eliminated well by using this method, so that the low bit rate is The contradiction between compression quality and quantity is particularly prominent.
  • the decision-by-decision mode wastes computing resources. Summary of the invention
  • the purpose of the embodiments of the present invention is to provide a motion prediction method for inter-frame coding, which aims to solve the prior art method for motion compensation based on macroblock and sub-block, which separates regions and global correlations, so that when there is global motion, The redundancy of the inter-frame information cannot be well eliminated, so that the contradiction between the compression quality and the quantity at a low code rate is particularly prominent.
  • the method of the embodiment of the present invention is implemented in this manner, and provides a motion prediction method for inter-frame coding, where the method includes:
  • the step of "determining whether the selected determination area is a strong consistent motion trend" further includes: If the selected region is not a strong consistent motion trend, a weak determination of the global motion direction is performed according to the motion of each region.
  • Another object of the embodiments of the present invention is to provide an interframe coding motion prediction system, where the system includes an entry global motion prediction judgment module, a strong consistency motion trend judgment module, and a weak consistency motion trend judgment module, where
  • the entering the global motion prediction and determining module is configured to determine whether to enter the global motion prediction according to the threshold range in which the relative change complexity information of the current frame is located; that is, if the relative change complexity information of the current frame is greater than the first threshold, the current The frame is extremely similar to the previous frame, and the current frame is determined to be a skip frame, and the skip frame indicates that there is almost no motion compared to the previous two frames; if the relative change complexity information of the current frame is between the first threshold and the second threshold And not entering the global motion prediction, wherein the first threshold is greater than the second threshold; if the relative change complexity information of the current frame is smaller than the second threshold, performing global motion prediction, entering the strong consistency motion
  • the trend judgment module executes;
  • the strong consistency motion trend judging module is configured to determine whether the selected judging area is a strong consistent motion trend, and if yes, obtain the current frame as a global motion, and obtain a corresponding direction determination; if otherwise enter the weak consistency
  • the motion trend judgment module executes;
  • the weakly consistent motion trend judging module is configured to determine whether the selected judging region is a weakly consistent motion trend, and if yes, obtain a corresponding direction determination of the current frame; if otherwise, determine that the current frame does not have a global motion.
  • the invention has the following beneficial effects:
  • the present invention proposes a motion prediction method for inter-frame coding, which first determines whether to enter global motion prediction according to a threshold range in which the relative change complexity information of the current frame is located; Whether the selected determination area is a strong consistent motion trend, if yes, the motion direction of the current frame is taken as the global motion direction, and the corresponding direction determination is obtained, and the end is ended; if it is not a strong consistent motion trend, according to the motion of each area, A weak decision on the direction of global motion.
  • the invention can improve the compression ratio on the one hand and the compression speed on the other hand, that is, when compressing the video source with global motion, the motion prediction can be determined by means of unified judgment, without relying on relying only on macroblocks and sub-
  • the motion prediction method of the block sequentially determines each macroblock subblock.
  • FIG. 1 is a flowchart of a motion prediction method for interframe coding according to an embodiment of the present invention
  • 2 is a schematic structural diagram of a motion prediction system for inter-frame coding according to an embodiment of the present invention.
  • the invention provides a motion prediction method for inter-frame coding, which first determines whether to enter a global motion prediction according to a threshold range in which the relative change complexity information of the current frame is located; if it is a global motion prediction, it is determined whether the selected decision region is Strong consistent motion trend, if yes, obtain the motion direction of the current frame as the global motion direction, obtain the corresponding direction decision, and end; if it is not the strong consistent motion trend, perform the weak decision of the global motion direction according to the motion of each region.
  • FIG. 1 is a flowchart of a motion prediction method for inter-frame coding according to an embodiment of the present invention, where the method includes the following steps:
  • the current frame is considered to be extremely similar to the previous frame, and the current frame is determined to be a Skip frame (ie, a frame skipping, indicating that the two frames are nearly motionless, Directly copying the previous frame image); if the relative change complexity information of the current frame is between the first threshold and the second threshold, the global motion prediction is not entered; if the relative change complexity information of the current frame is less than the second threshold, Then, the global motion prediction is entered, that is, the process proceeds to step S12.
  • the first threshold is greater than the second threshold.
  • the procedure for entering the global motion prediction method is as follows: if(ti fr a rq ⁇ sThrfe); Then the t-th frame is extremely similar to the t-1 frame, and the t-th frame is determined to be a Skip frame.
  • Thresl Thres2 is the corresponding first threshold and second threshold decision threshold.
  • Tis_ framest represents: relative change complexity information of the t-th frame
  • the relative change complexity information of the current frame is obtained as follows:
  • Ti- Mb t std[ f t (i,jl(i,j)e Mb t , ) ⁇ f t _, (i,jl(i,j)e Mb t — ,' b) macroblock texture information : The mean square error of the pixel values within the current macroblock.
  • Mb, ⁇ represents the macroblock of the mth row and the nth column of the tth frame
  • ti-Mb represents: macroblock motion information
  • si_Mb t represents: macroblock texture information; B): acquires relative change complexity information of the current frame based on macroblock relative change complexity information
  • ThresO is the corresponding zeroth decision threshold
  • Tis_ framest represents: relative change complexity information of the t-th frame
  • tilMb means: Mb macroblock relative change complexity information
  • step S12 determining whether the selected determination area is a strong consistent motion trend, if yes, acquiring a motion direction of the current frame as a global motion direction, obtaining a corresponding direction determination, and ending; if otherwise, proceeding to step S13;
  • Condition 1 The decision area is the background area
  • Condition 2 Select at least two decision areas
  • Condition 3 Detection of all directions in each decision area
  • All directions include: left side motion, right side motion, upper side motion, lower side motion, static;
  • more or less directions can be selected according to the comprehensive consideration of the needs and the calculation amount. Considering that the three movements of horizontal, vertical and stationary are the most common in actual exercise, the embodiment of the present invention The five directions of left side motion, right side motion, upper side motion, lower side motion, and stationary are explained as an example. "Determining whether the selected decision area is a strong consistent motion trend"
  • two determination areas Region ⁇ Re g i are selected.
  • the following calculations are respectively performed: Calculate the mean square error of the left motion prediction value and the current coded value difference, obtain the left motion prediction residual; Calculate the right motion prediction value and The mean square error of the current coded value difference, obtains the right motion prediction residual; calculates the mean square error of the upper motion prediction value and the current coded value difference, obtains the upper motion prediction residual; calculates the lower motion prediction value and the current coding
  • Mb t ' m ' n represents the macroblock of the mth row and n columns of the tth frame; —: is the macroblock of the mth row and the nth column of the current t frame; f'- (i ' j) : is ⁇ The pixel value of the i-th row and the j-th column;
  • f t ( ) represents the pixel value of the i-th row and j column of the t-th frame; the std table is unevenly variance; 13 is the left-side motion prediction residual, predL_f t . j) is the current frame image using the current frame
  • the macroblock is the predicted value of the left motion estimation;
  • Diff ⁇ ht is the right side of the page; the predR_ f , , , (i, j) is the current image using the previous frame
  • Pr6dU - ( ⁇ ' j) is to use the previous frame image for the current precD_ f , , . (i, j) is a predicted value for estimating the motion of the current macroblock using the image of the previous frame;
  • predS _ f t _ tn (i, j ) is the predicted value of the stationary motion estimation of the current macroblock using the image of the previous frame;
  • S122 Count the number of motion macroblocks in all directions in each area; that is, in each area, the number of motion macroblocks in the direction in which the macroblock prediction residual is the smallest is increased by one; all directions in each area are left motion, right motion, Upper side movement, lower side movement, static direction;
  • Count, wicJ + + among them, , Count Up j , ⁇ 3 ⁇ 4 Count ⁇ c" respectively indicate the left side of the selected decision area Regies, the right side motion, the upper side motion, the lower side motion, and the number of still macroblocks.
  • Re giQn j represents two different selected decision regions; min(a, b, c, c, d) represents the minimum of the five values;
  • S123 determining, according to the statistical information of the number of motion macroblocks in the corresponding direction in each area, whether the information of the area is available;
  • the difference between the number of macroblocks in the opposite direction of motion in one region is smaller than the first direction determination threshold Thres dl or the five motion directions in the region (left side motion, right side motion, upper side motion, lower side motion, still motion) If the difference between the maximum value and the second largest value of the macroblock number is smaller than the second direction determination threshold l3 ⁇ 4re Sd2 , the information of the area is considered to be unavailable.
  • County j, , Count Down j , Counts ⁇ " respectively indicate the left side motion, the right side motion, the upper side motion, the lower side motion, and the number of still macroblocks of the selected decision region Region.
  • Re gi ° n j represents two different selected decision regions; ma X ( a , b, C , C , d), le S smu a, b, c, c, d) respectively to find the maximum and the fifth of the five values
  • a large value, hres dl is a first direction determination threshold, and 13 ⁇ 4 ⁇ is a second direction determination threshold;
  • S125 performing strong determination of the global motion direction according to the motion of each region
  • the motion directions of the two regions are consistent and do not belong to the stationary direction, and the number of macroblocks in the corresponding motion direction of each region is greater than the corresponding third direction determination threshold Thres d3 ; or the motion directions of the two regions are inconsistent but one of the regions is motion
  • the number of macroblocks whose direction is stationary and the other non-stationary direction is greater than the corresponding fourth direction determination threshold hre Sd4; then the global motion direction can be obtained, and the global motion prediction judgment is ended; otherwise, the process proceeds to S13.
  • Thre Sd3 Thres d4 is the third direction determination threshold and the fourth direction determination threshold respectively;
  • Directiorij J is the area Re gi.
  • Direction of movement directioi% J-direction area Re g oiig direction of movement
  • Coun ⁇ —5 determines the region Re g i. Number of macroblocks in the direction of motion
  • Mn rmn(max(Count Lett ,Count Right j , Count Up j ,Count Down j , Coun , ⁇ d ) - lessmax(Count Lett ,Count Right j ,Count Up j ,Count Down j ,Count Static ”))
  • Mn minCmaxCCount ⁇ , Count Right j , Count Up j , Count Down j ⁇ ou , ⁇ ) - lessmaxiCount ⁇ , Count Right j ,Count Up j , Count Down j 'County ))
  • Mn minCmaxCCount ⁇ ,Count Right j ,Count Up j ,Count Down ⁇ County,” ) - lessmaxiCount ⁇ ,Count Right j , Count Up j ,Count Down j , Coimt ”
  • S132 determining the global motion direction according to various conditions of each region; if only one region of the two region information is valid, if the number of macroblocks satisfying the motion direction of the region is smaller than the corresponding fifth direction determination threshold 13 ⁇ 4 ⁇ and the region The direction difference value satisfies the corresponding sixth direction determination threshold Thr eSd6; or the number of macroblocks satisfying the motion direction of the area is greater than the corresponding seventh direction determination threshold
  • Thres d7 Thres d7 ; then the global direction of motion is the direction of motion of the active area; the detailed procedure is described as follows:
  • the embodiment of the invention provides a motion prediction method for inter-frame coding, which first determines whether to enter global motion prediction according to a threshold range in which the relative change complexity information of the current frame is located; if it is a global motion prediction, determines the selected decision region. Whether it is a strong consistent motion trend, if yes, obtain the motion direction of the current frame as the global motion direction, obtain the corresponding direction decision, and end; if it is not a strong consistent motion trend, the global motion direction is weak according to the motion of each region determination.
  • the compression ratio can be improved on the one hand, and the compression speed can be increased on the other hand, that is, when the video source with global motion is compressed, the motion prediction can be determined by means of unified judgment, without relying on relying only on
  • the macroblock and subblock based motion prediction method sequentially determines each macroblock subblock.
  • FIG. 2 is a schematic structural diagram of a motion prediction system for inter-frame coding according to an embodiment of the present invention.
  • the system includes:
  • the global motion prediction and determination module is configured to determine whether to enter the global motion prediction according to the threshold range in which the relative change complexity information of the current frame is located; that is, if the relative change complexity information of the current frame is greater than the first threshold, the current frame is considered to be The previous frame is extremely approximate, and the current frame is determined to be a Skip frame (ie, a skip frame, indicating that the two frames before and after the motion is almost motionless, and the previous frame image can be directly copied); if the current frame has its relative change complexity information at the first threshold and the first Between the two thresholds, the global motion prediction is not entered; if the relative change complexity information of the current frame is smaller than the second threshold, the global motion prediction is entered, that is, the strong consistency motion trend judgment module is entered, where the first threshold is greater than the second threshold. .
  • Strong consistency motion trend judgment module judge whether the selected decision area is a strong consistent motion trend, if yes, obtain the current frame as a global motion, obtain a corresponding direction determination, and end; if otherwise enter a weak consistency motion trend judgment module ;
  • the weak consistency motion trend judging module judges whether the selected judging region is a weakly consistent motion trend, and if yes, obtains a corresponding direction judgment of the current frame, and ends; if otherwise, determines that the current frame does not have a global motion;
  • Determining whether the selected decision area is a weakly consistent motion trend is specifically: calculating the direction difference of each type of area, that is, calculating the difference between the maximum number of motion direction macroblocks and the sub-large motion direction macroblocks of each area, The minimum value of the region is the difference in direction of the region; that is, according to the various conditions of each region, the global motion direction is determined;
  • the global direction of motion is the direction of motion of the active area
  • the embodiment of the invention provides a motion prediction method for inter-frame coding, which first determines whether to enter global motion prediction according to a threshold range in which the relative change complexity information of the current frame is located; if it is a global motion prediction, determines the selected decision region. Whether it is a strong consistent motion trend, if yes, obtain the motion direction of the current frame as the global motion direction, obtain the corresponding direction decision, and end; if it is not a strong consistent motion trend, the global motion direction is weak according to the motion of each region determination.
  • the compression ratio can be improved on the one hand, and the compression speed can be increased on the other hand, that is, when the video source with global motion is compressed, the motion prediction can be determined by means of unified judgment, without relying on relying only on macroblocks only.
  • the sub-block motion prediction method sequentially determines each macro block sub-block.
  • the storage medium may be a ROM, a RAM, a magnetic disk, an optical disk, or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

A motion prediction method and system for inter frame encoding are disclosed in the present invention, wherein the motion prediction method for inter frame encoding includes the steps of judging whether to start the global motion prediction firstly according to the threshold range which relative variation complexity information of the current frame is located in; if the global motion prediction is performed, judging whether the selected judgment area has the strong consistency motion tread, if so, obtaining the motion direction of the current frame as the global motion direction, and obtaining corresponding direction judgment; if it does not have the strong consistency motion tread, performing the weak judgment for the global motion direction according to the motion of each area. The present invention can improve the compression ratio on the one hand, and improve the compression speed on the other hand. Namely, when the compression is performed on the video resource with the global motion, the motion judgment can be determined by using uniformly judgment manner, without successively judging sub blocks of each macro block as in the motion prediction method only depended on the macro blocks and the sub blocks.

Description

一种帧间编码的运动预测方法和系统  Motion prediction method and system for interframe coding
技术领域 Technical field
本发明涉及视频编码领域, 尤其涉及一种帧间编码的运动预测方法和系 统。 背景技术  The present invention relates to the field of video coding, and in particular to a motion prediction method and system for interframe coding. Background technique
视频编码中视频源的帧间信息冗余度极大,从而使得帧间编码方法在视频 编码中显得尤为重要。 目前主流的基于宏块、 子块的运动补偿方法, 在常规运 动时, 可以达到较好的效果, 但当出现全局运动时, 相应的压缩难度提升, 这 个问题在低码率压缩时更为严重。出现此问题, 固然是由于编码源本身的复杂 度引起的,但另一方面却也是现有基于宏块、子块的运动补偿的方法存在缺陷 的原因。基于宏块、 子块的运动补偿的方法割裂了区域及全局相关性, 从而当 存在全局运动时,仅使用该方法不能很好的消除帧间信息的冗余度, 从而使得 低码率下的压缩质与量的矛盾尤为突出。此外, 逐个判定的模式也浪费了计算 资源。 发明内容  The inter-frame information redundancy of the video source in video coding is extremely large, which makes the inter-frame coding method particularly important in video coding. At present, the mainstream motion compensation method based on macroblock and sub-block can achieve better results in normal motion, but when global motion occurs, the corresponding compression difficulty is improved. This problem is more serious in low-rate compression. . This problem is caused by the complexity of the encoding source itself, but on the other hand, it is also the cause of the existing macroblock-based and sub-block motion compensation methods. The motion compensation method based on macroblock and subblock splits the region and the global correlation, so that when there is global motion, the redundancy of the interframe information can not be eliminated well by using this method, so that the low bit rate is The contradiction between compression quality and quantity is particularly prominent. In addition, the decision-by-decision mode wastes computing resources. Summary of the invention
本发明实施例的目的在于提出一种帧间编码的运动预测方法,旨在解决现 有技术基于宏块、子块的运动补偿的方法割裂了区域及全局相关性, 从而当存 在全局运动时, 不能很好的消除帧间信息的冗余度, 从而使得低码率下的压缩 质与量的矛盾尤为突出的问题。  The purpose of the embodiments of the present invention is to provide a motion prediction method for inter-frame coding, which aims to solve the prior art method for motion compensation based on macroblock and sub-block, which separates regions and global correlations, so that when there is global motion, The redundancy of the inter-frame information cannot be well eliminated, so that the contradiction between the compression quality and the quantity at a low code rate is particularly prominent.
本发明实施例方法是这样实现的, 提供一种帧间编码的运动预测方法,所 述方法包括:  The method of the embodiment of the present invention is implemented in this manner, and provides a motion prediction method for inter-frame coding, where the method includes:
根据当前帧的相对变化复杂度信息所在的阈值范围,判断是否进入全局运 动预测, 如果是, 则  Determining whether to enter the global motion prediction according to the threshold range in which the relative change complexity information of the current frame is located, and if so,
判断选定的判定区域是否为强一致性运动趋势, 如果是, 则  Determining whether the selected decision area is a strong consistent motion trend, and if so,
获取当前帧为全局运动, 获取相应的方向判定, 结束。  Get the current frame as a global motion, obtain the corresponding direction decision, and end.
优选地, 所述步骤 "判断选定的判定区域是否为强一致性运动趋势"还包 括: 如果选定的区域不是强一致运动趋势, 则根据各区域的运动,进行全局运 动方向的弱判定。 Preferably, the step of "determining whether the selected determination area is a strong consistent motion trend" further includes: If the selected region is not a strong consistent motion trend, a weak determination of the global motion direction is performed according to the motion of each region.
本发明实施例的另一目的在于提出一种帧间编码的运动预测系统,所述系 统包括进入全局运动预测判断模块、强一致性运动趋势判断模块和弱一致性运 动趋势判断模块, 其中,  Another object of the embodiments of the present invention is to provide an interframe coding motion prediction system, where the system includes an entry global motion prediction judgment module, a strong consistency motion trend judgment module, and a weak consistency motion trend judgment module, where
所述进入全局运动预测判断模块:用于根据当前帧的相对变化复杂度信息 所在的阈值范围,判断是否进入全局运动预测; 即如果当前帧的相对变化复杂 度信息大于第一阈值, 则认为当前帧与前一帧极度近似, 判定当前帧为跳帧, 所述跳帧表示前后两帧相比近乎无运动;如果当前帧的相对变化复杂度信息在 所述第一阈值和第二阈值之间, 则不进入全局运动预测, 其中所述第一阈值大 于所述第二阈值; 如果当前帧的相对变化复杂度信息小于所述第二阈值, 则进 行全局运动预测, 进入所述强一致性运动趋势判断模块执行;  The entering the global motion prediction and determining module is configured to determine whether to enter the global motion prediction according to the threshold range in which the relative change complexity information of the current frame is located; that is, if the relative change complexity information of the current frame is greater than the first threshold, the current The frame is extremely similar to the previous frame, and the current frame is determined to be a skip frame, and the skip frame indicates that there is almost no motion compared to the previous two frames; if the relative change complexity information of the current frame is between the first threshold and the second threshold And not entering the global motion prediction, wherein the first threshold is greater than the second threshold; if the relative change complexity information of the current frame is smaller than the second threshold, performing global motion prediction, entering the strong consistency motion The trend judgment module executes;
所述强一致性运动趋势判断模块:用于判断选定的判定区域是否为强一致 性运动趋势, 如果是则获取当前帧为全局运动, 获取相应的方向判定; 如果否 则进入所述弱一致性运动趋势判断模块执行;  The strong consistency motion trend judging module is configured to determine whether the selected judging area is a strong consistent motion trend, and if yes, obtain the current frame as a global motion, and obtain a corresponding direction determination; if otherwise enter the weak consistency The motion trend judgment module executes;
所述弱一致性运动趋势判断模块:用于判断选定的判定区域是否为弱一致 性运动趋势, 如果是则获取当前帧相应的方向判定; 如果否则判定当前帧不存 在全局运动。  The weakly consistent motion trend judging module is configured to determine whether the selected judging region is a weakly consistent motion trend, and if yes, obtain a corresponding direction determination of the current frame; if otherwise, determine that the current frame does not have a global motion.
本发明的有益效果为: 本发明提出一种帧间编码的运动预测方法,先根据 当前帧的相对变化复杂度信息所在的阈值范围, 判断是否进入全局运动预测; 如果是进入全局运动预测,判断选定的判定区域是否为强一致性运动趋势, 如 果是则获取当前帧的运动方向为全局运动方向, 获取相应的方向判定, 结束; 如果不是强一致运动趋势,则根据各区域的运动,进行全局运动方向的弱判定。 利用本发明一方面可以提升压缩率, 另一方面可以提升压缩速度, 即对存在全 局运动的视频源进行压缩时,可通过统一判断的方式确定运动预测, 而无需像 仅依赖基于宏块、 子块的运动预测方法对每个宏块子块依次作判断。 附图说明  The invention has the following beneficial effects: The present invention proposes a motion prediction method for inter-frame coding, which first determines whether to enter global motion prediction according to a threshold range in which the relative change complexity information of the current frame is located; Whether the selected determination area is a strong consistent motion trend, if yes, the motion direction of the current frame is taken as the global motion direction, and the corresponding direction determination is obtained, and the end is ended; if it is not a strong consistent motion trend, according to the motion of each area, A weak decision on the direction of global motion. The invention can improve the compression ratio on the one hand and the compression speed on the other hand, that is, when compressing the video source with global motion, the motion prediction can be determined by means of unified judgment, without relying on relying only on macroblocks and sub- The motion prediction method of the block sequentially determines each macroblock subblock. DRAWINGS
图 1是本发明实施例的一种帧间编码的运动预测方法流程图; 图 2是本发明实施例的一种帧间编码的运动预测系统结构示意图。 具体实舫式 为了使本发明的目的、技术方案及优点更加清楚明白, 以下结合附图和实 施例, 对本发明进行进一步详细说明, 为了便于说明, 仅示出了与本发明实施 例相关的部分。 应当理解, 此处所描写的具体实施例, 仅仅用于解释本发明, 并不用以限制本发明。 本发明提出一种帧间编码的运动预测方法,先根据当前帧的相对变化复杂 度信息所在的阈值范围,判断是否进入全局运动预测; 如果是进入全局运动预 测,判断选定的判定区域是否为强一致性运动趋势, 如果是则获取当前帧的运 动方向为全局运动方向, 获取相应的方向判定, 结束; 如果不是强一致运动趋 势, 则根据各区域的运动, 进行全局运动方向的弱判定。 利用本发明方法, 一 方面可以提升压缩率, 另一方面可以提升压缩速度, 即对存在全局运动的视频 源进行压缩时, 可通过统一判断的方式确定运动预测, 而无需像仅依赖基于宏 块、 子块的运动预测方法对每个宏块子块依次作判断。 图 1所示为本发明实施例一种帧间编码的运动预测方法流程图, 该方法包 括以下步骤: 1 is a flowchart of a motion prediction method for interframe coding according to an embodiment of the present invention; 2 is a schematic structural diagram of a motion prediction system for inter-frame coding according to an embodiment of the present invention. The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. For the convenience of description, only the parts related to the embodiments of the present invention are shown. . It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. The invention provides a motion prediction method for inter-frame coding, which first determines whether to enter a global motion prediction according to a threshold range in which the relative change complexity information of the current frame is located; if it is a global motion prediction, it is determined whether the selected decision region is Strong consistent motion trend, if yes, obtain the motion direction of the current frame as the global motion direction, obtain the corresponding direction decision, and end; if it is not the strong consistent motion trend, perform the weak decision of the global motion direction according to the motion of each region. By using the method of the invention, the compression ratio can be improved on the one hand, and the compression speed can be increased on the other hand, that is, when the video source with global motion is compressed, the motion prediction can be determined by means of unified judgment, without relying on relying only on macroblocks only. The sub-block motion prediction method sequentially determines each macro block sub-block. FIG. 1 is a flowchart of a motion prediction method for inter-frame coding according to an embodiment of the present invention, where the method includes the following steps:
S11 , 根据当前帧的相对变化复杂度信息所在的阈值范围, 判断是否进入 全局运动预测;  S11. Determine, according to a threshold range in which the relative change complexity information of the current frame is located, whether to enter the global motion prediction.
具体为: 如果当前帧的相对变化复杂度信息大于第一阈值, 则认为当前帧 与前一帧极度近似, 判定当前帧为 Skip帧 (即跳帧, 表示前后两帧相比近乎 无运动, 可直接复制前一帧图像); 如果当前帧它的相对变化复杂度信息在第 一阈值和第二阈值之间, 则不进入全局运动预测; 如果当前帧的相对变化复杂 度信息小于第二阈值, 则进入全局运动预测, 即进入步骤 S12。 其中第一阈值 大于第二阈值。 是否进入全局运动预测方法的程序描述如下: if(ti fr a rq^sThrfe); 则第 t帧与第 t-1帧极度近似, 判定第 t帧为 Skip帧 Specifically, if the relative change complexity information of the current frame is greater than the first threshold, the current frame is considered to be extremely similar to the previous frame, and the current frame is determined to be a Skip frame (ie, a frame skipping, indicating that the two frames are nearly motionless, Directly copying the previous frame image); if the relative change complexity information of the current frame is between the first threshold and the second threshold, the global motion prediction is not entered; if the relative change complexity information of the current frame is less than the second threshold, Then, the global motion prediction is entered, that is, the process proceeds to step S12. The first threshold is greater than the second threshold. The procedure for entering the global motion prediction method is as follows: if(ti fr a rq^sThrfe); Then the t-th frame is extremely similar to the t-1 frame, and the t-th frame is determined to be a Skip frame.
if (tis _ frames^ <Thres2)  If (tis _ frames^ <Thres2)
则运用全局运动预测方法进行预测  Forecast using global motion prediction method
if (Thres2<tis_ frame^ < hresl)  If (Thres2<tis_ frame^ < hresl)
则无全局运动趋势, 进入基于宏块、 块的运动预测 其中: Thresl Thres2为相应的第一阈值和第二阈值判定阈值  Then there is no global motion trend, and the motion prediction based on macroblock and block is entered. Where: Thresl Thres2 is the corresponding first threshold and second threshold decision threshold.
tis_ framest表示: 第 t帧的相对变化复杂度信息;  Tis_ framest represents: relative change complexity information of the t-th frame;
当前帧的相对变化复杂度信息求取方法如下:  The relative change complexity information of the current frame is obtained as follows:
A): 根据宏块运动信息、 宏块纹理信息提取各宏块相对变化复杂度信息; a) 宏块运动信息: 当前宏块内像素与前一帧相应宏块内的像素值  A): extracting relative change complexity information of each macroblock according to macroblock motion information and macroblock texture information; a) macroblock motion information: pixel values in the current macroblock and the corresponding macroblock in the previous frame
差值的均方差。  The mean square error of the difference.
ti― Mbt, = std[ ft(i,jl(i,j)e Mbt, )― ft_, (i,jl(i,j)e Mbt— ,' b) 宏块纹理信息: 当前宏块内像素值的均方差。 si— Mbt,m,n =std[ft(i,jl(i,j)eMbt, if(Si_Mbt,m,n=0) 贝 |J,判定当前宏块为单点宏块, 即整个宏块所有像素值即为相 同的一个像素值; Ti- Mb t , = std[ f t (i,jl(i,j)e Mb t , )― f t _, (i,jl(i,j)e Mb t — ,' b) macroblock texture information : The mean square error of the pixel values within the current macroblock. Si— Mb t , m , n =std[f t (i,jl(i,j) e Mb t , if(Si_Mb t , m , n =0) s |J, determine that the current macroblock is a single-point macroblock , that is, all pixel values of the entire macroblock are the same pixel value;
C) 宏块相对变化复杂度信息:
Figure imgf000006_0001
C) Macroblock relative change complexity information:
Figure imgf000006_0001
Mb, ^表示第 t帧第 m行 n列的宏块;  Mb, ^ represents the macroblock of the mth row and the nth column of the tth frame;
表示; 第 t-1帧第 mn列的宏块; ft( )表示第 t帧第 i行 j列的像素值; ft (i, j I (i, j ) e Mbt miJ表示; 表示第 t帧中属于 ^, I第 i行 j列的像素值; ft— i'j Ki'j)^— J: 第 t-1帧中属于1^ " 的第 i行 j列的像 Representation; macroblock of the mth row and nth column of the t-1th frame; f t ( ) represents the pixel value of the i th row j column of the tth frame; f t (i, j I (i, j ) e Mb t mi J Representation; indicates the pixel value of the i-th row and j column belonging to ^, I in the t-th frame; f t — i'j Ki'j)^— J: Image of the i-th row and j-th column belonging to 1 ^ " in the t -1th frame
std表不均方差; ti— Mb 表示: 的宏块运动信息; Std table uneven variance; ti-Mb represents: macroblock motion information;
si_Mbt 表示: 的宏块纹理信息; B): 基于宏块相对变化复杂度信息, 获取当前帧的相对变化复杂度信息 si_Mb t represents: macroblock texture information; B): acquires relative change complexity information of the current frame based on macroblock relative change complexity information
[coun^ ++ , tis_Mbtmn < ThresO [coun^ ++ , tis_Mb tmn < ThresO
tis_ framest = < ' ' Tis_ frames t = <''
coun^ , else 其中: ThresO为相应的第零判定阈值;  Coun^ , else where: ThresO is the corresponding zeroth decision threshold;
tis_ framest表示: 第 t帧的相对变化复杂度信息;  Tis_ framest represents: relative change complexity information of the t-th frame;
tilMb 表示: Mb 的宏块相对变化复杂度信息  tilMb means: Mb macroblock relative change complexity information
S12, 判断选定的判定区域是否为强一致性运动趋势, 如果是则获取当前 帧的运动方向为全局运动方向, 获取相应的方向判定, 结束; 如果否则进入步 骤 S13; 判定区域需同时满足以下条件: S12, determining whether the selected determination area is a strong consistent motion trend, if yes, acquiring a motion direction of the current frame as a global motion direction, obtaining a corresponding direction determination, and ending; if otherwise, proceeding to step S13; Condition:
条件 1: 判定区域为背景区域;  Condition 1: The decision area is the background area;
当存在全局运动时, 一般具有背景运动趋势一致, 而前景则一般 存在相对运动的特点;  When there is global motion, there is generally a consistent trend in background motion, while the foreground generally has the characteristics of relative motion;
条件 2: 至少选取两个判定区域;  Condition 2: Select at least two decision areas;
条件 3: 在每个判定区域作所有方向的检测;  Condition 3: Detection of all directions in each decision area;
所有方向包括: 左侧运动、 右侧运动、 上侧运动、 下侧运动、 静 止;  All directions include: left side motion, right side motion, upper side motion, lower side motion, static;
具体实施时可根据需要及计算量的综合考虑选取更多或更少的方 向。 考虑实际运动中以水平、 垂直、 静止三种运动最为常见, 本发明实施例以 左侧运动、 右侧运动、 上侧运动、 下侧运动、 静止这五种方向为例进行说明。 "判断选定的判定区域是否为强一致性运动趋势"具体方法为 In the specific implementation, more or less directions can be selected according to the comprehensive consideration of the needs and the calculation amount. Considering that the three movements of horizontal, vertical and stationary are the most common in actual exercise, the embodiment of the present invention The five directions of left side motion, right side motion, upper side motion, lower side motion, and stationary are explained as an example. "Determining whether the selected decision area is a strong consistent motion trend"
S121: 以宏块为单位, 求取判定区域内的宏块预测方向; S121: Obtain a macroblock prediction direction in the determination area by using a macroblock as a unit;
II  II
本发明实施例中选定两个判定区域 Region^ Re gi。 , 对判定区域 Region^Regioi^内的宏块, 分别具体做如下计算: 计算左侧运动预测值和当前编码值差值的均方差, 获取左侧运动预测残差; 计算右侧运动预测值和当前编码值差值的均方差, 获取右侧运动预测残差; 计算上侧运动预测值和当前编码值差值的均方差, 获取上侧运动预测残差; 计算下侧运动预测值和当前编码值差值的均方差, 获取下侧运动预测残差; 计算静止预测值和当前编码值差值的均方差, 获取静止运动预测残差; 具体计算公式如下: diffLeft = - predL— f t- Λl,m , ,n (i,j)I bt,m,B G Re gioi^ Re gioi^ ] diffRight = std[ft,m,n(i,j) - predR_ - f t- ,l,m ,, ,n(i,j)I bt,m N G Re gio¾ uRegionJ diffUp = std[ft,m,n(i,j)_ predU_ f t-l,m ,n (i,j)I bt,m,n G Re gioi^ Re gioi^ ] diffDow„ = std[ft,m,n(i,j) - prec© ― f t- ,l,m , ,n(i,j)IMbt, NN G Re gioi¾ uRegionJ diffStatic - predS— f ,(i,j)I b ( G Re gior^ Re gio ] In the embodiment of the present invention, two determination areas Region^Re g i are selected. For the macroblocks in the decision area Region^Regioi^, the following calculations are respectively performed: Calculate the mean square error of the left motion prediction value and the current coded value difference, obtain the left motion prediction residual; Calculate the right motion prediction value and The mean square error of the current coded value difference, obtains the right motion prediction residual; calculates the mean square error of the upper motion prediction value and the current coded value difference, obtains the upper motion prediction residual; calculates the lower motion prediction value and the current coding The mean square error of the difference value is obtained, and the lower side motion prediction residual is obtained; the mean square error of the static predicted value and the current coded value difference is calculated, and the still motion prediction residual is obtained; the specific calculation formula is as follows: diff Left = - predL - f t- Λ l,m , ,n (i,j)I b t , m , B G Re gioi^ Re gioi^ ] d iff Right = std[f t , m , n (i,j) - predR_ - f t- ,l,m ,, , n (i,j)I b t , m N G Re gio3⁄4 uRegionJ diff Up = std[f t , m , n (i,j)_ predU_ f tl,m ,n (i, j) I b t , m , n G Re gioi^ Re gioi^ ] d iff Dow„ = std[f t , m , n (i,j) - prec© ― f t- ,l,m , , n ( i,j)IMb t , NN G Re gioi3⁄4 uRegionJ diff Static - p redS— f ,(i,j)I b ( G Re gior^ Re gio ]
其中: Mbt'm'n表示第 t帧第 m行 n列的宏块; —: 为当前编码第 t帧第 m行 n列的宏块; f'-(i'j): 为^ 中第 i行第 j列的像素值; Where: Mb t ' m ' n represents the macroblock of the mth row and n columns of the tth frame; —: is the macroblock of the mth row and the nth column of the current t frame; f'- (i ' j) : is ^ The pixel value of the i-th row and the j-th column;
ft( )表示第 t帧第 i行 j列的像素值; std表不均方差; 13 为左侧运动预测残差、 predL_ft . j)为利用前一帧图像对当前 宏块作左侧运动估计的预测值; f t ( ) represents the pixel value of the i-th row and j column of the t-th frame; the std table is unevenly variance; 13 is the left-side motion prediction residual, predL_f t . j) is the current frame image using the current frame The macroblock is the predicted value of the left motion estimation;
diff^ht为右侧 页测残; predR_ f , , , (i, j)为利用前一帧图像对当前  Diff^ht is the right side of the page; the predR_ f , , , (i, j) is the current image using the previous frame
Pr6dU- ' j)为利用前一帧图像对当前
Figure imgf000009_0001
precD_ f , , . (i, j)为利用前一帧图像对当前 宏块作下侧运动估计的预测值;
Pr6dU - ' j) is to use the previous frame image for the current
Figure imgf000009_0001
precD_ f , , . (i, j) is a predicted value for estimating the motion of the current macroblock using the image of the previous frame;
diffstatl。为静止运动预测残; predS _ ft_t n (i, j )为利用前一帧图像对当前 宏块作静止运动估计的预测值; Diff statl . Predicting the residual for the stationary motion; predS _ f t _ tn (i, j ) is the predicted value of the stationary motion estimation of the current macroblock using the image of the previous frame;
S122: 统计各区域中所有方向的运动宏块数; 即在各区域内, 宏块预测 残差最小的方向上运动宏块数加一; 各区域中所有方向为左侧运动、 右侧运 动、 上侧运动、 下侧运动、 静止方向;  S122: Count the number of motion macroblocks in all directions in each area; that is, in each area, the number of motion macroblocks in the direction in which the macroblock prediction residual is the smallest is increased by one; all directions in each area are left motion, right motion, Upper side movement, lower side movement, static direction;
各区域内, 运动宏块数统计方法的具体程序如下:  The specific procedures for the statistical method of the number of motion macroblocks in each area are as follows:
if
Figure imgf000009_0002
)
If
Figure imgf000009_0002
)
Count„ + +  Count„ + +
if
Figure imgf000009_0003
, diffUp , diffDowDt , diffStatic ) = diffKght )
If
Figure imgf000009_0003
, diff Up , diff DowDt , diff Static ) = diff Kght )
County」 + +  County" + +
if
Figure imgf000009_0004
, diffStatic ) = ddi p )
If
Figure imgf000009_0004
, diff Static ) = ddi p )
CountUp j + + Count Up j + +
if
Figure imgf000009_0005
, diffStatic ) = diffDownt )
If
Figure imgf000009_0005
, diff Static ) = diff Downt )
County , + +  County , + +
if
Figure imgf000009_0006
, diffUp , diffDowDt , diffStatic ) = diffStatic )
If
Figure imgf000009_0006
, diff Up , diff DowDt , diff Static ) = diff Static )
Count, wicJ + + 其中,
Figure imgf000010_0001
, CountUp j , Οηπ¾ Count^c」分别表示选定的判 定区域 Regies左侧运动、 右侧运动、 上侧运动、 下侧运动、 静止宏块的数量, 当 j等于 5或 6时, Re giQnj表示两个不同选定的判定区域; min(a,b,c,c,d)表示求五个值中的最小值;
Count, wicJ + + among them,
Figure imgf000010_0001
, Count Up j , Οηπ3⁄4 Count^c" respectively indicate the left side of the selected decision area Regies, the right side motion, the upper side motion, the lower side motion, and the number of still macroblocks. When j is equal to 5 or 6, Re giQn j represents two different selected decision regions; min(a, b, c, c, d) represents the minimum of the five values;
S123: 基于各区域中相应方向的运动宏块数的统计信息, 判定该区域的 信息是否可用;  S123: determining, according to the statistical information of the number of motion macroblocks in the corresponding direction in each area, whether the information of the area is available;
即一个区域内如果相反运动方向的宏块数的差值小于第一方向判定阈值 Thresdl或者该区域内五个运动方向 (左侧运动、 右侧运动、 上侧运动、 下侧运 动、 静止) 宏块数的最大值与次大值的差值小于第二方向判定阈值 l¾reSd2, 则 认为该区域的信息不可用。 That is, if the difference between the number of macroblocks in the opposite direction of motion in one region is smaller than the first direction determination threshold Thres dl or the five motion directions in the region (left side motion, right side motion, upper side motion, lower side motion, still motion) If the difference between the maximum value and the second largest value of the macroblock number is smaller than the second direction determination threshold l3⁄4re Sd2 , the information of the area is considered to be unavailable.
详细程序如下:  The detailed procedure is as follows:
if (absCCount^ j - CountRight j ) < Thresdl 11 abs(CountUp j - CountD ) < Thresdl II If (absCCount^ j - Count Right j ) < Thres dl 11 abs(Count Up j - Count D ) < Thres dl II
maxCCount^ j ,CountRight j ,CountUp j ,CountDown j ,CountStatic ^ ) - lessmaxiCount^ j ,CountRight j ,CountUp j ,CountDown j ,0皿 〕 ) < Ihres^) 贝 |J, 该区域信息不可用 maxCCount^ j ,Count Right j ,Count Up j ,Count Down j ,Count Static ^ ) - lessmaxiCount^ j ,Count Right j ,Count Up j ,Count Down j ,0 dish] ) < Ihres^) 贝|J, Area information is not available
其中, County j ,
Figure imgf000010_0002
, CountDown j , Counts^」分别表示选定的 判定区域 Region左侧运动、 右侧运动、 上侧运动、 下侧运动、 静止宏块的数 量, 当 j等于 5或 6时, Re gi°nj表示两个不同选定的判定区域; maX(a,b,C,C,d), leSsmu a,b,c,c,d)分别为求五个值中的最大值和次大值, hresdl为第一方向判定 阈值, 1¾^ 为第二方向判定阈值;
Among them, County j,
Figure imgf000010_0002
, Count Down j , Counts^" respectively indicate the left side motion, the right side motion, the upper side motion, the lower side motion, and the number of still macroblocks of the selected decision region Region. When j is equal to 5 or 6, Re gi ° n j represents two different selected decision regions; ma X ( a , b, C , C , d), le S smu a, b, c, c, d) respectively to find the maximum and the fifth of the five values A large value, hres dl is a first direction determination threshold, and 13⁄4^ is a second direction determination threshold;
S124: 根据选定的判定区域的运动趋势作所有运动方向的判定, 即一个区域内宏块数最多的运动方向, 则判定为该区域的运动方向; if ( Region,有效) 则获取其运动方向判定 I^ft , maxCCount^ j ,CountRight j ,CountUp j , CountD CountStatic ) = CountyS124: Determine the motion direction according to the motion trend of the selected determination region, that is, the motion direction with the largest number of macroblocks in one region, determine the motion direction of the region; if (Region, valid), obtain the motion direction determination I^ft , maxCCount^ j ,Count Right j ,Count Up j , Count D Count Static ) = County
Right , maxiCount^ j ,CountRight j ,CountUp j ,CountD ,CountStatic ^ ) = CountKght j directionj Up ,
Figure imgf000011_0001
= CountUp ,
Right , maxiCount^ j ,Count Right j ,Count Up j ,Count D ,Count Static ^ ) = Count Kght j directionj Up ,
Figure imgf000011_0001
= Count Up ,
Down , maxCCount^ j ,CountRight j , GountUp j , CountD j , Coun^^ j ) = CountD jDown , maxCCount^ j ,Count Right j , Gount Up j , Count D j , Coun^^ j ) = Count D j
Static , max Count^ ,CountRight j CountUp 'County , Counts tatic j ) = CountStatic j 其中 directioiij为选定的判定区域 Regionj的运动方向, 其分为左侧运动方向 Static , max Count^ ,Count Right j Count Up 'County , Counts tatic j ) = Count Static j where directioiij is the direction of motion of the selected decision region Regionj, which is divided into the left direction of motion
Left.右侧运动方向 Right、上侧运动方向 Up、下侧运动方向 Down、静止 Static; County j
Figure imgf000011_0002
, CountUp j , CountDown j , Count^c」分别表示区域 Re gio 左 侧运动、 右侧运动、 上侧运动、 下侧运动、 静止宏块的数量, 当 j等于 5或 6 时, Re gi°nj表示两个不同的选定的判定区域; maX(a,b,C,c,d)表示求五个值中的 最大值;
Left. Right side motion direction Right, upper side motion direction Up, lower side motion direction Down, static Static; County j
Figure imgf000011_0002
, Count Up j , Count Down j , Count^c" respectively indicate the area Re gio left side motion, right side motion, upper side motion, lower side motion, number of still macroblocks, when j is equal to 5 or 6, Re gi ° n j represents two different selected decision regions; ma X ( a , b, C , c, d) represents the maximum of the five values;
S125 : 根据各区域的运动, 进行全局运动方向的强判定; S125: performing strong determination of the global motion direction according to the motion of each region;
即两个区域的运动方向一致且都不属于静止方向,并且每个区域相应运动 方向上的宏块数大于相应第三方向判定阈值 Thresd3; 或者两个区域的运动方向 不一致但其中一个区域运动方向为静止并且另一非静止方向的区域其相应运 动方向的宏块数大于相应第四方向判定阈值 hreSd4 ; 那么即可获取全局运动方 向, 结束全局运动预测判断, 否则, 进入 S13 That is, the motion directions of the two regions are consistent and do not belong to the stationary direction, and the number of macroblocks in the corresponding motion direction of each region is greater than the corresponding third direction determination threshold Thres d3 ; or the motion directions of the two regions are inconsistent but one of the regions is motion The number of macroblocks whose direction is stationary and the other non-stationary direction is greater than the corresponding fourth direction determination threshold hre Sd4; then the global motion direction can be obtained, and the global motion prediction judgment is ended; otherwise, the process proceeds to S13.
if ((direction = directioi¾&&directicn5≠ Static&& If ((direction = directioi3⁄4&&directicn 5 ≠ Static&&
Countdirectlon]_5 > Thresd3&&Countd 6 > Thresd3 ) ll Count directlon] _ 5 > Thres d3 &&Count d 6 > Thres d3 ) ll
(direction≠ directioi% ) & &dii-ectioi% = Static&&Countdirecti n 5 > Thresd4))
Figure imgf000011_0003
directioi an = direction^ 获取方向结束全局运动预测判断 else
(direction≠ directioi% ) &&dii-ectioi% = Static&& Direct directi n 5 > Thres d4 ))
Figure imgf000011_0003
Directioi an = direction^ Get direction end global motion prediction judgment else
if (direction≠ direction ) & &directioi¾ = Static&&Countdirection 6 > lhresd4 )) directiof = direction, 获取方向结束全局运动预测判断 否则, 进入 S13 If (direction≠ direction ) &&directioi3⁄4 = Static&&Count direction 6 > lhres d4 )) Directiof = direction, get direction end global motion prediction judgment otherwise, enter S13
其中 directiof为第 t帧的运动方向, ThreSd3 Thresd4分别为第三方向判定阈值 和第四方向判定阈值; Wherein directiof is the motion direction of the t-th frame, and Thre Sd3 Thres d4 is the third direction determination threshold and the fourth direction determination threshold respectively;
directiorij J定区域 Re gi。 的运动方向 directioi% J定区域 Re g oiig的运动方向 Directiorij J is the area Re gi. Direction of movement directioi% J-direction area Re g oiig direction of movement
Coun^— 5 判定区域 Re gi。 的运动方向上的宏块数 Coun^ —5 determines the region Re g i. Number of macroblocks in the direction of motion
C 判定区域 Re gies的运动方向上的宏块数 C Judgment area Number of macroblocks in the direction of motion of Re gies
S13 , 根据各区域的运动, 进行全局运动方向的弱判定;  S13, performing a weak determination of the global motion direction according to the motion of each region;
具体方法步骤如下:  The specific method steps are as follows:
S131 : 计算各类区域的方向差值 mn, 即计算各区域最大运动方向宏 数与次大运动方向宏块数的差值, 同类区域的最小值即为该类区域的方向 值;  S131: Calculating the difference value mn of each type of area, that is, calculating the difference between the maximum moving direction macro number and the sub-large moving direction macroblock number of each area, and the minimum value of the same type area is the direction value of the type area;
if (Region5 Region6均有效) If (Region5 Region 6 is valid)
mn = rmn(max(CountLett ,CountRight j , CountUp j ,CountDown j , Coun ,^ d ) - lessmax(CountLett ,CountRight j ,CountUp j ,CountDown j ,CountStatic」 )) Mn = rmn(max(Count Lett ,Count Right j , Count Up j ,Count Down j , Coun ,^ d ) - lessmax(Count Lett ,Count Right j ,Count Up j ,Count Down j ,Count Static ”))
if (只 Regio 有效)  If (only Regio is valid)
mn = minCmaxCCount^ , CountRight j ,CountUp j , CountDown j ^ou ,^ ) - lessmaxiCount^ , CountRight j ,CountUp j , CountDown j 'County )) Mn = minCmaxCCount^ , Count Right j , Count Up j , Count Down j ^ou ,^ ) - lessmaxiCount^ , Count Right j ,Count Up j , Count Down j 'County ))
if (只 Reg 有效)  If (only Reg is valid)
mn = minCmaxCCount^ ,CountRight j ,CountUp j ,CountDown」 County,」 ) - lessmaxiCount^ ,CountRight j , CountUp j ,CountDown j , Coimt 」 S132: 即根据各区域各类情况择优选取, 确定全局运动方向; 如果两个区域信息只有一个区域有效, 如果满足该区域运动方向的宏块数小于相应的第五方向判定阈值 1¾^ 且该区域的方向差值满足相应的第六方向判定阈值 ThreSd6 ; 或 者满足该区域运动方向的宏块数大于相应的第七方向判定阈值Mn = minCmaxCCount^ ,Count Right j ,Count Up j ,Count Down 》 County,” ) - lessmaxiCount^ ,Count Right j , Count Up j ,Count Down j , Coimt ” S132: determining the global motion direction according to various conditions of each region; if only one region of the two region information is valid, if the number of macroblocks satisfying the motion direction of the region is smaller than the corresponding fifth direction determination threshold 13⁄4^ and the region The direction difference value satisfies the corresponding sixth direction determination threshold Thr eSd6; or the number of macroblocks satisfying the motion direction of the area is greater than the corresponding seventh direction determination threshold
Thresd7; 则全局运动方向即为该有效区域的运动方向; 详细程序描述如下: Thres d7 ; then the global direction of motion is the direction of motion of the active area; the detailed procedure is described as follows:
if ((只 Regioi^有效 & &  If ((Regioi^ only works & &
(Coun^ ,5 < lhresd5 & &mn > Thresd6) II (0 ΐιη^∞ι1η5 ,5 > Thresd7 )) II (只 Regioi^有效 && (Coun ^, 5 <lhres d5 &&mn> Thres d6) II (0 ΐιη ^ ∞ι1. Η5, 5> Thres d7)) II ( valid only Regioi ^ &&
(Coun^ ^ ,6 < l¾reSd5 & &mn > l¾resd6 ) II (Coun^ ^ ,6 < Thresd7 ))) (Coun^ ^ ,6 < l3⁄4re Sd5 &&mn> l3⁄4res d6 ) II (Coun^ ^ ,6 < Thres d7 )))
directioi frame = direction!, Regio |^ ¾ Directioi frame = direction!, Regio |^ 3⁄4
else  Else
无全局运动  No global movement
本发明实施例提出一种帧间编码的运动预测方法,先根据当前帧的相对变 化复杂度信息所在的阈值范围,判断是否进入全局运动预测; 如果是进入全局 运动预测,判断选定的判定区域是否为强一致性运动趋势, 如果是则获取当前 帧的运动方向为全局运动方向, 获取相应的方向判定, 结束; 如果不是强一致 运动趋势, 则根据各区域的运动, 进行全局运动方向的弱判定。利用本发明方 法, 一方面可以提升压縮率, 另一方面可以提升压縮速度, 即对存在全局运动 的视频源进行压縮时, 可通过统一判断的方式确定运动预测, 而无需像仅依赖 基于宏块、 子块的运动预测方法对每个宏块子块依次作判断。 The embodiment of the invention provides a motion prediction method for inter-frame coding, which first determines whether to enter global motion prediction according to a threshold range in which the relative change complexity information of the current frame is located; if it is a global motion prediction, determines the selected decision region. Whether it is a strong consistent motion trend, if yes, obtain the motion direction of the current frame as the global motion direction, obtain the corresponding direction decision, and end; if it is not a strong consistent motion trend, the global motion direction is weak according to the motion of each region determination. By using the method of the invention, the compression ratio can be improved on the one hand, and the compression speed can be increased on the other hand, that is, when the video source with global motion is compressed, the motion prediction can be determined by means of unified judgment, without relying on relying only on The macroblock and subblock based motion prediction method sequentially determines each macroblock subblock.
如图 2所示为本发明实施例一种帧间编码的运动预测系统结构示意图,系 统包括: FIG. 2 is a schematic structural diagram of a motion prediction system for inter-frame coding according to an embodiment of the present invention. The system includes:
进入全局运动预测判断模块:用于根据当前帧的相对变化复杂度信息所在 的阈值范围,判断是否进入全局运动预测; 即如果当前帧的相对变化复杂度信 息大于第一阈值,则认为当前帧与前一帧极度近似,判定当前帧为 Skip帧(即 跳帧, 表示前后两帧近乎无运动, 可直接复制前一帧图像) ; 如果当前帧它的 相对变化复杂度信息在第一阈值和第二阈值之间, 则不进入全局运动预测; 如 果当前帧的相对变化复杂度信息小于第二阈值, 则进入全局运动预测, 即进入 强一致性运动趋势判断模块, 其中第一阈值大于第二阈值。  The global motion prediction and determination module is configured to determine whether to enter the global motion prediction according to the threshold range in which the relative change complexity information of the current frame is located; that is, if the relative change complexity information of the current frame is greater than the first threshold, the current frame is considered to be The previous frame is extremely approximate, and the current frame is determined to be a Skip frame (ie, a skip frame, indicating that the two frames before and after the motion is almost motionless, and the previous frame image can be directly copied); if the current frame has its relative change complexity information at the first threshold and the first Between the two thresholds, the global motion prediction is not entered; if the relative change complexity information of the current frame is smaller than the second threshold, the global motion prediction is entered, that is, the strong consistency motion trend judgment module is entered, where the first threshold is greater than the second threshold. .
强一致性运动趋势判断模块:判断选定的判定区域是否为强一致性运动趋 势, 如果是则获取当前帧为全局运动, 获取相应的方向判定, 结束; 如果否则 进入弱一致性运动趋势判断模块;  Strong consistency motion trend judgment module: judge whether the selected decision area is a strong consistent motion trend, if yes, obtain the current frame as a global motion, obtain a corresponding direction determination, and end; if otherwise enter a weak consistency motion trend judgment module ;
"判断选定的判定区域是否为强一致性运动趋势"具体为:  "Determining whether the selected decision area is a strong consistent motion trend" is specifically:
以宏块为单位, 求取判定区域内的宏块预测方向;  Obtaining a macroblock prediction direction in the determination region in units of macroblocks;
统计各区域中所有方向的运动宏块数;  Count the number of motion macroblocks in all directions in each region;
基于各区域中相应方向的运动宏块数的统计信息,判定该区域的信息是否 可用;  Determining whether information of the area is available based on statistical information of the number of motion macroblocks in corresponding directions in each area;
根据选定的判定区域的运动趋势作所有运动方向的判定;  Determining all directions of motion based on the trend of motion of the selected decision zone;
根据各区域的运动, 进行全局运动方向的强判定;  According to the movement of each region, a strong judgment of the global motion direction is performed;
弱一致性运动趋势判断模块,判断选定的判定区域是否为弱一致性运动趋 势, 如果是则获取当前帧相应的方向判定, 结束; 如果否则判定当前帧不存在 全局运动;  The weak consistency motion trend judging module judges whether the selected judging region is a weakly consistent motion trend, and if yes, obtains a corresponding direction judgment of the current frame, and ends; if otherwise, determines that the current frame does not have a global motion;
"判断选定的判定区域是否为弱一致性运动趋势"具体为: 计算各类 区域的方向差值,即计算各区域最大运动方向宏块数与次大运动方向宏块数的 差值, 同类区域的最小值即为该类区域的方向差值; 即根据各区域各类情况择 优选取, 确定全局运动方向;  "Determining whether the selected decision area is a weakly consistent motion trend" is specifically: calculating the direction difference of each type of area, that is, calculating the difference between the maximum number of motion direction macroblocks and the sub-large motion direction macroblocks of each area, The minimum value of the region is the difference in direction of the region; that is, according to the various conditions of each region, the global motion direction is determined;
各类情况为:  The various situations are:
如果两个区域信息只有一个区域有效,  If only two areas of the two area information are valid,
如果满足该区域运动方向的宏块数小于相应的第五方向判定阈值且 该区域的方向差值满足相应的第六方向判定阈值;或者满足该区域运 动方向的宏块数大于相应的第七方向判定阈值; If the number of macroblocks satisfying the direction of motion of the region is less than the corresponding fifth direction determination threshold and The direction difference value of the region satisfies the corresponding sixth direction determination threshold; or the number of macroblocks satisfying the motion direction of the region is greater than the corresponding seventh direction determination threshold;
则全局运动方向即为该有效区域的运动方向;  Then the global direction of motion is the direction of motion of the active area;
本发明实施例提出一种帧间编码的运动预测方法,先根据当前帧的相对变 化复杂度信息所在的阈值范围,判断是否进入全局运动预测; 如果是进入全局 运动预测,判断选定的判定区域是否为强一致性运动趋势, 如果是则获取当前 帧的运动方向为全局运动方向, 获取相应的方向判定, 结束; 如果不是强一致 运动趋势, 则根据各区域的运动, 进行全局运动方向的弱判定。利用本发明方 法, 一方面可以提升压缩率, 另一方面可以提升压缩速度, 即对存在全局运动 的视频源进行压缩时, 可通过统一判断的方式确定运动预测, 而无需像仅依赖 基于宏块、 子块的运动预测方法对每个宏块子块依次作判断。  The embodiment of the invention provides a motion prediction method for inter-frame coding, which first determines whether to enter global motion prediction according to a threshold range in which the relative change complexity information of the current frame is located; if it is a global motion prediction, determines the selected decision region. Whether it is a strong consistent motion trend, if yes, obtain the motion direction of the current frame as the global motion direction, obtain the corresponding direction decision, and end; if it is not a strong consistent motion trend, the global motion direction is weak according to the motion of each region determination. By using the method of the invention, the compression ratio can be improved on the one hand, and the compression speed can be increased on the other hand, that is, when the video source with global motion is compressed, the motion prediction can be determined by means of unified judgment, without relying on relying only on macroblocks only. The sub-block motion prediction method sequentially determines each macro block sub-block.
本领域的普通技术人员可以理解,实现上述实施例方法中的全部或部分步 骤是可以通过程序指令相关硬件来完成的,所述的程序可以存储于一计算机可 读取存储介质中, 所述的存储介质可以为 R0M、 RAM, 磁盘、 光盘等。  It will be understood by those skilled in the art that all or part of the steps of the foregoing embodiments may be implemented by a program instruction related hardware, and the program may be stored in a computer readable storage medium. The storage medium may be a ROM, a RAM, a magnetic disk, an optical disk, or the like.
以上所述仅为本发明的较佳实施例而已, 并不用以限制本发明, 凡在本发 明的精神和原则之内所作的任何修改、等同替换和改进等, 均应包含在本发明 的保护范围之内。  The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. Within the scope.

Claims

权 利 要 求 Rights request
1、 一种帧间编码的运动预测方法, 其特征在于, 所述方法包括: 根据当前帧的相对变化复杂度信息所在的阈值范围, 判断是否进入全局运 动预测, 如果是, 则 判断选定的判定区域是否为强一致性运动趋势, 如果是, 则 获取当前帧为全局运动, 获取相应的方向判定, 结束。 An inter-frame coding motion prediction method, the method comprising: determining whether to enter a global motion prediction according to a threshold range in which a relative change complexity information of a current frame is located, and if yes, determining the selected Determine whether the area is a strong consistent motion trend. If yes, obtain the current frame as a global motion, obtain the corresponding direction determination, and end.
2、 如权利要求 1所述的帧间编码的运动预测方法, 其特征在于, 所述步 骤 "判断选定的判定区域是否为强一致性运动趋势"还包括如果选定的区域不 是强一致运动趋势, 则根据各区域的运动, 进行全局运动方向的弱判定。  2. The motion prediction method of interframe coding according to claim 1, wherein said step of "determining whether the selected determination region is a strong consistency motion trend" further comprises if the selected region is not a strong uniform motion The trend is based on the motion of each region, and the weak determination of the global motion direction is performed.
3、 如权利要求 1所述的帧间编码的运动预测方法, 其特征在于, 所述根据 当前帧的相对变化复杂度信息所在的阈值范围,判断是否进入全局运动预测具 体为: 3. The inter-frame coding motion prediction method according to claim 1, wherein the determining whether to enter the global motion prediction according to a threshold range in which the relative change complexity information of the current frame is located is:
如果当前帧的相对变化复杂度信息大于第一阈值,则认为当前帧与前一帧 极度近似, 判定当前帧为跳帧, 所述跳帧表示前后两帧相比近乎无运动; 如果当前帧的相对变化复杂度信息在所述第一阈值和第二阈值之间,则不 进入全局运动预测, 所述第一阈值大于所述第二阈值;  If the relative change complexity information of the current frame is greater than the first threshold, the current frame is considered to be extremely similar to the previous frame, and the current frame is determined to be a skip frame, and the skip frame indicates that there is almost no motion compared to the previous two frames; if the current frame is The relative change complexity information is between the first threshold and the second threshold, and then does not enter global motion prediction, where the first threshold is greater than the second threshold;
如果当前帧的相对变化复杂度信息小于所述第二阈值,则进入全局运动预 测, 判断选定的判定区域是否为强一致性运动趋势。  If the relative change complexity information of the current frame is less than the second threshold, then the global motion prediction is entered to determine whether the selected decision region is a strong consistent motion trend.
4、 如权利要求 1所述的帧间编码的运动预测方法, 其特征在于, 所述当前 帧的相对变化复杂度信息求取方法如下: 根据宏块运动信息、 宏块纹理信息提取各宏块相对变化复杂度信息; 基于宏块相对变化复杂度信息, 获取当前帧的相对变化复杂度信息。  4. The motion prediction method of interframe coding according to claim 1, wherein the method for determining relative change complexity information of the current frame is as follows: extracting each macroblock according to macroblock motion information and macroblock texture information. Relative change complexity information; acquiring relative change complexity information of the current frame based on the macroblock relative change complexity information.
5、 如权利要求 4所述的帧间编码的运动预测方法, 其特征在于, 所述根据 宏块运动信息、 宏块纹理信息提取各宏块相对变化复杂度信息具体为: 求取宏块运动信息:即当前宏块内像素与前一帧相应宏块内的像素值差值 的均方差; The inter-frame coding motion prediction method according to claim 4, wherein the extracting the relative change complexity information of each macroblock according to the macroblock motion information and the macroblock texture information is specifically: Obtaining macroblock motion information: that is, a mean square error of a pixel value difference between a pixel in the current macroblock and a corresponding macroblock in the previous frame;
ti _ bt. = std[ ft (i, jl(i,j)e Mbt. )― ft_, (i, jl(i,j)e Mbt— 求取宏块纹理信息: 即当前宏块内像素值的均方差; Ti _ b t . = std[ f t (i, jl(i,j)e Mb t . )― f t _, (i, jl(i,j)e Mb t — find the macroblock texture information: ie The mean square error of the pixel values in the current macroblock;
si_Mbt>m>n =std[ft(i,jl(i,j)eMbt^n)] 当 si_Mbf.m.n=0时, 则判定当前宏块为单点宏块, 即整个宏块 所有像素值即为相同的一个像素值; 求取宏块相对变化复杂度信息 si_Mb t>m>n =std[f t (i,jl(i,j)eMb t ^ n )] When si_Mb f . m . n =0, it is determined that the current macroblock is a single-point macroblock, that is, the whole All pixel values of the macroblock are the same pixel value; the macroblock relative change complexity information is obtained.
ti_Mb /si一 Mbt ti_Mb /si-Mb t
tis Mb,  Tis Mb,
0 si_Mb,m =0 其中: 表示第 t帧第 m行 n列的宏块; 0 si_Mb, m =0 where: represents the macroblock of the mth row and nth column of the tth frame;
Mb'-1 表示; 第 t- 1帧第 m行 n列的宏块; Mb'- 1 represents a macroblock of the mth row and the nth column of the t-1th frame;
f^j)表示第 t帧第 i行 j列的像素值; f^j) represents the pixel value of the jth column in the i-th row of the t-th frame;
ft(i,j I (i, j) e Mbt,m,n)表示第 t帧中属于^ 的第 i行 j列的像f t (i, j I (i, j) e Mb t , m , n ) represents the image of the i-th row j column belonging to ^ in the t-th frame
1 Mb,  1 Mb,
ft— ^jK ^M lmn)表示第 t- 帧中属于 '- 的第 i行 j列的像素值; std表不均方差; f t — ^jK ^M lmn ) represents the pixel value of the i-th row j column belonging to '- in the t-frame; std table unevenness variance;
ti_Mbtmn表示: ^ 的宏块运动信息; ti_Mb tmn represents: macroblock motion information of ^;
sLMbt,m,n 示: 的宏块纹理信息。 sLMb t , m , n show: macroblock texture information.
6、 如权利要求 4所述的帧间编码的运动预测方法, 其特征在于, 所述基于 宏块相对变化复杂度信息, 获取当前帧的相对变化复杂度信息具体为: The inter-frame coding motion prediction method according to claim 4, wherein the obtaining the relative change complexity information of the current frame based on the macroblock relative change complexity information is specifically:
. fcoun^ ++ , tis_Mbtmn < ThresO . fcoun^ ++ , tis_Mb tmn < ThresO
tis— framest = < ' ' Tis- frames t = <''
coun^ , else 其中: ThresO为相应的第零判定阈值; framest 第 t帧的相对变化复杂度信息; Coun^ , else where: ThresO is the corresponding zeroth decision threshold; t-th frame relative change in Frames t complexity information;
Mb— ^  Mb— ^
的宏块相对变化复杂度信息  Macroblock relative change complexity information
7、 如权利要求 1所述的帧间编码的运动预测方法, 其特征在于, 所述判定区域需同时满足以下条件: 条件 1 : 判定区域为背景区域; 条件 2 : 至少选取两个判定区域; 条件 3 : 在每个判定区域作所有方向的检测, 所有方向包括: 左侧运动、 右侧运动、 上侧运动、 下侧运动、 静止。 7. The motion prediction method of interframe coding according to claim 1, wherein the determination area needs to satisfy the following conditions simultaneously: Condition 1: the determination area is a background area; Condition 2: at least two determination areas are selected; Condition 3: Detection of all directions is made in each decision area, all directions include: left side motion, right side motion, upper side motion, lower side motion, and still motion.
8、 如权利要求 7所述的帧间编码的运动预测方法, 其特征在于, 所述条 件 3可替换为:在每个判定区域,根据需要及计算量的综合考虑选取不同的方 向进行检测。  8. The inter-frame coding motion prediction method according to claim 7, wherein the condition 3 is replaceable by: in each of the determination regions, different directions are selected for detection according to the comprehensive consideration of the need and the calculation amount.
9、 如权利要求 1所述的帧间编码的运动预测方法, 其特征在于, 所述判断选定的判定区域是否为强一致性运动趋势具体包括以下步骤: 以宏块为单位, 求取判定区域内的宏块预测方向;  9. The motion prediction method of interframe coding according to claim 1, wherein the determining whether the selected determination region is a strong consistency motion trend specifically comprises the following steps: determining a macroblock as a unit The prediction direction of macroblocks in the area;
统计各区域中所有方向的运动宏块数;  Count the number of motion macroblocks in all directions in each region;
于各区域中相应方向的运动宏块数的统计信息,判定该区域的信息是否  The statistical information of the number of motion macroblocks in the corresponding direction in each area, determining whether the information of the area is
根据选定的判定区域的运动趋势作所有运动方向的判定; 根据各区域的运动方向, 进行全局运动方向的强判定。 The determination of all the movement directions is made according to the movement tendency of the selected determination region; the strong determination of the global movement direction is performed according to the movement direction of each region.
10、 如权利要求 9所述的帧间编码的运动预测方法, 其特征在于, 所述以 宏块为单位, 求取判定区域内的宏块预测方向具体为: 对所选定的判定区域内的宏块, 分别具体做如下计算 计算左侧运动预测值和当前编码值差值的均方差, 获取左 计算右侧运动预测值和当前编码值差值的均方差, 获取右 计算上侧运动预测值和当前编码值差值的均方差, 获取上侧运动预测残差; 计算下侧运动预测值和当前编码值差值的均方差, 获取下侧运动预测残差; 计算静止预测值和当前编码值差值的均方差, 获取静止运动预测残差。 The motion estimation method of interframe coding according to claim 9, wherein the macroblock prediction direction in the determination region is determined in units of macroblocks, specifically: in the selected determination region The macroblocks are respectively calculated as follows to calculate the mean square error of the difference between the left motion prediction value and the current code value difference, and obtain the mean square error of the left calculation of the right motion prediction value and the current code value difference, and obtain the right Calculating the mean square error of the difference between the upper motion prediction value and the current coding value difference, obtaining the upper motion prediction residual; calculating the mean square difference between the lower motion prediction value and the current coding value difference, and obtaining the lower motion prediction residual; The mean square error of the difference between the predicted value and the current encoded value is obtained as a stationary motion prediction residual.
11、 如权利要求 10所述的帧间编码的运动预测方法, 其特征在于, 所述 统计各区域中所有方向的运动宏块数具体为:  The motion prediction method of the inter-frame coding according to claim 10, wherein the counting the number of motion macroblocks in all directions in each area is specifically:
在各区域内, 宏块预测残差最小的方向上运动宏块数加一。  In each area, the number of motion macroblocks in the direction in which the macroblock prediction residual is the smallest is incremented by one.
12、 如权利要求 9所述的帧间编码的运动预测方法, 其特征在于, 所述基 于各区域中相应方向的运动宏块数的统计信息,判定该区域的信息是否可用具 体为:  12. The motion prediction method of interframe coding according to claim 9, wherein the statistical information of the number of motion macroblocks in the corresponding direction in each region determines whether the information of the region is:
一个区域内如果相反运动方向的宏块数的差值小于第一方向判定阈值或 者该区域内包括左侧运动、右侧运动、 上侧运动、 下侧运动和静止的五个运动 方向宏块数的最大值与次大值的差值小于第二方向判定阈值,则该区域的信息 不可用。  The difference between the number of macroblocks in the opposite direction of motion in one region is smaller than the first direction decision threshold or the number of macroblocks in the region including the left side motion, the right side motion, the upper side motion, the lower side motion, and the stationary five motion direction The difference between the maximum value and the next largest value is smaller than the second direction determination threshold, and the information of the area is not available.
13、 如权利要求 9所述的帧间编码的运动预测方法, 其特征在于, 所述根 据选定的判定区域的运动趋势作所有运动方向的判定具体为:  The motion prediction method of interframe coding according to claim 9, wherein the determining of the motion direction according to the selected motion region is:
将一个区域内宏块数最多的运动方向判定为该区域的运动方向。  The direction of motion in which the number of macroblocks in a region is the largest is determined as the direction of motion of the region.
14、 如权利要求 2所述的帧间编码的运动预测方法, 其特征在于, 所述根 据各区域的运动, 进行全局运动方向的强判定具体为:  14. The motion prediction method of interframe coding according to claim 2, wherein the determining the global motion direction based on the motion of each region is specifically:
如果两个判定区域的运动方向一致且都不属于静止方向,并且每个区域相 应运动方向上的宏块数大于相应第三方向判定阈值; 或者,  If the motion directions of the two decision regions are the same and do not belong to the stationary direction, and the number of macroblocks in the corresponding motion direction of each region is greater than the corresponding third direction determination threshold; or
两个区域的运动方向不一致但其中一个区域运动方向为静止,并且另一非 静止方向的区域其相应运动方向的宏块数大于相应第四方向判定阈值,那么即 可获取全局运动方向, 结束全局运动预测判断; 否则, 根据各区域的运动, 进行全局运动方向的弱判定"。 The motion directions of the two regions are inconsistent, but the motion direction of one of the regions is stationary, and the number of macroblocks in the corresponding motion direction of the other non-stationary region is greater than the corresponding fourth direction determination threshold, then the global motion direction can be obtained, and the global phase is ended. Motion prediction judgment; Otherwise, a weak judgment of the global motion direction is made according to the motion of each region."
15、 如权利要求 2所述的帧间编码的运动预测方法, 其特征在于, 所述根 据各区域的运动, 进行全局运动方向的弱判定具体包括:  The motion prediction method of the inter-frame coding according to claim 2, wherein the performing the weak determination of the global motion direction according to the motion of each region specifically includes:
计算各类区域的方向差值,即计算各区域最大运动方向宏块数与次大运动 方向宏块数的差值, 同类区域的最小值即为该类区域的方向差值;  Calculate the difference of the direction of each type of area, that is, calculate the difference between the number of macroblocks in the maximum motion direction and the number of macroblocks in the sub-large motion direction. The minimum value of the same type is the direction difference of the area.
根据各区域各类情况择优选取, 确定全局运动方向。  According to the various situations in each region, the optimal movement direction is determined.
16、 如权利要求 15所述的帧间编码的运动预测方法, 其特征在于, 所述 根据各区域各类情况择优选取, 确定全局运动方向具体为:  The method for predicting motion of an inter-frame coding according to claim 15, wherein the determining the global motion direction according to each region is:
如果两个区域信息只有一个区域有效,  If only two areas of the two area information are valid,
如果满足该区域运动方向的宏块数小于相应的第五方向判定阈值且 该区域的方向差值满足相应的第六方向判定阈值;或者满足该区域运 动方向的宏块数大于相应的第七方向判定阈值;  If the number of macroblocks satisfying the moving direction of the area is smaller than the corresponding fifth direction determining threshold and the direction difference of the area satisfies the corresponding sixth direction determining threshold; or the number of macroblocks satisfying the moving direction of the area is greater than the corresponding seventh direction Decision threshold
则全局运动方向即为该有效区域的运动方向。  Then the global direction of motion is the direction of motion of the active area.
17、 一种帧间编码的运动预测系统, 其特征在于, 所述系统包括进入全局 运动预测判断模块、 强一致性运动趋势判断模块和弱一致性运动趋势判断模 块, 其中,  17. An interframe-coded motion prediction system, the system comprising: a global motion prediction determination module, a strong consistency motion trend determination module, and a weak consistency motion trend determination module, wherein
进入全局运动预测判断模块:用于根据当前帧的相对变化复杂度信息所在 的阈值范围,判断是否进入全局运动预测; 即如果当前帧的相对变化复杂度信 息大于第一阈值, 则认为当前帧与前一帧极度近似, 判定当前帧为跳帧, 所述 跳帧表示前后两帧相比近乎无运动;如果当前帧的相对变化复杂度信息在所述 第一阈值和第二阈值之间, 则不进入全局运动预测, 其中所述第一阈值大于所 述第二阈值; 如果当前帧的相对变化复杂度信息小于所述第二阈值, 则进行全 局运动预测, 进入所述强一致性运动趋势判断模块执行; 强一致性运动趋势判断模块:用于判断选定的判定区域是否为强一致性运 动趋势, 如果是则获取当前帧为全局运动, 获取相应的方向判定; 如果否则进 入所述弱一致性运动趋势判断模块执行; The global motion prediction and determination module is configured to determine whether to enter the global motion prediction according to the threshold range in which the relative change complexity information of the current frame is located; that is, if the relative change complexity information of the current frame is greater than the first threshold, the current frame is considered to be The previous frame is extremely approximate, and the current frame is determined to be a skip frame, and the frame skip indicates that there is almost no motion compared to the previous two frames; if the relative change complexity information of the current frame is between the first threshold and the second threshold, Not entering the global motion prediction, where the first threshold is greater than the second threshold; if the relative change complexity information of the current frame is smaller than the second threshold, performing global motion prediction, entering the strong consistency motion trend judgment Module execution Strong consistency motion trend judgment module: used to judge whether the selected decision area is a strong consistent motion trend, if yes, obtain the current frame as a global motion, and obtain a corresponding direction determination; if otherwise enter the weak consistency motion trend Judging module execution;
弱一致性运动趋势判断模块:用于判断选定的判定区域是否为弱一致性运 动趋势, 如果是则获取当前帧相应的方向判定; 如果否则判定当前帧不存在全 局运动。  The weak consistency motion trend judging module is configured to judge whether the selected judging region is a weak coherent motion trend, and if yes, obtain a corresponding direction judgment of the current frame; if otherwise, determine that the current frame does not have a global motion.
PCT/CN2011/073504 2010-12-28 2011-04-29 Motion prediction method and system for inter frame encoding WO2012088811A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010610004.3A CN102547264B (en) 2010-12-28 2010-12-28 Motion prediction method and system of interframe coding
CN201010610004.3 2010-12-28

Publications (1)

Publication Number Publication Date
WO2012088811A1 true WO2012088811A1 (en) 2012-07-05

Family

ID=46353071

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/073504 WO2012088811A1 (en) 2010-12-28 2011-04-29 Motion prediction method and system for inter frame encoding

Country Status (2)

Country Link
CN (1) CN102547264B (en)
WO (1) WO2012088811A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103475883A (en) * 2013-09-26 2013-12-25 北京航空航天大学 HEVC motion estimation early termination method based on division of motion zones

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103327339B (en) * 2013-06-09 2016-08-10 深圳市云宙多媒体技术有限公司 The coded method of a kind of intra-frame prediction block division and system
CN109151467B (en) * 2018-09-10 2021-07-13 重庆邮电大学 Screen content coding inter-frame mode rapid selection method based on image block activity

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101489031A (en) * 2009-01-16 2009-07-22 西安电子科技大学 Adaptive frame rate up-conversion method based on motion classification
CN101547359A (en) * 2009-04-17 2009-09-30 西安交通大学 Rapid motion estimation self-adaptive selection method based on motion complexity
CN101754022A (en) * 2008-12-01 2010-06-23 三星电子株式会社 Motion estimation method with low complexity
CN101877790A (en) * 2010-05-26 2010-11-03 广西大学 Panoramic video coding-oriented quick global motion estimation method
CN101917627A (en) * 2010-08-20 2010-12-15 浙江大学 Video fault-tolerant coding method based on self-adaptation flexible macro-block order

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006096612A2 (en) * 2005-03-04 2006-09-14 The Trustees Of Columbia University In The City Of New York System and method for motion estimation and mode decision for low-complexity h.264 decoder
CN100571390C (en) * 2006-12-21 2009-12-16 联想(北京)有限公司 A kind of H264 video coding fast schema selection method and device
CN101127912B (en) * 2007-09-14 2010-11-17 浙江大学 Video coding method for dynamic background frames
CN101835044B (en) * 2010-04-23 2012-04-11 南京邮电大学 Grouping method in frequency domain distributed video coding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101754022A (en) * 2008-12-01 2010-06-23 三星电子株式会社 Motion estimation method with low complexity
CN101489031A (en) * 2009-01-16 2009-07-22 西安电子科技大学 Adaptive frame rate up-conversion method based on motion classification
CN101547359A (en) * 2009-04-17 2009-09-30 西安交通大学 Rapid motion estimation self-adaptive selection method based on motion complexity
CN101877790A (en) * 2010-05-26 2010-11-03 广西大学 Panoramic video coding-oriented quick global motion estimation method
CN101917627A (en) * 2010-08-20 2010-12-15 浙江大学 Video fault-tolerant coding method based on self-adaptation flexible macro-block order

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103475883A (en) * 2013-09-26 2013-12-25 北京航空航天大学 HEVC motion estimation early termination method based on division of motion zones
CN103475883B (en) * 2013-09-26 2016-07-06 北京航空航天大学 A kind of HEVC estimation divided based on moving region shifts to an earlier date terminating method

Also Published As

Publication number Publication date
CN102547264B (en) 2014-09-03
CN102547264A (en) 2012-07-04

Similar Documents

Publication Publication Date Title
WO2020135034A1 (en) Video encoding and decoding
CN101023674B (en) Method and apparatus for fast mode decision for interframes
US8693543B2 (en) Inter-frame prediction coding method, device and system
KR101218434B1 (en) Method and systems to estimate motion based on reconstructed reference frames at a video decoder
JP5303470B2 (en) Distortion estimation
CN108124154B (en) Method and device for quickly selecting inter-frame prediction mode and electronic equipment
US10051282B2 (en) Method for obtaining motion information with motion vector differences
RU2012134425A (en) VIDEO QUALITY ASSESSMENT TECHNOLOGY
JP7330243B2 (en) Method and apparatus for encoding or decoding video data in FRUC mode with reduced memory access
JP2013514714A5 (en)
WO2011153869A1 (en) Method, device and system for partition/encoding image region
KR20110133597A (en) System and method to process motion vectors of video data
JP5553979B2 (en) Selection of coding tools for video coding based on human visual tolerance
CN103384325A (en) Quick inter-frame prediction mode selection method for AVS-M video coding
CN101569198A (en) Decoding apparatus and decoding method
TW201143453A (en) Motion vector predictive coding method, motion vector predictive decoding method, moving picture coding apparatus, moving picture decoding apparatus, and programs thereof
WO2012088811A1 (en) Motion prediction method and system for inter frame encoding
JP5911563B2 (en) Method and apparatus for estimating video quality at bitstream level
CN101895739A (en) Block statistical characteristic-based block matching rule and block statistical characteristic-based intra-frame encoding mode selection method
CN103634600B (en) A kind of Video Encoding Mode system of selection based on SSIM evaluation, system
CN102447902B (en) Method for selecting reference field and acquiring time-domain motion vector
JP5748225B2 (en) Moving picture coding method, moving picture coding apparatus, and moving picture coding program
CN102572418B (en) Motion prediction method and motion prediction system of interframe encoding
WO2021045655A3 (en) Method and apparatus for intra prediction
JP2006211192A5 (en)

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11853117

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 14-11-2013)

122 Ep: pct application non-entry in european phase

Ref document number: 11853117

Country of ref document: EP

Kind code of ref document: A1