(08-10-2021, 08:47 AM)barray Wrote: Haha very cool demonstration! Can you share some technical description of how this is working? (I see the source, but I mean some high level description about what you did.)I might put some more effort into a proper technical description on the github page at some point though not today.
Depending on the bitrate, I wonder whether whether it could be possible to stream video via BT - that could be a legitimately useful (and uber cool) feature!
Great work
But anyways, I'll give a quick description here:
The main magic happening here, is in the fact that this video is preprocessed beforehand on a powerful desktop pc. This thing first takes out only the pixels that actually change. And then tries to figure out the optimal blocks to write this to the display.
The way you write something to the display is: x1, y1, x2, y2, bitmap. I call these blocks.
Basically, writing a new block takes time, and writing pixels in a bitmap takes less time, so the bigger the blocks the better. So basically, if you have a block of 10x10 of changing pixels, with one non changing pixel in the middle, it is faster to overwrite that pixel, than to write 4 blocks around it. So that is basically what the preprocessor does. These blocks are then put in a file, with coordinates of the blocks (second relative can be encoded in 4 bits), followed by a 1 bit bitmap. This file is then lz4 compressed, and written to the spi flash of the pinetime. The pinetime decompresses, processes the blocks, and writes them to the display.
As for bluetooth streaming, I kinda doubt that would be doable, I haven't looked into bluetooth yet, but if the speed is anything like the time it takes to upload through nrf connect (uploading this video takes about half an hour). I doubt that is gonna happen. But idk, maybe some optimizations are possible.