Nikolay Sivov (@nsivov) commented about dlls/mfmediaengine/main.c:
}
- switch (output_format)
- {
case DXGI_FORMAT_R10G10B10A2_TYPELESS:
case DXGI_FORMAT_R10G10B10A2_UNORM:
case DXGI_FORMAT_R10G10B10A2_UINT:
/* IMFMediaSession doesn't support output to these formats. Create an 8-bit
* output and ensure the sampled texture is copied via a pixel shader.
* TODO: to actually have 10 bits per channel we should use DXGI_FORMAT_P010. */
output_format = DXGI_FORMAT_B8G8R8A8_UNORM;
engine->video_frame.uses_10bit = TRUE;
break;
default:
break;
- }
Do we actually need P010 format at some point, and why if we do? Why can't we simply use BGRA always and then copy to output format texture that user asked for? What does it mean that session doesn't support it? I don't think session really cares about what's in sample buffers. Calling this "uses_10bit" is too detailed, what it means really is "not-equal-to-output_format", right?