background image

 

Module Documentation 

 

 

FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A 

124 

 

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 

  F stands for the selected blend function. See mmlGdcPeBlendMode for further usage. 

  Cs, Cd represent the incoming color or alpha component. 

  As, Ad represent the incoming alpha component. 

  Cc, Ac represent the constant color or alpha component defined by mmlGdcPeColor. 

Note: 

The incoming color components Cs, Cd, As and Ad can be the original image color or a result of a previous 
operation. See MML_GDC_PE_SURF_ATTR_ALPHAMULTI and MML_GDC_PE_SURF_ATTR_COLORMULTI. 

Blend Function 

RGBA Components 

MML_GDC_PE_BF_GL_ZERO 

F = 0 

MML_GDC_PE_BF_GL_ONE 

F = 1 

MML_GDC_PE_BF_GL_SRC_COLOR 

F = Cs 

MML_GDC_PE_BF_GL_ONE_MINUS_SRC_COLOR 

F = 1 - Cs 

MML_GDC_PE_BF_GL_SRC_ALPHA 

F = As 

MML_GDC_PE_BF_GL_ONE_MINUS_SRC_ALPHA 

F = 1 - As 

MML_GDC_PE_BF_GL_DST_ALPHA 

F = Ad 

MML_GDC_PE_BF_GL_ONE_MINUS_DST_ALPHA 

F = 1 - Ad 

MML_GDC_PE_BF_GL_DST_COLOR 

F = Cd 

MML_GDC_PE_BF_GL_ONE_MINUS_DST_COLOR 

F = 1 - Cd 

MML_GDC_PE_BF_GL_SRC_ALPHA_SATURATE 

F = min(As, 1 - Ad) 

MML_GDC_PE_BF_GL_CONSTANT_COLOR 

F = Cc 

MML_GDC_PE_BF_GL_ONE_MINUS_CONSTANT_COLOR 

F = 1 - Cc 

MML_GDC_PE_BF_GL_CONSTANT_ALPHA 

F = Ac 

MML_GDC_PE_BF_GL_ONE_MINUS_CONSTANT_ALPHA 

F = 1 - Ac 

Note: 

If OpenVG blend mode (See mmlGdcPeBlendMode) is used, setting for this function is ignored in drawing image. 

 

 

Summary of Contents for S6E2DH series

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: ...IED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE To the extent permitted by applicable law Cypress reserves the right to make changes to this document without further notice Cypress does not assume any liability arising out of the application or use of any product or circuit described in this document Any information provided in this document including any sample design infor...

Page 3: ...r parts 14 4 2 Surface Overview 14 4 2 1 Surface objects 14 4 3 Display Overview 15 4 3 1 Usage 17 4 4 Overview Pixel Engine PixEng 18 4 4 1 Pixel Engine 18 4 5 Synchronization Overview 21 4 5 1 Processing Units 21 4 5 2 Synchronization 22 4 5 3 Sample use cases 23 4 6 Error Reporting Overview 25 4 7 Memory Management 26 4 7 1 System Memory 26 4 7 2 Video Memory VRAM 26 4 7 3 Flash Memory 26 4 7 4...

Page 4: ...lization 37 6 5 4 Fill with constant color 37 6 5 5 A simple black and white image 38 6 5 6 A simple auto generated pattern 39 6 5 7 Blending two surfaces 41 6 5 8 Bring it to the display 41 6 6 Tutorial Display Basic 42 6 6 1 Description 42 6 6 2 Chapters 43 6 6 3 Code Description 44 6 6 4 Map Layer 46 6 6 5 Frame Layer 46 6 6 6 Position Layer 46 6 6 7 Arrow Layer 47 6 7 Tutorial Display_Extended...

Page 5: ...ization API 77 11 2 1 Detailed Description 77 11 2 2 Macro Definition Documentation 77 11 2 3 Function Documentation 78 11 3 Configuration API 79 11 3 1 Enumeration Type Documentation 79 11 3 2 Function Documentation 80 11 4 Surface API 81 11 4 1 Detailed Description 83 11 4 2 Macro Definition Documentation 84 11 4 3 Typedef Documentation 84 11 4 4 Enumeration Type Documentation 84 11 4 5 Function...

Page 6: ...2 2 Macro Definition Documentation 156 11 13 Type Definition 157 11 13 1 Detailed Description 157 11 13 2 Typedef Documentation 157 11 14 Macro Definition 159 11 14 1 Detailed Description 159 11 14 2 Macro Definition Documentation 159 11 15 Tutorial Utility Library 161 11 15 1 Detailed Description 161 11 16 Utilities for the Memory Management 162 11 16 1 Detailed Description 162 11 16 2 Macro Defi...

Page 7: ...90 11 28 2 Function Documentation 190 11 29 CWindow 193 11 29 1 Detailed Description 193 12 Data Structure Documentation 194 12 1 RLAD BitStream Class Reference 194 12 1 1 Detailed Description 194 12 1 2 Constructor Destructor Documentation 194 12 1 3 Member Function Documentation 194 12 2 CCtx Class Reference 196 12 2 1 Detailed Description 196 12 2 2 Constructor Destructor Documentation 196 12 2...

Page 8: ...2 12 MML_GDC_DISP_MODE_LINE Struct Reference 215 12 12 1 Detailed Description 215 12 12 2 Field Documentation 215 12 13 MML_GDC_DISP_PROPERTIES Struct Reference 217 12 13 1 Detailed Description 217 12 13 2 Field Documentation 218 12 14 MML_GDC_DISP_TCON_PROPERTIES Struct Reference 219 12 14 1 Detailed Description 219 12 14 2 Field Documentation 219 12 15 MML_GDC_DISP_WINDOW_PROPERTIES Struct Refer...

Page 9: ...234 13 6 1 Detailed Description 234 13 7 mm_types h File Reference 234 13 7 1 Detailed Description 234 13 8 mmd_gdc_interrupthandler h File Reference 235 13 8 1 Detailed Description 235 13 9 mml_gdc_config h File Reference 236 13 9 1 Detailed Description 236 13 10 mml_gdc_display h File Reference 236 13 10 1 Detailed Description 240 13 11 mml_gdc_erp h File Reference 240 13 11 1 Detailed Descripti...

Page 10: ...2 2 Macro Definition Documentation 253 13 23 ut_class_surface h File Reference 254 13 23 1 Detailed Description 254 13 24 ut_class_window h File Reference 254 13 24 1 Detailed Description 254 13 25 ut_compatibility h File Reference 255 13 25 1 Detailed Description 255 13 26 ut_compression h File Reference 256 13 26 1 Detailed Description 256 13 27 ut_memman h File Reference 256 13 27 1 Detailed De...

Page 11: ...F5JAA S6E2D5 S6E2D55G0A S6E2D55GAA S6E2D55GJA S6E2D55J0A S6E2D55JAA S6E2D3 S6E2D35G0A S6E2D35GAA S6E2D35GJA S6E2D35J0A S6E2D35JAA 1 2 About this Document This document describes the API and usage of the 2D Graphics Driver required to use the 2D Graphics core The document does not describe the required application framework or the usage of other peripherals apart from the 2D Graphics core Please re...

Page 12: ...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 Figure 1 Hardware and software components ...

Page 13: ... the supported platform containing a project file for the respective tool chain e g IAR Embedded Workbench 7 10 or Keil uVision 3 2 How to run an application If the tool chain provides flash support for both internal flash and external hyper flash the tutorial applications can be started from the debugger Otherwise an appropriate flash programmer is required to download the code and image data to ...

Page 14: ...mentation for each module 4 2 Surface Overview 4 2 1 Surface objects The 2D Graphics Driver uses surface objects to store information about video memory blocks representing an image a frame buffer and similar things That means the surface contains the related information about memory address es color format dimension compression format and more The following diagram shows the generic usage of a su...

Page 15: ...al layerId but with different sub_layerIds also specified in the properties of each window Multi Windows that overlap cannot be blended with each other they are drawn opaque i e only the content of the window with the highest sub_layerId is visible Windows that overlap can be drawn opaque only the highest layer is visible or they can be blended using up to 2 blend units Overlapping Windows with th...

Page 16: ...windows represent the second layer Each separate window may be rendered and updated with a different frame rate and color format The green colored windows represent the next layer blend level The red colored windows are the most top windows In this case they show static 4 bpp indexed images and can be independently switched and faded Figure 5 Perspective view to the scene All windows support a min...

Page 17: ...ller Graphic Driver User Manual Doc No 002 04387 Rev A 17 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 ...

Page 18: ...e the resulting pixel data will be stored Depending on the requested operation a SRC DST and MASK surface must also be bound to the context SRC DST and MASK surfaces define the pixel sources for a blit operation A surface object can be associated to a memory address to operate with this memory It is also possible to use a surface without an attached memory address and use it as a blit source In th...

Page 19: ...C 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 Description Pixel Engine Pixel Engine PixENG Please note that the Pixel Engine defined in hardware manuel has a diffrent meaning See glossary PixEng The processing flow for the related...

Page 20: ...trices Each source surface can get its own matrix so different translations for source buffer and blend destination are possible The coordinate center is per default the lower left corner of each surface so a simple copy instruction will copy the source surface to the lower left corner of the store surface Furthermore the connected surfaces STORE SRC DST and MASK can have different properties like...

Page 21: ...PI see the tutorials and the respective sample code that are part of this driver documentation 4 5 Synchronization Overview 4 5 1 Processing Units The S6E2D hardware consists of several independent parallel running units The driver is designed so that applications can use this parallel processing also in single threaded environment The driver distinguishes the following processing pipelines CPU Th...

Page 22: ...nted by the component that owns the graphics processing pipeline For example the Pixel Engine API provides a function to submit a sync condition to the Pixel Engine command queue queue to hold the submitted PixEng operations PixEng operations submitted after the sync will only be executed after the sync condition becomes true Following are a few examples to illustrate the use of sync objects An ap...

Page 23: ...id storing which buffer is currently the foreground buffer This is the draw function for the window including buffer swap and synchronization MM_ERROR draw DOUBLE_BUFFERED_WINDOW pdbWin Return if the last render operation is still ongoing if mmlGdcSyncWait pdbWin sync 0 MML_ERR_GDC_SYNC_TIMEOUT return MML_OK Bind new background buffer to render context mmlGdcPeBindSurface ctx MML_GDC_PE_STORE MML_...

Page 24: ... first blit operation mmlGdcPeSync win_struct sync while Proceed with any non graphics related operations do_anything Call the render routine Note that the draw function will only render new content if a frame swap was executed Otherwise the draw function will return immediately so that do_anything is called again draw win_struct The draw function starts rendering if the previously rendered buffer...

Page 25: ...display controller to avoid tearing A simple technique is to do the rendering completely in the blanking period of the display as demonstrated in the Speedometer sample A more sophisticated approach splits the frame buffer into several regions and updates only the region that is currently not read by the display controller as demonstrated in the Chart sample See Synchronization API for details 4 6...

Page 26: ...lso have access to the VRAM 4 7 3 Flash Memory Program code and image data are typically read from embedded or external flash memory In most of the example applications the embedded flash is used for code and external hyper flash for data used by the graphics engine RES_SECTION This is accomplished by a linker directive see flash_resource h 4 7 4 Physical Address Virtual Address In this document i...

Page 27: ...ages the display coordinate system always starts at the top left pixel 4 8 3 PixEng coordinates For compatibility reasons the PixEng coordinate system starts per default with the bottom left pixel Note The very first pixel starts at 0 0 0 0 and ends at 1 0 1 0 That means the geometrical center of this pixel is 0 5 0 5 The following image is the result of a copy instruction of the 4 3 pixel image a...

Page 28: ... functions are basically similar to other 3D render APIs like OpenGL However the depth information is not used so the 2D Graphics Driver API does not support this matrix format An application can anyway use these helper functions for the view calculation because the matrix result can be converted into a 3x3 matrix by removing the depth z parts from the matrix The following example shows the requir...

Page 29: ... core HW can read and write this format Maximum buffer size can be calculated 1 Lossy compression Rotation or mirroring is not supported A compressed buffer must not exceed the window dimension Compression of source images with size limitation 4 9 1 1 Calculation of required buffer size for RLAD compression The following formula can be used to calculate the maximal required buffer size pixel_size ...

Page 30: ...x pointer the image can store a defined maximum of different colors Beside the index pointer the image buffer may also contain alpha bits The sum of alpha and index bits must be 1 2 4 16 24 or 32 The index bits must start at bit position 0 The following table shows some possible pixel buffer color formats for indexed images Only the size of red channel in a surface defines the index width The gree...

Page 31: ...ies 0 63 layers 2 and 3 use 64 127 and so on Note The driver does not check this rule If the application binds surfaces with different palettes to windows sharing the same hardware palette a wrong image will be the result Like other settings also palettes are shadowed It means you can commit the binding of a new indexed image surface with a new palette while an old one is still visible If sub laye...

Page 32: ...hannel of the color buffer in this case Frame buffer A frame buffer is an image buffer that is typical first used as render target and afterwards it s content will be shown on a connected display Indexed image An indexed image does not store for each color a separate RGB A value but a single index value This index value points to a color look up table with up to 256 RGB A values that will be used ...

Page 33: ... pre multiplied image Required blend formula C Csrc Cdst 1 Asrc Expected blend result RLA Abbreviation for Run Length Adaptive This is a lossless compression type of an image supported by the 2D Graphics hardware RLAD Abbreviation for Run Length Adaptive Dithering This is a lossy compression type of an image supported by the 2D Graphics hardware RLAD_Uniform Abbreviation for Run Length Adaptive Di...

Page 34: ... a layer Different to layers it is not possible to blend overlapping sub layers together if they share the same layer id Only the top most sub layer image pixel will be read from memory and this color information will be used for the layer blend operation Surface Surface stands for an memory object describing one or more memory blocks describing an image Many 2D Graphics Driver API calls use surfa...

Page 35: ... 3 Restrictions Please note that the sample code for this release may differ from the final version Especially the usage of synchronization instructions might not always represent the final version 6 4 Tutorial chapters The Tutorial 1 Surfaces_Blit_Display Basic show the basic steps to use the 2D Graphics Driver It starts explaining surface objects executes some simple graphical operations to fill...

Page 36: ...pixel for each color channel red green blue alpha A lot of common color formats are pre defined for example MML_GDC_SURF_FORMAT_R8G8B8A8 32 bits per pixel 8 bits for each channel MML_GDC_SURF_FORMAT_R5G6B5 16 bits per pixel 5 bits for red 6 bits for green 5 bits for blue MML_GDC_SURF_FORMAT_RGB8 8 bit per pixel for red green and blue which means 256 gray scale values MML_GDC_SURF_FORMAT_RGB1 1 bit...

Page 37: ...SurfaceObject We use MML_GDC_SURF_FORMAT_R5G6B5 as the color format which means 5 bits for red channel 6 bits for green channel 5 bits for blue channel We use 0 0 255 255 pure blue non transparent as the constant color for the store surface To setup the blit path the context has to be reset and the store surface is bound to MML_GDC_PE_STORE mmlGdcPeFill finally fills the store surface with the giv...

Page 38: ... added to the context mmlGdcPeBlt copies the image to the store surface at position 20 20 initialization of surfSrc mmlGdcSmResetSurfaceObject surfSrc CopyToVram black_and_white MM_U32 vImgAddr imgSize use the black and white format UTIL_SUCCESS ret mmlGdcSmAssignBuffer surfSrc imgWidth imgHeight MML_GDC_SURF_FORMAT_RGB1 vImgAddr 0 add it to the context as source UTIL_SUCCESS ret mmlGdcPeBindSurfa...

Page 39: ... the existing content of the store surface is overwritten in that area re use the source surface for the pattern mmlGdcSmResetSurfaceObject surfSrc UTIL_SUCCESS ret mmlGdcSmAssignBuffer surfSrc patternWidth patternHeight MML_GDC_SURF_FORMAT_R8G8B8A8 void patternAddr 0 create the pattern directly to VRAM CreatePattern MM_U32 patternAddr patternSize patternWidth patternHeight add it to the context a...

Page 40: ... Microcontroller Graphic Driver User Manual Doc No 002 04387 Rev A 40 for y 0 y height y red 255 2 x green y 4 blue 0 alpha 255 MM_U32 addr 4 y width x red 24 green 16 blue 8 alpha MM_GDC_UNLOCK addr Figure 15 Pattern on Black White image on constant color ...

Page 41: ..._GDC_PE_SRC 255 0 0 255 UTIL_SUCCESS ret mmlGdcPeBindSurface ctx MML_GDC_PE_STORE MML_GDC_PE_DST surfStore UTIL_SUCCESS ret mmlGdcPeBlt ctx 50 0f 70 0f Figure 16 Blended text 6 5 8 Bring it to the display To see the surface on the display we need a to create a display object by calling mmlGdcDispOpenDisplay Beside this a window is required using mmlGdcDispWinCreate Finally our surfStore must be se...

Page 42: ...t 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 Expected result 6 6 1 1 Learning Goals The following techniques and features are used Blend 4 layers with pixel based alphas and different color formats Fade a layer Move a layer Switch buffers Use multi layer f...

Page 43: ...es an acceptable memory requirement Note Compression cannot be used for this window because it is multi layer window LAYER 2 sPosition 32 32 32 bit per pixel RGBA The layer will be faded in and out LAYER 3 sArrow sArrow_l sArrow_r about 40 50 1 and 2 bit per pixel Alpha The image does not include any color data but only transparency The limited number of layer blend units requires using the multi ...

Page 44: ...ition UTIL_SUCCESS ret mmlGdcSmResetSurfaceObject sArrow We load the surfaces for the example using a utility function The utility function sets all the related properties including compression parameter First we load the the map surface with 1024 1024 pixel resolution Of course we will read only a part if we use it as layer in this example UTIL_SUCCESS ret utSurfLoadBitmap sMap map2d MM_FALSE Now...

Page 45: ...ayerId MML_GDC_DISP_SUB_LAYER_DEFAULT sub layer default means the driver will assign the sub window order The first opened window is the bottom most UTIL_SUCCESS ret mmlGdcDispWinCreate display winprop wFrame sPosition winprop topLeftX CENTER_X 16 winprop topLeftY CENTER_Y 16 winprop width 32 winprop height 32 winprop features MML_GDC_DISP_FEATURE_MULTI_LAYER winprop layerId MML_GDC_DISP_LAYER_1 U...

Page 46: ...etBlendMode wFrame MML_GDC_DISP_BLEND_SOURCE_ALPHA MML_GDC_DISP_BLEND_SOURCE_MULTIPLY_ALPHA UTIL_SUCCESS ret mmlGdcDispWinSetAttribute wFrame MML_GDC_DISP_WIN_ATTR_COLOR 0x80FFFFFF UTIL_SUCCESS ret mmlGdcDispWinCommit wFrame The related properties required for the compression were already assigned to the surface in the utSurfLoadBitmap function In this case the RLA compression is used because it s...

Page 47: ...C_DISP_WIN_ATTR_COLOR 0x0000FFFF In the animation loop we simple change the arrow switch winker case 1 surfArrow sArrow_l break case 0 surfArrow sArrow break case 1 surfArrow sArrow_r break Some 2D core drivers use layer rotation at this position to animate the arrow We cannot use simple rotation while using sub windows but we can change the image So the following matrix calculation just moves the...

Page 48: ...tical arranged windows Each window prepares 2 frame buffers that will be used as foreground and background buffer A blit context And a sync object A structure for each window keeps all important variables to control the window struct DOUBLE_BUFFERED_WINDOW MML_GDC_DISP_WINDOW win the window handle MML_GDC_SURFACE_CONTAINER sFramebuffer 2 two buffers described in surface objects MML_GDC_SYNC_CONTAI...

Page 49: ...inish A better way is to use a sync object UTIL_SUCCESS ret mmlGdcPeSync pdbWin sync UTIL_SUCCESS ret mmlGdcDispWinWaitSync pdbWin win pdbWin sync UTIL_SUCCESS ret mmlGdcDispWinSetSurface pdbWin win MML_GDC_DISP_BUFF_TARGET_COLOR_BUFF pdbWin sFramebuffer pdbWin id UTIL_SUCCESS ret mmlGdcDispWinCommit pdbWin win It requests a sync object from the pixel engine and pushes it to the window pipe before...

Page 50: ...t button the bShowDrawRects property can be toggled which draws different rectangles to visualize the drawing areas The sample uses a single buffer render mode However different to the Chart sample this demo uses only the blanking period of the panel timing That s why it is important to use very fast render operations Figure 19 Expected result 6 8 2 Learning Goals The following techniques and feat...

Page 51: ...on utSurfCreateBuffer only supports common color formats we create our own function CreateCommentSurface static MM_ERROR CreateCommentSurface MML_GDC_SURFACE sComment MM_ERROR ret MML_OK void vp vp mmlGdcVideoAlloc BGR_WIDTH BGR_HEIGHT 4 8 0 NULL if vp NULL return MML_ERR UTIL_SUCCESS ret mmlGdcSmResetSurfaceObject sComment mmlGdcSmSetAttribute sComment MML_GDC_SURF_ATTR_WIDTH BGR_WIDTH mmlGdcSmSe...

Page 52: ...BGR_WIDTH BGR_HEIGHT MML_GDC_SURF_FORMAT_R6G6B6 6 8 5 Matrix operations to scale rotate and translate images All geometry changes such as translation rotation sharing scaling and mirroring in the blit path are based on matrix settings The application can calculate such matrices on its own or by using the utility functions from the driver The x y offset in the mmlGdcPeBlt function can be used for s...

Page 53: ...utMat3x2LoadIdentity mat 0 we have 7 sources so we can simply handle it in an array for i 1 i 7 i UTIL_SUCCESS ret mmlGdcSmResetSurfaceObject sSrc i UTIL_SUCCESS ret utSurfLoadBitmap sSrc i mysrc i name MM_FALSE prepare matrix array for surfaces utMat3x2LoadIdentity mat i align the rotation centers of surfaces utMat3x2Translate mat i MM_FLOAT utSurfWidth sSrc i 0 5f mysrc i fCenterY The rotation a...

Page 54: ... Next the rotated needle is drawn Finally the hub is drawn Set target to sNeedle surface and enable blending with MML_GDC_PE_DST UTIL_SUCCESS ret mmlGdcPeBindSurface ctx MML_GDC_PE_STORE MML_GDC_PE_DST sNeedle while TRUE Clear the last frame UTIL_SUCCESS ret mmlGdcPeColor ctx 0 0 0 0 UTIL_SUCCESS ret mmlGdcPeFill ctx 0 0 BGR_WIDTH BGR_HEIGHT Draw the rotated needle UTIL_SUCCESS ret mmlGdcPeBindSur...

Page 55: ...d needle to store UTIL_SUCCESS ret mmlGdcPeBindSurface ctx MML_GDC_PE_STORE sNeedle UTIL_SUCCESS ret mmlGdcPeBindSurface ctx MML_GDC_PE_DST sSrc BMP_NEEDLE UTIL_SUCCESS ret mmlGdcPeBindSurface ctx MML_GDC_PE_SRC sSrc BMP_HUB UTIL_SUCCESS ret mmlGdcPeSetMatrix ctx MML_GDC_PE_SRC MML_GDC_PE_GEO_MATRIX_FORMAT_3X2 mat BMP_HUB We have to render the combined bounding box of needle and hub in this case U...

Page 56: ...SS ret mmlGdcPeBindSurface ctx MML_GDC_PE_SRC sSrc BMP_HUB UTIL_SUCCESS ret mmlGdcPeSetMatrix ctx MML_GDC_PE_SRC MML_GDC_PE_GEO_MATRIX_FORMAT_3X2 mat BMP_HUB but we render the whole target buffer in one step UTIL_SUCCESS ret mmlGdcPeSelectArea ctx MML_GDC_PE_STORE while TRUE Blend the hub over rotated needle but we draw the whole target frame so we don t need to clear the buffer UTIL_SUCCESS ret m...

Page 57: ...while TRUE UTIL_SUCCESS ret mmlGdcPeSetMatrix ctx MML_GDC_PE_DST MML_GDC_PE_GEO_MATRIX_FORMAT_3X2 mat BMP_NEEDLE Blend the hub over rotated needle UTIL_SUCCESS ret mmlGdcPeBlt ctx MM_FLOAT BGR_WIDTH 0 5f MM_FLOAT ROT_CENTER_Y Determine draw box for the current frame UTIL_SUCCESS ret mmlGdcPeGetDrawBox ctx x y w h MM_TRUE and assign it as active area to the target for the next frame This box includ...

Page 58: ...r our samples has a size of 480 272 pixels The sample should use a high quality render buffer requiring an alpha channel If we want to use at least 6 bit for all color and the alpha channel we need 480 272 24 2 8 765 kByte That means double buffering is not possible for such a resolution and color format To render such targets anyway it is possible to use a single buffer render mode In single buff...

Page 59: ... 75 clock cycles to render one frame For a 160 MHz clocked blit engine it requires about 5 ms or 1 3 frame if we use a 60 Hz panel In practice the render time will be much longer because the cylinderical bitmap used to blit the bars will be read from external flash and access to external resources are not as fast as VRAM access To see the render time of about 5 ms you can simple change the line UT...

Page 60: ...SS ret mmlGdcPeWaitForDispFrameEnd s_display s_nSyncPoint UTIL_SUCCESS ret Render s_display GetHeight s_nSyncPoint s_nSyncPoint UTIL_SUCCESS ret mmlGdcPeWaitForDispFrameEnd s_display s_display GetHeight UTIL_SUCCESS ret Render 0 s_display GetHeight s_nSyncPoint The first instruction is a wait instruction for the line position s_nSyncPoint Then we render the buffer part above the sync point Now we ...

Page 61: ...to force a wrong splitting and see the render issues The left key can be used to switch off the background animation You can see a relaxed render time in that case 6 9 1 6 Render tricks The following render tricks are used for this sample Background animation Two rotated and up scaled buffers with weak alpha value generate the background animation Mask buffer multiplication To draw the diagram it ...

Page 62: ...e double buffer technique 6 10 2 2 Matrix Calculation The driver supports an 3 2 matrix It allows to translate rotate scale and share an bitmap However to simplify the development task we decide to make the matrix calculation with a 4 4 matrix first This is a matrix format that is well documented because it is used for many OpenGL applications A matrix calculation like this for the circle mode can...

Page 63: ...f Now the post matrix Translate it to 1 1 The center point is now 0 0 utMat4x4Translate m_m44Post 1 0f 1 0f 0 Scale the cover bitmap of a size 0 2 utMat4x4Scale m_m44Post float 2 COVER_SIZE float 2 COVER_SIZE 1 0f As described all operations must be calculated for each frame for each cover To reduce the effort it is spit into 3 parts The pre and post matrix is constant over the scene That s why it...

Page 64: ...itmaps For this reason we calculate a z value of the center of each bitmap manually by using the 4 4 matrix utMat4x4GetXYZ mat44 0 COVER_SIZE 2 COVER_SIZE 2 0 fX fY fZ To sort the draw order we just sort a list of all bitmaps qsort positions 0 size_t positions size sizeof positions 0 CompareFnc The compare function is int Coverflow CompareFnc const void arg1 const void arg2 Coverflow COVERPOS p1 C...

Page 65: ...es like Movements Rotation Alpha blend Alpha masking Color matrix modification 6 12 Tutorial Simple Drawing 6 12 1 Summary This is a more complex example that draws lines circles rectangles and text The example shows how complex features can be achieved in software by combining simple features supported by the hardware Draw lines with different widths and line ends Draw circles and points Draw rec...

Page 66: ...ateBuffer target i windowProp width windowProp height MML_GDC_SURF_FORMAT_R5G6B5 We want to print some information on the screen We can set up a font by using the utility functions of this tutorial with the code Load a font bitmap mmlGdcSmGenSurfaceObjects 1 sFont UTIL_SUCCESS ret utSurfLoadBitmap sFont courier_12 MM_FALSE Set it as font for the util lib utSetFont utCtx sFont Then we create a poin...

Page 67: ...alize a point bitmap UTIL_SUCCESS ret utInitPoint utCtx 50 6 12 2 2 Doing the animation Now begin with the animation slightly different scenes 360 times First clear the screen Clear the whole frame You should optimize and only redraw the changed parts UTIL_SUCCESS ret utRect utCtx 0 0 320 240 Then draw a rounded rectangle with a border Now we draw a RoundRect with border The simplest way is to dra...

Page 68: ...to round utLineEnd putCtx UT_LINE_END_BUTT px 5 py 0 The the paint color utColor putCtx 255 255 255 255 Change the line width to 0 5 pixel utLineWidth putCtx 0 6f Print a text as comment UTIL_SUCCESS ret utTextOut putCtx MM_S32 px MM_S32 py Width 0 6 cx 30 px cy 50 py Draw lines in a loop for f 0 f 180 f 9 0f c 30 cosf f DegreeToPI s 30 sinf f DegreeToPI UTIL_SUCCESS ret utLinef putCtx cx c cy s c...

Page 69: ...greeToPI UTIL_SUCCESS ret utLinef putCtx cx c cy s cx c cy s px 80 utLineWidth putCtx 2 0f UTIL_SUCCESS ret utTextOut putCtx MM_S32 px MM_S32 py Width 2 0 cx 30 px cy 50 py for f 0 f 180 f 9 0f c 30 cosf f DegreeToPI s 30 sinf f DegreeToPI UTIL_SUCCESS ret utLinef putCtx cx c cy s cx c cy s return ret 6 12 3 2 Drawpoints Draws 12 points with different sizes using the utility function Now paint for...

Page 70: ...it Microcontroller Graphic Driver User Manual Doc No 002 04387 Rev A 70 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 ...

Page 71: ...pt Controller API Error Reporting API Error Codes Basic Graphics Type Definitions Version Numbers Type Definition Macro Definition Tutorial Utility Library Utilities for the Memory Management Utility functions for matrix calculations Utilities for the compatibility with other drivers Utilities for the Surface Management Utilities for the compression Utilities for RLA run length adaptive compressio...

Page 72: ...ally RLAD BitStream CCtx CDevice CDisplay CMenuItem CSurface NUM_BUFFERS CSurface 1 CTextWindow CMenu CWindow CSurfaceWindow NUM_BUFFERS CSurfaceWindow 1 CStaticSurfaceWindow RLAD Frame MML_GDC_DISP_MODE_LINE MML_GDC_DISP_PROPERTIES MML_GDC_DISP_TCON_PROPERTIES MML_GDC_DISP_WINDOW_PROPERTIES MML_GDC_PE_CONTEXT_CONTAINER MML_GDC_SURFACE_CONTAINER MML_GDC_SYNC_CONTAINER MML_GDC_SYSINIT_INFO RLAD Pac...

Page 73: ...ef descriptions RLAD BitStream CCtx CDevice CDisplay CMenu CMenuItem CStaticSurfaceWindow CSurface NUM_BUFFERS CSurfaceWindow NUM_BUFFERS CWindow RLAD Frame MML_GDC_DISP_MODE_LINE MML_GDC_DISP_PROPERTIES MML_GDC_DISP_TCON_PROPERTIES MML_GDC_DISP_WINDOW_PROPERTIES MML_GDC_PE_CONTEXT_CONTAINER MML_GDC_SURFACE_CONTAINER MML_GDC_SYNC_CONTAINER MML_GDC_SYSINIT_INFO RLAD Package RLAD Frame Pixel RLAD ...

Page 74: ... Reporting API mm_gdc_errors h Error Codes for the Basic Graphics modules mm_gdc_module_id h Basic Graphics module ids common mm_gdc_version h Basic Graphics Driver Version Numbers mm_types h Basic type definitions mmd_gdc_interrupthandler h 2D Core Interrupt Controller API mml_gdc_config h Controls global graphics driver and hardware configurations mml_gdc_display h Display API mml_gdc_erp h Erro...

Page 75: ...mple menu ut_class_rlad h 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 ut_class_surface h This class abstracts MML_GDC_SURFACE objects ut_class_window h This class abstracts windows ut_compatibility h This file defines some interfaces that are part of other drivers The util library implements very ...

Page 76: ...isplay API The Display API exposes all the hardware features of the display unit See also Display Overview Pixel Engine API Pixel Engine PixEng API Synchronization API Synchronization API Synchronization of framebuffer operations 2D Core Interrupt Controller API 2D Core Interrupt Controller handler functions Error Reporting API Error Reporting API Error Reporting for selected modules and level Err...

Page 77: ...etInstructionBuffer void address MM_U32 size Default initializer define MML_GDC_SYSINIT_INITIALIZER Resource names define MM_GDC_RES_DISP0 1U 0U define MM_GDC_RES_LAYER0 1U 1U define MM_GDC_RES_LAYER1 1U 2U define MM_GDC_RES_FETCH_DECODE0 1U 3U define MM_GDC_RES_FETCH_LAYER0 1U 4U 11 2 1 Detailed Description The Driver Initialization API exposes functions to initialize and un initialize the driver...

Page 78: ...ss MM_U32 size Assign internal VRAM for command queue Note The command queue is required to buffer the render instructions to allow a non blocking API handling The required instruction buffer size depends on the amount and complexity of the render instructions and which synchronization instructions are used A recommended size is 8 kByte To get information about the instruction buffer usage an appl...

Page 79: ...te will result in error MML_GDC_CONFIG_ATTR_MINOR_VERSION Returns the minor version of the driver This is a read only attribute Setting this attribute will result in error MML_GDC_CONFIG_ATTR_BUILD_VERSION Returns the build version of the driver This is a read only attribute Setting this attribute will result in error MML_GDC_CONFIG_ATTR_MIN_INSTRUCTION_BUFFER This attribute is only available in m...

Page 80: ...ibute Setting this attribute will result in error 11 3 2 Function Documentation 11 3 2 1 MM_ERROR mmlGdcConfigGetAttribute MML_GDC_CONFIG_ATTR pname MM_U32 pParam Gets the current value of a graphics library attribute See MML_GDC_CONFIG_ATTR for a list of attributes Parameters in pname Name of the attribute to get See MML_GDC_CONFIG_ATTR out pParam Address where the read value of the attribute is ...

Page 81: ...SURF_FORMAT_R8G8B8A8 0x00 MML_GDC_SURF_FORMAT_A8B8G8R8 MML_GDC_SURF_FORMAT_A8R8G8B8 MML_GDC_SURF_FORMAT_B8G8R8A8 MML_GDC_SURF_FORMAT_R8G8B8X8 MML_GDC_SURF_FORMAT_X8B8G8R8 MML_GDC_SURF_FORMAT_X8R8G8B8 MML_GDC_SURF_FORMAT_R8G8B8 MML_GDC_SURF_FORMAT_B8G8R8 MML_GDC_SURF_FORMAT_R6G6B6 MML_GDC_SURF_FORMAT_R4G4B4A4 MML_GDC_SURF_FORMAT_A4R4G4B4 MML_GDC_SURF_FORMAT_R5G5B5A1 MML_GDC_SURF_FORMAT_A1R5G5B5 MML...

Page 82: ..._ATTR_COMPRESSION_FORMAT MML_GDC_SURF_ATTR_RLAD_MAXCOLORBITS MML_GDC_SURF_ATTR_SIZEINBYTES MML_GDC_SURF_ATTR_CLUTMODE MML_GDC_SURF_ATTR_CLUTCOUNT MML_GDC_SURF_ATTR_CLUTBITPERPIXEL MML_GDC_SURF_ATTR_CLUTCOLORBITS MML_GDC_SURF_ATTR_CLUTCOLORSHIFT MML_GDC_SURF_ATTR_CLUTBUFFERADDRESS MML_GDC_SURF_ATTR_CLUTBUFFER_PHYS_ADDRESS MML_GDC_SURF_ATTR_SURF_FORMAT MML_GDC_SURF_ATTR_USERDEFINED Functions MM_ERRO...

Page 83: ...MML_GDC_SURF_ATTR_HEIGHT MML_GDC_SURF_ATTR_BITPERPIXEL MML_GDC_SURF_ATTR_COLORBITS and MML_GDC_SURF_ATTR_COLORSHIFT Optionally a color lookup table can be defined for the image A color lookup table is a list with a defined number of red green blue and optionally alpha values If an index table is defined for an image the blue and green color parts if the image are not longer used but the red compon...

Page 84: ... images inside the VRAM While setting a virtual address the physical address will be overwritten MML_GDC_SURF_ATTR_PHYS_ADDRESS Physical base address initial 0 Note Can be used to read image buffers direct from NOR flash While setting a physical address the virtual address will be overwritten MML_GDC_SURF_ATTR_BASE_ADDRESS2 Not used for S6E2D Virtual base address of the UV buffer initial 0 MML_GDC...

Page 85: ...or this operation MML_GDC_SURF_ATTR_SIZEINBYTES Buffer size in bytes initial 0 Note This value must be set for images with compression type MML_GDC_SURF_COMP_RLC and MML_GDC_SURF_COMP_RLA The size can be set to zero for all other image types If size is zero mmlGdcSmGetAttribute will return the following size depending of the given compression type MML_GDC_SURF_COMP_NON required buffer size Height ...

Page 86: ...B5 MML_GDC_SURF_CLF_A4R4G4B4 A4R4G4B4 11 4 4 3 enum MML_GDC_SURF_CLM Mode definition for color lookup table Enumerator MML_GDC_SURF_CLM_NEUTRAL Module in neutral mode input data is bypassed to the output MML_GDC_SURF_CLM_INDEX_RGB Module in color index table mode LUT holds a R G B color value indexed with the red input color MML_GDC_SURF_CLM_INDEX_RGBA Module in color index table mode LUT holds a ...

Page 87: ...B0 G0 R0 A1 B1 G1 R1 RGB8A8 Byte 0 1 2 3 Color A0 RGB0 A1 RGB1 The memory organisation is described with below Enumerator MML_GDC_SURF_FORMAT_R8G8B8A8 32 bpp RGBA format MML_GDC_SURF_FORMAT_A8B8G8R8 32 bpp ABGR format MML_GDC_SURF_FORMAT_A8R8G8B8 32 bpp ARGB format MML_GDC_SURF_FORMAT_B8G8R8A8 32 bpp BGRA format MML_GDC_SURF_FORMAT_R8G8B8X8 32 bpp RGB format MML_GDC_SURF_FORMAT_X8B8G8R8 32 bpp BGR...

Page 88: ...GB1 1 bpp back white buffer no alpha 11 4 5 Function Documentation 11 4 5 1 MM_ERROR mmlGdcSmAssignBuffer MML_GDC_SURFACE surf MM_U32 uWidth MM_U32 uHeight MML_GDC_SURF_FORMAT eFormat void pBufferAddress MM_U32 uRleWords Assign a memory address width height and color format representing an image to a surface object The buffer is owned by the calling function It just describes how the image buffer ...

Page 89: ...nd MML_GDC_SURFACE_MAX_HEIGHT 11 4 5 2 MM_ERROR mmlGdcSmAssignClut MML_GDC_SURFACE surf MML_GDC_SURF_CLM eMode MM_U32 uCount MML_GDC_SURF_CLF eFormat void pBufferAddress Assign a color lookup table to a surface It points to a VRAM memory address owned by the application The application must ensure that the memory is available as long as the surface is still in use and that the memory block is larg...

Page 90: ...OR mmlGdcSmResetSurfaceObject MML_GDC_SURFACE surf Reset a surface object with default values Parameters in out surf The surface to reset Return values MML_OK On success otherwise the related error code 11 4 5 5 MM_ERROR mmlGdcSmSetAttribute const MML_GDC_SURFACE surf MML_GDC_SURF_ATTR eName MM_U32 uValue Set surface attributes The application must ensure that the parameters like stride height siz...

Page 91: ..._GDC_DISP_MODE MML_GDC_DISP_SINGLE_SCREEN 0 MML_GDC_DISP_DUAL_SCREEN MML_GDC_DISP_DUAL_VIEW enum MML_GDC_DISP_OUTPUT_SCREEN MML_GDC_DISP_OUTPUT_SCREEN_PRIMARY 0 MML_GDC_DISP_OUTPUT_SCREEN_SECONDARY MML_GDC_DISP_OUTPUT_SCREEN_BOTH enum MML_GDC_DISP_FILTER MML_GDC_DISP_FILTER_NEAREST 0 MML_GDC_DISP_FILTER_BILINEAR enum MML_GDC_DISP_TILE_MODE MML_GDC_DISP_TILE_MODE_ZERO 0 MML_GDC_DISP_TILE_MODE_CONST...

Page 92: ...C_DISP_DITHER106 0x06060600 MML_GDC_DISP_DITHER105 0x05060500 enum MML_GDC_DISP_CLUT_FORMAT MML_GDC_DISP_CLUT_FORMAT_33 33 enum MML_GDC_DISP_CMATRIX_FORMAT MML_GDC_DISP_CMATRIX_FORMAT_4X3 0 MML_GDC_DISP_CMATRIX_FORMAT_5X4 enum MML_GDC_DISP_ATTR MML_GDC_DISP_ATTR_OUTPUT_CONTROLLER 0 MML_GDC_DISP_ATTR_X_RESOLUTION MML_GDC_DISP_ATTR_Y_RESOLUTION MML_GDC_DISP_ATTR_BUFF_ERR MML_GDC_DISP_ATTR_BACKGROUND...

Page 93: ...1U 2 define MML_GDC_DISP_RGB_LOW 0 define MML_GDC_DISP_RGB_HIGH 1U 3 Default initializer define MML_GDC_DISP_PROPERTIES_INITIALIZER define MML_GDC_DISP_WINDOW_PROPERTIES_INITIALIZER Display Functions MM_ERROR mmlGdcDispOpenDisplay MML_GDC_DISP_PROPERTIES mode MML_GDC_DISPLAY display MM_ERROR mmlGdcDispCloseDisplay MML_GDC_DISPLAY display MM_ERROR mmlGdcDispDitherCtrl MML_GDC_DISPLAY display MML_GD...

Page 94: ...OW win 11 5 1 Detailed Description The Display API exposes all the hardware features of the display unit See also Display Overview include mml_gdc_display h The software interface provides 2 objects required to use and control the display unit The MML_GDC_DISPLAY is a software handle for a hardware display controller and is required to Set up video modes Configure dithering or gamma correction The...

Page 95: ...ts the available feature types and there restrictions Window Feature Comment Restrictions MML_GDC_DISP_FEATURE_IN DEX_COLOR The window can show an indexed image MML_GDC_DISP_FEATURE_D ECODE The window can display a RLE or RLAD buffer The surface must not be mirrored rotated if compression is used Cannot be combined with MML_GDC_DISP_FEATURE_MULTI_LAY ER Only 2 windows with this feature are availab...

Page 96: ...UFF_TARGET_COLOR_BUFF 1 1 Color buffer as target buffer 11 5 2 7 define MML_GDC_DISP_DE_HIGH 1U 2 Data enable signal high active 11 5 2 8 define MML_GDC_DISP_DE_LOW 0 Data enable signal low active 11 5 2 9 define MML_GDC_DISP_FEATURE_DECODE 1 1 Show encoded images 11 5 2 10 define MML_GDC_DISP_FEATURE_INDEX_COLOR 1 0 Indexed color support 11 5 2 11 define MML_GDC_DISP_FEATURE_MULTI_LAYER 1 7 The w...

Page 97: ...R Enumeration of the different configuration attributes for display controllers Enumerator MML_GDC_DISP_ATTR_OUTPUT_CONTROLLER Display controller used for the display see MML_GDC_DISP_CONTROLLER This attribute can only be read MML_GDC_DISP_ATTR_X_RESOLUTION Horizontal resolution This attribute can only be read MML_GDC_DISP_ATTR_Y_RESOLUTION Vertical resolution This attribute can only be read MML_G...

Page 98: ...t 20 array with 5 column and 4 lines 11 5 4 4 enum MML_GDC_DISP_CONTROLLER Enumeration of display controllers Enumerator MML_GDC_DISP_CONTROLLER_0 Display controller 0 11 5 4 5 enum MML_GDC_DISP_DCK_DELAY_ENABLE Display clock delay disable enable flags Enumerator MML_GDC_DISP_DCK_DELAY_OFF Disable the display clock delay MML_GDC_DISP_DCK_DELAY_ON Enable the display clock delay 11 5 4 6 enum MML_GD...

Page 99: ...to specify dithering output format of RGB 10x10x10 5x6x5 11 5 4 9 enum MML_GDC_DISP_DITHER_MODE Dither mode Enumerator MML_GDC_DISP_TEMPDITH Flag to specify temporal dithering MML_GDC_DISP_SPATDITH Flag to specify spatial dithering 11 5 4 10 enum MML_GDC_DISP_DITHER_RANGE Dither range Enumerator MML_GDC_DISP_DITHRS11LOW Flag to specify dither range add 0s to lower bits 11 5 4 11 enum MML_GDC_DISP_...

Page 100: ...UT_SCREEN_SECONDARY Show layer on secondary screen implies using dual screen mode see MML_GDC_DISP_PROPERTIES MML_GDC_DISP_OUTPUT_SCREEN_BOTH Show layer on both screens implies using dual screen mode see MML_GDC_DISP_PROPERTIES 11 5 4 15 enum MML_GDC_DISP_SUB_LAYER Enumeration of sub layers for windows with feature MML_GDC_DISP_FEATURE_MULTI_LAYER Enumerator MML_GDC_DISP_SUB_LAYER_DEFAULT Window i...

Page 101: ... MML_GDC_DISP_WIN_ATTR_SUB_LAYER_ID Sub layer used for the window MML_GDC_DISP_SUB_LAYER_1 MML_GDC_DISP_SUB_LAYER_8 or MML_GDC_DISP_SUB_LAYER_DEFAULT if feature MML_GDC_DISP_FEATURE_MULTI_LAYER is not used for the window This attribute can only be read MML_GDC_DISP_WIN_ATTR_TOPLEFT_X Top left X coordinate of the window on the display Note To set a negative value for X use the following formula val...

Page 102: ...r each other using mmlGdcDispWinSetSurface and mmlGdcDispWinCommit The default value 1 The minimum allowed value 1 0 is possible but results in display flicker The maximum allowed value 2 31 1 MML_GDC_DISP_WIN_ATTR_MAX_BUFFER Defines the maximum number of framebuffers that can be queued by the driver for a window If an application submits surfaces using mmlGdcDispWinSetSurface and mmlGdcDispWinCom...

Page 103: ...ontroller e g for gamma correction The format MML_GDC_DISP_CLUT_FORMAT_33 defines 33 sample points representing the resulting color channel intensity Intermediate values will be interpolated by the HW The 1st sample point corresponds to input color code 0 2nd one to 32 last one to 1024 of the 10 bit 2D core internal processing pipeline Although input 1024 is not possible the last sample point is n...

Page 104: ...rray depends on format Return values MML_OK On success MML_ERR_GDC_DISP_INVALID_ARG If an invalid argument was passed 11 5 5 3 MM_ERROR mmlGdcDispCommit MML_GDC_DISPLAY display The display related setting modification will not be active immediately The mmlGdcDispCommit submits these settings for processing By default this function is blocked until previous operations of device display are complete...

Page 105: ...DC_DISPLAY returned from a previous call to mmlGdcDispOpenDisplay in enable Enable Dithering MML_GDC_DISP_DITHOFF Disable dithering MML_GDC_DISP_DITHON Enable dithering in mode Select mode for dithering MML_GDC_DISP_TEMPDITH Temporal dithering MML_GDC_DISP_SPATDITH Spatial dithering in range Sets dither range MML_GDC_DISP_DITHRS11LOW adds 0s to lower bits in format Select output format for ditheri...

Page 106: ...success MML_ERR_GDC_DISP_INVALID_ARG If an invalid argument was passed MML_ERR_GDC_DISP_DISPLAY_ALREADY_OPEN If the display is already opened MML_ERR_GDC_DISP_DEV_BUSY If the writing to the device display is denied because the previous close call is not completely executed e g shadow load request is pending Call again later 11 5 5 7 MM_ERROR mmlGdcDispSetAttribute MML_GDC_DISPLAY display MML_GDC_D...

Page 107: ...FF Return values MML_OK On success MML_ERR_GDC_DISP_INVALID_ARG If a parameter is invalid 11 5 5 9 MM_ERROR mmlGdcDispWinCommit MML_GDC_DISP_WINDOW win All window related updates will be written in a work item mmlGdcDispWinCommit submit the work item of a window for processing By default this function is blocked until previous operations of device window are completely executed Use mmlGdcConfigSet...

Page 108: ... which specifies the properties of the window to create out pWin On success will contain an MML_GDC_DISP_WINDOW Return values MML_OK On success MML_ERR_GDC_DISP_LAYER_ALREADY_USED if the specified layer is already in use MML_ERR_GDC_DISP_INVALID_ARG If an invalid argument was passed MML_ERR_GDC_DISP_FAILED If internal error occurred MML_ERR_GDC_DISP_DEV_BUSY If the writing to the device display or...

Page 109: ...hould be set Note Any attribute settings of the window does not becomes active immediately with the related mmlGdcDispWinSetAttribute call but will be queued together with other settings of this window Use mmlGdcDispWinCommit to submit these settings for processing Parameters in win An MML_GDC_DISP_WINDOW returned from a previous call to mmlGdcDispWinCreate in pname Parameter name See MML_GDC_DISP...

Page 110: ...MML_GDC_DISP_BLEND_GLOBAL_ALPHA are allowed Parameters in win An MML_GDC_DISP_WINDOW returned from a previous call to mmlGdcDispWinCreate in blend_mode Blend mode related parameter can be a bit field combination of MML_GDC_DISP_BLEND_NONE Disable blending MML_GDC_DISP_BLEND_TRANSPARENCY Enable transparency MML_GDC_DISP_BLEND_GLOBAL_ALPHA Enable global alpha blending MML_GDC_DISP_BLEND_SOURCE_ALPHA...

Page 111: ...to odd pixel width Parameters in win An MML_GDC_DISP_WINDOW returned from a previous call to mmlGdcDispWinCreate in target The target where the matrix is set to the related parameter must be MML_GDC_DISP_BUFF_TARGET_COLOR_BUFF Color buffer as target in matrix Transformation 3x2 matrix for scaling rotation and flip Return values MML_OK On success Otherwise the related error code 11 5 5 15 MM_ERROR ...

Page 112: ...ful completion of mmlGdcDispWinSync it holds the parameter of the inserted sync Return values MML_OK On success MML_ERR_GDC_DISP_INVALID_ARG If one of the parameters is invalid 11 5 5 17 MM_ERROR mmlGdcDispWinWaitSync MML_GDC_DISP_WINDOW win MML_GDC_SYNC sync Inserts a sync wait into the window settings queue for win mmlGdcDispWinCommit operations performed after this call are only executed after ...

Page 113: ... 0xCC define MML_GDC_PE_ROP_NOTMASK MM_U08 0x33 define MML_GDC_PE_ROP_MASKINVERT MM_U08 0x66 define MML_GDC_PE_ROP_MSKAND MM_U08 0x88 define MML_GDC_PE_ROP_MASKERASE MM_U08 0x22 define MML_GDC_PE_ROP_NOTMASKERASE MM_U08 0x11 define MML_GDC_PE_ROP_MERGEMASK MM_U08 0xEE define MML_GDC_PE_ROP_MERGEMASKNOT MM_U08 0xBB define MML_GDC_PE_ROP_DSTCOPY MM_U08 0xF0 define MML_GDC_PE_ROP_NOTDSTCOPY MM_U08 0x...

Page 114: ...PHA 0x304U MML_GDC_PE_BF_GL_ONE_MINUS_DST_ALPHA 0x305U MML_GDC_PE_BF_GL_DST_COLOR 0x306U MML_GDC_PE_BF_GL_ONE_MINUS_DST_COLOR 0x307U MML_GDC_PE_BF_GL_SRC_ALPHA_SATURATE 0x308U MML_GDC_PE_BF_GL_CONSTANT_COLOR 0x8001U MML_GDC_PE_BF_GL_ONE_MINUS_CONSTANT_COLOR 0x8002U MML_GDC_PE_BF_GL_CONSTANT_ALPHA 0x8003U MML_GDC_PE_BF_GL_ONE_MINUS_CONSTANT_ALPHA 0x8004U enum MML_GDC_PE_BM MML_GDC_PE_BM_GL_FUNC_ADD...

Page 115: ...PI MM_ERROR mmlGdcPeAttribute MML_GDC_PE_CONTEXT pectx MML_GDC_PE_CTX_ATTR pname MM_U32 param MML_GDC_PE_API MM_ERROR mmlGdcPeColor MML_GDC_PE_CONTEXT pectx MM_U08 red MM_U08 green MM_U08 blue MM_U08 alpha MML_GDC_PE_API MM_ERROR mmlGdcPeSurfAttribute MML_GDC_PE_CONTEXT pectx MM_U32 target MML_GDC_PE_SURF_ATTR pname MM_U32 param MML_GDC_PE_API MM_ERROR mmlGdcPeSurfColor MML_GDC_PE_CONTEXT pectx MM...

Page 116: ...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 ope...

Page 117: ...e orientation For draw operation it means the buffer content orientation is mirrored 11 6 2 4 define MML_GDC_PE_DST 0x00000004U Background for blend operations 11 6 2 5 define MML_GDC_PE_FILTER_BILINEAR 1 Bilinear filter enable 11 6 2 6 define MML_GDC_PE_FILTER_NEAREST 0 Nearest filter enable 11 6 2 7 define MML_GDC_PE_MASK 0x00000008U Mask surface 11 6 2 8 define MML_GDC_PE_ROP_BLACKNESS MM_U08 0...

Page 118: ...U08 0x11 MASK SRC 11 6 2 22 define MML_GDC_PE_ROP_NOTSRCCOPY MM_U08 0x55 SRC 11 6 2 23 define MML_GDC_PE_ROP_SRCCOPY MM_U08 0xAA SRC 11 6 2 24 define MML_GDC_PE_ROP_WHITENESS MM_U08 0xFF 1 11 6 2 25 define MML_GDC_PE_SRC 0x00000002U blit source surface 11 6 2 26 define MML_GDC_PE_STORE 0x00000001U blit write target 11 6 2 27 define MML_GDC_PE_TILE_FILL_CONSTANT 1U Samples outside the frame are fil...

Page 119: ...be the CLUT 11 6 4 4 enum MML_GDC_PE_CMATRIX_FORMAT Color matrix format Enumerator MML_GDC_PE_CMATRIX_FORMAT_4X3 float 12 array with 4 column and 3 lines 11 6 4 5 enum MML_GDC_PE_CTX_ATTR Context attributes used by mmlGdcPeAttribute Enumerator MML_GDC_PE_CTX_ATTR_DITHER_COLOR Set the color dither mode The related parameter can be MM_TRUE Enable color dithering MM_FALSE Disable color dithering defa...

Page 120: ...er is applied to R or Y channel MML_GDC_PE_FILTER_CHANNEL_G Filter is applied to G or U channel MML_GDC_PE_FILTER_CHANNEL_B Filter is applied to B or V channel MML_GDC_PE_FILTER_CHANNEL_A Filter is applied to Alpha channel not available for MML_GDC_PE_FILTER_COLOR_FORMAT_R8G8B8 MML_GDC_PE_FILTER_CHANNEL_RGB Filter is applied to RGB or YUV channel MML_GDC_PE_FILTER_CHANNEL_RGBA Filter is applied to...

Page 121: ...ion default The related formula is if ColorMultiply MM_TRUE Cout Cin Aout Aout see MML_GDC_PE_SURF_ATTR_ALPHAMULTI else Cout Cin MML_GDC_PE_SURF_ATTR_ALPHAMULTI Enable disable multiplication of pixel alpha with constant alpha defined by mmlGdcPeSurfColor The related parameter can be MM_TRUE Enable alpha multiplication MM_FALSE Disable alpha multiplication default The related formula is if AlphaMul...

Page 122: ... is bound to the specified target See also mmlGdcPeSelectArea and MML_GDC_PE_SURF_ATTR_USE_CLIPPING The area is defined by lower left coordinate width and height The lower left coordinate is inside of processing area The upper right coordinate x w y h is outside of processing area Parameters must be x x w and y y h If x or y is equal to 4096 function returns MML_ERR_GDC_PE_INVALID_PARAMETER If w a...

Page 123: ...herwise the related error code 11 6 5 3 MML_GDC_PE_API MM_ERROR mmlGdcPeBindSurface MML_GDC_PE_CONTEXT pectx MM_U32 target MML_GDC_SURFACE surface mmlGdcPeBindSurface is setting function for parameters about source destination mask and store surface If pectx is equal to NULL mmlGdcPeBindSurface is terminated without any operation Note All bound surfaces must not be deleted as long as the context i...

Page 124: ... Ac represent the constant color or alpha component defined by mmlGdcPeColor Note The incoming color components Cs Cd As and Ad can be the original image color or a result of a previous operation See MML_GDC_PE_SURF_ATTR_ALPHAMULTI and MML_GDC_PE_SURF_ATTR_COLORMULTI Blend Function RGBA Components MML_GDC_PE_BF_GL_ZERO F 0 MML_GDC_PE_BF_GL_ONE F 1 MML_GDC_PE_BF_GL_SRC_COLOR F Cs MML_GDC_PE_BF_GL_O...

Page 125: ...GL_ONE_MINUS_SRC_ALPHA Return values MML_OK On success Otherwise the related error code 11 6 5 5 MML_GDC_PE_API MM_ERROR mmlGdcPeBlendMode MML_GDC_PE_CONTEXT pectx MML_GDC_PE_BM mode_red MML_GDC_PE_BM mode_green MML_GDC_PE_BM mode_blue MML_GDC_PE_BM mode_alpha Set the blending parameter If pectx is equal to NULL mmlGdcPeBlendMode is terminated without any operation Note The output of a blend opera...

Page 126: ...lpha default MML_GDC_PE_BM_GL_FUNC_ADD Return values MML_OK On success Otherwise the related error code 11 6 5 6 MML_GDC_PE_API MM_ERROR mmlGdcPeBlt MML_GDC_PE_CONTEXT pectx MM_FLOAT offsetx MM_FLOAT offsety This API initiates an operation that reads pixel data from surfaces bound to SRC DST and MASK and performs a calculation using it The resulting pixel data build a rectangle that is written to ...

Page 127: ...ation if buffer is not compressed SRC rotate scale or index decompress DST index decompress if SRC does not require these features MASK scale if scale factor is identical with SRC Parameters in out pectx Pixel Engine context NULL in offsetx Horizontal offset 4096 4095 in offsety Vertical offset 4096 4095 count direction depends on MML_GDC_PE_ATTR_ZERO_POINT Return values MML_OK On success Otherwis...

Page 128: ...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 succ...

Page 129: ... constant factors is 3 0 3 0 Parameters in out pectx Pixel Engine context NULL in format Format of the matrix must be MML_GDC_PE_CMATRIX_FORMAT_4X3 in fMatrix Address of color matrix See Description Return values MML_OK On success Otherwise the related error code 11 6 5 10 MML_GDC_PE_API MM_ERROR mmlGdcPeFill MML_GDC_PE_CONTEXT pectx MM_U32 x MM_U32 y MM_U32 w MM_U32 h This API fills the specified...

Page 130: ...draw box will be stored as the new draw box The draw box will be cleared if the reset parameter of mmlGdcPeGetDrawBox is different from 0 An application can use the draw box to get the minimal rectangle of a frame buffer that must be restored The function returns an error if no blit operation was executed since the last reset Note The draw box calculation based only on bounding box calculations fo...

Page 131: ...K surface by default MASK buffer alpha channel is read as extern alpha value of SRC surface If one of the ROP modes uses the MASK surface the extern alpha path of the SRC surface will be switched off and the MASK surface is the input of ROP operation The required ROP mode can be calculated by the following table surface DST MASK SRC output STORE 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 1 ...

Page 132: ... combined value of MML_GDC_PE_SRC default MML_GDC_PE_DST MML_GDC_PE_STORE MML_GDC_PE_MASK Return values MML_OK On success Otherwise the related error code 11 6 5 17 MML_GDC_PE_API MM_ERROR mmlGdcPeSetMatrix MML_GDC_PE_CONTEXT pectx MM_U32 target MML_GDC_PE_GEO_MATRIX_FORMAT format const MM_FLOAT fMatrix mmlGdcPeSetMatrix is setting function of transformation matrix for scaling rotation translation...

Page 133: ...n values MML_OK On success Otherwise the related error code 11 6 5 19 MML_GDC_PE_API MM_ERROR mmlGdcPeSurfColor MML_GDC_PE_CONTEXT pectx MM_U32 target MM_U08 red MM_U08 green MM_U08 blue MM_U08 alpha Set the constant color for the specified target Indicated color is used for following usage See also mmlGdcPeSurfAttribute Constant color in color multiplication Constant color in tiling Constant colo...

Page 134: ...lay controller enters a defined line It can be used to start rendering in the blanking phase or at a defined time point in a single render buffer solution This function can be called multiple times within a frame to coordinate rendering of different regions Parameters in display An MML_GDC_DISPLAY returned from a previous call to mmlGdcDispOpenDisplay in line The line parameter defines the display...

Page 135: ...mml_gdc_sync h The Synchronization API provides mechanisms to synchronize framebuffer operations These are 2D graphics operations e g blt finished Display operations e g framebuffer displayed VSync happened Synchronization is achieved through sync objects a representation of events whose completion status can be tested or waited upon Waiting can be done by The CPU see mmlGdcSyncWait As part of a g...

Page 136: ...increment Parameter must be 32768 incr 32767 Return values MML_OK Success MML_ERR_GDC_SYNC_INVALID Sync object not valid MML_ERR_GDC_SYNC_INVALID_PARAMETER Invalid parameter 11 7 3 2 MM_ERROR mmlGdcSyncReset MML_GDC_SYNC sync Reset all parameters of the sync object Parameters in out sync The sync object Return values MML_OK On success Otherwise the related error code 11 7 3 3 MM_ERROR mmlGdcSyncWa...

Page 137: ..._INT_CMDSEQ_ERROR_IRQ_CP define MM_GDC_IRIS_FRAMEGEN0_SECSYNC_ON_IRQ MM_U64 1 MM_GDC_IRIS_INT_FRAMEGEN0_SECSYNC_ON_IRQ_CP define MM_GDC_IRIS_FRAMEGEN0_SECSYNC_OFF_IRQ MM_U64 1 MM_GDC_IRIS_INT_FRAMEGEN0_SECSYNC_OFF_IRQ_CP Interrupt Operations Functions void mmdGdcInterruptHandler void Interrupt Handler Function MM_ERROR mmdGdcInterruptRegisterHandler MM_U64 irq void pHandler MM_U64 intrrpt Set an a...

Page 138: ...G_FRAMECOMPLETE0_IRQ MM_U64 1 MM_GDC_IRIS_INT_DISENGCFG_FRAMECOMPLETE0_IRQ_CP DISENGCFG_FRAMECOMPLETE0 Frame complete Display Controller Display Stream 0 11 8 2 3 define MM_GDC_IRIS_FRAMEGEN0_SECSYNC_OFF_IRQ MM_U64 1 MM_GDC_IRIS_INT_FRAMEGEN0_SECSYNC_OFF_IRQ_CP FRAMEGEN0_SECSYNC_OFF Synchronization status deactivated Display Controller Content stream 0 11 8 2 4 define MM_GDC_IRIS_FRAMEGEN0_SECSYNC...

Page 139: ...pplication defined interrupt handler function This function allows an application to define a callback function for dedicated interrupts at runtime The function ensures that the related interrupts are enabled in the 2D Core HW block Note The callback function must not call any 2D Core driver APIs as direct action because it is part of the ARM interrupt sequence The callback function will be called...

Page 140: ...U32 bufferSize MM_ERROR mmlGdcErpSetPrintf MM_PRINTFUNCTION user_print_function Module Id s The error reporting level can be set per module id Note kernel modules are covered by the corresponding user module define MM_ERP_MODULE_ID_GDC_ALL_USER MM_MODULEID 0x2100FFFFU define MM_ERP_MODULE_ID_GDC_SURFMAN_USER MM_MODULEID 0x21000000U define MM_ERP_MODULE_ID_GDC_DISP_USER MM_MODULEID 0x21001000U defi...

Page 141: ...ble modules mmlGdcErpSetMessageLevel to select the channel of messages mmlGdcErpSetMessageChannel When using channel MM_ERP_CH_STDOUT the configuration of the print function by mmlGdcErpSetPrintf is necessary When using channel MM_ERP_CH_BUFFER the configuration of the buffer by mmlGdcErpSetBuffer is necessary Note Error reporting is only available in Debug and Release configuration In Production ...

Page 142: ...EID 0x21007000U Configuration 11 9 2 5 define MM_ERP_MODULE_ID_GDC_DISP_USER MM_MODULEID 0x21001000U Display 11 9 2 6 define MM_ERP_MODULE_ID_GDC_ERP_USER MM_MODULEID 0x2100D000U Error Reporting 11 9 2 7 define MM_ERP_MODULE_ID_GDC_IRIS_USER MM_MODULEID 0x21003000U Internal components 11 9 2 8 define MM_ERP_MODULE_ID_GDC_PIXENG_USER MM_MODULEID 0x2100B000U Pixel Engine 11 9 2 9 define MM_ERP_MODUL...

Page 143: ..._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 Enumerator MM_ERP_CH_STDOUT report to stdout MM_ERP_CH_BUFFER report to buffer 11 9 4 3 enum MM_ERP_MESSAGE_LEVEL Enumeration of message levels Enumerator MM_ERP_LEVEL_NOTHING report no mess...

Page 144: ...P_INVALID_PARAMETER An invalid value is set in an argument 11 9 5 2 MM_ERROR mmlGdcErpSetMessageChannel MM_ERP_MESSAGE_DEST dest MM_ERP_MESSAGE_CHANNEL_PROP prop Set channel for error messages By default only MM_ERP_CH_STDOUT is ON Note MM_ERP_CH_STDOUT and MM_ERP_CH_BUFFER can be en disabled independently Parameters in dest Message channel selection MM_ERP_CH_STDOUT Messages are routed to stdout ...

Page 145: ...MODULE_ID_GDC_SYSINIT_USER MM_ERP_MODULE_ID_GDC_CMDSEQ_USER MM_ERP_MODULE_ID_GDC_PIXENG_USER MM_ERP_MODULE_ID_GDC_ERP_USER MM_ERP_MODULE_ID_GDC_SERVICE_USER in level Level selection MM_ERP_LEVEL_NOTHING No messages MM_ERP_LEVEL_ERROR All error messages MM_ERP_LEVEL_WARNING All error and warning messages MM_ERP_LEVEL_INFO All error warning and info messages Return values MML_OK Normal termination M...

Page 146: ...M_ERRCODE 0x21001011 define MML_ERR_GDC_DISP_WRONG_WINDOW MM_ERRCODE 0x21001012 define MML_ERR_GDC_DISP_WRONG_INDEX_WINDOW MM_ERRCODE 0x21001013 define MML_ERR_GDC_DISP_FAILED MM_ERRCODE 0x21001014 define MML_ERR_GDC_DISP_WRONG_YC_WINDOW MM_ERRCODE 0x21001015 define MML_ERR_GDC_DISP_WRONG_TCON_PARAMS MM_ERRCODE 0x21001016 define MML_ERR_GDC_DISP_DISPLAY_MODE_MISSMATCH MM_ERRCODE 0x21001017 define ...

Page 147: ...ODE 0x2100D021 define MML_ERR_GDC_PE_INVALID_FLOAT MM_ERRCODE 0x2100D023 define MML_ERR_GDC_PE_INVALID_CLUT_OPERATION MM_ERRCODE 0x2100D024 define MML_ERR_GDC_PE_INVALID_YUV_PARAM MM_ERRCODE 0x2100D028 define MML_ERR_GDC_PE_INVALID_COMPRESSION_OPERATION MM_ERRCODE 0x2100D029 Error codes for Surface Manager API define MML_ERR_GDC_SURF_OUT_OF_SPACE MM_ERRCODE 0x21000001 define MML_ERR_GDC_SURF_OUT_O...

Page 148: ...DDRESS MM_ERRCODE 0x2100B002 define MML_ERR_GDC_IRIS_CMD_SEQ_INVALID_BUFFER_SIZE MM_ERRCODE 0x2100B003 define MML_ERR_GDC_IRIS_CMD_SEQ_FIFO_UNINITIALIZED MM_ERRCODE 0x2100B004 define MML_ERR_GDC_IRIS_CMD_SEQ_COMMAND_QUEUE_FULL MM_ERRCODE 0x2100B005 define MMD_ERR_GDC_DISP_ARG_ERROR MM_ERRCODE 0x11001003 define MML_ERR_GDC_INT_OUT_OF_RANGE MM_ERRCODE 0x21010001 define MMD_ERR_GDC_INT_OUT_OF_RANGE M...

Page 149: ...IMEOUT_EXPIRED MM_ERRCODE 0x11007002 A timeout expired while trying to acquire a resource 11 10 2 6 define MMD_ERR_GDC_DISP_ARG_ERROR MM_ERRCODE 0x11001003 Wrong arguments 11 10 2 7 define MMD_ERR_GDC_INT_OUT_OF_RANGE MM_ERRCODE 0x11010001 Interrupt id is out of range 11 10 2 8 define MMD_ERR_GDC_SYNC_ACCESS_FAILED MM_ERRCODE 0x11005002 An unexpected internal error occurred 11 10 2 9 define MMD_ER...

Page 150: ...21 define MML_ERR_GDC_CONFIG_INTERNAL_ERROR MM_ERRCODE 0x21008002 Graphics driver internal error 11 10 2 22 define MML_ERR_GDC_CONFIG_INVALID_ADDRESS MM_ERRCODE 0x21008003 An invalid address is specified 11 10 2 23 define MML_ERR_GDC_CONFIG_INVALID_PARAMETER MM_ERRCODE 0x21008001 The parameter is wrong 11 10 2 24 define MML_ERR_GDC_DISP_DEV_BUSY MM_ERRCODE 0x21001020 Previously requested configura...

Page 151: ...CODE 0x21001008 The requested layer is already being used 11 10 2 37 define MML_ERR_GDC_DISP_OUT_OF_SYSTEM_MEMORY MM_ERRCODE 0x21001007 The system is out of memory 11 10 2 38 define MML_ERR_GDC_DISP_UNSUPPORTED_MODE MM_ERRCODE 0x21001004 A display mode was requested that is not supported on the hardware 11 10 2 39 define MML_ERR_GDC_DISP_WRONG_INDEX_WINDOW MM_ERRCODE 0x21001013 The layer does not ...

Page 152: ...ot aligned 11 10 2 51 define MML_ERR_GDC_IRIS_MATH_INVALID_FLOAT MM_ERRCODE 0x21003001 Float value is outside of the processable range 11 10 2 52 define MML_ERR_GDC_IRIS_MATH_INVALID_MATRIX MM_ERRCODE 0x21003002 Matrix inversion failed 11 10 2 53 define MML_ERR_GDC_PE_INVALID_ADDRESS MM_ERRCODE 0x2100D005 Wrong address For instance not aligned 11 10 2 54 define MML_ERR_GDC_PE_INVALID_ATTRIBUTE MM_...

Page 153: ... defined 11 10 2 65 define MML_ERR_GDC_PE_INVALID_OPERATION MM_ERRCODE 0x2100D017 The requested operation failed 11 10 2 66 define MML_ERR_GDC_PE_INVALID_PARAMETER MM_ERRCODE 0x2100D016 Invalid parameter was specified for an argument 11 10 2 67 define MML_ERR_GDC_PE_INVALID_RLD_REQUEST MM_ERRCODE 0x2100D011 Required fetch unit does not support RLD 11 10 2 68 define MML_ERR_GDC_PE_INVALID_ROP_MODE ...

Page 154: ...table for this operation 11 10 2 80 define MML_ERR_GDC_SURF_INVALID_ATTRIBUTE MM_ERRCODE 0x21000006 The given attribute is not supported 11 10 2 81 define MML_ERR_GDC_SURF_INVALID_FOR_BUFFER_OWNED MM_ERRCODE 0x21000005 The operation is not allowed for buffer owned surface objects 11 10 2 82 define MML_ERR_GDC_SURF_INVALID_FORMAT MM_ERRCODE 0x21000004 The given format is not supported 11 10 2 83 de...

Page 155: ...CE_NOT_YET_INITIALIZED MM_ERRCODE 0x21009004 Hardware device is not yet initialized 11 10 2 96 define MML_ERR_GDC_SYS_DEVICE_WRONG_ID MM_ERRCODE 0x21009006 The software driver is not valid for the hardware 11 10 2 97 define MML_ERR_GDC_WB_DEVICE_BUSY MM_ERRCODE 0x21004001 Writeback unit busy 11 10 2 98 define MML_ERR_GDC_WB_INVALID_PARAMETER MM_ERRCODE 0x21004002 Invalid parameter was specified 11...

Page 156: ... 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 include mm_gdc_version h 11 12 2 Macro Definition Documentation 11 12 2 1 define MM_GDC_MAJOR_VERSION 1U Major version of the driver 11 12 2 2 define MM_GDC_MINOR...

Page 157: ... long MM_S64 typedef char MM_CHAR typedef float MM_FLOAT typedef double MM_DOUBLE typedef int MM_BOOL typedef unsigned int MM_ADDR typedef MM_S32 MM_ERROR typedef MM_S32 MM_MODULE 11 13 1 Detailed Description 11 13 2 Typedef Documentation 11 13 2 1 typedef unsigned int MM_ADDR physical memory address 11 13 2 2 typedef int MM_BOOL boolean 11 13 2 3 typedef char MM_CHAR string character 11 13 2 4 ty...

Page 158: ...d 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 11 13 2 14 typedef unsigned int MM_U32 unsigned 32 bit integer 11 13 2 15 typedef unsigned long long MM_U64 uns...

Page 159: ...x void x define MM_ADDR_TO_UINT32 x MM_U32 x define MM_UINT32_TO_ADDR x MM_ADDR x define MM_PTR_TO_UINT32 x MM_U32 x define MM_UINT32_TO_PTR x void x define MM_ADDR_TO_UINT32PTR x MM_U32 x define MM_ADDR_TO_SINT32PTR x MM_S32 x define MM_IO_IRIS_SUBSYSTEM 0xD0A00000U define MM_IO_IRIS_CORE 0xD0A10000U define NULL_FUNCTION void 0 define UNUSED_PARAMETER x void x 11 14 1 Detailed Description 11 14 2...

Page 160: ... Macro to define the IDs of the driver modules 11 14 2 11 define MM_PTR_TO_ADDR x MM_ADDR x Conversion void to MM_ADDR 11 14 2 12 define MM_PTR_TO_UINT32 x MM_U32 x Conversion void to MM_U32 11 14 2 13 define MM_TRUE MM_BOOL 1 Definition of TRUE for bool types 11 14 2 14 define MM_UINT32_TO_ADDR x MM_ADDR x Conversion MM_U32 to MM_ADDR 11 14 2 15 define MM_UINT32_TO_PTR x void x Conversion MM_U32 ...

Page 161: ...METER x void x Helper macro for unused parameters 11 15 Tutorial Utility Library Modules Utilities for the Memory Management Utility functions for matrix calculations Utilities for the compatibility with other drivers Utilities for the Surface Management Utilities for the compression Util class collection 11 15 1 Detailed Description The Utility Library contains many functions to simplify applicat...

Page 162: ...M_U32 baseAddress MM_ERROR utMmanDestroyHeap MML_MMAN_HEAP_HANDLE hdlmem MM_ERROR utMmanHeapAlloc MML_MMAN_HEAP_HANDLE hdlmem MM_U32 size MM_U32 alignment MM_ADDR addr MM_ERROR utMmanHeapFree MML_MMAN_HEAP_HANDLE hdlmem void addr MM_ERROR utMmanGetSize MML_MMAN_HEAP_HANDLE hdlmem MM_U32 size MM_ERROR utMmanGetFree MML_MMAN_HEAP_HANDLE hdlmem MM_U32 size MM_ERROR utMmanGetLargest MML_MMAN_HEAP_HAND...

Page 163: ...M_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 11 16 4 Function Documentation 11 16 4 1 MM_ERROR utMmanCreateHeap MML_MMAN_HEAP_HANDLE hdlmem MM_U32 size MM_U32 baseAddress Creates a video memory heap Note Typically an application would not use this function but call mmlGdcVideoAlloc instead w...

Page 164: ...free memory on the heap Note Typically an application would not use this function but call mmlGdcVideoGetFreeTotal Parameters in hdlmem Heap to get information for out size Pointer to variable to receive the information Return values MML_OK On success MML_ERR_MMAN_INVALID_PARAMETER If hdlmem is NULL 11 16 4 4 MM_ERROR utMmanGetLargest MML_MMAN_HEAP_HANDLE hdlmem MM_U32 size Get the size of the lar...

Page 165: ...e utMmanCreateHeap Parameters in hdlmem Heap to perform the allocation from in size Number of bytes to allocate in alignment Alignment to use for the allocation out addr Pointer to the newly allocated memory Return values MML_OK On success MML_ERR_MMAN_INVALID_PARAMETER If a parameter is invalid MML_ERR_MMAN_NO_MEMORY If not enough system memory for internal data MML_ERR_MMAN_NO_VRAM If no contigu...

Page 166: ...t3x2 m MM_FLOAT x MM_FLOAT y MML_GDC_2D_MATRIX_API void utMat3x2Scale Mat3x2 m MM_FLOAT x MM_FLOAT y MML_GDC_2D_MATRIX_API void utMat3x2ScalePre Mat3x2 m MM_FLOAT x MM_FLOAT y MML_GDC_2D_MATRIX_API void utMat3x2Rot Mat3x2 m MM_FLOAT f MML_GDC_2D_MATRIX_API void utMat3x2RotPre Mat3x2 m MM_FLOAT f MML_GDC_2D_MATRIX_API MM_U32 utMat3x2Invert Mat3x2 m MML_GDC_2D_MATRIX_API void utMat3x2GetXY const Mat...

Page 167: ...L_GDC_2D_MATRIX_API void utMat4x3CalcColMatrix Mat4x3 dst MM_FLOAT fContrast MM_FLOAT fBrightness MM_FLOAT fSaturation MM_FLOAT fHue 11 17 1 Detailed Description The functions in this block are used by some tutorial examples for matrix operations Different matrix formats and related functions are defined to support different use cases Mat3x2 This matrix format is sufficient for a fine operations l...

Page 168: ... Mat3x2 6 Matrix with 3 columns and 2 rows for a fine geometry operations If m is a Mat3x2 matrix type and x y in an input vector the resulting vector is m 0 m 2 m 4 m 1 m 3 m 5 x y m 0 x m 2 y m 4 m 1 x m 3 y m 5 11 17 3 2 typedef MM_FLOAT Mat3x3 9 Matrix with 3 columns and 3 rows for perspective geometry operations If m is a Mat3x3 matrix type and x y in an input vector the resulting vector is m...

Page 169: ...A m 0 R m 4 G m 8 B m 12 A m 16 m 1 R m 5 G m 9 B m 13 A m 17 m 2 R m 6 G m 10 B m 14 A m 18 m 3 R m 7 G m 11 B m 15 A m 19 11 17 4 Function Documentation 11 17 4 1 MML_GDC_2D_MATRIX_API void utMat3x2Copy Mat3x2 dst const Mat3x2 src Copy the matrix content to a new one Parameters out dst The destination matrix in src The source matrix 11 17 4 2 MML_GDC_2D_MATRIX_API void utMat3x2GetXY const Mat3x2...

Page 170: ...presents m m m_rot Parameters in out m The matrix to modify in f Rotation angle in degrees 11 17 4 7 MML_GDC_2D_MATRIX_API void utMat3x2RotPre Mat3x2 m MM_FLOAT f Modify a matrix by pre multiplying a rotation matrix The resulting matrix represents m m_rot m Parameters in out m The matrix to modify in f Rotation angle in degrees 11 17 4 8 MML_GDC_2D_MATRIX_API void utMat3x2Scale Mat3x2 m MM_FLOAT x...

Page 171: ...atePre Mat3x2 m MM_FLOAT x MM_FLOAT y Modify a matrix by pre multiplying a move matrix The resulting matrix represents m m_trans m Parameters in out m The matrix to modify in x Move dimension in x direction in y Move dimension in y direction 11 17 4 13 MML_GDC_2D_MATRIX_API void utMat3x3Copy Mat3x3 dst const Mat3x3 src Copy the content of a 3x3 matrix to a new one Parameters out dst The destinatio...

Page 172: ...2D_MATRIX_API void utMat3x3Scale Mat3x3 m MM_FLOAT x MM_FLOAT y Modify a 3x3 matrix to realize a scale operation The resulting matrix represents m m m_scale Parameters in out m The matrix to modify in x Scale factor in x direction in y Scale factor in y direction 11 17 4 19 MML_GDC_2D_MATRIX_API void utMat3x3ToMat4x4 Mat3x3 src Mat4x4 dst Convert a 3x3 matrix to a 4x4 matrix Parameters out dst The...

Page 173: ...d lower values stand for amplification and attenuation in fBrightness Set the brightness color component offset A useful range for fBrightness is 1 0 1 0 with 0 0 stands for no brightness modifications and higher and lower values stand for amplification and attenuation in fSaturation Set the color saturation A useful range for fSaturation is 0 0 2 0 with 1 0 stands for no saturation modifications ...

Page 174: ...4GetXYZ Mat4x4 m float x float y float z float xout float yout float zout Calculate the target position for a given matrix and source position Parameters in m The matrix in x Source x position in y Source y position in z Source z position out xout Pointer to the destination x position out yout Pointer to the destination y position out zout Pointer to the destination z position 11 17 4 28 MML_GDC_2...

Page 175: ...d the X axis Parameters in out m The input output matrix in f The rotation angle in radians 11 17 4 32 MML_GDC_2D_MATRIX_API void utMat4x4RotY Mat4x4 m MM_FLOAT f Rotate a 4x4 matrix around the Y axis Parameters in out m The input output matrix in f The rotation angle in radians 11 17 4 33 MML_GDC_2D_MATRIX_API void utMat4x4RotZ Mat4x4 m MM_FLOAT f Rotate a 4x4 matrix around the Z axis Parameters ...

Page 176: ...3 dst Convert a 4x4 matrix to a 3x3 matrix Parameters out dst The destination matrix in src The source matrix 11 17 4 37 MML_GDC_2D_MATRIX_API void utMat4x4Translate Mat4x4 m MM_FLOAT x MM_FLOAT y MM_FLOAT z Modify a 4x4 matrix to realize a move operation The resulting matrix represents m m m_trans Parameters in out m The matrix to modify in x Move dimension in x direction in y Move dimension in y...

Page 177: ...VideoFree void addr MM_ERROR mmlGdcVideoGetSize MM_U32 size MM_ERROR mmlGdcVideoGetFreeTotal MM_U32 size MM_ERROR mmlGdcVideoGetLargestBlock MM_U32 size MM_ERROR mmlGdcSyncCreate MM_U32 uCnt MML_GDC_SYNC pSyncObjects MM_ERROR mmlGdcSyncDelete MM_U32 uCnt MML_GDC_SYNC pSyncObjects 11 18 1 Detailed Description The functions of this group are used in some samples to make the application code identica...

Page 178: ...CONTEXT as parameter requires a previous call of mmlGdcPeGenContext for this context The context will be initialized with default values Please check the related property change functions to check the default values Parameters in out pPectx Pointer to get the MML_GDC_PE_CONTEXT object Return values MML_OK On success Otherwise the related error code 11 18 3 3 MM_ERROR mmlGdcSmDeleteSurfaceObjects M...

Page 179: ...n success MML_ERR_GDC_SURF_INVALID_PARAMETER If NULL pointer is given for pSurfaces MML_ERR_GDC_SURF_OUT_OF_SPACE If not enough memory to create the surface object 11 18 3 5 MM_ERROR mmlGdcSyncCreate MM_U32 uCnt MML_GDC_SYNC pSyncObjects Creates cnt empty sync objects returning their names Parameters in uCnt Number of sync objects to create out pSyncObjects Output array for the returned names Retu...

Page 180: ...ion of video memory manager This defines the memory region where VideoAlloc shall allocate memory Parameters in config Video memory manager configuration default UTIL_VRAM_CONFIG_VRAM_PREFERRED Returns MML_ERR_MMAN_INVALID_PARAMETER If illegal value for config is given MML_OK otherwise 11 18 3 9 void mmlGdcVideoFree void addr Free video memory allocated by mmlGdcVideoAlloc Parameters in addr Virtu...

Page 181: ...M_ERROR mmlGdcVideoGetSize MM_U32 size Retrieve the size of video memory heap Depending on the configuration see mmlGdcVideoConfig this is the size of VRAM SDRAM or both Parameters out size Parameter to receive the query result not NULL Return values MML_OK Normal termination MML_ERR_MMAN_INVALID_PARAMETER An unexpected internal error occurred 11 18 3 13 void mmlOsLibcFree void _Memory Implements ...

Page 182: ... MML_GDC_SURFACE surf MM_ERROR utSurfGetPixel MML_GDC_SURFACE src MM_U32 x MM_U32 y MM_U08 r MM_U08 g MM_U08 b MM_U08 a MM_ERROR utSurfSetPixel MML_GDC_SURFACE src MM_U32 x MM_U32 y MM_U08 r MM_U08 g MM_U08 b MM_U08 a 11 19 1 Detailed Description This utility block realizes some helper functions related to the surface manager API of the 2D core graphics driver The following code allocates an 16bpp...

Page 183: ...in s s line d n int rc FUNCTION FILE LINE while 0 This macro avoids execution if the previous instruction failed 11 19 3 Function Documentation 11 19 3 1 MM_ERROR utSurfCreateBuffer MML_GDC_SURFACE surf MM_U32 w MM_U32 h MML_GDC_SURF_FORMAT eFormat Create a buffer with the given dimension and color format and set the related surface object properties Please note the surface object must be created ...

Page 184: ...ixel in y y positon of the pixel in r Pointer to get the red value in g Pointer to get the green value in b Pointer to get the blue value in a Pointer to get the alpha value Return values MML_OK on success otherwise the related error code 11 19 3 4 MM_S32 utSurfHeight MML_GDC_SURFACE surf Return the height of a given surface object Parameters in surf The surface object Return values Height of the ...

Page 185: ...nter to get clut buffer virtual base address Return values MML_OK on success otherwise the related error code 11 19 3 7 MM_ERROR utSurfSetPixel MML_GDC_SURFACE src MM_U32 x MM_U32 y MM_U08 r MM_U08 g MM_U08 b MM_U08 a Set 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 Please ...

Page 186: ...ities 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 buf...

Page 187: ...nction 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 utRldEnc...

Page 188: ...ecause the constructor takes over the initialization of the context After a call of OpenDrawCtx this context can be also used for drawing 11 25 CDevice Data Structures class CDevice 11 25 1 Detailed Description The Class CDevice is responsible to initialize the 2D core driver and util part in the Open function and also allocates and assigns command sequencer fifo It is required that this Open func...

Page 189: ...code CMenu menu menu Open display 0 0 320 240 MML_GDC_DISP_LAYER_4 MML_GDC_DISP_SUB_LAYER_DEFAULT 0 MML_GDC_DISP_BLEND_SOURCE_ALPHA MML_GDC_DISP_BLEND_SOURCE_MULTIPLY_ALPHA menu InitMenu Font_ttf sizeof Font_ttf 16 menu Insert 0 MENU_LL CMenu MENU_FLAG_CHECKBOX L This is a check box menu menu Insert MENU_LL MENU_FONT 0 L Font menu Insert MENU_FONT 0 MENU_FONT 1 CMenu MENU_FLAG_POPUP CMenu MENU_FLA...

Page 190: ... 1 Detailed Description The class CSurface is a abstraction of one or more MML_GDC_SURFACE objects depending on the NUM_BUFFERS definition The constructor takes over the surface object initialization To use the surface for blit or display operations it is typically required to allocate VRAM or to assign a static resource from FLASH memory The required functions are part of these class If the NUM_B...

Page 191: ...height MM_U32 bit_red MM_U32 bit_green MM_U32 bit_blue MM_U32 bit_alpha virtual The CreateBuffer function can be used setup the member surface object s with allocated VRAM Parameters in width Defines the with of the surface s in height Defines the height of the surface s in bit_red Defines the bits for the red channel of the surface s in bit_green Defines the bits for the green channel of the surf...

Page 192: ...function This functions does exactly the same as the constructor It is needed for some compilers at the moment ghs and gnu not running the constructors of global classes before main This function can be called from main as a workarroung 11 28 2 8 MM_ERROR SurfLoadBitmap const void pImage MM_BOOL bCopyToVRAM MM_FALSE virtual The CreateBuffer function uses the utSurfLoadBitmap function to initialize...

Page 193: ... CStaticSurfaceWindow object can be used as a static background layer or to display a static icon as foreground window The typical use or these CWindows object will be shown in the following sample void main CDevice device CDisplay display CStaticSurfaceWindow wndBg CSurfaceWindow 2 wndRender open device device Open open display display Open ScreenWidth ScreenHeight open a background window and as...

Page 194: ... Push unsigned bits unsigned data void Clear unsigned Read unsigned bits bool err 0 void ResetRead Friends class RLAD 12 1 1 Detailed Description The class BitStream is used to store the compressed image 12 1 2 Constructor Destructor Documentation 12 1 2 1 BitStream bool big_endian false inline Constructor Parameters in big_endian Set true if system is big_endian 12 1 3 Member Function Documentati...

Page 195: ...ers in bits Number of bits in data in data Data to push 12 1 3 4 unsigned Read unsigned bits bool err 0 Read bits from the compressed stream Parameters in bits Number of bits to read in out err Will be set to true if error occurs Return values Read data 12 1 3 5 void ResetRead reset Read operation to begin 12 1 3 6 unsigned Size const Size in bits The documentation for this class was generated fro...

Page 196: ...2 Constructor Destructor Documentation 12 2 2 1 CCtx inline Class CCtx constructor 12 2 2 2 CCtx inline Class CCtx destructor 12 2 3 Member Function Documentation 12 2 3 1 MML_GDC_PE_CONTEXT GetHandle inline Return the MML_GDC_PE_CONTEXT object 12 2 3 2 void Init inline Initialize context variables 12 2 3 3 operator MML_GDC_PE_CONTEXT inline Return the MML_GDC_PE_CONTEXT object for direct use with...

Page 197: ...ine Class CDevice destructor 12 3 3 Member Function Documentation 12 3 3 1 MM_ERROR Close inline Close the device will be called from destructor Return values MML_OK On success Otherwise the related error code or MML_ERR 12 3 3 2 MM_BOOL IsOpen inline Can be used to check the status Return values MM_TRUE If Open was successfully called otherwise MM_FALSE 12 3 3 3 MM_ERROR Open MM_U32 uCmdSeqSize 0...

Page 198: ...ROLLER GetDisplayController MML_GDC_DISPLAY GetHandle operator MML_GDC_DISPLAY 12 4 1 Detailed Description Class CDisplay see CDisplay 12 4 2 Member Function Documentation 12 4 2 1 MM_ERROR Close inline Close the display controller Return values MML_OK On success Otherwise the related error code or MML_ERR 12 4 2 2 MML_GDC_DISP_CONTROLLER GetDisplayController inline Return values Return the used d...

Page 199: ...ht Number of vertical pixel in display ID of display controller Return values MML_OK On success Otherwise the related error code or MML_ERR 12 4 2 7 operator MML_GDC_DISPLAY inline Return values Return the used MML_GDC_DISPLAY object 12 4 2 8 virtual MM_ERROR SetBgColor MM_U32 color inline virtual Change the background color and applay changes with commit Parameters in color see MML_GDC_DISP_ATTR_...

Page 200: ... SetText const wchar_t pszString MM_ERROR InitMenu const void Font int size_of_font int font_height MML_GDC_PE_CONTEXT draw_ctx 0 virtual MM_ERROR Close MM_ERROR Insert MM_U32 old_id MM_U32 id MM_U32 flags const wchar_t pszString CMenuItem Find MM_U32 id CMenuItem pBase CMenuItem FindSelected CMenuItem pBase CMenuItem FindNext CMenuItem pBase CMenuItem pSearch CMenuItem MENU_ITEM_FIND find int Han...

Page 201: ...3 3 CMenuItem Find MM_U32 id CMenuItem pBase inline Search a menu item in the menu Parameters in id ID of the menu item to find in pBase Base menu item to start the search Return the menu item on success Otherwise NULL 12 5 3 4 CMenuItem FindNext CMenuItem pBase CMenuItem pSearch CMenuItem MENU_ITEM_FIND find inline Search a menu item in the menu Parameters in pBase Base menu item to start the sea...

Page 202: ...e tt font for the menu if size_of_font 0 it defines the location in the file system if size_of_font 0 it is the pointer to the font buffer with a size of size_of_font in size_of_font See font parameter in font_height Define the requested font height in pixel in draw_ctx Initialized draw context objec t Return values MML_OK On success Otherwise the related error code or MML_ERR 12 5 3 9 MM_ERROR In...

Page 203: ...00 MENU_ITEM_FLAG_ISCHECKED 0x400 enum MENU_ITEM_FIND MENU_ITEM_FIND_UP MENU_ITEM_FIND_DOWN MENU_ITEM_FIND_TOP MENU_ITEM_FIND_BOTTOM MENU_ITEM_FIND_PARENT MENU_ITEM_FIND_SELECTED Public Member Functions CMenuItem MM_U32 id MM_U32 flag const wchar_t pszString const wchar_t GetString Data Fields CMenuItem m_pSubItem CMenuItem m_pNextItem MM_U32 m_id MM_U32 m_flag MM_U16 m_width MM_U08 m_nTextOffset ...

Page 204: ...stance sign as foreground layer 12 7 2 Member Function Documentation 12 7 2 1 virtual MM_ERROR Open MML_GDC_DISPLAY display const void pImage MM_BOOL 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 inline virtual Open the window and show an image Parameters in display A ...

Page 205: ...mage Parameters in display A display object that will be used to open the window in sImage The MML_GDC_SURFACE object to be displayed in x X position offset of the upper left window corner relative to the display screen in y Y position offset of the upper left window corner relative to the display screen in layerId Layer ID of the window in sub_layerID Sub Layer ID of the window in blend_mode Star...

Page 206: ...MM_U32 bit_red MM_U32 bit_green MM_U32 bit_blue MM_U32 bit_alpha virtual MM_ERROR CreateGrayBuffer const MM_U32 width const MM_U32 height MM_U32 bit_color MM_U32 bit_alpha virtual MM_ERROR SurfLoadBitmap const void pImage MM_BOOL bCopyToVRAM MM_FALSE virtual MM_ERROR Copy MML_GDC_SURFACE surface MM_S32 GetWidth MM_S32 GetHeight MM_BOOL HasBuffer MML_GDC_SURFACE GetSurface MML_GDC_SURFACE GetHandle...

Page 207: ... of surfaces in the class object 12 8 3 2 MML_GDC_SURFACE GetHandle inline Return values return The surface object 12 8 3 3 MM_S32 GetHeight inline Return values return Surface height 12 8 3 4 MML_GDC_SURFACE GetSurface inline Return values return The surface object 12 8 3 5 MML_GDC_SURFACE GetSurface int id inline Get a dedicated surface Parameters in id 0 return the current foreground buffer If ...

Page 208: ...inline Get the foreground surfaces Return values return The surface object 12 8 3 9 void Swap inline Toggle the foreground and background buffer Return values MML_OK on success Otherwise the related error code 12 8 4 Field Documentation 12 8 4 1 MM_BOOL m_bHasBuffer protected MM_TRUE if the buffer was allocated in this class In this case the destructor must free the memory 12 8 4 2 MML_GDC_SURFACE...

Page 209: ...ndow NUM_BUFFERS The class CSurfaceWindow represents a CWindow with one or more pixel buffers The pixel buffers can be used to store a rendered image that will be showed in the Window after calling Swap 12 9 2 Member Function Documentation 12 9 2 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 from ...

Page 210: ...code or MML_ERR 12 9 2 4 MM_ERROR CreateGrayBuffer MM_U32 bit_color MM_U32 bit_alpha inline Create one or more pixel buffers with the size of the window and a grey pixel format Parameters in bit_color Number of grey bits in the buffer s in bit_alpha Number of alpha bits in the buffer s Return values MML_OK on success Otherwise the related error code or MML_ERR 12 9 2 5 virtual MM_ERROR Swap inline...

Page 211: ...ures 0 MM_U32 blend_mode 0 virtual MM_ERROR Close virtual MM_BOOL SyncReady virtual MM_ERROR Commit virtual MM_ERROR SetSurface MML_GDC_SURFACE surf unsigned int GetWidth unsigned int GetHeight MML_GDC_DISPLAY GetDisplay MML_GDC_DISP_WINDOW GetWindowHandle operator MML_GDC_DISP_WINDOW MML_GDC_SYNC GetSync Data Fields MML_GDC_DISP_WINDOW m_win MML_GDC_DISPLAY m_display MML_GDC_DISP_WINDOW_PROPERTIE...

Page 212: ...indow 1 12 10 3 2 virtual MM_ERROR Commit inline virtual Apply all changes Return values MML_OK on success Otherwise the related error code or MML_ERR 12 10 3 3 MML_GDC_DISPLAY GetDisplay inline Return values Return the display object of the window 12 10 3 4 unsigned int GetHeight inline Return values Return the height of the window 12 10 3 5 MML_GDC_SYNC GetSync inline Get the sync object of this...

Page 213: ...DC_DISP_WINDOW_PROPERTIES in blend_mode Starting blend mode for the window see mmlGdcDispWinSetBlendMode Return values MML_OK on success Otherwise the related error code or MML_ERR 12 10 3 9 operator MML_GDC_DISP_WINDOW inline Return values Return the window object 12 10 3 10 virtual MM_ERROR SetSurface MML_GDC_SURFACE surf inline virtual Set a new surface to the window and apply changes Parameter...

Page 214: ...tion The class Frame is used to store the uncompressed image 12 11 2 Constructor Destructor Documentation 12 11 2 1 Frame unsigned _width unsigned _height inline Constructor Parameters in _width Frame width in _height Frame height 12 11 3 Member Function Documentation 12 11 3 1 Pixel GetPixel unsigned x unsigned y const inline Get Pixel at position x y Parameters in x X position in y Y position Re...

Page 215: ...playPeriod MM_U32 vertPulseStart MM_U32 vertPulseEnd MM_U32 vertTotal MM_U32 DCKDelay MML_GDC_DISP_DCK_INVERT_ENABLE DCKInvertEnable MM_U32 syncPolarity 12 12 1 Detailed Description Data type used to specify custom timing for a display mode 12 12 2 Field Documentation 12 12 2 1 MM_U32 DCKDelay Number of display clock delay default no additional delay value is in 0 16 12 12 2 2 MML_GDC_DISP_DCK_INV...

Page 216: ...IGH 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 12 12 2 9 MM_U32 vertDisplayPeriod Vertical display period Illuminated area 12 12 2 10 MM_U32 vertPulseEnd Vertical sync end position 12 12 2 11 MM_U32 vertPulseSt...

Page 217: ...re a display controller There are 3 options to configure the display Option 1 Specify one of the predefined resolutions in xResolution yResolution refreshRate 320x240 60 Hz 480x272 60 Hz 640x480 60 Hz 800x480 60 Hz 800x600 60 Hz 1024x768 60 Hz 1280x720 60 Hz 1600x600 60 Hz 1280x800 60 Hz 1920x768 60 Hz 1280x1024 60 Hz 1600x900 60 Hz 1920x1080 60 Hz Option 2 Specify a custom resolution in xResoluti...

Page 218: ... the modeLine settings specified by modeLine 12 13 2 4 MML_GDC_DISP_MODE_LINE modeLine Custom display timing information 12 13 2 5 MML_GDC_DISP_CONTROLLER outputController Must be MML_GDC_DISP_CONTROLLER_0 12 13 2 6 MML_GDC_DISP_TCON_PROPERTIES pDISP_TCON_PROPS Pointer to TCON register value structure array Must be NULL if no TCON is used Must be NULL if it is not display controller 0 12 13 2 7 MM...

Page 219: ...t 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 The documentation for this struct was generated from the following file mml_gdc_display h ...

Page 220: ...lated parameter can be a bit field combination of MML_GDC_DISP_FEATURE_INDEX_COLOR MML_GDC_DISP_FEATURE_DECODE MML_GDC_DISP_FEATURE_MULTI_LAYER 12 15 2 2 MM_U32 height Height of the window 12 15 2 3 MML_GDC_DISP_LAYER layerId Layer to use for the window see MML_GDC_DISP_LAYER 12 15 2 4 MML_GDC_DISP_OUTPUT_SCREEN outputScreen Which output screen should the window be created on 12 15 2 5 MML_GDC_DIS...

Page 221: ...mentation 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 mml_gdc_pixeng h 12 17 MML_GDC_SURFACE_CONTAINER Struct Reference include mml_gdc_surfman h Data Fields MM_U32 reserved 15 12 17 1 Detailed Description The surface object container 12 17 2 Field Documentation 12 17 2 1 MM_U32 reserved 15 Re...

Page 222: ...tainer The documentation for this struct was generated from the following file mml_gdc_sync h 12 19 MML_GDC_SYSINIT_INFO Struct Reference include mml_gdc_sysinit h Data Fields MM_U32 ResourceLock MM_U32 GfxPll 12 19 1 Detailed Description Data type used to program timing controller TCON registers 12 19 2 Field Documentation 12 19 2 1 MM_U32 GfxPll Frequency of GFX PLL for Pixel Clock generation in...

Page 223: ... unsigned pkg unsigned x unsigned y Data Fields RLAD cfg bool delta unsigned pcnt unsigned cbpc NUM_C unsigned cbpp unsigned size unsigned cofs NUM_C unsigned crange NUM_C unsigned start NUM_C unsigned prev NUM_C int dmin NUM_C int dmax NUM_C 12 20 1 Detailed Description Helper structure for RLA compression 12 20 2 Field Documentation 12 20 2 1 unsigned cbpc NUM_C bits per compressed component 12 ...

Page 224: ... 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 unsigned col NUM_C 12 21 1 Detailed Description Helper structure to store one pixel 12 21 2 Field Documentation 12 21 2 1 unsigned col NUM_C array with bit size for all components The documentation for this struct w...

Page 225: ...t unsigned cnt_width const unsigned cwrap unsigned i const unsigned max_code unsigned i const unsigned header_size const unsigned buffer_size const unsigned bpp const unsigned cbpp_max const unsigned image_size const double compression_rate const bool Encode Frame f BitStream bs bool Decode BitStream bs Frame f Data Fields enum RLAD Mode mode unsigned width unsigned height unsigned bpc NUM_C unsig...

Page 226: ...num Mode configuration Enumerator MODE_RLAD_UNIFORM Proprietary lossy with upper limit for compression rate Proprietary lossy with fixed compression rate MODE_RLA Proprietary lossless MODE_RL Standard RL format according to TGA spec for backward compatibility 12 22 3 Member Function Documentation 12 22 3 1 unsigned bpp const inline return sum of component bpp 12 22 3 2 unsigned buffer_size const c...

Page 227: ...re the uncompressed image Return values True if successful otherwise false 12 22 3 9 bool Encode Frame f BitStream bs Encode image Parameters in f Uncompressed image out bs BitStream class storing the compressed data Return values True if successful otherwise false 12 22 3 10 unsigned header_size const calc header size 12 22 3 11 unsigned image_size const inline return uncompressed image size 12 2...

Page 228: ...bpc_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 12 22 4 6 enum RLAD Mode mode store the compression mode 12 22 4 7 unsigned width frame dimension width in pixels The documentat...

Page 229: ... MM_MODULEID moduleId MM_MODULE moduleId define MML_ERR MM_ERRCODE 0x3FFFFFFF define MMD_ERR MM_ERRCODE 0x7FFFFFFF define MML_OK MM_ERRCODE 0x0 define MMD_OK MM_ERRCODE 0x0 define MM_FALSE MM_BOOL 0 define MM_TRUE MM_BOOL 1 define NULL void 0 define MM_BIT x 1U x define MM_PTR_TO_ADDR x MM_ADDR x define MM_ADDR_TO_PTR x void x define MM_ADDR_TO_UINT32 x MM_U32 x define MM_UINT32_TO_ADDR x MM_ADDR ...

Page 230: ...INVALID_ADDRESS MM_ERRCODE 0x21008003 Error codes for Display API define MML_ERR_GDC_DISP_DEVICE_NOT_FOUND MM_ERRCODE 0x21001001 define MML_ERR_GDC_DISP_DISPLAY_ALREADY_OPEN MM_ERRCODE 0x21001002 define MML_ERR_GDC_DISP_INVALID_ARG MM_ERRCODE 0x21001003 define MML_ERR_GDC_DISP_UNSUPPORTED_MODE MM_ERRCODE 0x21001004 define MML_ERR_GDC_DISP_DEVICE_INIT_FAILED MM_ERRCODE 0x21001005 define MML_ERR_GDC...

Page 231: ...0D007 define MML_ERR_GDC_PE_INVALID_STRIDE MM_ERRCODE 0x2100D008 define MML_ERR_GDC_PE_INVALID_BITS_PER_PIXEL MM_ERRCODE 0x2100D009 define MML_ERR_GDC_PE_INVALID_COMPRESSION MM_ERRCODE 0x2100D010 define MML_ERR_GDC_PE_INVALID_RLD_REQUEST MM_ERRCODE 0x2100D011 define MML_ERR_GDC_PE_INVALID_ROP_MODE MM_ERRCODE 0x2100D012 define MML_ERR_GDC_PE_INVALID_SURFACE_PARAM MM_ERRCODE 0x2100D013 define MML_ER...

Page 232: ...ERR_GDC_SYS_DEVICE_NOT_YET_INITIALIZED MM_ERRCODE 0x21009004 define MML_ERR_GDC_SYS_DEVICE_INVALID_PARAMETER MM_ERRCODE 0x21009005 define MML_ERR_GDC_SYS_DEVICE_WRONG_ID MM_ERRCODE 0x21009006 Error codes for Writeback API define MML_ERR_GDC_WB_DEVICE_BUSY MM_ERRCODE 0x21004001 define MML_ERR_GDC_WB_INVALID_PARAMETER MM_ERRCODE 0x21004002 Error codes for Internal function calls define MML_ERR_GDC_C...

Page 233: ...INTERVAL MM_ERRCODE 0x11007004 define MMD_ERR_GDC_CARD_DEV_NOTSUPPORTED MM_ERRCODE 0x11007005 13 4 1 Detailed Description Error Codes for the Basic Graphics modules 13 5 mm_gdc_module_id h File Reference Basic Graphics module ids common include mm_defines h Macros Module Id s The error reporting level can be set per module id Note kernel modules are covered by the corresponding user module define ...

Page 234: ... 1 Detailed Description Basic Graphics Driver Version Numbers 13 7 mm_types h File Reference Basic type definitions 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 typedef signed long long MM_S64 typedef char MM_CHAR typedef float MM_FLO...

Page 235: ...RIS_STORE9_FRAMECOMPLETE_IRQ MM_U64 1 MM_GDC_IRIS_INT_STORE9_FRAMECOMPLETE_IRQ_CP define MM_GDC_IRIS_EXTDST0_FRAMECOMPLETE_IRQ MM_U64 1 MM_GDC_IRIS_INT_EXTDST0_FRAMECOMPLETE_IRQ_CP define MM_GDC_IRIS_DISENGCFG_FRAMECOMPLETE0_IRQ MM_U64 1 MM_GDC_IRIS_INT_DISENGCFG_FRAMECOMPLETE0_IRQ_CP define MM_GDC_IRIS_CMDSEQ_ERROR_IRQ MM_U64 1 MM_GDC_IRIS_INT_CMDSEQ_ERROR_IRQ_CP define MM_GDC_IRIS_FRAMEGEN0_SECS...

Page 236: ...ame MM_U32 param MM_ERROR mmlGdcConfigGetAttribute MML_GDC_CONFIG_ATTR pname MM_U32 pParam 13 9 1 Detailed Description Controls global graphics driver and hardware configurations 13 10 mml_gdc_display h File Reference Display API include mm_types h include mml_gdc_surfman h include mml_gdc_sync h include mm_gdc_errors h Data Structures struct MML_GDC_DISP_MODE_LINE struct MML_GDC_DISP_TCON_PROPERT...

Page 237: ...ZER define MML_GDC_DISP_WINDOW_PROPERTIES_INITIALIZER Typedefs typedef struct MML_GDC_DISPLAY MML_GDC_DISPLAY typedef struct MML_GDC_DISP_WINDOW MML_GDC_DISP_WINDOW Enumerations enum MML_GDC_DISP_CONTROLLER MML_GDC_DISP_CONTROLLER_0 0 enum MML_GDC_DISP_MODE MML_GDC_DISP_SINGLE_SCREEN 0 MML_GDC_DISP_DUAL_SCREEN MML_GDC_DISP_DUAL_VIEW enum MML_GDC_DISP_OUTPUT_SCREEN MML_GDC_DISP_OUTPUT_SCREEN_PRIMAR...

Page 238: ... MML_GDC_DISP_DCK_INVERT_ON enum MML_GDC_DISP_DITHER_ENABLE MML_GDC_DISP_DITHOFF 0 MML_GDC_DISP_DITHON enum MML_GDC_DISP_DITHER_MODE MML_GDC_DISP_TEMPDITH 0 MML_GDC_DISP_SPATDITH 1 4 enum MML_GDC_DISP_DITHER_RANGE MML_GDC_DISP_DITHRS11LOW 0 enum MML_GDC_DISP_DITHER_FORMAT MML_GDC_DISP_DITHER108 0x08080800 MML_GDC_DISP_DITHER107 0x07070700 MML_GDC_DISP_DITHER106 0x06060600 MML_GDC_DISP_DITHER105 0x...

Page 239: ...6 pRed const MM_S16 pGreen const MM_S16 pBlue MM_ERROR mmlGdcDispSyncVSync MML_GDC_DISPLAY display MML_GDC_SYNC sync MM_S32 vsyncCnt MM_ERROR mmlGdcDispSetAttribute MML_GDC_DISPLAY display MML_GDC_DISP_ATTR pname MM_U32 param MM_ERROR mmlGdcDispGetAttribute MML_GDC_DISPLAY display MML_GDC_DISP_ATTR pname MM_U32 pParam MM_ERROR mmlGdcDispCommit MML_GDC_DISPLAY display Window Functions MM_ERROR mmlG...

Page 240: ...R mmlGdcErpSetPrintf MM_PRINTFUNCTION user_print_function 13 11 1 Detailed Description Error Reporting API 13 12 mml_gdc_pixeng h File Reference Pixel Engine API include mml_gdc_sync h include mm_types h include mml_gdc_display h include mm_gdc_errors h Data Structures struct MML_GDC_PE_CONTEXT_CONTAINER Macros define MML_GDC_PE_API extern define MML_GDC_PE_STORE 0x00000001U define MML_GDC_PE_SRC ...

Page 241: ...ML_GDC_PE_ROP_DSTAND MM_U08 0x80 define MML_GDC_PE_FILTER_NEAREST 0 define MML_GDC_PE_FILTER_BILINEAR 1 define MML_GDC_PE_ATTR_ZERO_TOP_LEFT 0U define MML_GDC_PE_ATTR_ZERO_BOTTOM_LEFT 1U define MML_GDC_PE_TILE_FILL_ZERO 0U define MML_GDC_PE_TILE_FILL_CONSTANT 1U define MML_GDC_PE_TILE_PAD 2U define MML_GDC_PE_TILE_PAD_ZERO 3U Typedefs typedef MML_GDC_PE_CONTEXT_CONTAINER MML_GDC_PE_CONTEXT Enumera...

Page 242: ...GDC_PE_BM_GL_FUNC_REVERSE_SUBTRACT 0x800BU MML_GDC_PE_BM_VG_BLEND_SRC 0x2000U MML_GDC_PE_BM_VG_BLEND_SRC_OVER 0x2001U MML_GDC_PE_BM_VG_BLEND_DST_OVER 0x2002U MML_GDC_PE_BM_VG_BLEND_SRC_IN 0x2003U MML_GDC_PE_BM_VG_BLEND_DST_IN 0x2004U MML_GDC_PE_BM_VG_BLEND_MULTIPLY 0x2005U MML_GDC_PE_BM_VG_BLEND_SCREEN 0x2006U MML_GDC_PE_BM_VG_BLEND_DARKEN 0x2007U MML_GDC_PE_BM_VG_BLEND_LIGHTEN 0x2008U MML_GDC_PE_...

Page 243: ...dcPeBlendMode MML_GDC_PE_CONTEXT pectx MML_GDC_PE_BM mode_red MML_GDC_PE_BM mode_green MML_GDC_PE_BM mode_blue MML_GDC_PE_BM mode_alpha 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 MML_GDC_PE_API MM_ERROR mmlGdcPeSetMatrix MML_GDC_PE_CONTEXT pectx MM_U32 target MML_GDC_PE_GEO_MATRIX_FORMAT format const MM_FLOAT f...

Page 244: ...FORMAT_R8G8B8A8 0x00 MML_GDC_SURF_FORMAT_A8B8G8R8 MML_GDC_SURF_FORMAT_A8R8G8B8 MML_GDC_SURF_FORMAT_B8G8R8A8 MML_GDC_SURF_FORMAT_R8G8B8X8 MML_GDC_SURF_FORMAT_X8B8G8R8 MML_GDC_SURF_FORMAT_X8R8G8B8 MML_GDC_SURF_FORMAT_R8G8B8 MML_GDC_SURF_FORMAT_B8G8R8 MML_GDC_SURF_FORMAT_R6G6B6 MML_GDC_SURF_FORMAT_R4G4B4A4 MML_GDC_SURF_FORMAT_A4R4G4B4 MML_GDC_SURF_FORMAT_R5G5B5A1 MML_GDC_SURF_FORMAT_A1R5G5B5 MML_GDC_...

Page 245: ..._GDC_SURF_ATTR_RLAD_MAXCOLORBITS MML_GDC_SURF_ATTR_SIZEINBYTES MML_GDC_SURF_ATTR_CLUTMODE MML_GDC_SURF_ATTR_CLUTCOUNT MML_GDC_SURF_ATTR_CLUTBITPERPIXEL MML_GDC_SURF_ATTR_CLUTCOLORBITS MML_GDC_SURF_ATTR_CLUTCOLORSHIFT MML_GDC_SURF_ATTR_CLUTBUFFERADDRESS MML_GDC_SURF_ATTR_CLUTBUFFER_PHYS_ADDRESS MML_GDC_SURF_ATTR_SURF_FORMAT MML_GDC_SURF_ATTR_USERDEFINED Functions MM_ERROR mmlGdcSmResetSurfaceObject...

Page 246: ... frame buffer operations include mm_gdc_errors h Data Structures struct MML_GDC_SYNC_CONTAINER Typedefs typedef MML_GDC_SYNC_CONTAINER M M L_G D C _S Y N C Functions MM_ERROR mmlGdcSyncReset MML_GDC_SYNC sync MM_ERROR mmlGdcSyncWait MML_GDC_SYNC sync MM_S32 timeout MM_ERROR mmlGdcSyncIncr MML_GDC_SYNC sync MM_S32 incr 13 14 1 Detailed Description Synchronization of framebuffer operations ...

Page 247: ...ne GFX_PLL_MAX 415000000U Default initializer define MML_GDC_SYSINIT_INITIALIZER Resource names define MM_GDC_RES_DISP0 1U 0U define MM_GDC_RES_LAYER0 1U 1U define MM_GDC_RES_LAYER1 1U 2U define MM_GDC_RES_FETCH_DECODE0 1U 3U define MM_GDC_RES_FETCH_LAYER0 1U 4U Functions MM_ERROR mmlGdcSysInitializeDriver MML_GDC_SYSINIT_INFO pDriverInitInfo MM_ERROR mmlGdcSysUninitializeDriver void MM_ERROR mmlG...

Page 248: ...Mat3x2Rot Mat3x2 m MM_FLOAT f MML_GDC_2D_MATRIX_API void utMat3x2RotPre Mat3x2 m MM_FLOAT f MML_GDC_2D_MATRIX_API MM_U32 utMat3x2Invert Mat3x2 m MML_GDC_2D_MATRIX_API void utMat3x2GetXY const Mat3x2 m const MM_FLOAT x const MM_FLOAT y MM_FLOAT xout MM_FLOAT yout MML_GDC_2D_MATRIX_API void utMat3x3LoadIdentity Mat3x3 m MML_GDC_2D_MATRIX_API void utMat3x3Copy Mat3x3 dst const Mat3x3 src MML_GDC_2D_M...

Page 249: ...rices MML_GDC_2D_MATRIX_API void utMat3x2ToMat4x4 Mat3x2 src Mat4x4 dst MML_GDC_2D_MATRIX_API void utMat3x3ToMat4x4 Mat3x3 src Mat4x4 dst MML_GDC_2D_MATRIX_API void utMat4x4ToMat3x3 Mat4x4 src Mat3x3 dst MML_GDC_2D_MATRIX_API void utMat4x4ToMat3x2 Mat4x4 src Mat3x2 dst Matrix functions for color operations MML_GDC_2D_MATRIX_API void utMat4x3Copy Mat4x3 dst const Mat4x3 src MML_GDC_2D_MATRIX_API vo...

Page 250: ...age MM_U32 baseAddr MM_U32 clutAddr MM_ERROR utSurfLoadBitmap MML_GDC_SURFACE surface const void pImage MM_BOOL bCopyToRAM MM_S32 utSurfWidth MML_GDC_SURFACE surf MM_S32 utSurfHeight MML_GDC_SURFACE surf MM_ERROR utSurfCreateBuffer MML_GDC_SURFACE surf MM_U32 w MM_U32 h MML_GDC_SURF_FORMAT eFormat void utSurfDeleteBuffer MML_GDC_SURFACE surf MM_ERROR utSurfGetPixel MML_GDC_SURFACE src MM_U32 x MM_...

Page 251: ...9 ut_class_device h File Reference This class abstracts the device initialization include mml_gdc_display h include mml_gdc_sysinit h include sm_util h include ut_compatibility h include ut_memman h Data Structures class CDevice 13 19 1 Detailed Description This class abstracts the device initialization 13 20 ut_class_display h File Reference This class abstracts the display initialisation include...

Page 252: ...2 13 21 ut_class_menu h File Reference This class realizes a simple menu include wchar h include sm_util h include ut_compatibility h include ut_class_window h include ut_class_surface h include ut_freetype h include pe_matrix h Data Structures class CMenuItem class CMenu 13 21 1 Detailed Description This class realizes a simple menu ...

Page 253: ..._COMP_RLAD_UNIFORM format include assert h include vector include queue Data Structures class RLAD class RLAD Frame struct RLAD Frame Pixel class RLAD BitStream struct RLAD Package Macros define RLAD_VERSION 1 02 13 22 1 Detailed Description 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 13 22 2 Macr...

Page 254: ... Data Structures class CSurface NUM_BUFFERS 13 23 1 Detailed Description This class abstracts MML_GDC_SURFACE objects 13 24 ut_class_window h File Reference This class abstracts windows include mml_gdc_display h include mml_gdc_sysinit h include ut_class_display h include ut_class_surface h include ut_class_ctx h include sm_util h include dbg_win h Data Structures class CWindow class CSurfaceWindo...

Page 255: ...rfaces MM_ERROR mmlGdcSmDeleteSurfaceObjects MM_U32 uCnt MML_GDC_SURFACE pSurfaces MM_ERROR mmlGdcPeGenContext MML_GDC_PE_CONTEXT pPectx void mmlGdcPeDeleteContext MML_GDC_PE_CONTEXT pectx void mmlOsLibcMalloc size_t _Size void mmlOsLibcFree void _Memory MM_ERROR mmlGdcVideoConfig UTIL_VRAM_CONFIG config void mmlGdcVideoAlloc MM_U32 size MM_U32 alignment MM_ADDR pAddr void mmlGdcVideoFree void add...

Page 256: ...CODE 0x18010003 define MML_ERR_MMAN_INVALID_MEMORY MM_ERRCODE 0x18010004 define MML_ERR_MMAN_ACCESS_FAILED MM_ERRCODE 0x18010005 define MM_VRAM_BASE 0xD0000000U define MM_VRAM_SIZE 0x00080000U define MM_SDRAM_BASE 0xB0080000U define MM_SDRAM_SIZE 0x01000000U Typedefs typedef void MML_MMAN_HEAP_HANDLE Functions MM_ERROR utMmanReset void MM_ERROR utMmanCreateHeap MML_MMAN_HEAP_HANDLE hdl m em M M _U...

Page 257: ...le Reference This sample code can be used to create a run length encoded buffer include mm_types h include mm_defines h 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 13 28 1 Detailed Description This sample code can be used to create a run length encoded buffer ...

Page 258: ... Microcontroller Graphic Driver User Manual Doc No 002 04387 Rev A 258 14 Major Changes Spansion publication Number S6E2DH_AN709 00022 1v0 E Page Section Change results Revision 1 0 Initial release Note Please see Document History for more details ...

Page 259: ...istory Document Revision History Document Title FM4 S6E2DH S6E2DF S6E2D5 S6E2D3 Series 32 Bit Microcontroller Graphic Driver User Manual Document Number 002 04387 Revision Issue Date Origin of Change Description of Change 09 11 2015 YUIS Initial Release A 08 11 2016 YUIS Migrated Spansion guide AN709 00022 1v0 E to Cypress format ...

Reviews: