Monado OpenXR Runtime
Loading...
Searching...
No Matches
t_led_sync_refinement Struct Reference
Collaboration diagram for t_led_sync_refinement:

Data Fields

bool initialized
 Whether the structure has been fully initialized.
 
enum u_logging_level log_level
 
struct t_led_sync_refinement_options options
 The options to use for refinement.
 
struct os_mutex lock
 
bool has_exposure_time
 Whether we know the actual exposure time of the frames.
 
time_duration_ns exposure_time_ns
 The known time the frame was exposed for.
 
time_duration_ns exposure_interval_ns
 The known interval between frames.
 
struct t_led_sync_period_estimate period_estimate
 
uint64_t last_exposure_sequence_id
 The latest timing event's frame and exposure time.
 
timepoint_ns last_exposure_ns
 
bool has_sample_for_driver
 Whether we have a sample ready to be sent to the driver/device.
 
struct t_led_sync_sample sample_for_driver
 The sample to be sent to the driver/device on it's next convenience.
 
bool sample_applied
 Whether the sample has been applied.
 
enum t_led_sync_phase phase
 The current search phase.
 
time_duration_ns current_clock_offset_ns
 The current estimated latency offset between the device and the host, in nanoseconds.
 
time_duration_ns current_blink_fudge_ns
 The amount of fudge between the latency offset and the actual blink start time, in nanoseconds, so we can place the blink at the optimal time for the exposure.
 
time_duration_ns current_blink_duration_ns
 How long the LEDs blink for, each frame.
 
uint32_t frames_since_last_visually_seen
 The amount of frames since the controller was last visually seen.
 
uint64_t current_sequence_id
 The sequence ID of the latest timing event we processed.
 
timepoint_ns last_sample_apply_time_ns
 The time the latest sample was applied to the driver/device.
 
time_duration_ns found_left_edge_ns
 The found left edge of the exposure, -1 if not found yet.
 
time_duration_ns found_right_edge_ns
 The found right edge of the exposure, -1 if not found yet.
 
struct { 
 
   time_duration_ns   left_bound_ns 
 The current left bound of the binary search, if we're in a find edge phase. More...
 
   time_duration_ns   right_bound_ns 
 The current right bound of the binary search, if we're in a find edge phase. More...
 
} binary_search_state 
 
struct { 
 
   uint32_t   cur_sequence_id 
 The index into the seen LEDs ring buffer. More...
 
   timepoint_ns   last_selection_ns 
 The time when we last selected the set of LEDs. More...
 
   uint32_t   num_samples 
 
   struct t_led_sync_seen_led   buf [XRT_CONSTELLATION_MAX_LEDS_PER_DEVICE *5] 
 The seen LEDs ring buffer. More...
 
} leds_seen 
 
struct { 
 
   bool   applied_gray_start 
 Whether or not we have applied the final cycle position or not. More...
 
   float   led_brightnesses [11
      *XRT_TRACKING_MAX_FRAME_SOURCES *2] 
 A ring buffer storing the last T_LED_SYNC_GRAY_CODE_SIZE_BITS bits of the brightness sequence per camera. More...
 
   float   led_facing_dots [11
      *XRT_TRACKING_MAX_FRAME_SOURCES *2] 
 A ring buffer storing the last T_LED_SYNC_GRAY_CODE_SIZE_BITS bits of the sequence, storing the facing directions of each sample, so that we can pick the value from the camera that saw the LED the best. More...
 
   uint32_t   matching_decodes 
 How many decodes we've had that match in a row, see GRAY_CODE_MATCHES_NEEDED. More...
 
   uint8_t   decoded_gray_code 
 The gray code we're trying. More...
 
   timepoint_ns   last_accepted_gray_code_ns 
 The last time we had an accepted gray code (or the start of this phase). More...
 
} decode_gray 
 
struct { 
 
   uint8_t   leds [2] 
 The LEDs frames were recorded for. More...
 
   uint64_t   window_start_sequence_id 
 The first frame the next measurement may use. More...
 
   struct t_led_sync_frame   frames [XRT_TRACKING_MAX_FRAME_SOURCES][20] 
 Ring buffer of the last T_LED_SYNC_BRIGHTNESS_CURVE_NUM_SAMPLES frames per camera. More...
 
} optimize_brightness_curve 
 
struct t_led_sync_delta_sync delta_sync
 
struct { 
 
   time_duration_ns   last_good_blink_duration_ns 
 The last blink duration that didn't cause the device to become unstable. More...
 
   bool   backing_off 
 Whether we're currently trying to back off a lower blink duration. More...
 
} blink_time_refinement_state 
 
struct { 
 
   time_duration_ns   driver_host_device_clock_offset_ns 
 The latest estimated host->device clock offset from the driver. More...
 
   bool   has_saved_offset 
 
   time_duration_ns   saved_offset 
 
} optical_driven_offset 
 

Field Documentation

◆ applied_gray_start

bool t_led_sync_refinement::applied_gray_start

Whether or not we have applied the final cycle position or not.

◆ backing_off

bool t_led_sync_refinement::backing_off

Whether we're currently trying to back off a lower blink duration.

◆ buf

struct t_led_sync_seen_led t_led_sync_refinement::buf[XRT_CONSTELLATION_MAX_LEDS_PER_DEVICE * 5]

The seen LEDs ring buffer.

Indexed via (leds_seen_idx * XRT_CONSTELLATION_MAX_LEDS_PER_DEVICE) + led_id

◆ cur_sequence_id

uint32_t t_led_sync_refinement::cur_sequence_id

The index into the seen LEDs ring buffer.

◆ current_blink_duration_ns

time_duration_ns t_led_sync_refinement::current_blink_duration_ns

How long the LEDs blink for, each frame.

Referenced by change_good_cutoff(), and get_search_period_locked().

◆ current_blink_fudge_ns

time_duration_ns t_led_sync_refinement::current_blink_fudge_ns

The amount of fudge between the latency offset and the actual blink start time, in nanoseconds, so we can place the blink at the optimal time for the exposure.

◆ current_clock_offset_ns

time_duration_ns t_led_sync_refinement::current_clock_offset_ns

The current estimated latency offset between the device and the host, in nanoseconds.

This is what we are trying to refine.

Referenced by bg_model_stale(), delta_sync_reanchor(), and delta_sync_set_skew().

◆ current_sequence_id

uint64_t t_led_sync_refinement::current_sequence_id

The sequence ID of the latest timing event we processed.

◆ decoded_gray_code

uint8_t t_led_sync_refinement::decoded_gray_code

The gray code we're trying.

◆ driver_host_device_clock_offset_ns

time_duration_ns t_led_sync_refinement::driver_host_device_clock_offset_ns

The latest estimated host->device clock offset from the driver.

Referenced by t_led_sync_push_host_device_clock_offset().

◆ exposure_interval_ns

time_duration_ns t_led_sync_refinement::exposure_interval_ns

The known interval between frames.

Referenced by frame_period_ns(), frames_since_sample_apply(), and update_period_estimate().

◆ exposure_time_ns

time_duration_ns t_led_sync_refinement::exposure_time_ns

The known time the frame was exposed for.

Referenced by change_good_cutoff(), and get_search_period_locked().

◆ found_left_edge_ns

time_duration_ns t_led_sync_refinement::found_left_edge_ns

The found left edge of the exposure, -1 if not found yet.

◆ found_right_edge_ns

time_duration_ns t_led_sync_refinement::found_right_edge_ns

The found right edge of the exposure, -1 if not found yet.

◆ frames

struct t_led_sync_frame t_led_sync_refinement::frames[XRT_TRACKING_MAX_FRAME_SOURCES][20]

Ring buffer of the last T_LED_SYNC_BRIGHTNESS_CURVE_NUM_SAMPLES frames per camera.

◆ frames_since_last_visually_seen

uint32_t t_led_sync_refinement::frames_since_last_visually_seen

The amount of frames since the controller was last visually seen.

◆ has_exposure_time

bool t_led_sync_refinement::has_exposure_time

Whether we know the actual exposure time of the frames.

We may not, so we have to work without it in some cases.

Referenced by get_search_period_locked().

◆ has_sample_for_driver

bool t_led_sync_refinement::has_sample_for_driver

Whether we have a sample ready to be sent to the driver/device.

Referenced by bg_send_correction().

◆ initialized

bool t_led_sync_refinement::initialized

Whether the structure has been fully initialized.

Referenced by t_led_sync_push_host_device_clock_offset().

◆ last_accepted_gray_code_ns

timepoint_ns t_led_sync_refinement::last_accepted_gray_code_ns

The last time we had an accepted gray code (or the start of this phase).

◆ last_exposure_sequence_id

uint64_t t_led_sync_refinement::last_exposure_sequence_id

The latest timing event's frame and exposure time.

Referenced by delta_sync_reanchor().

◆ last_good_blink_duration_ns

time_duration_ns t_led_sync_refinement::last_good_blink_duration_ns

The last blink duration that didn't cause the device to become unstable.

◆ last_sample_apply_time_ns

timepoint_ns t_led_sync_refinement::last_sample_apply_time_ns

The time the latest sample was applied to the driver/device.

Referenced by frames_since_sample_apply().

◆ last_selection_ns

timepoint_ns t_led_sync_refinement::last_selection_ns

The time when we last selected the set of LEDs.

◆ led_brightnesses

float t_led_sync_refinement::led_brightnesses[11 *XRT_TRACKING_MAX_FRAME_SOURCES * 2]

A ring buffer storing the last T_LED_SYNC_GRAY_CODE_SIZE_BITS bits of the brightness sequence per camera.

Indexed via T_LED_SYNC_GRAY_CODE_BUFFER_INDEX

◆ led_facing_dots

float t_led_sync_refinement::led_facing_dots[11 *XRT_TRACKING_MAX_FRAME_SOURCES * 2]

A ring buffer storing the last T_LED_SYNC_GRAY_CODE_SIZE_BITS bits of the sequence, storing the facing directions of each sample, so that we can pick the value from the camera that saw the LED the best.

Indexed via T_LED_SYNC_GRAY_CODE_BUFFER_INDEX

◆ leds

uint8_t t_led_sync_refinement::leds[2]

The LEDs frames were recorded for.

◆ left_bound_ns

time_duration_ns t_led_sync_refinement::left_bound_ns

The current left bound of the binary search, if we're in a find edge phase.

◆ matching_decodes

uint32_t t_led_sync_refinement::matching_decodes

How many decodes we've had that match in a row, see GRAY_CODE_MATCHES_NEEDED.

◆ options

struct t_led_sync_refinement_options t_led_sync_refinement::options

The options to use for refinement.

◆ phase

enum t_led_sync_phase t_led_sync_refinement::phase

The current search phase.

Referenced by get_search_period_locked().

◆ right_bound_ns

time_duration_ns t_led_sync_refinement::right_bound_ns

The current right bound of the binary search, if we're in a find edge phase.

◆ sample_applied

bool t_led_sync_refinement::sample_applied

Whether the sample has been applied.

◆ sample_for_driver

struct t_led_sync_sample t_led_sync_refinement::sample_for_driver

The sample to be sent to the driver/device on it's next convenience.

Referenced by bg_model_stale().

◆ window_start_sequence_id

uint64_t t_led_sync_refinement::window_start_sequence_id

The first frame the next measurement may use.

Referenced by bg_read_window().


The documentation for this struct was generated from the following file: