Driver acquisition, preprocessing, display, and encoding may each have their own buffer queues. When selecting memory for the Sige5 edge vision device, first list the actual number of frames held by each stage.
First calculate a checkable lower limit
Without alignment, a 1920×1080 8-bit NV12 frame occupies 3,110,400 bytes. If the two acquisition channels each retain four frames, this link alone occupies approximately 23.7 MiB. Model weights, runtime workspaces, desktops, and kernels are not yet accounted for.
Reprocess alignment and duplicate copies
Get the actual number of bytes per row, effective height and size of each plane from the driver or framework. If pre-processed to convert to RGB888, then calculate a set of three bytes per pixel buffer. When multiple modules share the same DMA buffer, it is counted as allocated once, while keeping a record of who holds it.
Use long run correction
Observe the memory peak value when two channels are started at the same time, disconnected and reconnected, and resolution switched. If the memory increases stepwise with the number of reconnections, priority is given to checking old queues and buffer release. Simply expanding the memory will prolong the time to failure.
1080p buffer budget without alignment
| object | Calculate | Occupy |
|---|---|---|
| Single sheet NV12 | 1920 × 1080 × 1.5 | About 2.97 MiB |
| Four NV12s in each of the two lanes | 8 × 2.97 MiB | About 23.7 MiB |
| One additional RGB888 | 1920 × 1080 × 3 | About 5.93 MiB |
Board documentation and references

- ArmSoM Sige5 · hardware and interface manual · Sige5 · product page
- Building a Reproducible Camera Pipeline with V4L2 and GStreamer
- Rockchip librga interface and constraints
