diff --git a/coders/dpx.c b/coders/dpx.c
index 15129fc..1877b3d 100644
--- a/coders/dpx.c
+++ b/coders/dpx.c
@@ -539,9 +539,6 @@
static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
- CacheView
- *image_view;
-
char
magick[4],
value[MaxTextExtent];
@@ -1079,10 +1076,6 @@
SetQuantumQuantum(quantum_info,32);
SetQuantumPack(quantum_info,dpx.image.image_element[0].packing == 0 ?
MagickTrue : MagickFalse);
- image_view=AcquireCacheView(image);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
-#endif
for (y=0; y < (long) image->rows; y++)
{
long
@@ -1106,9 +1099,6 @@
if (status == MagickFalse)
continue;
pixels=GetQuantumPixels(quantum_info);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp critical (MagickCore_ReadDPXImage)
-#endif
{
count=ReadBlob(image,extent,pixels);
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
@@ -1125,20 +1115,18 @@
}
if (count != (ssize_t) extent)
status=MagickFalse;
- q=QueueCacheViewAuthenticPixels(image_view,0,offset,image->columns,1,
- exception);
+ q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
if (q == (PixelPacket *) NULL)
{
status=MagickFalse;
continue;
}
- length=ImportQuantumPixels(image,image_view,quantum_info,quantum_type,
- pixels,exception);
- sync=SyncCacheViewAuthenticPixels(image_view,exception);
+ length=ImportQuantumPixels(image,(const CacheView *) NULL,quantum_info,
+ quantum_type,pixels,exception);
+ sync=SyncAuthenticPixels(image,exception);
if (sync == MagickFalse)
status=MagickFalse;
}
- image_view=DestroyCacheView(image_view);
quantum_info=DestroyQuantumInfo(quantum_info);
if (status == MagickFalse)
ThrowReaderException(CorruptImageError,"UnableToReadImageData");
diff --git a/coders/hald.c b/coders/hald.c
index a800d2d..47bc79a 100644
--- a/coders/hald.c
+++ b/coders/hald.c
@@ -102,9 +102,6 @@
cube_size,
level;
- CacheView
- *image_view;
-
/*
Create HALD color lookup table image.
*/
@@ -125,10 +122,6 @@
cube_size=level*level;
image->columns=(unsigned long) (level*cube_size);
image->rows=(unsigned long) (level*cube_size);
- image_view=AcquireCacheView(image);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp parallel for shared(status)
-#endif
for (y=0; y < (long) image->rows; y+=(long) level)
{
long
@@ -141,8 +134,8 @@
if (status == MagickFalse)
continue;
- q=QueueCacheViewAuthenticPixels(image_view,0,y,image->columns,
- (unsigned long) level,exception);
+ q=QueueAuthenticPixels(image,0,y,image->columns,(unsigned long) level,
+ exception);
if (q == (PixelPacket *) NULL)
{
status=MagickFalse;
@@ -160,10 +153,9 @@
q++;
}
}
- if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
+ if (SyncAuthenticPixels(image,exception) == MagickFalse)
status=MagickFalse;
}
- image_view=DestroyCacheView(image_view);
return(GetFirstImageInList(image));
}
diff --git a/coders/pnm.c b/coders/pnm.c
index fb048c6..f3120eb 100644
--- a/coders/pnm.c
+++ b/coders/pnm.c
@@ -265,9 +265,6 @@
depth,
max_value;
- CacheView
- *image_view;
-
/*
Open image file.
*/
@@ -593,10 +590,6 @@
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
SetQuantumMinIsWhite(quantum_info,MagickTrue);
extent=GetQuantumExtent(image,quantum_info,quantum_type);
- image_view=AcquireCacheView(image);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
-#endif
for (y=0; y < (long) image->rows; y++)
{
long
@@ -620,9 +613,6 @@
if (status == MagickFalse)
continue;
pixels=GetQuantumPixels(quantum_info);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp critical (MagickCore_ReadPNMImage)
-#endif
{
count=ReadBlob(image,extent,pixels);
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
@@ -639,22 +629,20 @@
}
if (count != (ssize_t) extent)
status=MagickFalse;
- q=QueueCacheViewAuthenticPixels(image_view,0,offset,image->columns,1,
- exception);
+ q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
if (q == (PixelPacket *) NULL)
{
status=MagickFalse;
continue;
}
- length=ImportQuantumPixels(image,image_view,quantum_info,quantum_type,
- pixels,exception);
+ length=ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ quantum_type,pixels,exception);
if (length != extent)
status=MagickFalse;
- sync=SyncCacheViewAuthenticPixels(image_view,exception);
+ sync=SyncAuthenticPixels(image,exception);
if (sync == MagickFalse)
status=MagickFalse;
}
- image_view=DestroyCacheView(image_view);
quantum_info=DestroyQuantumInfo(quantum_info);
if (status == MagickFalse)
ThrowReaderException(CorruptImageError,"UnableToReadImageData");
@@ -675,10 +663,6 @@
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
- image_view=AcquireCacheView(image);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
-#endif
for (y=0; y < (long) image->rows; y++)
{
long
@@ -705,9 +689,6 @@
if (status == MagickFalse)
continue;
pixels=GetQuantumPixels(quantum_info);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp critical (MagickCore_ReadPNMImage)
-#endif
{
count=ReadBlob(image,extent,pixels);
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
@@ -724,8 +705,7 @@
}
if (count != (ssize_t) extent)
status=MagickFalse;
- q=QueueCacheViewAuthenticPixels(image_view,0,offset,image->columns,1,
- exception);
+ q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
if (q == (PixelPacket *) NULL)
{
status=MagickFalse;
@@ -733,7 +713,7 @@
}
p=pixels;
if ((image->depth == 8) || (image->depth == 16))
- (void) ImportQuantumPixels(image,image_view,quantum_info,
+ (void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
quantum_type,pixels,exception);
else
if (image->depth <= 8)
@@ -764,11 +744,10 @@
q++;
}
}
- sync=SyncCacheViewAuthenticPixels(image_view,exception);
+ sync=SyncAuthenticPixels(image,exception);
if (sync == MagickFalse)
status=MagickFalse;
}
- image_view=DestroyCacheView(image_view);
quantum_info=DestroyQuantumInfo(quantum_info);
if (status == MagickFalse)
ThrowReaderException(CorruptImageError,"UnableToReadImageData");
@@ -793,10 +772,6 @@
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
- image_view=AcquireCacheView(image);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp parallel for schedule(static,1) shared(row,status,type)
-#endif
for (y=0; y < (long) image->rows; y++)
{
long
@@ -823,9 +798,6 @@
if (status == MagickFalse)
continue;
pixels=GetQuantumPixels(quantum_info);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp critical (MagickCore_ReadPNMImage)
-#endif
{
count=ReadBlob(image,extent,pixels);
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
@@ -842,8 +814,7 @@
}
if (count != (ssize_t) extent)
status=MagickFalse;
- q=QueueCacheViewAuthenticPixels(image_view,0,offset,image->columns,1,
- exception);
+ q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
if (q == (PixelPacket *) NULL)
{
status=MagickFalse;
@@ -914,8 +885,7 @@
}
if ((type == BilevelType) || (type == GrayscaleType))
{
- q=QueueCacheViewAuthenticPixels(image_view,0,offset,
- image->columns,1,exception);
+ q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
for (x=0; x < (long) image->columns; x++)
{
if ((type == BilevelType) &&
@@ -929,11 +899,10 @@
q++;
}
}
- sync=SyncCacheViewAuthenticPixels(image_view,exception);
+ sync=SyncAuthenticPixels(image,exception);
if (sync == MagickFalse)
status=MagickFalse;
}
- image_view=DestroyCacheView(image_view);
quantum_info=DestroyQuantumInfo(quantum_info);
if (status == MagickFalse)
ThrowReaderException(CorruptImageError,"UnableToReadImageData");
@@ -982,10 +951,6 @@
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
- image_view=AcquireCacheView(image);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
-#endif
for (y=0; y < (long) image->rows; y++)
{
long
@@ -1012,9 +977,6 @@
if (status == MagickFalse)
continue;
pixels=GetQuantumPixels(quantum_info);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp critical (MagickCore_ReadPNMImage)
-#endif
{
count=ReadBlob(image,extent,pixels);
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
@@ -1031,17 +993,16 @@
}
if (count != (ssize_t) extent)
status=MagickFalse;
- q=QueueCacheViewAuthenticPixels(image_view,0,offset,image->columns,1,
- exception);
+ q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
if (q == (PixelPacket *) NULL)
{
status=MagickFalse;
continue;
}
- indexes=GetCacheViewAuthenticIndexQueue(image_view);
+ indexes=GetAuthenticIndexQueue(image);
p=pixels;
if ((image->depth == 8) || (image->depth == 16))
- (void) ImportQuantumPixels(image,image_view,quantum_info,
+ (void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
quantum_type,pixels,exception);
else
switch (quantum_type)
@@ -1193,11 +1154,10 @@
break;
}
}
- sync=SyncCacheViewAuthenticPixels(image_view,exception);
+ sync=SyncAuthenticPixels(image,exception);
if (sync == MagickFalse)
status=MagickFalse;
}
- image_view=DestroyCacheView(image_view);
quantum_info=DestroyQuantumInfo(quantum_info);
if (status == MagickFalse)
ThrowReaderException(CorruptImageError,"UnableToReadImageData");
@@ -1225,10 +1185,6 @@
SetQuantumScale(quantum_info,(MagickRealType) QuantumRange*
fabs(quantum_scale));
extent=GetQuantumExtent(image,quantum_info,quantum_type);
- image_view=AcquireCacheView(image);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp parallel for schedule(static,1) shared(row,status,quantum_type)
-#endif
for (y=0; y < (long) image->rows; y++)
{
long
@@ -1252,9 +1208,6 @@
if (status == MagickFalse)
continue;
pixels=GetQuantumPixels(quantum_info);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) && (_OPENMP > 202001)
- #pragma omp critical (MagickCore_ReadPNMImage)
-#endif
{
count=ReadBlob(image,extent,pixels);
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
@@ -1271,22 +1224,21 @@
}
if ((size_t) count != extent)
status=MagickFalse;
- q=QueueCacheViewAuthenticPixels(image_view,0,(long) (image->rows-
- offset-1),image->columns,1,exception);
+ q=QueueAuthenticPixels(image,0,(long) (image->rows-offset-1),
+ image->columns,1,exception);
if (q == (PixelPacket *) NULL)
{
status=MagickFalse;
continue;
}
- length=ImportQuantumPixels(image,image_view,quantum_info,quantum_type,
- pixels,exception);
+ length=ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ quantum_type,pixels,exception);
if (length != extent)
status=MagickFalse;
- sync=SyncCacheViewAuthenticPixels(image_view,exception);
+ sync=SyncAuthenticPixels(image,exception);
if (sync == MagickFalse)
status=MagickFalse;
}
- image_view=DestroyCacheView(image_view);
quantum_info=DestroyQuantumInfo(quantum_info);
if (status == MagickFalse)
ThrowReaderException(CorruptImageError,"UnableToReadImageData");