Skip to content

Add optional whole-clip protection-border crop - #10

Merged
Lucas1479 merged 1 commit into
mainfrom
codex/optional-border-crop
Oct 2, 2026
Merged

Lucas1479 merged 1 commit into
mainfrom
codex/optional-border-crop

Conversation

@Lucas1479

@Lucas1479 Lucas1479 commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Videos made with a protective black border can opt into removing that border before registration. The crop scans every decoded frame, takes the union of non-black visible content, and applies one fixed rectangle to the entire take. It preserves motion and alpha, writes separate working frames, and records the source size and crop rectangle. Taking a frame as a pose uses the same full-take crop and first-frame registration.

Cropping is off by default. Settings can enable it for newly created clips, while each clip's Processing panel and CLI can override the switch, threshold and retained margin. Existing clips keep their own settings; old records load without migration. Finished legacy imports explicitly disable cropping to preserve their pixels. Variants continue copying their source clip's recipe.

The crop runs in generation-side Process & QA before candidate adoption. It removes an existing border; it does not add one to provider inputs, stabilize character scale or reconstruct missing content. Empty-content or mismatched-size sequences fail before writing cropped frames. Configuration writes reject invalid boolean/integer values instead of silently coercing them. Changes to registration over time are handled in a separate stacked PR.

Validation:

  • Full Python regression on this crop-only commit: 312 passed, 2 skipped (Windows symlink privileges). Legacy import pixel-preservation tests pass with the new global default enabled.
  • Crop regressions cover a middle frame extending beyond both endpoints, one shared ROI, unchanged movement, hidden RGB, partial alpha, original hashes, candidate publication isolation and all-black rejection.
  • A local legacy video with 60 frames was decoded and cropped using one rectangle; every result matched the same pixel slice and both the video and decoded source hashes stayed unchanged. Private source media is not included in this PR.
  • Edge Clip Studio acceptance covers default creation, per-clip overrides and EN/ZH draft preservation. JavaScript syntax and KTX2 playback checks pass. No real provider calls are used.

The complete nine-suite Edge browser regression passed, covering the asset reviewer, production canvas, Studio shell, clips, raw/video comparison, expressions, graph editor, review/export and workflows.

@Lucas1479 Lucas1479 changed the title Add optional whole-clip protection-border crop Preserve whole-clip geometry during QA processing Oct 2, 2026
@Lucas1479
Lucas1479 force-pushed the codex/optional-border-crop branch from db38860 to 57097f5 Compare October 2, 2026 02:56
@Lucas1479 Lucas1479 changed the title Preserve whole-clip geometry during QA processing Add optional whole-clip protection-border crop Oct 2, 2026
@Lucas1479
Lucas1479 merged commit 6720d32 into main Oct 2, 2026
6 of 8 checks passed
@Lucas1479
Lucas1479 deleted the codex/optional-border-crop branch October 2, 2026 04:13
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