7#include "JPEGDecoder.h"
61 LOGW(
"MJPEGDecoder: unsupported VideoFormat %d - only RGB565",
77 bool begin()
override {
return true; }
78 void end()
override {}
83 size_t write(
const uint8_t *data,
size_t len)
override {
135 size_t needed = (size_t)max_x * max_y * 2;
139 LOGE(
"MJPEGDecoder: frame buffer allocation failed");
148 uint32_t win_w = std::min((uint32_t)mcu_w, max_x - mcu_x);
149 uint32_t win_h = std::min((uint32_t)mcu_h, max_y - mcu_y);
150 for (uint32_t row = 0; row < win_h; row++) {
151 memcpy(dst + (mcu_y + row) * max_x + mcu_x, src + row * mcu_w,
152 win_w *
sizeof(uint16_t));
#define LOGW(...)
Definition AudioLoggerIDF.h:29
#define LOGE(...)
Definition AudioLoggerIDF.h:30
virtual size_t write(const uint8_t *data, size_t len)
Definition Arduino.h:120
VideoFormat
Video codec/pixel-format identifier, shared by two unrelated uses: the (single) video stream of a con...
Definition Video.h:43