CN1243393A - Moveable vector measuring method, recording medium, moveable detection apparatus and method thereof - Google Patents

Moveable vector measuring method, recording medium, moveable detection apparatus and method thereof Download PDF

Info

Publication number
CN1243393A
CN1243393A CN 99110395 CN99110395A CN1243393A CN 1243393 A CN1243393 A CN 1243393A CN 99110395 CN99110395 CN 99110395 CN 99110395 A CN99110395 A CN 99110395A CN 1243393 A CN1243393 A CN 1243393A
Authority
CN
China
Prior art keywords
image
pixel
image block
piece
block
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
CN 99110395
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.)
Sony Corp
Original Assignee
Sony Corp
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 Sony Corp filed Critical Sony Corp
Priority to CN 99110395 priority Critical patent/CN1243393A/en
Publication of CN1243393A publication Critical patent/CN1243393A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention provides a motion vector calculating method, which includes the steps of: (a) extracting a reference block from a reference picture corresponding to a current block of a current picture to be processed, the size and origin of the reference block matching those of the current block; (b) while moving the reference block in a predetermined search area, obtaining a residual between the current block; (c) detecting a block with the minimum residual from the reference picture so as to calculate a motion vector; (d) orthogonally transforming pixel data of a reference block and pixel data of a current block of the current picture; and (e) obtaining a residual between orthogonally transformed data of the reference block and orthogonally transformed data of each block of the current picture.

Description

Mobile vector method of measurement and recording medium, motion detection device and method
The present invention relates to a kind of mobile vector computational methods, be suitable for utilizing software processes to carry out encoding process corresponding to the method for for example MPEG (mobile motion picture expert group version) 2.The invention still further relates to the recording medium that records the mobile vector calculation procedure on it.
MPEG2 is known as a kind of high-efficiency compression method to image.In the MPEG2 method, utilize motion compensation predictive coding method and DCT (discrete cosine transform) method vision signal is compressed and to be encoded.
In the MPEG2 method, send three types image, they are I (interior) image, P (prediction) image and B (bi-directional predicted) image.For the I image, carry out the DCT encoding process with the pixel of same number of frames.For the P image,, utilize the motion compensation prediction processing to carry out the DCT encoding process with reference to I image or image encoded.For the B image,, utilize moving projection to handle and carry out the DCT encoding process with reference to the P image before and after I image or the B image.
For P image or B image, can carry out interior encoding process to each macro block.In other words, utilize interior encoding process effectively to compress to this image.Therefore, in this case, carry out interior encoding process.
Fig. 1 is the example of structure block diagram of traditional mpeg 2 encoder.With reference to Fig. 1, component digital video signal is offered input 101.Component digital video signal is made up of brightness signal Y and color difference signal Cb and Cr.The digital video signal of input 101 is offered frame memory 102 by mobile vector testing circuit 103.Frame memory 102 interim these digital video signals of storage.The memory capacity of frame memory 102 be enough at least store present image, last with reference to image and back one with reference to this three two field picture of image.
Mobile vector testing circuit 103 utilizes the data of storage in the frame memory 102 to obtain with reference to the mobile vector between image and the present image.For each macro block obtains mobile vector MV.Each macro block is made up of for example (16 * 16) pixel.The mobile vector MV that obtains is offered variable-length code encoding circuit 108 and motion compensation circuit 115.Mobile vector testing circuit 103 offers the information e of deviation (residual) to detect circuit 104 is set.This deviation information e obtains with mobile vector MV by means of mobile vector testing circuit 103.
The output signal of frame memory 102 is offered the terminal 105A of switching circuit 105 by mobile vector testing circuit 103.In addition, the output signal that the output signal of frame memory 102 is offered subtraction circuit 106 and subtraction electricity circuit 107 offers the terminal 105C of switching circuit 105.
Switching circuit 105 changes coding mode corresponding to the pattern signalization that receives from mode setting circuit 104.In other words, when intra-frame encoding mode, switching circuit 105 is selected terminal 105A.When the forward predictive coded pattern, switching circuit 105 is selected terminal 105B.When the bi-directional predictive coding pattern, switching circuit 105 is selected terminal 105C.
When sending the I image, carry out intraframe predictive coding and handle.At this moment, switching circuit 105 is selected terminal 105A.Frame memory 102 output current frame image data.The current frame image data are offered DCT circuit 106 by switching circuit 105.
For example, DCT circuit 106 converts the vision signal of each (8 * 8) block of pixels of time-domain to the frequency spectrum data of frequency domain.Frequency spectrum data is carried out sawtooth scan, read (promptly from the DC component) to high fdrequency component from low frequency component.The output signal of DCT circuit 106 is offered sample circuit 107.
Information corresponding to the output bit rate that receives from transmission buffer 109 is provided with quantization scale to sample circuit 107.Sample circuit 107 quantizes the frequency spectrum data that receives from DCT circuit 106 corresponding to quantization scale.Therefore, can make the bit rate of output bit flow keep constant.
The output signal of sample circuit 107 is offered variable-length code encoding circuit 108 and inverse quantization circuit 110.Variable length code circuit 108 is encoded with variable-length code (VLC) to (receiving from sample circuit 107) frequency spectrum data, mobile vector, quantization scale and predictive mode.
Variable-length code encoding circuit 108 is exported bitstream encoded.Bitstream encoded is temporarily stored in the transmission buffer 109.Corresponding to needed bit rate, reading data flow from transmission buffer 109.
As mentioned above, the output signal of sample circuit 107 is offered inverse quantization circuit 110.The output signal of inverse quantization circuit 110 is offered idct circuit 112.Under the situation of I image, utilize the pixel of same frame to carry out the DCT processing.Therefore, inverse quantization circuit 110 and idct circuit 112 form original image.The digital of digital video data of piece image is offered picture frame memory 114 by add circuit 113.Being stored in data in the memory 114 as the reference frame data of next P image or B image.
When sending the P image, carry out forward predictive coded with reference frame and handle.At this moment, switching circuit 105 is selected terminal 105B.The digital video signal of frame memory 102 output present frames.The output signal of frame memory 102 is offered subtraction circuit 108.
The data of frame memory 114 storage reference frame.Moving of motion compensation circuit 115 these reference frame data of compensation, and the data that obtain are offered subtraction circuit 106.Subtraction circuit 106 obtains current frame datas and has passed through difference between the reference frame data of motion compensation.This difference data is offered DCT circuit 106 by switching circuit 105.
106 pairs of difference datas of DCT circuit carry out DCT to be handled.That is, DCT circuit 106 is transformed into frequency spectrum data to difference data.The output signal of DCT circuit 106 is offered sample circuit 107.107 pairs of frequency spectrum datas that receive from DCT circuit 106 of sample circuit quantize.
The output signal of sample circuit 107 is offered variable-length code encoding circuit 108 and inverse quantization circuit 110.Variable-length code encoding circuit 108 is encoded with variable-length code (VLC) to (receiving from sample circuit 107) frequency spectrum data, mobile vector, quantization scale and predictive mode.
Variable-length code encoding circuit 108 is exported bitstream encoded.Bitstream encoded temporarily is stored in the transmission buffer 109.Corresponding to needed bit rate, reading data flow from transmit buffer 109.Obtain this data flow from output 111.
The output signal of sample circuit 107 is offered inverse quantization circuit 110.The output signal of inverse quantization circuit 110 is offered idct circuit 112.Under the situation of P image, the difference between the data of the data of reference frame and present image is carried out DCT handle.Therefore, the difference between sample circuit 110 and idct circuit 112 acquisition reference frame data and the current image date.This difference data is offered add circuit 113.
Frame memory 114 offers add circuit 113 to reference image data by motion compensation circuit 115.Add circuit 113 is added to difference data on the reference image data.The output signal of add circuit 113 as the storage of next reference frame in frame memory 114.
When sending the B image,, carry out bi-directional predictive coding and handle with last reference frame and back one reference frame.In this case, switching circuit 105 is selected terminal 105C.The digital video signal of frame memory 102 output present frames.The output signal of frame memory 102 is offered subtraction circuit 107.
The data of the last reference frame of frame memory 114 storages and the data of back one reference frame.The data of 115 pairs of two reference frame of motion compensation circuit are carried out motion compensation.The output signal of motion compensation circuit 115 is offered subtraction circuit 107.Subtraction circuit 107 obtains the data of the data of present frames, last reference frame and has passed through difference between the data of a back reference frame of motion compensation.This difference data is offered DCT circuit 106 by switching circuit 105.
106 pairs of these difference datas of DCT circuit carry out DCT to be handled.In other words, DCT circuit 106 is transformed into frequency spectrum data to this difference data.The output signal of DCT circuit 106 is offered sample circuit 107.107 pairs of frequency spectrum datas that receive from DCT circuit 106 of sample circuit quantize.
The output signal of sample circuit 107 is offered variable-length code encoding circuit and inverse quantization circuit 110.Variable-length code encoding circuit 108 is encoded with variable-length code (VLC) to (receiving from sample circuit 107) frequency spectrum data, mobile vector, quantization scale and predictive mode.
Variable-length code encoding circuit 108 is exported bitstream encoded.Bit stream temporarily is stored in the transmission buffer 109.Transmission buffer 109 is read the data flow corresponding to needed bit rate.Obtain this data flow from output 111.
In recent years, because the processing speed of CPU (CPU) becomes very fast, the memory of large storage capacity also becomes cheaply, so can carry out above-mentioned MPEG2 coding with software.
Yet, when the MPEG2 encoding process, need to calculate the processing of mobile vector.Obtain mobile vector by the piece matching process.In other words, from reference frame, obtain the piece of and same initial point onesize with the piece that is divided into from present frame to be processed.When the piece of mobile reference frame in predetermined region of search, obtain the absolute value sum of the difference between the pixel of related blocks of the pixel of piece of reference frame and present frame, as deviation.Obtain the piece of the reference frame of deviation minimum.Because the piece matching treatment needs many calculation procedures, so be difficult to carry out the MPEG2 encoding process with software.
In other words, when the mobile vector of the piece CBLK that obtains present frame 401 as shown in Figure 2, definition of search region SA on corresponding to the piece RBLK periphery of the reference frame 402 of piece CBLK is as initial point.Take out the piece RBLK of reference frame from region of search SA.Difference between (16 * 16) pixel of acquisition reference block RBLK and (16 * 16) pixel of current block CBLK.The absolute value sum that obtains these differences is as deviation.The sound RBLK of mobile reference frame 402 in predetermined search region S A.On each position of the piece RBLK of region of search SA, obtain the difference between the pixel of piece CBLK of the pixel of piece RBLK and present frame 401.Obtain these differences absolute value and, as deviation.That relatively obtain and.The piece of deviation minimum is used as match block.Utilize this match block to obtain mobile vector.
In order to utilize the piece matching process to detect mobile vector, when each piece when pixel is formed, in order to obtain the difference of pixel, need carry out 16 * 16=256 time subtraction by (16 * 16).For the absolute value that obtains these differences and, need carry out 256 sub-addition computings.
When detecting mobile vector with the mobile reference block of pixel step card in the predetermined search zone, the number of times that should obtain deviation is corresponding to the pixel count in the region of search.Therefore, obtain deviation, and during with the position probing mobile vector of the piece with minimum deflection, the calculation procedure quantitative change gets extremely huge when in the predetermined search zone, moving a piece with pixel step card.Therefore, be difficult to carry out the MPEG2 coding with software.
For the high-speed search mobile vector, can consider two kinds of schemes.As first kind of scheme, when carrying out the piece matching treatment, reduce the calculation procedure amount.As second kind of scheme, reduce the number of times of piece matching treatment in the region of search.
As an example of first kind of scheme, when the absolute value of the difference between the pixel of the related blocks of the pixel of the piece that calculates reference frame and present frame and the time, compare this with predetermined threshold.During when this with greater than predetermined threshold, termination.
Since mobile vector be the difference between the pixel of pixel and the related blocks of present frame by the piece that obtains reference frame absolute value and minimum value obtain, therefore,, should and can not become minimum value when this with when surpassing predetermined threshold.Therefore, it is skimble-skamble proceeding this processing.Thereby, during when this with greater than predetermined threshold, just interrupt this processing.As a result, can reduce the calculating step number, the high speed detection mobile vector.
Yet, in this case, be difficult to specify such threshold value.When this threshold value too hour, have a few all and will interrupt this processing.Therefore, can not correctly detect mobile vector.On the contrary, when this threshold value is too big, because Interrupt Process not, so do not improve treatment effeciency.
In order to reduce the calculating step number of piece matching treatment, it is compartmentalize (checkerwise) that the method for the pixel of a kind of pixel of thinning reference frame and present frame is arranged.In this case, calculate these differences absolute value and the calculating step number can reduce by half.
Yet, when the thinning one-tenth grid of these pieces, because the Loss of continuity of pixel data, so can not use the MMX instruction.Because the MMX instruction can make a plurality of continuous data sheets can handle at synchronization, so personal computer in recent years all is equipped with the CPU that can handle the MMX function.Because the piece matching treatment has obtained the absolute value sum of difference between the pixel, so can carry out the piece matching treatment at high speed with the MMX instruction.Yet, when the thinning one-tenth grid of the pixel of piece, because the continuity of having lost pixel data, so can not use the MMX instruction.Therefore, though the thinning one-tenth grid of the pixel of piece, thus the number of times of minimizing piece matching treatment can not shorten the processing time significantly.Moving image coding apparatus for traditional view data to mobile image is encoded can carry out the hybrid coding processing of processing of motion compensation inter prediction and DCT (discrete cosine transform) combination to the piece of each (8 * 8) pixel.
Moving image coding apparatus detects the mobile vector between consecutive frame, moves image with detected mobile vector motion compensation, to reduce amount of coded data.
The tradition moving image coding apparatus is moving of detected image in every way.When detecting image and move, the macro block on the consecutive frame relevant position relatively sometimes.When comparing macro block, the moving direction of image is unknown.Therefore, with the less difference of brightness value macro block is searched for the relevant position presumptive area on every side of consecutive frame.
When the video camera of taking mobile image is fixed on the precalculated position, and target is being when mobile, and the moving direction of target all changes on each position of entire image.Therefore, the macro block around the search starting point.When moving of target was big, it may depart from the region of search.In this case, carrying out intraframe coding handles and handles without interframe encode.
In traditional moving image coding apparatus, a kind of hierarchical search method has been proposed, reduce the calculating step number that detected image moves.In this method, moving of detected image detects a mobile vector with a plurality of macro blocks.In order to obtain the mobile vector of each macro block, use the mobile vector of a plurality of macro blocks.
Yet, in this moving image coding apparatus, in presumptive area, search for macro block, to detect the less macro block of difference.Therefore, when bigger target is moved in one of processing, must strengthen the region of search.Therefore, detected image moves necessary processing time exponential increase.
In this moving image coding apparatus, when moving of target was big, (to the macro block of same frame) carried out the intraframe coding processing, and (to the macro block of a plurality of frames) do not carry out the interframe encode processing.In this case, when the image of taking mobile exceeds the predetermined search zone, handle, then just increased the calculating step number if all macro blocks are carried out intraframe coding.Therefore, the load of device becomes big.If this situation occurs in entire image and moves and exceeded the region of search and target is under the situation about panning.
In the moving image coding apparatus of the mobile vector that obtains a plurality of macro blocks, when the image mobile range exceeds screen greatly, can not detect mobile vector.Therefore, can not detect the mobile vector of a plurality of macro blocks.
Fig. 3 shows a kind of example of structure of traditional moving image coding apparatus, and it is handled to handle with the hybrid coding of DCT (discrete cosine transform) treatment combination with the motion compensation inter prediction view data of mobile image is encoded.
In Fig. 3, S11 offers terminal 501 input MB (macro block) signal.MV offers terminal 502 one by one as macro block MB the mobile vector signal.Input MB signal S511 and mobile vector signal MV offer motion compensation circuit 503.
Motion compensation circuit 503 has an internal image memory.From corresponding to reading prediction image signal (hereinafter be called prediction MB signal) the video memory of mobile vector signal MV one by one, as macro block MB.Motion compensation circuit 503 output signal S512, this signal are exactly the prediction MB signal that obtains from mobile vector signal MV.
Calculation element 504 is singly the input MB signal S511 of plus signal and signal S512 addition as the macro block MB of cut signal.Therefore, calculation element 504 calculates the difference between input MB signal and the signal S512, exports this difference as prediction deviation MB signal S513.
S513 offers DCT circuit 505 this prediction deviation MB signal.The piece of each (8 * 8) pixel of 505 couples of prediction deviation MB of DCT circuit signal S513 carries out bidimensional DCT to be handled, and output DCT coefficient.The DCT coefficient is offered sample circuit 506.
Sample circuit 506 quantizes the poor of the difference of absolute value of the DCT coefficient corresponding to the quantization scale mQ that receives from terminal 507, the prediction MB signal that receives from motion compensation circuit 503 and absolute value and mean value, and the output bias signal, as quantized signal.
Offer variable-length code encoding (VLC) circuit 508 the quantized signal that receives from sample circuit 506 with to the mobile vector MV corresponding with it.Variable-length code encoding circuit 508 usefulness are encoded to quantized signal and mobile vector MV corresponding to the variable-length code (VLC) of MPEG grammer.
The output signal of variable-length code encoding circuit 508 is offered buffer storage 509.The fluctuation of the bit number of the data that receive from variable-length code encoding circuit 508 that produce in the 509 level and smooth short time of buffer storage, and with desired bit rate output encoder bit stream.The coded bit stream that terminal 501 outputs receive from buffering memory 509.
Quantized signal that receives from sample circuit 506 and quantization scale are offered inverse quantization circuit 511.Inverse quantization circuit 511 is carried out inverse quantization corresponding to quantization scale to quantized signal.The output signal of inverse quantization circuit 511 is offered anti-DCT circuit 512.512 pairs of signals that receive from inverse quantization circuit 511 of anti-DCT circuit carry out anti-DCT to be handled, and the signal that obtains is exported to calculation element 513, as prediction deviation MB signal S515.
Calculation element 513 also receives the prediction MB signal S512 that offers calculation element 504.Calculation element 513 is prediction deviation MB signal S515 and prediction MB signal S512 addition, output local code picture signal.This picture signal is identical with recipient's (decoding side) output signal.
The tradition moving image coding apparatus all carries out DCT to all images that receives from terminal 501 to be handled and quantification treatment.Whether this moving image coding apparatus determines to want the DCT coefficient of each macro block of image encoded to occur after view data being carried out DCT processing and quantification treatment and finishing all calculation procedures of DCT coefficient.
Yet, even, also will carry out calculation procedure, so all unnecessary calculation procedures have also been carried out to all macro blocks because their DCT coefficient of this moving image coding apparatus finally becomes " 0 ".
In addition, because traditional moving image coding apparatus only determines after having carried out all calculation procedures whether all DCT coefficients of macro block are " 0 ", so must carry out all calculation procedures.
The present invention makes according to above-mentioned viewpoint.
First purpose of the present invention is in order to reduce the calculating step number of the piece matching treatment that detects mobile vector, at full speed to detect it.
Second purpose of the present invention provides on a kind of mobile vector computational methods and its and records its program recording medium, these mobile vector computational methods can make the number of times of the piece matching treatment in the predetermined search zone reduce, with the raising processing speed, and use the MMX instruction effectively.
The 3rd purpose of the present invention provides a kind of motion detection device and movement detection method, and it can detect the mobile vector of the image that moves significantly on whole screen.
The 4th purpose of the present invention provides a kind of picture coding device and method for encoding images, and it can shorten the DCT coefficient finally is the encoding process time of the image of " 0 ".
First aspect of the present invention is the mobile vector computational methods, comprises the following step:
(a) piece corresponding to present image to be processed takes out a piece from the reference image, and this is big or small consistent with reference to the size of the piece of image and current image block, with reference to the initial point of image block and the initial point coupling of current image block; (b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block; (c) piece of detection deviation minimum from the reference image is to calculate mobile vector; (d) orthogonal transform is with reference to the pixel data of image block and the pixel data of current image block; And (e) obtain with reference to the deviation between the orthogonal transform data of each piece of the orthogonal transform data of image block and present image.
A second aspect of the present invention is a kind of recording medium that records the mobile vector calculation procedure on it, the mobile vector calculation procedure makes the system with this recording medium carry out the following step: (a) piece corresponding to present image to be processed takes out a piece from the reference image, this is big or small consistent with reference to the size of the piece of image and current image block, with reference to the initial point of image block and the initial point coupling of current image block; (b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block; (c) piece of detection deviation minimum from the reference image is to calculate mobile vector; (d) orthogonal transform is with reference to the pixel data of image block and the pixel data of current image block; And (e) obtain with reference to the deviation between the orthogonal transform data of each piece of the orthogonal transform data of image block and present image.
A third aspect of the present invention is a kind of mobile vector computational methods, comprise the following step: (a) piece corresponding to present image to be processed takes out a piece from the reference image, the size of this reference block is big or small consistent with the piece of present image, with reference to the initial point of image block and the initial point coupling of current image block; (b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block; (c) piece of detection deviation minimum from the reference image is to calculate mobile vector; (d) when calculating, the deviation and the predetermined threshold of acquisition are compared with reference to the deviation between the pixel of the pixel of image block and current image block; (e) when this deviation during, stop to calculate mobile vector greater than predetermined threshold; And the initial value that predetermined threshold (f) is set corresponding to characteristics of image.
A fourth aspect of the present invention is a kind of recording medium that records the mobile vector calculation procedure on it, this mobile vector calculation procedure makes the system with this recording medium carry out the following step: (a) piece corresponding to present image to be processed takes out a piece from the reference image, this is big or small consistent with reference to the size of the piece of image and current image block, with reference to the initial point of image block and the initial point coupling of current image block; (b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block; (c) piece of detection deviation minimum from the reference image is to calculate mobile vector; (d) when calculating, the deviation and the predetermined threshold of acquisition are compared with reference to the deviation between the pixel of the pixel of image block and current image block; (e) when this deviation during, stop to calculate mobile vector greater than predetermined threshold; And the initial value that predetermined threshold (f) is set corresponding to characteristics of image.
A fifth aspect of the present invention is a kind of motion detection device, comprises: withdrawing device, take out a plurality of macro blocks from image; First motion detection device detects the mobile vector of each piece of a plurality of macro blocks that described withdrawing device takes out; Mobile computing device calculates the mobile vector of entire image with the mobile vector of detected each macro block of described first activity detection apparatus; And second motion detection device, the mobile vector that calculates with described movable calculation element calculates the mobile vector of each macro block.
A sixth aspect of the present invention is a kind of activity detection method, comprises the following step: (a) take out a plurality of macro blocks from image; (b) mobile vector of each piece of a plurality of macro blocks of detection taking-up; (c) calculate the mobile vector of entire image with the mobile vector of detected each macro block; And the mobile vector that (d) calculates each macro block with the mobile vector that calculates.
A seventh aspect of the present invention is a kind of picture coding device, comprises: motion detection device, and the mobile vector of the intended pixel piece of detection input image data produces mobile deviation information; Judgment means compares a mobile deviation information that receives from described motion detection device and a predetermined value, produces judged result; Image data processing system, to the processing that view data is scheduled to, this predetermined process is that encoding process is needed; Code device is encoded to view data; And control device, corresponding to the judged result of described judgment means, skip the predetermined process that described image data processing system carries out, make described code device carry out described encoding process.
A eighth aspect of the present invention is a kind of method for encoding images, comprises the following step: (a) detect the mobile vector of the intended pixel piece of input image data, produce mobile deviation information; (b) a mobile deviation information and a predetermined value are compared, produce judged result; (c) processing that view data is scheduled to, this predetermined process are that encoding process is needed; And, skip predetermined process (d) corresponding to definite result, make view data is carried out encoding process.
A ninth aspect of the present invention is a kind of mobile vector computational methods, comprise the following step: (a) piece corresponding to present image to be processed takes out a piece from the reference image, the size of this reference block is big or small consistent with current image block, with reference to the initial point of image block and the initial point coupling of current image block; (b) when in the predetermined search zone, moving this, obtain current image block and with reference to the deviation between the image block with reference to image block; (c) piece of detection deviation minimum from the reference image is to calculate mobile vector; (d) take out N pixel of present image and with reference to N pixel of image simultaneously, wherein N is an integer; (e) store in the memory as continuous data the N of a present image pixel with reference to N pixel of image; And (f) should from memory, read current image block pixel and with reference to the pixel of image block, as continuous data, to obtain deviation.
A tenth aspect of the present invention is a kind of recording medium that has write down the mobile vector calculation procedure on it, these mobile vector computational methods make the system with this recording medium carry out the following step: (a) piece corresponding to present image to be processed takes out a piece from the reference image, this is big or small consistent with reference to the size of the piece of image and current image block, with reference to the initial point of image block and the initial point coupling of current image block; (b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block; (c) piece of detection deviation minimum from the reference image is to calculate mobile vector; (d) take out N pixel of present image and with reference to N pixel of image simultaneously, wherein N is an integer; (e) store in the memory as continuous data the N of a present image pixel with reference to N pixel of image; And (f) from memory, read the pixel of current image block and with reference to the pixel of image block, as continuous data, to obtain deviation.
A eleventh aspect of the present invention is a kind of mobile vector computational methods, comprise the following step: (a) piece corresponding to present image to be processed takes out a piece from the reference image, this is big or small consistent with reference to the size of the piece of image and current image block, with reference to the initial point of image block and the initial point coupling of current image block; (b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block; (c) piece of detection deviation minimum from the reference image is to calculate rough mobile vector; (d) when obtain in step (c) dark rough mobile vector near in when moving with reference to image block, obtain current image block and with reference to the deviation between the image block; (e) according to the piece of reference image detection deviation minimum, to detect meticulous mobile vector; (f) the pixel of present image with store in the first memory with reference to the pixel of image; (g) take out N pixel of present image and with reference to N pixel of image simultaneously, wherein N is an integer; And (h) store in the second memory as continuous data the N of a present image pixel with reference to N pixel of image, wherein step (c) is to utilize to be stored in carrying out as N pixel of the present image of continuous data with reference to N pixel of image in the second memory, and step (e) is that utilization is stored in the pixel of the present image in the first memory and carries out with reference to the pixel of image.
A twelveth aspect of the present invention is a kind of recording medium that records the mobile vector calculation procedure on it, this mobile vector calculation procedure makes the system with this recording medium carry out the following step: (a) piece corresponding to present image to be processed takes out a piece from the reference image, the size of this reference block is big or small consistent with current image block, with reference to the initial point of image block and the initial point coupling of current image block; (b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block; (c) piece of detection deviation minimum from the reference image is to calculate rough mobile vector; When (d) moving with reference to image block near the rough mobile vector that obtains in step (c), obtain current image block and with reference to the deviation between the image block; (e) according to the piece of reference image detection deviation minimum, to detect meticulous mobile vector; (f) the pixel of present image with store in the first memory with reference to the pixel of image; (g) take out N pixel of present image and with reference to N pixel of image simultaneously, wherein N is an integer; And (h) store in the second memory as continuous data the N of a present image pixel with reference to N pixel of image, wherein step (c) is to utilize to be stored in carrying out as N pixel of the present image of continuous data with reference to N pixel of image in the second memory, and step (e) is that utilization is stored in the pixel of the present image in the first memory and carries out with reference to the pixel of image.
A thirteenth aspect of the present invention is a kind of mobile vector computational methods, comprise the following step: (a) piece corresponding to present image to be processed takes out a piece from the reference image, this is big or small consistent with reference to the size of the piece of image and current image block, with reference to the initial point of image block and the initial point coupling of current image block; (b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block; (c) piece of detection deviation minimum from the reference image is to calculate mobile vector; And (d) relatively, obtain the deviation between them the outline pixels of the outline pixels of reference image block and current image block.
A fourteenth aspect of the present invention is a kind of recording medium that records the mobile vector calculation procedure on it, this mobile vector calculation procedure makes the system with this recording medium carry out the following step: (a) piece corresponding to present image to be processed takes out a piece from the reference image, the size of this reference block is big or small consistent with current image block, with reference to the initial point of image block and the initial point coupling of current image block; (b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block; (c) piece of detection deviation minimum from the reference image is to calculate mobile vector; And (d) relatively, obtain the deviation between them the outline pixels of the outline pixels of reference image block and current image block.
These and other purposes, features and advantages of the present invention will become more obvious by the detailed description of following most preferred embodiment as shown in drawings.
Fig. 1 is the structured flowchart of traditional mpeg 2 encoder;
Fig. 2 is a schematic diagram of explaining the piece matching treatment;
Fig. 3 is the structural representation of traditional moving image coding apparatus;
Fig. 4 is the example of structure block diagram of the data processing equipment according to the present invention;
Fig. 5 is a flow chart of explaining the MPEG2 encoding process;
Fig. 6 explains according to the present invention the schematic diagram of the processing of the piece of present frame in mobile vector computational process;
Fig. 7 explains according to the present invention the schematic diagram of the processing of the piece of present frame in mobile vector computational process;
Fig. 8 explains according to the present invention the schematic diagram of the processing of the piece of present frame in mobile vector computational process;
Fig. 9 is a schematic diagram of explaining that sawtooth scan is handled;
Figure 10 explains according to the present invention the schematic diagram of the processing of the piece of reference frame in mobile vector computational process;
Figure 11 explains according to the present invention the schematic diagram of the processing of the piece of reference frame in mobile vector computational process;
Figure 12 explains according to the present invention the schematic diagram of the processing of the piece of reference frame in mobile vector computational process;
It still is the function curve diagram that interframe encode is handled that Figure 13 determines to carry out the intraframe coding processing;
It still is the function curve diagram that interframe encode is handled that Figure 14 determines to carry out the intraframe coding processing;
Figure 15 is the flow chart of explaining according to mobile vector computing of the present invention;
Figure 16 is the flow chart of explaining according to mobile vector computing of the present invention;
Figure 17 is a schematic diagram of explaining the thinning processing of compartmentalize;
Figure 18 A, 18B and 18C explain the schematic diagram of compartmentalize data as the layout of continuous data;
Figure 19 A and 19B are the schematic diagrames of explaining according to the encoding process of mpeg 2 encoder of the present invention;
Figure 20 is the schematic diagram of explanation according to the memory construction of the encoding process of mpeg 2 encoder of the present invention;
Figure 21 is the sequential chart of explaining according to the encoding process of mpeg 2 encoder of the present invention;
Figure 22 is the flow chart of explaining according to the mobile vector computing of mpeg 2 encoder of the present invention;
Figure 23 explains the flow chart according to the mobile vector computing of mpeg 2 encoder of the present invention;
Figure 24 is the flow chart of explaining according to the mobile vector computing of mpeg 2 encoder of the present invention;
Figure 25 is a schematic diagram of explaining one embodiment of the invention;
Figure 26 is a flow chart of explaining one embodiment of the invention;
Figure 27 is the block diagram of the configuration example of picture coding device according to the present invention;
Figure 28 is that used macro block extracts the schematic diagram of handling in the omnidistance vector detection part of interpretation of images code device;
Figure 29 is that explanation is divided into a plurality of zones to piece image, and obtains the schematic diagram of the processing of omnidistance vector, and this processing is partly carried out by the omnidistance vector detection of picture coding device;
Figure 30 is the flow chart that the mobile detection of interpretation of images code device is handled;
Figure 31 is the structured flowchart of the picture coding device according to the present invention;
Figure 32 is the flow chart of explaining according to the encoding process of picture coding device of the present invention.
Embodiments of the invention are described with reference to the accompanying drawings.Fig. 4 is a schematic diagram, and the structure of data processing equipment according to a first embodiment of the invention is shown.
With reference to Fig. 4, label 1 is a CPU (CPU).Label 2 is ROM (read-only memorys).Label 3 is RAM (random asccess memory).This CPU1, ROM2 and RAM3 link processor bus 4.
CPU1 can be as having the processor of MMX function.The MMX function allows to finish at a high speed the palingenetic process of moving picture, the editing process of figure, sound building-up process or the like.By means of the MMX instruction of using SIMD (SingleInsturction Multiple Data-single-instruction multiple-data) technology, can finish same process to continuous data at synchronization.
ROM2 stores bootstrap routine.RAM3 is the main memory as the service area.The recommended maximum size of RAM is 64MB or more for example.
CPU1 links bridge circuit 5.This bridge circuit 5 is linked processor bus 4.This bridge circuit 5 is linked PCI (periphery component interconnection) bus 6.Bridge circuit 5 connects CPU1, processor bus 4 and pci bus 6.
Pci bus 6 is linked an IDE (Integrated Device Electronics-package electronics) controller 7, SCSI (Small Compnter System Interface-small computer system interface) 8, one circular accelerator 9 of controller and an IEEE (electric engineering association) 1394 controllers 10.
IDE controller 7 is linked the memory device 11 as hard disk or CD (CD) driver.Scsi controller 8 is linked the memory device 12 as hard disk or CD drive.Scsi controller is also linked peripheral cell and the memory device as image scanner.Graphics accelerator is linked display 13.IEEE1394 controller 10 is linked the digital audio video unit as digital VCR (Video Cassette Recorder-video cassette recorder).
Pci bus 6 is linked ISA (Industrial Standard Architecture-industrial standard framework) bus 15 by bridge circuit 14.Bridge circuit 14 is linked pci bus 6 and isa bus 15.Isa bus 15 is linked 17, one of 16, one FDCs of an input device controls device and door controller 18 and a RS232C controller 19.
Input device controls device 18 is linked the input equipment 20 as keyboard and mouse.FDC 17 is linked floppy disk 21.Printer or similar devices can be connected to and door controller 18.Modulator-demodulator or similar devices are connected to RS232C controller 19.
In initial condition, starting is stored in bootstrap routine among the ROM2 to finish initial setting up.Accessing storage device 11 or 12 then.Read the operating system that exists in memory device 11 or 12.Operating system resides in the RAM3 as main storage.Start-up function system subsequently.Under the control of operating system, carry out various processing procedures.
Use pci bus and isa bus in this embodiment.Yet, can use USB (UniversalSerial Bus-USB) according to the present invention.Keyboard, mouse or similar devices are received on the USB.
When data processing equipment shown in Figure 4 is finished the MPEG2 cataloged procedure, the application program of complete MPEG2 cataloged procedure.This application program is stored in as the memory device 11 of IDE hard disk or as the memory device 12 of SCSI hard disk as executive program.When carrying out this application program, it is read into RAM3, is carried out by CPU then.
This application program of finishing the MPEG2 cataloged procedure can be contained in advance as the memory device 11 of IDE hard disk or as the memory device 12 of SCSI hard disk.In addition, CD-ROM (CD) or floppy disk can be provided for finishing the application program of MPEG2 cataloged procedure by executable format or compressed format.Can there be the companion in the user program on CD-ROM or the floppy disk to be installed to as the memory device 11 of IDE hard disk or as the memory device 12 of SCSI hard disk.As another kind of method, this application program can be downloaded by order wire.
When the application program of complete MPEG2 cataloged procedure, by prediction mode digital of digital video data is finished the motion vector calculation process, DCT computational process, quantizing process and variable-length code encoding process.This digital of digital video data compresses by the MPEG2 mode.At this on the one hand, RAM3 is used as the working region.Finish calculating operation by means of the function of CPU1 to those processes.Digital of digital video data is from external digital VCR or be connected to the similar devices input of IEEE1394 controller 10.Dateout be recorded in hard disk drive be connected to scsi controller 8 or the similar devices of IDE controller 7 in.
Fig. 5 is a flow chart, and the MPEG2 cataloged procedure of this program is shown.
As shown in Figure 5, the digital of digital video data of input multiframe.This digital of digital video data is buffered to RAM3 (step S1).By a piece matching process calculation of motion vectors (step S2).In the piece matching treatment, can use the piece pixel of profile (Contour).
Judge whether this prediction mode is the I image, P image or B image (step S3).If judge that in step S3 predictive mode is the I image, the piece of each (8 * 8) pixel of same frame is finished DCT process (step S4).The coefficient data that is obtained is quantized (step S5) and then with variable code coding (step S6).This result data deposits RAM3 (step S7) in as the reference view data.
If judge that in step S3 predictive mode is the P image, from RAM3, read in advance (forward) with reference to data (step S8) of image.This is corresponding to the motion compensation (motion-compensated) (step S9) in step S2 calculated motion vector with reference to image.Therefore, obtain the data of current figure and have motion compensation with reference to poor (step S10) between the data of image.The data-measuring (step S11) that obtains and with variable length code coding (step S12).Result data deposits RAM3 (step S13) in as reference image data.
If judge that in step S3 predictive mode is the B image, from RAM3, read two-way reference image data (step S14).Corresponding to calculated motion vector in step S2, be motion compensation (step S15) with reference to image.Obtain the data of current figure and have poor with reference between the data of image of motion compensation.Finish DCT process (step S16) for the data of current figure and with reference to the difference between the data of image.The data that obtain are quantized (step S17) and with variable length code coding (step S18).
Finish as follows in the step S2 of Fig. 5 calculated motion vector.From reference, extract the identical piece of piece that is partitioned in size and initial point and the pending present frame.When the piece of reference frame moved a predetermined region of search, the absolute value sum of the difference of the pixel of the pixel of the piece of reference frame and the relevant block of present frame obtained as a deviate (Residual).Acquisition has the piece of the reference frame of minimum deviation value.This piece matching process needs many calculation procedures.
Therefore, by the present invention, the piece matching process is to finish by means of the quadrature translation data and the comparison block of piece.An example as the quadrature transfer process uses the Hadamard conversion method.
In other words, as shown in Figure 6, data electricity CD1, the CD2 of the piece CBLK of (16 * 16) pixel of acquisition present frame ..., and CD256.As shown in Figure 7, the piece CBLK of (16 * 16) pixel of present frame is divided into 4 piece TBLK_C1 to TBLK_C4, and each is made up of (8 * 8) pixel.As shown in Figure 8,4 piece TBLK_C1 are transformed into spectrum data slice TCD1-1 to TCD-64 orthogonally to TBLK_C4, and TCD2-1 is to TCD2-64, TCD3-1 to TCD3-64 and TCD4-1 to TCD-64.4 TBLK_C1 obtain with the order than low spatial frequency data slice (Lower spatial frequency data pieces) by the saw-tooth sweep method shown in ground Fig. 9 to the data electricity of TBLK_C4.
Similarly as shown in figure 10, the data slice RD1 of the piece RBLK of (16 * 16) pixel of a reference frame of acquisition, RD2 ... and RD245.As shown in figure 11, this reference frame is divided into 4 TBLK1 to TBLK_R4.As shown in figure 12,4 are converted to spectrum data TRD1-1 orthogonally to TRD1-64, and TRD2-1 is to TRD2-64, TRD3-1 to TRD3-64 and TRD4-1 to TRD4-64.4 TBLK_R1 obtain with the order than the low spatial frequency data slice by means of as shown in Figure 9 saw-tooth sweep method to the data slice of TBLK_R4.
When quadrature converting video signal, concentration of energy is in low-frequency data.Therefore, high-frequency data exists hardly.As a result, when 4 TBLK_C4 when the data slice of TBLK_C4 obtains by means of the saw-tooth sweep method, the number of data slice is limited to predetermined value.In this example, the value of the data slice of acquisition is limited to 10.Yet, can be other values according to the data of the data slice that the present invention obtained.Similarly, when 4 TBLK_R1 of this reference frame when the data slice of TBLK_R4 obtains by means of saw-tooth sweep, the number of the data slice that is obtained is limited to predetermined value.In this example, the number of the data slice that is obtained is placed restrictions on.
In other words, for example obtain 10 data slice (marking) with the stain Fig. 8 from 4 TBLK_C1 of present frame to TBLK_C4.Similarly, for example obtain 10 data electricity (marking) with the stain Figure 12 from 4 TBLK_R1 of this reference frame to TBLK_R4.The absolute value sum of the difference data slice that obtains from 4 TBLK_C1 of this present frame to TBLK_C4 and the data slice that obtains from 4 TBLK_R1 of this reference frame to TBLK_R4 obtains as deviate.
In the piece matching process, because one data are changed orthogonally and the number of data slice is limited to predetermined value, calculation procedure can reduce widely.Therefore computational speed improves.
In other words, as mentioned above 1 be divided into 4.4 by the conversion of quadrature (for example using the special conversion method of hadamard).The number of the data slice of each quadrature conversion block is limited to 10.Finish the piece matching process with this understanding.In the case, be divided into 4 because the number of data slice is limited to 10 and 1, the calculating step number for the acquisition deviate in the piece matching process is 40.On the contrary, finish, calculate step number and become 16 * 16=256 when the piece that the piece matching process is formed with (16 * 16) pixel.Therefore, when obtaining deviate for one that changes with quadrature, calculating step number can significantly reduce.
In this situation, need to use the quadrature conversion method as the special conversion method of hadamard.Yet hadamard special formula method can be finished with simple arithmetical operation as adding, subtracting.Therefore, calculation procedure can not increase widely.
In the MPEG2 cataloged procedure, the figure of present frame is as the figure of next reference frame.Therefore, when the quadrature translation data of the piece of a figure of present frame is stored, the data of a reference frame can be used as.
When the searching moving vector, the field of search overlaps mutually.Need same quadrature translation data at crossover region.Therefore, for the piece of a reference frame, store the quadrature translation data that individual element moves.In this situation, when the field of search overlapped, the data of this storage can be used.
In above-mentioned example, use the special conversion method of hadamard as the quadrature conversion method.Yet,, can use for example DCT conversion method or FFT (fast fourier transform) according to the present invention.
In above-mentioned example, the piece of (16 * a 16) pixel is divided into 4, and each is made up of (8 * 8) pixel.These 4 pieces of cutting apart are changed orthogonally.In addition, the piece of (16 * a 16) pixel can directly be changed by the Da of quadrature.Yet when being divided into 4 and 4 by the conversion of quadrature for 1, it is simple that transfer algorithm becomes.In addition, can use general quadrature conversion line and algorithm.
Second embodiment of various details.According to second embodiment, in the middle of piece coupling computation cycles, absolute value sum and the predetermined threshold value of the difference when the pixel of the pixel of a piece of present frame and the relevant block of reference frame compare.When this be equal to or greater than predetermined threshold value, process stops.Therefore, calculating step number can reduce.As a result, motion vector can be detected apace.
Threshold value is according to average discrete absolute value (mean discrete absolute values-MAD) sum and in the deviation AD (0,0) of initial point appointment.So because threshold value is dynamically appointment, this process can be finished effectively.
In the situation of P image and B image, (intra-frame) cataloged procedure can be finished (in Fig. 5, for the sake of simplicity in P image and B image situation, interframe (inter-frame) cataloged procedure is finished with a reference frame) to each macro block in the frame.In other words, this interframe encode process can more effectively be compressed figure than intraframe coding process.Yet, comprising many DC assemblies or big motion is being arranged (promptly, the absolute value sum of difference is big between the pixel of one the pixel of present frame and the relevant block of reference frame) the situation of figure, the intraframe coding process can more effectively be compressed figure than interframe encode process.When the intraframe coding process was done, because do not need the motion vector calculation process, the inaccuracy of motion vector was admissible.
If the absolute value sum of the difference of the pixel of the pixel of a piece of present frame and the relevant block of a reference frame is equal to or greater than this predetermined threshold value, this process stops.Yet if threshold value is specified a big value, the probability that process stops in the centre becomes very high.On the contrary, if threshold value is specified a little value, motion vector is detected coarse probability and becomes very high.Yet when the intraframe coding process is done, because do not need the motion vector calculation process, the inaccuracy of motion vector can allow.Therefore, when the deviate that obtains in the intraframe coding process was used as threshold value, the efficient of this process improved.
When P image and B image were encoded, (X Y) finished the intraframe coding process according to the value of this MAD and the deviate AD of detected motion vector.
MAD is the absolute value sum of the difference of the value of pixel of a frame and mean value.MAD is as shown in the formula acquisition MAD = Σ x = 1 16 Σ y = 1 16 | Pixel ( x , y ) - AVE _ BLOCK | AVE _ BLOCK = Σ x = 1 16 Σ y = 1 16 Pixel ( x , y ) 256
The complexity of the pattern of a piece of MAD presentation graphic.Therefore, when a pattern when being simple, the value of MAD is little.On the contrary, when a pattern was complicated, the value of MAD was big.
Therefore, using the function shown in Figure 13 can determine finish the intraframe coding process still is the interframe encode process.In Figure 13, trunnion axis is illustrated in a motion vector position upper deviation AD (X, value Y) and vertical axis is represented the MAD value.In Figure 13, (X, value Y) all in the AR1 zone, is finished the intraframe coding process when MAD value and the locational deviation of motion vector.When they all in the AR2 zone, finish the interframe encode process.When MAD value hour, because the pattern of current block is simple, this function representation is finished the intraframe coding process.When motion vector position upper deviation AD (X, value Y) is little, this function representation is finished interframe encode process rather than intraframe coding process.
In the middle of the piece matching process, the absolute value sum and the predetermined threshold value of the difference of the pixel of one the pixel of present frame and the relevant block of a reference frame compare.When it be equal to or greater than this threshold value, process stops.In addition, corresponding to shown in Figure 13 and Figure 14, MAD value and determine to finish intraframe coding process or interframe encode process at the function of the value of initial point deviation AD (0,0).In addition, also determine whether to finish motion compensation.As the result who determines, the initial value of assign thresholds.Therefore, a motion vector is calculated effectively.Figure 15 is the flow chart of the such process of expression.
Because initial specified threshold value is always not little in the piece matching process, when beginning to detect motion vector, this threshold value is to obtain with the value of MAD with in the value of the deviation AD (0,0) of initial point.In to same next piece matching process, no matter the how little and value of using initial threshold or obtaining.Therefore, this process can be finished effectively.
In Figure 15, begin to be provided with the region of search (step S21) of a piece of a reference frame.Obtain the value (step S22) of MAD then.The value (step S23) of the poor AD (0,0) that obtains at initial point.Corresponding to the value of MAD with in the value of the deviation AD (0,0) of initial point, AD is set MinInitial value (step S24).
AD MinValue representation obtained the minimum value of deviation.AD MinInitial value become the initial value of the threshold value of the absolute value sum of difference between the pixel of relevant block of the pixel of a piece of present frame and reference frame.According to the intraframe coding process of determining according to the function of Figure 13 and 14 of finishing or finish the interframe encode process and whether finish movement compensation process, AD MinValue dynamically be provided with.
S24 is provided with AD in step MinInitial value after, select the upper-right position of the field of search to be used for first piece matching process (step S25).For piece, finish piece matching process (step S26) at initial position.
In the middle of the piece matching process, the absolute value sum of the difference between the pixel of the pixel of a piece of present frame and the relevant block of reference frame is compared with predetermined threshold value.When itself and when being equal to or greater than this threshold value process stop.When initially finishing the piece matching process, the AD that obtains at step S24 MinInitial value be used as threshold value.Figure 16 is the flow chart of this piece matching process of expression.
With reference to Figure 16, initial setting up location of pixels (step S41) in piece matching process (step S26).The value (step S42) of initial setting up deviation AD.Absolute value sum with the difference between the pixel of the pixel of reference frame and present frame obtains a deviation (step S43).In the centre of piece zone process, whether the absolute value sum of judging difference between the pixel of the pixel of reference frame and present frame is above AD MinValue (step S44).When the result who judges in the S44 step (that is, should and surpass AD certainly MinValue).The piece matching process stops.Flow process is got back to main program.When the result who judges at step S44 is (that is, being somebody's turn to do and not super AD of negating MinValue), judge then whether this piece matching process did (step S45) to all pixels.If the result who judges at step S45 is (that is, this piece matching process was not done all pixels as yet) of negating, then flow process turns back to step S43.At step S43, the absolute value sum of difference between the pixel of continuation calculating reference frame and the pixel of present frame.If the judged result at step S45 is to affirm (that is, this piece matching process is finished all pixels), this piece matching process stops.Then, flow process is got back to main program.
As mentioned above, step S44 judges that the value of AD is to surpass AD in the piece matching process MinValue.If the judged result of step 44 is that (that is, the value of AD surpasses AD certainly MinValue), flow process is got back to main program.Therefore, AD MinValue become threshold value.In the centre of piece matching process, absolute value sum and this threshold value of the difference between the pixel of the pixel of a piece of present frame and the relevant block of reference frame compare.When this with above predetermined threshold value, the piece matching process stops.Therefore, calculation procedure reduces.As a result, motion vector can be detected at high speed.
In addition, be used as the AD of initial threshold corresponding to the value setting of the value of MAD and the deviation AD of initial point (0,0) MinValue.If a deviate represents that finish the intraframe coding process, because do not need motion vector, the inexactness of this motion vector allows.Change because this threshold value is a trend, when a deviation surpasses a value, do not need motion vector on this value, then the probability of piece matching process termination becomes very high.So calculating step number further reduces.
In Figure 15, the value of the AD that in the piece matching process, obtains and the minimum value AD that has obtained MinRelatively (step S27).If the result who judges at step S27 is that (that is, the value of AD is less than minimum value AD certainly Min), current is used as minimum value AD with AD Min(step S28).The value of AD is recorded (step S29) as motion vector MV.Handle next piece (step S30) then.Judge whether last piece processed (step S31) then.If the judged result at step S31 is negative (that is, last piece is not processed as yet), flow process turns back to step S26.At step S26 next piece is finished the piece matching process.
As shown in figure 16, in the middle of the piece matching process, the absolute value sum and the predetermined threshold value of difference compare between the pixel of the pixel of a piece of present frame and the relevant block of reference frame.If should and be equal to or greater than this predetermined threshold, this process stops.This AD MinValue as threshold value.
In step S27, the value of the AD that in the piece matching process, obtains and the AD that has obtained MinValue compare.When the result who judges at step S27 is that (that is, the value of this AD is less than working as bright minimum value AD certainly Min), then this AD value becomes AD MinValue.Therefore, if the value of the AD that obtains greater than AD MinValue, next threshold value is identical with initial threshold.If the value of AD is less than AD MinValue, next threshold value becomes the minimum value of AD.Because in the piece matching process shown in Figure 16, if deviation surpasses AD MinValue, process stops.
Then, repeat to the circulation the step S31 from step S26.The minimum value of the absolute value sum of difference between the pixel of the pixel of a piece of acquisition present frame and the relevant block of reference frame.Judge that in step S31 whether last piece processed.If the judged result at step S31 is to affirm (that is, last piece is processed), then this minimum value AD MinBecome motion vector MV.This result is stored (step S32).
In above-mentioned example, the initial value of threshold value is the value of corresponding MAD and in the deviation AD of initial point (X, Y) value of telling appointment.Then, according to the present invention, value that can corresponding MAD and at the deviation AD of initial point (X, one in Y) is come assign thresholds.
As shown in figure 17, in the third embodiment of the present invention, the piece matching process is to finish by means of the pixel of the relevant block of the thinning pixel of compartmentalize of a piece of reference frame and present frame.
With reference to Figure 17, the piece 31 of reference frame is made up of (16 * 16) pixel.Obtain the pixel of (8 * 16) from the compartmentalize of piece 31.Similarly, present frame 32 is made up of (16 * 16) pixel.Obtain the pixel of (8 * 16) from the compartmentalize of piece 32.
Here, the present frame of compartmentalize and the pixel of reference frame deposit memory (fate of RAM3) in as continuous data, and the piece matching process can be finished effectively with the MMX instruction.
In other words, shown in Figure 18 A the pixel of the pixel of present frame and reference frame by compartmentalize.Shown in Figure 18 B, the pixel of thinning compartmentalize is rearranged to continuous data.Shown in Figure 18 C, the pixel of thinning compartmentalize deposits in the continuation address of memory.
When the pixel of the pixel of reference frame and present frame deposited memory in as continuous data, because the piece matching process is finished with the MMX instruction, this process was finished at high speed.
When the pixel of the pixel of the present frame of thinning compartmentalize and reference frame deposits memory in as continuous data, because search for 2 pixels simultaneously, be easy to finish the logarithm search procedure, wherein the MMX instruction also is suitable for.
In the logarithm search procedure, the point of minimum deflection is searched for roughly in the field of search.Then, search for the point of minimum deflection more subtly around rough search point.
When the pixel of the pixel of the present frame of compartmentalize and reference frame deposited memory in as continuous data, the logarithm search procedure was finished in following mode.
Prepare 2 memories, all pixels of first memory storage present frame and all pixels of reference frame, second memory (or memory block) stores compartmentalize as the pixel of the present frame of continuous data and the pixel of reference frame.Use second memory, block searching moving vector roughly two pixel steps.Rough detect motion vector after, use first to be stored near the some pixel that has obtained with pixel searching moving vector subtly.Can accurately detect motion vector like this.
Shown in Figure 19 A, the graph data sheet of every frame, F1 for example, F2, F3, F4, F5, F6, F7 or the like is transfused to.Input graphics data sheet ground, F2, F3, F4, F5, F6, F7 or the like be with I, B, B, P, B, the order encoding of B and P image becomes the graph data sheet P1 of MPEG2, P2, P3, P4, P5, P6, P7 or the like.
As shown in figure 20, in like this for the cataloged procedure that obtains motion vector, working region RAM3 have memory block 21A to 21F and memory block 22A to 22C.All pixels that memory block 21A deposits a frame to the 21F companion.Memory block 22A stores compartmentalize as the pixel of a frame of continuous data to 22C.
As graph data sheet F1, F2, F3 are when importing as shown in Figure 21, and the graph data electricity of every frame is deposited in memory block 21A to 21F.In addition, from the graph data sheet one by one compartmentalize obtain pixel.Final pixel is arranged into continuation address and as graph data sheet f1, f2, f3 etc. deposit memory block 22A in to 22C.
In other words, at time point T1, graph data sheet F1 deposits memory block 21A in.At time point T2, graph data sheet F2 deposits memory block 21B in.At time point T3, graph data sheet F3 deposits memory block 21C in.At time point T4, graph data sheet F4 deposits memory block 21D in.
At time point T4, from graph data sheet F1 one by one compartmentalize obtain pixel.This graph data sheet f1 is arranged into and deposits memory block 22A in the continuation address in.From graph data sheet F4 one by one compartmentalize obtain pixel.This graph data sheet is arranged into continuation address and deposits memory block 22B in.
At time point T5, the graph data electricity deposits memory block 21E in.From graph data sheet F2 one by one compartmentalize obtain pixel.This graph data sheet is arranged into and deposits memory block 22C in the continuation address in.
At time point T6, graph data sheet F6 deposits memory block 21F in.From graph data sheet F3 one by one compartmentalize obtain pixel.This number form data slice f3 is arranged into and deposits memory block 22C in the continuation address in.
At time point T7, graph data sheet F7 deposits memory block 21A in.From graph data F7 one by one compartmentalize obtain pixel.This graph data sheet f7 is arranged into and deposits memory block 22A in the continuation address in.
As shown in figure 21, the graph data sheet of every frame is deposited in memory block 21A to 21F.In addition, from the graph data sheet one by one compartmentalize obtain pixel.The graph data sheet is arranged into and deposits memory block 22A in the continuation address in to 22C.
With being stored in the graph data sheet F1 of memory block 21A to 21F, F2, F3 etc. and be stored in the graph data sheet f1 of memory block 22A to 22C, f2, f3 etc. have just obtained motion vector.A motion vector was stuck in the field of search of closing in advance with 2 pixel steps to be searched for.A motion vector is searched on individual element ground near the search point.In other words, motion vector obtains by means of the logarithm search procedure.
Because graph data sheet P1 is the I image, it can be encoded from time point T1 to time T3.
At time point T4, be encoded as the graph data sheet P4 of P image.Obtain the motion vector of graph data P4.To this graph data sheet P4, graph data sheet F1 is used as reference frame, and graph data sheet F4 is used as present frame.In this situation, (with 2 pixel step cards) use the graph data sheet f1 that has memory block 22A as the piece of reference frame in the rough search process.Piece as present frame uses the graph data sheet F4 that is stored in memory block 22B.(with 1 pixel step card) uses the graph data sheet F1 that has memory block 21A as the piece of reference frame in the fine search process.As the piece of present frame, use the graph data sheet F4 that is stored among the 21D of memory block.
At time point T5, be encoded as the graph data sheet P2 of B image.Obtain the motion vector of graph data sheet P2.To graph data sheet P2, use graph data sheet F1 and F4 as reference frame.As present frame, use graph data sheet F2.In this situation, (with 2 pixel step cards) use graph data sheet f1 that is stored in memory block 22A and the graph data sheet f4 that is stored in memory block 22B in the rough search process.Make piece, use the graph data sheet f2 that is stored in memory block 22C for present frame.(with 1 pixel step card) uses graph data sheet F1 that is stored in memory block 21A and the graph data sheet F4 that is stored in memory block 21D as the piece of reference frame in the fine search process.As the piece of present frame, use the graph data sheet F2 that is stored in memory block 21B.
At time point T6, be encoded as the graph data sheet P3 of B image.Obtain the motion vector of figure P3.To graph data sheet P3, use graph data sheet F1 and F4 as reference frame.As present frame, use graph data sheet F3.With in the case, in the rough search process, (with 2 pixels step card) uses graph data sheet f1 that is stored in memory block 22A and the graph data sheet f4 that is stored in memory block 22B as the piece of reference frame.As the piece of present frame, use the graph data sheet f3 that is stored in memory block 22C.(with 1 pixel step card) uses graph data sheet F1 that is stored in memory block 21A and the graph data F4 that is stored in memory block 21D as the piece of reference frame in the fine search process.As the piece of present frame, use the graph data sheet F3 that is stored in memory block 21C.
At time point T7, coding is as the graph data sheet P7 of P image.Obtain the motion vector of figure P7.For graph data sheet P7, use graph data sheet F4 as a reference frame.Use graph data sheet F7 as present frame.In the case, (with 2 pixel step cards) use the graph data sheet f4 that is stored in memory block 22B as the piece of reference frame in the rough search process.As the piece of present frame, use the graph data sheet f7 that is stored in memory block 22A.(with 1 pixel step card) uses the graph data district f4 that is stored in memory block 21D as the piece of reference frame in the fine search process.As the piece of present frame, use the graph data sheet F7 that is stored in memory block 21A.
Below, similarly at time point T8, obtain motion vector as the graph data sheet P5 of B image.At time point T9, obtain motion vector as the graph data sheet P6 of B image.
Figure 22 is a flow chart, and expression is used for the logarithm search procedure of calculation of motion vectors.In Figure 22, store input graphics data.Extract pixel out in compartmentalize ground one by one from reference frame and present frame.The pixel of compartmentalize of attenuating is aligned to and stores (step S121) as continuous data.
After, so judge whether the piece of figure processed (step S122).
If the judged result at step S122 is negative (that is, all pieces of this figure is not processed as yet), and this piece moves with 2 pixel step cards in a predetermined search district, searches for a motion vector (step S123).
After detecting a motion vector,, search a motion vector (step S124) when near this piece individual element ground when motion detected motion vector.
Detected result is stored (step S125).Then, handle next piece (step S126).Then, flow process is got back to step S122.If the judged result at step S122 is negative (promptly all pieces is not processed as yet), similar process repeats.So, obtain the motion vector of next piece.After the motion vector of the last piece that obtains figure,, finish dealing with because be certainly in the judged result of step S122.
Figure 23 is a flow chart, is illustrated in the rough search process (at 2 pixel step cards) of the step S123 among Figure 22.Omit (at 2 pixels step cards) in the search procedure in essence, the pixel of present frame and the pixel of reference frame are extracted out by compartmentalize ground.The pixel that is drawn out of deposits memory in as continuous data.
The starting point (step S131) of the field of search is set in Figure 23.The vertical search original position resets to upper end (step S132).Judge whether to detect lower end (step S133) in vertical direction.If the judged result of step S133 be negative (that is, not detecting the lower end as yet) then horizontal level reset to left end (step S134).
Then, judge whether to detect the right-hand member (step S135) of the field of search.If the judged result in step 135 is negative (that is, not detecting the right-hand member of the field of search as yet), then the piece of compartmentalize (8 * 16) pixel is finished the piece matching process and obtained a deviate (step 136).
Judge that whether the value of this deviation AD is less than the minimum value AD that has obtained here, Min(step S137).If the judged result at step S137 is that (that is, the value of this deviation AD is less than minimum value AD certainly Min), then the value of this deviation AD becomes minimum value AD MinIn addition, this motion vector VT is current location (step S138).Then, move the horizontal level (step S139) of 2 pixels.The pixel of present frame and the pixel of reference frame be by the extraction of compartmentalize, and deposit memory in as continuous data.Therefore, when horizontal level moves 2 pixels, 1 position is only moved in the address in memory.
If in the judged result of step S137 is that negative (that is, the value of this deviation AD is not less than minimum value AD Min), then flow process is carried out step S139.At step S139, horizontal level moves 2 pixels.Flow process turns back to step S135 then.
Judge whether to detect the right-hand member of the field of search at step S135.If the judged result at step S135 is negative (that is, the right-hand member of the field of search does not detect as yet), then similarly step repeats.So,, obtain deviation when this piece moves to right.Minimum deflection is as AD MinStore.
If the judged result at step S135 is to affirm (that is, having detected the right-hand member of the field of search), then 2 pixels of this piece vertical moving (step S140).Then, flow process is got back to step S133.Finish similar process.
If the judged result at step S133 is to affirm (that is, having detected the low side of the field of search), then this result is stored (step S141) as motion vector MV.This motion vector MV becomes a reference point of fine search process.
Figure 24 is a flow chart, is illustrated in the fine search process of step S24 among Figure 22.In the fine search process, the memory of all pixels of use storage present frame and all pixels of reference frame.
In Figure 24, starting point is set at the upper left side (step S151) of the reference point that step S141 obtains among Figure 23.The vertical search original position resets to upper end (step S152).Then, judge whether to detect the lower end (step S153) of the field of search.If the judged result at step S153 is negative (that is, not detecting the lower end as yet), then horizontal level resets to left end (step S154).
Then, judge whether to detect the right-hand member (step S155) of the field of search.If the judged result at step S155 is negative (that is, not detecting the right-hand member of the field of search as yet), then the piece of (16 * a 16) pixel is finished the piece matching process and obtained a deviation (step 156).
Then, judge that whether the value of this deviation AD is less than acquired minimum value AD Min(step S157).If the judged result of step S157 is that (that is, the value of this deviation is less than minimum value AD certainly Min), then the value of deviation AD becomes minimum value AD Min(step S158).This motion vector MV is when bright position.Horizontal level moves 1 pixel (step S159).
If the result who judges at step S157 is that negative (that is, the value of deviation AD is not less than minimum value AD Min), then flow process enters step S159.At step S159, horizontal level moves 1 pixel.Then, flow process is got back to step S155.
At step S155, judge whether to detect the right-hand member of the field of search.If the judged result at step S155 is negative (that is, not detecting the right-hand member of the field of search as yet), similarly process repeats.So,, obtain deviate when this piece moves to the right from the left side of the field of search.Acquired minimum deflection is as minimum value AD MinStore.
If the result who judges at step S155 affirms (that is, having detected the right-hand member of the field of search), this piece moves 1 pixel (step wants 60) in vertical direction.Then, flow process turns back to S153, finishes similar process.
If the judged result at step S153 is to affirm (that is, having detected the lower end of the field of search), then obtain motion vector VM, and process is finished.
In above-mentioned example, the pixel of reference frame and when the pixel of front end by the extraction of compartmentalize.But, according to the present invention, thinning step and thinning method be not limited to described in the above-mentioned example like that.
In above-mentioned example, when finishing the logarithm search procedure, in the rough search process, store in the memory to the thinning pixel of each sample, move each position the address, so that at motion vector of 2 pixel step card search.In addition, by means of the address of moving 2 positions a moment, can finish the search procedure of 4 pixels a moment.Similarly, by means of the address of moving 3 positions a moment, can finish the search procedure of 6 pixels a moment.In above-mentioned example, the logarithm search procedure was finished the rough search process and is finished the fine search process with 1 pixel step card with 2 pixel step cards a moment.In addition, the logarithm search procedure can be finished with a plurality of stages.
According to the present invention, the pixel of reference frame and the pixel of present frame are thinning by compartmentalize, finish the piece matching process.Here, the pixel of the pixel of present frame and reference frame deposits in the memory as continuous data.Therefore, when finishing fast matching process, because can use the MMX instruction effectively, process can be finished at high speed.
In addition, should prepare to store the pixel of present frame and reference frame pixel first memory and store the pixel of the thinning present frame of compartmentalize and the second memory of reference frame pixel.Use second memory to finish the rough search process with 2 pixel step cards.In this situation, because be stored in the second memory as continuous data by the pixel of the pixel of the present frame of thinning compartmentalize and reference frame, when the piece of this reference frame moves each position in second memory, with 2 pixels step card searching moving vectors.After in rough search process, obtaining motion vector, finish the fine search process with 1 pixel step card near the point that uses first memory in the rough search process, to obtain with 2 pixel step cards.
Therefore, when the pixel of the present frame of compartmentalize and the pixel of reference frame store as continuous data, because with 2 pixels step card searching moving vectors, the logarithm search procedure can easily be finished, and suitable MMX instruction.
As the step S2 of Fig. 5, finish motion to computational process by means of the piece matching process.In the piece matching process, obtain motion vector by means of the piece matching process.In other words, with from the pending piece of present frame division there is the piece of same size and same origin from a reference frame, to extract out.When the piece of this reference frame moves in the predetermined search district, obtain the absolute value sum of difference of pixel of the piece of the pixel of piece of this reference frame and present frame, with this as deviation.Obtain having the piece of this reference frame of minimum deflection.Traditionally, deviation is the absolute value sum as the difference of the pixel of the pixel of the piece of present frame and reference frame.But because calculation procedure is huge, the calculating of motion vector can not be to finish at a high speed.
Therefore, according to the 4th embodiment of the present invention, obtain deviation by means of the absolute value sum of the difference of the pixel of the profile of the relevant block of the pixel of the profile of the piece that calculates present frame and reference frame.
In other words, in Figure 25, a piece of reference frame is made up of (16 * 16) pixel.Similarly, present frame piece is made up of (16 * 16) pixel.The value of each pixel of this reference frame P (Hr, Vr) mark.The value of each pixel of present frame is with P (Hc, Vc) mark similarly.(Hr, Vr) (Hr+15, Vr) (Hc, (Hc+15, the absolute value sum of difference Vc) is as deviation Vc) to arrive P with the last outline pixels P of the relevant block of present frame to P to obtain the last outline pixels P of the piece of this reference frame.(Hr, Vr+1) (Hr, Vr+14) (Hc, Vc+1) (Hc, the absolute value sum of difference Vc+14) is as deviation to P with the outline pixels P of the relevant block of present frame to P to obtain the right outline pixels P of the piece of this reference frame.(Hr+15, Vr+1) (Hr+15, Vr+14) (Hc+15, the absolute value sum of difference Vr+1) is as deviation with the right outline pixels P of the relevant block of present frame to P to calculate the right outline pixels P of the piece of this reference frame.(Hr, Vr+15) (Hr+15, Vr+15) (Hc, Vc+15) (Hc+15, the absolute value sum of difference Vr+15) is as profile to P with the following outline pixels P of the relevant block of present frame to P to obtain the following outer appearance P of the piece of this reference frame.
Figure 26 is the processing that the summation of the absolute value of difference between the contour pixel of the contour pixel of the piece that is used to obtain present frame and reference frame related blocks is shown, so that obtain a deviation.
With reference to Figure 26, the value initialization of accumulated value AD is " 0 " (step S221).After this, to the horizontal level Hc and the upright position Vc of the pixel of present frame, and the horizontal level Hr of reference frame pixel and upright position Vr initialization (step S222).Skew O is initialized as " 0 " (step S223).
(Hr+O, (Hc+O, the absolute value of difference between value Vc) is as accumulated value AD (step S224) for value Vr) and the pixel P of present frame to obtain the pixel P of reference frame.After this, skew O increases (S225).After this, determine that whether skew O is less than 16 (step S226).When determining that at step S226 the result is Yes (promptly being offset O less than 16), flow process is returned step S224.
The circulation from step S224 to step S226, (Hr, Vr) (Hr+15, Vr) (Hc Vc) arrives P (Hc+15, Vc) summation of the absolute value of the difference between with the last contour pixel P of present frame related blocks to P to obtain the last contour pixel P of the piece of reference frame.
In other words, because skew O is initialized as " 0 " at step S223, so (Hr, (Hc, the absolute value of the difference between value Vc) is as accumulated value AD for the top left pixel P of value Vr) and present frame related blocks for the top left pixel P of reference frame piece.
After this, increased skew O at step S225.Thus, obtain pixel P (Hr+1, the pixel P of the piece that value Vr) is relevant with present frame (Hc+1, the absolute value of the difference between value Vc), and be added to accumulated value AD of the piece of reference frame.Step in the circulation repeats, and O is " 15 " up to skew.Then, (Hr, Vr) (Hr+15, (Hc Vc) arrives P (Hc+15, Vc) summation of the absolute difference between to the last contour pixel P of the piece that last contour pixel Vr) is relevant with present frame to P to obtain the last contour pixel P of the piece of reference frame.
Thus, circulation, obtain the summation of absolute difference between the last contour pixel of the last contour pixel of piece of present frame and reference frame related blocks from step S224 to S226.After this determine at step S226 whether skew O is " 16 ".When the result who determines at step S226 was No (promptly being offset O is " 16 "), owing to detected the right-hand member of piece, skew O was initialized as " 1 ".(at step S227).
After this obtain pixel P (Hr, the pixel P of value Vr+O) and the related blocks of present frame (Hc, the difference between value Vc+O) of the piece of reference frame.Obtain pixel P (Hr+15, the pixel P of value Vr+O) and present frame related blocks (Hc+15, the difference between value Vc+O) of reference frame piece.Obtain the summation of these absolute values, as accumulated value AD (at step S228).After this, skew O increases (at step S229).After this, determine that whether skew O is less than " 15 " (step S230).When the result who determines at step S230 was Yes (promptly being offset O less than " 15 "), flow process was returned step S228.
Circulation from step S228 to S230, obtain the piece of reference frame left profile pixel P (Hr, Vr+1) (Hr is Vr+14) with the left profile pixel P (Hc of present frame related blocks to P, Vc+1) to P (Hc, the summation of the absolute difference between left profile pixel Vc+14).In addition, (Hr+15, Vr+1) (Hc+15 is Vc+1) to P (Hc+15, Vc+14) summation of the absolute difference between with the right contour pixel P of present frame related blocks to obtain the right contour pixel P of the piece of reference frame.
After this determine at step S230 whether skew O is " 15 ".When determining No (promptly being offset O is " 15 ") at step S230, owing to detected the lower end of piece, skew O is initialized as " 0 " (step S231).
Below, (Hr+O, Vr+15) (Hc+O, the Vc+15) absolute difference between is as accumulated value AD (at step S232) with the pixel P of present frame related blocks to obtain the pixel P of the piece of reference frame.After this, skew O increases (at step S233).After this determine that whether skew O is less than " 16 ".When the result who determines at step S234 was Yes (promptly being offset O less than " 16 "), flow process was returned step S232.
Circulation from step S232 to S234, obtain the piece of reference frame bottom profiled pixel P (Hr, Vr+15) (Hr+15 is Vr+15) with the bottom profiled pixel P (Hc of present frame related blocks to P, Vc+15) to P (Hc+15, Vc+15) summation of the absolute difference between.When the result who determines at step S234 was No (promptly being offset O is " 16 "), owing to detected the piece right-hand member, process finished.
Circulation, obtain the summation of the absolute difference between the last contour pixel of the last contour pixel of present frame piece and reference frame related blocks from step S224 to S226.Circulation, obtain the summation of absolute difference between the piece left profile pixel of present frame and the reference frame related blocks left profile pixel from step S228 to S230.In addition, the summation of absolute difference between the right contour pixel of piece that obtains present frame and the reference frame related blocks right side contour pixel.Circulation, obtain the piece bottom profiled pixel of present frame and the summation of the absolute difference between the reference frame related blocks bottom profiled pixel from step S232 to S234.Thus, obtain the summation of absolute difference between the piece four side profile pixels of present frame and the reference frame related blocks four side profile pixels.
Thus, when the summation of the absolute difference between contour pixel that obtains the present frame piece and the reference frame related blocks contour pixel, the quantity that obtains the calculation procedure of deviation can reduce greatly.As a result, execution block matching treatment at high speed.In other words, when the size of piece is (16 * 16) pixel,, need 256 subtractions in order to calculate all pixels of a piece.By contrast, in order to calculate contour pixel, only need 60 subtractions.In addition, owing to do not make contour pixel thinning, can obtain mobile vector with the precision of a pixel.
Below, with the image encoding apparatus of describing according to a fifth embodiment of the invention.
Figure 27 illustrates the structure of image encoding apparatus 401 according to a fifth embodiment of the invention.With reference to Figure 27, image encoding apparatus (by 401 marks) has frame buffer 202, mobile test section 203, deviation information generation part 204, omnidistance vector detection part 205 and control section 206.View data is input to frame buffer 202.The mobile component that is stored in the view data in the frame buffer 202 is detected in mobile test section 203.Deviation information produces part 204 and produces mobile deviation information AD.Omnidistance vector detection part 205 detects the mobile vector of whole picture.Control section 206 will be used for the various piece that parameter of encoding process etc. outputs to equipment.
Frame buffer 202 is from the external equipment input image data, and a frame one frame ground storing image data.Frame buffer 202 outputs to mobile test section 203, deviation information generation part 204, omnidistance vector detection part 205 and calculating section 207 by predetermined sequential with view data under control section 206 controls.
Omnidistance vector detection part 205 sampled picture data (receiving from frame buffer 202) as a plurality of grand deviations, and detect the mobile vector of whole macro block.In other words, because omnidistance vector detection part 205 obtains the mobile vector of all macro blocks, omnidistance vector detection part 205 obtains the mobile vector (being omnidistance vector) of entire image, and detected omnidistance vector is offered mobile test section 203.
In fact, as shown in figure 28, omnidistance vector detection part 205 extracts a plurality of macro blocks at the diverse location of a picture, and detects a mobile vector of the macro block that extracts.In this, omnidistance vector detection part 205 offers evaluation function with the mobile vector of the macro block of each extraction, to obtain omnidistance vector.As evaluation function, this expression formula is calculated the mean value of the mobile vector of the macro block that extracts to omnidistance vector detection part 205, to obtain omnidistance vector with a function representation formula.
Perhaps, omnidistance vector detection part 205 can detect a plurality of neighboring macro-blocks, to obtain omnidistance vector.In other words, omnidistance vector detection part 205 can obtain, have each (16 * 16) pixel macro block or each omnidistance vector of the zonule of (32 * 32) pixel for example.
As another method, as shown in figure 29, omnidistance vector detection part 205 can obtain the omnidistance vector of regional A, B and C, and a screen just vertically is divided into regional A, B and C.Thus, as regional A is the picture (it has been made a video recording and has been remote picture) on mountain, and zone C is the picture (it is picture closely by shooting) of flower, and pan in regional A and C zone, even a screen has two pictures that move mutually, can obtain being used for the omnidistance vector in each zone.Each zone can be overlapped.
The mobile vector MV of each macro block of the view data of mobile test section 203 detection of stored in frame buffer 202 (constituting) by 16 * 16 pixels.Mobile test section 203 is with reference to the macro block of frame and the macro block mode coupling of reading from frame buffer 202, and detection mobile vector MV.Mobile test section 203 offers deviation information with detected mobile vector MV and produces part 204 and control section 206.In this point, mobile test section 203 produces mobile vector MV by the omnidistance vector that receives from omnidistance vector detection part 205.In other words, when each macro block in the predetermined search zone of mobile test section 203 pattern matching, the skew of the omnidistance vector of mobile test section 203 usefulness changes each macro block in the region of search, and obtains mobile vector MV.Mobile test section 203 changes the center of region of search corresponding to omnidistance mobile vector, with each macro block of pattern matching.
Deviation information produces part 204 and receives mobile vector MV from mobile test section 203.In addition, deviation information produces part 204 receives view data from frame buffer 202 each macro block.Use mobile vector MV and view data, deviation information produces the summation that part 204 obtains absolute difference between the mobile component, as deviation information AD, and this deviation information AD is offered control section 206.
The mobile vector MV that control section 206 usefulness receive from mobile test section 203, and, determine the type of macro block for encoding process from the mobile deviation information AD that deviation information generation part 204 receives.Control section 206 determines corresponding to for example image type whether current macro is middle macro block (inter-macro block) or intra-macroblock (intra-macro block).Middle macro block is to carry out motion compensation by mobile vector MV, and uses the macro block of deviation coding.By contrast, intra-macroblock is a simple coding and do not have the macro block of mobile component.
Control section 206 produces control information, makes switch 217 and 218 corresponding to the macro block (mb) type operation of determining.In addition, control section 206 will offer moving displacement compensated part 216 from the mobile vector MV that mobile test section 203 receives.
Picture coding equipment 201 also has calculating section 207, DCT processing section 208, quantification treatment part 209, variable-length codes coded portion 210 and buffer 211.Calculating section 207 receives picture signal from frame buffer 202.DCT processing section 208 is finished DCT (discrete cosine transform) for view data and is handled.209 pairs of DCT coefficients that receive from DCT processing section 208 of quantification treatment part quantize.The DCT coefficient that the compression of variable-length codes coded portion 210 usefulness variable-length codes receives from quantification treatment part 209.The view data that buffer 211 storages receive from variable-length codes coded portion 210.
DCT processing section 208 is carried out two-dimensional dct for the macro block of each (8 * 8) pixel of the view data that receives from calculating section 207 and is handled.DT processing section 208 offers quantification treatment part 209 with the DCT coefficient.
Quantification treatment part 209 usefulness are corresponding to the DCT coefficient quantization of quantization scale to receiving from DCT processing section 208 of each macro block.Quantification treatment part 209 offers variable-length codes coded portion 210 and inverse quantization processing section 212 with the DCT coefficient that quantizes.
Variable-length codes coded portion 210 receives the DCT coefficient from quantification treatment part 209, and receives mobile vector MV from control section 206.Such information has been arranged, and variable-length codes coded portion 210 is carried out encoding process.Variable-length codes coded portion 210 usefulness are carried out encoding process corresponding to the variable-length codes of MPEG grammer, and carry out title processing, code generation processing etc., to produce view data.Variable-length codes coded portion 210 offers buffer 211 with the image encoded data.
The view data that buffer 211 storages receive from variable-length codes coded portion 210, and under the control of control section 206, at the fixed time with the bit stream output image data.
In addition, image encoding apparatus 201 also has inverse quantization processing section 212, anti-DCT processing section 213, unit of account 214, buffer 215 and motion compensation part 216.The DCT coefficient inverse quantization that the 212 pairs of quantification treatment parts 209 in inverse quantization processing section receive.The 213 pairs of DCT coefficients that receive from inverse quantization processing section 212 in anti-DCT processing section are oppositely carried out DCT and are handled.Computing unit 214 is 213 reception view data from anti-DCT processing section.Buffer 215 storing image datas.216 pairs of view data that receive from buffer 215 of motion compensation part are carried out motion compensation.
The 212 pairs of DCT coefficient inverse quantizations that receive from quantification treatment part 209 in inverse quantization processing section.The data inverse quantization of inverse quantization processing section 212 usefulness quantization scale to receiving from quantification treatment part 209, and the DCT coefficient that obtains offered anti-DCT processing section 213.
The anti-DCT of execution of the 213 pairs of DCT coefficients that receive from inverse quantization processing section 212 in anti-DCT processing section handles, and the DCT coefficient that obtains is offered unit of account 214.Unit of account 214 receives processed images data in anti-DCT processing section 213.In addition, unit of account 214 receives view data (having passed through motion compensation) by switch 217.Unit of account 214 is the view data of motion compensation part and the view data addition that receives from anti-DCT processing section 213, and final data is offered buffer 215.
Buffer 215 is from each macro block of unit of account 214 reception view data, and storing image data.When motion compensation part 216 motion compensation pictorial data, read the view data of prediction from buffer 215.
Motion compensation part 216 is read each macro block of predicted image data from buffer 215 corresponding to mobile vector MV.
When image encoding apparatus 201 produced I (inside) image, each macro block that is in the view data in the frame buffer 202 offered DCT processing section 208 and quantification treatment part 209 by unit of account 207.DCT processing section 208 is that each macro block of view data is carried out the DCT processing.The view data that 209 pairs of quantification treatment parts receive from DCT processing section 208 quantizes.The coded image data of variable-length codes coded portion 210 usefulness variable-length codes to receiving from quantification treatment part 209, and, export the data that obtain with bit stream by buffer 211.The signal of having been handled by quantification treatment part 209 and variable-length codes coded portion 210 that obtains is recovered to view data by inverse quantization processing section 212 and anti-DCT processing section 213, and temporarily stores buffer 215 into.
When image encoding apparatus 201 produced P (prediction) image, the mobile component of the view data of mobile test section 203 detection of stored in frame buffer 202 was to produce mobile vector MV.In addition, deviation information produces part 204 and produces deviation information AD.Mobile vector MV offers motion compensation part 216 by control section 206.216 pairs of motion compensation parts are stored in the view data motion compensation (when producing the I image, image data storage is in buffer 215) in the buffer 215.Like this, motion compensation part 216 has produced prediction data.Motion compensation 216 carries out motion compensation to each macro block.Switch 217 and 218 cuts out corresponding to the switch controlling signal that receives from control section 206.Deduct the predicted image data that receives from motion compensation 216 in the view data of unit of account 207 from be stored in frame buffer 202.DCT processing section 208 and quantification treatment part 209 are carried out above-mentioned processing.210 pairs of coded image datas of variable-length codes coded portion, and the data that obtain with bit stream output by buffer 211.
When image encoding apparatus 201 produced the B images and resembles (bi-directional predicted), 216 pairs of motion compensation parts were stored in the view data of former frame of buffer 215 and the view data of next frame is carried out motion compensation, to produce the predetermined image data.The view data of unit of account 207 from be stored in frame buffer 202 deducts predicted image data.DCT processing section 208 and quantification treatment part 209 are carried out above-mentioned processing.210 digital coding of usefulness variable-length codes of variable-length codes coded portion, and the data that obtain with bit stream output by buffer 211 to receiving from unit of account 207.
Figure 30 is the flow chart that the processing that is used to detect mobile vector MV is shown.This is handled by image encoding apparatus 201 and carries out.
With reference to Figure 30,, the view data of a frame is input to frame buffer 202 at step S301.In processing shown in Figure 30, to S304, detect omnidistance vector at step S302.At step S305, mobile test section 203 produces the mobile vector MV of each macro block.
At step S302, omnidistance vector detection part 205 inputs are stored in the view data of each frame in the frame buffer 202, and extract a plurality of macro blocks from view data, as shown in figure 28.At step S302, as shown in figure 29, another is divided into a plurality of zones screen, and can extract a plurality of macro blocks therefrom.
In step 303, omnidistance vector detection part 205 detects the mobile vector of each macro block that detects at step S302.
At step S304, omnidistance vector detection part 205 is applied to evaluation function with the mobile vector of each macro block, to produce omnidistance vector.The mean value visitor of the mobile vector of omnidistance vector detection part 205 computing macro blocks, and produce omnidistance vector.
At step S305, mobile test section 203 receives the macro block of each view data, and the omnidistance arrow pattern that is used in step S304 detection is mated each macro block, and detects the mobile vector of each macro block.In this point, mobile test section 203 is corresponding to the center of omnidistance vector variation region of search, and each macro block of pattern matching.
At step S306, the result of the detection that mobile test section 203 obtains corresponding to step S305 detects the mobile vector MV of each macro block, and the mobile vector VM of each macro block is offered deviation information produces part 204 and control section 206.
In image encoding apparatus 201, before mobile test section 203 produced the mobile vector MV of each macro block, omnidistance vector detection part 205 detected omnidistance vector, a mobile vector of its expression entire image.Like this, mobile test section 203 does not need to detect the mobile vector MV of each macro block in the extensive region.As a result, the processing that is used to detect mobile vector MV can be carried out by less calculating step number.In other words, in image encoding apparatus 201,, also needn't make omnidistance vector detection part 205 obtain the omnidistance vector of entire image and the mobile vector that detects each macro block in the extensive region even the image that moves pans.
In addition, use image encoding apparatus 201, even image high-speed mobile on whole screen, the mobile vector of each macro block is easy to detect.
In addition, use image encoding apparatus 201, because a screen is divided into a plurality of zones, so omnidistance vector detection part 5 is calculated the omnidistance vector in each zone.Thus, even image moves on screen significantly, then mobile vector MV can be detected effectively.
Below, the sixth embodiment of the present invention will be described.
Figure 31 is piece figure, and the structure of image encoding apparatus according to a sixth embodiment of the invention is shown.
Figure 31 illustrates the structure of image encoding apparatus according to a sixth embodiment of the invention.With reference to Figure 31, image encoding apparatus (being labeled as 301) has frame buffer 302, mobile test section 303, deviation information generation part 304 and control section 305.View data is input to frame buffer 302.The mobile component of the view data of mobile test section 303 detection of stored in frame buffer 302.Deviation information produces part 304 and produces mobile deviation information AD.Control section 306 will be used for the various piece that parameter of encoding process etc. is delivered to equipment.
Frame buffer 302 inputs are from the view data of external equipment, and a frame one frame ground storing image data.Frame buffer 302 outputs to view data mobile test section 303, deviation information generation part 304 and calculating section 307 at the fixed time under the control of control section 305.
Mobile test section 303 detection of stored are at the mobile vector MV of each macro block (being made of 16 * 16 pixels) of the view data of frame buffer 302.The macro block of mobile test section 303 pattern matching reference frame and the macro block of reading from frame buffer 302, and detect mobile vector MV.Mobile test section 303 offers deviation information with detected mobile vector MV and produces part 34 and control section 305.
Deviation information produces part 304 and receives mobile vector MV from mobile test section 303.In addition, deviation information produces part 304 receives view data from frame buffer 302 each macro block.Mobile vector MV and view data have been arranged, and deviation information produces the summation that part 304 produces absolute difference between the mobile components, as deviation information AD, and deviation information AD is offered control section 305 and redirect control section 310.
Mobile vector MV that control section 305 usefulness receive from mobile test section 303 and the mobile deviation information AD that receives from deviation information generation part 304 are that encoding process is determined macro block (mb) type.Control section 305 determines corresponding to for example image type whether current macro is middle macro block or intra-macroblock.Middle macro block is with mobile vector MV motion compensation, and and with the macro block of deviation coding.By contrast, intra-macroblock is the macro block that does not have the simple coding of mobile component.
Control section 305 produces control information, corresponding to the macro block (mb) type of determining, makes switch 317 and 318 work.In addition, control section 305 will offer motion compensation part 316 from the mobile vector MV that mobile test section 303 receives.
Image encoding apparatus 301 also has calculating section 306, DCT processing section 307, quantification treatment part 308, variable-length codes coded portion 309, above-mentioned redirect control section 310 and buffer 311.Calculating section 306 receives picture signal from frame buffer 302.DCT processing section 307 is carried out DCT (discrete cosine transform) for view data and is handled.308 pairs of DCT coefficient quantizations that receive from DCT processing section 307 of quantification treatment part.The DCT coefficient that the compression of variable-length codes coded portion 309 usefulness variable-length codes receives from quantification treatment part 308.Redirect control section 310 control DCT processing sections 307, quantification treatment part 308, variable-length codes coded portion 309 or the like.Buffer 311 is stored image encoded data.
The macro block of each (8 * 8) pixel of the view data that 307 pairs of DCT processing sections receive from calculating section 306 is carried out two-dimensional dct and is handled.DCT processing section 307 offers quantification treatment part 308 with the DCT coefficient.
The DCT coefficient quantization of quantization scale that quantification treatment part 308 usefulness change corresponding to each macro block to receiving from DCT processing section 307.Quantification treatment part 308 offers variable-length codes coded portion 309 and inverse quantization processing section 312 with the DCT coefficient that quantizes.Except quantification treatment, quantification treatment part 308 produces CBP (block mode of coding).When quantizing processing section 308 generation CBP, it will represent that the information of CBP offers variable-length codes coded portion 309.
Redirect control section 310 produces the redirect control signal, makes DCT processing section 307 and quantification treatment part 308 corresponding to producing the mobile deviation information that part 304 receives from deviation information, and skip DCT and handle, and quantification treatment.Redirect control section 310 303 receives mobile deviation information AD from mobile test section, predicts the value of CBP with mobile deviation information AD, and corresponding to the value of CBP, the DCT coefficient is set to " 0 ".When redirect control section 310 DCT coefficients were set to " 0 ", redirect control section 310 offered motion compensation part 316, DCT processing section 307, quantification treatment part 308 and variable-length codes coded portion 309 with the redirect control signal.Thus, when being set to " 0 ", make this part skip their processing the value (being the DCT coefficient) of CBP when redirect control section 310.
When redirect control section 310 DCT coefficients are set to " 0 ", redirect control section 310 will produce mobile deviation information AD and the predetermined value comparison that part 304 receives from deviation information.Predetermined value is by for example user's design.In other words, as mobile deviation information AD during less than predetermined value, redirect control section 310 determines that the value of CBP is little, and redirect control signal (with " 0 " alternative DCT coefficient) is offered above-mentioned part.By contrast, when mobile deviation information AD was not less than predetermined value, redirect control section 310 did not produce the redirect control signal.
Perhaps, redirect control section 310 can be used in the information that obtains in the encoding process and determine predetermined value (this information is the quantization scale such as the quantification treatment of the bit rate of the variable-length codes encoding process of variable-length codes coded portion 309 and quantification treatment part 308), and predetermined value and mobile deviation information AD are compared.In this point, redirect control section 310 is that the mobile deviation information and the predetermined value of each macro block compares, and produces the redirect control signal corresponding to comparative result.
As another method, redirect control section 310 can use the mean value MAD of the mobile deviation information AD of each macro block to substitute mobile deviation information.In this case, mean value MAD is produced by motion compensation part 316.Redirect control section 310 receives mean value MAD from motion compensation part 316, and corresponding to mean value MAD, the DCT coefficient is set to " 0 ".The detailed work of redirect control section 310 will be described below.
Variable-length codes coded portion 309 receives the DCT coefficient from quantification treatment part 308, and receives mobile vector MV from control section 305.Such information has been arranged, and variable-length codes coded portion 309 is finished encoding process.Variable-length codes coded portion 309 usefulness are carried out encoding process corresponding to the variable-length codes of MPEG grammer, and carry out title processing, code generation processing etc., to produce view data.Variable-length codes coded portion 309 offers buffer 311 with the image encoded data.
Variable-length codes coded portion 309 is from quantification treatment part 308 reception information, and the value of this information representation CBP is " 0 ".When not having mobile vector MV, variable-length codes coded portion 309 can be corresponding to the macro block (mb) type skip macroblock.
The view data that buffer 311 storage receives from variable-length codes coded portion 309, and under the control of control section 305 with at the fixed time with the bit stream output image data.
In addition, image encoding apparatus 301 also comprises inverse quantization processing section 312, anti-DCT processing section 313, unit of account 314, buffer 315 and motion compensation part 316.The 312 pairs of DCT coefficients that receive from quantification treatment part 308 in inverse quantization processing section carry out inverse quantization.The anti-DCT of execution of the 313 pairs of DCT coefficients that receive from inverse quantization processing section 312 in anti-DCT processing section handles.Unit of account 314 is 313 reception view data from anti-DCT processing section.Buffer 315 storing image datas.316 pairs of view data that receive from buffer 315 of motion compensation part are carried out motion compensation.
The 312 pairs of DCT coefficient inverse quantizations that receive from quantification treatment part 308 in inverse quantization processing section.The data inverse quantization of inverse quantization processing section 312 usefulness quantization scale to receiving from quantification treatment part 308, and the DCT coefficient that obtains offered anti-DCT processing section 313.
The 313 pairs of DCT coefficients that receive from the inverse quantization processing section in anti-DCT processing section are oppositely carried out DCT and are handled, and the DCT coefficient that obtains is offered unit of account 314.Unit of account 314 receives processed images data in anti-DCT processing section 313.In addition, unit of account 314 receives view data (being moved compensation) by switch 317.The view data of 314 pairs of motion compensations of unit of account and the 313 view data additions that receive from anti-DCT processing section, and the data that obtain are offered buffer 315.
Buffer 315 receives view data from unit of account 314, and storing image data.When motion compensation part 316 motion compensation view data, read the view data of prediction from buffer 315.
Motion compensation part 316 is read each macro block of the view data of prediction from buffer 315 corresponding to mobile vector MV.Motion compensation 316 will offer the calculating section 306 corresponding to predicted image data from the mobile vector MV that control section 305 receives.
When image encoding apparatus 301 produced I (inside) image, each macro block that is stored in the view data in the frame buffer 302 offered DCT processing section 307 by unit of account 306, and quantification treatment part 308.Each macro block of these 307 pairs of number of images in DCT processing section is carried out DCT and is handled.Quantification treatment part 308 quantizes the view data that receives from DCT processing section 307.Variable-length codes coded portion 309 uses the coded image data of variable-length codes to receiving from quantification treatment part 308, and exports the data that obtain with bit stream by buffer 311.The consequential signal of being handled by quantification treatment part 308 and variable-length codes coded portion 309 is recovered to view data by inverse quantization processing section 312 and anti-DCT processing section 313, and temporarily stores buffer 315 into.
When image encoding apparatus 301 produced P (prediction) image, the mobile component of the view data of mobile test section 303 detection of stored in frame buffer was so that produce mobile vector MV.In addition, deviation information produces part 304 and produces deviation information AD.Mobile vector MV offers motion compensation part 316 by control section 305.The view data that 316 pairs of motion compensation parts are stored in the buffer 315 is carried out motion compensation (when producing the I image, this image data storage is to buffer 315).Thus, motion compensation part 316 produces prediction data.Motion compensation part 316 is carried out motion compensation to each macro block.Switch 317 and 318 cuts out corresponding to the switch controlling signal that receives from control section 305.The view data of unit of account 306 from be stored in frame buffer 302 deducts the predicted image data that receives from motion compensation part 316.DCT processing section 307 and quantification treatment part 308 are carried out above-mentioned processing.Variable-length codes coded portion 309 coded image datas, and the data that obtain with bit stream output by buffer 311.
When image encoding apparatus 301 produced B (bi-directional predicted) image, 316 pairs of motion compensations were stored in the view data of the former frame in the buffer 315 and the view data of next frame is carried out motion compensation, to produce predicted image data.The view data of unit of account 306 from be stored in frame buffer 302 deducts predicted image data.DCT processing section 307 and quantification treatment part 308 are carried out above-mentioned processing.309 digital coding of usefulness variable-length codes of variable-length codes coded portion, and the data that obtain with bit stream output by buffer 311 to receiving from unit of account 306.
Figure 32 is the flow chart of the encoding process of image encoding apparatus 301.In flow chart shown in Figure 32, the view data from be stored in frame buffer 302 detects mobile vector MV.Produce P image or B image corresponding to detected mobile vector MV.
At step S401, frame image data are input to frame buffer 302.
At step S402, the view data of mobile test section 303 detection of stored in frame buffer 302, and detect to move, as mobile vector MV.Deviation information produces part 304 and produces mobile deviation information AD by mobile vector MV.Mobile vector MV and mobile deviation information AD are provided for control section 305 and redirect control section 310 respectively.
At step S403, redirect control section 310 relatively produces mobile deviation information AD and the predetermined value that part 304 receives from deviation information.When the result who determines at step S403 was No (promptly mobile deviation information AD is greater than predetermined value), flow process entered step S404.On the contrary, when the result who determines at step S403 was Yes (that is, mobile deviation information AD is not more than predetermined value), flow process entered step S407.
At step S404, predicted image data produces according to the mobile vector MV that receives from control section 305, and offers calculating section 306.Corresponding to the result of calculation of unit of account 306, the moving of motion compensation part 316 compensating image datas.
At step S405, unit of account 306 deducts the predicted image data through motion compensation at step S404 from the view data that is received by frame buffer and 02.The 307 pairs of view data that receive from unit of account 306 in DCT processing section are carried out DCT and are handled.
At step S406,308 pairs of DCT coefficient quantizations that produce at step S405 by DCT processing section 307 of quantification treatment part.
By contrast, when the result who determines at step S403 was Yes (that is, mobile deviation information AD is not more than predetermined value), flow process entered step S407.At step S407, redirect control section 301 produces the redirect control signal, make DCT processing section 307, quantification treatment part 308, variable-length codes coded portion 309 and motion compensation part 316 skip their processing, and the redirect control signal is offered these parts.In other words, the view data that is stored in the buffer 315 offers variable-length codes coded portion 309.
At step S408, variable-length codes coded portion 309 determines whether the value of CBP is " 0 ".When " 0 " when step S407 is set to the DCT coefficient, variable-length codes coded portion 309 determines that the value of CBP is " 0 ".
At step S409, variable-length codes coded portion 309 is carried out for example title processing and variable-length codes produces processing, and by the view data of buffer 311 with the bit stream output encoder.Determine that at step S408 its CBP value is to be made of title, MB increase, CBP, vector etc. for the macro block of " 0 ", rather than (16 * 16) pixel data.In other words, when detecting its CBP value for the macro block of " 0 ", the image that macro block output is the same with predicted picture.
In the processing (seeing Figure 32) at image encoding apparatus 301, relatively whether predetermined value and mobile deviation information AD are " 0 " with definite DCT coefficient.Perhaps, substitute predetermined value, can determine whether the DCT coefficient is " 0 " according to the corresponding evaluation function that contains the quantization scale that receives from quantification treatment part 308, the acquisition value that is stored in the view data the buffer 315, bit rate or the like.
Because image encoding apparatus 301 has redirect control section 310, it is corresponding to mobile deviation information AD and predetermined value result relatively, skip that motion compensation is handled, DCT handles and quantification treatment, can shorten for the necessary processing time of encoding process of the view data of " 0 " at last the DCT coefficient.
In addition, according to image encoding apparatus 301, the processing time to DCT processing and quantification treatment etc. in real-time encoder is undemanding.Thus, image encoding apparatus 301 can easily design, and can reduce its power consumption.
In addition, according to image encoding apparatus 301,, also can reduce for example load of the processing of CPU (central processing unit) even encoding process is carried out by software.
According to the present invention, when obtaining mobile vector, the piece of reference frame and present frame piece are converted to frequency data orthogonally.When view data is converted to frequency data, and when obtaining deviation between the piece of the piece of reference frame and present frame, reduced the calculating step number greatly.Thus, can carry out processing at high speed.As a result, can effectively carry out processing by software.
According to the present invention, in the circulation that piece coupling is calculated, with the summation and the predetermined threshold value comparison of the absolute difference between the pixel of the pixel of the piece of present frame and reference frame related blocks.When summation surpassed threshold value, processing stopped.Thus, owing to reduced the calculating step number, mobile vector can high-speed search.
Can corresponding to discontinuous absolute value (MAD) with value with the initial value of threshold value is set at the deviation AD (0,0) of initial point.When threshold value is set, when the intermediate frame encoding process is carried out, can detect mobile vector reliably corresponding to summation MAD with at the deviation AD (0,0) of initial point in threshold value.By contrast, when carrying out the frame interior encoding process, processing stops.Thus, effective execution block matching treatment.
In addition, when for the first time searching mobile vector, use corresponding to summation MAD and the threshold value that obtains at the deviation AD (0,0) of initial point.As to the threshold value of identical piece, use medium and small that of the summation of the threshold value of beginning or detection in the piece matching treatment of carrying out for the second time.In other words, because the threshold value of the little value of conduct that obtains till when using this, so can effectively detect mobile vector.
As mentioned above, according to mobile detection apparatus of the present invention and predetermined detection method, from a plurality of macro blocks of image contract.The mobile vector of the macro block that detection is extracted.The mobile vector that detects has been arranged, calculated the mobile vector of entire image.The mobile vector that entire image has been arranged calculates the mobile vector of each macro block.Thus, before the mobile vector that calculates each macro block, can obtain the mobile vector of entire image.As a result, according to mobile detection apparatus of the present invention and movement detection method, the image mobile vector that moves significantly on whole screen can easily be detected.In addition, can reduce the step that image moves processing greatly.
As mentioned above, according to image encoding apparatus of the present invention and method for encoding images, the mobile vector of the block of pixels of inspection image data, and consequent mobile deviation information.Mobile deviation information and predetermined value are compared.View data is carried out the essential predetermined process of encoding process.Corresponding to predetermined result, skip the predetermined process of data processing equipment.Finally can shorten for the DCT coefficient for the processing time of the encoding process of the image of " 0 ".
According to the present invention, when obtaining mobile vector, obtain deviation with the summation of absolute difference between the contour pixel of the related blocks of the contour pixel of the piece of reference frame and present frame by the piece matching treatment.Reduce to calculate step number thus.As a result, can carry out processing at high speed.Owing to obtain the summation of the absolute difference between all contour pixels of all contour pixels of piece of reference frame and present frame related blocks, so can accurately detect mobile vector.
Though most preferred embodiment according to the present invention shows the present invention, the people who is familiar with this area can know under the condition that does not deviate from the spirit and scope of the invention, variation, omission and interpolation on above-mentioned and various other form and the details to be arranged.

Claims (44)

1, a kind of mobile vector computational methods comprise the following step:
(a) piece corresponding to present image to be processed takes out a piece from the reference image, and the size of this reference block is big or small consistent with current image block, with reference to the initial point of image block and the initial point coupling of current image block;
(b) when the piece that in the predetermined search zone, moves with reference to image, obtain current image block and with reference to the deviation between the image block;
(c) piece of detection deviation minimum from the reference image is to calculate mobile vector;
(d) orthogonal transform is with reference to the pixel data of image block and the pixel data of current image block; And
(e) obtain with reference to the deviation between the orthogonal transform data of each piece of the orthogonal transform data of image block and present image.
2, mobile vector computational methods as claimed in claim 1 is characterized in that,
Step (d) utilizes the hadamard transform method to carry out.
3, mobile vector computational methods as claimed in claim 1 is characterized in that, also comprise the following step:
Being divided into a plurality of with reference to each piece of image and the piece of present image; And
Each piece of cutting apart of orthogonal transform.
4, a kind of recording medium that records the mobile vector calculation procedure on it, the mobile vector calculation procedure makes the system with this recording medium carry out the following step:
(a) piece corresponding to present image to be processed takes out a piece from the reference image, and this is big or small consistent with reference to the size of the piece of figure and current image block, with reference to the initial point of image block and the initial point coupling of current image block;
(b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block;
(c) piece of detection deviation minimum from the reference image is to calculate mobile vector;
(d) orthogonal transform is with reference to the pixel data of image block and the pixel data of current image block; And
(e) obtain with reference to the deviation between the orthogonal transform data of each piece of the orthogonal transform data of image block and present image.
5, recording medium as claimed in claim 4 is characterized in that,
Step (d) utilizes the hadamard transform method to carry out.
6, recording medium as claimed in claim 4 is characterized in that, also comprises the following step:
Being divided into a plurality of with reference to each piece of image and the piece of present image; And
Each piece of cutting apart of orthogonal transform.
7, a kind of mobile vector computational methods comprise the following step:
(a) piece corresponding to present image to be processed takes out a piece from the reference image, and the size of this reference block is big or small consistent with current image block, with reference to the initial point of image block and the initial point coupling of current image block;
(b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block;
(c) piece of detection deviation minimum from the reference image is to calculate mobile vector;
(d) when calculating, the deviation and the predetermined threshold of acquisition are compared with reference to the deviation between the pixel of the pixel of image block and current image block;
(e) when this deviation during, stop to calculate mobile vector greater than predetermined threshold; And
(f) initial value of predetermined threshold is set corresponding to characteristics of image.
8, mobile vector computational methods as claimed in claim 7 is characterized in that,
The initial value of predetermined threshold is set corresponding to the absolute value sum of the pixel value of same image and the difference between its pixel average.
9, mobile vector computational methods as claimed in claim 7 is characterized in that,
The initial value of predetermined threshold is set corresponding to the deviation at initial point.
10, mobile vector computational methods as claimed in claim 7 is characterized in that,
Corresponding to the exhausted value sum of the difference between the mean value of the pixel value of same image and its pixel and the initial value that the deviation on the initial point is provided with predetermined threshold.
11, mobile vector computational methods as claimed in claim 7 is characterized in that, predetermined threshold is the minimum value of the deviation that so far obtains.
12, a kind of recording medium that records the mobile vector calculation procedure on it, this mobile vector calculation procedure makes the system with this recording medium carry out the following step:
(a) piece corresponding to present image to be processed takes out a piece from the reference image, and the size of this reference block is big or small consistent with current image block, with reference to the initial point of image block and the initial point coupling of current image block;
(b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block;
(c) piece of detection deviation minimum from the reference image is to calculate mobile vector;
(d) when calculating, the deviation and the predetermined threshold of acquisition are compared with reference to the deviation between the pixel of the pixel of image block and current image block;
(e) when this deviation during, stop to calculate mobile vector greater than predetermined threshold; And
(f) initial value of predetermined threshold is set corresponding to characteristics of image.
13, recording medium as claimed in claim 12 is characterized in that,
The initial value of predetermined threshold is set corresponding to the absolute value sum of the pixel value of same image and the difference between its pixel average.
14, recording medium as claimed in claim 12 is characterized in that,
The initial value of predetermined threshold is set corresponding to the deviation of initial point.
15, recording medium as claimed in claim 12 is characterized in that,
Corresponding to the exhausted value sum of the difference between the mean value of the pixel value of same image and its pixel and the initial value that the deviation on the initial point is provided with predetermined threshold.
16, recording medium as claimed in claim 12 is characterized in that, predetermined threshold is the minimum value of the deviation that so far obtains.
17, a kind of motion detection device comprises:
Withdrawing device takes out a plurality of macro blocks from image;
First motion detection device detects the mobile vector of each piece of a plurality of macro blocks that described withdrawing device takes out;
Mobile computing device calculates the mobile vector of entire image with the mobile vector of detected each macro block of described first activity detection apparatus; And
Second motion detection device, the mobile vector that calculates with described movable calculation element calculates the mobile vector of each macro block.
18, motion detection device as claimed in claim 17 is characterized in that,
Described withdrawing device takes out a plurality of adjacent macroblocks.
19, motion detection device as claimed in claim 17 is characterized in that,
Described withdrawing device takes out a plurality of macro blocks from each zone of cutting apart entire image and obtaining.
20, a kind of activity detection method comprises the following step:
(a) from image, take out a plurality of macro blocks;
(b) mobile vector of each piece of a plurality of macro blocks of detection taking-up;
(c) calculate the mobile vector of entire image with the mobile vector of detected each macro block; And
(d) use the mobile vector that calculates to calculate the mobile vector of each macro block.
21, movement detection method as claimed in claim 20 is characterized in that,
Step (a) is undertaken by taking out a plurality of adjacent macroblocks.
22, movement detection method as claimed in claim 20 is characterized in that,
Step (a) is undertaken by take out a plurality of macro blocks from cut apart each zone that entire image obtains.
23, a kind of picture coding device comprises:
Motion detection device, the mobile vector of the intended pixel piece of detection input image data produces mobile deviation information;
Determine device, a mobile deviation information that receives from described motion detection device and a predetermined value are compared, produce and determine the result;
Image data processing system is used for processing that view data is scheduled to, and this predetermined process is that encoding process is needed;
Code device is used for view data is encoded; And
Control device, the definite result corresponding to described definite device skips the predetermined process that described image data processing system carries out, and makes described code device carry out described encoding process.
24, picture coding device as claimed in claim 23 is characterized in that,
Described motion detection device calculates the average discrete discrepancy of each block of pixels;
Described definite device compares average discrete discrepancy and predetermined value.
25, picture coding device as claimed in claim 23 is characterized in that, also comprises:
Value is determined device, and the information that obtains when being used in encoding process is determined predetermined value,
Described definite device determines that with described value the predetermined value that device is determined produces definite result.
26, a kind of method for encoding images comprises the following step:
(a) mobile vector of the intended pixel piece of detection input image data produces mobile deviation information;
(b) a mobile deviation information and a predetermined value are compared, produce and determine the result;
(c) processing that view data is scheduled to, this predetermined process are that encoding process is needed; And
(d) corresponding to definite result, skip predetermined process, make view data is carried out encoding process.
27, method for encoding images as claimed in claim 26 is characterized in that,
Described step (a) is undertaken by the average discrete discrepancy that calculates each block of pixels;
Step (b) is by relatively carrying out average discrete discrepancy and predetermined value.
28, method for encoding images device as claimed in claim 26 is characterized in that, also comprises:
The information that obtains when being used in encoding process is determined predetermined value,
Step (b) determines that by producing with fixed predetermined value the result finishes.
29, a kind of mobile vector computational methods comprise the following step:
(a) piece corresponding to present image to be processed takes out a piece from the reference image, and the size of this reference block is big or small consistent with current image block, with reference to the initial point of image block and the initial point coupling of current image block;
(b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block;
(c) piece of detection deviation minimum from the reference image is to calculate mobile vector;
(d) take out N the pixel and N the pixel with reference to image of this moment of present image simultaneously, wherein N is an integer;
(e) store in the memory as continuous data the N of a present image pixel with reference to N pixel of image; And
(f) from memory, read the pixel of current image block and,, obtain deviation as continuous data with reference to the pixel of image block.
30, vector calculation method as claimed in claim 29 is characterized in that,
Come calculation deviation with an instruction, make one and handle a plurality of continuous data sheets constantly.
31, vector calculation method as claimed in claim 29 is characterized in that,
The N of a present image pixel and be to take out simultaneously in the compartmentalize mode with reference to N pixel of image.
32, a kind of recording medium that has write down the mobile vector calculation procedure on it, these mobile vector computational methods make the system with this recording medium carry out the following step:
(a) piece corresponding to present image to be processed takes out a piece from the reference image, and this is big or small consistent with reference to the size of the piece of image and current image block, with reference to the initial point of image block and the initial point coupling of current image block;
(b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block;
(c) piece of detection deviation minimum from the reference image is to calculate mobile vector;
(d) take out N pixel of present image and with reference to N pixel of image simultaneously, wherein N is an integer;
(e) store in the memory as continuous data the N of a present image pixel with reference to N pixel of image; And
(f) from memory, read the pixel of current image block and,, obtain deviation as continuous data with reference to the pixel of image block.
33, recording medium as claimed in claim 32 is characterized in that,
Come calculation deviation with an instruction, make one and handle a plurality of continuous data sheets constantly.
34, recording medium as claimed in claim 32 is characterized in that,
The N of a present image pixel and be to take out simultaneously in the compartmentalize mode with reference to N pixel of image.
35, a kind of mobile vector computational methods comprise the following step:
(a) piece corresponding to present image to be processed takes out a piece from the reference image, and the size of this reference block is big or small consistent with current image block, with reference to the initial point of image block and the initial point coupling of current image block;
(b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block;
(c) piece of detection deviation minimum from the reference image is to calculate slightly thick mobile vector;
(d) when obtain in step (c) carry and rough mobile vector near in when moving with reference to image block, obtain current image block and with reference to the deviation between the image block;
(e) according to the piece of reference image detection deviation minimum, to detect meticulous mobile vector;
(f) the pixel of present image with store in the first memory with reference to the pixel of image;
(g) take out N pixel of present image and with reference to N pixel of image simultaneously, wherein N is an integer; And
(h) store in the second memory as continuous data the N of a present image pixel with reference to N pixel of image,
Wherein step (c) is to utilize to be stored in carrying out as N pixel of the present image of continuous data with reference to N pixel of image in the second memory,
Step (e) is to utilize to be stored in the pixel of the present image in the first memory and to carry out with reference to the pixel of image.
36, mobile vector computational methods as claimed in claim 35 is characterized in that,
Come calculation deviation with an instruction, make one and handle a plurality of continuous data sheets constantly.
37, mobile vector computational methods as claimed in claim 35 is characterized in that,
The N of a present image pixel and be to take out simultaneously in the compartmentalize mode with reference to N pixel of image.
38, a kind of recording medium that records the mobile vector calculation procedure on it, this mobile vector calculation procedure makes the system with this recording medium carry out the following step:
(a) piece corresponding to present image to be processed takes out a piece from the reference image, and the size of this reference block is big or small consistent with current image block, with reference to the initial point of image block and the initial point coupling of current image block;
(b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block;
(c) piece of detection deviation minimum from the reference image is to calculate rough mobile vector;
When (d) moving with reference to image block near the rough mobile vector that obtains in step (c), obtain current image block and with reference to the deviation between the image block;
(e) according to the piece of reference image detection deviation minimum, to detect meticulous mobile vector;
(f) the pixel of present image with store in the first memory with reference to the pixel of image;
(g) take out N the pixel and N the pixel with reference to image at this moment of present image, wherein N is an integer; And
(h) store in the second memory as continuous data the N of a present image pixel with reference to N pixel of image,
Wherein step (c) is to utilize to be stored in carrying out as N pixel of the present image of continuous data with reference to N pixel of image in the second memory,
Step (e) is to utilize to be stored in the pixel of the present image in the first memory and to carry out with reference to the pixel of image.
39, recording medium as claimed in claim 38 is characterized in that,
Come calculation deviation with an instruction, make one and handle a plurality of continuous data sheets constantly.
40, recording medium as claimed in claim 38 is characterized in that,
The N of a present image pixel and be to take out simultaneously in the compartmentalize mode with reference to N pixel of image.
41, a kind of mobile vector computational methods comprise the following step:
(a) piece corresponding to present image to be processed takes out a piece from the reference image, and the size of this reference block is big or small consistent with current image block, with reference to the initial point of image block and the initial point coupling of current image block;
(b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block;
(c) piece of detection deviation minimum from the reference image is to calculate mobile vector; And
(d) the contour pixel of the contour pixel of reference image block and current image block relatively, obtain the deviation between them.
42, mobile vector computational methods as claimed in claim 41 is characterized in that,
Step (d) comprises the following steps:
With horizontal scan direction, the last contour pixel of accumulative total current image block and with reference to the absolute value of the difference between the last contour pixel of image block, to obtain their sums;
Plain and with the left profile of vertical scanning direction accumulative total current image block with reference to the absolute value of the difference between the left profile pixel of image block, to obtain their sums;
Plain and with the right profile of vertical scanning direction accumulative total current image block with reference to the absolute value of the difference between the right contour pixel of image block, to obtain their sums; And
Plain and with the bottom profiled of horizontal scan direction accumulative total current image block with reference to the absolute value of the difference between the bottom profiled pixel of image block, to obtain their sums.
43, a kind of recording medium that records the mobile vector calculation procedure on it, this mobile vector calculation procedure makes the system with this recording medium carry out the following step:
(a) piece corresponding to present image to be processed takes out a piece from the reference image, and the size of this reference block is big or small consistent with current image block, with reference to the initial point of image block and the initial point coupling of current image block;
(b) when in the predetermined search zone, moving, obtain current image block and with reference to the deviation between the image block with reference to image block;
(c) piece of detection deviation minimum from the reference image is to calculate mobile vector; And
(d) the contour pixel of the contour pixel of reference image block and current image block relatively, obtain the deviation between them.
44, recording medium as claimed in claim 43 is characterized in that,
Step (d) comprises the following steps:
With horizontal scan direction, the last contour pixel of accumulative total current image block and with reference to the absolute value of the difference between the last contour pixel of image block, to obtain their sums;
Plain and with the left profile of vertical scanning direction accumulative total current image block with reference to the absolute value of the difference between the left profile pixel of image block, to obtain their sums;
Plain and with the right profile of vertical scanning direction accumulative total current image block with reference to the absolute value of the difference between the right contour pixel of image block, to obtain their sums; And
Plain and with the bottom profiled of horizontal scan direction accumulative total current image block with reference to the absolute value of the difference between the bottom profiled pixel of image block, to obtain their sums.
CN 99110395 1998-07-15 1999-07-15 Moveable vector measuring method, recording medium, moveable detection apparatus and method thereof Pending CN1243393A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 99110395 CN1243393A (en) 1998-07-15 1999-07-15 Moveable vector measuring method, recording medium, moveable detection apparatus and method thereof

Applications Claiming Priority (7)

Application Number Priority Date Filing Date Title
JP200460/98 1998-07-15
JP212378/98 1998-07-28
JP223398/98 1998-08-06
JP223397/98 1998-08-06
JP235551/98 1998-08-21
JP241482/98 1998-08-27
CN 99110395 CN1243393A (en) 1998-07-15 1999-07-15 Moveable vector measuring method, recording medium, moveable detection apparatus and method thereof

Publications (1)

Publication Number Publication Date
CN1243393A true CN1243393A (en) 2000-02-02

Family

ID=5274535

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 99110395 Pending CN1243393A (en) 1998-07-15 1999-07-15 Moveable vector measuring method, recording medium, moveable detection apparatus and method thereof

Country Status (1)

Country Link
CN (1) CN1243393A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420613B (en) * 2007-10-22 2012-10-10 索尼株式会社 Image processing device and image processing method
CN104244005A (en) * 2013-06-11 2014-12-24 索尼公司 image processing device, imaging processing method, program, and imaging apparatus
CN107194952A (en) * 2017-05-08 2017-09-22 武汉大学 A kind of screen scroll detection method of screen-oriented Video coding
CN109747644A (en) * 2019-03-01 2019-05-14 广州杰赛科技股份有限公司 Vehicle tracking anti-collision early warning method, device, controller, system and vehicle

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420613B (en) * 2007-10-22 2012-10-10 索尼株式会社 Image processing device and image processing method
CN104244005A (en) * 2013-06-11 2014-12-24 索尼公司 image processing device, imaging processing method, program, and imaging apparatus
CN107194952A (en) * 2017-05-08 2017-09-22 武汉大学 A kind of screen scroll detection method of screen-oriented Video coding
CN107194952B (en) * 2017-05-08 2019-06-25 武汉大学 A kind of screen scroll detection method of screen-oriented Video coding
CN109747644A (en) * 2019-03-01 2019-05-14 广州杰赛科技股份有限公司 Vehicle tracking anti-collision early warning method, device, controller, system and vehicle

Similar Documents

Publication Publication Date Title
CN1075323C (en) Method and apparatus for coding/decoding motion vector, and method and apparatus for coding/decoding image signal
CN1160967C (en) Picture encoder and picture decoder
CN1297148C (en) Moving picture encoding/transmission system, moving picture encoding/transmission method, and encoding apparatus, decoding apparatus, encoding method decoding method and program usable for the same
CN1076935C (en) Methods and apparatus for preventing rounding errors when transform coefficients representing a motion picture signal are inversely transformed
CN1251518C (en) Method for converting digital signal and apparatus for converting digital signal
CN1193619C (en) Image decoder
CN1175670C (en) Picture signal converting method and apparatus and picture providing system
CN1275194C (en) Image processing method and its device
CN1801945A (en) Coded video sequence conversion apparatus, method and program product for coded video sequence conversion
CN1630374A (en) Predicting motion vectors for fields forward-predicted interlaced video frames
CN1237067A (en) Picture encoding and decoding apparatus, method and data storage medium
CN1960496A (en) Motion vector estimation apparatus
CN1513268A (en) Coding method, decoding method, coding apparatus, decoding apparatus, image processing system, coding program and decoding program
CN1334683A (en) Image predictive coding/decoding device and method and recording medium
CN1638484A (en) Image encoding apparatus, image encoding method, image encoding program, image decoding apparatus, image decoding method, and image decoding program
CN1846437A (en) Innovations in coding and decoding macroblock and motion information for interlaced and progressive scan video
CN1719905A (en) Coding apparatus, coding method, coding method program, and recording medium recording the coding method program
CN1596547A (en) Moving picture coding apparatus, moving picture decoding apparatus, moving picture coding method, moving picture decoding method, program, and computer-readable recording medium containing the program
CN1993993A (en) Image processing device, program thereof, and method thereof
CN1216199A (en) Digital image replenishment method, image processing device and data recording medium
CN1288641A (en) Video Signal encoding method, video signal encoder, and program recorded medium
CN101039435A (en) Method and apparatus for realizing self-adaptive scanning in image coding process
CN1243393A (en) Moveable vector measuring method, recording medium, moveable detection apparatus and method thereof
CN1722850A (en) Digital signal conversion method and digital signal conversion device
CN1838774A (en) Moving picture coding apparatus, moving picture decoding apparatus, moving picture coding method and moving picture decoding method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication