[host] removed MTMemcpy, overheads negate performance gains
This commit is contained in:
1 parent
5899508a5b
commit
fcf0976081
4 files changed
+2
-27
No files matched your search
+1
-14
@@ -150,21 +150,12 @@ bool NvFBC::Initialize()
|
||||
m_grabFrameParams.eGMode = NVFBC_TOSYS_SOURCEMODE_SCALE;
|
||||
m_grabFrameParams.pNvFBCFrameGrabInfo = &m_grabInfo;
|
||||
|
||||
if (!m_memcpy.Initialize())
|
||||
{
|
||||
DEBUG_ERROR("Failed to initialize MTMemcpy");
|
||||
DeInitialize();
|
||||
return false;
|
||||
}
|
||||
|
||||
m_initialized = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void NvFBC::DeInitialize()
|
||||
{
|
||||
m_memcpy.DeInitialize();
|
||||
|
||||
m_frameBuffer = NULL;
|
||||
|
||||
if (m_nvFBC)
|
||||
@@ -233,11 +224,7 @@ bool NvFBC::GrabFrame(struct FrameInfo & frame)
|
||||
frame.height = m_grabInfo.dwHeight;
|
||||
frame.stride = m_grabInfo.dwBufferWidth;
|
||||
frame.outSize = m_grabInfo.dwBufferWidth * m_grabInfo.dwHeight * 3;
|
||||
if (!m_memcpy.Copy(frame.buffer, m_frameBuffer, frame.outSize))
|
||||
{
|
||||
DEBUG_ERROR("Memory copy failed");
|
||||
return false;
|
||||
}
|
||||
memcpy_s(frame.buffer, frame.bufferSize, m_frameBuffer, frame.outSize);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user