These conversion routines convert planar 8-bit buffers to packed (interleaved) 4-channel floating point format.
The meaning of
min here is substantially the same as for the
v function. The difference is that since this is a four-channel image, we use four-channel min and max values so that different mins and maxes can be used for each channel. The channels in
max are in the same order as the output pixels. If the
max parameter is less than the
min parameter, the image will come out looking like a photographic negative.
(That is, you get a free contrast + brightness adjustment as part of this conversion.)
v function is the workhorse of this family. The other three are provided as a convenience. You can actually substitute any of the channels with a constant by replacing the
v passed in for that channel with one from another color channel, and set maxFloat.color = minFloat.color = desired color for that channel. (In the particular case where you want all four-channels to be constant, call
Likewise, although these API names appear to correspond to particular color channel orders, vImage has no way of knowing what is actually red or green or cyan, so you can use them for other color spaces and other packing orders. Thus,
v should be properly considered a somewhat colorspace-agnostic <=4-planar 8-bit channel to 4-channel packed-float conversion function.
Performance data on Intel Core2 and G5 suggest that like most simple conversion functions, these functions only perform well if the data is already in the cache.
Optimum tile sizes are between ~200 pixels and somewhere in the 50,000 to 200,000 pixel range, depending on cache size. If the image is larger than that, this function is limited by the throughput of the machine's front side bus and will run anywhere from 3 to 10 times slower. For well sized images / times, we observe that the vector code is 3-12x faster than scalar code. For images that don't fit in cache or that are not in cache, the vector code is perhaps only 10% faster than scalar.
Returns 0. Does no work.
Disables internal multithreading, if any.
Other flags cause the function to return