Company Confidential
Project: MMAC (NPR0064)
Document Title: MMAC API – TESTING BLITTER API
Doc Ref: \Proj_Doc\p0064\test\bitblt_test.doc
Revision: V1.0
Author: Phil Learmonth
Date: 1st February 2001
Revision History: V0.1 (PL): Initial Revision.
V0.2 (PL): Added level 2 testing.
V0.3 (PL): Removed BITBLT_MemCopy and BITBLT_IsBlitterBusy tests
after blitter review.
V0.3 (PL): Removed OSD display tests.
V0.4 (PL): Added user callback test.
V0.5 (PL): Reformatted and typo corrections.
V0.6 (PL): Added future tests to be added.
V0.7 (PL): Added graphics tests.
V0.8 (PL): Changes after review.
V0.9 (PL): Minor modifications.
V1.0 (PL): Minor modifications.
Authorised:
Doc Ref: The information contained in this document is the property of NEC Electronics (UK) Ltd and must not be copied,
D:\V3_20test\EMMA2_Docs_V_3_2_0_ quoted or reproduced in any form without the written permission of NEC Electronics (UK) Ltd.
21052002\EMMA2_Docs\test\bitblt_test. Copyright NEC Electronics (UK) Ltd. 2001
doc
Company Confidential
CONTENTS
1. TESTING MMAC BIT BLITTER ................................................................................................................ 3
1.1 Introduction............................................................................................................................................ 4
Level 1 Testing .................................................................................................................................................. 5
1.2 Level 2 Testing ...................................................................................................................................... 6
1.3 Future tests to be added.......................................................................................................................... 8
MMAC – TESTING BIT BLITTER API Page 2 of 8 Revision V1.0
Company Confidential
1. Testing MMAC bit blitter
MMAC – TESTING BIT BLITTER API Page 3 of 8 Revision V1.0
Company Confidential
1.1 Introduction
The MMAC_BITBLT API specifies a set of functions to control the blitter hardware. The blitter provides
the ability to perform various operations. These include, as well as the basic data transfer (to move or copy
source images for example), nine other extended image processing functions including, data formatting,
colour space conversion, various logical raster operations, XY stretch scalar, chromakey, colour expansion
and anti flicker filter.
A maskable interrupt register within the blitter hardware is used to provide to the CPU indication that the
blitter operation has completed.
MMAC – TESTING BIT BLITTER API Page 4 of 8 Revision V1.0
Company Confidential
Level 1 Testing
Each API function will be tested to ensure valid parameters are accepted and can be passed. Invalid
parameters expected within reason are trapped. Valid return codes are generated for correct and incorrect
data / parameters passed.
1.1.1 Test MMAC_BITBLT_Uninitialised
Test the BITBLT functions to confirm that they return MMAC_BITBLT_NOT_INITIALISED when the
BITBLT module has not been initialised.
1.1.2 Test MMAC_BITBLT_Initialise
Confirm that MMAC_BITBLT_FAIL is returned when any of the following fail,
• Allocate the blitter stack from the system heap,
• Create the blitter task,
• Create the blitter protection semaphore,
• Install the interrupt handler which calls the ISR on completion of the blit task,
• Set the interrupt mask for the vector used in the handler, otherwise that MMAC_BITBLT_OK is
returned.
1.1.3 Test MMAC_BITBLT_Request
Confirm that if the blitter is not busy and we pass the maximum timeout then we return
MMAC_BITBLT_OK.
MMAC – TESTING BIT BLITTER API Page 5 of 8 Revision V1.0
Company Confidential
1.2 Level 2 Testing
The module will be tested for functionality. In order to do this, the blitter will be tested different graphics
resolutions and checking that a user installed callback is called on completion.
1.2.1 Four bpp test.
Set up blitter data and call MMAC_BITBLT_Request for 4 bits per pixel and no callback to install. Ensure
that this completes OK and report as such.
1.2.2 Two bpp mode.
Set up blitter data and call MMAC_BITBLT_Request with the graphics resolution within the blitter data
request structure set to two bits per pixel and ensure it completes OK.
1.2.3 Four bpp mode.
Set up blitter data and call MMAC_BITBLT_Request with the graphics resolution within the blitter data
request structure set to four bits per pixel and ensure it completes OK.
1.2.4 Eight bpp mode.
Set up blitter data and call MMAC_BITBLT_Request with the graphics resolution within the blitter data
request structure set to eight bits per pixel and ensure it completes OK.
1.2.5 Line draw 8bpp.
Draw a rectangle with output format 8bpp and prompt the user for result of the test.
1.2.6 Colour space conversion of RGB32 (with 8 alpha) to YCbCr422.
Display an RGB32 with 8 bit alpha image. Convert this to YCbCr422 format and verify.
1.2.7 Chromakey on RGB32 (with 8 alpha).
Display an RGB32 image with an object of one colour and background another. Extract the object from the
source image and display the object only along with the source. Prompt the user for the result of the test.
1.2.8 Colour expansion 1bpp to 32bpp (with 8 alpha).
Display a 1bpp image. Expand this to 32bpp and display along with the source image. Prompt the user for
the result of the test.
1.2.9 XY Stretch scalar RGB32 with 8 alpha.
MMAC – TESTING BIT BLITTER API Page 6 of 8 Revision V1.0
Company Confidential
Display an RGB32 image with 8 bit alpha blending. Stretch double in X and Y direction and display result
along with original. Prompt user to input result of the test.
1.2.10 Raster operation RGB32 with 8 alpha.
Display two simple RGB32 with 8 bit alpha blending images. Perform an AND raster operation and display
the result along with the sources. Prompt the user for the result of the operation.
1.2.11 Data format conversion of 32 bit to 16 bit (RGB32 to RGB565).
Display a 32bpp image. Set up the transfer and extended data structures and call MMAC_BITBLT_Request
with command set to MMAC_BITBLT_CMD_DFMT to convert the 32bpp image into a 16bpp image and
display the converted image alongside the original. Prompt the user with a description of the expected
difference and wait for a user supplied input as to success or failure of the conversion.
MMAC – TESTING BIT BLITTER API Page 7 of 8 Revision V1.0
Company Confidential
1.3 Future tests to be added.
The following tests to be added are for the corrections or modifications to the existing hardware,
1.3.1 Modulo pitch restriction.
MMAC – TESTING BIT BLITTER API Page 8 of 8 Revision V1.0