-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Background
Currently, the ESP-IDF display driver swaps bytes for each pixel to match TFT_eSPI's behavior when pushColors is called with swap=true. This byte swapping is done in software in the flush function.
Investigation Needed
-
Is byte swapping required?
- Check if the ILI9341 display controller or the specific display module requires byte swapping
- Determine if this is a hardware requirement or just matching TFT_eSPI's behavior
- Test if removing byte swapping causes color issues
-
Performance Optimization
- Byte swapping is currently done in software for every pixel, which adds CPU overhead
- Investigate if we can:
- Configure the display controller to accept native byte order (avoid swapping)
- Use hardware features (DMA, SPI) to handle byte swapping
- Optimize the byte swap operation (SIMD, lookup tables, etc.)
- Pre-swap image data during conversion instead of runtime
-
Image Display Performance
- Current implementation swaps bytes during flush, which happens for every LVGL refresh
- Consider pre-swapping image data during PNG to RGB565 conversion
- This would eliminate runtime byte swapping for static images (logos, splashscreen)
Related Code
src/lvgl_display.cpp:lvgl_display_flush()function performs byte swappingtools/convert_logo.py: Image conversion script (could be modified to pre-swap bytes)
Expected Outcome
Determine the most efficient approach:
- If byte swapping is required: optimize the swap operation or move it to image conversion
- If byte swapping is not required: remove it to improve performance
Metadata
Metadata
Assignees
Labels
No labels