Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.
3056 Discussions

How to improve the copying performance between video memory and system memory?

____2
Beginner
269 Views

I got a problem when using Intel media SDK.

When my video decode program was running, I copied YUV vedio frame data from vedio memory(sdk's frame data struct) to system memory (my buffer,in system memory) by function  memcpy(), but got a low speed( only 92 frames per sec.only copy operation, and 66 fps display on D3D9 at the sametime). That won't be a satisfactory to video processing because i need some time to make other instant special effects on video frames.

I did it like this:

 m_pMFXAllocator->LockFrame(frame->Data.MemId, &frame->Data);
   memcpy(m_gpu_Y, frame->Data.Y, frame->Info.Height * frame->Data.Pitch);
   memcpy(m_gpu_UV, frame->Data.UV, frame->Info.Height * frame->Data.Pitch / 2);
   mfxU16 pitch = frame->Data.Pitch;
   m_pMFXAllocator->UnlockFrame(frame->Data.MemId, &frame->Data);

 

 How can I quicken the copying speed? And I hope know more information in detail about the copy performance in this procedure.

Thanks!

 

0 Kudos
1 Reply
Surbhi_M_Intel
Employee
269 Views

Hi there, 

I see you have another post for same question(https://software.intel.com/en-us/forums/topic/557837) which is being addressed by my colleague. So I am closing this post to avoid confusion.

Thanks,
Surbhi

0 Kudos
Reply