Skip to content

feat(resume): add resumable processing checkpoints - #1501

Open
BrenoFariasdaSilva wants to merge 1 commit into
k4yt3x:masterfrom
BrenoFariasdaSilva:feat/resume-mechanism
Open

feat(resume): add resumable processing checkpoints#1501
BrenoFariasdaSilva wants to merge 1 commit into
k4yt3x:masterfrom
BrenoFariasdaSilva:feat/resume-mechanism

Conversation

@BrenoFariasdaSilva

@BrenoFariasdaSilva BrenoFariasdaSilva commented Jul 27, 2026

Copy link
Copy Markdown

Description

Adds resumable processing support to libvideo2x for both interpolation and upscaling tasks.

This PR is linked to the k4yt3x/video2x-qt6#25 PR.

Interrupted jobs can reopen a validated .v2xresume workspace, replay completed frame checkpoints, and continue from the first incomplete source-frame unit.

Changes

  • Adds the public resume API in libvideo2x/resume.h.
  • Adds .v2xresume workspaces with versioned manifests.
  • Stores per-source-frame checkpoint files and processor tail frames.
  • Validates input identity, processing configuration, stream metadata, and checkpoint integrity.
  • Writes manifests and checkpoint units through temporary files before replacement.
  • Publishes checkpoints every 30 source frames and on cancellation or final flush.
  • Adds VideoProcessor::process_resumable().
  • Adds VideoProcessor::get_recovered_frames().
  • Replays recovered frames before processing new frames.
  • Restores the previous-frame boundary required by RIFE interpolation.
  • Supports restart by deleting saved checkpoints and resetting manifest progress.
  • Publishes the final output only after successful processing.
  • Preserves the existing non-resumable VideoProcessor::process() API.

Frontend integration

The companion Qt frontend PR uses these APIs to inspect, restart, and resume workspaces and to report recovered progress separately.

The existing CLI continues using the non-resumable processing path.

Validation

  • No resume-specific test files or CI workflow changes.
  • Validation was not independently re-run while preparing this description.

Files changed

  • CMakeLists.txt
  • include/libvideo2x/libvideo2x.h
  • include/libvideo2x/resume.h
  • src/libvideo2x.cpp
  • src/resume.cpp
  • src/resume_session.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant