Method for motion vector de-interlacing

A method for motion vector de-interlacing decodes macro blocks in a picture, calculates motion vectors of the each MB, produces de-interlacing flag according to the threshold, realizes a Temporal Extension action and performs a Devour action. The Temporal Extension action checks multiple flag buffers, determines if a de-interlace flag should be set as WEAVE or BOB2 based on whether there exists a predetermined number of BOB flags in those flag buffers The Devour action determines if the de-interlace flag is BOB. If positive, it calculates the amount of BOB data within a predetermined area around the current MB, determines if the result is smaller than the BOB threshold and sets the de-interlace flag as WEAVE. Otherwise, it calculates the amount of the WEAVE data, determines if the result is smaller than the WEAVE threshold and sets the de-interlace flag as BOB2.

This Nonprovisional application claims priority under 35 U.S.C. § 119(a) on Patent Application No(s). 093100846 filed in TAWIAN, R.O.C. on Jan. 13, 2004, the entire contents of which are hereby incorporated by reference.

FIELD OF THE INVENTION

The present invention is directed to a method for motion vector de-interlacing, and more particularly, to a method for decoding MPEG-2 images.

BACKGROUND OF THE INVENTION

Recently, multimedia is easy to obtain for people. The source of multimedia can be, for example, a television program, a movie, a video compact disk (VCD), or a digital video disk (DVD). In these sources, the images mainly have two categories. One is non-interlaced images, which are shown line by line, and the other is interlaced images, which are shown in alternate lines. These images are primarily decoded in accord with the MPEG-2 standard.

In the process for encoding/decoding MPEG-2 images, one general processing method is to de-interlace the content of the interlaced film. Of these, WEAVE and BOB methods are common ways for de-interlacing. The WEAVE method merges two information fields to form a frame and the BOB method use a single information field to form a frame.

Obviously, the frame formed via the WEAVE method has more information and is clearer. The frame formed via the BOB method is more vague and some static portions will jiggle, such as the logo of the television station.

Certainly, the WEAVE method also has drawbacks. While macro block (MB) data are interlaced, the motions portions in the frame formed via the WEAVE method usually have some flaws with comb shapes, which are called mice teeth.

To a certain extent, the advantages of these two methods can be combined. The BOB method is used to eliminate the mice teeth in the motion portions and the WEAVE method is used to make the static portions clearer. This kind of method is called motion adaptive de-interlacing.

The algorithm disclosed in U.S. Pat. No. 6,269,484, named “method and apparatus for de-interlacing interlaced content using motion vectors in compressed video stream,” employs motion vectors and some motion estimation remains of an MPEG stream to determine if an MB is active. In fact, the motion estimation algorithm employed in the MPEG decoder is used to search for an MB most similar to a reference picture to obtain the optimum compression ratio. In other words, the motion estimation algorithm isn't used to determine if a current MB is originally active. Hence, simply using some results obtained via this algorithm, e.g. the motion vectors and motion estimation remains of the MPEG stream, to determine if a current MB is active is not reliable.

Reference is made toFIG. 1, which is a block diagram of a conventional de-interlacing system for de-interlacing interlaced content using motion vectors in a compressed video stream.FIG. 1is a representative diagram of the U.S. patent mentioned above, which includes: an MPEG-2 interlaced picture data encoder10, an encoded compressed MPEG-2 video stream102, an MPEG-2 de-interlacing device104, an MPEG-2 data stream decoder106, an MPEG-2 decoder with motion vector extractor108, a motion vector based deinterlacing determinator110, a motion vector based de-interlacing bitmap112, a block data subset114, decoding motion vector data116, picture data118, a de-interlacing video rendering unit using motion vector based de-interlacing bitmap120and a progressive display122.

The MPEG-2 interlaced picture data encoder10is an MPEG-2 encoder, which is used for decoding the interlaced picture data according-to MPEG-2 standard and passing the encoded compressed MPEG-2 video stream102to the MPEG-2 de-interlacing device104. The MPEG-2 de-interlacing device104includes the MPEG-2 data stream decoder106and de-interlacing video rendering unit using motion vector based de-interlacing bitmap120. The MPEG-2 data stream decoder106includes the MPEG-2 decoder with motion vector extractor108, motion vector based de-interlacing determinator110and motion vector based de-interlacing bitmap112.

The MPEG-2 decoder with motion vector extractor108generates the block data subset114and decoding motion vector data116during decoding and passes them to the motion vector based de-interlacing determinator110. The motion vector based de-interlacing determinator110produces the motion vector based de-interlacing bitmap112, which has two bits provided to indicate if each MB of a picture is a motion portion or motionless portion.

The MPEG-2 decoder with motion vector extractor108produces and passes the picture data118to the de-interlacing video rendering unit using motion vector based de-interlacing bitmap120. Then, the processed picture is shown on the progressive display122.

Accordingly, the conventional de-interlacing system and method mentioned above still have some drawbacks that could be improved. The present invention aims to resolve the drawbacks in the prior art.

SUMMARY OF THE INVENTION

An objective of the present invention is to provide a method for motion vector de-interlacing that can resolve the drawbacks in the prior art.

For reaching the objective above, the present invention employs the information of motion vectors in an encoding/decoding video stream to determine the motion of MBs. The present invention uses the continuity and relativity of the motion to add a Temporal Extension module and a Devour module to make the determination more conservative so as to reduce mice teeth.

Numerous additional features, benefits and details of the present invention are described in the detailed description, which follows.

DETAILED DESCRIPTION

Generally, there exists several frame buffers to store the decoded image data, and the same number of de-interlacing flag buffers respectively corresponding to the frame buffers will be set to store the de-interlacing flags. Following figures fromFIG. 3toFIG. 5is applied to each MB right after it's decoding. By the way, top field first is assumed in following description.

Reference is made toFIG. 2, which is a flowchart of a method for motion vector de-interlacing in accordance with the present invention. The method includes: decoding MBs in a picture (S200); calculating motion vectors for each MB (S202); determining if the MB content is a motion portion according to the threshold for the motion vectors (S204); if the determined result is positive, producing a de-interlacing flag for current MB (S206); realizing Temporal Extension action (S208); and performing Devour action (S210).

Reference is made toFIG. 3, which is a flowchart for generating de-interlacing flags and performing Temporal Extension action for frame picture structure video stream in accordance with the present invention. The flowchart includes: determining if the image is an I picture (S302); if negative, checking if the current MB is an intra MB (S304); if positive, set the de-interlacing flag for current MB as BOB (S306).

If the determination of step S302is positive, the method further determines if the picture is the first frame (S316); if positive, the de-interlacing flag is set as BOB2 (S318). Otherwise, the de-interlacing flag is set to be the same as the previous decoded frame's flag (S320). The method determines if the de-interlacing flag is set as WEAVE (S322); if negative, this procedure ends. Otherwise, the method checks if there exits a predetermined number of flags set as BOB at the same position of the de-interlacing flag buffers (S310); if positive, the de-interlacing flag is set as BOB2 (S314). Otherwise, the de-interlacing flag is set as WEAVE (S312).

If the determination of step S304is negative, further determination is made as to whether there exists an absolute value of the motion vector larger than the threshold (S308); if positive, the de-interlacing flag is set as BOB (S306). Otherwise, the method checks if there exits a predetermined number of flags set as BOB at the same position of the de-interlacing flag buffers (S310); if positive, the de-interlacing flag is set as BOB2 (S314). Otherwise, the de-interlacing flag is set as WEAVE (S312). Further, steps S310, S312, S314can be used as a Temporal Extension method for step S410inFIG. 4as described below.

Reference is madeFIGS. 4-1and4-2, which illustrate a flowchart for generating de-interlacing flags for field picture structure video stream in accordance with the present invention. The flowchart includes determining if the image data is an I picture (S400); if positive, whether the picture is the first frame is determined (S402); if positive, the de-interlacing flag, which can be indicated as Flag(MB_VER, MB_HOR), is set as BOB2 (S406). Otherwise, Flag(MB_VER, MB_HOR) is set to be the same as the previous frame's flag (S404). The method determines if Flag(MB_VER, MB_HOR) is set as WEAVE (S408); if negative, this procedure end. Otherwise, Flag(MB_VER, MB_HOR) is set as the result of Temporal Extension (S410) and Flag(MB_VER+1, MB_HOR) or Flag(MB_VER−1, MB_HOR) is set as Flag(MB_VER, MB_HOR) (S412).

If the determination of step S400is negative, the method checks if current MB is an intra MB (S414); if positive, whether the MB data are top field data is determined (S416); if positive, Flag(MB_VER, MB_HOR) is set as BOB (S418) and the Flag(MB VER+1, MB_HOR) is set as BOB (S420). Otherwise, Flag(MB_VER, MB_HOR) is set as BOB (S422) and the Flag(MB_VER−1, MB_HOR) is set as BOB (S424).

If the determination of step S414is negative, the method determines if there exists an absolute value of the motion vector larger than the threshold (S426); if positive, the method determines if the MB data are top field data (S416). If positive, Flag(MB_VER, MB_HOR) is set as BOB (S418) and the Flag(MB_VER+1, MB_HOR) is set as BOB (S420). Otherwise, Flag(MB_VER, MB_HOR) is set as BOB (S422) and the Flag(MB_VER−1, MB_HOR) is set as BOB (S424).

Reference is made toFIG. 5, which is a flowchart for performing Devour action in accordance with the present invention. And the Devour action will be only performed after the related de-interlacing flags are ready. The flowchart includes steps as follows. For each de-interlacing flag ready for Devour action, the following action will be performed: whether the de-interlace flag is BOB is determined (S504); if positive, the amount of BOB flags within a predetermined area around the current MB is calculated (S506). Whether the calculated result is smaller than the BOB threshold is determined (S508). The de-interlace flag is set as WEAVE (S510).

If the determination of Step S504is negative, the amount of the WEAVE data within a predetermined area around the current MB is calculated (S512). Whether the calculated result is smaller than the WEAVE threshold is determined (S514) and the de-interlace flag is set as BOB2 (S516).