Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
1f75c67c
Commit
1f75c67c
authored
Jun 04, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14701 from alalek:update_libpng_1.6.37
parents
f355b350
143b3d2b
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
121 additions
and
103 deletions
+121
-103
CHANGES
3rdparty/libpng/CHANGES
+26
-13
LICENSE
3rdparty/libpng/LICENSE
+4
-4
README
3rdparty/libpng/README
+2
-2
palette_neon_intrinsics.c
3rdparty/libpng/arm/palette_neon_intrinsics.c
+16
-16
png.c
3rdparty/libpng/png.c
+5
-6
png.h
3rdparty/libpng/png.h
+17
-17
pngconf.h
3rdparty/libpng/pngconf.h
+3
-3
pnglibconf.h
3rdparty/libpng/pnglibconf.h
+2
-2
pngpriv.h
3rdparty/libpng/pngpriv.h
+5
-5
pngread.c
3rdparty/libpng/pngread.c
+7
-1
pngrtran.c
3rdparty/libpng/pngrtran.c
+26
-24
pngstruct.h
3rdparty/libpng/pngstruct.h
+7
-5
pngwrite.c
3rdparty/libpng/pngwrite.c
+1
-5
No files found.
3rdparty/libpng/CHANGES
View file @
1f75c67c
...
@@ -6066,31 +6066,44 @@ Version 1.6.35 [July 15, 2018]
...
@@ -6066,31 +6066,44 @@ Version 1.6.35 [July 15, 2018]
Version 1.6.36 [December 1, 2018]
Version 1.6.36 [December 1, 2018]
Optimized png_do_expand_palette for ARM processors.
Optimized png_do_expand_palette for ARM processors.
Improved performance by around 10-22% on a recent ARM Chromebook.
Improved performance by around 10-22% on a recent ARM Chromebook.
(Contributed by Richard Townsend, ARM Holdings)
(Contributed by Richard Townsend, ARM Holdings)
Fixed manipulation of machine-specific optimization options.
Fixed manipulation of machine-specific optimization options.
(Contributed by Vicki Pfau)
(Contributed by Vicki Pfau)
Used memcpy instead of manual pointer arithmetic on Intel SSE2.
Used memcpy instead of manual pointer arithmetic on Intel SSE2.
(Contributed by Samuel Williams)
(Contributed by Samuel Williams)
Fixed build errors with MSVC on ARM64.
Fixed build errors with MSVC on ARM64.
(Contributed by Zhijie Liang)
(Contributed by Zhijie Liang)
Fixed detection of libm in CMakeLists.
Fixed detection of libm in CMakeLists.
(Contributed by Cameron Cawley)
(Contributed by Cameron Cawley)
Fixed incorrect creation of pkg-config file in CMakeLists.
Fixed incorrect creation of pkg-config file in CMakeLists.
(Contributed by Kyle Bentley)
(Contributed by Kyle Bentley)
Fixed the CMake build on Windows MSYS by avoiding symlinks.
Fixed the CMake build on Windows MSYS by avoiding symlinks.
Fixed a build warning on OpenBSD.
Fixed a build warning on OpenBSD.
(Contributed by Theo Buehler)
(Contributed by Theo Buehler)
Fixed various typos in comments.
Fixed various typos in comments.
(Contributed by "luz.paz")
(Contributed by "luz.paz")
Raised the minimum required CMake version from 3.0.2 to 3.1.
Raised the minimum required CMake version from 3.0.2 to 3.1.
Removed yet more of the vestigial support for pre-ANSI C compilers.
Removed yet more of the vestigial support for pre-ANSI C compilers.
Removed ancient makefiles for ancient systems that have been broken
Removed ancient makefiles for ancient systems that have been broken
across all previous libpng-1.6.x versions.
across all previous libpng-1.6.x versions.
Removed the Y2K compliance statement and the export control
Removed the Y2K compliance statement and the export control
information.
information.
Applied various code style and documentation fixes.
Applied various code style and documentation fixes.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
Version 1.6.37 [April 14, 2019]
(subscription required; visit
Fixed a use-after-free vulnerability (CVE-2019-7317) in png_image_free.
Fixed a memory leak in the ARM NEON implementation of png_do_expand_palette.
Fixed a memory leak in pngtest.c.
Fixed two vulnerabilities (CVE-2018-14048, CVE-2018-14550) in
contrib/pngminus; refactor.
Changed the license of contrib/pngminus to MIT; refresh makefile and docs.
(Contributed by Willem van Schaik)
Fixed a typo in the libpng license v2.
(Contributed by Miguel Ojeda)
Added makefiles for AddressSanitizer-enabled builds.
Cleaned up various makefiles.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
Subscription is required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe
)
.
to subscribe.
3rdparty/libpng/LICENSE
View file @
1f75c67c
...
@@ -4,8 +4,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
...
@@ -4,8 +4,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
PNG Reference Library License version 2
PNG Reference Library License version 2
---------------------------------------
---------------------------------------
* Copyright (c) 1995-201
8
The PNG Reference Library Authors.
* Copyright (c) 1995-201
9
The PNG Reference Library Authors.
* Copyright (c) 2018 Cosmin Truta.
* Copyright (c) 2018
-2019
Cosmin Truta.
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
* Copyright (c) 1996-1997 Andreas Dilger.
* Copyright (c) 1996-1997 Andreas Dilger.
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
@@ -13,7 +13,7 @@ PNG Reference Library License version 2
...
@@ -13,7 +13,7 @@ PNG Reference Library License version 2
The software is supplied "as is", without warranty of any kind,
The software is supplied "as is", without warranty of any kind,
express or implied, including, without limitation, the warranties
express or implied, including, without limitation, the warranties
of merchantability, fitness for a particular purpose, title, and
of merchantability, fitness for a particular purpose, title, and
non-infringement. In no even shall the Copyright owners, or
non-infringement. In no even
t
shall the Copyright owners, or
anyone distributing the software, be liable for any damages or
anyone distributing the software, be liable for any damages or
other liability, whether in contract, tort or otherwise, arising
other liability, whether in contract, tort or otherwise, arising
from, out of, or in connection with the software, or the use or
from, out of, or in connection with the software, or the use or
...
@@ -39,7 +39,7 @@ subject to the following restrictions:
...
@@ -39,7 +39,7 @@ subject to the following restrictions:
PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
-----------------------------------------------------------------------
-----------------------------------------------------------------------
libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
libpng versions 1.0.7, July 1, 2000
,
through 1.6.35, July 15, 2018 are
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
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
disclaimer and license as libpng-1.0.6 with the following individuals
...
...
3rdparty/libpng/README
View file @
1f75c67c
README for libpng version 1.6.3
6 - December 1, 2018
README for libpng version 1.6.3
7 - April 14, 2019
=================================================
==
=================================================
See the note about version numbers near the top of png.h.
See the note about version numbers near the top of png.h.
See INSTALL for instructions on how to install libpng.
See INSTALL for instructions on how to install libpng.
...
...
3rdparty/libpng/arm/palette_neon_intrinsics.c
View file @
1f75c67c
/* palette_neon_intrinsics.c - NEON optimised palette expansion functions
/* palette_neon_intrinsics.c - NEON optimised palette expansion functions
*
*
* Copyright (c) 2018 Cosmin Truta
* Copyright (c) 2018
-2019
Cosmin Truta
* Copyright (c) 2017-2018 Arm Holdings. All rights reserved.
* Copyright (c) 2017-2018 Arm Holdings. All rights reserved.
* Written by Richard Townsend <Richard.Townsend@arm.com>, February 2017.
* Written by Richard Townsend <Richard.Townsend@arm.com>, February 2017.
*
*
...
@@ -20,9 +20,9 @@
...
@@ -20,9 +20,9 @@
# include <arm_neon.h>
# include <arm_neon.h>
#endif
#endif
/* Build an RGBA
palette from the RGB and separate
alpha palettes. */
/* Build an RGBA
8 palette from the separate RGB and
alpha palettes. */
void
void
png_riffle_palette_
rgba
(
png_structrp
png_ptr
,
png_row_infop
row_info
)
png_riffle_palette_
neon
(
png_structrp
png_ptr
)
{
{
png_const_colorp
palette
=
png_ptr
->
palette
;
png_const_colorp
palette
=
png_ptr
->
palette
;
png_bytep
riffled_palette
=
png_ptr
->
riffled_palette
;
png_bytep
riffled_palette
=
png_ptr
->
riffled_palette
;
...
@@ -30,6 +30,8 @@ png_riffle_palette_rgba(png_structrp png_ptr, png_row_infop row_info)
...
@@ -30,6 +30,8 @@ png_riffle_palette_rgba(png_structrp png_ptr, png_row_infop row_info)
int
num_trans
=
png_ptr
->
num_trans
;
int
num_trans
=
png_ptr
->
num_trans
;
int
i
;
int
i
;
png_debug
(
1
,
"in png_riffle_palette_neon"
);
/* Initially black, opaque. */
/* Initially black, opaque. */
uint8x16x4_t
w
=
{{
uint8x16x4_t
w
=
{{
vdupq_n_u8
(
0x00
),
vdupq_n_u8
(
0x00
),
...
@@ -38,16 +40,10 @@ png_riffle_palette_rgba(png_structrp png_ptr, png_row_infop row_info)
...
@@ -38,16 +40,10 @@ png_riffle_palette_rgba(png_structrp png_ptr, png_row_infop row_info)
vdupq_n_u8
(
0xff
),
vdupq_n_u8
(
0xff
),
}};
}};
if
(
row_info
->
bit_depth
!=
8
)
/* First, riffle the RGB colours into an RGBA8 palette.
{
* The alpha component is set to opaque for now.
png_error
(
png_ptr
,
"bit_depth must be 8 for png_riffle_palette_rgba"
);
return
;
}
/* First, riffle the RGB colours into a RGBA palette, the A value is
* set to opaque for now.
*/
*/
for
(
i
=
0
;
i
<
(
1
<<
row_info
->
bit_depth
)
;
i
+=
16
)
for
(
i
=
0
;
i
<
256
;
i
+=
16
)
{
{
uint8x16x3_t
v
=
vld3q_u8
((
png_const_bytep
)(
palette
+
i
));
uint8x16x3_t
v
=
vld3q_u8
((
png_const_bytep
)(
palette
+
i
));
w
.
val
[
0
]
=
v
.
val
[
0
];
w
.
val
[
0
]
=
v
.
val
[
0
];
...
@@ -61,9 +57,9 @@ png_riffle_palette_rgba(png_structrp png_ptr, png_row_infop row_info)
...
@@ -61,9 +57,9 @@ png_riffle_palette_rgba(png_structrp png_ptr, png_row_infop row_info)
riffled_palette
[(
i
<<
2
)
+
3
]
=
trans_alpha
[
i
];
riffled_palette
[(
i
<<
2
)
+
3
]
=
trans_alpha
[
i
];
}
}
/* Expands a palettized row into RGBA. */
/* Expands a palettized row into RGBA
8
. */
int
int
png_do_expand_palette_
neon_rgba
(
png_structrp
png_ptr
,
png_row_infop
row_info
,
png_do_expand_palette_
rgba8_neon
(
png_structrp
png_ptr
,
png_row_infop
row_info
,
png_const_bytep
row
,
png_bytepp
ssp
,
png_bytepp
ddp
)
png_const_bytep
row
,
png_bytepp
ssp
,
png_bytepp
ddp
)
{
{
png_uint_32
row_width
=
row_info
->
width
;
png_uint_32
row_width
=
row_info
->
width
;
...
@@ -72,6 +68,8 @@ png_do_expand_palette_neon_rgba(png_structrp png_ptr, png_row_infop row_info,
...
@@ -72,6 +68,8 @@ png_do_expand_palette_neon_rgba(png_structrp png_ptr, png_row_infop row_info,
const
png_int_32
pixels_per_chunk
=
4
;
const
png_int_32
pixels_per_chunk
=
4
;
int
i
;
int
i
;
png_debug
(
1
,
"in png_do_expand_palette_rgba8_neon"
);
if
(
row_width
<
pixels_per_chunk
)
if
(
row_width
<
pixels_per_chunk
)
return
0
;
return
0
;
...
@@ -103,9 +101,9 @@ png_do_expand_palette_neon_rgba(png_structrp png_ptr, png_row_infop row_info,
...
@@ -103,9 +101,9 @@ png_do_expand_palette_neon_rgba(png_structrp png_ptr, png_row_infop row_info,
return
i
;
return
i
;
}
}
/* Expands a palettized row into RGB
format
. */
/* Expands a palettized row into RGB
8
. */
int
int
png_do_expand_palette_
neon_rgb
(
png_structrp
png_ptr
,
png_row_infop
row_info
,
png_do_expand_palette_
rgb8_neon
(
png_structrp
png_ptr
,
png_row_infop
row_info
,
png_const_bytep
row
,
png_bytepp
ssp
,
png_bytepp
ddp
)
png_const_bytep
row
,
png_bytepp
ssp
,
png_bytepp
ddp
)
{
{
png_uint_32
row_width
=
row_info
->
width
;
png_uint_32
row_width
=
row_info
->
width
;
...
@@ -113,6 +111,8 @@ png_do_expand_palette_neon_rgb(png_structrp png_ptr, png_row_infop row_info,
...
@@ -113,6 +111,8 @@ png_do_expand_palette_neon_rgb(png_structrp png_ptr, png_row_infop row_info,
const
png_uint_32
pixels_per_chunk
=
8
;
const
png_uint_32
pixels_per_chunk
=
8
;
int
i
;
int
i
;
png_debug
(
1
,
"in png_do_expand_palette_rgb8_neon"
);
if
(
row_width
<=
pixels_per_chunk
)
if
(
row_width
<=
pixels_per_chunk
)
return
0
;
return
0
;
...
...
3rdparty/libpng/png.c
View file @
1f75c67c
/* png.c - location for general purpose libpng functions
/* png.c - location for general purpose libpng functions
*
*
* Copyright (c) 2018 Cosmin Truta
* Copyright (c) 2018
-2019
Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
#include "pngpriv.h"
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
/* Generate a compiler error if there is an old png.h in the search path. */
typedef
png_libpng_version_1_6_3
6
Your_png_h_is_not_version_1_6_36
;
typedef
png_libpng_version_1_6_3
7
Your_png_h_is_not_version_1_6_37
;
#ifdef __GNUC__
#ifdef __GNUC__
/* The version tests may need to be added to, but the problem warning has
/* The version tests may need to be added to, but the problem warning has
...
@@ -815,8 +815,8 @@ png_get_copyright(png_const_structrp png_ptr)
...
@@ -815,8 +815,8 @@ png_get_copyright(png_const_structrp png_ptr)
return
PNG_STRING_COPYRIGHT
return
PNG_STRING_COPYRIGHT
#else
#else
return
PNG_STRING_NEWLINE
\
return
PNG_STRING_NEWLINE
\
"libpng version 1.6.3
6
"
PNG_STRING_NEWLINE
\
"libpng version 1.6.3
7
"
PNG_STRING_NEWLINE
\
"Copyright (c) 2018 Cosmin Truta"
PNG_STRING_NEWLINE
\
"Copyright (c) 2018
-2019
Cosmin Truta"
PNG_STRING_NEWLINE
\
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson"
\
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson"
\
PNG_STRING_NEWLINE
\
PNG_STRING_NEWLINE
\
"Copyright (c) 1996-1997 Andreas Dilger"
PNG_STRING_NEWLINE
\
"Copyright (c) 1996-1997 Andreas Dilger"
PNG_STRING_NEWLINE
\
...
@@ -4588,8 +4588,7 @@ png_image_free(png_imagep image)
...
@@ -4588,8 +4588,7 @@ png_image_free(png_imagep image)
if
(
image
!=
NULL
&&
image
->
opaque
!=
NULL
&&
if
(
image
!=
NULL
&&
image
->
opaque
!=
NULL
&&
image
->
opaque
->
error_buf
==
NULL
)
image
->
opaque
->
error_buf
==
NULL
)
{
{
/* Ignore errors here: */
png_image_free_function
(
image
);
(
void
)
png_safe_execute
(
image
,
png_image_free_function
,
image
);
image
->
opaque
=
NULL
;
image
->
opaque
=
NULL
;
}
}
}
}
...
...
3rdparty/libpng/png.h
View file @
1f75c67c
/* png.h - header file for PNG reference library
/* png.h - header file for PNG reference library
*
*
* libpng version 1.6.3
6 - December 1, 2018
* libpng version 1.6.3
7 - April 14, 2019
*
*
* Copyright (c) 2018 Cosmin Truta
* Copyright (c) 2018
-2019
Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
@@ -14,8 +14,9 @@
...
@@ -14,8 +14,9 @@
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.6.35, July 2018:
* libpng versions 0.97, January 1998, through 1.6.35, July 2018:
* Glenn Randers-Pehrson.
* Glenn Randers-Pehrson
* libpng version 1.6.36, December 1, 2018: Cosmin Truta
* libpng versions 1.6.36, December 2018, through 1.6.37, April 2019:
* Cosmin Truta
* See also "Contributing Authors", below.
* See also "Contributing Authors", below.
*/
*/
...
@@ -26,8 +27,8 @@
...
@@ -26,8 +27,8 @@
* PNG Reference Library License version 2
* PNG Reference Library License version 2
* ---------------------------------------
* ---------------------------------------
*
*
* * Copyright (c) 1995-201
8
The PNG Reference Library Authors.
* * Copyright (c) 1995-201
9
The PNG Reference Library Authors.
* * Copyright (c) 2018 Cosmin Truta.
* * Copyright (c) 2018
-2019
Cosmin Truta.
* * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
* * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
* * Copyright (c) 1996-1997 Andreas Dilger.
* * Copyright (c) 1996-1997 Andreas Dilger.
* * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
* * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
@@ -35,7 +36,7 @@
...
@@ -35,7 +36,7 @@
* The software is supplied "as is", without warranty of any kind,
* The software is supplied "as is", without warranty of any kind,
* express or implied, including, without limitation, the warranties
* express or implied, including, without limitation, the warranties
* of merchantability, fitness for a particular purpose, title, and
* of merchantability, fitness for a particular purpose, title, and
* non-infringement. In no even shall the Copyright owners, or
* non-infringement. In no even
t
shall the Copyright owners, or
* anyone distributing the software, be liable for any damages or
* anyone distributing the software, be liable for any damages or
* other liability, whether in contract, tort or otherwise, arising
* other liability, whether in contract, tort or otherwise, arising
* from, out of, or in connection with the software, or the use or
* from, out of, or in connection with the software, or the use or
...
@@ -61,7 +62,7 @@
...
@@ -61,7 +62,7 @@
* PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
* PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
* -----------------------------------------------------------------------
* -----------------------------------------------------------------------
*
*
* libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
* libpng versions 1.0.7, July 1, 2000
,
through 1.6.35, July 15, 2018 are
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
* derived from libpng-1.0.6, and are distributed according to the same
* 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
* disclaimer and license as libpng-1.0.6 with the following individuals
...
@@ -238,7 +239,7 @@
...
@@ -238,7 +239,7 @@
* ...
* ...
* 1.5.30 15 10530 15.so.15.30[.0]
* 1.5.30 15 10530 15.so.15.30[.0]
* ...
* ...
* 1.6.3
6 16 10636 16.so.16.36
[.0]
* 1.6.3
7 16 10637 16.so.16.37
[.0]
*
*
* Henceforth the source version will match the shared-library major and
* Henceforth the source version will match the shared-library major and
* minor numbers; the shared-library major version number will be used for
* minor numbers; the shared-library major version number will be used for
...
@@ -277,8 +278,8 @@
...
@@ -277,8 +278,8 @@
*/
*/
/* Version information for png.h - this should match the version in png.c */
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.6.3
6
"
#define PNG_LIBPNG_VER_STRING "1.6.3
7
"
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.3
6 - December 1, 2018
\n"
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.3
7 - April 14, 2019
\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
...
@@ -286,12 +287,11 @@
...
@@ -286,12 +287,11 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 6
#define PNG_LIBPNG_VER_MINOR 6
#define PNG_LIBPNG_VER_RELEASE 3
6
#define PNG_LIBPNG_VER_RELEASE 3
7
/* This should
match the numeric part of the final component of
/* This should
be zero for a public release, or non-zero for a
*
PNG_LIBPNG_VER_STRING, omitting any leading zero:
*
development version. [Deprecated]
*/
*/
#define PNG_LIBPNG_VER_BUILD 0
#define PNG_LIBPNG_VER_BUILD 0
/* Release Status */
/* Release Status */
...
@@ -318,7 +318,7 @@
...
@@ -318,7 +318,7 @@
* From version 1.0.1 it is:
* From version 1.0.1 it is:
* XXYYZZ, where XX=major, YY=minor, ZZ=release
* XXYYZZ, where XX=major, YY=minor, ZZ=release
*/
*/
#define PNG_LIBPNG_VER 1063
6
/* 1.6.36
*/
#define PNG_LIBPNG_VER 1063
7
/* 1.6.37
*/
/* Library configuration: these options cannot be changed after
/* Library configuration: these options cannot be changed after
* the library has been built.
* the library has been built.
...
@@ -428,7 +428,7 @@ extern "C" {
...
@@ -428,7 +428,7 @@ extern "C" {
/* This triggers a compiler error in png.c, if png.c and png.h
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
* do not agree upon the version number.
*/
*/
typedef
char
*
png_libpng_version_1_6_3
6
;
typedef
char
*
png_libpng_version_1_6_3
7
;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*
*
...
...
3rdparty/libpng/pngconf.h
View file @
1f75c67c
/* pngconf.h - machine
configurable file for libpng
/* pngconf.h - machine
-
configurable file for libpng
*
*
* libpng version 1.6.3
6
* libpng version 1.6.3
7
*
*
* Copyright (c) 2018 Cosmin Truta
* Copyright (c) 2018
-2019
Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
...
3rdparty/libpng/pnglibconf.h
View file @
1f75c67c
/* pnglibconf.h - library build configuration */
/* pnglibconf.h - library build configuration */
/* libpng version 1.6.3
6
*/
/* libpng version 1.6.3
7
*/
/* Copyright (c) 2018 Cosmin Truta */
/* Copyright (c) 2018
-2019
Cosmin Truta */
/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */
/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */
/* This code is released under the libpng license. */
/* This code is released under the libpng license. */
...
...
3rdparty/libpng/pngpriv.h
View file @
1f75c67c
/* pngpriv.h - private declarations for use inside libpng
/* pngpriv.h - private declarations for use inside libpng
*
*
* Copyright (c) 2018 Cosmin Truta
* Copyright (c) 2018
-2019
Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
@@ -2119,11 +2119,11 @@ PNG_INTERNAL_FUNCTION(png_uint_32, png_check_keyword, (png_structrp png_ptr,
...
@@ -2119,11 +2119,11 @@ PNG_INTERNAL_FUNCTION(png_uint_32, png_check_keyword, (png_structrp png_ptr,
#if PNG_ARM_NEON_IMPLEMENTATION == 1
#if PNG_ARM_NEON_IMPLEMENTATION == 1
PNG_INTERNAL_FUNCTION
(
void
,
PNG_INTERNAL_FUNCTION
(
void
,
png_riffle_palette_
rgba
,
png_riffle_palette_
neon
,
(
png_structrp
,
png_row_infop
),
(
png_structrp
),
PNG_EMPTY
);
PNG_EMPTY
);
PNG_INTERNAL_FUNCTION
(
int
,
PNG_INTERNAL_FUNCTION
(
int
,
png_do_expand_palette_
neon_rgba
,
png_do_expand_palette_
rgba8_neon
,
(
png_structrp
,
(
png_structrp
,
png_row_infop
,
png_row_infop
,
png_const_bytep
,
png_const_bytep
,
...
@@ -2131,7 +2131,7 @@ PNG_INTERNAL_FUNCTION(int,
...
@@ -2131,7 +2131,7 @@ PNG_INTERNAL_FUNCTION(int,
const
png_bytepp
),
const
png_bytepp
),
PNG_EMPTY
);
PNG_EMPTY
);
PNG_INTERNAL_FUNCTION
(
int
,
PNG_INTERNAL_FUNCTION
(
int
,
png_do_expand_palette_
neon_rgb
,
png_do_expand_palette_
rgb8_neon
,
(
png_structrp
,
(
png_structrp
,
png_row_infop
,
png_row_infop
,
png_const_bytep
,
png_const_bytep
,
...
...
3rdparty/libpng/pngread.c
View file @
1f75c67c
/* pngread.c - read a PNG file
/* pngread.c - read a PNG file
*
*
* Copyright (c) 2018 Cosmin Truta
* Copyright (c) 2018
-2019
Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
@@ -994,6 +994,12 @@ png_read_destroy(png_structrp png_ptr)
...
@@ -994,6 +994,12 @@ png_read_destroy(png_structrp png_ptr)
png_ptr
->
chunk_list
=
NULL
;
png_ptr
->
chunk_list
=
NULL
;
#endif
#endif
#if defined(PNG_READ_EXPAND_SUPPORTED) && \
defined(PNG_ARM_NEON_IMPLEMENTATION)
png_free
(
png_ptr
,
png_ptr
->
riffled_palette
);
png_ptr
->
riffled_palette
=
NULL
;
#endif
/* NOTE: the 'setjmp' buffer may still be allocated and the memory and error
/* NOTE: the 'setjmp' buffer may still be allocated and the memory and error
* callbacks are still set at this point. They are required to complete the
* callbacks are still set at this point. They are required to complete the
* destruction of the png_struct itself.
* destruction of the png_struct itself.
...
...
3rdparty/libpng/pngrtran.c
View file @
1f75c67c
/* pngrtran.c - transforms the data in a row for PNG readers
/* pngrtran.c - transforms the data in a row for PNG readers
*
*
* Copyright (c) 2018 Cosmin Truta
* Copyright (c) 2018
-2019
Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
@@ -1182,20 +1182,20 @@ png_init_palette_transformations(png_structrp png_ptr)
...
@@ -1182,20 +1182,20 @@ png_init_palette_transformations(png_structrp png_ptr)
png_ptr
->
palette
[
png_ptr
->
background
.
index
].
blue
;
png_ptr
->
palette
[
png_ptr
->
background
.
index
].
blue
;
#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
if
((
png_ptr
->
transformations
&
PNG_INVERT_ALPHA
)
!=
0
)
if
((
png_ptr
->
transformations
&
PNG_INVERT_ALPHA
)
!=
0
)
{
{
if
((
png_ptr
->
transformations
&
PNG_EXPAND_tRNS
)
==
0
)
if
((
png_ptr
->
transformations
&
PNG_EXPAND_tRNS
)
==
0
)
{
{
/* Invert the alpha channel (in tRNS) unless the pixels are
/* Invert the alpha channel (in tRNS) unless the pixels are
* going to be expanded, in which case leave it for later
* going to be expanded, in which case leave it for later
*/
*/
int
i
,
istop
=
png_ptr
->
num_trans
;
int
i
,
istop
=
png_ptr
->
num_trans
;
for
(
i
=
0
;
i
<
istop
;
i
++
)
for
(
i
=
0
;
i
<
istop
;
i
++
)
png_ptr
->
trans_alpha
[
i
]
=
(
png_byte
)(
255
-
png_ptr
->
trans_alpha
[
i
]
=
png_ptr
->
trans_alpha
[
i
]);
(
png_byte
)(
255
-
png_ptr
->
trans_alpha
[
i
]);
}
}
}
}
#endif
/* READ_INVERT_ALPHA */
#endif
/* READ_INVERT_ALPHA */
}
}
}
/* background expand and (therefore) no alpha association. */
}
/* background expand and (therefore) no alpha association. */
...
@@ -4320,9 +4320,11 @@ png_do_expand_palette(png_structrp png_ptr, png_row_infop row_info,
...
@@ -4320,9 +4320,11 @@ png_do_expand_palette(png_structrp png_ptr, png_row_infop row_info,
* but sometimes row_info->bit_depth has been changed to 8.
* but sometimes row_info->bit_depth has been changed to 8.
* In these cases, the palette hasn't been riffled.
* In these cases, the palette hasn't been riffled.
*/
*/
i
=
png_do_expand_palette_
neon_rgba
(
png_ptr
,
row_info
,
row
,
i
=
png_do_expand_palette_
rgba8_neon
(
png_ptr
,
row_info
,
row
,
&
sp
,
&
dp
);
&
sp
,
&
dp
);
}
}
#else
PNG_UNUSED
(
png_ptr
)
#endif
#endif
for
(;
i
<
row_width
;
i
++
)
for
(;
i
<
row_width
;
i
++
)
...
@@ -4349,8 +4351,10 @@ png_do_expand_palette(png_structrp png_ptr, png_row_infop row_info,
...
@@ -4349,8 +4351,10 @@ png_do_expand_palette(png_structrp png_ptr, png_row_infop row_info,
dp
=
row
+
(
size_t
)(
row_width
*
3
)
-
1
;
dp
=
row
+
(
size_t
)(
row_width
*
3
)
-
1
;
i
=
0
;
i
=
0
;
#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
i
=
png_do_expand_palette_
neon_rgb
(
png_ptr
,
row_info
,
row
,
i
=
png_do_expand_palette_
rgb8_neon
(
png_ptr
,
row_info
,
row
,
&
sp
,
&
dp
);
&
sp
,
&
dp
);
#else
PNG_UNUSED
(
png_ptr
)
#endif
#endif
for
(;
i
<
row_width
;
i
++
)
for
(;
i
<
row_width
;
i
++
)
...
@@ -4770,19 +4774,17 @@ png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
...
@@ -4770,19 +4774,17 @@ png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
if
((
png_ptr
->
num_trans
>
0
)
&&
(
png_ptr
->
bit_depth
==
8
))
if
((
png_ptr
->
num_trans
>
0
)
&&
(
png_ptr
->
bit_depth
==
8
))
{
{
/* Allocate space for the decompressed full palette. */
if
(
png_ptr
->
riffled_palette
==
NULL
)
if
(
png_ptr
->
riffled_palette
==
NULL
)
{
{
png_ptr
->
riffled_palette
=
png_malloc
(
png_ptr
,
256
*
4
);
/* Initialize the accelerated palette expansion. */
if
(
png_ptr
->
riffled_palette
==
NULL
)
png_ptr
->
riffled_palette
=
png_error
(
png_ptr
,
"NULL row buffer"
);
(
png_bytep
)
png_malloc
(
png_ptr
,
256
*
4
);
/* Build the RGBA palette. */
png_riffle_palette_neon
(
png_ptr
);
png_riffle_palette_rgba
(
png_ptr
,
row_info
);
}
}
}
}
#endif
#endif
png_do_expand_palette
(
png_ptr
,
row_info
,
png_ptr
->
row_buf
+
1
,
png_do_expand_palette
(
png_ptr
,
row_info
,
png_ptr
->
row_buf
+
1
,
png_ptr
->
palette
,
png_ptr
->
trans_alpha
,
png_ptr
->
num_trans
);
png_ptr
->
palette
,
png_ptr
->
trans_alpha
,
png_ptr
->
num_trans
);
}
}
else
else
...
...
3rdparty/libpng/pngstruct.h
View file @
1f75c67c
/* pngstruct.h - header file for PNG reference library
/* pngstruct.h - header file for PNG reference library
*
*
* Copyright (c) 2018 Cosmin Truta
* Copyright (c) 2018
-2019
Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
@@ -228,10 +228,6 @@ struct png_struct_def
...
@@ -228,10 +228,6 @@ struct png_struct_def
* big_row_buf; while writing it is separately
* big_row_buf; while writing it is separately
* allocated.
* allocated.
*/
*/
#ifdef PNG_READ_EXPAND_SUPPORTED
/* Buffer to accelerate palette transformations. */
png_bytep
riffled_palette
;
#endif
#ifdef PNG_WRITE_FILTER_SUPPORTED
#ifdef PNG_WRITE_FILTER_SUPPORTED
png_bytep
try_row
;
/* buffer to save trial row when filtering */
png_bytep
try_row
;
/* buffer to save trial row when filtering */
png_bytep
tst_row
;
/* buffer to save best trial row when filtering */
png_bytep
tst_row
;
/* buffer to save best trial row when filtering */
...
@@ -396,6 +392,12 @@ struct png_struct_def
...
@@ -396,6 +392,12 @@ struct png_struct_def
/* deleted in 1.5.5: rgb_to_gray_blue_coeff; */
/* deleted in 1.5.5: rgb_to_gray_blue_coeff; */
#endif
#endif
/* New member added in libpng-1.6.36 */
#if defined(PNG_READ_EXPAND_SUPPORTED) && \
defined(PNG_ARM_NEON_IMPLEMENTATION)
png_bytep
riffled_palette
;
/* buffer for accelerated palette expansion */
#endif
/* New member added in libpng-1.0.4 (renamed in 1.0.9) */
/* New member added in libpng-1.0.4 (renamed in 1.0.9) */
#if defined(PNG_MNG_FEATURES_SUPPORTED)
#if defined(PNG_MNG_FEATURES_SUPPORTED)
/* Changed from png_byte to png_uint_32 at version 1.2.0 */
/* Changed from png_byte to png_uint_32 at version 1.2.0 */
...
...
3rdparty/libpng/pngwrite.c
View file @
1f75c67c
/* pngwrite.c - general routines to write a PNG file
/* pngwrite.c - general routines to write a PNG file
*
*
* Copyright (c) 2018 Cosmin Truta
* Copyright (c) 2018
-2019
Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
@@ -948,10 +948,6 @@ png_write_destroy(png_structrp png_ptr)
...
@@ -948,10 +948,6 @@ png_write_destroy(png_structrp png_ptr)
png_free_buffer_list
(
png_ptr
,
&
png_ptr
->
zbuffer_list
);
png_free_buffer_list
(
png_ptr
,
&
png_ptr
->
zbuffer_list
);
png_free
(
png_ptr
,
png_ptr
->
row_buf
);
png_free
(
png_ptr
,
png_ptr
->
row_buf
);
png_ptr
->
row_buf
=
NULL
;
png_ptr
->
row_buf
=
NULL
;
#ifdef PNG_READ_EXPANDED_SUPPORTED
png_free
(
png_ptr
,
png_ptr
->
riffled_palette
);
png_ptr
->
riffled_palette
=
NULL
;
#endif
#ifdef PNG_WRITE_FILTER_SUPPORTED
#ifdef PNG_WRITE_FILTER_SUPPORTED
png_free
(
png_ptr
,
png_ptr
->
prev_row
);
png_free
(
png_ptr
,
png_ptr
->
prev_row
);
png_free
(
png_ptr
,
png_ptr
->
try_row
);
png_free
(
png_ptr
,
png_ptr
->
try_row
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment