
Module Documentation
FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A
129
11.6.5.9 MML_GDC_PE_API MM_ERROR mmlGdcPeColorMatrix ( MML_GDC_PE_CONTEXT
pectx, MML_GDC_PE_CMATRIX_FORMAT format, const MM_FLOAT
∗
fMatrix )
mmlGdcPeColorMatrix is setting function for color matrix. If pectx is equal to NULL, mmlGdcPeColorMatrix is
terminated without any operation.
fMatrix is a 4x3 matrix (represented as float[12] array) for RGB modification.
red_out
= fMatrix[0] * red + fMatrix[3] * green + fMatrix[6] * blue + fMatrix[9] * 255
green_out
= fMatrix[1] * red + fMatrix[4] * green + fMatrix[7] * blue + fMatrix[10] * 255
blue_out
= fMatrix[2] * red + fMatrix[5] * green + fMatrix[8] * blue + fMatrix[11] * 255
alpha_out
= alpha
If fMatrix = NULL (default) the color matrix function will be switched off.
Note:
If a color matrix is set using mmlGdcPeColorMatrix(), then driver internal automatic YUV to RGB conversion of SRC
buffer will be shut off. The YUV color will be converted according to the user defined color matrix. The range for the
multiplication factors is -3.5 .. 3.5. The range for the constant factors is -3.0 .. 3.0
Parameters
in,out
pectx
Pixel Engine context (!=NULL).
in
format
Format of the matrix (must be MML_GDC_PE_CMATRIX_FORMAT_4X3).
in
fMatrix
Address of color matrix (See [Description])
Return values
MML_OK
On success. Otherwise the related error code.
11.6.5.10 MML_GDC_PE_API MM_ERROR mmlGdcPeFill ( MML_GDC_PE_CONTEXT pectx,
MM_U32 x, MM_U32 y, MM_U32 w, MM_U32 h )
This API fills the specified region of the surface that is bound to the MML_GDC_PE_STORE target with the constant
color (see mmlGdcPeColor). If w or h is equal to 0, this API returns MM_TRUE but no work is done.
Note:
The graphical operation will not be finished after the mmlGdcPeFill call. That means the target buffer may be still in
use. Please use synchronization objects or simple mmlGdcPeFinish to ensure that all operations are complete if the
buffer is used by another hardware unit (e.g., CPU, display) beside PixEng afterwards.
Parameters
in
pectx
Pixel Engine context (!=NULL).
in
x
Left start coordinate of the store surface (0 - 4095).
in
y
Lower (or upper see MML_GDC_PE_ATTR_ZERO_POINT) start coordinate of the store
surface (0 - 4095).
in
w
Width of rectangle region in pixel count (0 - 4096).
in
h
Height of rectangle region in line count (0 - 4096).
Return values
MML_OK
On success. Otherwise the related error code.