Skip to content

Draft: qualify MPEG1/2 packet cache presentation coverage - #982

Draft
orut34iop wants to merge 4 commits into
superuser404notfound:mainfrom
orut34iop:codex/fix-mpeg12-software-cache-coverage
Draft

orut34iop wants to merge 4 commits into
superuser404notfound:mainfrom
orut34iop:codex/fix-mpeg12-software-cache-coverage

Conversation

@orut34iop

@orut34iop orut34iop commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Millisecond packet durations can leave 1 ms holes between adjacent MPEG presentation timestamps, fragmenting software-cache residency and rejecting retained seeks. Qualify MPEG1/2 for the existing depth-32 successor-PTS model. Missing/late timestamps and real discontinuities still invalidate coverage, and the final picture gets no invented end. No timestamp rewriting, decoder/store algorithm changes, storage-default change, WMV3 admission, or downstream pin update.

This remains a Draft for maintainer review of the documented container limits. Current head: 67434922642488204c551bb832f7bef90ec8e102, based on official a6fbf0a1c469df98df66d886482b9f062cdab7f8. Latest CI has passed all five jobs: default macOS (5724 Swift Testing cases in both ordinary and strict-pool runs), all traits (6199 in each run), iOS/tvOS test-target compilation, and docs/hygiene. Independent cache/timestamp regression scripts also passed. Draft automated review is skipped.

The fixtures now include MPEG1/2 progressive, interlaced frame pictures, repeat-first-field pulldown, and separately coded MPEG-2 fields. The new original procedural-pixel input contains 60 top and 60 bottom fields. Fixed Demuxer/libavcodec tests assert that every Matroska and TS packet contains exactly [top, bottom], that 60 packets drain to 60 decoded frames, and that all presentation PTS agree. The Matroska fixture also runs the full disk/memory matrix: rounding gaps and retained seeks, unknown EOF tail, source-axis offset, reset/epoch, missing/late PTS, discontinuity and actual history eviction. The TS witness covers parser/decoder pairing, not another complete store matrix. This does not prove arbitrary broken packetization or every muxer.

Scripts/generate-mpeg-field-fixture.py reproduces the new fixtures from an externally built, pinned MSSG reference encoder and FFmpeg 8.1.2. An independent rerun matched all hashes. Source provenance, tool requirements, hashes and limitations are in docs/mpeg-cache-qualification.md. Only generated pixels and the original generator script are contributed; no third-party film, encoder source/binary or credentials are included, and CI needs no generator or media download.

Validation of this head: signed macOS build; 20 affected test functions in ordinary and strict cooperative-pool runs; two complete default parallel runs, each with 830 XCTest cases (one existing skip) plus 17 XCTest cases and 5724 Swift Testing cases, all passing; docs, test hygiene and diff checks. The existing duration-only negative control still fragments the generated field sample, while successor coverage passes. No physical-device, software deinterlacer/renderer or continuous remote playback acceptance is claimed.

The prior head 849ff7a7 passed all-traits macOS and iOS/tvOS, but its default macOS job stopped logging about six seconds into Swift Testing and reached the 30-minute job timeout. Compilation and XCTest had finished. There is no failing-test summary or captured stack, and the cause remains unisolated. A rerun request returned HTTP 403 (repository admin required). Local Xcode 27.2/Swift 6.4.2 differs from that runner's Xcode 27.1/Swift 6.4. The new run triggered by this substantive fixture/test update passed; the old stall did not recur, but its root cause is still unisolated. No empty commit, timeout weakening or PR recreation was used to bypass the failed attempt.

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