*evaluate_image;
MagickBooleanType
+ concurrent,
status;
MagickOffsetType
if ((next->columns != images->columns) || (next->rows != images->rows))
{
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
- "ImageWidthsOrHeightsDiffer","`%s'",images->filename);
+ "ImageWidthsOrHeightsDiffer","'%s'",images->filename);
return((Image *) NULL);
}
/*
{
evaluate_image=DestroyImage(evaluate_image);
(void) ThrowMagickException(exception,GetMagickModule(),
- ResourceLimitError,"MemoryAllocationFailed","`%s'",images->filename);
+ ResourceLimitError,"MemoryAllocationFailed","'%s'",images->filename);
return((Image *) NULL);
}
/*
status=MagickTrue;
progress=0;
random_info=AcquireRandomInfoThreadSet();
- evaluate_view=AcquireCacheView(evaluate_image);
+ concurrent=GetRandomSecretKey(random_info[0]) == ~0UL ? MagickTrue :
+ MagickFalse;
+ evaluate_view=AcquireAuthenticCacheView(evaluate_image,exception);
if (op == MedianEvaluateOperator)
{
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(static) shared(progress,status)
+ #pragma omp parallel for schedule(static) shared(progress,status) omp_concurrent(concurrent)
#endif
for (y=0; y < (ssize_t) evaluate_image->rows; y++)
{
register ssize_t
i;
- image_view=AcquireCacheView(next);
+ image_view=AcquireVirtualCacheView(next,exception);
p=GetCacheViewVirtualPixels(image_view,x,y,1,1,exception);
if (p == (const Quantum *) NULL)
{
else
{
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(static) shared(progress,status)
+ #pragma omp parallel for schedule(static) shared(progress,status) omp_concurrent(concurrent)
#endif
for (y=0; y < (ssize_t) evaluate_image->rows; y++)
{
register const Quantum
*p;
- image_view=AcquireCacheView(next);
+ image_view=AcquireVirtualCacheView(next,exception);
p=GetCacheViewVirtualPixels(image_view,0,y,next->columns,1,exception);
if (p == (const Quantum *) NULL)
{
*image_view;
MagickBooleanType
+ concurrent,
status;
MagickOffsetType
status=MagickTrue;
progress=0;
random_info=AcquireRandomInfoThreadSet();
- image_view=AcquireCacheView(image);
+ concurrent=GetRandomSecretKey(random_info[0]) == ~0UL ? MagickTrue :
+ MagickFalse;
+ image_view=AcquireAuthenticCacheView(image,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(static,4) shared(progress,status)
+ #pragma omp parallel for schedule(static,4) shared(progress,status) omp_concurrent(concurrent)
#endif
for (y=0; y < (ssize_t) image->rows; y++)
{
traits=GetPixelChannelMapTraits(image,channel);
if (traits == UndefinedPixelTrait)
continue;
+ if ((traits & CopyPixelTrait) != 0)
+ continue;
q[i]=ClampToQuantum(ApplyEvaluateOperator(random_info[id],q[i],op,
value));
}
return(MagickFalse);
status=MagickTrue;
progress=0;
- image_view=AcquireCacheView(image);
+ image_view=AcquireAuthenticCacheView(image,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static,4) shared(progress,status)
#endif
sum_squares=0.0;
sum_cubes=0.0;
sum_fourth_power=0.0;
- image_view=AcquireCacheView(image);
+ image_view=AcquireVirtualCacheView(image,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static) shared(status)
#endif
status=MagickTrue;
*maxima=(-MagickHuge);
*minima=MagickHuge;
- image_view=AcquireCacheView(image);
+ image_view=AcquireVirtualCacheView(image,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static) shared(status)
#endif
(MagickMax(height,1)/2L)+GetPixelChannels(image)*(MagickMax(width,1)/2L);
status=MagickTrue;
progress=0;
- image_view=AcquireCacheView(image);
- statistic_view=AcquireCacheView(statistic_image);
+ image_view=AcquireVirtualCacheView(image,exception);
+ statistic_view=AcquireAuthenticCacheView(statistic_image,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static,4) shared(progress,status)
#endif
register ssize_t
i;
+ if (GetPixelMask(image,p) != 0)
+ {
+ p+=GetPixelChannels(image);
+ q+=GetPixelChannels(statistic_image);
+ continue;
+ }
for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
{
PixelChannel
if ((traits == UndefinedPixelTrait) ||
(statistic_traits == UndefinedPixelTrait))
continue;
- if (((statistic_traits & CopyPixelTrait) != 0) ||
- (GetPixelMask(image,p) != 0))
+ if ((statistic_traits & CopyPixelTrait) != 0)
{
SetPixelChannel(statistic_image,channel,p[center+i],q);
continue;