IJG's JPEG software v6b with lossless JPEG support

Patch obtained from:
https://sourceforge.net/projects/jpeg/files/ftp.oceana.com

Author date taken from original announcement and timestamp of patch
tarball:
https://groups.google.com/g/comp.protocols.dicom/c/rrkP8BxoMRk/m/Ij4dfprggp8J
This commit is contained in:
Ken Murchison
1999-04-27 00:00:00 +00:00
committed by DRC
parent 5ead57a34a
commit 2e8360e061
62 changed files with 5551 additions and 1840 deletions

View File

@@ -234,7 +234,8 @@ get_soi (j_decompress_ptr cinfo)
LOCAL(boolean)
get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith)
get_sof (j_decompress_ptr cinfo, J_CODEC_PROCESS process, boolean is_arith,
int data_unit)
/* Process a SOFn marker */
{
INT32 length;
@@ -242,7 +243,8 @@ get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith)
jpeg_component_info * compptr;
INPUT_VARS(cinfo);
cinfo->progressive_mode = is_prog;
cinfo->data_unit = data_unit;
cinfo->process = process;
cinfo->arith_code = is_arith;
INPUT_2BYTES(cinfo, length, return FALSE);
@@ -976,32 +978,40 @@ read_markers (j_decompress_ptr cinfo)
case M_SOF0: /* Baseline */
case M_SOF1: /* Extended sequential, Huffman */
if (! get_sof(cinfo, FALSE, FALSE))
if (! get_sof(cinfo, JPROC_SEQUENTIAL, FALSE, DCTSIZE))
return JPEG_SUSPENDED;
break;
case M_SOF2: /* Progressive, Huffman */
if (! get_sof(cinfo, TRUE, FALSE))
if (! get_sof(cinfo, JPROC_PROGRESSIVE, FALSE, DCTSIZE))
return JPEG_SUSPENDED;
break;
case M_SOF3: /* Lossless, Huffman */
if (! get_sof(cinfo, JPROC_LOSSLESS, FALSE, 1))
return JPEG_SUSPENDED;
break;
case M_SOF9: /* Extended sequential, arithmetic */
if (! get_sof(cinfo, FALSE, TRUE))
if (! get_sof(cinfo, JPROC_SEQUENTIAL, TRUE, DCTSIZE))
return JPEG_SUSPENDED;
break;
case M_SOF10: /* Progressive, arithmetic */
if (! get_sof(cinfo, TRUE, TRUE))
if (! get_sof(cinfo, JPROC_PROGRESSIVE, TRUE, DCTSIZE))
return JPEG_SUSPENDED;
break;
case M_SOF11: /* Lossless, arithmetic */
if (! get_sof(cinfo, JPROC_LOSSLESS, TRUE, 1))
return JPEG_SUSPENDED;
break;
/* Currently unsupported SOFn types */
case M_SOF3: /* Lossless, Huffman */
case M_SOF5: /* Differential sequential, Huffman */
case M_SOF6: /* Differential progressive, Huffman */
case M_SOF7: /* Differential lossless, Huffman */
case M_JPG: /* Reserved for JPEG extensions */
case M_SOF11: /* Lossless, arithmetic */
case M_SOF13: /* Differential sequential, arithmetic */
case M_SOF14: /* Differential progressive, arithmetic */
case M_SOF15: /* Differential lossless, arithmetic */