Patent ID: 8503525

Claim:
A method, comprising: performing, by a computing device, a bitstream analysis of a media file having a plurality of segments to determine a number of non-zero inverse discrete cosine transform (IDCT) coefficients of each of the plurality of respective segments, or input parameter values of a motion compensation (MC) task function associated with the respective segments, or both; determining, by the computing device, a predicted number of processor cycles for playing the media file based on a result of the bitstream analysis, including determining, for the respective segments, predicted numbers of variable length decoding (VLD) task cycles from the number of non-zero IDCT coefficients of the respective segments; and generating and saving in the media file at a position preceding each respective segment of the media file, by the computing device, metadata comprising the predicted number of processor cycles for each respective segment of the media file for subsequent playing of the media file, wherein a size of a segment in the plurality of segments is based on the predicted number of processor cycles for the segment.