Module Documentation
FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A
169
11.17.3.4 typedef MM_FLOAT Mat4x4[16]
Matrix with 4 columns and 4 rows for perspective geometry operations including z calculation. The Mat4x4 matrix is
defined in the following order
�
m[0] m[4] m[8] m[12]
m[1] m[5] m[9] m[13]
m[2] m[6] m[10] m[14]
m[3] m[7] m[11] m[15]
�
11.17.3.5 typedef MM_FLOAT Mat5x4[20]
Matrix with 5 columns and 4 rows for color operations with the R, G, B, A or Y, U, V, A channels. If m is a Mat5x4
matrix type and R, G, B, A in an input vector the resulting vector is:
�
m[0] m[4] m[8] m[12] m[16]
m[1] m[5] m[9] m[13] m[17]
m[2] m[6] m[10] m[14] m[18]
m[3] m[7] m[11] m[15] m[19]
�
×
�
R
G
B
A
�
=
�
m[0] × R + m[4] × G + m[8] × B + m[12] × A + m[16]
m[1] × R + m[5] × G + m[9] × B + m[13] × A + m[17]
m[2] × R + m[6] × G + m[10] × B + m[14] × A + m[18]
m[3] × R + m[7] × G + m[11] × B + m[15] × A + m[19]
�
11.17.4 Function Documentation
11.17.4.1 MML_GDC_2D_MATRIX_API void utMat3x2Copy ( Mat3x2 dst, const Mat3x2 src )
Copy the matrix content to a new one.
Parameters
out
dst
The destination matrix.
in
src
The source matrix.
11.17.4.2 MML_GDC_2D_MATRIX_API void utMat3x2GetXY ( const Mat3x2 m, const MM_FLOAT x,
const MM_FLOAT y, MM_FLOAT
∗
xout, MM_FLOAT
∗
yout )
Calculate the target position for a given matrix and source position.
Parameters
in
m
The matrix.
in
x
Source x position.
in
y
Source y position.
out
xout
Pointer to the destination x position.
out
yout
Pointer to the destination y position.
11.17.4.3 MML_GDC_2D_MATRIX_API MM_U32 utMat3x2Invert ( Mat3x2 m )
Calculate the inverted matrix.
Parameters
in,out
m
The matrix to modify.
Return values
MML_OK
On success. Otherwise The related error code