Skip to content

Integrate remaining JPEG and native CPU codec optimizations - #118

Merged
jcwal1516 merged 6 commits into
mainfrom
perf/remaining-cpu-codec-optimizations
Sep 27, 2026
Merged

jcwal1516 merged 6 commits into
mainfrom
perf/remaining-cpu-codec-optimizations

Conversation

@jcwal1516

Copy link
Copy Markdown
Member

Integrate the remaining local CPU codec changes: retained JPEG entropy state and NEON conversion, extended/lossless/progressive JPEG decoding, and native bitplane scanning and subsampled placement. Preserve the nonzero-origin fuzz regression fix from #117 when combining the optimized placement path.

Stacked on #117. The resulting source tree retains the previously uncommitted work; differences from the preserved local snapshot are the decoder regression and the repaired trusted-workflow pins.

Validation: 1,631 tests passed across j2k-jpeg and j2k-native, with 4 existing ignored tests. Formatting and both libraries' all-feature Clippy checks passed. No new speedup claim is made.

…version

- Decode MCU rows against local copies of the bit reader and DC predictors
  so the accumulator stays in registers; cold refill paths take and return
  the reader by value.
- Refill the bit accumulator eight bytes at a time when the window has no
  0xFF, falling back to the byte-wise path for stuffing, markers, and the
  input tail.
- Replace the per-coefficient touched-index list and activity state machine
  with one AC flag and an OR of natural indices.
- Run NEON YCbCr->RGB in exact 16-bit lanes (constants split as 65536*k +
  remainder), sixteen pixels per iteration, and test it against the scalar
  converter for every chroma pair.
@jcwal1516
jcwal1516 changed the base branch from fix/subsampled-component-origin to main September 27, 2026 01:05
An error occurred while trying to automatically change base from fix/subsampled-component-origin to main September 27, 2026 01:05
@jcwal1516 jcwal1516 mentioned this pull request Sep 27, 2026
@jcwal1516
jcwal1516 merged commit 7e3dd59 into main Sep 27, 2026
22 of 24 checks passed
@jcwal1516
jcwal1516 deleted the perf/remaining-cpu-codec-optimizations branch September 27, 2026 01:13
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