Repository navigation
Conversation
4 tasks done
There was a problem hiding this comment.
🟡 Changes recommended
Successful HDR and Dolby Vision conversions bypass the documented accurate-mode scaling policy.
1 open issue
What changed in this PR
Adds frame-accurate, downscaled previews to the engine’s isolated still-extraction API, bridging keyframe thumbnails and full-resolution snapshots.
Changes:
- Adds preview extraction with forward decoding, quality-aware scaling, cancellation, and starvation handling.
- Introduces a separate two-image preview cache keyed by exact time and width.
- Adds CLI support, synthetic-media regression tests, and documentation.
| File | Description |
|---|---|
| Tests/AetherEngineTests/FrameDecodeContextHardwareTests.swift | Tests preview accuracy, dimensions, and lifecycle. |
| Tests/AetherEngineTests/FrameCacheTests.swift | Tests preview cache keys and eviction. |
| Sources/AetherEngine/FrameExtractor/FrameTypes.swift | Adds preview mode and shared mode policies. |
| Sources/AetherEngine/FrameExtractor/FrameExtractor.swift | Exposes preview extraction and integrates caching. |
| Sources/AetherEngine/FrameExtractor/FrameDecodeContext.swift | Adds accurate preview decoding and scaling selection. |
| Sources/AetherEngine/FrameExtractor/FrameCache.swift | Adds a bounded, size-aware preview cache. |
| Sources/aetherctl/main.swift | Parses preview flags and rejects conflicting modes. |
| Sources/aetherctl/Extract.swift | Routes CLI requests to preview extraction. |
| docs/cli.md | Documents preview flags and usage. |
| docs/architecture.md | Includes preview mode in the extraction architecture. |
| docs/api.md | Documents preview behavior and lifecycle. |
| CHANGELOG.md | Records the new preview API and CLI option. |
Review effort: Balanced
| // tone-map failed: fall through to sws path (degraded but non-nil) | ||
| } | ||
| return convertToCGImage(frame: f, targetWidth: width) | ||
| return convertToCGImage(frame: f, targetWidth: width, highQuality: mode.isFrameAccurate) |
jonluca
force-pushed
the
feat/accurate-frame-previews
branch
from
October 25, 2026 18:27
2f7a3b0 to
087ee88
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Add
FrameExtractor.preview(at:maxWidth:)for frame-accurate stills at a requested display width. This fills the gap between inexpensive keyframe thumbnails and native-resolution snapshots while keeping preview work separate from playback.What changed
FrameMode.previewand the public actor method, with the same serial decoder and supersession/shutdown lifecycle as other extraction requests.aetherctl extract --preview; reject combining it with--snapshot.Test plan
extract --at 0.75 --preview --width 16produced a 16x16 PNG; mutually exclusive mode flags returned exit 64.swift build --target AetherEngine -Xswiftc -warnings-as-errors, the documentation link checker andgit diff --checkpassed. No iOS/tvOS device or HDR/Dolby Vision visual validation was performed for the new mode.Checklist