C interface for conservative frame-time estimation and EXIF evidence. More...


Go to the source code of this file.
Data Structures | |
| struct | usher_frame_timing |
| Timing evidence for one exposure, with microsecond uncertainty. More... | |
Functions | |
| struct usher_frame_timing | usher_frame_timing_estimate (uint64_t sequence, uint64_t sensor_ns, int64_t exposure_us, int64_t duration_us) |
| Translate fresh sensor evidence into a cautious pose-alignment time. | |
| bool | usher_frame_document (const struct usher_frame_timing *timing, unsigned width, unsigned height, struct exif_document *document) |
| Initialize capture EXIF for the JPEG encoded from this exposure. | |
Detailed Description
C interface for conservative frame-time estimation and EXIF evidence.
Camera timestamps use BOOTTIME while USHER pose history uses MONOTONIC. Preserve original sensor evidence and conversion uncertainty so a consumer can decline pose alignment instead of treating an estimate as a measurement. The implementation is C11; C++ camera code links through this stable C ABI.
Definition in file usher_frame_timing.h.
Function Documentation
◆ usher_frame_document()
| bool usher_frame_document | ( | const struct usher_frame_timing * | timing, |
| unsigned | width, | ||
| unsigned | height, | ||
| struct exif_document * | document ) |
Initialize capture EXIF for the JPEG encoded from this exposure.
- Parameters
-
[in] timing Same-exposure evidence, qualified or not. width Actual encoded image width. height Actual encoded image height. [out] document Caller-owned bounded destination; previous contents are replaced.
- Returns
- False for a null argument, invalid boot identity/dimensions or failed reservation.
The capture owner may add model-specific tags before serializing one APP1 payload. No filesystem operation, sidecar or feature-sized allocation is performed here. The consumer still checks boot, dimensions and timing bounds.
- Warning
- Embedded identity is not a checksum or calibrated timing measurement.
Definition at line 114 of file usher_frame_timing.c.
◆ usher_frame_timing_estimate()
| struct usher_frame_timing usher_frame_timing_estimate | ( | uint64_t | sequence, |
| uint64_t | sensor_ns, | ||
| int64_t | exposure_us, | ||
| int64_t | duration_us ) |
Translate fresh sensor evidence into a cautious pose-alignment time.
- Parameters
-
sequence Camera sequence belonging to this exposure. sensor_ns Sensor timestamp in the local BOOTTIME domain. exposure_us Exposure duration in microseconds; accepted range 0..100000. duration_us Frame duration in microseconds; accepted range 1..200000.
- Returns
- Original evidence plus an estimated midpoint and uncertainty, or unqualified defaults when clock sampling or plausibility checks fail.
Bracketing BOOTTIME with MONOTONIC samples avoids assuming equal clock origins, including after suspend. The returned record is a value, so callers can retain it with the exact frame without allocation or shared state.
- Warning
- Sensor timestamps must follow BOOTTIME. Frame duration is not a measured rolling-shutter readout time; this estimate alone proves neither shutter synchronization nor geolocation accuracy.
Definition at line 67 of file usher_frame_timing.c.