Grabbed FPS lower than expected

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message


  • Posts: 7
  • Joined: Wed Aug 11, 2021 6:30 am
  • Real Name: King Tissy

Grabbed FPS lower than expected

PostWed Sep 08, 2021 8:34 am

Hello all,
I have a DeckLink 4k Extreme 12G - HDMI 2.0 capture card install in a PCIE gen3 x8 port, and OS is Windows 10, video card(NVIDIA RTX 2080ti). There I have 3 interfaces connected to other video cards' output ports(three NVIDIA RTX 2080ti), with those output ports configured to 3840x2160 @30hz RGB 8bpc.

I modified DeckLinkInputDevice::VideoInputFrameArrived in DeckLinkInputDevice.cpp in "Blackmagic DeckLink SDK 12.1" QuadPreview (Windows demo) project as follows, and compiled in release.

#Line 115
HRESULT DeckLinkInputDevice::VideoInputFrameArrived(IDeckLinkVideoInputFrame* /* videoFrame */, IDeckLinkAudioInputPacket* /* audioPacket */)
// Since this application only previews, everything is driven from IDeckLinkScreenPreviewCallback::DrawFrame
static int numRecv = 0;
numRecv ++;
std::wstring info = L"recv frame... numRecv:";
info += std::to_wstring(numRecv) + L"\n";
return S_OK;

I use Dbgview.exe to check the debug info and found that only about 40 frames arrived per second(40 calls per second to this function). This means only about 13fps (40 frames /3 interfaces) were grabbed by each port, which is much lower than 30fps.

Any ideas?

Thank you in advance.
微信图片_20210908163040.png (264.3 KiB) Viewed 1966 times

Cameron Nichols

Blackmagic Design

  • Posts: 391
  • Joined: Mon Sep 04, 2017 4:05 am

Re: Grabbed FPS lower than expected

PostTue Sep 14, 2021 4:16 am

Hi King,

Inside your IDeckLinkInputCallback::VideoInputFrameArrived callback, can you make a call to IDeckLinkVideoInputFrame::GetHardwareReferenceTimestamp on the incoming frame. You can choose a timescale that will provide a readable frame time, eg 1,000,000 for micro-secs.

The frame timestamp is the system time attached to the frame when it has completed PCIe transfer from card to system memory.

A single read of the frame timestamp will be meaningless, but by keeping a difference of successive frame timestamps, you can determine whether the PCIe/memory bandwidth is sufficient to capture 3 x 2160p RGB 4:4:4 streams.

It is worth also checking with DeviceStatus SDK sample that your card is link trained to PCIe Gen 3 x8 as expected.

Please let me know if this helps.



  • Posts: 7
  • Joined: Wed Aug 11, 2021 6:30 am
  • Real Name: King Tissy

Re: Grabbed FPS lower than expected

PostWed Sep 15, 2021 8:19 am

Thank you Nichols,

Your suggestion is of great help for me. I run DeviceStatus and found that my "LONG PCIe x16 slot" turn out to be a "PCIe x1". Now I plugged it to another PCIe slot on the board and found it's a PCIe x4 and the fps is much better(29.97fps).

After some studies on PCIe lanes and I decided to upgraded my machine to those who have more PCIe lanes, to handle the heavy load of 4 x2160p(RGB444).

Thank you again.

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 2 guests