1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-16 22:35:51 +08:00

Remove useless locks.

This commit is contained in:
Alexander Smorkalov
2021-10-18 10:42:44 +03:00
parent 46ec72afe4
commit 31bf226be0

View File

@@ -314,15 +314,11 @@ private:
NV_OF_CUDA_API_FUNCTION_LIST* GetAPI()
{
std::lock_guard<std::mutex> 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<std::mutex> 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,