Skip to content

ImageColors: use OpenMP to position colors in parallel

Fushan Wen requested to merge work/fuf/positionColorMP into master

The color positioning loop is the most heavy part in generatePalette, so make it possible to position colors in parallel when the valid sample size is larger than 256x256 (65536) before one CPU core gets exhausted.

Test:

Source Image Total Generation Time Before (ms) After (ms)
Nature_Ultra_HD_4K_Wallpapers_Pack-15__8_ 7616 2121
Edited by Fushan Wen

Merge request reports

Loading