Repository navigation
Conversation
Decoded frames were allocated with av_frame_alloc for every compressed colour frame. The consumer hands frames back to the queue's released list, which only newFrame() pops, and the decode path never called it, so every MJPEG frame (the default colour format on Orbbec and Azure Kinect) stayed allocated until the stream closed. Decoding now takes its frame from the queue. A backend row stride was applied to plane 0 only, after the planes had been laid out tightly, so a planar or semi-planar frame with padded rows had its chroma planes read from the wrong offsets. The planes are now laid out from the stride, chroma rows scaling with the luma row as in I420 and NV12, and a stride the buffer cannot hold drops the frame. Orbbec YV12 was reported as YUV420P, with U and V swapped. It now has its own format, DEPTHCAM_FMT_YV12, appended to the ABI enum, which the host lays out with the chroma planes exchanged. A host that predates it drops these frames. The synthetic backend gains inject(), so tests can hand the host frame layouts the scene does not produce. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KdPguixxwrpgc8UWhoHDeQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three bugs in how the host turns backend frames into AVFrames.
decodeCompressedallocated a fresh frame per compressed colour frame. Consumers hand frames back to the queue's released list, which onlynewFrame()pops, and the decode path never called it, so every frame stayed allocated until the stream closed. MJPEG is the default colour format on Orbbec and Azure Kinect. Decoding now takes its frame from the queue.DEPTHCAM_FMT_YUV420P. It now has its ownDEPTHCAM_FMT_YV12, appended to the ABI enum, and the host exchanges the chroma planes. A host that predates it drops these frames; the ABI version is unchanged since no struct changed.The synthetic backend gains
inject()so tests can feed the host layouts the scene does not produce.Related: ossia/score#2417. With it, the decoded MJPEG colour stream is converted as full-range BT.601. Before that change it was full range but used the BT.709 matrix at 1280 wide and above, so an Azure Kinect's colour stream always got the wrong matrix.
Tests
score_addon_orbbec_unit_testgains three cases: decoded MJPEG frames are reused (at most 2 distinct frames over 10 decodes) and tagged full range; YV12 planes come out in U, V order; padded I420 lays out every plane, and an impossible stride is refused.DepthCameraStream.cpp/.hpp, all three cases fail (7 assertions).ctest -R orbbec: unit, settings, gfx and device tests pass. Built on Linux with clang 23, lld 23, Qt 6.12 (Debug, shared plug-ins) against the score branch of #2417.OrbbecBackend.cppwas syntax-checked against the OrbbecSDK_v2 headers; the backends were not built.Not tested
🤖 Generated with Claude Code
https://claude.ai/code/session_01KdPguixxwrpgc8UWhoHDeQ