[host] removed MTMemcpy, overheads negate performance gains

This commit is contained in:
Geoffrey McRae
2017-11-15 18:12:13 +11:00
parent 5899508a5b
commit fcf0976081
4 changed files with 2 additions and 27 deletions

View File

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