Add log info to see if NV12 fast path is active

This commit is contained in:
2026-04-03 15:23:20 +11:00
parent c2f30b18ab
commit bd2d3292ca

View File

@@ -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;