mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-02 03:26:39 +00:00
This predictor is much more complicated than the others. Indeed, to be computed, it needs its own value but for other pixels. As you can guess, implementing it involved the introduction of a structure to hold that data. Fundamentally, this predictor uses the value of the error between the predicted value and the true value (aka decoded value) of pixels around. One of this computed error (namely max_error) is used as a property, so this patch also solves a FIXME in `get_properties`. To ease the access to value that are close in the channel and moving their values around, this patch adds a `Neighborhood` struct which holds this data. It has been used in `prediction()` and it allowed to simplify the signature and to remove the explicit retrieval of the underlying data. All this work allows us to decode the default image that appears when loading `https://jxl-art.surma.technology`. However, we still render it incorrectly due to the lack of support for orientation values different from 1.