HDMI timing

Hi all,

Is there an alternative to openGL for displaying an image via the GPU? We hope to find a more direct route to the HDMI port, so we can display a CUDA-processed video feed in real-time, with access to the HDMI output timing, etc., to minimize latency.

Any insight would be appreciated.

Thank you,

Hi adev99.

Your best bet might be to use VDPAU’s presentation queue. It has a timestamp-based presentation mechanism that should allow for very accurate frame presentation. You can use VDPAU directly with CUDA (http://developer.download.nvidia.com/compute/cuda/4_1/rel/toolkit/docs/online/group__CUDART__VDPAU.html) or via the OpenGL interop extension (GL_NV_vdpau_interop) that you can use in conjunction with OpenGL’s CUDA interop.

Thanks for the response, VDPAU looks very interesting!

Could you describe how it interacts with HDMI display timing, and if there is much latency in getting the CUDA image up on the screen? Our application is a live monitoring system, and so we’re trying to minimize glass-to-glass latency.

Assuming the overlay presentation queue is being used, then what happens that every time the display engine enters vblank, it looks at the timestamp of the next frame and compares it to the current time. If the next frame has a timestamp in the past, it flips to it. Otherwise, it waits until the next vblank. If you’re concerned about measuring the latency in realtime, you can call VdpPresentationQueueQuerySurfaceStatus to query the time that presentation started and compare it to VdpPresentationQueueGetTime to see how far ahead of the display you are.

If you’re worried about variable processing time for your video frames, another option would be to use OpenGL with a G-SYNC capable display. That allows the display to respond with a (mostly) fixed latency after your application calls glXSwapBuffers(). But that requires a G-SYNC display and it sounds like you already have a particular HDMI sink in mind.