|
|
|
|
|
by nigeltao
998 days ago
|
|
> Isn't it fixed during the decoding process though? For Wuffs' image decoding, it's flexible up until decode_image_config returns. It's fixed afterwards. In practice, that works fine for BMP, GIF, JPEG and PNG (and I'm confident will work for WebP too). No in-situ dynamic allocation (with or without sugar) needed. Even though, for the libjpeg-turbo C code, `grep mem..alloc_ jd*.c | wc -l` shows more than 50 "allocation" call sites, Wuffs' JPEG decoder does just fine with just the one work buffer. |
|