From ab1e583c445bd4967943053a9f6f3b079770226a Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Wed, 6 Oct 1999 04:57:42 -0500 Subject: [PATCH] Imported from libpng-1.0.4d.tar --- ANNOUNCE | 9 ++++-- CHANGES | 5 +++ INSTALL | 8 ++--- KNOWNBUG | 10 ++++++ LICENSE | 4 +-- README | 6 ++-- Y2KINFO | 4 +-- libpng.3 | 14 ++++----- libpng.txt | 6 ++-- libpngpf.3 | 4 +-- png.5 | 2 +- png.c | 10 +++--- png.h | 22 +++++++------- pngasmrd.h | 4 +-- pngconf.h | 2 +- pngerror.c | 2 +- pngget.c | 2 +- pngmem.c | 2 +- pngnow.png | Bin 2196 -> 2018 bytes pngpread.c | 2 +- pngread.c | 6 ++-- pngrio.c | 2 +- pngrtran.c | 2 +- pngrutil.c | 2 +- pngset.c | 4 +-- pngtest.c | 6 ++-- pngtrans.c | 6 ++-- pngvcrd.c | 64 +++++++++++++++++++++++++++++---------- pngwio.c | 2 +- pngwrite.c | 2 +- pngwtran.c | 2 +- pngwutil.c | 2 +- scripts/makefile.beos | 2 +- scripts/makefile.dec | 2 +- scripts/makefile.linux | 2 +- scripts/makefile.sco | 2 +- scripts/makefile.solaris | 2 +- scripts/pngdef.pas | 2 +- 38 files changed, 141 insertions(+), 89 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index dcdd1359..f839384e 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -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 diff --git a/CHANGES b/CHANGES index ee7c17f4..faf94e35 100644 --- a/CHANGES +++ b/CHANGES @@ -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 diff --git a/INSTALL b/INSTALL index 475a8d47..b67764e4 100644 --- a/INSTALL +++ b/INSTALL @@ -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 diff --git a/KNOWNBUG b/KNOWNBUG index 1c5629dc..964674ac 100644 --- a/KNOWNBUG +++ b/KNOWNBUG @@ -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?) diff --git a/LICENSE b/LICENSE index 22fc3f20..e85524d8 100644 --- a/LICENSE +++ b/LICENSE @@ -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 diff --git a/README b/README index e19f3060..db3ac07e 100644 --- a/README +++ b/README @@ -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 diff --git a/Y2KINFO b/Y2KINFO index 103579ad..cdbaabf0 100644 --- a/Y2KINFO +++ b/Y2KINFO @@ -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 diff --git a/libpng.3 b/libpng.3 index 8fbfa998..e9669ba6 100644 --- a/libpng.3 +++ b/libpng.3 @@ -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 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: diff --git a/libpng.txt b/libpng.txt index 8023e79e..16288783 100644 --- a/libpng.txt +++ b/libpng.txt @@ -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 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 diff --git a/libpngpf.3 b/libpngpf.3 index fb0803f9..def345cf 100644 --- a/libpngpf.3 +++ b/libpngpf.3 @@ -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 \fP diff --git a/png.5 b/png.5 index 081adb52..be84fb81 100644 --- a/png.5 +++ b/png.5 @@ -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 diff --git a/png.c b/png.c index 1b0141b3..dfcc680a 100644 --- a/png.c +++ b/png.c @@ -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 */ ; } diff --git a/png.h b/png.h index 67a29e57..07ea6d6e 100644 --- a/png.h +++ b/png.h @@ -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 diff --git a/pngasmrd.h b/pngasmrd.h index e6c9c02e..27b747c4 100644 --- a/pngasmrd.h +++ b/pngasmrd.h @@ -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 diff --git a/pngconf.h b/pngconf.h index 41316d9e..63749eb5 100644 --- a/pngconf.h +++ b/pngconf.h @@ -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 diff --git a/pngerror.c b/pngerror.c index 63a2b481..b7446d3a 100644 --- a/pngerror.c +++ b/pngerror.c @@ -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 diff --git a/pngget.c b/pngget.c index c27d9b9c..7a850e4c 100644 --- a/pngget.c +++ b/pngget.c @@ -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 diff --git a/pngmem.c b/pngmem.c index cbaa27e1..2f5ecd2a 100644 --- a/pngmem.c +++ b/pngmem.c @@ -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 diff --git a/pngnow.png b/pngnow.png index 16280e7d82af6efa69753fe1d46b348849208839..2172b49b2317f5746022ef1c92ed14b4c0b92332 100644 GIT binary patch delta 1946 zcmV;L2W9w_5#kS!D}S%ZHwB9600001b5ch_0Itp)=>Px%VNgs|Mg0E!1Of!i&dkgL z1e^i{%mOrgigZ+7TwH2wRC;7&euP|Vd|YaDRAOXIQmkZV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read.c +++ b/pngpread.c @@ -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 diff --git a/pngread.c b/pngread.c index 1517535a..733689e7 100644 --- a/pngread.c +++ b/pngread.c @@ -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) diff --git a/pngrio.c b/pngrio.c index 4cc33a7f..056d87dd 100644 --- a/pngrio.c +++ b/pngrio.c @@ -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 diff --git a/pngrtran.c b/pngrtran.c index 9c2b0edf..4f94155d 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -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 diff --git a/pngrutil.c b/pngrutil.c index bbf0838d..bd983173 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -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 diff --git a/pngset.c b/pngset.c index bfec9072..751a5924 100644 --- a/pngset.c +++ b/pngset.c @@ -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 diff --git a/pngtest.c b/pngtest.c index 51d289c1..7267fdb0 100644 --- a/pngtest.c +++ b/pngtest.c @@ -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; } diff --git a/pngtrans.c b/pngtrans.c index 57a1f942..9313d473 100644 --- a/pngtrans.c +++ b/pngtrans.c @@ -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 diff --git a/pngvcrd.c b/pngvcrd.c index 4ab0a913..0e9248ca 100644 --- a/pngvcrd.c +++ b/pngvcrd.c @@ -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; @@ -372,7 +381,7 @@ end8: } /* end of else */ break; - } //end 8bpp + } // end 8 bpp case 16: { @@ -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; @@ -612,7 +622,7 @@ end24: } /* end of else */ break; - } //end 24bpp + } // end 24 bpp case 32: { @@ -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; @@ -750,7 +761,7 @@ end32: } /* end of else */ break; - } //end 32bpp + } // end 32 bpp case 48: { @@ -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 - mmx_supported = 0; +#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 */ @@ -3769,7 +3801,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep p = b - c; pc = a - c; -#ifdef PNG_USE_ABS +#ifdef PNG_USE_ABS pa = abs(p); pb = abs(pc); pc = abs(p + pc); diff --git a/pngwio.c b/pngwio.c index d5444a0a..13a35b29 100644 --- a/pngwio.c +++ b/pngwio.c @@ -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 diff --git a/pngwrite.c b/pngwrite.c index 9830ca12..33ac2a73 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -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 diff --git a/pngwtran.c b/pngwtran.c index cd32a62d..bdedf5ba 100644 --- a/pngwtran.c +++ b/pngwtran.c @@ -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 diff --git a/pngwutil.c b/pngwutil.c index b7a104be..f3ff2e95 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -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 diff --git a/scripts/makefile.beos b/scripts/makefile.beos index 0a891513..dbebbe09 100644 --- a/scripts/makefile.beos +++ b/scripts/makefile.beos @@ -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 diff --git a/scripts/makefile.dec b/scripts/makefile.dec index 51403caa..9cfaf7e5 100644 --- a/scripts/makefile.dec +++ b/scripts/makefile.dec @@ -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 diff --git a/scripts/makefile.linux b/scripts/makefile.linux index c84b6cea..79c824ba 100644 --- a/scripts/makefile.linux +++ b/scripts/makefile.linux @@ -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 diff --git a/scripts/makefile.sco b/scripts/makefile.sco index 1e510044..7f6b81ab 100644 --- a/scripts/makefile.sco +++ b/scripts/makefile.sco @@ -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 diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris index fcc30780..005f2599 100644 --- a/scripts/makefile.solaris +++ b/scripts/makefile.solaris @@ -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 diff --git a/scripts/pngdef.pas b/scripts/pngdef.pas index 1441808a..995ddafb 100644 --- a/scripts/pngdef.pas +++ b/scripts/pngdef.pas @@ -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