OMP speedup for icc profiles (see issue 1462)

This commit is contained in:
michael
2012-07-07 20:37:51 -04:00
parent 20ecdd5bf9
commit c1701da96b

View File

@@ -1800,12 +1800,13 @@ void RawImageSource::colorSpaceConversion (Imagefloat* im, ColorManagementParams
im->ExecCMSTransform(hTransform); im->ExecCMSTransform(hTransform);
} }
float x, y,z;
Glib::ustring choiceprofile; Glib::ustring choiceprofile;
choiceprofile=cmp.working; choiceprofile=cmp.working;
if(choiceprofile!="ProPhoto") { if(choiceprofile!="ProPhoto") {
#pragma omp parallel for
for ( int h = 0; h < im->height; ++h ) for ( int h = 0; h < im->height; ++h )
for ( int w = 0; w < im->width; ++w ) {//convert from Prophoto to XYZ for ( int w = 0; w < im->width; ++w ) {//convert from Prophoto to XYZ
float x, y,z;
x = (toxyz[0][0] * im->r[h][w] + toxyz[0][1] * im->g[h][w] + toxyz[0][2] * im->b[h][w] ) ; x = (toxyz[0][0] * im->r[h][w] + toxyz[0][1] * im->g[h][w] + toxyz[0][2] * im->b[h][w] ) ;
y = (toxyz[1][0] * im->r[h][w] + toxyz[1][1] * im->g[h][w] + toxyz[1][2] * im->b[h][w] ) ; y = (toxyz[1][0] * im->r[h][w] + toxyz[1][1] * im->g[h][w] + toxyz[1][2] * im->b[h][w] ) ;
z = (toxyz[2][0] * im->r[h][w] + toxyz[2][1] * im->g[h][w] + toxyz[2][2] * im->b[h][w] ) ; z = (toxyz[2][0] * im->r[h][w] + toxyz[2][1] * im->g[h][w] + toxyz[2][2] * im->b[h][w] ) ;