Commit Graph

19 Commits

Author SHA1 Message Date
8bb4f49b09 Improve jpeg conversion 2026-04-16 10:59:28 +10:00
6c72751a14 Add NvJpegPool (4 encoders) and JPEG passthrough in BmpToJpeg
- NvJpegPool: singleton pool of 4 NvJpegCompressor instances with
  lock-free slot acquisition (~160MB VRAM). Threads that can't grab
  a slot fall back to TurboJPEG with zero wait.
- JPEG passthrough: BmpToJpeg now checks if input is already JPEG
  (FF D8 FF magic) and copies directly without re-encoding.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 08:33:17 +10:00
53a82da74a Add nvJPEG GPU-accelerated JPEG encoding with NVIDIA auto-detection
BmpToJpeg was slow (~25-45ms for 4K) due to two bottlenecks:
1. cv::imdecode for BMP parsing (unnecessary for uncompressed BMP)
2. TurboJPEG CPU encoding (~11ms for 4K)

Fix 1: Zero-copy BMP parsing — parse header directly and wrap pixel
data in cv::Mat without allocation or copy. Eliminates ~47MB of heap
allocations per 4K frame.

Fix 2: NvJpegCompressor class using nvJPEG hardware encoder on NVIDIA
GPUs (~1-2ms for 4K). Integrated into CompressJpegToString so all 5
JPEG encoding callsites benefit automatically. Reusable GPU buffer
avoids per-frame cudaMalloc/cudaFree. Silent fallback to TurboJPEG
on Intel/AMD or if nvJPEG fails.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 07:50:13 +10:00
808df4656d Fix ALPR Batch and memory leak 2026-04-15 23:00:19 +10:00
3349b45ade Update video conversion 2026-04-13 21:55:57 +10:00
56a8f09adf Support BMP and JPG conversion 2026-04-13 14:12:47 +10:00
3a4320f253 Add support to IMAQ conversion 2026-04-13 10:39:26 +10:00
749c7db3c6 Add support to IMAQ conversion 2026-04-12 21:55:09 +10:00
0a8aaed215 Add CPU/GPU gate and support new ANSALPR using OCR 2026-04-12 17:16:16 +10:00
091a61d2be Fix Window search path for ANSLIB 2026-04-06 08:31:26 +10:00
e134ebdf15 Use software decoder by default 2026-04-04 20:19:54 +11:00
3a21026790 Disable NV12 path for ANSCV by default. Currenly use cv::Mat** directly 2026-04-04 10:09:47 +11:00
445abefebe first stable version 2026-04-03 15:52:21 +11:00
c2f30b18ab Add log info 2026-04-03 15:16:26 +11:00
6fb09830c5 Fix NV12 crash issue when recreate camera object
(new structure) does not work
2026-04-03 14:51:52 +11:00
958cab6ae3 Fix NV12 crash issue when recreate camera object 2026-04-02 22:07:27 +11:00
6861de8fb4 Organise the dependencies 2026-03-29 14:10:05 +11:00
e7612e421b Add more unit test 2026-03-29 12:00:38 +11:00
8a2e721058 Refactor project structure 2026-03-28 19:56:39 +11:00