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 "ANSFLV.h"
#include "ANSMatRegistry.h"
#include "ANSGpuFrameOps.h"
#include "ANSCVVendorGate.h" // anscv_vendor_gate::IsNvidiaGpuAvailable()
#include <memory>
#include <cstdint>
#include "media_codec.h"
@@ -551,6 +552,12 @@ namespace ANSCENTER {
#endif
int ANSFLVClient::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_FLV();
}
int gpuCount = 0;
cudaError_t err = cudaGetDeviceCount(&gpuCount);
if (err != cudaSuccess || gpuCount <= 0) {