Imported from libpng-1.0.4d.tar

This commit is contained in:
Glenn Randers-Pehrson 1999-10-06 04:57:42 -05:00
parent bcfd15d9f2
commit ab1e583c44
38 changed files with 141 additions and 89 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.0.4c - October 1, 1999
Libpng 1.0.4d - October 6, 1999
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@ -69,15 +69,20 @@ version 1.0.4 [September 24, 1999]
Split makefile.win32vc into two versions, makefile.vcawin32 (uses MMX
assembler code) and makefile.vcwin32 (doesn't).
Added a CPU timing report to pngtest.c (enabled by defining PNGTEST_TIMING)
Added a copy of pngnow.png to the distribution.
version 1.0.4a September 25, 1999
Increase max_pixel_depth in pngrutil.c if a user transform needs it.
Changed several division operations to right-shifts in pngvcrd.c
version 1.0.4b September 30, 1999
Added parentheses in line 3732 of pngvcrd.c
Added a comment in makefile.linux warning about buggy -O3 in pgcc 2.95.1
version 1.0.4c [October 1, 1999]
Added a "png_check_version" function in png.c and pngtest.c that will generate
a helpful compiler error if an old png.h is found in the search path.
version 1.0.4c October 1, 1999
Changed type of png_user_transform_depth|channels from int to png_byte.
version 1.0.4d [October 6, 1999]
Changed 0.45 to 0.45455 in png_set_sRGB()
Removed unused PLTE entries from pngnow.png
Send comments/corrections/commendations to
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu

View File

@ -449,6 +449,7 @@ version 1.0.4 [September 24, 1999]
Split makefile.win32vc into two versions, makefile.vcawin32 (uses MMX
assembler code) and makefile.vcwin32 (doesn't).
Added a CPU timing report to pngtest.c (enabled by defining PNGTEST_TIMING)
Added a copy of pngnow.png to the distribution.
version 1.0.4a [September 25, 1999]
Increase max_pixel_depth in pngrutil.c if a user transform needs it.
Changed several division operations to right-shifts in pngvcrd.c
@ -458,3 +459,7 @@ version 1.0.4b [September 30, 1999]
version 1.0.4c [October 1, 1999]
Added a "png_check_version" function in png.c and pngtest.c that will generate
a helpful compiler error if an old png.h is found in the search path.
version 1.0.4d [October 6, 1999]
Changed type of png_user_transform_depth|channels from int to png_byte.
Changed 0.45 to 0.45455 in png_set_sRGB()
Removed unused PLTE entries from pngnow.png

View File

@ -1,5 +1,5 @@
Installing libpng version 1.0.4c - October 1, 1999
Installing libpng version 1.0.4d - October 6, 1999
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.4c" or "lpng103" and "zlib-1.1.3"
might be called "libpng-1.0.4d" or "lpng103" and "zlib-1.1.3"
or "zlib113") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:
@ -47,8 +47,8 @@ include
makefile.hpux => HPUX (10.20 and 11.00) makefile
makefile.sgi => Silicon Graphics IRIX makefile
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.4c)
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.4c)
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.4d)
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.4d)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile

View File

@ -38,3 +38,13 @@ Known bugs and suggested enhancements in libpng-1.0.4
for the png_set_gAMA(), png_set_cHRM(), and corresponding png_get_()
functions will be needed.
4. September 1999 -- BUG --
Portions of the new MMX code in pngvcrd.c are defined out because the
did not work properly. When PNGVCRD_INTERLACE_BUG_IS_FIXED is defined,
to enable the code, pngtest pngtest.png pngout.png results in a
"Debug error! Damage before normal block # 57 at 0x007e19f0" on
a Pentium II with MMX system. This seems to be caused by the heap
being trashed before a free() in png_read_destroy().
When PNGVCRD_COMBINE_BUG_IS_FIXED is defined (what?)

View File

@ -5,7 +5,7 @@ Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
Copyright (c) 1996, 1997 Andreas Dilger
(libpng versions 0.90, December 1996, through 0.96, May 1997)
Copyright (c) 1998, 1999 Glenn Randers-Pehrson
(libpng versions 0.97, January 1998, through 1.0.4c, October 1, 1999)
(libpng versions 0.97, January 1998, through 1.0.4d, October 6, 1999)
For the purposes of this copyright and license, "Contributing Authors"
is defined as the following set of individuals:
@ -56,4 +56,4 @@ appreciated.
Glenn Randers-Pehrson
randeg@alum.rpi.edu
October 1, 1999
October 6, 1999

6
README
View File

@ -1,4 +1,4 @@
README for libpng 1.0.4c - October 1, 1999 (shared library 2.1)
README for libpng 1.0.4d - October 6, 1999 (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.
@ -163,9 +163,9 @@ Files in this distribution:
makefile.sgi => Silicon Graphics IRIX makefile
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
(gcc, creates libpng.so.2.1.0.4c)
(gcc, creates libpng.so.2.1.0.4d)
makefile.linux => Linux/ELF makefile
(gcc, creates libpng.so.2.1.0.4c)
(gcc, creates libpng.so.2.1.0.4d)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile

View File

@ -1,13 +1,13 @@
Y2K compliance in libpng:
=========================
October 1, 1999
October 6, 1999
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.4c are Y2K compliant. It is my belief that earlier
upward through 1.0.4d 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

View File

@ -1,6 +1,6 @@
.TH LIBPNG 3 "October 1, 1999"
.TH LIBPNG 3 "October 6, 1999"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.4c - October 1, 1999
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.4d - October 6, 1999
.SH SYNOPSIS
\fI\fB
@ -617,7 +617,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.4c - October 1, 1999
libpng version 1.0.4d - October 6, 1999
Updated and distributed by Glenn Randers-Pehrson
<randeg@alum.rpi.edu>
Copyright (c) 1998, 1999 Glenn Randers-Pehrson
@ -2675,13 +2675,13 @@ the old method.
.SH VII. Y2K Compliance in libpng
October 1, 1999
October 6, 1999
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.4c are Y2K compliant. It is my belief that earlier
upward through 1.0.4d 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
@ -2807,7 +2807,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.0.4c - October 1, 1999:
Libpng version 1.0.4d - October 6, 1999:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
@ -2822,7 +2822,7 @@ Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
Copyright (c) 1996, 1997 Andreas Dilger
(libpng versions 0.90, December 1996, through 0.96, May 1997)
Copyright (c) 1998, 1999 Glenn Randers-Pehrson
(libpng versions 0.97, January 1998, through 1.0.4c, October 1, 1999)
(libpng versions 0.97, January 1998, through 1.0.4d, October 6, 1999)
For the purposes of this copyright and license, "Contributing Authors"
is defined as the following set of individuals:

View File

@ -1,6 +1,6 @@
libpng.txt - A description on how to use and modify libpng
libpng version 1.0.4c - October 1, 1999
libpng version 1.0.4d - October 6, 1999
Updated and distributed by Glenn Randers-Pehrson
<randeg@alum.rpi.edu>
Copyright (c) 1998, 1999 Glenn Randers-Pehrson
@ -2058,13 +2058,13 @@ the old method.
VII. Y2K Compliance in libpng
October 1, 1999
October 6, 1999
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.4c are Y2K compliant. It is my belief that earlier
upward through 1.0.4d 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

View File

@ -1,6 +1,6 @@
.TH LIBPNGPF 3 October 1, 1999
.TH LIBPNGPF 3 October 6, 1999
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.4c - October 1, 1999
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.4d - October 6, 1999
(private functions)
.SH SYNOPSIS
\fB#include <png.h>\fP

2
png.5
View File

@ -1,4 +1,4 @@
.TH PNG 5 "October 1, 1999"
.TH PNG 5 "October 6, 1999"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION

10
png.c
View File

@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions
*
* libpng version 1.0.4c - October 1, 1999
* libpng version 1.0.4d - October 6, 1999
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, 1999 Glenn Randers-Pehrson
@ -16,7 +16,7 @@
* string defined in png.h.
*/
char png_libpng_ver[12] = "1.0.4c";
char png_libpng_ver[12] = "1.0.4d";
/* Place to hold the signature string for a PNG file. */
png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10};
@ -352,7 +352,7 @@ png_get_copyright(png_structp png_ptr)
{
if(png_ptr == NULL)
/* silence compiler warning about unused png_ptr */ ;
return("\n libpng version 1.0.4c - October 1, 1999\n\
return("\n libpng version 1.0.4d - October 6, 1999\n\
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n\
Copyright (c) 1996, 1997 Andreas Dilger\n\
Copyright (c) 1998, 1999 Glenn Randers-Pehrson\n");
@ -361,8 +361,8 @@ png_get_copyright(png_structp png_ptr)
/* Generate a compiler error if there is an old png.h in the search path. */
void
png_check_version
(version_1_0_4c png_h_is_not_version_1_0_4c)
(version_1_0_4d png_h_is_not_version_1_0_4d)
{
if(png_h_is_not_version_1_0_4c == NULL)
if(png_h_is_not_version_1_0_4d == NULL)
/* silence compiler warning about unused parameter */ ;
}

22
png.h
View File

@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.0.4c - October 1, 1999
* libpng version 1.0.4d - October 6, 1999
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, 1999 Glenn Randers-Pehrson
@ -9,19 +9,19 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.89c, May 1996: Guy Schalnat
* libpng versions 0.90, December 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.0.4c - October 1, 1999: Glenn
* libpng versions 0.97, January 1998, through 1.0.4d - October 6, 1999: Glenn
* See also "Contributing Authors", below.
*
* Y2K compliance in libpng:
* =========================
*
* October 1, 1999
* October 6, 1999
*
* 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.4c are Y2K compliant. It is my belief that earlier
* upward through 1.0.4d 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
@ -117,7 +117,7 @@
* Copyright (c) 1996, 1997 Andreas Dilger
* (libpng versions 0.90, December 1996, through 0.96, May 1997)
* Copyright (c) 1998, 1999 Glenn Randers-Pehrson
* (libpng versions 0.97, January 1998, through 1.0.4c, October 1, 1999)
* (libpng versions 0.97, January 1998, through 1.0.4d, October 6, 1999)
*
* For the purposes of this copyright and license, "Contributing Authors"
* is defined as the following set of individuals:
@ -208,7 +208,7 @@ extern "C" {
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.0.4c"
#define PNG_LIBPNG_VER_STRING "1.0.4d"
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
* We must not include leading zeros.
@ -644,8 +644,8 @@ struct png_struct_def
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
png_voidp user_transform_ptr; /* user supplied struct for user transform */
int user_transform_depth; /* bit depth of user transformed pixels */
int user_transform_channels; /* channels in user transformed pixels */
png_byte user_transform_depth; /* bit depth of user transformed pixels */
png_byte user_transform_channels; /* channels in user transformed pixels */
#endif
png_uint_32 mode; /* tells us where we are in the PNG file */
@ -806,9 +806,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.4c
and png.h are both at * version 1.0.4d
*/
typedef png_structp version_1_0_4c;
typedef png_structp version_1_0_4d;
typedef png_struct FAR * FAR * png_structpp;
@ -1629,7 +1629,7 @@ png_get_header_version(png_structp png_ptr)
{
if(png_ptr == NULL)
/* silence compiler warning about unused png_ptr */ ;
return("\n libpng version 1.0.4c - October 1, 1999 (header)\n");
return("\n libpng version 1.0.4d - October 6, 1999 (header)\n");
}
#endif

View File

@ -1,6 +1,6 @@
/* pngasmrd.h - assembler version of utilities to read a PNG file
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1999 Glenn Randers-Pehrson
*
@ -21,7 +21,7 @@
/* Set this in the makefile for gcc on Pentium, not in pngconf.h */
#ifdef PNG_USE_PNGGCCRD
/* Platform must be Pentium. Makefile must assemble and load pnggccrd.c
* (not available in libpng 1.0.4c).
* (not available in libpng 1.0.4d).
* MMX will be detected at run time and used if present.
*/
#define PNG_HAVE_ASSEMBLER_COMBINE_ROW

View File

@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger

View File

@ -1,7 +1,7 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger

View File

@ -1,7 +1,7 @@
/* pngget.c - retrieval of values from info struct
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger

View File

@ -1,7 +1,7 @@
/* pngmem.c - stub functions for memory allocation
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -1,7 +1,7 @@
/* pngpread.c - read a png file in push mode
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger

View File

@ -1,7 +1,7 @@
/* pngread.c - read a PNG file
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
@ -531,7 +531,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.4c.
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.4d.
*/
void
@ -580,7 +580,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.4c.
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.4d.
*/
void
png_read_image(png_structp png_ptr, png_bytepp image)

View File

@ -1,7 +1,7 @@
/* pngrio.c - functions for data input
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger

View File

@ -1,7 +1,7 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger

View File

@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger

View File

@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
@ -249,7 +249,7 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
png_set_sRGB(png_ptr, info_ptr, intent);
#if defined(PNG_READ_gAMA_SUPPORTED) || defined(PNG_WRITE_gAMA_SUPPORTED)
file_gamma = (float).45;
file_gamma = (float).45455;
png_set_gAMA(png_ptr, info_ptr, file_gamma);
#endif

View File

@ -1,7 +1,7 @@
/* pngtest.c - a simple test program to test libpng
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
@ -1172,7 +1172,7 @@ main(int argc, char *argv[])
/* Generate a compiler error if there is an old png.h in the search path. */
void
png_check_pngtest_version
(version_1_0_4c png_h_is_not_version_1_0_4c)
(version_1_0_4d png_h_is_not_version_1_0_4d)
{
if(png_h_is_not_version_1_0_4c == NULL) return;
if(png_h_is_not_version_1_0_4d == NULL) return;
}

View File

@ -1,7 +1,7 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
@ -578,8 +578,8 @@ png_set_user_transform_info(png_structp png_ptr, png_voidp
{
png_debug(1, "in png_set_user_transform_info\n");
png_ptr->user_transform_ptr = user_transform_ptr;
png_ptr->user_transform_depth = user_transform_depth;
png_ptr->user_transform_channels = user_transform_channels;
png_ptr->user_transform_depth = (png_byte)user_transform_depth;
png_ptr->user_transform_channels = (png_byte)user_transform_channels;
}
/* This function returns a pointer to the user_transform_ptr associated with

View File

@ -2,7 +2,7 @@
*
* For Intel x86 CPU and Microsoft Visual C++ compiler
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, Intel Corporation
* Copyright (c) 1998, 1999 Glenn Randers-Pehrson
@ -80,8 +80,8 @@ NOT_SUPPORTED:
of interlaced images, depending on the mask value.
The mask value describes which pixels are to be combined with
the row. The pattern always repeats every 8 pixels, so just 8
bits are needed. A one indicates the pixels is to be combined,
a zero indicates the pixel is to be skipped. This is in addition
bits are needed. A one indicates the pixel is to be combined; a
zero indicates the pixel is to be skipped. This is in addition
to any alpha or transparency value associated with the pixel. If
you want all pixels to be combined, pass 0xff (255) in mask. */
@ -91,12 +91,17 @@ NOT_SUPPORTED:
void
png_combine_row(png_structp png_ptr, png_bytep row, int mask)
{
#ifdef DISABLE_PNGVCRD_COMBINE
int save_mmx_supported = mmx_supported;
#endif
png_debug(1,"in png_combine_row_asm\n");
#ifdef DISABLE_PNGVCRD_COMBINE
if ((png_ptr->transformations & PNG_INTERLACE) && png_ptr->pass != 6)
mmx_supported = 0;
else
#endif
if (mmx_supported == 2)
mmx_supported = mmxsupport();
@ -105,6 +110,8 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
png_memcpy(row, png_ptr->row_buf + 1,
(png_size_t)((png_ptr->width * png_ptr->row_info.pixel_depth + 7) >> 3));
}
/* GRR: add "else if (mask == 0)" case?
* or does png_combine_row() not even get called in that case? */
else
{
switch (png_ptr->row_info.pixel_depth)
@ -220,6 +227,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
}
break;
}
case 4:
{
png_bytep sp;
@ -273,6 +281,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
}
break;
}
case 8:
{
png_bytep srcptr;
@ -305,7 +314,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
pand mm0,mm7 //nonzero if keep byte
pcmpeqb mm0,mm6 //zeros->1s, v versa
mov ecx,len //load length of line
mov ecx,len //load length of line (pixels)
mov esi,srcptr //load source
mov ebx,dstptr //load dest
cmp ecx,0 //lcr
@ -353,9 +362,9 @@ end8:
register unsigned int incr1, initial_val, final_val;
png_size_t pixel_bytes;
png_uint_32 i;
//if ((mask != 0x0f) && (mask != 0x33))
register int disp = png_pass_inc[png_ptr->pass];
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]*
pixel_bytes;
@ -483,7 +492,7 @@ end16:
} /* end of else */
break;
}
} // end 16 bpp
case 24:
{
@ -596,6 +605,7 @@ end24:
png_uint_32 i;
register int disp = png_pass_inc[png_ptr->pass];
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]*
pixel_bytes;
@ -734,6 +744,7 @@ end32:
png_uint_32 i;
register int disp = png_pass_inc[png_ptr->pass];
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]*
pixel_bytes;
@ -890,6 +901,7 @@ end48:
png_uint_32 i;
register int disp = png_pass_inc[png_ptr->pass];
int offset_table[7] = {0, 4, 0, 2, 0, 1, 0};
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]*
pixel_bytes;
@ -904,8 +916,9 @@ end48:
dstptr += incr1;
}
} /* end of else */
break; // end 48 bpp
}
break;
} // end 48 bpp
default:
{
@ -916,6 +929,7 @@ end48:
unsigned int i;
register int disp = png_pass_inc[png_ptr->pass]; // get the offset
register unsigned int incr1, initial_val, final_val;
pixel_bytes = (png_ptr->row_info.pixel_depth >> 3);
sptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]*
pixel_bytes;
@ -932,8 +946,11 @@ end48:
break;
}
} /* end switch (png_ptr->row_info.pixel_depth) */
}
} /* end if (non-trivial mask) */
#ifdef DISABLE_PNGVCRD_COMBINE
mmx_supported = save_mmx_supported;
#endif
} /* end png_combine_row() */
@ -944,12 +961,24 @@ void
png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
png_uint_32 transformations)
{
#ifndef ENABLE_PNGVCRD_INTERLACE
int save_mmx_supported = mmx_supported;
#endif
png_debug(1,"in png_do_read_interlace\n");
// mmx_supported = mmxsupport(); // doesn't work
#ifndef ENABLE_PNGVCRD_INTERLACE
/* passes 0 and 2 affect rpng2-win + stefan_full_rgba.png
* symptom: first pixel in every 4th or 8th row is wrong color
* pass < 6 affects pngtest + any interlaced png
* symptom: corruption of heap, crash in png_destroy_read
*/
if(pass < 6)
mmx_supported = 0;
#else
if (mmx_supported == 2)
mmx_supported = mmxsupport();
#endif
if (row != NULL && row_info != NULL)
{
@ -1848,7 +1877,10 @@ loop4_pass4:
row_info->rowbytes = ((final_width *
(png_uint_32)row_info->pixel_depth + 7) >> 3);
}
#ifndef ENABLE_PNGVCRD_INTERLACE
mmx_supported = save_mmx_supported;
#endif
}
#endif /* PNG_READ_INTERLACING_SUPPORTED */

View File

@ -1,7 +1,7 @@
/* pngwio.c - functions for data output
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger

View File

@ -1,7 +1,7 @@
/* pngwrite.c - general routines to write a PNG file
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger

View File

@ -1,7 +1,7 @@
/* pngwtran.c - transforms the data in a row for PNG writers
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger

View File

@ -1,7 +1,7 @@
/* pngwutil.c - utilities to write a PNG file
*
* libpng 1.0.4c - October 1, 1999
* libpng 1.0.4d - October 6, 1999
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger

View File

@ -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.4c
PNGMIN = 1.0.4d
PNGVER = $(PNGMAJ).$(PNGMIN)
# where make install puts libpng.a, libpng.so*, and png.h

View File

@ -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.4c
PNGMIN = 1.0.4d
PNGVER = $(PNGMAJ).$(PNGMIN)
CC=cc

View File

@ -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.4c
PNGMIN = 1.0.4d
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include

View File

@ -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.4c
PNGMIN = 1.0.4d
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include

View File

@ -36,7 +36,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.4c
PNGMIN = 1.0.4d
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include

View File

@ -3,7 +3,7 @@ unit pngdef;
interface
const
PNG_LIBPNG_VER_STRING = '1.0.4c';
PNG_LIBPNG_VER_STRING = '1.0.4d';
PNG_LIBPNG_VER = 10005;
type