Commit 54f2ab10 authored by mercury233's avatar mercury233 Committed by GitHub

upgrade libpng to 1.6.54, add arm neon files (#18)

parent 5597cf38
...@@ -1265,6 +1265,7 @@ ...@@ -1265,6 +1265,7 @@
<Unit filename="libpng/pngset.c"> <Unit filename="libpng/pngset.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
</Unit> </Unit>
<Unit filename="libpng/pngstruct.h" />
<Unit filename="libpng/pngtrans.c"> <Unit filename="libpng/pngtrans.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
</Unit> </Unit>
......
libpng 1.6.47 - February 18, 2025 libpng 1.6.54 - January 12, 2026
================================= ================================
This is a public release of libpng, intended for use in production code. This is a public release of libpng, intended for use in production code.
Files available for download Files available for download
---------------------------- ----------------------------
Source files with LF line endings (for Unix/Linux): Source files:
* libpng-1.6.47.tar.xz (LZMA-compressed, recommended) * libpng-1.6.54.tar.xz (LZMA-compressed, recommended)
* libpng-1.6.47.tar.gz (deflate-compressed) * libpng-1.6.54.tar.gz (deflate-compressed)
* lpng1654.7z (LZMA-compressed)
Source files with CRLF line endings (for Windows): * lpng1654.zip (deflate-compressed)
* lpng1647.7z (LZMA-compressed, recommended) Other information:
* lpng1647.zip (deflate-compressed)
* README.md
Other information: * LICENSE.md
* AUTHORS.md
* README.md * TRADEMARK.md
* LICENSE.md
* AUTHORS.md
* TRADEMARK.md Changes from version 1.6.53 to version 1.6.54
---------------------------------------------
Changes from version 1.6.46 to version 1.6.47 * Fixed CVE-2026-22695 (medium severity):
--------------------------------------------- Heap buffer over-read in `png_image_read_direct_scaled.
(Reported and fixed by Petr Simecek.)
* Modified the behaviour of colorspace chunks in order to adhere * Fixed CVE-2026-22801 (medium severity):
to the new precedence rules formulated in the latest draft of Integer truncation causing heap buffer over-read in `png_image_write_*`.
the PNG Specification. * Implemented various improvements in oss-fuzz.
(Contributed by John Bowler) (Contributed by Philippe Antoine.)
* Fixed a latent bug in `png_write_iCCP`.
This would have been a read-beyond-end-of-malloc vulnerability, Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
introduced early in the libpng-1.6.0 development, yet (fortunately!) Subscription is required; visit
it was inaccessible before the above-mentioned modification of the https://lists.sourceforge.net/lists/listinfo/png-mng-implement
colorspace precedence rules, due to pre-existing colorspace checks. to subscribe.
(Reported by Bob Friesenhahn; fixed by John Bowler)
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
to subscribe.
PNG REFERENCE LIBRARY AUTHORS PNG REFERENCE LIBRARY AUTHORS
============================= =============================
This is the list of PNG Reference Library ("libpng") Contributing This is the list of PNG Reference Library ("libpng") Contributing
Authors, for copyright and licensing purposes. Authors, for copyright and licensing purposes.
* Adam Richter * Adam Richter
* Andreas Dilger * Alexander Smorkalov
* Chris Blume * Andreas Dilger
* Cosmin Truta * Chris Blume
* Dave Martindale * Cosmin Truta
* Eric S. Raymond * Dave Martindale
* Gilles Vollant * Eric S. Raymond
* Glenn Randers-Pehrson * Gilles Vollant
* Greg Roelofs * Glenn Randers-Pehrson
* Guy Eric Schalnat * Greg Roelofs
* James Yu * Guy Eric Schalnat
* John Bowler * James Yu
* Kevin Bracey * John Bowler
* Lucas Chollet * Kevin Bracey
* Magnus Holmgren * Lucas Chollet
* Mandar Sahastrabuddhe * Magnus Holmgren
* Mans Rullgard * Mandar Sahastrabuddhe
* Matt Sarett * Manfred Schlaegl
* Mike Klein * Mans Rullgard
* Pascal Massimino * Matt Sarett
* Paul Schmidt * Mike Klein
* Philippe Antoine * Pascal Massimino
* Qiang Zhou * Paul Schmidt
* Sam Bushell * Petr Simecek
* Samuel Williams * Philippe Antoine
* Simon-Pierre Cadieux * Qiang Zhou
* Tim Wegner * Sam Bushell
* Tom Lane * Samuel Williams
* Tom Tanner * Simon-Pierre Cadieux
* Vadim Barkov * Tim Wegner
* Willem van Schaik * Tobias Stoeckmann
* Zhijie Liang * Tom Lane
* Apple Inc. * Tom Tanner
- Zixu Wang (王子旭) * Vadim Barkov
* Arm Holdings * Willem van Schaik
- Richard Townsend * Zhijie Liang
* Google Inc. * Apple Inc.
- Dan Field - Zixu Wang (王子旭)
- Leon Scroggins III * Arm Holdings
- Matt Sarett - Richard Townsend
- Mike Klein * Google LLC
- Sami Boukortt - Dan Field
- Wan-Teh Chang - Dragoș Tiselice
* Loongson Technology Corporation Ltd. - Leon Scroggins III
- GuXiWei (顾希伟) - Matt Sarett
- JinBo (金波) - Mike Klein
- ZhangLixia (张利霞) - Sami Boukortt
- Wan-Teh Chang
The build projects, the build scripts, the test scripts, and other * Loongson Technology Corporation Ltd.
files in the "projects", "scripts" and "tests" directories, have - GuXiWei (顾希伟)
other copyright owners, but are released under the libpng license. - JinBo (金波)
- ZhangLixia (张利霞)
Some files in the "ci" and "contrib" directories, as well as some * Samsung Group
of the tools-generated files that are distributed with libpng, have - Filip Wasil
other copyright owners, and are released under other open source * SpacemiT Hangzhou Technology, Co.
licenses. - Liang Junzhao (梁俊钊)
The build projects, the build scripts, the test scripts, and other
files in the "projects", "scripts" and "tests" directories, have
other copyright owners, but are released under the libpng license.
Some files in the "ci" and "contrib" directories, as well as some
of the tools-generated files that are distributed with libpng, have
other copyright owners, and are released under other open source
licenses.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
TODO list for libpng TODO list for libpng
-------------------- --------------------
* Fix all defects (duh!) * Fix all defects (duh!)
* cHRM transformation. * cHRM transformation.
* Palette creation. * Palette creation.
* "grayscale->palette" transformation and "palette->grayscale" detection. * "grayscale->palette" transformation and "palette->grayscale" detection.
* Improved dithering. * Improved dithering.
* Multi-lingual error and warning message support. * Multi-lingual error and warning message support.
* Complete sRGB transformation. (Currently it simply uses gamma=0.45455.) * Complete sRGB transformation. (Currently it simply uses gamma=0.45455.)
* Man pages for function calls. * Man pages for function calls.
* Better documentation. * Better documentation.
* Better filter selection * Better filter selection
(e.g., counting huffman bits/precompression; filter inertia; filter costs). (e.g., counting huffman bits/precompression; filter inertia; filter costs).
* Histogram creation. * Histogram creation.
* Text conversion between different code pages (e.g., Latin-1 to Mac). * Text conversion between different code pages (e.g., Latin-1 to Mac).
* Avoid building gamma tables whenever possible. * Avoid building gamma tables whenever possible.
* Greater precision in changing to linear gamma for compositing against * Greater precision in changing to linear gamma for compositing against
background, and in doing rgb-to-gray transformations. background, and in doing rgb-to-gray transformations.
* Investigate pre-incremented loop counters and other loop constructions. * Investigate pre-incremented loop counters and other loop constructions.
* Interpolated method of handling interlacing. * Interpolated method of handling interlacing.
* More validations for libpng transformations. * More validations for libpng transformations.
TRADEMARK TRADEMARK
========= =========
The name "libpng" has not been registered by the Copyright owners The name "libpng" has not been registered by the Copyright owners
as a trademark in any jurisdiction. However, because libpng has as a trademark in any jurisdiction. However, because libpng has
been distributed and maintained world-wide, continually since 1995, been distributed and maintained world-wide, continually since 1995,
the Copyright owners claim "common-law trademark protection" in any the Copyright owners claim "common-law trademark protection" in any
jurisdiction where common-law trademark is recognized. jurisdiction where common-law trademark is recognized.
This diff is collapsed.
This diff is collapsed.
/* filter_neon.S - placeholder file
*
* Copyright (c) 2024 Cosmin Truta
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*/
/* IMPORTANT NOTE:
*
* Historically, the hand-coded assembler implementation of Neon optimizations
* in this module had not been in sync with the intrinsics-based implementation
* in filter_neon_intrinsics.c and palette_neon_intrinsics.c, at least since
* the introduction of riffled palette optimizations. Moreover, the assembler
* code used to work on 32-bit ARM only, and it caused problems, even if empty,
* on 64-bit ARM.
*
* All references to this module from our internal build scripts and projects
* have been removed.
*
* For the external projects that might still expect this module to be present,
* we leave this stub in place, for the remaining lifetime of libpng-1.6.x.
* Everything should continue to function normally, as long as there are no
* deliberate attempts to use the old hand-made assembler code. A build error
* will be raised otherwise.
*/
/* This is required to get the symbol renames, which are #defines, and the
* definitions (or not) of PNG_ARM_NEON_OPT and PNG_ARM_NEON_IMPLEMENTATION.
*/
#define PNG_VERSION_INFO_ONLY
#include "../pngpriv.h"
#ifdef PNG_READ_SUPPORTED
#if PNG_ARM_NEON_IMPLEMENTATION == 2 /* hand-coded assembler */
#if PNG_ARM_NEON_OPT > 0
#if defined(__clang__)
#define GNUC_VERSION 0 /* not gcc, although it might pretend to be */
#elif defined(__GNUC__)
#define GNUC_MAJOR (__GNUC__ + 0)
#define GNUC_MINOR (__GNUC_MINOR__ + 0)
#define GNUC_PATCHLEVEL (__GNUC_PATCHLEVEL__ + 0)
#define GNUC_VERSION (GNUC_MAJOR * 10000 + GNUC_MINOR * 100 + GNUC_PATCHLEVEL)
#else
#define GNUC_VERSION 0 /* not gcc */
#endif
#if (GNUC_VERSION > 0) && (GNUC_VERSION < 40300)
#error "PNG_ARM_NEON is not supported with gcc versions earlier than 4.3.0"
#elif GNUC_VERSION == 40504
#error "PNG_ARM_NEON is not supported with gcc version 4.5.4"
#else
#error "Please use 'arm/*_neon_intrinsics.c' for PNG_ARM_NEON support"
#endif
#endif /* PNG_ARM_NEON_OPT > 0 */
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 */
#endif /* READ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* pnglibconf.h - library build configuration */ /* pnglibconf.h - library build configuration */
/* libpng version 1.6.47 */ /* libpng version 1.6.54 */
/* Copyright (c) 2018-2025 Cosmin Truta */ /* Copyright (c) 2018-2026 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. */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment