| 359 | #pragma GCC optimize("-fno-fast-math", "-fassociative-math", "-freciprocal-math") |
| 360 | #endif |
| 361 | static void processSaturationShift(Image& image, SaturationShiftImageOperation const* op) { |
| 362 | image.forEachPixel([&op](unsigned, unsigned, Vec4B& pixel) { |
| 363 | if (pixel[3] != 0) { |
| 364 | Color color = Color::rgba(pixel); |
| 365 | color.setSaturation(clamp(color.saturation() + op->saturationShiftAmount, 0.0f, 1.0f)); |
| 366 | pixel = color.toRgba(); |
| 367 | } |
| 368 | }); |
| 369 | } |
| 370 | #ifdef STAR_COMPILER_CLANG |
| 371 | #pragma GCC pop_options |
| 372 | #endif |
no test coverage detected