Skip to content

fix(memory): store depth images losslessly instead of as JPEG - #4021

Draft
jeff-hykin wants to merge 1 commit into
mainfrom
jeff/fix/depth_codec
Draft

fix(memory): store depth images losslessly instead of as JPEG#4021
jeff-hykin wants to merge 1 commit into
mainfrom
jeff/fix/depth_codec

Conversation

@jeff-hykin

Copy link
Copy Markdown
Member

Depth frames were being routed to the JPEG codec because codec_for() dispatches on payload type alone and Image covers both colour and depth. Float32 depth crashed out of turbojpeg so it could not be recorded at all, and uint16 depth silently came back as wrong metres.

codec_for() picks a codec from the payload type alone, and Image covers both
colour and depth, so every depth frame was routed to JpegCodec. Float32 depth
raised out of turbojpeg, making a depth stream unrecordable, and uint16 depth
silently went through the /256 rescale in to_rgb() and came back as wrong
metres.
@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #4021   +/-   ##
=======================================
  Coverage   78.08%   78.09%           
=======================================
  Files        1416     1416           
  Lines      133556   133569   +13     
  Branches    11578    11579    +1     
=======================================
+ Hits       104291   104314   +23     
+ Misses      25978    25968   -10     
  Partials     3287     3287           
Components Coverage Δ
Tests 94.70% <100.00%> (+<0.01%) ⬆️
Flag Coverage Δ
OS-ubuntu-24.04-arm 74.37% <100.00%> (+<0.01%) ⬆️
OS-ubuntu-latest 74.95% <100.00%> (+<0.01%) ⬆️
Py-3.10 74.95% <100.00%> (+<0.01%) ⬆️
Py-3.11 74.94% <100.00%> (+<0.01%) ⬆️
Py-3.12 74.95% <100.00%> (+<0.01%) ⬆️
Py-3.13 74.94% <100.00%> (+<0.01%) ⬆️
Py-3.14 74.95% <100.00%> (+<0.01%) ⬆️
Py-3.14t 74.94% <100.00%> (+<0.01%) ⬆️
SelfHosted-Large 30.81% <33.33%> (ø)
SelfHosted-Linux 35.69% <40.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dimos/memory/codecs/jpeg.py 100.00% <100.00%> (ø)
dimos/memory/codecs/test_codecs.py 88.49% <100.00%> (+1.11%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant