Page 1 of 1

Decklink's board internal oscillator accuracy

PostPosted: Tue Oct 02, 2018 11:34 am
by max_verem
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)

callback.

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

Re: Decklink's board internal oscillator accuracy

PostPosted: Wed Oct 10, 2018 12:40 am
by Cameron Nichols
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?

Regards
Cameron

Re: Decklink's board internal oscillator accuracy

PostPosted: Fri Oct 12, 2018 6:56 am
by max_verem
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...