Skip to main content

Crate flashraw_camera_db

Crate flashraw_camera_db 

Source
Expand description

§flashraw-camera-db

Static camera database compiled from data/cameras.json at build time (see build.rs). Lookups are binary searches over a sorted, normalised key index — no parsing happens at runtime.

The database adds per-camera knowledge (crops, masked areas, black/white levels, CFA layout, colour matrices, decoder hints). Decoders must not require an entry to decode a file: standards-based metadata comes first, the database refines it.

Structs§

AliasGroup
Rebadged / regional model names sharing a canonical model’s data.
Camera
A camera database entry.
CameraOrientation
Per-camera orientation data (see orientation in docs/camera-db.md).
FallbackMatrix
Fallback colour data (prefix matched), used when no exact camera entry has a matrix.
ImageCrop
The image area a camera produces from an active area of area size.
OrientationRule
Orientation policy for a canonical make, optionally narrowed by a model prefix.
SensorInfo
Per-ISO sensor levels.
SizeRule
Sensor geometry selected by exact raw buffer size (bodies without margin metadata).

Statics§

ALIAS_GROUPS
CAMERAS
INDEX
MATRICES
ORIENTATION_RULES
SIZE_RULES

Functions§

all
All entries.
base_model
Map a rebadged / regional model name to its canonical model (case-insensitive); returns model unchanged when it is not an alias.
canonical_make
Normalise a maker string to its canonical brand name.
find
Look up a camera by EXIF make/model and decoder mode. Falls back to the default mode ("") when no mode-specific entry exists.
find_any
Look up a camera ignoring mode: returns the first entry for make/model.
find_matrix
Fallback matrix lookup by canonical make and model (first prefix match in table order, preferring the longest prefix on ties of the same make).
orientation_policy
Orientation policy name for a camera: its own override, else the longest matching make/model-prefix rule, else "exif-only".
size_rule
Geometry rule for a canonical make and exact raw buffer size.