Page 1
FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series 32-Bit Microcontroller, Graphic Driver User Manual Doc. No. 002-04387 Rev. *A Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 http://www.cypress.com...
Page 2
Cypress is not liable, in whole or in part, and you shall and hereby do release Cypress from any claim, damage, or other liability arising from or related to all Unintended Uses of Cypress products.
Contents 2D Graphics Driver ..............................11 Target products..............................11 About this Document ............................11 Obtaining the Graphic Driver ..........................11 Introduction .................................. 12 Target system ..............................12 Getting Started ................................13 Installation ................................13 How to run an application ............................ 13 Writing an application ............................
Page 4
Contents 4.9.1 Compression Formats ..........................29 4.10 Images With Color Index Table ........................... 30 4.10.1 Alpha support ............................30 4.10.2 Image buffer ............................30 4.10.3 Color table .............................. 30 4.10.4 Surface properties for indexed images ....................30 4.10.5 Index images for blit operations ......................31 4.10.6 Index images for the windows .........................
2. Introduction Target system The 2D Graphics core and its encircling graphics sub system is a hardware sub-component of an integrated SOC like S6E2D. Beside the graphical sub-system the chip supports many different peripherals. The following image shows the basic SOC hardware and software components required to run a typical application.
This package contains all headers, libraries and documentation needed to develop graphics applications for the S6E2D Graphics Hardware. The top level directory contains the following directory structure: 00_s6e2dh_demeter_sw_framework - Cypress FM4 application template, startup code and peripheral drivers. 01_bin - Graphics Core libraries.
4. Overview 2D Graphics Driver parts As shown in the Introduction the 2D Graphics Driver consists of different modules. The following sub-pages will give an overview about the function of some of these modules. Beside these overview pages this document includes a detailed API documentation for each module.
Overview Display Overview The 2D Graphics core has one display controller that can be connected to a screen (in the following named Display). The Display has a constant background color "BG Color". Up to 9 different frame buffers can be used to show content at individual rectangles (called Windows) on the display. The Windows are arranged in a defined z-order which is determined by the layer id and sub-layer id (specified in the properties of each window).
Page 16
Overview This architecture allows creating complex scenes with low VRAM usage and low memory usage. The following example shows a possible scene for one display controller for a device with 5 blend units and up to 26 windows. The S6E2D cannot handle such complex scene however the sample shows the idea behind the layers and windows: Figure 4.
Overview 4.3.1 Usage The following image shows the steps required to use one 2D core Display Controller with one Window. Figure 6 .Activity diagram The Display API lists all supported features and the related restrictions. FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A...
Overview Overview Pixel Engine (PixEng) 4.4.1 Pixel Engine The Pixel Engine is a hardware IP that efficiently performs pixel operations on two-dimensional memory blocks. It reads simultaneously from up to three source rectangles, executes pixel processing operations on these and stores the result in another rectangular memory region.
Page 19
Overview Optional with Optional with Operation Output (required) Input (required) ROP2 or External Blend operation Alpha Fill STORE Copy, Scale, Rotate STORE MASK ROP3 STORE SRC, DST, MASK Note: Please note that the hardware manual uses a different wording compared to the software manual and API. The following table describes the different meaning: Hardware manual naming Software manual naming...
Page 20
Overview Example: The following images are used Surface 1 color channels Surface 2 color (RGB) Surface 2 alpha (A) Surface 3 alpha (A) channel channels channel (A) A blit operation will show the following result depending on the bounded surfaces Operation Copy Blend Operation...
Overview The following table gives an overview about supported surface properties and features: Target Surface and context properties − STORE All RGBA formats. − All RGBA formats. − Geometry operations like translation, scaling, rotation and perspective transformation. − Decompression or indexed color. (Restriction: DST must not use these features, only scale and translation operations are supported) −...
Overview 4.5.2 Synchronization The Synchronization API provides mechanisms to synchronize the processing blocks. This is done through sync objects. A sync object describes a sync condition, (e.g., a certain image buffer operation that has to be completed). Sync objects are managed through the Synchronization API, which provides functions to reset sync objects and to wait for a sync condition to become true.
Overview 4.5.3 Sample use cases 4.5.3.1 Double buffered window A typical application must render a new frame content for each display loop. Double buffered frame buffers are used to render the next frame in a background buffer while the foreground buffer memory is read by the display controller. The following sample code shows how the application can use the 2D Graphics Driver Synchronization API to realize a double buffered Window: // This structure contains the objects required for a double buffered window.
Page 24
Overview // Switch foreground and background buffer id. pdbWin->id = (pdbWin->id == 0) ? 1 : 0; return MML_OK; // Here is the calling render loop. main DOUBLE_BUFFERED_WINDOW win_struct; // Init variables, open window, ... // Bind new background buffer to render context. mmlGdcPeBindSurface(&ctx, MML_GDC_PE_STORE | MML_GDC_PE_DST, &win_struct.sFramebuffer[win_struct.id]);...
Overview 4.5.3.2 Single buffered window As double buffering requires more memory, it is worthwhile to consider whether a single buffer is sufficient for a specific application. In this case care must be taken that rendering does not affect the part of the window that is currently read by the display controller to avoid tearing.
Overview Memory Management Different to many other graphics drivers the 2D Graphics Driver for S6E2D does not include or use any memory management routines (dynamic memory usage). However memory is required for different functions: 4.7.1 System Memory: System Memory is a memory block assigned to the CPU as operating memory for OS and application. The driver requires some static memory blocks that should be assigned by the linker to this block.
Overview Coordinate System Hints Driver APIs for graphical operation use different coordinate systems. The following definitions are used inside the 2D Graphics Driver: 4.8.1 Surface (Image) buffer Images (described by a surface) are always line based from top to down, left to right. That means the first bits in a surface memory buffer describe the upper left pixel, the next bits describe the pixel right of the first, and so on.
Overview The same image rendered above will now show the following result: Figure 11. Zoomed blit and draw result with top left coordinate system setting 4.8.4 Matrix helper functions The 2D Graphics Driver comes with many tutorial samples and sample code. For geometrical operation the utility part includes matrix calculation helpers.
Overview To reduce the amount of required memory the 2D core HW supports compressed images. 4.9.1 Compression Formats The following compression formats for pixel buffer are supported by the 2D core. Recommended use Name Features Limitations case − Lossless compression. −...
Overview The Tutorial Utility Library contains a Utilities for the compression part providing sample code to create run-length- coded and run-length-adaptive compressed buffers. Furthermore the 2D Core Driver package contains a windows command line tool "ResourceGenerator.exe" that can be used to convert a png image into a compressed buffer and store it in a c compliant header file.
Overview 4.10.5 Index images for blit operations Blit operations like blending a traffic sign to a target buffer can be proceeded like operations with standard RGB(A) images because the surface contains the required information. Note: The following restrictions exist for indexed images: ...
5. Glossary Name Description Term to summarize the functions of the Graphics driver that use the 2D Graphics Basic Graphics hardware. Used to differentiate it from other graphics functions like OGL, if supported by the hardware. Blend Operation stands for a calculation of output pixels depending on the color and Blend Operation alpha information of 2 input pixels.
Page 33
Glossary Name Description If images contain an alpha channel this alpha channel will be often used for per pixel blending. The required blending formula depends on the way how the color channels RGB are stored in such an image: − Non-pre-multiplied: they contain the original pixel color independent of the alpha value for this pixel.
Page 34
Glossary Name Description We talk about simple transformation if an image source is translated, mirrored and/or rotated by a multiple of 90°. Nearly all 2D core components can do simple transformation while reading an image. For instance a display controller can directly show horizontal mirrored images.
2D Graphics hardware. Application framework All sample applications are constructed according to a common scheme, based on Cypress’s FM4 application template. Basic setup of peripherals, timers, etc. is handled in main.c, which looks similar for all examples. The following application specific functions are called from main(): ...
Tutorial Tutorial 1: Surfaces_Blit_Display Basic 6.5.1 Description This is a very simple start-up application to show the usage of MML_GDC_SURFACE and MML_GDC_PE_CONTEXT. A surface is required to perform operations in the blit and display path. Please note: Although all APIs use a MML_GDC_SURFACE parameter you need to declare MML_GDC_SURFACE_CONTAINER objects and use the pointer to these objects for all APIs.
Tutorial 6.5.3 Initialization Driver initialization and 1kB for the command sequencer FIFO. // driver initialization UTIL_SUCCESS(ret, mmlGdcSysInitializeDriver(0)); // get virtual addresses (not required for devices without MMU) */ MM_GDC_PHYS_TO_VIRT((MM_ADDR)instructionBufferAddr, &vInstrBufferAddr); // recalculate addresses using the vImgAddr as start MM_GDC_PHYS_TO_VIRT((MM_ADDR)imgAddr, &vImgAddr); patternAddr = (MM_U32)vImgAddr + imgSize;...
Tutorial Figure 13. Constant color 6.5.5 A simple black-and-white image Now a second surface surfSrc is needed for the source path. It has to be initialized with mmlGdcSmResetSurfaceObject and filled with the image data; a simple 32 x 32 pixel black-and-white image. As it is a 1 bpp image, MML_GDC_SURF_FORMAT_RGB1 is used for the color format.
Tutorial Figure 14. Black&White image on constant color 6.5.6 A simple auto-generated pattern Fill the source surface with a simple pattern and copy it to the store surface. We reuse surfSrc, but we use MML_GDC_SURF_FORMAT_R8G8B8A8 for the surface color format because it is much easier to write the data when each pixel is 4-byte aligned.
Tutorial 6.5.7 Blending two surfaces To blend an image with an alpha channel onto the existing store surface, we have to connect surfStore both as destination (input) and store (output). The second input surface is again surfSrc. It has to be reset because now it holds another image with just 8 bit alpha values.
Tutorial Tutorial: Display Basic 6.6.1 Description This example realizes an animated but very simple navigation demo done just by the use of layer properties and operations. The focus of this tutorial is to introduce different layer properties and how to set them up. Figure 17.
Tutorial 6.6.1.2 Layer overview The example uses the following 4 surfaces: Surface Color Layer Preview Dimension Shown features name Format The surface will be moved in a way that only a part of it is visible. Sub-pixel precise movements for a smooth animation.
Tutorial 6.6.3 Code Description We start with driver initialization and setup of the display. The macro UTIL_SUCCESS used in this example is a simple error handling helper. /* Initialize the driver */ UTIL_SUCCESS(ret, mmlGdcSysInitializeDriver(0)); UTIL_SUCCESS(ret, utMmanReset() ); /* Allocate some of VRAM for Instruction buffer for the command sequencer. Note, that mmlGdcVideoAlloc is an application defined routine to manage the VRAM space.
Page 45
Tutorial winprop.layerId = MML_GDC_DISP_LAYER_0; // use layer 0 UTIL_SUCCESS(ret, mmlGdcDispWinCreate(display, &winprop, &wMap)); //sFrame winprop.topLeftX = 0; winprop.topLeftY = 0; winprop.width = dispParams.xResolution; // horizontal display resolution winprop.height = dispParams.yResolution; // vertical display resolution winprop.features = MML_GDC_DISP_FEATURE_MULTI_LAYER; // use multi layer feature to get more windows winprop.layerId = MML_GDC_DISP_LAYER_1;...
Tutorial 6.6.4 Map Layer The map will be assigned to the wMap window: UTIL_SUCCESS(ret, mmlGdcDispWinSetSurface(wMap, MML_GDC_DISP_BUFF_TARGET_COLOR_BUFF, sMap)); Besides this we want to see a moving map. That means we have to move the layer in our animation loop. The driver ensures that only pixels inside the screen of this surface are read from memory.
Tutorial UTIL_SUCCESS(ret, mmlGdcDispWinCommit(wPosition)); 6.6.7 Arrow Layer The arrow layer is a one bit alpha mask only. So we have to define a constant color for the missing color data. In addition we enable the pre-multiplication of color and alpha because the default layer blend mode expects a pre- multiplied image and we have a constant color only.
Tutorial Tutorial: Display_Extended 6.7.1 Description Figure 18. DisplayExtended The focus of Display_Extended is the synchronization of blit and buffer swap operations. Open multiple windows on the display and prepare double buffering. Trigger simple render operations and buffer swaps for each window. ...
Tutorial 6.7.3 Draw function The main draw function calls a draw for each window. Each window draw function checks first the window sync object. If the sync object signals a timeout the function returns. ret = mmlGdcSyncWait(&pdbWin->sync, 0); (ret == MML_ERR_GDC_SYNC_TIMEOUT) return MML_OK;...
Tutorial Tutorial: Speedometer 6.8.1 Summary This example realizes a simple speedometer. The aim is to use 2 layers: One as a static background for the scale. And one dynamic layer with a rotating needle and a fixed hub around the rotation center. The hub image has a light shadow and must not be rotated with the needle.
Tutorial 6.8.4 Preparation First step is to initialize the driver and setup the display: /* Initialization of driver and display */ /* Initialize the driver */ UTIL_SUCCESS(ret, mmlGdcSysInitializeDriver(0)); UTIL_SUCCESS(ret, utMmanReset() ); /* Allocate some of VRAM for Instruction buffer for the command sequencer. Note, that mmlGdcVideoAlloc is an application defined routine to manage the VRAM space.
Tutorial /* draw the scale on background surface. You may use a fixed bitmap too. */ UTIL_SUCCESS(ret, DrawBgr(&s_sBgr, s_sSrc, s_mat)); /* display the background surface on background layer */ UTIL_SUCCESS(ret, mmlGdcDispWinSetSurface(s_winBgr, MML_GDC_DISP_BUFF_TARGET_COLOR_BUFF, &s_sBgr)); UTIL_SUCCESS(ret, mmlGdcDispWinCommit(s_winBgr)); Now we create a layer for the hub and needle. We need a buffer with an alpha channel because the layer blending should only pass the needle and hub.
Page 53
Tutorial This means the offsets are valid for all blit paths except the DST and the individual matrix for each source buffer is used for this path only. This behavior can be used to simplify any operations. For instance, you can set a mirror matrix to the store and without any other changes you can mirror all blit operations for this target.
Tutorial 6.8.6 Show different versions to restore and draw the needle layer Figure 20. Previous layer frame As mentioned, we want to discuss different possibilities. The scenario should be always the same: a previous frame of the sNeedle surface was drawn and the new needle position must be drawn instead. ...
Page 55
Tutorial The next image shows the draw boxes for these 3 rendering steps: Figure 21. Version 1 6.8.6.2 Version 2 In the previous implementation the store buffer is read twice, first when blending the needle, then again when blending the hub on top of it. To avoid this additional memory access, we can blend both sources in one step onto the store buffer.
Page 56
Tutorial Figure 22. Version 2 6.8.6.3 Version 3 Can we use only one rendering pass by rendering images that are larger than the source? We can! We just define that the rendering rectangle is defined by the target buffer. /* Again blend hub over rotated needle to store ... */ UTIL_SUCCESS(ret, mmlGdcPeBindSurface(&ctx, MML_GDC_PE_STORE, &sNeedle));...
Page 57
Tutorial 6.8.6.4 Version 4 The previous version must always update the whole layer frame although only a very small part (the old needle) must be redrawn. The most efficient way would be to re-render only the new and the old needle parts. UTIL_SUCCESS(ret, mmlGdcPeBindSurface(&ctx, MML_GDC_PE_STORE, &sNeedle));...
Tutorial Tutorial: Chart (Single render buffer sample) 6.9.1 Summary This example shows an animated chart using a single buffer render mode. Source code: 04_sample/basic_graphics/chart/. Figure 25. chart 6.9.1.1 Learning Goals The following techniques and features are used: Work with clip rectangle for the STORE surface. ...
Page 59
Tutorial The sample draws 10 bars, 2 background images and a debug bar in one half of the frame. It means the driver needs approximately 500 Byte (or 125 registers writes) for one blit in this sample. Please note, the required bytes for because the palette with 256 ∗...
Page 60
Tutorial /* To use partial rendering we switch on clipping and set the rectangle */ mmlGdcPeSurfAttribute(s_ctx, MML_GDC_PE_STORE, MML_GDC_PE_SURF_ATTR_USE_CLIPPING, MM_TRUE); mmlGdcPeActiveArea(s_ctx, MML_GDC_PE_STORE, 0, y_start, s_win.GetWidth(), lines); This code ensures that all mmlGdcPeBlt() calls never write pixels to the target buffer below line y_start or above y_start + lines.
Page 61
Tutorial 6.9.1.5 Render time visualization If the render time is critical for a single buffer solution it might be helpful to visualize the render time. The sample application blits for both render parts a red line at different positions on the left side of the screen. Different to all other blits this line will be drawn over the whole surface including the part that is currently read by the display controller.
Tutorial 6.10 Tutorial: Cover Flow 6.10.1 Summary This example demonstrates several Pixel Engine features in form of a cover flow. Source code: 04_sample/basic_graphics/coverflow/. Figure 28. coverflow 6.10.2 Usage Use the "right" button to switch between circle and perspective mode. 6.10.2.1 Learning Goals The following techniques and features are used: ...
Page 63
Tutorial utMat4x4Translate(m_m44Pre, 1.0f, 1.0f, 0); /* An OpenGL like perspective calculation */ utMat4x4Perspective(m_m44Pre, s_fLensAngle, (float)GetWidth() / GetHeight(), (float)0.1, 100.0); /* get a distance to the object */ utMat4x4Translate(m_m44Pre, 0, 0, s_fViewDist); /* Now the cover movement */ /* Turn the view center point a little bit down */ utMat4x4RotX(m44, s_fViewAngle);...
Page 64
Tutorial 6.10.2.3 z-order sorting The hardware is not able to detect any z-order. The bitmaps will be drawn in the order as specified in the command list. Later drawn bitmaps are on top of previously drawn bitmaps. For this reason we calculate a z-value of the center of each bitmap manually by using the 4∗4 matrix.
Tutorial 6.11 Tutorial: Digital Picture Frame 6.11.1 Summary This example demonstrates several Pixel Engine features in form of digital picture frame software. It includes several blend classes to show different old picture, new picture animations by using different features like. ...
Tutorial 6.12.2 Code documentation 6.12.2.1 Preparation Once again, we start with a collection of several driver and display initializations. /* Initialization of driver and display */ /* Initialize the driver */ UTIL_SUCCESS(ret, mmlGdcSysInitializeDriver(0)); UTIL_SUCCESS(ret, utMmanReset() ); /* Allocate some of VRAM for Instruction buffer for the command sequencer. Note, that mmlGdcVideoAlloc is an application defined routine to manage the VRAM space.
Page 67
Tutorial windowProp.height = BGR_HEIGHT; windowProp.layerId = MML_GDC_DISP_LAYER_0; /* Create a window and assign it as layer 0 */ UTIL_SUCCESS(ret, mmlGdcDispWinCreate(display, &windowProp, &win)); /* Allocate our buffers */ (i = 0; i < BUFFER_COUNT; i++) { UTIL_SUCCESS(ret, mmlGdcSmResetSurfaceObject(&target_c[i])); target[i] = &target_c[i]; UTIL_SUCCESS(ret, utSurfCreateBuffer(target[i], windowProp.width, windowProp.height, MML_GDC_SURF_FORMAT_R5G6B5));...
Tutorial 6.12.3 The drawing functions 6.12.3.1 Drawlines We draw some "flowers" made of lines at different angles centered on the same point. First set up the line width and line end, write some information and then draw the flower. /* Draw 4 "flowers" with lines of different width */ MM_U32 DrawLines(UTIL_CONTEXT *putCtx) MM_U32 ret = MML_OK;...
Page 70
Tutorial 6.12.3.4 DrawLineEnds Draws the end of the lines by combining line and point draw utility functions. 6.12.3.5 DrawMix Draws some text, lines and points with different colors or a brush. FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A...
7. Module Index Modules Here is a list of all modules: Basic Graphics Driver Initialization API Configuration API Surface API Display API Pixel Engine API Synchronization API 2D Core Interrupt Controller API Error Reporting API Error Codes Basic Graphics Type Definitions Version Numbers Type Definition Macro Definition...
10. File Index 10.1 File List Here is a list of all documented files with brief descriptions: flash_resource.h Include this file before the definition of a bitmap mm_defines.h Common macro definitions for all modules mm_gdc_erp.h Error Reporting API ...
Page 75
File Index mml_gdc_sysinit.h Driver Initialization Module pe_matrix.h Provide some matrix utility functions sm_util.h This is just a helper implementation for development and will be removed in the final version ut_class_ctx.h This class abstracts an MML_GDC_PE_CONTEXT ut_class_device.h This class abstracts the device initialization ...
11. Module Documentation 11.1 Basic Graphics This section collects all APIs of the driver. Modules Driver Initialization API The Driver Initialization API exposes functions to initialize and un initialize the driver. Configuration API The Configuration API allows changing or reading global graphics driver configurations or status information. ...
Module Documentation ∗ 11.2.3 Function Documentation 11.2.3.1 MM_ERROR mmlGdcSysInitializeDriver(MML_GDC_SYSINIT_INFO pDriverInitInfo) Used to initialize the driver at startup. Applications must initialize the driver before they can call other driver functions. Note: The 2D core hardware must be in default state, i.e. no registers may be altered between HW reset and the call of mmlGdcSysInitializeDriver().
Module Documentation mmlGdcDispCommit mmlGdcDispWinCommit If this attribute is 0 (default), the function will block the CPU until it can be executed. If this attribute is not 0, the function will return immediately in that case with error MML_ERR_GDC_DISP_DEV_BUSY. It is up to the application to handle this case and reschedule the function call later.
Module Documentation 11.4 Surface API The Surface API provides all functions to manage memory blocks with image content, called image buffer. (See also Surface Overview) Data Structures struct MML_GDC_SURFACE_CONTAINER Macros #define MML_GDC_SURFACE_MAX_WIDTH 4096 #define MML_GDC_SURFACE_MAX_HEIGHT 4096 #define MML_GDC_SURFACE_CONTROL_WIDTH 2048 ...
Module Documentation 11.4.1 Detailed Description The Surface API provides all functions to manage memory blocks with image content, called image buffer. (See also Surface Overview) #include "mml_gdc_surfman.h" The Surface API provides all functions to manage memory blocks with image content, called image buffer. A "surface"...
Module Documentation 11.4.2 Macro Definition Documentation 11.4.2.1 #define MML_GDC_SURFACE_CONTROL_HEIGHT 2048 Maximum supported height for surfaces . 11.4.2.2 #define MML_GDC_SURFACE_CONTROL_WIDTH 2048 Maximum supported width for surfaces. 11.4.2.3 #define MML_GDC_SURFACE_MAX_HEIGHT 4096 Absolute maximum height for surfaces. 11.4.2.4 #define MML_GDC_SURFACE_MAX_WIDTH 4096 Absolute maximum width for surfaces. ∗...
Page 85
Module Documentation MML_GDC_SURF_ATTR_BITPERPIXEL Size of one pixel in bits. Can be one of 1, 2, 4, 8, 12, 16, 24, 32(initial: 32). MML_GDC_SURF_ATTR_COLORBITS Color component size in bits 0xRRGGBBAA or 0xY0U0Y1V0 (initial: 0x08080808). color_bits = red_bits<<24 + green_bits<<16 + blue_bits<<8 + alpha_bits //for RGBA format, MML_GDC_SURF_ATTR_COLORSHIFT Color component shift (0xRRGGBBAA) or (0xY0U0Y1V0) (initial: 0x18100800).
Page 86
Module Documentation MML_GDC_SURF_ATTR_COLORSHIFT. A mmlGdcSmGetAttribute call with the attribute MML_GDC_SURF_ATTR_SURF_FORMAT will return the related color format if the same attributes match the MML_GDC_SURF_FORMAT definition. MML_GDC_SURF_ATTR_USERDEFINED User defined (initial: 0). 11.4.4.2 enum MML_GDC_SURF_CLF Color format of color lookup table. Enumerator MML_GDC_SURF_CLF_R8G8B8 R8G8B8 MML_GDC_SURF_CLF_B8G8R8 B8G8R8...
Page 87
Module Documentation 11.4.4.5 enum MML_GDC_SURF_FORMAT Color format of surface buffer. The syntax for RGBA buffers is the following: R, G, B, A and X stands for red, green, blue, alpha and unused. The field description(s) is followed by the bit width. For instance R5G6B5 used 5 red, 6 green and 5 blue bits but no alpha.
Module Documentation MML_GDC_SURF_FORMAT_A1B5G5R5 16 bpp ABGR format (5 bit for RGB, 1 bit alpha). MML_GDC_SURF_FORMAT_B5G5R5A1 16 bpp BGRA format (5 bit for RGB, 1 bit alpha). MML_GDC_SURF_FORMAT_R5G6B5 16 bpp BGR format (5 bit for RB, 6 bit for G). MML_GDC_SURF_FORMAT_A8RGB8 16 bpp, A8RGB8 can be used for gray or indexed image buffers with additional alpha value.
Page 89
Module Documentation Parameters surf The surface object. uWidth The width in pixels of the image. uHeight The height in pixels of the image. The format of the image. The format defines the fields BitPerPixel, ColorBits, eFormat ColorShift, Color format. pBufferAddress The memory address of the image.
Page 90
Module Documentation ∗ 11.4.5.3 MM_ERROR mmlGdcSmGetAttribute(const MML_GDC_SURFACE surf, MML_GDC_SURF_ATTR eName, MM_U32 puValue) Get surface attributes. Parameters surf The surface. eName Name of the attribute. See MML_GDC_SURF_ATTR. puValue Pointer to a variable to receive the parameter value. Return values MML_OK On success. MML_ERR_GDC_SURF_INVALID_ATTRIBUTE If illegal value is given for eName.
Module Documentation 11.5 Display API The Display API exposes all the hardware features of the display unit. See also Display Overview. Data Structures struct MML_GDC_DISP_MODE_LINE struct MML_GDC_DISP_TCON_PROPERTIES struct MML_GDC_DISP_PROPERTIES struct MML_GDC_DISP_WINDOW_PROPERTIES typedef struct MML_GDC_DISPLAY ∗ MML_GDC_DISPLAY Typedefs typedef structMML_GDC_DISP_WINDOW ∗...
Module Documentation 11.5.2.16 #define MML_GDC_DISP_RGB_LOW (0) No inversion of pixel data. 11.5.2.17 #define MML_GDC_DISP_VSYNC_HIGH (1U << 1) Vsync signal high active. 11.5.2.18 #define MML_GDC_DISP_VSYNC_LOW (0) Vsync signal low active. 11.5.2.19 #define MML_GDC_DISP_WINDOW_PROPERTIES_INITIALIZER Value: { MML_GDC_DISP_OUTPUT_SCREEN_PRIMARY, 0, 0, 0, 0, MML_GDC_DISP_LAYER_0, 0, MML_GDC_DISP_SUB_LAYER_DEFAULT} ∗...
Page 98
Module Documentation 11.5.4.2 enum MML_GDC_DISP_CLUT_FORMAT For size of entries for the CLUT. Enumerator MML_GDC_DISP_CLUT_FORMAT_33 Each array for RGB contains 33 10-bit values to describe the 0-255 index range. The missing values are interpolated (see mmlGdcDispCLUTData for details). 11.5.4.3 enum MML_GDC_DISP_CMATRIX_FORMAT Color matrix format.
Page 99
Module Documentation 11.5.4.8 enum MML_GDC_DISP_DITHER_FORMAT Dither format 0x0R0G0B00. Enumerator MML_GDC_DISP_DITHER108 Flag to specify dithering output format of RGB 10x10x10 -> 8x8x8. MML_GDC_DISP_DITHER107 Flag to specify dithering output format of RGB 10x10x10 -> 7x7x7. MML_GDC_DISP_DITHER106 Flag to specify dithering output format of RGB 10x10x10 -> 6x6x6. MML_GDC_DISP_DITHER105 Flag to specify dithering output format of RGB 10x10x10 ->...
Page 100
Module Documentation 11.5.4.13 enum MML_GDC_DISP_MODE Enumeration of display modes. Enumerator MML_GDC_DISP_SINGLE_SCREEN Single screen mode. MML_GDC_DISP_DUAL_SCREEN Reserved for future use. MML_GDC_DISP_DUAL_VIEW Reserved for future use. 11.5.4.14 enum MML_GDC_DISP_OUTPUT_SCREEN Enumeration of possible locations to show a layer on a display. Enumerator MML_GDC_DISP_OUTPUT_SCREEN_PRIMARY Show layer on primary screen.
Page 101
Module Documentation 11.5.4.16 enum MML_GDC_DISP_TILE_MODE Enumeration of possible tile modes for a window. Enumerator MML_GDC_DISP_TILE_MODE_ZERO Pixel outside the surface are 0. MML_GDC_DISP_TILE_MODE_CONST Pixel outside the surface use the const color of the window. MML_GDC_DISP_TILE_MODE_PAD Pixel outside the surface use the closest pixel from source buffer, this must not be set for RLD operations MML_GDC_DISP_TILE_MODE_CLIP The window position and size will be clipped to the overlapped area of the given window and the surface.
Page 102
Module Documentation MML_GDC_DISP_WIN_ATTR_SCREEN Select the screen(s), where the layer is displayed. Alpha layers do not have this attribute. See MML_GDC_DISP_OUTPUT_SCREEN. MML_GDC_DISP_OUTPUT_SCREEN_PRIMARY = Show layer on screen 0. MML_GDC_DISP_OUTPUT_SCREEN_SECONDARY = Show layer on screen 1. MML_GDC_DISP_OUTPUT_SCREEN_BOTH = Show layer on both screens. MML_GDC_DISP_WIN_ATTR_COLOR Set window color.
Module Documentation 11.5.5 Function Documentation 11.5.5.1 MM_ERROR mmlGdcDispCloseDisplay(MML_GDC_DISPLAY display) Close a display and all windows opened by this display. By default this function is blocked until previous operations of device display are completely executed. Use mmlGdcConfigSetAttribute(), set MML_GDC_CONFIG_ATTR_DISPLAY_NOBLOCK to 1 to make it non-blocking. Note: The display closed by the last process switches the display controller off.
Page 104
Module Documentation Parameters display An MML_GDC_DISPLAY returned from a previous call to mmlGdcDispOpenDisplay. Defines the number of entries in the array. Depending on the hardware the CLUT hardware format may support not all format types. In this case the driver interpolates the missing or skips the needless values.
Page 105
Module Documentation 11.5.5.4 MM_ERROR mmlGdcDispDitherCtrl ( MML_GDC_DISPLAY display, MML_GDC_DISP_DITHER_ENABLE enable, MML_GDC_DISP_DITHER_MODE mode, MML_GDC_DISP_DITHER_RANGE range, MML_GDC_DISP_DITHER_FORMAT format ) Used to configure dithering on the display controller. The dither processing is active if MML_GDC_DISP_DITHON is set. Dithering improves the display images, if the display has less color levels than the original picture. The number of bits per pixel is lowered from the original value e.g.
Page 106
Module Documentation ∗ ∗ 11.5.5.6 MM_ERROR mmlGdcDispOpenDisplay ( MML_GDC_DISP_PROPERTIES mode, MML_GDC_DISPLAY display ) Used to open a display. By default this function is blocked until previous operations of device display are completely executed. Use mmlGdcConfigSetAttribute(), set MML_GDC_CONFIG_ATTR_DISPLAY_NOBLOCK to 1 to make it non-blocking.
Page 107
Module Documentation 11.5.5.8 MM_ERROR mmlGdcDispSyncVSync ( MML_GDC_DISPLAY display, MML_GDC_SYNC sync, MM_S32 vsyncCnt ) Initializes the sync object sync to get signaled after vsyncCnt VSync’s have happened. The VSync is taken from the display controller specified by display. Parameters display An MML_GDC_DISPLAY returned from a previous call to mmlGdcDispOpenDisplay(). sync Sync object to initialize with the sync condition.
Page 108
Module Documentation ∗ ∗ 11.5.5.10 MM_ERROR mmlGdcDispWinCreate ( MML_GDC_DISPLAY display, MML_GDC_DISP_WINDOW_PROPERTIES properties, MML_GDC_DISP_WINDOW pWin) Used to create a window. By default this function is blocked until previous operations of device display and device window are completely executed. Use mmlGdcConfigSetAttribute(), set MML_GDC_CONFIG_ATTR_DISPLAY_NOBLOCK to 1 to make it non-blocking.
Page 109
Module Documentation ∗ 11.5.5.12 MM_ERROR mmlGdcDispWinGetAttribute ( MML_GDC_DISP_WINDOW win, MML_GDC_DISP_WIN_ATTR pname, MM_U32 pParam ) Gets the value for attribute pname. win specify for which window the attribute should be retrieved. Parameters An MML_GDC_DISP_WINDOW returned from a previous call to mmlGdcDispWinCreate. pname Parameter name.
Page 110
Module Documentation As = As * Agbl; Ad = As; ((mode & MML_GDC_DISP_BLEND_SOURCE_ALPHA) == MML_GDC_DISP_BLEND_SOURCE_ALPHA) Ad = Ad * Asrc; if((mode&MML_GDC_DISP_BLEND_SOURCE_MULTIPLY_ALPHA)==MML_GDC_DISP_BLEND_SOURCE_MUL TIPLY_ALPHA) As = As * Asrc; Cout = Csrc * As + Cdst * (1 - Ad); Note: The blend mode settings of the window does not becomes active immediately with the related mmlGdcDispWinSetBlendMode call, but will be queued together with other settings of this window.
Page 111
Module Documentation Note: The matrix settings of the window does not becomes active immediately with the related mmlGdcDispWinSetMatrix call, but will be queued together with other settings of this window. Use mmlGdcDispWinCommit to submit these settings for processing. 1 0 The allowed matrix properties differ depending on the window features.
Page 112
Module Documentation 11.5.5.16 MM_ERROR mmlGdcDispWinSync ( MML_GDC_DISP_WINDOW win, MML_GDC_SYNC sync ) Inserts a sync object into the window settings queue. The sync object will be signaled after the preceding mmlGdcDispWinCommit has been processed. Parameters A MML_GDC_DISP_WINDOW returned from a previous call to mmlGdcDispWinCreate. Sync object.
Module Documentation 11.6.2 Macro Definition Documentation 11.6.2.1 #define MML_GDC_PE_API extern Placeholder for export changes. 11.6.2.2 #define MML_GDC_PE_ATTR_ZERO_BOTTOM_LEFT 1U The coordinate system for geometry operation starts in the lower left corner. 11.6.2.3 #define MML_GDC_PE_ATTR_ZERO_TOP_LEFT 0U The coordinate system for geometry operation starts in the upper left corner. Note: For blit operation, it is equal to buffer content and display coordinate orientation.
Module Documentation ∗ 11.6.3 Typedef Documentation 11.6.3.1 typedef MML_GDC_PE_CONTEXT_CONTAINER MML_GDC_PE_CONTEXT The pixel engine context object definition. 11.6.4 Enumeration Type Documentation 11.6.4.1 enum MML_GDC_PE_BF Blit Blend function definition used by mmlGdcPeBlendFunc. 11.6.4.2 enum MML_GDC_PE_BM Blit Blend mode definition used by mmlGdcPeBlendMode. 11.6.4.3 enum MML_GDC_PE_CLUT_FORMAT CLUT entities size.
Page 120
Module Documentation Warning: For target buffers with few bits (e.g., <=4) per color component it will cause visible flickering artifacts. MML_GDC_PE_CTX_ATTR_FILTER Set the filter mode. The related parameter can be MML_GDC_PE_FILTER_NEAREST. MML_GDC_PE_FILTER_BILINEAR (default). ::MML_GDC_PE_FILTER_ANISOTROPIC. MML_GDC_PE_ATTR_ZERO_POINT Define the coordinate zero point for geometry operations. See alsoCoordinate System Hints. The related parameter can be ...
Page 121
Module Documentation 11.6.4.8 enum MML_GDC_PE_GEO_MATRIX_FORMAT Geometry matrix format. Enumerator MML_GDC_PE_GEO_MATRIX_FORMAT_3X2 float[6] array with 3 column and 2 lines. MML_GDC_PE_GEO_MATRIX_FORMAT_3X3 float[9] array with 3 column and 3 lines. 11.6.4.9 enum MML_GDC_PE_SURF_ATTR Surface attributes used by mmlGdcPeSurfAttribute. Enumerator MML_GDC_PE_SURF_ATTR_COLORMULTI Enable/disable of color multiplication. The related parameter can be ...
Module Documentation MML_GDC_PE_SURF_ATTR_USE_CLIPPING Define whether or not the surface coordinates given by mmlGdcPeActiveArea are used as clip coordinates while reading (SRC, DST, MASK) or writing (STORE) the surface. If USE_CLIPPING is disabled the ActiveArea coordinates are used for the target blit bounding box calculation only. If USE_CLIPPING is enabled the surface will be used like a smaller bitmap.
Page 123
Module Documentation 11.6.5.2 MML_GDC_PE_API MM_ERROR mmlGdcPeAttribute(MML_GDC_PE_CONTEXT pectx, MML_GDC_PE_CTX_ATTR pname, MM_U32 param) Set an attribute for the specified context. If pectx is equal to NULL, mmlGdcPeAttribute is terminated without any operation. Parameters in,out pectx Pixel Engine context (!=NULL). pname State name for setting. Can be one of MML_GDC_PE_CTX_ATTR param Parameter for argument target (See MML_GDC_PE_CTX_ATTR description).
Page 124
Module Documentation 11.6.5.4 MML_GDC_PE_API MM_ERROR mmlGdcPeBlendFunc ( MML_GDC_PE_CONTEXT pectx, MML_GDC_PE_BF func_red_src, MML_GDC_PE_BF func_red_dst, MML_GDC_PE_BF func_green_src, MML_GDC_PE_BF func_green_dst, MML_GDC_PE_BF func_blue_src, MML_GDC_PE_BF func_blue_dst, MML_GDC_PE_BF func_alpha_src, MML_GDC_PE_BF func_alpha_dst ) Set the blending parameter. If pectx is equal to NULL, mmlGdcPeBlendFunc is terminated without any operation. The following table shows the possible blend functions ...
Page 125
Module Documentation Parameters in,out pectx Pixel Engine context (!=NULL). func_red_src Blend function of source red (default: MML_GDC_PE_BF_GL_SRC_ALPHA). func_red_dst Blend function of destination red (default: MML_GDC_PE_BF_GL_ONE_MINUS_SRC_ALPHA). func_green_src Blend function of source green (default: MML_GDC_PE_BF_GL_SRC_ALPHA). func_green_dst Blend function of destination green (default: MML_GDC_PE_BF_GL_ONE_MINUS_SRC_ALPHA).
Page 126
Module Documentation C = Cs ∗ Fs + Cd ∗ Fd Blend Mode RGBA Components MML_GDC_PE_BM_GL_FUNC_ADD MML_GDC_PE_BM_GL_MIN C = min(Cs, Cd) C = Cs ∗ Fs - Cd ∗ Fd MML_GDC_PE_BM_GL_MAX C = max(Cs, Cd) C = Cd ∗ Fd - Cs ∗ Fs MML_GDC_PE_BM_GL_FUNC_SUBTRACT MML_GDC_PE_BM_GL_FUNC_REVERSE_SUBTRACT C = Cs + Cd ∗...
Page 127
Module Documentation A typical mmlGdcPeBlt operation processes a store rectangle defined by the active area of the SRC surface and the given matrix transformation. An application can change this behavior by using mmlGdcPeSelectArea. A SRC and STORE surface must be defined in minimum to proceed a mmlGdcPeBlt (simple copy) ∗...
Page 128
Module Documentation MML_GDC_PE_CLUT_FORMAT_33: (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));...
Page 129
Module Documentation ∗ 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...
Page 130
Module Documentation 11.6.5.11 MML_GDC_PE_API MM_ERROR mmlGdcPeFinish ( void ) This API is used to wait on blitting and drawing completion for synchronization. Return values MML_OK On success. Otherwise the related error code. 11.6.5.12 MML_GDC_PE_API MM_ERROR mmlGdcPeFlush ( void ) Force execution of PixEng commands in finite time. Return values MML_OK On success.
Page 131
Module Documentation 11.6.5.15 MML_GDC_PE_API MM_ERROR mmlGdcPeRopOperation ( MML_GDC_PE_CONTEXT pectx, MM_U08 op_red, MM_U08 op_green, MM_U08 op_blue, MM_U08 op_alpha ) Set the Raster Operation (ROP) for each color channel and the alpha channel. If pectx is equal to NULL, mmlGdcPeRopOperation is terminated without any operation. Note: ...
Page 132
Module Documentation 11.6.5.16 MML_GDC_PE_API MM_ERROR mmlGdcPeSelectArea ( MML_GDC_PE_CONTEXT pectx, MM_U32 target ) mmlGdcPeSelectArea defines which surfaces are used to calculate the processing area. A default mmlGdcPeBlt function processes rectangle in store surface defined by the active area (see mmlGdcPeActiveArea) of the src surface and the given matrix transformation defined by mmlGdcPeSetMatrix.
Page 133
Module Documentation 11.6.5.18 MML_GDC_PE_API MM_ERROR mmlGdcPeSurfAttribute ( MML_GDC_PE_CONTEXT pectx, MM_U32 target, MML_GDC_PE_SURF_ATTR pname, MM_U32 param ) Set an attribute for the surface that is bound to the specified target. If pectx is equal to NULL, mmlGdcPeSurfAttribute is terminated without any operation. Note: The MASK surface does not support color multiplication.
Page 134
Module Documentation Inserts a sync object into the 2D command stream (similar to the OpenGL glFencSync() call). Parameters in,out sync Sync object reset by mmlGdcSyncReset(). After successful completion of mmlGdcPeSync(), it holds the parameter of the inserted sync. Return values MML_OK On success.
Module Documentation 11.7.3 Function Documentation 11.7.3.1 MM_ERROR mmlGdcSyncIncr ( MML_GDC_SYNC sync, MM_S32 incr ) Increments the sync count for sync object sync. This way a sync object can be used to wait for last sync condition + incr. This must only be used for sync sources that increment the sync counter in a known fashion (e.g., display controller VSync)! Parameters sync...
Module Documentation 11.8.3 Function Documentation 11.8.3.1 void mmdGdcInterruptHandler ( void ) Interrupt Handler Function. Interrupt service routine for 2D Core interrupts. This function has to be called by ARM if any 2D Core interrupt occurs. The function takes care that the interrupt status in the 2D Core is reset. The related interrupt status in ARM ∗...
Module Documentation 11.9.1 Detailed Description Error Reporting API - Error Reporting for selected modules and level. The module Ids of this driver. #include "mml_gdc_erp.h" The Error-Reporting API provides functions to report errors, warnings and infos. The modules that are covered can be specified.
Module Documentation ∗ 11.9.3 Typedef Documentation 11.9.3.1 typedef void MM_PRINTFUNCTION(const char string) Function type definition for the print function that shall be used. 11.9.4 Enumeration Type Documentation 11.9.4.1 enum MM_ERP_MESSAGE_CHANNEL_PROP Enumeration of message channel properties Enumerator MM_ERP_CH_OFF message channel off MM_ERP_CH_ON message channel on 11.9.4.2 enum MM_ERP_MESSAGE_DEST Enumeration of message destination...
Module Documentation 11.9.5 Function Documentation 11.9.5.1 MM_ERROR mmlGdcErpSetBuffer ( MM_ADDR bufferAddr, MM_U32 bufferSize ) Set the parameter for a buffer, that is used as a channel for error messages. Parameters bufferAddr Address of the provided buffer bufferSize Size (in Bytes) of the provided buffer. Return values MML_OK Normal termination.
Page 145
Module Documentation 11.9.5.3 MM_ERROR mmlGdcErpSetMessageLevel ( MM_U32 moduleId, MM_ERP_MESSAGE_LEVEL level ) Set level of error messages for an individual module. For example, mmlGdcErpSetMessageLevel(MM_ERP_MODULE_ID_GDC_DISP_USER, MM_ERP_LEVEL_INFO); will print all messages (info,warning,error) that come from the display module. The module IDs are defined for each driver component (see Module Id’s).
Module Documentation 11.10.1 Detailed Description Error Codes of this driver. #include "mm_gdc_errors.h" All used Error Codes for all modules are collected here. 11.10.2 Macro Definition Documentation 11.10.2.1 #define MMD_ERR_GDC_CARD_ACCESS_FAILED MM_ERRCODE(0x11007003) An unexpected internal error occurred 11.10.2.2 #define MMD_ERR_GDC_CARD_DEV_BUSY MM_ERRCODE(0x11007001) Access to a device is denied (e.g. because a shadow load request is pending) 11.10.2.3 #define MMD_ERR_GDC_CARD_DEV_NOTSUPPORTED MM_ERRCODE(0x11007005) Operation not supported for device 11.10.2.4 #define MMD_ERR_GDC_CARD_TIME_INTERVAL MM_ERRCODE(0x11007004)
Page 150
Module Documentation 11.10.2.15 #define MML_ERR_GDC_CARD_DEV_BUSY MM_ERRCODE(0x21007007) Access to a device is denied (e.g. because a shadow load request is pending) 11.10.2.16 #define MML_ERR_GDC_CARD_DEV_ENABLED MM_ERRCODE(0x21007002) Device is still enabled 11.10.2.17 #define MML_ERR_GDC_CARD_DEV_NOT_ENABLED MM_ERRCODE(0x21007001) Device is not enabled 11.10.2.18 #define MML_ERR_GDC_CARD_DEV_NOTSUPPORTED MM_ERRCODE(0x21007003) Operation not supported for device 11.10.2.19 #define MML_ERR_GDC_CARD_THREAD_LIMIT MM_ERRCODE(0x21007005) Maximum number of supported threads reached...
Page 151
Module Documentation 11.10.2.30 #define MML_ERR_GDC_DISP_FAILED MM_ERRCODE(0x21001014) The operation failed for an unknown reason 11.10.2.31 #define MML_ERR_GDC_DISP_INVALID_ARG MM_ERRCODE(0x21001003) An invalid argument was passed 11.10.2.32 #define MML_ERR_GDC_DISP_INVALID_BLENDING MM_ERRCODE(0x21001019) The blend mode is not supported. 11.10.2.33 #define MML_ERR_GDC_DISP_INVALID_CLUTDATA MM_ERRCODE(0x2100101a) The CLUT data is not valid. 11.10.2.34 #define MML_ERR_GDC_DISP_INVALID_DIMENSION MM_ERRCODE(0x2100101c) The buffer width or height is not valid.
Page 152
Module Documentation 11.10.2.45 #define MML_ERR_GDC_INT_OUT_OF_RANGE MM_ERRCODE(0x21010001) Interrupt id is out of range 11.10.2.46 #define MML_ERR_GDC_IRIS_CMD_SEQ_ARG_ERROR MM_ERRCODE(0x2100B001) cmd_seq Wrong arguments for CmdSeq API 11.10.2.47 #define MML_ERR_GDC_IRIS_CMD_SEQ_COMMAND_QUEUE_FULL MM_ERRCODE(0x2100B005) Command buffer full 11.10.2.48 #define MML_ERR_GDC_IRIS_CMD_SEQ_FIFO_UNINITIALIZED MM_ERRCODE(0x2100B004) Command buffer has not been initialized 11.10.2.49 #define MML_ERR_GDC_IRIS_CMD_SEQ_INVALID_ADDRESS MM_ERRCODE(0x2100B002) Buffer address unaligned...
Page 153
Module Documentation 11.10.2.59 #define MML_ERR_GDC_PE_INVALID_CONTEXT MM_ERRCODE(0x2100D002) Context object invalid 11.10.2.60 #define MML_ERR_GDC_PE_INVALID_DIMENSION MM_ERRCODE(0x2100D007) Surface dimension is out of range 11.10.2.61 #define MML_ERR_GDC_PE_INVALID_FLOAT MM_ERRCODE(0x2100D023) A float value exceeds the range supported by hardware 11.10.2.62 #define MML_ERR_GDC_PE_INVALID_MASK_PARAM MM_ERRCODE(0x2100D018) Required parameter is not supported for mask 11.10.2.63 #define MML_ERR_GDC_PE_INVALID_MATRIX MM_ERRCODE(0x2100D006) A matrix operation cannot be performed 11.10.2.64 #define...
Page 154
Module Documentation 11.10.2.74 #define MML_ERR_GDC_PE_INVALID_SURFACE_PARAM MM_ERRCODE(0x2100D013) The requested surface features are not supported 11.10.2.75 #define MML_ERR_GDC_PE_INVALID_TARGET MM_ERRCODE(0x2100D003) Invalid target 11.10.2.76 #define MML_ERR_GDC_PE_INVALID_YUV_PARAM MM_ERRCODE(0x2100D028) The YUV surface properties is invalid 11.10.2.77 #define MML_ERR_GDC_PE_OUT_OF_SPACE MM_ERRCODE(0x2100D001) The system runs out of memory to perform this operation 11.10.2.78 #define MML_ERR_GDC_SURF_ERROR_ADDRESS_TRANSLATION MM_ERRCODE(0x21000007)
Page 155
Module Documentation 11.10.2.89 #define MML_ERR_GDC_SYNC_OUT_OF_MEMORY MM_ERRCODE(0x21005002) Out of memory 11.10.2.90 #define MML_ERR_GDC_SYNC_TIMEOUT MM_ERRCODE(0x21005003) Timeout expired 11.10.2.91 #define MML_ERR_GDC_SYS_DEVICE_ALREADY_INITIALIZED MM_ERRCODE(0x21009003) Hardware device is already initialized 11.10.2.92 #define MML_ERR_GDC_SYS_DEVICE_CLOSE_FAILED MM_ERRCODE(0x21009002) Hardware device failed to close 11.10.2.93 #define MML_ERR_GDC_SYS_DEVICE_INIT_FAILED MM_ERRCODE(0x21009001) Hardware device failed initialization 11.10.2.94 #define MML_ERR_GDC_SYS_DEVICE_INVALID_PARAMETER MM_ERRCODE(0x21009005)
Module Documentation 11.11 Basic Graphics Type Definitions Definition of types used in Basic Graphics. Definition of types used in Basic Graphics. #include "mml_gdc_types.h" 11.12 Version Numbers The Version numbers of this driver. Macros #define MM_GDC_MAJOR_VERSION 1U #define MM_GDC_MINOR_VERSION 0U 11.12.1 Detailed Description The Version numbers of this driver.
Module Documentation 11.13 Type Definition Typedefs typedef unsigned char MM_U08 typedef signed char MM_S08 typedef unsigned short MM_U16 typedef signed short MM_S16 typedef unsigned int MM_U32 typedef signed int MM_S32 typedef unsigned long long MM_U64 ...
Page 158
Module Documentation 11.13.2.8 typedef signed char MM_S08 signed 8-bit integer 11.13.2.9 typedef signed short MM_S16 signed 16-bit integer 11.13.2.10 typedef signed int MM_S32 signed 32-bit integer 11.13.2.11 typedef signed long long MM_S64 signed 64-bit integer 11.13.2.12 typedef unsigned char MM_U08 unsigned 8-bit integer 11.13.2.13 typedef unsigned short MM_U16 unsigned 16-bit integer...
Page 160
Module Documentation 11.14.2.5 #define MM_BIT( x ) (1U<<(x)) Set bit 11.14.2.6 #define MM_ERRCODE( err ) ((MM_ERROR)(err)) Macro to define the returned Error Code of the driver function 11.14.2.7 #define MM_FALSE ((MM_BOOL) 0) Definition of FALSE for bool types 11.14.2.8 #define MM_IO_IRIS_CORE 0xD0A10000U Graphics Core Base Address 11.14.2.9 #define MM_IO_IRIS_SUBSYSTEM 0xD0A00000U Graphics Subsystem Base Address...
Module Documentation Access failed. 11.16.2.6 #define MML_ERR_MMAN_INVALID_MEMORY MM_ERRCODE(0x18010004) Address points to an unknown memory block. 11.16.2.7 #define MML_ERR_MMAN_INVALID_PARAMETER MM_ERRCODE(0x18010001) Wrong argument specified. 11.16.2.8 #define MML_ERR_MMAN_NO_MEMORY MM_ERRCODE(0x18010002) Out of memory (system). 11.16.2.9 #define MML_ERR_MMAN_NO_VRAM MM_ERRCODE(0x18010003) Out of memory (VRAM). ∗ 11.16.3 Typedef Documentation 11.16.3.1 typedef void MML_MMAN_HEAP_HANDLE Type definition for memory heap handle.
Page 164
Module Documentation 11.16.4.2 MM_ERROR utMmanDestroyHeap ( MML_MMAN_HEAP_HANDLE hdlmem ) Destroys a video memory heap. Note: Typically, an application would not use this function (see utMmanCreateHeap). Parameters hdlmem Handle to heap. Return values MML_OK On success. ∗ MML_ERR_MMAN_INVALID_PARAMETER If hdlmem is NULL. 11.16.4.3 MM_ERROR utMmanGetFree ( MML_MMAN_HEAP_HANDLE hdlmem, MM_U32 size ) Get the total amount of free memory on the heap.
Page 165
Module Documentation ∗ 11.16.4.5 MM_ERROR utMmanGetSize ( MML_MMAN_HEAP_HANDLE hdlmem, MM_U32 size ) Get the size of the heap. Note: Typically, an application would not use this function, but call mmlGdcVideoGetSize() Parameters hdlmem Heap to get information for. size Pointer to variable to receive the information. Return values MML_OK On success.
Module Documentation 11.16.4.8 MM_ERROR utMmanReset ( void ) Reset build in memory heap(s). This function must be called before mmlGdcVideoAlloc(), etc. are called. Return values MML_OK on success MML_ERR_MMAN_NO_MEMORY if not enough system memory for internal data. 11.17 Utility functions for matrix calculations Macros ...
Module Documentation 11.17.3.4 typedef MM_FLOAT Mat4x4[16] Matrix with 4 columns and 4 rows for perspective geometry operations including z calculation. The Mat4x4 matrix is m [ 0 ] m [ 4 ] m [ 8 ] m [ 12 ] defined in the following order m [ 1 ] m [ 5 ] m [ 9 ]...
Page 170
Module Documentation 11.17.4.4 MML_GDC_2D_MATRIX_API void utMat3x2LoadIdentity ( Mat3x2 m ) Reset the matrix content to a unit matrix. Parameters in,out The matrix to modify. 11.17.4.5 MML_GDC_2D_MATRIX_API void utMat3x2Multiply ( Mat3x2 dst, const Mat3x2 src1, const Multiply 2 matrices. The resulting matrix represents dst = src1 ∗ src2. Mat3x2 src2 ) Parameters The destination matrix.
Page 171
Module Documentation 11.17.4.10 MML_GDC_2D_MATRIX_API void utMat3x2ToMat4x4 ( Mat3x2 src, Mat4x4 dst ) Convert a 3x2-matrix to a 4x4-matrix. Parameters The destination matrix. The source matrix. 11.17.4.11 MML_GDC_2D_MATRIX_API void utMat3x2Translate ( Mat3x2 m, MM_FLOAT x, Modify a matrix to realize a move operation. The resulting matrix represents m = m ∗ m_trans MM_FLOAT y ) Parameters in,out...
Page 172
Module Documentation 11.17.4.16 MML_GDC_2D_MATRIX_API void utMat3x3RotX ( Mat3x3 m, MM_FLOAT f ) Rotate a 3x3-matrix around the X-axis. Parameters in,out The input/output matrix. The rotation angle (in radians). 11.17.4.17 MML_GDC_2D_MATRIX_API void utMat3x3RotZ ( Mat3x3 m, MM_FLOAT f ) Rotate a 3x3-matrix around the Z-axis. Parameters in,out The input/output matrix.
Page 173
Module Documentation 11.17.4.21 MML_GDC_2D_MATRIX_API void utMat3x3TranslatePre ( Mat3x3 m, MM_FLOAT x, Modify a 3x3-matrix by pre-multiplying a move matrix. The resulting matrix represents m = m_trans ∗ m. MM_FLOAT y ) Parameters in,out The matrix to modify. Move dimension in x direction. Move dimension in y direction.
Page 174
Module Documentation 11.17.4.25 MML_GDC_2D_MATRIX_API void utMat4x3Multiply ( Mat4x3 dst, const Mat4x3 src1, const Mat4x3 src2 ) Multiply 2 matrices. Parameters The destination matrix. src1 The first source matrix. src2 The second source matrix. 11.17.4.26 MML_GDC_2D_MATRIX_API void utMat4x4Copy ( Mat4x4 dst, const Mat4x4 src ) Copy the content of a 4x4-matrix to a new one.
Page 175
Module Documentation 11.17.4.30 MML_GDC_2D_MATRIX_API void utMat4x4Perspective ( Mat4x4 m, MM_FLOAT fovy, MM_FLOAT aspect, MM_FLOAT zNear, MM_FLOAT zFar ) Apply a perspective projection onto a 4x4-matrix. Parameters in,out The input/output matrix. fovy The opening angle of the frustrum (in degrees). aspect The ratio of width/height.
Page 176
Module Documentation 11.17.4.35 MML_GDC_2D_MATRIX_API void utMat4x4ToMat3x2 ( Mat4x4 src, Mat3x2 dst ) Convert a 4x4-matrix to a 3x2-matrix. Parameters The destination matrix. The source matrix. 11.17.4.36 MML_GDC_2D_MATRIX_API void utMat4x4ToMat3x3 ( Mat4x4 src, Mat3x3 dst ) Convert a 4x4-matrix to a 3x3-matrix. Parameters The destination matrix.
Module Documentation 11.18.3 Function Documentation 11.18.3.1 void mmlGdcPeDeleteContext ( MML_GDC_PE_CONTEXT pectx ) mmlGdcPeDeleteContext deletes a context. Parameters pectx The MML_GDC_PE_CONTEXT object Return values ∗ MML_OK On success. Otherwise the related error code. 11.18.3.2 MM_ERROR mmlGdcPeGenContext ( MML_GDC_PE_CONTEXT pPectx ) mmlGdcPeGenContext creates pixel engine context. Note: Each function with a MML_GDC_PE_CONTEXT as parameter requires a previous call of mmlGdcPeGenContext for this context.
Page 179
Module Documentation ∗ 11.18.3.4 MM_ERROR mmlGdcSmGenSurfaceObjects ( MM_U32 uCnt, MML_GDC_SURFACE pSurfaces ) Creates uCnt empty surface objects, returning their names. Note: This function only instantiates empty surface objects. Before being used, they must be initialized by a function like mmlGdcSmAssignBuffer or the application must set their parameters manually. Parameters uCnt The number of surface objects to create.
Page 180
Module Documentation ∗ ∗ 11.18.3.7 void mmlGdcVideoAlloc ( MM_U32 size, MM_U32 alignment, MM_ADDR pAddr ) Allocate a contiguous block of video memory. Parameters size Amount of memory to be allocated in bytes. alignment Alignment to use for the allocation. pAddr If non-NULL, a pointer to a variable to receive the physical address of the memory block on success.
Page 181
Module Documentation ∗ 11.18.3.11 MM_ERROR mmlGdcVideoGetLargestBlock ( MM_U32 size ) Retrieve the size of the largest contiguous block of free video memory. Depending on the configuration (see mmlGdcVideoConfig), this refers to VRAM, SDRAM or both. Parameters size Parameter to receive the query result [not NULL]. Return values MML_OK Normal termination.
Module Documentation utSurfSetPixel(surf, x, y, red, green, blue, alpha); 11.19.2 Macro Definition Documentation 11.19.2.1 #define UTIL_ERR_OUT_OF_MEMORY MM_ERRCODE(0x31000001) Out of memory 11.19.2.2 #define UTIL_SUCCESS( rc, execute ) Value: ((rc) == MML_OK) \ rc = (execute); \ (rc != MML_OK) printf("Error %x in %s (%s line %d)\n", (int)rc, FUNCTION, FILE, LINE);\ while This macro avoids execution if the previous instruction failed.
Page 184
Module Documentation 11.19.3.2 void utSurfDeleteBuffer ( MML_GDC_SURFACE surf ) Delete the surface buffers. Parameters surf The surface object ∗ ∗ ∗ ∗ 11.19.3.3 MM_ERROR utSurfGetPixel ( MML_GDC_SURFACE src, MM_U32 x, MM_U32 y, MM_U08 r, MM_U08 g, MM_U08 b, MM_U08 Get the r, g, b, a pixel data of a surface at position x, y. The pixel with the coordinates 0, 0 is the upper, left pixel analoge to the the memory organisation of the memory buffer.
Page 185
Module Documentation ∗∗ ∗ ∗ 11.19.3.6 MM_ERROR utSurfReadBitmap ( MML_GDC_SURFACE surface, void pImage, MM_U32 baseAddr, MM_U32 clutAddr ) Read a bitmap structure in memory and set the related surface attributes Please note the surface object must be created before. No memory will be allocated in this function. The pImage pointer will be increased by the size of the whole image so it points to the next image object if further images are in the memory block.
Module Documentation 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.
Module Documentation 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.
Module Documentation 11.23 Util class collection Modules CCtx CDevice CDisplay CMenu CSurface CWindow 11.23.1 Detailed Description The util class collection defines some classes to abstract low level driver functionality. All these classes are defined as header files only.
Module Documentation 11.27 CMenu Data Structures class CMenu 11.27.1 Detailed Description The classes in this group realize a simple menu. It can be used with an 2D core display layer for demo applications to allow selections, switches and similar operations with a minimum keys. Sample code: CMenu menu;...
Page 191
Module Documentation 11.28.2.2 MM_ERROR CreateBuffer ( const MM_U32 width, const MM_U32 height, const MML_GDC_SURF_FORMAT format = MML_GDC_SURF_FORMAT_R8G8B8A8, MM_U32 MaxSize = 0) [virtual] The CreateBuffer function can be used setup the member surface object(s) with allocated VRAM. Parameters width Defines the with of the surface(s). height Defines the height of the surface(s).
Page 192
Module Documentation 11.28.2.5 CSurface ( Class CSurface constructor. 11.28.2.6 MM_ERROR Delete ( The Delete function can be used to free up allocated memory (if any). This function will be called in destructor too. Return values MML_OK on success. Otherwise the related error code. 11.28.2.7 void Init ( Class CSurface init function.
Module Documentation 11.29 CWindow Data Structures class CWindow class CSurfaceWindow< NUM_BUFFERS > class CStaticSurfaceWindow 11.29.1 Detailed Description The class CWindow can be used to open a window with the 2D core driver. The header file contains different derived classed for different use cases.
Page 195
Data Structure Documentation 12.1.3.3 void Push ( unsigned bits, unsigned data ) Push bits to the compressed stream Parameters bits Number of bits in data ∗ data Data to push 12.1.3.4 unsigned Read ( unsigned bits, bool err = 0 ) Read bits from the compressed stream Parameters bits...
Data Structure Documentation ut_class_device.h 12.4 CDisplay Class Reference #include <ut_class_display.h> Public Member Functions MM_ERROR Open (unsigned int nWidth=0, unsigned int nHeight=0, MML_GDC_DISP_CONTROLLER display=MML_GDC_DISP_CONTROLLER_0) MM_ERROR Close () virtual MM_ERROR SetBgColor (MM_U32 color) MM_U32 GetWidth () MM_U32 GetHeight () ...
Page 199
Data Structure Documentation 12.4.2.6 MM_ERROR Open ( unsigned int nWidth = 0, unsigned int nHeight = 0, MML_GDC_DISP_CONTROLLER display = MML_GDC_DISP_CONTROLLER_0 ) [inline] Open / initialize the 2D core display controller. Parameters nWidth Number of horizontal pixel. nHeight Number of vertical pixel. display ID of display controller.
Data Structure Documentation 12.5.2.2 enum MENU_KEYS Enumerator MENU_KEY_ENTER Enter (select) key. MENU_KEY_UP Up key. MENU_KEY_DOWN Down key. MENU_KEY_LEFT Left key. MENU_KEY_RIGHT Right key. 12.5.3 Member Function Documentation 12.5.3.1 virtual MM_ERROR Close ( ) [inline], [virtual] Close the menu 12.5.3.2 MM_ERROR Draw ( ) [inline] Redraw the menu if required.
Page 202
Data Structure Documentation 12.5.3.6 MM_U32 GetDefautItemHeight ( ) [inline] Return values Return the height of one menu item. 12.5.3.7 int HandleKey ( MM_U32 key ) [inline] Progress the key press input: for instance select the lower menu item if key down was pressed. Parameters Return values −...
Data Structure Documentation 12.7 CStaticSurfaceWindow Class Reference #include <ut_class_window.h> virtual MM_ERROR Open (MML_GDC_DISPLAY display, const void ∗pImage, MM_BOOL Public Member Functions bCopyToVRAM=MM_FALSE, MM_S32 x=0, MM_S32 y=0, MML_GDC_DISP_LAYER layerId=MML_GDC_DISP_LAYER_0, MML_GDC_DISP_SUB_LAYER sub_layerID=MML_GDC_DISP_SUB_LAYER_DEFAULT, MM_U32 blend_mode=0) virtual MM_ERROR Open (MML_GDC_DISPLAY display, MML_GDC_SURFACE sImage, MM_S32 x=0, MM_S32 y=0, MML_GDC_DISP_LAYER layerId=MML_GDC_DISP_LAYER_0, MML_GDC_DISP_SUB_LAYER sub_layerID=MML_GDC_DISP_SUB_LAYER_DEFAULT, MM_U32 blend_mode=0)
Page 205
Data Structure Documentation 12.7.2.2 virtual MM_ERROR Open ( MML_GDC_DISPLAY display, MML_GDC_SURFACE sImage, MM_S32 x = 0, MM_S32 y = 0, MML_GDC_DISP_LAYER layerId = MML_GDC_DISP_LAYER_0, MML_GDC_DISP_SUB_LAYER sub_layerID = MML_GDC_DISP_SUB_LAYER_DEFAULT, MM_U32 blend_mode = 0 ) [inline], [virtual] Open the window and show an image. Parameters display A display object that will be used to open the window.
Data Structure Documentation 12.8.2 Constructor & Destructor Documentation 12.8.2.1 ~CSurface ( ) [inline] Class CSurface destructor. 12.8.3 Member Function Documentation 12.8.3.1 MM_U32 GetBufferBufferCnt ( ) [inline] Get number of surfaces on the class. Return values return The number of surfaces in the class object. 12.8.3.2 MML_GDC_SURFACE GetHandle ( ) [inline] Return values return...
Data Structure Documentation 12.8.3.7 MM_BOOL HasBuffer ( ) [inline] Returns whether or not the surface object owns the memory of the surfaces. Note Some member functions like CreateBuffer() allocate VRAM other function like Copy() only point to a memory buffer. Return values MM_TRUE if the surface owns the buffer otherwise MM_FALSE.
Data Structure Documentation 12.9.2.3 MM_ERROR CreateBuffer ( MM_U32 bit_red, MM_U32 bit_green, MM_U32 bit_blue, MM_U32 bit_alpha ) [inline] Create one or more pixel buffers with the size of the window. Parameters bit_red Number of red bits in the buffer(s). bit_green Number of green bits in the buffer(s). bit_blue Number of blue bits in the buffer(s).
Data Structure Documentation 12.10.3 Member Function Documentation 12.10.3.1 virtual MM_ERROR Close ( ) [inline], [virtual] Close the window. Return values MML_OK on success. Otherwise the related error code or MML_ERR. Re implemented in CSurfaceWindow< NUM_BUFFERS >, and CSurfaceWindow< 1 >. 12.10.3.2 virtual MM_ERROR Commit ( ) [inline], [virtual] Apply all changes.
Data Structure Documentation 12.11.3.5 void Write ( const Pixel & pix ) [inline] Write one pixel Parameters Pixel The documentation for this class was generated from the following file: ut_class_rlad.h 12.12 MML_GDC_DISP_MODE_LINE Struct Reference #include <mml_gdc_display.h> Data Fields MM_FLOAT pixelClock ...
Page 216
Data Structure Documentation 12.12.2.6 MM_U32 horTotal Total horizontal. 12.12.2.7 MM_FLOAT pixelClock Pixel clock in units of MHz. 12.12.2.8 MM_U32 syncPolarity Bit field combination of polarity control possibilities: MML_GDC_DISP_HSYNC_LOW / MML_GDC_DISP_HSYNC_HIGH MML_GDC_DISP_VSYNC_LOW / MML_GDC_DISP_VSYNC_HIGH MML_GDC_DISP_DE_LOW / MML_GDC_DISP_DE_HIGH MML_GDC_DISP_RGB_LOW / MML_GDC_DISP_RGB_HIGH. Default value: MML_GDC_DISP_HSYNC_LOW | MML_GDC_DISP_VSYNC_LOW | MML_GDC_DISP_DE_HIGH | MML_GDC_DISP_RGB_LOW.
Data Structure Documentation 12.13.2 Field Documentation 12.13.2.1 MM_U32 countTconProps Number of TCON registers to be programmed. Must be zero if no TCON is used. Must be 0 if it is not display controller 0. 12.13.2.2 MML_GDC_DISP_MODE displayMode Single screen, dual screen or dual view. 12.13.2.3 MM_U32 fcvm ∗...
Data Structure Documentation 12.14 MML_GDC_DISP_TCON_PROPERTIES Struct Reference #include <mml_gdc_display.h> Data Fields MM_U32 address MM_U32 value 12.14.1 Detailed Description Data type used to program timing controller (TCON) registers. 12.14.2 Field Documentation 12.14.2.1 MM_U32 address Address of the TCON register. 12.14.2.2 MM_U32 value Value of the TCON register.
Data Structure Documentation 12.15 MML_GDC_DISP_WINDOW_PROPERTIES Struct Reference #include <mml_gdc_display.h> Data Fields MML_GDC_DISP_OUTPUT_SCREEN outputScreen MM_U32 topLeftX MM_U32 topLeftY MM_U32 width MM_U32 height MML_GDC_DISP_LAYER layerId MM_U32 features MML_GDC_DISP_SUB_LAYER sub_layerId 12.15.1 Detailed Description Data type used to specify window creation parameters. 12.15.2 Field Documentation 12.15.2.1 MM_U32 features Features requested by the layer, the related parameter can be a bit field combination of:...
Data Structure Documentation 12.16 MML_GDC_PE_CONTEXT_CONTAINER Struct Reference #include <mml_gdc_pixeng.h> Data Fields MM_U32 reserved [84] 12.16.1 Detailed Description The pixel engine context container. 12.16.2 Field Documentation 12.16.2.1 MM_U32 reserved[84] Reserved memory needed for any context container. The documentation for this struct was generated from the following file: ...
Data Structure Documentation 12.18 MML_GDC_SYNC_CONTAINER Struct Reference #include <mml_gdc_sync.h> Data Fields MM_U32 reserved [3] 12.18.1 Detailed Description Data type to refer to a sync object. 12.18.2 Field Documentation 12.18.2.1 MM_U32 reserved[3] Reserved memory needed for any sync container. The documentation for this struct was generated from the following file: ...
Data Structure Documentation 12.20.2.6 unsigned pcnt pixel count 12.20.2.7 unsigned size package size in bits 12.20.2.8 unsigned start[NUM_C] delta package The documentation for this struct was generated from the following file: ut_class_rlad.h 12.21 RLAD::Frame::Pixel Struct Reference #include <ut_class_rlad.h> Data Fields ...
Data Structure Documentation 12.22.4 Field Documentation 12.22.4.1 unsigned bpc[NUM_C] bits per channel and pixel of uncompressed image 12.22.4.2 unsigned cbpc_max[NUM_C] max value for compressed bits per channel and pixel (RLAD only) 12.22.4.3 bool decode_BufferTooLarge Buffer larger than required 12.22.4.4 bool decode_BufferTooSmall Buffer too small for decompression 12.22.4.5 unsigned height frame dimension height in pixels...
13. File Documentation 13.1 flash_resource.h File Reference Include this file before the definition of a bitmap. 13.1.1 Detailed Description Include this file before the definition of a bitmap. 13.2 mm_defines.h File Reference Common macro definitions for all modules. #include "mm_types.h" Macros ...
File Documentation 13.17 sm_util.h File Reference This is just a helper implementation for development and will be removed in the final version. #include <stdio.h> #include "mml_gdc_surfman.h" Macros #define UTIL_SUCCESS(rc, execute) #define UTIL_ERR_OUT_OF_MEMORY MM_ERRCODE(0x31000001) MM_ERROR utSurfReadBitmap (MML_GDC_SURFACE surface, void ∗∗pImage, MM_U32 ∗baseAddr, Functions MM_U32 ∗clutAddr) ...
File Documentation 13.18 ut_class_ctx.h File Reference This class abstracts an MML_GDC_PE_CONTEXT. #include "mml_gdc_pixeng.h" #include "ut_compatibility.h" Data Structures class CCtx 13.18.1 Detailed Description This class abstracts an MML_GDC_PE_CONTEXT. 13.19 ut_class_device.h File Reference This class abstracts the device initialization. #include "mml_gdc_display.h" #include "mml_gdc_sysinit.h"...
File Documentation 13.22 ut_class_rlad.h File Reference This sample code can be used to compress a buffer using the MML_GDC_SURF_COMP_RLA, MML_GDC_SURF_COMP_RLAD or ::MML_GDC_SURF_COMP_RLAD_UNIFORM format. #include <assert.h> #include <vector> #include <queue> Data Structures class RLAD class RLAD::Frame struct RLAD::Frame::Pixel ...
File Documentation 13.25 ut_compatibility.h File Reference This file defines some interfaces that are part of other drivers. The util library implements very simple instances of it but they must be not used for software products. However it allows to run the sample applications. #include <stdlib.h>...
File Documentation 13.26 ut_compression.h File Reference This file defines a helper function that can be used to compress a surface. #include "mml_gdc_surfman.h" Functions MM_ERROR utSurfCompress (MML_GDC_SURFACE surf, MML_GDC_SURF_COMP mode) 13.26.1 Detailed Description This file defines a helper function that can be used to compress a surface. 13.27 ut_memman.h File Reference This file defines some interfaces for the memory management.
File Documentation 13.28 ut_rlc.h File Reference This sample code can be used to create a run-length encoded buffer. #include "mm_types.h" #include "mm_defines.h" MM_U32 utRldEncode (MM_U32 ∗pixeldata, MM_U32 unWidth, MM_U32 unHeight, MM_U32 strideBytes, Functions MM_U32 dataBpp, MM_U32 ∗rld, MM_U32 rldCount) 13.28.1 Detailed Description This sample code can be used to create a run-length encoded buffer.
Need help?
Do you have a question about the S6E2DH series and is the answer not in the manual?
Questions and answers