Skip to content

Commit 3c5f925

Browse files
committed
Update libpng to 1.6.54
1 parent 1d80089 commit 3c5f925

File tree

18 files changed

+1404
-1003
lines changed

18 files changed

+1404
-1003
lines changed

3rdparty/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182

183183
## OpenAL Soft
184184
- [![Upstream](https://img.shields.io/github/v/release/kcat/openal-soft?label=Upstream)](https://github.com/kcat/openal-soft)
185-
- Version: 1.25.0-94259df
185+
- Version: 1.25.1
186186
- Modifications:
187187
- Remove `-Werror=undef`
188188
- Linking `fmt::fmt` instead `alsoft::fmt`
@@ -197,7 +197,7 @@
197197

198198
## png
199199
- [![Upstream](https://img.shields.io/github/v/tag/glennrp/libpng?label=Upstream)](https://github.com/glennrp/libpng)
200-
- Version: 1.6.53
200+
- Version: 1.6.54
201201
- License: PNG Reference Library License version 2
202202

203203
## poly2tri

3rdparty/png/LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
44
PNG Reference Library License version 2
55
---------------------------------------
66

7-
* Copyright (c) 1995-2025 The PNG Reference Library Authors.
8-
* Copyright (c) 2018-2025 Cosmin Truta.
7+
* Copyright (c) 1995-2026 The PNG Reference Library Authors.
8+
* Copyright (c) 2018-2026 Cosmin Truta.
99
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
1010
* Copyright (c) 1996-1997 Andreas Dilger.
1111
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.

3rdparty/png/arm/filter_neon_intrinsics.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
void
5050
png_read_filter_row_up_neon(png_row_infop row_info, png_bytep row,
51-
png_const_bytep prev_row)
51+
png_const_bytep prev_row)
5252
{
5353
png_bytep rp = row;
5454
png_bytep rp_stop = row + row_info->rowbytes;
@@ -69,7 +69,7 @@ png_read_filter_row_up_neon(png_row_infop row_info, png_bytep row,
6969

7070
void
7171
png_read_filter_row_sub3_neon(png_row_infop row_info, png_bytep row,
72-
png_const_bytep prev_row)
72+
png_const_bytep prev_row)
7373
{
7474
png_bytep rp = row;
7575
png_bytep rp_stop = row + row_info->rowbytes;
@@ -116,7 +116,7 @@ png_read_filter_row_sub3_neon(png_row_infop row_info, png_bytep row,
116116

117117
void
118118
png_read_filter_row_sub4_neon(png_row_infop row_info, png_bytep row,
119-
png_const_bytep prev_row)
119+
png_const_bytep prev_row)
120120
{
121121
png_bytep rp = row;
122122
png_bytep rp_stop = row + row_info->rowbytes;
@@ -148,7 +148,7 @@ png_read_filter_row_sub4_neon(png_row_infop row_info, png_bytep row,
148148

149149
void
150150
png_read_filter_row_avg3_neon(png_row_infop row_info, png_bytep row,
151-
png_const_bytep prev_row)
151+
png_const_bytep prev_row)
152152
{
153153
png_bytep rp = row;
154154
png_const_bytep pp = prev_row;
@@ -216,7 +216,7 @@ png_read_filter_row_avg3_neon(png_row_infop row_info, png_bytep row,
216216

217217
void
218218
png_read_filter_row_avg4_neon(png_row_infop row_info, png_bytep row,
219-
png_const_bytep prev_row)
219+
png_const_bytep prev_row)
220220
{
221221
png_bytep rp = row;
222222
png_bytep rp_stop = row + row_info->rowbytes;
@@ -285,7 +285,7 @@ paeth(uint8x8_t a, uint8x8_t b, uint8x8_t c)
285285

286286
void
287287
png_read_filter_row_paeth3_neon(png_row_infop row_info, png_bytep row,
288-
png_const_bytep prev_row)
288+
png_const_bytep prev_row)
289289
{
290290
png_bytep rp = row;
291291
png_const_bytep pp = prev_row;
@@ -353,7 +353,7 @@ png_read_filter_row_paeth3_neon(png_row_infop row_info, png_bytep row,
353353

354354
void
355355
png_read_filter_row_paeth4_neon(png_row_infop row_info, png_bytep row,
356-
png_const_bytep prev_row)
356+
png_const_bytep prev_row)
357357
{
358358
png_bytep rp = row;
359359
png_bytep rp_stop = row + row_info->rowbytes;

3rdparty/png/intel/filter_sse2_intrinsics.c

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,39 @@
2626
* whichever of a, b, or c is closest to p=a+b-c.
2727
*/
2828

29-
static __m128i load4(const void* p) {
29+
static __m128i
30+
load4(const void *p)
31+
{
3032
int tmp;
3133
memcpy(&tmp, p, sizeof(tmp));
3234
return _mm_cvtsi32_si128(tmp);
3335
}
3436

35-
static void store4(void* p, __m128i v) {
37+
static void
38+
store4(void *p, __m128i v)
39+
{
3640
int tmp = _mm_cvtsi128_si32(v);
3741
memcpy(p, &tmp, sizeof(int));
3842
}
3943

40-
static __m128i load3(const void* p) {
44+
static __m128i
45+
load3(const void *p)
46+
{
4147
png_uint_32 tmp = 0;
4248
memcpy(&tmp, p, 3);
4349
return _mm_cvtsi32_si128(tmp);
4450
}
4551

46-
static void store3(void* p, __m128i v) {
52+
static void
53+
store3(void *p, __m128i v)
54+
{
4755
int tmp = _mm_cvtsi128_si32(v);
4856
memcpy(p, &tmp, 3);
4957
}
5058

51-
void png_read_filter_row_sub3_sse2(png_row_infop row_info, png_bytep row,
52-
png_const_bytep prev)
59+
void
60+
png_read_filter_row_sub3_sse2(png_row_infop row_info, png_bytep row,
61+
png_const_bytep prev)
5362
{
5463
/* The Sub filter predicts each pixel as the previous pixel, a.
5564
* There is no pixel to the left of the first pixel. It's encoded directly.
@@ -81,8 +90,9 @@ void png_read_filter_row_sub3_sse2(png_row_infop row_info, png_bytep row,
8190
PNG_UNUSED(prev)
8291
}
8392

84-
void png_read_filter_row_sub4_sse2(png_row_infop row_info, png_bytep row,
85-
png_const_bytep prev)
93+
void
94+
png_read_filter_row_sub4_sse2(png_row_infop row_info, png_bytep row,
95+
png_const_bytep prev)
8696
{
8797
/* The Sub filter predicts each pixel as the previous pixel, a.
8898
* There is no pixel to the left of the first pixel. It's encoded directly.
@@ -106,8 +116,9 @@ void png_read_filter_row_sub4_sse2(png_row_infop row_info, png_bytep row,
106116
PNG_UNUSED(prev)
107117
}
108118

109-
void png_read_filter_row_avg3_sse2(png_row_infop row_info, png_bytep row,
110-
png_const_bytep prev)
119+
void
120+
png_read_filter_row_avg3_sse2(png_row_infop row_info, png_bytep row,
121+
png_const_bytep prev)
111122
{
112123
/* The Avg filter predicts each pixel as the (truncated) average of a and b.
113124
* There's no pixel to the left of the first pixel. Luckily, it's
@@ -119,7 +130,7 @@ void png_read_filter_row_avg3_sse2(png_row_infop row_info, png_bytep row,
119130

120131
const __m128i zero = _mm_setzero_si128();
121132

122-
__m128i b;
133+
__m128i b;
123134
__m128i a, d = zero;
124135

125136
png_debug(1, "in png_read_filter_row_avg3_sse2");
@@ -161,8 +172,9 @@ void png_read_filter_row_avg3_sse2(png_row_infop row_info, png_bytep row,
161172
}
162173
}
163174

164-
void png_read_filter_row_avg4_sse2(png_row_infop row_info, png_bytep row,
165-
png_const_bytep prev)
175+
void
176+
png_read_filter_row_avg4_sse2(png_row_infop row_info, png_bytep row,
177+
png_const_bytep prev)
166178
{
167179
/* The Avg filter predicts each pixel as the (truncated) average of a and b.
168180
* There's no pixel to the left of the first pixel. Luckily, it's
@@ -171,7 +183,7 @@ void png_read_filter_row_avg4_sse2(png_row_infop row_info, png_bytep row,
171183
*/
172184
size_t rb;
173185
const __m128i zero = _mm_setzero_si128();
174-
__m128i b;
186+
__m128i b;
175187
__m128i a, d = zero;
176188

177189
png_debug(1, "in png_read_filter_row_avg4_sse2");
@@ -198,7 +210,9 @@ void png_read_filter_row_avg4_sse2(png_row_infop row_info, png_bytep row,
198210
}
199211

200212
/* Returns |x| for 16-bit lanes. */
201-
static __m128i abs_i16(__m128i x) {
213+
static __m128i
214+
abs_i16(__m128i x)
215+
{
202216
#if PNG_INTEL_SSE_IMPLEMENTATION >= 2
203217
return _mm_abs_epi16(x);
204218
#else
@@ -217,16 +231,19 @@ static __m128i abs_i16(__m128i x) {
217231
}
218232

219233
/* Bytewise c ? t : e. */
220-
static __m128i if_then_else(__m128i c, __m128i t, __m128i e) {
234+
static __m128i
235+
if_then_else(__m128i c, __m128i t, __m128i e)
236+
{
221237
#if PNG_INTEL_SSE_IMPLEMENTATION >= 3
222238
return _mm_blendv_epi8(e,t,c);
223239
#else
224240
return _mm_or_si128(_mm_and_si128(c, t), _mm_andnot_si128(c, e));
225241
#endif
226242
}
227243

228-
void png_read_filter_row_paeth3_sse2(png_row_infop row_info, png_bytep row,
229-
png_const_bytep prev)
244+
void
245+
png_read_filter_row_paeth3_sse2(png_row_infop row_info, png_bytep row,
246+
png_const_bytep prev)
230247
{
231248
/* Paeth tries to predict pixel d using the pixel to the left of it, a,
232249
* and two pixels from the previous row, b and c:
@@ -324,8 +341,9 @@ void png_read_filter_row_paeth3_sse2(png_row_infop row_info, png_bytep row,
324341
}
325342
}
326343

327-
void png_read_filter_row_paeth4_sse2(png_row_infop row_info, png_bytep row,
328-
png_const_bytep prev)
344+
void
345+
png_read_filter_row_paeth4_sse2(png_row_infop row_info, png_bytep row,
346+
png_const_bytep prev)
329347
{
330348
/* Paeth tries to predict pixel d using the pixel to the left of it, a,
331349
* and two pixels from the previous row, b and c:

3rdparty/png/png.c

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* png.c - location for general purpose libpng functions
22
*
3-
* Copyright (c) 2018-2025 Cosmin Truta
3+
* Copyright (c) 2018-2026 Cosmin Truta
44
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
55
* Copyright (c) 1996-1997 Andreas Dilger
66
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
@@ -13,7 +13,7 @@
1313
#include "pngpriv.h"
1414

1515
/* Generate a compiler error if there is an old png.h in the search path. */
16-
typedef png_libpng_version_1_6_53 Your_png_h_is_not_version_1_6_53;
16+
typedef png_libpng_version_1_6_54 Your_png_h_is_not_version_1_6_54;
1717

1818
/* Sanity check the chunks definitions - PNG_KNOWN_CHUNKS from pngpriv.h and the
1919
* corresponding macro definitions. This causes a compile time failure if
@@ -101,7 +101,8 @@ png_sig_cmp(png_const_bytep sig, size_t start, size_t num_to_check)
101101
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
102102
/* Function to allocate memory for zlib */
103103
PNG_FUNCTION(voidpf /* PRIVATE */,
104-
png_zalloc,(voidpf png_ptr, uInt items, uInt size),PNG_ALLOCATED)
104+
png_zalloc,(voidpf png_ptr, uInt items, uInt size),
105+
PNG_ALLOCATED)
105106
{
106107
png_alloc_size_t num_bytes = size;
107108

@@ -257,7 +258,8 @@ png_user_version_check(png_structrp png_ptr, png_const_charp user_png_ver)
257258
PNG_FUNCTION(png_structp /* PRIVATE */,
258259
png_create_png_struct,(png_const_charp user_png_ver, png_voidp error_ptr,
259260
png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
260-
png_malloc_ptr malloc_fn, png_free_ptr free_fn),PNG_ALLOCATED)
261+
png_malloc_ptr malloc_fn, png_free_ptr free_fn),
262+
PNG_ALLOCATED)
261263
{
262264
png_struct create_struct;
263265
# ifdef PNG_SETJMP_SUPPORTED
@@ -361,7 +363,8 @@ png_create_png_struct,(png_const_charp user_png_ver, png_voidp error_ptr,
361363

362364
/* Allocate the memory for an info_struct for the application. */
363365
PNG_FUNCTION(png_infop,PNGAPI
364-
png_create_info_struct,(png_const_structrp png_ptr),PNG_ALLOCATED)
366+
png_create_info_struct,(png_const_structrp png_ptr),
367+
PNG_ALLOCATED)
365368
{
366369
png_inforp info_ptr;
367370

@@ -817,8 +820,8 @@ png_get_copyright(png_const_structrp png_ptr)
817820
return PNG_STRING_COPYRIGHT
818821
#else
819822
return PNG_STRING_NEWLINE \
820-
"libpng version 1.6.53" PNG_STRING_NEWLINE \
821-
"Copyright (c) 2018-2025 Cosmin Truta" PNG_STRING_NEWLINE \
823+
"libpng version 1.6.54" PNG_STRING_NEWLINE \
824+
"Copyright (c) 2018-2026 Cosmin Truta" PNG_STRING_NEWLINE \
822825
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
823826
PNG_STRING_NEWLINE \
824827
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
@@ -2257,8 +2260,8 @@ png_check_fp_number(png_const_charp string, size_t size, int *statep,
22572260
int
22582261
png_check_fp_string(png_const_charp string, size_t size)
22592262
{
2260-
int state=0;
2261-
size_t char_index=0;
2263+
int state = 0;
2264+
size_t char_index = 0;
22622265

22632266
if (png_check_fp_number(string, size, &state, &char_index) != 0 &&
22642267
(char_index == size || string[char_index] == 0))

0 commit comments

Comments
 (0)