fix: full verification against the brief — 137 confirmed findings fixed over six passes #4
No files matched your search
@@ -97,6 +97,7 @@
|
|||||||
<data name="Advisor.Reason.Stabilize.Smoothing" xml:space="preserve"><value>Smoothing the camera path over {0} frames removes shake and keeps deliberate pans.</value><comment>{0} smoothing sigma in frames</comment></data>
|
<data name="Advisor.Reason.Stabilize.Smoothing" xml:space="preserve"><value>Smoothing the camera path over {0} frames removes shake and keeps deliberate pans.</value><comment>{0} smoothing sigma in frames</comment></data>
|
||||||
<data name="Advisor.Reason.Strength.Full" xml:space="preserve"><value>Strong flicker ({0} EV): every frame lands on the smooth curve.</value><comment>{0} RMS flicker in EV</comment></data>
|
<data name="Advisor.Reason.Strength.Full" xml:space="preserve"><value>Strong flicker ({0} EV): every frame lands on the smooth curve.</value><comment>{0} RMS flicker in EV</comment></data>
|
||||||
<data name="Advisor.Reason.Strength.Partial" xml:space="preserve"><value>Mild flicker ({0} EV): reliable frames keep 20% of their own variation.</value><comment>{0} RMS flicker in EV</comment></data>
|
<data name="Advisor.Reason.Strength.Partial" xml:space="preserve"><value>Mild flicker ({0} EV): reliable frames keep 20% of their own variation.</value><comment>{0} RMS flicker in EV</comment></data>
|
||||||
|
<data name="Advisor.Reason.Timing.Intervalometer" xml:space="preserve"><value>The camera's intervalometer shot this sequence, so its pauses were deliberate (gaps: {0}): adaptive timing keeps them short and the pace even.</value><comment>{0} gap count</comment></data>
|
||||||
<data name="Advisor.Reason.Timing.Irregular" xml:space="preserve"><value>Intervals vary by {0} s around {1} s: adaptive timing follows the capture clock so motion stays even.</value><comment>{0} interval jitter in seconds; {1} median interval in seconds</comment></data>
|
<data name="Advisor.Reason.Timing.Irregular" xml:space="preserve"><value>Intervals vary by {0} s around {1} s: adaptive timing follows the capture clock so motion stays even.</value><comment>{0} interval jitter in seconds; {1} median interval in seconds</comment></data>
|
||||||
<data name="Advisor.Reason.Timing.ManyGaps" xml:space="preserve"><value>{0} gaps in the cadence: adaptive timing keeps the output pace true to capture time.</value><comment>{0} gap count</comment></data>
|
<data name="Advisor.Reason.Timing.ManyGaps" xml:space="preserve"><value>{0} gaps in the cadence: adaptive timing keeps the output pace true to capture time.</value><comment>{0} gap count</comment></data>
|
||||||
<data name="Advisor.Reason.Timing.Regular" xml:space="preserve"><value>Steady {0} s interval (jitter {1} s): each photo becomes one video frame.</value><comment>{0} median interval in seconds; {1} jitter in seconds</comment></data>
|
<data name="Advisor.Reason.Timing.Regular" xml:space="preserve"><value>Steady {0} s interval (jitter {1} s): each photo becomes one video frame.</value><comment>{0} median interval in seconds; {1} jitter in seconds</comment></data>
|
||||||
|
|||||||
@@ -97,6 +97,7 @@
|
|||||||
<data name="Advisor.Reason.Stabilize.Smoothing" xml:space="preserve"><value>Smussare il percorso della fotocamera su {0} fotogrammi elimina la vibrazione e conserva le panoramiche volute.</value></data>
|
<data name="Advisor.Reason.Stabilize.Smoothing" xml:space="preserve"><value>Smussare il percorso della fotocamera su {0} fotogrammi elimina la vibrazione e conserva le panoramiche volute.</value></data>
|
||||||
<data name="Advisor.Reason.Strength.Full" xml:space="preserve"><value>Sfarfallio forte ({0} EV): ogni fotogramma viene portato sulla curva regolare.</value></data>
|
<data name="Advisor.Reason.Strength.Full" xml:space="preserve"><value>Sfarfallio forte ({0} EV): ogni fotogramma viene portato sulla curva regolare.</value></data>
|
||||||
<data name="Advisor.Reason.Strength.Partial" xml:space="preserve"><value>Sfarfallio lieve ({0} EV): i fotogrammi affidabili conservano il 20% della propria variazione.</value></data>
|
<data name="Advisor.Reason.Strength.Partial" xml:space="preserve"><value>Sfarfallio lieve ({0} EV): i fotogrammi affidabili conservano il 20% della propria variazione.</value></data>
|
||||||
|
<data name="Advisor.Reason.Timing.Intervalometer" xml:space="preserve"><value>La sequenza è stata scattata dall'intervallometro della fotocamera, quindi le pause sono volute (pause: {0}): la temporizzazione adattiva le accorcia e mantiene il ritmo.</value></data>
|
||||||
<data name="Advisor.Reason.Timing.Irregular" xml:space="preserve"><value>Gli intervalli variano di {0} s attorno a {1} s: la temporizzazione adattiva segue l'orario di scatto e rende il movimento uniforme.</value></data>
|
<data name="Advisor.Reason.Timing.Irregular" xml:space="preserve"><value>Gli intervalli variano di {0} s attorno a {1} s: la temporizzazione adattiva segue l'orario di scatto e rende il movimento uniforme.</value></data>
|
||||||
<data name="Advisor.Reason.Timing.ManyGaps" xml:space="preserve"><value>{0} pause nella cadenza: la temporizzazione adattiva mantiene il ritmo fedele all'orario di scatto.</value></data>
|
<data name="Advisor.Reason.Timing.ManyGaps" xml:space="preserve"><value>{0} pause nella cadenza: la temporizzazione adattiva mantiene il ritmo fedele all'orario di scatto.</value></data>
|
||||||
<data name="Advisor.Reason.Timing.Regular" xml:space="preserve"><value>Intervallo costante di {0} s (variazione {1} s): ogni foto diventa un fotogramma del video.</value></data>
|
<data name="Advisor.Reason.Timing.Regular" xml:space="preserve"><value>Intervallo costante di {0} s (variazione {1} s): ogni foto diventa un fotogramma del video.</value></data>
|
||||||
|
|||||||
@@ -16,17 +16,32 @@ public static class Advisor
|
|||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Recommendations for every parameter the rules cover (see <see cref="AdvisorRules"/>), in section order, plus
|
/// Recommendations for every parameter the rules cover (see <see cref="AdvisorRules"/>), in section order, plus
|
||||||
/// every finding of both analyses; a finding both report (frames that cannot be decoded: the light analysis reads
|
/// every finding of both analyses. Frames that cannot be decoded are reported by both (the light analysis reads the
|
||||||
/// the flags the deep pass recorded) is listed once, as the light analysis has it. Without a deep report,
|
/// undecodable flags, the deep pass also counts missing and corrupt files and those beyond this host's decoders):
|
||||||
/// pixel-based parameters get missing-data recommendations.
|
/// they are listed once, over the union of both lists, at the higher severity. Without a deep report, pixel-based
|
||||||
|
/// parameters get missing-data recommendations.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static AdvisorResult Recommend(LightAnalysisReport light, DeepAnalysisReport? deep, SequenceContext context)
|
public static AdvisorResult Recommend(LightAnalysisReport light, DeepAnalysisReport? deep, SequenceContext context)
|
||||||
{
|
{
|
||||||
ArgumentNullException.ThrowIfNull(light);
|
ArgumentNullException.ThrowIfNull(light);
|
||||||
ArgumentNullException.ThrowIfNull(context);
|
ArgumentNullException.ThrowIfNull(context);
|
||||||
var findings = new List<Finding>(light.Findings);
|
var findings = new List<Finding>(light.Findings);
|
||||||
var lightKeys = light.Findings.Select(f => f.Key).ToHashSet(StringComparer.Ordinal);
|
foreach (var finding in deep?.Findings.Select(f => f.ToFinding()) ?? [])
|
||||||
if (deep is not null) findings.AddRange(deep.Findings.Select(f => f.ToFinding()).Where(f => !lightKeys.Contains(f.Key)));
|
{
|
||||||
|
var shared = finding.Key == DeepFindingKeys.UnreadableFrames ? findings.FindIndex(f => f.Key == finding.Key) : -1;
|
||||||
|
if (shared < 0)
|
||||||
|
{
|
||||||
|
findings.Add(finding);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
var unreadable = light.UndecodableFrames.Union(deep!.Issues.Undecodable).Order().ToList();
|
||||||
|
findings[shared] = findings[shared] with
|
||||||
|
{
|
||||||
|
Severity = (FindingSeverity)int.Max((int)findings[shared].Severity, (int)finding.Severity),
|
||||||
|
Arguments = [unreadable.Count],
|
||||||
|
Frames = [.. unreadable.Take(Finding.MaxFrames)],
|
||||||
|
};
|
||||||
|
}
|
||||||
return new AdvisorResult(new AdvisorRules(light, deep, context).Run(), findings);
|
return new AdvisorResult(new AdvisorRules(light, deep, context).Run(), findings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public static class AdvisorKeys
|
|||||||
|
|
||||||
public static string TimingSessions { get; } = LocKey("Advisor.Reason.Timing.Sessions");
|
public static string TimingSessions { get; } = LocKey("Advisor.Reason.Timing.Sessions");
|
||||||
public static string TimingIrregular { get; } = LocKey("Advisor.Reason.Timing.Irregular");
|
public static string TimingIrregular { get; } = LocKey("Advisor.Reason.Timing.Irregular");
|
||||||
|
public static string TimingIntervalometer { get; } = LocKey("Advisor.Reason.Timing.Intervalometer");
|
||||||
public static string TimingSparseGapsSmooth { get; } = LocKey("Advisor.Reason.Timing.SparseGapsSmooth");
|
public static string TimingSparseGapsSmooth { get; } = LocKey("Advisor.Reason.Timing.SparseGapsSmooth");
|
||||||
public static string TimingSparseGaps { get; } = LocKey("Advisor.Reason.Timing.SparseGaps");
|
public static string TimingSparseGaps { get; } = LocKey("Advisor.Reason.Timing.SparseGaps");
|
||||||
public static string TimingManyGaps { get; } = LocKey("Advisor.Reason.Timing.ManyGaps");
|
public static string TimingManyGaps { get; } = LocKey("Advisor.Reason.Timing.ManyGaps");
|
||||||
|
|||||||
@@ -185,11 +185,13 @@ internal sealed class AdvisorRules
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Timing mode, in order: several capture sessions (pauses ≥ the session gap) → Adaptive; jitter above 10 % of the
|
/// Timing mode, in order: several capture sessions (pauses ≥ the session gap) → Adaptive; jitter above 10 % of the
|
||||||
/// median interval → Adaptive; gaps that are sparse (≤ 2 % of intervals, each ≤ 10 × median) with smooth measured
|
/// median interval → Adaptive; gaps in a sequence the camera's own intervalometer shot (most frames carry its
|
||||||
/// motion (95th percentile ≤ 1 % of the long edge per frame) → Interpolated, or Constant when motion is unknown or
|
/// MakerNote hint), so its pauses were deliberate → Adaptive; gaps that are sparse (≤ 2 % of intervals, each ≤ 10 ×
|
||||||
/// fast; denser gaps → Adaptive; otherwise Constant. Frame rate, in order: "fit to N s" target → the standard rate
|
/// median) with smooth measured motion (95th percentile ≤ 1 % of the long edge per frame) → Interpolated, or Constant
|
||||||
/// nearest frames/N; under 240 frames → 24 (clip ≥ 10 s); over 10 min at 30 fps → 60; several sessions → 30; fast
|
/// when motion is unknown or fast; denser gaps → Adaptive; otherwise Constant. Frame rate, in order: "fit to N s"
|
||||||
/// motion (≥ 1 % of the long edge per frame) → 24; measured moderate motion (≥ 0.2 %) → 24; otherwise 30.
|
/// target → the standard rate nearest frames/N; under 240 frames → 24 (clip ≥ 10 s); over 10 min at 30 fps → 60;
|
||||||
|
/// several sessions → 30; fast motion (≥ 1 % of the long edge per frame) → 24; measured moderate motion (≥ 0.2 %) →
|
||||||
|
/// 24; otherwise 30.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void Timing()
|
private void Timing()
|
||||||
{
|
{
|
||||||
@@ -222,6 +224,11 @@ internal sealed class AdvisorRules
|
|||||||
_timing = TimingMode.Adaptive;
|
_timing = TimingMode.Adaptive;
|
||||||
Add(section, parameter, _timing, 0.7, AdvisorKeys.TimingIrregular, R(jitter, 2), R(median, 2));
|
Add(section, parameter, _timing, 0.7, AdvisorKeys.TimingIrregular, R(jitter, 2), R(median, 2));
|
||||||
}
|
}
|
||||||
|
else if (gaps.Count > 0 && 2 * _light.IntervalometerFrames > _light.FrameCount)
|
||||||
|
{
|
||||||
|
_timing = TimingMode.Adaptive;
|
||||||
|
Add(section, parameter, _timing, 0.8, AdvisorKeys.TimingIntervalometer, gaps.Count);
|
||||||
|
}
|
||||||
else if (gaps.Count > 0)
|
else if (gaps.Count > 0)
|
||||||
{
|
{
|
||||||
var sparse = gaps.Count <= double.Max(1, 0.02 * _light.Intervals.Count) && gaps.All(g => g.Seconds <= 10 * median);
|
var sparse = gaps.Count <= double.Max(1, 0.02 * _light.Intervals.Count) && gaps.All(g => g.Seconds <= 10 * median);
|
||||||
|
|||||||
@@ -137,5 +137,8 @@ public sealed record LightAnalysisReport
|
|||||||
/// <summary>Frames that nothing decodes (format tier 3): renders skip them.</summary>
|
/// <summary>Frames that nothing decodes (format tier 3): renders skip them.</summary>
|
||||||
public IReadOnlyList<int> UndecodableFrames { get; init; } = [];
|
public IReadOnlyList<int> UndecodableFrames { get; init; } = [];
|
||||||
|
|
||||||
|
/// <summary>Frames the camera's own interval-shooting mode took (MakerNote hint, <see cref="Model.FrameFlags.Intervalometer"/>).</summary>
|
||||||
|
public int IntervalometerFrames { get; init; }
|
||||||
|
|
||||||
public IReadOnlyList<Finding> Findings { get; init; } = [];
|
public IReadOnlyList<Finding> Findings { get; init; } = [];
|
||||||
}
|
}
|
||||||
@@ -61,6 +61,7 @@ public static class LightAnalyzer
|
|||||||
DayPhases = phases,
|
DayPhases = phases,
|
||||||
PreviewOnlyFrames = previewOnly,
|
PreviewOnlyFrames = previewOnly,
|
||||||
UndecodableFrames = undecodable,
|
UndecodableFrames = undecodable,
|
||||||
|
IntervalometerFrames = frames.Count(f => (f.Flags & FrameFlags.Intervalometer) != 0),
|
||||||
Findings = findings,
|
Findings = findings,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public static class SequenceFrames
|
|||||||
return byTime != 0 ? byTime : string.CompareOrdinal(a.File, b.File);
|
return byTime != 0 ? byTime : string.CompareOrdinal(a.File, b.File);
|
||||||
});
|
});
|
||||||
|
|
||||||
/// <summary>A frame record from light metadata.</summary>
|
/// <summary>A frame record from light metadata (with <see cref="FrameFlags.Intervalometer"/> when the MakerNote says so).</summary>
|
||||||
/// <param name="file">Path relative to the sequence folder.</param>
|
/// <param name="file">Path relative to the sequence folder.</param>
|
||||||
/// <param name="fallbackCapture">Used when the file records no capture time of its own (only a file-system date).</param>
|
/// <param name="fallbackCapture">Used when the file records no capture time of its own (only a file-system date).</param>
|
||||||
public static SidecarFrame FromMetadata(Guid id, string file, string? original, long size, string? sha256, FrameMetadata metadata,
|
public static SidecarFrame FromMetadata(Guid id, string file, string? original, long size, string? sha256, FrameMetadata metadata,
|
||||||
@@ -45,6 +45,7 @@ public static class SequenceFrames
|
|||||||
PreviewLength = metadata.LargestPreview?.Length,
|
PreviewLength = metadata.LargestPreview?.Length,
|
||||||
PreviewW = Positive(metadata.LargestPreview?.Width),
|
PreviewW = Positive(metadata.LargestPreview?.Width),
|
||||||
PreviewH = Positive(metadata.LargestPreview?.Height),
|
PreviewH = Positive(metadata.LargestPreview?.Height),
|
||||||
|
Flags = metadata.IntervalShooting == true ? FrameFlags.Intervalometer : FrameFlags.None,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,12 @@ public enum FrameFlags
|
|||||||
Undecodable = 32,
|
Undecodable = 32,
|
||||||
Black = 64,
|
Black = 64,
|
||||||
White = 128,
|
White = 128,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The camera's own interval-shooting or time-lapse mode took the frame (MakerNote hint, BRIEF §9): a capture fact,
|
||||||
|
/// not a problem; its pauses were deliberate (§10.3 adaptive timing).
|
||||||
|
/// </summary>
|
||||||
|
Intervalometer = 256,
|
||||||
}
|
}
|
||||||
|
|
||||||
[Flags]
|
[Flags]
|
||||||
|
|||||||
Reference in new issue
Block a user