Motion compensation using minimum bits per motion block as criterion for block matching

Abstract: Apparatus for selecting a block of data in a previous frame to be used as a predicted block for a given block in a current frame in a system that reduces the bit rate by codifying the difference between the predicted block and the given block in a given manner by deriving the differences between the given block in the current frame and a plurality of blocks in the previous frame and selecting as the predicted block that block for which the codification of its differences with the given block requires the least number of bits. The apparatus can also select a predicted block from a number of blocks selected in accordance with ABD or SBD techniques.

Description: BACKGROUND The objective of image coding is to compress the number of bits needed to represent an image without introducing significant visible distortion in the coded image. A system which is often used for image coding utilizes an interframe hybrid coding system with motion compensation. This system consists of a DPCM loop in which a prediction of the current frame is subtracted from the current frame and the result is transformed by a two-dimensional Discrete Cosine Transform (DCT) into transform coefficients. A property of the DCT is that it decorrelates the image data block by block. The DCT coefficients are quantized and amplitude and run length coded. By this process the number of bits used to represent the image is considerably reduced. The resulting bitstream is inherently variable in rate. Therefore, a FIFO buffer is used to smooth out the variation in the bit rate and output a constant bit rate which is lower than the original bit rate of the video signal by at least an order of magnitude. A buffer control strategy is used in order to prevent overflow or underflow of the buffer. Typically, the buffer control is accomplished by monitoring the status of the FIFO buffer and varying the quantization step size of the quantizer. An important part of the above system is the forming of the prediction of the current frame. Normally, the prediction that is most suited for video frames is the motion compensated previous frame. The motion compensation is performed on blocks of pixels, called motion blocks, by block matching. For every motion block of pixels in the current frame of video, a block referred to as a matching block is found in the previous frame which resembles it as closely as possible. This block is the predictor for the motion block in the current video frame. Presently known methods for block matching employ a criterion such as Minimum Absolute Block Difference (MABD) or Minimum Squared Block Difference (MSBD). A figure of merit is derived indicating how close the motion block of the current frame is to a blcck being examined in the previous frame, and a match is declared if the figure of merit is less than some arbitrarily selected threshold value. In a case where a number of candidates come close to but do not exceed the threshold, prior methods pick the one with the smallest ABD or SBD without regard to the number of bits required to codify them for transmission. U.S. patent no. 4,562,468 discloses a method for selecting data from a previous frame that will be used as a prediction of data in a current frame. The method disclosed in this patent includes the steps of deriving respective differences between data in a motion block in the current frame and each of a plurality of like blocks in the previous frame. The method then determines a number of bits needed to represent each of these differences as encoded data. As the prospective encoded blocks are retrieved, they are encoded and their encoded data are compared, in sequence, to previously produced encoded blocks to determine which one of the blocks from the previous frame has a difference with respect to the motion block in the current frame that may be encoded in the least number of bits. BRIEF SUMMARY OF THE INVENTION The apparatus and method according to the present invention are defined in claims 1 and 5, respectively. In this invention, a new criterion is used fcr selecting a matching block for use in a predicted frame. The differences between a motion block and each of the blocks in the search area of the previous frame are determined, and the block having the difference requiring the smallest number of bits for codification in the system in which it is being used is selected as the matching block. The advantage of this criterion is that it selects the block from the previous frame having a difference requiring the least number of bits for transmission rather than a criterion that is unrelated to that number of bits. After all, reduction of bits is the primary purpose of the system. For example, if two blocks in the previous frame have the same ABD, prior systems would require an arbitrary choice to be made and the chosen block may require more bits for transmission than the block not chosen. In this invention, however, the choice would always be the one requiring the fewest bits for transmission. The concept on which an MABD or MSBD block matching system is based is the selection of a block in the previous frame that is pictorially most like, and hopefully identical to, the motion block in the current frame so that, as noted, there is no consideration of the number of bits required for codification. If using as a criterion for match the least number of codified bits required for codifying the pixel differences between a motion block and a block in a previous frame does not select a matching block that is pictorially most like the motion block, any differences between them are what is transmitted by the system, but greater differences mean more bits. MABD or MSBD block matching systems may find a number of blocks in the previous frame that are very close to the selection threshold, but the closest one is selected, and if a number of the blocks are identical, an arbitrary choice is made. Since the motion block in the current frame is usually compared with each of the blocks of a search area in the previous frame at the same time the selection of a block requiring the least number of codified bits requires a significant amount of hardware. Operating an MABD or MSBD system in series with a system of this invention can achieve the best features of each. Thus, if a number, of MABD or MSBD systems equal to the number, n, of blocks in a search area are used and means are provided for selecting n' blocks having the best matches within a given range of the criteria, then n' figure of merit calculators providing the number of bits required for codification of respective blocks can be respectively coupled to receive the n' blocks, and the block requiring the least number of codification bits is the one selected. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram of a type of image codification system in which the invention may be used, Fig. 2 is a block diagram of a decodifier that produces video signals for the image to be presented from the codified signals provided by the codification system of Fig. 1, Fig. 3 identifies a motion block in a current frame, Fig. 4 identifies a search area in a previous frame, Fig. 5 is a block diagram of a generalized motion block matching system including block matching figure of merit calculators, Fig. 6 is a block diagram of a block matching figure of merit calculator that may be used in this invention, and Fig. 7 is a block diagram for a hybrid system having a motion block matching system using a criterion like MABD or MSBD for selecting a number of blocks in the previous frame followed by a motion block matching system utilizing the least number of codified bits as the criterion for making a final selection. DETAILED DESCRIPTION OF THE DRAWINGS Fig. 1 illustrates one form of differential pulse code modulation system with motion compensation, that can advantageously use the motion block matching system of this invention. It will be understood that the frames of video information are divided into a number of contiguous blocks called data blocks. The input video data for a current frame, available at input terminal 2, is connected to the + input of a subtracter 4. The previous frame is stored in a frame delay 6. For each motion block of pixels in the current video frame supplied to a motion compensation means 8, a search is made for a matching data block within a search area of the previous frame that surrounds a block having the same position in the previous frame that the motion block has in the current frame. The relative position of the matching block is indicated by x,y motion vectors that are transmitted to the receiver. The difference in the positions of motion blocks and matching blocks is due to motion. The block in the frame delay 6 that most nearly matches the matching data block from the current frame is merely a prediction of what that block will be. When signals derived from this predicted block are applied to the negative input of the subtracter 4, its output is the difference between a motion block of a current frame and the predicted motion block. The difference data is transmitted to the receiver after some further processing. The receiver can form the image to be presented from the previous frame and the differences referred to. The differences at the output of the subtracter 4 are applied to a Discrete Cosine Transform, DCT 10, that produces coefficients of horizontal and vertical frequencies. A block of pixels produces an equal sized block of DCT coefficients. These coefficients are scanned so as to provide a train of coefficients to a quantizer 12 where the coefficients are quantized in order to reduce the bit rate without reduction in picture quality. The output of the quantizer 12 is applied to a variable length coder, VLC, contained in block 14 which reduces the number of bits by run length and Huffman coding. The motion vectors derived by the motion compensation means 8 are also bit rate reduced in the VLC, and the VLC output is applied to a FIFO buffer 16. Whereas the flow of bits to the FIFO buffer 16 is irregular, depending on image content, a steady flow of bits appears at its output. If the buffer 16 approaches overload, a buffer control 18 reduces the number of bits at the output of the quantizer 12 by increasing the size of its quantized steps. The values of the differences between the current data block and the predicted data block that appeared at the output of the subtracter 4 are recovered, except for the loss caused by the quantizer, by an inverse quantizer 20 and an inverse DCT 22 and applied to one input of an adder 24. The signals for the predicted block at the output of the motion compensator 8 are applied to another input of the adder 24 so that signals for the current block appear at its output and are applied to the frame delay 6. Thus, the entire current frame is in the delay 6, and when the next current frame is being processed, the frame in the frame delay 6 is now the previous frame referred to. At the start of operations, and periodically thereafter, the frame delay 6 will be cleared so that the differences at the input of the adder 24 will be nearly the same as the current frame, any discrepancies being due to quantization effects. Fig. 2 shows a system for decoding the signals from the encoder of Fig. 1 and producing video signals for an image to be presented. The bit stream at the output of the FIFO buffer 16 is applied to a FIFO buffer 26 which is connected to an amplitude and run length Huffman decoder 28. An inverse quantizer 30 and an IDCT 32 are connected in the order named between the output of the Huffman decoder 28 and one input of an adder 34. The video signals at the output of the adder 34 are applied via a frame delay 36 and a motion compensator 38 to another input of the adder 34. The x,y motion vectors that originated in the motion compensation means 8 of Fig. 1 are derived from the output of the amplitude and run length decoder 28 and applied to the motion compensation means 38 so that it can form a predicted frame by selecting data from the previous frame stored in the frame delay 36. The addition of the differences from the IDCT 32 to the predicted frame produces the video signals for an image to be presented. The motion compensator 8 of Fig. 1 operates as follows. The current frame is divided into a number of contiguous motion blocks that may include a number of data blocks or be smaller than a data block. In Fig. 1 a motion block is the same as data block. The motion compensator 8 examines all possible blocks having the same size and shape as the motion block that occur in a searching area of the frame stored in the frame delay 6 and selects one of them as a matching block in accordance with some criterion. This means that the blocks examined will overlap and will be shifted up, down, left or right of each other by a one pixel separation. For ease in illustration, a motion block in a current frame is shown in Fig. 3 to be comprised of only four pixels C44, C45, C54, and C55, and the search area in a previous frame is shown in Fig. 4 to be an area of 8 x 8 pixels that surround a block in the search area designated by pixels F44, F45, F54 and F55 that is in the same position in the previous frame as the motion block C44, C45, C54, and C55 has in the current frame. The pixels F44, F45, F54 and F55 form just one of the blocks in the search area to be examined. When using the MABD criterion, the sum of the absolute values of the differences of pixel values, C44- F44, C45-F45, C54-F54 and C55-F55 would be compared with the sums of the respective absolute differences of C44, C45, C54 and C55 with all other like groups of four pixels in the search area, and the one having the smallest sum would be selected as the matching block. When using the MSBD criterion, the sums of squares of the differences would be used and the block having the smallest sum would be selected as the matching block. Whatever criterion is used, the basic functions are as illustrated by the block diagram of Fig 5. A motion block converter 40 supplies signals of the motion block from the current frame, and a search block converter 42 simultaneously supplies signals for all n possible blocks in the search area that have the same shape and size as the motion block. The motion block from the convertor 40 is conveyed to n block matching figure of merit calculators, 44 to (44 + n-1). Each of these latter calculators provides a figure of merit resulting from the use of a given criterion. Thus, all the calculators 44 through (44 + n-1) could use the MABD criterion or all of them could use the MSBD criterion. The figures of merit are applied to means 46 for choosing as the matching block that block having the best figure of merit. In the case of MABD and MSBD, this would be the block in the search area of the previous frame having the lowest sum. Criteria such as MABD and MSBD are used in the hope of finding the block that most resembles the matching block from a pictorial point of view. Fig. 6 illustrates a block matching figure of merit calculator of this invention that could be used at each of block matching figure of merit calculators 44 to (44 + n-1) of Fig. 5. It is comprised of components corresponding to those used in the codification system of Fig. 1 that are designated by the same numbers primed. The figure of merit is the total number of bits required to codify the differences between the pixels of the matching block and the pixels of a block in the search area, and is derived by a bit counter 48. There would be the same number of these calculators as in Fig. 5, all operating in parallel, and the numbers of coded bits are respectively applied to the means 46 of Fig. 5 for choosing the block with the minimum number. When this block is designated its pixel values are provided to the negative input of the subtracter 4. Thus, the pixels in the block having the minimum number of bits are subtracted from the corresponding pixels in the data block supplied to the positive input of the subtracter 4. Once again, it is emphasized that a motion block can differ in size and shape from a data block, but it will usually contain an integral number of data blocks so that their signals can be respectively coupled to the negative input of the subtracter 4 whenever signals from the corresponding data block within the motion block are supplied to the positive input of the subtracter 4. The criterion of minimum number of codified bits that is used in this invention is consistent with the entire purpose of the codifying system, namely, the reduction in bits. In some cases this may result in the selection of a block in the previous frame that pictorially differs from the motion block by a greater amount than blocks selected by other criteria such as MABD and MSBD. Reference is now made to Fig. 7 in which one criterion like MABD or MSBD is used to obtain several blocks having figures of merit within a given range and wherein one of these is selected on the basis of a minimum number of codified bits. Those blocks corresponding in function to the blocks of Fig. 5 are designated by the same numbers and need no further description, but it is understood that the figure of merit calculators 44 to (44 + n-1) are operating in accordance with an MABD or MSBD criterion. Instead of selecting the block with the best figure of merit, a block 50 selects the block that has the best figure of merit and several having the next best figures of merit. The data for these matching blocks is respectively output by multiplexer 52. Assuming that the outputs of three blocks indicated at B1, B2 and B3 are selected, their data is respectively supplied to block matching figure of merit calculators 54, 56 and 58 that function as described in Fig. 6 to provide figures of merit based on the number of codified bits required to transmit the block. The signals in the motion block are supplied to the figure of merit calculators 54, 56 and 58. A selector 46 selects the one of B1, B2 and B3 requiring the least codifying bits and operates a switch 60 so as to connect the data line for the selected block to an output 62 that will supply signals to the negative input of the subtracter 4. In the drawing, B2 is the matching block. In Fig. 7, the block B2 is shown as being selected.

Claims: Motion compensation apparatus for use in a system that reduces bandwidth used to transmit a frame of image data by codifying the differences between data in the frame and data predicted to be in the frame in a given manner, the apparatus comprising: a) means (2) for providing a current frame of image data; b) means (8) for providing a motion block of data from the current frame; c) means (6) for providing data from a previous frame; d) means (8) for deriving respective differences between the motion block of data and similarly shaped blocks of data of the same area of data within a search area including an area in the previous frame having a location corresponding to the location of the motion block in the current frame; e) means (8) for determining the number of bits required to codify the differences in said manner; and f) means (8) for selecting one of said differences which is encoded into the minimum number of bits; characterized in that g) the means for providing data from the previous frame includes means (42) for simultaneously supplying data representing several blocks of data within the search area; h) the means for deriving the respective differences between the motion blocks of data and similarly shaped blocks of the same area of data includes means (44, 44+1, 44+n-1) for simultaneously determining a first figure of merit for the similarly shaped blocks of data within the search area, each first figure of merit being a measure of how closely the motion block in the current frame matches a respective one of the similarly shaped blocks of data in the previous frame; and i) said means (8) for determining the number of bits required to codify the differences and the means for selecting one of said differences which is encoded into the minimum number of bits comprises: i1) means (50, 52) for selecting a number of said differences in response to the determined first figures of merit, the number of selected differences being less than all of the plurality of differences; i2) means (54, 56, 58, 10', 12', 14', 48) for determining a second figure of merit for each of the selected differences, the second figure of merit indicating a respective number of bits used to codify each of the selected differences; and i3) means (46) for identifying one of the similarly shaped blocks of data in the previous frame as the predicted data block in response to the second figure of merit, the identified block corresponding to the one of said selected differences which is encoded in the least number of bits. Apparatus as set forth in claim 1, wherein the predetermined coding method is implemented using means (10) for performing the function of a discrete cosine transform (DCT) and a quantizer (12). Apparatus as set forth in claim 1 or 2, wherein the means for determining a first figure of merit determines a sum of the absolute differences in amplitude between the pixels in the current block and the corresponding pixels in a respective one of said plurality of blocks from the previous frame. Apparatus as set forth in claim 1 or 2, wherein the means for determining a first figure of merit determines a sum of the squares of the absolute differences in amplitude between corresponding pixels in the current block and the pixels in a respective one of said plurality of blocks from the previous frame. A method for selecting image data from a previous frame that will be used as a prediction of data in a current frame, comprising the steps of: a) deriving respective differences between pixel data in a motion block in the current frame and each of a plurality of like blocks in the previous frame; b) encoding the derived differences to determine respective numbers of bits produced; and c) selecting one of said plurality of blocks having a derived difference from said motion block which produces the least number of bits when the derived difference is encoded; the method being characterized in that: d) a first figure of merit is determined simultaneously for a plurality of the respective derived differences, said first figure of merit indicating how close said motion block in the current frame matches said motion blocks in said previous frame; e) a number of differences is simultaneously selected from the plurality of derived differences responsive to the determined first figures of merit, the number of selected differences being less than all of the derived differences; f) the respective differences in step a) are derived simultaneously; and g) the encoding of the derived differences in step b) is conducted simultaneously and only on the differences which were selected based on their respective figures of merit. A method as set forth in claim 5, wherein the step of deriving a figure of merit for each of the respective derived differences comprises the step of deriving respective sums of the absolute differences between corresponding pixel data in the motion block and corresponding pixel data in each of a plurality of the like blocks in the previous frame. A method as set forth in claim 5, wherein the step of deriving a figure of merit for each of the respective derived differences comprises the step of deriving respective sums of the squares of the absolute differences between corresponding pixel data in the motion block and corresponding pixel data in each of a plurality of the like blocks in the previous frame.

Inventors: IU SIU-LEONG, MEYER EDWIN ROBERT, NAIMPALLY SAIPRASAD V, IU, SIU-LEONG, MEYER, EDWIN ROBERT, NAIMPALLY, SAIPRASAD V.
Applicants: MATSUSHITA ELECTRIC IND CO LTD, MATSUSHITA ELECTRIC INDUSTRIAL CO., LTD.
Application year: 1992
Main classification: H04N7
IPC codes: H04N7