LOGO  PARALLAX SOLUTIONS

Porting from XVideo-VIO to XVideo-Xtra

Version 0.1
October 29, 1997

(c) Copyright Parallax Graphics, Inc. 1997. All Rights reserved.

Parallax Graphics, Inc.
2500 Walsh Street
Santa Clara, CA 95051
Telephone: (408) 727-2220
FAX: (408) 727-2367
email: info@parallax.com
Technical Support
Telephone: +1 703 450 7718
Fax: +1 703 450 7719
email: tsupport@parallax.com

XVideo and XVideo Xtra are trademarks of Parallax Graphics, Inc. Sun Microsystems is a registered trademark of Sun Microsystems, Inc. SPARC, SPARCstation, and SPARCserver are registered trademarks of SPARC International, Inc., licensed exclusively to Sun Microsystems, Inc.

This document is designed to guide current users of the Parallax Graphics framebuffer boards as they look to use the newer Overlay boards. Differences between the two boards are itemized, and various features are highlighted.

Hardware Capabilities XVideo-VIO XVideo-Xtra
Framebuffer Yes No
Overlay No Yes
Number of Inputs 2 2
Number of Outputs 1 1
Hardware Zoom No Yes
Maximum Resolution 1152x900 1280x1024
Operating Systems Solaris 1, Solaris 2.3, 2.4, 2.5(.1) Solaris 2.5 or greater
Multiple Cards Support Yes, Solaris 2.5 Yes

Software Differences

Installation

The installation process is similar, in that it is fully automated via the "pkgadd" function; Once the installation is completed, the system must be halted, then "boot -r" run to properly build the drivers.

Calibration

The XVideo-Xtra has a Calibration program which allows the installer to correctly synchronize the signal coming from the SUN graphics card with the video signal generated by the Parallax card. The Calibrate program displays a green and a magenta grid. The goal is to align the grids to produce one white grid. Various controls and sample resolution/refresh rate files are provided to enable alignment to occur.

Programming

XGetImage versus XPlxGetImage
XPutImage versus XPlxPutImage

With XVideo-VIO, programmers could utilize the standard X-Window calls to get an put an XImage of various depths.

With the XVideo-Xtra, Parallax Graphics has created two new calls which are used to Get and Put an XImage in the video memory.

XPlxGetImage will retrieve a 32-bit XImage from video memory, into main memory. XPlxPutImage will place a 32-bit XImage from main memory to video memory. The XImage will need to be converted from the 8-bit or 24-bit XImage generated by the framebuffer. Here is a sample function which performs that conversion.

Zoom 2x

The XVideo Xtra includes a "pixel replication" function which allows the video data to be expanded by a factor of 2 in each horizontal and vertical direction. Because of this, the programmer must be knowledgeable about the current status of the Zoom setting of the board, otherwise, only 1/4 of the zoomed video will appear in the window.

int XPlxGetZoomFactor(display,window)
  Display *display;
  Window  window;

Will return the current zoom factor of the Parallax video card associated with the specified window. This may be either 1 or 2. If it is two, the programmer must take this into account when creating the window to hold the video.

int XPlxSetZoomFactor(display,window,zoomFactor)
  Display *display;
  Window  window;
  int	  zoomFactor;

Will allow the programmer to set the zoom to 1x or 2x. It returns True or False. False is returned if the hardware does not support zoom.

Graphics over Video (Simple)

Graphics over Video (GOV) was simple with the XVideo-VIO framebuffer, as any X-Window call was directly reflected within the framebuffer. It is a little trickier with the XVideo-Xtra. However, one may still do simple, static graphics over video just by writing them to a different Graphics Context (GC). A sample GOV program is located here, which shows how to write the time/data stamp over the live video.

Graphics over Video (Complex)

Parallax Graphics has an engineering release for the XVideo-Xtra. This software allows the board to behave similarly to the GOV capabilities of the XVideo-VIO. It utilizes a TAG function to denote what areas are graphics (and should not be updated), and which areas are video (and should be updated at the 30 fps (NTSC) or 25 fps (PAL) rate). Please contact Parallax technical support for information on this engineering release.

XtWidget Output

The Output Widget worked in a stand-alone fashion on the XVideo-VIO. However, with the XVideo-Xtra, you must have a video window already created as your source window (or source rectangle). This is due to the requirement/restriction of the XVideo-Xtra where the output is only from a video window, or a JPEG decompression window. An updated xvOutTest is available here.

Checking for the board

With XVideo-VIO, the programmer could check whether there was a Parallax board present by executing the following call:

if (XQueryExtension(dpy, "ParallaxVideo", &majop, &eventbase, &errbase) 

True meant that the ParallaxVideo extensions were present in the Xserver, indicating presence of the board.

With XVideo-Xtra, the programmer has a two-step process to determine whether the board is present:

if (XQueryExtension(dpy, "XVideo", &majop, &eventbase, &errbase) 
then
XvQueryAdaptors(dpy, DefaultRootWindow(dpy), &ngrabbers, &grabber);
for (i = 0; i < ngrabbers; i++)
    if (strncmp(grabber[i].name, "PGItv2", 6) == 0) break;

Therefore, if the "XVideo" extension is present, and the "PGItv2" Adaptor is registered with Xv, then the XVideo Xtra is installed.

Calls not supported on XVideo Xtra

Xlib:
XPlxSetVideoParameterString
XPlxVideoTag
XPlxVideoValueRecall
XPlxVideoValueSave

Xt Resources:
XtNdrawMethod
XtNrestoreColorSettings
XtNsaveColorSettings
XtNvideoParameterString



[ Send Questions or Comments to Technical Support ]

[ Contact Technical Support (Phone, Fax, etc.) ]


[ Home ] [ New! ] [ Products ] [ Solutions ] [ Support ] [ Company ] [ Contacts ]

Copyright 1998 Parallax Graphics, Inc. All rights reserved.