Changeset 8872


Ignore:
Timestamp:
08/08/12 10:57:02 (9 months ago)
Author:
nicolas
Message:

remove all colormap OpenMP for loops

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ImageMagick/trunk/MagickCore/enhance.c

    r8870 r8872  
    723723  } 
    724724  if (image->storage_class == PseudoClass) 
    725     { 
    726       /* 
    727         Apply transfer function to colormap. 
    728       */ 
    729 #if defined(MAGICKCORE_OPENMP_SUPPORT) 
    730       #pragma omp parallel for schedule(static,4) shared(progress,status) \ 
    731         dynamic_number_threads(image,image->columns,1,1) 
    732 #endif 
    733       for (i=0; i < (ssize_t) image->colors; i++) 
    734       { 
     725    for (i=0; i < (ssize_t) image->colors; i++) 
     726      { 
     727        /* 
     728          Apply transfer function to colormap. 
     729        */ 
    735730        double 
    736731          luma; 
     
    748743          luma; 
    749744      } 
    750     } 
    751745  /* 
    752746    Apply transfer function to image. 
     
    11761170        Stretch-contrast colormap. 
    11771171      */ 
    1178 #if defined(MAGICKCORE_OPENMP_SUPPORT) 
    1179       #pragma omp parallel for schedule(static,4) shared(progress,status) \ 
    1180         dynamic_number_threads(image,image->columns,1,1) 
    1181 #endif 
    11821172      for (j=0; j < (ssize_t) image->colors; j++) 
    11831173      { 
     
    16551645        Equalize colormap. 
    16561646      */ 
    1657 #if defined(MAGICKCORE_OPENMP_SUPPORT) 
    1658       #pragma omp parallel for schedule(static,4) shared(progress,status) \ 
    1659         dynamic_number_threads(image,image->columns,1,1) 
    1660 #endif 
    16611647      for (j=0; j < (ssize_t) image->colors; j++) 
    16621648      { 
     
    18471833        MaxMap,1.0/gamma))); 
    18481834  if (image->storage_class == PseudoClass) 
    1849     { 
    1850       /* 
    1851         Gamma-correct colormap. 
    1852       */ 
    1853 #if defined(MAGICKCORE_OPENMP_SUPPORT) 
    1854       #pragma omp parallel for schedule(static) shared(progress,status) \ 
    1855         dynamic_number_threads(image,image->columns,1,1) 
    1856 #endif 
    1857       for (i=0; i < (ssize_t) image->colors; i++) 
    1858       { 
     1835    for (i=0; i < (ssize_t) image->colors; i++) 
     1836      { 
     1837        /* 
     1838          Gamma-correct colormap. 
     1839        */ 
    18591840        if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0) 
    18601841          image->colormap[i].red=(double) gamma_map[ 
     
    18701851            ScaleQuantumToMap(ClampToQuantum(image->colormap[i].alpha))]; 
    18711852      } 
    1872     } 
    18731853  /* 
    18741854    Gamma-correct image. 
     
    22282208    (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); 
    22292209  if (image->storage_class == PseudoClass) 
    2230 #if defined(MAGICKCORE_OPENMP_SUPPORT) 
    2231     #pragma omp parallel for schedule(static,4) shared(progress,status) \ 
    2232       dynamic_number_threads(image,image->columns,1,1) 
    2233 #endif 
    22342210    for (i=0; i < (ssize_t) image->colors; i++) 
    22352211    { 
     
    23972373    (void) SetImageColorspace(image,RGBColorspace,exception); 
    23982374  if (image->storage_class == PseudoClass) 
    2399 #if defined(MAGICKCORE_OPENMP_SUPPORT) 
    2400     #pragma omp parallel for schedule(static,4) shared(progress,status) \ 
    2401       dynamic_number_threads(image,image->columns,1,1) 
    2402 #endif 
    24032375    for (i=0; i < (ssize_t) image->colors; i++) 
    24042376    { 
     
    29082880      MagickFalse,artifact); 
    29092881  if (image->storage_class == PseudoClass) 
    2910     { 
    2911       /* 
    2912         Modulate colormap. 
    2913       */ 
    2914 #if defined(MAGICKCORE_OPENMP_SUPPORT) 
    2915       #pragma omp parallel for schedule(static,4) shared(progress,status) \ 
    2916         dynamic_number_threads(image,image->columns,1,1) 
    2917 #endif 
    2918       for (i=0; i < (ssize_t) image->colors; i++) 
     2882    for (i=0; i < (ssize_t) image->colors; i++) 
    29192883      { 
    29202884        double 
     
    29232887          red; 
    29242888 
     2889        /* 
     2890          Modulate colormap. 
     2891        */ 
    29252892        red=image->colormap[i].red; 
    29262893        green=image->colormap[i].green; 
     
    29492916        } 
    29502917      } 
    2951     } 
    29522918  /* 
    29532919    Modulate image. 
     
    30853051    (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); 
    30863052  if (image->storage_class == PseudoClass) 
    3087     { 
    3088       /* 
    3089         Negate colormap. 
    3090       */ 
    3091 #if defined(MAGICKCORE_OPENMP_SUPPORT) 
    3092       #pragma omp parallel for schedule(static) shared(progress,status) \ 
    3093         dynamic_number_threads(image,image->columns,1,1) 
    3094 #endif 
    3095       for (i=0; i < (ssize_t) image->colors; i++) 
    3096       { 
     3053    for (i=0; i < (ssize_t) image->colors; i++) 
     3054      { 
     3055        /* 
     3056          Negate colormap. 
     3057        */ 
    30973058        if (grayscale != MagickFalse) 
    30983059          if ((image->colormap[i].red != image->colormap[i].green) || 
     
    31093070            image->colormap[i].blue; 
    31103071      } 
    3111     } 
    31123072  /* 
    31133073    Negate image. 
     
    34093369        (double) i/MaxMap))); 
    34103370  if (image->storage_class == PseudoClass) 
    3411     { 
    3412       /* 
    3413         Sigmoidal-contrast enhance colormap. 
    3414       */ 
    3415       for (i=0; i < (ssize_t) image->colors; i++) 
    3416       { 
     3371    for (i=0; i < (ssize_t) image->colors; i++) 
     3372      { 
     3373        /* 
     3374          Sigmoidal-contrast enhance colormap. 
     3375        */ 
    34173376        if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0) 
    34183377          image->colormap[i].red=ClampToQuantum(sigmoidal_map[ 
     
    34283387            ScaleQuantumToMap(image->colormap[i].alpha)]); 
    34293388      } 
    3430     } 
    34313389  /* 
    34323390    Sigmoidal-contrast enhance image. 
Note: See TracChangeset for help on using the changeset viewer.