Martouffff / lolshield

Automatically exported from code.google.com/p/lolshield
0 stars 0 forks source link

Charliplexing.cpp performance improvements #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This patch reduces the code size and improves the CPU performance of 
Charliplexing.cpp by:
* removing zeroed data in videoPage
* precalculating information for LedSign::Set()
* removing unneeded register writes in TIMER2_OVF_vect()
* using a roving pointer to access the display buffer rather than recalculating 
the array index each time
* eliminating the extra blank interval (1/8 display cycles)
* eliminating an extra display “cycle” (which could also display garbage)

On my test platform, this:
* reduced code size by 178 bytes
* increased the FadeTest max FPS from 55 to 71
* increased brightness (not sure how much offhand)

Original issue reported on code.google.com by r...@ihack.net on 18 Aug 2013 at 7:46

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The difference in brightness turned out to be because I removed the blanking 
interval that SetBrightness() creates.  There were a bunch of arithmetic 
overflows and other issues in SetBrightness() which caused it to create a 
non-zero blanking interval even when maximum brightness was used.  I've fixed 
that and attached an updated patch.

Original comment by r...@ihack.net on 18 Aug 2013 at 10:19

Attachments:

GoogleCodeExporter commented 9 years ago
committed in revision 28

Original comment by r...@ihack.net on 20 Aug 2013 at 5:37