Decklink's board internal oscillator accuracy

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


  • Posts: 12
  • Joined: Tue Nov 05, 2013 3:10 pm

Decklink's board internal oscillator accuracy

PostTue Oct 02, 2018 11:34 am

During some synchronizations issue researches, i found that harware clocking of Decklink board is not stable and depends on model.

I did a test application what save time provided by:
Code: Select all
struct timespec tm;

clock_gettime(CLOCK_MONOTONIC_RAW, &tm);

int64_t T = tm.tv_nsec + tm.tv_sec * 1000000000LL;

T = T % 40000000LL;

on each
Code: Select all
virtual HRESULT STDMETHODCALLTYPE ScheduledFrameCompleted(IDeckLinkVideoFrame *_frame, BMDOutputFrameCompletionResult result)


i have TWO boards: DeckLink Mini Monitor and DeckLink Dou

DecklinkDuo board has no external reference connected - it is running on internal oscillator

i did a median filters of captured timer value and FOUND that it is drifting against TSC, that is not a problem because there are no guaranty about CPU frequency oscillator stability.

PROBLEM is that two boards drifting differently:

DeckLink Mini Monitor drifts about
Code: Select all
124507 ns / 250 frames = 500 ns

DeckLink SDI(1) and DeckLink SDI (2) drifts about
Code: Select all
288157 ns / 250 frames = 1152 ns

per frame...

Test system has latest intel cpu with invariant tsc and turned off cpu frequency scale. Decklink driver is 10.9.12a3

Cameron Nichols

Blackmagic Design

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

Re: Decklink's board internal oscillator accuracy

PostWed Oct 10, 2018 12:40 am

Hi Max,

Can I understand what your intention of running this test is and your expectations?

I would be wary of using ScheduledFrameCompleted as a time reference, as you need to also factor jitter from OS Scheduler. For this reason, I don't believe 250 frame is long enough for your analysis. Have you tried running your test for a longer period of time, say 10 minutes or 1 hour?



  • Posts: 12
  • Joined: Tue Nov 05, 2013 3:10 pm

Re: Decklink's board internal oscillator accuracy

PostFri Oct 12, 2018 6:56 am

This tests were made to understand difference in TSC and internal board oscillator. I expected there is should be a drift, but i did not expect that drift depends on a model.

My main goal was to confirm or deny hypothesis about software based clocking accuracy instead of capturing number of pre-rolled frames

250 was window size to analyze and during an hours it is remains almost the same...

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 1 guest