Skip to content

feat: replace the Kodak demo photographs with three from CID22 - #57

Merged
nucliweb merged 4 commits into
mainfrom
feat/cid22-demo-photos
Oct 19, 2026
Merged

nucliweb merged 4 commits into
mainfrom
feat/cid22-demo-photos

Conversation

@nucliweb

Copy link
Copy Markdown
Owner

Why

The demo set's photographs were kodim04, kodim19 and kodim23 from the Kodak suite. kodim04 is a close-up portrait of a single woman, the kind of test image that has drawn criticism in the imaging community. The set now uses photographs from CID22 instead, with the one photo of people showing two people.

What

  • compare/demos/fetch.sh: downloads the CID22 validation set without distorted images (17 MB zip, SHA-256 checked) only when a photo is missing, and extracts cid22-friends.png (5055743), cid22-church.png (2936831) and cid22-blossoms.png (5458393), each SHA-256 checked. Tested: first fetch, re-extraction of a damaged file, and a wrong checksum (fails and removes the file).
  • compare/demos/README.md: sources, the CC BY-SA 4.0 license, the paper citation, and the note that the references are downscaled to 512×512 (which hides compression in their sources). Reports that embed them carry the same license.
  • compare/demos/baseline.json: regenerated from this PR's CI amd64 results.csv (second commit).
  • compare/README.md: the RD example (now cid22-friends.png, image 0.4.0) and the opt-in variant lessons, with the photo rows re-measured in the image version each table names (0.2.0, 0.3.0 for SVT-AV1). The texture and graphics rows are unchanged (deterministic encoders; re-runs reproduce them). The extra measurements behind the text are repeated on all seven images: HEIC decoded with sips (macOS 27.0.1), JPEG with -sample 2x2 and -sample 1x1 forced on both encoders, and encode times as the median of five runs.

What the new photographs change in the lessons

These are modern photos downscaled to 512 px, with more color detail per pixel than the Kodak film scans, so 4:2:0 costs more on them:

  • WebP sharp YUV: plain WebP reaches ss2 90 on none of the three photos; sharp YUV reaches it on two (−9 to −10% vs plain WebP's best attempt).
  • HEIC 4:4:4: −38% on the people photo, but +5% on the church (no longer "never larger"); only 4:4:4 reaches 90 on the blossoms. sips decodes 4:2:0 1.5–8.4 points lower on six of seven images.
  • AVIF rav1e: unchanged conclusion (−2%, −3%, +4% vs aom on the photos); 2–26× slower.
  • SVT-AV1: aom and SVT-AV1 trade places at 4:2:0 on photos (+15%, −17%); on the blossoms photo every 4:2:0 encoder fails, so "4:2:0 is acceptable" is a property of the image, not of photographs.
  • libjpeg-turbo / mozjpeg: jpegli still wins everywhere. libjpeg-turbo at 4:4:4 is smaller than its own 4:2:0 default wherever both reach the target, and mozjpeg is 5–28% larger than libjpeg-turbo at matched 4:4:4 on photos, texture and UI (smaller at 4:2:0 on six of seven). So mozjpeg's loss on photographs comes from its 4:4:4 encode at these settings, not from the subsampling default.

Verification

  • node --test: 96 pass.
  • The regression gate's first run on this PR fails as expected (the baseline lists the Kodak images); it is green after the baseline commit.

The demo set's photographs were three Kodak images, one of them a single-woman close-up portrait, the kind of test image that has drawn criticism. They are replaced with three references from the CID22 validation set (CC BY-SA 4.0), the dataset ssimulacra2 was tuned and validated against: two people at a table (5055743), a church with grass (2936831) and red blossoms over a sky gradient (5458393). fetch.sh downloads the 17 MB validation zip once, checks its SHA-256 and extracts the three, each checked too.

The lesson tables in compare/README.md are re-measured for the new photographs in the image version each table names, and the extra measurements behind their text (HEIC decoded with sips, JPEG at matched subsampling, encode times as the median of five runs) are repeated on all seven images. The conclusions change where the photographs do: these photos pack more color detail than the Kodak film scans, so 4:2:0 costs more on them. Plain WebP reaches ssimulacra2 90 on none of them, every 4:2:0 encoder fails on the blossoms photograph, and at 4:4:4 mozjpeg is larger than libjpeg-turbo, so mozjpeg's loss on photographs comes from its 4:4:4 encode, not from its subsampling default.
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codec comparison ✅ no size or quality regression

📥 Download the codec report (unzip and open report.html locally). Available until 2027-01-16, when GitHub deletes the artifact.

Size check
Size regression check (target 90, size tolerance 2.0%, quality tolerance 0.5 ssimulacra2)

  ok         cid22-blossoms.png  JPEG XL  base 105038 → 105038  (+0.00%)  ss2 90.08 → 90.08  (+0.00)
  ok         cid22-blossoms.png  WebP  base 118162 → 118162  (+0.00%)  ss2 76.87 → 76.87  (+0.00)
  ok         cid22-blossoms.png  AVIF  base 128030 → 128030  (+0.00%)  ss2 89.75 → 89.75  (+0.00)
  ok         cid22-blossoms.png  jpegli  base 137045 → 137045  (+0.00%)  ss2 90.11 → 90.11  (+0.00)
  ok         cid22-blossoms.png  mozjpeg  base 164234 → 164234  (+0.00%)  ss2 90.20 → 90.20  (+0.00)
  ok         cid22-blossoms.png  HEIC  base 194761 → 194761  (+0.00%)  ss2 82.22 → 82.22  (+0.00)
  ok         cid22-church.png  JPEG XL  base 61171 → 61171  (+0.00%)  ss2 89.85 → 89.85  (+0.00)
  ok         cid22-church.png  AVIF  base 68127 → 68127  (+0.00%)  ss2 89.73 → 89.73  (+0.00)
  ok         cid22-church.png  HEIC  base 71021 → 71021  (+0.00%)  ss2 90.11 → 90.11  (+0.00)
  ok         cid22-church.png  jpegli  base 78183 → 78183  (+0.00%)  ss2 89.74 → 89.74  (+0.00)
  ok         cid22-church.png  WebP  base 94246 → 94246  (+0.00%)  ss2 88.91 → 88.91  (+0.00)
  ok         cid22-church.png  mozjpeg  base 99280 → 99280  (+0.00%)  ss2 89.89 → 89.89  (+0.00)
  ok         cid22-friends.png  JPEG XL  base 52793 → 52793  (+0.00%)  ss2 89.83 → 89.83  (+0.00)
  ok         cid22-friends.png  AVIF  base 54356 → 54356  (+0.00%)  ss2 89.97 → 89.97  (+0.00)
  ok         cid22-friends.png  jpegli  base 64424 → 64424  (+0.00%)  ss2 89.80 → 89.80  (+0.00)
  ok         cid22-friends.png  HEIC  base 79196 → 79196  (+0.00%)  ss2 90.01 → 90.01  (+0.00)
  ok         cid22-friends.png  WebP  base 87218 → 87218  (+0.00%)  ss2 89.44 → 89.44  (+0.00)
  ok         cid22-friends.png  mozjpeg  base 91561 → 91561  (+0.00%)  ss2 90.25 → 90.25  (+0.00)
  ok         corporate-memphis.png  AVIF  base 19074 → 19074  (+0.00%)  ss2 89.87 → 89.87  (+0.00)
  ok         corporate-memphis.png  JPEG XL  base 44539 → 44539  (+0.00%)  ss2 90.24 → 90.24  (+0.00)
  ok         corporate-memphis.png  WebP  base 46758 → 46758  (+0.00%)  ss2 85.87 → 85.87  (+0.00)
  ok         corporate-memphis.png  HEIC  base 68663 → 68663  (+0.00%)  ss2 88.01 → 88.01  (+0.00)
  ok         corporate-memphis.png  jpegli  base 80411 → 80411  (+0.00%)  ss2 89.92 → 89.92  (+0.00)
  ok         corporate-memphis.png  mozjpeg  base 100129 → 100129  (+0.00%)  ss2 89.62 → 89.62  (+0.00)
  ok         forest-leaves.png  JPEG XL  base 626391 → 626391  (+0.00%)  ss2 89.67 → 89.67  (+0.00)
  ok         forest-leaves.png  HEIC  base 678675 → 678675  (+0.00%)  ss2 89.87 → 89.87  (+0.00)
  ok         forest-leaves.png  jpegli  base 741875 → 741875  (+0.00%)  ss2 89.87 → 89.87  (+0.00)
  ok         forest-leaves.png  WebP  base 753448 → 753448  (+0.00%)  ss2 89.52 → 89.52  (+0.00)
  ok         forest-leaves.png  AVIF  base 824552 → 824552  (+0.00%)  ss2 90.45 → 90.45  (+0.00)
  ok         forest-leaves.png  mozjpeg  base 1119980 → 1119980  (+0.00%)  ss2 89.60 → 89.60  (+0.00)
  ok         pipeline-diagram.png  AVIF  base 62798 → 62798  (+0.00%)  ss2 90.07 → 90.07  (+0.00)
  ok         pipeline-diagram.png  WebP  base 63042 → 63042  (+0.00%)  ss2 73.46 → 73.46  (+0.00)
  ok         pipeline-diagram.png  JPEG XL  base 75252 → 75252  (+0.00%)  ss2 89.83 → 89.83  (+0.00)
  ok         pipeline-diagram.png  HEIC  base 97122 → 97122  (+0.00%)  ss2 73.38 → 73.38  (+0.00)
  ok         pipeline-diagram.png  jpegli  base 113660 → 113660  (+0.00%)  ss2 89.27 → 89.27  (+0.00)
  ok         pipeline-diagram.png  mozjpeg  base 180740 → 180740  (+0.00%)  ss2 89.86 → 89.86  (+0.00)
  ok         report-ui.png  AVIF  base 64121 → 64121  (+0.00%)  ss2 89.82 → 89.82  (+0.00)
  ok         report-ui.png  JPEG XL  base 98049 → 98049  (+0.00%)  ss2 89.61 → 89.61  (+0.00)
  ok         report-ui.png  WebP  base 117598 → 117598  (+0.00%)  ss2 77.40 → 77.40  (+0.00)
  ok         report-ui.png  jpegli  base 169432 → 169432  (+0.00%)  ss2 89.92 → 89.92  (+0.00)
  ok         report-ui.png  HEIC  base 174308 → 174308  (+0.00%)  ss2 83.19 → 83.19  (+0.00)
  ok         report-ui.png  mozjpeg  base 218438 → 218438  (+0.00%)  ss2 90.25 → 90.25  (+0.00)

OK: no size or quality regressions.

Rebuilt from the CI amd64 results.csv of this pull request (42 image and codec pairs): the three Kodak entries are replaced by the three CID22 photographs, and the other four images are unchanged.
Cites Jake Archibald's JPEG XL vs AVIF for web use-cases where it bears on the method: the RD example shows the winner changing with the target (AVIF ahead from 70 to 85, JPEG XL from 90), as his photographs do; the matched-effort section notes that a ranking at the defaults is not one at maximum effort; the scope section says ssimulacra2 comes from the JPEG XL authors and names ColorVideoVDP as an independent cross-check; and the SVT-AV1 and JPEG lessons cite his "4:2:0 shouldn't be your default".
docs: note how target, effort and metric shape the comparison
@nucliweb
nucliweb merged commit 7d4e70c into main Oct 19, 2026
2 checks passed
@nucliweb
nucliweb deleted the feat/cid22-demo-photos branch October 19, 2026 06:00
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.

1 participant