FA-78606 / Broadcast timecode arithmetic / Open access
Non-drop label to wall clock at pulled-down rates: rate numerator · case 01
Wall-clock conversions run fast by 0.2 percent at pulled-down rates.
ROOT CAUSE
The 1001 factor is applied to the numerator as well as the denominator.
THE FAILURE
The 1001 factor is applied to the numerator as well as the denominator.
Unsuccessful approach: Dropping the scale of 1000 breaks the ratio against the millisecond denominator.
Case contract
Rates "23.976", "29.97", "59.94" run at nominal*1000/1001 frames per second while labels count nominal frames per second (non-drop). mode "to_ms": label to elapsed milliseconds, rounded half up. mode "to_tc": milliseconds to the nearest frame (half up), formatted as a non-drop label wrapping at 24 hours.
Why this case matters
Timecode arithmetic errors misplace edits, commercial breaks and captions against the broadcast clock.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(value, rate, mode):
nominal={'23.976':24,'29.97':30,'59.94':60,'24':24,'25':25,'30':30}[rate]
den=1001 if '.' in rate else 1000
num=nominal*1001
if mode=='to_ms':
h,m,s,f=map(int,value.split(':'))
n=((h*60+m)*60+s)*nominal+f
return (2*n*1000*den+num)//(2*num)
n=(2*value*num+1000*den)//(2000*den)
return '%02d:%02d:%02d:%02d'%(n//(3600*nominal)%24,n//(60*nominal)%60,n//nominal%60,n%nominal)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: rate numerator', ['01:00:00:00', '29.97', 'to_ms'], 3603600), ('regression variant: rate numerator', ['10:00:01:24', '25', 'to_ms'], 36001960), ('partial repair probe: rate numerator', [3600000, '29.97', 'to_tc'], '00:59:56:12'), ('partial repair variant: rate numerator', ['10:59:00:45', '23.976', 'to_ms'], 39581417), ('normal control', [1, '24', 'to_tc'], '00:00:00:00'), ('normal control', [0, '24', 'to_tc'], '00:00:00:00'), ('normal control', ['00:00:00:00', '29.97', 'to_ms'], 0)], [('regression: rate numerator', [3600000, '29.97', 'to_tc'], '00:59:56:12'), ('regression variant: rate numerator', [86399999, '25', 'to_tc'], '00:00:00:00'), ('partial repair probe: rate numerator', ['00:00:00:01', '25', 'to_ms'], 40), ('partial repair variant: rate numerator', [86399999, '23.976', 'to_tc'], '23:58:33:16'), ('normal control', [0, '59.94', 'to_tc'], '00:00:00:00'), ('normal control', [1, '25', 'to_tc'], '00:00:00:00'), ('normal control', [1, '30', 'to_tc'], '00:00:00:00')], [('regression: rate numerator', [3603600, '23.976', 'to_tc'], '01:00:00:00'), ('regression variant: rate numerator', ['10:59:00:45', '23.976', 'to_ms'], 39581417), ('partial repair probe: rate numerator', [1020, '24', 'to_tc'], '00:00:01:00'), ('partial repair variant: rate numerator', [250, '59.94', 'to_tc'], '00:00:00:15'), ('normal control', [0, '29.97', 'to_tc'], '00:00:00:00'), ('normal control', [20, '24', 'to_tc'], '00:00:00:00'), ('normal control', [1, '24', 'to_tc'], '00:00:00:00')], [('regression: rate numerator', [1020, '24', 'to_tc'], '00:00:01:00'), ('regression variant: rate numerator', [86399999, '23.976', 'to_tc'], '23:58:33:16'), ('partial repair probe: rate numerator', ['23:01:00:12', '30', 'to_ms'], 82860400), ('partial repair variant: rate numerator', ['10:59:00:00', '24', 'to_ms'], 39540000), ('normal control', [0, '23.976', 'to_tc'], '00:00:00:00'), ('normal control', ['00:00:00:00', '29.97', 'to_ms'], 0), ('normal control', [0, '59.94', 'to_tc'], '00:00:00:00')], [('regression: rate numerator', ['23:01:00:12', '30', 'to_ms'], 82860400), ('regression variant: rate numerator', ['10:59:00:00', '24', 'to_ms'], 39540000), ('partial repair probe: rate numerator', ['10:00:01:24', '25', 'to_ms'], 36001960), ('partial repair variant: rate numerator', ['01:01:01:36', '30', 'to_ms'], 3662200), ('normal control', [0, '30', 'to_tc'], '00:00:00:00'), ('normal control', [1, '30', 'to_tc'], '00:00:00:00'), ('normal control', [0, '29.97', 'to_tc'], '00:00:00:00')]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: rate numerator | 3600000 | 3603600 | Failed |
| regression variant: rate numerator | 35965994 | 36001960 | Failed |
| partial repair probe: rate numerator | 01:00:00:00 | 00:59:56:12 | Failed |
| partial repair variant: rate numerator | 39541875 | 39581417 | Failed |
| normal control | 00:00:00:00 | 00:00:00:00 | Passed |
| normal control | 00:00:00:00 | 00:00:00:00 | Passed |
| normal control | 0 | 0 | Passed |
SHA-256 / afb5473b00362fbc010a4fc7d3ed594b6e09c3a008eb55cfa2ee59aad2c569f8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(value, rate, mode):
nominal={'23.976':24,'29.97':30,'59.94':60,'24':24,'25':25,'30':30}[rate]
den=1001 if '.' in rate else 1000
num=nominal
if mode=='to_ms':
h,m,s,f=map(int,value.split(':'))
n=((h*60+m)*60+s)*nominal+f
return (2*n*1000*den+num)//(2*num)
n=(2*value*num+1000*den)//(2000*den)
return '%02d:%02d:%02d:%02d'%(n//(3600*nominal)%24,n//(60*nominal)%60,n//nominal%60,n%nominal)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: rate numerator', ['01:00:00:00', '29.97', 'to_ms'], 3603600), ('regression variant: rate numerator', ['10:00:01:24', '25', 'to_ms'], 36001960), ('partial repair probe: rate numerator', [3600000, '29.97', 'to_tc'], '00:59:56:12'), ('partial repair variant: rate numerator', ['10:59:00:45', '23.976', 'to_ms'], 39581417), ('normal control', [1, '24', 'to_tc'], '00:00:00:00'), ('normal control', [0, '24', 'to_tc'], '00:00:00:00'), ('normal control', ['00:00:00:00', '29.97', 'to_ms'], 0)], [('regression: rate numerator', [3600000, '29.97', 'to_tc'], '00:59:56:12'), ('regression variant: rate numerator', [86399999, '25', 'to_tc'], '00:00:00:00'), ('partial repair probe: rate numerator', ['00:00:00:01', '25', 'to_ms'], 40), ('partial repair variant: rate numerator', [86399999, '23.976', 'to_tc'], '23:58:33:16'), ('normal control', [0, '59.94', 'to_tc'], '00:00:00:00'), ('normal control', [1, '25', 'to_tc'], '00:00:00:00'), ('normal control', [1, '30', 'to_tc'], '00:00:00:00')], [('regression: rate numerator', [3603600, '23.976', 'to_tc'], '01:00:00:00'), ('regression variant: rate numerator', ['10:59:00:45', '23.976', 'to_ms'], 39581417), ('partial repair probe: rate numerator', [1020, '24', 'to_tc'], '00:00:01:00'), ('partial repair variant: rate numerator', [250, '59.94', 'to_tc'], '00:00:00:15'), ('normal control', [0, '29.97', 'to_tc'], '00:00:00:00'), ('normal control', [20, '24', 'to_tc'], '00:00:00:00'), ('normal control', [1, '24', 'to_tc'], '00:00:00:00')], [('regression: rate numerator', [1020, '24', 'to_tc'], '00:00:01:00'), ('regression variant: rate numerator', [86399999, '23.976', 'to_tc'], '23:58:33:16'), ('partial repair probe: rate numerator', ['23:01:00:12', '30', 'to_ms'], 82860400), ('partial repair variant: rate numerator', ['10:59:00:00', '24', 'to_ms'], 39540000), ('normal control', [0, '23.976', 'to_tc'], '00:00:00:00'), ('normal control', ['00:00:00:00', '29.97', 'to_ms'], 0), ('normal control', [0, '59.94', 'to_tc'], '00:00:00:00')], [('regression: rate numerator', ['23:01:00:12', '30', 'to_ms'], 82860400), ('regression variant: rate numerator', ['10:59:00:00', '24', 'to_ms'], 39540000), ('partial repair probe: rate numerator', ['10:00:01:24', '25', 'to_ms'], 36001960), ('partial repair variant: rate numerator', ['01:01:01:36', '30', 'to_ms'], 3662200), ('normal control', [0, '30', 'to_tc'], '00:00:00:00'), ('normal control', [1, '30', 'to_tc'], '00:00:00:00'), ('normal control', [0, '29.97', 'to_tc'], '00:00:00:00')]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: rate numerator | 3603600000 | 3603600 | Failed |
| regression variant: rate numerator | 36001960000 | 36001960 | Failed |
| partial repair probe: rate numerator | 00:00:03:18 | 00:59:56:12 | Failed |
| partial repair variant: rate numerator | 39581416875 | 39581417 | Failed |
| normal control | 00:00:00:00 | 00:00:00:00 | Passed |
| normal control | 00:00:00:00 | 00:00:00:00 | Passed |
| normal control | 0 | 0 | Passed |
SHA-256 / e07153020de46f58523ace7c66779c34ac97b470580edb5260b35b48fd6ad988
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
A deterministic bounded teaching model with a stipulated toy contract; it does not claim conformance to SMPTE or any broadcast standard. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:49:36.685794+00:00.
Case digest / 71340301c7c44a959719f54a98cb48546c58a7348716695e26a351e07c15b9b4