microsoft / lepton_jpeg_rust

Port of DropBox Lepton compression to Rust
Apache License 2.0
129 stars 10 forks source link

Copy coefficient blocks locally to process them in order to dramatically improve cache usage #31

Closed mcroomp closed 1 year ago

mcroomp commented 1 year ago

Instead of processing the data inside the image, copy data into a local AlignedBlock and do all the processing there, then copy back into the image data. Also keep a reference to the neighbors so that we don't recalc/copy this information during the various prediction processors.