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