iPF progressive mode decoder

This commit is contained in:
minjaesong
2025-12-19 21:41:51 +09:00
parent 1680137b7d
commit 96d697e158
4 changed files with 206 additions and 6 deletions

View File

@@ -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