Skip to content

Auto-detect RGB565 endianness for RAW images to fix corrupted display#27

Open
Inter-Raptor wants to merge 1 commit into
mainfrom
codex/verifier-l-affichage-des-images-boot.raw-et-home.bg.raw-conz3l
Open

Auto-detect RGB565 endianness for RAW images to fix corrupted display#27
Inter-Raptor wants to merge 1 commit into
mainfrom
codex/verifier-l-affichage-des-images-boot.raw-et-home.bg.raw-conz3l

Conversation

@Inter-Raptor
Copy link
Copy Markdown
Owner

Motivation

  • Some RAW assets are produced with different RGB565 byte orders which caused strongly corrupted/noisy rendering when a fixed byte order was assumed.
  • The launcher must reliably display icon.raw/title.raw/boot/background RAW files without manual re-conversion.

Description

  • Added RawByteOrder utilities and a readRawPixelFromBytes() helper to decode 16-bit RGB565 pixels in either endianness in display_manager.cpp.
  • Implemented detectRawByteOrder() which samples a few rows and chooses between RGB565_LE and RGB565_BE by computing a local smoothness score.
  • Updated displayDrawRAW() to call the detector, decode pixels according to the detected order, and log the detected format to the serial console.

Testing

  • Ran automated repository inspections including rg searches for RAW-related usages and file occurrences which completed successfully.
  • Display file contents were examined with sed -n and nl -ba to verify the new functions and the updated displayDrawRAW() loop.
  • Performed a diff review of the modified display_manager.cpp to confirm the expected changes were applied.
  • No embedded build/flash was executed in this environment, so runtime validation on hardware remains to be performed (serial logs added to help runtime verification).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant