14.25 round 2: temperature's edge, each channel missing, translucent exposure

This commit is contained in:
ZacharyZhang-NY committed 2026-10-11 13:21:05 -04:00
1 parent f0fe272038
commit 141a174cac
3 files changed
+7 -2

No files matched your search

+5
View File
@@ -104,10 +104,15 @@ void CameraRawTablesTests::neutralizeFindsTheGridsGrayest()
// A refinement past −100 keeps to the range.
const CameraRawSettings::Balance edge = CameraRawTables::neutralize(84 / 255.0, 1 / 255.0, 97 / 255.0).value();
QVERIFY(edge.temperature == -14.5 && edge.tint == -100);
const CameraRawSettings::Balance hot = CameraRawTables::neutralize(240 / 255.0, 80 / 255.0, 40 / 255.0).value();
QVERIFY(hot.temperature == -100 && hot.tint == -13.5);
// Ties among searched points: tint rising within each temperature.
const CameraRawSettings::Balance tie = CameraRawTables::neutralize(144 / 255.0, 216 / 255.0, 47 / 255.0).value();
QVERIFY(tie.temperature == -100 && tie.tint == 60);
// Any channel missing leaves nothing to balance from.
QVERIFY(!CameraRawTables::neutralize(0.5, 0.0001, 0.5));
QVERIFY(!CameraRawTables::neutralize(0, 128 / 255.0, 128 / 255.0));
QVERIFY(!CameraRawTables::neutralize(128 / 255.0, 128 / 255.0, 0));
QVERIFY(CameraRawTables::neutralize(0.5, 0.00011, 0.5));
}
+1 -1
View File
@@ -47,7 +47,7 @@ void CameraRawTests::exposureAndContrastMatchPhotoshop()
QVERIFY2(std::abs(brighter[0] - 181) <= 2, qPrintable(QString::number(brighter[0])));
QVERIFY(brighter[0] == brighter[1] && brighter[1] == brighter[2]);
const QImage translucent = gray(4, 4, 0.5);
QCOMPARE(pixels(settings.apply(translucent))[0][3], pixels(translucent)[0][3]);
QVERIFY((pixels(settings.apply(translucent))[0] == std::array{181, 181, 181, pixels(translucent)[0][3]}));
settings = CameraRawSettings();
settings.contrast = 100;
const auto pushed = pixels(settings.apply(pair(64, 192)));