VIN0 to HDMI latency measurement (Naon)

From DAVE Developer's Wiki
Jump to: navigation, search
Info Box
Naon am387x-dm814x.png Applies to Naon
Naon-evb-mid top.png Applies to NaonEVB-Mid


WorkInProgress.gif

Introduction[edit | edit source]

Several video applications need to acquire a video stream and to display it on an LCD panel or similar device. In some cases it is required that the latency measured between source stream and stream feeding LCD panel is within a specified time (often expressed in terms of fields).

This article describes how the measurement of such latency has been performed on Naon platform. Texas Instruments provides documentation and software to perform similar measurements: http://processors.wiki.ti.com/index.php/Latency_Measurement_on_Capture_Encode_Decode_Display_Demo. Method suggested by TI is completely software-based. Since Linux is not an RTOS, the intrinsic error of such method might not be tolerable where the application has hard real-time latency requirements. Thus a hardware-based approach has been implemented to build ad hoc testbed as described in the following section.

Testbed[edit | edit source]

The following picture shows a simplified block diagram of the testbed.

Simplified block diagram of the testbed

As source a NaonEVB-Lite/Naon system has been used playing an ad hoc video stream (we will refer to this as Naon#1). The stream is output via HDMI port that, in turn, is connected to a HDMI splitter. One of the output of the splitter feeds a LCD display that is used by the operator to monitor the whole process. The other one is connected to an ADD-ON_DVI-RX board that is plugged onto J19/J24 connectors of a NaonEVB-Mid carrier board. This chain allows to convert video stream from HDMI to 24-bit RGB format in order to acquire it through VIN0 of Naon module populating NaonEVB-Mid carrier board (referred as Naon#2).

The stream is then output in HDMI format again through HDMI port of NaonEVB-Mid board feeding a second ADD-ON_DVI-RX circuit.

The use of the two ADD-ON_DVI-RX boards allows to create two physical test points where the video stream under investigation in available in a easy-to-handle format, that is color components and syncs are available separately. At these points, it is possible to connect a standard oscilloscope through single-ended passive probes. Video stream contents are generated in order to embed a pattern that is easly detectable (1). Thus oscilloscope trigger can be configured in order to detect this condition and to measure precisely the latency between the two points of the chain where the probes are connected as shown in the picture. This measure includes the delay due to the second DVI-to-RGB conversion that it is assumed to be neglectable with respect to the overall latency.

From software standpoint, video4linux-based saLoopBack application has been used: http://processors.wiki.ti.com/index.php/TI81XX_Video_Capture_Driver_User_Guide#saLoopBack.

(1) Stream 1080p60 and is composed by an endless sequence of 1 black frame and 59 white frames.

Results[edit | edit source]

The following pictures show a couple of oscilloscope screenshots.

The displayed tracks are:

  1. blue track: vertical sync of stream at the output of Naon#2
  2. magenta track: MSB bit of red component of stream at VIN0 port of Naon#2
  3. green track: MSB bit of red component of stream at the output of Naon#2

First pictures show a time window including about 120 frames. It is possible to see that red bit is low one frame out 60 as expected.

Naon-VIN0-to-HDMI-latency2.png

Second picture shows a narrower time window - about 100ms - around the black frame, allowing to perform latency measurement. Latency measured by vertical cursors is around 63ms, that is about 3.78 frames.

Naon-VIN0-to-HDMI-latency1.png