An official specification now exists and it is both more detailed and
easier to understand than the incomplete notes available here.
| ... | ... |
@@ -27,22 +27,13 @@ |
| 27 | 27 |
* Flash Screen Video encoder |
| 28 | 28 |
* @author Alex Beregszaszi |
| 29 | 29 |
* @author Benjamin Larsson |
| 30 |
+ * |
|
| 31 |
+ * A description of the bitstream format for Flash Screen Video version 1/2 |
|
| 32 |
+ * is part of the SWF File Format Specification (version 10), which can be |
|
| 33 |
+ * downloaded from http://www.adobe.com/devnet/swf.html. |
|
| 30 | 34 |
*/ |
| 31 | 35 |
|
| 32 |
-/* Bitstream description |
|
| 33 |
- * The picture is divided into blocks that are zlib-compressed. |
|
| 34 |
- * |
|
| 35 |
- * The decoder is fed complete frames, the frameheader contains: |
|
| 36 |
- * 4 bits of block width |
|
| 37 |
- * 12 bits of frame width |
|
| 38 |
- * 4 bits of block height |
|
| 39 |
- * 12 bits of frame height |
|
| 40 |
- * |
|
| 41 |
- * Directly after the header are the compressed blocks. The blocks |
|
| 42 |
- * have their compressed size represented with 16 bits in the beginning. |
|
| 43 |
- * If the size = 0 then the block is unchanged from the previous frame. |
|
| 44 |
- * All blocks are decompressed until the buffer is consumed. |
|
| 45 |
- * |
|
| 36 |
+/* |
|
| 46 | 37 |
* Encoding ideas: A basic encoder would just use a fixed block size. |
| 47 | 38 |
* Block sizes can be multiples of 16, from 16 to 256. The blocks don't |
| 48 | 39 |
* have to be quadratic. A brute force search with a set of different |