Lines Matching refs:quantum_info
117 *quantum_info; in AcquireQuantumInfo() local
119 quantum_info=(QuantumInfo *) AcquireCriticalMemory(sizeof(*quantum_info)); in AcquireQuantumInfo()
120 quantum_info->signature=MagickCoreSignature; in AcquireQuantumInfo()
121 GetQuantumInfo(image_info,quantum_info); in AcquireQuantumInfo()
123 return(quantum_info); in AcquireQuantumInfo()
124 status=SetQuantumDepth(image,quantum_info,image->depth); in AcquireQuantumInfo()
125 quantum_info->endian=image->endian; in AcquireQuantumInfo()
127 quantum_info=DestroyQuantumInfo(quantum_info); in AcquireQuantumInfo()
128 return(quantum_info); in AcquireQuantumInfo()
156 static MagickBooleanType AcquireQuantumPixels(QuantumInfo *quantum_info, in AcquireQuantumPixels() argument
162 assert(quantum_info != (QuantumInfo *) NULL); in AcquireQuantumPixels()
163 assert(quantum_info->signature == MagickCoreSignature); in AcquireQuantumPixels()
164 quantum_info->number_threads=(size_t) GetMagickResourceLimit(ThreadResource); in AcquireQuantumPixels()
165 quantum_info->pixels=(MemoryInfo **) AcquireQuantumMemory( in AcquireQuantumPixels()
166 quantum_info->number_threads,sizeof(*quantum_info->pixels)); in AcquireQuantumPixels()
167 if (quantum_info->pixels == (MemoryInfo **) NULL) in AcquireQuantumPixels()
169 quantum_info->extent=extent; in AcquireQuantumPixels()
170 (void) memset(quantum_info->pixels,0,quantum_info->number_threads* in AcquireQuantumPixels()
171 sizeof(*quantum_info->pixels)); in AcquireQuantumPixels()
172 for (i=0; i < (ssize_t) quantum_info->number_threads; i++) in AcquireQuantumPixels()
177 quantum_info->pixels[i]=AcquireVirtualMemory((extent+1),sizeof(*pixels)); in AcquireQuantumPixels()
178 if (quantum_info->pixels[i] == (MemoryInfo *) NULL) in AcquireQuantumPixels()
180 DestroyQuantumPixels(quantum_info); in AcquireQuantumPixels()
183 pixels=(unsigned char *) GetVirtualMemoryBlob(quantum_info->pixels[i]); in AcquireQuantumPixels()
213 MagickExport QuantumInfo *DestroyQuantumInfo(QuantumInfo *quantum_info) in DestroyQuantumInfo() argument
215 assert(quantum_info != (QuantumInfo *) NULL); in DestroyQuantumInfo()
216 assert(quantum_info->signature == MagickCoreSignature); in DestroyQuantumInfo()
217 if (quantum_info->pixels != (MemoryInfo **) NULL) in DestroyQuantumInfo()
218 DestroyQuantumPixels(quantum_info); in DestroyQuantumInfo()
219 if (quantum_info->semaphore != (SemaphoreInfo *) NULL) in DestroyQuantumInfo()
220 RelinquishSemaphoreInfo(&quantum_info->semaphore); in DestroyQuantumInfo()
221 quantum_info->signature=(~MagickCoreSignature); in DestroyQuantumInfo()
222 quantum_info=(QuantumInfo *) RelinquishMagickMemory(quantum_info); in DestroyQuantumInfo()
223 return(quantum_info); in DestroyQuantumInfo()
248 static void DestroyQuantumPixels(QuantumInfo *quantum_info) in DestroyQuantumPixels() argument
256 assert(quantum_info != (QuantumInfo *) NULL); in DestroyQuantumPixels()
257 assert(quantum_info->signature == MagickCoreSignature); in DestroyQuantumPixels()
258 assert(quantum_info->pixels != (MemoryInfo **) NULL); in DestroyQuantumPixels()
259 extent=(ssize_t) quantum_info->extent; in DestroyQuantumPixels()
260 for (i=0; i < (ssize_t) quantum_info->number_threads; i++) in DestroyQuantumPixels()
261 if (quantum_info->pixels[i] != (MemoryInfo *) NULL) in DestroyQuantumPixels()
269 pixels=(unsigned char *) GetVirtualMemoryBlob(quantum_info->pixels[i]); in DestroyQuantumPixels()
271 quantum_info->pixels[i]=RelinquishVirtualMemory( in DestroyQuantumPixels()
272 quantum_info->pixels[i]); in DestroyQuantumPixels()
274 quantum_info->pixels=(MemoryInfo **) RelinquishMagickMemory( in DestroyQuantumPixels()
275 quantum_info->pixels); in DestroyQuantumPixels()
307 const QuantumInfo *quantum_info,const QuantumType quantum_type) in GetQuantumExtent() argument
312 assert(quantum_info != (QuantumInfo *) NULL); in GetQuantumExtent()
313 assert(quantum_info->signature == MagickCoreSignature); in GetQuantumExtent()
331 if (quantum_info->pack == MagickFalse) in GetQuantumExtent()
332 return((size_t) (packet_size*image->columns*((quantum_info->depth+7)/8))); in GetQuantumExtent()
333 return((size_t) ((packet_size*image->columns*quantum_info->depth+7)/8)); in GetQuantumExtent()
358 MagickExport EndianType GetQuantumEndian(const QuantumInfo *quantum_info) in GetQuantumEndian() argument
360 assert(quantum_info != (QuantumInfo *) NULL); in GetQuantumEndian()
361 assert(quantum_info->signature == MagickCoreSignature); in GetQuantumEndian()
362 return(quantum_info->endian); in GetQuantumEndian()
387 MagickExport QuantumFormatType GetQuantumFormat(const QuantumInfo *quantum_info) in GetQuantumFormat() argument
389 assert(quantum_info != (QuantumInfo *) NULL); in GetQuantumFormat()
390 assert(quantum_info->signature == MagickCoreSignature); in GetQuantumFormat()
391 return(quantum_info->format); in GetQuantumFormat()
419 QuantumInfo *quantum_info) in GetQuantumInfo() argument
424 assert(quantum_info != (QuantumInfo *) NULL); in GetQuantumInfo()
425 (void) memset(quantum_info,0,sizeof(*quantum_info)); in GetQuantumInfo()
426 quantum_info->quantum=8; in GetQuantumInfo()
427 quantum_info->maximum=1.0; in GetQuantumInfo()
428 quantum_info->scale=QuantumRange; in GetQuantumInfo()
429 quantum_info->pack=MagickTrue; in GetQuantumInfo()
430 quantum_info->semaphore=AcquireSemaphoreInfo(); in GetQuantumInfo()
431 quantum_info->signature=MagickCoreSignature; in GetQuantumInfo()
436 quantum_info->format=(QuantumFormatType) ParseCommandOption( in GetQuantumInfo()
440 quantum_info->minimum=StringToDouble(option,(char **) NULL); in GetQuantumInfo()
443 quantum_info->maximum=StringToDouble(option,(char **) NULL); in GetQuantumInfo()
444 if ((quantum_info->minimum == 0.0) && (quantum_info->maximum == 0.0)) in GetQuantumInfo()
445 quantum_info->scale=0.0; in GetQuantumInfo()
447 if (quantum_info->minimum == quantum_info->maximum) in GetQuantumInfo()
449 quantum_info->scale=(double) QuantumRange/quantum_info->minimum; in GetQuantumInfo()
450 quantum_info->minimum=0.0; in GetQuantumInfo()
453 quantum_info->scale=(double) QuantumRange/(quantum_info->maximum- in GetQuantumInfo()
454 quantum_info->minimum); in GetQuantumInfo()
457 quantum_info->scale=StringToDouble(option,(char **) NULL); in GetQuantumInfo()
460 quantum_info->min_is_white=LocaleCompare(option,"min-is-white") == 0 ? in GetQuantumInfo()
462 quantum_info->endian=image_info->endian; in GetQuantumInfo()
463 ResetQuantumState(quantum_info); in GetQuantumInfo()
489 MagickExport unsigned char *GetQuantumPixels(const QuantumInfo *quantum_info) in GetQuantumPixels() argument
494 assert(quantum_info != (QuantumInfo *) NULL); in GetQuantumPixels()
495 assert(quantum_info->signature == MagickCoreSignature); in GetQuantumPixels()
496 return((unsigned char *) GetVirtualMemoryBlob(quantum_info->pixels[id])); in GetQuantumPixels()
579 MagickPrivate void ResetQuantumState(QuantumInfo *quantum_info) in ResetQuantumState() argument
592 assert(quantum_info != (QuantumInfo *) NULL); in ResetQuantumState()
593 assert(quantum_info->signature == MagickCoreSignature); in ResetQuantumState()
594 quantum_info->state.inverse_scale=1.0; in ResetQuantumState()
595 if (fabs(quantum_info->scale) >= MagickEpsilon) in ResetQuantumState()
596 quantum_info->state.inverse_scale/=quantum_info->scale; in ResetQuantumState()
597 quantum_info->state.pixel=0U; in ResetQuantumState()
598 quantum_info->state.bits=0U; in ResetQuantumState()
599 quantum_info->state.mask=mask; in ResetQuantumState()
627 MagickExport void SetQuantumAlphaType(QuantumInfo *quantum_info, in SetQuantumAlphaType() argument
630 assert(quantum_info != (QuantumInfo *) NULL); in SetQuantumAlphaType()
631 assert(quantum_info->signature == MagickCoreSignature); in SetQuantumAlphaType()
632 quantum_info->alpha_type=type; in SetQuantumAlphaType()
663 QuantumInfo *quantum_info,const size_t depth) in SetQuantumDepth() argument
676 assert(quantum_info != (QuantumInfo *) NULL); in SetQuantumDepth()
677 assert(quantum_info->signature == MagickCoreSignature); in SetQuantumDepth()
678 quantum_info->depth=depth; in SetQuantumDepth()
679 if (quantum_info->format == FloatingPointQuantumFormat) in SetQuantumDepth()
681 if (quantum_info->depth > 32) in SetQuantumDepth()
682 quantum_info->depth=64; in SetQuantumDepth()
684 if (quantum_info->depth > 16) in SetQuantumDepth()
685 quantum_info->depth=32; in SetQuantumDepth()
687 quantum_info->depth=16; in SetQuantumDepth()
689 if (quantum_info->pixels != (MemoryInfo **) NULL) in SetQuantumDepth()
690 DestroyQuantumPixels(quantum_info); in SetQuantumDepth()
691 quantum=(quantum_info->pad+MaxPixelChannels)*(quantum_info->depth+7)/8; in SetQuantumDepth()
696 return(AcquireQuantumPixels(quantum_info,extent)); in SetQuantumDepth()
727 QuantumInfo *quantum_info,const EndianType endian) in SetQuantumEndian() argument
733 assert(quantum_info != (QuantumInfo *) NULL); in SetQuantumEndian()
734 assert(quantum_info->signature == MagickCoreSignature); in SetQuantumEndian()
735 quantum_info->endian=endian; in SetQuantumEndian()
736 return(SetQuantumDepth(image,quantum_info,quantum_info->depth)); in SetQuantumEndian()
767 QuantumInfo *quantum_info,const QuantumFormatType format) in SetQuantumFormat() argument
773 assert(quantum_info != (QuantumInfo *) NULL); in SetQuantumFormat()
774 assert(quantum_info->signature == MagickCoreSignature); in SetQuantumFormat()
775 quantum_info->format=format; in SetQuantumFormat()
776 return(SetQuantumDepth(image,quantum_info,quantum_info->depth)); in SetQuantumFormat()
871 MagickExport void SetQuantumPack(QuantumInfo *quantum_info, in SetQuantumPack() argument
874 assert(quantum_info != (QuantumInfo *) NULL); in SetQuantumPack()
875 assert(quantum_info->signature == MagickCoreSignature); in SetQuantumPack()
876 quantum_info->pack=pack; in SetQuantumPack()
907 QuantumInfo *quantum_info,const size_t pad) in SetQuantumPad() argument
913 assert(quantum_info != (QuantumInfo *) NULL); in SetQuantumPad()
914 assert(quantum_info->signature == MagickCoreSignature); in SetQuantumPad()
915 quantum_info->pad=pad; in SetQuantumPad()
916 return(SetQuantumDepth(image,quantum_info,quantum_info->depth)); in SetQuantumPad()
944 MagickExport void SetQuantumMinIsWhite(QuantumInfo *quantum_info, in SetQuantumMinIsWhite() argument
947 assert(quantum_info != (QuantumInfo *) NULL); in SetQuantumMinIsWhite()
948 assert(quantum_info->signature == MagickCoreSignature); in SetQuantumMinIsWhite()
949 quantum_info->min_is_white=min_is_white; in SetQuantumMinIsWhite()
977 MagickExport void SetQuantumQuantum(QuantumInfo *quantum_info, in SetQuantumQuantum() argument
980 assert(quantum_info != (QuantumInfo *) NULL); in SetQuantumQuantum()
981 assert(quantum_info->signature == MagickCoreSignature); in SetQuantumQuantum()
982 quantum_info->quantum=quantum; in SetQuantumQuantum()
1009 MagickExport void SetQuantumScale(QuantumInfo *quantum_info,const double scale) in SetQuantumScale() argument
1011 assert(quantum_info != (QuantumInfo *) NULL); in SetQuantumScale()
1012 assert(quantum_info->signature == MagickCoreSignature); in SetQuantumScale()
1013 quantum_info->scale=scale; in SetQuantumScale()