From bd2d3292caaa3975d404b6e97feca1ef6fdfe7e4 Mon Sep 17 00:00:00 2001 From: Tuan Nghia Nguyen Date: Fri, 3 Apr 2026 15:23:20 +1100 Subject: [PATCH] Add log info to see if NV12 fast path is active --- modules/ANSODEngine/NV12PreprocessHelper.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/ANSODEngine/NV12PreprocessHelper.cpp b/modules/ANSODEngine/NV12PreprocessHelper.cpp index 5cd33a2..7724a27 100644 --- a/modules/ANSODEngine/NV12PreprocessHelper.cpp +++ b/modules/ANSODEngine/NV12PreprocessHelper.cpp @@ -346,18 +346,21 @@ namespace ANSCENTER { effUvLinesize = gpuData->uvLinesize; } - // Log path selection once + // Log path selection once — both spdlog and DebugView if (!m_nv12PathLogged) { m_nv12PathLogged = true; const char* pathName = useZeroCopy ? "CUDA_ZERO_COPY" : "CPU_NV12_UPLOAD"; - logger.LogInfo(std::string(tag) + "::NV12Helper", - std::string("Path: ") + pathName + + auto msg = std::string("Path: ") + pathName + " | isCuda=" + std::to_string(isCudaDevice) + " gpuMatch=" + std::to_string(gpuMatch) + " decodeGpu=" + std::to_string(gpuData->gpuIndex) + " infGpu=" + std::to_string(inferenceGpu) + - " frame=" + std::to_string(frameW) + "x" + std::to_string(frameH), - __FILE__, __LINE__); + " frame=" + std::to_string(frameW) + "x" + std::to_string(frameH); + logger.LogInfo(std::string(tag) + "::NV12Helper", msg, __FILE__, __LINE__); +#ifdef _WIN32 + auto dbg = std::string("[NV12 ACTIVE] ") + tag + " " + msg + "\n"; + OutputDebugStringA(dbg.c_str()); +#endif } cv::cuda::Stream stream;