Compare commits

...

2 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
18c415f5b5 Imported from libpng-1.0.4e.tar 2009-04-06 16:04:38 -05:00
Glenn Randers-Pehrson
310faa8ec9 Imported from libpng-1.0.4d2.tar 2009-04-06 16:04:37 -05:00
38 changed files with 162 additions and 158 deletions

View File

@@ -1,5 +1,5 @@
Libpng 1.0.4d - October 6, 1999
Libpng 1.0.4e - October 10, 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.
@@ -80,9 +80,13 @@ version 1.0.4b September 30, 1999
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]
version 1.0.4e [October 10, 1999]
Changed 0.45 to 0.45455 in png_set_sRGB()
Removed unused PLTE entries from pngnow.png
Re-enabled some parts of pngvcrd.c (png_combine_row) that work properly.
version 1.0.4e [October 10, 1999]
Fixed sign error in pngvcrd.c (Greg Roelofs)
Replaced some instances of memcpy with simple assignments in pngvcrd (GR-P)
Send comments/corrections/commendations to
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu

View File

@@ -459,7 +459,11 @@ 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.
version 1.0.4d [October 6, 1999]
Changed 0.45 to 0.45455 in png_set_sRGB()
Removed unused PLTE entries from pngnow.png
Re-enabled some parts of pngvcrd.c (png_combine_row) that work properly.
version 1.0.4e [October 10, 1999]
Fixed sign error in pngvcrd.c (Greg Roelofs)
Replaced some instances of memcpy with simple assignments in pngvcrd (GR-P)

View File

@@ -1,5 +1,5 @@
Installing libpng version 1.0.4d - October 6, 1999
Installing libpng version 1.0.4e - October 10, 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.4d" or "lpng103" and "zlib-1.1.3"
might be called "libpng-1.0.4e" 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.4d)
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.4d)
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.4e)
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.4e)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile

View File

@@ -38,13 +38,21 @@ 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 --
4. September 1999 -- BUG [FIXED] --
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().
Portions of the new MMX code in pngvcrd.c were ifdef'd out because they
didn't work properly, but the bug appears to have been found and fixed.
As a result, all parts of the code are once again enabled. If you think
there's still a problem, you can recompile with one of the following two
macros defined and see if the problem goes away:
When PNGVCRD_COMBINE_BUG_IS_FIXED is defined (what?)
DISABLE_PNGVCRD_COMBINE
DISABLE_PNGVCRD_INTERLACE
The second one is in the function where the bug was; as far as we are
aware, there was never any bug in the other function. Please notify us
if you find any problems in libpng, regardless of whether the two macros
make any difference: png-implement@ccrc.wustl.edu
Again, we believe the MMX code in pngvcrd.c is 100% correct, but it has
not yet been tested extensively.

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.4d, October 6, 1999)
(libpng versions 0.97, January 1998, through 1.0.4e, October 10, 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 6, 1999
October 10, 1999

6
README
View File

@@ -1,4 +1,4 @@
README for libpng 1.0.4d - October 6, 1999 (shared library 2.1)
README for libpng 1.0.4e - October 10, 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.4d)
(gcc, creates libpng.so.2.1.0.4e)
makefile.linux => Linux/ELF makefile
(gcc, creates libpng.so.2.1.0.4d)
(gcc, creates libpng.so.2.1.0.4e)
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 6, 1999
October 10, 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.4d are Y2K compliant. It is my belief that earlier
upward through 1.0.4e 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 6, 1999"
.TH LIBPNG 3 "October 10, 1999"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.4d - October 6, 1999
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.4e - October 10, 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.4d - October 6, 1999
libpng version 1.0.4e - October 10, 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 6, 1999
October 10, 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.4d are Y2K compliant. It is my belief that earlier
upward through 1.0.4e 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.4d - October 6, 1999:
Libpng version 1.0.4e - October 10, 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.4d, October 6, 1999)
(libpng versions 0.97, January 1998, through 1.0.4e, October 10, 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.4d - October 6, 1999
libpng version 1.0.4e - October 10, 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 6, 1999
October 10, 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.4d are Y2K compliant. It is my belief that earlier
upward through 1.0.4e 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 6, 1999
.TH LIBPNGPF 3 October 10, 1999
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.4d - October 6, 1999
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.4e - October 10, 1999
(private functions)
.SH SYNOPSIS
\fB#include <png.h>\fP

2
png.5
View File

@@ -1,4 +1,4 @@
.TH PNG 5 "October 6, 1999"
.TH PNG 5 "October 10, 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.4d - October 6, 1999
* libpng version 1.0.4e - October 10, 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.4d";
char png_libpng_ver[12] = "1.0.4e";
/* 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.4d - October 6, 1999\n\
return("\n libpng version 1.0.4e - October 10, 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_4d png_h_is_not_version_1_0_4d)
(version_1_0_4e png_h_is_not_version_1_0_4e)
{
if(png_h_is_not_version_1_0_4d == NULL)
if(png_h_is_not_version_1_0_4e == NULL)
/* silence compiler warning about unused parameter */ ;
}

20
png.h
View File

@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.0.4d - October 6, 1999
* libpng version 1.0.4e - October 10, 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.4d - October 6, 1999: Glenn
* libpng versions 0.97, January 1998, through 1.0.4e - October 10, 1999: Glenn
* See also "Contributing Authors", below.
*
* Y2K compliance in libpng:
* =========================
*
* October 6, 1999
* October 10, 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.4d are Y2K compliant. It is my belief that earlier
* upward through 1.0.4e 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
@@ -95,7 +95,7 @@
* 1.0.3 1.0.3 10003 2.1.0.3
* 1.0.3a-d 1.0.3a-d 10004 2.1.0.3a-d
* 1.0.4 1.0.4 10004 2.1.0.4
* 1.0.4a-c 1.0.4a-c 10005 2.1.0.4a-c
* 1.0.4a-e 1.0.4a-e 10005 2.1.0.4a-e
* 1.0.5 1.0.5 10005 2.1.0.5
*
* Henceforth the source version will match the shared-library minor
@@ -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.4d, October 6, 1999)
* (libpng versions 0.97, January 1998, through 1.0.4e, October 10, 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.4d"
#define PNG_LIBPNG_VER_STRING "1.0.4e"
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
* We must not include leading zeros.
@@ -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.4d
and png.h are both at * version 1.0.4e
*/
typedef png_structp version_1_0_4d;
typedef png_structp version_1_0_4e;
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.4d - October 6, 1999 (header)\n");
return("\n libpng version 1.0.4e - October 10, 1999 (header)\n");
}
#endif

View File

@@ -1,6 +1,6 @@
/* pngasmrd.h - assembler version of utilities to read a PNG file
*
* libpng 1.0.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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.4d).
* (not available in libpng 1.0.4e).
* 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.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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.0 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.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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
@@ -465,10 +465,8 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
png_ptr->row_info.channels = png_ptr->channels;
png_ptr->row_info.bit_depth = png_ptr->bit_depth;
png_ptr->row_info.pixel_depth = png_ptr->pixel_depth;
{
png_ptr->row_info.rowbytes = ((png_ptr->row_info.width *
(png_uint_32)png_ptr->row_info.pixel_depth + 7) >> 3);
}
png_ptr->row_info.rowbytes = ((png_ptr->row_info.width *
(png_uint_32)png_ptr->row_info.pixel_depth + 7) >> 3);
png_read_filter_row(png_ptr, &(png_ptr->row_info),
png_ptr->row_buf + 1, png_ptr->prev_row + 1,
@@ -531,7 +529,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.4d.
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.4e.
*/
void
@@ -580,7 +578,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.4d.
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.4e.
*/
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.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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 @@
/* pngtest.c - a simple test program to test libpng
*
* libpng 1.0.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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_4d png_h_is_not_version_1_0_4d)
(version_1_0_4e png_h_is_not_version_1_0_4e)
{
if(png_h_is_not_version_1_0_4d == NULL) return;
if(png_h_is_not_version_1_0_4e == 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.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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

142
pngvcrd.c
View File

@@ -2,7 +2,7 @@
*
* For Intel x86 CPU and Microsoft Visual C++ compiler
*
* libpng 1.0.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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
@@ -26,7 +26,6 @@ png_read_filter_row_c(png_structp png_ptr, png_row_infop row_info,
static int mmxsupport()
{
int mmx_supported_local = 0;
_asm {
pushfd //Save Eflag to stack
pop eax //Get Eflag from stack into eax
@@ -102,8 +101,8 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
mmx_supported = 0;
else
#endif
if (mmx_supported == 2)
mmx_supported = mmxsupport();
if (mmx_supported == 2)
mmx_supported = mmxsupport();
if (mask == 0xff)
{
@@ -961,24 +960,27 @@ void
png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
png_uint_32 transformations)
{
#ifndef ENABLE_PNGVCRD_INTERLACE
#ifdef DISABLE_PNGVCRD_INTERLACE
int save_mmx_supported = mmx_supported;
#endif
png_debug(1,"in png_do_read_interlace\n");
#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
#ifdef DISABLE_PNGVCRD_INTERLACE
/* In libpng versions 1.0.3a through 1.0.4d,
* a sign error in the post-MMX cleanup code for each pixel_depth resulted
* in bad pixels at the beginning of some rows of some images, and also
* (due to out-of-range memory reads and writes) caused heap corruption
* when compiled with MSVC 6.0. The error was fixed in version 1.0.4e,
* and the code appears to work completely correctly, so it is enabled
* by default.
*/
if(pass < 6)
if (1) /* all passes caused a heap problem in the old code */
mmx_supported = 0;
#else
if (mmx_supported == 2)
mmx_supported = mmxsupport();
else
#endif
if (mmx_supported == 2)
mmx_supported = mmxsupport();
if (row != NULL && row_info != NULL)
{
@@ -1163,19 +1165,18 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
__int64 const4 = 0x0000000000FFFFFF;
__int64 const5 = 0x000000FFFFFF0000;
__int64 const6 = 0x00000000000000FF;
//int mmx_supported = 1;
png_bytep sptr, dp;
png_uint_32 i;
png_size_t pixel_bytes;
int width = row_info->width;
pixel_bytes = (row_info->pixel_depth >> 3);
sptr = row + (row_info->width - 1) * pixel_bytes;
sptr = row + (width - 1) * pixel_bytes;
dp = row + (final_width - 1) * pixel_bytes;
// New code by Nirav Chhatrapati - Intel Corporation
// sign fix by GRR
// NOTE: there is NO MMX code for 48-bit and 64-bit images
if (mmx_supported) // use MMX routine if machine supports it
{
@@ -1342,16 +1343,29 @@ loop1_pass0:
dp -= width_mmx*8;
for (i = width; i; i--)
{
png_byte v[8];
int j;
png_memcpy(v, sptr, pixel_bytes);
/* I simplified this part in version 1.0.4e
* here and in several other instances where
* pixel_bytes == 1 -- GR-P
*
* Original code:
*
* png_byte v[8];
* png_memcpy(v, sptr, pixel_bytes);
* for (j = 0; j < png_pass_inc[pass]; j++)
* {
* png_memcpy(dp, v, pixel_bytes);
* dp -= pixel_bytes;
* }
* sptr -= pixel_bytes;
*
* Replacement code is in the next three lines:
*/
for (j = 0; j < png_pass_inc[pass]; j++)
{
png_memcpy(dp, v, pixel_bytes);
dp -= pixel_bytes;
}
sptr -= pixel_bytes;
*dp-- = *sptr;
sptr--;
}
}
else if ((pass == 2) || (pass == 3))
@@ -1387,16 +1401,13 @@ loop1_pass2:
dp -= width_mmx*4;
for (i = width; i; i--)
{
png_byte v[8];
int j;
png_memcpy(v, sptr, pixel_bytes);
for (j = 0; j < png_pass_inc[pass]; j++)
{
png_memcpy(dp, v, pixel_bytes);
dp -= pixel_bytes;
*dp-- = *sptr;
}
sptr -= pixel_bytes;
sptr --;
}
}
else //if ((pass == 4) || (pass == 5))
@@ -1433,16 +1444,13 @@ loop1_pass4:
dp -= width_mmx*2;
for (i = width; i; i--)
{
png_byte v[8];
int j;
png_memcpy(v, sptr, pixel_bytes);
for (j = 0; j < png_pass_inc[pass]; j++)
{
png_memcpy(dp, v, pixel_bytes);
dp -= pixel_bytes;
*dp-- = *sptr;
}
sptr -= pixel_bytes;
sptr --;
}
}
} /* end of pixel_bytes == 1 */
@@ -1480,8 +1488,8 @@ loop2_pass0:
}
}
sptr -= (width_mmx*2 + 2);
dp -= (width_mmx*16 + 2);
sptr -= (width_mmx*2 - 2); // sign fixed
dp -= (width_mmx*16 - 2); // sign fixed
for (i = width; i; i--)
{
png_byte v[8];
@@ -1492,9 +1500,7 @@ loop2_pass0:
{
dp -= pixel_bytes;
png_memcpy(dp, v, pixel_bytes);
//dp -= pixel_bytes;
}
//sptr -= pixel_bytes;
}
}
@@ -1528,8 +1534,8 @@ loop2_pass2:
}
}
sptr -= (width_mmx*2 + 2);
dp -= (width_mmx*8 + 2);
sptr -= (width_mmx*2 - 2); // sign fixed
dp -= (width_mmx*8 - 2); // sign fixed
for (i = width; i; i--)
{
png_byte v[8];
@@ -1540,9 +1546,7 @@ loop2_pass2:
{
dp -= pixel_bytes;
png_memcpy(dp, v, pixel_bytes);
//dp -= pixel_bytes;
}
//sptr -= pixel_bytes;
}
}
@@ -1571,8 +1575,8 @@ loop2_pass4:
}
}
sptr -= (width_mmx*2 + 2);
dp -= (width_mmx*4 + 2);
sptr -= (width_mmx*2 - 2); // sign fixed
dp -= (width_mmx*4 - 2); // sign fixed
for (i = width; i; i--)
{
png_byte v[8];
@@ -1583,9 +1587,7 @@ loop2_pass4:
{
dp -= pixel_bytes;
png_memcpy(dp, v, pixel_bytes);
//dp -= pixel_bytes;
}
//sptr -= pixel_bytes;
}
}
} /* end of pixel_bytes == 2 */
@@ -1626,8 +1628,8 @@ loop4_pass0:
}
}
sptr -= (width_mmx*4 + 4);
dp -= (width_mmx*32 + 4);
sptr -= (width_mmx*4 - 4); // sign fixed
dp -= (width_mmx*32 - 4); // sign fixed
for (i = width; i; i--)
{
png_byte v[8];
@@ -1638,9 +1640,7 @@ loop4_pass0:
{
dp -= pixel_bytes;
png_memcpy(dp, v, pixel_bytes);
//dp -= pixel_bytes;
}
//sptr -= pixel_bytes;
}
}
@@ -1674,8 +1674,8 @@ loop4_pass2:
}
}
sptr -= (width_mmx*4 + 4);
dp -= (width_mmx*16 + 4);
sptr -= (width_mmx*4 - 4); // sign fixed
dp -= (width_mmx*16 - 4); // sign fixed
for (i = width; i; i--)
{
png_byte v[8];
@@ -1686,9 +1686,7 @@ loop4_pass2:
{
dp -= pixel_bytes;
png_memcpy(dp, v, pixel_bytes);
//dp -= pixel_bytes;
}
//sptr -= pixel_bytes;
}
}
@@ -1720,8 +1718,8 @@ loop4_pass4:
}
}
sptr -= (width_mmx*4 + 4);
dp -= (width_mmx*8 + 4);
sptr -= (width_mmx*4 - 4); // sign fixed
dp -= (width_mmx*8 - 4); // sign fixed
for (i = width; i; i--)
{
png_byte v[8];
@@ -1732,9 +1730,7 @@ loop4_pass4:
{
dp -= pixel_bytes;
png_memcpy(dp, v, pixel_bytes);
//dp -= pixel_bytes;
}
//sptr -= pixel_bytes;
}
}
@@ -1742,7 +1738,7 @@ loop4_pass4:
else if (pixel_bytes == 6)
{
for (i = row_info->width; i; i--)
for (i = width; i; i--)
{
png_byte v[8];
int j;
@@ -1758,7 +1754,7 @@ loop4_pass4:
else
{
for (i = row_info->width; i; i--)
for (i = width; i; i--)
{
png_byte v[8];
int j;
@@ -1778,23 +1774,17 @@ loop4_pass4:
{
if (pixel_bytes == 1)
{
for (i = row_info->width; i; i--)
for (i = width; i; i--)
{
png_byte v[8];
int j;
png_memcpy(v, sptr, pixel_bytes);
for (j = 0; j < png_pass_inc[pass]; j++)
{
png_memcpy(dp, v, pixel_bytes);
dp -= pixel_bytes;
}
sptr -= pixel_bytes;
*dp-- = *sptr;
sptr--;
}
}
else if (pixel_bytes == 3)
{
for (i = row_info->width; i; i--)
for (i = width; i; i--)
{
png_byte v[8];
int j;
@@ -1809,7 +1799,7 @@ loop4_pass4:
}
else if (pixel_bytes == 2)
{
for (i = row_info->width; i; i--)
for (i = width; i; i--)
{
png_byte v[8];
int j;
@@ -1824,7 +1814,7 @@ loop4_pass4:
}
else if (pixel_bytes == 4)
{
for (i = row_info->width; i; i--)
for (i = width; i; i--)
{
png_byte v[8];
int j;
@@ -1839,7 +1829,7 @@ loop4_pass4:
}
else if (pixel_bytes == 6)
{
for (i = row_info->width; i; i--)
for (i = width; i; i--)
{
png_byte v[8];
int j;
@@ -1854,7 +1844,7 @@ loop4_pass4:
}
else
{
for (i = row_info->width; i; i--)
for (i = width; i; i--)
{
png_byte v[8];
int j;
@@ -1878,7 +1868,7 @@ loop4_pass4:
(png_uint_32)row_info->pixel_depth + 7) >> 3);
}
#ifndef ENABLE_PNGVCRD_INTERLACE
#ifdef DISABLE_PNGVCRD_INTERLACE
mmx_supported = save_mmx_supported;
#endif
}

View File

@@ -1,7 +1,7 @@
/* pngwio.c - functions for data output
*
* libpng 1.0.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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.4d - October 6, 1999
* libpng 1.0.4e - October 10, 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.4d
PNGMIN = 1.0.4e
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.4d
PNGMIN = 1.0.4e
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.4d
PNGMIN = 1.0.4e
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.4d
PNGMIN = 1.0.4e
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.4d
PNGMIN = 1.0.4e
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include

View File

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