Sun Microsystems SunVideo Plus 1.3 User manual

SunVideo Plus 1.3 User’s Guide
901 San Antonio Road
Palo Alto, , CA 94303-4900
Part No: 806-2818-10
September 1999, Revision A

USA 650 960-1300 Fax 650
969-9131

SunVideo Plus 1.3 User’s Guide
Part No: 806-2818-10
September 1999, Revision A

Copyright Copyright 1999 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California 94303-4900 U.S.A. All rights reserved.
This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, and
decompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization of
Sun and its licensors, if any. Third-party software, including font technology, is copyrighted and licensed from Sun suppliers .
Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered
trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. For Netscape CommunicatorTM , the
following notice applies: Copyright 1995 Netscape Communications Corporation. All rights reserved.
Sun, Sun Microsystems, the Sun logo, AnswerBook2, docs.sun.com, and Solaris are trademarks, registered trademarks, or service marks of
Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered
trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an
architecture developed by Sun Microsystems, Inc.
The OPEN LOOK and SunTM Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun
acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the
computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun’s
licensees who implement OPEN LOOK GUIs and otherwise comply with Sun’s written license agreements.
RESTRICTED RIGHTS: Use, duplication, or disclosure by the U.S. Government is subject to restrictions of FAR 52.227-14(g)(2)(6/87) and
FAR 52.227-19(6/87), or DFAR 252.227-7015(b)(6/95) and DFAR 227.7202-3(a).
DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY
INVALID.
Copyright 1999 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, Californie 94303-4900 U.S.A. Tous droits réservés.
Ce produit ou document est protégé par un copyright et distribué avec des licences qui en restreignent l’utilisation, la copie, la
distribution, et la décompilation. Aucune partie de ce produit ou document ne peut être reproduite sous aucune forme, par quelque
moyen que ce soit, sans l’autorisation préalable et écrite de Sun et de ses bailleurs de licence, s’il y en a. Le logiciel détenu par des tiers, et
qui comprend la technologie relative aux polices de caractères, est protégé par un copyright et licencié par des fournisseurs de Sun.
Des parties de ce produit pourront être dérivées des systèmes Berkeley BSD licenciés par l’Université de Californie. UNIX est une marque
déposée aux Etats-Unis et dans d’autres pays et licenciée exclusivement par X/Open Company, Ltd. La notice suivante est applicable à
Netscape CommunicatorTM : Copyright 1995 Netscape Communications Corporation. All rights reserved.
Sun, Sun Microsystems, le logo Sun, AnswerBook2, docs.sun.com, et Solaris sont des marques de fabrique ou des marques déposées, ou
marques de service, de Sun Microsystems, Inc. aux Etats-Unis et dans d’autres pays. Toutes les marques SPARC sont utilisées sous licence
et sont des marques de fabrique ou des marques déposées de SPARC International, Inc. aux Etats-Unis et dans d’autres pays. Les produits
portant les marques SPARC sont basés sur une architecture développée par Sun Microsystems, Inc.
L’interface d’utilisation graphique OPEN LOOK et SunTM a été développée par Sun Microsystems, Inc. pour ses utilisateurs et licenciés.
Sun reconnaît les efforts de pionniers de Xerox pour la recherche et le développement du concept des interfaces d’utilisation visuelle ou
graphique pour l’industrie de l’informatique. Sun détient une licence non exclusive de Xerox sur l’interface d’utilisation graphique Xerox,
cette licence couvrant également les licenciés de Sun qui mettent en place l’interface d’utilisation graphique OPEN LOOK et qui en outre
se conforment aux licences écrites de Sun.
CETTE PUBLICATION EST FOURNIE "EN L’ETAT" ET AUCUNE GARANTIE, EXPRESSE OU IMPLICITE, N’EST ACCORDEE, Y
COMPRIS DES GARANTIES CONCERNANT LA VALEUR MARCHANDE, L’APTITUDE DE LA PUBLICATION A REPONDRE A UNE
UTILISATION PARTICULIERE, OU LE FAIT QU’ELLE NE SOIT PAS CONTREFAISANTE DE PRODUIT DE TIERS. CE DENI DE
GARANTIE NE S’APPLIQUERAIT PAS, DANS LA MESURE OU IL SERAIT TENU JURIDIQUEMENT NUL ET NON AVENU.
Please
Recycle

Contents
Preface viii
1. Introduction to SunVideo Plus 1
SunVideo Plus Features 1
SunVideo Plus Specifications 2
Frame Rates 3
SunVideo Plus Software Packages 4
SunVideo Plus Hardware 4
2. Installing SunVideo Plus 7
Installation Kit 7
Installation Requirements 7
Unpacking the SunVideo Plus Card 8
Installing the SunVideo Plus Card 8
SunVideo Plus 1.3 Software Contents 9
Removing Previous Software Releases 10
Installing the SunVideo Plus Software 11
Setting Your Environment 13
Setting O1KHOME 13
Modifying the PATH Variable 14
Setting XIL Environment Variables 14
Contents iv

Assigning Device Numbers 15
Installation Quick Test 15
3. SunVideo Compatibility Mode 17
System Requirements 17
Limitations 18
Using SunVideo Compatibility Mode 18
Running SVC Mode Scripts 19
The svc_install Script for Solaris 2.5.1 19
The svc_install Script for Solaris 2.6 20
The svc_uninstall Script for Solaris 2.6 21
The svc_devices Script 22
Setting SVC Environment Variables (Solaris 2.5.1 only) 22
4. SunVideo Plus Example Programs 25
Audio Recording 26
Audio Playing 27
Audio Looping 28
The soundtool Program 29
Using the SunVideo Plus Control Panel 31
Image Compression 32
Example Usage 33
Image Decompression 34
Example Usage 35
Video Display 35
Example Usage 37
Video Broadcast and Video Receiver 37
The xil_video_broadcast Program 37
The xil_video_receiver Program 39
Example Usage 40
vSunVideo Plus 1.3 User’s Guide ♦September 1999, Revision A

Video Broadcast and Video Receiver for H.261 40
The xilh_video_broadcast Program 40
Audio Video Conferencing 42
The xilh_video_receiver Program 42
The o1k_conf Command 43
5. XIL Attributes for SunVideo Plus 49
Attributes Overview 50
General Attributes 51
DEVICE_NAME 51
PORT_V 51
PORT 51
FORMAT_V 52
FORMAT 52
IMAGE_SKIP 52
MAX_BUFFERS 52
NUM_BUFFERS 53
FULL_BUFFERS 53
FLUSH_BUFFERS 53
Video Attributes 53
HUE 53
CHROMA_GAIN_U 53
CHROMA_GAIN_V 54
CONTRAST 54
LUMA_BRIGHTNESS 54
H.261 Attributes 54
H261_BIT_RATE 54
H261_MAX_QUANT 54
H261_IBLOCK_REFRESH 54
Contents vi

H261_FUR 55
H261_PIP 55
HW_DECOMPRESS_CIS 55
Important Attribute Information 55
Video Ports, Formats, and Auto Format Detection 55
HW Decompression and CIS Selection 56
HW Decompression and Creating an XIL Device 56
Using Both HW Compression and HW Decompression 56
The SunVideo Plus Control Panel and XIL Attributes 57
Molecules 57
Errors 58
Creating a Sample MMACo1k Device Image 59
XIL Source Examples 59
Glossary 61
vii SunVideo Plus 1.3 User’s Guide ♦September 1999, Revision A

Preface
This manual describes how to install and use the SunVideoTM Plus 1.3 subsystem with
your SunTM computer system. It is intended for end users and system administrators.
How This Book Is Organized
Chapter 1 provides an overview of the SunVideo Plus product.
Chapter 2 lists installation requirements and describes how to install hardware and
software for the SunVideo Plus card.
Chapter 3 describes SunVideo Plus and SunVideo compatibility mode.
Chapter 4 provides programming tools and XIL program examples.
Chapter 5 provides SunVideo Plus XIL programming attributes.
Using UNIX Commands
This document may not contain information on basic UNIX®commands and
procedures such as shutting down the system, booting the system, and configuring
devices.
See one or more of the following for this information:
4
Solaris 2.x Handbook for Sun Peripherals
4
AnswerBookTM online documentation for the SolarisTM 2.x software environment
Preface viii

4
Other software documentation that you received with your system
Typographic Conventions
TABLE P–1 Typographic Conventions
Typeface or
Symbol Meaning Examples
AaBbCc123 The names of commands, files, and
directories; on-screen computer
output.
Edit your .login file.
Use ls -a to list all files.
% You have mail.
AaBbCc123 What you type, when contrasted
with on-screen computer output. %su
Password:
AaBbCc123 Book titles, new words or terms,
words to be emphasized.
Command-line variable; replace
with a real name or value.
Read Chapter 6 in the User’s Guide.
These are called class options.
You must be root to do this.
To delete a file, type rm filename.
Shell Prompts
TABLE P–2 Shell Prompts
Shell Prompt
C shell machine_name%
C shell superuser machine_name#
ix SunVideo Plus 1.3 User’s Guide ♦September 1999, Revision A

TABLE P–2 Shell Prompts (continued)
Shell Prompt
Bourne shell and Korn shell $
Bourne shell and Korn shell superuser #
Related Documentation
Refer to documentation supplied with your platform system for specific hardware
installation procedures.
Sun Documentation on the Web
The docs.sun.com web site enables you to access Sun technical documentation on the
Web. You can browse the docs.sun.com archive or search for a specific book title or
subject at:
http://docs.sun.com
Sun Welcomes Your Comments
We are interested in improving our documentation and welcome your comments and
suggestions. You can email your comments to us at:
Please include the part number of your document in the subject line of your email.
x

xi SunVideo Plus 1.3 User’s Guide ♦September 1999, Revision A

CHAPTER 1
Introduction to SunVideo Plus
The SunVideo Plus subsystem provides audio and video processing engines for a
broad range of multimedia applications for Sun Peripheral Component Interface
(PCI) based workstations. The SunVideo Plus subsystem provides simultaneous
video and audio compression and decompression for Sun application products such
as ShowMeTM and ShowMeTM TVTM. SunVideo Plus enables you to run SunVideo
demonstration programs. The SunVideo Plus architecture enables you to easily
integrate:
4
Video cameras
4
Microphones
4
Headsets
4
Software decoders
4
Standard multimedia tools
The onboard video processor and audio digital signal processor (DSP) equip
standard desktop computers, particularly those in networked environments, with the
capability to run to audio/video-enabled applications for corporate training, security,
authoring, telemedicine, and video conferencing.
SunVideo Plus Features
The video input to the SunVideo Plus card can be either National Television System
Committee (NTSC) or Phase Alternation Line (PAL) format, and composite or
S-Video video sources. Decompressed and local video can transfer across the PCI-bus
to be displayed on your workstation. Audio compression is performed by the
onboard DSP.
1

A high-speed interface to the host bus provides multiple DMA/IO channels. These
channels provide flow-through for:
4
Output from a compressed video/audio bitstream
4
Output from decompressed video
4
Output from local uncompressed video
SunVideo Plus Specifications
TABLE 1–1 SunVideo Plus Specifications
Feature Description
Video inputs/
outputs Two (2) Composite IN, one (1) S-Video IN
Input formats NTSC or PAL
Video sampling YUV (4:2:2)
Audio inputs Line In or Microphone In (shared jack)
Audio outputs Headphone Out, Line Out
Video
compression CellB, H.261, JPEG, MPEG1(CIF I-Frame) - NTSC only
Uncompressed
video formats YUV, 8-bit RGB, 24-bit RGB, 8-bit Y
Audio codecs G.711 (Alaw, mlaw), G.722, G.728, PCM (8- or 16-bit), Acoustic Echo
Suppression (AES)
Audio sampling
rates Up to 44Khz (CD quality)
Audio output
levels 4Vpp for Headphone
Hardware
platforms PCI-bus Sun system
Software
platforms Solaris 2.5.1 and higher
2SunVideo Plus 1.3 User’s Guide ♦September 1999, Revision A

TABLE 1–1 SunVideo Plus Specifications (continued)
Feature Description
Bus slot type Single slot, half length
SunVideo
compatibility Binary compatibility with all SunVideo card XIL-based applications
APIs XIL Imaging library
libaudio compatibility API
Demonstration
applications Video recording and playback
TCP/IP video conferencing
Audio recording and playback
Sound monitor
Frame Rates
Depending on your computer system’s application load and display window size,
the SunVideo Plus subsystem can display video rates of up to 30 frames-per-second
(fps). Video frame rates are application dependent. SunVideo Plus subsystem
supports the following compressors and frame rates:
TABLE 1–2 Frame Rates
Compressor Frame Rate
H.261 CIF - 20-28 fps, QCIF - 30 fps
CellB 12 fps
Direct capture and display 30 fps
JPEG 30 fps
MPEG1 I-frame 30 fps
Introduction to SunVideo Plus 3

SunVideo Plus Software Packages
Your SunVideo Plus card comes with the following software packages:
4
SUNWo1kpd.u (Device Driver)
4
SUNWo1kpu (Runtime Scripts)
4
SUNWo1kx (XIL 1.2 Runtime libraries - Solaris 2.5.1 only)
4
SUNWo1kx (XIL 1.3 Runtime libraries - Solaris 2.6 and Solaris 7 only)
See Chapter 2 for software installation procedures.
SunVideo Plus Hardware
The SunVideo Plus card is installed in a PCI-bus slot. The card contains two
Composite IN ports, and one S-Video IN port. For audio signals, SunVideo Plus also
contains one port for line level OUT, one port for headphone level OUT, and one
input port that can be configured through the software as either line or microphone
level IN.
The following figure shows the SunVideo Plus PCI card.
Figure 1–1 SunVideo Plus PCI Card
The following figure shows the SunVideo Plus card backplate connection outlay.
4SunVideo Plus 1.3 User’s Guide ♦September 1999, Revision A

Figure 1–2 SunVideo Plus PCI Card Backplate
SunVideo Plus supports both Composite and S-Video inputs. S-Video can provide a
much sharper image than Composite video, with better color separation. S-Video
uses a four-pin, mini-DIN connector, which provides separate Y (luminance) and C
(chrominance) signals.
See Chapter 2 for software installation procedures.
Introduction to SunVideo Plus 5

6SunVideo Plus 1.3 User’s Guide ♦September 1999, Revision A

CHAPTER 2
Installing SunVideo Plus
This chapter contains information for installing and setting environments for the
SunVideo Plus hardware and software. It also describes how to connect video input
devices to your Sun system through the SunVideo Plus board.
You must be able to become superuser to successfully install SunVideo Plus. If you
do not know the root password of the system on which you are installing SunVideo
Plus, contact your system administrator.
Installation Kit
The SunVideo Plus 1.3 Installation Kit includes:
4
SunVideo Plus 1.3 card
4
SunVideo Plus 1.3 software (CD)
4
Antistatic wriststrap
4
SunVideo Plus 1.3 Installation Guide
Installation Requirements
To successfully install SunVideo Plus, you need a SPARCTM system running Solaris
2.5.1, Solaris 2.6, or Solaris 7 operating enironments..
7

Unpacking the SunVideo Plus Card
The SunVideo Plus board is packaged and shipped in an antistatic envelope that
protects it from static electricity. Be sure to save this envelope and all shipping
package materials; these materials must be used if re-shipment is necessary. When
handling the board, use extreme care and avoid touching delicate electronic
components. When unpacking the board, do the following:
1. Immediately inspect the shipping container for evidence of damage. If the
carrier’s agent is not present when the container is opened and the contents are
found to be damaged, keep all contents packing materials for the agent’s
inspection.
2. If you find no evidence of damage, carefully remove the card from its container.
Caution - Printed circuit boards, such as SunVideo Plus, are made of delicate
electronic components that are extremely sensitive to static electricity. Ordinary
amounts of static from your clothes or work environment can damage them. Handle
these boards only by the non-conducting edges. Do not touch the components on the
board or any metal parts. Wear a grounding strap when handling the board. Do not
disconnect the power from your system power receptacle. This connection provides
the ground path necessary so that you can safely remove and install the board and
other components. Be sure that the system power is turned off.
Installing the SunVideo Plus Card
1. Install the SunVideo Plus card according to the installation procedures for
PCI-bus cards provided with your SunTM system.
2. After installing the SunVideo Plus card and securing your system enclosure,
boot your system by typing:
hostname# reboot -- -r
8SunVideo Plus 1.3 User’s Guide ♦September 1999, Revision A
Table of contents