Japanese
PROGRAMMER'S GUIDEMPEG library
BackForward
MPEG library

5.MPEG window


5.1 MPEG Window Control

You can open a window for output to an area within the framebuffer. This window's control interface makes it easy to create visual effects.

(1)Display window
Set up the display window as a rectangular area that actually appears on your TV monitor.
For VDP2 direct output method, specify the position and size relative to the TV monitor. In the case of host transfer method, only the size is specified because it is not displayed directly on the TV monitor.

(2)Frame buffer window
A display window outputs data from an arbitrary rectangular area within the frame buffer. This rectangular area within the frame buffer is called the frame buffer window. A framebuffer window can be opened within the area of one framebank.

(3) Window control parameters
The control parameters for the display window and frame buffer window are as follows.

  1. display window
    • Display reference position (DZX, DZY): Reference position of display on TV monitor
    • Display relative position (DLX, DLY): Relative coordinates from the display reference position
    • Display size (DSX, DSY): Size on TV monitor

  2. frame buffer window
    • Zoom point (FZX, FZY): Reference position for display within the frame buffer
    • Magnification (FRX, FRY): Magnification rate in the X direction and Y direction

Set the position, size, and magnification rate of the frame buffer window so that the display reference position (Pz') and zoom point (Pz) overlap. Also, any value can be specified for the magnification (FRX, FRY), which will be converted and set to the magnification that can be set by the LSI.
A conceptual diagram is shown below.

Figure 5.1 Display window and frame buffer window

The MPEG window control interface can achieve the following visual effects with a small number of parameters. The parameters to be manipulated when running visual effects are shown below.

Table 5.1 Visual effects and control parameters
 visual effects
 Parameters to control
 effect
 zoom
 FRX, FRY
 Freezes the display window and zooms the displayed image.
 scroll
 FZX, FZY
 Moves the image left, right, up and down without changing the magnification.
 move
 DZX,DZY
 Moves the display reference position without changing the zoom point.
 Peeping
 DLX,DLY
 You can peek at the image in the frame buffer while changing the relative display position of the image.
 wipe
 DLX, DLY, DSX, DSY
 The display window size changes without changing the image magnification.
 Expand
 DLX, DLY, DSX, DSY
FRX, FRY
 The display window size changes as the image size changes.

5.2 Notes on using MPEG window

(1) MPEG window display switch
The following restrictions apply to the MPEG window display switch.

  1. Do not turn on the display switches of two or more VDP2 output windows at the same time.
    Please connect and use as shown below.

(2) Host transfer output
When transmitting and outputting an image to the host, the number of pixels in the X direction is twice the frame buffer window size due to the specifications of the MPEG system. To avoid this, you need to set the display size to half in the X direction and double the magnification as shown in the example below.

/* Transfer and output a 352 x 240 pixel image at the same size to the host */
/* Change display size */
MPG_WnSetSize(mpgwn, (352/2), 240);

/* Set magnification */
MPG_WnSetDispRatio(mpgwn, 2000, 1000);

/* Execute host transfer output */


BackForward
PROGRAMMER'S GUIDEMPEG library
Copyright SEGA ENTERPRISES, LTD., 1997