0% found this document useful (0 votes)
12 views28 pages

EMMA2 API User Manual: MMAC SCALER

The document is a user's manual for the EMMA2 API, specifically detailing the MMAC SCALER API which provides a generic interface for controlling video windows across three scaler planes. It includes function prototypes, input/output parameters, return codes, and descriptions for various functions such as initializing the API, creating and deleting windows, setting and getting window properties, and managing scaling and pan/scan features. The manual also contains essential information on required include files and a revision history, emphasizing the importance of confidentiality and the need for a Non-Disclosure Agreement for third-party access.

Uploaded by

gwoodstccd
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views28 pages

EMMA2 API User Manual: MMAC SCALER

The document is a user's manual for the EMMA2 API, specifically detailing the MMAC SCALER API which provides a generic interface for controlling video windows across three scaler planes. It includes function prototypes, input/output parameters, return codes, and descriptions for various functions such as initializing the API, creating and deleting windows, setting and getting window properties, and managing scaling and pan/scan features. The manual also contains essential information on required include files and a revision history, emphasizing the importance of confidentiality and the need for a Non-Disclosure Agreement for third-party access.

Uploaded by

gwoodstccd
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

User’s Manual

EMMA2 API

Scaler

CONTENTS

1 Introduction ....................................................................................................................... 2
2 Function Prototypes .......................................................................................................... 3
MMAC_SCALER_Initialise............................................................................................3
MMAC_SCALER_CreateWindow.................................................................................4
MMAC_SCALER_DeleteWindow .................................................................................7
MMAC_SCALER_SetWindow ......................................................................................8
MMAC_SCALER_GetWindow ......................................................................................9
MMAC_SCALER_SetClipArea ...................................................................................10
MMAC_SCALER_GetClipArea ...................................................................................11
MMAC_SCALER_SetScaling .....................................................................................12
MMAC_SCALER_GetScaling .....................................................................................13
MMAC_SCALER_SetPanScan...................................................................................14
MMAC_SCALER_GetPanScan ..................................................................................15
MMAC_SCALER_ControlWindow ..............................................................................16
MMAC_SCALER_SetWindowConfiguration...............................................................17
MMAC_SCALER_GetWindowConfiguration ..............................................................18
MMAC_SCALER_SetSourceArea ..............................................................................19
MMAC_SCALER_GetSourceArea..............................................................................20
MMAC_SCALER_SetHorizontalFilter.........................................................................21
MMAC_SCALER_SetBankAddress............................................................................22
MMAC_SCALER_GetBankAddress ...........................................................................23
MMAC_SCALER_SetSourceAddress ........................................................................24
MMAC_SCALER_SetDataSIze ..................................................................................25
3 Data Structures ............................................................................................................... 26
4 Revision History .............................................................................................................. 28

Book No: S16753EE1V0UM00 Doc No: MMAC0035, Issue: 1.2


© NEC Electronics Corporation 2002 ~ 2004 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 document defines the generic MMAC SCALER API.
The MMAC SCALER API provides a generic interface for calling the MMAC SCALER API across an
interface.
The standard MMAC API functional interface is used for all functions, see [1]
This API allows control of windows on one of 3 scaler planes. The video driver may over ride these
settings when in automatic mode. Normally the video driver automatically calculates the size of the video
window/scaling. However, an application can control:
• Destination Window Size
• Source Clipping Window Size
• Scaling
• Pan/Scan
• Alpha Blending
• Gamma
• Chroma Key.

EMMA2 has 3 scaler planes, each with different scaling capabilities. Each scaler plane can have multiple
windows, which cannot overlap veritcally. Each scaler window can be individually scaled.

Include File
To use the MMAC SCALER API you must include the following files.
#include "mmac/types.h"
#include "mmac/mmac_config.h"
#include "mmac/pas.h"
#include "mmac/scaler.h"

Then including the files the path, e.g. "mmac/rpc/", should be used in order to avoid conflict with other
similarly named include files.

References

Acronyms
API Application Programmers Interface
RPC Remote Procedure Call

2
2 Function Prototypes

MMAC_SCALER_Initialise

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_Initialise( void );
Inputs
None.

Outputs
None.

Event Notification
N/A

Return Codes
MMAC_SCALER_OK On successful initialisation of SCALER API
MMAC_SCALER_ALREADY_INITIALISED On initialisation failure
MMAC_SCALER_SEMAPHORE_ERROR Semaphore error because multiple call occurred.

Description
Initialise the MMAC SCALER API. This function must be called before any other MMAC SCALER API
function can be used.

See Also
N/A

Sample Code
< tba >

3
MMAC_SCALER_CreateWindow

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_CreateWindow(
MMAC_SCALER_PLANE plane,
MMAC_RECT *windowSize,
MMAC_SCALER_WINDOW *windowHandle,
MMAC_SCALER_WINDOW_CREATE_CONFIG *config
);

Input Parameters
plane: The scaler plane to set the window for. One of:
MMAC_SCALER_PLANE1,
MMAC_SCALER_PLANE2,
MMAC_SCALER_PLANE3.
windowSize: The new scaler window size.
top The pixel position of the top edge of the window.
bottom The pixel position of the bottom edge of the window.
left The pixel position of the left edge of the window.
right The pixel position of the right edge of the window.
config: Pointer to a structure which configures the new window as follows:
windowFormat Specifies the colour space format of the data for this
window. Either MMAC_SCALER_420_FORMAT or
MMAC_SCALER_422_FORMAT
windowInterlaced Specifies whether or not the window is interlaced
(MMAC_TRUE) or non-interlaced (MMAC_FALSE).
If interlaced, the window will expect to find all the even Y(luma) data at the
windowYTop address and all the odd Y(luma) data at the windowYBottom
address. The same applies for the C(chroma) [Link] non-interlaced, the window
will expect to find all the Y(luma) data at the windowYTop address (one line of
even data, one line of odd data etc). The same applies for the C(chroma) data.
windowType Specifies whether window is intended to be used for
displaying video or still pictures (data will be in XY or linear space accordingly)
or [Link] value will be set to either MMAC_SCALER_VIDEO or
MMAC_SCALER_STILL or MMAC_SCALER_DVI.
windowData This field determines from where the window willobtain
the data it is to display.
If the windowType field above is set to MMAC_SCALER_VIDEO, then the
windowData field should contain a videoHandle.
If the windowType field above is set to MMAC_SCALER_STILL, then the
windowData field should contain startAddresses.
If the windowType field above is set to MMAC_SCALER_DVI, then the
windowData field contains nothing.
videoHandle Specifies the handle of the decoded video data to be displayed in the
[Link] field only exists if windowType is MMAC_SCALER_VIDEO.
startAddresses The startaddresses of the Y(luma) and C(chroma) top(even) and bottom(odd)
fields for the still picture [Link] field only exists if windowType is
MMAC_SCALER_STILL:

4
windowYTop Address of memory area where the window’s top(even)
field Y(luma) data will reside.
windowYBottom Address of memory area where the window’s bottom(odd)
field Y(luma) data will reside.
windowCTop Address of memory area where the window’s top(even)
field C(chroma) data will reside.
windowCBottom Address of memory area where the window’s bottom(odd)
field C(chroma) data will reside.

Output Parameters
windowHandle: A handle to the scaler window.

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is initialised
MMAC_SCALER_INVALID_RECT Window size is invalid
MMAC_SCALER_WINDOW_OVERLAPPED Window is overlapped with existing window
MMAC_SCALER_INSUFFICIENT_MEMORY No memory left

Description
Creates a scaler window on a scaler plane. Scaler windows cannot overlap vertically.
If config->windowType is MMAC_SCALER_STILL, the windowData pointers
startAddresses->windowYTop, startAddresses->windowYBottom, startAddresses->windowCTop and
startAddresses->windowCBottom in config must be set to the 8-byte aligned addresses indicating the
memory areas to be used for the window’s display memory. If any of these pointers are NULL, the
function will return the value MMAC_SCALER_INVALID_PARAM and will not create the window. It is the
responsibility of the calling application to allocate the display memory required for the window.
If config->windowType is MMAC_SCALER_VIDEO, the value windowData->videoHandle should be passed
a valid video handle, returned from a previous call to MMAC_VIDEO_Open(). This associates the decoded
video with the video window. If windowData->videoHandle is NULL, the function will return the value
MMAC_SCALER_INVALID_PARAM and will not create the window.
Window’s top should be even and bottom should be odd.
Window is configured in the following value for default.
alphaValue 255
crMax 0
crMin 255
cbMax 0
cbMin 255
yMax 0
yMin 255
gammaValue 0

See Also
N/A

5
Sample Code
< tba >

6
MMAC_SCALER_DeleteWindow

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_DeleteWindow(
MMAC_SCALER_WINDOW windowHandle
);

Input Parameters
windowHandle: A handle to the scaler window to delete

Output Parameters
None

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is initialised
MMAC_SCALER_SEMAPHORE_ERROR Semaphore error because multiple call occurred.

Description
Deletes a scaler window from a scaler plane. The function ensures that all memory allocated by the
SCALER driver for the deleted window is freed.

See Also
N/A

Sample Code
< tba >

7
MMAC_SCALER_SetWindow

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_SetWindow(
MMAC_SCALER_WINDOW window,
MMAC_RECT *windowSize
);

Input Parameters
window: The scaler window to set the window for
windowSize: The new scaler window size

Output Parameters
None

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is initialised
MMAC_SCALER_INVALID_RECT Window size is invalid
MMAC_SCALER_WINDOW_OVERLAPPED Window is overlapped with existing window

Description
Sets the size and position for the scaler window. The source is not scaled to fir the window.
Window’s top should be even and bottom should be odd.

See Also
N/A

Sample Code
< tba >

8
MMAC_SCALER_GetWindow

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_GetWindow(
MMAC_SCALER_WINDOW window,
MMAC_RECT *windowSize,
);

Input Parameters
window: The scaler window to get the window size for

Output Parameters
windowSize: The current scaler window size

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is initialised

Description
Gets size of the a scaler window

See Also
N/A

Sample Code
< tba >

9
MMAC_SCALER_SetClipArea

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_SetClipArea(
MMAC_SCALER_WINDOW window,
MMAC_RECT *clipArea
);

Input Parameters
window: The scaler window to set the clip area for
clipArea: Sets the clip area for the video source for the scaler window

Output Parameters
None

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is initialised
MMAC_SCALER_INVALID_RECT clipping size is invalid

Description
Sets the source clip area for the video source.
Clipping top should be even and bottom should be odd.

See Also
N/A

Sample Code
< tba >

10
MMAC_SCALER_GetClipArea

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_GetClipArea(
MMAC_SCALER_WINDOW window,
MMAC_RECT *clipArea,
);

Input Parameters
window: The scaler window to set the clip area for

Output Parameters
window: The current scaler window size

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is initialised

Description
Gets the source video clip area.

See Also
N/A

Sample Code
< tba >

11
MMAC_SCALER_SetScaling

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_SetScaling(
MMAC_SCALER_WINDOW window,
UI16 width,
UI16 height
);

Input Parameters
window: The scaler window to set the scaling for
width: The scaled width of the window
height: The scaled height of the window

Output Parameters
None

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is initialised
MMAC_SCALER_LOCKED Locked because scaled by VIDEO API

Description
Sets the scaling of a window. A new width and height is supplied which the source image should be scaled
up or down to fit.
If the width and height is too small or too big for the hardware scaler then the SCALER is set to the
minimum/maximum scale.
This function does not work when MMAC_VIDEO_AUTO_SCALING is specified in MMAC_VIDEO_
SetConfiguration()

See Also
N/A

Sample Code
< tba >

12
MMAC_SCALER_GetScaling

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_GetScaling(
MMAC_SCALER_WINDOW window,
UI16 *width,
UI16 *height
);

Input Parameters
window: The scaler window to get the scaling for

Output Parameters
width: The scaled width of the window
height: The scaled height of the window

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is initialised

Description
Gets the scaler window scale size.

See Also
N/A

Sample Code
< tba >

13
MMAC_SCALER_SetPanScan

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_SetPanScan(
MMAC_SCALER_WINDOW window,
MMAC_COORD *vector
);

Input Parameters
window: The scaler window to set pan/scan for
vector: The pan/scan vector.

Output Parameters
None

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is initialised
MMAC_SCALER_PANSCAN_LIMITS Vector goes over limit

Description
Attempts to set the pan/scan vector for the given SCALER window.

See Also
N/A

Sample Code
< tba >

14
MMAC_SCALER_GetPanScan

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_GetPanScan(
MMAC_SCALER_WINDOW window,
MMAC_COORD *vector
);

Input Parameters
window: The scaler window to get the pan/scan vector for

Output Parameters
vector: The current pan/scan vector

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is initialised

Description
Gets the scaler pan/scan vector for a scaler window

See Also
N/A

Sample Code
< tba >

15
MMAC_SCALER_ControlWindow

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_ControlWindow(
MMAC_SCALER_WINDOW window,
MMAC_SCALER_WINDOW_OPERATION operation
);

Input Parameters
window: The scaler window to control
operation: Any bit set enables a given mode, else disables the given mode.

Output Parameters
None

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is initialised

Description
Enables/disables various modes for a window. The default parameters should normally be changed, using
MMAC_SCALER_SetWindowConfiguration(), before being enabled.

See Also
N/A

Sample Code
< tba >

16
MMAC_SCALER_SetWindowConfiguration

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_SetWindowConfiguration(
MMAC_SCALER_WINDOW window,
MMAC_SCALER_WINDOW_CONFIG *config
);

Input Parameters
window: The scaler window to set the configuration for
config: The new window config, alpha value and chroma key

Output Parameters
None

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is initialised

Description
Sets the window configuration, some configuration options may take immediate effect other can be
enabled/disabled using the MMAC_SCALER_ControlWindow() function.

See Also
N/A

Sample Code
< tba >

17
MMAC_SCALER_GetWindowConfiguration

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_GetWindowConfiguration(
MMAC_SCALER_WINDOW window,
MMAC_SCALER_WINDOW_CONFIG *config
);

Input Parameters
window: The scaler window to get the window size for

Output Parameters
config: The windows config

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is initialised

Description
Gets the configuration of the window.

See Also
N/A

Sample Code
< tba >

18
MMAC_SCALER_SetSourceArea

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_SetSourceArea(
MMAC_SCALER_WINDOW windowHandle,
MMAC_RECT *sourceArea
);

Input Parameters
windowHandle: The scaler window to set the source area for
sourceArea: The new source area

Output Parameters
None

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is not initialised
MMAC_SCALER_INVALID_RECT Window size is invalid

Description
Sets the source area for the scaler window.

See Also
N/A

Sample Code
< tba >

19
MMAC_SCALER_GetSourceArea

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_GetSourceArea(
MMAC_SCALER_WINDOW windowHandle,
MMAC_RECT *sourceArea,
);

Input Parameters
windowHandle: The scaler window to get the window size for

Output Parameters
sourceArea: The current source area

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is not initialised

Description
Gets source area of the a scaler window

See Also
N/A

Sample Code
< tba >

20
MMAC_SCALER_SetHorizontalFilter

MMAC_SCALER_RESULT_CODE MMAC_SCALER_SetHorizontalFilter(
MMAC_SCALER_HORIZONTAL_FILTER selectFilter,
UI32 filterParam[20]
);

Input Parameters
selectFilter Filter pattern to be changed.
filterParam New horizontal filter parameter.

Output Parameters
None

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is not initialised

Description
This function changes the horizontal filter parameter.

See Also
N/A

Sample Code
< tba >

21
MMAC_SCALER_SetBankAddress

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_SetBankAddress(
MMAC_SCALER_WINDOW windowHandle,
MMAC_SCALER_BANK *bank
);

Input Parameters
windowHandle: The scaler window to set the source area for
bank: The new bank address

Output Parameters
None

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is not initialised

Description
Sets the bank address for the scaler window.

See Also
N/A

Sample Code
< tba >

22
MMAC_SCALER_GetBankAddress

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_GetBankAddress(
MMAC_SCALER_WINDOW windowHandle,
MMAC_SCALER_BANK *bank
);

Input Parameters
windowHandle: The scaler window to get the window size for

Output Parameters
bank: The current bank address

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is not initialised

Description
Gets bank address of the a scaler window

See Also
N/A

Sample Code
< tba >

23
MMAC_SCALER_SetSourceAddress

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_SetSourceAddress(
MMAC_SCALER_WINDOW windowHandle,
MMAC_SCALER_WINDOW_SOURCE_ADDRESS *sourceAddress
);

Input Parameters
windowHandle: The scaler window to set the source area for
sourceAddress: The new source address

Output Parameters
None

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is not initialised

Description
Sets the source address for the scaler window.

See Also
N/A

Sample Code
< tba >

24
MMAC_SCALER_SetDataSIze

Function Prototype
MMAC_SCALER_RESULT_CODE MMAC_SCALER_SetDataSize(
MMAC_SCALER_WINDOW windowHandle,
UI16 width,
UI16 height
);

Input Parameters
windowHandle: The scaler window to set the source area for
width: Data width
height: Data height

Output Parameters
None

Event Notification
None

Return Codes
MMAC_SCALER_OK Operation is successful
MMAC_SCALER_INVALID_PARAM inputs is invalid
MMAC_SCALER_NOT_INITIALISED SCALER driver is not initialised

Description
Sets the data size for the scaler window.

See Also
N/A

Sample Code
< tba >

25
3 Data Structures

typedef void *MMAC_SCALER_WINDOW;

typedef enum
{
MMAC_SCALER_OK = 0,
MMAC_SCALER_INVALID_PARAM,
MMAC_SCALER_NOT_INITIALISED,
MMAC_SCALER_ALREADY_INITIALISED,
MMAC_SCALER_INSUFFICIENT_MEMORY,
MMAC_SCALER_WINDOW_OVERLAPPED,
MMAC_SCALER_INVALID_RECT,
MMAC_SCALER_PANSCAN_LIMITS,
MMAC_SCALER_SEMAPHORE_ERROR,
MMAC_SCALER_LOCKED
} MMAC_SCALER_RESULT_CODE;

typedef enum
{
MMAC_SCALER_PLANE1,
MMAC_SCALER_PLANE2,
MMAC_SCALER_PLANE3
} MMAC_SCALER_PLANE;

typedef struct
{
/* Alpha Value setting */
UI8 alphaValue;
/* Chroma Key setting */
UI8 crMax;
UI8 crMin;
UI8 cbMax;
UI8 cbMin;
UI8 yMax;
UI8 yMin;
/* Gamma Value setting */
I8 gammaValue;
} MMAC_SCALER_WINDOW_CONFIG;

typedef enum
{
MMAC_SCALER_WINDOW_DISABLE = 0x00,
MMAC_SCALER_WINDOW_DISPLAY = 0x01,
MMAC_SCALER_WINDOW_ENABLE_ALPHA = 0x02,
MMAC_SCALER_WINDOW_ENABLE_CHROMA = 0x04,
MMAC_SCALER_WINDOW_ENABLE_GAMMA = 0x08
} MMAC_SCALER_WINDOW_OPERATION;

typedef enum
{
MMAC_SCALER_VIDEO = 0,
MMAC_SCALER_STILL,
MMAC_SCALER_DVI
}MMAC_SCALER_WINDOW_TYPE;

typedef enum
{
MMAC_SCALER_420_FORMAT = 0,
MMAC_SCALER_422_FORMAT
}MMAC_SCALER_WINDOW_FORMAT;

26
typedef struct
{
UI8 *windowYTop;
UI8 *windowYBottom;
UI8 *windowCTop;
UI8 *windowCBottom;
}MMAC_SCALER_WINDOW_START_ADDRESSES;

Scaler Window Configuration


This structure describes the configuration of a scaler window. The union member used depends upon the
value of windowType. If it is MMAC_SCALER_VIDEO, then a videoHandle is expected in the windowData
member. If it is MMAC_SCALER_STILL, the startAddresses are expected in the windowData member.

typedef struct
{
MMAC_SCALER_WINDOW_FORMAT windowFormat;
MMAC_BOOL windowInterlaced;
MMAC_SCALER_WINDOW_TYPE windowType;
union
{
MMAC_SCALER_WINDOW_START_ADDRESSES startAddresses;
MMAC_VIDEO_HANDLE videoHandle;
}windowData;
}MMAC_SCALER_WINDOW_CREATE_CONFIG;

typedef enum
{
MMAC_SCALER_HORIZONTAL_FILTER_25,
MMAC_SCALER_HORIZONTAL_FILTER_40,
MMAC_SCALER_HORIZONTAL_FILTER_55,
MMAC_SCALER_HORIZONTAL_FILTER_66,
MMAC_SCALER_HORIZONTAL_FILTER_75,
MMAC_SCALER_HORIZONTAL_FILTER_100
}MMAC_SCALER_HORIZONTAL_FILTER;

#define MMAC_SCALER_MIN_WINDOW_START_X -1024


#define MMAC_SCALER_MAX_WINDOW_START_X 1023
#define MMAC_SCALER_MIN_WINDOW_START_Y -1024
#define MMAC_SCALER_MAX_WINDOW_START_Y 1022

#define MMAC_SCALER_MIN_CLIP_START_X 0
#define MMAC_SCALER_MAX_CLIP_START_X 719
#define MMAC_SCALER_MIN_CLIP_START_Y 0
#define MMAC_SCALER_MAX_CLIP_START_Y 574

typedef struct
{
UI8 *yAddress;
UI8 *cAddress;
UI8 bankNo;
} MMAC_SCALER_BANK;

typedef struct
{
UI32 yEvenAddr;
UI32 yOddAddr;
UI32 cEvenAddr;
UI32 cOddAddr;
} MMAC_SCALER_WINDOW_SOURCE_ADDRESS;

27
4 Revision History
Title: API Specification: Scaler
Ref: API_Scaler.doc

Date Doc API Details of change Ref.


Ver. Ver.
0.01 Initial Revision M-SH
M-JD
0.02 Return code is added and deleted. Some Scaler types are
added. Some descriptions are added.
0.03 Input parameter “config” is added to
MMAC_SCALER_CreateWindow( ).
2002-01-15 0.04 MMAC_SCALER_SetHorizontalFilter( ) is added.
2002-08-14 0.05 Doc reformatted M-RI
2002-12-09 1.0 For release – same as v0.05 M-RI
2003-06-27 1.1 Doc number added. M-RJI
2004-02-10 1.11 Added functions M-HG
MMAC_SCALER_SetSourceArea( ),
MMAC_SCALER_GetSourceArea( ),
MMAC_SCALER_SetBankAddress( ),
MMAC_SCALER_GetBankAddress( ),
MMAC_SCALER_SetSourceAddress( ) and
MMAC_SCALER_SetDataSize( ).
2004-02-11 1.2 Format check for release. M-RJI

28

You might also like