The last patch is a huge optimization to what is done in patch 2. Without that the sample is first copied from GPU to CPU each time wg_transform_read_mf() locks the buffer (allocating extra linear buffer on the way) and then copies the data back to GPU. That happens even if there is no sample available from wg_transform. With the last patch there is just one memory copy to the (write-only) locked DXGI surface buffer. And CPU to GPU texture transfer (which would be there anyway in most cases on software path as most of the apps are going to get the image to GPU anyway). In principle we could also skip the explicit staging texture and use _UpdateSubresource instead directly from h264 decoder, but this is currently not supported in wined3d for chroma formats and the overall difference between _UpdateSubresource and explicit mapped staging texture is not that great probably.
--
v4: winegstreamer: Pass temporary sample to wg_transform_read_mf() in h264 decoder.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2587
The last patch is a huge optimization to what is done in patch 2. Without that the sample is first copied from GPU to CPU each time wg_transform_read_mf() locks the buffer (allocating extra linear buffer on the way) and then copies the data back to GPU. That happens even if there is no sample available from wg_transform. With the last patch there is just one memory copy to the (write-only) locked DXGI surface buffer. And CPU to GPU texture transfer (which would be there anyway in most cases on software path as most of the apps are going to get the image to GPU anyway). In principle we could also skip the explicit staging texture and use _UpdateSubresource instead directly from h264 decoder, but this is currently not supported in wined3d for chroma formats and the overall difference between _UpdateSubresource and explicit mapped staging texture is not that great probably.
--
v3: winegstreamer: Pass temporary sample to wg_transform_read_mf() in h264 decoder.
winegstreamer: Provide samples if DXGI device manager is set in h264 decoder.
winegstreamer: Process MFT_MESSAGE_SET_D3D_MANAGER in h264 decoder.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2587
--
v3: winegstreamer: Output BGRx video from the media source.
winegstreamer: Move flipping based on RGB to the frontends.
winegstreamer: Translate the MF_MT_DEFAULT_STRIDE attribute to flipped video in mf_media_type_to_wg_format().
winegstreamer: Set the MF_MT_DEFAULT_STRIDE attribute in mf_media_type_from_wg_format().
winegstreamer: Initialize media source video types from a wg_video_format array.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2159