#8644 closed patch
Speedups for plotYUV and related functions
Reported by: | SF/robinwatts | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | Video |
Version: | Keywords: | ||
Cc: | Game: | Broken Sword 1 |
Description
This patch accelerates the plotYUV1x, plotYUV2x and plotYUV3x functions used for the MPEG playback on all platforms.
The algorithm is fundamentally unchanged, just various additions are moved out from the inner loop, and various additions removed. Finally the loops are reversed to count down towards zero (as on most architectures testing against 0 is cheap/free).
Specifically this patch has been tested with Broken Sword 1 on WinCE, and found to make a significant improvement in speed.
There is no rocket science here - the algorithm hasn't changed at all - it's just an optimised coding.
Ticket imported from: #1705747. Ticket imported from: patches/749.
Attachments (1)
Change History (8)
by , 18 years ago
comment:1 by , 18 years ago
Thanks for the patch. Please note that the MPEG playback code will eventually be removed in favor of the DXA playback code.
comment:2 by , 18 years ago
Looking at this patch, it seems to do lots of simple optimizations which indeed any good compiler should automatically perform.. I wonder, are you using GCC with -O2 or -O3 for your speed tests?
comment:3 by , 18 years ago
Yes, it's lots of simple optimisations. Some of them might be spotted by a good compiler. Some of them might be spotted by a VERY clever compiler. Some of them can't be spotted at all.
Yes, I'm using -O2.
In my experience of compilers, for every once in blue moon time they do something really clever that you never expect them to, they tend to miss lots of simple optimisations that you'd expect them to get.
comment:4 by , 18 years ago
Owner: | set to |
---|---|
Status: | new → closed |
comment:7 by , 6 years ago
Component: | → Video |
---|---|
Game: | → Broken Sword 1 |
Patch with plotYUV etc speedups.