Imported from libpng-1.0.8beta1.tar
This commit is contained in:
parent
3d5a520610
commit
316f97a063
10
ANNOUNCE
10
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.0.7 - July 1, 2000
|
||||
Libpng 1.0.8beta1 - July 8, 2000
|
||||
|
||||
This is a public release of libpng, intended for use in production codes.
|
||||
|
||||
@ -96,6 +96,14 @@ Changes since the last public release (1.0.6):
|
||||
Removed leading underscores from "_PNG_H" and "_PNG_SAVE_BSD_SOURCE" macros.
|
||||
Fixed bugs in pngwrite.c and pngwutil.c that prevented writing iCCP chunks.
|
||||
Revised the definition of "trans_values" in libpng.3/libpng.txt
|
||||
Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks.
|
||||
Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and
|
||||
pngwutil.c.
|
||||
Changed PNG_EXPORT_VAR to use PNG_IMPEXP, in pngconf.h.
|
||||
Removed unused "#include <assert.h>" from png.c
|
||||
Added WindowsCE support.
|
||||
Revised pnggccrd.c to work with gcc-2.95.2 and in the Cygwin environment.
|
||||
|
||||
|
||||
Send comments/corrections/commendations to
|
||||
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
|
||||
|
8
CHANGES
8
CHANGES
@ -797,6 +797,14 @@ version 1.0.7rc2 [June 28, 2000]
|
||||
Fixed "DJBPP" typo in pnggccrd.c introduced in beta18.
|
||||
version 1.0.7 [July 1, 2000]
|
||||
Revised the definition of "trans_values" in libpng.3/libpng.txt
|
||||
version 1.0.8beta1 [July 8, 2000]
|
||||
Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks.
|
||||
Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and
|
||||
pngwutil.c.
|
||||
Changed PNG_EXPORT_VAR to use PNG_IMPEXP, in pngconf.h.
|
||||
Removed unused "#include <assert.h>" from png.c
|
||||
Added WindowsCE support.
|
||||
Revised pnggccrd.c to work with gcc-2.95.2 and in the Cygwin environment.
|
||||
|
||||
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.7 - July 1, 2000
|
||||
Installing libpng version 1.0.8beta1 - July 8, 2000
|
||||
|
||||
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.7" or "lpng107" and "zlib-1.1.3"
|
||||
might be called "libpng-1.0.8beta1" or "lpng107" and "zlib-1.1.3"
|
||||
or "zlib113") so that you have directories called "zlib" and "libpng".
|
||||
|
||||
Your directory structure should look like this:
|
||||
@ -54,8 +54,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.7)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.7,
|
||||
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8beta1)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8beta1,
|
||||
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
|
||||
@ -67,9 +67,9 @@ include
|
||||
makefile.intel => Intel C/C++ version 4.0 and later
|
||||
libpng.icc => Project file for IBM VisualAge/C++ version 4.0 or later
|
||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.7)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.8beta1)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.7)
|
||||
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.8beta1)
|
||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||
makefile.mips => MIPS makefile
|
||||
makefile.acorn => Acorn makefile
|
||||
|
53
KNOWNBUG
53
KNOWNBUG
@ -1,7 +1,48 @@
|
||||
|
||||
Known bugs and suggested enhancements in libpng-1.0.7
|
||||
|
||||
1. March 15, 1998 -- OPTIMIZATION -- Kevin Bracey
|
||||
1. July 2, 2000 -- BUG -- pnggccrd.c
|
||||
|
||||
Some programs compiled with PNG_USE_PNGGCCRD crash in pnggccrd.c.
|
||||
Also, pnggccrd.c will not compile under gcc-2.95-2.
|
||||
|
||||
STATUS: Under investigation. Experts on MMX assembler code are
|
||||
invited to help with the debugging. Note that pngvcrd.c works fine.
|
||||
|
||||
2. July 3, 2000 -- BUG -- MEMORY LEAK
|
||||
|
||||
There is a memory leak in pngpread.c; it doesn't free "key".
|
||||
|
||||
STATUS: Fixed in libpng-1.0.8beta1, by adding.
|
||||
|
||||
png_free(png_ptr, text_ptr);
|
||||
|
||||
after lines 1221 and 1038 in pngpread.c
|
||||
|
||||
3. July 3, 2000 -- BUG -- PNG_EXPORT_VAR
|
||||
|
||||
The definition of PNG_EXPORT_VAR, in pngconf.h, should be
|
||||
# define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
|
||||
|
||||
STATUS: Fixed in libpng-1.0.8beta1.
|
||||
|
||||
4. July 3, 2000 -- BUG -- PNG_NO_STDIO
|
||||
|
||||
Several places in pngrutil.c and pngwutil.c, there are printf statements
|
||||
inside PNG_NO_STDIO blocks (should be PNG_NO_CONSOLE_IO)
|
||||
|
||||
STATUS: Fixed in libpng-1.0.8beta1.
|
||||
|
||||
5. July 3, 2000 -- ENHANCEMENT -- WindowsCE support
|
||||
|
||||
Libpng-1.0.7 does not support WindowsCE.
|
||||
|
||||
STATUS: Libpng-1.0.8 and libpng-2.0.0 will support WindowsCE. A
|
||||
new typedef, png_file_p, will be added which is normally FILE * but
|
||||
will be HANDLE if libpng is being built for WindowsCE. Other patches
|
||||
required for WindowsCE support have been provided and will be applied.
|
||||
|
||||
6. March 15, 1998 -- OPTIMIZATION -- Kevin Bracey
|
||||
|
||||
Loops need to be optimized everywhere
|
||||
|
||||
@ -14,9 +55,9 @@ Known bugs and suggested enhancements in libpng-1.0.7
|
||||
|
||||
STATUS: Under investigation, postponed until after
|
||||
libpng-1.1.0. About 160 loops will be turned around
|
||||
in libpng-1.1.Nn, for testing.
|
||||
in libpng-2.0.x betaxx, for testing.
|
||||
|
||||
2. July 4, 1998 -- ENHANCEMENT -- Glenn R-P
|
||||
7. July 4, 1998 -- ENHANCEMENT -- Glenn R-P
|
||||
|
||||
libpng-1.0.5 and earlier transform colors to gamma=1.0 space for
|
||||
merging with background, and then back to the image's gamma. The
|
||||
@ -28,14 +69,12 @@ Known bugs and suggested enhancements in libpng-1.0.7
|
||||
|
||||
STATUS: under development.
|
||||
|
||||
3. September 1999 -- ENHANCEMENT --
|
||||
8. September 1999 -- ENHANCEMENT --
|
||||
|
||||
It should be possible to use libpng without floating-point aritmetic.
|
||||
|
||||
STATUS: Under investigation, implementation postponed until after
|
||||
libpng-1.0.7. The application interface will change because replacements
|
||||
for the png_set_gAMA(), png_set_cHRM(), and corresponding png_get_()
|
||||
functions will be needed.
|
||||
libpng-1.0.7.
|
||||
|
||||
Much of this was completed in libpng-1.0.6, but gamma compensation
|
||||
is not yet done in fixed-point arithmetic.
|
||||
|
4
LICENSE
4
LICENSE
@ -4,7 +4,7 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
||||
If you modify libpng you may insert additional notices immediately following
|
||||
this sentence.
|
||||
|
||||
libpng version 1.0.7, July 1, 2000 is Copyright (c) 2000 Glenn Randers-Pehrson
|
||||
libpng version 1.0.8beta1, July 8, 2000 is Copyright (c) 2000 Glenn Randers-Pehrson
|
||||
Distributed according to the same disclaimer and license as libpng-1.0.6
|
||||
with the following individuals added to the list of Contributing Authors
|
||||
|
||||
@ -94,4 +94,4 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
randeg@alum.rpi.edu
|
||||
July 1, 2000
|
||||
July 8, 2000
|
||||
|
10
README
10
README
@ -1,4 +1,4 @@
|
||||
README for libpng 1.0.7 - July 1, 2000 (shared library 2.1)
|
||||
README for libpng 1.0.8beta1 - July 8, 2000 (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.
|
||||
@ -176,9 +176,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.7)
|
||||
(gcc, creates libpng.so.2.1.0.8beta1)
|
||||
makefile.gcmmx => Linux/ELF makefile (gcc, creates
|
||||
libpng.so.2.1.0.7, uses assembler code
|
||||
libpng.so.2.1.0.8beta1, 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
|
||||
@ -190,10 +190,10 @@ Files in this distribution:
|
||||
makefile.intel => Intel C/C++ version 4.0 and later
|
||||
libpng.icc => Project file, IBM VisualAge/C++ 4.0 or later
|
||||
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.7)
|
||||
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.8beta1)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.solaris => Solaris 2.X makefile
|
||||
(gcc, creates libpng.so.2.1.0.7)
|
||||
(gcc, creates libpng.so.2.1.0.8beta1)
|
||||
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:
|
||||
=========================
|
||||
|
||||
July 1, 2000
|
||||
July 8, 2000
|
||||
|
||||
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.7 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.8beta1 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.7. Instead, please
|
||||
There is no \"configure\" script for Libpng-1.0.8beta1. Instead, please
|
||||
copy the appropriate makefile for your system from the \"scripts\"
|
||||
directory. Read the INSTALL file for more details.
|
||||
"
|
||||
|
16
libpng.3
16
libpng.3
@ -1,6 +1,6 @@
|
||||
.TH LIBPNG 3 "July 1, 2000"
|
||||
.TH LIBPNG 3 "July 8, 2000"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.7
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8beta1
|
||||
.SH SYNOPSIS
|
||||
\fI\fB
|
||||
|
||||
@ -747,7 +747,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.7 - July 1, 2000
|
||||
libpng version 1.0.8beta1 - July 8, 2000
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<randeg@alum.rpi.edu>
|
||||
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
@ -3381,13 +3381,13 @@ application:
|
||||
|
||||
.SH VII. Y2K Compliance in libpng
|
||||
|
||||
July 1, 2000
|
||||
July 8, 2000
|
||||
|
||||
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.7 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.8beta1 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
|
||||
@ -3528,7 +3528,7 @@ possible without all of you.
|
||||
|
||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
|
||||
Libpng version 1.0.7 - July 1, 2000:
|
||||
Libpng version 1.0.8beta1 - July 8, 2000:
|
||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||
Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
|
||||
|
||||
@ -3541,7 +3541,7 @@ Supported by the PNG development group
|
||||
If you modify libpng you may insert additional notices immediately following
|
||||
this sentence.
|
||||
|
||||
libpng version 1.0.7, July 1, 2000 is
|
||||
libpng version 1.0.8beta1, July 8, 2000 is
|
||||
Copyright (c) 2000 Glenn Randers-Pehrson
|
||||
Distributed according to the same disclaimer and license as libpng-1.0.6
|
||||
with the following individuals added to the list of Contributing Authors
|
||||
@ -3632,7 +3632,7 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
randeg@alum.rpi.edu
|
||||
July 1, 2000
|
||||
July 8, 2000
|
||||
|
||||
.\" end of man page
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
libpng.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.0.7 - July 1, 2000
|
||||
libpng version 1.0.8beta1 - July 8, 2000
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<randeg@alum.rpi.edu>
|
||||
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
@ -2634,13 +2634,13 @@ application:
|
||||
|
||||
VII. Y2K Compliance in libpng
|
||||
|
||||
July 1, 2000
|
||||
July 8, 2000
|
||||
|
||||
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.7 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.0.8beta1 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 "July 1, 2000"
|
||||
.TH LIBPNGPF 3 "July 8, 2000"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.7
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8beta1
|
||||
(private functions)
|
||||
.SH SYNOPSIS
|
||||
\fB#include <png.h>\fP
|
||||
|
@ -1,5 +1,5 @@
|
||||
Microsoft Developer Studio Build File, Format Version 6.00 for
|
||||
libpng 1.0.7 (July 1, 2000) and zlib
|
||||
libpng 1.0.8beta1 (July 8, 2000) 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.7
|
||||
;Version 1.0.8beta1
|
||||
png_build_grayscale_palette @1
|
||||
png_check_sig @2
|
||||
png_chunk_error @3
|
||||
|
2
png.5
2
png.5
@ -1,4 +1,4 @@
|
||||
.TH PNG 5 "July 1, 2000"
|
||||
.TH PNG 5 "July 8, 2000"
|
||||
.SH NAME
|
||||
png \- Portable Network Graphics (PNG) format
|
||||
.SH DESCRIPTION
|
||||
|
29
png.c
29
png.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* png.c - location for general purpose libpng functions
|
||||
*
|
||||
* libpng version 1.0.7 - July 1, 2000
|
||||
* libpng version 1.0.8beta1 - July 8, 2000
|
||||
* Copyright (c) 1998, 1999, 2000 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.)
|
||||
@ -10,18 +10,17 @@
|
||||
|
||||
#define PNG_INTERNAL
|
||||
#define PNG_NO_EXTERN
|
||||
#include <assert.h>
|
||||
#include "png.h"
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef version_1_0_7 Your_png_h_is_not_version_1_0_7;
|
||||
typedef version_1_0_8beta1 Your_png_h_is_not_version_1_0_8beta1;
|
||||
|
||||
/* 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 */
|
||||
char png_libpng_ver[12] = "1.0.7";
|
||||
char png_libpng_ver[12] = "1.0.8beta1";
|
||||
|
||||
/* png_sig was changed to a function in version 1.0.5c */
|
||||
/* Place to hold the signature string for a PNG file. */
|
||||
@ -548,7 +547,7 @@ png_get_io_ptr(png_structp png_ptr)
|
||||
* necessarily available.
|
||||
*/
|
||||
void PNGAPI
|
||||
png_init_io(png_structp png_ptr, FILE *fp)
|
||||
png_init_io(png_structp png_ptr, png_FILE_p fp)
|
||||
{
|
||||
png_debug(1, "in png_init_io\n");
|
||||
png_ptr->io_ptr = (png_voidp)fp;
|
||||
@ -572,6 +571,17 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
|
||||
sizeof(char)));
|
||||
}
|
||||
|
||||
#if defined(_WIN32_WCE)
|
||||
{
|
||||
wchar_t time_buf[29];
|
||||
wsprintf(time_buf, TEXT("%d %S %d %02d:%02d:%02d +0000"),
|
||||
ptime->day % 32, short_months[(ptime->month - 1) % 12],
|
||||
ptime->year, ptime->hour % 24, ptime->minute % 60,
|
||||
ptime->second % 61);
|
||||
WideCharToMultiByte(CP_ACP, 0, time_buf, -1, png_ptr->time_buffer, 29,
|
||||
NULL, NULL);
|
||||
}
|
||||
#else
|
||||
#ifdef USE_FAR_KEYWORD
|
||||
{
|
||||
char near_time_buf[29];
|
||||
@ -588,6 +598,7 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
|
||||
ptime->year, ptime->hour % 24, ptime->minute % 60,
|
||||
ptime->second % 61);
|
||||
#endif
|
||||
#endif /* _WIN32_WCE */
|
||||
return ((png_charp)png_ptr->time_buffer);
|
||||
}
|
||||
#endif /* PNG_TIME_RFC1123_SUPPORTED */
|
||||
@ -605,7 +616,7 @@ png_charp PNGAPI
|
||||
png_get_copyright(png_structp png_ptr)
|
||||
{
|
||||
if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */
|
||||
return ("\n libpng version 1.0.7 - July 1, 2000\n\
|
||||
return ("\n libpng version 1.0.8beta1 - July 8, 2000\n\
|
||||
Copyright (c) 1998-2000 Glenn Randers-Pehrson\n\
|
||||
Copyright (c) 1996, 1997 Andreas Dilger\n\
|
||||
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n");
|
||||
@ -623,8 +634,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("1.0.7");
|
||||
return("1.0.7");
|
||||
return("1.0.8beta1");
|
||||
return("1.0.8beta1");
|
||||
}
|
||||
|
||||
png_charp PNGAPI
|
||||
@ -673,5 +684,5 @@ png_uint_32 PNGAPI
|
||||
png_access_version_number(void)
|
||||
{
|
||||
/* Version of *.c files used when building libpng */
|
||||
return((png_uint_32) 10007L);
|
||||
return((png_uint_32) 10008L);
|
||||
}
|
||||
|
27
png.h
27
png.h
@ -1,7 +1,7 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.0.7 - July 1, 2000
|
||||
* libpng version 1.0.8beta1 - July 8, 2000
|
||||
* Copyright (c) 1998, 1999, 2000 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.)
|
||||
@ -9,7 +9,7 @@
|
||||
* 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.7 - July 1, 2000: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.0.8beta1 - July 8, 2000: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@ -81,7 +81,7 @@
|
||||
* If you modify libpng you may insert additional notices immediately following
|
||||
* this sentence.
|
||||
*
|
||||
* libpng version 1.0.7, July 1, 2000, is
|
||||
* libpng version 1.0.8beta1, July 8, 2000, is
|
||||
* Copyright (c) 2000 Glenn Randers-Pehrson
|
||||
* Distributed according to the same disclaimer and license as libpng-1.0.6
|
||||
* with the following individuals added to the list of Contributing Authors
|
||||
@ -186,13 +186,13 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* July 1, 2000
|
||||
* July 8, 2000
|
||||
*
|
||||
* 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.7 are Y2K compliant. It is my belief that earlier
|
||||
* upward through 1.0.8beta1 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
|
||||
@ -248,24 +248,24 @@
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.0.7"
|
||||
#define PNG_LIBPNG_VER_STRING "1.0.8beta1"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 2
|
||||
|
||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||
#define PNG_LIBPNG_VER_MAJOR 1
|
||||
#define PNG_LIBPNG_VER_MINOR 0
|
||||
#define PNG_LIBPNG_VER_RELEASE 7
|
||||
#define PNG_LIBPNG_VER_RELEASE 8
|
||||
/* This should match the numeric part of the final component of
|
||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
|
||||
#define PNG_LIBPNG_VER_BUILD 0
|
||||
#define PNG_LIBPNG_VER_BUILD 1
|
||||
|
||||
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
|
||||
* We must not include leading zeros.
|
||||
* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
|
||||
* version 1.0.0 was mis-numbered 100 instead of 10000). From
|
||||
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */
|
||||
#define PNG_LIBPNG_VER 10007 /* 1.0.7 */
|
||||
#define PNG_LIBPNG_VER 10008 /* 1.0.8 */
|
||||
|
||||
/* Note to maintainer: update this number in scripts/pngdef.pas as well */
|
||||
|
||||
@ -1147,9 +1147,9 @@ 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.7
|
||||
and png.h are both at * version 1.0.8beta1
|
||||
*/
|
||||
typedef png_structp version_1_0_7;
|
||||
typedef png_structp version_1_0_8beta1;
|
||||
|
||||
typedef png_struct FAR * FAR * png_structpp;
|
||||
|
||||
@ -1248,6 +1248,8 @@ extern PNG_EXPORT(png_charp,png_convert_to_rfc1123)
|
||||
PNGARG((png_structp png_ptr, png_timep ptime));
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32_WCE)
|
||||
/* "time.h" functions are not supported on WindowsCE */
|
||||
#if defined(PNG_WRITE_tIME_SUPPORTED)
|
||||
/* convert from a struct tm to png_time */
|
||||
extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime,
|
||||
@ -1257,6 +1259,7 @@ extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime,
|
||||
extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime,
|
||||
time_t ttime));
|
||||
#endif /* PNG_WRITE_tIME_SUPPORTED */
|
||||
#endif /* _WIN32_WCE */
|
||||
|
||||
#if defined(PNG_READ_EXPAND_SUPPORTED)
|
||||
/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
|
||||
@ -2168,7 +2171,7 @@ extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr)
|
||||
extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr));
|
||||
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.0.7 - July 1, 2000 (header)\n"
|
||||
" libpng version 1.0.8beta1 - July 8, 2000 (header)\n"
|
||||
|
||||
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
|
||||
/* With these routines we avoid an integer divide, which will be slower on
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* pngasmrd.h - assembler version of utilities to read a PNG file
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1999, 2000 Glenn Randers-Pehrson
|
||||
*
|
||||
|
30
pngconf.h
30
pngconf.h
@ -1,6 +1,6 @@
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -62,6 +62,15 @@
|
||||
* #define PNG_NO_STDIO
|
||||
*/
|
||||
|
||||
#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
|
||||
#endif
|
||||
|
||||
#ifdef PNG_BUILD_DLL
|
||||
# ifndef PNG_CONSOLE_IO_SUPPORTED
|
||||
# ifndef PNG_NO_CONSOLE_IO
|
||||
@ -80,7 +89,10 @@
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
# include <stdio.h>
|
||||
# if !defined(_WIN32_WCE)
|
||||
/* "stdio.h" functions are not supported on WindowsCE */
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* This macro protects us against machines that don't have function
|
||||
@ -118,7 +130,7 @@
|
||||
#endif
|
||||
|
||||
/* enough people need this for various reasons to include it here */
|
||||
#if !defined(MACOS) && !defined(RISCOS)
|
||||
#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
@ -799,7 +811,10 @@ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
|
||||
|
||||
/* need the time information for reading tIME chunks */
|
||||
#if defined(PNG_tIME_SUPPORTED)
|
||||
# include <time.h>
|
||||
# if !defined(_WIN32_WCE)
|
||||
/* "time.h" functions are not supported on WindowsCE */
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Some typedefs to get us started. These should be safe on most of the
|
||||
@ -896,6 +911,11 @@ typedef png_int_16 FAR * png_int_16p;
|
||||
typedef PNG_CONST char FAR * png_const_charp;
|
||||
typedef char FAR * png_charp;
|
||||
typedef png_fixed_point FAR * png_fixed_point_p;
|
||||
#if defined(_WIN32_WCE)
|
||||
typedef HANDLE png_FILE_p;
|
||||
#else
|
||||
typedef FILE * png_FILE_p;
|
||||
#endif
|
||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
typedef double FAR * png_doublep;
|
||||
#endif
|
||||
@ -1021,7 +1041,7 @@ typedef z_stream FAR * png_zstreamp;
|
||||
|
||||
#ifdef PNG_USE_GLOBAL_ARRAYS
|
||||
#ifndef PNG_EXPORT_VAR
|
||||
# define PNG_EXPORT_VAR(type) extern type
|
||||
# define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngerror.c - stub functions for i/o and memory allocation
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
549
pnggccrd.c
549
pnggccrd.c
@ -6,7 +6,7 @@
|
||||
* 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.7 - July 1, 2000
|
||||
* libpng version 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, Intel Corporation
|
||||
@ -122,11 +122,33 @@
|
||||
* - fixed up both versions of mmxsupport() (ORIG_THAT_USED_TO_CLOBBER_EBX
|
||||
* macro determines which is used); original not yet tested.
|
||||
*
|
||||
* 20000213:
|
||||
* - When compiling with gcc, be sure to use -fomit-frame-pointer
|
||||
*
|
||||
* 20000319:
|
||||
* - fixed a register-name typo in png_do_read_interlace(), default (MMX) case,
|
||||
* pass == 4 or 5, that caused visible corruption of interlaced images
|
||||
*
|
||||
* - When compiling with gcc, be sure to use -fomit-frame-pointer
|
||||
* 20000623:
|
||||
* - Various problems were reported with gcc 2.95.2 in the Cygwin environment,
|
||||
* many of the form "forbidden register 0 (ax) was spilled for class AREG."
|
||||
* This is explained at http://gcc.gnu.org/fom_serv/cache/23.html, and
|
||||
* Chuck Wilson supplied a patch involving dummy output registers. See
|
||||
* http://sourceforge.net/bugs/?func=detailbug&bug_id=108741&group_id=5624
|
||||
* for the original (anonymous) SourceForge bug report.
|
||||
*
|
||||
* 20000706:
|
||||
* - Chuck Wilson passed along these remaining gcc 2.95.2 errors:
|
||||
* pnggccrd.c: In function `png_combine_row':
|
||||
* pnggccrd.c:525: more than 10 operands in `asm'
|
||||
* pnggccrd.c:669: more than 10 operands in `asm'
|
||||
* pnggccrd.c:828: more than 10 operands in `asm'
|
||||
* pnggccrd.c:994: more than 10 operands in `asm'
|
||||
* pnggccrd.c:1177: more than 10 operands in `asm'
|
||||
* They are all the same problem and can be worked around by using the
|
||||
* global _unmask variable unconditionally, not just in the -fPIC case.
|
||||
* Apparently earlier versions of gcc also have the problem with more than
|
||||
* 10 operands; they just don't report it. Much strangeness ensues, etc.
|
||||
*/
|
||||
|
||||
#define PNG_INTERNAL
|
||||
@ -174,9 +196,13 @@ static const int png_pass_width[7] = {8, 4, 4, 2, 2, 1, 1};
|
||||
/* These constants are used in the inlined MMX assembly code.
|
||||
Ignore gcc's "At top level: defined but not used" warnings. */
|
||||
|
||||
#ifdef __PIC__
|
||||
static int _unmask; // not enough regs when compiling with -fPIC, so...
|
||||
#endif
|
||||
/* GRR 20000706: originally _unmask was needed only when compiling with -fPIC,
|
||||
* since that case uses the %ebx register for indexing the Global Offset Table
|
||||
* and there were no other registers available. But gcc 2.95 and later emit
|
||||
* "more than 10 operands in `asm'" errors when %ebx is used to preload unmask
|
||||
* in the non-PIC case, so we'll just use the global unconditionally now.
|
||||
*/
|
||||
static int _unmask;
|
||||
|
||||
static unsigned long long _mask8_0 = 0x0102040810204080LL;
|
||||
|
||||
@ -430,23 +456,19 @@ fflush(stderr);
|
||||
{
|
||||
png_uint_32 len;
|
||||
int diff;
|
||||
#ifndef __PIC__
|
||||
int unmask = ~mask;
|
||||
#else
|
||||
int dummy_value_a; // fix 'forbidden register spilled' error
|
||||
int dummy_value_d;
|
||||
int dummy_value_c;
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
_unmask = ~mask; // global variable for -fPIC version
|
||||
#endif
|
||||
srcptr = png_ptr->row_buf + 1;
|
||||
dstptr = row;
|
||||
len = png_ptr->width &~7; // reduce to multiple of 8
|
||||
diff = png_ptr->width & 7; // amount lost
|
||||
|
||||
__asm__ (
|
||||
#ifdef __PIC__
|
||||
__asm__ __volatile__ (
|
||||
"movd _unmask, %%mm7 \n\t" // load bit pattern
|
||||
#else
|
||||
// preload "movd unmask, %%mm7 \n\t" // (unmask is in ebx)
|
||||
"movd %%ebx, %%mm7 \n\t" // load bit pattern (unmask)
|
||||
#endif
|
||||
"psubb %%mm6, %%mm6 \n\t" // zero mm6
|
||||
"punpcklbw %%mm7, %%mm7 \n\t"
|
||||
"punpcklwd %%mm7, %%mm7 \n\t"
|
||||
@ -498,21 +520,22 @@ fflush(stderr);
|
||||
"end8: \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=a" (dummy_value_a), // output regs (dummy)
|
||||
"=d" (dummy_value_d),
|
||||
"=c" (dummy_value_c),
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (srcptr), // esi // input regs
|
||||
"D" (dstptr), // edi
|
||||
"a" (diff), // eax
|
||||
#ifndef __PIC__
|
||||
"b" (unmask), // ebx // Global Offset Table idx
|
||||
#endif
|
||||
"c" (len), // ecx
|
||||
"d" (mask) // edx
|
||||
: "3" (srcptr), // esi // input regs
|
||||
"4" (dstptr), // edi
|
||||
"0" (diff), // eax
|
||||
// was (unmask) "b" RESERVED // ebx // Global Offset Table idx
|
||||
"2" (len), // ecx
|
||||
"1" (mask) // edx
|
||||
|
||||
: "%esi", "%edi", "%eax", // clobber list
|
||||
"%ecx", "%edx"
|
||||
// : // clobber list
|
||||
#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm4", "%mm6", "%mm7"
|
||||
: "%mm0", "%mm4", "%mm6", "%mm7"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -550,23 +573,19 @@ fflush(stderr);
|
||||
{
|
||||
png_uint_32 len;
|
||||
int diff;
|
||||
#ifndef __PIC__
|
||||
int unmask = ~mask;
|
||||
#else
|
||||
int dummy_value_a; // fix 'forbidden register spilled' error
|
||||
int dummy_value_d;
|
||||
int dummy_value_c;
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
_unmask = ~mask; // global variable for -fPIC version
|
||||
#endif
|
||||
srcptr = png_ptr->row_buf + 1;
|
||||
dstptr = row;
|
||||
len = png_ptr->width &~7; // reduce to multiple of 8
|
||||
diff = png_ptr->width & 7; // amount lost
|
||||
|
||||
__asm__ (
|
||||
#ifdef __PIC__
|
||||
__asm__ __volatile__ (
|
||||
"movd _unmask, %%mm7 \n\t" // load bit pattern
|
||||
#else
|
||||
// preload "movd unmask, %%mm7 \n\t" // (unmask is in ebx)
|
||||
"movd %%ebx, %%mm7 \n\t" // load bit pattern (unmask)
|
||||
#endif
|
||||
"psubb %%mm6, %%mm6 \n\t" // zero mm6
|
||||
"punpcklbw %%mm7, %%mm7 \n\t"
|
||||
"punpcklwd %%mm7, %%mm7 \n\t"
|
||||
@ -633,21 +652,22 @@ fflush(stderr);
|
||||
"end16: \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=a" (dummy_value_a), // output regs (dummy)
|
||||
"=d" (dummy_value_d),
|
||||
"=c" (dummy_value_c),
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (srcptr), // esi // input regs
|
||||
"D" (dstptr), // edi
|
||||
"a" (diff), // eax
|
||||
#ifndef __PIC__
|
||||
"b" (unmask), // ebx // Global Offset Table idx
|
||||
#endif
|
||||
"c" (len), // ecx
|
||||
"d" (mask) // edx
|
||||
: "3" (srcptr), // esi // input regs
|
||||
"4" (dstptr), // edi
|
||||
"0" (diff), // eax
|
||||
// was (unmask) "b" RESERVED // ebx // Global Offset Table idx
|
||||
"2" (len), // ecx
|
||||
"1" (mask) // edx
|
||||
|
||||
: "%esi", "%edi", "%eax", // clobber list
|
||||
"%ecx", "%edx"
|
||||
// : // clobber list
|
||||
#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm1",
|
||||
: "%mm0", "%mm1",
|
||||
"%mm4", "%mm5", "%mm6", "%mm7"
|
||||
#endif
|
||||
);
|
||||
@ -686,23 +706,19 @@ fflush(stderr);
|
||||
{
|
||||
png_uint_32 len;
|
||||
int diff;
|
||||
#ifndef __PIC__
|
||||
int unmask = ~mask;
|
||||
#else
|
||||
int dummy_value_a; // fix 'forbidden register spilled' error
|
||||
int dummy_value_d;
|
||||
int dummy_value_c;
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
_unmask = ~mask; // global variable for -fPIC version
|
||||
#endif
|
||||
srcptr = png_ptr->row_buf + 1;
|
||||
dstptr = row;
|
||||
len = png_ptr->width &~7; // reduce to multiple of 8
|
||||
diff = png_ptr->width & 7; // amount lost
|
||||
|
||||
__asm__ (
|
||||
#ifdef __PIC__
|
||||
__asm__ __volatile__ (
|
||||
"movd _unmask, %%mm7 \n\t" // load bit pattern
|
||||
#else
|
||||
// preload "movd unmask, %%mm7 \n\t" // (unmask is in ebx)
|
||||
"movd %%ebx, %%mm7 \n\t" // load bit pattern (unmask)
|
||||
#endif
|
||||
"psubb %%mm6, %%mm6 \n\t" // zero mm6
|
||||
"punpcklbw %%mm7, %%mm7 \n\t"
|
||||
"punpcklwd %%mm7, %%mm7 \n\t"
|
||||
@ -784,21 +800,22 @@ fflush(stderr);
|
||||
"end24: \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=a" (dummy_value_a), // output regs (dummy)
|
||||
"=d" (dummy_value_d),
|
||||
"=c" (dummy_value_c),
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (srcptr), // esi // input regs
|
||||
"D" (dstptr), // edi
|
||||
"a" (diff), // eax
|
||||
#ifndef __PIC__
|
||||
"b" (unmask), // ebx // Global Offset Table idx
|
||||
#endif
|
||||
"c" (len), // ecx
|
||||
"d" (mask) // edx
|
||||
: "3" (srcptr), // esi // input regs
|
||||
"4" (dstptr), // edi
|
||||
"0" (diff), // eax
|
||||
// was (unmask) "b" RESERVED // ebx // Global Offset Table idx
|
||||
"2" (len), // ecx
|
||||
"1" (mask) // edx
|
||||
|
||||
: "%esi", "%edi", "%eax", // clobber list
|
||||
"%ecx", "%edx"
|
||||
// : // clobber list
|
||||
#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm1", "%mm2",
|
||||
: "%mm0", "%mm1", "%mm2",
|
||||
"%mm4", "%mm5", "%mm6", "%mm7"
|
||||
#endif
|
||||
);
|
||||
@ -837,23 +854,19 @@ fflush(stderr);
|
||||
{
|
||||
png_uint_32 len;
|
||||
int diff;
|
||||
#ifndef __PIC__
|
||||
int unmask = ~mask;
|
||||
#else
|
||||
int dummy_value_a; // fix 'forbidden register spilled' error
|
||||
int dummy_value_d;
|
||||
int dummy_value_c;
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
_unmask = ~mask; // global variable for -fPIC version
|
||||
#endif
|
||||
srcptr = png_ptr->row_buf + 1;
|
||||
dstptr = row;
|
||||
len = png_ptr->width &~7; // reduce to multiple of 8
|
||||
diff = png_ptr->width & 7; // amount lost
|
||||
|
||||
__asm__ (
|
||||
#ifdef __PIC__
|
||||
__asm__ __volatile__ (
|
||||
"movd _unmask, %%mm7 \n\t" // load bit pattern
|
||||
#else
|
||||
// preload "movd unmask, %%mm7 \n\t" // (unmask is in ebx)
|
||||
"movd %%ebx, %%mm7 \n\t" // load bit pattern (unmask)
|
||||
#endif
|
||||
"psubb %%mm6, %%mm6 \n\t" // zero mm6
|
||||
"punpcklbw %%mm7, %%mm7 \n\t"
|
||||
"punpcklwd %%mm7, %%mm7 \n\t"
|
||||
@ -942,21 +955,22 @@ fflush(stderr);
|
||||
"end32: \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=a" (dummy_value_a), // output regs (dummy)
|
||||
"=d" (dummy_value_d),
|
||||
"=c" (dummy_value_c),
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (srcptr), // esi // input regs
|
||||
"D" (dstptr), // edi
|
||||
"a" (diff), // eax
|
||||
#ifndef __PIC__
|
||||
"b" (unmask), // ebx // Global Offset Table idx
|
||||
#endif
|
||||
"c" (len), // ecx
|
||||
"d" (mask) // edx
|
||||
: "3" (srcptr), // esi // input regs
|
||||
"4" (dstptr), // edi
|
||||
"0" (diff), // eax
|
||||
// was (unmask) "b" RESERVED // ebx // Global Offset Table idx
|
||||
"2" (len), // ecx
|
||||
"1" (mask) // edx
|
||||
|
||||
: "%esi", "%edi", "%eax", // clobber list
|
||||
"%ecx", "%edx"
|
||||
// : // clobber list
|
||||
#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm1", "%mm2", "%mm3",
|
||||
: "%mm0", "%mm1", "%mm2", "%mm3",
|
||||
"%mm4", "%mm5", "%mm6", "%mm7"
|
||||
#endif
|
||||
);
|
||||
@ -995,23 +1009,19 @@ fflush(stderr);
|
||||
{
|
||||
png_uint_32 len;
|
||||
int diff;
|
||||
#ifndef __PIC__
|
||||
int unmask = ~mask;
|
||||
#else
|
||||
int dummy_value_a; // fix 'forbidden register spilled' error
|
||||
int dummy_value_d;
|
||||
int dummy_value_c;
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
_unmask = ~mask; // global variable for -fPIC version
|
||||
#endif
|
||||
srcptr = png_ptr->row_buf + 1;
|
||||
dstptr = row;
|
||||
len = png_ptr->width &~7; // reduce to multiple of 8
|
||||
diff = png_ptr->width & 7; // amount lost
|
||||
|
||||
__asm__ (
|
||||
#ifdef __PIC__
|
||||
__asm__ __volatile__ (
|
||||
"movd _unmask, %%mm7 \n\t" // load bit pattern
|
||||
#else
|
||||
// preload "movd unmask, %%mm7 \n\t" // (unmask is in ebx)
|
||||
"movd %%ebx, %%mm7 \n\t" // load bit pattern (unmask)
|
||||
#endif
|
||||
"psubb %%mm6, %%mm6 \n\t" // zero mm6
|
||||
"punpcklbw %%mm7, %%mm7 \n\t"
|
||||
"punpcklwd %%mm7, %%mm7 \n\t"
|
||||
@ -1117,21 +1127,22 @@ fflush(stderr);
|
||||
"end48: \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=a" (dummy_value_a), // output regs (dummy)
|
||||
"=d" (dummy_value_d),
|
||||
"=c" (dummy_value_c),
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (srcptr), // esi // input regs
|
||||
"D" (dstptr), // edi
|
||||
"a" (diff), // eax
|
||||
#ifndef __PIC__
|
||||
"b" (unmask), // ebx // Global Offset Table idx
|
||||
#endif
|
||||
"c" (len), // ecx
|
||||
"d" (mask) // edx
|
||||
: "3" (srcptr), // esi // input regs
|
||||
"4" (dstptr), // edi
|
||||
"0" (diff), // eax
|
||||
// was (unmask) "b" RESERVED // ebx // Global Offset Table idx
|
||||
"2" (len), // ecx
|
||||
"1" (mask) // edx
|
||||
|
||||
: "%esi", "%edi", "%eax", // clobber list
|
||||
"%ecx", "%edx"
|
||||
// : // clobber list
|
||||
#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm1", "%mm2", "%mm3",
|
||||
: "%mm0", "%mm1", "%mm2", "%mm3",
|
||||
"%mm4", "%mm5", "%mm6", "%mm7"
|
||||
#endif
|
||||
);
|
||||
@ -1453,7 +1464,10 @@ fflush(stderr);
|
||||
{
|
||||
if (((pass == 0) || (pass == 1)) && width)
|
||||
{
|
||||
__asm__ (
|
||||
int dummy_value_c; // fix 'forbidden register spilled'
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
__asm__ __volatile__ (
|
||||
"subl $21, %%edi \n\t"
|
||||
// (png_pass_inc[pass] - 1)*pixel_bytes
|
||||
|
||||
@ -1482,22 +1496,27 @@ fflush(stderr);
|
||||
"jnz .loop3_pass0 \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=c" (dummy_value_c), // output regs (dummy)
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (sptr), // esi // input regs
|
||||
"D" (dp), // edi
|
||||
"c" (width) // ecx
|
||||
: "1" (sptr), // esi // input regs
|
||||
"2" (dp), // edi
|
||||
"0" (width) // ecx
|
||||
// doesn't work "i" (0x0000000000FFFFFFLL) // %1 (a.k.a. _const4)
|
||||
|
||||
: "%esi", "%edi", "%ecx" // clobber list
|
||||
// : // clobber list
|
||||
#if 0 /* %mm0, ..., %mm4 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm1", "%mm2", "%mm3", "%mm4"
|
||||
: "%mm0", "%mm1", "%mm2", "%mm3", "%mm4"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
else if (((pass == 2) || (pass == 3)) && width)
|
||||
{
|
||||
__asm__ (
|
||||
int dummy_value_c; // fix 'forbidden register spilled'
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
__asm__ __volatile__ (
|
||||
"subl $9, %%edi \n\t"
|
||||
// (png_pass_inc[pass] - 1)*pixel_bytes
|
||||
|
||||
@ -1520,15 +1539,17 @@ fflush(stderr);
|
||||
"jnz .loop3_pass2 \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=c" (dummy_value_c), // output regs (dummy)
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (sptr), // esi // input regs
|
||||
"D" (dp), // edi
|
||||
"c" (width) // ecx
|
||||
: "1" (sptr), // esi // input regs
|
||||
"2" (dp), // edi
|
||||
"0" (width) // ecx
|
||||
|
||||
: "%esi", "%edi", "%ecx" // clobber list
|
||||
// : // clobber list
|
||||
#if 0 /* %mm0, ..., %mm2 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm1", "%mm2"
|
||||
: "%mm0", "%mm1", "%mm2"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -1543,7 +1564,10 @@ fflush(stderr);
|
||||
// png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
|
||||
// sptr points at last pixel in pre-expanded row
|
||||
// dp points at last pixel position in expanded row
|
||||
__asm__ (
|
||||
int dummy_value_c; // fix 'forbidden register spilled'
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
__asm__ __volatile__ (
|
||||
"subl $3, %%esi \n\t"
|
||||
"subl $9, %%edi \n\t"
|
||||
// (png_pass_inc[pass] + 1)*pixel_bytes
|
||||
@ -1569,15 +1593,17 @@ fflush(stderr);
|
||||
"jnz .loop3_pass4 \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=c" (dummy_value_c), // output regs (dummy)
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (sptr), // esi // input regs
|
||||
"D" (dp), // edi
|
||||
"c" (width_mmx) // ecx
|
||||
: "1" (sptr), // esi // input regs
|
||||
"2" (dp), // edi
|
||||
"0" (width_mmx) // ecx
|
||||
|
||||
: "%esi", "%edi", "%ecx" // clobber list
|
||||
// : // clobber list
|
||||
#if 0 /* %mm0, ..., %mm3 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm1", "%mm2", "%mm3"
|
||||
: "%mm0", "%mm1", "%mm2", "%mm3"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -1609,7 +1635,10 @@ fflush(stderr);
|
||||
width -= width_mmx; // 0-3 pixels => 0-3 bytes
|
||||
if (width_mmx)
|
||||
{
|
||||
__asm__ (
|
||||
int dummy_value_c; // fix 'forbidden register spilled'
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
__asm__ __volatile__ (
|
||||
"subl $3, %%esi \n\t"
|
||||
"subl $31, %%edi \n\t"
|
||||
|
||||
@ -1636,15 +1665,17 @@ fflush(stderr);
|
||||
"jnz .loop1_pass0 \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=c" (dummy_value_c), // output regs (dummy)
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (sptr), // esi // input regs
|
||||
"D" (dp), // edi
|
||||
"c" (width_mmx) // ecx
|
||||
: "1" (sptr), // esi // input regs
|
||||
"2" (dp), // edi
|
||||
"0" (width_mmx) // ecx
|
||||
|
||||
: "%esi", "%edi", "%ecx" // clobber list
|
||||
// : // clobber list
|
||||
#if 0 /* %mm0, ..., %mm4 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm1", "%mm2", "%mm3", "%mm4"
|
||||
: "%mm0", "%mm1", "%mm2", "%mm3", "%mm4"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -1684,7 +1715,10 @@ fflush(stderr);
|
||||
width -= width_mmx; // 0-3 pixels => 0-3 bytes
|
||||
if (width_mmx)
|
||||
{
|
||||
__asm__ (
|
||||
int dummy_value_c; // fix 'forbidden register spilled'
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
__asm__ __volatile__ (
|
||||
"subl $3, %%esi \n\t"
|
||||
"subl $15, %%edi \n\t"
|
||||
|
||||
@ -1702,15 +1736,17 @@ fflush(stderr);
|
||||
"jnz .loop1_pass2 \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=c" (dummy_value_c), // output regs (dummy)
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (sptr), // esi // input regs
|
||||
"D" (dp), // edi
|
||||
"c" (width_mmx) // ecx
|
||||
: "1" (sptr), // esi // input regs
|
||||
"2" (dp), // edi
|
||||
"0" (width_mmx) // ecx
|
||||
|
||||
: "%esi", "%edi", "%ecx" // clobber list
|
||||
// : // clobber list
|
||||
#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm1"
|
||||
: "%mm0", "%mm1"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -1732,7 +1768,10 @@ fflush(stderr);
|
||||
width -= width_mmx; // 0-3 pixels => 0-3 bytes
|
||||
if (width_mmx)
|
||||
{
|
||||
__asm__ (
|
||||
int dummy_value_c; // fix 'forbidden register spilled'
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
__asm__ __volatile__ (
|
||||
"subl $7, %%esi \n\t"
|
||||
"subl $15, %%edi \n\t"
|
||||
|
||||
@ -1749,15 +1788,17 @@ fflush(stderr);
|
||||
"jnz .loop1_pass4 \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=c" (dummy_value_c), // output regs (none)
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (sptr), // esi // input regs
|
||||
"D" (dp), // edi
|
||||
"c" (width_mmx) // ecx
|
||||
: "1" (sptr), // esi // input regs
|
||||
"2" (dp), // edi
|
||||
"0" (width_mmx) // ecx
|
||||
|
||||
: "%esi", "%edi", "%ecx" // clobber list
|
||||
// : // clobber list
|
||||
#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm1"
|
||||
: "%mm0", "%mm1"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -1784,7 +1825,10 @@ fflush(stderr);
|
||||
width -= width_mmx; // 0,1 pixels => 0,2 bytes
|
||||
if (width_mmx)
|
||||
{
|
||||
__asm__ (
|
||||
int dummy_value_c; // fix 'forbidden register spilled'
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
__asm__ __volatile__ (
|
||||
"subl $2, %%esi \n\t"
|
||||
"subl $30, %%edi \n\t"
|
||||
|
||||
@ -1804,15 +1848,17 @@ fflush(stderr);
|
||||
"jnz .loop2_pass0 \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=c" (dummy_value_c), // output regs (dummy)
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (sptr), // esi // input regs
|
||||
"D" (dp), // edi
|
||||
"c" (width_mmx) // ecx
|
||||
: "1" (sptr), // esi // input regs
|
||||
"2" (dp), // edi
|
||||
"0" (width_mmx) // ecx
|
||||
|
||||
: "%esi", "%edi", "%ecx" // clobber list
|
||||
// : // clobber list
|
||||
#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm1"
|
||||
: "%mm0", "%mm1"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -1838,7 +1884,10 @@ fflush(stderr);
|
||||
width -= width_mmx; // 0,1 pixels => 0,2 bytes
|
||||
if (width_mmx)
|
||||
{
|
||||
__asm__ (
|
||||
int dummy_value_c; // fix 'forbidden register spilled'
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
__asm__ __volatile__ (
|
||||
"subl $2, %%esi \n\t"
|
||||
"subl $14, %%edi \n\t"
|
||||
|
||||
@ -1856,15 +1905,17 @@ fflush(stderr);
|
||||
"jnz .loop2_pass2 \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=c" (dummy_value_c), // output regs (dummy)
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (sptr), // esi // input regs
|
||||
"D" (dp), // edi
|
||||
"c" (width_mmx) // ecx
|
||||
: "1" (sptr), // esi // input regs
|
||||
"2" (dp), // edi
|
||||
"0" (width_mmx) // ecx
|
||||
|
||||
: "%esi", "%edi", "%ecx" // clobber list
|
||||
// : // clobber list
|
||||
#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm1"
|
||||
: "%mm0", "%mm1"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -1890,7 +1941,10 @@ fflush(stderr);
|
||||
width -= width_mmx; // 0,1 pixels => 0,2 bytes
|
||||
if (width_mmx)
|
||||
{
|
||||
__asm__ (
|
||||
int dummy_value_c; // fix 'forbidden register spilled'
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
__asm__ __volatile__ (
|
||||
"subl $2, %%esi \n\t"
|
||||
"subl $6, %%edi \n\t"
|
||||
|
||||
@ -1904,15 +1958,17 @@ fflush(stderr);
|
||||
"jnz .loop2_pass4 \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=c" (dummy_value_c), // output regs (dummy)
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (sptr), // esi // input regs
|
||||
"D" (dp), // edi
|
||||
"c" (width_mmx) // ecx
|
||||
: "1" (sptr), // esi // input regs
|
||||
"2" (dp), // edi
|
||||
"0" (width_mmx) // ecx
|
||||
|
||||
: "%esi", "%edi", "%ecx" // clobber list
|
||||
// : // clobber list
|
||||
#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0"
|
||||
: "%mm0"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -1948,12 +2004,15 @@ fflush(stderr);
|
||||
*/
|
||||
if (width_mmx)
|
||||
{
|
||||
int dummy_value_c; // fix 'forbidden register spilled'
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
#ifdef GRR_DEBUG
|
||||
FILE *junk = fopen("junk.4bytes", "wb");
|
||||
if (junk)
|
||||
fclose(junk);
|
||||
#endif /* GRR_DEBUG */
|
||||
__asm__ (
|
||||
__asm__ __volatile__ (
|
||||
"subl $4, %%esi \n\t"
|
||||
"subl $60, %%edi \n\t"
|
||||
|
||||
@ -1976,15 +2035,17 @@ fflush(stderr);
|
||||
"jnz .loop4_pass0 \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=c" (dummy_value_c), // output regs (dummy)
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "1" (sptr), // esi // input regs
|
||||
"2" (dp), // edi
|
||||
"0" (width_mmx) // ecx
|
||||
|
||||
: "S" (sptr), // esi // input regs
|
||||
"D" (dp), // edi
|
||||
"c" (width_mmx) // ecx
|
||||
|
||||
: "%esi", "%edi", "%ecx" // clobber list
|
||||
// : // clobber list
|
||||
#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm1"
|
||||
: "%mm0", "%mm1"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -2010,7 +2071,10 @@ fflush(stderr);
|
||||
width -= width_mmx; // 0,1 pixels => 0,4 bytes
|
||||
if (width_mmx)
|
||||
{
|
||||
__asm__ (
|
||||
int dummy_value_c; // fix 'forbidden register spilled'
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
__asm__ __volatile__ (
|
||||
"subl $4, %%esi \n\t"
|
||||
"subl $28, %%edi \n\t"
|
||||
|
||||
@ -2029,15 +2093,17 @@ fflush(stderr);
|
||||
"jnz .loop4_pass2 \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=c" (dummy_value_c), // output regs (dummy)
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "1" (sptr), // esi // input regs
|
||||
"2" (dp), // edi
|
||||
"0" (width_mmx) // ecx
|
||||
|
||||
: "S" (sptr), // esi // input regs
|
||||
"D" (dp), // edi
|
||||
"c" (width_mmx) // ecx
|
||||
|
||||
: "%esi", "%edi", "%ecx" // clobber list
|
||||
// : // clobber list
|
||||
#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm1"
|
||||
: "%mm0", "%mm1"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -2063,7 +2129,10 @@ fflush(stderr);
|
||||
width -= width_mmx; // 0,1 pixels => 0,4 bytes
|
||||
if (width_mmx)
|
||||
{
|
||||
__asm__ (
|
||||
int dummy_value_c; // fix 'forbidden register spilled'
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
__asm__ __volatile__ (
|
||||
"subl $4, %%esi \n\t"
|
||||
"subl $12, %%edi \n\t"
|
||||
|
||||
@ -2080,15 +2149,17 @@ fflush(stderr);
|
||||
"jnz .loop4_pass4 \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=c" (dummy_value_c), // output regs (dummy)
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (sptr), // esi // input regs
|
||||
"D" (dp), // edi
|
||||
"c" (width_mmx) // ecx
|
||||
: "1" (sptr), // esi // input regs
|
||||
"2" (dp), // edi
|
||||
"0" (width_mmx) // ecx
|
||||
|
||||
: "%esi", "%edi", "%ecx" // clobber list
|
||||
// : // clobber list
|
||||
#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0", "%mm1"
|
||||
: "%mm0", "%mm1"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -2122,12 +2193,15 @@ fflush(stderr);
|
||||
{
|
||||
// source is 8-byte RRGGBBAA
|
||||
// dest is 64-byte RRGGBBAA RRGGBBAA RRGGBBAA RRGGBBAA ...
|
||||
int dummy_value_c; // fix 'forbidden register spilled'
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
#ifdef GRR_DEBUG
|
||||
FILE *junk = fopen("junk.8bytes", "wb");
|
||||
if (junk)
|
||||
fclose(junk);
|
||||
#endif /* GRR_DEBUG */
|
||||
__asm__ (
|
||||
__asm__ __volatile__ (
|
||||
"subl $56, %%edi \n\t" // start of last block
|
||||
|
||||
".loop8_pass0: \n\t"
|
||||
@ -2146,15 +2220,17 @@ fflush(stderr);
|
||||
"jnz .loop8_pass0 \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=c" (dummy_value_c), // output regs (dummy)
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (sptr), // esi // input regs
|
||||
"D" (dp), // edi
|
||||
"c" (width) // ecx
|
||||
: "1" (sptr), // esi // input regs
|
||||
"2" (dp), // edi
|
||||
"0" (width) // ecx
|
||||
|
||||
: "%esi", "%edi", "%ecx" // clobber list
|
||||
// : // clobber list
|
||||
#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0"
|
||||
: "%mm0"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -2166,7 +2242,10 @@ fflush(stderr);
|
||||
width -= width_mmx;
|
||||
if (width_mmx)
|
||||
{
|
||||
__asm__ (
|
||||
int dummy_value_c; // fix 'forbidden register spilled'
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
__asm__ __volatile__ (
|
||||
"subl $24, %%edi \n\t" // start of last block
|
||||
|
||||
".loop8_pass2: \n\t"
|
||||
@ -2181,15 +2260,17 @@ fflush(stderr);
|
||||
"jnz .loop8_pass2 \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=c" (dummy_value_c), // output regs (dummy)
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (sptr), // esi // input regs
|
||||
"D" (dp), // edi
|
||||
"c" (width) // ecx
|
||||
: "1" (sptr), // esi // input regs
|
||||
"2" (dp), // edi
|
||||
"0" (width) // ecx
|
||||
|
||||
: "%esi", "%edi", "%ecx" // clobber list
|
||||
// : // clobber list
|
||||
#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0"
|
||||
: "%mm0"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -2202,7 +2283,10 @@ fflush(stderr);
|
||||
width -= width_mmx;
|
||||
if (width_mmx)
|
||||
{
|
||||
__asm__ (
|
||||
int dummy_value_c; // fix 'forbidden register spilled'
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
__asm__ __volatile__ (
|
||||
"subl $8, %%edi \n\t" // start of last block
|
||||
|
||||
".loop8_pass4: \n\t"
|
||||
@ -2215,15 +2299,17 @@ fflush(stderr);
|
||||
"jnz .loop8_pass4 \n\t"
|
||||
"EMMS \n\t" // DONE
|
||||
|
||||
: // output regs (none)
|
||||
: "=c" (dummy_value_c), // output regs (dummy)
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (sptr), // esi // input regs
|
||||
"D" (dp), // edi
|
||||
"c" (width) // ecx
|
||||
: "1" (sptr), // esi // input regs
|
||||
"2" (dp), // edi
|
||||
"0" (width) // ecx
|
||||
|
||||
: "%esi", "%edi", "%ecx" // clobber list
|
||||
// : // clobber list
|
||||
#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
|
||||
, "%mm0"
|
||||
: "%mm0"
|
||||
#endif
|
||||
);
|
||||
}
|
||||
@ -2408,11 +2494,14 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
|
||||
png_bytep prev_row)
|
||||
{
|
||||
int bpp;
|
||||
int dummy_value_c; // fix 'forbidden register 2 (cx) was spilled' error
|
||||
int dummy_value_S;
|
||||
int dummy_value_D;
|
||||
// int diff; GRR: global now (shortened to dif/_dif)
|
||||
|
||||
bpp = (row_info->pixel_depth + 7) >> 3; // Get # bytes per pixel
|
||||
_FullLength = row_info->rowbytes; // # of bytes to filter
|
||||
__asm__ (
|
||||
__asm__ __volatile__ (
|
||||
// Init address pointers and offset
|
||||
//GRR "movl row, %%edi \n\t" // edi ==> Avg(x)
|
||||
"xorl %%ebx, %%ebx \n\t" // ebx ==> x
|
||||
@ -2467,14 +2556,16 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
|
||||
"subl %%eax, %%ecx \n\t" // drop over bytes from original length
|
||||
"movl %%ecx, _MMXLength \n\t"
|
||||
|
||||
: // output regs/vars here, e.g., "=m" (_MMXLength) instead of final instr
|
||||
: "=c" (dummy_value_c), // output regs/vars here, e.g., "=m" (_MMXLength) instead of final instr
|
||||
"=S" (dummy_value_S),
|
||||
"=D" (dummy_value_D)
|
||||
|
||||
: "S" (prev_row), // esi // input regs
|
||||
"D" (row), // edi
|
||||
"c" (bpp) // ecx
|
||||
: "1" (prev_row), // esi // input regs
|
||||
"2" (row), // edi
|
||||
"0" (bpp) // ecx
|
||||
|
||||
: "%eax", "%ebx", "%ecx", // clobber list
|
||||
"%edx", "%edi", "%esi"
|
||||
: "%eax", "%ebx", // clobber list
|
||||
"%edx"
|
||||
// GRR: INCLUDE "memory" as clobbered? (_dif, _MMXLength) PROBABLY
|
||||
);
|
||||
|
||||
|
2
pngget.c
2
pngget.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngget.c - retrieval of values from info struct
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
2
pngmem.c
2
pngmem.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngmem.c - stub functions for memory allocation
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngpread.c - read a png file in push mode
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -1036,6 +1036,7 @@ png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr)
|
||||
|
||||
png_set_text(png_ptr, info_ptr, text_ptr, 1);
|
||||
|
||||
png_free(png_ptr, key);
|
||||
png_free(png_ptr, text_ptr);
|
||||
}
|
||||
}
|
||||
@ -1219,6 +1220,7 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr)
|
||||
|
||||
png_set_text(png_ptr, info_ptr, text_ptr, 1);
|
||||
|
||||
png_free(png_ptr, key);
|
||||
png_free(png_ptr, text_ptr);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngread.c - read a PNG file
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -697,7 +697,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.7
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.8beta1
|
||||
*/
|
||||
|
||||
void PNGAPI
|
||||
@ -746,7 +746,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.7
|
||||
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.8beta1
|
||||
*/
|
||||
void PNGAPI
|
||||
png_read_image(png_structp png_ptr, png_bytepp image)
|
||||
|
8
pngrio.c
8
pngrio.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrio.c - functions for data input
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -48,7 +48,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
* instead of an int, which is what fread() actually returns.
|
||||
*/
|
||||
check = (png_size_t)fread(data, (png_size_t)1, length,
|
||||
(FILE *)png_ptr->io_ptr);
|
||||
(png_FILE_p)png_ptr->io_ptr);
|
||||
|
||||
if (check != length)
|
||||
{
|
||||
@ -69,11 +69,11 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
{
|
||||
int check;
|
||||
png_byte *n_data;
|
||||
FILE *io_ptr;
|
||||
png_FILE_p io_ptr;
|
||||
|
||||
/* Check if data really is near. If so, use usual code. */
|
||||
n_data = (png_byte *)CVT_PTR_NOCHECK(data);
|
||||
io_ptr = (FILE *)CVT_PTR(png_ptr->io_ptr);
|
||||
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
|
||||
if ((png_bytep)n_data == data)
|
||||
{
|
||||
check = fread(n_data, 1, length, io_ptr);
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -1125,7 +1125,7 @@ png_do_read_transformations(png_structp png_ptr)
|
||||
#if !defined(PNG_USELESS_TESTS_SUPPORTED)
|
||||
if (png_ptr->row_buf == NULL)
|
||||
{
|
||||
#if !defined(PNG_NO_STDIO)
|
||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||
char msg[50];
|
||||
|
||||
sprintf(msg, "NULL row buffer for row %ld, pass %d", png_ptr->row_number,
|
||||
|
49
pngrutil.c
49
pngrutil.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrutil.c - utilities to read a PNG file
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -14,6 +14,30 @@
|
||||
#define PNG_INTERNAL
|
||||
#include "png.h"
|
||||
|
||||
#if defined(_WIN32_WCE)
|
||||
/* strtod() function is not supported on WindowsCE */
|
||||
# ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
__inline double strtod(const char *nptr, char **endptr)
|
||||
{
|
||||
double result = 0;
|
||||
int len;
|
||||
wchar_t *str, *end;
|
||||
|
||||
len = MultiByteToWideChar(CP_ACP, 0, nptr, -1, NULL, 0);
|
||||
str = (wchar_t *)malloc(len * sizeof(wchar_t));
|
||||
if ( NULL != str )
|
||||
{
|
||||
MultiByteToWideChar(CP_ACP, 0, nptr, -1, str, len);
|
||||
result = wcstod(str, &end);
|
||||
len = WideCharToMultiByte(CP_ACP, 0, end, -1, NULL, 0, NULL, NULL);
|
||||
*endptr = (char *)nptr + (strlen(nptr) - len + 1);
|
||||
free(str);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
|
||||
/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */
|
||||
png_uint_32 /* PRIVATE */
|
||||
@ -225,11 +249,18 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
|
||||
}
|
||||
if (ret != Z_STREAM_END)
|
||||
{
|
||||
#if !defined(PNG_NO_STDIO)
|
||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||
char umsg[50];
|
||||
|
||||
sprintf(umsg,"Incomplete compressed datastream in %s chunk",
|
||||
png_ptr->chunk_name);
|
||||
if (ret == Z_BUF_ERROR)
|
||||
sprintf(umsg,"Buffer error in compressed datastream in %s chunk",
|
||||
png_ptr->chunk_name);
|
||||
else if (ret == Z_DATA_ERROR)
|
||||
sprintf(umsg,"Data error in compressed datastream in %s chunk",
|
||||
png_ptr->chunk_name);
|
||||
else
|
||||
sprintf(umsg,"Incomplete compressed datastream in %s chunk",
|
||||
png_ptr->chunk_name);
|
||||
png_warning(png_ptr, umsg);
|
||||
#else
|
||||
png_warning(png_ptr,
|
||||
@ -246,7 +277,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
|
||||
}
|
||||
else /* if (comp_type != PNG_TEXT_COMPRESSION_zTXt) */
|
||||
{
|
||||
#if !defined(PNG_NO_STDIO)
|
||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||
char umsg[50];
|
||||
|
||||
sprintf(umsg, "Unknown zTXt compression type %d", comp_type);
|
||||
@ -585,7 +616,7 @@ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
{
|
||||
png_warning(png_ptr,
|
||||
"Ignoring incorrect gAMA value when sRGB is also present");
|
||||
#ifndef PNG_NO_STDIO
|
||||
#ifndef PNG_NO_CONSOLE_IO
|
||||
fprintf(stderr, "gamma = (%d/100000)\n", (int)igamma);
|
||||
#endif
|
||||
return;
|
||||
@ -795,7 +826,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
|
||||
png_warning(png_ptr,
|
||||
"Ignoring incorrect cHRM value when sRGB is also present");
|
||||
#ifndef PNG_NO_STDIO
|
||||
#ifndef PNG_NO_CONSOLE_IO
|
||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
fprintf(stderr,"wx=%f, wy=%f, rx=%f, ry=%f\n",
|
||||
white_x, white_y, red_x, red_y);
|
||||
@ -807,7 +838,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
fprintf(stderr,"gx=%ld, gy=%ld, bx=%ld, by=%ld\n",
|
||||
int_x_green, int_y_green, int_x_blue, int_y_blue);
|
||||
#endif
|
||||
#endif /* PNG_NO_STDIO */
|
||||
#endif /* PNG_NO_CONSOLE_IO */
|
||||
}
|
||||
png_crc_finish(png_ptr, 0);
|
||||
return;
|
||||
@ -901,7 +932,7 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
||||
{
|
||||
png_warning(png_ptr,
|
||||
"Ignoring incorrect gAMA value when sRGB is also present");
|
||||
#ifndef PNG_NO_STDIO
|
||||
#ifndef PNG_NO_CONSOLE_IO
|
||||
# ifdef PNG_FIXED_POINT_SUPPORTED
|
||||
fprintf(stderr,"incorrect gamma=(%d/100000)\n",(int)png_ptr->int_gamma);
|
||||
# else
|
||||
|
2
pngset.c
2
pngset.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngset.c - storage of image information into info struct
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
66
pngtest.c
66
pngtest.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngtest.c - a simple test program to test libpng
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -27,9 +27,27 @@
|
||||
* of files at once by typing "pngtest -m file1.png file2.png ..."
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#if defined(_WIN32_WCE)
|
||||
# if _WIN32_WCE < 211
|
||||
__error__ (f|w)printf functions are not supported on old WindowsCE.;
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# include <stdlib.h>
|
||||
# define READFILE(file, data, length, check) \
|
||||
ReadFile(file, data, length, &check,NULL)
|
||||
# define WRITEFILE(file, data, length, check) \
|
||||
WriteFile(file, data, length, &check, NULL);
|
||||
# define FCLOSE(file) CloseHandle(file)
|
||||
#else
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <assert.h>
|
||||
# define READFILE(file, data, length, check) \
|
||||
check=(png_size_t)fread(data,(png_size_t)1,length,file)
|
||||
# define WRITEFILE(file, data, length, check) \
|
||||
check = (png_size_t)fwrite(data, (png_size_t)1, length, file);
|
||||
# define FCLOSE(file) fclose(file)
|
||||
#endif
|
||||
|
||||
/* Makes pngtest verbose so we can find problems (needs to be before png.h) */
|
||||
#ifndef PNG_DEBUG
|
||||
@ -239,8 +257,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
/* fread() returns 0 on error, so it is OK to store this in a png_size_t
|
||||
* instead of an int, which is what fread() actually returns.
|
||||
*/
|
||||
check = (png_size_t)fread(data, (png_size_t)1, length,
|
||||
(FILE *)png_ptr->io_ptr);
|
||||
READFILE((png_FILE_p)png_ptr->io_ptr, data, length, check);
|
||||
|
||||
if (check != length)
|
||||
{
|
||||
@ -261,14 +278,14 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
{
|
||||
int check;
|
||||
png_byte *n_data;
|
||||
FILE *io_ptr;
|
||||
png_FILE_p io_ptr;
|
||||
|
||||
/* Check if data really is near. If so, use usual code. */
|
||||
n_data = (png_byte *)CVT_PTR_NOCHECK(data);
|
||||
io_ptr = (FILE *)CVT_PTR(png_ptr->io_ptr);
|
||||
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
|
||||
if ((png_bytep)n_data == data)
|
||||
{
|
||||
check = fread(n_data, 1, length, io_ptr);
|
||||
READFILE(io_ptr, n_data, length, check);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -279,7 +296,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
do
|
||||
{
|
||||
read = MIN(NEAR_BUF_SIZE, remaining);
|
||||
err = fread(buf, (png_size_t)1, read, io_ptr);
|
||||
READFILE(io_ptr, buf, 1, err);
|
||||
png_memcpy(data, buf, read); /* copy far buffer to near buffer */
|
||||
if(err != read)
|
||||
break;
|
||||
@ -301,10 +318,12 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
static void
|
||||
pngtest_flush(png_structp png_ptr)
|
||||
{
|
||||
FILE *io_ptr;
|
||||
io_ptr = (FILE *)CVT_PTR((png_ptr->io_ptr));
|
||||
#if !defined(_WIN32_WCE)
|
||||
png_FILE_p io_ptr;
|
||||
io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
|
||||
if (io_ptr != NULL)
|
||||
fflush(io_ptr);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -318,7 +337,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
{
|
||||
png_uint_32 check;
|
||||
|
||||
check = fwrite(data, 1, length, (FILE *)(png_ptr->io_ptr));
|
||||
WRITEFILE((png_FILE_p)png_ptr->io_ptr, data, 1, check);
|
||||
if (check != length)
|
||||
{
|
||||
png_error(png_ptr, "Write Error");
|
||||
@ -338,14 +357,14 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
{
|
||||
png_uint_32 check;
|
||||
png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */
|
||||
FILE *io_ptr;
|
||||
png_FILE_p io_ptr;
|
||||
|
||||
/* Check if data really is near. If so, use usual code. */
|
||||
near_data = (png_byte *)CVT_PTR_NOCHECK(data);
|
||||
io_ptr = (FILE *)CVT_PTR(png_ptr->io_ptr);
|
||||
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
|
||||
if ((png_bytep)near_data == data)
|
||||
{
|
||||
check = fwrite(near_data, 1, length, io_ptr);
|
||||
WRITEFILE(io_ptr, near_data, 1, check);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -357,7 +376,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
{
|
||||
written = MIN(NEAR_BUF_SIZE, remaining);
|
||||
png_memcpy(buf, data, written); /* copy far buffer to near buffer */
|
||||
err = fwrite(buf, 1, written, io_ptr);
|
||||
WRITEFILE(io_ptr, written, 1, err);
|
||||
if (err != written)
|
||||
break;
|
||||
else
|
||||
@ -417,7 +436,7 @@ pngtest_error(png_structp png_ptr, png_const_charp message)
|
||||
by setting MAXSEG_64K in zlib zconf.h *or* PNG_MAX_MALLOC_64K. */
|
||||
typedef struct memory_information
|
||||
{
|
||||
png_uint_32 size;
|
||||
png_uint_32 size;
|
||||
png_voidp pointer;
|
||||
struct memory_information FAR *next;
|
||||
} memory_information;
|
||||
@ -463,7 +482,7 @@ png_debug_malloc(png_structp png_ptr, png_uint_32 size)
|
||||
if(verbose)
|
||||
printf("png_malloc %d bytes at %x\n",size,pinfo->pointer);
|
||||
#endif
|
||||
assert(pinfo->size != 12345);
|
||||
assert(pinfo->size != 12345678);
|
||||
return (png_voidp)(pinfo->pointer);
|
||||
}
|
||||
}
|
||||
@ -523,7 +542,8 @@ png_debug_free(png_structp png_ptr, png_voidp ptr)
|
||||
int
|
||||
test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
||||
{
|
||||
static FILE *fpin, *fpout; /* "static" prevents setjmp corruption */
|
||||
static png_FILE_p fpin;
|
||||
static png_FILE_p fpout; /* "static" prevents setjmp corruption */
|
||||
png_structp read_ptr, write_ptr;
|
||||
png_infop read_info_ptr, write_info_ptr, end_info_ptr, write_end_info_ptr;
|
||||
png_bytep row_buf;
|
||||
@ -1083,8 +1103,8 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
||||
{
|
||||
png_size_t num_in, num_out;
|
||||
|
||||
num_in = fread(inbuf, 1, 1, fpin);
|
||||
num_out = fread(outbuf, 1, 1, fpout);
|
||||
READFILE(fpin, inbuf, 1, num_in);
|
||||
READFILE(fpout, outbuf, 1, num_out);
|
||||
|
||||
if (num_in != num_out)
|
||||
{
|
||||
@ -1392,4 +1412,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_7 your_png_h_is_not_version_1_0_7;
|
||||
typedef version_1_0_8beta1 your_png_h_is_not_version_1_0_8beta1;
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* For Intel x86 CPU and Microsoft Visual C++ compiler
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998, Intel Corporation
|
||||
@ -3671,11 +3671,11 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
|
||||
|
||||
#ifdef PNG_DEBUG
|
||||
png_debug(1, "in png_read_filter_row\n");
|
||||
#if (UseMMX == 1)
|
||||
# if (UseMMX == 1)
|
||||
png_debug1(0,"%s, ", "MMX");
|
||||
#else
|
||||
# else
|
||||
png_debug1(0,"%s, ", "x86");
|
||||
#endif
|
||||
# endif
|
||||
switch (filter)
|
||||
{
|
||||
case 0: sprintf(filnm, "None ");
|
||||
|
19
pngwio.c
19
pngwio.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwio.c - functions for data output
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -44,7 +44,12 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
{
|
||||
png_uint_32 check;
|
||||
|
||||
check = fwrite(data, 1, length, (FILE *)(png_ptr->io_ptr));
|
||||
#if defined(_WIN32_WCE)
|
||||
if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
|
||||
check = -1;
|
||||
#else
|
||||
check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr));
|
||||
#endif
|
||||
if (check != length)
|
||||
{
|
||||
png_error(png_ptr, "Write Error");
|
||||
@ -64,11 +69,11 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
{
|
||||
png_uint_32 check;
|
||||
png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */
|
||||
FILE *io_ptr;
|
||||
png_FILE_p io_ptr;
|
||||
|
||||
/* Check if data really is near. If so, use usual code. */
|
||||
near_data = (png_byte *)CVT_PTR_NOCHECK(data);
|
||||
io_ptr = (FILE *)CVT_PTR(png_ptr->io_ptr);
|
||||
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
|
||||
if ((png_bytep)near_data == data)
|
||||
{
|
||||
check = fwrite(near_data, 1, length, io_ptr);
|
||||
@ -117,10 +122,12 @@ png_flush(png_structp png_ptr)
|
||||
static void /* PRIVATE */
|
||||
png_default_flush(png_structp png_ptr)
|
||||
{
|
||||
FILE *io_ptr;
|
||||
io_ptr = (FILE *)CVT_PTR((png_ptr->io_ptr));
|
||||
#if !defined(_WIN32_WCE)
|
||||
png_FILE_p io_ptr;
|
||||
io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
|
||||
if (io_ptr != NULL)
|
||||
fflush(io_ptr);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwrite.c - general routines to write a PNG file
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -378,6 +378,8 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
|
||||
}
|
||||
|
||||
#if defined(PNG_WRITE_tIME_SUPPORTED)
|
||||
#if !defined(_WIN32_WCE)
|
||||
/* "time.h" functions are not supported on WindowsCE */
|
||||
void PNGAPI
|
||||
png_convert_from_struct_tm(png_timep ptime, struct tm FAR * ttime)
|
||||
{
|
||||
@ -400,6 +402,7 @@ png_convert_from_time_t(png_timep ptime, time_t ttime)
|
||||
png_convert_from_struct_tm(ptime, tbuf);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Initialize png_ptr structure, and allocate any memory needed */
|
||||
png_structp PNGAPI
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwtran.c - transforms the data in a row for PNG writers
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
25
pngwutil.c
25
pngwutil.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngwutil.c - utilities to write a PNG file
|
||||
*
|
||||
* libpng 1.0.7 - July 1, 2000
|
||||
* libpng 1.0.8beta1 - July 8, 2000
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@ -172,7 +172,7 @@ png_text_compress(png_structp png_ptr,
|
||||
|
||||
if (compression >= PNG_TEXT_COMPRESSION_LAST)
|
||||
{
|
||||
#if !defined(PNG_NO_STDIO)
|
||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||
char msg[50];
|
||||
sprintf(msg, "Unknown compression type %d", compression);
|
||||
png_warning(png_ptr, msg);
|
||||
@ -837,8 +837,8 @@ png_write_cHRM(png_structp png_ptr, double white_x, double white_y,
|
||||
white_x + white_y > 1.0)
|
||||
{
|
||||
png_warning(png_ptr, "Invalid cHRM white point specified");
|
||||
#if !defined(PNG_NO_STDIO)
|
||||
printf("white_x=%f, white_y=%f\n",white_x, white_y);
|
||||
#if !defined(PNG_NO_CONSOLE_IO)
|
||||
fprintf(stderr,"white_x=%f, white_y=%f\n",white_x, white_y);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@ -900,8 +900,8 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x,
|
||||
if (white_x > 80000L || white_y > 80000L || white_x + white_y > 100000L)
|
||||
{
|
||||
png_warning(png_ptr, "Invalid fixed cHRM white point specified");
|
||||
#if !defined(PNG_NO_STDIO)
|
||||
printf("white_x=%ld, white_y=%ld\n",white_x, white_y);
|
||||
#if !defined(PNG_NO_CONSOLE_IO)
|
||||
fprintf(stderr,"white_x=%ld, white_y=%ld\n",white_x, white_y);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@ -1088,7 +1088,7 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
|
||||
{
|
||||
if (*kp < 0x20 || (*kp > 0x7E && (png_byte)*kp < 0xA1))
|
||||
{
|
||||
#if !defined(PNG_NO_STDIO)
|
||||
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
|
||||
char msg[40];
|
||||
|
||||
sprintf(msg, "invalid keyword character 0x%02X", *kp);
|
||||
@ -1441,8 +1441,19 @@ png_write_sCAL(png_structp png_ptr, int unit, double width,double height)
|
||||
|
||||
png_debug(1, "in png_write_sCAL\n");
|
||||
|
||||
#if defined(_WIN32_WCE)
|
||||
/* sprintf() function is not supported on WindowsCE */
|
||||
{
|
||||
wchar_t wc_buf[32];
|
||||
swprintf(wc_buf, TEXT("%12.12e"), width);
|
||||
WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, wbuf, 32, NULL, NULL);
|
||||
swprintf(wc_buf, TEXT("%12.12e"), height);
|
||||
WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, hbuf, 32, NULL, NULL);
|
||||
}
|
||||
#else
|
||||
sprintf(wbuf, "%12.12e", width);
|
||||
sprintf(hbuf, "%12.12e", height);
|
||||
#endif
|
||||
total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf);
|
||||
|
||||
png_debug1(3, "sCAL total length = %d\n", total_len);
|
||||
|
@ -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.7
|
||||
PNGMIN = 1.0.8beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
# where make install puts libpng.a, libpng.so*, and png.h
|
||||
|
@ -14,7 +14,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.7
|
||||
PNGMIN = 1.0.8beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
CC=cc
|
||||
|
@ -1,6 +1,6 @@
|
||||
# makefile for libpng on Linux ELF with gcc using MMX assembler code
|
||||
# Copyright (C) 1998-2000 Greg Roelofs
|
||||
# Copyright (C) 1996, 1997 Andreas Dilger
|
||||
# Copyright 1996-1997 Andreas Dilger
|
||||
# Copyright 1998-2000 Greg Roelofs
|
||||
# For conditions of distribution and use, see copyright notice in png.h
|
||||
|
||||
CC=gcc
|
||||
@ -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.7
|
||||
PNGMIN = 1.0.8beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
@ -53,14 +53,14 @@ OBJSDLL = $(OBJS:.o=.pic.o)
|
||||
|
||||
all: libpng.a libpng.so pngtest
|
||||
|
||||
pnggccrd.o: png.h pngconf.h pngasmrd.h
|
||||
pnggccrd.o: pnggccrd.c png.h pngconf.h pngasmrd.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
|
||||
|
||||
pnggccrd.pic.o: png.h pngconf.h pngasmrd.h
|
||||
pnggccrd.pic.o: pnggccrd.c png.h pngconf.h pngasmrd.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:'
|
||||
@ -105,22 +105,20 @@ DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
||||
writelock:
|
||||
chmod a-w *.[ch35] $(DOCS) scripts/*
|
||||
|
||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||
png.o png.pic.o: png.h pngconf.h png.c pngasmrd.h
|
||||
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
|
||||
pngmem.o pngmem.pic.o: png.h pngconf.h pngmem.c
|
||||
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
|
||||
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
|
||||
pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c
|
||||
pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c
|
||||
|
||||
png.o png.pic.o: png.h pngconf.h
|
||||
pngerror.o pngerror.pic.o: png.h pngconf.h
|
||||
pngrio.o pngrio.pic.o: png.h pngconf.h
|
||||
pngwio.o pngwio.pic.o: png.h pngconf.h
|
||||
pngmem.o pngmem.pic.o: png.h pngconf.h
|
||||
pngset.o pngset.pic.o: png.h pngconf.h
|
||||
pngget.o pngget.pic.o: png.h pngconf.h
|
||||
pngread.o pngread.pic.o: png.h pngconf.h
|
||||
pngrtran.o pngrtran.pic.o: png.h pngconf.h
|
||||
pngrutil.o pngrutil.pic.o: png.h pngconf.h
|
||||
pngtrans.o pngtrans.pic.o: png.h pngconf.h
|
||||
pngwrite.o pngwrite.pic.o: png.h pngconf.h
|
||||
pngwtran.o pngwtran.pic.o: png.h pngconf.h
|
||||
pngwutil.o pngwutil.pic.o: png.h pngconf.h
|
||||
pngpread.o pngpread.pic.o: png.h pngconf.h
|
||||
|
||||
pngtest.o: png.h pngconf.h
|
||||
pngtest.o: png.h pngconf.h pngtest.c
|
||||
|
@ -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.7
|
||||
PNGMIN = 1.0.8beta1
|
||||
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.7
|
||||
PNGMIN = 1.0.8beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
@ -19,8 +19,8 @@ CFLAGS=-I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32 # -g -DPNG_DEBUG=5
|
||||
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
|
||||
LDSHARED=gcc -shared
|
||||
|
||||
VER=1.0.7
|
||||
LIBS=libpng.so.1.0.7
|
||||
VER=1.0.8beta1
|
||||
LIBS=libpng.so.1.0.8beta1
|
||||
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.7
|
||||
PNGMIN = 1.0.8beta1
|
||||
PNGVER = $(PNGMAJ).$(PNGMIN)
|
||||
|
||||
INCPATH=$(prefix)/include
|
||||
|
@ -5,8 +5,8 @@ unit pngdef;
|
||||
interface
|
||||
|
||||
const
|
||||
PNG_LIBPNG_VER_STRING = '1.0.7';
|
||||
PNG_LIBPNG_VER = 10007;
|
||||
PNG_LIBPNG_VER_STRING = '1.0.8beta1';
|
||||
PNG_LIBPNG_VER = 10008;
|
||||
|
||||
type
|
||||
png_uint_32 = Cardinal;
|
||||
|
43
wince/READMEE.WCE
Normal file
43
wince/READMEE.WCE
Normal file
@ -0,0 +1,43 @@
|
||||
libpng for WindowsCE Rel.1.0
|
||||
============================
|
||||
Copyright (c) 2000 Glenn Randers-Pehrson
|
||||
Copyright (c) 2000 Tenik Co.,Ltd.
|
||||
|
||||
Porting for WindowsCE by Tenik Co.,Ltd.(Kazuo Adachi)
|
||||
|
||||
|
||||
Introduction
|
||||
============
|
||||
This is libpng 1.0.7 ported to WindowsCE 2.0 and 2.11.
|
||||
libpng 1.0.7 is a PNG reference library.
|
||||
See README, a document of original libpng 1.0.7.
|
||||
|
||||
zlib for WindowsCE
|
||||
==================
|
||||
This library requires zlib for WindowsCE. You can use the supplied
|
||||
zlib.diff and zlibce.def files to add WindowsCE support to libpng-1.1.3.
|
||||
|
||||
Copyright notice
|
||||
================
|
||||
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.7, for conditions
|
||||
of use and distribution.
|
||||
|
||||
Files
|
||||
=====
|
||||
|
||||
READMEE.WCE - this file(in English)
|
||||
READMEJ.WCE - this file(in Japanese)
|
||||
png32ce.def - module definition file to make DLLs
|
||||
|
||||
Sample programs(../pngtest.c and ../contrib/*) can build on WindowsCE 2.11.
|
||||
WindowsCE 2.0 and below do not support 'console' functions.
|
||||
|
||||
Author
|
||||
======
|
||||
Tenik Co.,Ltd.
|
||||
Kazuo Adachi
|
||||
adachi@tenik.co.jp
|
44
wince/READMEJ.WCE
Normal file
44
wince/READMEJ.WCE
Normal file
@ -0,0 +1,44 @@
|
||||
libpng for WindowsCE Rel.1.0
|
||||
============================
|
||||
Copyright (c) 2000 Glenn Randers-Pehrson
|
||||
Copyright (c) 2000 Tenik Co.,Ltd.
|
||||
|
||||
Porting for WindowsCE by Tenik Co.,Ltd.(Kazuo Adachi)
|
||||
|
||||
|
||||
はじめに
|
||||
========
|
||||
libpng for WindowsCEは PNG形式の画像データライブラリ libpngのWindowsCE
|
||||
版です。libpngについての詳しい説明は、付属の README をお読みください。
|
||||
|
||||
zlib for WindowsCE
|
||||
==================
|
||||
libpngでは、データ圧縮ライブラリとして zlibを使用しています。libpngを
|
||||
利用するためには、別途 zlibを用意する必要があります。
|
||||
|
||||
なお、このパッケージで利用できる zlibは私の作成した zlibce.dllです。
|
||||
|
||||
使用条件
|
||||
========
|
||||
このソフトウェアは無保証です。このソフトウェアが原因で利用者が被ること
|
||||
になったいかなる被害についても、作者、配布者、その他利用者以外の人物、
|
||||
団体に責任をとる義務はないものとします。
|
||||
|
||||
その他、このソフトウェアの利用条件については、原版である libpng 1.0.7に
|
||||
準拠するものとします。詳しくは、付属の README,LICENSE をお読みください。
|
||||
|
||||
収録内容
|
||||
========
|
||||
|
||||
READMEJ.WCE - このファイル
|
||||
READMEE.WCE - このファイル(英語)
|
||||
png32ce.def - DLL作成用 定義ファイル
|
||||
|
||||
付属サンプル・プログラムは、メッセージ出力の都合上、WindowsCE 2.11以降
|
||||
でのみ使用可能です。
|
||||
|
||||
配布者
|
||||
======
|
||||
テニック株式会社 開発部
|
||||
足立 和雄
|
||||
adachi@tenik.co.jp
|
39
wince/READMEZE.WCE
Normal file
39
wince/READMEZE.WCE
Normal file
@ -0,0 +1,39 @@
|
||||
zlib for WindowsCE Rel.1.0
|
||||
==========================
|
||||
(C) 1995-1998 Jean-loup Gailly and Mark Adler
|
||||
(C) 2000 Tenik Co.,Ltd.
|
||||
|
||||
Porting for WindowsCE by Tenik Co.,Ltd.(Kazuo Adachi)
|
||||
|
||||
|
||||
Introduction
|
||||
============
|
||||
This is zlib 1.1.3 ported to WindowsCE 2.0 and 2.11.
|
||||
zlib 1.1.3 is a general purpose data compression library.
|
||||
See README, a document of original zlib 1.1.3.
|
||||
|
||||
Copyright notice
|
||||
================
|
||||
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, a document of original zlib 1.1.3, for conditions of use and
|
||||
distribution.
|
||||
|
||||
Files
|
||||
=====
|
||||
|
||||
READMEE.WCE - this file(in English)
|
||||
READMEJ.WCE - this file(in Japanese)
|
||||
zlibce.def - module definition file to make DLLs
|
||||
zlibce.diff - patch file for source code
|
||||
|
||||
Sample programs(minigzip.c and example.c) can build on WindowsCE 2.11.
|
||||
WindowsCE 2.0 and below is not support 'console' functions.
|
||||
|
||||
Author
|
||||
======
|
||||
Tenik Co.,Ltd.
|
||||
Kazuo Adachi
|
||||
adachi@tenik.co.jp
|
41
wince/READMEZJ.WCE
Normal file
41
wince/READMEZJ.WCE
Normal file
@ -0,0 +1,41 @@
|
||||
zlib for WindowsCE Rel.1.0
|
||||
==========================
|
||||
(C) 1995-1998 Jean-loup Gailly and Mark Adler
|
||||
(C) 2000 Tenik Co.,Ltd.
|
||||
|
||||
Porting for WindowsCE by Tenik Co.,Ltd.(Kazuo Adachi)
|
||||
|
||||
|
||||
はじめに
|
||||
========
|
||||
zlib for WindowsCEは汎用のデータ圧縮ライブラリ zlibの WindowsCE版です。
|
||||
zlibについての詳しい説明は、付属の README をお読みください。
|
||||
|
||||
使用条件
|
||||
========
|
||||
このソフトウェアは無保証です。このソフトウェアが原因で利用者が被ること
|
||||
になったいかなる被害についても、作者、配布者、その他利用者以外の人物、
|
||||
団体に責任をとる義務はないものとします。
|
||||
|
||||
その他、このソフトウェアの利用条件については、原版である zlib 1.1.3に
|
||||
準拠するものとします。詳しくは、付属の README をお読みください。
|
||||
|
||||
収録内容
|
||||
========
|
||||
|
||||
READMEJ.WCE - このファイル
|
||||
READMEE.WCE - このファイル(英語)
|
||||
zlibce.diff - ソースコード差分ファイル
|
||||
zlibce.def - DLL作成用 定義ファイル
|
||||
|
||||
原版の zlib 1.1.3との最大の違いは、gzio.cのコードです。WindowsCEには
|
||||
stdio.h(open等の関数)が存在しないため、独自の gziowce.cを作成しました。
|
||||
|
||||
minigzip.cと example.cの付属サンプル・プログラムは、メッセージ出力の
|
||||
都合上、WindowsCE 2.11以降でのみ使用可能です。
|
||||
|
||||
配布者
|
||||
======
|
||||
テニック株式会社 開発部
|
||||
足立 和雄
|
||||
adachi@tenik.co.jp
|
180
wince/png32ce.def
Normal file
180
wince/png32ce.def
Normal file
@ -0,0 +1,180 @@
|
||||
;------------------------------------------
|
||||
; LIBPNG module definition file for Windows
|
||||
;------------------------------------------
|
||||
|
||||
LIBRARY lpngce
|
||||
|
||||
EXPORTS
|
||||
;Version 1.0.7
|
||||
png_build_grayscale_palette @1
|
||||
png_check_sig @2
|
||||
png_chunk_error @3
|
||||
png_chunk_warning @4
|
||||
; png_convert_from_struct_tm @5
|
||||
; png_convert_from_time_t @6
|
||||
png_create_info_struct @7
|
||||
png_create_read_struct @8
|
||||
png_create_write_struct @9
|
||||
png_data_freer @10
|
||||
png_destroy_info_struct @11
|
||||
png_destroy_read_struct @12
|
||||
png_destroy_write_struct @13
|
||||
png_error @14
|
||||
png_free @15
|
||||
png_free_data @16
|
||||
png_get_IHDR @17
|
||||
png_get_PLTE @18
|
||||
png_get_bKGD @19
|
||||
png_get_bit_depth @20
|
||||
png_get_cHRM @21
|
||||
png_get_cHRM_fixed @22
|
||||
png_get_channels @23
|
||||
png_get_color_type @24
|
||||
png_get_compression_buffer_size @25
|
||||
png_get_compression_type @26
|
||||
png_get_copyright @27
|
||||
png_get_error_ptr @28
|
||||
png_get_filter_type @29
|
||||
png_get_gAMA @30
|
||||
png_get_gAMA_fixed @31
|
||||
png_get_hIST @32
|
||||
png_get_header_ver @33
|
||||
png_get_header_version @34
|
||||
png_get_iCCP @35
|
||||
png_get_image_height @36
|
||||
png_get_image_width @37
|
||||
png_get_interlace_type @38
|
||||
png_get_io_ptr @39
|
||||
png_get_libpng_ver @40
|
||||
png_get_oFFs @41
|
||||
png_get_pCAL @42
|
||||
png_get_pHYs @43
|
||||
png_get_pixel_aspect_ratio @44
|
||||
png_get_pixels_per_meter @45
|
||||
png_get_progressive_ptr @46
|
||||
png_get_rgb_to_gray_status @47
|
||||
png_get_rowbytes @48
|
||||
png_get_rows @49
|
||||
png_get_sBIT @50
|
||||
png_get_sCAL @51
|
||||
png_get_sPLT @52
|
||||
png_get_sRGB @53
|
||||
png_get_signature @54
|
||||
png_get_tIME @55
|
||||
png_get_tRNS @56
|
||||
png_get_text @57
|
||||
png_get_unknown_chunks @58
|
||||
png_get_user_chunk_ptr @59
|
||||
png_get_user_transform_ptr @60
|
||||
png_get_valid @61
|
||||
png_get_x_offset_microns @62
|
||||
png_get_x_offset_pixels @63
|
||||
png_get_x_pixels_per_meter @64
|
||||
png_get_y_offset_microns @65
|
||||
png_get_y_offset_pixels @66
|
||||
png_get_y_pixels_per_meter @67
|
||||
png_malloc @68
|
||||
png_memcpy_check @69
|
||||
png_memset_check @70
|
||||
png_permit_empty_plte @71
|
||||
png_process_data @72
|
||||
png_progressive_combine_row @73
|
||||
png_read_end @74
|
||||
png_read_image @75
|
||||
png_read_info @76
|
||||
png_read_init @77
|
||||
png_read_png @78
|
||||
png_read_row @79
|
||||
png_read_rows @80
|
||||
png_read_update_info @81
|
||||
png_reset_zstream @82
|
||||
png_set_IHDR @83
|
||||
png_set_PLTE @84
|
||||
png_set_bKGD @85
|
||||
png_set_background @86
|
||||
png_set_bgr @87
|
||||
png_set_cHRM @88
|
||||
png_set_cHRM_fixed @89
|
||||
png_set_compression_buffer_size @90
|
||||
png_set_compression_level @91
|
||||
png_set_compression_mem_level @92
|
||||
png_set_compression_method @93
|
||||
png_set_compression_strategy @94
|
||||
png_set_compression_window_bits @95
|
||||
png_set_crc_action @96
|
||||
png_set_dither @97
|
||||
png_set_error_fn @98
|
||||
png_set_expand @99
|
||||
png_set_filler @100
|
||||
png_set_filter @101
|
||||
png_set_filter_heuristics @102
|
||||
png_set_flush @103
|
||||
png_set_gAMA @104
|
||||
png_set_gAMA_fixed @105
|
||||
png_set_gamma @106
|
||||
png_set_gray_1_2_4_to_8 @107
|
||||
png_set_gray_to_rgb @108
|
||||
png_set_hIST @109
|
||||
png_set_iCCP @110
|
||||
png_set_interlace_handling @111
|
||||
png_set_invert_alpha @112
|
||||
png_set_invert_mono @113
|
||||
png_set_keep_unknown_chunks @114
|
||||
png_set_oFFs @115
|
||||
png_set_pCAL @116
|
||||
png_set_pHYs @117
|
||||
png_set_packing @118
|
||||
png_set_packswap @119
|
||||
png_set_palette_to_rgb @120
|
||||
png_set_progressive_read_fn @121
|
||||
png_set_read_fn @122
|
||||
png_set_read_status_fn @123
|
||||
png_set_read_user_chunk_fn @124
|
||||
png_set_read_user_transform_fn @125
|
||||
png_set_rgb_to_gray @126
|
||||
png_set_rgb_to_gray_fixed @127
|
||||
png_set_rows @128
|
||||
png_set_sBIT @129
|
||||
png_set_sCAL @130
|
||||
png_set_sPLT @131
|
||||
png_set_sRGB @132
|
||||
png_set_sRGB_gAMA_and_cHRM @133
|
||||
png_set_shift @134
|
||||
png_set_sig_bytes @135
|
||||
png_set_strip_16 @136
|
||||
png_set_strip_alpha @137
|
||||
png_set_swap @138
|
||||
png_set_swap_alpha @139
|
||||
png_set_tIME @140
|
||||
png_set_tRNS @141
|
||||
png_set_tRNS_to_alpha @142
|
||||
png_set_text @143
|
||||
png_set_unknown_chunk_location @144
|
||||
png_set_unknown_chunks @145
|
||||
png_set_user_transform_info @146
|
||||
png_set_write_fn @147
|
||||
png_set_write_status_fn @148
|
||||
png_set_write_user_transform_fn @149
|
||||
png_sig_cmp @150
|
||||
png_start_read_image @151
|
||||
png_warning @152
|
||||
png_write_chunk @153
|
||||
png_write_chunk_data @154
|
||||
png_write_chunk_end @155
|
||||
png_write_chunk_start @156
|
||||
png_write_end @157
|
||||
png_write_flush @158
|
||||
png_write_image @159
|
||||
png_write_info @160
|
||||
png_write_info_before_PLTE @161
|
||||
png_write_init @162
|
||||
png_write_png @163
|
||||
png_write_row @164
|
||||
png_write_rows @165
|
||||
png_read_init_2 @166
|
||||
png_write_init_2 @167
|
||||
png_access_version_number @168
|
||||
; png_sig_bytes @169
|
||||
png_libpng_ver @170
|
||||
png_init_io @171
|
||||
png_convert_to_rfc1123 @172
|
44
wince/zlibce.def
Normal file
44
wince/zlibce.def
Normal file
@ -0,0 +1,44 @@
|
||||
LIBRARY zlibce.dll
|
||||
|
||||
EXPORTS
|
||||
adler32 @1
|
||||
compress @2
|
||||
crc32 @3
|
||||
deflate @4
|
||||
deflateCopy @5
|
||||
deflateEnd @6
|
||||
deflateInit2_ @7
|
||||
deflateInit_ @8
|
||||
deflateParams @9
|
||||
deflateReset @10
|
||||
deflateSetDictionary @11
|
||||
gzclose @12
|
||||
gzdopen @13
|
||||
gzerror @14
|
||||
gzflush @15
|
||||
gzopen @16
|
||||
gzread @17
|
||||
gzwrite @18
|
||||
inflate @19
|
||||
inflateEnd @20
|
||||
inflateInit2_ @21
|
||||
inflateInit_ @22
|
||||
inflateReset @23
|
||||
inflateSetDictionary @24
|
||||
inflateSync @25
|
||||
uncompress @26
|
||||
zlibVersion @27
|
||||
gzprintf @28
|
||||
gzputc @29
|
||||
gzgetc @30
|
||||
gzseek @31
|
||||
gzrewind @32
|
||||
gztell @33
|
||||
gzeof @34
|
||||
gzsetparams @35
|
||||
zError @36
|
||||
inflateSyncPoint @37
|
||||
get_crc_table @38
|
||||
compress2 @39
|
||||
gzputs @40
|
||||
gzgets @41
|
Loading…
Reference in New Issue
Block a user