Release Notes
Open Source Used In AsyncOS 8.8 for Cisco Web Security Appliances
84
Progressive decompression:
When buffered-image mode is not used, the decoder library will read all of
a multi-scan file during jpeg_start_decompress(), so that it can provide a
final decoded image. (Here "multi-scan" means either progressive or
multi-scan sequential.) This makes multi-scan files transparent to the
decoding application. However, existing applications that used suspending
input with version 5 of the IJG library will need to be modified to check
for a suspension return from jpeg_start_decompress().
To perform incremental display, an application must use the library's
buffered-image mode. This is described in the next section.
Buffered-image mode
-------------------
In buffered-image mode, the library stores the partially decoded image in a
coefficient buffer, from which it can be read out as many times as desired.
This mode is typically used for incremental display of progressive JPEG files,
but it can be used with any JPEG file. Each scan of a progressive JPEG file
adds more data (more detail) to the buffered image. The application can
display in lockstep with the source file (one display pass per input scan),
or it can allow input processing to outrun display processing. By making
input and display processing run independently, it is possible for the
application to adapt progressive display to a wide range of data transmission
rates.
The basic control flow for buffered-image decoding is
jpeg_create_decompress()
set data source
jpeg_read_header()
set overall decompression parameters
cinfo.buffered_image = TRUE;/* select buffered-image mode */
jpeg_start_decompress()
for (each output pass) {
adjust output decompression parameters if required
jpeg_start_output()/* start a new output pass */
for (all scanlines in image) {
jpeg_read_scanlines()
display scanlines
}
jpeg_finish_output()/* terminate output pass */
}
jpeg_finish_decompress()
jpeg_destroy_decompress()