Add CPU/GPU gate and support new ANSALPR using OCR

This commit is contained in:
2026-04-12 17:16:16 +10:00
parent 27083a6530
commit 0a8aaed215
30 changed files with 1870 additions and 2166 deletions

View File

@@ -1,6 +1,7 @@
#include "ANSSRT.h"
#include "ANSMatRegistry.h"
#include "ANSGpuFrameOps.h"
#include "ANSCVVendorGate.h" // anscv_vendor_gate::IsNvidiaGpuAvailable()
#include <memory>
#include "media_codec.h"
#include <cstdint>
@@ -577,6 +578,13 @@ namespace ANSCENTER {
#endif
int ANSSRTClient::AutoConfigureHWDecoders(int maxPerGpuOverride) {
// Skip the CUDA probe on non-NVIDIA hardware — the Platform fallback
// (DXGI/sysfs) handles Intel/AMD auto configuration. See
// ANSCVVendorGate.h for rationale.
if (!anscv_vendor_gate::IsNvidiaGpuAvailable()) {
return AutoConfigureHWDecoders_Platform_SRT();
}
int gpuCount = 0;
cudaError_t err = cudaGetDeviceCount(&gpuCount);
if (err != cudaSuccess || gpuCount <= 0) {