Source: https://guthlabs.ai/docs/instruments/timecode-math-calculator/mechanism/

instrument mechanism / verified-clean

# Timecode Math Calculator mechanism

The inspectable method record for Timecode Math Calculator, kept separate from implementation and qualification.

Status: **VERIFIED_CLEAN**Lifecycle: **verified-clean**

## Model scope

NEEDS_REVIEW because the exact drop-frame correction algorithm and the frame-rate-conversion policy are ambiguous. The vectors assume SMPTE-style 29.97 DF and 59.94 DF, absolute frame-index arithmetic, elapsed-time-preserving conversion, and exact target-frame results.

- The stated formula is correct for non-drop-frame timecodes when fps is an integer nominal frame rate and ff is a frame number in the range 0 through fps-1.

- The formula is incomplete for 29.97 and 59.94 drop-frame timecode. It must use nominal rates of 30 and 60 respectively, with 2 dropped frame numbers per non-tenth minute at 29.97 DF and 4 dropped frame numbers per non-tenth minute at 59.94 DF.

- The drop-frame correction algorithm is not specified, including the exact valid-rate mapping, dropped-frame count, minute-boundary exceptions, and conversion between absolute frame numbers and displayed timecode.

- Frame-rate conversion is underspecified: the spec does not state whether conversion preserves elapsed time, absolute frame count, or display labels, nor how fractional-frame results are rounded.

- The spec does not define behavior for subtraction producing negative results, timecode rollover, or whether results may exceed 24 hours.

## Units and conventions

- fps means frames per second; 29.97 and 59.94 are treated as exact nominal labels for display but as 30000/1001 and 60000/1001 for elapsed-time calculations.

- Non-drop-frame calculations use an integer nominal frame rate, such as 24 or 30.

- 29.97 DF uses a 30-frame nominal rate and drops frame numbers ;00 and ;01 at the start of every minute except each tenth minute.

- 59.94 DF uses a 60-frame nominal rate and drops frame numbers ;00 through ;03 at the start of every minute except each tenth minute.

- The test-vector frame totals for drop-frame cases are absolute nominal frame indices after applying the SMPTE drop-frame correction.

- Frame-rate conversion in the third vector preserves elapsed time exactly and uses a target frame rate of 30 fps.

## Inspectable vector

One of 4 source-bound review vectors:

````
{
  "inputs": {
    "timecode_a": "01:02:03:12",
    "timecode_b": "00:00:10:12",
    "operation": "add",
    "frame_rate": 24,
    "mode": "non-drop-frame"
  },
  "expected_outputs": {
    "resulting_timecode": "01:02:14:00",
    "total_frames": 89616
  },
  "working": "At 24 fps: A = 1*3600*24 + 2*60*24 + 3*24 + 12 = 86400 + 2880 + 72 + 12 = 89364 frames. B = 0*86400 + 0*1440 + 10*24 + 12 = 252 frames. Sum = 89364 + 252 = 89616 frames. Convert back: 89616 - 86400 = 3216; 3216 - 2*1440 = 336; 336 - 14*24 = 0. Result = 01:02:14:00."
}
````

## Failure boundary

**BREAK_CLAIMED** · SELF_FLAGGED

The 29.97 DF domain contains skipped frame labels that must be rejected, and subtraction can produce a negative result whose display convention is unspecified. A calculator that blindly applies arithmetic or silently wraps negatives can return a misleading result.

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/timecode-math-calculator/>)[03**Implementation**](<https://guthlabs.ai/docs/instruments/timecode-math-calculator/implementation/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/timecode-math-calculator/qualification/>)

## Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

- `VERIFIED_LEDGER.json`

- `evidence-tranche4/tranche4-results.json`

- `BOUNDARY_HAZARD_CATALOG.json`
