Commit 429190da authored by fallenstardust's avatar fallenstardust

更新jpeglib与libpng

parent 5ce00443
This diff is collapsed.
...@@ -51,11 +51,11 @@ CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ ...@@ -51,11 +51,11 @@ CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
jconfig.vms jconfig.vms
# Support scripts for configure # Support scripts for configure
CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp \ CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
missing ar-lib
# Miscellaneous support files # Miscellaneous support files
OTHERFILES= jconfig.txt ckconfig.c jmemdosa.asm libjpeg.map OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
libjpeg.map
# Test support files # Test support files
TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
......
This diff is collapsed.
This diff is collapsed.
.TH ANSI2KNR 1 "19 Jan 1996"
.SH NAME
ansi2knr \- convert ANSI C to Kernighan & Ritchie C
.SH SYNOPSIS
.I ansi2knr
[--varargs] input_file [output_file]
.SH DESCRIPTION
If no output_file is supplied, output goes to stdout.
.br
There are no error messages.
.sp
.I ansi2knr
recognizes function definitions by seeing a non-keyword identifier at the left
margin, followed by a left parenthesis, with a right parenthesis as the last
character on the line, and with a left brace as the first token on the
following line (ignoring possible intervening comments). It will recognize a
multi-line header provided that no intervening line ends with a left or right
brace or a semicolon. These algorithms ignore whitespace and comments, except
that the function name must be the first thing on the line.
.sp
The following constructs will confuse it:
.br
- Any other construct that starts at the left margin and follows the
above syntax (such as a macro or function call).
.br
- Some macros that tinker with the syntax of the function header.
.sp
The --varargs switch is obsolete, and is recognized only for
backwards compatibility. The present version of
.I ansi2knr
will always attempt to convert a ... argument to va_alist and va_dcl.
.SH AUTHOR
L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and
continues to maintain the current version; most of the code in the current
version is his work. ansi2knr also includes contributions by Francois
Pinard <pinard@iro.umontreal.ca> and Jim Avera <jima@netcom.com>.
This diff is collapsed.
.TH CJPEG 1 "23 November 2013" .TH CJPEG 1 "28 August 2011"
.SH NAME .SH NAME
cjpeg \- compress an image file to a JPEG file cjpeg \- compress an image file to a JPEG file
.SH SYNOPSIS .SH SYNOPSIS
...@@ -53,12 +53,9 @@ you'll get a smaller JPEG file that takes less time to process. ...@@ -53,12 +53,9 @@ you'll get a smaller JPEG file that takes less time to process.
Create RGB JPEG file. Create RGB JPEG file.
Using this switch suppresses the conversion from RGB Using this switch suppresses the conversion from RGB
colorspace input to the default YCbCr JPEG colorspace. colorspace input to the default YCbCr JPEG colorspace.
You can use this switch in combination with the Use this switch in combination with the
.BI \-block " N" .BI \-block " N"
switch (see below) for lossless JPEG coding. switch (see below) for lossless JPEG coding.
See also the
.B \-rgb1
switch below.
.TP .TP
.B \-optimize .B \-optimize
Perform optimization of entropy encoding parameters. Without this, default Perform optimization of entropy encoding parameters. Without this, default
...@@ -169,8 +166,8 @@ Switches for advanced users: ...@@ -169,8 +166,8 @@ Switches for advanced users:
.B \-arithmetic .B \-arithmetic
Use arithmetic coding. Use arithmetic coding.
.B Caution: .B Caution:
arithmetic coded JPEG is not yet widely implemented, so many decoders will arithmetic coded JPEG is not yet widely implemented, so many decoders will be
be unable to view an arithmetic coded JPEG file at all. unable to view an arithmetic coded JPEG file at all.
.TP .TP
.BI \-block " N" .BI \-block " N"
Set DCT block size. All N from 1 to 16 are possible. Set DCT block size. All N from 1 to 16 are possible.
...@@ -184,41 +181,6 @@ An implementation of the JPEG SmartScale extension is required for this ...@@ -184,41 +181,6 @@ An implementation of the JPEG SmartScale extension is required for this
feature. SmartScale enabled JPEG is not yet widely implemented, so many feature. SmartScale enabled JPEG is not yet widely implemented, so many
decoders will be unable to view a SmartScale extended JPEG file at all. decoders will be unable to view a SmartScale extended JPEG file at all.
.TP .TP
.B \-rgb1
Create RGB JPEG file with reversible color transform.
Works like the
.B \-rgb
switch (see above) and inserts a simple reversible color transform
into the processing which significantly improves the compression.
Use this switch in combination with the
.BI \-block " N"
switch (see above) for lossless JPEG coding.
.B Caution:
A decoder with inverse color transform support is required for
this feature. Reversible color transform support is not yet
widely implemented, so many decoders will be unable to view
a reversible color transformed JPEG file at all.
.TP
.B \-bgycc
Create big gamut YCC JPEG file.
In this type of encoding the color difference components are quantized
further by a factor of 2 compared to the normal Cb/Cr values, thus creating
space to allow larger color values with higher saturation than the normal
gamut limits to be encoded. In order to compensate for the loss of color
fidelity compared to a normal YCC encoded file, the color quantization
tables can be adjusted accordingly. For example,
.B cjpeg \-bgycc \-quality
80,90 will give similar results as
.B cjpeg \-quality
80.
.B Caution:
For correct decompression a decoder with big gamut YCC support (JFIF
version 2) is required. An old decoder may or may not display a big
gamut YCC encoded JPEG file, depending on JFIF version check and
corresponding warning/error configuration. In case of a granted
decompression the old decoder will display the image with half
saturated colors.
.TP
.B \-dct int .B \-dct int
Use integer DCT method (default). Use integer DCT method (default).
.TP .TP
...@@ -375,8 +337,7 @@ Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. ...@@ -375,8 +337,7 @@ Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
.SH AUTHOR .SH AUTHOR
Independent JPEG Group Independent JPEG Group
.SH BUGS .SH BUGS
GIF input files are no longer supported, to avoid the Unisys LZW patent GIF input files are no longer supported, to avoid the Unisys LZW patent.
(now expired).
(Conversion of GIF files to JPEG is usually a bad idea anyway.) (Conversion of GIF files to JPEG is usually a bad idea anyway.)
.PP .PP
Not all variants of BMP and Targa file formats are supported. Not all variants of BMP and Targa file formats are supported.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* cjpeg.c * cjpeg.c
* *
* Copyright (C) 1991-1998, Thomas G. Lane. * Copyright (C) 1991-1998, Thomas G. Lane.
* Modified 2003-2013 by Guido Vollbeding. * Modified 2003-2011 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software. * This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file. * For conditions of distribution and use, see the accompanying README file.
* *
...@@ -172,10 +172,6 @@ usage (void) ...@@ -172,10 +172,6 @@ usage (void)
#ifdef DCT_SCALING_SUPPORTED #ifdef DCT_SCALING_SUPPORTED
fprintf(stderr, " -block N DCT block size (1..16; default is 8)\n"); fprintf(stderr, " -block N DCT block size (1..16; default is 8)\n");
#endif #endif
#if JPEG_LIB_VERSION_MAJOR >= 9
fprintf(stderr, " -rgb1 Create RGB JPEG file with reversible color transform\n");
fprintf(stderr, " -bgycc Create big gamut YCC JPEG file\n");
#endif
#ifdef DCT_ISLOW_SUPPORTED #ifdef DCT_ISLOW_SUPPORTED
fprintf(stderr, " -dct int Use integer DCT method%s\n", fprintf(stderr, " -dct int Use integer DCT method%s\n",
(JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : "")); (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : ""));
...@@ -314,27 +310,10 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv, ...@@ -314,27 +310,10 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
/* Force a monochrome JPEG file to be generated. */ /* Force a monochrome JPEG file to be generated. */
jpeg_set_colorspace(cinfo, JCS_GRAYSCALE); jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);
} else if (keymatch(arg, "rgb", 3) || keymatch(arg, "rgb1", 4)) { } else if (keymatch(arg, "rgb", 3)) {
/* Force an RGB JPEG file to be generated. */ /* Force an RGB JPEG file to be generated. */
#if JPEG_LIB_VERSION_MAJOR >= 9
/* Note: Entropy table assignment in jpeg_set_colorspace depends
* on color_transform.
*/
cinfo->color_transform = arg[3] ? JCT_SUBTRACT_GREEN : JCT_NONE;
#endif
jpeg_set_colorspace(cinfo, JCS_RGB); jpeg_set_colorspace(cinfo, JCS_RGB);
} else if (keymatch(arg, "bgycc", 5)) {
/* Force a big gamut YCC JPEG file to be generated. */
#if JPEG_LIB_VERSION_MAJOR >= 9 && \
(JPEG_LIB_VERSION_MAJOR > 9 || JPEG_LIB_VERSION_MINOR >= 1)
jpeg_set_colorspace(cinfo, JCS_BG_YCC);
#else
fprintf(stderr, "%s: sorry, BG_YCC colorspace not supported\n",
progname);
exit(EXIT_FAILURE);
#endif
} else if (keymatch(arg, "maxmemory", 3)) { } else if (keymatch(arg, "maxmemory", 3)) {
/* Maximum memory in Kb (or Mb with 'm'). */ /* Maximum memory in Kb (or Mb with 'm'). */
long lval; long lval;
...@@ -349,7 +328,7 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv, ...@@ -349,7 +328,7 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
cinfo->mem->max_memory_to_use = lval * 1000L; cinfo->mem->max_memory_to_use = lval * 1000L;
} else if (keymatch(arg, "nosmooth", 3)) { } else if (keymatch(arg, "nosmooth", 3)) {
/* Suppress fancy downsampling. */ /* Suppress fancy downsampling */
cinfo->do_fancy_downsampling = FALSE; cinfo->do_fancy_downsampling = FALSE;
} else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) { } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) {
...@@ -435,7 +414,7 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv, ...@@ -435,7 +414,7 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
/* Scale the image by a fraction M/N. */ /* Scale the image by a fraction M/N. */
if (++argn >= argc) /* advance to next argument */ if (++argn >= argc) /* advance to next argument */
usage(); usage();
if (sscanf(argv[argn], "%u/%u", if (sscanf(argv[argn], "%d/%d",
&cinfo->scale_num, &cinfo->scale_denom) != 2) &cinfo->scale_num, &cinfo->scale_denom) != 2)
usage(); usage();
......
This diff is collapsed.
This diff is collapsed.
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# Configure script for IJG libjpeg # Configure script for IJG libjpeg
# #
AC_INIT([libjpeg], [9.1.0]) AC_INIT([libjpeg], [8.4.0])
# Directory where autotools helper scripts lives. # Directory where autotools helper scripts lives.
AC_CONFIG_AUX_DIR([.]) AC_CONFIG_AUX_DIR([.])
...@@ -21,13 +21,16 @@ AC_CANONICAL_TARGET ...@@ -21,13 +21,16 @@ AC_CANONICAL_TARGET
# Initialize Automake # Initialize Automake
# Don't require all the GNU mandated files # Don't require all the GNU mandated files
AM_INIT_AUTOMAKE([-Wall -Werror no-dist foreign]) AM_INIT_AUTOMAKE([-Wall -Werror -Wno-obsolete ansi2knr no-dist foreign])
# Make --enable-silent-rules the default. # Make --enable-silent-rules the default.
# To get verbose build output you may configure # To get verbose build output you may configure
# with --disable-silent-rules or use "make V=1". # with --disable-silent-rules or use "make V=1".
AM_SILENT_RULES([yes]) AM_SILENT_RULES([yes])
# This is required when using the de-ANSI-fication feature.
AM_C_PROTOTYPES
# Add configure option --enable-maintainer-mode which enables # Add configure option --enable-maintainer-mode which enables
# dependency checking and generation useful to package maintainers. # dependency checking and generation useful to package maintainers.
# This is made an option to avoid confusing end users. # This is made an option to avoid confusing end users.
...@@ -40,7 +43,6 @@ AC_PROG_CPP ...@@ -40,7 +43,6 @@ AC_PROG_CPP
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
AC_PROG_LN_S AC_PROG_LN_S
AM_PROG_AR
# Check if LD supports linker scripts, # Check if LD supports linker scripts,
# and define automake conditional HAVE_LD_VERSION_SCRIPT if so. # and define automake conditional HAVE_LD_VERSION_SCRIPT if so.
...@@ -223,10 +225,6 @@ int possibly_dupli_function () { return 1; } ...@@ -223,10 +225,6 @@ int possibly_dupli_function () { return 1; }
# Run-time checks # Run-time checks
AC_MSG_CHECKING([to see if char is signed]) AC_MSG_CHECKING([to see if char is signed])
AC_TRY_RUN([ AC_TRY_RUN([
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h>
#ifdef HAVE_PROTOTYPES #ifdef HAVE_PROTOTYPES
int is_char_signed (int arg) int is_char_signed (int arg)
#else #else
...@@ -256,10 +254,6 @@ int main() { ...@@ -256,10 +254,6 @@ int main() {
AC_MSG_CHECKING([to see if right shift is signed]) AC_MSG_CHECKING([to see if right shift is signed])
AC_TRY_RUN([ AC_TRY_RUN([
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h>
#ifdef HAVE_PROTOTYPES #ifdef HAVE_PROTOTYPES
int is_shifting_signed (long arg) int is_shifting_signed (long arg)
#else #else
...@@ -294,9 +288,6 @@ int main() { ...@@ -294,9 +288,6 @@ int main() {
AC_MSG_CHECKING([to see if fopen accepts b spec]) AC_MSG_CHECKING([to see if fopen accepts b spec])
AC_TRY_RUN([ AC_TRY_RUN([
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h> #include <stdio.h>
int main() { int main() {
if (fopen("conftestdata", "wb") != NULL) if (fopen("conftestdata", "wb") != NULL)
......
This diff is collapsed.
.TH DJPEG 1 "23 November 2013" .TH DJPEG 1 "3 October 2009"
.SH NAME .SH NAME
djpeg \- decompress a JPEG file to an image file djpeg \- decompress a JPEG file to an image file
.SH SYNOPSIS .SH SYNOPSIS
...@@ -246,7 +246,7 @@ Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. ...@@ -246,7 +246,7 @@ Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
.SH AUTHOR .SH AUTHOR
Independent JPEG Group Independent JPEG Group
.SH BUGS .SH BUGS
To avoid the Unisys LZW patent (now expired), To avoid the Unisys LZW patent,
.B djpeg .B djpeg
produces uncompressed GIF files. These are larger than they should be, but produces uncompressed GIF files. These are larger than they should be, but
are readable by standard GIF decoders. are readable by standard GIF decoders.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* djpeg.c * djpeg.c
* *
* Copyright (C) 1991-1997, Thomas G. Lane. * Copyright (C) 1991-1997, Thomas G. Lane.
* Modified 2009-2013 by Guido Vollbeding. * Modified 2009 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software. * This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file. * For conditions of distribution and use, see the accompanying README file.
* *
...@@ -298,7 +298,7 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv, ...@@ -298,7 +298,7 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
cinfo->mem->max_memory_to_use = lval * 1000L; cinfo->mem->max_memory_to_use = lval * 1000L;
} else if (keymatch(arg, "nosmooth", 3)) { } else if (keymatch(arg, "nosmooth", 3)) {
/* Suppress fancy upsampling. */ /* Suppress fancy upsampling */
cinfo->do_fancy_upsampling = FALSE; cinfo->do_fancy_upsampling = FALSE;
} else if (keymatch(arg, "onepass", 3)) { } else if (keymatch(arg, "onepass", 3)) {
...@@ -327,7 +327,7 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv, ...@@ -327,7 +327,7 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
/* Scale the output image by a fraction M/N. */ /* Scale the output image by a fraction M/N. */
if (++argn >= argc) /* advance to next argument */ if (++argn >= argc) /* advance to next argument */
usage(); usage();
if (sscanf(argv[argn], "%u/%u", if (sscanf(argv[argn], "%d/%d",
&cinfo->scale_num, &cinfo->scale_denom) < 1) &cinfo->scale_num, &cinfo->scale_denom) < 1)
usage(); usage();
......
IJG JPEG LIBRARY: FILE LIST IJG JPEG LIBRARY: FILE LIST
Copyright (C) 1994-2013, Thomas G. Lane, Guido Vollbeding. Copyright (C) 1994-2009, Thomas G. Lane, Guido Vollbeding.
This file is part of the Independent JPEG Group's software. This file is part of the Independent JPEG Group's software.
For conditions of distribution and use, see the accompanying README file. For conditions of distribution and use, see the accompanying README file.
...@@ -197,8 +197,6 @@ config.guess ...@@ -197,8 +197,6 @@ config.guess
config.sub config.sub
depcomp depcomp
missing missing
ar-lib
compile
install-sh Install shell script for those Unix systems lacking one. install-sh Install shell script for those Unix systems lacking one.
Makefile.in Makefile input for configure. Makefile.in Makefile input for configure.
Makefile.am Source file for use with Automake to generate Makefile.in. Makefile.am Source file for use with Automake to generate Makefile.in.
...@@ -208,6 +206,8 @@ mak*.* Sample makefiles for particular systems. ...@@ -208,6 +206,8 @@ mak*.* Sample makefiles for particular systems.
jconfig.* Sample jconfig.h for particular systems. jconfig.* Sample jconfig.h for particular systems.
libjpeg.map Script to generate shared library with versioned symbols. libjpeg.map Script to generate shared library with versioned symbols.
aclocal.m4 M4 macro definitions for use with Autoconf. aclocal.m4 M4 macro definitions for use with Autoconf.
ansi2knr.c De-ANSIfier for pre-ANSI C compilers (courtesy of
L. Peter Deutsch and Aladdin Enterprises).
Test files (see install.txt for test procedure): Test files (see install.txt for test procedure):
......
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC scriptversion=2011-01-19.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
...@@ -35,7 +35,7 @@ scriptversion=2011-11-20.07; # UTC ...@@ -35,7 +35,7 @@ scriptversion=2011-11-20.07; # UTC
# FSF changes to this file are in the public domain. # FSF changes to this file are in the public domain.
# #
# Calling this script install-sh is preferred over install.sh, to prevent # Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it # `make' implicit rules from creating a file called install from it
# when there is no Makefile. # when there is no Makefile.
# #
# This script is compatible with the BSD install script, but was written # This script is compatible with the BSD install script, but was written
...@@ -156,7 +156,7 @@ while test $# -ne 0; do ...@@ -156,7 +156,7 @@ while test $# -ne 0; do
-s) stripcmd=$stripprog;; -s) stripcmd=$stripprog;;
-t) dst_arg=$2 -t) dst_arg=$2
# Protect names problematic for 'test' and other utilities. # Protect names problematic for `test' and other utilities.
case $dst_arg in case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;; -* | [=\(\)!]) dst_arg=./$dst_arg;;
esac esac
...@@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then ...@@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi fi
shift # arg shift # arg
dst_arg=$arg dst_arg=$arg
# Protect names problematic for 'test' and other utilities. # Protect names problematic for `test' and other utilities.
case $dst_arg in case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;; -* | [=\(\)!]) dst_arg=./$dst_arg;;
esac esac
...@@ -202,7 +202,7 @@ if test $# -eq 0; then ...@@ -202,7 +202,7 @@ if test $# -eq 0; then
echo "$0: no input file specified." >&2 echo "$0: no input file specified." >&2
exit 1 exit 1
fi fi
# It's OK to call 'install-sh -d' without argument. # It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories. # This can happen when creating conditional directories.
exit 0 exit 0
fi fi
...@@ -240,7 +240,7 @@ fi ...@@ -240,7 +240,7 @@ fi
for src for src
do do
# Protect names problematic for 'test' and other utilities. # Protect names problematic for `test' and other utilities.
case $src in case $src in
-* | [=\(\)!]) src=./$src;; -* | [=\(\)!]) src=./$src;;
esac esac
...@@ -354,7 +354,7 @@ do ...@@ -354,7 +354,7 @@ do
if test -z "$dir_arg" || { if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m. # Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't. # other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"` ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in case $ls_ld_tmpdir in
......
INSTALLATION INSTRUCTIONS for the Independent JPEG Group's JPEG software INSTALLATION INSTRUCTIONS for the Independent JPEG Group's JPEG software
Copyright (C) 1991-2013, Thomas G. Lane, Guido Vollbeding. Copyright (C) 1991-2011, Thomas G. Lane, Guido Vollbeding.
This file is part of the Independent JPEG Group's software. This file is part of the Independent JPEG Group's software.
For conditions of distribution and use, see the accompanying README file. For conditions of distribution and use, see the accompanying README file.
...@@ -418,58 +418,54 @@ support as follows: ...@@ -418,58 +418,54 @@ support as follows:
the directory containing the URT "librle.a" file (typically the the directory containing the URT "librle.a" file (typically the
"lib" subdirectory of the URT distribution). "lib" subdirectory of the URT distribution).
Support for 9-bit to 12-bit deep pixel data: Support for 12-bit-deep pixel data:
The IJG code currently allows 8, 9, 10, 11, or 12 bits sample data precision. The JPEG standard allows either 8-bit or 12-bit data precision. (For color,
(For color, this means 8 to 12 bits per channel, of course.) If you need to this means 8 or 12 bits per channel, of course.) If you need to work with
work with deeper than 8-bit data, you can compile the IJG code for 9-bit to deeper than 8-bit data, you can compile the IJG code for 12-bit operation.
12-bit operation.
To do so: To do so:
1. In jmorecfg.h, define BITS_IN_JSAMPLE as 9, 10, 11, or 12 rather than 8. 1. In jmorecfg.h, define BITS_IN_JSAMPLE as 12 rather than 8.
2. In jconfig.h, undefine BMP_SUPPORTED, RLE_SUPPORTED, and TARGA_SUPPORTED, 2. In jconfig.h, undefine BMP_SUPPORTED, RLE_SUPPORTED, and TARGA_SUPPORTED,
because the code for those formats doesn't handle deeper than 8-bit data because the code for those formats doesn't handle 12-bit data and won't
and won't even compile. (The PPM code does work, as explained below. even compile. (The PPM code does work, as explained below. The GIF
The GIF code works too; it scales 8-bit GIF data to and from 12-bit code works too; it scales 8-bit GIF data to and from 12-bit depth
depth automatically.) automatically.)
3. Compile. Don't expect "make test" to pass, since the supplied test 3. Compile. Don't expect "make test" to pass, since the supplied test
files are for 8-bit data. files are for 8-bit data.
Currently, 9-bit to 12-bit support does not work on 16-bit-int machines. Currently, 12-bit support does not work on 16-bit-int machines.
Run-time selection and conversion of data precision are currently not Note that a 12-bit version will not read 8-bit JPEG files, nor vice versa;
supported and may be added later. so you'll want to keep around a regular 8-bit compilation as well.
Exception: The transcoding part (jpegtran) supports all settings in a (Run-time selection of data depth, to allow a single copy that does both,
single instance, since it operates on the level of DCT coefficients and is possible but would probably slow things down considerably; it's very low
not sample values. on our to-do list.)
The PPM reader (rdppm.c) can read deeper than 8-bit data from either The PPM reader (rdppm.c) can read 12-bit data from either text-format or
text-format or binary-format PPM and PGM files. Binary-format PPM/PGM files binary-format PPM and PGM files. Binary-format PPM/PGM files which have a
which have a maxval greater than 255 are assumed to use 2 bytes per sample, maxval greater than 255 are assumed to use 2 bytes per sample, MSB first
MSB first (big-endian order). As of early 1995, 2-byte binary format is not (big-endian order). As of early 1995, 2-byte binary format is not
officially supported by the PBMPLUS library, but it is expected that a officially supported by the PBMPLUS library, but it is expected that a
future release of PBMPLUS will support it. Note that the PPM reader will future release of PBMPLUS will support it. Note that the PPM reader will
read files of any maxval regardless of the BITS_IN_JSAMPLE setting; incoming read files of any maxval regardless of the BITS_IN_JSAMPLE setting; incoming
data is automatically rescaled to maxval=MAXJSAMPLE as appropriate for the data is automatically rescaled to either maxval=255 or maxval=4095 as
cjpeg bit depth. appropriate for the cjpeg bit depth.
The PPM writer (wrppm.c) will normally write 2-byte binary PPM or PGM The PPM writer (wrppm.c) will normally write 2-byte binary PPM or PGM
format, maxval=MAXJSAMPLE, when compiled with BITS_IN_JSAMPLE>8. Since this format, maxval 4095, when compiled with BITS_IN_JSAMPLE=12. Since this
format is not yet widely supported, you can disable it by compiling wrppm.c format is not yet widely supported, you can disable it by compiling wrppm.c
with PPM_NORAWWORD defined; then the data is scaled down to 8 bits to make a with PPM_NORAWWORD defined; then the data is scaled down to 8 bits to make a
standard 1-byte/sample PPM or PGM file. (Yes, this means still another copy standard 1-byte/sample PPM or PGM file. (Yes, this means still another copy
of djpeg to keep around. But hopefully you won't need it for very long. of djpeg to keep around. But hopefully you won't need it for very long.
Poskanzer's supposed to get that new PBMPLUS release out Real Soon Now.) Poskanzer's supposed to get that new PBMPLUS release out Real Soon Now.)
Of course, if you are working with 9-bit to 12-bit data, you probably have Of course, if you are working with 12-bit data, you probably have it stored
it stored in some other, nonstandard format. In that case you'll probably in some other, nonstandard format. In that case you'll probably want to
want to write your own I/O modules to read and write your format. write your own I/O modules to read and write your format.
Note: Note that a 12-bit version of cjpeg always runs in "-optimize" mode, in
The standard Huffman tables are only valid for 8-bit data precision. If order to generate valid Huffman tables. This is necessary because our
you selected more than 8-bit data precision, cjpeg uses arithmetic coding default Huffman tables only cover 8-bit data.
by default. The Huffman encoder normally uses entropy optimization to
compute usable tables for higher precision. Otherwise, you'll have to
supply different default Huffman tables.
Removing code: Removing code:
...@@ -852,23 +848,17 @@ with /Oo-. ...@@ -852,23 +848,17 @@ with /Oo-.
Microsoft Windows (all versions), generic comments: Microsoft Windows (all versions), generic comments:
Some Windows system include files define typedef boolean as "unsigned char". Some Windows system include files define typedef boolean as "unsigned char".
The IJG code also defines typedef boolean, but we make it an "enum" by default. The IJG code also defines typedef boolean, but we make it "int" by default.
This doesn't affect the IJG programs because we don't import those Windows This doesn't affect the IJG programs because we don't import those Windows
include files. But if you use the JPEG library in your own program, and some include files. But if you use the JPEG library in your own program, and some
of your program's files import one definition of boolean while some import the of your program's files import one definition of boolean while some import the
other, you can get all sorts of mysterious problems. A good preventive step other, you can get all sorts of mysterious problems. A good preventive step
is to make the IJG library use "unsigned char" for boolean. To do that, is to make the IJG library use "unsigned char" for boolean. To do that,
add something like this to your jconfig.h file: add something like this to your jconfig.h file:
/* Define "boolean" as unsigned char, not enum, per Windows custom */ /* Define "boolean" as unsigned char, not int, per Windows custom */
#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
typedef unsigned char boolean; typedef unsigned char boolean;
#endif #endif
#ifndef FALSE /* in case these macros already exist */
#define FALSE 0 /* values of boolean */
#endif
#ifndef TRUE
#define TRUE 1
#endif
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
(This is already in jconfig.vc, by the way.) (This is already in jconfig.vc, by the way.)
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* jcapistd.c * jcapistd.c
* *
* Copyright (C) 1994-1996, Thomas G. Lane. * Copyright (C) 1994-1996, Thomas G. Lane.
* Modified 2013 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software. * This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file. * For conditions of distribution and use, see the accompanying README file.
* *
...@@ -146,7 +145,7 @@ jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data, ...@@ -146,7 +145,7 @@ jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data,
(*cinfo->master->pass_startup) (cinfo); (*cinfo->master->pass_startup) (cinfo);
/* Verify that at least one iMCU row has been passed. */ /* Verify that at least one iMCU row has been passed. */
lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_v_scaled_size; lines_per_iMCU_row = cinfo->max_v_samp_factor * DCTSIZE;
if (num_lines < lines_per_iMCU_row) if (num_lines < lines_per_iMCU_row)
ERREXIT(cinfo, JERR_BUFFER_SIZE); ERREXIT(cinfo, JERR_BUFFER_SIZE);
......
/* /*
* jcarith.c * jcarith.c
* *
* Developed 1997-2013 by Guido Vollbeding. * Developed 1997-2011 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software. * This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file. * For conditions of distribution and use, see the accompanying README file.
* *
...@@ -362,6 +362,7 @@ METHODDEF(boolean) ...@@ -362,6 +362,7 @@ METHODDEF(boolean)
encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
{ {
arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
JBLOCKROW block;
unsigned char *st; unsigned char *st;
int blkn, ci, tbl; int blkn, ci, tbl;
int v, v2, m; int v, v2, m;
...@@ -380,13 +381,14 @@ encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) ...@@ -380,13 +381,14 @@ encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
/* Encode the MCU data blocks */ /* Encode the MCU data blocks */
for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
block = MCU_data[blkn];
ci = cinfo->MCU_membership[blkn]; ci = cinfo->MCU_membership[blkn];
tbl = cinfo->cur_comp_info[ci]->dc_tbl_no; tbl = cinfo->cur_comp_info[ci]->dc_tbl_no;
/* Compute the DC value after the required point transform by Al. /* Compute the DC value after the required point transform by Al.
* This is simply an arithmetic right shift. * This is simply an arithmetic right shift.
*/ */
m = IRIGHT_SHIFT((int) (MCU_data[blkn][0][0]), cinfo->Al); m = IRIGHT_SHIFT((int) ((*block)[0]), cinfo->Al);
/* Sections F.1.4.1 & F.1.4.4.1: Encoding of DC coefficients */ /* Sections F.1.4.1 & F.1.4.4.1: Encoding of DC coefficients */
...@@ -451,11 +453,11 @@ METHODDEF(boolean) ...@@ -451,11 +453,11 @@ METHODDEF(boolean)
encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
{ {
arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
const int * natural_order;
JBLOCKROW block; JBLOCKROW block;
unsigned char *st; unsigned char *st;
int tbl, k, ke; int tbl, k, ke;
int v, v2, m; int v, v2, m;
const int * natural_order;
/* Emit restart marker if needed */ /* Emit restart marker if needed */
if (cinfo->restart_interval) { if (cinfo->restart_interval) {
...@@ -477,8 +479,7 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) ...@@ -477,8 +479,7 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
/* Sections F.1.4.2 & F.1.4.4.2: Encoding of AC coefficients */ /* Sections F.1.4.2 & F.1.4.4.2: Encoding of AC coefficients */
/* Establish EOB (end-of-block) index */ /* Establish EOB (end-of-block) index */
ke = cinfo->Se; for (ke = cinfo->Se; ke > 0; ke--)
do {
/* We must apply the point transform by Al. For AC coefficients this /* We must apply the point transform by Al. For AC coefficients this
* is an integer division with rounding towards 0. To do this portably * is an integer division with rounding towards 0. To do this portably
* in C, we shift after obtaining the absolute value. * in C, we shift after obtaining the absolute value.
...@@ -489,14 +490,13 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) ...@@ -489,14 +490,13 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
v = -v; v = -v;
if (v >>= cinfo->Al) break; if (v >>= cinfo->Al) break;
} }
} while (--ke);
/* Figure F.5: Encode_AC_Coefficients */ /* Figure F.5: Encode_AC_Coefficients */
for (k = cinfo->Ss - 1; k < ke;) { for (k = cinfo->Ss; k <= ke; k++) {
st = entropy->ac_stats[tbl] + 3 * k; st = entropy->ac_stats[tbl] + 3 * (k - 1);
arith_encode(cinfo, st, 0); /* EOB decision */ arith_encode(cinfo, st, 0); /* EOB decision */
for (;;) { for (;;) {
if ((v = (*block)[natural_order[++k]]) >= 0) { if ((v = (*block)[natural_order[k]]) >= 0) {
if (v >>= cinfo->Al) { if (v >>= cinfo->Al) {
arith_encode(cinfo, st + 1, 1); arith_encode(cinfo, st + 1, 1);
arith_encode(cinfo, entropy->fixed_bin, 0); arith_encode(cinfo, entropy->fixed_bin, 0);
...@@ -510,8 +510,7 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) ...@@ -510,8 +510,7 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
break; break;
} }
} }
arith_encode(cinfo, st + 1, 0); arith_encode(cinfo, st + 1, 0); st += 3; k++;
st += 3;
} }
st += 2; st += 2;
/* Figure F.8: Encoding the magnitude category of v */ /* Figure F.8: Encoding the magnitude category of v */
...@@ -538,9 +537,9 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) ...@@ -538,9 +537,9 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
while (m >>= 1) while (m >>= 1)
arith_encode(cinfo, st, (m & v) ? 1 : 0); arith_encode(cinfo, st, (m & v) ? 1 : 0);
} }
/* Encode EOB decision only if k < cinfo->Se */ /* Encode EOB decision only if k <= cinfo->Se */
if (k < cinfo->Se) { if (k <= cinfo->Se) {
st = entropy->ac_stats[tbl] + 3 * k; st = entropy->ac_stats[tbl] + 3 * (k - 1);
arith_encode(cinfo, st, 1); arith_encode(cinfo, st, 1);
} }
...@@ -550,8 +549,6 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) ...@@ -550,8 +549,6 @@ encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
/* /*
* MCU encoding for DC successive approximation refinement scan. * MCU encoding for DC successive approximation refinement scan.
* Note: we assume such scans can be multi-component,
* although the spec is not very clear on the point.
*/ */
METHODDEF(boolean) METHODDEF(boolean)
...@@ -593,11 +590,11 @@ METHODDEF(boolean) ...@@ -593,11 +590,11 @@ METHODDEF(boolean)
encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
{ {
arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
const int * natural_order;
JBLOCKROW block; JBLOCKROW block;
unsigned char *st; unsigned char *st;
int tbl, k, ke, kex; int tbl, k, ke, kex;
int v; int v;
const int * natural_order;
/* Emit restart marker if needed */ /* Emit restart marker if needed */
if (cinfo->restart_interval) { if (cinfo->restart_interval) {
...@@ -619,8 +616,7 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) ...@@ -619,8 +616,7 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
/* Section G.1.3.3: Encoding of AC coefficients */ /* Section G.1.3.3: Encoding of AC coefficients */
/* Establish EOB (end-of-block) index */ /* Establish EOB (end-of-block) index */
ke = cinfo->Se; for (ke = cinfo->Se; ke > 0; ke--)
do {
/* We must apply the point transform by Al. For AC coefficients this /* We must apply the point transform by Al. For AC coefficients this
* is an integer division with rounding towards 0. To do this portably * is an integer division with rounding towards 0. To do this portably
* in C, we shift after obtaining the absolute value. * in C, we shift after obtaining the absolute value.
...@@ -631,7 +627,6 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) ...@@ -631,7 +627,6 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
v = -v; v = -v;
if (v >>= cinfo->Al) break; if (v >>= cinfo->Al) break;
} }
} while (--ke);
/* Establish EOBx (previous stage end-of-block) index */ /* Establish EOBx (previous stage end-of-block) index */
for (kex = ke; kex > 0; kex--) for (kex = ke; kex > 0; kex--)
...@@ -643,12 +638,12 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) ...@@ -643,12 +638,12 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
} }
/* Figure G.10: Encode_AC_Coefficients_SA */ /* Figure G.10: Encode_AC_Coefficients_SA */
for (k = cinfo->Ss - 1; k < ke;) { for (k = cinfo->Ss; k <= ke; k++) {
st = entropy->ac_stats[tbl] + 3 * k; st = entropy->ac_stats[tbl] + 3 * (k - 1);
if (k >= kex) if (k > kex)
arith_encode(cinfo, st, 0); /* EOB decision */ arith_encode(cinfo, st, 0); /* EOB decision */
for (;;) { for (;;) {
if ((v = (*block)[natural_order[++k]]) >= 0) { if ((v = (*block)[natural_order[k]]) >= 0) {
if (v >>= cinfo->Al) { if (v >>= cinfo->Al) {
if (v >> 1) /* previously nonzero coef */ if (v >> 1) /* previously nonzero coef */
arith_encode(cinfo, st + 2, (v & 1)); arith_encode(cinfo, st + 2, (v & 1));
...@@ -670,13 +665,12 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) ...@@ -670,13 +665,12 @@ encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
break; break;
} }
} }
arith_encode(cinfo, st + 1, 0); arith_encode(cinfo, st + 1, 0); st += 3; k++;
st += 3;
} }
} }
/* Encode EOB decision only if k < cinfo->Se */ /* Encode EOB decision only if k <= cinfo->Se */
if (k < cinfo->Se) { if (k <= cinfo->Se) {
st = entropy->ac_stats[tbl] + 3 * k; st = entropy->ac_stats[tbl] + 3 * (k - 1);
arith_encode(cinfo, st, 1); arith_encode(cinfo, st, 1);
} }
...@@ -692,13 +686,12 @@ METHODDEF(boolean) ...@@ -692,13 +686,12 @@ METHODDEF(boolean)
encode_mcu (j_compress_ptr cinfo, JBLOCKROW *MCU_data) encode_mcu (j_compress_ptr cinfo, JBLOCKROW *MCU_data)
{ {
arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
const int * natural_order; jpeg_component_info * compptr;
JBLOCKROW block; JBLOCKROW block;
unsigned char *st; unsigned char *st;
int tbl, k, ke; int blkn, ci, tbl, k, ke;
int v, v2, m; int v, v2, m;
int blkn, ci; const int * natural_order;
jpeg_component_info * compptr;
/* Emit restart marker if needed */ /* Emit restart marker if needed */
if (cinfo->restart_interval) { if (cinfo->restart_interval) {
...@@ -929,7 +922,7 @@ jinit_arith_encoder (j_compress_ptr cinfo) ...@@ -929,7 +922,7 @@ jinit_arith_encoder (j_compress_ptr cinfo)
entropy = (arith_entropy_ptr) entropy = (arith_entropy_ptr)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
SIZEOF(arith_entropy_encoder)); SIZEOF(arith_entropy_encoder));
cinfo->entropy = &entropy->pub; cinfo->entropy = (struct jpeg_entropy_encoder *) entropy;
entropy->pub.start_pass = start_pass; entropy->pub.start_pass = start_pass;
entropy->pub.finish_pass = finish_pass; entropy->pub.finish_pass = finish_pass;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* jcinit.c * jcinit.c
* *
* Copyright (C) 1991-1997, Thomas G. Lane. * Copyright (C) 1991-1997, Thomas G. Lane.
* Modified 2003-2013 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software. * This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file. * For conditions of distribution and use, see the accompanying README file.
* *
...@@ -30,24 +29,6 @@ ...@@ -30,24 +29,6 @@
GLOBAL(void) GLOBAL(void)
jinit_compress_master (j_compress_ptr cinfo) jinit_compress_master (j_compress_ptr cinfo)
{ {
long samplesperrow;
JDIMENSION jd_samplesperrow;
/* For now, precision must match compiled-in value... */
if (cinfo->data_precision != BITS_IN_JSAMPLE)
ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision);
/* Sanity check on image dimensions */
if (cinfo->image_height <= 0 || cinfo->image_width <= 0 ||
cinfo->input_components <= 0)
ERREXIT(cinfo, JERR_EMPTY_IMAGE);
/* Width of an input scanline must be representable as JDIMENSION. */
samplesperrow = (long) cinfo->image_width * (long) cinfo->input_components;
jd_samplesperrow = (JDIMENSION) samplesperrow;
if ((long) jd_samplesperrow != samplesperrow)
ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
/* Initialize master control (includes parameter checking/processing) */ /* Initialize master control (includes parameter checking/processing) */
jinit_c_master_control(cinfo, FALSE /* full compression */); jinit_c_master_control(cinfo, FALSE /* full compression */);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -17,17 +17,11 @@ ...@@ -17,17 +17,11 @@
/* Define this if you get warnings about undefined structures. */ /* Define this if you get warnings about undefined structures. */
#undef INCOMPLETE_TYPES_BROKEN #undef INCOMPLETE_TYPES_BROKEN
/* Define "boolean" as unsigned char, not enum, on Windows systems. */ /* Define "boolean" as unsigned char, not int, on Windows systems. */
#ifdef _WIN32 #ifdef _WIN32
#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
typedef unsigned char boolean; typedef unsigned char boolean;
#endif #endif
#ifndef FALSE /* in case these macros already exist */
#define FALSE 0 /* values of boolean */
#endif
#ifndef TRUE
#define TRUE 1
#endif
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
#endif #endif
......
...@@ -15,6 +15,13 @@ ...@@ -15,6 +15,13 @@
#undef NEED_SHORT_EXTERNAL_NAMES #undef NEED_SHORT_EXTERNAL_NAMES
#undef INCOMPLETE_TYPES_BROKEN #undef INCOMPLETE_TYPES_BROKEN
/* Define "boolean" as unsigned char, not int, per Windows custom */
#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
typedef unsigned char boolean;
#endif
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
#ifdef JPEG_INTERNALS #ifdef JPEG_INTERNALS
#undef RIGHT_SHIFT_IS_UNSIGNED #undef RIGHT_SHIFT_IS_UNSIGNED
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
* jconfig.txt * jconfig.txt
* *
* Copyright (C) 1991-1994, Thomas G. Lane. * Copyright (C) 1991-1994, Thomas G. Lane.
* Modified 2009-2013 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software. * This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file. * For conditions of distribution and use, see the accompanying README file.
* *
...@@ -92,18 +91,12 @@ ...@@ -92,18 +91,12 @@
*/ */
#undef INCOMPLETE_TYPES_BROKEN #undef INCOMPLETE_TYPES_BROKEN
/* Define "boolean" as unsigned char, not enum, on Windows systems. /* Define "boolean" as unsigned char, not int, on Windows systems.
*/ */
#ifdef _WIN32 #ifdef _WIN32
#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
typedef unsigned char boolean; typedef unsigned char boolean;
#endif #endif
#ifndef FALSE /* in case these macros already exist */
#define FALSE 0 /* values of boolean */
#endif
#ifndef TRUE
#define TRUE 1
#endif
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
#endif #endif
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
LIBJPEG_9.0 { LIBJPEG_8.0 {
global: global:
*; *;
}; };
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment