Variation in Latency SDI

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

klandfors

  • Posts: 5
  • Joined: Wed Jan 17, 2024 4:04 pm
  • Real Name: Kurt Landfors

Variation in Latency SDI

PostWed Jan 17, 2024 4:24 pm

We use the Decklink 8k SDI capture card in our product. I am studying latency with this card - the time it takes to loop video in port 1 and out port 2. We measure this by measuring the time it takes to send video from our sdi source direct to an sdi display, then we add the Decklink frame grabber into the signal chain, using all of the same source, display, and cabling, and measure the difference in delay.

To get loop to work, we must run an application which captures video. I ran our application, which captures video on port 1 and keys an overlay on the output port 2 and measured the latency (multiple times). Then as an experiment I ran the Decklink CapturePreview sample instead of our application, using the same test setup, and noticed that there is an additional frame or so of latency. After doing multiple iterations, I can say that consistently the capture app has approximately an extra frame of latency.

I disabled the ScreenPreviewCallback, and commented out all code in the Decklink callback, and still there is an extra frame of latency.

The only major difference I see between our application and the Capture Preview application, thus, is that our application creates an IDecklinkOutput object and creates/enables a video frame on that output.if

I am hoping that you can explain what would cause the card to have additional loop latency when the CapturePreview app is running, to help us undersytand what we need to do or not do to ensure minimal latency.

Thank you
Offline

Cameron Nichols

Blackmagic Design

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

Re: Variation in Latency SDI

PostMon Jan 22, 2024 11:39 am

Hi Kurt,

The latency will appear better with CapturePreview since by default, capture will pass-through directly on a DeckLink card operating in full-duplex mode.

This setting is configured by writing to configuration item bmdDeckLinkConfigCapturePassThroughMode with value bmdDeckLinkCapturePassthroughModeDirect. Refer to sections 3.18 (DeckLink Configuration ID) and 3.27 (Capture Pass Through Mode) for further information.

The closer latency will be if you configure this configuration item with value
bmdDeckLinkCapturePassthroughModeCleanSwitch. This configuration will provide a software pass-through, so the video frame passes through via the driver and not directly on the DeckLink hardware.

You can use the DeviceConfigure SDK sample with -o option to configure the capture pass-through mode behaviour.

Note however, that the flow you are describing could be achieved with internal-keying, where the overlay frame is scheduled to card and alpha blended directly in DeckLink hardware to the incoming stream. Please refer to section 2.5.19 for a description of DeckLink keyer.

Regards
Cameron
Offline

klandfors

  • Posts: 5
  • Joined: Wed Jan 17, 2024 4:04 pm
  • Real Name: Kurt Landfors

Re: Variation in Latency SDI

PostMon Jan 29, 2024 9:40 pm

Thank you!

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 9 guests