fix(core): tell value-type Auto settings without advice from an advised default
Auto<T>.Resolve returned default instead of the fallback for value types because AutoValue cannot be null there. Auto<T> now records HasAdvice; the render pipeline's ProjectValues workaround and the advisor's ReasonKey heuristic are removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
9 files changed
+41
-61
No files matched your search
@@ -118,12 +118,12 @@ public static class RenderPreparation
|
||||
Array.Fill(excluded, true);
|
||||
foreach (var i in included) excluded[i] = false;
|
||||
|
||||
var deflicker = ProjectValues.Get(exposure.Deflicker, false);
|
||||
var holyGrail = ProjectValues.Get(exposure.HolyGrail, false);
|
||||
var regionMode = deflicker ? ProjectValues.Get(exposure.Regions, RegionMode.Off) : RegionMode.Off;
|
||||
var whiteBalance = ProjectValues.Get(exposure.WhiteBalanceSmoothing, false);
|
||||
var stabilize = ProjectValues.Get(motion.Stabilize, false);
|
||||
var smoothing = ProjectValues.Get(motion.StabilizeSmoothing, new StabilizerOptions().SmoothingSigma);
|
||||
var deflicker = exposure.Deflicker.Resolve(false);
|
||||
var holyGrail = exposure.HolyGrail.Resolve(false);
|
||||
var regionMode = deflicker ? exposure.Regions.Resolve(RegionMode.Off) : RegionMode.Off;
|
||||
var whiteBalance = exposure.WhiteBalanceSmoothing.Resolve(false);
|
||||
var stabilize = motion.Stabilize.Resolve(false);
|
||||
var smoothing = motion.StabilizeSmoothing.Resolve(new StabilizerOptions().SmoothingSigma);
|
||||
|
||||
var luminance = deflicker || holyGrail ? Valid(cached?.LogLuminance, excluded) : null;
|
||||
var measureLuminance = (deflicker || holyGrail) && luminance is null;
|
||||
@@ -183,15 +183,15 @@ public static class RenderPreparation
|
||||
{
|
||||
var options = new DeflickerOptions
|
||||
{
|
||||
Window = int.Max(3, ProjectValues.Get(exposure.DeflickerWindow, 0) is var w and > 0 ? w : RecommendedWindow(luminance)),
|
||||
Strength = double.Clamp(ProjectValues.Get(exposure.DeflickerStrength, 1.0), 0, 1),
|
||||
Window = int.Max(3, exposure.DeflickerWindow.Resolve(0) is var w and > 0 ? w : RecommendedWindow(luminance)),
|
||||
Strength = double.Clamp(exposure.DeflickerStrength.Resolve(1.0), 0, 1),
|
||||
};
|
||||
var evs = new double?[n];
|
||||
// Excluded frames (test shots, bumps) must not create exposure steps.
|
||||
for (var i = 0; i < n; i++) evs[i] = excluded[i] ? null : input.Frames[i].ExposureValue;
|
||||
if (holyGrail)
|
||||
{
|
||||
var transition = ProjectValues.Get(exposure.TransitionLength, 0);
|
||||
var transition = exposure.TransitionLength.Resolve(0);
|
||||
hg = HolyGrailEngine.Compute(luminance, evs, new HolyGrailOptions { TransitionFrames = transition > 0 ? transition : null, Deflicker = options });
|
||||
}
|
||||
var offsets = hg?.StepOffsets ?? DeflickerEngine.OffsetsFromExposure(evs);
|
||||
|
||||
Reference in new issue
Block a user