Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference
Color Twist
Color twist conversion functions use values of all color channels of a source pixel to compute the resultant destination channel value. The destination channel value is obtained as the result of multiplying the corresponding row of the color-twist matrix by the vector of source pixel channel values.
For example, if (r,g,b) is a source pixel, then the destination pixel values (R,G,B) are computed as follows:
R = t11 * r + t 12 * g + t 13 * b + t 14
G = t21 * r + t 22 * g + t 23 * b + t 24
B = t31 * r + t 32 * g + t 33 * b + t 343
where

is the color twist matrix. The color twist matrix used by the Intel IPP functions is a matrix of size 3x4, or 4x4 with floating-point elements. The matrix elements are specific for each particular type of color conversion.