OpenIMP is an open implementation of Ingenic's libimp video API. It runs
against the stock ISP, sensor, FrameSource, and AVPU kernel drivers.
The public encoder graph is shared by T23, T30, T31, T40, and T41. The
hardware backend is selected only where the SoC ABI actually differs:
- src/t40/openimp_p2_encoder.c owns the public encoder lifecycle.
- src/t40/codec-t40.c owns the shared AVPU codec backend.
- include/openimp/openimp_avc.h exposes that backend independently of the
IMP graph for physically contiguous NV12 producers such as V4L2 DMA-BUF.
- include/openimp/openimp_tuning.h and openimp-tuningd keep image policy
and gain feedback independent of capture/encoder ownership. See
docs/TUNING_DAEMON.md.
- src/al_avpu.c, src/device_pool.c, src/fifo.c, and
src/hw_encoder.c provide the common hardware path.
- src/t30/ provides the native T30 Helix descriptor and legacy
/dev/soc_vpu channel adapter.
- src/t31/, src/framesource/framesource_tseries.c,
src/isp/isp_tseries.c, src/kernel_interface.c, and src/dma_alloc.c
are the T31 stock-driver ABI seam.
- src/t40/openimp_p1.c and src/t40/openimp_p2_dma.c are the corresponding
T4 stock-driver seam, with explicit T40/T41 ABI branches.
T31 does not carry a separate scheduler, rate-control graph, or codec
implementation. Platform conditionals are restricted to real ABI differences
such as public structure sizes, ioctl layouts, device behavior, and cache
maintenance.
Audio processing belongs to
libaudioProcess-neo.
Logging and system support libraries belong to
ingenic-system-libs-neo.
OpenIMP provides the native IMP audio I/O layer on T31 and T40/T41. HPF,
noise suppression, and AGC are loaded at runtime from the installed
libaudioProcess-neo; OpenIMP does not replace that effects library or build
replacement libsysutils/libalog libraries.
# T23
./build-for-device.sh T23
# or
make t23
# T30/T30X
./build-for-device.sh T30
# or
make t30
# T31 (default)
./build-for-device.sh
# or
make t31
# T40/T40XP
./build-for-device.sh T40
# or
make t40
# T41/T41NQ
./build-for-device.sh T41
# or
make t41
Outputs:
- build/t23/libimp.so
- build/t30/libimp.so
- build/t31/libimp.so
- build/t40/libimp.so
- build/t41/libimp.so
Each target build rejects a produced library that depends on an OEM
libimp.so. Target builds record RVD import coverage where a matching Raptor
binary is available.
- T30: source-only native Helix H.264 through the stock 3.10.14
/dev/soc_vpu ABI. A T30X VDB1 streams both configured channels over RTSP;
main and sub rings sustain 25 fps with decoder-clean I/P GOPs, ping-pong
reconstruction, and feedback rate control. The 1920x1080 Main stream runs
near the OEM bitrate under the same Raptor configuration.
- T40: decoder-clean, resolution-independent H.264 streaming through the
stock T40XP ISP and AVPU drivers.
- T31: the shared T40-derived encoder ran for more than 1,000 hardware frames
on a stock-driver GC2053 camera. Main 1920x1080 H.264 and AAC probed and
decoded without H.264 errors during the device smoke cycle. The T31
FrameSource seam now preserves the kernel DQBUF completion timestamp in the
OEM frameInfo.timeStamp slot at offset 0x20; the shared encoder copies
that capture timestamp into each public pack instead of substituting
encoder-start wall time. A 30-second live decode completed 721 frames with
zero duplicate/non-monotonic DTS warnings, compared with 11 warnings in the
prior 12-second checkpoint.
- Capture ownership is an explicit platform policy: T31 returns a frame after
AVPU completion, while T40 returns it immediately after submission. This
preserves full-rate capture on both stock-driver ABIs.
- T41: active correctness bring-up. The build covers every RVD/RAD IMP import,
the shared pipeline runs dual-channel FrameSource capture, and the native
AVPU backend emits decoder-clean High-profile H.264 at both configured
geometries. Raptor currently uses embedded-ring copy mode for correctness;
its cross-process cached-rmem reference path is not yet coherent. ISP parity
and configured-rate delivery remain in progress.
- T41's standalone V4L2 path exports capture buffers as DMA-BUF and submits
their bus addresses directly to the shared OpenIMP AVC backend. A 250-frame
2560x1440 High-profile sample completed in 10.20 seconds, reported 25/1 fps,
and decoded without warnings or pixel copies.
- Sensor configuration and tuning remain owned by the stock ISP driver, so
the userspace encoder is sensor-independent.
See docs/T40_STATUS.md and
docs/T41_STATUS.md for the corresponding runtime
gates. See docs/T30_STATUS.md for the legacy Helix
bring-up and its current limitations.
See docs/PROFILING.md for the opt-in on-device stage
profiler, the current T41 QHD hotspot data, and the MXU2/MXU3 assessment.