On Wed Feb 28 14:00:32 2024 +0000, eric pouech wrote:
but also YUY2 is 16bpp, and we currently (preexisting to this MR) copying 24bpp unless I'm mistaken
I was talking about the fallback which doesn't necessarily needs to have very precise default. But both of you seems to have more deeper knowledge about the code change in question.
I'll wish you both suggested code changes directly, doesn't need to be anything fancy, can be just a small markdown code block like I did. Since 12bpp is not a multiple of 8, I think `width = (width * 3 + 1) / 2` should be correct for NV12?
Maybe if it needs to be 4 bytes aligned buffer size it would be `width = ((width * 3 + 1) / 2 + 3) & ~3` instead. Personally, I'll go for the 4 byte aligned 12bpp to be safe, and add a comment explaining it's 4 byte aligned 12bpp.
But I'm not perfectly familiar with this part of wine yet, so any feedback from someone more knowledgeable would be welcome.