3#include <TinyGPU/DisplayDriver.h>
4#include <TinyGPU/Boards.h>
60 if (!
p_board->begin())
return false;
128 LOGE(
"OutputTinyGPU: invalid video size: %d x %d", (
int)
info_.
width,
139 LOGE(
"OutputTinyGPU: frame too small: %d < %d bytes", (
int)len,
167 SurfaceWithExternalBuffer<RGB565> frame;
168 frame.setExternalBuffer(
const_cast<uint8_t*
>(data), len);
191 size_t pixels = (
size_t)width * height;
193 for (
int y = 0; y < height; y++) {
196 for (
int x = 0; x < width; x++) {
197 dstRow[x] = srcRow[xLut[x]];
200 SurfaceWithExternalBuffer<RGB565> frame;
203 frame.resize(width, height);
214 for (
int y = 0; y < height; y++) {
216 for (
int x = 0; x < width; x++) {
219 SurfaceWithExternalBuffer<RGB565> row;
238 for (
int x = 0; x < width; x++) {
242 for (
int y = 0; y < height; y++) {
263 const uint8_t* vPlane = uPlane + (
size_t)(srcW / 2) * (srcH / 2);
264 size_t srcPixels = (
size_t)srcW * srcH;
266 for (
int y = 0; y < srcH; y++) {
271 for (
int x = 0; x < srcW; x++) {
272 dstRow[x] =
yuvToRgb565(yRow[x], uRow[x / 2], vRow[x / 2]);
281 SurfaceWithExternalBuffer<RGB565> frame;
283 srcPixels *
sizeof(
RGB565));
284 frame.resize(srcW, srcH);
293 int d = (
int)U - 128;
294 int e = (
int)V - 128;
295 int r = (298 * c + 409 * e + 128) >> 8;
296 int g = (298 * c - 100 * d - 208 * e + 128) >> 8;
297 int b = (298 * c + 516 * d + 128) >> 8;
298 r = r < 0 ? 0 : (r > 255 ? 255 : r);
299 g = g < 0 ? 0 : (g > 255 ? 255 : g);
300 b = b < 0 ? 0 : (b > 255 ? 255 : b);
307 SurfaceRGB565 band(width,
kBandHeight, FontRGB565);
309 band.clear(
RGB565(0, 0, 0));
#define HIGH
Definition Arduino.h:46
#define OUTPUT
Definition Arduino.h:38
#define LOGE(...)
Definition AudioLoggerIDF.h:30