14.26: adaptive Contrast, Highlights and Shadows; Dehaze, Texture, Clarity and Sharpening

This commit is contained in:
ZacharyZhang-NY committed 2026-10-11 13:33:45 -04:00
1 parent a1453df517
commit 32f6362787
12 files changed
+289 -153

No files matched your search

+9 -6
View File
@@ -8,7 +8,7 @@ extern "C" {
#include <optional>
#include <vector>
// Photoshop's Light and Color sliders, measured as 17³ colour tables.
// Photoshop's Light and Color, measured as 17³ tables; some adapt.
namespace CameraRawTables {
constexpr int size = 17;
// The grid the stages compose onto, finer than the tables.
@@ -18,12 +18,15 @@ constexpr int grid = 33;
const std::vector<uint8_t> &tables();
// Temperature and Tint: the four grid tables around them.
CameraRawStage whiteBalance(double temperature, double tint);
struct Stages {
std::vector<CameraRawStage> before;
std::vector<CameraRawStage> after;
// What adaptive sliders read first, in sRGB levels.
struct Brightness {
double brightest = 128;
double luminance = 128;
double logBrightest = 128;
};
// Before Highlights and Shadows, and after; zero sliders left out.
Stages stages(const CameraRawSettings &settings);
Brightness brightness(const uchar *pixels, int width, int height, qsizetype stride);
// Camera Raw's order, sliders at zero left out.
std::vector<CameraRawStage> stages(const CameraRawSettings &settings, const Brightness &brightness);
// The stages over the composing grid; empty without stages.
std::vector<float> compose(const std::vector<CameraRawStage> &stages);
// Temperature and Tint turning a straight sRGB colour gray.