On Mon Sep 9 02:52:32 2024 +0000, Ziqing Hui wrote:
I found that you said this in !5667:
The point of the "preferred" format is that it should be the one that
does not require videoconvert, and therefore offers the best latency. If that's true, we should not use preferred_format in stream_props_GetMediaType() for uncompressed situation, because "the one that does not require videoconvert" may differ from the actual output format. In front side, games will use the result of stream_props_GetMediaType() to create d3d textures, if we get a bpp which is different from the actual output, there will be buffer overflow. So I think this patch is doing the right thing.
Oh, right, because of videoflip... although I'm not sure if we're doing the right thing for uncompressed video in that case.
I was going to suggest anyway that using codec_format instead of preferred_format for uncompressed video would make sense; even if it comes out to the same thing it's documenting that assumption. That'd be kind of the opposite of what this patch does, though.