CN108271028A - One sub-pixel all direction search method and device - Google Patents

One sub-pixel all direction search method and device Download PDF

Info

Publication number
CN108271028A
CN108271028A CN201611265924.XA CN201611265924A CN108271028A CN 108271028 A CN108271028 A CN 108271028A CN 201611265924 A CN201611265924 A CN 201611265924A CN 108271028 A CN108271028 A CN 108271028A
Authority
CN
China
Prior art keywords
block
sub
pixel
encoded
search
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.)
Pending
Application number
CN201611265924.XA
Other languages
Chinese (zh)
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.)
BEIJING UNION VOOLE TECHNOLOGY Co Ltd
Original Assignee
BEIJING UNION VOOLE TECHNOLOGY Co Ltd
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 BEIJING UNION VOOLE TECHNOLOGY Co Ltd filed Critical BEIJING UNION VOOLE TECHNOLOGY Co Ltd
Priority to CN201611265924.XA priority Critical patent/CN108271028A/en
Publication of CN108271028A publication Critical patent/CN108271028A/en
Pending legal-status Critical Current

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
    • 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/523Motion estimation or motion compensation with sub-pixel accuracy

Landscapes

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

Abstract

The invention discloses a sub-pixel all direction search method and devices, and larger to solve calculation amount existing for prior art sub-pixel full search process, computation complexity is higher, the problem of causing code efficiency relatively low.The method specifically includes:For the first sub-block to be encoded in frame to be encoded, the search of the first pixel precision is carried out in reference frame image block;When searching prediction block, the prediction block is obtained in reference frame image location information in the block;Wherein, the prediction block is identical with the size of the described first sub-block to be encoded;When the corresponding matching error of the location information is found in pre-stored correspondence, using the matching error as the matching error between the prediction block and first sub-block to be encoded.

Description

One sub-pixel all direction search method and device
Technical field
The present invention relates to technical field of video coding more particularly to a sub-pixel all direction search methods and device.
Background technology
It is superfluous in order to reduce the time there is very strong temporal correlation, that is, time redundancy between the consecutive frame of video sequence It is remaining, code efficiency is improved, inter-frame prediction techniques are employed in coding protocol.
Inter-frame prediction techniques reduce the time redundancy information between video frame by using Block- matching.Block- matching is to seek Optimal block of pixels of the block to be encoded of present frame in reference frame is looked for, the optimal block of pixels is the matching with the block to be encoded The block of pixels of error minimum.Block- matching includes whole pixel Block- matching and sub-pixel Block- matching, and matching during whole pixel Block- matching misses Difference can pass through absolute error and (English:Sum of absolute differences, referred to as:) or mean square deviation (English SAD Text:Mean Square Error, referred to as:MSE) or absolute mean deviation is (English:Mean Absolute Difference, letter Claim:MAD) scheduling algorithm calculates.Optimal pixel left upper apex pixel in the block is optimal whole pixel.During sub-pixel Block- matching Matching error can pass through the Ha Deman transformed values (English of absolute error sum:Sum of Absolute Transformed Difference, referred to as:SATD it) calculates.
Coding protocol follows a kind of coding mode of recursive structure, and the macro block by a 16x16 is needed to be further divided into The sub-block of 16x8,8x16,8x8,4x4, minimum sub-block are 4x4.And then it can regard a 16x16 macro block as two The sub-block of 16x8 or 8x16 or the sub-block for regarding 4 8x8 as, and so on.Sub-pixel full search process is first macro to 16x16 Block scans for, followed by the gradually search refinement process of the sub-blocks such as 16x8,8x16,8x8, finally by comparison match error Obtain optimal block of pixels.
During sub-pixel full search, calculated using SATD, and SATD not only wants calculation code block when calculating Residual error between prediction block will also carry out residual error Ha Deman transformation, thus calculate it is comparatively laborious, and calculation amount compared with Greatly, computation complexity is higher, causes code efficiency relatively low.
Invention content
The embodiment of the present invention provides a sub-pixel all direction search method and device, complete to solve prior art sub-pixel Calculation amount is larger existing for search process, and computation complexity is higher, the problem of causing code efficiency relatively low.
In a first aspect, an embodiment of the present invention provides a sub-pixel all direction search method, including:
For the first sub-block to be encoded in frame to be encoded, searching for the first pixel precision is carried out in reference frame image block Rope;
When searching prediction block, the prediction block is obtained in reference frame image location information in the block;Wherein, institute It is identical with the size of the described first sub-block to be encoded to state prediction block;
When the corresponding matching error of the location information is found in pre-stored correspondence, by the matching error As the matching error between the prediction block and first sub-block to be encoded;
Wherein, the corresponding matching error of the location information stored in the correspondence is:For described to be encoded It is more than the second sub-block to be encoded of the described first sub-block to be encoded in frame, the first pixel precision is carried out in reference frame image block It is calculated during search, second sub-block to be encoded includes the described first sub-block to be encoded.
With reference to first aspect, in the first possible embodiment of first aspect, the method further includes:
When the corresponding matching error of the location information is not found in pre-stored correspondence, determine described pre- Survey the matching error between block and first sub-block to be encoded, and by the location information of acquisition and the determining matching In error storage to the correspondence.
The possible embodiment of with reference to first aspect the first, in second of possible embodiment of first aspect In, determine the matching error between the prediction block and first sub-block to be encoded, and by the location information of acquisition and In determining matching error storage to the correspondence, including:
The prediction block is divided into multiple first sub-pixel blocks, the described first sub-block to be encoded is divided into the multiple second sub- pictures Plain block, the first sub-pixel block are identical with the size of the second sub-pixel block;And each second sub- picture is obtained respectively The Ha Deman transformed values SATD of absolute error sum between corresponding the first sub-pixel block of plain block;
Each first sub-pixel block is determined in reference frame image position in the block, and based on determining every It the position of a first sub-pixel block will be in the SATD storages to the correspondence of each first sub-pixel block.
It is possible with second of the first possible embodiment to first aspect of first aspect with reference to first aspect The possible embodiment of any one of embodiment, in the third possible embodiment of first aspect, the correspondence Relationship is stored in a manner of hash table.
It is possible with the third of the first possible embodiment of first aspect to first aspect with reference to first aspect The possible embodiment of any one of embodiment, in the 4th kind of possible embodiment of first aspect, the correspondence The corresponding identification information of location information of the prediction block is further included in relationship, the identification information is used to indicate the prediction block The corresponding SATD of location information it is whether effective.
Second aspect, an embodiment of the present invention provides a sub-pixel full search device, including:
Search module for the first sub-block to be encoded being directed in frame to be encoded, carries out first in reference frame image block The search of pixel precision;
Acquisition module, for when described search block search is to prediction block, obtaining the prediction block in the reference frame Image location information in the block;Wherein, the prediction block is identical with the size of the described first sub-block to be encoded;
Matching module, for finding the location information that the acquisition module obtains in pre-stored correspondence During corresponding matching error, using the matching error as described search block search to the prediction block treated with described first Matching error between coded sub-blocks;
Wherein, the corresponding matching error of the location information stored in the correspondence is:For described to be encoded It is more than the second sub-block to be encoded of the described first sub-block to be encoded in frame, the first pixel precision is carried out in reference frame image block It is calculated during search, second sub-block to be encoded includes the described first sub-block to be encoded.
With reference to second aspect, in the first possible embodiment of second aspect, the matching module is additionally operable to When the corresponding matching error of the location information that the acquisition module obtains is not found in pre-stored correspondence, really Determine the matching error between the prediction block that described search block search arrives and first sub-block to be encoded;
Described device further includes:
Memory module, for the location information for obtaining the acquisition module and the storage of the determining matching error Into the correspondence.
With reference to the first possible embodiment of second aspect, in second of possible embodiment of second aspect In, the matching module is being determined between the prediction block that described search block search arrives and first sub-block to be encoded Matching error, and the location information that the acquisition module is obtained and the storage of the determining matching error are to described right When should be related to middle, it is specifically used for:
By described search block search to the prediction block be divided into multiple first sub-pixel blocks, it is to be encoded by described first Sub-block is divided into multiple second sub-pixel blocks, and the first sub-pixel block is identical with the size of the second sub-pixel block;And respectively The Ha Deman for obtaining the absolute error sum between corresponding the first sub-pixel block of each second sub-pixel block becomes Change value SATD;
Determine each first sub-pixel block in reference frame image position in the block;
The memory module, specifically for the place of each first sub-pixel block determined based on the matching module It position will be in the SATD storages to the correspondence of each first sub-pixel block.
Second with reference to the first of second aspect and second aspect possible embodiment to second aspect is possible The possible embodiment of any one of embodiment, in the third possible embodiment of second aspect, the storage Module, specifically for storing the correspondence in a manner of hash table.
The third with reference to the possible embodiment of the first of second aspect and second aspect to second aspect is possible The possible embodiment of any one of embodiment, in the 4th kind of possible embodiment of second aspect, the correspondence The corresponding identification information of location information of the prediction block is further included in relationship, the identification information is used to indicate the prediction block The corresponding SATD of location information it is whether effective.
In the embodiment of the present invention, is being carried out in reference frame image block for the first sub-block to be encoded in frame to be encoded The search of one pixel precision, and when searching prediction block, prediction block is obtained in reference frame image location information in the block; When the corresponding matching error of the location information is found in pre-stored correspondence, using the matching error as described pre- Survey the matching error between block and first sub-block to be encoded;The position is not found in pre-stored correspondence During the corresponding matching error of information, the matching error between the prediction block and first sub-block to be encoded is determined, and will look into In the matching error storage to the correspondence that the location information found determines.Therefore, in coding h.264 When carrying out sub-pixel search for block to be encoded, data may be reused, and reduce calculation amount, improve code efficiency.
Description of the drawings
Fig. 1 is the schematic diagram of Algorithm for Block Matching Motion Estimation of the prior art;
Fig. 2 is the schematic diagram of whole pixel full search of the prior art;
Fig. 3 is the schematic diagram of sub-pixel interpolation algorithm of the prior art;
Fig. 4 is the schematic diagram of sub-pixel full search of the prior art;
Fig. 5 is the flow chart of sub-pixel all direction search method provided in an embodiment of the present invention;
Fig. 6 is the flow chart of the block to be encoded Block- matching of 16 × 16 pixel provided in an embodiment of the present invention;
Fig. 7 is the structure diagram of sub-pixel full search device provided in an embodiment of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention is made below in conjunction with attached drawing into It is described in detail to one step, it is clear that described embodiment is only the implementation of part of the embodiment of the present invention rather than whole Example.Based on the embodiments of the present invention, those of ordinary skill in the art are obtained without making creative work All other embodiment, shall fall within the protection scope of the present invention.
Hereinafter, the used algorithm in the application is explained, so as to those skilled in the art understand that.
Block- matching:Algorithm for Block Matching Motion Estimation is as shown in Figure 1.In block-based motion estimation, present frame FtIt is divided Into equal-sized m × n-pixel block, it is assumed that all pixels all make identical translational motion in m × n-pixel block (Translation), subscript t is the time.Displacement of the m × n-pixel block in t and t- Δ t intervalsReferred to as move Vector MV (Motion vector).Ft-ΔtRepresent reference frame.
Block- matching is related to whole pixel full search and sub-pixel full search.
Matching error during whole pixel full search can pass through absolute error and (English:Sum of absolute Differences, referred to as:SAD) or mean square deviation is (English:Mean Square Error, referred to as:MSE it is) or absolutely average Difference (English:Mean Absolute Difference, referred to as:MAD) scheduling algorithm calculates.
By taking the block to be encoded of 8 × 8 pixels carries out whole pixel full search in reference frame as an example, existed with the window of 8 × 8 pixels A pixel is often moved in reference frame and determines a prediction block, so as to calculate the matching error between prediction block and block to be encoded, In reference frame after the completion of movement, all matching errors are obtained, so as to determine minimum from all matching errors of calculating Matching error, the corresponding match block of matching error of the minimum is optimal block of pixels.
Matching error when whole pixel full search is for SAD, it is assumed that be illustrated in figure 2 arrived in reference frame search it is pre- Block is surveyed, 1~64 is respectively a whole pixel in Fig. 2, each pixel and block to be encoded pair in calculating 1~64 in prediction block respectively The matching error for the pixel answered.
Matching error when whole pixel full search is for SAD, SAD can be obtained by equation below:
Wherein, SAD (dx1,dy1) represent that block to be encoded and displacement are (dx1,dy1) prediction block between sad value, ft(x1, Y1 the coordinate of whole pixel in block to be encoded, f) are representedt-Δt(x-dx1,y-dy1) expression displacement be (dx1,dy1) prediction it is in the block The coordinate of whole pixel 1~64, coordinate sets of the R for whole pixel in 8 × 8 block to be encoded.
After carrying out 8 × 8 whole pixels and searching element entirely, sub-pixel full search is carried out.Assuming that when carrying out whole pixel full search, search The pixel of the corresponding motion vector position of optimal block of pixels that rope arrives is 36, and pixel 36 is optimal whole location of pixels.
For the optimal whole location of pixels obtained in whole pixel full search, by being obtained in its interpolation with adjacent pixel 1/2 pixel (half-pix), 1/4 pixel and 1/8 pixel.
By taking the interpolation of optimal whole location of pixels 36 and adjacent pixel obtains 1/2 pixel as an example, to optimal whole location of pixels The process that 1/2 pixel (half-pix), 1/4 pixel and 1/8 pixel are obtained with the interpolation of adjacent pixel illustrates.
As shown in figure 3, the schematic diagram for sub-pixel interpolation algorithm.Wherein it is possible to using optimal whole location of pixels 36 with And horizontal with it, vertical and adjacent diagonal whole location of pixels 37,44,45, by the following formula (1-1), (1-2) and (1-3) is determined and optimal whole 36 corresponding horizontal half-pixel positions B of location of pixels, vertical half-pixel position A and diagonal half Location of pixels E:
P (B)=(p (36)+p (38)+1-roundi ng_control)/2 (1-1)
P (A)=(p (36)+p (A)+1-rounding_control)/2 (1-2)
P (E)=(p (36)+p (B)+p (A)+p (E)+2-rounding_control)/4 (1-3)
Wherein, p (B) represents the position of half-pix B, and p (36) represents the position of optimal whole pixel 36, and p (38) represents whole picture The position of element 38, p (A) represent the position of half-pix A, and p (E) represents the position of half-pix E, and rounding_control is default Cast out controlling value.
As shown in figure 4, the schematic diagram for sub-pixel full search, A~H is respectively a half-pix in Fig. 4, and a-h is respectively One 1/4 pixel, the detailed process of sub-pixel full search are:
After carrying out whole pixel full search and determining optimal whole location of pixels 36, first to half around optimal whole location of pixels 36 Pixel, that is, position A~H is scanned for, and often search once obtains a half-pix matching error.Then, the half of more all acquisitions Pixel matching error determines wherein minimum half-pix matching error, the minimum corresponding position of half-pix matching error, it is assumed that For A, as optimal half-pixel position of the block to be encoded in reference frame.Then to 1/4 pixel around optimal half-pixel position A That is position a-h is scanned for, and often search once obtains a 1/4 pixel matching error.Then, 1/4 picture of more all acquisitions Plain matching error determines 1/4 wherein minimum pixel matching error, the minimum corresponding position of 1/4 pixel matching error, it is assumed that For f, as optimal 1/4 location of pixels of the block to be encoded in reference frame.If it is not continued for 1/8 pixel search, f pixels For optimal vector position.
Matching error during sub-pixel full search can pass through the Ha Deman transformed values (English of absolute error sum:Sum of Absolute Transformed Difference, referred to as:SATD it) calculates.
It should be noted that SATD is the hadamard transformed value of the SAD of 4 × 4 block of pixels, obtained by equation below:
Wherein, SAD is obtained by equation below:
Wherein, SAD (dx2,dy2) represent that block to be encoded and displacement are (dx2,dy2) prediction block between sad value, ft(x2, Y2 the coordinate of whole pixel in block to be encoded, f) are representedt-Δt(x2-dx2,y2-dy2) represent in prediction block relative to block to be encoded In whole pixel displacement be (dx2,dy2) pixel coordinate, for example, carrying out 1/2 pixel in reference frame in block to be encoded When SATD is calculated in search process, ft-Δt(x2-dx2,y2-dy2) represent in prediction block relative to pixel whole in block to be encoded Displacement is (dx2,dy2) half-pix point coordinate;It carries out calculating during 1/4 pixel search in reference frame in block to be encoded During SATD, ft-Δt(x2-dx2,y2-dy2) represent prediction block in relative to pixel whole in block to be encoded displacement be (dx2,dy2) 1/4 pixel coordinate.The coordinate set of whole pixel in the block to be encoded that R is 8 × 8.
Therefore, the SATD values between block to be encoded and prediction block for all 4 × 4 block of pixels in block to be encoded SATD it With.
Largely test observation by applicant, Video coding is in order locality rule, that is to say, that one The searching route of 16x16 is substantially identical with the searching route of 16x8, and also with 8x16, the searching route of 8x8 is roughly the same, since one SATD values between a 16x16 blocks and prediction block are the sum of its all 4x4 block SATD values, then the search result of 16x16 can Can be largely by 16x8,8x16 blocks reuse, and the search result of three of the above sub-block can also be reused by 8x8 blocks.
For a sub-block to be encoded, such as 16x8 sub-blocks to be encoded, if current search position is in 16x16 block search Have already passed through calculating, then its SATD need not just be calculated again, can directly be reused.And the SATD values calculating of sub-pixel is to compare consumption Time, because it will not only calculate the residual error between prediction block, a hadamart transformation is also carried out to residual error, so This result of calculation can once reuse, and will greatly save CPU calculation amounts.
Based on this, the embodiment of the present invention provides a sub-pixel all direction search method and device, to solve in the prior art Calculation amount existing for sub-pixel full search process is larger, and computation complexity is higher, the problem of causing code efficiency relatively low.Wherein, Method and apparatus be based on same inventive concept, since the principle that method and device solves the problems, such as is similar, device and side The implementation of method can be with cross-reference, and overlaps will not be repeated.
The preferred embodiment of the present invention is described in detail below in conjunction with the accompanying drawings.
It, specifically can be with as shown in fig.5, the flow chart for sub-pixel all direction search method provided in an embodiment of the present invention Including as follows:
S501 for the first sub-block to be encoded in frame to be encoded, carries out the first pixel precision in reference frame image block Search;
It should be noted that first pixel precision can be 1/2nPixel precision, n are positive integer, such as 1/2 pixel Precision, 1/4 pixel precision and 1/8 pixel precision etc., the embodiment of the present invention is not specifically limited herein.
S502 when searching prediction block, obtains the prediction block in reference frame image location information in the block;Its In, the prediction block is identical with the size of the described first sub-block to be encoded;
Optionally, for the first sub-block to be encoded in frame to be encoded, the first pixel is carried out in reference frame image block Before the search of precision, sub-pixel precomputation is carried out to the reference frame.
The sub-pixel precomputation is to carry out 1/2 interpolation calculation, 1/4 interpolation to all whole pixels in the reference frame Calculating or 1/8 interpolation calculation etc., determine half-pix, 1/4 pixel or 1/8 picture around each whole pixel in the reference frame Element.
S503, will be described when the corresponding matching error of the location information is found in pre-stored correspondence With error as the matching error between the prediction block and first sub-block to be encoded.
Wherein, the corresponding matching error of the location information stored in the correspondence is:For described to be encoded It is more than the second sub-block to be encoded of the described first sub-block to be encoded in frame, the first pixel precision is carried out in reference frame image block It is calculated during search, second sub-block to be encoded includes the described first sub-block to be encoded.
In the embodiment of the present invention, by by the second of block to be encoded the sub-block to be encoded carry out the first pixel precision search for when Obtained matching error is stored in pre-stored correspondence, compared with the prior art in each to be encoded of block to be encoded Sub-block is carrying out 1/2nPixel precision is often searched for when searching for once calculates a matching error, and first in block to be encoded is to be encoded Sub-block carries out 1/2nWhen pixel precision is searched for, the effective matching stored in the pre-stored correspondence can be called to miss Difference reduces calculation amount, improves code efficiency.
Optionally, the method further includes:
When the corresponding matching error of the location information is not found in pre-stored correspondence, determine described pre- Survey the matching error between block and first sub-block to be encoded, and by the location information of acquisition and the determining matching In error storage to the correspondence.
In a kind of possible realization method, the matching between the prediction block and first sub-block to be encoded is being determined Error, and during by the location information of acquisition and the storage to the correspondence of the determining matching error, Ke Yitong Cross following manner realization:
The prediction block is divided into multiple first sub-pixel blocks, the described first sub-block to be encoded is divided into the multiple second sub- pictures Plain block, the first sub-pixel block are identical with the size of the second sub-pixel block;And each second sub- picture is obtained respectively The Ha Deman transformed values SATD of absolute error sum between corresponding the first sub-pixel block of plain block;
Each first sub-pixel block is determined in reference frame image position in the block, and based on determining every It the position of a first sub-pixel block will be in the SATD storages to the correspondence of each first sub-pixel block.
Specifically, described determine each first sub-pixel block in reference frame image position in the block, and The SATD of each first sub-pixel block is stored to institute based on the position of determining each first sub-pixel block It states in correspondence, can be realized by any one of the following two kinds mode mode:
The first realization method:
The prediction block is divided into the first sub-pixel block of M 4 × 4 pixels, and institute's rheme based on the prediction block by A1 Confidence breath determines each first sub-pixel block in the reference frame image sub- location information in the block, and M is positive integer;And Described first sub-block to be encoded is divided into the second sub-pixel block of M 4 × 4 pixels.
A2, respectively between i-th corresponding of first sub-pixel block of i-th of second sub-pixel block of acquisition SATD closes store to the correspondence corresponding with the sub- location information of the first sub-pixel block of i-th of SATD of acquisition In system, i is taken all over the positive integer for being not more than M.
Second of realization method:
The prediction block is divided into the third sub-pixel block of N number of 4 × 4 pixel, and the described first sub-block to be encoded is divided by B1 Into the 4th sub-pixel block of N number of 4 × 4 pixel, N is positive integer.
B2, respectively between j-th corresponding of the 4th sub-pixel block of j-th of third sub-pixel block of acquisition SATD, j are taken all over the positive integer for being not more than N.
B3, by the SATD of N number of 4th sub-pixel block storages corresponding with the location information of the prediction block to institute It states in correspondence.
Optionally, the correspondence is stored in a manner of hash table.
Specifically, when the correspondence is stored in a manner of hash table, using the location information of the prediction block as Key assignments in hash table, and stored all 4 in the sub-block to be encoded in the corresponding storage location of the key assignments described in hash table The SATD of × 4 block of pixels.
Optionally, the corresponding identification information of location information of the prediction block, the mark are further included in the correspondence Whether the corresponding SATD of location information that knowledge information is used to indicate the prediction block is effective.
Specifically, when the correspondence is stored in a manner of hash table, using the location information of the prediction block as Key assignments in hash table, and stored all 4 in the sub-block to be encoded in the corresponding storage location of the key assignments described in hash table The identification information of the SATD of × 4 block of pixels and the SATD of each 4 × 4 block of pixels.
Such as:Whether include SATD values in a hash table, 25 bit identifications are set.0th:SATD_16 is used for table Show in hash table and whether include the corresponding SATD values of 16 × 16 block of pixels.Represented if being recorded as 1 hash table include 16 × The corresponding SATD values of 16 block of pixels, if being recorded as 0, then it represents that do not include the corresponding SATD of 16 × 16 block of pixels in hash table Value.[1..2]:For identifying whether to include two 16 × 8 corresponding SATD values, first is used to identify hash table SATD_16x8 In whether include corresponding SATD values of 16 × 8 block of pixels above in 16 × 16 block of pixels, second is represented in hash table Whether 16 × 8 block of pixels corresponding SATD value in 16 × 16 block of pixels below is included.Similarly, [3..4]:SATD_8x16 For identifying whether to include the corresponding SATD values of two 8x16 block of pixels, [5..8]:SATD_8x8 is used to identify whether to include 4 The corresponding SATD values of 8x8 block of pixels, [9..16]:SATD_8x4 is used to identify whether to include the corresponding SATD of 8 8x4 block of pixels Value, [17..24]:SATD_4x8 is used to identify whether to include the corresponding SATD values of 8 4x8 block of pixels.
In the embodiment of the present invention, the key assignments can with but be not limited only to determine by the following formula:
y*Width+x<<14+iRef<<10+y1<<7+x1<<4;
Wherein, wherein y represents the longitudinal coordinate of the whole pixel of block to be encoded left upper apex;Width represents the width of image Degree;X represents the lateral coordinates of the whole pixel of block to be encoded left upper apex;IRef represents reference frame number;Y1 is corresponded to for prediction block Motion vector position pixel lengthwise position, for example, when block to be encoded carries out 1/2 pixel search in reference frame, Y1 is the lengthwise position of the half-pix point of prediction block left upper apex;When block to be encoded carries out 1/4 pixel search in reference frame, Y1 is the lengthwise position of 1/4 pixel of prediction block left upper apex;X1 is the pixel of the corresponding motion vector position of prediction block Lateral position, for example, when block to be encoded carries out 1/2 pixel search in reference frame, x1 is the half of prediction block left upper apex The lengthwise position of pixel;When block to be encoded carries out 1/4 pixel search in reference frame, x1 is the 1/ of prediction block left upper apex The lengthwise position of 4 pixels;<<For left shift operator, represent that all positions an integer are moved to the left the digit specified, First operand is the number of shifting function to be carried out in two operands of shift left operation, and second operand is specified first The digit of a operand movement.
Concrete application scene is given below, with the to be encoded of 16 × 16 pixels in embodiment for a better understanding of the present invention It is specific to be described in detail for block.
The process of Block- matching is carried out in reference frame for the block to be encoded of 16 × 16 pixel, it is specific as shown in Figure 6.
The sub-block to be encoded of 16 × 16 pixels is carried out whole pixel full search by S201 in reference frame;Perform S202.
S202, the sub-block to be encoded that the result based on whole pixel full search obtains 16 × 16 pixels are optimal in reference frame Whole location of pixels;Perform S203.
The sub-block to be encoded of 16 × 16 pixels is carried out 1/2 pixel search by S203 around optimal whole location of pixels;It performs S204。
S204, the matching error obtained when the sub-block to be encoded of 16 × 16 pixels is carried out 1/2 pixel search are stored to scattered In list;Perform S205.
S205, the matching error obtained based on 1/2 pixel search obtain the sub-block to be encoded of 16 × 16 pixels in reference frame In optimal half-pixel position, and determine the corresponding minimum match error of the optimal half-pixel position;Perform S206.
It should be noted that there is no strict sequences by step S204 and S205, S204 can be first carried out, then perform S205 can also first carry out S205 and perform S204 again, and the embodiment of the present invention is not specifically limited herein.
Optionally, after the sub-block to be encoded of 16 × 16 pixels is carried out 1/2 pixel search, 1/4 picture can also be carried out Plain search, 1/8 pixel search etc., specific search process refers to 1/2 pixel search process of the sub-block to be encoded of 16 × 16 pixels, The embodiment of the present invention does not do repeated explanation herein.
The block to be encoded of 16 × 16 pixels is divided into the sub-block to be encoded of two 16 × 8 pixels by S206;Perform S207.
Following steps S207 to S214 is performed respectively for the sub-block to be encoded of two 16 × 8 pixels:
The sub-block to be encoded of 16 × 8 pixels is carried out whole pixel full search by S207 in reference frame;Perform S208.
S208, the matching error obtained based on whole pixel full search obtain the sub-block to be encoded of 16 × 8 pixels in reference frame In optimal whole location of pixels;Perform S209.
The sub-block to be encoded of 16 × 8 pixels is carried out 1/2 pixel search by S209 around optimal whole location of pixels;It performs S210。
S210, the sub-block to be encoded of 16 × 8 pixels of acquisition correspond to the key assignments of the location information of prediction block in reference frame;It holds Row S211.
S211, based in SATD effective in the identification information-enquiry hash table in the key assignments whether include 16 × 8 pictures The SATD of all 4 × 4 block of pixels in the sub-block to be encoded of element;If so, perform S212;If it is not, perform S213.
S212, the sum of SATD of all 4 × 4 block of pixels in the sub-block to be encoded of 16 × 8 pixels that hash table is included As the sub-block to be encoded of 16 × 8 pixels and the matching error of corresponding prediction block;Perform S214.
S213 calculates the SATD of 4 × 4 block of pixels not to be covered in hash table in the sub-block to be encoded of 16 × 8 pixels, will count The SATD storages of 4 × 4 block of pixels not to be covered should to the key-value pair in hash table in the sub-block to be encoded for 16 × 8 pixels calculated Storage location in, and by the SATD and 16 × 8 of 4 × 4 block of pixels that hash table includes in the sub-block to be encoded of 16 × 8 pixels To be encoded sons of the sum of the SATD of 4 × 4 block of pixels not to be covered as 16 × 8 pixels in hash table in the sub-block to be encoded of pixel The matching error of block and corresponding prediction block;Perform S214.
S214, the matching error obtained based on 1/2 pixel search obtain the sub-block to be encoded of 16 × 8 pixels in reference frame Optimal half-pixel position, and determine the corresponding minimum match error of the optimal half-pixel position;Perform S215.
Optionally, after the sub-block to be encoded of 16 × 8 pixels is carried out 1/2 pixel search, 1/4 pixel can also be carried out Search, 1/8 pixel search etc., specific search process refer to 1/2 pixel search process of the sub-block to be encoded of 16 × 8 pixels, this Inventive embodiments do not do repeated explanation herein.
S215 calculates the sum of minimum match error of sub-block to be encoded of two 16 × 8 pixels.
The sub-block to be encoded of 28 × 16 pixels that is divided into respectively for the block to be encoded of 16 × 16 pixels and it is divided into The sub-block to be encoded of 48 × 8 pixels and the sub-block to be encoded for 16 4 × 4 pixels being divided into carry out 1/2 pixel search, 1/4 Pixel search, 1/8 pixel search etc., 2 16 × 8 pixels that specific search process is divided into refering to the block to be encoded of 16 × 16 pixels Sub-block to be encoded 1/2 pixel search process, the embodiment of the present invention do not do repeated explanation herein.
By the minimum match error of the sub-block to be encoded of 16 × 16 pixels, the minimum of the sub-block to be encoded of 2 16 × 8 pixels The son to be encoded of the sum of the sum of matching error, minimum match error of sub-block to be encoded of 28 × 16 pixels, 48 × 8 pixels The sum of minimum match error of sub-block to be encoded of the sum of minimum match error of block and 16 4 × 4 pixels is compared, really Fixed wherein minimum matching error.
In the embodiment of the present invention, by by the second of block to be encoded the sub-block to be encoded carry out the first pixel precision search for when Obtained matching error is stored in pre-stored correspondence, compared with the prior art in each to be encoded of block to be encoded Sub-block is carrying out 1/2nPixel precision is often searched for when searching for once calculates a matching error, and first in block to be encoded is to be encoded Sub-block carries out 1/2nWhen pixel precision is searched for, the effective matching stored in the pre-stored correspondence can be called to miss Difference reduces calculation amount, improves code efficiency.
Based on the same inventive concept of embodiment of the method corresponding with Fig. 5, it is complete that the embodiment of the present invention provides a sub-pixel Searcher 70, the structure of the device as shown in fig. 7, comprises search module 71, acquisition module 72 and matching module 73, wherein:
Search module 71 for the first sub-block to be encoded being directed in frame to be encoded, carries out in reference frame image block The search of one pixel precision;
Acquisition module 72, for when described search module 71 searches prediction block, obtaining the prediction block in the ginseng Examine frame image location information in the block;Wherein, the prediction block is identical with the size of the described first sub-block to be encoded;
Matching module 73, for finding the position that the acquisition module 72 obtains in pre-stored correspondence During the corresponding matching error of information, using the matching error as the prediction block that described search module 71 searches with it is described Matching error between first sub-block to be encoded;
Wherein, the corresponding matching error of the location information stored in the correspondence is:For described to be encoded It is more than the second sub-block to be encoded of the described first sub-block to be encoded in frame, the first pixel precision is carried out in reference frame image block It is calculated during search, second sub-block to be encoded includes the described first sub-block to be encoded.
Optionally, the matching module 73 is additionally operable to not find the acquisition mould in pre-stored correspondence During the corresponding matching error of the location information that block 72 obtains, determine the prediction block that described search module 71 searches with Matching error between first sub-block to be encoded;
Described device further includes:
Memory module 74, for the location information for obtaining the acquisition module 72 and the determining matching error It stores in the correspondence.
Optionally, the matching module 73 is determining the prediction block that described search module 71 searches and described the Matching error between one sub-block to be encoded, and the location information that the acquisition module 72 is obtained and determine described in During in error storage to the correspondence, it is specifically used for:
The prediction block that described search module 71 searches is divided into multiple first sub-pixel blocks, described first is waited to compile Numeral block is divided into multiple second sub-pixel blocks, and the first sub-pixel block is identical with the size of the second sub-pixel block;And point Not Huo Qu each absolute error sum between corresponding the first sub-pixel block of the second sub-pixel block Ha Deman Transformed value SATD;
Determine each first sub-pixel block in reference frame image position in the block;
The memory module 74, specifically for based on the determining each first sub-pixel block of the matching module 73 It position will be in the SATD storages to the correspondence of each first sub-pixel block.
Optionally, the memory module 74, specifically for storing the correspondence in a manner of hash table.
Optionally, the corresponding identification information of location information of the prediction block, the mark are further included in the correspondence Whether the corresponding SATD of location information that knowledge information is used to indicate the prediction block is effective.
In the embodiment of the present invention, by by the second of block to be encoded the sub-block to be encoded carry out the first pixel precision search for when Obtained matching error is stored in pre-stored correspondence, compared with the prior art in each to be encoded of block to be encoded Sub-block is carrying out 1/2nPixel precision is often searched for when searching for once calculates a matching error, and first in block to be encoded is to be encoded Sub-block carries out 1/2nWhen pixel precision is searched for, the effective matching stored in the pre-stored correspondence can be called to miss Difference reduces calculation amount, improves code efficiency.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program Product.Therefore, the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware can be used in the present invention Apply the form of example.Moreover, the computer for wherein including computer usable program code in one or more can be used in the present invention The computer program production that usable storage medium is implemented on (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that it can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided The processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that the instruction performed by computer or the processor of other programmable data processing devices is generated for real The device of function specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction generation being stored in the computer-readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps are performed on calculation machine or other programmable devices to generate computer implemented processing, so as in computer or The instruction offer performed on other programmable devices is used to implement in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creation Property concept, then additional changes and modifications may be made to these embodiments.So appended claims be intended to be construed to include it is excellent It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art God and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (10)

  1. A 1. sub-pixel all direction search method, which is characterized in that including:
    For the first sub-block to be encoded in frame to be encoded, the search of the first pixel precision is carried out in reference frame image block;
    When searching prediction block, the prediction block is obtained in reference frame image location information in the block;Wherein, it is described pre- It is identical with the size of the described first sub-block to be encoded to survey block;
    When the corresponding matching error of the location information is found in pre-stored correspondence, using the matching error as Matching error between the prediction block and first sub-block to be encoded;
    Wherein, the corresponding matching error of the location information stored in the correspondence is:For in the frame to be encoded More than the second sub-block to be encoded of the described first sub-block to be encoded, the search of the first pixel precision is carried out in reference frame image block When be calculated, second sub-block to be encoded includes the described first sub-block to be encoded.
  2. 2. the method as described in claim 1, which is characterized in that the method further includes:
    When the corresponding matching error of the location information is not found in pre-stored correspondence, the prediction block is determined With the matching error between the described first sub-block to be encoded, and by the location information of acquisition and the determining matching error It stores in the correspondence.
  3. 3. method as claimed in claim 2, which is characterized in that determine between the prediction block and first sub-block to be encoded Matching error, and by the location information of acquisition and the storage to the correspondence of the determining matching error, packet It includes:
    The prediction block is divided into multiple first sub-pixel blocks, the described first sub-block to be encoded is divided into multiple second sub-pixels Block, the first sub-pixel block are identical with the size of the second sub-pixel block;And each second sub-pixel is obtained respectively The Ha Deman transformed values SATD of absolute error sum between corresponding the first sub-pixel block of block;
    Each first sub-pixel block is determined in reference frame image position in the block, and based on determining each institute The position for stating the first sub-pixel block will be in the SATD storages to the correspondence of each first sub-pixel block.
  4. 4. the method as described in claims 1 to 3 any one, which is characterized in that the correspondence is deposited in a manner of hash table Storage.
  5. 5. the method as described in Claims 1-4 any one, which is characterized in that further included in the correspondence described pre- The corresponding identification information of location information of block is surveyed, the location information that the identification information is used to indicate the prediction block is corresponding Whether SATD is effective.
  6. A 6. sub-pixel full search device, which is characterized in that including:
    Search module for the first sub-block to be encoded being directed in frame to be encoded, carries out the first pixel in reference frame image block The search of precision;
    Acquisition module, for when described search block search is to prediction block, obtaining the prediction block in the reference frame image Location information in the block;Wherein, the prediction block is identical with the size of the described first sub-block to be encoded;
    Matching module corresponds to for finding the location information that the acquisition module obtains in pre-stored correspondence Matching error when, the prediction block and described first arrived using the matching error as described search block search is to be encoded Matching error between sub-block;
    Wherein, the corresponding matching error of the location information stored in the correspondence is:For in the frame to be encoded More than the second sub-block to be encoded of the described first sub-block to be encoded, the search of the first pixel precision is carried out in reference frame image block When be calculated, second sub-block to be encoded includes the described first sub-block to be encoded.
  7. 7. device as claimed in claim 6, which is characterized in that the matching module is additionally operable in pre-stored correspondence In when not finding the corresponding matching error of the location information that the acquisition module obtains, determine that described search module is searched Matching error between the prediction block and first sub-block to be encoded that rope arrives;
    Described device further includes:
    Memory module, the location information and the determining matching error for the acquisition module to be obtained are stored to institute It states in correspondence.
  8. 8. device as claimed in claim 7, which is characterized in that the matching module is specifically used for:
    By described search block search to the prediction block be divided into multiple first sub-pixel blocks, by the described first sub-block to be encoded It is divided into multiple second sub-pixel blocks, the first sub-pixel block is identical with the size of the second sub-pixel block;And it obtains respectively The Ha Deman transformed values of absolute error sum between corresponding the first sub-pixel block of each second sub-pixel block SATD;
    Determine each first sub-pixel block in reference frame image position in the block;
    The memory module, specifically for the position of each first sub-pixel block determined based on the matching module It will be in the SATD storages to the correspondence of each first sub-pixel block.
  9. 9. the device as described in claim 6 to 8 any one, which is characterized in that the memory module, specifically for hash Table mode stores the correspondence.
  10. 10. the device as described in claim 6 to 9 any one, which is characterized in that further included in the correspondence described pre- The corresponding identification information of location information of block is surveyed, the location information that the identification information is used to indicate the prediction block is corresponding Whether SATD is effective.
CN201611265924.XA 2016-12-30 2016-12-30 One sub-pixel all direction search method and device Pending CN108271028A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611265924.XA CN108271028A (en) 2016-12-30 2016-12-30 One sub-pixel all direction search method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611265924.XA CN108271028A (en) 2016-12-30 2016-12-30 One sub-pixel all direction search method and device

Publications (1)

Publication Number Publication Date
CN108271028A true CN108271028A (en) 2018-07-10

Family

ID=62771026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611265924.XA Pending CN108271028A (en) 2016-12-30 2016-12-30 One sub-pixel all direction search method and device

Country Status (1)

Country Link
CN (1) CN108271028A (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1615027A (en) * 2004-11-30 2005-05-11 北京中星微电子有限公司 Motioning estimating searching and computing method during visual frequency coding-decoding process
US20060159180A1 (en) * 1997-03-17 2006-07-20 Shunichi Sekiguchi Video encoder, video decoder, video encoding method, video decoding method, and video encoding and decoding system
JP2007510344A (en) * 2003-10-27 2007-04-19 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Power optimized array motion prediction method
CN101267556A (en) * 2008-03-21 2008-09-17 海信集团有限公司 Quick motion estimation method and video coding and decoding method
CN101754023A (en) * 2009-11-27 2010-06-23 电子科技大学 Movement estimation method for image compression
CN102075760A (en) * 2010-10-27 2011-05-25 无锡中星微电子有限公司 Quick movement estimation method and device
CN102164283A (en) * 2011-05-30 2011-08-24 江苏大学 Sub-pixel motion estimation method based on AVS (audio video standard)
CN103384324A (en) * 2013-01-19 2013-11-06 张新安 Quick sub pixel motion estimation method for AVS-M video coding
CN104113756A (en) * 2013-04-22 2014-10-22 苏州派瑞雷尔智能科技有限公司 Integer pixel motion estimation method suitable for H.264 video encoding and decoding
CN104661031A (en) * 2015-02-16 2015-05-27 华为技术有限公司 Method for coding and decoding video image, coding equipment and decoding equipment
US9071844B2 (en) * 2005-12-16 2015-06-30 Texas Instruments Incorporated Motion estimation with motion vector penalty
CN105578188A (en) * 2015-12-22 2016-05-11 西安理工大学 Dot interlaced full-search motion estimation method

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060159180A1 (en) * 1997-03-17 2006-07-20 Shunichi Sekiguchi Video encoder, video decoder, video encoding method, video decoding method, and video encoding and decoding system
JP2007510344A (en) * 2003-10-27 2007-04-19 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Power optimized array motion prediction method
CN1615027A (en) * 2004-11-30 2005-05-11 北京中星微电子有限公司 Motioning estimating searching and computing method during visual frequency coding-decoding process
US9071844B2 (en) * 2005-12-16 2015-06-30 Texas Instruments Incorporated Motion estimation with motion vector penalty
CN101267556A (en) * 2008-03-21 2008-09-17 海信集团有限公司 Quick motion estimation method and video coding and decoding method
CN101754023A (en) * 2009-11-27 2010-06-23 电子科技大学 Movement estimation method for image compression
CN102075760A (en) * 2010-10-27 2011-05-25 无锡中星微电子有限公司 Quick movement estimation method and device
CN102164283A (en) * 2011-05-30 2011-08-24 江苏大学 Sub-pixel motion estimation method based on AVS (audio video standard)
CN103384324A (en) * 2013-01-19 2013-11-06 张新安 Quick sub pixel motion estimation method for AVS-M video coding
CN104113756A (en) * 2013-04-22 2014-10-22 苏州派瑞雷尔智能科技有限公司 Integer pixel motion estimation method suitable for H.264 video encoding and decoding
CN104661031A (en) * 2015-02-16 2015-05-27 华为技术有限公司 Method for coding and decoding video image, coding equipment and decoding equipment
CN105578188A (en) * 2015-12-22 2016-05-11 西安理工大学 Dot interlaced full-search motion estimation method

Similar Documents

Publication Publication Date Title
CN101366279B (en) Adaptive motion search range
US7782951B2 (en) Fast motion-estimation scheme
CN102461150B (en) Method and device for motion estimation in a sequence of video images
CN110225346A (en) A kind of decoding method and its equipment
JP2004530367A (en) Motion vector prediction method and motion vector prediction device
KR20090083290A (en) Method for encoding and decoding video signal using motion compensation based on affine transform and apparatus thereof
CN102291581B (en) Realizing method of self-adaptive motion estimation supporting frame field
CN108134939A (en) A kind of method for estimating and device
CN103079070A (en) Video encoder
CN103108177B (en) Method for encoding images and picture coding device
US20060280252A1 (en) Method and apparatus for encoding video signal with improved compression efficiency using model switching in motion estimation of sub-pixel
CN108259912A (en) A kind of Parallel Implementation method of point of pixel motion estimation
JP2006074474A (en) Moving image encoder, encoding method, and encoding program
KR20080112568A (en) Method and apparatus for motion estimation
US10785501B2 (en) System and method of performing motion estimation in multiple reference frame
CN107360433A (en) A kind of interframe prediction encoding method and device
CN101924936A (en) Image frame interpolation device, image frame interpolation method and image frame interpolation program
CN106534858A (en) Real motion estimation method and device
Damerchilu et al. Motion estimation using learning automata
CN105338354B (en) A kind of motion vector estimation method and apparatus
CN103974077B (en) Quick integer motion estimation searching method used for H.264 coding
CN101511019A (en) Method and apparatus for estimating variable mode motion
JP2011010297A (en) System and method for estimating sum of absolute differences
CN108271028A (en) One sub-pixel all direction search method and device
CN110933414A (en) Motion information candidate list construction method and device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180710

WD01 Invention patent application deemed withdrawn after publication