Compare commits

...

3 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
8b6a889881 Imported from libpng-1.2.0beta3.tar 2009-04-06 16:06:20 -05:00
Glenn Randers-Pehrson
3097f618f2 Imported from libpng-1.2.0beta2.tar 2009-04-06 16:06:18 -05:00
Glenn Randers-Pehrson
1fd5fb33c2 Imported from libpng-1.2.0beta1.tar 2009-04-06 16:06:16 -05:00
58 changed files with 908 additions and 312 deletions

View File

@@ -1,5 +1,5 @@
Libpng 1.0.12beta1 - May 14, 2001
Libpng 1.2.0beta3 - May 18, 2001
This is a public release of libpng, intended for use in production codes.
@@ -8,13 +8,19 @@ Changes since the last public release (1.0.11):
Test for Windows platform in pngconf.h when including malloc.h (Emmanuel Blot)
Updated makefile.cygwin and handling of Cygwin's ALL_STATIC in pngconf.h
Added some never-to-be-executed code in pnggccrd.c to quiet compiler warnings.
Bumped DLLNUM to 2.
Enabled PNG_MNG_FEATURES_SUPPORTED and enabled PNG_ASSEMBLER_CODE_SUPPORTED
by default.
Added runtime selection of MMX features.
Added png_set_strip_error_numbers function and related macros.
Added a check for attempts to read or write PLTE in grayscale PNG datastreams.
Eliminated the png_error about apps using png_read|write_init(). Instead,
libpng will reallocate the png_struct and info_struct if they are too small.
This achieves future binary compatibility for old applications written for
This retains future binary compatibility for old applications written for
libpng-0.88 and earlier.
Enabled user memory function by default.
Modified png_create_struct so it passes user mem_ptr to user memory allocator.
Increased png_mng_features flag from png_byte to png_uint_32.
Bumped shared-library (so-number) and dll-number to 3.
Send comments/corrections/commendations to
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu

18
CHANGES
View File

@@ -1,3 +1,4 @@
CHANGES - changes for libpng
version 0.2
@@ -934,13 +935,24 @@ version 1.0.12beta1 [May 14, 2001]
Test for Windows platform in pngconf.h when including malloc.h (Emmanuel Blot)
Updated makefile.cygwin and handling of Cygwin's ALL_STATIC in pngconf.h
Added some never-to-be-executed code in pnggccrd.c to quiet compiler warnings.
Bumped DLLNUM to 2.
Added a check for attempts to read or write PLTE in grayscale PNG datastreams.
Eliminated the png_error about apps using png_read|write_init(). Instead,
libpng will reallocate the png_struct and info_struct if they are too small.
This achieves future binary compatibility for old applications written for
This retains future binary compatibility for old applications written for
libpng-0.88 and earlier.
version 1.2.0beta1 [May 6, 2001]
Bumped DLLNUM to 2.
Re-enabled PNG_MNG_FEATURES_SUPPORTED and enabled PNG_ASSEMBLER_CODE_SUPPORTED
by default.
Added runtime selection of MMX features.
Added png_set_strip_error_numbers function and related macros.
version 1.2.0beta2 [May 7, 2001]
Finished merging 1.2.0beta1 with version 1.0.11
Added a check for attempts to read or write PLTE in grayscale PNG datastreams.
version 1.2.0beta3 [May 18, 2001]
Enabled user memory function by default.
Modified png_create_struct so it passes user mem_ptr to user memory allocator.
Increased png_mng_features flag from png_byte to png_uint_32.
Bumped shared-library (so-number) and dll-number to 3.
Send comments/corrections/commendations to
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu

12
INSTALL
View File

@@ -1,5 +1,5 @@
Installing libpng version 1.0.12beta1 - May 14, 2001
Installing libpng version 1.2.0beta3 - May 18, 2001
Before installing libpng, you must first install zlib. zlib
can usually be found wherever you got libpng. zlib can be
@@ -10,7 +10,7 @@ zlib.h and zconf.h include files that correspond to the
version of zlib that's installed.
You can rename the directories that you downloaded (they
might be called "libpng-1.0.12beta1" or "lpng109" and "zlib-1.1.3"
might be called "libpng-1.2.0beta3" or "lpng109" and "zlib-1.1.3"
or "zlib113") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:
@@ -60,8 +60,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.12beta1)
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.12beta1,
makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.2.0beta3)
makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.2.0beta3,
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
@@ -78,9 +78,9 @@ include
makefile.macosx => MACOS X Makefile
makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.12beta1)
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.2.0beta3)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.12beta1)
makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.2.0beta3)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile

View File

@@ -1,7 +1,8 @@
Known bugs in libpng-1.0.11
Known bugs in libpng-1.2.0
1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when
reading interlaced PNG files, when assembler code is enabled.
STATUS: Under investigation.

14
LICENSE
View File

@@ -8,8 +8,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following
this sentence.
libpng versions 1.0.7, July 1, 2000, through 1.0.12beta1, May 14, 2001, are
Copyright (c) 2000, 2001 Glenn Randers-Pehrson
libpng versions 1.0.7, July 1, 2000, through 1.2.0beta3, May 18, 2001, are
Copyright (c) 2000 Glenn Randers-Pehrson
and are distributed according to the same disclaimer and license as libpng-1.0.6
with the following individuals added to the list of Contributing Authors
@@ -73,11 +73,11 @@ to the following restrictions:
1. The origin of this source code must not be misrepresented.
2. Altered versions must be plainly marked as such and
must not be misrepresented as being the original source.
2. Altered versions must be plainly marked as such and must not
be misrepresented as being the original source.
3. This Copyright notice may not be removed or altered from
any source or altered source distribution.
3. This Copyright notice may not be removed or altered from any
source or altered source distribution.
The Contributing Authors and Group 42, Inc. specifically permit, without
fee, and encourage the use of this source code as a component to
@@ -99,4 +99,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
randeg@alum.rpi.edu
May 14, 2001
May 18, 2001

10
README
View File

@@ -1,4 +1,4 @@
README for libpng 1.0.12beta1 - May 14, 2001 (shared library 2.1)
README for libpng 1.2.0beta3 - May 18, 2001 (shared library 2.1)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
@@ -183,9 +183,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.12beta1)
(gcc, creates libpng.so.2.1.2.0beta3)
makefile.gcmmx => Linux/ELF makefile (gcc, creates
libpng.so.2.1.0.12beta1, uses assembler code
libpng.so.2.1.2.0beta3, 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
@@ -202,10 +202,10 @@ Files in this distribution:
makefile.macosx => MACOS X Makefile
makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.12beta1)
makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.2.0beta3)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
(gcc, creates libpng.so.2.1.0.12beta1)
(gcc, creates libpng.so.2.1.2.0beta3)
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:
=========================
May 14, 2001
May 18, 2001
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.0.12beta1 are Y2K compliant. It is my belief that earlier
upward through 1.2.0beta3 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
View File

@@ -1,5 +1,5 @@
echo "
There is no \"configure\" script for Libpng-1.0.12beta1. Instead, please
There is no \"configure\" script for Libpng-1.2.0beta3. Instead, please
copy the appropriate makefile for your system from the \"scripts\"
directory. Read the INSTALL file for more details.
"

View File

@@ -49,8 +49,77 @@ static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg);
void readpng2_version_info(void)
{
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && \
(defined(__i386__) || defined(_M_IX86)) && \
defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
/*
* WARNING: This preprocessor approach means that the following code
* cannot be used with a libpng DLL older than 1.2.0--the
* compiled-in symbols for the new functions will not exist.
* (Could use dlopen() and dlsym() on Unix and corresponding
* calls for Windows, but not portable...)
*/
{
int mmxsupport = png_mmx_support();
if (mmxsupport < 0)
fprintf(stderr, " Compiled with libpng %s; using libpng %s "
"without MMX support.\n", PNG_LIBPNG_VER_STRING, png_libpng_ver);
else {
int compilerID;
png_uint_32 mmx_mask = png_get_mmx_flagmask(
PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID);
fprintf(stderr, " Compiled with libpng %s; using libpng %s "
"with MMX support\n (%s version).", PNG_LIBPNG_VER_STRING,
png_libpng_ver, compilerID == 1? "MSVC++" :
(compilerID == 2? "GNU C" : "unknown"));
fprintf(stderr, " Processor %s MMX instructions.\n",
mmxsupport? "supports" : "does not support");
if (mmxsupport > 0) {
int num_optims = 0;
fprintf(stderr,
" Potential MMX optimizations supported by libpng:\n");
if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)
++num_optims;
if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_UP)
++num_optims;
if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)
++num_optims;
if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)
++num_optims;
if (num_optims)
fprintf(stderr,
" decoding %s row filters (reading)\n",
(num_optims == 4)? "all non-trivial" : "some");
if (mmx_mask & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) {
fprintf(stderr, " combining rows (reading)\n");
++num_optims;
}
if (mmx_mask & PNG_ASM_FLAG_MMX_READ_INTERLACE) {
fprintf(stderr,
" expanding interlacing (reading)\n");
++num_optims;
}
mmx_mask &= ~( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \
| PNG_ASM_FLAG_MMX_READ_INTERLACE \
| PNG_ASM_FLAG_MMX_READ_FILTER_SUB \
| PNG_ASM_FLAG_MMX_READ_FILTER_UP \
| PNG_ASM_FLAG_MMX_READ_FILTER_AVG \
| PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
if (mmx_mask) {
fprintf(stderr, " other (unknown)\n");
++num_optims;
}
if (num_optims == 0)
fprintf(stderr, " (none)\n");
}
}
}
#else
fprintf(stderr, " Compiled with libpng %s; using libpng %s.\n",
PNG_LIBPNG_VER_STRING, png_libpng_ver);
#endif
fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n",
ZLIB_VERSION, zlib_version);
@@ -111,6 +180,97 @@ int readpng2_init(mainprog_info *mainprog_ptr)
png_set_progressive_read_fn(png_ptr, mainprog_ptr,
readpng2_info_callback, readpng2_row_callback, readpng2_end_callback);
/*
* may as well enable or disable MMX routines here, if supported;
*
* to enable all: mask = png_get_mmx_flagmask (
* PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID);
* flags = png_get_asm_flags (png_ptr);
* flags |= mask;
* png_set_asm_flags (png_ptr, flags);
*
* to disable all: mask = png_get_mmx_flagmask (
* PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID);
* flags = png_get_asm_flags (png_ptr);
* flags &= ~mask;
* png_set_asm_flags (png_ptr, flags);
*/
#if (defined(__i386__) || defined(_M_IX86)) && \
defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
/*
* WARNING: This preprocessor approach means that the following code
* cannot be used with a libpng DLL older than 1.2.0--the
* compiled-in symbols for the new functions will not exist.
* (Could use dlopen() and dlsym() on Unix and corresponding
* calls for Windows, but not portable...)
*/
{
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
png_uint_32 mmx_disable_mask = 0;
png_uint_32 asm_flags, mmx_mask;
int compilerID;
if (mainprog_ptr->nommxfilters)
mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_FILTER_SUB \
| PNG_ASM_FLAG_MMX_READ_FILTER_UP \
| PNG_ASM_FLAG_MMX_READ_FILTER_AVG \
| PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
if (mainprog_ptr->nommxcombine)
mmx_disable_mask |= PNG_ASM_FLAG_MMX_READ_COMBINE_ROW;
if (mainprog_ptr->nommxinterlace)
mmx_disable_mask |= PNG_ASM_FLAG_MMX_READ_INTERLACE;
asm_flags = png_get_asm_flags(png_ptr);
png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask);
/* Now query libpng's asm settings, just for yuks. Note that this
* differs from the querying of its *potential* MMX capabilities
* in readpng2_version_info(); this is true runtime verification. */
asm_flags = png_get_asm_flags(png_ptr);
mmx_mask = png_get_mmx_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE,
&compilerID);
if (asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_COMPILED)
fprintf(stderr,
" MMX support (%s version) is compiled into libpng\n",
compilerID == 1? "MSVC++" :
(compilerID == 2? "GNU C" : "unknown"));
else
fprintf(stderr, " MMX support is not compiled into libpng\n");
fprintf(stderr, " MMX instructions are %ssupported by CPU\n",
(asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU)? "" : "not ");
fprintf(stderr, " MMX read support for combining rows is %sabled\n",
(asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)? "en" : "dis");
fprintf(stderr,
" MMX read support for expanding interlacing is %sabled\n",
(asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE)? "en" : "dis");
fprintf(stderr, " MMX read support for \"sub\" filter is %sabled\n",
(asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "en" : "dis");
fprintf(stderr, " MMX read support for \"up\" filter is %sabled\n",
(asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "en" : "dis");
fprintf(stderr, " MMX read support for \"avg\" filter is %sabled\n",
(asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "en" : "dis");
fprintf(stderr, " MMX read support for \"Paeth\" filter is %sabled\n",
(asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "en" : "dis");
asm_flags &= (mmx_mask & ~( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \
| PNG_ASM_FLAG_MMX_READ_INTERLACE \
| PNG_ASM_FLAG_MMX_READ_FILTER_SUB \
| PNG_ASM_FLAG_MMX_READ_FILTER_UP \
| PNG_ASM_FLAG_MMX_READ_FILTER_AVG \
| PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ));
if (asm_flags)
fprintf(stderr,
" additional MMX support is also enabled (0x%02lx)\n",
asm_flags);
#else /* !PNG_ASSEMBLER_CODE_SUPPORTED */
fprintf(stderr, " MMX querying is disabled in libpng.\n");
#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
}
#endif
/* make sure we save our pointers for use in readpng2_decode_data() */
mainprog_ptr->png_ptr = png_ptr;
@@ -370,6 +530,7 @@ static void readpng2_end_callback(png_structp png_ptr, png_infop info_ptr)
(*mainprog_ptr->mainprog_finish_display)();
info_ptr = info_ptr; /* without this the compiler whines about info_ptr */
/* all done */

View File

@@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll\libpng2.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll\libpng3.lib /nologo /subsystem:console /machine:I386
# Begin Special Build Tool
OutDir=.\dll
SOURCE="$(InputPath)"
@@ -84,7 +84,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbg\libpng2d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbg\libpng3d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# Begin Special Build Tool
OutDir=.\dll_dbg
SOURCE="$(InputPath)"
@@ -114,7 +114,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_asm\libpng2a.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_asm\libpng3a.lib /nologo /subsystem:console /machine:I386
# Begin Special Build Tool
OutDir=.\dll_asm
SOURCE="$(InputPath)"
@@ -144,7 +144,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbga\libpng2b.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbga\libpng3b.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# Begin Special Build Tool
OutDir=.\dll_dbga
SOURCE="$(InputPath)"

View File

@@ -370,14 +370,14 @@ BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData,
// clean up after the write, and free any memory allocated
png_destroy_write_struct(&png_ptr, &info_ptr);
png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
// yepp, done
}
Catch (msg)
{
png_destroy_write_struct(&png_ptr, &info_ptr);
png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
if(ppbRowPointers)
free (ppbRowPointers);

View File

@@ -59,8 +59,8 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 libpng2.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"libpng" /libpath:"zlib"
# ADD LINK32 libpng2.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll"
# ADD BASE LINK32 libpng3.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"libpng" /libpath:"zlib"
# ADD LINK32 libpng3.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll"
# Begin Special Build Tool
OutDir=.\dll
SOURCE="$(InputPath)"
@@ -92,9 +92,9 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 libpng2.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"libpng" /libpath:"zlib"
# ADD BASE LINK32 libpng3.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"libpng" /libpath:"zlib"
# SUBTRACT BASE LINK32 /nodefaultlib
# ADD LINK32 libpng2d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg"
# ADD LINK32 libpng3d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg"
# SUBTRACT LINK32 /nodefaultlib
# Begin Special Build Tool
OutDir=.\dll_dbg
@@ -128,7 +128,7 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 libpng2.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll"
# ADD BASE LINK32 libpng3.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll"
# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\lib"
# Begin Special Build Tool
OutDir=.\lib
@@ -161,7 +161,7 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 libpng2d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg"
# ADD BASE LINK32 libpng3d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg"
# SUBTRACT BASE LINK32 /nodefaultlib
# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\lib_dbg"
# SUBTRACT LINK32 /nodefaultlib

176
libpng.3
View File

@@ -1,6 +1,6 @@
.TH LIBPNG 3 "May 14, 2001"
.TH LIBPNG 3 "May 18, 2001"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.0beta3
.SH SYNOPSIS
\fI\fB
@@ -100,6 +100,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
\fI\fB
\fBpng_uint_32 png_get_asm_flags (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fBpng_byte png_get_bit_depth (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
@@ -192,6 +196,18 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
\fI\fB
\fBpng_byte png_get_mmx_bitdepth_threshold (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fBpng_uint_32 png_get_mmx_flagmask (int \fP\fIflag_select\fP\fB, int \fI*compilerID\fP\fB);\fP
\fI\fB
\fBpng_uint_32 png_get_mmx_rowbytes_threshold (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fBpng_uint_32 png_get_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*offset_x\fP\fB, png_uint_32 \fP\fI*offset_y\fP\fB, int \fI*unit_type\fP\fB);\fP
\fI\fB
@@ -302,11 +318,15 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
\fI\fB
\fBvoid png_info_init (png_infop \fIinfo_ptr\fP\fB);\fP
\fBvoid png_init_io (png_structp \fP\fIpng_ptr\fP\fB, FILE \fI*fp\fP\fB);\fP
\fI\fB
\fBvoid png_init_io (png_structp \fP\fIpng_ptr\fP\fB, FILE \fI*fp\fP\fB);\fP
\fBDEPRECATED: void png_info_init (png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
\fBDEPRECATED: void png_info_init_2 (png_infopp \fP\fIptr_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP
\fI\fB
@@ -334,7 +354,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
\fI\fB
\fBvoid png_permit_empty_plte (png_structp \fP\fIpng_ptr\fP\fB, int \fIempty_plte_permitted\fP\fB);\fP
\fBint png_mmx_support \fI(void\fP\fB);\fP
\fI\fB
\fBDEPRECATED: void png_permit_empty_plte (png_structp \fP\fIpng_ptr\fP\fB, int \fIempty_plte_permitted\fP\fB);\fP
\fI\fB
@@ -362,7 +386,9 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
\fI\fB
\fBDEPRECATED: void png_read_init_2 (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP
\fBDEPRECATED: void png_read_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP
\fI\fB
\fBvoid png_read_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
@@ -384,6 +410,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
\fI\fB
\fBpng_set_asm_flags (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIasm_flags\fP\fB);\fP
\fI\fB
\fBvoid png_set_background (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, double \fIbackground_gamma\fP\fB);\fP
\fI\fB
@@ -512,6 +542,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
\fI\fB
\fBpng_set_mmx_thresholds (png_structp \fP\fIpng_ptr\fP\fB, png_byte \fP\fImmx_bitdepth_threshold\fP\fB, png_uint_32 \fImmx_rowbytes_threshold\fP\fB);\fP
\fI\fB
\fBvoid png_set_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIoffset_x\fP\fB, png_uint_32 \fP\fIoffset_y\fP\fB, int \fIunit_type\fP\fB);\fP
\fI\fB
@@ -604,6 +638,12 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
\fI\fB
\fBvoid png_set_strip_error_numbers (png_structp \fIpng_ptr,
\fBpng_uint_32 \fIstrip_mode\fP\fB);\fP
\fI\fB
\fBvoid png_set_swap (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -712,7 +752,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
\fI\fB
\fBDEPRECATED: void png_write_init_2 (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP
\fBDEPRECATED: void png_write_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP
\fI\fB
@@ -747,7 +787,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.12beta1 - May 14, 2001
libpng version 1.2.0beta3 - May 18, 2001
Updated and distributed by Glenn Randers-Pehrson
<randeg@alum.rpi.edu>
Copyright (c) 1998-2001 Glenn Randers-Pehrson
@@ -2143,7 +2183,6 @@ png_infop info_ptr;
/* This function is called when each row of image
data is complete */
void
row_callback(png_structp png_ptr, png_bytep new_row,
png_uint_32 row_num, int pass)
@@ -3392,8 +3431,106 @@ When PNG_DEBUG = 1, the macros are defined, but only png_debug statements
having level = 0 will be printed. There aren't any such statements in
this version of libpng, but if you insert some they will be printed.
.SH VI. Runtime optimization
.SH VI. MNG support
A new feature in libpng 1.2.0 is the ability to dynamically switch between
standard and optimized versions of some routines. Currently these are
limited to three computationally intensive tasks when reading PNG files:
decoding row filters, expanding interlacing, and combining interlaced or
transparent row data with previous row data. Currently the optimized
versions are available only for x86 (Intel, AMD, etc.) platforms with
MMX support, though this may change in future versions. (For example,
the non-MMX assembler optimizations for zlib might become similarly
runtime-selectable in future releases, in which case libpng could be
extended to support them. Alternatively, the compile-time choice of
floating-point versus integer routines for gamma correction might become
runtime-selectable.)
Because such optimizations tend to be very platform- and compiler-dependent,
both in how they are written and in how they perform, the new runtime code
in libpng has been written to allow programs to query, enable, and disable
either specific optimizations or all such optimizations. For example, to
enable all possible optimizations (bearing in mind that some "optimizations"
may actually run more slowly in rare cases):
#if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
png_uint_32 mask, flags;
flags = png_get_asm_flags(png_ptr);
mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE);
png_set_asm_flags(png_ptr, flags | mask);
#endif
To enable only optimizations relevant to reading PNGs, use PNG_SELECT_READ
by itself when calling png_get_asm_flagmask(); similarly for optimizing
only writing. To disable all optimizations:
#if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
flags = png_get_asm_flags(png_ptr);
mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE);
png_set_asm_flags(png_ptr, flags & ~mask);
#endif
To enable or disable only MMX-related features, use png_get_mmx_flagmask()
in place of png_get_asm_flagmask(). The mmx version takes one additional
parameter:
#if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
int selection = PNG_SELECT_READ | PNG_SELECT_WRITE;
int compilerID;
mask = png_get_mmx_flagmask(selection, &compilerID);
#endif
On return, compilerID will indicate which version of the MMX assembler
optimizations was compiled. Currently two flavors exist: Microsoft
Visual C++ (compilerID == 1) and GNU C (a.k.a. gcc/gas, compilerID == 2).
On non-x86 platforms or on systems compiled without MMX optimizations, a
value of -1 is used.
Note that both png_get_asm_flagmask() and png_get_mmx_flagmask() return
all valid, settable optimization bits for the version of the library that's
currently in use. In the case of shared (dynamically linked) libraries,
this may include optimizations that did not exist at the time the code was
written and compiled. It is also possible, of course, to enable only known,
specific optimizations; for example:
#if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
flags = PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \
| PNG_ASM_FLAG_MMX_READ_INTERLACE \
| PNG_ASM_FLAG_MMX_READ_FILTER_SUB \
| PNG_ASM_FLAG_MMX_READ_FILTER_UP \
| PNG_ASM_FLAG_MMX_READ_FILTER_AVG \
| PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ;
png_set_asm_flags(png_ptr, flags);
#endif
This method would enable only the MMX read-optimizations available at the
time of libpng 1.2.0's release, regardless of whether a later version of
the DLL were actually being used. (Also note that these functions did not
exist in versions older than 1.2.0, so any attempt to run a dynamically
linked app on such an older version would fail.)
To determine whether the processor supports MMX instructions at all, use
the png_mmx_support() function:
#if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
mmxsupport = png_mmx_support();
#endif
It returns -1 if MMX support is not compiled into libpng, 0 if MMX code
is compiled but MMX is not supported by the processor, or 1 if MMX support
is fully available. Note that png_mmx_support(), png_get_mmx_flagmask(),
and png_get_asm_flagmask() all may be called without allocating and ini-
tializing any PNG structures (for example, as part of a usage screen or
"about" box).
For more extensive examples of runtime querying, enabling and disabling
of optimized features, see contrib/gregbook/readpng2.c in the libpng
source-code distribution.
.SH VII. MNG support
The MNG specification (available at http://www.libpng.org/pub/mng) allows
certain extensions to PNG for PNG images that are embedded in MNG datastreams.
@@ -3418,7 +3555,7 @@ or any other MNG chunks; your application must provide its own support for
them. You may wish to consider using libmng (available at
http://www.libmng.com) instead.
.SH VII. Changes to Libpng from version 0.88
.SH VIII. Changes to Libpng from version 0.88
It should be noted that versions of libpng later than 0.96 are not
distributed by the original libpng author, Guy Schalnat, nor by
@@ -3467,15 +3604,15 @@ application:
png_uint_32 application_vn = PNG_LIBPNG_VER;
.SH VIII. Y2K Compliance in libpng
.SH IX. Y2K Compliance in libpng
May 14, 2001
May 18, 2001
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.0.12beta1 are Y2K compliant. It is my belief that earlier
upward through 1.2.0beta3 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
@@ -3587,7 +3724,10 @@ the first widely used release:
1.0.11beta1-3 1 10011 2.1.0.11beta1-3
1.0.11rc1 1 10011 2.1.0.11rc1
1.0.11 1 10011 2.1.0.11
1.0.12beta1 1 10012 2.1.0.12beta1
1.0.12a 2 10012 2.1.0.12a
1.1.0a-f 10100 2.1.1.0a-f abandoned
1.2.0beta1-2 2 10200 2.1.2.0beta1-2
1.2.0beta3 3 10200 3.1.2.0beta3
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@@ -3645,7 +3785,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.0.12beta1 - May 14, 2001:
Libpng version 1.2.0beta3 - May 18, 2001:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
@@ -3662,7 +3802,7 @@ included in the libpng distribution, the latter shall prevail.)
If you modify libpng you may insert additional notices immediately following
this sentence.
libpng versions 1.0.7, July 1, 2000, through 1.0.12beta1, May 14, 2001, are
libpng versions 1.0.7, July 1, 2000, through 1.2.0beta3, May 18, 2001, are
Copyright (c) 2000-2001 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.0.6
with the following individuals added to the list of Contributing Authors
@@ -3754,7 +3894,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
randeg@alum.rpi.edu
May 14, 2001
May 18, 2001
.\" end of man page

View File

@@ -1,6 +1,6 @@
libpng.txt - A description on how to use and modify libpng
libpng version 1.0.12beta1 - May 14, 2001
libpng version 1.2.0beta3 - May 18, 2001
Updated and distributed by Glenn Randers-Pehrson
<randeg@alum.rpi.edu>
Copyright (c) 1998-2001 Glenn Randers-Pehrson
@@ -1396,7 +1396,6 @@ png_infop info_ptr;
/* This function is called when each row of image
data is complete */
void
row_callback(png_structp png_ptr, png_bytep new_row,
png_uint_32 row_num, int pass)
@@ -2645,8 +2644,106 @@ When PNG_DEBUG = 1, the macros are defined, but only png_debug statements
having level = 0 will be printed. There aren't any such statements in
this version of libpng, but if you insert some they will be printed.
VI. Runtime optimization
VI. MNG support
A new feature in libpng 1.2.0 is the ability to dynamically switch between
standard and optimized versions of some routines. Currently these are
limited to three computationally intensive tasks when reading PNG files:
decoding row filters, expanding interlacing, and combining interlaced or
transparent row data with previous row data. Currently the optimized
versions are available only for x86 (Intel, AMD, etc.) platforms with
MMX support, though this may change in future versions. (For example,
the non-MMX assembler optimizations for zlib might become similarly
runtime-selectable in future releases, in which case libpng could be
extended to support them. Alternatively, the compile-time choice of
floating-point versus integer routines for gamma correction might become
runtime-selectable.)
Because such optimizations tend to be very platform- and compiler-dependent,
both in how they are written and in how they perform, the new runtime code
in libpng has been written to allow programs to query, enable, and disable
either specific optimizations or all such optimizations. For example, to
enable all possible optimizations (bearing in mind that some "optimizations"
may actually run more slowly in rare cases):
#if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
png_uint_32 mask, flags;
flags = png_get_asm_flags(png_ptr);
mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE);
png_set_asm_flags(png_ptr, flags | mask);
#endif
To enable only optimizations relevant to reading PNGs, use PNG_SELECT_READ
by itself when calling png_get_asm_flagmask(); similarly for optimizing
only writing. To disable all optimizations:
#if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
flags = png_get_asm_flags(png_ptr);
mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE);
png_set_asm_flags(png_ptr, flags & ~mask);
#endif
To enable or disable only MMX-related features, use png_get_mmx_flagmask()
in place of png_get_asm_flagmask(). The mmx version takes one additional
parameter:
#if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
int selection = PNG_SELECT_READ | PNG_SELECT_WRITE;
int compilerID;
mask = png_get_mmx_flagmask(selection, &compilerID);
#endif
On return, compilerID will indicate which version of the MMX assembler
optimizations was compiled. Currently two flavors exist: Microsoft
Visual C++ (compilerID == 1) and GNU C (a.k.a. gcc/gas, compilerID == 2).
On non-x86 platforms or on systems compiled without MMX optimizations, a
value of -1 is used.
Note that both png_get_asm_flagmask() and png_get_mmx_flagmask() return
all valid, settable optimization bits for the version of the library that's
currently in use. In the case of shared (dynamically linked) libraries,
this may include optimizations that did not exist at the time the code was
written and compiled. It is also possible, of course, to enable only known,
specific optimizations; for example:
#if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
flags = PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \
| PNG_ASM_FLAG_MMX_READ_INTERLACE \
| PNG_ASM_FLAG_MMX_READ_FILTER_SUB \
| PNG_ASM_FLAG_MMX_READ_FILTER_UP \
| PNG_ASM_FLAG_MMX_READ_FILTER_AVG \
| PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ;
png_set_asm_flags(png_ptr, flags);
#endif
This method would enable only the MMX read-optimizations available at the
time of libpng 1.2.0's release, regardless of whether a later version of
the DLL were actually being used. (Also note that these functions did not
exist in versions older than 1.2.0, so any attempt to run a dynamically
linked app on such an older version would fail.)
To determine whether the processor supports MMX instructions at all, use
the png_mmx_support() function:
#if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
mmxsupport = png_mmx_support();
#endif
It returns -1 if MMX support is not compiled into libpng, 0 if MMX code
is compiled but MMX is not supported by the processor, or 1 if MMX support
is fully available. Note that png_mmx_support(), png_get_mmx_flagmask(),
and png_get_asm_flagmask() all may be called without allocating and ini-
tializing any PNG structures (for example, as part of a usage screen or
"about" box).
For more extensive examples of runtime querying, enabling and disabling
of optimized features, see contrib/gregbook/readpng2.c in the libpng
source-code distribution.
VII. MNG support
The MNG specification (available at http://www.libpng.org/pub/mng) allows
certain extensions to PNG for PNG images that are embedded in MNG datastreams.
@@ -2671,7 +2768,7 @@ or any other MNG chunks; your application must provide its own support for
them. You may wish to consider using libmng (available at
http://www.libmng.com) instead.
VII. Changes to Libpng from version 0.88
VIII. Changes to Libpng from version 0.88
It should be noted that versions of libpng later than 0.96 are not
distributed by the original libpng author, Guy Schalnat, nor by
@@ -2720,15 +2817,15 @@ application:
png_uint_32 application_vn = PNG_LIBPNG_VER;
VIII. Y2K Compliance in libpng
IX. Y2K Compliance in libpng
May 14, 2001
May 18, 2001
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.0.12beta1 are Y2K compliant. It is my belief that earlier
upward through 1.2.0beta3 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 "May 14, 2001"
.TH LIBPNGPF 3 "May 18, 2001"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.0beta3
(private functions)
.SH SYNOPSIS
\fB#include <png.h>\fP
@@ -47,11 +47,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
\fI\fB
\fBpng_voidp png_create_struct (int \fP\fItype\fP\fB, png_malloc_ptr \fImalloc_fn\fP\fB);\fP
\fBpng_voidp png_create_struct (int \fItype\fP\fB);\fP
\fI\fB
\fBpng_voidp png_create_struct_2 (int \fItype\fP\fB);\fP
\fBpng_voidp png_create_struct_2 (int \fP\fItype\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP
\fI\fB
@@ -63,7 +63,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
\fI\fB
\fBvoid png_destroy_struct_2 (png_voidp \fP\fIstruct_ptr\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
\fBvoid png_destroy_struct_2 (png_voidp \fP\fIstruct_ptr\fP\fB, png_free_ptr \fP\fIfree_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP
\fI\fB
@@ -283,6 +283,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
\fI\fB
\fBvoid png_init_mmx_flags (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fBvoid png_init_read_transformations (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -425,6 +429,8 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
\fBvoid png_write_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP
\fI\fB
\fBvoid png_write_filtered_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIfiltered_row\fP\fB);\fP
\fI\fB
@@ -539,7 +545,8 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.0.12beta1
.SH DESCRIPTION
The functions listed above are used privately by libpng
and are not recommended for use by applications. They
and are not recommended for use by applications. They are
not "exported" to applications using shared libraries. They
are listed alphabetically here as an aid to libpng maintainers.
See png.h for more information on these functions.

2
png.5
View File

@@ -1,4 +1,4 @@
.TH PNG 5 "May 14, 2001"
.TH PNG 5 "May 18, 2001"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION

63
png.c
View File

@@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions
*
* libpng version 1.0.12beta1 - May 14, 2001
* libpng version 1.2.0beta3 - May 18, 2001
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -13,14 +13,14 @@
#include "png.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_0_12beta1 Your_png_h_is_not_version_1_0_12beta1;
typedef version_1_2_0beta3 Your_png_h_is_not_version_1_2_0beta3;
/* Version information for C files. This had better match the version
* string defined in png.h. */
#ifdef PNG_USE_GLOBAL_ARRAYS
/* png_libpng_ver was changed to a function in version 1.0.5c */
const char png_libpng_ver[18] = "1.0.12beta1";
const char png_libpng_ver[18] = "1.2.0beta3";
/* png_sig was changed to a function in version 1.0.5c */
/* Place to hold the signature string for a PNG file. */
@@ -646,7 +646,7 @@ png_charp PNGAPI
png_get_copyright(png_structp png_ptr)
{
if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */
return ((png_charp) "\n libpng version 1.0.12beta1 - May 14, 2001\n\
return ((png_charp) "\n libpng version 1.2.0beta3 - May 18, 2001\n\
Copyright (c) 1998-2001 Glenn Randers-Pehrson\n\
Copyright (c) 1996, 1997 Andreas Dilger\n\
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n");
@@ -664,8 +664,8 @@ png_get_libpng_ver(png_structp png_ptr)
{
/* Version of *.c files used when building libpng */
if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */
return((png_charp) "1.0.12beta1");
return((png_charp) "1.0.12beta1");
return((png_charp) "1.2.0beta3");
return((png_charp) "1.2.0beta3");
}
png_charp PNGAPI
@@ -715,9 +715,58 @@ png_uint_32 PNGAPI
png_access_version_number(void)
{
/* Version of *.c files used when building libpng */
return((png_uint_32) 10012L);
return((png_uint_32) 10200L);
}
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
/* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */
/* this INTERNAL function was added to libpng 1.2.0 */
void /* PRIVATE */
png_init_mmx_flags (png_structp png_ptr)
{
png_ptr->mmx_rowbytes_threshold = 0;
png_ptr->mmx_bitdepth_threshold = 0;
# if (defined(PNG_USE_PNGVCRD) || defined(PNG_USE_PNGGCCRD))
png_ptr->asm_flags |= PNG_ASM_FLAG_MMX_SUPPORT_COMPILED;
if (png_mmx_support()) {
png_ptr->asm_flags |= PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU
# ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW
| PNG_ASM_FLAG_MMX_READ_COMBINE_ROW
# endif
# ifdef PNG_HAVE_ASSEMBLER_READ_INTERLACE
| PNG_ASM_FLAG_MMX_READ_INTERLACE
# endif
# ifndef PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
;
# else
| PNG_ASM_FLAG_MMX_READ_FILTER_SUB
| PNG_ASM_FLAG_MMX_READ_FILTER_UP
| PNG_ASM_FLAG_MMX_READ_FILTER_AVG
| PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ;
png_ptr->mmx_rowbytes_threshold = PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT;
png_ptr->mmx_bitdepth_threshold = PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT;
# endif
} else {
png_ptr->asm_flags &= ~( PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU
| PNG_MMX_READ_FLAGS
| PNG_MMX_WRITE_FLAGS );
}
# else /* !((PNGVCRD || PNGGCCRD) && PNG_ASSEMBLER_CODE_SUPPORTED)) */
/* clear all MMX flags; no support is compiled in */
png_ptr->asm_flags &= ~( PNG_MMX_FLAGS );
# endif /* ?(PNGVCRD || PNGGCCRD) */
}
#endif /* !(PNG_ASSEMBLER_CODE_SUPPORTED) */
/* this function was added to libpng 1.2.0 */
#if !defined(PNG_USE_PNGGCCRD) && \
!(defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD))

107
png.h
View File

@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.0.12beta1 - May 14, 2001
* libpng version 1.2.0beta3 - May 18, 2001
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -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.12beta1 - May 14, 2001: Glenn
* libpng versions 0.97, January 1998, through 1.2.0beta3 - May 18, 2001: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@@ -70,8 +70,8 @@
* 1.0.11beta1-3 1 10011 2.1.0.11beta1-3
* 1.0.11rc1 1 10011 2.1.0.11rc1
* 1.0.11 1 10011 2.1.0.11
* 1.0.12beta1 2 10012 2.1.0.11beta1
* 1.1.0a-f 1 10100 2.1.1.0a-f (branch abandoned)
* 1.0.12a 2 10012 2.1.0.12a
* 1.1.0a-f 10100 2.1.1.0a-f (branch abandoned)
* 1.2.0beta1-2 2 10200 2.1.2.0beta1-2
* 1.2.0beta3 3 10200 3.1.2.0beta3
*
@@ -103,7 +103,7 @@
* If you modify libpng you may insert additional notices immediately following
* this sentence.
*
* libpng versions 1.0.7, July 1, 2000, through 1.0.12beta1, May 14, 2001, are
* libpng versions 1.0.7, July 1, 2000, through 1.2.0beta3, May 18, 2001, are
* Copyright (c) 2000, 2001 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.0.6
* with the following individuals added to the list of Contributing Authors
@@ -208,13 +208,13 @@
* Y2K compliance in libpng:
* =========================
*
* May 14, 2001
* May 18, 2001
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
* upward through 1.0.12beta1 are Y2K compliant. It is my belief that earlier
* upward through 1.2.0beta3 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
@@ -270,19 +270,19 @@
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.0.12beta1"
#define PNG_LIBPNG_VER_STRING "1.2.0beta3"
#define PNG_LIBPNG_VER_SONUM 2
#define PNG_LIBPNG_VER_SONUM 3
#define PNG_LIBPNG_VER_DLLNUM %DLLNUM%
/* 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 12
#define PNG_LIBPNG_VER_MINOR 2
#define PNG_LIBPNG_VER_RELEASE 0
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
#define PNG_LIBPNG_VER_BUILD 1
#define PNG_LIBPNG_VER_BUILD 3
#define PNG_LIBPNG_BUILD_ALPHA 1
#define PNG_LIBPNG_BUILD_BETA 2
@@ -297,7 +297,7 @@
* 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 10012 /* 1.0.12 */
#define PNG_LIBPNG_VER 10200 /* 1.2.0 */
#ifndef PNG_VERSION_INFO_ONLY
@@ -1174,7 +1174,7 @@ struct png_struct_def
defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
/* changed from png_byte to png_uint_32 at version 1.2.0 */
png_byte mng_features_permitted;
png_uint_32 mng_features_permitted;
#endif
/* New member added in libpng-1.0.7 */
@@ -1210,9 +1210,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.12beta1
and png.h are both at version 1.2.0beta3
*/
typedef png_structp version_1_0_12beta1;
typedef png_structp version_1_2_0beta3;
typedef png_struct FAR * FAR * png_structpp;
@@ -1296,7 +1296,7 @@ extern PNG_EXPORT(png_infop,png_create_info_struct)
/* Initialize the info structure (old interface - DEPRECATED) */
extern PNG_EXPORT(void,png_info_init) PNGARG((png_infop info_ptr));
#define png_info_init(info_ptr) png_info_init_3(&info_ptr, sizeof(png_info));
#define png_info_init(info_ptr) png_info_init_3(&(info_ptr), sizeof(png_info));
extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr,
png_size_t png_info_struct_size));
@@ -2256,11 +2256,68 @@ extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
png_ptr, png_uint_32 mng_features_permitted));
#endif
/* png_mmx_support will be included unconditionally starting in version 1.2.0 */
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) || defined(PNG_USE_PNGGCCRD)
/* Added to version 1.2.0 */
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
#define PNG_ASM_FLAG_MMX_SUPPORT_COMPILED 0x01 /* not user-settable */
#define PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU 0x02 /* not user-settable */
#define PNG_ASM_FLAG_MMX_READ_COMBINE_ROW 0x04
#define PNG_ASM_FLAG_MMX_READ_INTERLACE 0x08
#define PNG_ASM_FLAG_MMX_READ_FILTER_SUB 0x10
#define PNG_ASM_FLAG_MMX_READ_FILTER_UP 0x20
#define PNG_ASM_FLAG_MMX_READ_FILTER_AVG 0x40
#define PNG_ASM_FLAG_MMX_READ_FILTER_PAETH 0x80
#define PNG_ASM_FLAGS_INITIALIZED 0x80000000 /* not user-settable */
#define PNG_MMX_READ_FLAGS ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \
| PNG_ASM_FLAG_MMX_READ_INTERLACE \
| PNG_ASM_FLAG_MMX_READ_FILTER_SUB \
| PNG_ASM_FLAG_MMX_READ_FILTER_UP \
| PNG_ASM_FLAG_MMX_READ_FILTER_AVG \
| PNG_ASM_FLAG_MMX_READ_FILTER_PAETH )
#define PNG_MMX_WRITE_FLAGS ( 0 )
#define PNG_MMX_FLAGS ( PNG_ASM_FLAG_MMX_SUPPORT_COMPILED \
| PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU \
| PNG_MMX_READ_FLAGS \
| PNG_MMX_WRITE_FLAGS )
#define PNG_SELECT_READ 1
#define PNG_SELECT_WRITE 2
/* pngget.c */
extern PNG_EXPORT(png_uint_32,png_get_mmx_flagmask)
PNGARG((int flag_select, int *compilerID));
/* pngget.c */
extern PNG_EXPORT(png_uint_32,png_get_asm_flagmask)
PNGARG((int flag_select));
/* pngget.c */
extern PNG_EXPORT(png_uint_32,png_get_asm_flags)
PNGARG((png_structp png_ptr));
/* pngget.c */
extern PNG_EXPORT(png_byte,png_get_mmx_bitdepth_threshold)
PNGARG((png_structp png_ptr));
/* pngget.c */
extern PNG_EXPORT(png_uint_32,png_get_mmx_rowbytes_threshold)
PNGARG((png_structp png_ptr));
/* pngset.c */
extern PNG_EXPORT(void,png_set_asm_flags)
PNGARG((png_structp png_ptr, png_uint_32 asm_flags));
/* pngset.c */
extern PNG_EXPORT(void,png_set_mmx_thresholds)
PNGARG((png_structp png_ptr, png_byte mmx_bitdepth_threshold,
png_uint_32 mmx_rowbytes_threshold));
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
/* png.c, pnggccrd.c, or pngvcrd.c */
extern PNG_EXPORT(int,png_mmx_support) PNGARG((void));
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
/* Strip the prepended error numbers ("#nnn ") from error and warning
* messages before passing them to the error or warning handler. */
@@ -2272,7 +2329,7 @@ extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project defs */
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.0.12beta1 - May 14, 2001 (header)\n"
" libpng version 1.2.0beta3 - May 18, 2001 (header)\n"
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
/* With these routines we avoid an integer divide, which will be slower on
@@ -2505,7 +2562,7 @@ PNG_EXTERN png_uint_16 png_get_uint_16 PNGARG((png_bytep buf));
* (old interface - DEPRECATED - use png_create_read_struct instead).
*/
extern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr));
#define png_read_init(png_ptr) png_read_init_3(&png_ptr, \
#define png_read_init(png_ptr) png_read_init_3(&(png_ptr), \
PNG_LIBPNG_VER_STRING, sizeof(png_struct));
extern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr,
png_const_charp user_png_ver, png_size_t png_struct_size));
@@ -2517,7 +2574,7 @@ extern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr,
* (old interface - DEPRECATED - use png_create_write_struct instead).
*/
extern PNG_EXPORT(void,png_write_init) PNGARG((png_structp png_ptr));
#define png_write_init(png_ptr) png_write_init_3(&png_ptr, \
#define png_write_init(png_ptr) png_write_init_3(&(png_ptr), \
PNG_LIBPNG_VER_STRING, sizeof(png_struct));
extern PNG_EXPORT(void,png_write_init_3) PNGARG((png_structpp ptr_ptr,
png_const_charp user_png_ver, png_size_t png_struct_size));
@@ -3078,6 +3135,10 @@ PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,
png_bytep row));
#endif
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
/* png.c */ /* PRIVATE */
PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr));
#endif
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
#endif /* PNG_INTERNAL */

View File

@@ -1,6 +1,6 @@
/* pngasmrd.h - assembler version of utilities to read a PNG file
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 2001 Glenn Randers-Pehrson
*

View File

@@ -1,6 +1,6 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -47,13 +47,11 @@
/* Enabled by default in 1.2.0. You can disable this if you don't need to
support PNGs that are embedded in MNG datastreams */
/*
#ifndef PNG_NO_MNG_FEATURES
# ifndef PNG_MNG_FEATURES_SUPPORTED
# define PNG_MNG_FEATURES_SUPPORTED
# endif
#endif
*/
#ifndef PNG_NO_FLOATING_POINT_SUPPORTED
# ifndef PNG_FLOATING_POINT_SUPPORTED
@@ -590,12 +588,9 @@
# define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
#endif
/* Will be enabled in libpng-1.2.0 */
/*
#ifndef PNG_NO_ERROR_NUMBERS
#define PNG_ERROR_NUMBERS_SUPPORTED
#endif
*/
#ifndef PNG_NO_WRITE_FLUSH
# define PNG_WRITE_FLUSH_SUPPORTED
@@ -634,7 +629,6 @@
/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
even when PNG_USE_PNGVCRD or PNG_USE_PNGGCCRD is not defined */
/*
#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
# ifndef PNG_ASSEMBLER_CODE_SUPPORTED
# define PNG_ASSEMBLER_CODE_SUPPORTED
@@ -643,24 +637,10 @@
# define PNG_MMX_CODE_SUPPORTED
# endif
#endif
*/
#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
# if defined(PNG_USE_PNGVCRD) || defined(PNG_USE_PNGGCCRD)
# ifndef PNG_ASSEMBLER_CODE_SUPPORTED
# define PNG_ASSEMBLER_CODE_SUPPORTED
# endif
# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
# define PNG_MMX_CODE_SUPPORTED
# endif
# endif
#endif
/* This will be enabled by default in libpng-1.2.0 */
/*
#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
# define PNG_USER_MEM_SUPPORTED
#endif
*/
/* These are currently experimental features, define them if you want */

View File

@@ -1,7 +1,7 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@@ -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 version 1.0.12beta1 - May 14, 2001
* libpng version 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* Copyright (c) 1998, Intel Corporation
@@ -203,9 +203,14 @@
* - "_ShiftRem.use = 40;" should have been "_ShiftRem.use = 48;"
* - "psllq _ShiftRem, %%mm2" should have been "psrlq _ShiftRem, %%mm2"
*
* 20010101:
* - added new png_init_mmx_flags() function (here only because it needs to
* call mmxsupport(), which should probably become global png_mmxsupport());
* modified other MMX routines to run conditionally (png_ptr->asm_flags)
*
* 20010103:
* - renamed mmxsupport() to png_mmx_support(), with auto-set of mmx_supported,
* and made it public
* and made it public; moved png_init_mmx_flags() to png.c as internal func
*
* 20010104:
* - removed dependency on png_read_filter_row_c() (C code already duplicated
@@ -226,15 +231,9 @@
* x pick one version of mmxsupport() and get rid of the other
* - add error messages to any remaining bogus default cases
* - enable pixel_depth == 8 cases in png_read_filter_row()? (test speed)
* - add support for runtime enable/disable/query of various MMX routines
* x add support for runtime enable/disable/query of various MMX routines
*/
/*
#ifndef PNG_DEBUG
# define PNG_DEBUG 0
#endif
*/
#define PNG_INTERNAL
#include "png.h"
@@ -333,8 +332,37 @@ static int _dif;
static int _patemp; // temp variables for Paeth routine
static int _pbtemp;
static int _pctemp;
static void /* PRIVATE */
png_squelch_warnings(void)
{
_dif = _dif;
_patemp = _patemp;
_pbtemp = _pbtemp;
_pctemp = _pctemp;
_const4 = _const4;
_const6 = _const6;
_MMXLength = _MMXLength;
_mask8_0 = _mask8_0;
_mask16_1 = _mask16_1;
_mask16_0 = _mask16_0;
_mask24_2 = _mask24_2;
_mask24_1 = _mask24_1;
_mask24_0 = _mask24_0;
_mask32_3 = _mask32_3;
_mask32_2 = _mask32_2;
_mask32_1 = _mask32_1;
_mask32_0 = _mask32_0;
_mask48_5 = _mask48_5;
_mask48_4 = _mask48_4;
_mask48_3 = _mask48_3;
_mask48_2 = _mask48_2;
_mask48_1 = _mask48_1;
_mask48_0 = _mask48_0;
}
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
static int _mmx_supported = 2;
/*===========================================================================*/
@@ -370,9 +398,13 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
{
png_debug(1, "in png_combine_row (pnggccrd.c)\n");
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
if (_mmx_supported == 2) {
/* this should have happened in png_init_mmx_flags() already */
png_warning(png_ptr, "asm_flags may not have been initialized");
png_mmx_support();
}
#endif
if (mask == 0xff)
{
@@ -556,7 +588,8 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
png_bytep dstptr;
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
if ( _mmx_supported )
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
/* && _mmx_supported */ )
{
png_uint_32 len;
int diff;
@@ -689,7 +722,8 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
png_bytep dstptr;
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
if ( _mmx_supported )
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
/* && _mmx_supported */ )
{
png_uint_32 len;
int diff;
@@ -837,7 +871,8 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
png_bytep dstptr;
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
if ( _mmx_supported )
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
/* && _mmx_supported */ )
{
png_uint_32 len;
int diff;
@@ -1000,7 +1035,8 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
png_bytep dstptr;
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
if ( _mmx_supported )
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
/* && _mmx_supported */ )
{
png_uint_32 len;
int diff;
@@ -1170,7 +1206,8 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
png_bytep dstptr;
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
if ( _mmx_supported )
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
/* && _mmx_supported */ )
{
png_uint_32 len;
int diff;
@@ -1436,9 +1473,13 @@ png_do_read_interlace(png_structp png_ptr)
png_debug(1, "in png_do_read_interlace (pnggccrd.c)\n");
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
if (_mmx_supported == 2) {
/* this should have happened in png_init_mmx_flags() already */
png_warning(png_ptr, "asm_flags may not have been initialized");
png_mmx_support();
}
#endif
if (row != NULL && row_info != NULL)
{
@@ -1644,7 +1685,8 @@ png_do_read_interlace(png_structp png_ptr)
/* New code by Nirav Chhatrapati - Intel Corporation */
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
if ( _mmx_supported )
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE)
/* && _mmx_supported */ )
{
//--------------------------------------------------------------
if (pixel_bytes == 3)
@@ -2665,7 +2707,7 @@ png_do_read_interlace(png_structp png_ptr)
#if defined(PNG_HAVE_ASSEMBLER_READ_FILTER_ROW)
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
// These variables are utilized in the functions below. They are declared
@@ -2678,8 +2720,6 @@ union uAll {
_HBClearMask = {0x7f7f7f7f7f7f7f7fLL},
_ActiveMask, _ActiveMask2, _ActiveMaskEnd, _ShiftBpp, _ShiftRem;
//===========================================================================//
// //
// P N G _ R E A D _ F I L T E R _ R O W _ M M X _ A V G //
@@ -4884,7 +4924,6 @@ png_read_filter_row_mmx_up(png_row_infop row_info, png_bytep row,
/* */
/*===========================================================================*/
#if defined(PNG_HAVE_ASSEMBLER_READ_FILTER_ROW)
/* Optimized png_read_filter_row routines */
@@ -4904,6 +4943,8 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
#define UseMMX_paeth 1 // GRR: converted 20000828
if (_mmx_supported == 2) {
/* this should have happened in png_init_mmx_flags() already */
png_warning(png_ptr, "asm_flags may not have been initialized");
png_mmx_support();
}
#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */
@@ -4914,13 +4955,29 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
{
case 0: sprintf(filnm, "none");
break;
case 1: sprintf(filnm, "sub-%s", "MMX");
case 1: sprintf(filnm, "sub-%s",
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" :
#endif
"x86");
break;
case 2: sprintf(filnm, "up-%s", "MMX");
case 2: sprintf(filnm, "up-%s",
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "MMX" :
#endif
"x86");
break;
case 3: sprintf(filnm, "avg-%s", "MMX");
case 3: sprintf(filnm, "avg-%s",
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "MMX" :
#endif
"x86");
break;
case 4: sprintf(filnm, "Paeth-%s", "MMX");
case 4: sprintf(filnm, "Paeth-%s",
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "MMX":
#endif
"x86");
break;
default: sprintf(filnm, "unknw");
break;
@@ -4939,9 +4996,9 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
case PNG_FILTER_VALUE_SUB:
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
if ( _mmx_supported &&
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB) &&
(row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
(row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
{
png_read_filter_row_mmx_sub(row_info, row);
}
@@ -4964,9 +5021,9 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
case PNG_FILTER_VALUE_UP:
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
if ( _mmx_supported &&
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP) &&
(row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
(row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
{
png_read_filter_row_mmx_up(row_info, row, prev_row);
}
@@ -4988,9 +5045,9 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
case PNG_FILTER_VALUE_AVG:
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
if ( _mmx_supported &&
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG) &&
(row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
(row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
{
png_read_filter_row_mmx_avg(row_info, row, prev_row);
}
@@ -5022,9 +5079,9 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
case PNG_FILTER_VALUE_PAETH:
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED)
if ( _mmx_supported &&
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH) &&
(row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
(row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
{
png_read_filter_row_mmx_paeth(row_info, row, prev_row);
}
@@ -5177,4 +5234,5 @@ png_mmx_support(void)
return _mmx_supported;
}
#endif /* PNG_USE_PNGGCCRD */

View File

@@ -1,7 +1,7 @@
/* pngget.c - retrieval of values from info struct
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@@ -1,7 +1,7 @@
/* pngmem.c - stub functions for memory allocation
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@@ -1,7 +1,7 @@
/* pngpread.c - read a png file in push mode
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@@ -1,7 +1,7 @@
/* pngread.c - read a PNG file
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -54,6 +54,10 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
return (png_structp)NULL;
}
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
png_init_mmx_flags(png_ptr); /* 1.2.0 addition */
#endif
#ifdef PNG_SETJMP_SUPPORTED
#ifdef USE_FAR_KEYWORD
if (setjmp(jmpbuf))
@@ -742,7 +746,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.12beta1
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.0beta3
*/
void PNGAPI
@@ -791,7 +795,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.12beta1
* [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.0beta3
*/
void PNGAPI
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.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 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.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@@ -1,7 +1,7 @@
/* pngtest.c - a simple test program to test libpng
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -1511,4 +1511,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_12beta1 your_png_h_is_not_version_1_0_12beta1;
typedef version_1_2_0beta3 your_png_h_is_not_version_1_2_0beta3;

View File

@@ -1,7 +1,7 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@@ -2,14 +2,14 @@
*
* For Intel x86 CPU and Microsoft Visual C++ compiler
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* Copyright (c) 1998, Intel Corporation
*
* Contributed by Nirav Chhatrapati, Intel Corporation, 1998
* Interface to libpng contributed by Gilles Vollant, 1999
* Debugging and cleanup by Greg Roelofs, 2000, 2001
*
*
* In png_do_read_interlace() in libpng versions 1.0.3a through 1.0.4d,
* a sign error in the post-MMX cleanup code for each pixel_depth resulted
@@ -19,6 +19,8 @@
*
* [png_read_filter_row_mmx_avg() bpp == 2 bugfix, GRR 20000916]
*
* [runtime MMX configuration, GRR 20010102]
*
*/
#define PNG_INTERNAL
@@ -110,6 +112,8 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
png_debug(1,"in png_combine_row_asm\n");
if (mmx_supported == 2) {
/* this should have happened in png_init_mmx_flags() already */
png_warning(png_ptr, "asm_flags may not have been initialized");
png_mmx_support();
}
@@ -300,7 +304,8 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
__int64 mask0=0x0102040810204080;
if ( mmx_supported )
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
/* && mmx_supported */ )
{
srcptr = png_ptr->row_buf + 1;
dstptr = row;
@@ -382,8 +387,6 @@ end8:
incr1 = (disp)*pixel_bytes;
for (i = initial_val; i < final_val; i += incr1)
{
if (pixel_bytes > (png_size_t)(final_val-i))
pixel_bytes = (png_size_t)(final_val-i);
png_memcpy(dstptr, srcptr, pixel_bytes);
srcptr += incr1;
dstptr += incr1;
@@ -402,7 +405,8 @@ end8:
__int64 mask1=0x0101020204040808,
mask0=0x1010202040408080;
if ( mmx_supported )
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
/* && mmx_supported */ )
{
srcptr = png_ptr->row_buf + 1;
dstptr = row;
@@ -495,8 +499,6 @@ end16:
incr1 = (disp)*pixel_bytes;
for (i = initial_val; i < final_val; i += incr1)
{
if (pixel_bytes > (png_size_t)(final_val-i))
pixel_bytes = (png_size_t)(final_val-i);
png_memcpy(dstptr, srcptr, pixel_bytes);
srcptr += incr1;
dstptr += incr1;
@@ -524,7 +526,8 @@ end16:
len = (png_ptr->width)&~7;
diff = (png_ptr->width)&7;
if ( mmx_supported )
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
/* && mmx_supported */ )
{
_asm
{
@@ -627,8 +630,6 @@ end24:
incr1 = (disp)*pixel_bytes;
for (i = initial_val; i < final_val; i += incr1)
{
if (pixel_bytes > (png_size_t)(final_val-i))
pixel_bytes = (png_size_t)(final_val-i);
png_memcpy(dstptr, srcptr, pixel_bytes);
srcptr += incr1;
dstptr += incr1;
@@ -657,7 +658,8 @@ end24:
len = (png_ptr->width)&~7;
diff = (png_ptr->width)&7;
if ( mmx_supported )
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
/* && mmx_supported */ )
{
_asm
{
@@ -768,8 +770,6 @@ end32:
incr1 = (disp)*pixel_bytes;
for (i = initial_val; i < final_val; i += incr1)
{
if (pixel_bytes > (png_size_t)(final_val-i))
pixel_bytes = (png_size_t)(final_val-i);
png_memcpy(dstptr, srcptr, pixel_bytes);
srcptr += incr1;
dstptr += incr1;
@@ -793,7 +793,8 @@ end32:
mask1=0x2020202040404040,
mask0=0x4040808080808080;
if ( mmx_supported )
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
/* && mmx_supported */ )
{
srcptr = png_ptr->row_buf + 1;
dstptr = row;
@@ -927,8 +928,6 @@ end48:
incr1 = (disp)*pixel_bytes;
for (i = initial_val; i < final_val; i += incr1)
{
if (pixel_bytes > (png_size_t)(final_val-i))
pixel_bytes = (png_size_t)(final_val-i);
png_memcpy(dstptr, srcptr, pixel_bytes);
srcptr += incr1;
dstptr += incr1;
@@ -957,8 +956,6 @@ end48:
incr1 = (disp)*pixel_bytes;
for (i = initial_val; i < final_val; i += incr1)
{
if (pixel_bytes > (png_size_t)(final_val-i))
pixel_bytes = (png_size_t)(final_val-i);
png_memcpy(dp, sptr, pixel_bytes);
sptr += incr1;
dp += incr1;
@@ -987,6 +984,8 @@ png_do_read_interlace(png_structp png_ptr)
png_debug(1,"in png_do_read_interlace\n");
if (mmx_supported == 2) {
/* this should have happened in png_init_mmx_flags() already */
png_warning(png_ptr, "asm_flags may not have been initialized");
png_mmx_support();
}
@@ -1187,7 +1186,8 @@ png_do_read_interlace(png_structp png_ptr)
// NOTE: there is NO MMX code for 48-bit and 64-bit images
// use MMX routine if machine supports it
if ( mmx_supported )
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE)
/* && mmx_supported */ )
{
if (pixel_bytes == 3)
{
@@ -1777,7 +1777,7 @@ loop4_pass4:
} /* end of mmx_supported */
else /* MMX not supported: use modified C code - takes advantage
* of inlining of png_memcpy for a constant */
* of inlining of memcpy for a constant */
{
if (pixel_bytes == 1)
{
@@ -3649,6 +3649,8 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
#endif
if (mmx_supported == 2) {
/* this should have happened in png_init_mmx_flags() already */
png_warning(png_ptr, "asm_flags may not have been initialized");
png_mmx_support();
}
@@ -3658,13 +3660,17 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
{
case 0: sprintf(filnm, "none");
break;
case 1: sprintf(filnm, "sub-%s", "MMX");
case 1: sprintf(filnm, "sub-%s",
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" : "x86");
break;
case 2: sprintf(filnm, "up-%s", "MMX");
case 2: sprintf(filnm, "up-%s",
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "MMX" : "x86");
break;
case 3: sprintf(filnm, "avg-%s", "MMX");
case 3: sprintf(filnm, "avg-%s",
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "MMX" : "x86");
break;
case 4: sprintf(filnm, "Paeth-%s", "MMX");
case 4: sprintf(filnm, "Paeth-%s",
(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "MMX":"x86");
break;
default: sprintf(filnm, "unknw");
break;
@@ -3682,9 +3688,9 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
case PNG_FILTER_VALUE_SUB:
{
if (
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB) &&
(row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
(row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
{
png_read_filter_row_mmx_sub(row_info, row);
}
@@ -3707,9 +3713,9 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
case PNG_FILTER_VALUE_UP:
{
if (
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP) &&
(row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
(row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
{
png_read_filter_row_mmx_up(row_info, row, prev_row);
}
@@ -3731,9 +3737,9 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
case PNG_FILTER_VALUE_AVG:
{
if (
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG) &&
(row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
(row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
{
png_read_filter_row_mmx_avg(row_info, row, prev_row);
}
@@ -3765,9 +3771,9 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
case PNG_FILTER_VALUE_PAETH:
{
if (
(row_info->pixel_depth >= PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT) &&
(row_info->rowbytes >= PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT))
if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH) &&
(row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) &&
(row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold))
{
png_read_filter_row_mmx_paeth(row_info, row, prev_row);
}

View File

@@ -1,7 +1,7 @@
/* pngwio.c - functions for data output
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@@ -1,7 +1,7 @@
/* pngwrite.c - general routines to write a PNG file
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -452,6 +452,10 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
return ((png_structp)NULL);
}
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
png_init_mmx_flags(png_ptr); /* 1.2.0 addition */
#endif
#ifdef PNG_SETJMP_SUPPORTED
#ifdef USE_FAR_KEYWORD
if (setjmp(jmpbuf))
@@ -598,6 +602,10 @@ png_write_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
/* reset all variables to 0 */
png_memset(png_ptr, 0, sizeof (png_struct));
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
png_init_mmx_flags(png_ptr); /* 1.2.0 addition */
#endif
#ifdef PNG_SETJMP_SUPPORTED
/* restore jump buffer */
png_memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf));

View File

@@ -1,7 +1,7 @@
/* pngwtran.c - transforms the data in a row for PNG writers
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@@ -1,7 +1,7 @@
/* pngwutil.c - utilities to write a PNG file
*
* libpng 1.0.12beta1 - May 14, 2001
* libpng 1.2.0beta3 - May 18, 2001
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2001 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -537,8 +537,7 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)
png_debug(1, "in png_write_PLTE\n");
if ((
#if defined(PNG_MNG_FEATURES_SUPPORTED) || \
defined(PNG_WRITE_EMPTY_PLTE_PERMITTED)
#if defined(PNG_MNG_FEATURES_SUPPORTED)
!(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) &&
#endif
num_pal == 0) || num_pal > 256)
@@ -1028,8 +1027,7 @@ png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type)
if (color_type == PNG_COLOR_TYPE_PALETTE)
{
if (
#if defined(PNG_MNG_FEATURES_SUPPORTED) || \
defined(PNG_WRITE_EMPTY_PLTE_PERMITTED)
#if defined(PNG_MNG_FEATURES_SUPPORTED)
(png_ptr->num_palette ||
(!(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE))) &&
#endif

View File

@@ -1,5 +1,5 @@
Microsoft Developer Studio Build File, Format Version 6.00 for
libpng 1.0.12beta1 (May 14, 2001) and zlib
libpng 1.2.0beta3 (May 18, 2001) and zlib
Copyright (C) 2000 Simon-Pierre Cadieux
For conditions of distribution and use, see copyright notice in png.h
@@ -24,12 +24,12 @@ To build:
This project will build the PNG Development Group's "official" versions of
libpng and zlib libraries:
libpng2.dll (default version, currently C code only)
libpng2.dll (C + Assembler version)
libpng2.dll (C + Assembler debug version)
libpng2.dll (C code debug version)
libpng2[c,e-m].dll (reserved for official versions)
libpng2[n-z].dll (available for private versions)
libpng3.dll (default version, currently C code only)
libpng3.dll (C + Assembler version)
libpng3.dll (C + Assembler debug version)
libpng3.dll (C code debug version)
libpng3[c,e-m].dll (reserved for official versions)
libpng3[n-z].dll (available for private versions)
zlib.dll (default version, currently C code only)
zlibd.dll (debug version)

View File

@@ -56,7 +56,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /machine:I386
# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll\libpng2.dll"
# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll\libpng3.dll"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug"
@@ -84,7 +84,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbg\libpng2d.dll"
# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbg\libpng3d.dll"
!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM"
@@ -111,7 +111,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /machine:I386
# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll_asm\libpng2a.dll"
# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll_asm\libpng3a.dll"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug ASM"
@@ -139,7 +139,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbga\libpng2b.dll"
# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbga\libpng3b.dll"
!ELSEIF "$(CFG)" == "libpng - Win32 LIB"

View File

@@ -6,7 +6,7 @@ LIBRARY
DESCRIPTION "PNG image compression library for Windows"
EXPORTS
;Version 1.0.12beta1
;Version 1.2.0beta3
png_build_grayscale_palette @1
png_check_sig @2
png_chunk_error @3
@@ -191,23 +191,23 @@ EXPORTS
png_write_init_3 @176
png_info_init_3 @177
png_destroy_struct @178
; To be added at version 1.2.0
; Added at version 1.2.0
; For use with PNG_USER_MEM_SUPPORTED
; png_destroy_struct_2 @179
; png_create_read_struct_2 @180
; png_create_write_struct_2 @181
; png_malloc_default @182
; png_free_default @183
png_destroy_struct_2 @179
png_create_read_struct_2 @180
png_create_write_struct_2 @181
png_malloc_default @182
png_free_default @183
; MNG features
; png_permit_mng_features @184
png_permit_mng_features @184
; MMX support
; png_mmx_support @185
; png_get_mmx_flagmask @186
; png_get_asm_flagmask @187
; png_get_asm_flags @188
; png_get_mmx_bitdepth_threshold @189
; png_get_mmx_rowbytes_threshold @190
; png_set_asm_flags @191
; png_init_mmx_flags @192
png_mmx_support @185
png_get_mmx_flagmask @186
png_get_asm_flagmask @187
png_get_asm_flags @188
png_get_mmx_bitdepth_threshold @189
png_get_mmx_rowbytes_threshold @190
png_set_asm_flags @191
png_init_mmx_flags @192
; Strip error numbers
; png_set_strip_error_numbers @193
png_set_strip_error_numbers @193

View File

@@ -8,9 +8,9 @@ libpng for WindowsCE Rel.1.0
Introduction
============
This is libpng 1.0.12beta1 ported to WindowsCE 2.0 and 2.11.
libpng 1.0.12beta1 is a PNG reference library.
See README, a document of original libpng 1.0.12beta1.
This is libpng 1.2.0beta3 ported to WindowsCE 2.0 and 2.11.
libpng 1.2.0beta3 is a PNG reference library.
See README, a document of original libpng 1.2.0beta3.
zlib for WindowsCE
==================
@@ -23,7 +23,7 @@ This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
See README and LICENSE, documents of original libpng 1.0.12beta1, for conditions
See README and LICENSE, documents of original libpng 1.2.0beta3, for conditions
of use and distribution.
Files

View File

@@ -24,7 +24,7 @@ libpng
<EFBFBD>ɂȂ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Q<EFBFBD>ɂ‚<EFBFBD><EFBFBD>Ă<EFBFBD><EFBFBD>A<EFBFBD><EFBFBD><EFBFBD>ҁA<EFBFBD>z<EFBFBD>z<EFBFBD>ҁA<EFBFBD><EFBFBD><EFBFBD>̑<EFBFBD><EFBFBD><EFBFBD><EFBFBD>p<EFBFBD>҈ȊO<EFBFBD>̐l<EFBFBD><EFBFBD><EFBFBD>A
<EFBFBD>c<EFBFBD>̂ɐӔC<EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD><EFBFBD>`<60><><EFBFBD>͂Ȃ<CD82><C882><EFBFBD><EFBFBD>̂Ƃ<CC82><C682>܂<EFBFBD><DC82>B
<EFBFBD><EFBFBD><EFBFBD>̑<EFBFBD><EFBFBD>A<EFBFBD><EFBFBD><EFBFBD>̃\<5C>t<EFBFBD>g<EFBFBD>E<EFBFBD>F<EFBFBD>A<EFBFBD>̗<EFBFBD><CC97>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD>ɂ‚<C982><C282>ẮA<CD81><41><EFBFBD>łł<C582><C582><EFBFBD> libpng 1.0.12beta1<EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD>̑<EFBFBD><EFBFBD>A<EFBFBD><EFBFBD><EFBFBD>̃\<5C>t<EFBFBD>g<EFBFBD>E<EFBFBD>F<EFBFBD>A<EFBFBD>̗<EFBFBD><CC97>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD>ɂ‚<C982><C282>ẮA<CD81><41><EFBFBD>łł<C582><C582><EFBFBD> libpng 1.2.0beta3<EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̂Ƃ<EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B<EFBFBD>ڂ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>́A<EFBFBD>t<EFBFBD><EFBFBD><EFBFBD><EFBFBD> README,LICENSE <20><><EFBFBD><EFBFBD><EFBFBD>ǂ݂<C782><DD82><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B
<EFBFBD><EFBFBD><EFBFBD>^<5E><><EFBFBD>e

View File

@@ -5,7 +5,7 @@
LIBRARY lpngce
EXPORTS
;Version 1.0.12beta1
;Version 1.2.0beta3
png_build_grayscale_palette @1
png_check_sig @2
png_chunk_error @3
@@ -76,7 +76,6 @@ EXPORTS
png_malloc @68
png_memcpy_check @69
png_memset_check @70
; png_permit_empty_plte is deprecated
png_permit_empty_plte @71
png_process_data @72
png_progressive_combine_row @73
@@ -190,23 +189,23 @@ EXPORTS
png_write_init_3 @176
png_info_init_3 @177
png_destroy_struct @178
; To be added at version 1.2.0
; Added at version 1.2.0
; For use with PNG_USER_MEM_SUPPORTED
; png_destroy_struct_2 @179
; png_create_read_struct_2 @180
; png_create_write_struct_2 @181
; png_malloc_default @182
; png_free_default @183
png_destroy_struct_2 @179
png_create_read_struct_2 @180
png_create_write_struct_2 @181
png_malloc_default @182
png_free_default @183
; MNG features
; png_permit_mng_features @184
png_permit_mng_features @184
; MMX support
; png_mmx_support @185
; png_get_mmx_flagmask @186
; png_get_asm_flagmask @187
; png_get_asm_flags @188
; png_get_mmx_bitdepth_threshold @189
; png_get_mmx_rowbytes_threshold @190
; png_set_asm_flags @191
; png_init_mmx_flags @192
png_mmx_support @185
png_get_mmx_flagmask @186
png_get_asm_flagmask @187
png_get_asm_flags @188
png_get_mmx_bitdepth_threshold @189
png_get_mmx_rowbytes_threshold @190
png_set_asm_flags @191
png_init_mmx_flags @192
; Strip error numbers
; png_set_strip_error_numbers @193
png_set_strip_error_numbers @193

View File

@@ -15,10 +15,10 @@ AR = ar rcs
RANLIB = ranlib
RM = rm -f
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# have to change it.
PNGMAJ = 2
PNGMIN = 1.0.12beta1
PNGMAJ = 3
PNGMIN = 1.2.0beta3
PNGVER = $(PNGMAJ).$(PNGMIN)
prefix=/usr/local

View File

@@ -10,10 +10,10 @@ CC=gcc
ZLIBLIB=/usr/local/lib
ZLIBINC=/usr/local/include
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# have to change it.
PNGMAJ = 2
PNGMIN = 1.0.12beta1
PNGMAJ = 3
PNGMIN = 1.2.0beta3
PNGVER = $(PNGMAJ).$(PNGMIN)
ALIGN=

View File

@@ -35,13 +35,13 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
CFLAGS=-I$(ZLIBINC) -Wall -O3 $(ALIGN) -funroll-loops \
-fomit-frame-pointer
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# have to change it.
PNGMAJ = 2
#PNGDLL = $2# msvc
PNGDLL = 2# cygwin 1.0.12beta1
PNGMIN = 1.0.12beta1
PNGMIN_BASE = 1.0.12
PNGMAJ = 3
#PNGDLL = $3# msvc
PNGDLL = 2# cygwin 1.2.0beta3
PNGMIN = 1.2.0beta3
PNGMIN_BASE = 1.2.0
PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=cygpng$(PNGDLL).dll

View File

@@ -14,10 +14,10 @@ LIBPATH=$(prefix)/lib
ZLIBLIB=../zlib
ZLIBINC=../zlib
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# have to change it.
PNGMAJ = 2
PNGMIN = 1.0.12beta1
PNGMAJ = 3
PNGMIN = 1.2.0beta3
PNGVER = $(PNGMAJ).$(PNGMIN)
CC=cc

View File

@@ -48,10 +48,10 @@ LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
RANLIB=ranlib
#RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# have to change it.
PNGMAJ = 2
PNGMIN = 1.0.12beta1
PNGMAJ = 3
PNGMIN = 1.2.0beta3
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include

View File

@@ -31,10 +31,10 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
RANLIB=ranlib
#RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# have to change it.
PNGMAJ = 2
PNGMIN = 1.0.12beta1
PNGMAJ = 3
PNGMIN = 1.2.0beta3
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include

View File

@@ -16,10 +16,10 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
RANLIB=ranlib
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# have to change it.
PNGMAJ = 2
PNGMIN = 1.0.12beta1
PNGMAJ = 3
PNGMIN = 1.2.0beta3
PNGVER = $(PNGMAJ).$(PNGMIN)
# where make install puts libpng.a and png.h

View File

@@ -31,10 +31,10 @@ LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm
RANLIB=ranlib
#RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# have to change it.
PNGMAJ = 2
PNGMIN = 1.0.12beta1
PNGMAJ = 3
PNGMIN = 1.2.0beta3
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include

View File

@@ -10,8 +10,8 @@ MANDIR= ${LOCALBASE}/man
INCSDIR=${LOCALBASE}/include
LIB=png
SHLIB_MAJOR= 2
SHLIB_MINOR= 1.0.12beta1
SHLIB_MAJOR= 3
SHLIB_MINOR= 1.2.0beta3
SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c

View File

@@ -22,10 +22,10 @@ LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
#RANLIB=ranlib
RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# have to change it.
PNGMAJ = 2
PNGMIN = 1.0.12beta1
PNGMAJ = 3
PNGMIN = 1.2.0beta3
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include

View File

@@ -19,8 +19,8 @@ CFLAGS=-I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=gcc -shared
VER=1.0.12beta1
LIBS=libpng.so.1.0.12beta1
VER=1.2.0beta3
LIBS=libpng.so.1.2.0beta3
SHAREDLIB=libpng.so
libdir=$(prefix)/lib32

View File

@@ -25,7 +25,7 @@ CFLAGS=-I$(ZLIBINC) -O $(WARNMORE) -DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=cc -shared
VER=1.0.12beta1
VER=1.2.0beta3
SONUM=2
SHAREDLIB=libpng.so
libdir=$(prefix)

View File

@@ -28,10 +28,10 @@ LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng -lz -lm
#RANLIB=ranlib
RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# read libpng.txt or png.h to see why PNGMAJ is 3. You should not
# have to change it.
PNGMAJ = 2
PNGMIN = 1.0.12beta1
PNGMAJ = 3
PNGMIN = 1.2.0beta3
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include

View File

@@ -7,8 +7,8 @@ unit pngdef;
interface
const
PNG_LIBPNG_VER_STRING = '1.0.12beta1';
PNG_LIBPNG_VER = 10012;
PNG_LIBPNG_VER_STRING = '1.2.0beta3';
PNG_LIBPNG_VER = 10200;
type
png_uint_32 = Cardinal;

View File

@@ -2,7 +2,7 @@
; PNG.LIB module definition file for OS/2
;----------------------------------------
; Version 1.0.12beta1
; Version 1.2.0beta3
LIBRARY PNG
DESCRIPTION "PNG image compression library for OS/2"
@@ -187,8 +187,17 @@ EXPORTS
;To be added at version 1.2.0
; png_permit_mng_features
;To be added at version 1.2.0
; png_mmx_support
; Added at version 1.2.0:
png_mmx_support
png_permit_empty_plte
png_permit_mng_features
png_get_mmx_flagmask
png_get_asm_flagmask
png_get_asm_flags
png_get_mmx_bitdepth_threshold
png_get_mmx_rowbytes_threshold
png_set_asm_flags
png_init_mmx_flags
; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS
png_libpng_ver