fix(video): size linear DNG tiles to small frames
Edge padding of 256-pixel tiles tripled the size of small sequence frames. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
1 file changed
+2
-1
@@ -264,7 +264,8 @@ internal sealed class ImageSequenceSession : ManagedSession
|
||||
VideoCodec.JpegSequence => JpegEncoder.Encode(frame, JpegOptions(Settings.Quality)),
|
||||
VideoCodec.PngSequence => PngEncoder.Encode(frame, Settings.BitDepth == 16 ? 16 : 8, CompressionLevel.Optimal),
|
||||
VideoCodec.Tiff16Sequence => TiffWriter.Write(frame, new TiffWriteOptions { BitsPerSample = Settings.BitDepth == 8 ? 8 : 16 }),
|
||||
VideoCodec.LinearDngSequence => LinearDngWriter.Write(frame),
|
||||
// Tiles no larger than the frame: edge padding of a 256-pixel tile would dominate small outputs.
|
||||
VideoCodec.LinearDngSequence => LinearDngWriter.Write(frame, new LinearDngOptions { TileSize = int.Clamp((int.Max(frame.Width, frame.Height) + 15) / 16 * 16, 16, 256) }),
|
||||
_ => throw new NotSupportedException($"{Settings.Codec} is not an image sequence"),
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user