METHOD AND APPARATUS FOR MPEG-2 TO H.264 VIDEO TRANSCODING
A method for transcoding from an MPEG-2 format to an H.264 format is disclosed. The method generally comprises the steps of (A) decoding an input video stream in the MPEG-2 format to generate a plurality of macroblocks; (B) determining a plurality of indicators from a pair of the macroblocks, the pair of the macroblocks being vertically adjoining; and (C) coding the pair of the macroblocks into an output video stream in the H.264 format using one of (i) a field mode coding and (ii) a frame mode coding as determined from the indicators.
1 . A method for transcoding from an MPEG-2 format to an H.264 format, comprising the steps of:
(A) buffering an input video stream in said MPEG-2 format, wherein data in said input video stream represents a picture;
(B) generating a plurality of macroblocks by decoding said data;
(C) determining at least one item from a given one of said macroblocks; and
(D) coding said given macroblock into an output video stream in said H.264 format using said at least one item to refine an H.264 motion vector of said given macroblock.
2 . The method according to claim 1 , wherein said at least one item comprises an MPEG-2 motion vector of said given macroblock, the method further comprising the step of:
generating an H.264 motion vector of said given macroblock using said MPEG-2 motion vector as a search center in a motion estimation.
3 . The method according to claim 1 , wherein (i) said given macroblock is decoded from an MPEG-2 intra-frame and coded into an H.264 predicted-frame and (ii) said at least one item comprises an MPEG-2 intra-frame concealment motion vector used as a starting point to determine said H.264 motion vector.
4 . The method according to claim 1 , wherein said at least one item comprises an MPEG-2 fcode, the method further comprising the step of:
determining a size of said refinement of said H.264 motion vector based on said MPEG-2 fcode.
5 . The method according to claim 1 , wherein said at least one item comprises an MPEG-2 fcode, the method further comprising the step of:
determining a direct mode selection based on said MPEG-2 fcode.
6 . The method according to claim 5 , wherein said coding of said given macroblock in said H.264 format uses a spatial direct selection in response to said fcode being large.
7 . The method according to claim 5 , wherein said coding of said given macroblock in said H.264 format uses a temporal direct selection in response to said fcode not being large.
8 . The method according to claim 1 , further comprising the step of:
determining a quantization parameter of said given macroblock.
9 . The method according to claim 8 , further comprising the step of:
controlling an encoder rate of said output video stream using said quantization parameter as an H.264 macroblock complexity indicator.
10 . The method according to claim 1 , wherein said method is implemented in a transcoder circuit comprising a decoder, an encoder and a memory coupled between said encoder and said decoder.