Fix MSan use-of-uninitialized-value error
... introduced by 42825b68d5. In fact,
fault-tolerant multi-scan block smoothing cannot currently be used with
the arithmetic decoder, because that decoder doesn't have any way of
distinguishing a normal end of scan from an unexpected end of scan.
Thus, this commit also modifies the change log to reset the expectations
regarding the scope of the fault-tolerant multi-scan block smoothing
feature. If, at some point in the future, the arithmetic decoder can be
modified to detect an unexpected end of scan, then one would need only
set entropy->pub.insufficient_data = TRUE when the arithmetic decoder
encounters an unexpected end of scan in order to make fault-tolerant
block smoothing work properly with that decoder.
This commit is contained in:
20
ChangeLog.md
20
ChangeLog.md
@@ -57,16 +57,16 @@ and AMD CPUs, as well as a measured average overall compression speedup of
|
|||||||
0-23% on platforms that do not have a SIMD-accelerated Huffman encoding
|
0-23% on platforms that do not have a SIMD-accelerated Huffman encoding
|
||||||
implementation.
|
implementation.
|
||||||
|
|
||||||
7. The block smoothing algorithm that the libjpeg API library optionally
|
7. When decompressing progressive Huffman-encoded JPEG images, the block
|
||||||
applies when decompressing multi-scan images is now more fault-tolerant.
|
smoothing algorithm that the libjpeg API library optionally applies is now more
|
||||||
Previously, if a particular scan was incomplete, then the smoothing parameters
|
fault-tolerant. Previously, if a particular scan was incomplete, then the
|
||||||
for the incomplete scan would be applied to the entire output image, including
|
smoothing parameters for the incomplete scan would be applied to the entire
|
||||||
the parts of the image that were generated by the prior (complete) scan.
|
output image, including the parts of the image that were generated by the prior
|
||||||
Visually, this had the effect of removing block smoothing from lower-frequency
|
(complete) scan. Visually, this had the effect of removing block smoothing
|
||||||
scans if they were followed by an incomplete higher-frequency scan.
|
from lower-frequency scans if they were followed by an incomplete
|
||||||
libjpeg-turbo now applies block smoothing parameters to each iMCU row based on
|
higher-frequency scan. libjpeg-turbo now applies block smoothing parameters to
|
||||||
which scan generated the pixels in that row, rather than always using the block
|
each iMCU row based on which scan generated the pixels in that row, rather than
|
||||||
smoothing parameters for the most recent scan.
|
always using the block smoothing parameters for the most recent scan.
|
||||||
|
|
||||||
|
|
||||||
2.0.3
|
2.0.3
|
||||||
|
|||||||
@@ -731,6 +731,7 @@ bad:
|
|||||||
entropy->c = 0;
|
entropy->c = 0;
|
||||||
entropy->a = 0;
|
entropy->a = 0;
|
||||||
entropy->ct = -16; /* force reading 2 initial bytes to fill C */
|
entropy->ct = -16; /* force reading 2 initial bytes to fill C */
|
||||||
|
entropy->pub.insufficient_data = FALSE;
|
||||||
|
|
||||||
/* Initialize restart counter */
|
/* Initialize restart counter */
|
||||||
entropy->restarts_to_go = cinfo->restart_interval;
|
entropy->restarts_to_go = cinfo->restart_interval;
|
||||||
|
|||||||
Reference in New Issue
Block a user