Reduce start time and memory usage by removing redundant lookup tables and fillig remaining lookup tables in parellel

This commit is contained in:
heckflosse
2016-02-24 01:35:47 +01:00
parent ad32009c53
commit e52b1fcdd4
10 changed files with 143 additions and 123 deletions

View File

@@ -731,6 +731,9 @@ void Thumbnail::initGamma ()
igammatab[i] = (unsigned short)(255.0 * pow((double)i / 255.0, Color::sRGBGamma));
}
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (int i = 0; i < 65536; i++) {
gammatab[i] = (unsigned char)(255.0 * pow((double)i / 65535.0, 1.f / Color::sRGBGamma));
}