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
@@ -186,6 +186,12 @@ internal sealed record DngSpec
|
||||
/// <summary>Put the raw image in a SubIFD behind an IFD0 thumbnail, like camera DNGs.</summary>
|
||||
public bool RawInSubIfd { get; init; }
|
||||
|
||||
/// <summary>With <see cref="RawInSubIfd"/>: IFD0 holds this JPEG as the embedded preview (like Adobe-converted DNGs).</summary>
|
||||
public byte[]? PreviewJpeg { get; init; }
|
||||
|
||||
/// <summary>IFD0 Make.</summary>
|
||||
public string Make { get; init; } = "Titano";
|
||||
|
||||
/// <summary>Raw-value transform applied after mosaicking (e.g. the inverse of a gain map), stored-unit domain.</summary>
|
||||
public Func<int, int, float, float>? RawTransform { get; init; }
|
||||
}
|
||||
@@ -301,7 +307,25 @@ internal static class SyntheticDng
|
||||
if (spec.OpcodeList3 is { } o3) raw.Add(TiffTags.OpcodeList3, TiffType.Undefined, o3.Length, o3);
|
||||
|
||||
var ifd0 = raw;
|
||||
if (spec.RawInSubIfd)
|
||||
if (spec.RawInSubIfd && spec.PreviewJpeg is { } jpeg)
|
||||
{
|
||||
if (output.Position % 2 != 0) output.WriteByte(0);
|
||||
var offset = output.Position;
|
||||
output.Write(jpeg);
|
||||
var info = Titano.Core.Codecs.Jpeg.JpegDecoder.ReadInfo(jpeg);
|
||||
ifd0 = new TiffDirectory();
|
||||
ifd0.Long(TiffTags.NewSubfileType, 1);
|
||||
ifd0.Long(TiffTags.ImageWidth, (uint)info.Width);
|
||||
ifd0.Long(TiffTags.ImageLength, (uint)info.Height);
|
||||
ifd0.Short(TiffTags.BitsPerSample, 8, 8, 8);
|
||||
ifd0.Short(TiffTags.Compression, 7);
|
||||
ifd0.Short(TiffTags.PhotometricInterpretation, 6);
|
||||
ifd0.Short(TiffTags.SamplesPerPixel, 3);
|
||||
ifd0.Long(TiffTags.StripOffsets, (uint)offset);
|
||||
ifd0.Long(TiffTags.StripByteCounts, (uint)jpeg.Length);
|
||||
ifd0.Child(TiffTags.SubIfds, raw);
|
||||
}
|
||||
else if (spec.RawInSubIfd)
|
||||
{
|
||||
ifd0 = new TiffDirectory();
|
||||
ifd0.Long(TiffTags.NewSubfileType, 1);
|
||||
@@ -315,7 +339,7 @@ internal static class SyntheticDng
|
||||
ifd0.Long(TiffTags.StripByteCounts, 48);
|
||||
ifd0.Child(TiffTags.SubIfds, raw);
|
||||
}
|
||||
ifd0.Ascii(TiffTags.Make, "Titano");
|
||||
ifd0.Ascii(TiffTags.Make, spec.Make);
|
||||
ifd0.Ascii(TiffTags.Model, "Synthetic");
|
||||
ifd0.Short(TiffTags.Orientation, spec.Orientation);
|
||||
ifd0.Bytes(TiffTags.DngVersion, 1, 6, 0, 0);
|
||||
|
||||
Reference in new issue
Block a user