blob: 77f6b7d4781f169480185c220963b011633a25be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# The Experimental Video Codec
## File format
- magic bytes: `5e b1 c3 08`
- resolution: _`u16, u16`_
- frame count: _`u64`_
- frames (repeated [frame count]-times)
- block type
- block
- 0 **Literal-Block** (pixels saved)
- pixels: _`[[u8; 3]]`_
- 1 **Split-Block** (delegated to 2 sub-blocks split on the longest axis)
- sub-blocks: _`[block; 2]` (see above)_
- 2 **Reference-Block** (reuses previous frame in some way)
- translation: _`i8, i8`_
- 3 **Advanced-Reference-Block** (reuses previous frame in some way)
- translation: _`s8, s8`_ (translation encoded as _floats_)
- transform: _`s8, s8, s8, s8`_ (2x2-matrix of _floats_ applied before
sampling)
- value_scale: _`i8`_ (represents multiplication of each color component
with $1.05^n$)
### _`s8`_
8-bit scalar. When read as _`i8`_ represents a value of $\frac{x}{|x|} *
\sqrt{2}^{|{x}| - 4}$ for $x \neq 0$, otherwise 0.s
### Todo
- JPEG compress Literal-Blocks
- general compression (gzip oder so)
|