Skip to content

Commit 650ac0f

Browse files
committed
Continue de-jxl-isation
Main purpose: avoid ODR violation
1 parent 7a57896 commit 650ac0f

293 files changed

Lines changed: 5792 additions & 6481 deletions

File tree

Some content is hidden

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

.github/workflows/build_test.yml

Lines changed: 36 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run_bench: true
4040
test_in_pr: true
4141
cmake_args: >-
42-
-DJPEGXL_TEST_TOOLS=ON
42+
-DJPEGLI_TEST_TOOLS=ON
4343
-DJPEGLI_LIBJPEG_LIBRARY_VERSION="8.2.2"
4444
-DJPEGLI_LIBJPEG_LIBRARY_SOVERSION="8"
4545
# Track static stack size on build and check it doesn't exceed 3 kB.
@@ -48,23 +48,17 @@ jobs:
4848
# Conformance tooling test requires numpy.
4949
# jpegli tests require imagemagick and libjpeg-turbo-progs
5050
apt_pkgs: imagemagick libjpeg-turbo-progs python3-numpy
51-
- name: lowprecision
52-
mode: release
53-
run_bench: true
54-
test_in_pr: true
55-
cmake_args: -DCMAKE_CXX_FLAGS=-DJXL_HIGH_PRECISION=0
5651
- name: debug
5752
# Build scalar-only hwy instructions.
5853
- name: scalar
5954
mode: release
60-
cxxflags: -DHWY_COMPILE_ONLY_SCALAR -DFJXL_ENABLE_AVX2=0 -DFJXL_ENABLE_AVX512=0
55+
cxxflags: -DHWY_COMPILE_ONLY_SCALAR
6156
# Disabling optional features to speed up MSAN build a little bit.
6257
- name: msan
6358
os: ubuntu-24.04
6459
skip_install: true
6560
cmake_args: >-
66-
-DJPEGXL_ENABLE_DEVTOOLS=OFF -DJPEGXL_ENABLE_PLUGINS=OFF
67-
-DJPEGXL_ENABLE_VIEWERS=OFF
61+
-DJPEGLI_ENABLE_DEVTOOLS=OFF
6862
cc: clang-18
6963
cxx: clang++-18
7064
- name: asan
@@ -75,24 +69,16 @@ jobs:
7569
skip_install: true
7670
disable_tests:
7771
- test_jpegli_jni_wrapper # TODO: why this does not work?
78-
# Build with support for decoding to JPEG bytes disabled. Produces a
79-
# smaller build if only decoding to pixels is needed.
80-
- name: release-nojpeg
81-
mode: release
82-
cmake_args: >-
83-
-DJPEGXL_ENABLE_TRANSCODE_JPEG=OFF
84-
-DJPEGXL_ENABLE_PLUGINS=OFF
85-
-DJPEGXL_ENABLE_VIEWERS=OFF
86-
# Build with jxl_cms based on lcms2 library.
72+
# Build with jpegli_cms based on lcms2 library.
8773
- name: release-lcms2
8874
mode: release
8975
cmake_args: >-
90-
-DJPEGXL_ENABLE_SKCMS=OFF
76+
-DJPEGLI_ENABLE_SKCMS=OFF
9177
- name: release-system-lcms2
9278
mode: release
9379
cmake_args: >-
94-
-DJPEGXL_ENABLE_SKCMS=OFF
95-
-DJPEGXL_FORCE_SYSTEM_LCMS2=ON
80+
-DJPEGLI_ENABLE_SKCMS=OFF
81+
-DJPEGLI_FORCE_SYSTEM_LCMS2=ON
9682
apt_pkgs: liblcms2-dev
9783
# static build is impossible
9884
skip_install: true
@@ -102,46 +88,32 @@ jobs:
10288
mode: release
10389
run_bench: true
10490
test_in_pr: true
105-
- name: release:arm64-lowprecision
106-
os: ubuntu-24.04-arm
107-
mode: release
108-
run_bench: true
109-
test_in_pr: true
110-
cmake_args: -DCMAKE_CXX_FLAGS=-DJXL_HIGH_PRECISION=0
111-
# Build optimized for binary size, all features not needed for
112-
# reconstructing pixels is disabled.
113-
- name: release:minimal
114-
mode: release
115-
cmake_args: >-
116-
-DJPEGXL_ENABLE_TRANSCODE_JPEG=OFF
117-
-DJPEGXL_ENABLE_BOXES=OFF
118-
-DJPEGXL_ENABLE_PLUGINS=OFF
119-
-DJPEGXL_ENABLE_VIEWERS=OFF
12091
# Builds with gcc in release mode
12192
- name: release:gcc
12293
os: ubuntu-latest
12394
mode: release
12495
cc: gcc
12596
cxx: g++
12697
run_bench: true
98+
test_in_pr: true
12799
- name: release:gcc-old
128-
os: ubuntu-22.04
100+
os: ubuntu-24.04
129101
mode: release
130102
cc: gcc
131103
cxx: g++
132104
- name: release:gcc-old-old
133-
os: ubuntu-20.04
105+
os: ubuntu-22.04
134106
mode: release
135107
cc: gcc
136108
cxx: g++
137109
# Builds with old clang in release mode
138110
- name: release:clang-old
139-
os: ubuntu-22.04
111+
os: ubuntu-24.04
140112
mode: release
141113
cc: clang
142114
cxx: clang++
143115
- name: release:clang-old-old
144-
os: ubuntu-20.04
116+
os: ubuntu-22.04
145117
mode: release
146118
cc: clang
147119
cxx: clang++
@@ -153,17 +125,19 @@ jobs:
153125
cxx: clang++-17
154126
apt_pkgs: lld
155127
cmake_args: >-
156-
-DJPEGXL_ENABLE_LTO=ON
128+
-DJPEGLI_ENABLE_LTO=ON
157129
-DCMAKE_LINKER_TYPE=LLD
158130
run_bench: true
131+
test_in_pr: true
159132
- name: release_lto:gcc
160133
os: ubuntu-latest
161134
mode: release
162135
cc: gcc
163136
cxx: g++
164137
cmake_args: >-
165-
-DJPEGXL_ENABLE_LTO=ON
138+
-DJPEGLI_ENABLE_LTO=ON
166139
run_bench: true
140+
test_in_pr: true
167141
# OSX builds
168142
- name: release:osx
169143
os: macos-latest
@@ -176,9 +150,9 @@ jobs:
176150
test_stack_limit: 128
177151
cmake_args: >-
178152
-DCMAKE_FIND_FRAMEWORK=NEVER
179-
- name: debug:osx-13
180-
# The last "free" X86 OSX runnde
181-
os: macos-13
153+
- name: debug:osx-15
154+
# The last "free" X86 OSX runner
155+
os: macos-15-intel
182156
mode: debug
183157
cmake_args: >-
184158
-DCMAKE_FIND_FRAMEWORK=NEVER
@@ -189,32 +163,26 @@ jobs:
189163
skip_install: true
190164
skip_stats: true
191165
skip_test: true # can't finish "linking" tests without emulator
192-
force_system_brotli: OFF
193166
cmake_args: >-
194167
-DANDROID_ABI=arm64-v8a
195168
-DANDROID_PLATFORM=28
196169
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_LATEST_HOME}/build/cmake/android.toolchain.cmake
197-
-DJPEGXL_ENABLE_BENCHMARK=OFF
198-
-DJPEGXL_ENABLE_OPENEXR=OFF
199-
-DJPEGXL_ENABLE_PLUGINS=OFF
200-
-DJPEGXL_ENABLE_VIEWERS=OFF
170+
-DJPEGLI_ENABLE_BENCHMARK=OFF
171+
-DJPEGLI_ENABLE_OPENEXR=OFF
201172
-DSJPEG_ANDROID_NDK_PATH=${ANDROID_NDK_LATEST_HOME}
202-
-DJPEGXL_BUNDLE_LIBPNG=ON
173+
-DJPEGLI_BUNDLE_LIBPNG=ON
203174
- name: release_ios
204175
os: macos-latest
205176
mode: release
206177
skip_install: true
207178
skip_stats: true
208179
skip_test: true # can't finish "linking" tests without emulator
209-
force_system_brotli: OFF
210180
cmake_args: >-
211181
-DCMAKE_SYSTEM_NAME=iOS
212182
-DCMAKE_OSX_ARCHITECTURES=arm64
213-
-DJPEGXL_ENABLE_BENCHMARK=OFF
214-
-DJPEGXL_ENABLE_OPENEXR=OFF
215-
-DJPEGXL_ENABLE_PLUGINS=OFF
216-
-DJPEGXL_ENABLE_VIEWERS=OFF
217-
-DJPEGXL_BUNDLE_LIBPNG=ON
183+
-DJPEGLI_ENABLE_BENCHMARK=OFF
184+
-DJPEGLI_ENABLE_OPENEXR=OFF
185+
-DJPEGLI_BUNDLE_LIBPNG=ON
218186
219187
env:
220188
CCACHE_DIR: ${{ github.workspace }}/.ccache
@@ -233,11 +201,18 @@ jobs:
233201
with:
234202
egress-policy: audit
235203

204+
- name: Check workflow configuration
205+
run: |
206+
if [[ "${{ matrix.run_bench && !matrix.test_in_pr }}" == "true" ]]; then
207+
echo "::error title::Configuration Error::'run_bench' requires 'test_in_pr'"
208+
exit 1
209+
fi
210+
236211
- name: Install build deps MacOS
237212
if: startsWith(matrix.os, 'macos-')
238213
run: |
239214
# Should be already installed:
240-
# brew install brotli giflib jpeg-turbo libpng zlib
215+
# brew install giflib jpeg-turbo libpng zlib
241216
# Not required, since we skip building documentation
242217
# brew install doxygen graphviz
243218
brew install binutils ccache coreutils googletest libavif ninja openexr sdl2 webp
@@ -269,7 +244,7 @@ jobs:
269244
- name: Setup the Homebrew prefixes
270245
if: startsWith(matrix.os, 'macos-')
271246
run: |
272-
CMAKE_PREFIX_PATH=`brew --prefix brotli`:`brew --prefix giflib`:`brew --prefix google-benchmark`:`brew --prefix jpeg-turbo`:`brew --prefix libpng`:`brew --prefix sdl2`:`brew --prefix zlib`
247+
CMAKE_PREFIX_PATH=`brew --prefix giflib`:`brew --prefix google-benchmark`:`brew --prefix jpeg-turbo`:`brew --prefix libpng`:`brew --prefix sdl2`:`brew --prefix zlib`
273248
echo "CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" >> $GITHUB_ENV
274249
275250
- name: Setup the LLVM source path
@@ -323,11 +298,10 @@ jobs:
323298
[[ -n "${MODE}" ]] || MODE="${{ matrix.name }}"
324299
SKIP_TEST=1 TARGETS=all CMAKE_CXX_FLAGS='${{ matrix.cxxflags }}' \
325300
./ci.sh ${MODE} \
326-
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
327301
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
328302
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
329303
-DBUILD_TESTING=${BUILD_TESTS} \
330-
-DJPEGXL_ENABLE_HWY_AVX3_DL=false \
304+
-DJPEGLI_ENABLE_HWY_AVX3_DL=false \
331305
${{ matrix.cmake_args }}
332306
333307
- name: Build stats
@@ -345,7 +319,7 @@ jobs:
345319
# SELECT_BINUTILS="${{ startsWith(matrix.os, 'macos-') && '--binutils `brew --prefix binutils`/bin/' || '' }}"
346320
# tools/scripts/build_stats.py --save build/stats.json \
347321
# --max-stack ${{ matrix.max_stack || '0' }} ${SELECT_BINUTILS} \
348-
# cjxl djxl libjxl.${SHARED_LIB_EXT} libjxl_dec.${SHARED_LIB_EXT}
322+
# cjpegli djpegli libjpegli.${SHARED_LIB_EXT} libjpegli_dec.${SHARED_LIB_EXT}
349323

350324
# Check that we can build the example project against the installed libs.
351325
#- name: Install and build examples

.github/workflows/build_test_cross.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ jobs:
5252
identifier: x64
5353
test_in_pr: true
5454
cmake_args: >-
55-
-DJPEGXL_ENABLE_HWY_AVX3=true
56-
-DJPEGXL_ENABLE_HWY_AVX3_DL=true
57-
-DJPEGXL_ENABLE_HWY_AVX3_SPR=true
58-
-DJPEGXL_ENABLE_HWY_AVX3_ZEN4=true
55+
-DJPEGLI_ENABLE_HWY_AVX3=true
56+
-DJPEGLI_ENABLE_HWY_AVX3_DL=true
57+
-DJPEGLI_ENABLE_HWY_AVX3_SPR=true
58+
-DJPEGLI_ENABLE_HWY_AVX3_ZEN4=true
5959
6060
env:
6161
WILL_RUN_TESTS: ${{ (github.event_name == 'push' || (github.event_name == 'pull_request' && (matrix.test_in_pr || contains(github.event.pull_request.labels.*.name, 'CI:full')))) }}
@@ -84,8 +84,7 @@ jobs:
8484
BUILD_DIR=build BUILD_TARGET=${{ matrix.build_target }} \
8585
SKIP_TEST=1 TARGETS='all_tests cjpegli djpegli libjpeg.so' \
8686
./ci.sh release \
87-
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
88-
-DJPEGXL_ENABLE_JNI=OFF \
87+
-DJPEGLI_ENABLE_JNI=OFF \
8988
${{ matrix.cmake_args }}
9089
9190
- name: Build stats
@@ -207,7 +206,7 @@ jobs:
207206
BUILD_DIR=build \
208207
${EMULATOR} ./ci.sh test \
209208
-I ${{ matrix.shard_number }},,${{ env.LAST_SHARD }} \
210-
-E '(bash_test|conformance_tooling_test|test_jxl_jni_wrapper|test_jpegli_jni_wrapper)'
209+
-E '(bash_test|conformance_tooling_test|test_jpegli_jni_wrapper|test_jpegli_jni_wrapper)'
211210
212211
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
213212
name: Upload test cost

.github/workflows/build_test_msys2.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
disable_tests:
3939
- ButteraugliTest.Lossless
4040
- ButteraugliTest.Distmap
41-
- JxlTest.RoundtripLargeEmptyModular
41+
- JpegliTest.RoundtripLargeEmptyModular
4242
disable_benchmark: true
4343
# "Legacy" toolchains are being "phased-out":
4444
# https://www.msys2.org/news/#2023-12-13-starting-to-drop-some-32-bit-packages
@@ -71,7 +71,6 @@ jobs:
7171
git
7272
procps
7373
pacboy: >-
74-
brotli:p
7574
cmake:p
7675
giflib:p
7776
gtest:p
@@ -86,10 +85,9 @@ jobs:
8685
run: |
8786
cmake \
8887
-DCMAKE_BUILD_TYPE=Release \
89-
-DJPEGXL_ENABLE_JNI=OFF \
90-
-DJPEGXL_ENABLE_MANPAGES=OFF \
91-
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
92-
-DJPEGXL_FORCE_SYSTEM_GTEST=ON \
88+
-DJPEGLI_ENABLE_JNI=OFF \
89+
-DJPEGLI_ENABLE_MANPAGES=OFF \
90+
-DJPEGLI_FORCE_SYSTEM_GTEST=ON \
9391
-B build \
9492
-G Ninja
9593

.github/workflows/build_test_wasm.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,13 @@ jobs:
105105
./ci.sh release \
106106
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
107107
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
108-
-DJPEGXL_ENABLE_BENCHMARK=OFF \
109-
-DJPEGXL_ENABLE_DEVTOOLS=OFF \
110-
-DJPEGXL_ENABLE_DOXYGEN=OFF \
111-
-DJPEGXL_ENABLE_EXAMPLES=OFF \
112-
-DJPEGXL_ENABLE_JNI=OFF \
113-
-DJPEGXL_ENABLE_MANPAGES=OFF \
114-
-DJPEGXL_ENABLE_PLUGINS=OFF \
115-
-DJPEGXL_ENABLE_TOOLS=OFF \
116-
-DJPEGXL_ENABLE_VIEWERS=OFF
108+
-DJPEGLI_ENABLE_BENCHMARK=OFF \
109+
-DJPEGLI_ENABLE_DEVTOOLS=OFF \
110+
-DJPEGLI_ENABLE_DOXYGEN=OFF \
111+
-DJPEGLI_ENABLE_EXAMPLES=OFF \
112+
-DJPEGLI_ENABLE_JNI=OFF \
113+
-DJPEGLI_ENABLE_MANPAGES=OFF \
114+
-DJPEGLI_ENABLE_TOOLS=OFF
117115
- name: ccache stats
118116
run: ccache --show-stats
119117

.github/workflows/codeql.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ jobs:
8282
CC=clang CXX=clang++ \
8383
SKIP_TEST=1 TARGETS=all \
8484
./ci.sh opt \
85-
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
8685
-DBUILD_TESTING=OFF
8786
8887
- name: Perform CodeQL Analysis

.github/workflows/debug_ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ jobs:
9090
libstdc++-10-dev:${{ matrix.arch }}
9191
9292
# Dependencies
93-
libbrotli-dev:${{ matrix.arch }}
9493
libgif-dev:${{ matrix.arch }}
9594
libjpeg-dev:${{ matrix.arch }}
9695
libpng-dev:${{ matrix.arch }}
@@ -126,8 +125,7 @@ jobs:
126125
- name: Configure
127126
run: |
128127
CMAKE_FLAGS="${{ matrix.cmake_flags }}" ./ci.sh release \
129-
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
130-
-DJPEGXL_ENABLE_JNI=OFF \
128+
-DJPEGLI_ENABLE_JNI=OFF \
131129
${{ join(matrix.cmake_args, ' ') }}
132130
env:
133131
SKIP_BUILD: 1

.github/workflows/fuzz.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,21 @@ jobs:
4343
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4444
id: checkout
4545
with:
46-
# The build_fuzzers action checks out the code to the storage/libjxl
46+
# The build_fuzzers action checks out the code to the storage/libjpegli
4747
# directory already, but doesn't check out the submodules. This step
4848
# is a workaround for checking out the submodules.
49-
path: storage/libjxl
49+
path: storage/libjpegli
5050
submodules: true
5151
- name: Build Fuzzers
5252
id: build
5353
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@71ecd5d4e4bf9a6edc19c9fa6d2422fb528bca4f # master
5454
with:
55-
oss-fuzz-project-name: 'libjxl'
55+
oss-fuzz-project-name: 'libjpegli'
5656
language: c++
5757
- name: Run Fuzzers
5858
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@71ecd5d4e4bf9a6edc19c9fa6d2422fb528bca4f # master
5959
with:
60-
oss-fuzz-project-name: 'libjxl'
60+
oss-fuzz-project-name: 'libjpegli'
6161
language: c++
6262
fuzz-seconds: 600
6363
- name: Upload Crash

0 commit comments

Comments
 (0)