diff --git a/jpegxl/alpha-modular-reftest-ref.html b/jpegxl/alpha-modular-reftest-ref.html new file mode 100644 index 00000000000000..319c718c6dc067 --- /dev/null +++ b/jpegxl/alpha-modular-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/alpha-modular-reftest.html b/jpegxl/alpha-modular-reftest.html new file mode 100644 index 00000000000000..3a2ed60ff18987 --- /dev/null +++ b/jpegxl/alpha-modular-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/alpha-vardct.html b/jpegxl/alpha-vardct.html new file mode 100644 index 00000000000000..6b4f5724aa29b4 --- /dev/null +++ b/jpegxl/alpha-vardct.html @@ -0,0 +1,16 @@ + +JPEG XL: alpha with VarDCT-oriented fixture + + + + + + diff --git a/jpegxl/basic-decode-reftest-ref.html b/jpegxl/basic-decode-reftest-ref.html new file mode 100644 index 00000000000000..e2cbc95ccb5e6b --- /dev/null +++ b/jpegxl/basic-decode-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/basic-decode-reftest.html b/jpegxl/basic-decode-reftest.html new file mode 100644 index 00000000000000..de6994066d79d7 --- /dev/null +++ b/jpegxl/basic-decode-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/bitdepth-10bpc-reftest-ref.html b/jpegxl/bitdepth-10bpc-reftest-ref.html new file mode 100644 index 00000000000000..62ebe3294b066c --- /dev/null +++ b/jpegxl/bitdepth-10bpc-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/bitdepth-10bpc-reftest.html b/jpegxl/bitdepth-10bpc-reftest.html new file mode 100644 index 00000000000000..9b39743d23d811 --- /dev/null +++ b/jpegxl/bitdepth-10bpc-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/bitdepth-12bpc-reftest-ref.html b/jpegxl/bitdepth-12bpc-reftest-ref.html new file mode 100644 index 00000000000000..5bc62641eec7cd --- /dev/null +++ b/jpegxl/bitdepth-12bpc-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/bitdepth-12bpc-reftest.html b/jpegxl/bitdepth-12bpc-reftest.html new file mode 100644 index 00000000000000..37381ba10b8322 --- /dev/null +++ b/jpegxl/bitdepth-12bpc-reftest.html @@ -0,0 +1,7 @@ + + + + + + + diff --git a/jpegxl/bitdepth-16bpc-reftest-ref.html b/jpegxl/bitdepth-16bpc-reftest-ref.html new file mode 100644 index 00000000000000..169ca64ab67f66 --- /dev/null +++ b/jpegxl/bitdepth-16bpc-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/bitdepth-16bpc-reftest.html b/jpegxl/bitdepth-16bpc-reftest.html new file mode 100644 index 00000000000000..d6b9d36d6ddc52 --- /dev/null +++ b/jpegxl/bitdepth-16bpc-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/bitdepth-8bpc-reftest-ref.html b/jpegxl/bitdepth-8bpc-reftest-ref.html new file mode 100644 index 00000000000000..883aa555c0c85f --- /dev/null +++ b/jpegxl/bitdepth-8bpc-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/bitdepth-8bpc-reftest.html b/jpegxl/bitdepth-8bpc-reftest.html new file mode 100644 index 00000000000000..ce551a418bbb78 --- /dev/null +++ b/jpegxl/bitdepth-8bpc-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/canvas-decode-paths.html b/jpegxl/canvas-decode-paths.html new file mode 100644 index 00000000000000..c709c120185601 --- /dev/null +++ b/jpegxl/canvas-decode-paths.html @@ -0,0 +1,36 @@ + +JPEG XL integration: canvas decode paths + + + + + diff --git a/jpegxl/cmyk-basic-conversion-reftest-ref.html b/jpegxl/cmyk-basic-conversion-reftest-ref.html new file mode 100644 index 00000000000000..e4fd4e05b0fce8 --- /dev/null +++ b/jpegxl/cmyk-basic-conversion-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/cmyk-basic-conversion-reftest.html b/jpegxl/cmyk-basic-conversion-reftest.html new file mode 100644 index 00000000000000..813f6c9560e6c1 --- /dev/null +++ b/jpegxl/cmyk-basic-conversion-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/css-image-usage.html b/jpegxl/css-image-usage.html new file mode 100644 index 00000000000000..1dace840119508 --- /dev/null +++ b/jpegxl/css-image-usage.html @@ -0,0 +1,45 @@ + +JPEG XL integration: CSS image uses + + + + + +
+
+
+ + + diff --git a/jpegxl/hdr-gain-map-visual.manual.html b/jpegxl/hdr-gain-map-visual.manual.html new file mode 100644 index 00000000000000..12804ad026d994 --- /dev/null +++ b/jpegxl/hdr-gain-map-visual.manual.html @@ -0,0 +1,4 @@ + +JPEG XL manual: HDR gain map + +

Manual test placeholder for JPEG XL gain-map behavior.

diff --git a/jpegxl/hdr-hlg-visual.manual.html b/jpegxl/hdr-hlg-visual.manual.html new file mode 100644 index 00000000000000..314caf5ba12141 --- /dev/null +++ b/jpegxl/hdr-hlg-visual.manual.html @@ -0,0 +1,5 @@ + +JPEG XL manual: HDR HLG + +

Manual test placeholder for HDR HLG tone mapping in JPEG XL.

+HDR HLG JPEG XL fixture diff --git a/jpegxl/hdr-pq-visual.manual.html b/jpegxl/hdr-pq-visual.manual.html new file mode 100644 index 00000000000000..ddbebc52d9b6e1 --- /dev/null +++ b/jpegxl/hdr-pq-visual.manual.html @@ -0,0 +1,5 @@ + +JPEG XL manual: HDR PQ + +

Manual test placeholder for HDR PQ tone mapping in JPEG XL.

+HDR PQ JPEG XL fixture diff --git a/jpegxl/html-embed-object-iframe-ref.html b/jpegxl/html-embed-object-iframe-ref.html new file mode 100644 index 00000000000000..acaa6a23849768 --- /dev/null +++ b/jpegxl/html-embed-object-iframe-ref.html @@ -0,0 +1,23 @@ + +JPEG XL integration reference: embed object iframe + + + +
+ + + +
diff --git a/jpegxl/html-embed-object-iframe.html b/jpegxl/html-embed-object-iframe.html new file mode 100644 index 00000000000000..a4fc7f549de5c9 --- /dev/null +++ b/jpegxl/html-embed-object-iframe.html @@ -0,0 +1,37 @@ + + +JPEG XL integration: embed object iframe + + + + + + + + +
+ + + +
+ + + diff --git a/jpegxl/html-img.html b/jpegxl/html-img.html new file mode 100644 index 00000000000000..9a7e7ae8316916 --- /dev/null +++ b/jpegxl/html-img.html @@ -0,0 +1,37 @@ + +JPEG XL integration: img and picture/source + + + + +plain img + + + picture fallback + + + diff --git a/jpegxl/html-input-image.html b/jpegxl/html-input-image.html new file mode 100644 index 00000000000000..b143e5858920d3 --- /dev/null +++ b/jpegxl/html-input-image.html @@ -0,0 +1,20 @@ + +JPEG XL integration: input type=image + + + + + + + diff --git a/jpegxl/html-preload-image.html b/jpegxl/html-preload-image.html new file mode 100644 index 00000000000000..ae62e66d38323d --- /dev/null +++ b/jpegxl/html-preload-image.html @@ -0,0 +1,36 @@ + +JPEG XL integration: link rel=preload as=image + + + + + diff --git a/jpegxl/html-video-poster-ref.html b/jpegxl/html-video-poster-ref.html new file mode 100644 index 00000000000000..1a08e8ad36349e --- /dev/null +++ b/jpegxl/html-video-poster-ref.html @@ -0,0 +1,12 @@ + +JPEG XL integration reference: video poster + + + +reference image diff --git a/jpegxl/html-video-poster.html b/jpegxl/html-video-poster.html new file mode 100644 index 00000000000000..f18f9275c811ce --- /dev/null +++ b/jpegxl/html-video-poster.html @@ -0,0 +1,26 @@ + + +JPEG XL integration: video poster + + + + + + + + + + + diff --git a/jpegxl/icc-uncommon-profile-reftest-ref.html b/jpegxl/icc-uncommon-profile-reftest-ref.html new file mode 100644 index 00000000000000..ceda1517ac5c09 --- /dev/null +++ b/jpegxl/icc-uncommon-profile-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/icc-uncommon-profile-reftest.html b/jpegxl/icc-uncommon-profile-reftest.html new file mode 100644 index 00000000000000..39a7dfab9f9ffc --- /dev/null +++ b/jpegxl/icc-uncommon-profile-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/imagedecoder-animation.https.html b/jpegxl/imagedecoder-animation.https.html new file mode 100644 index 00000000000000..f2dcb73f2ee5aa --- /dev/null +++ b/jpegxl/imagedecoder-animation.https.html @@ -0,0 +1,32 @@ + +JPEG XL: animation basics via ImageDecoder + + + + + + diff --git a/jpegxl/imagedecoder.https.html b/jpegxl/imagedecoder.https.html new file mode 100644 index 00000000000000..db93deff36f949 --- /dev/null +++ b/jpegxl/imagedecoder.https.html @@ -0,0 +1,24 @@ + +JPEG XL integration: ImageDecoder API + + + + + diff --git a/jpegxl/jxl-art-basic-reftest-ref.html b/jpegxl/jxl-art-basic-reftest-ref.html new file mode 100644 index 00000000000000..ee9887358447e5 --- /dev/null +++ b/jpegxl/jxl-art-basic-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/jxl-art-basic-reftest.html b/jpegxl/jxl-art-basic-reftest.html new file mode 100644 index 00000000000000..2897ff315396c1 --- /dev/null +++ b/jpegxl/jxl-art-basic-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/layers-basic-reftest-ref.html b/jpegxl/layers-basic-reftest-ref.html new file mode 100644 index 00000000000000..6b426caa649e58 --- /dev/null +++ b/jpegxl/layers-basic-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/layers-basic-reftest.html b/jpegxl/layers-basic-reftest.html new file mode 100644 index 00000000000000..3c65d45fc7ba2e --- /dev/null +++ b/jpegxl/layers-basic-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/lossless-jpeg-transcode.html b/jpegxl/lossless-jpeg-transcode.html new file mode 100644 index 00000000000000..0aad5495040e2d --- /dev/null +++ b/jpegxl/lossless-jpeg-transcode.html @@ -0,0 +1,16 @@ + +JPEG XL: lossless JPEG transcode decode + + + + + + diff --git a/jpegxl/modular-lossless-reftest-ref.html b/jpegxl/modular-lossless-reftest-ref.html new file mode 100644 index 00000000000000..575500420d0b50 --- /dev/null +++ b/jpegxl/modular-lossless-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/modular-lossless-reftest.html b/jpegxl/modular-lossless-reftest.html new file mode 100644 index 00000000000000..b46e176eb1bab3 --- /dev/null +++ b/jpegxl/modular-lossless-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/modular-lossy.html b/jpegxl/modular-lossy.html new file mode 100644 index 00000000000000..c0c662a9ad2bb5 --- /dev/null +++ b/jpegxl/modular-lossy.html @@ -0,0 +1,16 @@ + +JPEG XL: modular lossy + + + + + + diff --git a/jpegxl/orientation-codestream-vs-exif-reftest-ref.html b/jpegxl/orientation-codestream-vs-exif-reftest-ref.html new file mode 100644 index 00000000000000..1dbd8196f9a3ca --- /dev/null +++ b/jpegxl/orientation-codestream-vs-exif-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/orientation-codestream-vs-exif-reftest.html b/jpegxl/orientation-codestream-vs-exif-reftest.html new file mode 100644 index 00000000000000..4e1dab59b4ec29 --- /dev/null +++ b/jpegxl/orientation-codestream-vs-exif-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/orientation-identity-reftest-ref.html b/jpegxl/orientation-identity-reftest-ref.html new file mode 100644 index 00000000000000..57a8cb285ac1ff --- /dev/null +++ b/jpegxl/orientation-identity-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/orientation-identity-reftest.html b/jpegxl/orientation-identity-reftest.html new file mode 100644 index 00000000000000..91ec45a5b2976a --- /dev/null +++ b/jpegxl/orientation-identity-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/orientation-rotate-90-ccw-reftest-ref.html b/jpegxl/orientation-rotate-90-ccw-reftest-ref.html new file mode 100644 index 00000000000000..9a9464ba578416 --- /dev/null +++ b/jpegxl/orientation-rotate-90-ccw-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/orientation-rotate-90-ccw-reftest.html b/jpegxl/orientation-rotate-90-ccw-reftest.html new file mode 100644 index 00000000000000..eebe35c4e50986 --- /dev/null +++ b/jpegxl/orientation-rotate-90-ccw-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/progressive-dc-observable-reftest-ref.html b/jpegxl/progressive-dc-observable-reftest-ref.html new file mode 100644 index 00000000000000..c28575958d556e --- /dev/null +++ b/jpegxl/progressive-dc-observable-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/progressive-dc-observable-reftest.html b/jpegxl/progressive-dc-observable-reftest.html new file mode 100644 index 00000000000000..3c2a9f56ff54de --- /dev/null +++ b/jpegxl/progressive-dc-observable-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/resources/8x8_noise.jxl b/jpegxl/resources/8x8_noise.jxl new file mode 100644 index 00000000000000..78462eab3490ad Binary files /dev/null and b/jpegxl/resources/8x8_noise.jxl differ diff --git a/jpegxl/resources/8x8_noise.png b/jpegxl/resources/8x8_noise.png new file mode 100644 index 00000000000000..dba1fdb03bc443 Binary files /dev/null and b/jpegxl/resources/8x8_noise.png differ diff --git a/jpegxl/resources/basic.jxl b/jpegxl/resources/basic.jxl new file mode 100644 index 00000000000000..1f3ade688af802 Binary files /dev/null and b/jpegxl/resources/basic.jxl differ diff --git a/jpegxl/resources/basic.png b/jpegxl/resources/basic.png new file mode 100644 index 00000000000000..297797d9bc48ff Binary files /dev/null and b/jpegxl/resources/basic.png differ diff --git a/jpegxl/resources/conformance_alpha_nonpremultiplied.jxl b/jpegxl/resources/conformance_alpha_nonpremultiplied.jxl new file mode 100644 index 00000000000000..b12c16fa1ee3e6 Binary files /dev/null and b/jpegxl/resources/conformance_alpha_nonpremultiplied.jxl differ diff --git a/jpegxl/resources/conformance_alpha_nonpremultiplied.png b/jpegxl/resources/conformance_alpha_nonpremultiplied.png new file mode 100644 index 00000000000000..122371cf062f47 Binary files /dev/null and b/jpegxl/resources/conformance_alpha_nonpremultiplied.png differ diff --git a/jpegxl/resources/conformance_animation_spline.jxl b/jpegxl/resources/conformance_animation_spline.jxl new file mode 100644 index 00000000000000..ad5708fb800804 Binary files /dev/null and b/jpegxl/resources/conformance_animation_spline.jxl differ diff --git a/jpegxl/resources/conformance_cmyk_layers.jxl b/jpegxl/resources/conformance_cmyk_layers.jxl new file mode 100644 index 00000000000000..b245224b15a69b Binary files /dev/null and b/jpegxl/resources/conformance_cmyk_layers.jxl differ diff --git a/jpegxl/resources/conformance_cmyk_layers.png b/jpegxl/resources/conformance_cmyk_layers.png new file mode 100644 index 00000000000000..699fd39b8eb74a Binary files /dev/null and b/jpegxl/resources/conformance_cmyk_layers.png differ diff --git a/jpegxl/resources/conformance_sunset_logo.jxl b/jpegxl/resources/conformance_sunset_logo.jxl new file mode 100644 index 00000000000000..0fa25782898868 Binary files /dev/null and b/jpegxl/resources/conformance_sunset_logo.jxl differ diff --git a/jpegxl/resources/conformance_sunset_logo.png b/jpegxl/resources/conformance_sunset_logo.png new file mode 100644 index 00000000000000..2675a0c99caf91 Binary files /dev/null and b/jpegxl/resources/conformance_sunset_logo.png differ diff --git a/jpegxl/resources/generate_resources.sh b/jpegxl/resources/generate_resources.sh index 359b2afd9ea77f..b12e4c49ff9ce9 100755 --- a/jpegxl/resources/generate_resources.sh +++ b/jpegxl/resources/generate_resources.sh @@ -1,5 +1,16 @@ #!/bin/bash -# This generates the png and jxl images needed. +set -eu + +# This generates the png and jxl images needed for JPEG XL WPT tests. +# +# Part 1: generates core 3x3 fixtures from scratch (requires convert, cjxl, djxl). +# Part 2: copies additional fixtures from a local jxl-rs checkout (optional). +# +# Optional jxl-rs fixtures are sourced from: +# ${JXL_RS_TESTDATA:-$HOME/jxl-rs/jxl/resources/test} + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +JXL_RS_CLI="${JXL_RS_CLI:-$HOME/jxl-rs/target/release/jxl_cli}" # Function to check if a command exists command_exists() { @@ -19,6 +30,38 @@ convert_and_compress() { cjxl "${base_name}_${color_space}_lossless.png" "${base_name}_${color_space}_lossless.jxl" -d 0 } +copy_if_exists() { + local src="$1" + local dst="$2" + if [[ -f "$src" ]]; then + cp "$src" "$dst" + echo "copied: $dst" + else + echo "missing: $src" + fi +} + +decode_png_ref_if_exists() { + local src_jxl="$1" + local dst_png="$2" + if [[ -f "$src_jxl" ]]; then + if [[ "$(basename "$src_jxl")" == "conformance_sunset_logo.jxl" && -x "$JXL_RS_CLI" ]]; then + # Keep this PNG aligned with Chromium's jxl-rs decoder output. + "$JXL_RS_CLI" --override-bitdepth 8 "$src_jxl" "$dst_png" >/dev/null 2>&1 + echo "generated with jxl_cli: $dst_png" + elif command -v djxl >/dev/null 2>&1; then + djxl "$src_jxl" "$dst_png" >/dev/null 2>&1 + echo "generated: $dst_png" + else + echo "missing tools: djxl or $JXL_RS_CLI (cannot generate $dst_png)" + fi + else + echo "missing source for png generation: $src_jxl" + fi +} + +# --- Part 1: Core 3x3 fixtures --- + # Check for required tools for tool in convert cjxl djxl; do if ! command_exists "$tool"; then @@ -74,3 +117,96 @@ djxl 3x3_jpeg_recompression.jxl 3x3_jpeg_recompression.png # Cleanup temporary file rm -f temp.jxl 3x3.png 3x3a.png 3x3.jpg 3x3_recovered.jpg + +# --- Part 2: Optional jxl-rs fixtures --- + +JXL_RS_TESTDATA="${JXL_RS_TESTDATA:-$HOME/jxl-rs/jxl/resources/test}" +JXL_RS_CONF="$JXL_RS_TESTDATA/conformance_test_images" + +for f in \ + basic.jxl \ + 8x8_noise.jxl \ + with_icc.jxl \ + orientation1_identity.jxl \ + orientation6_rotate_90_cw.jxl \ + orientation8_rotate_90_ccw.jxl \ + green_queen_modular_e3.jxl \ + green_queen_vardct_e3.jxl \ + has_permutation.jxl \ + progressive_ac.jxl \ + spline_on_first_frame.jxl \ + issue648_palette0.jxl \ + hdr_pq_test.jxl \ + hdr_hlg_test.jxl + do + copy_if_exists "$JXL_RS_TESTDATA/$f" "$SCRIPT_DIR/$f" +done + +copy_if_exists "$JXL_RS_CONF/alpha_nonpremultiplied.jxl" \ + "$SCRIPT_DIR/conformance_alpha_nonpremultiplied.jxl" +copy_if_exists "$JXL_RS_CONF/sunset_logo.jxl" \ + "$SCRIPT_DIR/conformance_sunset_logo.jxl" +copy_if_exists "$JXL_RS_CONF/cmyk_layers.jxl" \ + "$SCRIPT_DIR/conformance_cmyk_layers.jxl" +copy_if_exists "$JXL_RS_CONF/animation_spline.jxl" \ + "$SCRIPT_DIR/conformance_animation_spline.jxl" + +# PNG references used by reftests. +decode_png_ref_if_exists \ + "$SCRIPT_DIR/green_queen_modular_e3.jxl" \ + "$SCRIPT_DIR/green_queen_modular_e3.png" +decode_png_ref_if_exists \ + "$SCRIPT_DIR/conformance_cmyk_layers.jxl" \ + "$SCRIPT_DIR/conformance_cmyk_layers.png" +decode_png_ref_if_exists \ + "$SCRIPT_DIR/orientation6_rotate_90_cw.jxl" \ + "$SCRIPT_DIR/orientation6_rotate_90_cw.png" +decode_png_ref_if_exists \ + "$SCRIPT_DIR/conformance_sunset_logo.jxl" \ + "$SCRIPT_DIR/conformance_sunset_logo.png" +decode_png_ref_if_exists \ + "$SCRIPT_DIR/conformance_alpha_nonpremultiplied.jxl" \ + "$SCRIPT_DIR/conformance_alpha_nonpremultiplied.png" +decode_png_ref_if_exists \ + "$SCRIPT_DIR/has_permutation.jxl" \ + "$SCRIPT_DIR/has_permutation.png" +decode_png_ref_if_exists \ + "$SCRIPT_DIR/basic.jxl" \ + "$SCRIPT_DIR/basic.png" +decode_png_ref_if_exists \ + "$SCRIPT_DIR/orientation1_identity.jxl" \ + "$SCRIPT_DIR/orientation1_identity.png" +decode_png_ref_if_exists \ + "$SCRIPT_DIR/orientation8_rotate_90_ccw.jxl" \ + "$SCRIPT_DIR/orientation8_rotate_90_ccw.png" +decode_png_ref_if_exists \ + "$SCRIPT_DIR/with_icc.jxl" \ + "$SCRIPT_DIR/with_icc.png" +decode_png_ref_if_exists \ + "$SCRIPT_DIR/issue648_palette0.jxl" \ + "$SCRIPT_DIR/issue648_palette0.png" +decode_png_ref_if_exists \ + "$SCRIPT_DIR/spline_on_first_frame.jxl" \ + "$SCRIPT_DIR/spline_on_first_frame.png" +decode_png_ref_if_exists \ + "$SCRIPT_DIR/progressive_ac.jxl" \ + "$SCRIPT_DIR/progressive_ac.png" +decode_png_ref_if_exists \ + "$SCRIPT_DIR/green_queen_vardct_e3.jxl" \ + "$SCRIPT_DIR/green_queen_vardct_e3.png" +decode_png_ref_if_exists \ + "$SCRIPT_DIR/8x8_noise.jxl" \ + "$SCRIPT_DIR/8x8_noise.png" + +# --- Part 3: Hand-crafted edge case bitstreams --- + +# Smallest valid naked JXL codestream (12 bytes, 512x256 black). +# See crbug.com/484214291. +printf '\xff\x0a\xff\x07\x08\x83\x04\x0c\x00\x4b\x20\x18' \ + > "$SCRIPT_DIR/smallest_valid.jxl" +echo "generated: $SCRIPT_DIR/smallest_valid.jxl" +decode_png_ref_if_exists \ + "$SCRIPT_DIR/smallest_valid.jxl" \ + "$SCRIPT_DIR/smallest_valid.png" + +echo "Done: $SCRIPT_DIR" diff --git a/jpegxl/resources/green_queen_modular_e3.jxl b/jpegxl/resources/green_queen_modular_e3.jxl new file mode 100644 index 00000000000000..0e66be847ccd46 Binary files /dev/null and b/jpegxl/resources/green_queen_modular_e3.jxl differ diff --git a/jpegxl/resources/green_queen_modular_e3.png b/jpegxl/resources/green_queen_modular_e3.png new file mode 100644 index 00000000000000..851c81f1178601 Binary files /dev/null and b/jpegxl/resources/green_queen_modular_e3.png differ diff --git a/jpegxl/resources/green_queen_vardct_e3.jxl b/jpegxl/resources/green_queen_vardct_e3.jxl new file mode 100644 index 00000000000000..7b0b8c330062cb Binary files /dev/null and b/jpegxl/resources/green_queen_vardct_e3.jxl differ diff --git a/jpegxl/resources/green_queen_vardct_e3.png b/jpegxl/resources/green_queen_vardct_e3.png new file mode 100644 index 00000000000000..91f4bbfc208227 Binary files /dev/null and b/jpegxl/resources/green_queen_vardct_e3.png differ diff --git a/jpegxl/resources/has_permutation.jxl b/jpegxl/resources/has_permutation.jxl new file mode 100644 index 00000000000000..129ddbd1986975 Binary files /dev/null and b/jpegxl/resources/has_permutation.jxl differ diff --git a/jpegxl/resources/has_permutation.png b/jpegxl/resources/has_permutation.png new file mode 100644 index 00000000000000..c5def3bbe5f2de Binary files /dev/null and b/jpegxl/resources/has_permutation.png differ diff --git a/jpegxl/resources/hdr_hlg_test.jxl b/jpegxl/resources/hdr_hlg_test.jxl new file mode 100644 index 00000000000000..c7a1f342d7c39b Binary files /dev/null and b/jpegxl/resources/hdr_hlg_test.jxl differ diff --git a/jpegxl/resources/hdr_pq_test.jxl b/jpegxl/resources/hdr_pq_test.jxl new file mode 100644 index 00000000000000..7b1042b8052523 Binary files /dev/null and b/jpegxl/resources/hdr_pq_test.jxl differ diff --git a/jpegxl/resources/helpers.js b/jpegxl/resources/helpers.js new file mode 100644 index 00000000000000..8b7b047e3e5776 --- /dev/null +++ b/jpegxl/resources/helpers.js @@ -0,0 +1,19 @@ + +async function loadImage(src) { + const img = new Image(); + await new Promise((resolve, reject) => { + img.onload = resolve; + img.onerror = () => reject(new Error('image load failed: ' + src)); + img.src = src; + }); + return img; +} + +function samplePixel(img, x, y) { + const canvas = document.createElement('canvas'); + canvas.width = img.naturalWidth; + canvas.height = img.naturalHeight; + const ctx = canvas.getContext('2d'); + ctx.drawImage(img, 0, 0); + return ctx.getImageData(x, y, 1, 1).data; +} diff --git a/jpegxl/resources/issue648_palette0.jxl b/jpegxl/resources/issue648_palette0.jxl new file mode 100644 index 00000000000000..15bf1f4827407e Binary files /dev/null and b/jpegxl/resources/issue648_palette0.jxl differ diff --git a/jpegxl/resources/issue648_palette0.png b/jpegxl/resources/issue648_palette0.png new file mode 100644 index 00000000000000..da6a7eb8ec4c18 Binary files /dev/null and b/jpegxl/resources/issue648_palette0.png differ diff --git a/jpegxl/resources/orientation1_identity.jxl b/jpegxl/resources/orientation1_identity.jxl new file mode 100644 index 00000000000000..7e2be0d7757d9a Binary files /dev/null and b/jpegxl/resources/orientation1_identity.jxl differ diff --git a/jpegxl/resources/orientation1_identity.png b/jpegxl/resources/orientation1_identity.png new file mode 100644 index 00000000000000..22e91076b311ea Binary files /dev/null and b/jpegxl/resources/orientation1_identity.png differ diff --git a/jpegxl/resources/orientation6_rotate_90_cw.jxl b/jpegxl/resources/orientation6_rotate_90_cw.jxl new file mode 100644 index 00000000000000..8f1a19529e7343 Binary files /dev/null and b/jpegxl/resources/orientation6_rotate_90_cw.jxl differ diff --git a/jpegxl/resources/orientation6_rotate_90_cw.png b/jpegxl/resources/orientation6_rotate_90_cw.png new file mode 100644 index 00000000000000..9dbe39d6b3d73d Binary files /dev/null and b/jpegxl/resources/orientation6_rotate_90_cw.png differ diff --git a/jpegxl/resources/orientation8_rotate_90_ccw.jxl b/jpegxl/resources/orientation8_rotate_90_ccw.jxl new file mode 100644 index 00000000000000..def949949fa98f Binary files /dev/null and b/jpegxl/resources/orientation8_rotate_90_ccw.jxl differ diff --git a/jpegxl/resources/orientation8_rotate_90_ccw.png b/jpegxl/resources/orientation8_rotate_90_ccw.png new file mode 100644 index 00000000000000..bc4945cb0c6b09 Binary files /dev/null and b/jpegxl/resources/orientation8_rotate_90_ccw.png differ diff --git a/jpegxl/resources/progressive_ac.jxl b/jpegxl/resources/progressive_ac.jxl new file mode 100644 index 00000000000000..97b0f5bcbfa4b0 Binary files /dev/null and b/jpegxl/resources/progressive_ac.jxl differ diff --git a/jpegxl/resources/progressive_ac.png b/jpegxl/resources/progressive_ac.png new file mode 100644 index 00000000000000..3cf484d968fff5 Binary files /dev/null and b/jpegxl/resources/progressive_ac.png differ diff --git a/jpegxl/resources/smallest_valid.jxl b/jpegxl/resources/smallest_valid.jxl new file mode 100644 index 00000000000000..615989a5ca1252 Binary files /dev/null and b/jpegxl/resources/smallest_valid.jxl differ diff --git a/jpegxl/resources/smallest_valid.png b/jpegxl/resources/smallest_valid.png new file mode 100644 index 00000000000000..10f6be9212dd6c Binary files /dev/null and b/jpegxl/resources/smallest_valid.png differ diff --git a/jpegxl/resources/spline_on_first_frame.jxl b/jpegxl/resources/spline_on_first_frame.jxl new file mode 100644 index 00000000000000..6fa417a941ec16 Binary files /dev/null and b/jpegxl/resources/spline_on_first_frame.jxl differ diff --git a/jpegxl/resources/spline_on_first_frame.png b/jpegxl/resources/spline_on_first_frame.png new file mode 100644 index 00000000000000..8306b531fb5b9a Binary files /dev/null and b/jpegxl/resources/spline_on_first_frame.png differ diff --git a/jpegxl/resources/with_icc.jxl b/jpegxl/resources/with_icc.jxl new file mode 100644 index 00000000000000..0dbcf0fe6c999c Binary files /dev/null and b/jpegxl/resources/with_icc.jxl differ diff --git a/jpegxl/resources/with_icc.png b/jpegxl/resources/with_icc.png new file mode 100644 index 00000000000000..4cec8386d4baef Binary files /dev/null and b/jpegxl/resources/with_icc.png differ diff --git a/jpegxl/svg-image-element.html b/jpegxl/svg-image-element.html new file mode 100644 index 00000000000000..7785b21d6bde5a --- /dev/null +++ b/jpegxl/svg-image-element.html @@ -0,0 +1,20 @@ + +JPEG XL integration: SVG image element + + + + + + + + + diff --git a/jpegxl/vardct-large-blocks-reftest-ref.html b/jpegxl/vardct-large-blocks-reftest-ref.html new file mode 100644 index 00000000000000..62cdb70fafccfb --- /dev/null +++ b/jpegxl/vardct-large-blocks-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/vardct-large-blocks-reftest.html b/jpegxl/vardct-large-blocks-reftest.html new file mode 100644 index 00000000000000..39c510ee712896 --- /dev/null +++ b/jpegxl/vardct-large-blocks-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/vardct-small-blocks-reftest-ref.html b/jpegxl/vardct-small-blocks-reftest-ref.html new file mode 100644 index 00000000000000..c690e54cec605b --- /dev/null +++ b/jpegxl/vardct-small-blocks-reftest-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/vardct-small-blocks-reftest.html b/jpegxl/vardct-small-blocks-reftest.html new file mode 100644 index 00000000000000..1690a2a516fbf8 --- /dev/null +++ b/jpegxl/vardct-small-blocks-reftest.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/jpegxl/wide-gamut-adobe-rgb-ref.html b/jpegxl/wide-gamut-adobe-rgb-ref.html new file mode 100644 index 00000000000000..62ebe3294b066c --- /dev/null +++ b/jpegxl/wide-gamut-adobe-rgb-ref.html @@ -0,0 +1,3 @@ + + + diff --git a/jpegxl/wide-gamut-adobe-rgb.html b/jpegxl/wide-gamut-adobe-rgb.html new file mode 100644 index 00000000000000..ed337e1afd92c2 --- /dev/null +++ b/jpegxl/wide-gamut-adobe-rgb.html @@ -0,0 +1,8 @@ + +JPEG XL: Adobe RGB gamut behavior + + + + + + diff --git a/jpegxl/wide-gamut-display-p3.html b/jpegxl/wide-gamut-display-p3.html new file mode 100644 index 00000000000000..0bf79651d6cc81 --- /dev/null +++ b/jpegxl/wide-gamut-display-p3.html @@ -0,0 +1,16 @@ + +JPEG XL: Display P3 gamut behavior + + + + + + diff --git a/jpegxl/wide-gamut-rec2020.html b/jpegxl/wide-gamut-rec2020.html new file mode 100644 index 00000000000000..d7963364917f99 --- /dev/null +++ b/jpegxl/wide-gamut-rec2020.html @@ -0,0 +1,16 @@ + +JPEG XL: Rec.2020 gamut behavior + + + + + +