mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-07 11:51:49 +09:00
iPF progressive mode decoder
This commit is contained in:
@@ -562,7 +562,7 @@ NOTE FROM DEVELOPER
|
||||
|
||||
TSVM Interchangeable Picture Format (aka iPF Type 1/2)
|
||||
|
||||
Image is divided into 4x4 blocks and each block is serialised, then the entire iPF blocks are gzipped
|
||||
Image is divided into 4x4 blocks and each block is serialised, then the entire iPF blocks are Zstd-compressed
|
||||
|
||||
|
||||
# File Structure
|
||||
@@ -576,7 +576,7 @@ Image is divided into 4x4 blocks and each block is serialised, then the entire i
|
||||
uint8 Flags
|
||||
0b p00z 000a
|
||||
- a: has alpha
|
||||
- z: gzipped (p flag always sets this flag)
|
||||
- z: Zstd-compressed (p flag always sets this flag)
|
||||
- p: progressive ordering (Adam7)
|
||||
uint8 iPF Type/Colour Mode
|
||||
0: Type 1 (4:2:0 chroma subsampling; 2048 colours?)
|
||||
@@ -585,7 +585,7 @@ Image is divided into 4x4 blocks and each block is serialised, then the entire i
|
||||
uint32 UNCOMPRESSED SIZE (somewhat redundant but included for convenience)
|
||||
|
||||
- Chroma Subsampled Blocks
|
||||
Gzipped unless the z-flag is not set.
|
||||
Zstd-compressed unless the z-flag is not set.
|
||||
4x4 pixels are sampled, then divided into YCoCg planes.
|
||||
CoCg planes are "chroma subsampled" by 4:2:0, then quantised to 4 bits (8 bits for CoCg combined)
|
||||
Y plane is quantised to 4 bits
|
||||
|
||||
Reference in New Issue
Block a user