Files
u-boot/test/dm
Simon Glass dd4b6ad746 test: video: Fix 16bpp BMP pixel format conversion
The video_write_bmp() function was writing 16bpp framebuffer data
directly to BMP files without proper format conversion. The framebuffer
uses RGB565 format (5 red, 6 green, 5 blue), but standard Windows BMP
16bpp format uses RGB555 (5 red, 5 green, 5 blue).

Convert pixels from RGB565 to RGB555 by:
- Extracting the 5-bit red, 6-bit green, and 5-bit blue components
- Dropping the LSB of the green channel to convert from 6 to 5 bits
- Reconstructing as RGB555 with the same R/B order

This fixes incorrect colors in BMP output files (e.g., orange appearing
as blue).

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-09 17:14:48 +01:00
..
2024-09-12 17:35:37 +02:00
2025-08-04 06:50:38 -06:00
2024-09-12 17:35:37 +02:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:49 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:49 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2025-06-28 07:53:25 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2025-06-28 07:53:25 -06:00
2024-08-26 18:51:49 -06:00
2024-08-26 18:51:49 -06:00
2024-08-26 18:51:49 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2025-05-27 04:57:06 +01:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00