This document defines the Fairly Decent Image Codec which aims to be byte‑aligned and simple to encode or decode (sacrificing a bit of compression).
All opcodes are one full byte, and additional payload bytes follow as specified.
TODO: file header.
This document defines the Fairly Decent Image Codec which aims to be byte‑aligned and simple to encode or decode (sacrificing a bit of compression).
All opcodes are one full byte, and additional payload bytes follow as specified.
TODO: file header.
| // avrdude ... -U lfuse:w:0x6a:m | |
| // 1.2 MHz (9.6 MHz oscillator divided by 8) | |
| // Brown-out detection at 2.7 V (I guess the blue leds wouldn't work anyway) | |
| #define F_CPU 1200000UL | |
| #define MCU attiny13 | |
| #include <avr/io.h> | |
| #include <avr/pgmspace.h> | |
| void turnAllOff() { | |
| PORTB = 0; |
| #include <math.h> | |
| #define SWAP(a,b) tempr=(a);(a)=(b);(b)=tempr | |
| /* | |
| * Discrete Fast Fourier Transform based on the algorithm in | |
| * Numerical Recipes in C, slighly modified by removing the | |
| * insane 1 based array access. | |
| * | |
| * Takes the data pointer which contains nn pairs of doubles, |