Repository navigation
docs: state what the padded jp2c and unknown-box rows measure (#776) - #777
Merged
Merged
Conversation
…e Arc header on 32-bit (#776) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhjiZ6QTR3gTC3QaD9m2QV
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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 #776
Measured on main (30d0858) with the doc's method: release program calling
decodeontests/fixtures/jp2_sycc_422_even.jp2plus 16 MiB of boxes, peak from/usr/bin/time, held from RSS after minus before. Load 5 to 6 (1-minute),nice -n 19,-j 2. All MiB, peak / held.xml(9 B) after ajp2cholding an 8-byte box afterEOCxml(9 B) inside ajp2cthat runs pastEOCjp2cjp2ccolr(15 B) afterjp2c, unpadded and paddedThe 146.5 / 86.0 figure does not reproduce for 8-byte
xml,uuid, unknown, or zero boxes as the box afterEOC.Code evidence:
jp2cdoes make two walks:src/jp2/mod.rs:353-366(box_longer, thenwalk_after_codestream_keptfrom the codestream end and from the box end). It costs time only (16 MiB of 8-byte unknown boxes: 0.01 s unpadded, 0.02 s padded). Records are not doubled: the first walk passesreports = !box_longer(mod.rs:356) and keeps onlyCHECKEDboxes (src/jp2/after.rs:591, push atsrc/jp2/boxes.rs:663-665); the second passeschecks = false(mod.rs:365) and keeps only reported boxes.reported_after(boxes.rs:319-326, push atboxes.rs:660-662) or the type is inCHECKED; an unknown box only advanceskept.pos(boxes.rs:666).Docs changed:
docs/resource-bounds.md(JP2 box records text, table rows, the closing paragraph),SECURITY.md(drops "more if ... walked twice", states which boxes after the codestream get a record). The README does not cite these rows. The 8-byteArcheader on 32-bit wording is added in the five files the comment names (SECURITY.md,docs/resource-bounds.mdtwice,docs/incremental-decoding.md,src/incremental.rs,src/pipeline/header.rs; the last two are comments only).Gate: fmt, clippy (all-targets and lib, -D warnings), test (2081 passed), cargo deny: all pass on stable.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EhjiZ6QTR3gTC3QaD9m2QV