Skip to content

Fix playback option restore and saved histogram equalization - #15570

Merged
AviaAv merged 4 commits into
realsenseai:developmentfrom
AviaAv:rsdev-12697-playback-depth-units
Aug 19, 2026
Merged

AviaAv merged 4 commits into
realsenseai:developmentfrom
AviaAv:rsdev-12697-playback-depth-units

Conversation

@AviaAv

@AviaAv AviaAv commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Two unrelated fixes found while investigating RSDEV-12697 (which turned out not to be a bug - the difference there is a viewer-side colorizer setting, not recorded data).

1. Playback dropped the recorded sensor options (ros2_reader.cpp)

read_sensor_options() scans option ids in ascending order, so a value re-written mid-recording is out of order and starts a second, partial scan - whose result then overwrote the full snapshot. Now the first snapshot is kept; mid-recording changes still arrive during playback as serialized_option messages.

Measured on a D435I: 25 options recorded, 1 restored. Depth Units was among the lost ones, so playback fell back to a hardcoded 1mm - 10x off on a 0.1mm device (verified by setting a D455 to 0.0001).

2. The viewer discarded a saved "Histogram Equalization Enabled" (subdevice-model.cpp)

subdevice_model re-applies Visual Preset after restoring the config, and every preset also assigns equalization - so a saved 0 was replaced at startup and could not be turned off persistently. The saved value is now re-applied afterwards.

Test

pytest-record-and-stream.py now toggles the emitter mid-record and asserts no recorded option goes missing on playback. Fails on development and passes with the fix, on both D435I and D585.

Comment thread src/media/ros2/ros2_reader.cpp Resolved
Comment thread common/subdevice-model.cpp Resolved
@AviaAv
AviaAv force-pushed the rsdev-12697-playback-depth-units branch from 4107b4e to 6ca3ecb Compare August 18, 2026 06:41
@AviaAv
AviaAv force-pushed the rsdev-12697-playback-depth-units branch from 6ca3ecb to 2d72395 Compare August 18, 2026 06:54
@AviaAv
AviaAv requested a review from remibettan August 18, 2026 09:14
Comment thread common/subdevice-model.cpp Resolved
Comment thread common/subdevice-model.cpp Resolved
Comment thread common/subdevice-model.cpp Resolved

@sysrsbuild-gh-agentic sysrsbuild-gh-agentic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Auto-generated by rs-agentic bot

Reviewed new commit f2e0add — the expanded re-apply loop in subdevice-model.cpp is clean: supports() guard, range check, and try/catch are all in place, and equalization is applied last (after min/max) matching the observer ordering. No issues found.

remibettan
remibettan previously approved these changes Aug 18, 2026

@AviaAv AviaAv left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging as last commit is just an update to the test + previously approved + LibCI run passed with all changes

@AviaAv
AviaAv merged commit edd9e32 into realsenseai:development Aug 19, 2026
34 checks passed
@AviaAv
AviaAv deleted the rsdev-12697-playback-depth-units branch August 19, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants