circuitpython/shared-module/gifio
Jeff Epler 7d6ac96001 GifWriter: improve efficiency
* Increase colorspace conversion efficiency.
   This not only avoids a function call, it avoids the time-consuming
   switch statement in conver_pixel (replacing it with a single
   conditional on the byteswap flag + accounting for BGR/RGB during
   palette creation)

 * Buffer all the bytes of a single frame together.  By reducing
   low level write calls we get a decent speed increase even though
   it increases data-shuffling a bit.

Together with some other changes that enable "double buffered" camera
capture, this gets me to 8.8fps capturing QVGA (320x240) gifs and
11fps capturing 240x240 square gifs.
2021-10-26 11:11:28 -05:00
..
__init__.c Implement gifio.GifWriter 2021-10-26 08:54:18 -05:00
__init__.h Implement gifio.GifWriter 2021-10-26 08:54:18 -05:00
GifWriter.c GifWriter: improve efficiency 2021-10-26 11:11:28 -05:00
GifWriter.h GifWriter: improve efficiency 2021-10-26 11:11:28 -05:00