Use the data distributing method of data routing infrastructure during pixel motion was estimated in a kind of minute
Technical field
The invention belongs to the video compression transmission technique field, be specifically related to use in the pixel motion estimation in a kind of minute the data distributing method of data routing infrastructure.
Background technology
Video compression coding has a lot of coding standards, like the MPEG-4 standard, and H.263 standard and Moving Picture Experts Group-2, H.264 standard.Though these several kinds of compression standards specific aim separately are different, the compaction coding method broadly similar has all comprised estimation, motion compensation etc.Adopt above-mentioned coding techniques that code efficiency is improved greatly, but the complexity of motion estimation algorithm is multiplied, amount of calculation increases greatly, increase substantially search time.Wherein the interframe movement estimation module has taken the great majority calculating and the storage resources of whole encoder, and therefore, the performance of interframe movement estimation module has directly determined the performance of encoder.
It is to be that unit obtains predict blocks with certain hunting zone with the macro block in reference frame that interframe movement is estimated.Wherein motion vector MV (motion ventor) is exactly the difference of predict blocks and current block position.A macro block can have multiple partitioning scheme.
Interframe movement is estimated to be divided into whole pixel motion and is estimated IME (Integer Motion Estimation); Estimate FME (Fractional Motion Estimation) with minute pixel motion; Wherein dividing pixel motion to estimate is whole pixel motion estimated result to be carried out retrofit handle; Comprise 1/2 precision, 1/4 precision and 1/8 precision.At first in the field of search, find best whole pixel motion vector; Under whole pixel optimal match point, seek best 1/2 match point again; Obtain the motion vector of half-pixel accuracy; Then around this half-pixel accuracy optimal match point, carry out the search of 1/4 pixel, obtain 1/4 pixel precision optimal match point and corresponding motion vector.The difference of precision is down carried out successively thereupon.The data volume of in the fraction pixel motion estimation process, participating in computing is big.It is many that macro block carries out the needed sub-piece number of branch pixel matching operation, and the size of sub-piece is also different.For multi-reference frame, need the sub-piece number of computing to be doubled and redoubled.In minute pixel motion is estimated, need to accomplish without the interpolation under the precision with filter earlier, and the data after the interpolation can increase severely.The branch pixel that these interpolation obtain can be reused in the process of estimation and inter motion compensation, so utilize the multiplexing hardware that just can effectively reduce of process data to realize cost as far as possible.
Summary of the invention
The purpose of this invention is to provide the data distributing method that uses the data routing infrastructure in the pixel motion estimation in a kind of minute, improved the speed of estimation, saved hardware resource.
The technical scheme that the present invention adopted is that the data distributing method of use data routing infrastructure during pixel motion was estimated in a kind of minute is characterized in that concrete steps are following:
Step 1, register file RF is set; Whole pixel motion is estimated that the motion vector MV that obtains matees with the interpolated data address of outside input; Draw the chip selection signal Cen of register file RF, select effectively to divide pixel data according to chip selection signal Cen, and deposit register file RF in;
Step 2, according to the half-pix matched rule, from register file RF, read the data of half-pix matched position;
Step 3, according to 1/4th pixel matched rules, from register file RF, read the half-pixel data of asking 1/4th pixels required.
Wherein, register file RF is carried out depositing in of data and read through read-write enable signal Wen and realize.
The concrete grammar of step 1 is following:
Step 1.1, the half-pixel data that interpolation is accomplished are sent into line by line, and that sends into also has its row address thereupon;
Step 1.2, estimate the motion vector MV that IME sees off,, obtain the address realm of half-pix estimation desired data piece in search window through address mapping by whole pixel motion;
Step 1.3, use address matcher that the row address of step 1.1 is hit coupling, if this row address in the address of step 1.2, then for hitting, otherwise is in the unnatural death, and deposits the data of hitting in register file RF.
The inventive method receives valid data and storage in real time; The branch pixel data that reasonable distribution the past one pipelining-stage is sent into; Valid data are deposited among the register file RF, will divide pixel data to read then, make the branch pixel data utilization rate that draws through interpolation reach 100% according to the coupling characteristics of minute pixel; The rate of reusing reduces to 0; Improve treatment effeciency greatly, and can increase the number of data route, do not increased input/output port (I/O) number of interpolating module with parallel organization raising processing speed.
Description of drawings
Fig. 1 is the used hardware structure diagram of the inventive method;
Fig. 2 is the read-write sequence figure of the inventive method to register file.
Embodiment
As shown in Figure 1, the data distributing method of use data routing infrastructure during a kind of minute pixel motion of the present invention estimated, concrete steps are following:
Step 1, register file RF (register file) is set; To put in order motion vector MV (motion ventor) that pixel motion estimates that IME (Integer motion estimation) obtains, mate with the interpolated data address of outside input; Draw the chip selection signal Cen of register file RF; Select effectively to divide pixel data according to chip selection signal Cen, and deposit register file RF in.
The concrete grammar of step 1 is following:
Step 1.1, the half-pixel data that interpolation is accomplished are sent into line by line, and that sends into also has its row address address_sw thereupon.
After sending into data, the half-pixel data of accomplishing the interpolation of sending into earlier is shifted according to column information, takes out corresponding valid data, splices the valid data that obtain according to the position relation of half-pix, until the data that obtain depositing in RF again.
Step 1.2, estimate the motion vector MV in search window search window that IME sees off by whole pixel motion; Through address mapping; Obtain the address realm of half-pix estimation desired data piece in search window search window, promptly initial address is to termination address addr_sta~addr_end.Wherein, during address mapping, motion vector MV carries out different decomposition according to the different patterns of cutting apart, and obtains the address of required coupling.
Step 1.3, use address matcher hit coupling to the row address address_sw of step 1.1; If this row address is in the address realm addr_sta~addr_end of step 1.2; Then for hitting, otherwise be in the unnatural death, deposit the data of hitting in register file RF.
As shown in Figure 2, in the inventive method, register file RF is carried out depositing in of data and reads through read-write enable signal Wen and realize.Wherein, when chip selection signal Cen was effective, Wen carried out read-write operation to register file RF through the read-write enable signal.As shown in Figure 2: when chip selection signal Cen is a low level, when read-write enable signal Wen was low level, data Data was deposited among the register file RF; When chip selection signal Cen is a low level, when read-write enable signal Wen is high level, from register file RF, read needed data.
Come the number of the chip selection signal Cen that statistical match hits through counter; Just added up the number of the data that deposit register file RF in; When register file RF was not filled, read-write enable signal Wen was that low level just continues register file RF is write data, after register file RF is filled; Read-write enable signal Wen becomes high level, just no longer register file RF is write data this moment but the beginning reading of data.
When the data among the register file RF deposit in finish after, the beginning reading of data.
Step 2, according to the half-pix matched rule, from register file RF, read the data of half-pix matched position.At this moment, read-write enable signal Wen is a high level.
Step 3, according to 1/4th pixel matched rules, from register file RF, read the half-pixel data of asking 1/4th pixels required.At this moment, read-write enable signal Wen is a high level.
In minute pixel motion was estimated, the data that the inventive method step 2 and step 3 obtain exported subsequent module to and are used to calculate SATD value (being residual error), through relatively, finally obtained branch pixel motion estimated movement vector MV.
As shown in the table is the fundamental performance parameter of present embodiment.Wherein register file RF has 16 groups, and the size of each RF is 11 * 11 * 8bits; Write cycle time is 80 clock cycle, and the write cycle time that different interpolation window sizes is corresponding is also different; Reading a register file RF needs 11 cycles, so the read cycle is 176 cycles to the maximum.
*-according to the real-time size decision write cycle time of interpolation window.
Can find out from last table, effective interpolated data is received and storage in real time, improve the utilance of data, make the branch pixel data utilization rate that draws through interpolation reach 100%, the rate of reusing reduces to 0, has improved treatment effeciency greatly.