Module Documentation
FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A
116
MML_GDC_PE_API MM_ERROR mmlGdcPeColorMatrix (MML_GDC_PE_CONTEXT pectx,
MML_GDC_PE_CMATRIX_FORMAT format, const MM_FLOAT
∗
fMatrix)
MML_GDC_PE_API MM_ERROR mmlGdcPeGetDrawBox (MML_GDC_PE_CONTEXT pectx, MM_U32
∗
x,
MM_U32
∗
y, MM_U32
∗
w, MM_U32
∗
h, MM_U32 reset)
MML_GDC_PE_API MM_ERROR mmlGdcPeActiveArea (MML_GDC_PE_CONTEXT pectx, MM_U32 target,
MM_S32 x, MM_S32 y, MM_U32 w, MM_U32 h)
MML_GDC_PE_API MM_ERROR mmlGdcPeSelectArea (MML_GDC_PE_CONTEXT pectx, MM_U32 target)
MML_GDC_PE_API MM_ERROR mmlGdcPeFill (MML_GDC_PE_CONTEXT pectx, MM_U32 x, MM_U32 y,
MM_U32 w, MM_U32 h)
MML_GDC_PE_API MM_ERROR mmlGdcPeBlt (MML_GDC_PE_CONTEXT pectx, MM_FLOAT offsetx,
MM_FLOAT offsety)
MML_GDC_PE_API MM_ERROR mmlGdcPeFinish (void)
MML_GDC_PE_API MM_ERROR mmlGdcPeFlush (void)
MML_GDC_PE_API MM_ERROR mmlGdcPeSync (MML_GDC_SYNC sync)
MML_GDC_PE_API MM_ERROR mmlGdcPeWaitSync (MML_GDC_SYNC sync)
MM_ERROR mmlGdcPeWaitForDispFrameEnd (MML_GDC_DISPLAY display, MM_U32 line)
11.6.1 Detailed Description
Pixel Engine (PixEng) API.
#include "mml_gdc_pixeng.h"
The pixel engine API provides all functions for blit operations using the pixel engine (2D core blit) hardware. As
mentioned in the Overview Pixel Engine (PixEng), it requires MML_GDC_SURFACE objects to describe the pixel
buffers and a MML_GDC_PE_CONTEXT object to describe the requested pixel operation.
The following example demonstrates the steps to fill a target buffer with blue and blend a src surface at the center of
target buffer:
MML_GDC_PE_CONTEXT_CONTAINER ctx;
// reset the MML_GDC_PE_CONTEXT object
mmlGdcPeResetContext(&ctx);
// Bind a target surface as STORE and blend DeSTination buffer to the context.
// (The target pixel will be read, blended with src and written back to the target buffer.)
mmlGdcPeBindSurface(&ctx, MML_GDC_PE_STORE | MML_GDC_PE_DST, target);
// Set a fill color
mmlGdcPeColor(&ctx, 0, 0, 255, 0);
// Fill the store buffer
mmlGdcPeFill(&ctx, 0, 0, target_width, target_height);
// Attache the source buffer
mmlGdcPeBindSurface(&ctx, MML_GDC_PE_SRC, src);
// Blend the source pixel to the target
mmlGdcPeBlt(&ctx, (target_width - src_width)/2, (target_height - src_height)/2);
// Optional: Ensure that the operation finished execution
mmlGdcPeFinish();