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 "ANSRTMP.h"
#include "ANSMatRegistry.h"
#include "ANSGpuFrameOps.h"
#include "ANSCVVendorGate.h" // anscv_vendor_gate::IsNvidiaGpuAvailable()
#include <memory>
#include "media_codec.h"
#include <cstdint>
@@ -563,6 +564,12 @@ namespace ANSCENTER {
#endif
int ANSRTMPClient::AutoConfigureHWDecoders(int maxPerGpuOverride) {
// Skip the CUDA probe on non-NVIDIA hardware — the Platform fallback
// handles Intel/AMD auto configuration. See ANSCVVendorGate.h.
if (!anscv_vendor_gate::IsNvidiaGpuAvailable()) {
return AutoConfigureHWDecoders_Platform_RTMP();
}
int gpuCount = 0;
cudaError_t err = cudaGetDeviceCount(&gpuCount);
if (err != cudaSuccess || gpuCount <= 0) {