Patent ID: 7428341

Claim:
A method of compressing an encoded data stream having a plurality of data elements each element having a value, the method comprising the following operations performed for one or more subject video frames of the video stream: preprocessing element values of the subject video frame to yield corresponding error values of an error frame, each error value comprising a difference between the corresponding element value and a prediction of the element value based on values of surrounding element values by a predetermined predictive computation; computing a histogram of error values in the error frame; generating an entropy encoding map based upon the computed histogram; performing operations comprising: (a) applying the generated encoding map to compress a predetermined one of multiple subparts of the error frame in accordance with the computed histogram; (b) determining a compression ratio of the compressed subpart, and if said ratio fails to satisfy a predetermined threshold, regenerating the encoding map based upon a histogram of the predetermined subpart and applying the re-generated encoding map to re-compress the predetermined subpart; and for each remaining subpart of the error frame, repeating operations (a) and (b), where operation (a) utilizes one of the following: a most recently generated encoding map, an earlier generated encoding map; providing a compressed output comprising: each compressed subpart if the subgroup's compression ratio satisfied the predetermined threshold, otherwise the re-compressed subpart.