Date the composite at the mean of its frames' capture times
Benchmarks / Frame budget (on demand) (push) Skipped
Build and test / Desktop (Linux) (push) Failing after 31m52s
Build and test / Layer separation (push) Successful in 47s
Traceability / Requirement traces (push) Failing after 55s
🐳 Android image / Build and push (push) Successful in 1s
Build and test / android-image (push) Successful in 1s
🐳 Windows image / Build and push (push) Successful in 1s
Build and test / windows-image (push) Successful in 1s
Benchmarks / CPU and I/O (per commit) (push) Failing after 32s
Build and test / Android (aarch64) (push) Failing after 2m37s
Build and test / Windows (x86_64, cross) (push) Failing after 3m10s

It carried the first frame's, so it sorted before the sweep it was made
from. The middle of the sweep puts it among them.
This commit is contained in:
2026-09-19 22:36:09 +02:00
parent 48c4b403d2
commit e750bcdb8c
+10 -1
View File
@@ -518,7 +518,16 @@ fn run_inner(
let black = first.raw.black_level[0]; let black = first.raw.black_level[0];
let white_level = u32::from(first.raw.white_level.saturating_sub(black)).max(1); let white_level = u32::from(first.raw.white_level.saturating_sub(black)).max(1);
let profile = dng_profile(first, white_level); let profile = dng_profile(first, white_level);
let (_, carried) = crate::export::header_for_file(&first.meta); let (_, mut carried) = crate::export::header_for_file(&first.meta);
// The composite is dated at the middle of its sweep — the mean of the
// frames' capture times — so it sorts among the frames it was made
// from, not at the first of them and not at the moment of the merge.
// The zone is the first frame's; a sweep does not cross one.
let stamps: Vec<i64> = frames.iter().filter_map(|f| f.meta.captured_at).collect();
if !stamps.is_empty() {
let sum: i128 = stamps.iter().map(|&t| t as i128).sum();
carried.captured_at = Some((sum / stamps.len() as i128) as i64);
}
let output = MergeOutput { let output = MergeOutput {
projection, projection,