RGB8 to BAYER10

I’ve been trying to solve an unusual problem. I want to create a video stream that is built using BAYER10 image/patterns. The end goal is to simulate a GigeVision camera for debugging and testing, but I am having a hard time creating the correct bit depth / pattern…

crosspost: