-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use LUT for linear to sRGB conversion
Using a LUT for the linear to sRGB conversion improves decoding performance for the decode_into benchmark: ``` decode_into LGF5]+Yk^6#M@-5c,1J5@[or[Q6./200 time: [766.58 µs 769.86 µs 776.05 µs] change: [-62.967% -62.784% -62.602%] (p = 0.00 < 0.05) Performance has improved. ``` However, the size of the LUT is 8.192 u8. The `fast-linear-to-srgb` feature flag was added, which is enabled by default. In cases where binary size is more important than performance, the feature can be disabled. Another note in the implementation: using a lookup table reduces the accuracy of the conversion, compared to the original implementation. But all current tests pass. Higher accuracy can be achieved by increasing the LUT size.
- Loading branch information
Showing
3 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters