Patent ID: 8494056

Claim:
A computerized method for transcoding a sequence of input images, each input image comprising one or more input macroblocks of pixels encoded in a first format into a sequence of output images, each output image comprising one or more output macroblocks of pixels encoded in a second format, the method comprising: (a1) decoding an input macroblock (MB), having one or more partitions, into a decoded input MB, including extracting an encoding block mode for the input MB indicating size of the partitions within the input MB, respective motion vectors associated with partitions within the input MB, and a residual information for the input MB; (b1) determining, based on said residual information, a limited set of candidate transcoding block modes for transcoding the input MB into the output MB, the output MB having one or more partitions, each transcoding block mode indicating size of the partitions within the output MB, the limited set comprising fewer than all possible transcoding block modes, comprising: (i) providing training images, encoded in the first format, which have been transcoded by using a codec device into respective transcoded training images encoded in the second format; (ii) generating a block mode conversion table containing multi-tuples, each multi-tuple having a first tuple and a second tuple, each said first tuple including an encoding block mode for a sub-set of the macroblocks in the training images encoded using the encoding block mode, and each said second tuple including a list of candidate transcoding block modes used by the codec device in transcoding said sub-set of the macroblocks in the training images, the list including those transcoding block modes whose probability of usage is above a predetermined usage threshold; (iii) determining a multi-tuple, the first tuple of which matches the encoding block mode for the input MB extracted in the step (i); and (iv) obtaining the limited set of candidate transcoding block modes from the second tuple in the multi-tuple; (c1) for each candidate transcoding block mode in the limited set, selectively improving accuracy of the motion vectors for the input MB using the residual information for the input MB to produce motion vectors for said each candidate transcoding block mode; (d1) selecting an optimal transcoding block mode from the step (c1), which optimizes a characteristic of the output MB; and (e1) encoding the decoded input MB into the output MB by using the optimal transcoding block mode and corresponding motion vectors for the optimal transcoding block mode generated in the step (c1).