Imported from libpng-1.0.9beta8.tar
This commit is contained in:
parent
76e5fd642e
commit
231e687411
4
ANNOUNCE
4
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.0.9beta7 - December 28, 2000
|
||||
Libpng 1.0.9beta8 - January 12, 2001
|
||||
|
||||
This is a public release of libpng, intended for use in production codes.
|
||||
|
||||
@ -45,6 +45,8 @@ Changes since the last public release (1.0.8):
|
||||
Revised memory management in png_set_hIST and png_handle_hIST in a backward
|
||||
compatible manner. PLTE and tRNS were revised similarly.
|
||||
Revised the iCCP chunk reader to ignore trailing garbage.
|
||||
Moved pngasmrd.h into pngconf.h.
|
||||
Improved handling of out-of-spec garbage iCCP chunks generated by PhotoShop.
|
||||
|
||||
Send comments/corrections/commendations to
|
||||
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
|
||||
|
3
CHANGES
3
CHANGES
@ -871,6 +871,9 @@ version 1.0.9beta7 [December 28, 2000]
|
||||
Revised memory management in png_set_hIST and png_handle_hIST in a backward
|
||||
compatible manner. PLTE and tRNS were revised similarly.
|
||||
Revised the iCCP chunk reader to ignore trailing garbage.
|
||||
version 1.0.9beta8 [January 12, 2001]
|
||||
Moved pngasmrd.h into pngconf.h.
|
||||
Improved handling of out-of-spec garbage iCCP chunks generated by PhotoShop.
|
||||
|
||||
Send comments/corrections/commendations to
|
||||
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
|
||||
|
12
INSTALL
12
INSTALL
@ -1,5 +1,5 @@
|
||||
|
||||
Installing libpng version 1.0.9beta7 - December 28, 2000
|
||||
Installing libpng version 1.0.9beta8 - January 12, 2001
|
||||
|
||||
Before installing libpng, you must first install zlib. zlib
|
||||
can usually be found wherever you got libpng. zlib can be
|
||||
@ -10,7 +10,7 @@ zlib.h and zconf.h include files that correspond to the
|
||||
version of zlib that's installed.
|
||||
|
||||
You can rename the directories that you downloaded (they
|
||||
might be called "libpng-1.0.9beta7" or "lpng109" and "zlib-1.1.3"
|
||||
might be called "libpng-1.0.9beta8" or "lpng109" and "zlib-1.1.3"
|
||||
or "zlib113") so that you have directories called "zlib" and "libpng".
|
||||
|
||||
Your directory structure should look like this:
|
||||
@ -59,8 +59,8 @@ The files that are presently available in the scripts directory
|
||||
include
|
||||
|
||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.9beta7)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.9beta7,
|
||||
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.9beta8)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.9beta8,
|
||||
uses assembler code tuned for Intel MMX platform)
|
||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||
@ -75,9 +75,9 @@ include
|
||||
libpng.icc => Project file for IBM VisualAge/C++ version 4.0 or later
|
||||
makefile.macosx => MACOS X Makefile
|
||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.9beta7)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.9beta8)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.9beta7)
|
||||
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.9beta8)
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
makefile.mips => MIPS makefile
|
||||
makefile.acorn => Acorn makefile
|
||||
|
2
KNOWNBUG
2
KNOWNBUG
@ -1,4 +1,4 @@
|
||||
|
||||
Known bugs in libpng-1.0.9
|
||||
|
||||
None as of December 28, 2000.
|
||||
None as of January 12, 2001.
|
||||
|
4
LICENSE
4
LICENSE
@ -8,7 +8,7 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
||||
If you modify libpng you may insert additional notices immediately following
|
||||
this sentence.
|
||||
|
||||
libpng versions 1.0.7, July 1, 2000, through 1.0.9beta7, December 28, 2000, are
|
||||
libpng versions 1.0.7, July 1, 2000, through 1.0.9beta8, January 12, 2001, are
|
||||
Copyright (c) 2000 Glenn Randers-Pehrson
|
||||
and are distributed according to the same disclaimer and license as libpng-1.0.6
|
||||
with the following individuals added to the list of Contributing Authors
|
||||
@ -99,4 +99,4 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
randeg@alum.rpi.edu
|
||||
December 28, 2000
|
||||
January 12, 2001
|
||||
|
10
README
10
README
@ -1,4 +1,4 @@
|
||||
README for libpng 1.0.9beta7 - December 28, 2000 (shared library 2.1)
|
||||
README for libpng 1.0.9beta8 - January 12, 2001 (shared library 2.1)
|
||||
See the note about version numbers near the top of png.h
|
||||
|
||||
See INSTALL for instructions on how to install libpng.
|
||||
@ -182,9 +182,9 @@ Files in this distribution:
|
||||
descrip.mms => VMS makefile for MMS or MMK
|
||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||
makefile.linux => Linux/ELF makefile
|
||||
(gcc, creates libpng.so.2.1.0.9beta7)
|
||||
(gcc, creates libpng.so.2.1.0.9beta8)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates
|
||||
libpng.so.2.1.0.9beta7, uses assembler code
|
||||
libpng.so.2.1.0.9beta8, uses assembler code
|
||||
tuned for Intel MMX platform)
|
||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||
@ -199,10 +199,10 @@ Files in this distribution:
|
||||
libpng.icc => Project file, IBM VisualAge/C++ 4.0 or later
|
||||
makefile.macosx => MACOS X Makefile
|
||||
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.9beta7)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.9beta8)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile
|
||||
(gcc, creates libpng.so.2.1.0.9beta7)
|
||||
(gcc, creates libpng.so.2.1.0.9beta8)
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
makefile.mips => MIPS makefile
|
||||
makefile.acorn => Acorn makefile
|
||||
|
4
Y2KINFO
4
Y2KINFO
@ -1,13 +1,13 @@
|
||||
Y2K compliance in libpng:
|
||||
=========================
|
||||
|
||||
December 28, 2000
|
||||
January 12, 2001
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
||||
This is your unofficial assurance that libpng from version 0.71 and
|
||||
upward through 1.0.9beta7 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.9beta8 are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer
|
||||
|
2
configure
vendored
2
configure
vendored
@ -1,5 +1,5 @@
|
||||
echo "
|
||||
There is no \"configure\" script for Libpng-1.0.9beta7. Instead, please
|
||||
There is no \"configure\" script for Libpng-1.0.9beta8. Instead, please
|
||||
copy the appropriate makefile for your system from the \"scripts\"
|
||||
directory. Read the INSTALL file for more details.
|
||||
"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2000 Greg Roelofs. All rights reserved.
|
||||
Copyright (c) 1998-2001 Greg Roelofs. All rights reserved.
|
||||
|
||||
This software is provided "as is," without warranty of any kind,
|
||||
express or implied. In no event shall the author or contributors
|
||||
@ -51,6 +51,7 @@ void readpng2_version_info(void)
|
||||
{
|
||||
fprintf(stderr, " Compiled with libpng %s; using libpng %s.\n",
|
||||
PNG_LIBPNG_VER_STRING, png_libpng_ver);
|
||||
|
||||
fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n",
|
||||
ZLIB_VERSION, zlib_version);
|
||||
}
|
||||
@ -110,7 +111,6 @@ int readpng2_init(mainprog_info *mainprog_ptr)
|
||||
png_set_progressive_read_fn(png_ptr, mainprog_ptr,
|
||||
readpng2_info_callback, readpng2_row_callback, readpng2_end_callback);
|
||||
|
||||
|
||||
/* make sure we save our pointers for use in readpng2_decode_data() */
|
||||
|
||||
mainprog_ptr->png_ptr = png_ptr;
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2000 Greg Roelofs. All rights reserved.
|
||||
Copyright (c) 1998-2001 Greg Roelofs. All rights reserved.
|
||||
|
||||
This software is provided "as is," without warranty of any kind,
|
||||
express or implied. In no event shall the author or contributors
|
||||
@ -66,6 +66,11 @@ typedef struct _mainprog_info {
|
||||
int rowbytes;
|
||||
int channels;
|
||||
int need_bgcolor;
|
||||
#if (defined(__i386__) || defined(_M_IX86))
|
||||
int nommxfilters;
|
||||
int nommxcombine;
|
||||
int nommxinterlace;
|
||||
#endif
|
||||
int done;
|
||||
uch bg_red;
|
||||
uch bg_green;
|
||||
|
@ -11,7 +11,6 @@
|
||||
Meulen for the "diamond" and "radial waves" patterns, respectively.
|
||||
|
||||
to do:
|
||||
- stdout/stderr don't work! need message window (maybe scrollable?)
|
||||
- handle quoted command-line args (especially filenames with spaces)
|
||||
- finish resizable checkerboard-gradient (sizes 4-128?)
|
||||
- use %.1023s to simplify truncation of title-bar string?
|
||||
@ -25,10 +24,12 @@
|
||||
- 1.03: modified to allow abbreviated options
|
||||
- 1.04: removed bogus extra argument from usage fprintf() [Glenn R-P?];
|
||||
fixed command-line parsing bug
|
||||
- 1.10: enabled "message window" (console), thanks to David Geldreich
|
||||
- 1.20: added runtime MMX-enabling/disabling and new -mmx* options
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2000 Greg Roelofs. All rights reserved.
|
||||
Copyright (c) 1998-2001 Greg Roelofs. All rights reserved.
|
||||
|
||||
This software is provided "as is," without warranty of any kind,
|
||||
express or implied. In no event shall the author or contributors
|
||||
@ -55,7 +56,7 @@
|
||||
|
||||
#define PROGNAME "rpng2-win"
|
||||
#define LONGNAME "Progressive PNG Viewer for Windows"
|
||||
#define VERSION "1.04 of 19 March 2000"
|
||||
#define VERSION "1.20 of 4 January 2001"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -64,6 +65,7 @@
|
||||
#include <time.h>
|
||||
#include <math.h> /* only for PvdM background code */
|
||||
#include <windows.h>
|
||||
#include <conio.h> /* only for _getch() */
|
||||
|
||||
/* all for PvdM background code: */
|
||||
#ifndef PI
|
||||
@ -239,6 +241,16 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
|
||||
memset(&rpng2_info, 0, sizeof(mainprog_info));
|
||||
|
||||
|
||||
/* Next reenable console output, which normally goes to the bit bucket
|
||||
* for windowed apps. Closing the console window will terminate the
|
||||
* app. Thanks to David.Geldreich@realviz.com for supplying the magical
|
||||
* incantation. */
|
||||
|
||||
AllocConsole();
|
||||
freopen("CONOUT$", "a", stderr);
|
||||
freopen("CONOUT$", "a", stdout);
|
||||
|
||||
|
||||
/* Set the default value for our display-system exponent, i.e., the
|
||||
* product of the CRT exponent and the exponent corresponding to
|
||||
* the frame-buffer's lookup table (LUT), if any. This is not an
|
||||
@ -354,6 +366,14 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
|
||||
}
|
||||
} else if (!strncmp(*argv, "-timing", 2)) {
|
||||
timing = TRUE;
|
||||
#if (defined(__i386__) || defined(_M_IX86))
|
||||
} else if (!strncmp(*argv, "-nommxfilters", 7)) {
|
||||
rpng2_info.nommxfilters = TRUE;
|
||||
} else if (!strncmp(*argv, "-nommxcombine", 7)) {
|
||||
rpng2_info.nommxcombine = TRUE;
|
||||
} else if (!strncmp(*argv, "-nommxinterlace", 7)) {
|
||||
rpng2_info.nommxinterlace = TRUE;
|
||||
#endif
|
||||
} else {
|
||||
if (**argv != '-') {
|
||||
filename = *argv;
|
||||
@ -401,25 +421,47 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
|
||||
/* usage screen */
|
||||
|
||||
if (error) {
|
||||
fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname);
|
||||
int ch;
|
||||
|
||||
fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname);
|
||||
readpng2_version_info();
|
||||
fprintf(stderr, "\n"
|
||||
"Usage: %s [-gamma exp] [-bgcolor bg | -bgpat pat] [-timing]"
|
||||
" file.png\n\n"
|
||||
"Usage: %s [-gamma exp] [-bgcolor bg | -bgpat pat] [-timing]\n"
|
||||
#if (defined(__i386__) || defined(_M_IX86))
|
||||
" %*s [-nommxfilters] [-nommxcombine] [-nommxinterlace]\n"
|
||||
#endif
|
||||
" %*s file.png\n\n"
|
||||
" exp \ttransfer-function exponent (``gamma'') of the display\n"
|
||||
"\t\t system in floating-point format (e.g., ``%.1f''); equal\n"
|
||||
"\t\t to the product of the lookup-table exponent (varies)\n"
|
||||
"\t\t and the CRT exponent (usually 2.2); must be positive\n"
|
||||
" bg \tdesired background color in 7-character hex RGB format\n"
|
||||
"\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n"
|
||||
"\t\t used with transparent images; overrides -bgpat\n"
|
||||
"\t\t used with transparent images; overrides -bgpat option\n"
|
||||
" pat \tdesired background pattern number (1-%d); used with\n"
|
||||
"\t\t transparent images; overrides -bgcolor\n"
|
||||
"\t\t transparent images; overrides -bgcolor option\n"
|
||||
" -timing\tenables delay for every block read, to simulate modem\n"
|
||||
"\t\t download of image (~36 Kbps)\n"
|
||||
#if (defined(__i386__) || defined(_M_IX86))
|
||||
" -nommx*\tdisable optimized MMX routines for decoding row filters,\n"
|
||||
"\t\t combining rows, and expanding interlacing, respectively\n"
|
||||
#endif
|
||||
"\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n"
|
||||
"\n", PROGNAME, default_display_exponent, num_bgpat);
|
||||
"Press Q or Esc to quit this usage screen.\n"
|
||||
"\n", PROGNAME,
|
||||
#if (defined(__i386__) || defined(_M_IX86))
|
||||
strlen(PROGNAME), " ",
|
||||
#endif
|
||||
strlen(PROGNAME), " ", default_display_exponent, num_bgpat);
|
||||
do
|
||||
ch = _getch();
|
||||
while (ch != 'q' && ch != 'Q' && ch != 0x1B);
|
||||
exit(1);
|
||||
} else {
|
||||
fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname);
|
||||
fprintf(stderr,
|
||||
"\n [console window: closing this window will terminate %s]\n\n",
|
||||
PROGNAME);
|
||||
}
|
||||
|
||||
|
||||
|
@ -25,10 +25,11 @@
|
||||
- 1.10: added support for non-default visuals; fixed X pixel-conversion
|
||||
- 1.11: added -usleep option for demos; fixed command-line parsing bug
|
||||
- 1.12: added -pause option for demos and testing
|
||||
- 1.20: added runtime MMX-enabling/disabling and new -mmx* options
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2000 Greg Roelofs. All rights reserved.
|
||||
Copyright (c) 1998-2001 Greg Roelofs. All rights reserved.
|
||||
|
||||
This software is provided "as is," without warranty of any kind,
|
||||
express or implied. In no event shall the author or contributors
|
||||
@ -55,7 +56,7 @@
|
||||
|
||||
#define PROGNAME "rpng2-x"
|
||||
#define LONGNAME "Progressive PNG Viewer for X"
|
||||
#define VERSION "1.12 of 19 March 2000"
|
||||
#define VERSION "1.20 of 4 January 2001"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -359,6 +360,14 @@ int main(int argc, char **argv)
|
||||
pause_after_pass = TRUE;
|
||||
} else if (!strncmp(*argv, "-timing", 2)) {
|
||||
timing = TRUE;
|
||||
#if (defined(__i386__) || defined(_M_IX86))
|
||||
} else if (!strncmp(*argv, "-nommxfilters", 7)) {
|
||||
rpng2_info.nommxfilters = TRUE;
|
||||
} else if (!strncmp(*argv, "-nommxcombine", 7)) {
|
||||
rpng2_info.nommxcombine = TRUE;
|
||||
} else if (!strncmp(*argv, "-nommxinterlace", 7)) {
|
||||
rpng2_info.nommxinterlace = TRUE;
|
||||
#endif
|
||||
} else {
|
||||
if (**argv != '-') {
|
||||
filename = *argv;
|
||||
@ -414,10 +423,13 @@ int main(int argc, char **argv)
|
||||
/* usage screen */
|
||||
|
||||
if (error) {
|
||||
fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname);
|
||||
fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname);
|
||||
readpng2_version_info();
|
||||
fprintf(stderr, "\n"
|
||||
"Usage: %s [-display xdpy] [-gamma exp] [-bgcolor bg | -bgpat pat]\n"
|
||||
#if (defined(__i386__) || defined(_M_IX86))
|
||||
" %*s [-nommxfilters] [-nommxcombine] [-nommxinterlace]\n"
|
||||
#endif
|
||||
" %*s [-usleep dur | -timing] [-pause] file.png\n\n"
|
||||
" xdpy\tname of the target X display (e.g., ``hostname:0'')\n"
|
||||
" exp \ttransfer-function exponent (``gamma'') of the display\n"
|
||||
@ -429,6 +441,10 @@ int main(int argc, char **argv)
|
||||
"\t\t used with transparent images; overrides -bgpat\n"
|
||||
" pat \tdesired background pattern number (1-%d); used with\n"
|
||||
"\t\t transparent images; overrides -bgcolor\n"
|
||||
#if (defined(__i386__) || defined(_M_IX86))
|
||||
" -nommx*\tdisable optimized MMX routines for decoding row filters,\n"
|
||||
"\t\t combining rows, and expanding interlacing, respectively\n"
|
||||
#endif
|
||||
" dur \tduration in microseconds to wait after displaying each\n"
|
||||
"\t\t row (for demo purposes)\n"
|
||||
" -timing\tenables delay for every block read, to simulate modem\n"
|
||||
@ -436,8 +452,11 @@ int main(int argc, char **argv)
|
||||
" -pause\tpauses after displaying each pass until key pressed\n"
|
||||
"\nPress Q, Esc or mouse button 1 (within image window, after image\n"
|
||||
"is displayed) to quit.\n"
|
||||
"\n", PROGNAME, strlen(PROGNAME), " ", default_display_exponent,
|
||||
num_bgpat);
|
||||
"\n", PROGNAME,
|
||||
#if (defined(__i386__) || defined(_M_IX86))
|
||||
strlen(PROGNAME), " ",
|
||||
#endif
|
||||
strlen(PROGNAME), " ", default_display_exponent, num_bgpat);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
42
libpng.3
42
libpng.3
@ -1,6 +1,6 @@
|
||||
.TH LIBPNG 3 "December 28, 2000"
|
||||
.TH LIBPNG 3 "January 12, 2001"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.9beta7
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.9beta8
|
||||
.SH SYNOPSIS
|
||||
\fI\fB
|
||||
|
||||
@ -100,6 +100,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.9beta7
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBpng_uint_32 png_get_asm_flags (png_structp \fIpng_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBpng_byte png_get_bit_depth (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
@ -334,6 +338,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.9beta7
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBint png_mmx_support \fI(void\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_permit_empty_plte (png_structp \fP\fIpng_ptr\fP\fB, int \fIempty_plte_permitted\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
@ -384,6 +392,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.9beta7
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBpng_set_asm_flags (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIasm_flags\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
|
||||
\fBvoid png_set_background (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, double \fIbackground_gamma\fP\fB);\fP
|
||||
|
||||
\fI\fB
|
||||
@ -747,7 +759,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
|
||||
.SH LIBPNG.TXT
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.0.9beta7 - December 28, 2000
|
||||
libpng version 1.0.9beta8 - January 12, 2001
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<randeg@alum.rpi.edu>
|
||||
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
@ -2989,13 +3001,22 @@ For a more compact example of writing a PNG image, see the file example.c.
|
||||
|
||||
.SH V. Modifying/Customizing libpng:
|
||||
|
||||
There are two issues here. The first is changing how libpng does
|
||||
There are three issues here. The first is changing how libpng does
|
||||
standard things like memory allocation, input/output, and error handling.
|
||||
The second deals with more complicated things like adding new chunks,
|
||||
adding new transformations, and generally changing how libpng works.
|
||||
Both of those are compile-time issues; that is, they are generally
|
||||
determined at the time the code is written, and there is rarely a need
|
||||
to provide the user with a means of changing them. The third is a
|
||||
run-time issue: choosing between and/or tuning one or more alternate
|
||||
versions of computationally intensive routines; specifically, optimized
|
||||
assembly-language (and therefore compiler- and platform-dependent)
|
||||
versions.
|
||||
|
||||
Memory allocation, input/output, and error handling
|
||||
|
||||
All of the memory allocation, input/output, and error handling in libpng
|
||||
goes through callbacks that are user settable. The default routines are
|
||||
goes through callbacks that are user-settable. The default routines are
|
||||
in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change
|
||||
these functions, call the appropriate png_set_*_fn() function.
|
||||
|
||||
@ -3343,6 +3364,7 @@ When PNG_DEBUG = 1, the macros are defined, but only png_debug statements
|
||||
having level = 0 will be printed. There aren't any such statements in
|
||||
this version of libpng, but if you insert some they will be printed.
|
||||
|
||||
|
||||
.SH VI. MNG support
|
||||
|
||||
The MNG specification (available at http://www.libpng.org/pub/mng) allows
|
||||
@ -3419,13 +3441,13 @@ application:
|
||||
|
||||
.SH VIII. Y2K Compliance in libpng
|
||||
|
||||
December 28, 2000
|
||||
January 12, 2001
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
||||
This is your unofficial assurance that libpng from version 0.71 and
|
||||
upward through 1.0.9beta7 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.9beta8 are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||
@ -3566,7 +3588,7 @@ possible without all of you.
|
||||
|
||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
|
||||
Libpng version 1.0.9beta7 - December 28, 2000:
|
||||
Libpng version 1.0.9beta8 - January 12, 2001:
|
||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||
Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
|
||||
|
||||
@ -3583,7 +3605,7 @@ included in the libpng distribution, the latter shall prevail.)
|
||||
If you modify libpng you may insert additional notices immediately following
|
||||
this sentence.
|
||||
|
||||
libpng versions 1.0.7, July 1, 2000, through 1.0.9beta7, December 28, 2000, are
|
||||
libpng versions 1.0.7, July 1, 2000, through 1.0.9beta8, January 12, 2001, are
|
||||
Copyright (c) 2000 Glenn Randers-Pehrson, and are
|
||||
distributed according to the same disclaimer and license as libpng-1.0.6
|
||||
with the following individuals added to the list of Contributing Authors
|
||||
@ -3674,7 +3696,7 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
randeg@alum.rpi.edu
|
||||
December 28, 2000
|
||||
January 12, 2001
|
||||
|
||||
.\" end of man page
|
||||
|
||||
|
20
libpng.txt
20
libpng.txt
@ -1,6 +1,6 @@
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.0.9beta7 - December 28, 2000
|
||||
libpng version 1.0.9beta8 - January 12, 2001
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<randeg@alum.rpi.edu>
|
||||
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
@ -2242,13 +2242,22 @@ For a more compact example of writing a PNG image, see the file example.c.
|
||||
|
||||
V. Modifying/Customizing libpng:
|
||||
|
||||
There are two issues here. The first is changing how libpng does
|
||||
There are three issues here. The first is changing how libpng does
|
||||
standard things like memory allocation, input/output, and error handling.
|
||||
The second deals with more complicated things like adding new chunks,
|
||||
adding new transformations, and generally changing how libpng works.
|
||||
Both of those are compile-time issues; that is, they are generally
|
||||
determined at the time the code is written, and there is rarely a need
|
||||
to provide the user with a means of changing them. The third is a
|
||||
run-time issue: choosing between and/or tuning one or more alternate
|
||||
versions of computationally intensive routines; specifically, optimized
|
||||
assembly-language (and therefore compiler- and platform-dependent)
|
||||
versions.
|
||||
|
||||
Memory allocation, input/output, and error handling
|
||||
|
||||
All of the memory allocation, input/output, and error handling in libpng
|
||||
goes through callbacks that are user settable. The default routines are
|
||||
goes through callbacks that are user-settable. The default routines are
|
||||
in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change
|
||||
these functions, call the appropriate png_set_*_fn() function.
|
||||
|
||||
@ -2596,6 +2605,7 @@ When PNG_DEBUG = 1, the macros are defined, but only png_debug statements
|
||||
having level = 0 will be printed. There aren't any such statements in
|
||||
this version of libpng, but if you insert some they will be printed.
|
||||
|
||||
|
||||
VI. MNG support
|
||||
|
||||
The MNG specification (available at http://www.libpng.org/pub/mng) allows
|
||||
@ -2672,13 +2682,13 @@ application:
|
||||
|
||||
VIII. Y2K Compliance in libpng
|
||||
|
||||
December 28, 2000
|
||||
January 12, 2001
|
||||
|
||||
Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
||||
This is your unofficial assurance that libpng from version 0.71 and
|
||||
upward through 1.0.9beta7 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.9beta8 are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||
|
@ -1,6 +1,6 @@
|
||||
.TH LIBPNGPF 3 "December 28, 2000"
|
||||
.TH LIBPNGPF 3 "January 12, 2001"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.9beta7
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.9beta8
|
||||
(private functions)
|
||||
.SH SYNOPSIS
|
||||
\fB#include <png.h>\fP
|
||||
|
2
png.5
2
png.5
@ -1,4 +1,4 @@
|
||||
.TH PNG 5 "December 28, 2000"
|
||||
.TH PNG 5 "January 12, 2001"
|
||||
.SH NAME
|
||||
png \- Portable Network Graphics (PNG) format
|
||||
.SH DESCRIPTION
|
||||
|
26
png.c
26
png.c
@ -1,8 +1,8 @@
|
||||
|
||||
/* png.c - location for general purpose libpng functions
|
||||
*
|
||||
* libpng version 1.0.9beta7 - December 28, 2000
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* libpng version 1.0.9beta8 - January 12, 2001
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -13,14 +13,14 @@
|
||||
#include "png.h"
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef version_1_0_9beta7 Your_png_h_is_not_version_1_0_9beta7;
|
||||
typedef version_1_0_9beta8 Your_png_h_is_not_version_1_0_9beta8;
|
||||
|
||||
/* Version information for C files. This had better match the version
|
||||
* string defined in png.h. */
|
||||
|
||||
#ifdef PNG_USE_GLOBAL_ARRAYS
|
||||
/* png_libpng_ver was changed to a function in version 1.0.5c */
|
||||
const char png_libpng_ver[18] = "1.0.9beta7";
|
||||
const char png_libpng_ver[18] = "1.0.9beta8";
|
||||
|
||||
/* png_sig was changed to a function in version 1.0.5c */
|
||||
/* Place to hold the signature string for a PNG file. */
|
||||
@ -626,8 +626,8 @@ png_charp PNGAPI
|
||||
png_get_copyright(png_structp png_ptr)
|
||||
{
|
||||
if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */
|
||||
return ((png_charp) "\n libpng version 1.0.9beta7 - December 28, 2000\n\
|
||||
Copyright (c) 1998-2000 Glenn Randers-Pehrson\n\
|
||||
return ((png_charp) "\n libpng version 1.0.9beta8 - January 12, 2001\n\
|
||||
Copyright (c) 1998-2001 Glenn Randers-Pehrson\n\
|
||||
Copyright (c) 1996, 1997 Andreas Dilger\n\
|
||||
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n");
|
||||
return ((png_charp) "");
|
||||
@ -644,8 +644,8 @@ png_get_libpng_ver(png_structp png_ptr)
|
||||
{
|
||||
/* Version of *.c files used when building libpng */
|
||||
if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */
|
||||
return((png_charp) "1.0.9beta7");
|
||||
return((png_charp) "1.0.9beta7");
|
||||
return((png_charp) "1.0.9beta8");
|
||||
return((png_charp) "1.0.9beta8");
|
||||
}
|
||||
|
||||
png_charp PNGAPI
|
||||
@ -697,3 +697,13 @@ png_access_version_number(void)
|
||||
/* Version of *.c files used when building libpng */
|
||||
return((png_uint_32) 10009L);
|
||||
}
|
||||
|
||||
|
||||
/* this function was added to libpng 1.0.9 (porting aid to libpng-1.2.0) */
|
||||
#ifndef PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
int PNGAPI
|
||||
png_mmx_support(void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
48
png.h
48
png.h
@ -1,15 +1,15 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.0.9beta7 - December 28, 2000
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* libpng version 1.0.9beta8 - January 12, 2001
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
* Authors and maintainers:
|
||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
||||
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||
* libpng versions 0.97, January 1998, through 1.0.9beta7 - December 28, 2000: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.0.9beta8 - January 12, 2001: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@ -60,7 +60,7 @@
|
||||
* 1.0.8 10008 2.1.0.8
|
||||
* 1.0.9beta1-6 10009 2.1.0.9beta1-6
|
||||
* 1.0.9rc1 10009 2.1.0.9rc1
|
||||
* 1.0.9beta7 10009 2.1.0.9beta7
|
||||
* 1.0.9beta7-8 10009 2.1.0.9beta7-8
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major
|
||||
* and minor numbers; the shared-library major version number will be
|
||||
@ -87,8 +87,8 @@
|
||||
* If you modify libpng you may insert additional notices immediately following
|
||||
* this sentence.
|
||||
*
|
||||
* libpng versions 1.0.7, July 1, 2000, through 1.0.9beta7, December 28, 2000, are
|
||||
* Copyright (c) 2000 Glenn Randers-Pehrson, and are
|
||||
* libpng versions 1.0.7, July 1, 2000, through 1.0.9beta8, January 12, 2001, are
|
||||
* Copyright (c) 2000, 2001 Glenn Randers-Pehrson, and are
|
||||
* distributed according to the same disclaimer and license as libpng-1.0.6
|
||||
* with the following individuals added to the list of Contributing Authors
|
||||
*
|
||||
@ -192,13 +192,13 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* December 28, 2000
|
||||
* January 12, 2001
|
||||
*
|
||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||
* an official declaration.
|
||||
*
|
||||
* This is your unofficial assurance that libpng from version 0.71 and
|
||||
* upward through 1.0.9beta7 are Y2K compliant. It is my belief that earlier
|
||||
* upward through 1.0.9beta8 are Y2K compliant. It is my belief that earlier
|
||||
* versions were also Y2K compliant.
|
||||
*
|
||||
* Libpng only has three year fields. One is a 2-byte unsigned integer
|
||||
@ -254,7 +254,7 @@
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.0.9beta7"
|
||||
#define PNG_LIBPNG_VER_STRING "1.0.9beta8"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 2
|
||||
|
||||
@ -265,7 +265,7 @@
|
||||
/* This should match the numeric part of the final component of
|
||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
|
||||
|
||||
#define PNG_LIBPNG_VER_BUILD 7
|
||||
#define PNG_LIBPNG_VER_BUILD 8
|
||||
|
||||
#define PNG_LIBPNG_BUILD_ALPHA 1
|
||||
#define PNG_LIBPNG_BUILD_BETA 2
|
||||
@ -287,14 +287,9 @@
|
||||
/* include the compression library's header */
|
||||
#include "zlib.h"
|
||||
|
||||
/* include all user configurable info */
|
||||
/* include all user configurable info, including optional assembler routines */
|
||||
#include "pngconf.h"
|
||||
|
||||
/* macros for optional assembler routines */
|
||||
#if defined(PNG_INTERNAL) && defined(PNG_ASSEMBLER_CODE_SUPPORTED)
|
||||
# include "pngasmrd.h"
|
||||
#endif
|
||||
|
||||
/* Inhibit C++ name-mangling for libpng functions but not for system calls. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -448,7 +443,7 @@ typedef png_text FAR * FAR * png_textpp;
|
||||
* Two conversions are provided, both from time_t and struct tm. There
|
||||
* is no portable way to convert to either of these structures, as far
|
||||
* as I know. If you know of a portable way, send it to me. As a side
|
||||
* note - PNG is Year 2000 compliant!
|
||||
* note - PNG has always been Year 2000 compliant!
|
||||
*/
|
||||
typedef struct png_time_struct
|
||||
{
|
||||
@ -1175,10 +1170,11 @@ struct png_struct_def
|
||||
|
||||
};
|
||||
|
||||
|
||||
/* This prevents a compiler error in png_get_copyright() in png.c if png.c
|
||||
and png.h are both at * version 1.0.9beta7
|
||||
and png.h are both at * version 1.0.9beta8
|
||||
*/
|
||||
typedef png_structp version_1_0_9beta7;
|
||||
typedef png_structp version_1_0_9beta8;
|
||||
|
||||
typedef png_struct FAR * FAR * png_structpp;
|
||||
|
||||
@ -2218,8 +2214,13 @@ extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
|
||||
png_ptr, png_uint_32 mng_features_permitted));
|
||||
#endif
|
||||
|
||||
/* png.c, pnggccrd.c, or pngvcrd.c */
|
||||
extern PNG_EXPORT(int,png_mmx_support) PNGARG((void));
|
||||
|
||||
/* Maintainer: Put new public prototypes here ^ and in libpng.3 */
|
||||
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.0.9beta7 - December 28, 2000 (header)\n"
|
||||
" libpng version 1.0.9beta8 - January 12, 2001 (header)\n"
|
||||
|
||||
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
||||
/* With these routines we avoid an integer divide, which will be slower on
|
||||
@ -2699,10 +2700,15 @@ PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row,
|
||||
|
||||
#if defined(PNG_READ_INTERLACING_SUPPORTED)
|
||||
/* expand an interlaced row */
|
||||
/* OLD interface:
|
||||
PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info,
|
||||
png_bytep row, int pass, png_uint_32 transformations));
|
||||
*/
|
||||
PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr));
|
||||
#endif
|
||||
|
||||
/* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */
|
||||
|
||||
#if defined(PNG_WRITE_INTERLACING_SUPPORTED)
|
||||
/* grab pixels out of a row for an interlaced pass */
|
||||
PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,
|
||||
@ -3014,6 +3020,8 @@ PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,
|
||||
png_bytep row));
|
||||
#endif
|
||||
|
||||
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
|
||||
|
||||
#endif /* PNG_INTERNAL */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
36
pngasmrd.h
36
pngasmrd.h
@ -1,39 +1,11 @@
|
||||
/* pngasmrd.h - assembler version of utilities to read a PNG file
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 2001 Glenn Randers-Pehrson
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PNGASMRD_H
|
||||
#define PNGASMRD_H
|
||||
|
||||
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
|
||||
/* Set this in the makefile for VC++ on Pentium, not in pngconf.h */
|
||||
/* Platform must be Pentium. Makefile must assemble and load pngvcrd.c .
|
||||
* MMX will be detected at run time and used if present.
|
||||
/* This file is obsolete in libpng-1.0.9 and later; its contents now appear
|
||||
* at the end of pngconf.h.
|
||||
*/
|
||||
#ifdef PNG_USE_PNGVCRD
|
||||
# define PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||
# define PNG_HAVE_ASSEMBLER_READ_INTERLACE
|
||||
# define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
|
||||
#endif
|
||||
|
||||
/* Set this in the makefile for gcc/as on Pentium, not in pngconf.h */
|
||||
/* Platform must be Pentium. Makefile must assemble and load pnggccrd.c .
|
||||
* MMX will be detected at run time and used if present.
|
||||
*/
|
||||
#ifdef PNG_USE_PNGGCCRD
|
||||
# define PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||
# define PNG_HAVE_ASSEMBLER_READ_INTERLACE
|
||||
# define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
|
||||
#endif
|
||||
/*
|
||||
GRR notes:
|
||||
- see pnggccrd.c for info about what is currently enabled
|
||||
*/
|
||||
|
||||
#endif
|
||||
#endif /* PNGASMRD_H */
|
||||
|
522
pngconf.h
522
pngconf.h
@ -1,8 +1,8 @@
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
@ -30,11 +30,11 @@
|
||||
*/
|
||||
|
||||
#ifndef PNG_ZBUF_SIZE
|
||||
#define PNG_ZBUF_SIZE 8192
|
||||
# define PNG_ZBUF_SIZE 8192
|
||||
#endif
|
||||
|
||||
#ifndef PNG_NO_FLOATING_POINT_SUPPORTED
|
||||
#define PNG_FLOATING_POINT_SUPPORTED
|
||||
# define PNG_FLOATING_POINT_SUPPORTED
|
||||
#endif
|
||||
|
||||
/* If you are running on a machine where you cannot allocate more
|
||||
@ -46,7 +46,7 @@
|
||||
#define PNG_MAX_MALLOC_64K
|
||||
*/
|
||||
#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
|
||||
#define PNG_MAX_MALLOC_64K
|
||||
# define PNG_MAX_MALLOC_64K
|
||||
#endif
|
||||
|
||||
/* Special munging to support doing things the 'cygwin' way:
|
||||
@ -117,12 +117,12 @@
|
||||
*/
|
||||
|
||||
#if defined(_WIN32_WCE)
|
||||
#include <windows.h>
|
||||
/* Console I/O functions are not supported on WindowsCE */
|
||||
#define PNG_NO_CONSOLE_IO
|
||||
#ifdef PNG_DEBUG
|
||||
# undef PNG_DEBUG
|
||||
#endif
|
||||
# include <windows.h>
|
||||
/* Console I/O functions are not supported on WindowsCE */
|
||||
# define PNG_NO_CONSOLE_IO
|
||||
# ifdef PNG_DEBUG
|
||||
# undef PNG_DEBUG
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef PNG_BUILD_DLL
|
||||
@ -159,13 +159,13 @@
|
||||
#ifndef PNGARG
|
||||
|
||||
#ifdef OF /* zlib prototype munger */
|
||||
#define PNGARG(arglist) OF(arglist)
|
||||
# define PNGARG(arglist) OF(arglist)
|
||||
#else
|
||||
|
||||
#ifdef _NO_PROTO
|
||||
#define PNGARG(arglist) ()
|
||||
# define PNGARG(arglist) ()
|
||||
#else
|
||||
#define PNGARG(arglist) arglist
|
||||
# define PNGARG(arglist) arglist
|
||||
#endif /* _NO_PROTO */
|
||||
|
||||
#endif /* OF */
|
||||
@ -177,15 +177,15 @@
|
||||
* on non-Mac platforms.
|
||||
*/
|
||||
#ifndef MACOS
|
||||
#if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
|
||||
defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
|
||||
#define MACOS
|
||||
#endif
|
||||
# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
|
||||
defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
|
||||
# define MACOS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* enough people need this for various reasons to include it here */
|
||||
#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)
|
||||
#include <sys/types.h>
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifndef PNG_SETJMP_NOT_SUPPORTED
|
||||
@ -206,10 +206,10 @@
|
||||
__png.h__ already includes setjmp.h;
|
||||
__dont__ include it again.;
|
||||
# endif
|
||||
#endif /* __linux__ */
|
||||
# endif /* __linux__ */
|
||||
|
||||
/* include setjmp.h for error handling */
|
||||
#include <setjmp.h>
|
||||
/* include setjmp.h for error handling */
|
||||
# include <setjmp.h>
|
||||
|
||||
# ifdef __linux__
|
||||
# ifdef PNG_SAVE_BSD_SOURCE
|
||||
@ -222,17 +222,18 @@
|
||||
#if defined(_AIX) && defined(__xlC__)
|
||||
/* This prevents "AIX/xlC" from generating an "index(s,c)" macro in strings.h
|
||||
* that conflicts with libpng's png_color_16.index */
|
||||
#undef __STR__
|
||||
# undef __STR__
|
||||
#endif
|
||||
|
||||
#ifdef BSD
|
||||
#include <strings.h>
|
||||
# include <strings.h>
|
||||
#else
|
||||
#include <string.h>
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
/* Other defines for things like memory and the like can go here. */
|
||||
#ifdef PNG_INTERNAL
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
/* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which
|
||||
@ -249,28 +250,28 @@
|
||||
*/
|
||||
|
||||
#if defined(PNG_FLOATING_POINT_SUPPORTED)
|
||||
#if defined(MACOS)
|
||||
/* We need to check that <math.h> hasn't already been included earlier
|
||||
* as it seems it doesn't agree with <fp.h>, yet we should really use
|
||||
* <fp.h> if possible.
|
||||
*/
|
||||
#if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
|
||||
#include <fp.h>
|
||||
#endif
|
||||
#else
|
||||
#include <math.h>
|
||||
#endif
|
||||
#if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
|
||||
/* Amiga SAS/C: We must include builtin FPU functions when compiling using
|
||||
* MATH=68881
|
||||
*/
|
||||
#include <m68881.h>
|
||||
#endif
|
||||
# if defined(MACOS)
|
||||
/* We need to check that <math.h> hasn't already been included earlier
|
||||
* as it seems it doesn't agree with <fp.h>, yet we should really use
|
||||
* <fp.h> if possible.
|
||||
*/
|
||||
# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
|
||||
# include <fp.h>
|
||||
# endif
|
||||
# else
|
||||
# include <math.h>
|
||||
# endif
|
||||
# if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
|
||||
/* Amiga SAS/C: We must include builtin FPU functions when compiling using
|
||||
* MATH=68881
|
||||
*/
|
||||
# include <m68881.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Codewarrior on NT has linking problems without this. */
|
||||
#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
|
||||
#define PNG_ALWAYS_EXTERN
|
||||
# define PNG_ALWAYS_EXTERN
|
||||
#endif
|
||||
|
||||
/* For some reason, Borland C++ defines memcmp, etc. in mem.h, not
|
||||
@ -278,12 +279,12 @@
|
||||
* "feature"?
|
||||
*/
|
||||
#ifdef __TURBOC__
|
||||
#include <mem.h>
|
||||
#include "alloc.h"
|
||||
# include <mem.h>
|
||||
# include "alloc.h"
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <malloc.h>
|
||||
# include <malloc.h>
|
||||
#endif
|
||||
|
||||
/* This controls how fine the dithering gets. As this allocates
|
||||
@ -291,13 +292,13 @@
|
||||
* with dithering quality can decrease some or all of these.
|
||||
*/
|
||||
#ifndef PNG_DITHER_RED_BITS
|
||||
#define PNG_DITHER_RED_BITS 5
|
||||
# define PNG_DITHER_RED_BITS 5
|
||||
#endif
|
||||
#ifndef PNG_DITHER_GREEN_BITS
|
||||
#define PNG_DITHER_GREEN_BITS 5
|
||||
# define PNG_DITHER_GREEN_BITS 5
|
||||
#endif
|
||||
#ifndef PNG_DITHER_BLUE_BITS
|
||||
#define PNG_DITHER_BLUE_BITS 5
|
||||
# define PNG_DITHER_BLUE_BITS 5
|
||||
#endif
|
||||
|
||||
/* This controls how fine the gamma correction becomes when you
|
||||
@ -308,14 +309,14 @@
|
||||
*/
|
||||
|
||||
#ifndef PNG_MAX_GAMMA_8
|
||||
#define PNG_MAX_GAMMA_8 11
|
||||
# define PNG_MAX_GAMMA_8 11
|
||||
#endif
|
||||
|
||||
/* This controls how much a difference in gamma we can tolerate before
|
||||
* we actually start doing gamma conversion.
|
||||
*/
|
||||
#ifndef PNG_GAMMA_THRESHOLD
|
||||
#define PNG_GAMMA_THRESHOLD 0.05
|
||||
# define PNG_GAMMA_THRESHOLD 0.05
|
||||
#endif
|
||||
|
||||
#endif /* PNG_INTERNAL */
|
||||
@ -380,166 +381,167 @@
|
||||
*/
|
||||
|
||||
#ifdef PNG_LEGACY_SUPPORTED
|
||||
#define PNG_NO_FREE_ME
|
||||
#define PNG_NO_READ_UNKNOWN_CHUNKS
|
||||
#define PNG_NO_WRITE_UNKNOWN_CHUNKS
|
||||
#define PNG_NO_READ_USER_CHUNKS
|
||||
#define PNG_NO_READ_iCCP
|
||||
#define PNG_NO_WRITE_iCCP
|
||||
#define PNG_NO_READ_iTXt
|
||||
#define PNG_NO_WRITE_iTXt
|
||||
#define PNG_NO_READ_sCAL
|
||||
#define PNG_NO_WRITE_sCAL
|
||||
#define PNG_NO_READ_sPLT
|
||||
#define PNG_NO_WRITE_sPLT
|
||||
#define PNG_NO_INFO_IMAGE
|
||||
#define PNG_NO_READ_RGB_TO_GRAY
|
||||
#define PNG_NO_READ_USER_TRANSFORM
|
||||
#define PNG_NO_WRITE_USER_TRANSFORM
|
||||
#define PNG_NO_USER_MEM
|
||||
#define PNG_NO_READ_EMPTY_PLTE
|
||||
#define PNG_NO_MNG_FEATURES
|
||||
#define PNG_NO_FIXED_POINT_SUPPORTED
|
||||
# define PNG_NO_FREE_ME
|
||||
# define PNG_NO_READ_UNKNOWN_CHUNKS
|
||||
# define PNG_NO_WRITE_UNKNOWN_CHUNKS
|
||||
# define PNG_NO_READ_USER_CHUNKS
|
||||
# define PNG_NO_READ_iCCP
|
||||
# define PNG_NO_WRITE_iCCP
|
||||
# define PNG_NO_READ_iTXt
|
||||
# define PNG_NO_WRITE_iTXt
|
||||
# define PNG_NO_READ_sCAL
|
||||
# define PNG_NO_WRITE_sCAL
|
||||
# define PNG_NO_READ_sPLT
|
||||
# define PNG_NO_WRITE_sPLT
|
||||
# define PNG_NO_INFO_IMAGE
|
||||
# define PNG_NO_READ_RGB_TO_GRAY
|
||||
# define PNG_NO_READ_USER_TRANSFORM
|
||||
# define PNG_NO_WRITE_USER_TRANSFORM
|
||||
# define PNG_NO_USER_MEM
|
||||
# define PNG_NO_READ_EMPTY_PLTE
|
||||
# define PNG_NO_MNG_FEATURES
|
||||
# define PNG_NO_FIXED_POINT_SUPPORTED
|
||||
#endif
|
||||
|
||||
/* Ignore attempt to turn off both floating and fixed point support */
|
||||
#if !defined(PNG_FLOATING_POINT_SUPPORTED) || \
|
||||
!defined(PNG_NO_FIXED_POINT_SUPPORTED)
|
||||
#define PNG_FIXED_POINT_SUPPORTED
|
||||
!defined(PNG_NO_FIXED_POINT_SUPPORTED)
|
||||
# define PNG_FIXED_POINT_SUPPORTED
|
||||
#endif
|
||||
|
||||
#ifndef PNG_NO_FREE_ME
|
||||
#define PNG_FREE_ME_SUPPORTED
|
||||
# define PNG_FREE_ME_SUPPORTED
|
||||
#endif
|
||||
|
||||
#if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \
|
||||
!defined(PNG_NO_READ_TRANSFORMS)
|
||||
#define PNG_READ_TRANSFORMS_SUPPORTED
|
||||
# define PNG_READ_TRANSFORMS_SUPPORTED
|
||||
#endif
|
||||
#if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
|
||||
!defined(PNG_NO_WRITE_TRANSFORMS)
|
||||
#define PNG_WRITE_TRANSFORMS_SUPPORTED
|
||||
# define PNG_WRITE_TRANSFORMS_SUPPORTED
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
|
||||
#ifndef PNG_NO_READ_EXPAND
|
||||
#define PNG_READ_EXPAND_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_SHIFT
|
||||
#define PNG_READ_SHIFT_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_PACK
|
||||
#define PNG_READ_PACK_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_BGR
|
||||
#define PNG_READ_BGR_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_SWAP
|
||||
#define PNG_READ_SWAP_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_PACKSWAP
|
||||
#define PNG_READ_PACKSWAP_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_INVERT
|
||||
#define PNG_READ_INVERT_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_DITHER
|
||||
#define PNG_READ_DITHER_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_BACKGROUND
|
||||
#define PNG_READ_BACKGROUND_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_16_TO_8
|
||||
#define PNG_READ_16_TO_8_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_FILLER
|
||||
#define PNG_READ_FILLER_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_GAMMA
|
||||
#define PNG_READ_GAMMA_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_GRAY_TO_RGB
|
||||
#define PNG_READ_GRAY_TO_RGB_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_SWAP_ALPHA
|
||||
#define PNG_READ_SWAP_ALPHA_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_INVERT_ALPHA
|
||||
#define PNG_READ_INVERT_ALPHA_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_STRIP_ALPHA
|
||||
#define PNG_READ_STRIP_ALPHA_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_USER_TRANSFORM
|
||||
#define PNG_READ_USER_TRANSFORM_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_READ_RGB_TO_GRAY
|
||||
#define PNG_READ_RGB_TO_GRAY_SUPPORTED
|
||||
#endif
|
||||
# ifndef PNG_NO_READ_EXPAND
|
||||
# define PNG_READ_EXPAND_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_SHIFT
|
||||
# define PNG_READ_SHIFT_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_PACK
|
||||
# define PNG_READ_PACK_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_BGR
|
||||
# define PNG_READ_BGR_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_SWAP
|
||||
# define PNG_READ_SWAP_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_PACKSWAP
|
||||
# define PNG_READ_PACKSWAP_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_INVERT
|
||||
# define PNG_READ_INVERT_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_DITHER
|
||||
# define PNG_READ_DITHER_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_BACKGROUND
|
||||
# define PNG_READ_BACKGROUND_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_16_TO_8
|
||||
# define PNG_READ_16_TO_8_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_FILLER
|
||||
# define PNG_READ_FILLER_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_GAMMA
|
||||
# define PNG_READ_GAMMA_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_GRAY_TO_RGB
|
||||
# define PNG_READ_GRAY_TO_RGB_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_SWAP_ALPHA
|
||||
# define PNG_READ_SWAP_ALPHA_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_INVERT_ALPHA
|
||||
# define PNG_READ_INVERT_ALPHA_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_STRIP_ALPHA
|
||||
# define PNG_READ_STRIP_ALPHA_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_USER_TRANSFORM
|
||||
# define PNG_READ_USER_TRANSFORM_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_RGB_TO_GRAY
|
||||
# define PNG_READ_RGB_TO_GRAY_SUPPORTED
|
||||
# endif
|
||||
#endif /* PNG_READ_TRANSFORMS_SUPPORTED */
|
||||
|
||||
#if !defined(PNG_NO_PROGRESSIVE_READ) && \
|
||||
!defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */
|
||||
#define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */
|
||||
!defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */
|
||||
# define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */
|
||||
#endif /* about interlacing capability! You'll */
|
||||
/* still have interlacing unless you change the following line: */
|
||||
|
||||
#define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */
|
||||
|
||||
#ifndef PNG_NO_READ_COMPOSITE_NODIV
|
||||
#ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */
|
||||
#define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel and SGI */
|
||||
#endif
|
||||
# ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */
|
||||
# define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Disable if you don't need to support PNGs that are embedded in MNG
|
||||
datastreams */
|
||||
#ifndef PNG_NO_MNG_FEATURES
|
||||
#define PNG_MNG_FEATURES_SUPPORTED
|
||||
# define PNG_MNG_FEATURES_SUPPORTED
|
||||
#endif
|
||||
|
||||
/* Deprecated, will be removed */
|
||||
#ifndef PNG_NO_READ_EMPTY_PLTE
|
||||
#define PNG_READ_EMPTY_PLTE_SUPPORTED
|
||||
# define PNG_READ_EMPTY_PLTE_SUPPORTED
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
|
||||
#ifndef PNG_NO_WRITE_SHIFT
|
||||
#define PNG_WRITE_SHIFT_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_WRITE_PACK
|
||||
#define PNG_WRITE_PACK_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_WRITE_BGR
|
||||
#define PNG_WRITE_BGR_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_WRITE_SWAP
|
||||
#define PNG_WRITE_SWAP_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_WRITE_PACKSWAP
|
||||
#define PNG_WRITE_PACKSWAP_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_WRITE_INVERT
|
||||
#define PNG_WRITE_INVERT_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_WRITE_FILLER
|
||||
#define PNG_WRITE_FILLER_SUPPORTED /* This is the same as WRITE_STRIP_ALPHA */
|
||||
#endif
|
||||
#ifndef PNG_NO_WRITE_SWAP_ALPHA
|
||||
#define PNG_WRITE_SWAP_ALPHA_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_WRITE_INVERT_ALPHA
|
||||
#define PNG_WRITE_INVERT_ALPHA_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_WRITE_USER_TRANSFORM
|
||||
#define PNG_WRITE_USER_TRANSFORM_SUPPORTED
|
||||
#endif
|
||||
# ifndef PNG_NO_WRITE_SHIFT
|
||||
# define PNG_WRITE_SHIFT_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_WRITE_PACK
|
||||
# define PNG_WRITE_PACK_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_WRITE_BGR
|
||||
# define PNG_WRITE_BGR_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_WRITE_SWAP
|
||||
# define PNG_WRITE_SWAP_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_WRITE_PACKSWAP
|
||||
# define PNG_WRITE_PACKSWAP_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_WRITE_INVERT
|
||||
# define PNG_WRITE_INVERT_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_WRITE_FILLER
|
||||
# define PNG_WRITE_FILLER_SUPPORTED /* same as WRITE_STRIP_ALPHA */
|
||||
# endif
|
||||
# ifndef PNG_NO_WRITE_SWAP_ALPHA
|
||||
# define PNG_WRITE_SWAP_ALPHA_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_WRITE_INVERT_ALPHA
|
||||
# define PNG_WRITE_INVERT_ALPHA_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_WRITE_USER_TRANSFORM
|
||||
# define PNG_WRITE_USER_TRANSFORM_SUPPORTED
|
||||
# endif
|
||||
#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
|
||||
|
||||
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
|
||||
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
#ifndef PNG_NO_USER_TRANSFORM_PTR
|
||||
#define PNG_USER_TRANSFORM_PTR_SUPPORTED
|
||||
#endif
|
||||
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
# ifndef PNG_NO_USER_TRANSFORM_PTR
|
||||
# define PNG_USER_TRANSFORM_PTR_SUPPORTED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant
|
||||
@ -548,20 +550,20 @@ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
|
||||
#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
|
||||
defined(PNG_FLOATING_POINT_SUPPORTED)
|
||||
#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
|
||||
# define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
|
||||
#endif
|
||||
|
||||
#ifndef PNG_NO_WRITE_FLUSH
|
||||
#define PNG_WRITE_FLUSH_SUPPORTED
|
||||
# define PNG_WRITE_FLUSH_SUPPORTED
|
||||
#endif
|
||||
|
||||
/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */
|
||||
#ifndef PNG_NO_WRITE_EMPTY_PLTE
|
||||
#define PNG_WRITE_EMPTY_PLTE_SUPPORTED
|
||||
# define PNG_WRITE_EMPTY_PLTE_SUPPORTED
|
||||
#endif
|
||||
|
||||
#ifndef PNG_NO_STDIO
|
||||
#define PNG_TIME_RFC1123_SUPPORTED
|
||||
# define PNG_TIME_RFC1123_SUPPORTED
|
||||
#endif
|
||||
|
||||
/* This adds extra functions in pngget.c for accessing data from the
|
||||
@ -581,12 +583,14 @@ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
* png_get_y_offset_microns()
|
||||
*/
|
||||
#ifndef PNG_NO_EASY_ACCESS
|
||||
#define PNG_EASY_ACCESS_SUPPORTED
|
||||
# define PNG_EASY_ACCESS_SUPPORTED
|
||||
#endif
|
||||
|
||||
#if defined(PNG_USE_PNGVCRD) || defined(PNG_USE_PNGGCCRD) && \
|
||||
!defined(PNG_NO_ASSEMBLER_CODE)
|
||||
#define PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
#ifndef PNG_NO_ASSEMBLER_CODE
|
||||
# define PNG_ASSEMBLER_CODE_SUPPORTED
|
||||
# if defined(PNG_USE_PNGVCRD) || defined(PNG_USE_PNGGCCRD)
|
||||
# define PNG_MMX_CODE_SUPPORTED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* These are currently experimental features, define them if you want */
|
||||
@ -595,10 +599,10 @@ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
/*
|
||||
#define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
|
||||
#ifndef PNG_NO_USER_MEM
|
||||
#define PNG_USER_MEM_SUPPORTED
|
||||
# define PNG_USER_MEM_SUPPORTED
|
||||
#endif
|
||||
#ifndef PNG_NO_ZALLOC_ZERO
|
||||
#define PNG_ZALLOC_ZERO
|
||||
# define PNG_ZALLOC_ZERO
|
||||
#endif
|
||||
*/
|
||||
|
||||
@ -627,11 +631,11 @@ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
|
||||
#if !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
|
||||
!defined(PNG_NO_READ_ANCILLARY_CHUNKS)
|
||||
#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
|
||||
# define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
|
||||
#endif
|
||||
#if !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
|
||||
!defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)
|
||||
#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
|
||||
# define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
|
||||
@ -733,13 +737,15 @@ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
# define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */
|
||||
#endif /* optional PLTE chunk in RGB and RGBA images */
|
||||
#if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
|
||||
defined(PNG_READ_zTXt_SUPPORTED)
|
||||
defined(PNG_READ_zTXt_SUPPORTED)
|
||||
# define PNG_READ_TEXT_SUPPORTED
|
||||
# define PNG_TEXT_SUPPORTED
|
||||
#endif
|
||||
|
||||
#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */
|
||||
|
||||
#ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
|
||||
|
||||
#ifdef PNG_NO_WRITE_TEXT
|
||||
# define PNG_NO_WRITE_iTXt
|
||||
# define PNG_NO_WRITE_tEXt
|
||||
@ -859,12 +865,13 @@ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
# endif
|
||||
#endif
|
||||
#if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
|
||||
defined(PNG_WRITE_zTXt_SUPPORTED)
|
||||
defined(PNG_WRITE_zTXt_SUPPORTED)
|
||||
# define PNG_WRITE_TEXT_SUPPORTED
|
||||
# ifndef PNG_TEXT_SUPPORTED
|
||||
# define PNG_TEXT_SUPPORTED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */
|
||||
|
||||
/* Turn this off to disable png_read_png() and
|
||||
@ -914,28 +921,26 @@ typedef size_t png_size_t;
|
||||
/* Separate compiler dependencies (problem here is that zlib.h always
|
||||
defines FAR. (SJT) */
|
||||
#ifdef __BORLANDC__
|
||||
#if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
|
||||
#define LDATA 1
|
||||
#else
|
||||
#define LDATA 0
|
||||
#endif
|
||||
|
||||
#if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
|
||||
#define PNG_MAX_MALLOC_64K
|
||||
#if (LDATA != 1)
|
||||
#ifndef FAR
|
||||
#define FAR __far
|
||||
#endif
|
||||
#define USE_FAR_KEYWORD
|
||||
#endif /* LDATA != 1 */
|
||||
|
||||
/* Possibly useful for moving data out of default segment.
|
||||
* Uncomment it if you want. Could also define FARDATA as
|
||||
* const if your compiler supports it. (SJT)
|
||||
# define FARDATA FAR
|
||||
*/
|
||||
#endif /* __WIN32__, __FLAT__, __CYGWIN__ */
|
||||
|
||||
# if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
|
||||
# define LDATA 1
|
||||
# else
|
||||
# define LDATA 0
|
||||
# endif
|
||||
/* GRR: why is Cygwin in here? Cygwin is not Borland C... */
|
||||
# if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
|
||||
# define PNG_MAX_MALLOC_64K
|
||||
# if (LDATA != 1)
|
||||
# ifndef FAR
|
||||
# define FAR __far
|
||||
# endif
|
||||
# define USE_FAR_KEYWORD
|
||||
# endif /* LDATA != 1 */
|
||||
/* Possibly useful for moving data out of default segment.
|
||||
* Uncomment it if you want. Could also define FARDATA as
|
||||
* const if your compiler supports it. (SJT)
|
||||
# define FARDATA FAR
|
||||
*/
|
||||
# endif /* __WIN32__, __FLAT__, __CYGWIN__ */
|
||||
#endif /* __BORLANDC__ */
|
||||
|
||||
|
||||
@ -947,20 +952,20 @@ typedef size_t png_size_t;
|
||||
/* MSC Medium model */
|
||||
#if defined(FAR)
|
||||
# if defined(M_I86MM)
|
||||
# define USE_FAR_KEYWORD
|
||||
# define FARDATA FAR
|
||||
# include <dos.h>
|
||||
# define USE_FAR_KEYWORD
|
||||
# define FARDATA FAR
|
||||
# include <dos.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* SJT: default case */
|
||||
#ifndef FAR
|
||||
# define FAR
|
||||
# define FAR
|
||||
#endif
|
||||
|
||||
/* At this point FAR is always defined */
|
||||
#ifndef FARDATA
|
||||
#define FARDATA
|
||||
# define FARDATA
|
||||
#endif
|
||||
|
||||
/* Typedef for floating-point numbers that are converted
|
||||
@ -999,7 +1004,7 @@ typedef png_fixed_point FAR * FAR * png_fixed_point_pp;
|
||||
typedef double FAR * FAR * png_doublepp;
|
||||
#endif
|
||||
|
||||
/* Pointers to pointers to pointers; i.e. pointer to array */
|
||||
/* Pointers to pointers to pointers; i.e., pointer to array */
|
||||
typedef char FAR * FAR * FAR * png_charppp;
|
||||
|
||||
/* libpng typedefs for types in zlib. If zlib changes
|
||||
@ -1067,8 +1072,8 @@ typedef z_stream FAR * png_zstreamp;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef PNGAPI
|
||||
|
||||
#ifndef PNGAPI
|
||||
|
||||
#if defined(__MINGW32__) || defined(__CYGWIN__) && !defined(PNG_MODULEDEF)
|
||||
# ifndef PNG_NO_MODULEDEF
|
||||
@ -1153,9 +1158,9 @@ typedef z_stream FAR * png_zstreamp;
|
||||
#endif
|
||||
|
||||
#ifdef PNG_USE_GLOBAL_ARRAYS
|
||||
#ifndef PNG_EXPORT_VAR
|
||||
# define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
|
||||
#endif
|
||||
# ifndef PNG_EXPORT_VAR
|
||||
# define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* User may want to use these so they are not in PNG_INTERNAL. Any library
|
||||
@ -1163,35 +1168,35 @@ typedef z_stream FAR * png_zstreamp;
|
||||
*/
|
||||
|
||||
#ifndef PNG_ABORT
|
||||
# define PNG_ABORT() abort()
|
||||
# define PNG_ABORT() abort()
|
||||
#endif
|
||||
|
||||
#ifdef PNG_SETJMP_SUPPORTED
|
||||
# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
|
||||
# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
|
||||
#else
|
||||
# define png_jmpbuf(png_ptr) \
|
||||
(LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)
|
||||
# define png_jmpbuf(png_ptr) \
|
||||
(LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)
|
||||
#endif
|
||||
|
||||
#if defined(USE_FAR_KEYWORD) /* memory model independent fns */
|
||||
/* use this to make far-to-near assignments */
|
||||
# define CHECK 1
|
||||
# define NOCHECK 0
|
||||
# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
|
||||
# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
|
||||
# define png_strcpy _fstrcpy
|
||||
# define png_strlen _fstrlen
|
||||
# define png_memcmp _fmemcmp /* SJT: added */
|
||||
# define png_memcpy _fmemcpy
|
||||
# define png_memset _fmemset
|
||||
# define CHECK 1
|
||||
# define NOCHECK 0
|
||||
# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
|
||||
# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
|
||||
# define png_strcpy _fstrcpy
|
||||
# define png_strlen _fstrlen
|
||||
# define png_memcmp _fmemcmp /* SJT: added */
|
||||
# define png_memcpy _fmemcpy
|
||||
# define png_memset _fmemset
|
||||
#else /* use the usual functions */
|
||||
# define CVT_PTR(ptr) (ptr)
|
||||
# define CVT_PTR_NOCHECK(ptr) (ptr)
|
||||
# define png_strcpy strcpy
|
||||
# define png_strlen strlen
|
||||
# define png_memcmp memcmp /* SJT: added */
|
||||
# define png_memcpy memcpy
|
||||
# define png_memset memset
|
||||
# define CVT_PTR(ptr) (ptr)
|
||||
# define CVT_PTR_NOCHECK(ptr) (ptr)
|
||||
# define png_strcpy strcpy
|
||||
# define png_strlen strlen
|
||||
# define png_memcmp memcmp /* SJT: added */
|
||||
# define png_memcpy memcpy
|
||||
# define png_memset memset
|
||||
#endif
|
||||
/* End of memory model independent support */
|
||||
|
||||
@ -1199,9 +1204,48 @@ typedef z_stream FAR * png_zstreamp;
|
||||
* contradictory.
|
||||
*/
|
||||
#if (PNG_ZBUF_SIZE > 65536) && defined(PNG_MAX_MALLOC_64K)
|
||||
#undef PNG_ZBUF_SIZE
|
||||
#define PNG_ZBUF_SIZE 65536
|
||||
# undef PNG_ZBUF_SIZE
|
||||
# define PNG_ZBUF_SIZE 65536
|
||||
#endif
|
||||
|
||||
/* Prior to libpng-1.0.9, this block was in pngasmrd.h */
|
||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_INTERNAL)
|
||||
|
||||
/* These are the default thresholds before the MMX code kicks in; if either
|
||||
* rowbytes or bitdepth is below the threshold, plain C code is used. These
|
||||
* can be overridden at runtime via the png_set_mmx_thresholds() call in
|
||||
* libpng 1.0.9 and later. The values below were chosen by Intel.
|
||||
*/
|
||||
|
||||
#ifndef PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT
|
||||
# define PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT 128 /* >= */
|
||||
#endif
|
||||
#ifndef PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT
|
||||
# define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9 /* >= */
|
||||
#endif
|
||||
|
||||
/* Set this in the makefile for VC++ on Pentium, not here. */
|
||||
/* Platform must be Pentium. Makefile must assemble and load pngvcrd.c .
|
||||
* MMX will be detected at run time and used if present.
|
||||
*/
|
||||
#ifdef PNG_USE_PNGVCRD
|
||||
# define PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||
# define PNG_HAVE_ASSEMBLER_READ_INTERLACE
|
||||
# define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
|
||||
#endif
|
||||
|
||||
/* Set this in the makefile for gcc/as on Pentium, not here. */
|
||||
/* Platform must be Pentium. Makefile must assemble and load pnggccrd.c .
|
||||
* MMX will be detected at run time and used if present.
|
||||
*/
|
||||
#ifdef PNG_USE_PNGGCCRD
|
||||
# define PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||
# define PNG_HAVE_ASSEMBLER_READ_INTERLACE
|
||||
# define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
|
||||
#endif
|
||||
/* - see pnggccrd.c for info about what is currently enabled */
|
||||
|
||||
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
|
||||
|
||||
#endif /* PNGCONF_H */
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngerror.c - stub functions for i/o and memory allocation
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
|
222
pnggccrd.c
222
pnggccrd.c
@ -6,14 +6,14 @@
|
||||
* and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
|
||||
* for Intel's performance analysis of the MMX vs. non-MMX code.
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, Intel Corporation
|
||||
*
|
||||
* Based on MSVC code contributed by Nirav Chhatrapati, Intel Corp., 1998.
|
||||
* Interface to libpng contributed by Gilles Vollant, 1999.
|
||||
* GNU C port by Greg Roelofs, 1999-2000.
|
||||
* GNU C port by Greg Roelofs, 1999-2001.
|
||||
*
|
||||
* Lines 2350-4300 converted in place with intel2gas 1.3.1:
|
||||
*
|
||||
@ -203,6 +203,15 @@
|
||||
* - "_ShiftRem.use = 40;" should have been "_ShiftRem.use = 48;"
|
||||
* - "psllq _ShiftRem, %%mm2" should have been "psrlq _ShiftRem, %%mm2"
|
||||
*
|
||||
* 20010103:
|
||||
* - renamed mmxsupport() to png_mmx_support(), with auto-set of mmx_supported,
|
||||
* and made it public
|
||||
*
|
||||
* 20010104:
|
||||
* - removed dependency on png_read_filter_row_c() (C code already duplicated
|
||||
* within MMX version of png_read_filter_row()) so no longer necessary to
|
||||
* compile it into pngrutil.o
|
||||
*
|
||||
* STILL TO DO:
|
||||
* - test png_do_read_interlace() 64-bit case (pixel_bytes == 8)
|
||||
* - write MMX code for 48-bit case (pixel_bytes == 6)
|
||||
@ -211,10 +220,10 @@
|
||||
* (only width_mmx case) (near line 1606)
|
||||
* - rewrite all MMX interlacing code so it's aligned with beginning
|
||||
* of the row buffer, not the end (see 19991007 for details)
|
||||
* - pick one version of mmxsupport() and get rid of the other
|
||||
* x pick one version of mmxsupport() and get rid of the other
|
||||
* - add error messages to any remaining bogus default cases
|
||||
* - enable pixel_depth == 8 cases in png_read_filter_row()? (test speed)
|
||||
* - add support for runtime enable/disable/query of various MMX routines
|
||||
* x add support for runtime enable/disable/query of various MMX routines
|
||||
*/
|
||||
|
||||
//#define PNG_DEBUG 2 // GRR
|
||||
@ -224,10 +233,6 @@
|
||||
|
||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_USE_PNGGCCRD)
|
||||
|
||||
int mmxsupport(void);
|
||||
|
||||
static int mmx_supported = 2;
|
||||
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
static const int FARDATA png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0};
|
||||
static const int FARDATA png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
|
||||
@ -237,6 +242,7 @@ static const int FARDATA png_pass_width[7] = {8, 4, 4, 2, 2, 1, 1};
|
||||
// djgpp, Win32, and Cygwin add their own underscores to global variables,
|
||||
// so define them without:
|
||||
#if defined(__DJGPP__) || defined(WIN32) || defined(__CYGWIN__)
|
||||
# define _mmx_supported mmx_supported
|
||||
# define _unmask unmask
|
||||
# define _const4 const4
|
||||
# define _const6 const6
|
||||
@ -271,6 +277,8 @@ static const int FARDATA png_pass_width[7] = {8, 4, 4, 2, 2, 1, 1};
|
||||
# define _pctemp pctemp
|
||||
#endif
|
||||
|
||||
static int _mmx_supported = 2;
|
||||
|
||||
/* These constants are used in the inlined MMX assembly code.
|
||||
Ignore gcc's "At top level: defined but not used" warnings. */
|
||||
|
||||
@ -318,11 +326,6 @@ static int _pbtemp;
|
||||
static int _pctemp;
|
||||
|
||||
|
||||
void /* PRIVATE */
|
||||
png_read_filter_row_c(png_structp png_ptr, png_row_infop row_info,
|
||||
png_bytep row, png_bytep prev_row, int filter);
|
||||
|
||||
|
||||
|
||||
|
||||
//===========================================================================//
|
||||
@ -352,16 +355,16 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
||||
{
|
||||
png_debug(1,"in png_combine_row_asm\n");
|
||||
|
||||
if (mmx_supported == 2)
|
||||
mmx_supported = mmxsupport();
|
||||
if (_mmx_supported == 2) {
|
||||
png_mmx_support();
|
||||
}
|
||||
|
||||
if (mask == 0xff)
|
||||
{
|
||||
png_memcpy(row, png_ptr->row_buf + 1,
|
||||
(png_size_t)((png_ptr->width * png_ptr->row_info.pixel_depth + 7) >> 3));
|
||||
}
|
||||
/* GRR: add "else if (mask == 0)" case?
|
||||
* or does png_combine_row() not even get called in that case? */
|
||||
/* GRR: png_combine_row() never called with mask == 0 */
|
||||
else
|
||||
{
|
||||
switch (png_ptr->row_info.pixel_depth)
|
||||
@ -537,7 +540,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
||||
png_bytep srcptr;
|
||||
png_bytep dstptr;
|
||||
|
||||
if (mmx_supported)
|
||||
if ( _mmx_supported )
|
||||
{
|
||||
png_uint_32 len;
|
||||
int diff;
|
||||
@ -653,7 +656,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
||||
png_bytep srcptr;
|
||||
png_bytep dstptr;
|
||||
|
||||
if (mmx_supported)
|
||||
if ( _mmx_supported )
|
||||
{
|
||||
png_uint_32 len;
|
||||
int diff;
|
||||
@ -785,7 +788,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
||||
png_bytep srcptr;
|
||||
png_bytep dstptr;
|
||||
|
||||
if (mmx_supported)
|
||||
if ( _mmx_supported )
|
||||
{
|
||||
png_uint_32 len;
|
||||
int diff;
|
||||
@ -932,7 +935,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
||||
png_bytep srcptr;
|
||||
png_bytep dstptr;
|
||||
|
||||
if (mmx_supported)
|
||||
if ( _mmx_supported )
|
||||
{
|
||||
png_uint_32 len;
|
||||
int diff;
|
||||
@ -1086,7 +1089,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
||||
png_bytep srcptr;
|
||||
png_bytep dstptr;
|
||||
|
||||
if (mmx_supported)
|
||||
if ( _mmx_supported )
|
||||
{
|
||||
png_uint_32 len;
|
||||
int diff;
|
||||
@ -1311,13 +1314,18 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
||||
*/
|
||||
|
||||
void /* PRIVATE */
|
||||
png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
|
||||
png_uint_32 transformations)
|
||||
png_do_read_interlace(png_structp png_ptr)
|
||||
{
|
||||
png_row_infop row_info = &(png_ptr->row_info);
|
||||
png_bytep row = png_ptr->row_buf + 1;
|
||||
int pass = png_ptr->pass;
|
||||
png_uint_32 transformations = png_ptr->transformations;
|
||||
|
||||
png_debug(1,"in png_do_read_interlace\n");
|
||||
|
||||
if (mmx_supported == 2)
|
||||
mmx_supported = mmxsupport();
|
||||
if (_mmx_supported == 2) {
|
||||
png_mmx_support();
|
||||
}
|
||||
|
||||
if (row != NULL && row_info != NULL)
|
||||
{
|
||||
@ -1520,7 +1528,7 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
|
||||
|
||||
// New code by Nirav Chhatrapati - Intel Corporation
|
||||
|
||||
if (mmx_supported) // use MMX code if machine supports it
|
||||
if ( _mmx_supported )
|
||||
{
|
||||
//--------------------------------------------------------------
|
||||
if (pixel_bytes == 3)
|
||||
@ -2398,7 +2406,7 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
|
||||
sptr-= pixel_bytes;
|
||||
}
|
||||
}
|
||||
} // end of mmx_supported =========================================
|
||||
} // end of _mmx_supported ========================================
|
||||
|
||||
else /* MMX not supported: use modified C code - takes advantage
|
||||
* of inlining of memcpy for a constant */
|
||||
@ -4749,43 +4757,32 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
row, png_bytep prev_row, int filter)
|
||||
{
|
||||
#ifdef PNG_DEBUG
|
||||
char filnm[6];
|
||||
char filnm[10];
|
||||
#endif
|
||||
|
||||
#define UseMMX 1
|
||||
|
||||
/* GRR: these are superseded by png_ptr->asm_flags: */
|
||||
#define UseMMX_sub 1 // GRR: converted 20000730
|
||||
#define UseMMX_up 1 // GRR: converted 20000729
|
||||
#define UseMMX_avg 1 // GRR: converted 20000828 (+ 16-bit bugfix 20000916)
|
||||
#define UseMMX_paeth 1 // GRR: converted 20000828
|
||||
|
||||
if (mmx_supported == 2)
|
||||
mmx_supported = mmxsupport();
|
||||
|
||||
if (!mmx_supported)
|
||||
{
|
||||
png_read_filter_row_c(png_ptr, row_info, row, prev_row, filter);
|
||||
return;
|
||||
if (_mmx_supported == 2) {
|
||||
png_mmx_support();
|
||||
}
|
||||
|
||||
#ifdef PNG_DEBUG
|
||||
png_debug(1, "in png_read_filter_row\n");
|
||||
#if (UseMMX == 1)
|
||||
png_debug1(0,"%s, ", "MMX");
|
||||
#else
|
||||
png_debug1(0,"%s, ", "x86");
|
||||
#endif
|
||||
switch (filter)
|
||||
{
|
||||
case 0: sprintf(filnm, "none");
|
||||
break;
|
||||
case 1: sprintf(filnm, "sub");
|
||||
case 1: sprintf(filnm, "sub-%s", "MMX");
|
||||
break;
|
||||
case 2: sprintf(filnm, "up");
|
||||
case 2: sprintf(filnm, "up-%s", "MMX");
|
||||
break;
|
||||
case 3: sprintf(filnm, "avg");
|
||||
case 3: sprintf(filnm, "avg-%s", "MMX");
|
||||
break;
|
||||
case 4: sprintf(filnm, "Paeth");
|
||||
case 4: sprintf(filnm, "Paeth-%s", "MMX");
|
||||
break;
|
||||
default: sprintf(filnm, "unknw");
|
||||
break;
|
||||
@ -4795,7 +4792,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
png_debug2(0, "pixdepth=%2d, bytes=%d, ", (int)row_info->pixel_depth,
|
||||
(int)((row_info->pixel_depth + 7) >> 3));
|
||||
png_debug1(0,"rowbytes=%8ld\n", row_info->rowbytes);
|
||||
#endif
|
||||
#endif /* PNG_DEBUG */
|
||||
|
||||
switch (filter)
|
||||
{
|
||||
@ -4803,13 +4800,13 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
break;
|
||||
|
||||
case PNG_FILTER_VALUE_SUB:
|
||||
#if (UseMMX_sub == 1)
|
||||
if ((row_info->pixel_depth > 8) && (row_info->rowbytes >= 128))
|
||||
if (
|
||||
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
|
||||
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
|
||||
{
|
||||
png_read_filter_row_mmx_sub(row_info, row);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
png_uint_32 i;
|
||||
png_uint_32 istop = row_info->rowbytes;
|
||||
@ -4826,33 +4823,35 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
break;
|
||||
|
||||
case PNG_FILTER_VALUE_UP:
|
||||
#if (UseMMX_up == 1)
|
||||
if ((row_info->pixel_depth > 8) && (row_info->rowbytes >= 128))
|
||||
if (
|
||||
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
|
||||
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
|
||||
{
|
||||
png_read_filter_row_mmx_up(row_info, row, prev_row);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
png_bytep rp;
|
||||
png_bytep pp;
|
||||
png_uint_32 i;
|
||||
for (i = 0, rp = row, pp = prev_row;
|
||||
i < row_info->rowbytes; i++, rp++, pp++)
|
||||
png_uint_32 istop = row_info->rowbytes;
|
||||
png_bytep rp = row;
|
||||
png_bytep pp = prev_row;
|
||||
|
||||
for (i = 0; i < istop; ++i)
|
||||
{
|
||||
*rp = (png_byte)(((int)(*rp) + (int)(*pp)) & 0xff);
|
||||
*rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
|
||||
rp++;
|
||||
}
|
||||
} //end !UseMMX_up
|
||||
break;
|
||||
|
||||
case PNG_FILTER_VALUE_AVG:
|
||||
#if (UseMMX_avg == 1)
|
||||
if ((row_info->pixel_depth > 8) && (row_info->rowbytes >= 128))
|
||||
if (
|
||||
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
|
||||
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
|
||||
{
|
||||
png_read_filter_row_mmx_avg(row_info, row, prev_row);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
png_uint_32 i;
|
||||
png_bytep rp = row;
|
||||
@ -4878,13 +4877,13 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
break;
|
||||
|
||||
case PNG_FILTER_VALUE_PAETH:
|
||||
#if (UseMMX_paeth == 1)
|
||||
if ((row_info->pixel_depth > 8) && (row_info->rowbytes >= 128))
|
||||
if (
|
||||
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
|
||||
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
|
||||
{
|
||||
png_read_filter_row_mmx_paeth(row_info, row, prev_row);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
png_uint_32 i;
|
||||
png_bytep rp = row;
|
||||
@ -4892,7 +4891,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
png_bytep lp = row;
|
||||
png_bytep cp = prev_row;
|
||||
png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
|
||||
png_uint_32 istop=row_info->rowbytes - bpp;
|
||||
png_uint_32 istop = row_info->rowbytes - bpp;
|
||||
|
||||
for (i = 0; i < bpp; i++)
|
||||
{
|
||||
@ -4900,7 +4899,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
rp++;
|
||||
}
|
||||
|
||||
for (i = 0; i < istop; i++) // use leftover rp,pp
|
||||
for (i = 0; i < istop; i++) /* use leftover rp,pp */
|
||||
{
|
||||
int a, b, c, pa, pb, pc, p;
|
||||
|
||||
@ -4930,7 +4929,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
p = c;
|
||||
*/
|
||||
|
||||
p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c;
|
||||
p = (pa <= pb && pa <= pc) ? a : (pb <= pc) ? b : c;
|
||||
|
||||
*rp = (png_byte)(((int)(*rp) + p) & 0xff);
|
||||
rp++;
|
||||
@ -4939,7 +4938,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
break;
|
||||
|
||||
default:
|
||||
png_warning(png_ptr, "Ignoring bad adaptive filter type");
|
||||
png_warning(png_ptr, "Ignoring bad row-filter type");
|
||||
*row=0;
|
||||
break;
|
||||
}
|
||||
@ -4964,85 +4963,27 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
// [is there a way to signal that a *single* function should
|
||||
// not be inlined? is there a way to modify the label for
|
||||
// each inlined instance, e.g., by appending _1, _2, etc.?
|
||||
// maybe if don't use leading "." in label name? (not tested)]
|
||||
// maybe if don't use leading "." in label name? (nope...sigh)]
|
||||
|
||||
#ifdef ORIG_THAT_USED_TO_CLOBBER_EBX
|
||||
// GRR TO DO: make sure PNGAPI doesn't do/require anything screwy here
|
||||
// [looks OK for everybody except possibly Cygwin (__cdecl)]
|
||||
|
||||
int mmxsupport(void)
|
||||
{
|
||||
int mmx_supported_local = 0;
|
||||
|
||||
__asm__ __volatile__ (
|
||||
// ".byte 0x66 \n\t" // convert 16-bit pushf to 32-bit pushfd
|
||||
// "pushf \n\t" // save Eflag to stack
|
||||
"pushfl \n\t" // save Eflag to stack
|
||||
"popl %%eax \n\t" // get Eflag from stack into eax
|
||||
"movl %%eax, %%ecx \n\t" // make another copy of Eflag in ecx
|
||||
"xorl $0x200000, %%eax \n\t" // toggle ID bit in Eflag (i.e., bit 21)
|
||||
"pushl %%eax \n\t" // save modified Eflag back to stack
|
||||
// ".byte 0x66 \n\t" // convert 16-bit popf to 32-bit popfd
|
||||
// "popf \n\t" // restore modified value to Eflag reg
|
||||
"popfl \n\t" // restore modified value to Eflag reg
|
||||
"pushfl \n\t" // save Eflag to stack
|
||||
"popl %%eax \n\t" // get Eflag from stack
|
||||
"xorl %%ecx, %%eax \n\t" // compare new Eflag with original Eflag
|
||||
"jz .NOT_SUPPORTED \n\t" // if same, CPUID instr. is not supported
|
||||
|
||||
"xorl %%eax, %%eax \n\t" // set eax to zero
|
||||
// ".byte 0x0f, 0xa2 \n\t" // CPUID instruction (two-byte opcode)
|
||||
"cpuid \n\t" // get the CPU identification info
|
||||
"cmpl $1, %%eax \n\t" // make sure eax return non-zero value
|
||||
"jl .NOT_SUPPORTED \n\t" // if eax is zero, MMX is not supported
|
||||
|
||||
"xorl %%eax, %%eax \n\t" // set eax to zero and...
|
||||
"incl %%eax \n\t" // ...increment eax to 1. This pair is
|
||||
// faster than the instruction "mov eax, 1"
|
||||
"cpuid \n\t" // get the CPU identification info again
|
||||
"andl $0x800000, %%edx \n\t" // mask out all bits but MMX bit (23)
|
||||
"cmpl $0, %%edx \n\t" // 0 = MMX not supported
|
||||
"jz .NOT_SUPPORTED \n\t" // non-zero = yes, MMX IS supported
|
||||
|
||||
"movl $1, %0 \n\t" // set return value to 1 and fall through
|
||||
|
||||
".NOT_SUPPORTED: \n\t" // target label for jump instructions
|
||||
"movl %0, %%eax \n\t" // move return value to eax
|
||||
// DONE
|
||||
|
||||
: "=m" (mmx_supported_local) // %0 (output list: memory only)
|
||||
|
||||
: // any variables used on input (none)
|
||||
|
||||
: "%eax", "%ebx", // clobber list
|
||||
"%ecx", "%edx"
|
||||
// , "memory" // if write to a variable gcc thought was in a reg
|
||||
// , "cc" // "condition codes" (flag bits)
|
||||
);
|
||||
|
||||
//mmx_supported_local=0; // test code for force don't support MMX
|
||||
//printf("MMX : %u (1=MMX supported)\n",mmx_supported_local);
|
||||
|
||||
return mmx_supported_local;
|
||||
}
|
||||
|
||||
|
||||
#else /* !ORIG_THAT_USED_TO_CLOBBER_EBX */
|
||||
|
||||
|
||||
int mmxsupport(void)
|
||||
int PNGAPI
|
||||
png_mmx_support(void)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"pushl %%ebx \n\t" // ebx gets clobbered by CPUID instruction
|
||||
"pushl %%ecx \n\t" // so does ecx...
|
||||
"pushl %%edx \n\t" // ...and edx (but ecx & edx safe on Linux)
|
||||
// ".byte 0x66 \n\t" // convert 16-bit pushf to 32-bit pushfd
|
||||
// "pushf \n\t" // save Eflag to stack
|
||||
// "pushf \n\t" // 16-bit pushf
|
||||
"pushfl \n\t" // save Eflag to stack
|
||||
"popl %%eax \n\t" // get Eflag from stack into eax
|
||||
"movl %%eax, %%ecx \n\t" // make another copy of Eflag in ecx
|
||||
"xorl $0x200000, %%eax \n\t" // toggle ID bit in Eflag (i.e., bit 21)
|
||||
"pushl %%eax \n\t" // save modified Eflag back to stack
|
||||
// ".byte 0x66 \n\t" // convert 16-bit popf to 32-bit popfd
|
||||
// "popf \n\t" // restore modified value to Eflag reg
|
||||
// "popf \n\t" // 16-bit popf
|
||||
"popfl \n\t" // restore modified value to Eflag reg
|
||||
"pushfl \n\t" // save Eflag to stack
|
||||
"popl %%eax \n\t" // get Eflag from stack
|
||||
@ -5064,6 +5005,7 @@ int mmxsupport(void)
|
||||
"jz .NOT_SUPPORTED \n\t" // non-zero = yes, MMX IS supported
|
||||
|
||||
"movl $1, %%eax \n\t" // set return value to 1
|
||||
"movl %%eax, _mmx_supported \n\t" // save in global static variable, too
|
||||
"popl %%edx \n\t" // restore edx
|
||||
"popl %%ecx \n\t" // restore ecx
|
||||
"popl %%ebx \n\t" // restore ebx ("row" in png_do_interlace)
|
||||
@ -5071,13 +5013,14 @@ int mmxsupport(void)
|
||||
|
||||
".NOT_SUPPORTED: \n\t" // target label for jump instructions
|
||||
"movl $0, %%eax \n\t" // set return value to 0
|
||||
"movl %%eax, _mmx_supported \n\t" // save in global static variable, too
|
||||
"popl %%edx \n\t" // restore edx
|
||||
"popl %%ecx \n\t" // restore ecx
|
||||
"popl %%ebx \n\t" // restore ebx ("row" in png_do_interlace)
|
||||
// "ret \n\t" // DONE: no MMX support
|
||||
// (fall through to standard C "ret")
|
||||
|
||||
: // "=m" (mmx_supported_local) // %0 (output list: memory only)
|
||||
: // output list (none)
|
||||
|
||||
: // any variables used on input (none)
|
||||
|
||||
@ -5087,12 +5030,7 @@ int mmxsupport(void)
|
||||
// , "cc" // "condition codes" (flag bits)
|
||||
);
|
||||
|
||||
//mmx_supported_local=0; // test code for force don't support MMX
|
||||
//printf("MMX : %u (1=MMX supported)\n",mmx_supported_local);
|
||||
|
||||
//return mmx_supported_local;
|
||||
// return %%eax;
|
||||
}
|
||||
|
||||
#endif /* ?ORIG_THAT_USED_TO_CLOBBER_EBX */
|
||||
|
||||
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED && PNG_USE_PNGGCCRD */
|
||||
|
11
pngget.c
11
pngget.c
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngget.c - retrieval of values from info struct
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
@ -807,7 +807,7 @@ png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
|
||||
png_byte PNGAPI
|
||||
png_get_rgb_to_gray_status (png_structp png_ptr)
|
||||
{
|
||||
return png_ptr->rgb_to_gray_status;
|
||||
return (png_byte)(png_ptr? png_ptr->rgb_to_gray_status : 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -815,7 +815,7 @@ png_get_rgb_to_gray_status (png_structp png_ptr)
|
||||
png_voidp PNGAPI
|
||||
png_get_user_chunk_ptr(png_structp png_ptr)
|
||||
{
|
||||
return (png_ptr->user_chunk_ptr);
|
||||
return (png_ptr? png_ptr->user_chunk_ptr : NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -823,5 +823,6 @@ png_get_user_chunk_ptr(png_structp png_ptr)
|
||||
png_uint_32 PNGAPI
|
||||
png_get_compression_buffer_size(png_structp png_ptr)
|
||||
{
|
||||
return(png_ptr->zbuf_size);
|
||||
return (png_uint_32)(png_ptr? png_ptr->zbuf_size : 0L);
|
||||
}
|
||||
|
||||
|
4
pngmem.c
4
pngmem.c
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngmem.c - stub functions for memory allocation
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngpread.c - read a png file in push mode
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
@ -772,8 +772,11 @@ png_push_process_row(png_structp png_ptr)
|
||||
if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE))
|
||||
{
|
||||
if (png_ptr->pass < 6)
|
||||
/* old interface (pre-1.0.9):
|
||||
png_do_read_interlace(&(png_ptr->row_info),
|
||||
png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations);
|
||||
*/
|
||||
png_do_read_interlace(png_ptr);
|
||||
|
||||
switch (png_ptr->pass)
|
||||
{
|
||||
|
11
pngread.c
11
pngread.c
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngread.c - read a PNG file
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -667,8 +667,11 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
|
||||
(png_ptr->transformations & PNG_INTERLACE))
|
||||
{
|
||||
if (png_ptr->pass < 6)
|
||||
/* old interface (pre-1.0.9):
|
||||
png_do_read_interlace(&(png_ptr->row_info),
|
||||
png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations);
|
||||
*/
|
||||
png_do_read_interlace(png_ptr);
|
||||
|
||||
if (dsp_row != NULL)
|
||||
png_combine_row(png_ptr, dsp_row,
|
||||
@ -712,7 +715,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
|
||||
* not called png_set_interlace_handling(), the display_row buffer will
|
||||
* be ignored, so pass NULL to it.
|
||||
*
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.9beta7
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.9beta8
|
||||
*/
|
||||
|
||||
void PNGAPI
|
||||
@ -761,7 +764,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
|
||||
* only call this function once. If you desire to have an image for
|
||||
* each pass of a interlaced image, use png_read_rows() instead.
|
||||
*
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.9beta7
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.9beta8
|
||||
*/
|
||||
void PNGAPI
|
||||
png_read_image(png_structp png_ptr, png_bytepp image)
|
||||
|
4
pngrio.c
4
pngrio.c
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngrio.c - functions for data input
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
|
52
pngrutil.c
52
pngrutil.c
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngrutil.c - utilities to read a PNG file
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -266,6 +266,13 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
|
||||
png_warning(png_ptr,
|
||||
"Incomplete compressed datastream in chunk other than IDAT");
|
||||
#endif
|
||||
text_size=prefix_size;
|
||||
if (text == NULL)
|
||||
{
|
||||
text = (png_charp)png_malloc(png_ptr, text_size+1);
|
||||
png_memcpy(text, chunkdata, prefix_size);
|
||||
}
|
||||
*(text + text_size) = 0x00;
|
||||
}
|
||||
|
||||
inflateReset(&png_ptr->zstream);
|
||||
@ -1063,6 +1070,8 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
slength, prefix_length, &data_length);
|
||||
|
||||
profile_length = data_length - prefix_length;
|
||||
|
||||
/* Check the profile_size recorded in the first 32 bits of the ICC profile */
|
||||
profile_size = ((*(chunkdata+prefix_length))<<24) |
|
||||
((*(chunkdata+prefix_length+1))<<16) |
|
||||
((*(chunkdata+prefix_length+2))<< 8) |
|
||||
@ -2156,13 +2165,9 @@ png_check_chunk_name(png_structp png_ptr, png_bytep chunk_name)
|
||||
a zero indicates the pixel is to be skipped. This is in addition
|
||||
to any alpha or transparency value associated with the pixel. If
|
||||
you want all pixels to be combined, pass 0xff (255) in mask. */
|
||||
#ifndef PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||
void /* PRIVATE */
|
||||
#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
|
||||
png_combine_row_c
|
||||
#else
|
||||
png_combine_row
|
||||
#endif /* PNG_HAVE_ASSEMBLER_COMBINE_ROW */
|
||||
(png_structp png_ptr, png_bytep row, int mask)
|
||||
png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
||||
{
|
||||
png_debug(1,"in png_combine_row\n");
|
||||
if (mask == 0xff)
|
||||
@ -2362,25 +2367,24 @@ png_combine_row
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* !PNG_HAVE_ASSEMBLER_COMBINE_ROW */
|
||||
|
||||
#if defined(PNG_READ_INTERLACING_SUPPORTED)
|
||||
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
||||
#ifndef PNG_HAVE_ASSEMBLER_READ_INTERLACE /* else in pngvcrd.c, pnggccrd.c */
|
||||
void /* PRIVATE */
|
||||
#ifdef PNG_HAVE_ASSEMBLER_READ_INTERLACE
|
||||
png_do_read_interlace_c
|
||||
#else
|
||||
png_do_read_interlace
|
||||
#endif /* PNG_HAVE_ASSEMBLER_READ_INTERLACE */
|
||||
(png_row_infop row_info, png_bytep row, int pass,
|
||||
png_uint_32 transformations)
|
||||
png_do_read_interlace(png_structp png_ptr)
|
||||
{
|
||||
png_row_infop row_info = &(png_ptr->row_info);
|
||||
png_bytep row = png_ptr->row_buf + 1;
|
||||
int pass = png_ptr->pass;
|
||||
png_uint_32 transformations = png_ptr->transformations;
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
/* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
|
||||
|
||||
/* offset to next interlace block */
|
||||
const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
|
||||
#endif
|
||||
|
||||
png_debug(1,"in png_do_read_interlace\n");
|
||||
png_debug(1,"in png_do_read_interlace (stock C version)\n");
|
||||
if (row != NULL && row_info != NULL)
|
||||
{
|
||||
png_uint_32 final_width;
|
||||
@ -2590,15 +2594,12 @@ png_do_read_interlace
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif /* !PNG_HAVE_ASSEMBLER_READ_INTERLACE */
|
||||
#endif /* PNG_READ_INTERLACING_SUPPORTED */
|
||||
|
||||
#ifndef PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
|
||||
void /* PRIVATE */
|
||||
#ifdef PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
|
||||
png_read_filter_row_c
|
||||
#else
|
||||
png_read_filter_row
|
||||
#endif /* PNG_HAVE_ASSEMBLER_READ_FILTER_ROW */
|
||||
(png_structp png_ptr, png_row_infop row_info, png_bytep row,
|
||||
png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
|
||||
png_bytep prev_row, int filter)
|
||||
{
|
||||
png_debug(1, "in png_read_filter_row\n");
|
||||
@ -2719,6 +2720,7 @@ png_read_filter_row
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif /* !PNG_HAVE_ASSEMBLER_READ_FILTER_ROW */
|
||||
|
||||
void /* PRIVATE */
|
||||
png_read_finish_row(png_structp png_ptr)
|
||||
|
5
pngset.c
5
pngset.c
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngset.c - storage of image information into info struct
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -906,3 +906,4 @@ png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask)
|
||||
if (png_ptr && info_ptr)
|
||||
info_ptr->valid &= ~(mask);
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngtest.c - a simple test program to test libpng
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -1449,4 +1449,4 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef version_1_0_9beta7 your_png_h_is_not_version_1_0_9beta7;
|
||||
typedef version_1_0_9beta8 your_png_h_is_not_version_1_0_9beta8;
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
|
184
pngvcrd.c
184
pngvcrd.c
@ -2,16 +2,25 @@
|
||||
*
|
||||
* For Intel x86 CPU and Microsoft Visual C++ compiler
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, Intel Corporation
|
||||
*
|
||||
* Contributed by Nirav Chhatrapati, Intel Corporation, 1998
|
||||
* Interface to libpng contributed by Gilles Vollant, 1999
|
||||
* Debugging and cleanup by Greg Roelofs, 2000, 2001
|
||||
*
|
||||
* In png_do_read_interlace() in libpng versions 1.0.3a through 1.0.4d,
|
||||
* a sign error in the post-MMX cleanup code for each pixel_depth resulted
|
||||
* in bad pixels at the beginning of some rows of some images, and also
|
||||
* (due to out-of-range memory reads and writes) caused heap corruption
|
||||
* when compiled with MSVC 6.0. The error was fixed in version 1.0.4e.
|
||||
*
|
||||
* [png_read_filter_row_mmx_avg() bpp == 2 bugfix, GRR 20000916]
|
||||
*
|
||||
* [runtime MMX configuration, GRR 20010102]
|
||||
*
|
||||
*/
|
||||
|
||||
#define PNG_INTERNAL
|
||||
@ -19,19 +28,11 @@
|
||||
|
||||
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD)
|
||||
|
||||
/*
|
||||
One of these might need to be defined.
|
||||
#define DISABLE_PNGVCRD_COMBINE
|
||||
#define DISABLE_PNGVCRD_INTERLACE
|
||||
*/
|
||||
|
||||
static int mmx_supported=2;
|
||||
|
||||
void /* PRIVATE */
|
||||
png_read_filter_row_c(png_structp png_ptr, png_row_infop row_info,
|
||||
png_bytep row, png_bytep prev_row, int filter);
|
||||
|
||||
static int mmxsupport()
|
||||
int PNGAPI
|
||||
png_mmx_support(void)
|
||||
{
|
||||
int mmx_supported_local = 0;
|
||||
_asm {
|
||||
@ -83,6 +84,7 @@ NOT_SUPPORTED:
|
||||
//mmx_supported_local=0; // test code for force don't support MMX
|
||||
//printf("MMX : %u (1=MMX supported)\n",mmx_supported_local);
|
||||
|
||||
mmx_supported = mmx_supported_local;
|
||||
return mmx_supported_local;
|
||||
}
|
||||
|
||||
@ -106,19 +108,12 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
|
||||
#endif
|
||||
#ifdef DISABLE_PNGVCRD_COMBINE
|
||||
int save_mmx_supported = mmx_supported;
|
||||
#endif
|
||||
|
||||
png_debug(1,"in png_combine_row_asm\n");
|
||||
|
||||
#ifdef DISABLE_PNGVCRD_COMBINE
|
||||
if ((png_ptr->transformations & PNG_INTERLACE) && png_ptr->pass != 6)
|
||||
mmx_supported = 0;
|
||||
else
|
||||
#endif
|
||||
if (mmx_supported == 2)
|
||||
mmx_supported = mmxsupport();
|
||||
if (mmx_supported == 2) {
|
||||
png_mmx_support();
|
||||
}
|
||||
|
||||
if (mask == 0xff)
|
||||
{
|
||||
@ -307,7 +302,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
||||
|
||||
__int64 mask0=0x0102040810204080;
|
||||
|
||||
if (mmx_supported)
|
||||
if ( mmx_supported )
|
||||
{
|
||||
srcptr = png_ptr->row_buf + 1;
|
||||
dstptr = row;
|
||||
@ -407,7 +402,7 @@ end8:
|
||||
__int64 mask1=0x0101020204040808,
|
||||
mask0=0x1010202040408080;
|
||||
|
||||
if (mmx_supported)
|
||||
if ( mmx_supported )
|
||||
{
|
||||
srcptr = png_ptr->row_buf + 1;
|
||||
dstptr = row;
|
||||
@ -527,7 +522,7 @@ end16:
|
||||
len = (png_ptr->width)&~7;
|
||||
diff = (png_ptr->width)&7;
|
||||
|
||||
if (mmx_supported)
|
||||
if ( mmx_supported )
|
||||
{
|
||||
_asm
|
||||
{
|
||||
@ -658,7 +653,7 @@ end24:
|
||||
len = (png_ptr->width)&~7;
|
||||
diff = (png_ptr->width)&7;
|
||||
|
||||
if (mmx_supported)
|
||||
if ( mmx_supported )
|
||||
{
|
||||
_asm
|
||||
{
|
||||
@ -792,7 +787,7 @@ end32:
|
||||
mask1=0x2020202040404040,
|
||||
mask0=0x4040808080808080;
|
||||
|
||||
if (mmx_supported)
|
||||
if ( mmx_supported )
|
||||
{
|
||||
srcptr = png_ptr->row_buf + 1;
|
||||
dstptr = row;
|
||||
@ -963,43 +958,27 @@ end48:
|
||||
} /* end switch (png_ptr->row_info.pixel_depth) */
|
||||
} /* end if (non-trivial mask) */
|
||||
|
||||
#ifdef DISABLE_PNGVCRD_COMBINE
|
||||
mmx_supported = save_mmx_supported;
|
||||
#endif
|
||||
|
||||
} /* end png_combine_row() */
|
||||
|
||||
|
||||
#if defined(PNG_READ_INTERLACING_SUPPORTED)
|
||||
|
||||
void /* PRIVATE */
|
||||
png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
|
||||
png_uint_32 transformations)
|
||||
png_do_read_interlace(png_structp png_ptr)
|
||||
{
|
||||
png_row_infop row_info = &(png_ptr->row_info);
|
||||
png_bytep row = png_ptr->row_buf + 1;
|
||||
int pass = png_ptr->pass;
|
||||
png_uint_32 transformations = png_ptr->transformations;
|
||||
#ifdef PNG_USE_LOCAL_ARRAYS
|
||||
const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1};
|
||||
#endif
|
||||
#ifdef DISABLE_PNGVCRD_INTERLACE
|
||||
int save_mmx_supported = mmx_supported;
|
||||
#endif
|
||||
|
||||
png_debug(1,"in png_do_read_interlace\n");
|
||||
|
||||
#ifdef DISABLE_PNGVCRD_INTERLACE
|
||||
/* In libpng versions 1.0.3a through 1.0.4d,
|
||||
* a sign error in the post-MMX cleanup code for each pixel_depth resulted
|
||||
* in bad pixels at the beginning of some rows of some images, and also
|
||||
* (due to out-of-range memory reads and writes) caused heap corruption
|
||||
* when compiled with MSVC 6.0. The error was fixed in version 1.0.4e,
|
||||
* and the code appears to work completely correctly, so it is enabled
|
||||
* by default.
|
||||
*/
|
||||
if (1) /* all passes caused a heap problem in the old code */
|
||||
mmx_supported = 0;
|
||||
else
|
||||
#endif
|
||||
if (mmx_supported == 2)
|
||||
mmx_supported = mmxsupport();
|
||||
if (mmx_supported == 2) {
|
||||
png_mmx_support();
|
||||
}
|
||||
|
||||
if (row != NULL && row_info != NULL)
|
||||
{
|
||||
@ -1197,7 +1176,8 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
|
||||
// sign fix by GRR
|
||||
// NOTE: there is NO MMX code for 48-bit and 64-bit images
|
||||
|
||||
if (mmx_supported) // use MMX routine if machine supports it
|
||||
// use MMX routine if machine supports it
|
||||
if ( mmx_supported )
|
||||
{
|
||||
if (pixel_bytes == 3)
|
||||
{
|
||||
@ -1885,9 +1865,6 @@ loop4_pass4:
|
||||
(png_uint_32)row_info->pixel_depth + 7) >> 3);
|
||||
}
|
||||
|
||||
#ifdef DISABLE_PNGVCRD_INTERLACE
|
||||
mmx_supported = save_mmx_supported;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* PNG_READ_INTERLACING_SUPPORTED */
|
||||
@ -3323,7 +3300,7 @@ dsub3lp:
|
||||
case 1:
|
||||
{
|
||||
// Placed here just in case this is a duplicate of the
|
||||
// non-MMX code for the SUB filter in png_read_filter_row above
|
||||
// non-MMX code for the SUB filter in png_read_filter_row below
|
||||
//
|
||||
// png_bytep rp;
|
||||
// png_bytep lp;
|
||||
@ -3658,61 +3635,50 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
row, png_bytep prev_row, int filter)
|
||||
{
|
||||
#ifdef PNG_DEBUG
|
||||
char filnm[6];
|
||||
char filnm[10];
|
||||
#endif
|
||||
#define UseMMX 1
|
||||
|
||||
if (mmx_supported == 2)
|
||||
mmx_supported = mmxsupport();
|
||||
|
||||
if (!mmx_supported)
|
||||
{
|
||||
png_read_filter_row_c(png_ptr, row_info, row, prev_row, filter);
|
||||
return ;
|
||||
if (mmx_supported == 2) {
|
||||
png_mmx_support();
|
||||
}
|
||||
|
||||
#ifdef PNG_DEBUG
|
||||
png_debug(1, "in png_read_filter_row\n");
|
||||
# if (UseMMX == 1)
|
||||
png_debug1(0,"%s, ", "MMX");
|
||||
# else
|
||||
png_debug1(0,"%s, ", "x86");
|
||||
# endif
|
||||
switch (filter)
|
||||
{
|
||||
case 0: sprintf(filnm, "None ");
|
||||
case 0: sprintf(filnm, "none");
|
||||
break;
|
||||
case 1: sprintf(filnm, "Sub ");
|
||||
case 1: sprintf(filnm, "sub-%s", "MMX");
|
||||
break;
|
||||
case 2: sprintf(filnm, "Up ");
|
||||
case 2: sprintf(filnm, "up-%s", "MMX");
|
||||
break;
|
||||
case 3: sprintf(filnm, "Avg ");
|
||||
case 3: sprintf(filnm, "avg-%s", "MMX");
|
||||
break;
|
||||
case 4: sprintf(filnm, "Paeth");
|
||||
case 4: sprintf(filnm, "Paeth-%s", "MMX");
|
||||
break;
|
||||
default: sprintf(filnm, "Unknw");
|
||||
default: sprintf(filnm, "unknw");
|
||||
break;
|
||||
}
|
||||
png_debug2(0,"row=%5d, %s, ", png_ptr->row_number, filnm);
|
||||
png_debug2(0, "pd=%2d, b=%d, ", (int)row_info->pixel_depth,
|
||||
(int)((row_info->pixel_depth + 7) >> 3));
|
||||
png_debug1(0,"len=%8d, ", row_info->rowbytes);
|
||||
#endif
|
||||
#endif /* PNG_DEBUG */
|
||||
|
||||
switch (filter)
|
||||
{
|
||||
case PNG_FILTER_VALUE_NONE:
|
||||
break;
|
||||
|
||||
case PNG_FILTER_VALUE_SUB:
|
||||
{
|
||||
#if (UseMMX == 1)
|
||||
if ((row_info->pixel_depth > 8) &&
|
||||
(row_info->rowbytes >= 128) )
|
||||
if (
|
||||
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
|
||||
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
|
||||
{
|
||||
png_read_filter_row_mmx_sub(row_info, row);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
png_uint_32 i;
|
||||
png_uint_32 istop = row_info->rowbytes;
|
||||
@ -3725,41 +3691,43 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
*rp = (png_byte)(((int)(*rp) + (int)(*lp++)) & 0xff);
|
||||
rp++;
|
||||
}
|
||||
} //end !UseMMX
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case PNG_FILTER_VALUE_UP:
|
||||
{
|
||||
#if (UseMMX == 1)
|
||||
if ((row_info->pixel_depth > 8) &&
|
||||
(row_info->rowbytes >= 128) )
|
||||
if (
|
||||
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
|
||||
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
|
||||
{
|
||||
png_read_filter_row_mmx_up(row_info, row, prev_row);
|
||||
} //end if UseMMX
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
png_bytep rp;
|
||||
png_bytep pp;
|
||||
png_uint_32 i;
|
||||
for (i = 0, rp = row, pp = prev_row;
|
||||
i < row_info->rowbytes; i++, rp++, pp++)
|
||||
png_uint_32 istop = row_info->rowbytes;
|
||||
png_bytep rp = row;
|
||||
png_bytep pp = prev_row;
|
||||
|
||||
for (i = 0; i < istop; ++i)
|
||||
{
|
||||
*rp = (png_byte)(((int)(*rp) + (int)(*pp)) & 0xff);
|
||||
*rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
|
||||
rp++;
|
||||
}
|
||||
} //end !UseMMX
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case PNG_FILTER_VALUE_AVG:
|
||||
{
|
||||
#if (UseMMX == 1)
|
||||
if ((row_info->pixel_depth > 8) &&
|
||||
(row_info->rowbytes >= 128) )
|
||||
if (
|
||||
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
|
||||
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
|
||||
{
|
||||
png_read_filter_row_mmx_avg(row_info, row, prev_row);
|
||||
} //end if UseMMX
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
png_uint_32 i;
|
||||
png_bytep rp = row;
|
||||
@ -3781,19 +3749,19 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
((int)(*pp++ + *lp++) >> 1)) & 0xff);
|
||||
rp++;
|
||||
}
|
||||
} //end !UseMMX
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case PNG_FILTER_VALUE_PAETH:
|
||||
{
|
||||
#if (UseMMX == 1)
|
||||
if ((row_info->pixel_depth > 8) &&
|
||||
(row_info->rowbytes >= 128) )
|
||||
if (
|
||||
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
|
||||
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
|
||||
{
|
||||
png_read_filter_row_mmx_paeth(row_info, row, prev_row);
|
||||
} //end if UseMMX
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
png_uint_32 i;
|
||||
png_bytep rp = row;
|
||||
@ -3844,13 +3812,15 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
*rp = (png_byte)(((int)(*rp) + p) & 0xff);
|
||||
rp++;
|
||||
}
|
||||
} //end !UseMMX
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
png_warning(png_ptr, "Ignoring bad adaptive filter type");
|
||||
png_warning(png_ptr, "Ignoring bad row filter type");
|
||||
*row=0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED && PNG_USE_PNGVCRD */
|
||||
|
4
pngwio.c
4
pngwio.c
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngwio.c - functions for data output
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngwrite.c - general routines to write a PNG file
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngwtran.c - transforms the data in a row for PNG writers
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngwutil.c - utilities to write a PNG file
|
||||
*
|
||||
* libpng 1.0.9beta7 - December 28, 2000
|
||||
* libpng 1.0.9beta8 - January 12, 2001
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
Microsoft Developer Studio Build File, Format Version 6.00 for
|
||||
libpng 1.0.9beta7 (December 28, 2000) and zlib
|
||||
libpng 1.0.9beta8 (January 12, 2001) and zlib
|
||||
|
||||
Copyright (C) 2000 Simon-Pierre Cadieux
|
||||
For conditions of distribution and use, see copyright notice in png.h
|
||||
|
@ -6,7 +6,7 @@ LIBRARY
|
||||
DESCRIPTION "PNG image compression library for Windows"
|
||||
|
||||
EXPORTS
|
||||
;Version 1.0.9beta7
|
||||
;Version 1.0.9beta8
|
||||
png_build_grayscale_palette @1
|
||||
png_check_sig @2
|
||||
png_chunk_error @3
|
||||
|
@ -8,9 +8,9 @@ libpng for WindowsCE Rel.1.0
|
||||
|
||||
Introduction
|
||||
============
|
||||
This is libpng 1.0.9beta7 ported to WindowsCE 2.0 and 2.11.
|
||||
libpng 1.0.9beta7 is a PNG reference library.
|
||||
See README, a document of original libpng 1.0.9beta7.
|
||||
This is libpng 1.0.9beta8 ported to WindowsCE 2.0 and 2.11.
|
||||
libpng 1.0.9beta8 is a PNG reference library.
|
||||
See README, a document of original libpng 1.0.9beta8.
|
||||
|
||||
zlib for WindowsCE
|
||||
==================
|
||||
@ -23,7 +23,7 @@ This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
See README and LICENSE, documents of original libpng 1.0.9beta7, for conditions
|
||||
See README and LICENSE, documents of original libpng 1.0.9beta8, for conditions
|
||||
of use and distribution.
|
||||
|
||||
Files
|
||||
|
@ -24,7 +24,7 @@ libpng
|
||||
になったいかなる被害についても、作者、配布者、その他利用者以外の人物、
|
||||
団体に責任をとる義務はないものとします。
|
||||
|
||||
その他、このソフトウェアの利用条件については、原版である libpng 1.0.9beta7に
|
||||
その他、このソフトウェアの利用条件については、原版である libpng 1.0.9beta8に
|
||||
準拠するものとします。詳しくは、付属の README,LICENSE をお読みください。
|
||||
|
||||
収録内容
|
||||
|
0
projects/wince/grep
Normal file
0
projects/wince/grep
Normal file
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@
|
||||
LIBRARY lpngce
|
||||
|
||||
EXPORTS
|
||||
;Version 1.0.9beta7
|
||||
;Version 1.0.9beta8
|
||||
png_build_grayscale_palette @1
|
||||
png_check_sig @2
|
||||
png_chunk_error @3
|
||||
|
@ -571,7 +571,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
@ -584,7 +583,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
@ -597,7 +595,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
@ -610,7 +607,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
@ -623,7 +619,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
@ -636,7 +631,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
@ -649,7 +643,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
@ -662,7 +655,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
@ -675,7 +667,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
@ -688,7 +679,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
@ -701,7 +691,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
@ -714,7 +703,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
@ -727,7 +715,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
@ -740,7 +727,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
@ -753,7 +739,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
@ -766,7 +751,6 @@ DEP_CPP_PNGTE=\
|
||||
"..\..\..\zlib\zconf.h"\
|
||||
"..\..\..\zlib\zlib.h"\
|
||||
"..\..\png.h"\
|
||||
"..\..\pngasmrd.h"\
|
||||
"..\..\pngconf.h"\
|
||||
|
||||
NODEP_CPP_PNGTE=\
|
||||
|
@ -18,7 +18,7 @@ RM = rm -f
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 2
|
||||
PNGMIN = 1.0.9beta7
|
||||
PNGMIN = 1.0.9beta8
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
prefix=/usr/local
|
||||
|
@ -31,7 +31,7 @@ RANLIB=ranlib
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 2
|
||||
PNGMIN = 1.0.9beta7
|
||||
PNGMIN = 1.0.9beta8
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# where make install puts libpng.a, libpng.so*, and png.h
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
CC=gcc
|
||||
|
||||
# where "make install" puts libpng.a, libpng.so*, png.h and pngconf.h
|
||||
# where "make install" puts libpng.a, libpng.so*, png.h, and pngconf.h
|
||||
prefix=/usr
|
||||
|
||||
# Where the zlib library and include files are located
|
||||
@ -38,7 +38,7 @@ CFLAGS=-I$(ZLIBINC) -Wall -O3 $(ALIGN) -funroll-loops \
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 2
|
||||
PNGMIN = 1.0.9beta7
|
||||
PNGMIN = 1.0.9beta8
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
SHAREDLIB=cygpng$(PNGMAJ).dll
|
||||
@ -86,14 +86,14 @@ all-static: $(STATLIB) pngtest-stat$(EXE)
|
||||
|
||||
all-shared: $(SHAREDLIB) pngtest$(EXE)
|
||||
|
||||
pnggccrd.o: png.h pngconf.h pngasmrd.h
|
||||
pnggccrd.o: png.h pngconf.h
|
||||
@echo ""
|
||||
@echo ' You can ignore the single "control reaches end of non-void function"'
|
||||
@echo ' warning and multiple "<variable> defined but not used" warnings:'
|
||||
@echo ""
|
||||
$(CC) -c $(CFLAGS) -DPNG_STATIC -DZLIB_STATIC -o $@ $*.c
|
||||
|
||||
pnggccrd.pic.o: png.h pngconf.h pngasmrd.h
|
||||
pnggccrd.pic.o: png.h pngconf.h
|
||||
@echo ""
|
||||
@echo ' You can ignore the single "control reaches end of non-void function"'
|
||||
@echo ' warning and multiple "<variable> defined but not used" warnings:'
|
||||
@ -164,7 +164,7 @@ writelock:
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
|
||||
png.o png.pic.o: png.h pngconf.h png.c pngasmrd.h
|
||||
png.o png.pic.o: png.h pngconf.h png.c
|
||||
pngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c
|
||||
pngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c
|
||||
pngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c
|
||||
@ -173,7 +173,7 @@ pngset.o pngset.pic.o: png.h pngconf.h pngset.c
|
||||
pngget.o pngget.pic.o: png.h pngconf.h pngget.c
|
||||
pngread.o pngread.pic.o: png.h pngconf.h pngread.c
|
||||
pngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c
|
||||
pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c pngasmrd.h
|
||||
pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c
|
||||
pngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c
|
||||
pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c
|
||||
pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c
|
||||
|
@ -17,7 +17,7 @@ ZLIBINC=../zlib
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 2
|
||||
PNGMIN = 1.0.9beta7
|
||||
PNGMIN = 1.0.9beta8
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
CC=cc
|
||||
|
@ -1,13 +1,17 @@
|
||||
# makefile for libpng on Linux ELF with gcc using MMX assembler code
|
||||
# Copyright 1996-1997 Andreas Dilger
|
||||
# Copyright 1998-2000 Greg Roelofs
|
||||
# Copyright 1998-2001 Greg Roelofs
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
# CAUTION: Do not use this makefile with gcc versions 2.7.2.2 and earlier.
|
||||
|
||||
# NOTE: When testing MMX performance on a multitasking system, make sure
|
||||
# there are no floating-point programs (e.g., SETI@Home) running in
|
||||
# the background! Context switches between MMX and FPU are expensive.
|
||||
|
||||
CC=gcc
|
||||
|
||||
# where "make install" puts libpng.a, libpng.so*, png.h and pngconf.h
|
||||
# where "make install" puts libpng.a, libpng.so*, png.h, and pngconf.h
|
||||
prefix=/usr/local
|
||||
|
||||
# Where the zlib library and include files are located
|
||||
@ -26,8 +30,18 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
|
||||
|
||||
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
|
||||
|
||||
### for generic gcc:
|
||||
CFLAGS=-DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 $(ALIGN) -funroll-loops \
|
||||
-fomit-frame-pointer # $(WARNMORE) -g -DPNG_DEBUG=5
|
||||
### for gcc 2.95.2 on 686:
|
||||
#CFLAGS=-DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \
|
||||
# -mcpu=i686 -malign-double -ffast-math -fstrict-aliasing \
|
||||
# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer
|
||||
### for gcc 2.7.2.3 on 486 and up:
|
||||
#CFLAGS=-DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \
|
||||
# -m486 -malign-double -ffast-math \
|
||||
# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer
|
||||
|
||||
LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm
|
||||
LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
|
||||
|
||||
@ -37,7 +51,7 @@ RANLIB=ranlib
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 2
|
||||
PNGMIN = 1.0.9beta7
|
||||
PNGMIN = 1.0.9beta8
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
@ -56,19 +70,21 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
|
||||
all: libpng.a libpng.so pngtest pngtest-static
|
||||
|
||||
pnggccrd.o: pnggccrd.c png.h pngconf.h pngasmrd.h
|
||||
pnggccrd.o: pnggccrd.c png.h pngconf.h
|
||||
@echo ""
|
||||
@echo ' You can ignore the single "control reaches end of non-void function"'
|
||||
@echo ' warning and multiple "<variable> defined but not used" warnings:'
|
||||
@echo ""
|
||||
$(CC) -c $(CFLAGS) -o $@ $*.c
|
||||
@echo ""
|
||||
|
||||
pnggccrd.pic.o: pnggccrd.c png.h pngconf.h pngasmrd.h
|
||||
pnggccrd.pic.o: pnggccrd.c png.h pngconf.h
|
||||
@echo ""
|
||||
@echo ' You can ignore the single "control reaches end of non-void function"'
|
||||
@echo ' warning and multiple "<variable> defined but not used" warnings:'
|
||||
@echo ""
|
||||
$(CC) -c $(CFLAGS) -fPIC -o $@ pnggccrd.c
|
||||
@echo ""
|
||||
|
||||
libpng.a: $(OBJS)
|
||||
ar rc $@ $(OBJS)
|
||||
@ -118,7 +134,7 @@ DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||
writelock:
|
||||
chmod a-w *.[ch35] $(DOCS) scripts/*
|
||||
|
||||
png.o png.pic.o: png.h pngconf.h png.c pngasmrd.h
|
||||
png.o png.pic.o: png.h pngconf.h png.c
|
||||
pngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c
|
||||
pngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c
|
||||
pngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c
|
||||
@ -127,7 +143,7 @@ pngset.o pngset.pic.o: png.h pngconf.h pngset.c
|
||||
pngget.o pngget.pic.o: png.h pngconf.h pngget.c
|
||||
pngread.o pngread.pic.o: png.h pngconf.h pngread.c
|
||||
pngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c
|
||||
pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c pngasmrd.h
|
||||
pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c
|
||||
pngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c
|
||||
pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c
|
||||
pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c
|
||||
|
@ -18,7 +18,7 @@ RANLIB=ranlib
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 2
|
||||
PNGMIN = 1.0.9beta7
|
||||
PNGMIN = 1.0.9beta8
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# where make install puts libpng.a and png.h
|
||||
|
@ -70,7 +70,7 @@ pngrtran$(O): png.h pngconf.h
|
||||
pngrutil$(O): png.h pngconf.h
|
||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngvcrd$(O): png.h pngconf.h pngasmrd.h
|
||||
pngvcrd$(O): png.h pngconf.h
|
||||
$(CC) $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngerror$(O): png.h pngconf.h
|
||||
|
@ -34,7 +34,7 @@ RANLIB=ranlib
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 2
|
||||
PNGMIN = 1.0.9beta7
|
||||
PNGMIN = 1.0.9beta8
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
@ -25,7 +25,7 @@ RANLIB=echo
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 2
|
||||
PNGMIN = 1.0.9beta7
|
||||
PNGMIN = 1.0.9beta8
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
@ -13,14 +13,14 @@ ZLIBINC=/usr/local/include
|
||||
|
||||
CC=gcc
|
||||
|
||||
WARNMORE=
|
||||
CFLAGS=-I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32 # -g -DPNG_DEBUG=5
|
||||
WARNMORE= # -g -DPNG_DEBUG=5
|
||||
CFLAGS=-I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32
|
||||
# zlib must also be compiled with n32
|
||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||
LDSHARED=gcc -shared
|
||||
|
||||
VER=1.0.9beta7
|
||||
LIBS=libpng.so.1.0.9beta7
|
||||
VER=1.0.9beta8
|
||||
LIBS=libpng.so.1.0.9beta8
|
||||
SHAREDLIB=libpng.so
|
||||
libdir=$(prefix)/lib32
|
||||
|
||||
|
@ -31,7 +31,7 @@ RANLIB=echo
|
||||
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
|
||||
# have to change it.
|
||||
PNGMAJ = 2
|
||||
PNGMIN = 1.0.9beta7
|
||||
PNGMIN = 1.0.9beta8
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
@ -46,10 +46,10 @@ pngpread$(O): png.h pngconf.h
|
||||
pngrtran$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngrutil$(O): png.h pngconf.h pngasmrd.h
|
||||
pngrutil$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngvcrd$(O): png.h pngconf.h pngasmrd.h
|
||||
pngvcrd$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngerror$(O): png.h pngconf.h
|
||||
|
@ -42,7 +42,7 @@ pngpread$(O): png.h pngconf.h
|
||||
pngrtran$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngrutil$(O): png.h pngconf.h pngasmrd.h
|
||||
pngrutil$(O): png.h pngconf.h
|
||||
$(CC) -c $(CFLAGS) $*.c $(ERRFILE)
|
||||
|
||||
pngerror$(O): png.h pngconf.h
|
||||
|
@ -5,7 +5,7 @@ unit pngdef;
|
||||
interface
|
||||
|
||||
const
|
||||
PNG_LIBPNG_VER_STRING = '1.0.9beta7';
|
||||
PNG_LIBPNG_VER_STRING = '1.0.9beta8';
|
||||
PNG_LIBPNG_VER = 10009;
|
||||
|
||||
type
|
||||
|
Reference in New Issue
Block a user