Motion compensation for interlaced digital video signals

Abstract: A method and apparatus are provided for motion compensated coding of interlaced digital video signals. A first prediction error signal is obtained (74) indicative of the difference between a current portion from a field of a current video frame and a similarly situated first portion in the same field of a prior video frame. A second prediction error signal is obtained (76) indicative of the difference between the current portion and a similarly situated second portion in an opposite field of the prior video frame. A third prediction error signal is obtained (78) indicative of the difference between the current portion and an average of the first and second portions. One of the first, second and third prediction error signals is selected (80) to represent the current portion. Motion vector information is provided (72) to enable the current frame portion to which the selected prediction error signal corresponds to be reproduced by a decoder.

Description: BACKGROUND OF THE INVENTION The present invention relates to the compression of digital data, and more particularly to a method and apparatus for providing motion compensation for an interlaced digital video signal, such as a television signal. Digital transmission of television signals can deliver video and audio services of much higher quality than previous analog techniques. Digital transmission schemes are particularly advantageous for signals that are broadcast by satellite to cable television affiliates and/or directly to home satellite television receivers. Such signals can also be transmitted via a cable television network. A substantial amount of digital data must be transmitted in any digital television system. This is particularly true where high definition television ("HDTV") is provided. In a digital television system, a subscriber receives the digital data stream via a receiver/descrambler that provides video, audio and data to the subscriber. In order to most efficiently use the available radio frequency spectrum, it is advantageous to compress the digital television signals to minimize the amount of data that must be transmitted. The video portion of a television signal comprises a sequence of video "frames" that together provide a moving picture. In digital television systems, each line of a video frame is defined by a sequence of digital data bits referred to as "pixels." A large amount of data is required to define each video frame of a television signal. In order to manage this amount of data, particularly for HDTV applications, the data must be compressed. Video compression techniques enable the efficient transmission of digital video signals over conventional communication channels. Such techniques use compression algorithms that take advantage of the correlation among adjacent pixels in order to derive a more efficient representation of the important information in a video signal. The most powerful compression systems not only take advantage of spacial correlation, but can also utilize similarities among adjacent frames to further compact the data. In such systems, differential encoding is used to transmit only the difference between an actual frame and a prediction of the actual frame. The prediction is based on information derived from a previous frame of the same video sequence. Examples of such systems can be found in Krause et al. U.S. Patents 5,068,724; 5,091,782; and 5,093,720 which relate to various motion compensation schemes for digital video. In motion compensation systems of the type disclosed in the referenced patents, motion vectors are derived by comparing a portion (i.e., block) of pixel data from a field of a current frame to similar portions of the previous frame. A motion estimator determines how the corresponding motion vector in the previous frame should be adjusted in order to be used in the current field. Such systems are very effective in reducing the amount of data to be transmitted, particularly when the source video is in a progressive scan format. However, when applied to interlaced video in which the odd and even numbered lines of a picture are transmitted consecutively as two separate interleaved fields, the efficiency of existing motion compensation techniques is sufficiently reduced. EP-A-0 526 163 discloses an image coding method comprising the steps of compensating a motion of reproduction signals of N (being an integer of 2 or more) frames positioned before a frame to be coded to obtain first to N-th predict signals, determining a linear combination of the first to N-th predict signals to obtain a predict signal, and coding a difference of the frame to be coded and the predict signal. EP-A-0 538 834 discloses an adaptive blocking image coding system for encoding an input image signal obtained by interlaced scanning in units of the block of N pixels x N lines. The document "Grand Alliance HDTV System Specification", draft document submitted to the ACATS Technical Subgroup, Feb. 22, 1994, reprint from proceedings of the annual broadcast engineering conference, Las Vegas, March 20 to 24, 1994, No. conf. 48, 22 February 1994, National Association of Broadcasters (NAB), pages 12 to 17 discloses a method of motion estimation and compensation. WO-A-92/10061 discloses a system for multi-mode predictive interpolative coding of fields of video and a system for decoding coded fields of video. It is the object underlying the present invention to provide a motion compensation system for interlaced digital video signals in which a greater degree of data compression can be achieved. The present invention provides in accordance with the subject matter of independent claims 1 and 9 such a system. Further embodiments are outlined in the dependent claims. SUMMARY OF THE INVENTION In accordance with the present invention, a method for motion compensated coding of digital video signals is provided. The digital video signals define successive frames of interlaced video data. A first prediction error signal indicative of the difference between a current portion from a field of a current video frame and a similarly situated first portion in the same field of a prior video frame is obtained. A second prediction error signal indicative of the difference between the current portion and a similarly situated portion in an opposite field of the prior video frame is obtained. A third prediction error signal is obtained which is indicative of the difference between the current portion and an average of the first and second portions. One of the first, second and third prediction error signals is selected to represent the current portion. Motion vector information can be provided to enable the current frame portion to which the selected prediction error signal corresponds to be reproduced by a decoder. In a practical system, the first, second and third prediction error signals are obtained for each of a plurality of portions in the current video frame. In order to do this, an odd field of the current video frame is subdivided into portions of odd field pixel data. The even field of the current video frame is subdivided into portions of even field pixel data. Each portion of pixel data from the current video frame is compared to similarly situated portions in both the odd and even fields of the prior video frame to find a preferred prior frame same field counterpart F and a preferred prior frame opposite field counterpart G for each current frame portion. The first prediction error signal for each current frame portion is indicative of the difference between the portion and its F counterpart. The second prediction error signal for each current frame portion is indicative of the difference between the portion and its G counterpart. The third prediction error signal for each current frame portion is indicative of the difference between the portion and the average of its F and G counterparts. The selected prediction error signal for each current frame portion can be encoded with data indicative of the location in the prior video frame of the F counterpart when the first prediction error signal is selected. When the second prediction error signal is selected, the selected prediction error signal is encoded with data indicative of the location in the prior video frame of the G counterpart. When the third prediction error signal is selected, it is encoded with data indicative of the location in the prior video frame of both the F and G counterparts. The encoding data can comprise field identifier information and motion vectors. In a somewhat different, "frame mode" implementation, the first, second and third prediction error signals are obtained for each of a plurality of portions in the current video frame defined by block pairs having both odd and even field pixel data. Specifically, the current video frame is subdivided into block pairs of odd and even field pixel data. The odd and even field pixel data of each block pair from the current video frame is compared to similarly situated odd and even field pixel data, respectively, in the prior video frame to find a preferred prior frame same field counterpart F for each current frame block pair. The odd and even field pixel data of each block pair from the current video frame is also compared to similarly situated even and odd field pixel data, respectively, in the prior video frame to find a preferred prior frame opposite field counterpart G for each current frame block pair. The first prediction error signal for each current frame block pair is indicative of the difference between the block pair and its F counterpart. The second prediction error signal for each current frame block pair is indicative of the difference between the block pair and its G counterpart. The third prediction error signal for each current frame block pair is indicative of the difference between the block and the average of the F and G counterparts for that block pair. The selected prediction error signal for each current frame block pair is encoded with data indicative of the location in the prior video frame of the F counterpart when the first prediction error signal is selected, of the G counterpart when the second prediction error signal is selected, and of both the F and G counterparts when the third prediction error signal is selected. The encoding data comprises field identifier information and motion vectors. A method for motion compensated coding of interlaced frames of digital video data is also provided in which both field mode and frame mode processing is compared. A current video frame is subdivided into block pairs of odd and even field pixel data. The odd and even field pixel data of each block pair from the current video frame is compared to similarly situated odd and even field pixel data, respectively, in the prior video frame to find a preferred prior frame same field counterpart F for each current frame block pair, the difference between the current frame block pair and its F counterpart comprising a first frame mode prediction error signal. The odd and even field pixel data of each block pair from the current video frame is compared to similarly situated even and odd field pixel data, respectively, in the prior video frame to find a preferred prior frame opposite field counterpart G for each current frame block pair, the difference between the current frame block pair and its G counterpart comprising a second frame mode prediction error signal. The pixel data of each block pair is compared to the average of the F and G counterparts for that block pair, the difference comprising a third frame mode prediction error signal. One of the first, second and third frame mode prediction error signals is selected as a preferred frame mode prediction error signal. The odd field pixel data of each current frame block pair is compared to similarly situated odd field pixel data in the prior video frame to find a preferred prior frame same field counterpart F1 for the current frame block pair odd field pixel data. The difference between the current frame block pair odd field pixel data and its F1 counterpart comprises a first field mode prediction error signal. The odd field pixel data of each current frame block pair is compared to similarly situated even field pixel data in said prior video frame to find a preferred prior frame opposite field counterpart G1 for the current frame block pair odd field pixel data. The difference between the current frame block pair odd field pixel data and its G1 counterpart comprises a second field mode prediction error signal. The even field pixel data of each current frame block pair is compared to similarly situated even field pixel data in the prior video frame to find a preferred prior frame same field counterpart F2 for the current frame block pair even field pixel data. The difference between the current frame block pair even field pixel data and its F2 counterpart comprises a third field mode prediction error signal. The even field pixel data of each current frame block pair is compared to similarly situated odd field pixel data in the prior video frame to find a preferred prior frame opposite field counterpart G2 for the current frame block pair even field pixel data. The difference between the current frame block pair even field pixel data and its G2 counterpart comprises a fourth field mode prediction error signal. The odd field pixel data of each current frame block pair is compared to the average of the F1 and G1 counterparts to obtain a fifth field mode prediction error signal. The even field pixel data of each current frame block pair is compared to the average of the F2 and G2 counterparts to obtain a sixth field mode prediction error signal. One of the first, second and fifth field mode prediction error signals is selected as a preferred odd field mode prediction error signal. One of the third, fourth and sixth field mode prediction error signals is selected as a preferred even field mode prediction error signal. Either the preferred frame mode prediction error signal or the preferred odd and even field mode prediction error signals are selected to represent a current block pair. Motion vector information is provided to enable the current block pair to be reconstructed at a decoder. The motion vector information includes at least one of an F and G motion vector when the preferred frame mode prediction error signal is selected to represent the current block pair. When the preferred odd and even field mode prediction error signals are selected to represent the current block pair, at least one of an F1 and G1 motion vector and at least one of an F2 and G2 motion vector is included in the motion vector information. In a preferred embodiment, the G, G1 and G2 motion vectors correspond to the G, G1 and G2 opposite field counterparts, respectively, and are scaled to account for a difference in distance resulting from the use of an opposite field block comparison instead of a same field block comparison. Each of the F, F1 and F2 motion vectors and the scaled G, G1 and G2 motion vectors included in the motion vector information for a current block pair is differentially encoded with a corresponding previous motion vector for transmission with the current block pair. The selection of the prediction error signal to use for each block pair can be made based on the choice that would minimize the data necessary for transmission to enable a decoder to reproduce the current block pair. The F and G counterpart can be found by minimizing the sum of the magnitude of odd and even field errors between the current frame block pair and the similarly situated pixel data in the prior video frame. In a more general embodiment, a method is provided for motion compensated coding of interlaced frames of digital video data. A current video frame is subdivided into block pairs, each block pair comprising an odd field pixel data block and an even field pixel data block. The block pairs of the current video frame are compared to similarly situated block pairs of a prior video frame using frame processing to obtain, for each current block pair, a preferred frame mode prediction error signal based on a consideration of same field block pair comparisons, opposite field block pair comparisons and an average of the same and opposite field block pair comparisons. The odd and even field pixel data blocks forming the block pairs of the current video frame are compared to similarly situated blocks of the prior video frame using field processing to obtain, for each of the odd and even field pixel data blocks, a preferred field mode prediction error signal based on a consideration of the same field block comparisons, opposite field block comparisons, and an average of the same and opposite field block comparisons. For each current block pair, either the preferred frame mode prediction error signal or the preferred odd and even mode prediction error signals associated with that block pair are selected. Encoder apparatus is provided in accordance with the invention for motion compensated coding of interlaced digital video signals, in which successive interlaced fields of odd and even pixel data form successive video frames. Means are provided for subdividing the frames into block pairs, each containing a block of odd field pixel data and a block of even field pixel data. Means are provided for storing the blocks from at least three successive fields for use in generating prediction error signals indicative of the difference between the odd and even blocks of each block pair of a current frame and similarly situated same field and opposite field prediction data in a prior frame. Means are provided for choosing a preferred field mode prediction error signal for each block of the current frame block pairs from a same field prediction error, an opposite field prediction error, and a prediction error based on an average of the same field and opposite field prediction data for the block. A preferred frame mode prediction error signal is chosen for each block pair of the current frame from a same field prediction error, an opposite field prediction error, and a prediction error based on an average of the same field and opposite field prediction data for the block pair. Means are provided for selecting either the preferred field mode prediction error signals or the preferred frame mode prediction error signal to represent the corresponding block pair. The encoder apparatus can include means for providing a motion vector for each of the odd and even block same field and opposite field prediction errors and for each of the block pair same field and opposite field prediction errors. Means are provided for outputting the motion vector(s) corresponding to the prediction error signal(s) selected by the selecting means. Means are also provided in the encoder apparatus for scaling the motion vectors associated with the opposite field prediction errors to account for a difference in distance resulting from the use of an opposite field block comparison instead of a same field block comparison. Means are provided for differentially encoding successive motion vectors with immediately preceding motion vectors for successive prediction error signals selected by the selecting means. The means for choosing preferred field mode and frame mode prediction error signals within the encoder apparatus can comprise first and second motion estimator means. The first motion estimator means are coupled to receive current frame even blocks for comparison with similarly situated prior even field blocks and coupled to receive current frame odd blocks for comparison with similarly situated prior even field blocks. The first motion estimator outputs even block same field predictions F2 and motion vectors F2 v for each current frame even block, and outputs odd block opposite field predictions G1 and motion vectors G1 v for each current frame odd block. The second motion estimator is coupled to receive current frame odd blocks for comparison with similarly situated prior odd field blocks and coupled to receive current frame even blocks for comparison with similarly situated prior odd field blocks. The second motion estimator outputs odd block same field predictions F1 and motion vectors F1 v for each current frame odd block and even block opposite field predictions G2 and motion vectors G2 v for each current frame even block. Means are provided for testing each of the F1, F2, G1, and G2 predictions for each current frame block against a criteria to obtain the field mode same field prediction error and field mode opposite field prediction error for each block. Means are provided for averaging the prior odd and even field blocks, respectively, used to obtain the F1 and F2 predictions to provide F predictions for the block pairs and for averaging the prior even and odd field blocks, respectively, used to obtain the G1 and G2 predictions to provide G predictions for the block pairs. The F and G predictions are averaged to provide F/G prediction errors for the block pairs. Means are provided for testing each of the F, G and F/G predictions for each current frame block pair against a criteria to obtain said frame. mode same field prediction error, said frame mode opposite field prediction error, and said average based prediction error for each block pair. The encoder apparatus can further include means for scaling the G1 v and G2 v motion vectors to account for a difference in distance resulting from the use of an opposite field block comparison instead of a same field block comparison when obtaining the opposite field predictions G1, G2 and G. Decoder apparatus decodes motion compensated interlaced digital video signals. Memory means store odd and even field pixel data for a first video frame. Means are provided for receiving motion compensated pixel data from odd and even field portions of a second video frame together with motion vector and motion compensation mode information for said portions. The motion vector information identifies. pixel data in the same and/or opposite field of the stored first video frame that is necessary to reconstruct the second video frame from the received motion compensated pixel data. First motion compensator means are responsive to received same field motion vector information for retrieving pixel data from the same field of the stored first video frame as a portion of the second video frame being processed. Second motion compensator means are responsive to received opposite field motion vector information for retrieving pixel data from the opposite field of the first video frame than the portion of the second video frame being processed. Means responsive to the motion compensation mode information are provided for combining the received motion compensated pixel data with pixel data retrieved by the first motion compensator means, with pixel data retrieved by the second motion compensator means, or with an average of the pixel data retrieved by both of the first and second motion compensator means. The combined data is used to reconstruct the second video frame. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a diagrammatic illustration of a prior art field mode motion prediction scheme; Figure 2 is a diagrammatic illustration of an alternate prior art field mode motion prediction scheme; Figure 3 is a diagrammatic illustration of a prior art frame mode motion prediction scheme; Figure 4 is a diagrammatic illustration of a frame mode motion prediction scheme in accordance with the present invention; Figure 5 is a diagrammatic illustration of a field mode motion prediction scheme using a frame structure in accordance with the present invention; Figure 6 is a diagrammatic illustration of a field mode motion prediction scheme in accordance with the present invention that uses a field structure instead of a frame structure; Figure 7 is a block diagram of encoder apparatus in accordance with the present invention; Figure 8 is a detailed block diagram of the motion estimator portion of the encoder of Figure 7; Figure 9 is a schematic diagram of the accumulators used in the motion estimator of Figure 8; and Figure 10 is a block diagram of a decoder in accordance with the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In the past, motion compensation for interlaced video signals has been applied using either field mode motion prediction or frame mode motion prediction. One form of field mode motion prediction is illustrated in Figure 1. In this prior art technique, previous fields one and two are used to predict the video content of current fields three and four. The prediction for field three is derived from either field one, as indicated by vector 10, or field two, as indicated by vector 12. Similarly, the prediction for field four is derived from either field two as indicated by vector 14 or from field three as indicated by vector 16. Since a vertical offset exists between the lines of adjacent fields due to the inherent nature of interlaced video, it is advantageous to consider both of the two most recent fields when predicting a new, current field. The most recent field that provides the most accurate prediction of the current field is the one that is selected to provide a prediction error signal for transmission. A second form of prior art field mode motion prediction is illustrated in Figure 2, and is the mode that has been most typically used when the compression is applied to frames instead of to fields of video data. In this embodiment, fields one and two represent a single "prior" frame and fields three and four represent a single "current" frame. Since both fields of the current frame are compressed simultaneously, it is not possible to use field three to predict field four, as was done in the embodiment illustrated in Figure 1. Therefore, in the Figure 2 embodiment either field 1 or field 2 is used to form the prediction of both fields three and four. Thus, field three is predicted from field one as indicated by vector 20 or from field two as indicated by vector 22. Similarly, field four is predicted using either vector 24 from field one or vector 26 from field two. Since the time interval between the prediction field and the current field is greater for vector 24 in the Figure 2 embodiment than it was for vector 16 in the Figure 1 embodiment, the prediction will be slightly less accurate. However, this can usually be compensated for by the increased effectiveness of frame mode compression over the strictly field mode compression scheme illustrated in Figure 1. An example of previously known frame mode motion compensation is illustrated in Figure 3. In this embodiment, a single motion vector is used to predict both field three and field four from fields one and/or two. The motion vector that is selected is the one which minimizes the sum of the field three prediction error and the field four prediction error. One of two possibilities will occur depending on the motion vector that is selected. Either fields one and two, or fields two and one will predict fields three and four, respectively. In practice, the second possibility is less likely to occur, since the time interval between fields one and four is much longer than the time interval between fields two and three. Therefore, if the velocity of movement is constant, the motion vector used to predict field four should be proportionally larger than the one used to predict field three. This is one of the problems with existing frame mode motion compensation systems. The present invention overcomes the shortcomings of prior art motion compensation systems used for interlaced video, and applies to both frame mode and field mode processing. Frame mode motion compensation in accordance with the present invention is illustrated by Figure 4. When using frame mode motion compensation, two motion vectors must be calculated. The first is the "same field" motion vector (F1 or F2) used to predict field one of a current frame from field one of a prior frame (F1) or to predict field two of the current frame from field two of the prior frame (F2). The other motion vector is referred to as an "opposite field" motion vector (G1 or G2) which is used to predict field one of the current frame from field two of the prior frame (G1) or to predict field two of the current frame from field one of the prior frame (G2). In Figure 4, it can be seen that motion vector 40 (F1) is the same as motion vector 44 (F2) and that motion vector 42 (G1) is the same as motion vector 46 (G2) except that G1 and G2 are both scaled in order to account for the difference in distance between the corresponding fields. More particularly, 2(G1)=2(G2)/3. Both the same field vector F1 or F2 and the opposite field vector G1 or G2 are calculated by minimizing the sum of the field one prediction error and the field two prediction error for the current frame. A decision is then made as to whether to use the same field vector (F1, F2), the opposite field vector (2G1, (2/3)G2), or both. If both the same field and opposite field vectors are used, then the same field and opposite field predictions made from the previous frame are averaged before differencing with the current frame. It is noted that it is the two predictions from the previous frame that are averaged, and not the vectors. Two different field mode motion prediction schemes are used in accordance with the present invention. In the first, illustrated in Figure 5, a frame structure is used wherein portions of odd and even field data (e.g., "a block pair" comprising a block of odd field data and a block of even field data) from the current frame are compared to similarly situated odd and even portions of the prior frame. This is referred to as field mode motion compensation using a frame structure. In the second scheme, individual odd portions and even portions of the current frame are compared to similarly situated portions in both the odd and even fields of the prior frame. This is referred to as field mode motion compensation using a field structure. In field mode motion compensation, the same field and opposite field motion vectors are generated independently for field one and field two of the current frame. As shown in Figure 5, vector 52 (F1) may differ from vector 56 (F2). Similarly, vector 50 (G1) may differ from vector 54 (G2). Decisions as to whether to use same field or opposite field vectors are determined independently for the two fields. In other words, the prediction for field one is obtained using either F1, G1, or by averaging the predictions associated with both the F1 and G1 vectors. similarly, the prediction for field two is obtained using either F2, G2 or an average of the predictions associated with both of the F2 and G2 vectors. By way of example, the prediction for a portion 51 of field one of the current frame illustrated in Figure 5 can be obtained by comparing the video data contained in portion 51 with similarly situated video data in field one of the prior frame (as indicated by motion vector 52) or by comparing the video data for portion 51 of field one of the current frame to similarly situated data in field two of the prior frame (as indicated by motion vector 50). Alternatively, the best prediction may result by comparing the video data for portion 51 of the current frame to an average of the video data forming the best individual predictions in each of field one and field two of the prior frame. In this instance, the video data in prior frame field one corresponding to motion vector 52 is averaged with the video data in prior frame field two corresponding to motion vector 50. The average of this data is compared to the video data contained in portion 51 of the current frame. A decision is then made as to whether the prediction error (i.e., the difference between portion 51 and the F1, G1, or averaged F1/G1 data from the prior frame) is minimized by using the F1, G1 or F1/G1 options. Selection of the prediction error signal can be made based on the one that provides the least mean square error or the minimum absolute error. In the field mode, field structure implementation illustrated in Figure 6, the images are not structured as frames. In this instance, motion vector 64 (G2) can denote the vector used to predict field two of the current frame from field one of the current frame. The remaining vectors in the embodiment of Figure 6 are identical to those for the embodiment of Figure 5. Specifically, vector 60 (G1) is the same as vector 50, vector 62 (F1) is the same as vector 52, and vector 66 (F2) is the same as vector 56. Referring now to Figure 7, a block diagram is provided of an encoder for implementing the present invention. Video data to be encoded is input to a terminal 70. Typically, the video data will be processed in a block format. Each block is differenced in a subtractor 82 with a prediction for that block output from a mode decision circuit 80. The difference is referred to as a prediction error signal, and is compressed using a suitable algorithm such the discrete cosine transform (DCT) algorithm illustrated at 84. The transform coefficients are quantized by a quantizer 86 and input to a variable length coder 92 for further compression. The variable length coder can comprise, for example, a well known Huffman coder. In order to obtain a prediction for each current video block input at terminal 70, the blocks are compared in a motion estimator 72 to similarly situated data in a prior video frame or in a prior field of the same video frame where field mode, field structure processing is provided. Motion estimator 72 outputs a same field motion vector F and an opposite field motion vector G to motion compensators 74, 76, respectively. Motion compensator 74 will retrieve a portion of video data from a prior video field stored in frame store 90 in response to the F motion vector output from motion estimator 72. Similarly, motion compensator 76 will retrieve data from a prior opposite field stored in frame store 90 in response to the G motion vector. Frame store 90 receives the prior video data from an adder 89, which combines the prior frame prediction with the reconstructed prediction error signal that has been inverse quantized and inverse discrete cosine transformed (IDCT) by circuits 88. A mode decision circuit 80 is coupled to receive the prediction data from motion compensator 74 and motion compensator 76 and to receive the sum thereof from adder 78. Circuitry 80 determines whether the prediction from motion compensator 74, the prediction from motion compensator 76 or an average of the two will result in the best overall prediction for the current video data block. The decision is based on which choice will result in the minimum data (including any necessary overhead such as field/frame mode identification and same field and/or opposite field identification) that must be transmitted for the block. Motion estimator 72 is illustrated in greater detail in Figure 8. A motion estimator calculates the F1, F2, G1 and G2 motion vectors illustrated in Figure 5 and the F and G vectors illustrated in Figure 4, wherein F=F1=F2 and G=2G1=(2/3)G2. The motion estimator also calculates an additional vector F/G which is the best single vector given the constraint F=G. The decision concerning the use of field mode or frame mode, and same field and/or opposite field can be made by minimizing the prediction error or by using smarter aposteori decision techniques. Although the number of motion vectors that are transmitted can vary from one to four, a total of six motion vectors are calculated by the motion estimator of Figure 8. Two of the motion vectors (F, G) relate to frame mode and four (F1, F2, G1, G2) relate to field mode. It is noted, however, that all motion vectors are calculated from field pairs and therefore require only half as many computations to cover the same search range as a motion vector derived from a frame pair. Therefore, the two frame motion vectors can be calculated using the same number of computations as required for a conventional motion vector. Further, since the search range corresponding to each of the four field vectors is limited to a single field, the total number of computations to estimate all four field vectors is the same as the number required for a single conventional motion vector. It is noted that the present invention adds some additional complexity for estimating the opposite field motion vector in the frame mode of operation, since the prediction error due to the scaled G1 vector must be summed with the prediction error corresponding to the scaled G2 vector. As a practical matter, this additional complexity can be eliminated by implementing the estimator in a custom integrated circuit chip. Subpixel accuracy is achieved for both frame and field motion vectors by interpolation within the field and not within the frame. One technique for providing interpolation is disclosed in commonly assigned, copending U.S. Patent Application 08/009,831 to Liu, et al. filed on January 27, 1993. In the present invention, it is not necessary to interpolate between adjacent lines within a frame since the same effect is achieved by averaging the predictions from both of the two fields in the frame. The motion estimator of Figure 8 illustrates three field stores 102, 104, and 106. These field stores receive video data input at terminal 100 and delay the input video by one field each. Thus, three consecutive fields of data are stored in the estimator. A first motion estimator 110 and second motion estimator 112 calculate block displacement errors corresponding to all possible displacements within a predetermined search range. These motion estimators are of conventional design, and well known in the art of motion compensation. The motion estimators receive prior video data from the field stores 102, 104 and 106 via a switch 108. Motion estimator 110 receives data delayed by one field from field store 102 or data delayed by two fields from field store 104. Motion estimator 112 receives data delayed by two fields from field store 104 or data delayed by three fields from field store 106. Switch 108 is responsive to a signal "FIELD" which designates whether the prediction is to be applied to field one or field two of the previous frame. The signal is toggled after each new field is received. The motion estimators compare the current frame portion to a search area in the prior frame and find the best match based on predefined criteria. The motion estimators output the prediction error signal for the best match as well as the motion vector that identifies the location of the best matched data in the prior frame. The prediction error signals ("ERR") output from the motion estimators are input to respective memory banks 114, 116. These memory banks are used to store the G1, F2 and F1, G2 prediction errors, respectively, for subsequent averaging of the F1 and F2 errors in adder 118 and averaging of the G1 and G2 errors in adder 120. The averaged values are used to provide the F and G motion vectors via accumulators described in greater detail below. The two averages are also averaged together in an adder 122 for use in providing an F/G motion vector. A bank of seven accumulators 124, 126, 128, 130, 132, 134 and 136 is provided for saving the respective F1, F2, G1, G2, F, G and F/G motion vectors with the least error. Field mode accumulators 124 and 130 receive motion vector and error data from motion estimator 112. Field mode accumulators 126, 128 receive motion vector and error data from motion estimator 110. Frame mode accumulator 132 receives motion vector information from motion estimator 110 and error information from adder 118. Frame mode accumulator 134 receives motion vector information from motion estimator 112 and error information from adder 120. F/G accumulator 136 receives motion vector information from motion estimator 110 (or, alternatively from motion estimator 112 since F=G for the F/G mode) and error information from adder 122. The output of each accumulator is updated with a new input motion vector only if the corresponding displacement error is less than the error corresponding to the previous motion vector stored in the accumulator. The F1 and G1 accumulators are only allowed to update during the first field of each frame (field=0) and all other accumulators are only allowed to update during the second field of each frame (field=1). This updating constraint is controlled by inputting the field signal via terminal 148 directly to accumulators 124 and 128. The field signal is inverted by an inverter 138 before being input to the remaining accumulators. The accumulators are reset via terminal 146 for each new portion (e.g., block) of the input video data that is processed. The reset forces the accumulator to be updated with the first motion vector candidate for the new portion being processed. As noted above, the G1, G2 and G motion vectors are scaled. A scaling factor of two is input to a multiplier 140 for the G1 vector. A scaling factor of 2/3 is applied via a multiplier 142 for the G2 vector. A scaling factor of 2/3 is also applied to the G vector via multiplier 144. Since frame mode motion estimation requires that the errors corresponding to the F1 and F2 motion vectors and the G1 and G2 motion vectors be summed, memory banks 114 and 116 are required. Since F1 and G1 are only computed during field 1 (field=0) and F2 and G2 are only computed during field 2 (field=1), it is necessary to store the errors corresponding to all possible displacements for each block of one field. Note that it is possible to eliminate the memory banks if two more motion estimators are introduced to calculate F2 and G2 concurrently with F1 and G1. However, some memory will still be required to match a scaled G vector with each F vector. In this case, the amount of memory required will depend on the motion vector range. An implementation of accumulator 124 is illustrated in Figure 9. Each of the other accumulators can have an identical configuration. The motion vectors are input to the accumulator via a terminal 150. Prediction errors associated with the motion vectors are input via terminal 152. Upon receipt of a reset signal at terminal 146, AND gate 164 and OR gate 166 will cause the first latch 158 to latch the first motion vector for the next portion of video data to be processed. At the same time, the error associated with that motion vector will be latched in a second latch 160. As the associated motion estimator (e.g., motion estimator 112) searches an area of the prior video frame for a match to the portion of video data currently being processed, new motion vectors and errors associated therewith will be input to the accumulator via terminals 150, 152 respectively. The new errors are compared in a comparator 162 with the previous error latched in latch 160. When the comparator 162 determines that a newly received error is better than a previously latched error, it will cause latch 158 to store the motion vector associated with that error and latch 160 to store the error itself. In this manner, the accumulator will obtain the best prediction error and associated motion vector for each new portion of video data processed. All motion vectors are represented in terms of their magnitude when adjusted for a distance of one frame (i.e., two fields). Therefore, the same field vectors (F1 and F2) never require scaling. On the other hand, the opposite field vectors (G1 and G2) correspond to frame distances of 1/2 and 3/2 respectively. Therefore, the vector that is transmitted would be twice as large in the case of G1 and two thirds as large in the case of G2. When frame mode is used, G1 and G2 will be identical when represented with a frame distance of one. Each vector is represented with half pixel precision prior to scaling, when frame distance is one. After scaling, the vectors are again rounded to the nearest half pixel. One advantage of this representation is that it simplifies the prediction of motion vectors. Since the motion vector distance is now fixed in all cases, only one motion vector needs to be stored so that it can be used for prediction of the next motion vector. As an example, suppose the motion vectors set forth in Figure 4 are to be transmitted. These vectors are first compressed in order to minimize the overhead required to send them. It is always desirable to send motion vectors as differences, since the resulting zero-mean distribution is more easily compressed. Therefore, the first step is to send the difference between F1 and the last motion vector that was encoded. Next, the difference between 2G1 (which is the same as (2/3)G2) and F1 is transmitted. F2 does not need to be sent since it is the same as F1. When the next motion vector is to be encoded, it is first differenced with 2G1. Now suppose the motion vectors in Figure 5 are to be transmitted. The first step will be to send the difference between F1 and the last motion vector that was encoded. Next, the difference between 2G1 and F1 is sent. After that, the difference between F2 and 2G1 is sent, followed by the difference between (2/3)G2 and F2. The next motion vector will be differenced with (2/3)G2. Motion vectors that are not selected for transmission are simply omitted without changing the transmission order of the vectors which remain. Figure 10 illustrates a decoder that can be used in accordance with the present invention. Transmitted video data and overhead is received at an input terminal 170 and demultiplexed by a demultiplexer 172. The demultiplexer outputs the variably length encoded video data via line 171. The overhead data, which includes motion vectors and mode selection information is output via line 173. The variable length encoded video data is decoded by a variable length decoder 174 and decompressed in decompression circuit 176 which can comprise, for example, an inverse quantizer and an IDCT circuit similar to circuits 88 at the encoder of Figure 7. The decompressed, variable length decoded prediction errors are coupled to one input of an adder 178 which is used to reconstruct the original video data. The other input of adder 178 comprises the predictions recovered using the previously reconstructed prior frame data. A first motion compensator 182 receives the F motion vectors from line 173 and a second motion compensator 184 receives the G motion vectors from line 173. These motion compensators are similar to motion compensators 74, 76 respectively of the encoder of Figure 7. The motion compensators receive previous frame data from a frame store 180, that is coupled to receive the previous frames from the output of adder 178. The outputs of motion compensators 182 and 184 are input to a selector 188 and to an adder 186. Adder 186 provides the average of the prediction data output from the motion compensators to selector 188. Selector 188 is responsive to mode selection data received via lines 173 for selecting either the prediction output for motion compensator 182, the prediction output for motion compensator 184, or the average of the two predictions output from adder 186. The selected prediction is used by adder 178 to reconstruct the original video data for output. It should now be appreciated that the present invention provides methods and apparatus for encoding and decoding motion compensated interlaced video data. The best same field vector F and the best opposite field vector G are independently selected. The prediction error resulting from the use of both the F and G vectors (with the two predictions averaged) is compared with the prediction error resulting from the use of F or G alone. The vector(s) which results in the least error is then selected. This differs from prior art systems, in which only one vector (i.e., either the same field or opposite field vector) was generated. When performing frame mode estimation, the present invention finds the G vector that minimizes the sum of the first and second field errors when scaling is applied to both G1 and G2. Similarly, the best signal vector F/G (where F=G) is found while accounting for the scaling of G1 and G2. In the motion estimator implementation of Figure 8, all motion vectors are calculated without increasing the required number of motion estimators over prior art implementations. The present invention further provides motion vector prediction in which all motion vectors are scaled to correspond to a common time interval, such as one frame time, before the motion vector differences are calculated. As a result, only one motion vector needs to be stored. The F2 or G2 motion vectors are advantageously differentially encoded with the F1 or G1 vectors.

Claims: A method for motion compensated coding of digital video signals defining successive interlaced frames of video data including a current frame with even and odd fields of pixel data, and a prior frame with even and odd fields of pixel data, comprising the steps of: subdividing the current frame into block pairs of odd and even field pixel data; comparing the block pairs of said current video frame to similarly situated block pairs of said prior video frame using frame processing to obtain, for each current block pair, a preferred frame mode prediction error signal based on a consideration of at least same field block pair comparisons and opposite field block pair comparisons; comparing the odd and even field pixel data blocks forming the block pairs of said current video frame to similarly situated blocks of said prior video frame using field mode processing to obtain, for each of the odd and even field pixel data blocks, a preferred field mode prediction error signal based on a consideration of at least same field block comparisons and opposite field block comparisons; for each current block pair, selecting either the preferred frame mode prediction error signal or the preferred field mode prediction error signals associated with that block pair to represent each block pair according to whichever yields a more accurate prediction and/or results in a minimum amount of data for transmission of the video signals. The method of claim 1, wherein: the preferred frame mode prediction error signal is further based on a consideration of an average of the same field block pair comparisons and opposite field block pair comparisons. The method of claim 1 or 2, wherein: the preferred field mode prediction error signal is further based on a consideration of an average of the same field block comparisons and opposite field block comparisons. The method of any of claims 1 - 3, wherein: for the preferred frame mode prediction error signal, the preferred prior frame same field counterparts for the even and odd fields are described by respective equivalent motion vectors. The method of any of claims 1 - 4, wherein: for the preferred frame mode prediction error signal, the preferred prior frame opposite field counterparts for the even and odd fields are described by respective unidirectional motion vectors. The method of claim 5, wherein: the unidirectional motion vectors are scaled to account for a difference in distance resulting from the use of an opposite field comparison instead of a same field comparison. The method of any of claims 1 - 6, comprising the further step of: providing motion vectors to enable reproduction of a corresponding current frame portion by a decoder. The method of any of claims 1 - 7, comprising the further step of: providing field identifier information and motion vectors according to said selecting step, thereby enabling reproduction of a corresponding current frame portion by a decoder. An encoder apparatus for motion compensated coding of digital video signals defining successive interlaced frames of video data including a current frame with even and odd fields of pixel data, and a prior frame with even and odd fields of pixel data, comprising: means for subdividing the current frame into block pairs of odd and even field pixel data; means (72) for comparing the block pairs of said current video frame to similarly situated block pairs of said prior video frame using frame processing to obtain, for each current block pair, a preferred frame mode prediction error signal based on a consideration of at least same field block pair comparisons and opposite field block pair comparisons; means (72) for comparing the odd and even field pixel data blocks forming the block pairs of said current video frame to similarly situated blocks of said prior video frame using field mode processing to obtain, for each of the odd and even field pixel data blocks, a preferred field mode prediction error signal based on a consideration of at least same field block comparisons and opposite field block comparisons; means (80) for selecting, for each current block pair, either the preferred frame mode prediction error signal or the preferred field mode prediction error signals associated with that block pair to represent each block pair according to whichever yields a more accurate prediction and/or results in a minimum amount of data for transmission of the video signals. The apparatus of claim 9, wherein: the preferred frame mode prediction error signal is further based on a consideration of an average of the same field block pair comparisons and opposite field block pair comparisons. The apparatus of claim 9 or 10, wherein: the preferred field mode prediction error signal is further based on a consideration of an average of the same field block comparisons and opposite field block comparisons. The apparatus of any of claims 9 - 11, wherein: for the preferred frame mode prediction error signal, the preferred prior frame same field counterparts for the even and odd fields are described by respective equivalent motion vectors. The apparatus of any of claims 9 - 12, wherein: for the preferred frame mode prediction error signal, the preferred prior frame opposite field counterparts for the even and odd fields are described by respective unidirectional motion vectors. The apparatus of claim 13, wherein: the unidirectional motion vectors are scaled to account for a difference in distance resulting from the use of an opposite field comparison instead of a same field comparison. The apparatus of any of claims 9 - 14, further comprising: means (72) for providing motion vectors to enable reproduction of a corresponding current frame portion by a decoder. The apparatus of any of claims 9 - 15, further comprising: means (72) for providing field identifier information and motion vectors according to said selecting means, thereby enabling reproduction of a corresponding current frame portion by a decoder. A method for coding and decoding of motion compensated interlaced digital video signals including, for coding, the method of any of claims 1 to 8 and, for decoding, the steps of: storing odd and even field pixel data for a first video frame; receiving motion compensated pixel data from block pairs of odd and even field pixel data of a second video frame together with motion vector and motion compensation mode information for said block pairs, said motion vector information identifying blocks of pixel data in the same and/or opposite field of the first video frame that are necessary to reconstruct said second video frame from the received motion compensated pixel data; retrieving, in response to received same field motion vector information, pixel data from the same field of said stored first video frame as a portion of said second video frame being processed; retrieving, in response to received opposite field motion vector information, pixel data from the opposite field of said first video frame than the portion of said second video frame being processed; and selecting, in response to said motion compensation mode information, at least one of the retrieved same field pixel data and the retrieved opposite field pixel data to reconstruct the received motion compensated pixel data of said second video frame. The method of claim 17, wherein: said selecting step selects an average of the retrieved same field pixel data and the retrieved opposite field pixel data to reconstruct the received motion compensated pixel data of said second video frame. An apparatus for coding and decoding of motion compensated interlaced digital video signals including, for coding, the apparatus of any of claims 9 to 16 and, for decoding, a decoding apparatus comprising: memory means (180) for storing odd and even field pixel data for a first video frame; means (170) for receiving motion compensated pixel data from block pairs of odd and even field pixel data of a second video frame together with motion vector and motion compensation mode information for said block pairs, said motion vector information identifying blocks of pixel data in the same and/or opposite field of the first video frame that are necessary to reconstruct said second video frame from the received motion compensated pixel data; first motion compensator means (182) responsive to received same field motion vector Information for retrieving pixel data from the same field of said stored first video frame as a portion of said second video frame being processed; second motion compensator means (184) responsive to received opposite field motion vector information for retrieving pixel data from the opposite field of said first video frame than the portion of said second video frame being processed; and means (188) for selecting, in response to said motion compensation mode information, at least one of the pixel data retrieved by said first motion compensator means and the pixel data retrieved by said second motion compensator means to reconstruct the received motion compensated pixel data of said second video frame. The apparatus of claim 19, wherein: said selecting means selects an average of the pixel data retrieved by said first motion compensator means and the pixel data retrieved by said second motion compensator means to reconstruct the received motion compensated pixel data of said second video frame.

Inventors: KRAUSE EDWARD A, KRAUSE, EDWARD A.
Applicants: GEN INSTRUMENT CORP, GENERAL INSTRUMENT CORPORATION
Application year: 1995
Main classification: H04N7
IPC codes: H04N7, G06T9