04cb3c1bbd5b3ff96ea814be179778ca2fe4c8b5
Histogram was calculated by copying the rendered image, transforming it into display space, and calculating the histogram on that. On large resolutions, this copy+transform+free of the temporary image was taking up majority of the time. Especially for default use case when the display transform is a no-op. Change the code so that display transform, if needed, is done directly inside histogram calculation, without needing a full-size temporary image. Performance of histogram calculation, on Ryzen 5950X (Windows), on a 4K resolution image, with default color management settings: - PNG (SDR): 3.9 -> 0.9ms - EXR (HDR): 41.3 -> 6.3ms With display colorspace (P3) that is different than the sequencer colorspace (sRGB): - PNG (SDR): 25.3 -> 11.3ms - EXR (HDR): 64.9 -> 10.6ms It also fixes calculation of histogram on float (HDR) images that have alpha channel; the histogram was wrongly calculated on premultiplied color values, which was not consistent with how it was calculated on the byte images. Pull Request: https://projects.blender.org/blender/blender/pulls/143175
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
