From 910adf46a214d2bda25bd4b323bcccb1fa2f1a70 Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Wed, 13 May 2026 11:25:04 +0300 Subject: [PATCH] hisilicon-ev200 / goke-gk7205v200: IMX335 boost-1944p latency framing Rewrites the boost preset's INI header to describe what the mode is actually for: glass-to-glass latency, not wire fps. The encoder caps at ~21 fps for full-5M h.264 4 Mbps regardless of video0.size, so the wire-fps number alone makes this preset look pointless next to stock 5M. The real win is ~16 ms shorter glass-to-glass latency (sensor readout 25 ms vs 33 ms, plus encoder picks from a 40 fps stream instead of 30 fps). That 16 ms claim is analytical, not measured. Adds a link to the methodology spec for verifying it: openhisilicon/docs/sensor-pipeline-latency-metering.md (in flight at OpenIPC/openhisilicon#103). Also expands the header with the three-line enable recipe (sensorConfig + video0.size + video0.fps) so users don't try to downscale to 1920x1080 and get a 4:3-cropped image. No INI register changes, no functional change. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../high-fps/imx335_2592x1944_45fps.ini | 27 ++++++++++++++++--- .../high-fps/imx335_2592x1944_45fps.ini | 26 +++++++++++++++--- 2 files changed, 47 insertions(+), 6 deletions(-) diff --git a/general/package/goke-osdrv-gk7205v200/files/sensor/config/high-fps/imx335_2592x1944_45fps.ini b/general/package/goke-osdrv-gk7205v200/files/sensor/config/high-fps/imx335_2592x1944_45fps.ini index 5ed3bed847..ccf6d5cda9 100644 --- a/general/package/goke-osdrv-gk7205v200/files/sensor/config/high-fps/imx335_2592x1944_45fps.ini +++ b/general/package/goke-osdrv-gk7205v200/files/sensor/config/high-fps/imx335_2592x1944_45fps.ini @@ -1,10 +1,31 @@ -; IMX335 boost full-frame mode, 2592x1944 @ 45 fps — full 5M readout -; at 1.5x the stock 30 fps rate. Dispatched by Isp_SnsMode=6. -; Useful when full sensor resolution is required at higher motion rate. +; IMX335 boost full-frame mode, 2592x1944 — full 5M readout at the +; sensor's boost rate (~40 fps internally vs the stock 30 fps). +; Dispatched by Isp_FrameRate > 30 at 5M (auto-promoted inside +; cmos_fps_set). +; +; This preset's value is **latency**, not wire fps. The encoder +; pipeline caps wire-rate at ~21 fps for full-5M h.264 4 Mbps +; regardless of video0.size (downscale doesn't help at 4:3 output). +; But every delivered frame is fresher than stock 5M because: +; - sensor readout per frame is ~25 ms (vs ~33 ms stock 5M) +; - encoder picks a more recent frame from a 40 fps stream +; instead of a 30 fps stream +; Combined: ~16 ms shorter glass-to-glass latency than stock 5M. +; Useful for FPV / machine-vision where freshness > fps count. +; ; clock=37.125MHz overrides gk's vendor blob default of 27 MHz — ; without it the sensor INCK is wrong and the rate is ~73% of ev's. +; +; To enable (output at full 4:3 native, max FoV): +; cli -s .isp.sensorConfig /etc/sensors/high-fps/imx335_2592x1944_45fps.ini +; cli -s .video0.size 2592x1944 +; cli -s .video0.fps 45 +; killall -HUP majestic # or reboot +; ; Full per-mode notes: ; openhisilicon/docs/imx335-v4-high-fps.md +; How to measure the latency win (this claim is analytical, unverified): +; openhisilicon/docs/sensor-pipeline-latency-metering.md [sensor] Sensor_type=stSnsImx335Obj Mode=WDR_MODE_NONE diff --git a/general/package/hisilicon-osdrv-hi3516ev200/files/sensor/config/high-fps/imx335_2592x1944_45fps.ini b/general/package/hisilicon-osdrv-hi3516ev200/files/sensor/config/high-fps/imx335_2592x1944_45fps.ini index 1e0be37d34..b451fa33d8 100644 --- a/general/package/hisilicon-osdrv-hi3516ev200/files/sensor/config/high-fps/imx335_2592x1944_45fps.ini +++ b/general/package/hisilicon-osdrv-hi3516ev200/files/sensor/config/high-fps/imx335_2592x1944_45fps.ini @@ -1,8 +1,28 @@ -; IMX335 boost full-frame mode, 2592x1944 @ 45 fps — full 5M readout -; at 1.5x the stock 30 fps rate. Dispatched by Isp_SnsMode=6. -; Useful when full sensor resolution is required at higher motion rate. +; IMX335 boost full-frame mode, 2592x1944 — full 5M readout at the +; sensor's boost rate (~40 fps internally vs the stock 30 fps). +; Dispatched by Isp_FrameRate > 30 at 5M (auto-promoted inside +; cmos_fps_set). +; +; This preset's value is **latency**, not wire fps. The encoder +; pipeline caps wire-rate at ~21 fps for full-5M h.264 4 Mbps +; regardless of video0.size (downscale doesn't help at 4:3 output). +; But every delivered frame is fresher than stock 5M because: +; - sensor readout per frame is ~25 ms (vs ~33 ms stock 5M) +; - encoder picks a more recent frame from a 40 fps stream +; instead of a 30 fps stream +; Combined: ~16 ms shorter glass-to-glass latency than stock 5M. +; Useful for FPV / machine-vision where freshness > fps count. +; +; To enable (output at full 4:3 native, max FoV): +; cli -s .isp.sensorConfig /etc/sensors/high-fps/imx335_2592x1944_45fps.ini +; cli -s .video0.size 2592x1944 +; cli -s .video0.fps 45 +; killall -HUP majestic # or reboot +; ; Full per-mode notes: ; openhisilicon/docs/imx335-v4-high-fps.md +; How to measure the latency win (this claim is analytical, unverified): +; openhisilicon/docs/sensor-pipeline-latency-metering.md [sensor] Sensor_type=stSnsImx335Obj Mode=WDR_MODE_NONE