57 {
58 u16 outputWidth =
xyMap.getWidth();
59 u16 outputHeight =
xyMap.getHeight();
60 const bool wontFit =
61 (outputWidth !=
xyMap.getWidth() || outputHeight !=
xyMap.getHeight());
62
63
65
66 if (isRectangular) {
67
68 if (wontFit || (inputWidth & (inputWidth - 1)) ||
69 (inputHeight & (inputHeight - 1))) {
71 outputWidth, outputHeight);
72 } else {
74 outputWidth, outputHeight);
75 }
76 } else {
77
78 if (wontFit || (inputWidth & (inputWidth - 1)) ||
79 (inputHeight & (inputHeight - 1))) {
81 } else {
83 }
84 }
85}
void upscaleRectangular(const CRGB *input, CRGB *output, u16 inputWidth, u16 inputHeight, u16 outputWidth, u16 outputHeight)
Optimized upscale for rectangular/line-by-line XY maps.
void upscaleRectangularPowerOf2(const CRGB *input, CRGB *output, u8 inputWidth, u8 inputHeight, u8 outputWidth, u8 outputHeight)
Optimized upscale for rectangular/line-by-line XY maps (power-of-2 version).
void upscaleArbitrary(const CRGB *input, CRGB *output, u16 inputWidth, u16 inputHeight, const XYMap &xyMap)
Performs bilinear interpolation for upscaling an image.
void upscalePowerOf2(const CRGB *input, CRGB *output, u8 inputWidth, u8 inputHeight, const XYMap &xyMap)
Performs bilinear interpolation for upscaling an image.