This is an upgrade of a tool I created 15 years ago in Python to learn OOP and solve some inadequacies in the HDR stacking tools I could find at the time. The problem was, none of them were really batch friendly . None of them properly preserved the metadata I wanted them to stuff into the output file. There were probably some other reasons also, I just can t remember them now.It got the job done, but was very slow. Python was what I knew at the time and even with NumPy, I was limited in the speed I could squeeze out of it. (I also made some very specific, conscious, architectural choices to be extra frugal with RAM, which impacted performance further.)This new version is SUBSTANTIALLY faster than the old one. This time around the exercise was more about having some fun in Lisp using an agent REPL skill I created and exploring SIMD in SBCL via the built-in sb-simd library.It uses LibRaw (via its C API wrapper and CFFI) for reading and and a custom multi-threaded pure Lisp implementation of (a subset) of OpenEXR I created for writing the output files. The threading helps speed up the otherwise expensive deflate based codec and goes a long way towards speeding up the end-to-end pipeline. The core processing / compositing logic is pure Lisp.Cool features:* Buffer parallel (threaded) LibRaw reads* Frugal use of memory (RAW read as 16 bit INT and is only upcast to float during actual stacking)* AVX2 acceleration of 16 bit INT up-cast and HDR stacking loop* Threaded OpenEXR writes* EXIF to EXR metadata preservation of the center exposure bracket, which essentially forwards meaningful telemetry regarding the radiometric reality of the scene when it was photographed downstream to subsequent consumers.You can learn more about it and the algorithm it uses from the repo. The math for HDR stacking is really very simply if you know basic compositing and understand how digital camera sensors work.