FastLED 3.9.15
Loading...
Searching...
No Matches
downscale.h
Go to the documentation of this file.
1
2#pragma once
3
4/*
5Experimental bilinearn downscaling algorithm. Not tested yet and completely
6"vibe-coded" by ai.
7
8If you use this and find an issue then please report it.
9*/
10
11#include "fl/int.h"
12#include "crgb.h"
13
14namespace fl {
15
16class XYMap;
17
18void downscale(const CRGB *src, const XYMap &srcXY, CRGB *dst,
19 const XYMap &dstXY);
20
21// Optimized versions for downscaling by 50%. This is here for testing purposes
22// mostly. You should prefer to use downscale(...) instead of calling these
23// functions. It's important to note that downscale(...) will invoke
24// downscaleHalf(...) automatically when the source and destination are half the
25// size of each other.
26void downscaleHalf(const CRGB *src, fl::u16 srcWidth, fl::u16 srcHeight,
27 CRGB *dst);
28void downscaleHalf(const CRGB *src, const XYMap &srcXY, CRGB *dst,
29 const XYMap &dstXY);
30void downscaleArbitrary(const CRGB *src, const XYMap &srcXY, CRGB *dst,
31 const XYMap &dstXY);
32
33} // namespace fl
Defines the red, green, and blue (RGB) pixel struct.
void downscale(const CRGB *src, const XYMap &srcXY, CRGB *dst, const XYMap &dstXY)
void downscaleArbitrary(const CRGB *src, const XYMap &srcXY, CRGB *dst, const XYMap &dstXY)
Definition downscale.cpp:82
void downscaleHalf(const CRGB *src, fl::u16 srcWidth, fl::u16 srcHeight, CRGB *dst)
Definition downscale.cpp:18
IMPORTANT!
Definition crgb.h:20