Skip to content

Commit

Permalink
Bug 1348356 - Update in-tree libpng to version 1.6.29. r=jrmuizel
Browse files Browse the repository at this point in the history
  • Loading branch information
glennrp committed Mar 18, 2017
1 parent bcccae4 commit 1ee383e
Show file tree
Hide file tree
Showing 21 changed files with 1,503 additions and 512 deletions.
23 changes: 23 additions & 0 deletions media/libpng/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -5794,6 +5794,29 @@ Version 1.6.28rc03 [January 4, 2017]
Version 1.6.28 [January 5, 2017]
No changes.

Version 1.6.29beta01 [January 12, 2017]
Readded "include(GNUInstallDirs)" to CMakeLists.txt (Gianfranco Costamagna).
Moved SSE2 optimization code into the main libpng source directory.
Configure libpng with "configure --enable-intel-sse" or compile
libpng with "-DPNG_INTEL_SSE" in CPPFLAGS to enable it.
Simplified conditional compilation in pngvalid.c, for AIX (Michael Felt).

Version 1.6.29beta02 [February 22, 2017]
Avoid conditional directives that break statements in pngrutil.c (Romero
Malaquias)
The contrib/examples/pngtopng.c recovery code was in the wrong "if"
branches; the comments were correct.
Added code for PowerPC VSX optimisation (Vadim Barkov).

Version 1.6.29beta03 [March 1, 2017]
Avoid potential overflow of shift operations in png_do_expand() (Aaron Boxer).
Change test ZLIB_VERNUM >= 0x1281 to ZLIB_VERNUM >= 0x1290 in pngrutil.c
because Solaris 11 distributes zlib-1.2.8.f that is older than 1.2.8.1.
Suppress clang warnings about implicit sign changes in png.c

Version 1.6.29 [March 16, 2017]
No changes.

Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
Expand Down
7 changes: 4 additions & 3 deletions media/libpng/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ obtain one at http://mozilla.org/MPL/2.0/.

This modified version of libpng code adds animated PNG support and is
released under the libpng license described below. The modifications are
Copyright (c) 2006-2007 Andrew Smith, Copyright (c) 2008-2016 Max Stepin,
Copyright (c) 2006-2007 Andrew Smith, Copyright (c) 2008-2017 Max Stepin,
and are delimited by "#ifdef PNG_APNG_SUPPORTED / #endif" directives
surrounding them in the modified libpng source files.

This code is released under the libpng license.

libpng versions 1.0.7, July 1, 2000 through 1.6.28, January 5, 2017 are
libpng versions 1.0.7, July 1, 2000 through 1.6.29, March 16, 2017 are
Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
Expand All @@ -34,6 +34,7 @@ added to the list of Contributing Authors:
James Yu
Mandar Sahastrabuddhe
Google Inc.
Vadim Barkov

and with the following additions to the disclaimer:

Expand Down Expand Up @@ -139,4 +140,4 @@ any encryption software. See the EAR, paragraphs 734.3(b)(3) and

Glenn Randers-Pehrson
glennrp at users.sourceforge.net
January 5, 2017
March 16, 2017
2 changes: 2 additions & 0 deletions media/libpng/MOZCHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

Changes made to pristine libpng source by mozilla.org developers.

2017/03/18 -- Synced with libpng-1.6.29 (bug #1348356).

2017/01/06 -- Synced with libpng-1.6.28 (bug #1328354).

2016/12/29 -- Synced with libpng-1.6.27 (bug #1326234).
Expand Down
8 changes: 6 additions & 2 deletions media/libpng/README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
README for libpng version 1.6.28 - January 5, 2017 (shared library 16.0)
README for libpng version 1.6.29 - March 16, 2017 (shared library 16.0)
See the note about version numbers near the top of png.h

See INSTALL for instructions on how to install libpng.
Expand Down Expand Up @@ -179,21 +179,25 @@ Files in this distribution:
pngwtran.c => Write data transformations
pngwutil.c => Write utility functions
arm => Contains optimized code for the ARM platform
powerpc => Contains optimized code for the PowerPC platform
contrib => Contributions
arm-neon => Optimized code for ARM-NEON platform
powerpc-vsx => Optimized code for POWERPC-VSX platform
examples => Example programs
gregbook => source code for PNG reading and writing, from
Greg Roelofs' "PNG: The Definitive Guide",
O'Reilly, 1999
intel => Optimized code for INTEL-SSE2 platform
libtests => Test programs
mips-msa => Optimized code for MIPS-MSA platform
pngminim => Minimal decoder, encoder, and progressive decoder
programs demonstrating use of pngusr.dfa
pngminus => Simple pnm2png and png2pnm programs
pngsuite => Test images
testpngs
tools => Various tools
visupng => Contains a MSVC workspace for VisualPng
intel => Optimized code for INTEL-SSE2 platform
mips => Optimized code for MIPS platform
projects => Contains project files and workspaces for
building a DLL
owatcom => Contains a WATCOM project for building libpng
Expand Down
50 changes: 25 additions & 25 deletions media/libpng/apng.patch
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Index: LICENSE
+
This code is released under the libpng license.

libpng versions 1.0.7, July 1, 2000 through 1.6.28, January 5, 2017 are
libpng versions 1.0.7, July 1, 2000 through 1.6.29, March 16, 2017 are
Index: pngread.c
===================================================================
--- pngread.c
Expand Down Expand Up @@ -299,8 +299,8 @@ Index: png.c
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
- "libpng version 1.6.28 - January 5, 2017" PNG_STRING_NEWLINE \
+ "libpng version 1.6.28+apng - January 5, 2017" PNG_STRING_NEWLINE \
- "libpng version 1.6.29 - March 16, 2017" PNG_STRING_NEWLINE \
+ "libpng version 1.6.29+apng - March 16, 2017" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
Expand All @@ -310,8 +310,8 @@ Index: png.c
+ "Portions Copyright (c) 2006-2007 Andrew Smith" PNG_STRING_NEWLINE \
+ "Portions Copyright (c) 2008-2017 Max Stepin" PNG_STRING_NEWLINE ;
# else
- return "libpng version 1.6.28 - January 5, 2017\
+ return "libpng version 1.6.28+apng - January 5, 2017\
- return "libpng version 1.6.29 - March 16, 2017\
+ return "libpng version 1.6.29+apng - March 16, 2017\
Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
- Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
Expand All @@ -337,20 +337,20 @@ Index: png.h
+ *
* This code is released under the libpng license.
*
* libpng versions 1.0.7, July 1, 2000 through 1.6.28, January 5, 2017 are
@@ -307,8 +313,9 @@
* libpng versions 1.0.7, July 1, 2000 through 1.6.29, March 16, 2017 are
@@ -309,8 +315,9 @@
*/

/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.6.28"
-#define PNG_HEADER_VERSION_STRING " libpng version 1.6.28 - January 5, 2017\n"
+#define PNG_LIBPNG_VER_STRING "1.6.28+apng"
-#define PNG_LIBPNG_VER_STRING "1.6.29"
-#define PNG_HEADER_VERSION_STRING " libpng version 1.6.29 - March 16, 2017\n"
+#define PNG_LIBPNG_VER_STRING "1.6.29+apng"
+#define PNG_HEADER_VERSION_STRING \
+ " libpng version 1.6.28+apng - January 5, 2017\n"
+ " libpng version 1.6.29+apng - March 16, 2017\n"

#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@@ -359,6 +366,10 @@
@@ -361,6 +368,10 @@
# include "pnglibconf.h"
#endif

Expand All @@ -361,7 +361,7 @@ Index: png.h
#ifndef PNG_VERSION_INFO_ONLY
/* Machine specific configuration. */
# include "pngconf.h"
@@ -454,6 +465,17 @@
@@ -456,6 +467,17 @@
* See pngconf.h for base types that vary by machine/system
*/

Expand All @@ -379,7 +379,7 @@ Index: png.h
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
@@ -774,6 +796,10 @@
@@ -776,6 +798,10 @@
#define PNG_INFO_sPLT 0x2000U /* ESR, 1.0.6 */
#define PNG_INFO_sCAL 0x4000U /* ESR, 1.0.6 */
#define PNG_INFO_IDAT 0x8000U /* ESR, 1.0.6 */
Expand All @@ -390,7 +390,7 @@ Index: png.h

/* This is used for the transformation routines, as some of them
* change these values for the row. It also should enable using
@@ -811,6 +837,10 @@
@@ -813,6 +839,10 @@
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop));
typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop));
Expand All @@ -401,7 +401,7 @@ Index: png.h

/* The following callback receives png_uint_32 row_number, int pass for the
* png_bytep data of the row. When transforming an interlaced image the
@@ -3240,6 +3270,75 @@
@@ -3245,6 +3275,75 @@
* END OF HARDWARE AND SOFTWARE OPTIONS
******************************************************************************/

Expand Down Expand Up @@ -477,7 +477,7 @@ Index: png.h
/* Maintainer: Put new public prototypes here ^, in libpng.3, in project
* defs, and in scripts/symbols.def.
*/
@@ -3248,7 +3347,11 @@
@@ -3253,7 +3352,11 @@
* one to use is one more than this.)
*/
#ifdef PNG_EXPORT_LAST_ORDINAL
Expand All @@ -493,7 +493,7 @@ Index: pngpriv.h
===================================================================
--- pngpriv.h
+++ pngpriv.h
@@ -567,6 +567,10 @@
@@ -616,6 +616,10 @@
#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000U /* Have another chunk after IDAT */
/* 0x4000U (unused) */
#define PNG_IS_READ_STRUCT 0x8000U /* Else is a write struct */
Expand All @@ -504,7 +504,7 @@ Index: pngpriv.h

/* Flags for the transformations the PNG library does on the image data */
#define PNG_BGR 0x0001U
@@ -802,6 +806,16 @@
@@ -851,6 +855,16 @@
#define png_tRNS PNG_U32(116, 82, 78, 83)
#define png_zTXt PNG_U32(122, 84, 88, 116)

Expand All @@ -521,7 +521,7 @@ Index: pngpriv.h
/* The following will work on (signed char*) strings, whereas the get_uint_32
* macro will fail on top-bit-set values because of the sign extension.
*/
@@ -1508,6 +1522,49 @@
@@ -1589,6 +1603,49 @@

#endif /* PROGRESSIVE_READ */

Expand Down Expand Up @@ -1432,7 +1432,7 @@ Index: pngwutil.c
===================================================================
--- pngwutil.c
+++ pngwutil.c
@@ -817,6 +817,11 @@
@@ -822,6 +822,11 @@
/* Write the chunk */
png_write_complete_chunk(png_ptr, png_IHDR, buf, (png_size_t)13);

Expand All @@ -1444,7 +1444,7 @@ Index: pngwutil.c
if ((png_ptr->do_filter) == PNG_NO_FILTERS)
{
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE ||
@@ -998,7 +1003,15 @@
@@ -1003,7 +1008,15 @@
optimize_cmf(data, png_image_size(png_ptr));
#endif

Expand All @@ -1460,7 +1460,7 @@ Index: pngwutil.c
png_ptr->mode |= PNG_HAVE_IDAT;

png_ptr->zstream.next_out = data;
@@ -1044,7 +1057,15 @@
@@ -1049,7 +1062,15 @@
optimize_cmf(data, png_image_size(png_ptr));
#endif

Expand All @@ -1476,7 +1476,7 @@ Index: pngwutil.c
png_ptr->zstream.avail_out = 0;
png_ptr->zstream.next_out = NULL;
png_ptr->mode |= PNG_HAVE_IDAT | PNG_AFTER_IDAT;
@@ -1858,6 +1879,82 @@
@@ -1863,6 +1884,82 @@
}
#endif

Expand Down Expand Up @@ -1559,7 +1559,7 @@ Index: pngwutil.c
/* Initializes the row writing capability of libpng */
void /* PRIVATE */
png_write_start_row(png_structrp png_ptr)
@@ -2752,4 +2849,39 @@
@@ -2757,4 +2854,39 @@
}
#endif /* WRITE_FLUSH */
}
Expand Down
Loading

0 comments on commit 1ee383e

Please sign in to comment.