Skip to content

Conversation

@mattleibow
Copy link

@mattleibow mattleibow commented Jan 27, 2026

Description of Change

Update libwebp from v1.3.2 to v1.6.0

Changes

  • Update DEPS with new commit hash (4fa21912338357f89e4fd51cf2368325b59e9bd9)
  • Add src/utils/palette.c to BUILD.gn (new file in v1.6.0)

Highlights from v1.4.0 - v1.6.0:

  • Security hardening and increased fuzzing coverage
  • Additional AVX2, SSE2 optimizations
  • Fix heap overflow in webpmux
  • Lossless encoder improvements
  • Various bug and warning fixes

SkiaSharp Issue

Related to mono/SkiaSharp#3055

API Changes

None (binary compatible).

Behavioral Changes

None.

Required SkiaSharp PR

mono/SkiaSharp#3461

PR Checklist

  • Rebased on top of skiasharp at time of PR
  • Changes adhere to coding standard

mattleibow added a commit to mono/SkiaSharp that referenced this pull request Jan 27, 2026
- Update externals/skia submodule to include libwebp 1.6.0
- Update cgmanifest.json with new commit hash

Related to #3055

Required skia PR: mono/skia#163
mattleibow added a commit to mono/SkiaSharp that referenced this pull request Jan 27, 2026
- Update externals/skia submodule to include libwebp 1.6.0
- Update cgmanifest.json with new commit hash

Related to #3055

Required skia PR: mono/skia#163
@mattleibow mattleibow force-pushed the dev/update-libwebp branch 2 times, most recently from 81241f9 to b59a030 Compare January 27, 2026 20:44
- Bump libwebp from v1.3.2 to v1.6.0
- Add src/utils/palette.c to BUILD.gn (new file in v1.6.0)

Security hardening and bug fixes:
- Additional AVX2/SSE2 optimizations
- Fix heap overflow in webpmux
- Increased fuzzing coverage
- Various bug and warning fixes

Ref: https://github.com/webmproject/libwebp/releases/tag/v1.6.0
libwebp 1.6.0 added AVX2 optimizations in new source files:
- src/dsp/lossless_avx2.c
- src/dsp/lossless_enc_avx2.c

On Windows with clang-cl, _MSC_VER is defined which triggers WEBP_MSC_AVX2,
enabling the AVX2 code path. However, these source files are not in BUILD.gn,
causing undefined symbol errors at link time.

Disable AVX2 for now by defining WEBP_HAVE_AVX2=0. This maintains current
behavior while allowing the libwebp bump to proceed.

A follow-up issue will track enabling AVX2 support properly.
Add libwebp_avx2 target with AVX2 source files:
- lossless_avx2.c
- lossless_enc_avx2.c

Uses -mavx2 flag for clang on x86/x64 platforms.
Runtime CPU detection ensures AVX2 code only runs on supported CPUs.

Closes mono/SkiaSharp#3464
@mattleibow mattleibow closed this Jan 29, 2026
@mattleibow mattleibow deleted the dev/update-libwebp branch January 29, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants