Changeset 8872
- Timestamp:
- 08/08/12 10:57:02 (9 months ago)
- File:
-
- 1 edited
-
ImageMagick/trunk/MagickCore/enhance.c (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ImageMagick/trunk/MagickCore/enhance.c
r8870 r8872 723 723 } 724 724 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 */ 735 730 double 736 731 luma; … … 748 743 luma; 749 744 } 750 }751 745 /* 752 746 Apply transfer function to image. … … 1176 1170 Stretch-contrast colormap. 1177 1171 */ 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 #endif1182 1172 for (j=0; j < (ssize_t) image->colors; j++) 1183 1173 { … … 1655 1645 Equalize colormap. 1656 1646 */ 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 #endif1661 1647 for (j=0; j < (ssize_t) image->colors; j++) 1662 1648 { … … 1847 1833 MaxMap,1.0/gamma))); 1848 1834 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 */ 1859 1840 if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0) 1860 1841 image->colormap[i].red=(double) gamma_map[ … … 1870 1851 ScaleQuantumToMap(ClampToQuantum(image->colormap[i].alpha))]; 1871 1852 } 1872 }1873 1853 /* 1874 1854 Gamma-correct image. … … 2228 2208 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); 2229 2209 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 #endif2234 2210 for (i=0; i < (ssize_t) image->colors; i++) 2235 2211 { … … 2397 2373 (void) SetImageColorspace(image,RGBColorspace,exception); 2398 2374 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 #endif2403 2375 for (i=0; i < (ssize_t) image->colors; i++) 2404 2376 { … … 2908 2880 MagickFalse,artifact); 2909 2881 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++) 2919 2883 { 2920 2884 double … … 2923 2887 red; 2924 2888 2889 /* 2890 Modulate colormap. 2891 */ 2925 2892 red=image->colormap[i].red; 2926 2893 green=image->colormap[i].green; … … 2949 2916 } 2950 2917 } 2951 }2952 2918 /* 2953 2919 Modulate image. … … 3085 3051 (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); 3086 3052 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 */ 3097 3058 if (grayscale != MagickFalse) 3098 3059 if ((image->colormap[i].red != image->colormap[i].green) || … … 3109 3070 image->colormap[i].blue; 3110 3071 } 3111 }3112 3072 /* 3113 3073 Negate image. … … 3409 3369 (double) i/MaxMap))); 3410 3370 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 */ 3417 3376 if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0) 3418 3377 image->colormap[i].red=ClampToQuantum(sigmoidal_map[ … … 3428 3387 ScaleQuantumToMap(image->colormap[i].alpha)]); 3429 3388 } 3430 }3431 3389 /* 3432 3390 Sigmoidal-contrast enhance image.
Note: See TracChangeset
for help on using the changeset viewer.
