Optimisations to DXA Player
|Reported by:||SF/robinwatts||Owned by:||sev-|
|Cc:||Game:||Broken Sword 1|
Currently the DXA player does a bit more work each frame than it needs to.
Firstly, we read into one of the framebuffers. Then we malloc a new buffer and copy into that, decompress from it, then free that new buffer.
Later on we then memcpy the entire frame from one frame buffer to another.
In the new decode methods (12 and 13) we also malloc and free buffers each frame.
This patch reduces this overhead; we now have a couple of extra buffers; an inBuffer which we use to read into, a decompBuffer which we decompress the data into (only required for films which use methods 12 or 13).
Also, by decompressing into the correct buffers to start with we can avoid several memcpys.
I've tested this locally with Broken Sword I and it seems to work fine. Unfortunately my films don't use method 12, so I need to backtrack through the encoder versions and regenerate some films to try.
This patch is uploaded here in the meantime for comments.
Ticket imported from: #1744229. Ticket imported from: patches/811.