Skip to content

Commit

Permalink
Fix an issue that resulted in an error ("Invalid SOS parameters for s…
Browse files Browse the repository at this point in the history
…equential JPEG. Didn't expect more than one scan.") when decoding progressive+arithmetic JPEGs generated by libjpeg-turbo.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1049 632fc199-4ca6-4c93-a231-07263d6284db
  • Loading branch information
dcommander committed Sep 28, 2013
2 parents ac5b9e8 + c44750e commit dc0f3c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 2 additions & 4 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ When using a 32-bit version of CMake on 64-bit Windows, it is impossible to
access the c:\WINDOWS\system32 directory, which made it impossible for the
TurboVNC build scripts to bundle the 64-bit TurboJPEG DLL.

[3] Fixed a bug whereby attempting to encode a progressive JPEG with arithmetic
entropy coding (by passing arguments of -progressive -arithmetic to cjpeg or
jpegtran, for instance) would result in an error, "Requested feature was
omitted at compile time".
[3] Fixed a couple of bugs that prevented libjpeg-turbo from encoding or
decoding progressive JPEGs with arithmetic entropy coding.


1.3.0
Expand Down
6 changes: 5 additions & 1 deletion jcmarker.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1998, Thomas G. Lane.
* Modified 2003-2010 by Guido Vollbeding.
* Modifications:
* Copyright (C) 2010, D. R. Commander.
* For conditions of distribution and use, see the accompanying README file.
Expand Down Expand Up @@ -532,7 +533,10 @@ write_frame_header (j_compress_ptr cinfo)

/* Emit the proper SOF marker */
if (cinfo->arith_code) {
emit_sof(cinfo, M_SOF9); /* SOF code for arithmetic coding */
if (cinfo->progressive_mode)
emit_sof(cinfo, M_SOF10); /* SOF code for progressive arithmetic */
else
emit_sof(cinfo, M_SOF9); /* SOF code for sequential arithmetic */
} else {
if (cinfo->progressive_mode)
emit_sof(cinfo, M_SOF2); /* SOF code for progressive Huffman */
Expand Down

0 comments on commit dc0f3c1

Please sign in to comment.