Genlock backport from CAF jb_chocolate