Skip to content

perf(encode): store channel-API RGB bytes at their wire slot in bulk load (#5378) - #5508

Merged
zackees merged 1 commit into
masterfrom
perf/5378-channel-order-once
Dec 3, 2026
Merged

zackees merged 1 commit into
masterfrom
perf/5378-channel-order-once

Conversation

@zackees

@zackees zackees commented Dec 3, 2026

Copy link
Copy Markdown
Member

Closes #5378. Part of #5492 item #21.

Summary

  • Precompute the 3-byte inverse permutation mOrderSlot alongside mOrder in PixelIterator::setColorOrder() (bounds-checked for mOrder[i] < 3).
  • Pass mOrderSlot directly to PixelControllerVtable::loadScaledRGBBulk so each RGB byte is stored straight at its wire position (out + s0, out + s1, out + s2), removing the separate per-run reorder pass in PixelIterator::loadScaledRGBBulk().

Verification

  • bash lint src/fl/chipsets/encoders/pixel_iterator.h passed.
  • bash test encoders --debug passed (exhaustive byte-for-byte check across all 6 EOrder permutations, 5 strip lengths, 3 brightnesses, and both dither modes).
  • bash test pixel_iterator_any --debug passed.

@coderabbitai

coderabbitai Bot commented Dec 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b7e765b and 4dfb055.

Files selected for processing: 1

  • src/fl/chipsets/encoders/pixel_iterator.h
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Memory usage (this PR vs. its merge base)

Change in examples/Blink per target. The left number is this PR's image flash / attributed RAM in bytes; the colored delta is the change from the merge base (red ↑ is larger, green ↓ is smaller, Same is unchanged).

Target FLASH [bytes] RAM [bytes]
attiny85 2,460 (Same) 136 (Same)

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.

perf(encode): resolve colour order once per strip (experiment; punt if it adds complexity) (#5375)

1 participant