From 25cd3de2e6c3628abb8ab1c3d70f67f82d9bb8d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 30 Sep 2026 17:10:28 +0300 Subject: [PATCH] docs(demux): name the dropped display height as a design gap, not an oversight `PixelAspect::stated_size` reads a unit-0 pair's display height, checks it for the degenerate claim, and then does not use it -- a 1920x803 scope is drawn 1920x1080, because this engine's model moves the width only. That is correct today and I want it written down rather than left looking like a bug, because it stops being correct the moment any path starts honouring a stated display height: the height half is being discarded deliberately, and the reason it is safe to discard (`VideoMeta::height` is the coded height everywhere, and every consumer reads the aspect as width-only) is exactly what such a change would remove. Documentation only; no behaviour change. --- crates/engine/src/demux.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/crates/engine/src/demux.rs b/crates/engine/src/demux.rs index 7715a78..c52426b 100644 --- a/crates/engine/src/demux.rs +++ b/crates/engine/src/demux.rs @@ -461,6 +461,24 @@ impl PixelAspect { /// What needs bounding is the raster, and [`Self::width_factor`] bounds /// that with [`Self::MAX_DISPLAY_WIDTH`] on every path. So this has only /// to refuse the degenerate claims: a zero half. + /// + /// # A named design gap, not an oversight + /// + /// The stated display *height* is read, checked, and then dropped. That is + /// correct against this engine's model today -- `VideoMeta::height` is the + /// coded height for every file, every door builds the display pair as + /// `width_factor(coded_width)` against the coded height, and every consumer + /// (`decode.rs`, `export.rs`, `hw.rs`'s `pixel_aspect_h`/`_v` beside + /// `coded_width`/`coded_height`) reads the aspect as width-only. + /// + /// It becomes a real defect the moment any path starts honouring a stated + /// display height: a 1920x803 pair would then have to drive + /// `VideoMeta::height`, and this function would be silently feeding it + /// `coded.0` instead. So the drop is recorded here rather than left as a + /// line that looks like an oversight, and whoever makes that change should + /// start by reading this paragraph -- the height half is being discarded + /// deliberately, and the reason it was safe to discard is exactly the thing + /// that change would remove. pub fn stated_size(display_width: u64, display_height: u64, coded: (u32, u32)) -> Option { // The height is checked for the degenerate claim and then goes unused: // a zero-height pair is a header that lies, and one this engine reads