Skip to content

Partial delta frames and band shifts - #5

Merged
Circuit-Overtime merged 1 commit into
mainfrom
partial
Nov 12, 2026
Merged

Circuit-Overtime merged 1 commit into
mainfrom
partial

Conversation

@Circuit-Overtime

Copy link
Copy Markdown
Contributor

Brings in partial deltas (frame type 3, one shift per band) from elixpo/rv565#45 (ports/circuitpython).

What changes

  • The reader validates partial deltas when indexing. It inflates only the changed bands and XORs them in place, using a one-band scratch for shifted bands.
  • New Clip.changed_lines() and Clip.dirty_lines().
  • DirectPlayer sends only the changed rows, with one ST7789 row window per run. Player copies only the changed rows into the bitmap, so displayio refreshes only that area.
  • PlayStats.rows_updated.
  • tests/data/v7 and tests/rv565_reference.py are refreshed from rv565 (53 valid and 29 invalid files).
  • The README has a partial delta section.

Tested

  • python3 -m unittest discover -s tests: 86 tests pass. They include a fake panel that replays CASET/RASET/RAMWR and must match every frame, while partial frames send exactly the changed rows.
  • ruff is not clean, as on main; this adds similar complexity warnings.
  • Not run on a board. On a Pico 2 with an ST7789, check:
    • row-window updates look right;
    • bitmaptools.blit dirty areas;
    • XOR and shift speed.

Release with the other channels as 2.0.0.

Read partial deltas, including per-band shifts: the index checks band
height, mask, shifts and stored size; decoding inflates only the changed
bands, predicts shifted bands from a one-band scratch copy and XORs the
residuals in place. Clip.changed_lines() matches the reference and
Clip.dirty_lines() merges it across skipped frames.

DirectPlayer sends one row window and write per run of changed bands;
Player copies only the changed rows into the bitmap (readinto into a
scratch band, then bitmaptools.blit), so displayio refreshes only that
area. PlayStats.rows_updated counts rows drawn.

Updates tests/data/v7 (53 valid, 29 invalid vectors) and
tests/rv565_reference.py from github.com/elixpo/rv565.
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 circuitpython-rv565 | 🛠️ Build #35821873 | 📁 Comparing 22233f8 against latest (0be0224)

  🔍 Preview build  

3 files changed
± api.html
± genindex.html
± index.html

@Circuit-Overtime
Circuit-Overtime merged commit 035d9b8 into main Nov 12, 2026
1 of 3 checks passed
@Circuit-Overtime
Circuit-Overtime deleted the partial branch November 12, 2026 06:43
adafruit-adabot pushed a commit to adafruit/CircuitPython_Community_Bundle that referenced this pull request Nov 13, 2026
Updating https://github.com/elixpo/CircuitPython_RV565 to 2.0.0 from 1.2.0:
  > Partial delta frames and band shifts (elixpo/CircuitPython_RV565#5)
  > 2.0.0: read RV565 format version 7 (elixpo/CircuitPython_RV565#4)
  > Merge pull request elixpo/CircuitPython_RV565#3 from elixpo/docs/write-ups-and-submissions
  > Merge pull request elixpo/CircuitPython_RV565#2 from elixpo/docs/oreo-family
  > Merge pull request elixpo/CircuitPython_RV565#1 from elixpo/ci/release-permissions

Updating https://github.com/adafruit/CircuitPython_Community_Bundle/circuitpython_community_auto_library_list.md to NA from NA:
  > Added the following libraries: CircuitPython_ERDI_LRF
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