sync: masked waveform correlation, stretch sync, manual start time

- Waveform sync no longer treats uncached waveform regions as silence:
  the envelope extraction now reports a per-window validity mask and the
  correlation skips invalid windows on either side, improving accuracy
  for partially cached clips
- Add stretch/speed sync: AudioWaveformSync::EstimateStretchAndOffset
  searches a playback-rate range plus offset, and a new timeline
  context action 'Synchronize by Waveform (Adjust Speed)' applies the
  estimated rate as a clip speed change (with undo) when plain offset
  alignment is inconclusive
- Footage properties dialog gains a Source Start Time field so the
  value used by source-time sync can be viewed and edited manually
  instead of relying solely on auto-detected metadata; applied via an
  undo command, with Footage::ClearSourceStartTime() for removal
- Regression tests for masked correlation, stretch estimation, the
  envelope validity mask, and source-start-time set/clear
This commit is contained in:
2026-07-16 23:09:12 +08:00
parent 547c2480e0
commit caafac4203
13 changed files with 544 additions and 26 deletions
+7
View File
@@ -231,6 +231,13 @@ void Footage::SetSourceStartTime(const rational &time, const QString &source)
has_source_start_time_ = true;
}
void Footage::ClearSourceStartTime()
{
source_start_time_ = rational();
source_start_time_source_.clear();
has_source_start_time_ = false;
}
void Footage::set_proxy_enabled(bool enabled)
{
if (proxy_enabled_ != enabled) {
+5
View File
@@ -173,6 +173,11 @@ public:
void SetSourceStartTime(const rational &time, const QString &source);
/**
* @brief Removes any source start time (auto-detected or manual)
*/
void ClearSourceStartTime();
bool proxy_enabled() const
{
return proxy_enabled_;