Page 1 of 1

Grabbed FPS lower than expected

PostPosted: Wed Sep 08, 2021 8:34 am
by tyxxybm
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";
OutputDebugString(info.c_str());
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.

Re: Grabbed FPS lower than expected

PostPosted: Tue Sep 14, 2021 4:16 am
by Cameron Nichols
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.

Regards
Cameron

Re: Grabbed FPS lower than expected

PostPosted: Wed Sep 15, 2021 8:19 am
by tyxxybm
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.