Added BayerGR/RG/GB/BG 14-bit packed (14P) pixel formats to the GStre… - #1100
Open
circuitvalley wants to merge 3 commits into
Open
circuitvalley wants to merge 3 commits into
circuitvalley wants to merge 3 commits into
Conversation
…amer caps and unpacking in the viewer
…ring of fixed-size transfers with a byte-count frame parser Added transfer timeouts with a recovery ladder (endpoint reset, then USB device reset), a dedicated control-interface libusb context and a real-time USB event thread
This branch has not been deployed
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.
Added Support for 14-Bit Specifically for 14bit sensors like IMX294
I did a lot of benchmarking with really high-bandwidth Basler and custom cameras. Activity on the control channel while streaming caused issues, which I tried to optimize. Also, if USB hits a hiccup, the camera tries to recover instead of just crashing.
On our USB3 Vision cameras the stream would freeze for good when the host wrote a register (e.g. gain) on every frame at full rate. Only unplugging the camera brought it back. We traced it to the async mode's per-frame pattern of leader/payload/trailer transfer chains (19 URBs per frame); a raw libusb reader doing the same writes never wedged.
This adds ASYNC_ROLLING and makes it the default: a ring of 12 fixed-size transfers that are resubmitted from the completion callback, so the endpoint never runs dry. Frames are rebuilt by byte count, so it no longer matters where the trailer lands. It also fixes lost frames when the payload is a multiple of 1024 bytes. With a gain write every frame, 0 of 5 runs wedged (5 of 5 before). We also tested it on a Basler camera.
As a safety net, stream transfers now time out after 1 s and a small recovery ladder resets the endpoint, then the USB device, instead of hanging forever. Idle streams in trigger mode are left alone.
The viewer now allocates 20 buffers instead of 10. With default usbfs_memory_mb=16 even10 can be too small for high resolution and frame rate ;