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