Repository navigation
Regenerate progressive_libjpeg.jpg from a committed generator (#6) - #25
Merged
Merged
Conversation
The fixture's pixel source was never recorded. It is replaced by a synthetic 32x32 gradient that tools/generate_progressive_libjpeg.py produces through Pillow/libjpeg, deterministically, with the old file's exact marker layout (the DC-only first scan names AC table 0 before any DHT defines it), so tests/progressive.rs still covers the regression it was added for. The new image exposed that on x86 a std build uses the arch YCbCr->RGB kernel even without simd, which rounds by up to 2 differently from the scalar converter (the IDCT and grayscale output are bit-identical). The golden test now pins the platform_independent decode separately, which also makes --all-features pass. CHANGES.md corrects the 0.4.0 note about which host build is a chip's oracle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecode oracle Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6.
The pixel source of
tests/fixtures/progressive_libjpeg.jpgwas never recorded, so its redistribution terms couldn't be stated. This PR replaces it with an image whose provenance is on record:tools/generate_progressive_libjpeg.pybuilds a synthetic 32x32 RGB gradient, computed in the script with no external image, and encodes it as a progressive JPEG with Pillow/libjpeg (quality 75). The output is deterministic: two runs are byte-identical.tests/progressive.rsstill covers the regression it exists for. The first scan,SOS c1/c2/c3 Ss=0 Se=0, names AC table 0 before any DHT defines it, followed by the same 10-scan progressive script with DHTs before each scan.Finding along the way. The golden test pins a hash of the decoded fixture. With the new image,
std,platform_independentdecodes differently fromstd-without-simd, by ±2 on 51 of 3,072 bytes. I localised it: grayscale decodes are bit-identical, so the IDCT matches. The difference is the YCbCr->RGB step. On x86, astdbuild dispatches to the SSSE3/AVX2 colour converter even withoutsimd, and that kernel rounds differently from the scalarycbcr_to_rgb(inherited from upstream jpeg-decoder). The old image just happened not to show it.platform_independentdecoded row separately, which also fixes the previously failing--all-featuresrun.platform_independent/no_stdbuild, notstdwithoutsimd.Tests: all pass locally on every arm CI runs plus
--all-features:--release--release --no-default-features --features std,platform_independent--release --no-default-features --features std--release --no-default-features(no_std)--all-featurescargo fmt --checkandcargo clippy --release --all-targets -D warningsare clean.🤖 Generated with Claude Code