FAILURE MAP
← Case archive

FA-78636 / Broadcast timecode arithmetic / Open access

Linear timecode BCD field packing: transmission order · case 01

Receivers decode hours as frames.

Verified by executionVariant 1 · 9 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The bytes are emitted hours first.

THE FAILURE

The bytes are emitted hours first.

Unsuccessful approach: Swapping only seconds and minutes still misorders the frame.

Case contract

Pack HH:MM:SS:FF into four bytes [frames, seconds, minutes, hours] in transmission order. Each byte holds units in bits 0-3 and tens from bit 4 upward. The frames byte carries the drop-frame flag (bit 6, set when the last separator is ";") and the color-frame flag (bit 7).

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
import re
N = 1
observations = []
def solve(tc, color):
    h,m,s,f=map(int,re.split('[:;]',tc))
    drop=';' in tc
    def bcd(v,flags):
        return (v//10)<<4|v%10|flags
    b0=bcd(f,(0x40 if drop else 0)|(0x80 if color else 0))
    b1=bcd(s,0)
    b2=bcd(m,0)
    b3=bcd(h,0)
    return [b3,b2,b1,b0]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: transmission order', ['23:59:59;29', True], [233, 89, 89, 35]), ('regression variant: transmission order', ['00:00:00:00', True], [128, 0, 0, 0]), ('partial repair probe: transmission order', ['10:10:09;24', False], [100, 9, 16, 16]), ('partial repair variant: transmission order', ['01:00:59;19', True], [217, 89, 0, 1]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('normal control', ['00:59:59:00', False], [0, 89, 89, 0]), ('normal control', ['01:00:00:01', False], [1, 0, 0, 1]), ('normal control', ['19:10:10:19', False], [25, 16, 16, 25])], [('regression: transmission order', ['01:02:03;04', False], [68, 3, 2, 1]), ('regression variant: transmission order', ['19:00:09;19', True], [217, 9, 0, 25]), ('partial repair probe: transmission order', ['01:59:10:24', True], [164, 16, 89, 1]), ('partial repair variant: transmission order', ['10:07:59:01', False], [1, 89, 7, 16]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:59:59:00', False], [0, 89, 89, 0]), ('normal control', ['01:00:00:01', False], [1, 0, 0, 1]), ('normal control', ['19:10:10:19', False], [25, 16, 16, 25])], [('regression: transmission order', ['01:07:10:29', True], [169, 16, 7, 1]), ('regression variant: transmission order', ['01:59:10:24', True], [164, 16, 89, 1]), ('partial repair probe: transmission order', ['00:07:09:29', True], [169, 9, 7, 0]), ('partial repair variant: transmission order', ['23:59:10:09', False], [9, 16, 89, 35]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('normal control', ['19:10:10:19', False], [25, 16, 16, 25]), ('normal control', ['00:59:59:00', False], [0, 89, 89, 0]), ('normal control', ['01:00:00:01', False], [1, 0, 0, 1])], [('regression: transmission order', ['10:10:09;24', False], [100, 9, 16, 16]), ('regression variant: transmission order', ['00:07:09:29', True], [169, 9, 7, 0]), ('partial repair probe: transmission order', ['10:00:10;19', True], [217, 16, 0, 16]), ('partial repair variant: transmission order', ['10:00:10;09', False], [73, 16, 0, 16]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:59:59:00', False], [0, 89, 89, 0]), ('normal control', ['19:10:10:19', False], [25, 16, 16, 25]), ('normal control', ['01:00:00:01', False], [1, 0, 0, 1])], [('regression: transmission order', ['00:00:00;00', False], [64, 0, 0, 0]), ('regression variant: transmission order', ['10:00:10;19', True], [217, 16, 0, 16]), ('partial repair probe: transmission order', ['10:59:10;24', True], [228, 16, 89, 16]), ('partial repair variant: transmission order', ['01:07:00;19', False], [89, 0, 7, 1]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('normal control', ['01:00:00:01', False], [1, 0, 0, 1]), ('normal control', ['00:59:59:00', False], [0, 89, 89, 0]), ('normal control', ['19:10:10:19', False], [25, 16, 16, 25])]]
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 fixtureActualExpectedOutcome
regression: transmission order[35, 89, 89, 233][233, 89, 89, 35]Failed
regression variant: transmission order[0, 0, 0, 128][128, 0, 0, 0]Failed
partial repair probe: transmission order[16, 16, 9, 100][100, 9, 16, 16]Failed
partial repair variant: transmission order[1, 0, 89, 217][217, 89, 0, 1]Failed
boundary control[0, 0, 0, 0][0, 0, 0, 0]Passed
boundary control[16, 16, 16, 16][16, 16, 16, 16]Passed
normal control[0, 89, 89, 0][0, 89, 89, 0]Passed
normal control[1, 0, 0, 1][1, 0, 0, 1]Passed
normal control[25, 16, 16, 25][25, 16, 16, 25]Passed

SHA-256 / 68041acc378c26a66ffbb70df034738011ffab6a91c24fdc476910b649b895b3

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import re
N = 1
observations = []
def solve(tc, color):
    h,m,s,f=map(int,re.split('[:;]',tc))
    drop=';' in tc
    def bcd(v,flags):
        return (v//10)<<4|v%10|flags
    b0=bcd(f,(0x40 if drop else 0)|(0x80 if color else 0))
    b1=bcd(s,0)
    b2=bcd(m,0)
    b3=bcd(h,0)
    return [b0,b2,b1,b3]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: transmission order', ['23:59:59;29', True], [233, 89, 89, 35]), ('regression variant: transmission order', ['00:00:00:00', True], [128, 0, 0, 0]), ('partial repair probe: transmission order', ['10:10:09;24', False], [100, 9, 16, 16]), ('partial repair variant: transmission order', ['01:00:59;19', True], [217, 89, 0, 1]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('normal control', ['00:59:59:00', False], [0, 89, 89, 0]), ('normal control', ['01:00:00:01', False], [1, 0, 0, 1]), ('normal control', ['19:10:10:19', False], [25, 16, 16, 25])], [('regression: transmission order', ['01:02:03;04', False], [68, 3, 2, 1]), ('regression variant: transmission order', ['19:00:09;19', True], [217, 9, 0, 25]), ('partial repair probe: transmission order', ['01:59:10:24', True], [164, 16, 89, 1]), ('partial repair variant: transmission order', ['10:07:59:01', False], [1, 89, 7, 16]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:59:59:00', False], [0, 89, 89, 0]), ('normal control', ['01:00:00:01', False], [1, 0, 0, 1]), ('normal control', ['19:10:10:19', False], [25, 16, 16, 25])], [('regression: transmission order', ['01:07:10:29', True], [169, 16, 7, 1]), ('regression variant: transmission order', ['01:59:10:24', True], [164, 16, 89, 1]), ('partial repair probe: transmission order', ['00:07:09:29', True], [169, 9, 7, 0]), ('partial repair variant: transmission order', ['23:59:10:09', False], [9, 16, 89, 35]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('normal control', ['19:10:10:19', False], [25, 16, 16, 25]), ('normal control', ['00:59:59:00', False], [0, 89, 89, 0]), ('normal control', ['01:00:00:01', False], [1, 0, 0, 1])], [('regression: transmission order', ['10:10:09;24', False], [100, 9, 16, 16]), ('regression variant: transmission order', ['00:07:09:29', True], [169, 9, 7, 0]), ('partial repair probe: transmission order', ['10:00:10;19', True], [217, 16, 0, 16]), ('partial repair variant: transmission order', ['10:00:10;09', False], [73, 16, 0, 16]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('normal control', ['00:59:59:00', False], [0, 89, 89, 0]), ('normal control', ['19:10:10:19', False], [25, 16, 16, 25]), ('normal control', ['01:00:00:01', False], [1, 0, 0, 1])], [('regression: transmission order', ['00:00:00;00', False], [64, 0, 0, 0]), ('regression variant: transmission order', ['10:00:10;19', True], [217, 16, 0, 16]), ('partial repair probe: transmission order', ['10:59:10;24', True], [228, 16, 89, 16]), ('partial repair variant: transmission order', ['01:07:00;19', False], [89, 0, 7, 1]), ('boundary control', ['00:00:00:00', False], [0, 0, 0, 0]), ('boundary control', ['10:10:10:10', False], [16, 16, 16, 16]), ('normal control', ['01:00:00:01', False], [1, 0, 0, 1]), ('normal control', ['00:59:59:00', False], [0, 89, 89, 0]), ('normal control', ['19:10:10:19', False], [25, 16, 16, 25])]]
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 fixtureActualExpectedOutcome
regression: transmission order[233, 89, 89, 35][233, 89, 89, 35]Passed
regression variant: transmission order[128, 0, 0, 0][128, 0, 0, 0]Passed
partial repair probe: transmission order[100, 16, 9, 16][100, 9, 16, 16]Failed
partial repair variant: transmission order[217, 0, 89, 1][217, 89, 0, 1]Failed
boundary control[0, 0, 0, 0][0, 0, 0, 0]Passed
boundary control[16, 16, 16, 16][16, 16, 16, 16]Passed
normal control[0, 89, 89, 0][0, 89, 89, 0]Passed
normal control[1, 0, 0, 1][1, 0, 0, 1]Passed
normal control[25, 16, 16, 25][25, 16, 16, 25]Passed

SHA-256 / cd344591a1a2be476256961f9b45b10f3133ebb140f22878223bf0d13dac60eb

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 9 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:37.295565+00:00.

Case digest / 37b9f076045ed2b01f5130b7b2946056f2e27c2305ba708814fd073ce3559a9f