摘要 |
A method and apparatus for image compression. The method includes: calculating a total bit length that is needed for compressing any one segment line and an ideal bit length that is needed for compressing any one segment; for each segment in any one segment line, acquiring a quantization parameter and a compression mode for compressing the segment and an actual bit length that is needed for compressing the segment by using the acquired quantization parameter and compression mode; distributing a redundancy bit length of one or more simple segments in the segment line to one or more complex segments in the segment line, and re-acquiring quantization parameters and compression modes for compressing every complex segment of the one or more complex segments; and compressing every segment in the segment line by using the acquired quantization parameters and compression modes.
|