摘要 |
A data encoding system for encoding image data in a buffer includes a codec, a ratio calculator, and a controller. The codec is configured for reading the image data from the buffer in parts, encoding the read parts of the image data using a compression ratio, and writing the encoded parts back to the buffer. The ratio calculator is configured for calculating a first ratio of the size of the encoded parts to the amount of free space of the buffer before any part of the image data was encoded, and a second ratio of size of the read parts to that of the entire image data. The controller determines whether the first ratio is larger than the second ratio, increasing the compression ratio if the first ratio is larger than the second ratio, and controlling the codec to re-encode the image data using the increased compression ratio.
|