Stop naming specific commercial discs in comments and tests
Fifteen references across six files named the discs a defect was first seen on. The parser leak found earlier was not an isolated slip — the same habit runs through the mux comments, the changelog and the AACS content verdict, where a title name was standing in for the shape of the problem. Every one is replaced with the property that actually mattered: a multi-clip title, a UHD Dolby Vision profile 7 dual-layer stream, a disc carrying an authored-bad TS packet. The comments are more useful for it — the reader needs to recognise the shape on a disc they have, not the one we happened to have. `SEG_MainFeature` stays: the parser matches on that literal, so it is a format token rather than a title.
This commit is contained in:
+1
-1
@@ -1119,7 +1119,7 @@ consumers are the in-tree toolchain crates.
|
|||||||
The direct-to-MKV path now gives the drive its full ECC recovery budget on a
|
The direct-to-MKV path now gives the drive its full ECC recovery budget on a
|
||||||
bad sector (matching the multipass rip) instead of reporting a read failure a
|
bad sector (matching the multipass rip) instead of reporting a read failure a
|
||||||
multipass rip would have recovered.
|
multipass rip would have recovered.
|
||||||
- **4K decode glitches at non-seamless clip joins fixed (Top Gun class).**
|
- **4K decode glitches at non-seamless clip joins fixed.**
|
||||||
Titles assembled from clips joined at non-seamless boundaries no longer drop
|
Titles assembled from clips joined at non-seamless boundaries no longer drop
|
||||||
reference frames at the join ("Could not find ref" stutter); the splice
|
reference frames at the join ("Could not find ref" stutter); the splice
|
||||||
keyframe is rewritten so the decoder discards only the genuinely-dangling
|
keyframe is rewritten so the decoder discards only the genuinely-dangling
|
||||||
|
|||||||
+1
-1
@@ -875,7 +875,7 @@ mod tests {
|
|||||||
|
|
||||||
// ── Defect-tolerant "did a key OPEN this unit?" verdict ─────────────────
|
// ── Defect-tolerant "did a key OPEN this unit?" verdict ─────────────────
|
||||||
//
|
//
|
||||||
// The Bourne-UHD bug: a commercial disc carries the odd authored-bad TS
|
// The authored-bad-packet bug: a commercial disc carries the odd bad TS
|
||||||
// packet (a pressing/encoding defect, or an AACS 2.1 forensic-variant frame)
|
// packet (a pressing/encoding defect, or an AACS 2.1 forensic-variant frame)
|
||||||
// — one non-conforming packet inside an otherwise perfectly-decrypted 6144
|
// — one non-conforming packet inside an otherwise perfectly-decrypted 6144
|
||||||
// unit. The OLD strict per-packet acceptance rejected the WHOLE unit over
|
// unit. The OLD strict per-packet acceptance rejected the WHOLE unit over
|
||||||
|
|||||||
@@ -967,7 +967,7 @@ mod tests {
|
|||||||
// mark this boundary ext_clean=false and the parser must emit the clean
|
// mark this boundary ext_clean=false and the parser must emit the clean
|
||||||
// 512-byte CORE alone (dropping the garbage), draining to the next core.
|
// 512-byte CORE alone (dropping the garbage), draining to the next core.
|
||||||
let core = make_dts_core(512);
|
let core = make_dts_core(512);
|
||||||
let garbage = vec![0xE4, 0x3F, 0xE3, 0x90, 0xCC, 0x6C]; // real Bourne head bytes
|
let garbage = vec![0xE4, 0x3F, 0xE3, 0x90, 0xCC, 0x6C]; // real head bytes from a damaged stream
|
||||||
let mut garbage = garbage;
|
let mut garbage = garbage;
|
||||||
garbage.extend(std::iter::repeat_n(0xAB, 300));
|
garbage.extend(std::iter::repeat_n(0xAB, 300));
|
||||||
let next = make_dts_core(512);
|
let next = make_dts_core(512);
|
||||||
@@ -2222,7 +2222,7 @@ mod tests {
|
|||||||
/// Real-data fixture (ignored). Re-parses a raw `.dts` elementary stream
|
/// Real-data fixture (ignored). Re-parses a raw `.dts` elementary stream
|
||||||
/// through `DtsParser` and writes the emitted access units back out, so the
|
/// through `DtsParser` and writes the emitted access units back out, so the
|
||||||
/// garbage-extension → core-only drop can be validated against an actual
|
/// garbage-extension → core-only drop can be validated against an actual
|
||||||
/// damaged stream (e.g. the extracted Bourne DTS-HD MA track) end-to-end
|
/// damaged stream (e.g. an extracted DTS-HD MA track) end-to-end
|
||||||
/// with an external DTS decoder. Env: `DTS_IN` (input), `DTS_OUT` (output).
|
/// with an external DTS decoder. Env: `DTS_IN` (input), `DTS_OUT` (output).
|
||||||
/// cargo test --lib dts::tests::reparse_real_dts_file -- --ignored --nocapture
|
/// cargo test --lib dts::tests::reparse_real_dts_file -- --ignored --nocapture
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -533,8 +533,8 @@ impl CodecParser for HevcParser {
|
|||||||
// CRA→BLA rewrite (`pending_clip_boundary`) the first IRAP of the new
|
// CRA→BLA rewrite (`pending_clip_boundary`) the first IRAP of the new
|
||||||
// clip then consumes. Without this, the splice CRA's RASL leading
|
// clip then consumes. Without this, the splice CRA's RASL leading
|
||||||
// pictures reference pre-join frames gone after concatenation and a
|
// pictures reference pre-join frames gone after concatenation and a
|
||||||
// linear decoder floods "Could not find ref with POC N" (the Top Gun
|
// linear decoder floods "Could not find ref with POC N" (the UHD
|
||||||
// UHD defect). Uses the 90 kHz PES PTS (not the rebased mux timeline)
|
// multi-clip defect). Uses the 90 kHz PES PTS (not the rebased mux timeline)
|
||||||
// UNWRAPPED onto a monotonic 64-bit timeline first — the raw 33-bit PTS
|
// UNWRAPPED onto a monotonic 64-bit timeline first — the raw 33-bit PTS
|
||||||
// wraps every ~26.5 h, and a single-clip title that crosses 2^33→0 would
|
// wraps every ~26.5 h, and a single-clip title that crosses 2^33→0 would
|
||||||
// otherwise false-arm the rewrite (corrupting a legitimate in-clip CRA).
|
// otherwise false-arm the rewrite (corrupting a legitimate in-clip CRA).
|
||||||
@@ -2197,7 +2197,7 @@ mod tests {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Regression for the "TopGun bug" (Top Gun 1986 UHD, DV P7 dual-layer):
|
/// Regression for a UHD Dolby Vision profile 7 dual-layer title:
|
||||||
/// a multi-clip title is read as one concatenated stream and the mpls
|
/// a multi-clip title is read as one concatenated stream and the mpls
|
||||||
/// connection_condition is never plumbed to the parser, so the splice CRA
|
/// connection_condition is never plumbed to the parser, so the splice CRA
|
||||||
/// opening the next clip kept its dangling RASL leading pictures and a
|
/// opening the next clip kept its dangling RASL leading pictures and a
|
||||||
|
|||||||
@@ -403,8 +403,7 @@ impl CodecParser for TrueHdParser {
|
|||||||
// global offset for the new epoch (driven by the video
|
// global offset for the new epoch (driven by the video
|
||||||
// back-jump) the stranded-high audio PTS is flung ~a whole
|
// back-jump) the stranded-high audio PTS is flung ~a whole
|
||||||
// clip past the frontier, producing the non-monotonic
|
// clip past the frontier, producing the non-monotonic
|
||||||
// audio-DTS band on multi-clip titles (Dune: Part Two, Top
|
// audio-DTS band on multi-clip titles. ADOPT the raw reset so the per-track raw PTS that
|
||||||
// Gun). ADOPT the raw reset so the per-track raw PTS that
|
|
||||||
// reaches `TimelineContinuity` carries the true boundary, and
|
// reaches `TimelineContinuity` carries the true boundary, and
|
||||||
// the corrector rebases it exactly as it already does for the
|
// the corrector rebases it exactly as it already does for the
|
||||||
// DTS / AC-3 parsers (which never clamp). Same threshold the
|
// DTS / AC-3 parsers (which never clamp). Same threshold the
|
||||||
@@ -1304,7 +1303,7 @@ mod tests {
|
|||||||
// When the buffer empties exactly on that boundary, an unconditional
|
// When the buffer empties exactly on that boundary, an unconditional
|
||||||
// reset to the PES PTS snapped the next AU's timestamp BELOW the AU just
|
// reset to the PES PTS snapped the next AU's timestamp BELOW the AU just
|
||||||
// emitted — the non-monotonic block timestamps a muxer rejects (the
|
// emitted — the non-monotonic block timestamps a muxer rejects (the
|
||||||
// Top Gun / Dune: Part Two case). The reset must clamp forward-only.
|
// multi-clip UHD case). The reset must clamp forward-only.
|
||||||
let mut parser = TrueHdParser::new();
|
let mut parser = TrueHdParser::new();
|
||||||
let au = make_truehd_unit(100);
|
let au = make_truehd_unit(100);
|
||||||
// PES1: three complete AUs at pts 90000 — buffer empties, cadence runs
|
// PES1: three complete AUs at pts 90000 — buffer empties, cadence runs
|
||||||
@@ -1329,7 +1328,7 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn clip_boundary_pts_reset_is_adopted_not_clamped() {
|
fn clip_boundary_pts_reset_is_adopted_not_clamped() {
|
||||||
// Regression (Dune: Part Two / Top Gun non-monotonic audio-DTS band):
|
// Regression (multi-clip non-monotonic audio-DTS band):
|
||||||
// a title's clips are read as one concatenated stream, so at a
|
// a title's clips are read as one concatenated stream, so at a
|
||||||
// non-seamless boundary the source PES PTS resets near zero — a LARGE
|
// non-seamless boundary the source PES PTS resets near zero — a LARGE
|
||||||
// backward step (> DISCONTINUITY_BACKSTEP_NS), NOT muxer jitter. The
|
// backward step (> DISCONTINUITY_BACKSTEP_NS), NOT muxer jitter. The
|
||||||
|
|||||||
+1
-1
@@ -1373,7 +1373,7 @@ impl<W: Write + Seek> MkvMuxer<W> {
|
|||||||
// with the base layer's. The two video PTS sequences overlap, so the EL's
|
// with the base layer's. The two video PTS sequences overlap, so the EL's
|
||||||
// frames look like multi-second backward jumps against the base layer's
|
// frames look like multi-second backward jumps against the base layer's
|
||||||
// frontier and would false-trigger an epoch reset on every GOP (the exact
|
// frontier and would false-trigger an epoch reset on every GOP (the exact
|
||||||
// ratchet that inflated Top Gun's 1-clip timeline to ~7 h). Only the base
|
// ratchet that inflated a 1-clip timeline to ~7 h). Only the base
|
||||||
// video layer establishes/advances the frontier and opens epochs; the EL
|
// video layer establishes/advances the frontier and opens epochs; the EL
|
||||||
// — like audio and subtitles — rides the current offset.
|
// — like audio and subtitles — rides the current offset.
|
||||||
let drives_epoch = Some(track_idx) == self.primary_video_track;
|
let drives_epoch = Some(track_idx) == self.primary_video_track;
|
||||||
|
|||||||
+6
-6
@@ -32,14 +32,14 @@ pub(crate) const DISCONTINUITY_GAP_NS: i64 = 1_000_000;
|
|||||||
/// boundary resets every stream together by the same delta.
|
/// boundary resets every stream together by the same delta.
|
||||||
///
|
///
|
||||||
/// **Only the VIDEO track drives epoch decisions.** A title carries one video
|
/// **Only the VIDEO track drives epoch decisions.** A title carries one video
|
||||||
/// track plus many interleaved audio + subtitle tracks (Top Gun UHD: 2 video,
|
/// track plus many interleaved audio + subtitle tracks (one UHD title: 2 video,
|
||||||
/// 11 audio, 32 PGS). Those non-video tracks are sparse and lag the video by
|
/// 11 audio, 32 PGS). Those non-video tracks are sparse and lag the video by
|
||||||
/// seconds, so their raw PTS swing well over the 3 s discontinuity threshold
|
/// seconds, so their raw PTS swing well over the 3 s discontinuity threshold
|
||||||
/// against a shared frontier even within a SINGLE clip — a late subtitle PTS
|
/// against a shared frontier even within a SINGLE clip — a late subtitle PTS
|
||||||
/// would ratchet `high_ns` up, then the next normal video frame would sit >3 s
|
/// would ratchet `high_ns` up, then the next normal video frame would sit >3 s
|
||||||
/// below it and be misread as a clip boundary, permanently bumping `offset_ns`.
|
/// below it and be misread as a clip boundary, permanently bumping `offset_ns`.
|
||||||
/// That false-positive ratchet (firing thousands of times on a one-clip title)
|
/// That false-positive ratchet (firing thousands of times on a one-clip title)
|
||||||
/// inflated Top Gun's cluster/Cue timestamps into the billions of ms and
|
/// inflated that title's cluster/Cue timestamps into the billions of ms and
|
||||||
/// destroyed its seek index. The clip-boundary INFERENCE is therefore keyed on
|
/// destroyed its seek index. The clip-boundary INFERENCE is therefore keyed on
|
||||||
/// video PTS alone: video establishes and advances the frontier and is the only
|
/// video PTS alone: video establishes and advances the frontier and is the only
|
||||||
/// track that can open a new epoch. Non-video frames are remapped under the
|
/// track that can open a new epoch. Non-video frames are remapped under the
|
||||||
@@ -200,7 +200,7 @@ mod tests {
|
|||||||
/// Characterization of the BUG: a BD title's two clips concatenated with a
|
/// Characterization of the BUG: a BD title's two clips concatenated with a
|
||||||
/// PTS reset at the boundary. WITHOUT correction the raw VIDEO timeline goes
|
/// PTS reset at the boundary. WITHOUT correction the raw VIDEO timeline goes
|
||||||
/// hard backward at clip 2 (what produced the non-monotonic-DTS band on
|
/// hard backward at clip 2 (what produced the non-monotonic-DTS band on
|
||||||
/// Dune / Top Gun). WITH `TimelineContinuity` the output is monotonic and
|
/// multi-clip UHD titles). WITH `TimelineContinuity` the output is monotonic and
|
||||||
/// continuous across the boundary. The boundary is driven by VIDEO.
|
/// continuous across the boundary. The boundary is driven by VIDEO.
|
||||||
#[test]
|
#[test]
|
||||||
fn continuity_rebases_clip_boundary_reset() {
|
fn continuity_rebases_clip_boundary_reset() {
|
||||||
@@ -256,7 +256,7 @@ mod tests {
|
|||||||
|
|
||||||
/// PRIMARY rc3 regression: a sparse, lagging NON-VIDEO track (PGS subtitle /
|
/// PRIMARY rc3 regression: a sparse, lagging NON-VIDEO track (PGS subtitle /
|
||||||
/// trailing audio) on a SINGLE-clip title must NOT inflate `offset_ns`. This
|
/// trailing audio) on a SINGLE-clip title must NOT inflate `offset_ns`. This
|
||||||
/// is the exact false-positive that destroyed Top Gun's seek index: with a
|
/// is the exact false-positive that destroyed a real title's seek index: with a
|
||||||
/// shared frontier, a late subtitle PTS ratcheted the frontier up, then the
|
/// shared frontier, a late subtitle PTS ratcheted the frontier up, then the
|
||||||
/// next normal video frame sat >3s below it and was misread as a clip
|
/// next normal video frame sat >3s below it and was misread as a clip
|
||||||
/// boundary, permanently bumping the offset — thousands of times, until the
|
/// boundary, permanently bumping the offset — thousands of times, until the
|
||||||
@@ -307,7 +307,7 @@ mod tests {
|
|||||||
/// PASSIVE rider (drives_epoch == false): if it drove epochs, every EL GOP
|
/// PASSIVE rider (drives_epoch == false): if it drove epochs, every EL GOP
|
||||||
/// would look like a multi-second backward jump against the base-layer
|
/// would look like a multi-second backward jump against the base-layer
|
||||||
/// frontier and false-trigger a clip-boundary reset — the exact ratchet that
|
/// frontier and false-trigger a clip-boundary reset — the exact ratchet that
|
||||||
/// inflated Top Gun's 1-clip 1h49m timeline to ~7 h. Here the base layer
|
/// inflated a 1-clip 1h49m timeline to ~7 h. Here the base layer
|
||||||
/// advances 0..60s while the EL re-emits the SAME 0..60s interleaved; the
|
/// advances 0..60s while the EL re-emits the SAME 0..60s interleaved; the
|
||||||
/// timeline must stay at 60s with offset 0.
|
/// timeline must stay at 60s with offset 0.
|
||||||
#[test]
|
#[test]
|
||||||
@@ -363,7 +363,7 @@ mod tests {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Regression for the original Top Gun band: a LARGE, real-magnitude
|
/// Regression for the originally-reported band: a LARGE, real-magnitude
|
||||||
/// clip-boundary back-jump on VIDEO (clip 1 ≈ 13 min, clip 2 resets to 0)
|
/// clip-boundary back-jump on VIDEO (clip 1 ≈ 13 min, clip 2 resets to 0)
|
||||||
/// must STILL be rebased to one continuous monotonic timeline — the genuine
|
/// must STILL be rebased to one continuous monotonic timeline — the genuine
|
||||||
/// multi-clip seamless behaviour is preserved, now keyed on real video
|
/// multi-clip seamless behaviour is preserved, now keyed on real video
|
||||||
|
|||||||
Reference in New Issue
Block a user