Skip to content

Commit 68e375c

Browse files
authored
Update 3rd libs (#2286)
1 parent c2ce413 commit 68e375c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+3139
-2154
lines changed

3rdparty/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
## c-ares
2424
- [![Upstream](https://img.shields.io/github/v/release/c-ares/c-ares?label=Upstream)](https://github.com/c-ares/c-ares)
25-
- Version: 1.34.3
25+
- Version: 1.34.4
2626
- License: MIT
2727

2828
## Chipmunk2D
@@ -47,7 +47,7 @@
4747

4848
## curl
4949
- [![Upstream](https://img.shields.io/github/v/release/curl/curl?label=Upstream)](https://github.com/curl/curl)
50-
- Version: 8.11.0
50+
- Version: 8.11.1
5151
- License: Curl (MIT/X)
5252

5353
## doctest
@@ -98,7 +98,7 @@
9898

9999
## jpeg-turbo
100100
- [![Upstream](https://img.shields.io/github/v/release/libjpeg-turbo/libjpeg-turbo?label=Upstream)](https://github.com/libjpeg-turbo/libjpeg-turbo)
101-
- Version: 3.0.4
101+
- Version: 3.1.0
102102
- License: BSD-style (IJG,BSD-3-Clause,zlib)
103103

104104
## kcp
@@ -124,7 +124,7 @@
124124

125125
- luajit
126126
- Upstream: https://github.com/LuaJIT/LuaJIT
127-
- Version: 2.1-fe71d0f
127+
- Version: 2.1-f73e649
128128
- License: MIT
129129

130130
- tolua
@@ -159,7 +159,7 @@
159159

160160
## oboe (Adnroid only)
161161
- [![Upstream](https://img.shields.io/github/v/tag/google/oboe?label=Upstream)](https://github.com/google/oboe)
162-
- Version: 1.9.0
162+
- Version: 1.9.3
163163
- License: Apache-2.0
164164

165165
## ogg & vorbis

3rdparty/webp/sharpyuv/sharpyuv.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -565,10 +565,11 @@ int SharpYuvConvertWithOptions(const void* r_ptr, const void* g_ptr,
565565
scaled_matrix.rgb_to_u[3] = Shift(yuv_matrix->rgb_to_u[3], sfix);
566566
scaled_matrix.rgb_to_v[3] = Shift(yuv_matrix->rgb_to_v[3], sfix);
567567

568-
return DoSharpArgbToYuv(r_ptr, g_ptr, b_ptr, rgb_step, rgb_stride,
569-
rgb_bit_depth, y_ptr, y_stride, u_ptr, u_stride,
570-
v_ptr, v_stride, yuv_bit_depth, width, height,
571-
&scaled_matrix, transfer_type);
568+
return DoSharpArgbToYuv(
569+
(const uint8_t*)r_ptr, (const uint8_t*)g_ptr, (const uint8_t*)b_ptr,
570+
rgb_step, rgb_stride, rgb_bit_depth, (uint8_t*)y_ptr, y_stride,
571+
(uint8_t*)u_ptr, u_stride, (uint8_t*)v_ptr, v_stride, yuv_bit_depth,
572+
width, height, &scaled_matrix, transfer_type);
572573
}
573574

574575
//------------------------------------------------------------------------------

3rdparty/webp/sharpyuv/sharpyuv.h

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ extern "C" {
5252
// SharpYUV API version following the convention from semver.org
5353
#define SHARPYUV_VERSION_MAJOR 0
5454
#define SHARPYUV_VERSION_MINOR 4
55-
#define SHARPYUV_VERSION_PATCH 0
55+
#define SHARPYUV_VERSION_PATCH 1
5656
// Version as a uint32_t. The major number is the high 8 bits.
5757
// The minor number is the middle 8 bits. The patch number is the low 16 bits.
5858
#define SHARPYUV_MAKE_VERSION(MAJOR, MINOR, PATCH) \
@@ -66,10 +66,17 @@ extern "C" {
6666
SHARPYUV_EXTERN int SharpYuvGetVersion(void);
6767

6868
// RGB to YUV conversion matrix, in 16 bit fixed point.
69-
// y = rgb_to_y[0] * r + rgb_to_y[1] * g + rgb_to_y[2] * b + rgb_to_y[3]
70-
// u = rgb_to_u[0] * r + rgb_to_u[1] * g + rgb_to_u[2] * b + rgb_to_u[3]
71-
// v = rgb_to_v[0] * r + rgb_to_v[1] * g + rgb_to_v[2] * b + rgb_to_v[3]
72-
// Then y, u and v values are divided by 1<<16 and rounded.
69+
// y_ = rgb_to_y[0] * r + rgb_to_y[1] * g + rgb_to_y[2] * b + rgb_to_y[3]
70+
// u_ = rgb_to_u[0] * r + rgb_to_u[1] * g + rgb_to_u[2] * b + rgb_to_u[3]
71+
// v_ = rgb_to_v[0] * r + rgb_to_v[1] * g + rgb_to_v[2] * b + rgb_to_v[3]
72+
// Then the values are divided by 1<<16 and rounded.
73+
// y = (y_ + (1 << 15)) >> 16
74+
// u = (u_ + (1 << 15)) >> 16
75+
// v = (v_ + (1 << 15)) >> 16
76+
//
77+
// Typically, the offset values rgb_to_y[3], rgb_to_u[3] and rgb_to_v[3] depend
78+
// on the input's bit depth, e.g., rgb_to_u[3] = 1 << (rgb_bit_depth - 1 + 16).
79+
// See also sharpyuv_csp.h to get a predefined matrix or generate a matrix.
7380
typedef struct {
7481
int rgb_to_y[4];
7582
int rgb_to_u[4];
@@ -127,6 +134,8 @@ typedef enum SharpYuvTransferFunctionType {
127134
// adjacent pixels on the y, u and v channels. If yuv_bit_depth > 8, they
128135
// should be multiples of 2.
129136
// width, height: width and height of the image in pixels
137+
// yuv_matrix: RGB to YUV conversion matrix. The matrix values typically
138+
// depend on the input's rgb_bit_depth.
130139
// This function calls SharpYuvConvertWithOptions with a default transfer
131140
// function of kSharpYuvTransferFunctionSrgb.
132141
SHARPYUV_EXTERN int SharpYuvConvert(const void* r_ptr, const void* g_ptr,

3rdparty/webp/sharpyuv/sharpyuv_csp.c

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ void SharpYuvComputeConversionMatrix(const SharpYuvColorSpace* yuv_color_space,
2222
const float kr = yuv_color_space->kr;
2323
const float kb = yuv_color_space->kb;
2424
const float kg = 1.0f - kr - kb;
25-
const float cr = 0.5f / (1.0f - kb);
26-
const float cb = 0.5f / (1.0f - kr);
25+
const float cb = 0.5f / (1.0f - kb);
26+
const float cr = 0.5f / (1.0f - kr);
2727

2828
const int shift = yuv_color_space->bit_depth - 8;
2929

3030
const float denom = (float)((1 << yuv_color_space->bit_depth) - 1);
3131
float scale_y = 1.0f;
3232
float add_y = 0.0f;
33-
float scale_u = cr;
34-
float scale_v = cb;
33+
float scale_u = cb;
34+
float scale_v = cr;
3535
float add_uv = (float)(128 << shift);
3636
assert(yuv_color_space->bit_depth >= 8);
3737

@@ -59,31 +59,35 @@ void SharpYuvComputeConversionMatrix(const SharpYuvColorSpace* yuv_color_space,
5959
}
6060

6161
// Matrices are in YUV_FIX fixed point precision.
62-
// WebP's matrix, similar but not identical to kRec601LimitedMatrix.
62+
// WebP's matrix, similar but not identical to kRec601LimitedMatrix
63+
// Derived using the following formulas:
64+
// Y = 0.2569 * R + 0.5044 * G + 0.0979 * B + 16
65+
// U = -0.1483 * R - 0.2911 * G + 0.4394 * B + 128
66+
// V = 0.4394 * R - 0.3679 * G - 0.0715 * B + 128
6367
static const SharpYuvConversionMatrix kWebpMatrix = {
6468
{16839, 33059, 6420, 16 << 16},
6569
{-9719, -19081, 28800, 128 << 16},
6670
{28800, -24116, -4684, 128 << 16},
6771
};
68-
// Kr=0.2990f Kb=0.1140f bits=8 range=kSharpYuvRangeLimited
72+
// Kr=0.2990f Kb=0.1140f bit_depth=8 range=kSharpYuvRangeLimited
6973
static const SharpYuvConversionMatrix kRec601LimitedMatrix = {
7074
{16829, 33039, 6416, 16 << 16},
7175
{-9714, -19071, 28784, 128 << 16},
7276
{28784, -24103, -4681, 128 << 16},
7377
};
74-
// Kr=0.2990f Kb=0.1140f bits=8 range=kSharpYuvRangeFull
78+
// Kr=0.2990f Kb=0.1140f bit_depth=8 range=kSharpYuvRangeFull
7579
static const SharpYuvConversionMatrix kRec601FullMatrix = {
7680
{19595, 38470, 7471, 0},
7781
{-11058, -21710, 32768, 128 << 16},
7882
{32768, -27439, -5329, 128 << 16},
7983
};
80-
// Kr=0.2126f Kb=0.0722f bits=8 range=kSharpYuvRangeLimited
84+
// Kr=0.2126f Kb=0.0722f bit_depth=8 range=kSharpYuvRangeLimited
8185
static const SharpYuvConversionMatrix kRec709LimitedMatrix = {
8286
{11966, 40254, 4064, 16 << 16},
8387
{-6596, -22189, 28784, 128 << 16},
8488
{28784, -26145, -2639, 128 << 16},
8589
};
86-
// Kr=0.2126f Kb=0.0722f bits=8 range=kSharpYuvRangeFull
90+
// Kr=0.2126f Kb=0.0722f bit_depth=8 range=kSharpYuvRangeFull
8791
static const SharpYuvConversionMatrix kRec709FullMatrix = {
8892
{13933, 46871, 4732, 0},
8993
{-7509, -25259, 32768, 128 << 16},

3rdparty/webp/sharpyuv/sharpyuv_csp.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,15 @@ SHARPYUV_EXTERN void SharpYuvComputeConversionMatrix(
4141

4242
// Enums for precomputed conversion matrices.
4343
typedef enum {
44+
// WebP's matrix, similar but not identical to kSharpYuvMatrixRec601Limited
4445
kSharpYuvMatrixWebp = 0,
46+
// Kr=0.2990f Kb=0.1140f bit_depth=8 range=kSharpYuvRangeLimited
4547
kSharpYuvMatrixRec601Limited,
48+
// Kr=0.2990f Kb=0.1140f bit_depth=8 range=kSharpYuvRangeFull
4649
kSharpYuvMatrixRec601Full,
50+
// Kr=0.2126f Kb=0.0722f bit_depth=8 range=kSharpYuvRangeLimited
4751
kSharpYuvMatrixRec709Limited,
52+
// Kr=0.2126f Kb=0.0722f bit_depth=8 range=kSharpYuvRangeFull
4853
kSharpYuvMatrixRec709Full,
4954
kSharpYuvMatrixNum
5055
} SharpYuvMatrixType;

3rdparty/webp/src/dec/tree_dec.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
#include "src/utils/bit_reader_inl_utils.h"
1717

1818
#if !defined(USE_GENERIC_TREE)
19-
#if !defined(__arm__) && !defined(_M_ARM) && !WEBP_AARCH64
19+
#if !defined(__arm__) && !defined(_M_ARM) && !WEBP_AARCH64 && \
20+
!defined(__wasm__)
2021
// using a table is ~1-2% slower on ARM. Prefer the coded-tree approach then.
2122
#define USE_GENERIC_TREE 1 // ALTERNATE_CODE
2223
#else

3rdparty/webp/src/dec/vp8i_dec.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ extern "C" {
3232

3333
// version numbers
3434
#define DEC_MAJ_VERSION 1
35-
#define DEC_MIN_VERSION 4
35+
#define DEC_MIN_VERSION 5
3636
#define DEC_REV_VERSION 0
3737

3838
// YUV-cache parameters. Cache is 32-bytes wide (= one cacheline).

3rdparty/webp/src/dec/vp8l_dec.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@
2020
#include "src/dsp/dsp.h"
2121
#include "src/dsp/lossless.h"
2222
#include "src/dsp/lossless_common.h"
23-
#include "src/dsp/yuv.h"
24-
#include "src/utils/endian_inl_utils.h"
2523
#include "src/utils/huffman_utils.h"
2624
#include "src/utils/utils.h"
25+
#include "src/webp/format_constants.h"
2726

2827
#define NUM_ARGB_CACHE_ROWS 16
2928

@@ -381,7 +380,8 @@ static int ReadHuffmanCodes(VP8LDecoder* const dec, int xsize, int ysize,
381380

382381
if (allow_recursion && VP8LReadBits(br, 1)) {
383382
// use meta Huffman codes.
384-
const int huffman_precision = VP8LReadBits(br, 3) + 2;
383+
const int huffman_precision =
384+
MIN_HUFFMAN_BITS + VP8LReadBits(br, NUM_HUFFMAN_BITS);
385385
const int huffman_xsize = VP8LSubSampleSize(xsize, huffman_precision);
386386
const int huffman_ysize = VP8LSubSampleSize(ysize, huffman_precision);
387387
const int huffman_pixs = huffman_xsize * huffman_ysize;
@@ -1351,7 +1351,8 @@ static int ReadTransform(int* const xsize, int const* ysize,
13511351
switch (type) {
13521352
case PREDICTOR_TRANSFORM:
13531353
case CROSS_COLOR_TRANSFORM:
1354-
transform->bits_ = VP8LReadBits(br, 3) + 2;
1354+
transform->bits_ =
1355+
MIN_TRANSFORM_BITS + VP8LReadBits(br, NUM_TRANSFORM_BITS);
13551356
ok = DecodeImageStream(VP8LSubSampleSize(transform->xsize_,
13561357
transform->bits_),
13571358
VP8LSubSampleSize(transform->ysize_,
@@ -1416,7 +1417,9 @@ VP8LDecoder* VP8LNew(void) {
14161417
return dec;
14171418
}
14181419

1419-
void VP8LClear(VP8LDecoder* const dec) {
1420+
// Resets the decoder in its initial state, reclaiming memory.
1421+
// Preserves the dec->status_ value.
1422+
static void VP8LClear(VP8LDecoder* const dec) {
14201423
int i;
14211424
if (dec == NULL) return;
14221425
ClearMetadata(&dec->hdr_);

3rdparty/webp/src/dec/vp8li_dec.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,6 @@ WEBP_NODISCARD int VP8LDecodeHeader(VP8LDecoder* const dec, VP8Io* const io);
121121
// this function. Returns false in case of error, with updated dec->status_.
122122
WEBP_NODISCARD int VP8LDecodeImage(VP8LDecoder* const dec);
123123

124-
// Resets the decoder in its initial state, reclaiming memory.
125-
// Preserves the dec->status_ value.
126-
void VP8LClear(VP8LDecoder* const dec);
127-
128124
// Clears and deallocate a lossless decoder instance.
129125
void VP8LDelete(VP8LDecoder* const dec);
130126

3rdparty/webp/src/demux/demux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "src/webp/format_constants.h"
2525

2626
#define DMUX_MAJ_VERSION 1
27-
#define DMUX_MIN_VERSION 4
27+
#define DMUX_MIN_VERSION 5
2828
#define DMUX_REV_VERSION 0
2929

3030
typedef struct {

0 commit comments

Comments
 (0)