Module Documentation
FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A
186
11.20
Utilities for the compression
Modules
Utilities for RLA (run length adaptive compression)
Utilities for RLC (run length compression)
Functions
MM_ERROR utSurfCompress (MML_GDC_SURFACE surf, MML_GDC_SURF_COMP mode)
11.20.1 Detailed Description
This group contains sample helper functions for surface compression. It shows how the surface parameters must be
used with the Utilities for RLA (run length adaptive compression) and Utilities for RLC (run length compression)
utilities.
11.20.2 Function Documentation
11.20.2.1 MM_ERROR utSurfCompress ( MML_GDC_SURFACE surf, MML_GDC_SURF_COMP
mode )
Compress a surface buffer.
Note:
This function shows how images can be compresses to reduce the memory usage. The compressed images can be
used as source surfaces for blit and display operations. A real application will probably not use this function but only
load uses such compressed buffers in an application. Moreover this function may fail for large images because the
system memory is not sufficient.
Parameters
a
surf
The surface object describing an uncompressed image buffer. If the compression was
successful the surface object describes the new compressed buffer.
in
mode
The requested compression mode.
Return values
MML_OK
On success.
MML_ERR
If the requested compression is not possible.