зеркало из https://github.com/mozilla/mozjpeg.git
Throw a warning if an unexpected marker is found in the middle of the JPEG data stream
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@521 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
Коммит
df1c38df74
|
@ -4,6 +4,9 @@
|
|||
[1] Fixed a 1-pixel error in row 0, column 21 of the luminance plane generated
|
||||
by tjEncodeYUV().
|
||||
|
||||
[2] Fixed the accelerated Huffman decoder so that it mimics the behavior of
|
||||
the unaccelerated decoder and throws a warning if an unexpected marker is found
|
||||
in the middle of the JPEG data stream.
|
||||
|
||||
1.1.0
|
||||
=====
|
||||
|
|
6
jdhuff.c
6
jdhuff.c
|
@ -623,6 +623,7 @@ decode_mcu_slow (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
|||
if (val0 == 0xFF) { \
|
||||
buffer++; \
|
||||
if (val1 != 0) { \
|
||||
cinfo->unread_marker = val1; \
|
||||
buffer -= 2; \
|
||||
get_buffer &= ~0xFF; \
|
||||
} \
|
||||
|
@ -739,6 +740,11 @@ decode_mcu_fast (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
|||
}
|
||||
}
|
||||
|
||||
if (cinfo->unread_marker != 0 && ! cinfo->entropy->insufficient_data) {
|
||||
WARNMS(cinfo, JWRN_HIT_MARKER);
|
||||
cinfo->entropy->insufficient_data = TRUE;
|
||||
}
|
||||
|
||||
br_state.bytes_in_buffer -= (buffer - br_state.next_input_byte);
|
||||
br_state.next_input_byte = buffer;
|
||||
BITREAD_SAVE_STATE(cinfo,entropy->bitstate);
|
||||
|
|
Загрузка…
Ссылка в новой задаче