Function

vImageMatrixMultiply_ARGBFFFF

Operates on an interleaved floating-point source image, multiplying each pixel by the provided matrix to produce an interleaved floating-point destination image.

Declaration

vImage_Error vImageMatrixMultiply_ARGBFFFF(const vImage_Buffer *src, const vImage_Buffer *dest, const float matrix[16], const float *pre_bias, const float *post_bias, vImage_Flags flags);

Parameters

src

A pointer to a vImage buffer structure that contains the source image.

dest

A pointer to a vImage buffer data structure. You are responsible for filling out the height, width, and rowBytes fields of this structure, and for allocating a data buffer of the appropriate size. On return, the data buffer pointed to by this structure contains the destination image data. When you no longer need the data buffer, you must deallocate the memory.

matrix

A 1D array whose values represent a 4x4 matrix. vImage multiplies each source pixel by this matrix to produce a destination pixel.

pre_bias

A packed array of bias values, one for each source plane. vImage adds the appropriate bias value to each source value before matrix multiplication. If you don't want to apply a preprocessing bias value, pass NULL.

post_bias

A packed array of bias values, one for each destination plane. vImage adds the appropriate bias value to each destination value after matrix multiplication. If you don't want to apply a preprocessing bias value, pass NULL.

flags

Reserved for future use; pass 0.

Return Value

kvImageNoError; otherwise, one of the error codes described in Data Types and Constants.

Discussion

The operation is the same as vImageMatrixMultiply_ARGB8888 except that floating-point values are used and there is no divisor.

This function uses 32-bit signed accumulators. If the sum over any matrix column is greater than ±2²³, overflow may occur. Generally speaking, this won't happen because the matrix elements are 16-bit integers, so it would take more than 256 source planes to cause problems.

See Also

Multiplying Pixels by a Matrix

vImageMatrixMultiply_Planar8

Operates on a set of 8-bit source image planes, multiplying each pixel by the provided matrix to produce a set of 8-bit destination image planes.

vImageMatrixMultiply_Planar16S

Operates on a set of 16-bit source image planes, multiplying each pixel by the provided matrix to produce a set of 16-bit destination image planes.

vImageMatrixMultiply_PlanarF

Operates on a set of floating-point source image planes, multiplying each pixel by the provided matrix to produce a set of floating-point destination image planes.

vImageMatrixMultiply_ARGB8888

Operates on an interleaved 8-bit source image, multiplying each pixel by the provided matrix to produce an interleaved 8-bit destination image.

vImageMatrixMultiply_ARGB8888ToPlanar8

Operates on an interleaved 8-bit source image, multiplying each pixel by the provided matrix to produce a one-channel 8-bit destination image.

vImageMatrixMultiply_ARGBFFFFToPlanarF

Operates on an interleaved 32-bit source image, multiplying each pixel by the provided matrix to produce a one-channel 32-bit destination image.