Prepare local11 release and cover concurrent JPEG XL color transforms

This commit is contained in:
Codex
2026-10-26 22:38:18 +03:00
parent 919a4fd9ef
commit 621504fcda
2 changed files with 31 additions and 1 deletions
+30
View File
@@ -83,6 +83,36 @@ fn converts_lossy_icc_to_srgb() {
}
}
#[test]
fn concurrent_decodes_keep_profile_colors_when_transforms_are_reused() {
let cases: [(&[u8], [u8; 8]); 3] = [
(
include_bytes!("fixtures/p3.jxl"),
[255, 0, 0, 255, 255, 255, 255, 255],
),
(
include_bytes!("fixtures/gray_icc.jxl"),
[81, 81, 81, 255, 203, 203, 203, 255],
),
(
include_bytes!("fixtures/srgb_alpha.jxl"),
[128, 0, 0, 128, 0, 0, 255, 255],
),
];
std::thread::scope(|scope| {
for _ in 0..4 {
scope.spawn(|| {
for _ in 0..8 {
for (data, expected) in cases {
let rgba = decode_srgb(data).unwrap();
assert_eq!(rgba.pixels().as_flattened(), &expected);
}
}
});
}
});
}
#[test]
fn tone_maps_hdr() {
let rgba = decode_srgb(include_bytes!("fixtures/pq_grays.jxl")).unwrap();