src.nth.io/

summaryrefslogtreecommitdiff
path: root/main/jpeg_decoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'main/jpeg_decoder.h')
-rw-r--r--main/jpeg_decoder.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/main/jpeg_decoder.h b/main/jpeg_decoder.h
index 9c5bf89..2ac436d 100644
--- a/main/jpeg_decoder.h
+++ b/main/jpeg_decoder.h
@@ -7,7 +7,7 @@
#include "esp_err.h"
#define JPEG_DECODER_MAX_INPUT_BYTES (1024 * 1024) // 1 MB
-#define JPEG_DECODER_MAX_OUTPUT_BYTES (800 * 480 * 2) // RGB565 panel native
+#define JPEG_DECODER_MAX_OUTPUT_BYTES (800 * 480 * 3) // BGR888 panel native
// One-time setup of the ESP32-P4 hardware JPEG decoder. Allocates reusable
// DMA-aligned input + output buffers in PSRAM.
@@ -23,11 +23,12 @@ void jpeg_decoder_unlock(void);
// JPEG_DECODER_MAX_INPUT_BYTES. Caller fills before calling decode.
void *jpeg_decoder_input_buffer(void);
-// Decode the JPEG sitting in the input buffer. Fills out_rgb565 with a
-// pointer to the decoded RGB565 image and reports its width/height in
-// pixels. The output buffer is owned by the decoder — valid only until
-// the next jpeg_decoder_unlock().
+// Decode the JPEG sitting in the input buffer. Fills out_bgr888 with a
+// pointer to the decoded 24-bit image (3 bytes/pixel, BGR memory order so
+// the DSI engine + TC358762 + Pi panel render channels correctly) and
+// reports the image's width/height in pixels. The output buffer is owned
+// by the decoder — valid only until the next jpeg_decoder_unlock().
esp_err_t jpeg_decoder_decode(size_t jpeg_len,
- void **out_rgb565,
+ void **out_bgr888,
uint16_t *out_width,
uint16_t *out_height);