## Context
This is a problem discovered when running "Max: The Curse of Brotherhood" under proton. This game writes 4MB a piece into `wg_transform`, which contains about 4 seconds of compressed video. `wg_transform` calls `gst_pad_push` in `transform_ProcessOutput`, which takes \~300ms (i.e. 20 frames @ 60fps) to decode this buffer of video. So the end result is the game hitches every 4 seconds while playing cut scene videos.
Proton currently has a special case for this particular game, for which it breaks up the buffer into small chunks to avoid long blocks. This MR adopts that and applies it generally.
One concern raised by @redmcg is:
> The only issue I can think of is if there are any decoders which don't have a parser; then they might not know how to deal with an arbitrary 4096 byte buffer (the parser is generally responsible for taking arbitrary buffers and producing something the decoder can work with, for example: a full frame).
So this MR only enables this strategy when there is a parser element.
--
v4: winegstreamer: Avoid large buffer pushes in wg_transform.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7288
## Context
This is a problem discovered when running "Max: The Curse of Brotherhood" under proton. This game writes 4MB a piece into `wg_transform`, which contains about 4 seconds of compressed video. `wg_transform` calls `gst_pad_push` in `transform_ProcessOutput`, which takes \~300ms (i.e. 20 frames @ 60fps) to decode this buffer of video. So the end result is the game hitches every 4 seconds while playing cut scene videos.
Proton currently has a special case for this particular game, for which it breaks up the buffer into small chunks to avoid long blocks. This MR adopts that and applies it generally.
One concern raised by @redmcg is:
> The only issue I can think of is if there are any decoders which don't have a parser; then they might not know how to deal with an arbitrary 4096 byte buffer (the parser is generally responsible for taking arbitrary buffers and producing something the decoder can work with, for example: a full frame).
So this MR only enables this strategy when there is a parser element.
--
v3: winegstreamer: Avoid large buffer pushes in wg_transform.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7288
update: rebased to master and is now using the parser for buffer splitting.
i found that holding onto the parser element and manually driving it is too complicated, it also causes the code paths to diverge significantly between the having-a-parser case and the not-having-a-parser case. so instead i added a proxy element which gives me control over how buffers move through the pipeline.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7288#note_95963
On Tue Feb 25 20:39:47 2025 +0000, Nikolay Sivov wrote:
> This isn't about percentage or how common it is. It's not clear this is
> the right direction to me, for example groups could contain path
> geometries with different filling modes, or other groups.
So, what is the behavior you expect? It is clear the behavior is correct when the fill mode is WINDING, or when the rendering does not depend on the fill rule - that also includes overlapping geometries with correct path direction, e.g. paths generated from font outlines.
You should provide a way forward, not block it because it is not perfect. It definitely *does* work properly in the majority of cases, the rendering becomes more correct. If you want changes, please be specific.
Wine is full of partially incomplete and incorrect implementations, according to your line of thoughts all this should be deleted.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6492#note_95959
On Tue Feb 25 20:02:24 2025 +0000, Elizabeth Figura wrote:
> > No, I think it is desirable. I'm going to move some more tests out, to
> build with either msxml2.idl or msxml6.idl, and then we'll see what's left.
> What's the progress on this? Is this something that could be delegated
> to someone else invested in upstreaming wine-staging patches?
I sent some more changes in !7427. But sure, we might need to duplicate some things between dlls too.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1060#note_95957