diff --git a/modules/cudaoptflow/src/nvidiaOpticalFlow.cpp b/modules/cudaoptflow/src/nvidiaOpticalFlow.cpp index 7c1ef538a..4f0a14aaf 100644 --- a/modules/cudaoptflow/src/nvidiaOpticalFlow.cpp +++ b/modules/cudaoptflow/src/nvidiaOpticalFlow.cpp @@ -314,15 +314,11 @@ private: NV_OF_CUDA_API_FUNCTION_LIST* GetAPI() { - std::lock_guard lock(m_lock); return m_ofAPI.get(); } NvOFHandle GetHandle() { return m_hOF; } -protected: - std::mutex m_lock; - public: NvidiaOpticalFlowImpl(cv::Size imageSize, NV_OF_PERF_LEVEL perfPreset, bool bEnableTemporalHints, bool bEnableExternalHints, bool bEnableCostBuffer, int gpuId, Stream inputStream, Stream outputStream); @@ -767,15 +763,11 @@ private: NV_OF_CUDA_API_FUNCTION_LIST* GetAPI() { - std::lock_guard lock(m_lock); return m_ofAPI.get(); } NvOFHandle GetHandle() { return m_hOF; } -protected: - std::mutex m_lock; - public: NvidiaOpticalFlowImpl_2(cv::Size imageSize, NV_OF_PERF_LEVEL perfPreset, NV_OF_OUTPUT_VECTOR_GRID_SIZE outputGridSize, NV_OF_HINT_VECTOR_GRID_SIZE hintGridSize,