FA-78820 / Broadcast timecode arithmetic / Member archive
90 kHz presentation timestamp to frame label: wrap modulus · case 05
Streams that pass the PTS rollover jump backwards by more than 13 hours.
Case contract
PTS values are 33-bit 90 kHz ticks. The elapsed ticks since first_pts wrap modulo 2^33, except that a PTS less than 90000 ticks before first_pts (reordering pre-roll) returns None. The frame is the nearest frame at rate [N,D] (halves up); the label uses nominal rate ceil(N/D) and wraps at 24 hours.
Why this case matters
Timecode arithmetic errors misplace edits, commercial breaks and captions against the broadcast clock.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: wrap modulus | [1933907, "10:44:38:07"] | [4320000, "00:00:00:00"] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗