Module Documentation
FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A
187
11.21
Utilities for RLA (run length adaptive compression)
Data Structures
class RLAD
11.21.1 Detailed Description
The code for this group can be used to create compressed buffers of the type MML_GDC_SURF_COMP_RLA,
MML_GDC_SURF_COMP_RLAD and ::MML_GDC_SURF_COMP_RLAD_UNIFORM.
Note:
The header and the source code for this functions are included in the utility block delivered with the driver although it
is not recommended to compress an image with the CPU on the target system. However, if required this part can
used to create compression utilities for different platforms.
11.22
Utilities for RLC (run length compression)
Functions
MM_U32 utRldEncode (MM_U32
∗
pixeldata, MM_U32 unWidth, MM_U32 unHeight, MM_U32 strideBytes,
MM_U32 dataBpp, MM_U32
∗
rld, MM_U32 rldCount)
11.22.1 Detailed Description
This group defines function to create run length compression streams.
Note:
The header and the source code for this functions are included in the utility block delivered with the driver although it
is not recommended to compress an image with the CPU on the target system. However, if required this part can
used to create compression utilities for different platforms.
11.22.2 Function Documentation
11.22.2.1 MM_U32 utRldEncode ( MM_U32
∗
pixeldata, MM_U32 unWidth, MM_U32 unHeight,
MM_U32 strideBytes, MM_U32 dataBpp, MM_U32
∗
rld, MM_U32 rldCount )
Encode pixel data to RLD bit stream.
Parameters
in
pixeldata
Pixel data.
in
unWidth
Width of the image.
in
unHeight
Height of the image.
in
strideBytes
Number of bytes required for one line.
in
dataBpp
Bits per pixel (1, 2, 4, 8, 16, 24, 32).
out
rld
RLD bit stream.
in
rldCount
Maximum number of RLD words.
Return values
Required
number of RLD words. This number may me larger
than rldCount, in which case only rldCount words are
actually written.
Note:
The RLD bit stream is filled up with zero bits at the end, for alignment with word boundaries. RLD will ignore the fill
bits since the expected data size is provided as a parameter for decoding.