Skip to content

Will-I4M/LDA-explorer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

LDA-explorer

A single‑page, in‑browser viewer for ARRI LDA Files. This tool was written after editing some .tab files with a hexadecimal editor and is not an official tool attached to the brand but a support for testing, compatibility as well as for educational purposes.

  • Drag & drop one or more .tab files, or a .zip that contains them.
  • Runs entirely locally in your browser (no upload to a server).
  • Two modes:
    • Default: “clean” view (lens metadata + point tables + motor min/max per axis).
    • Expert: exposes raw/diagnostic fields (clusters, markers, offsets, preambles, raw bytes).

This repository/document captures what was reverse‑engineered during the session. It is not an official ARRI specification.


What an LDA .tab contains (high level)

An LDA .tab file stores lookup tables that map motor/encoder positions (U16, big‑endian) to ring marks (focus distance, iris, sometimes zoom). Cameras use this to display correct focus distance / T‑stop / zoom markings for a given motor position.

The file behaves like a small container:

  • A binary header with constants and per‑axis headers.
  • Several ASCII, null‑terminated strings embedded in the binary (lens name, manufacturer, serial, etc.).
  • One or more axis blocks (focus / iris / zoom) each containing a list of points.

File sizes are variable because the number of points per axis is variable.


Key byte patterns and structural markers

Signature block (common pivot)

A recurring signature appears in many files:

  • 02 0F 20 (signature)

Immediately after the signature, two U16 values appear (big‑endian). They match end‑stops (min/max) but their order can vary between files.

A typical focus header around the signature looks like:

02 0F 20  [U16 A] [U16 B]  00 81 [FLAG]  F0 [U16 C]  F9 [U16 INF]

Observed meanings:

  • U16 A, U16 B: end‑stops (min/max, order may swap)
  • 00 81: constant marker in the header
  • FLAG: a per‑file flag used for clustering (see below)
  • F0 [U16 C]: header key / reference value (often repeats later)
  • F9 [U16 INF]: infinity motor position (the “∞” ring mark)

Records separator

Within an axis, each point record is structured as:

[ring_value (1..N bytes)]  F7  [motor_pos_u16be]
  • F7 separates the “ring mark” payload from the motor position.
  • Motor position is U16 big‑endian (0..65535).

Axis terminator

Each axis point list ends with:

F0 [U16 end_key]

The end_key often matches the axis header key.

Marker blob 36/37 03 0F 02

Many files contain a blob before a non‑focus axis (commonly iris in the analyzed dataset):

[U16 X] 00..00  [36 or 37] 03 0F 02  [axis_key_u16] ...

Notes:

  • The 36/37 byte is treated as a variant marker.
  • The bytes before it often look like U16 + zero padding. Padding length varies across files (e.g. 4 bytes vs 5 bytes preamble), suggesting reserved/padding differences between variants/firmware.
  • 0F 02 appears constant in the analyzed corpus and is likely an axis/type identifier (still not fully confirmed for zoom/metric variants).

Cluster detection (two common families)

Across a large Leica subset, two stable “clusters” were observed using the focus header fields:

  • Cluster 1: FLAG = 0x80 and u16_after_header_f0 = 0x0034 (decimal 52)
  • Cluster 2: FLAG = 0x00 and u16_after_header_f0 = 0x0069 (decimal 105)

This appears to represent a format/option variant (possibly resolution/units/firmware). The exact semantic meaning is not confirmed.


Ring value encoding (what we can decode today)

1) Focus distance — imperial (feet / feet+inches / inches)

The reverse engineering found a compact nibble/BCD encoding rather than standard floats.

Feet (<10)

  • xB (one byte) ⇒ x feet
    • Example: 8B8'

Feet (10..99)

  • XX BD (two bytes, XX is BCD) ⇒ feet
    • Example: 30 BD30'

Feet (>= 100)

  • 12 0B (two bytes) ⇒ 120'
    • Rule: b0 is BCD for the first two digits ("12"), and the high nibble of b1 is the third digit (0), with low nibble B.

Feet + inches

  • xB yD (two bytes) ⇒ x' y"
    • Example: 3B 6D3'6"

Inches (<10)

  • xC (one byte) ⇒ x inches
    • Example: 9C9"

Inches (>=10) — variant A

  • XX CD (two bytes, XX is BCD) ⇒ inches
    • Example: 22 CD22"

Inches (>=10) — variant B (highlighted in Expert mode)

  • 0B XX (two bytes, XX is BCD) ⇒ inches
    • Example: 0B 2121"

This second inches encoding (0B XX) appears on some lenses below ~2 feet and seems to come from a different authoring workflow.

In charts, focus values are normalized to inches for a single numeric Y‑axis.

2) Iris (T‑stops)

Iris marks are encoded with an A/D nibble pattern and/or BCD for integers:

  • xD (one byte) ⇒ integer T‑stop x

    • Example: 4D4
  • xA yD (two bytes) ⇒ decimal x.y

    • Example: 2A 8D2.8
  • 11 / 16 / 22 (one byte, BCD) ⇒ integer stops

In charts, iris values are numeric T‑stops.


Infinity mark (important fix)

The focus header contains:

  • F9 [U16 INF]

This U16 is the motor position at infinity (the farthest ring mark). It must be included as the first point (displayed as ). It also participates in the true motor min/max for that axis.


What is still unknown / future work

  • Metric focus encoding (meters/cm) was not conclusively identified in the provided dataset.
  • Zoom axis identification and its ring encoding need more samples containing 3 axes.
  • The precise semantics of:
    • FLAG and u16_after_header_f0 (clusters)
    • the 0F 02 field in the marker blob
    • the preamble/padding length variability before 36/37 03 0F 02

LDA explorer UI behaviour

  • Default view shows:

    • extracted ASCII strings (snippets)
    • per‑axis point list: ring mark → motor position
    • per‑axis motor min/max (including infinity)
    • optional charts (enabled by default)
  • Expert mode additionally shows:

    • cluster classification (flag + key)
    • marker blobs (36/37 + preamble)
    • offsets and raw hex values
    • highlight for the inches variant 0B XX

Files

  • LDA_explorer_en.html – the English single‑page tool.

Disclaimer

This is a reverse‑engineered description based on a limited corpus of .tab files. It may not cover all ARRI firmware versions, all lens families, or all unit/axis configurations.

About

A single‑page, in‑browser viewer for ARRI LDA Files. This tool was written after editing some .tab files with a hexadecimal editor and is not an official tool attached to the brand but a support for testing, compatibility as well as for educational purposes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages