Skip to content
  • Julian Scheel's avatar
    mmal/vout: Apply phase offset to match vsync period · 04e9ee96
    Julian Scheel authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
    
    
    As the latency target alone is not ensuring that we start with a sane phase
    shift between vsync and drawing, we read back the phase shift provided by the
    mmal rendering statistics and use it to compute a phase offset which we apply
    to the picture date, so that the core shifts the display call accordingly.
    Doing this frequently allows us to resync if a distortion or display reset
    caused the offset to break.
    This is only enabled if mmal-adjust-refreshrate is enabled, because the whole
    vsync synchronisation makes only sense if display and videorate match.
    
    Signed-off-by: default avatarJulian Scheel <julian@jusst.de>
    Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
    04e9ee96