User’s Manual
EMMA2 API
Display
Contents
1 Introduction ....................................................................................................................... 2
2 Function Prototypes .......................................................................................................... 6
MMAC_DISP_Initialise..................................................................................................6
MMAC_DISP_SetPlaneFormat.....................................................................................7
MMAC_DISP_GetPlaneFormat ....................................................................................8
MMAC_DISP_SetExternalFormat.................................................................................9
MMAC_DISP_ConfigureAlphaBlendOutput................................................................10
MMAC_DISP_SteerTreeOutput..................................................................................12
MMAC_DISP_Display.................................................................................................13
MMAC_DISP_SetPlanePriority...................................................................................14
MMAC_DISP_SetPlaneAlpha.....................................................................................15
MMAC_DISP_GetPlaneAlpha ....................................................................................16
MMAC_DISP_SetBackgroundColour .........................................................................17
MMAC_DISP_GetBackgroundColour.........................................................................18
MMAC_DISP_SetBorderColour..................................................................................19
MMAC_DISP_GetBorderColour .................................................................................20
3 Data Structures ............................................................................................................... 21
4 Revision History .............................................................................................................. 23
Book No: S16753EE1V0UM00 Doc No: MMAC0017, Issue: 1.2
© NEC Electronics Corporation 2002 ~ 2004 Publication Date: 2004-02-11
The information is this document is subject to change without notice – it is
the reader’s responsibility to check that this is the latest available version.
This document includes company confidential information. It should only be
released to third parties under a Non-Disclosure Agreemant.
1 Introduction
This section defines the API for the MMAC DISP driver.
This driver acts for all planes settings.
Prior to using any of the functions of this section, it is necessary to initialise the other parts of the API that
this code depends on by calling
1. MMAC_RTOS_Initialise()
2. MMAC_VIDENC_Initialise()
The API function MMAC_DISP_Initialise() must be called prior to any other function in the DISP driver.
Controlling the output form the Alpha Blender
One of the main functions of the DISP API is to provide a means of configuring the outputs from the alpha
blending hardware. Because this hardware is highly configurable, it is important for a user to understand
the implications of its modes of operation.
All the display planes (Hardware Cursor, OSD1, OSD2, SCALER1, SCALER2 and SCALER3) can be
blended together to provide up to two outputs.
Each display plane must be synchronised according to the display format (NTSC/PAL/SECAM) in which
it is eventually intended to be displayed. This is done by using the function
MMAC_DISP_SetPlaneFormat().
The manner in which the planes are blended together to provide the two outputs is illustrated in the
diagram on the following page (Figure 1).
This diagram shows the alpha blending tree. It shows the points during the blending process at which the
blend may be extracted for each of the two outputs from the alpha blender. These two outputs are referred
to as the ‘tree’ and ‘extract’ outputs.
These output are then directed to the Video Encoder and Rec656 outputs by use of the function
MMAC_DISP_SteerTreeOutput(). By default, the ‘tree’ output is sent to the embedded Video Encoder,
and the ‘extract’ output is sent to the Rec656 output.
The blendConfig and useBkgd2InTreeOutput values refer to the values passed when calling the function
MMAC_DISP_ConfigureAlphaBlendOutput().
2
Figure 1 – The EMMA2 Alpha Blending Tree
selector
SUB_PHASE
extract
output
cursor
PRI1 ~ PRI5
X
tree
OSD 2 output
OSD 1
X
5 to 5 selector
scaler 3
BCK2_EN &&
SUB_PHASE == 0011
+ X
scaler 2
BCK2_EN &&
X
+ SUB_PHASE == 0010
scaler 1
BCK2_EN &&
+ X SUB_PHASE == 0001
background 1
BCK2_EN &&
SUB_PHASE == 0000
background 2
1 . . . . . . . . . . . . . blending stages . . . . . . . . . . . . . . 6
+ Applies background colour 2 to any X Uses 256-level alpha blending to mix
transparent pixels in the foreground plane the higher plane with the lower plane Blend_tree
Note: The descriptions shown on the right-hand side of the figure, assume the plane priorities are as
illustrated (SCALER1 = priority5 (lowest), OSD2 = priority1). These may, of course, be different. The
point to note is that Background2 cannot be inserted between the priority1 plane (in the above case, this
would be OSD2) and the cursor plane, on the ‘tree’ output.
3
The DISP API provides the following functions:
Function Name Description
MMAC_DISP_Initialise Used to allocate the resources necessary to use the
DISP API.
MMAC_DISP_SetPlaneFormat Ensures the display block generates the specified
plane in a manner suitable for display in the specified
output format (NTSC, PAL or SECAM).
MMAC_DISP_GetPlaneFormat Reports the current output format in which the
specified plane is intended to be displayed.
MMAC_DISP_SetExternalFormat Ensures that the planes destined for display in the
specified format are synchronised with the externally
provided DVI synch.
MMAC_DISP_ Determines which display planes comprise the ‘tree’
ConfigureAlphaBlendOutput and ‘extract’ outputs from the alpha blending tree.
MMAC_DISP_SteerTreeOutput Determines whether the ‘tree’ output from the alpha
blending tree is sent to the embedded Video Encoder
or to the Rec656 output. The ‘extract’ output from the
alpha blending tree is then sent to the other output.
MMAC_DISP_Display Used to enable/disable the display of a specified
plane.
MMAC_DISP_SetPlanePriority Sets the display priorities for the planes OSD1,
OSD2, SCALER1, SCALER2 and SCALER3.
MMAC_DISP_SetPlaneAlpha Sets the plane alpha blending value for a specified
plane.
MMAC_DISP_GetPlaneAlpha Reports the current plane alpha blending value for a
specified plane.
MMAC_DISP_SetBackgroundColour Sets the background colour used for the
background1 plane or background2 plane.
MMAC_DISP_GetBackgroundColour Reports the current background colour used for the
background1 plane or background2 plane.
MMAC_DISP_SetBorderColour Sets the border colour used for the border1 plane or
border2 plane.
MMAC_DISP_GetBorderColour Reports the current border colour used for the
border1 plane or border2 plane.
Result Codes
The meanings of the various result codes returned by the API are described in the following table:
Return Code Meaning
MMAC_DISP_OK Completed OK.
MMAC_DISP_INVALID_PARAM Invalid parameter.
MMAC_DISP_INVALID_PLANE Invalid plane.
MMAC_DISP_NOT_INITIALISED The DISP driver has not yet been initialised.
MMAC_DISP_ALREADY_INITIALISED The DISP driver has already been initialised.
MMAC_DISP_SEMAPHORE_ERROR Semaphore error because multiple call occurred.
4
API Configuration
A number of configurable options, in the form of “#define”s are defined in the DISP section of the api.h
source file clearly marked by the comment:
/************************************************************/
/* */
/* MMAC DISP SETUP */
/* */
/************************************************************/
These options are:
Define Default Meaning
MMAC_DISP_ MMAC_RTOS_ Number of system ticks the subsystem will wait
SEMAPHORE_TIMEOUT MAX_TIMEOUT when attempting to acquire the hardware
access semaphores.
MMAC_DISP_ MMAC_NO Determines whether or not the DISP API will
PARAMETER_CHECKING perform any checks on the parameters passed
when [Link] should be set to MMAC_YES
during application development and testing,
but may be set to MMAC_NO to improve
performance once application code has been
verified.
5
2 Function Prototypes
MMAC_DISP_Initialise
Function Prototype
MMAC_DISP_RESULT_CODE MMAC_DISP_Initialise (void)
Inputs
None.
Outputs
None.
Event Notification
N/A
Return Codes
MMAC_DISP_OK
MMAC_DISP_ALREADY_INITIALISED
Description
This function initialises the DISP subsystem and must be called once prior to using any of the other DISP
API functions.
If it is called again it will return MMAC_DISP_ALREADY_INITIALISED and perform no action.
See Also
None
Sample Code
< tba >
6
MMAC_DISP_SetPlaneFormat
Function Prototype
MMAC_DISP_RESULT_CODE MMAC_DISP_SetPlaneFormat(
MMAC_DISPL_PLANE plane,
MMAC_DISP_FORMAT format
)
Inputs
plane Display plane to be configured – one of
MAC_DISP_SCALER1
MAC_DISP_SCALER2
MAC_DISP_SCALER3
MAC_DISP_OSD1
MAC_DISP_OSD2
MAC_DISP_CURSOR
format Display format – one of
MAC_DISP_NTSC
MAC_DISP_PAL
MAC_DISP_SECAM
Outputs
None.
Event Notification
N/A
Return Codes
MMAC_DISP_OK
MMAC_DISP_INVALID_PARAM
Description
This function informs the display block to generate the specified display plane with a synchronisation
suitable for the specified output format.
This function does not change the output format produced by the Video Encoder.
It is the responsibility of the application to ensure that each display plane is correctly synchronised for the
output format in which it is intended to be displayed.
If successful then MMAC_DISP_OK will be returned.
If either plane or format is set to a value other than those specified above, then
MMAC_DISP_INVALID_PARAM will be returned.
See Also
MMAC-DISP-GetPlaneFormat
Sample Code
< tba >
7
MMAC_DISP_GetPlaneFormat
Function Prototype
MMAC_DISP_RESULT_CODE MMAC_DISP_GetPlaneFormat(
MMAC_DISP_PLANE plane,
MMAC_DISP_FORMAT *format
)
Inputs
plane Display plane whose display format synchronisation is to be reported – one of:
MMAC_DISP_SCALER1
MMAC_DISP_SCALER2
MMAC_DISP_SCALER3
MMAC_DISP_OSD1
MMAC_DISP_OSD2
MMAC_DISP_CURSOR
Outputs
format The display format for which the display plane is currently synchronised. One of:
MMAC_DISP_NTSC
MMAC_DISP_PAL
MMAC_DISP_SECAM
Event Notification
N/A
Return Codes
MMAC_DISP_OK
MMAC_DISP_INVALID_PARAM
Description
This function reports the display format for which the specified display plane is currently synchronised.
If successful then MMAC_DISP_OK will be returned.
If plane is set to a value other than those specified above, or if format is passed a NULL value, then
MMAC_DISP_INVALID_PARAM will be returned.
See Also
MMAC_DISP_SetPlaneFormat
Sample Code
< tba >
8
MMAC_DISP_SetExternalFormat
Function Prototype
MMAC_DISP_RESULT_CODE MMAC_DISP_SetExternalFormat(
MMAC_DISP_FORMAT format
)
Inputs
format Display format to which external signal input is synchronised – one of
MMAC_DISP_NTSC
MMAC_DISP_PAL
MMAC_DISP_SECAM
Outputs
None.
Event Notification
N/A
Return Codes
MMAC_DISP_OK
MMAC_DISP_INVALID_PARAM
Description
This function informs the display block of the format of the DVI input signal.
This allows the display block to synchronise the internally generated video with the external DVI
generated video.
This function does not change the output format produced by the Video Encoder.
If successful then MMAC_DISP_OK will be returned.
If format is set to a value other than those specified above, then MMAC_DISP_INVALID_PARAM will
be returned.
See Also
None
Sample Code
< tba >
9
MMAC_DISP_ConfigureAlphaBlendOutput
Function Prototype
MMAC_DISP_RESULT_CODE MMAC_DISP_ConfigureAlphaBlendOutput(
MMAC_DISP_BLEND_CONFIG blendConfig,
MMAC_BOOL useBkgd2InTreeOutput
)
Inputs
blendConfig Configures how the extract output from the alpha blender is comprised (Priority
5 plane has lowest priority, priority 1 plane has highest priority. Cursor plane is
effectively priority 0 as it always appears in front of other planes when enabled):
MMAC_DISP_BLEND_TO_PRIORITY5
Blends current Priority 5 plane with background 1
MMAC_DISP_BLEND_TO_PRIORITY4
Blends all planes up to and including the current Priority 4 plane
(Priority 4 and all lower-priority planes)
MMAC_DISP_BLEND_TO_PRIORITY3
Blends all planes up to and including the current Priority 3 plane
(Priority 3 and all lower-priority planes)
MMAC_DISP_BLEND_TO_PRIORITY2
Blends all planes up to and including the current Priority 2 plane
(Priority 2 and all lower-priority planes)
MMAC_DISP_BLEND_TO_PRIORITY1
Blends all planes up to and including the current Priority 1 plane
(All planes except cursor plane)
MMAC_DISP_BLEND_TO_CURSOR
Blends all planes up to and including the hardware cursor plane (as this
is the highest priority plane, this includes all planes)
MMAC_DISP_BLEND_SCALER1_ONLY
Blends only the SCALER1 plane with background2/border2.
MMAC_DISP_BLEND_SCALER2_ONLY
Blends only the SCALER2 plane with background2/border2.
MMAC_DISP_BLEND_SCALER3_ONLY
Blends only the SCALER3 plane with background2/border2.
useBkgd2InTreeOutput This flag is used to insert Background2/Border2 into the ‘tree’ output from the
alpha blender. It only takes effect if the blendConfig parameter has been set to a
value other than MMAC_DISP_BLEND_TO_CURSOR, MMAC_DISP_BLEND_
SCALER1_ONLY, MMAC_DISP_BLEND_SCALER2_ONLY or MMAC_DISP_
BLEND_SCALER3_ONLY.
If this parameter is set to MMAC_TRUE, then the ‘tree’ output will consist of
only of the planes excluded from the ‘extract’ output, blended with background2/
border2.
The ‘tree’ output cannot, however, consist only of the cursor plane – the
priority1 display plane will always be incorporated into the ‘tree’ output. This is
the only case where background2 will not be used to ‘mask off’ the lower
priority planes from the ‘tree’ output when this parameter is set to
MMAC_TRUE.
If this parameter is set to MMAC_FALSE, then the ‘tree’ output will remain
unaffected by the configuration assigned to the ‘extract’ output.
10
Outputs
None
Event Notification
N/A
Return Codes
MMAC_DISP_OK
MMAC_DISP_INVALID_PARAM
Description
This function configures the plane blending used to determine the output from the ‘extract’ point on the
alpha blending tree.
The extract output may be configured to provide a blend of all planes up to and including a given priority
plane (i.e. that plane and all lower-priority planes) or to provide a single Scaler plane blended with
background2 and border2. If successful then MMAC_DISP_OK will be returned.
If the blendConfig value is invalid then MMAC_DISP_INVALID_PARAM will be returned.
See Also
MMAC_DISP_SetPlanePriority
MMAC_DISP_SetPlaneAlpha
MMAC_DISP_SetBackgroundColour
Sample Code
< tba >
11
MMAC_DISP_SteerTreeOutput
Function Prototype
MMAC_DISP_RESULT_CODE MMAC_DISP_SteerTreeOutput(
MMAC_DISP_OUTPUT_DESTINATION dest
)
Inputs
dest Determines which output (Video Encoder or Rec656) will receive the ‘tree’
output form the alpha blender. Conversely, the ‘extract’ output from the alpha
blender will be direct to the other output:
MMAC_DISP_DEST_VIDEO_ENCODER
Directs the ‘tree’ output from the alpha blender to the embedded Video
Encoder. The ‘extract’ output from the alpha blender will be directed to
the Rec656 output. This is the default setting.
MMAC_DISP_DEST_REC656
Directs the ‘tree’ output from the alpha blender to the Rec656 output.
The ‘extract’ output from the alpha blender will be directed to the
embedded Video Encoder.
Outputs
None
Event Notification
N/A
Return Codes
MMAC_DISP_OK
MMAC_DISP_INVALID_PARAM
Description
This function directs the two outputs from the alpha blending tree (the ‘tree’ and ‘extract’ outputs) to the
internal Video Encoder and the Rec656 output.
The ‘tree’ output is that determined by the plane priorities, alpha blending and plane enable/disable status.
The background and border used for the tree output will be background1/border1.
The ‘extract’ output is determined by the blend configuration set when calling
MMAC_DISP_ConfigureAlphaBlendOuput().The background and border used for the extract output
will also depend upon the blend configuration set.
The function then returns MMAC_DISP_OK.
See Also
MMAC_DISP_ConfigureAlphaBlendOutput
MMAC_DISP_SetPlanePriority
MMAC_DISP_SetPlaneAlpha
MMAC_DISP_SetBackgroundColour
Sample Code
< tba >
12
MMAC_DISP_Display
Function Prototype
MMAC_DISP_RESULT_CODE MMAC_DISP_Display(
MMAC_DISP_PLANE plane,
MMAC_BOOL display
)
Inputs
plane The plane to be enabled – one of:
MMAC_DISP_SCALER1
MMAC_DISP_SCALER2
MAC_DISP_SCALER3
MAC_DISP_OSD1
MAC_DISP_OSD2
MAC_DISP_CURSOR
display If MMAC_TRUE then display is enabled else it is disabled.
Outputs
None.
Event Notification
N/A
Return Codes
MMAC_DISP_OK
MMAC_DISP_NOT_INITIALISED
MMAC_DISP_INVALID_PLANE
Description
This function enables/disable the display of the specified plane.
If plane is not a valid plane, the function returns the value MMAC_DISP_INVALID_PLANE.
The function MMAC_DISP_Initialise() must be called first otherwise MMAC_DISP_NOT_INITIALISED
will be returned.
See Also
MMAC_DISP_Initialise
Sample Code
< tba >
13
MMAC_DISP_SetPlanePriority
Function Prototype
MMAC_DISP_RESULT_CODE MMAC_DISP_SetPlanePriority(
MMAC_DISP_PRIORITY osd1,
MMAC_DISP_PRIORITY osd2,
MMAC_DISP_PRIORITY scaler1,
MMAC_DISP_PRIORITY scaler2,
MMAC_DISP_PRIORITY scaler3
)
Inputs
osd1 plane priority for OSD plane1.
osd2 plane priority for OSD plane2.
scaler1 plane priority for Scaler plane1.
scaler2 plane priority for Scaler plane2.
scaler3 plane priority for Scaler plane3.
Outputs
None.
Event Notification
N/A
Return Codes
MMAC_DISP_OK
MMAC_DISP_NOT_INITIALISED
MMAC_DISP_INVALID_PLANE
Description
This function sets the plane priority for all the planes.
The function MMAC_DISP_Initialise() must be called first otherwise MMAC_DISP_NOT_INITIALISED
will be returned. The value for each of the planes must be different otherwise
MMAC_DISP_INVALID_PARAM will be returned. The value MMAC_DISP_PRIORITY1 sets the plane as
the top plane in front of other planes. Note that the cursor, when enabled, has the highest priority and will
appear on top of the other planes. The default setting going from front to back is OSD2, OSD1, Scaler3,
Scaler2, and Scaler1.
See Also
MMAC_DISP_Initialise
Sample Code
< tba >
14
MMAC_DISP_SetPlaneAlpha
Function Prototype
MMAC_DISP_RESULT_CODE MMAC_DISP_SetPlaneAlpha(
MMAC_DISP_PLANE plane,
UI8 level
)
Inputs
plane plane on which to set alpha blending – one of:
MMAC_DISP_SCALER1
MMAC_DISP_SCALER2
MMAC_DISP_SCALER3
MMAC_DISP_OSD1
MMAC_DISP_OSD2
MMAC_DISP_CURSOR
level alpha blending value to apply:
0 = No visibility of plane
1 = Minimum visibility of plane
MMAC_DISP_MAX_ALPHA = Maximum visibility of plane
Outputs
None.
Event Notification
N/A
Return Codes
MMAC_DISP_OK
MMAC_DISP_NOT_INITIALISED
MMAC_DISP_INVALID_PLANE
Description
This function sets the alpha blending value for the specified plane.
The function MMAC_DISP_Initialise() must be called first otherwise
MMAC_DISP_NOT_INITIALISED will be returned. If plane is not a valid plane, the function returns the
value MMAC_DISP_INVALID_PLANE.
The function MMAC_DISP_Initialise() sets the default blending to maximum visibility for all planes.
See Also
MMAC_DISP_Initialise
MMAC_DISP_GetPlaneAlpha
Sample Code
< tba >
15
MMAC_DISP_GetPlaneAlpha
Function Prototype
MMAC_DISP_RESULT_CODE MMAC_DISP_GetPlaneAlpha(
MMAC_DISP_PLANE plane,
UI8 *level
)
Inputs
plane plane on which to get alpha blending – one of:
MMAC_DISP_SCALER1
MMAC_DISP_SCALER2
MMAC_DISP_SCALER3
MMAC_DISP_OSD1
MMAC_DISP_OSD2
MMAC_DISP_CURSOR
Outputs
level alpha blending value in use.
Event Notification
N/A
Return Codes
MMAC_DISP_OK
MMAC_DISP_NOT_INITIALISED
MMAC_DISP_INVALID_PLANE
MMAC_DISP_INVALID_PARAM
Description
This function sets the alpha blending value for the specified plane.
The function MMAC_DISP_Initialise() must be called first otherwise MMAC_DISP_NOT_INITIALISED
will be returned. If plane is not a valid plane, the function returns the value
MMAC_DISP_INVALID_PLANE. If level is NULL then MMAC_DISP_INVALID_PARAM is returned.
See Also
MMAC_DISP_Initialise
MMAC_DISP_SetPlaneAlpha
Sample Code
< tba >
16
MMAC_DISP_SetBackgroundColour
Function Prototype
MMAC_DISP_RESULT_CODE MMAC_DISP_SetBackgroundColour(
MMAC_DISP_PLANE plane,
MMAC_DISP_COLOUR *colour
)
Inputs
plane plane on which to set background colour – one of:
MMAC_DISP_BACKGROUND1
MMAC_DISP_BACKGROUND2
Colour pointer to structure containing colour configuration to be set.
Outputs
None.
Event Notification
N/A
Return Codes
MMAC_DISP_OK
MMAC_DISP_NOT_INITIALISED
MMAC_DISP_INVALID_PLANE
MMAC_DISP_INVALID_PARAM
Description
This function sets the colour of the specified background plane.
The function MMAC_DISP_Initialise() must be called first otherwise MMAC_DISP_NOT_INITIALISED
will be returned.
If plane is not a valid background plane then MMAC_DISP_INVALID_PLANE is returned.
If colour is a NULL pointer then MMAC_DISP_INVALID_PARAM is returned.
See Also
MMAC_DISP_Initialise
MMAC_DISP_GetBackgroundColour
Sample Code
< tba >
17
MMAC_DISP_GetBackgroundColour
Function Prototype
MMAC_DISP_RESULT_CODE MMAC_DISP_GetBackgroundColour(
MMAC_DISP_PLANE plane,
MMAC_DISP_COLOUR *colour
)
Inputs
plane plane on which to get background colour – one of:
MMAC_DISP_BACKGROUND1
MMAC_DISP_BACKGROUND2
Outputs
colour pointer to structure in which the background plane’s colour is to be returned in
Y/Cb/Cr format.
Event Notification
N/A
Return Codes
MMAC_DISP_OK
MMAC_DISP_NOT_INITIALISED
MMAC_DISP_INVALID_PLANE
MMAC_DISP_INVALID_PARAM
Description
This function reports the current colour of the specified background plane.
The function MMAC_DISP_Initialise() must be called first otherwise MMAC_DISP_NOT_INITIALISED
will be returned.
If plane is not a valid background plane then MMAC_DISP_INVALID_PLANE is returned.
If colour is a NULL pointer then MMAC_DISP_INVALID_PARAM is returned.
See Also
MMAC_DISP_Initialise
MMAC_DISP_SetBackgroundColour
Sample Code
< tba >
18
MMAC_DISP_SetBorderColour
Function Prototype
MMAC_DISP_RESULT_CODE MMAC_DISP_SetBorderColour(
MMAC_DISP_PLANE plane,
MMAC_DISP_COLOUR *colour
)
Inputs
plane plane on which to set border colour – one of:
MMAC_DISP_BORDER1
MMAC_DISP_BORDER2
Colour pointer to structure containing colour configuration to be set.
Outputs
None.
Event Notification
N/A
Return Codes
MMAC_DISP_OK
MMAC_DISP_NOT_INITIALISED
MMAC_DISP_INVALID_PLANE
MMAC_DISP_INVALID_PARAM
Description
This function sets the colour of the specified border plane.
The function MMAC_DISP_Initialise() must be called first otherwise MMAC_DISP_NOT_INITIALISED
will be returned.
If plane is not a valid border plane then MMAC_DISP_INVALID_PLANE is returned.
If colour is a NULL pointer then MMAC_DISP_INVALID_PARAM is returned.
See Also
MMAC_DISP_Initialise
MMAC_DISP_GetBorderColour
Sample Code
< tba >
19
MMAC_DISP_GetBorderColour
Function Prototype
MMAC_DISP_RESULT_CODE MMAC_DISP_GetBorderColour(
MMAC_DISP_PLANE plane,
MMAC_DISP_COLOUR *colour
)
Inputs
plane plane on which to get border colour – one of:
MMAC_DISP_BORDER1
MMAC_DISP_BORDER2
Outputs
colour pointer to structure in which the border plane’s colour is to be returned in
Y/Cb/Cr format.
Event Notification
N/A
Return Codes
MMAC_DISP_OK
MMAC_DISP_NOT_INITIALISED
MMAC_DISP_INVALID_PLANE
MMAC_DISP_INVALID_PARAM
Description
This function reports the current colour of the specified border plane.
The function MMAC_DISP_Initialise() must be called first otherwise MMAC_DISP_NOT_INITIALISED
will be returned.
If plane is not a valid border plane then MMAC_DISP_INVALID_PLANE is returned.
If colour is a NULL pointer then MMAC_DISP_INVALID_PARAM is returned.
See Also
MMAC_DISP_Initialise
MMAC_DISP_SetBorderColour
Sample Code
< tba >
20
3 Data Structures
MMAC_DISP_RESULT_CODE
Enumeration defining possible return codes for the DISP functions.
typedef enum
{
MMAC_DISP_OK,
MMAC_DISP_INVALID_PARAM,
MMAC_DISP_INVALID_PLANE,
MMAC_DISP_NOT_INITIALISED,
MMAC_DISP_ALREADY_INITIALISED,
MMAC_DISP_SEMAPHORE_ERROR
}MMAC_DISP_RESULT_CODE;
typedef enum
{
MMAC_DISP_SCALER1 = 0, /* Scaler Plane 1 */
MMAC_DISP_SCALER2, /* Scaler Plane 2 */
MMAC_DISP_SCALER3, /* Scaler Plane 3 */
MMAC_DISP_OSD1, /* OSD Plane 1 */
MMAC_DISP_OSD2, /* OSD Plane 2 */
MMAC_DISP_BACKGROUND1, /* Background 1 Colour */
MMAC_DISP_BACKGROUND2, /* Background 2 Colour */
MMAC_DISP_BORDER1, /* Border 1 Colour */
MMAC_DISP_BORDER2, /* Border 2 Colour */
MMAC_DISP_CURSOR /* Hardware Cursor */
}MMAC_DISP_PLANE;
typedef enum
{
MMAC_DISP_NTSC,
MMAC_DISP_PAL,
MMAC_DISP_SECAM
}MMAC_DISP_FORMAT;
typedef enum
{
MMAC_DISP_PRIORITY1 = 0, /* Higher priority */
MMAC_DISP_PRIORITY2,
MMAC_DISP_PRIORITY3,
MMAC_DISP_PRIORITY4,
MMAC_DISP_PRIORITY5 /* Lower priority */
}MMAC_DISP_PRIORITY;
21
typedef struct
{
UI8 y;
UI8 cb;
UI8 cr;
}MMAC_DISP_COLOUR;
typedef enum
{
MMAC_DISP_BLEND_TO_PRIORITY5 = 0, /* to lowest priority */
MMAC_DISP_BLEND_TO_PRIORITY4,
MMAC_DISP_BLEND_TO_PRIORITY3,
MMAC_DISP_BLEND_TO_PRIORITY2,
MMAC_DISP_BLEND_TO_PRIORITY1, /* to highest priority */
MMAC_DISP_BLEND_TO_CURSOR,
MMAC_DISP_BLEND_SCALER1_ONLY,
MMAC_DISP_BLEND_SCALER2_ONLY,
MMAC_DISP_BLEND_SCALER3_ONLY
}MMAC_DISP_BLEND_CONFIG;
typedef enum
{
MMAC_DISP_DEST_VIDEO_ENCODER = 0,
MMAC_DISP_DEST_REC656
}MMAC_DISP_OUTPUT_DESTINATION;
#define MMAC_DISP_MAX_ALPHA (255) /* Maximum visibility of plane */
22
4 Revision History
Title: API: Display
Ref: API_Display.doc
Date Doc API Details of change Code
Ver Ver
0.01 Initial revision
2001-09-20 0.02 Reformatted.
Corrected naming of functions
MMAC_DISP_Set/GetBackGroundColour( ) to
MMAC_DISP_Set/GetBackgroundColour( ).
Added definition of MMAC_DISP_MAX_ALPHA to Data
Structures section.
Added new functions to API.
2002-08-06 0.03 Doc reformatted. M-RJI
2002-10-01 0.04 Removed device applicability, calling mode and M-RKL
architectural overview sections.
2002-12-09 1.0 For release – same as v0.04. M-RJI
2003-06-27 1.1 Doc number added. M-RJI
2004-02-10 1.11 Added MMAC_DISP_SetPlanePriority( ). M-HG
2004-02-11 1.2 Format check for release. M-RJI
23