[vlc-devel] [PATCH v2 0/2] Maintain vsync phase sync in mmal vout

Julian Scheel julian at jusst.de
Thu Oct 9 12:08:55 CEST 2014


===
Update summary v2:
- Drop vout core changes in favor of phase_offset implementation in vd_prepare
  within the mmal vout itself.
- Only activate latency target when it makes sense (mmal-adjust-refreshrate is
  set)
===

To ensure that no frames are dropped or duplicated due to frame draws
happening very close to vsync time and jittering around it, the drawing of a
picture shall ideally happen with a safe delay after a vsync.
With mmal there two mechanisms involved. The first is the so called latency
target, which tries to synchronise the HDMI clock to the frame rendering
interval by slightly adjusting the HDMI pixel clock. The second mechanisms is
determining the actual phase offset and doing an initial shift to place the
renderings in a safe time slot.
For this to work the mmal vout applies an offset to the pictures date in the
vd_prepare() method, which causes the vout core to call display() at the
corrected time. The computed offset is within the frame duration, so that it
does not actually cause follow-up issues like a/v sync, etc.

Julian Scheel (2):
  mmal/vout: Configure latency target
  mmal/vout: Apply phase offset to match vsync period

 modules/hw/mmal/vout.c | 110 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 109 insertions(+), 1 deletion(-)

-- 
2.1.2




More information about the vlc-devel mailing list