Repository navigation
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The narrow arithmetic change safely handles Int32 components, retains existing safeguards, and has focused regression coverage with no identified blocking issues.
No open issues 🎉
What changed in this PR
This PR fixes the engine’s pixel-aspect validation so precise ratios such as 759:712 are preserved instead of falling back to square pixels.
Changes:
- Replace component limits with overflow-safe ratio-magnitude bounds while retaining existing validation safeguards.
- Add regression cases for precise ratios, scaled boundaries, and Int32 extremes.
- Update test terminology, architecture documentation, and the changelog.
| File | Description |
|---|---|
| Tests/AetherEngineTests/Issue290DisplayAspectGateTests.swift | Update comments and test terminology to describe the magnitude gate. |
| Tests/AetherEngineTests/Issue177SARLatchTests.swift | Add precision, boundary, and display-aspect regression cases. |
| Sources/AetherEngine/Decoder/PixelAspectPolicy.swift | Bound ratio magnitude using Int64 arithmetic while preserving declared components. |
| docs/architecture.md | Document the revised pixel-aspect gate. |
| CHANGELOG.md | Record the precise pixel-aspect correction. |
Review effort: Balanced
jonluca
force-pushed
the
fix/precise-pixel-aspect-ratios
branch
from
October 25, 2026 18:27
01b518a to
4c31df9
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
Preserve valid pixel aspect ratios whose rational components exceed 256. A 712×574 frame declaring 759:712 should display as 759×574, but the component cap discarded that declaration and displayed square pixels.
What changed
Test plan
python3 Scripts/check-doc-links.pyandgit diff --checkpass.Checklist
CHANGELOG.mdupdated