FastLED 3.9.15
Loading...
Searching...
No Matches

◆ bilinearExpand()

void fl::bilinearExpand ( const CRGB * input,
CRGB * output,
uint16_t inputWidth,
uint16_t inputHeight,
fl::XYMap xyMap )
inline

Definition at line 37 of file bilinear_expansion.h.

38 {
39 uint16_t outputWidth = xyMap.getWidth();
40 uint16_t outputHeight = xyMap.getHeight();
41 const bool wontFit = (outputWidth != xyMap.getWidth() || outputHeight != xyMap.getHeight());
42 // if the input dimensions are not a power of 2 then we can't use the
43 // optimized version.
44 if (wontFit || (inputWidth & (inputWidth - 1)) || (inputHeight & (inputHeight - 1))) {
45 bilinearExpandArbitrary(input, output, inputWidth, inputHeight, xyMap);
46 } else {
47 bilinearExpandPowerOf2(input, output, inputWidth, inputHeight, xyMap);
48 }
49}
XYMap xyMap(HEIGHT, WIDTH, SERPENTINE)
void bilinearExpandArbitrary(const CRGB *input, CRGB *output, uint16_t inputWidth, uint16_t inputHeight, XYMap xyMap)
Performs bilinear interpolation for upscaling an image.
void bilinearExpandPowerOf2(const CRGB *input, CRGB *output, uint8_t inputWidth, uint8_t inputHeight, XYMap xyMap)
Performs bilinear interpolation for upscaling an image.

References bilinearExpandArbitrary(), bilinearExpandPowerOf2(), and xyMap.

Referenced by fl::ScaleUp::expand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: