]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 13 Feb 2010 16:39:29 +0000 (16:39 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 13 Feb 2010 16:39:29 +0000 (16:39 +0000)
coders/dpx.c
coders/pnm.c
magick/colormap.c
magick/composite.c
magick/decorate.c
magick/effect.c
magick/shear.c
magick/transform.c

index 39a70145c012bc790ffaee6a7c180bde7858e8f0..f37e3b5555c42a27395632c33772c641b1041bfe 100644 (file)
@@ -1155,7 +1155,7 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception)
         MagickTrue : MagickFalse);
       image_view=AcquireCacheView(image);
 #if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 200505)
-  #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
+  #pragma omp parallel for schedule(static) shared(row,status,quantum_type)
 #endif
       for (y=0; y < (long) image->rows; y++)
       {
index 4c0a5142a7cc256f5df88011e7d9c58d391c267f..089841547251a0ddb4c9edfe2dbada46a1e44549 100644 (file)
@@ -595,7 +595,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
         extent=GetQuantumExtent(image,quantum_info,quantum_type);
         image_view=AcquireCacheView(image);
 #if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 200505)
-  #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
+  #pragma omp parallel for schedule(static) shared(row,status,quantum_type)
 #endif
         for (y=0; y < (long) image->rows; y++)
         {
@@ -677,7 +677,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
           ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
         image_view=AcquireCacheView(image);
 #if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 200505)
-  #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
+  #pragma omp parallel for schedule(static) shared(row,status,quantum_type)
 #endif
         for (y=0; y < (long) image->rows; y++)
         {
@@ -795,7 +795,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
           ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
         image_view=AcquireCacheView(image);
 #if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 200505)
-  #pragma omp parallel for schedule(static,1) shared(row,status,type)
+  #pragma omp parallel for schedule(static) shared(row,status,type)
 #endif
         for (y=0; y < (long) image->rows; y++)
         {
@@ -969,7 +969,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
           ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
         image_view=AcquireCacheView(image);
 #if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 200505)
-  #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
+  #pragma omp parallel for schedule(static) shared(row,status,quantum_type)
 #endif
         for (y=0; y < (long) image->rows; y++)
         {
@@ -1212,7 +1212,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
         extent=GetQuantumExtent(image,quantum_info,quantum_type);
         image_view=AcquireCacheView(image);
 #if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 200505)
-  #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
+  #pragma omp parallel for schedule(static) shared(row,status,quantum_type)
 #endif
         for (y=0; y < (long) image->rows; y++)
         {
index 9523bf0ce57b98b5496d004572296f3c6bbdb854..de06515a35d8f454f6896f53bdd65f3e955c21fb 100644 (file)
@@ -119,7 +119,7 @@ MagickExport MagickBooleanType CycleColormapImage(Image *image,
   exception=(&image->exception);
   image_view=AcquireCacheView(image);
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(dynamic,4) shared(status)
+  #pragma omp parallel for schedule(static) shared(status)
 #endif
   for (y=0; y < (long) image->rows; y++)
   {
index 987234e30c6cbac116b75ccaafcb2e1f897178c6..a1bedbfaa5831a42106ae749c1670bd2a21fe5b4 100644 (file)
@@ -2524,7 +2524,7 @@ MagickExport MagickBooleanType TextureImage(Image *image,const Image *texture)
         Tile texture onto the image background.
       */
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(dynamic,4) shared(status)
+  #pragma omp parallel for schedule(static) shared(status)
 #endif
       for (y=0; y < (long) image->rows; y+=texture->rows)
       {
@@ -2571,7 +2571,7 @@ MagickExport MagickBooleanType TextureImage(Image *image,const Image *texture)
   image_view=AcquireCacheView(image);
   texture_view=AcquireCacheView(texture);
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-#pragma omp parallel for schedule(dynamic,4) shared(status)
+  #pragma omp parallel for schedule(static) shared(status)
 #endif
   for (y=0; y < (long) image->rows; y++)
   {
index f80f0776d06c52ac54f46664a460437fe796253e..10f0262754a02a2523fb8e4b261e59456ca00634 100644 (file)
@@ -400,7 +400,7 @@ MagickExport Image *FrameImage(const Image *image,const FrameInfo *frame_info,
     Draw sides of ornamental border.
   */
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+  #pragma omp parallel for schedule(static) shared(progress,status)
 #endif
   for (y=0; y < (long) image->rows; y++)
   {
@@ -722,7 +722,7 @@ MagickExport MagickBooleanType RaiseImage(Image *image,
   exception=(&image->exception);
   image_view=AcquireCacheView(image);
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+  #pragma omp parallel for schedule(static) shared(progress,status)
 #endif
   for (y=0; y < (long) raise_info->height; y++)
   {
index 386022c48a90cf0689797434a049e0a83f29ad87..8c48dd0b260cd9cea661915083694d626a1d2a18 100644 (file)
@@ -3185,7 +3185,7 @@ MagickExport Image *MotionBlurImageChannel(const Image *image,
   image_view=AcquireCacheView(image);
   blur_view=AcquireCacheView(blur_image);
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+  #pragma omp parallel for schedule(static) shared(progress,status)
 #endif
   for (y=0; y < (long) image->rows; y++)
   {
@@ -5164,7 +5164,7 @@ MagickExport Image *SpreadImage(const Image *image,const double radius,
   random_info=AcquireRandomInfoThreadSet();
   image_view=AcquireCacheView(spread_image);
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+  #pragma omp parallel for schedule(static) shared(progress,status)
 #endif
   for (y=0; y < (long) spread_image->rows; y++)
   {
index 114206e744628f550ac2e61211125c0956b790c4..3854ecd65a082ce3b5083767c833c0123ff05b8a 100644 (file)
@@ -1076,7 +1076,7 @@ static Image *IntegralRotateImage(const Image *image,unsigned long rotations,
       */
       GetPixelCacheTileSize(image,&tile_width,&tile_height);
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(dynamic,4) shared(progress, status)
+  #pragma omp parallel for schedule(static) shared(progress, status)
 #endif
       for (tile_y=0; tile_y < (long) image->rows; tile_y+=tile_height)
       {
@@ -1191,7 +1191,7 @@ static Image *IntegralRotateImage(const Image *image,unsigned long rotations,
         Rotate 180 degrees.
       */
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(dynamic,4) shared(progress, status)
+  #pragma omp parallel for schedule(static) shared(progress, status)
 #endif
       for (y=0; y < (long) image->rows; y++)
       {
@@ -1267,7 +1267,7 @@ static Image *IntegralRotateImage(const Image *image,unsigned long rotations,
       */
       GetPixelCacheTileSize(image,&tile_width,&tile_height);
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(dynamic,4) shared(progress, status)
+  #pragma omp parallel for schedule(static) shared(progress, status)
 #endif
       for (tile_y=0; tile_y < (long) image->rows; tile_y+=tile_height)
       {
index 3b0ae53448733b92203eaac18116c8521f287c73..ee78981f99d21afe17affee01248b526428cabba 100644 (file)
@@ -76,8 +76,8 @@
 %                                                                             %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-%  Chop() removes a region of an image and collapses the image to occupy the
-%  removed portion.
+%  ChopImage() removes a region of an image and collapses the image to occupy
+%  the removed portion.
 %
 %  The format of the ChopImage method is:
 %
@@ -110,7 +110,8 @@ MagickExport Image *ChopImage(const Image *image,const RectangleInfo *chop_info,
     y;
 
   MagickBooleanType
-    proceed;
+    proceed,
+    status;
 
   RectangleInfo
     extent;
@@ -155,10 +156,14 @@ MagickExport Image *ChopImage(const Image *image,const RectangleInfo *chop_info,
   /*
     Extract chop image.
   */
+  status=MagickTrue;
   i=0;
   j=0;
   image_view=AcquireCacheView(image);
   chop_view=AcquireCacheView(chop_image);
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+  #pragma omp parallel for schedule(static) shared(status)
+#endif
   for (y=0; y < (long) extent.y; y++)
   {
     register const PixelPacket
@@ -174,11 +179,16 @@ MagickExport Image *ChopImage(const Image *image,const RectangleInfo *chop_info,
     register PixelPacket
       *restrict q;
 
+    if (status == MagickFalse)
+      continue;
     p=GetCacheViewVirtualPixels(image_view,0,i++,image->columns,1,exception);
     q=QueueCacheViewAuthenticPixels(chop_view,0,j++,chop_image->columns,1,
       exception);
     if ((p == (const PixelPacket *) NULL) || (q == (PixelPacket *) NULL))
-      break;
+      {
+        status=MagickFalse;
+        continue;
+      }
     indexes=GetCacheViewAuthenticIndexQueue(image_view);
     chop_indexes=GetCacheViewAuthenticIndexQueue(chop_view);
     for (x=0; x < (long) image->columns; x++)
@@ -196,15 +206,18 @@ MagickExport Image *ChopImage(const Image *image,const RectangleInfo *chop_info,
       p++;
     }
     if (SyncCacheViewAuthenticPixels(chop_view,exception) == MagickFalse)
-      break;
+      status=MagickFalse;
     proceed=SetImageProgress(image,ChopImageTag,y,chop_image->rows);
     if (proceed == MagickFalse)
-      break;
+      status=MagickFalse;
   }
   /*
     Extract chop image.
   */
   i+=extent.height;
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+  #pragma omp parallel for schedule(static) shared(status)
+#endif
   for (y=0; y < (long) (image->rows-(extent.y+extent.height)); y++)
   {
     register const PixelPacket
@@ -220,11 +233,16 @@ MagickExport Image *ChopImage(const Image *image,const RectangleInfo *chop_info,
     register PixelPacket
       *restrict q;
 
+    if (status == MagickFalse)
+      continue;
     p=GetCacheViewVirtualPixels(image_view,0,i++,image->columns,1,exception);
     q=QueueCacheViewAuthenticPixels(chop_view,0,j++,chop_image->columns,1,
       exception);
     if ((p == (PixelPacket *) NULL) || (q == (PixelPacket *) NULL))
-      break;
+      {
+        status=MagickFalse;
+        continue;
+      }
     indexes=GetCacheViewAuthenticIndexQueue(image_view);
     chop_indexes=GetCacheViewAuthenticIndexQueue(chop_view);
     for (x=0; x < (long) image->columns; x++)
@@ -242,10 +260,10 @@ MagickExport Image *ChopImage(const Image *image,const RectangleInfo *chop_info,
       p++;
     }
     if (SyncCacheViewAuthenticPixels(chop_view,exception) == MagickFalse)
-      break;
+      status=MagickFalse;
     proceed=SetImageProgress(image,ChopImageTag,y,chop_image->rows);
     if (proceed == MagickFalse)
-      break;
+      status=MagickFalse;
   }
   chop_view=DestroyCacheView(chop_view);
   image_view=DestroyCacheView(image_view);
@@ -587,7 +605,7 @@ MagickExport Image *CropImage(const Image *image,const RectangleInfo *geometry,
   image_view=AcquireCacheView(image);
   crop_view=AcquireCacheView(crop_image);
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+  #pragma omp parallel for schedule(static) shared(progress,status)
 #endif
   for (y=0; y < (long) crop_image->rows; y++)
   {
@@ -896,7 +914,7 @@ MagickExport Image *FlipImage(const Image *image,ExceptionInfo *exception)
   image_view=AcquireCacheView(image);
   flip_view=AcquireCacheView(flip_image);
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+  #pragma omp parallel for schedule(static) shared(progress,status)
 #endif
   for (y=0; y < (long) flip_image->rows; y++)
   {
@@ -1014,7 +1032,7 @@ MagickExport Image *FlopImage(const Image *image,ExceptionInfo *exception)
   image_view=AcquireCacheView(image);
   flop_view=AcquireCacheView(flop_image);
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
-  #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+  #pragma omp parallel for schedule(static) shared(progress,status)
 #endif
   for (y=0; y < (long) flop_image->rows; y++)
   {