]> git.sesse.net Git - nageru-docs/commitdiff
Wrote a bit more about the sources of latency.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 30 Mar 2017 18:41:09 +0000 (20:41 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 30 Mar 2017 18:41:09 +0000 (20:41 +0200)
hdmisdi.rst

index 80a7a4c81e3c5f65b98552a86b1c5811972411e0..339e64c582f7232e625056e2af6ce6ad6c56fcc9 100644 (file)
@@ -68,11 +68,40 @@ This section aims to illuminate some of the sources of latency and how to deal
 with them. Note that often, latency is at odds with throughput, and so,
 tradeoffs must be made. The most important sources of latency are:
 
-- Jitter and queuing latency
-- Processing latency
-- Output latency
-- Audio latency
+ - **Frame transmission latency:** Unlike computer networks, HDMI and SDI
+   transmit their frames pretty much in real time, ie., sending one frame
+   takes one frame of time. For cut-through switching (which includes
+   HDMI → SDI conversion and the other way around), this doesn't really
+   matter, but Nageru has to receive the entire frame before it can start
+   processing it (and by extension, send the result frame out). Thus, you will
+   typically get one frame of latency just by having Nageru, or really any
+   switcher/mixer with digital effects, in the chain at all.
+
+ - **Jitter and queuing latency:** Unless you are lucky enough to have an
+   all-SDI setup where everything runs off of a shared reference clock,
+   frames on different devices, as well as on the output, will be at random
+   offsets from each other (and also drifting slowly, even if they are at
+   the same frame rate). Thus, some sort of *input queue* is needed for each
+   input card, and the time a frame spends in the queue before being picked
+   out for processing is by definition extra latency. (Note that this means
+   that latency is not a single number for the chain as a whole, but can
+   vary by input.)
+
+ - **Processing latency:** By definition, processing of each frame has to take
+   less than one frame's worth of time, or else the system can't keep up.
+   But if you have a fast GPU and/or do little processing, you can spend
+   significantly less. Thus, if you're after the lowest possible latency,
+   a faster GPU might help you shave off a fraction of a frame here.
+
+ - **Output latency:** Finally, cards have their own output queue,
+   and some will expect there to be multiple frames in it before outputting anything.
+   This is outside Nageru's control, unfortunately, but can easily add 2–3
+   frames of latency. If you want to avoid this, look for Blackmagic's “4K” series of
+   cards, which are of a newer, lower-latency design than the previous cards.
+   The 4K series in this context include everything that have “4K” in their
+   names, plus the Mini Recorder, Duo 2 and Quad 2 devices.
+
+TODO: Write about queuing options. And latency measurements. And audio.
+
+TODO: Write something about time codes here.
 
-TODO: Write something about them.
-
-(TODO: Write something about time codes here.)