fix: stalled jobs, editor cancellation stops and GoPro DNG decoding
Owner review 1, phase 1 (docs/requests/2026-10-15-owner-review-1.md). Thumbnail and proxy jobs over several sequences counted sequences while they checkpointed inside one: the rate decayed until the time left overflowed TimeSpan, the job failed while publishing progress and again while saving it, and stayed Running. The throughput is now seeded by the first window with progress, the time left is bounded (JobEta), saving progress never throws, image passes count frames, and job speeds use the right unit (bytes for verify and import). The debugger stops in WicDecoderProvider.cs when presets changed were cancelled preview decodes leaving synchronous thread-pool delegates; the editor's sources, LatestRunner and the render node's proxy task now keep them in their own tasks, and a cancellation is never an unreadable frame. GoPro DNGs converted by Adobe software were classified GPR and read only through their 8-bit preview, and Windows' preview-only DNG decoder was reported as a native decode. A DNG is GPR only when its raw image is VC-5, WIC decodes RAW only through the Raw Image Extension and never DNG, analyses and previews take an adequate embedded preview by choice while renders develop natively, and frames already indexed as GPR are reclassified by the next light analysis. Also records the owner's request (docs/requests), the BRIEF amendments (§8.1, §8.2, new §24), DECISIONS, CHANGELOG, STATUS and ARCHITECTURE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
19265b36c2
commit
34d03051f5
77 files changed
+785
-94
No files matched your search
@@ -22,7 +22,9 @@ internal sealed class FrameTiers(TitanoDatabase db, SequenceWriter writer, Archi
|
||||
/// The tier of every frame of <paramref name="manifest"/> whose tier is not known yet, that decodes only through a
|
||||
/// preview whose size is not known (the output cap needs it), or that is a GPR whose JPEG in another sequence
|
||||
/// (<see cref="GprCompanions"/>; an upload may index it after the GPR was probed) is larger than its stored preview,
|
||||
/// probed with the host's decoders without decoding pixels; missing and unreadable files are left for later.
|
||||
/// or that is stored as GPR without the .gpr extension (indexed before GoPro DNGs converted by Adobe software counted as
|
||||
/// DNG; R4, owner review 1), probed with the host's decoders without decoding pixels; missing and unreadable files are
|
||||
/// left for later.
|
||||
/// </summary>
|
||||
public async Task<Dictionary<Guid, FileTier>> ProbeUnknownAsync(Archive archive, SequencePaths folder, SequenceManifest manifest,
|
||||
CancellationToken cancellationToken)
|
||||
@@ -30,7 +32,7 @@ internal sealed class FrameTiers(TitanoDatabase db, SequenceWriter writer, Archi
|
||||
var tiers = new Dictionary<Guid, FileTier>();
|
||||
var present = manifest.Frames.Where(f => (f.Flags & FrameFlags.Missing) == 0).ToList();
|
||||
var companions = await GprCompanions.FindWithSizesAsync(db, archive, present, cancellationToken).ConfigureAwait(false);
|
||||
var unknown = present.Where(f => f.Tier == 0 || (f.Tier == DecodeTier.EmbeddedPreview && f.PreviewW is null)
|
||||
var unknown = present.Where(f => f.Tier == 0 || (f.Tier == DecodeTier.EmbeddedPreview && f.PreviewW is null) || IsStaleGpr(f)
|
||||
|| (companions.TryGetValue(f.Id, out var jpeg)
|
||||
&& int.Max(f.PreviewW ?? 0, f.PreviewH ?? 0) < int.Max(jpeg.Width, jpeg.Height)));
|
||||
foreach (var frame in unknown)
|
||||
@@ -97,7 +99,8 @@ internal sealed class FrameTiers(TitanoDatabase db, SequenceWriter writer, Archi
|
||||
if (tier is not null) updated = SequenceFrames.WithTier(frame, tier, DecodesNatively(frame.Format), proxied == true);
|
||||
else if (proxied is { } own) updated = SequenceFrames.WithProxy(frame, own);
|
||||
else continue;
|
||||
if (updated.Tier == frame.Tier && updated.Flags == frame.Flags && updated.PreviewW == frame.PreviewW && updated.PreviewH == frame.PreviewH)
|
||||
if (updated.Tier == frame.Tier && updated.Flags == frame.Flags && updated.PreviewW == frame.PreviewW && updated.PreviewH == frame.PreviewH
|
||||
&& updated.Format == frame.Format)
|
||||
continue;
|
||||
gained |= (updated.Flags & ~frame.Flags & FrameFlags.Undecodable) != 0;
|
||||
frames[i] = updated;
|
||||
@@ -118,7 +121,7 @@ internal sealed class FrameTiers(TitanoDatabase db, SequenceWriter writer, Archi
|
||||
// for these frames while this waits for the row, and PostgreSQL would abort one of them.
|
||||
await tx.Sequences.RecordTiersAsync(sequence.Id, gained ? SequenceStatus.HasWarnings : SequenceStatus.None,
|
||||
frames.Count(f => (f.Flags & FrameFlags.PreviewOnly) != 0), cancellationToken).ConfigureAwait(false);
|
||||
await tx.Frames.UpdateTiersAsync(changed.ConvertAll(f => new FrameTierFields(f.Id, f.Flags, f.PreviewW ?? 0, f.PreviewH ?? 0)), cancellationToken)
|
||||
await tx.Frames.UpdateTiersAsync(changed.ConvertAll(f => new FrameTierFields(f.Id, f.Flags, f.PreviewW ?? 0, f.PreviewH ?? 0, f.Format)), cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
await tx.CommitAsync(cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
@@ -127,6 +130,14 @@ internal sealed class FrameTiers(TitanoDatabase db, SequenceWriter writer, Archi
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A frame stored as GPR whose file is not a .gpr: before owner review 1 every DNG with Make=GoPro counted as GPR, so
|
||||
/// Adobe-converted GoPro DNGs were recorded preview-only; probing reads its signature again (<see cref="SequenceFrames.WithTier"/>
|
||||
/// then stores the format found).
|
||||
/// </summary>
|
||||
internal static bool IsStaleGpr(SidecarFrame frame) =>
|
||||
frame.Format == ImageFileFormat.Gpr && !frame.File.EndsWith(".gpr", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
/// <summary>
|
||||
/// Whether this host decodes <paramref name="format"/> natively, so a file of it that yields no pixels is damaged
|
||||
/// rather than beyond this host (JPEG always: the managed JPEG decoder is part of every host).
|
||||
|
||||
Reference in new issue
Block a user