Skip to content

Added BayerGR/RG/GB/BG 14-bit packed (14P) pixel formats to the GStre… - #1100

Open
circuitvalley wants to merge 3 commits into
AravisProject:mainfrom
circuitvalley:main
Open

circuitvalley wants to merge 3 commits into
AravisProject:mainfrom
circuitvalley:main

Conversation

@circuitvalley

@circuitvalley circuitvalley commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

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 ;

…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

No deployments
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