Module Documentation
FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A
128
MML_GDC_PE_CLUT_FORMAT_33:
for
(i = 0; i <= 32; i++)
pRed[i] = (MM_S16)(0.5f + ( F(i/32.0f * 1024.0f/1023.0f) * 1023));
Please note that the given formula calculates the value for F(256/255). If F(x) is only defined for input values 0.0..1.0
then pRed[32] can be calculated as
pRed[32] = (MM_S16)(0.5f + (( 32.0f * F(1) - F(31.0f * 32.0f / 1023.0f)) * 1023.0f / 31.0f));
The pRed, pGreen and pBlue pointers must be valid for all following mmlGdcPeBlt() calls.
If valid CLUT data is loaded, context attribute MML_GDC_PE_CTX_ATTR_GAMMA is set to
MML_GDC_PE_GAMMA_NEUTRAL.
If one pointer of color components is NULL, then the CLUT is set to bypass.
If pectx is equal to NULL, mmlGdcPeCLUTData is terminated without any operation.
Parameters
in,out
pectx
Pixel Engine context (!=NULL).
in
format
Defines the number of entries in the array. Depending on the hardware the CLUT hardware
may support not all format types. In this case the driver interpolates the missing or skips the
needless values.
in
pRed
Pointer to array of red values. The size of the array depends on format.
in
pGreen
Pointer to array of green values. The size of the array depends on format.
in
pBlue
Pointer to array of blue values. The size of the array depends on format.
Return values
MML_OK
On success. Otherwise the related error code.
11.6.5.8 MML_GDC_PE_API MM_ERROR mmlGdcPeColor ( MML_GDC_PE_CONTEXT pectx,
MM_U08 red, MM_U08 green, MM_U08 blue, MM_U08 alpha )
Set the constant color value. This color has the following usage:
Fill color used in mmlGdcPeFill.
Constant color used in blend mode (for detail information, refer to mmlGdcPeBlendMode) If pectx is equal to
NULL, mmlGdcPeColor is terminated without any operation.
Parameters
in,out
pectx
Pixel Engine context (!=NULL).
in
red
Red component of color (0 - 255, default 0).
in
green
Green component of color (0 - 255, default 0).
in
blue
Blue component of color (0 - 255, default 0).
in
alpha
Alpha component of color (0 - 255, default 0).
Return values
MML_OK
On success. Otherwise the related error code.