Patent ID: 8229235

Claim:
An image data compression system for compressing a frame represented as a plurality of blocks, the image data compression system comprising: a lossless compression unit configured to receive the plurality of blocks and to perform lossless compression thereon resulting in a first code; a lossy compression unit configured to receive the plurality of blocks and to perform lossy compression thereon resulting in a second code; a code selection circuit configured to contemporaneously receive the first and second codes and configured to selectively output one of the first and second codes based upon an output size evaluated for at least one of the first and second codes; and a memory unit configured to receive at least one of the first and second codes output from the code selection circuit, the memory unit including a plurality of designated buffer spaces for storing compressed codes of the plurality of blocks, each designated buffer space corresponding to one of the plurality of blocks, wherein a size of each designated buffer space has a fixed value, and a size of the second code output from the lossy compression unit is less than a size of a corresponding designated buffer space, the code selection circuit includes information regarding the size of the designated buffer spaces and the code selection circuit compares the size of the first code output from the lossless compression unit with the size of the corresponding designated buffer space, the lossless compression unit is further operable to output size indicative information regarding the first code; and the code selection circuit includes a code selector configured to select one of the first and second code signals according to a control signal, and a selector control unit configured to receive the size indicative information and to compare the size indicative information against the size of the designated buffer space, and to accordingly generate the control signal to control the code selector for selection of the first code when the size of the first code is less than or equal to the size of the designated buffer space and for selection of the second code when the size of the first code exceeds the size of the designated buffer space.