Platform: Jetson Orin NX
Sensor: IMX219 (mode 0: 3280x2464, ~21fps)
Hi!
I’m benchmarking the Argus capture pipeline latency on a Jetson Orin NX with an IMX219 sensor at 4K resolution (3280x2464). I’m consistently seeing ~43ms of unexplained latency between when the sensor finishes reading out a frame (EOF) and when my application receives it via acquireFrame(). I’d like to understand where this time is being spent and how it can be reduced.
I wrote a small self-contained benchmark (source attached) that captures frames through Argus and records three timestamps per frame, all in the same TSC clock domain to avoid any cross-clock conversion issues:
SOF: Ext::ISensorTimestampTsc::getSensorSofTimestampTsc()
EOF: Ext::ISensorTimestampTsc::getSensorEofTimestampTsc()
APP: ARM CNTVCT_EL0 register read immediately after acquireFrame() returns, converted to TSC ns via ticks * (1e9 / cntfrq)
Since SOF/EOF come from the VI hardware in TSC nanoseconds and the ARM counter (CNTVCT_EL0) is the same TSC clock source, all three timestamps are in the same domain with no offset or conversion needed.
From these I derive:
- Readout = EOF − SOF (sensor readout time)
- Latency = APP − SOF (total capture-to-application time)
- ExtraTime = APP − EOF (time between sensor readout completion and application receiving the frame)
Configuration
- EGL stream mode: MAILBOX (not FIFO) — so no queue buffering is expected
- Exposure: 16ms fixed
- AE locked, AWB locked
- 100 warmup frames discarded before recording
Results
The benchmark runs twice: once with ISP enabled (YCbCr_420_888) and once with ISP bypassed (RAW16).
Argus + ISP (YCbCr_420_888):
Frame SOF(real) EOF(real) App(real) Readout Latency ExtraTime
TSC ns TSC ns TSC ns EOF-SOF App-SOF App-EOF
101 13951609353000 13951655930000 13951698852000 46.58 ms 89.50 ms 42.92 ms
102 13951656970000 13951703547000 13951745958432 46.58 ms 88.99 ms 42.41 ms
103 13951704586000 13951751163000 13951794451072 46.58 ms 89.87 ms 43.29 ms
104 13951752203000 13951798780000 13951842468192 46.58 ms 90.27 ms 43.69 ms
105 13951799819000 13951846396000 13951889646560 46.58 ms 89.83 ms 43.25 ms
Argus + No ISP (RAW16):
Frame SOF(real) EOF(real) App(real) Readout Latency ExtraTime
TSC ns TSC ns TSC ns EOF-SOF App-SOF App-EOF
101 13962991955000 13963038532000 13963081655520 46.58 ms 89.70 ms 43.12 ms
102 13963039572000 13963086149000 13963129260480 46.58 ms 89.69 ms 43.11 ms
103 13963087188000 13963133765000 13963176692256 46.58 ms 89.50 ms 42.93 ms
104 13963134805000 13963181382000 13963224149760 46.58 ms 89.34 ms 42.77 ms
105 13963182421000 13963228998000 13963272022720 46.58 ms 89.60 ms 43.02 ms
Observations
-
Readout is consistent at 46.58ms — this matches the expected IMX219 line readout time at 3280x2464 i.e., 21 FPS of imx219.
-
ExtraTime (APP − EOF) is ~43ms in both cases. Whether ISP is enabled or bypassed (RAW16), the extra time is nearly identical. This rules out ISP processing as the source of this latency.
-
MAILBOX mode should not buffer frames. Since I’m using
EGL_STREAM_MODE_MAILBOX, the stream should always hold only the most recent frame. There should be no FIFO queue adding latency. Yet I’m seeing ~43ms between the sensor finishing readout and my application receiving the frame. -
Total latency is ~90ms (SOF to APP), which is almost exactly 2x the sensor readout time. This suggests the pipeline is effectively adding one full frame period of delay after the sensor completes.
My question
-
Where is the ~43ms between EOF and application frame delivery being spent?:
-
Is there a way to reduce this overhead, or is it a fundamental constraint of the Argus architecture?
-
Are there any settings or configurations that could bring this closer to zero?
For our use case, this 43ms overhead is significant, it doubles our glass-to-glass latency from what the sensor hardware alone would require.
How to reproduce
Attached: argus_4k_latency.cpp and Makefile here
# Compile
make
# Run
./argus_4k_latency
The program captures 110 frames (after 100 warmup) with ISP, then repeats without ISP, and prints the timing tables shown above.