Patent ID: 8238433

Claim:
Method to transcode H.264/AVC video frames into MPEG-2comprising: converting the H.264/AVC interframe coding modes into modes allowed by MPEG-2 and converting H.264/AVC motion information into corresponding MPEG-2 semantics; determining a most suitable motion vector for each MPEG-2 macro-block, according to the following steps: a) Creating a list of motion vectors on the basis of the motion vectors of the reference frames and the sub-blocks of the H.264/AVC macro-block corresponding to the MPEG-2macro-block, as long as the motion vectors are allowed in MPEG-2, b) Adding to the list the motion vectors that were not included in the preceding step, subjecting them to one or more adaptation methods, so that they can be permitted in MPEG-2, c) Selecting from the list the motion vector that produces the least residual signal, which results from the application of each motion vector to the macro-block, irrespective of size of the macro-block, and further comprising adapting the H.264/AVC motion vectors that are not compatible with MPEG-2 by means of at least one of the following operations: a) Redimensioning motion vectors that use different reference frames from the reference frames permitted by MPEG-2, so as to use reference frames that are permitted by MPEG-2, by altering the scale of the motion vector by linear interpolation based on a new temporal distance, b) Converting the motion vectors that exceed edges of the frame, called unrestricted motion vectors, into vectors that are compatible with MPEG-2 by inversion and temporal mirroring, which consists of inversion with regard to both the horizontal and vertical axes, along with exchanging the reference frame with a temporally opposite frame, in terms of the frame being coded, c) Creating bi-directional references on the basis of uni-directional references, using motion vectors with uni-directional prediction in bi-directional frames, combining said motion vector with another motion vector obtained by inversion and the temporal mirroring of the first motion vector.