static inline void PrefetchPixelCacheNexusPixels(const NexusInfo *nexus_info,
const MapMode mode)
{
+ if (nexus_info->length < CACHE_LINE_SIZE)
+ return;
if (mode == ReadMode)
{
- MagickCachePrefetch((unsigned char *) nexus_info->pixels,0,1);
+ MagickCachePrefetch((unsigned char *) nexus_info->pixels+CACHE_LINE_SIZE,
+ 0,1);
return;
}
- MagickCachePrefetch((unsigned char *) nexus_info->pixels,1,1);
+ MagickCachePrefetch((unsigned char *) nexus_info->pixels+CACHE_LINE_SIZE,1,1);
}
static Quantum *SetPixelCacheNexusPixels(const CacheInfo *cache_info,
assert(cache_info->signature == MagickCoreSignature);
if (cache_info->type == UndefinedCache)
return((Quantum *) NULL);
+ (void) memset(&nexus_info->region,0,sizeof(nexus_info->region));
if (((cache_info->type == MemoryCache) || (cache_info->type == MapCache)) &&
(buffered == MagickFalse))
{
cache_info->number_channels*sizeof(*nexus_info->pixels);
if (cache_info->metacontent_extent != 0)
length+=number_pixels*cache_info->metacontent_extent;
+ status=MagickTrue;
if (nexus_info->cache == (Quantum *) NULL)
- {
- status=AcquireCacheNexusPixels(cache_info,length,nexus_info,exception);
- if (status == MagickFalse)
- {
- (void) memset(&nexus_info->region,0,sizeof(nexus_info->region));
- return((Quantum *) NULL);
- }
- }
+ status=AcquireCacheNexusPixels(cache_info,length,nexus_info,exception);
else
if (nexus_info->length < length)
{
RelinquishCacheNexusPixels(nexus_info);
status=AcquireCacheNexusPixels(cache_info,length,nexus_info,exception);
- if (status == MagickFalse)
- {
- (void) memset(&nexus_info->region,0,sizeof(nexus_info->region));
- return((Quantum *) NULL);
- }
}
+ if (status == MagickFalse)
+ return((Quantum *) NULL);
nexus_info->pixels=nexus_info->cache;
nexus_info->metacontent=(void *) NULL;
if (cache_info->metacontent_extent != 0)
geometry_info->sigma=2.0;
}
if (((flags & SigmaValue) == 0) && ((flags & XiValue) != 0) &&
- ((flags & PsiValue) == 0))
+ ((flags & XiNegative) != 0))
{
- /*
- Support negative height values (e.g. 30x-20).
- */
- geometry_info->sigma=geometry_info->xi;
- geometry_info->xi=0.0;
- flags|=SigmaValue;
- flags&=(~XiValue);
+ if ((flags & PsiValue) == 0)
+ {
+ /*
+ Support negative height values (e.g. 30x-20).
+ */
+ geometry_info->sigma=geometry_info->xi;
+ geometry_info->xi=0.0;
+ flags|=SigmaValue;
+ flags&=(~XiValue);
+ }
+ else
+ if ((flags & ChiValue) == 0)
+ {
+ /*
+ Support negative height values (e.g. 30x-20+10).
+ */
+ geometry_info->sigma=geometry_info->xi;
+ geometry_info->xi=geometry_info->psi;
+ flags|=SigmaValue;
+ flags|=XiValue;
+ flags&=(~PsiValue);
+ }
+ else
+ {
+ /*
+ Support negative height values (e.g. 30x-20+10+10).
+ */
+ geometry_info->sigma=geometry_info->xi;
+ geometry_info->xi=geometry_info->psi;
+ geometry_info->psi=geometry_info->chi;
+ flags|=SigmaValue;
+ flags|=XiValue;
+ flags|=PsiValue;
+ flags&=(~ChiValue);
+ }
}
if ((flags & PercentValue) != 0)
{