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
2025-05-02 09:45:32 -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:49 -06:00
2024-08-26 18:51:49 -06:00
2025-02-15 19:07:10 -07:00
2024-08-26 18:51:49 -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
2025-05-01 05:56: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
2025-05-01 05:56: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:49 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:49 -06:00
2025-07-12 14:29:06 +02:00
2022-10-31 14:47:33 -04: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:48 -06:00
2024-08-26 18:51:48 -06:00
2024-10-27 17:24:13 -06:00
2024-05-06 15:05:04 -06:00
2025-02-16 14:11:28 +00:00
2025-01-15 06:51:24 -07:00
2024-08-26 18:51:48 -06:00
2025-09-15 03:26:35 -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:49 -06:00
2024-08-26 18:51:48 -06:00
2025-10-07 09:54:43 -06:00
2025-02-16 14:11:28 +00: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:49 -06:00
2024-08-26 18:51:49 -06:00
2024-05-06 15:05:04 -06:00
2024-08-26 18:51:48 -06:00
2025-02-15 19:07:10 -07: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-09-30 19:19:07 -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
2025-09-04 14:23:55 -06:00
2024-09-09 17:18:04 +02: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:49 -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:49 -06:00
2024-12-05 11:00:23 -07:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:49 -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: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: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-11-17 13:12:54 -06:00
2025-05-16 14:01:11 +02:00
2025-09-02 08:51:26 -06:00
2024-08-26 18:51:49 -06:00
2024-08-26 18:51:49 -06:00
2025-02-08 13:50:15 +00:00
2024-08-26 18:51:49 -06:00
2025-02-08 13:50:15 +00:00
2024-08-26 18:51:48 -06:00
2025-05-27 04:57:06 +01:00
2025-05-02 09:45:32 -06:00
2025-10-09 17:14:48 +01:00
2025-06-30 08:34:03 -06:00
2024-08-26 18:51:48 -06:00
2024-08-26 18:51:48 -06:00
2024-10-23 06:52:38 +02:00