Page 3
SunVideo Plus 1.3 User’s Guide Part No: 806-2818-10 September 1999, Revision A...
Page 4
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.
Page 5
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...
Page 6
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 SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 7
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 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...
Page 8
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 SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 9
Preface This manual describes how to install and use the SunVideo Plus 1.3 subsystem with your Sun 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.
You must be root to do this. with a real name or value. To delete a file, type rm filename. Shell Prompts Shell Prompts TABLE P–2 Shell Prompt C shell machine_name% C shell superuser machine_name# SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Shell Prompts TABLE P–2 (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.
Page 12
SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 13
CHAPTER 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 ShowMe and ShowMe .
Page 14
G.711 (Alaw, mlaw), G.722, G.728, PCM (8- or 16-bit), Acoustic Echo Suppression (AES) Audio sampling Up to 44Khz (CD quality) rates Audio output 4Vpp for Headphone levels Hardware PCI-bus Sun system platforms Software Solaris 2.5.1 and higher platforms SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
SunVideo Plus Specifications TABLE 1–1 (continued) Feature Description Bus slot type Single slot, half length SunVideo Binary compatibility with all SunVideo card XIL-based applications compatibility APIs XIL Imaging library libaudio compatibility API Demonstration Video recording and playback applications TCP/IP video conferencing Audio recording and playback Sound monitor Frame Rates...
Page 16
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. SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 17
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.
Page 18
SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
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...
Page 20
1. Install the SunVideo Plus card according to the installation procedures for PCI-bus cards provided with your Sun system. 2. After installing the SunVideo Plus card and securing your system enclosure, boot your system by typing: hostname# reboot -- -r SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 21
SunVideo Plus 1.3 Software Contents Your SunVideo Plus subsystem includes the following software installed during the the pkgadd process: SunVideo Plus 1.3 Software Contents TABLE 2–1 Contents Description Solaris Software Support Translated User’s Guide Common to each Solaris release. Docs/...
Page 22
Packages/ XIL1.3 Runtime SUNWo1kpd.u SUNWo1kpx Once installed, the SunVideo Plus 1.3 software resides in /etc/opt/SUNWo1kp, /opt/SUNo1kp, and /opt/SUNWopi. The XIL Runtime pipeline software resides in /usr/openwin. Removing Previous Software Releases You must remove any previous releases of the SunVideo Plus software before installing any new software packages.
Page 23
4 Remove SunVideo Plus 1.1 or 1.2 by typing hostname# /usr/sbin/pkgrm SUNWvtsvp SUNWsvpab SUNWo1kpx SUNWo1kpu SUNWo1kpd Installing the SunVideo Plus Software The SunVideo Plus 1.3 software is provided on the CD included with your SunVideo Plus 1.3 installation kit. 1. Log in superuser (root).
Page 24
4 To install the Solaris 7 operating environment, type: hostname# cd /cdrom/sunvideo_plus_1_3/Solaris_7/Packages hostname# /usr/sbin/pkgadd -d . Choose all. 1. After the software has been installed, unmount and eject the CD-ROM: SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 25
hostname# cd / hostname# umount /cdrom/sunvideo_plus_1_3 hostname# eject cdrom 2. Reboot your workstation: hostname# reboot -- -r This enables the operating system to recognize the SunVideo Plus card. Setting Your Environment The demonstration applications that are shipped with SunVideo Plus are designed to search the /opt/SUNWo1kp/lib directory for the SunVideo Plus libraries.
Page 26
The following entries show how to set these variables assuming XIL was installed in the default location and that the variables are not already set. 4 To set variables using the sh or ksh environments, type: SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 27
hostname% LD_LIBRARY_PATH=/opt/SUNWits/Graphics-sw/xil/lib:$LD_LIBRARY_PATH hostname% export LD_LIBRARY_PATH hostname% XILHOME=/opt/SUNWits/Graphics-sw/xil hostname% export XILHOME 4 Using csh environment, type: hostname% setenv LD_LIBRARY_PATH /opt/SUNWits/Graphics-sw/xil/lib: $LD_LIBRARY_PATH hostname% setenv XILHOME /opt/SUNWits/Graphics-sw/xil Assigning Device Numbers The operating system assigns device numbers for cards based on the card type, as well as the order that the cards were placed into the PCI-bus slots.
Page 28
4. Connect an audio line input device to the audio input jack and connect speakers to the audio line output jack. 5. Run the olk_audloop program to test the audio capabilities of the card. Type: hostname% o1k_audloop 6. Press Control-c when finished. SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
SunVideo Compatibility Mode This chapter describes how to use the SunVideo Plus subsystem with existing software applications that use the Sun Microsystems XIL library and the SBus SunVideo card. This enables you to use a SunVideo Plus card to run SunVideo demonstration programs and applications such as Sun’s ShowMe desktop...
Page 30
See “Running SVC Mode Scripts” on page 19. 4. For Solaris 2.5.1 only, set the XILHOME and LD_LIBRARY_PATH environment variables. See “Setting SVC Environment Variables (Solaris 2.5.1 only)” on page 22. SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 31
Running SVC Mode Scripts After installing the SunVideo Plus card and software, do the following to run SunVideo Compatibility (SVC) mode setup scripts: 1. Log in as superuser. 2. Run the following scripts: hostname# svc_install svc_devices (install or remove) hostname# The following table describes the setup scripts.
Page 32
To disable the SVC mode under Solaris 2.6, use the svc_uninstall script. The syntax is: hostname% svc_install options The following table lists and describes the svc_install options and defaults. SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 33
svc_install Options and Defaults TABLE 3–3 Description svc_install Options This is Verbose mode which displays status information on stdout. Typically, you run the script without any options. You must be logged in as superuser. The script modifies /usr/openwin/xil/lib. You should not run this script if this is an NFS mounted directory.
Page 34
DESTDIR is the destination location for the SunVideo compatibility mode pipeline hierarchy. This is the location specified when the svc_install script was run. The default location for DESTDIR is /opt/SUNWo1kp/svc. SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 35
If the XIL library is already in your LD_LIBRARY_PATH, then either DESTDIR/lib must precede LD_LIBRARY_PATH, or the XIL library path must be removed from your LD_LIBRARY_PATH before you attach the new path to LD_LIBRARY_PATH. The following is an example of attaching DESTDIR/lib using csh shell: hostname% setenv O1KHOME /opt/SUNWo1kp hostname% setenv LD_LIBRARY_PATH /opt/SUNWo1kp/lib:$LD_LIBRARY_PATH...
Page 36
SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 37
CHAPTER SunVideo Plus Example Programs This chapter includes SunVideo Plus programming tools and XIL program examples. Included with the SunVideo Plus software is the source code for several example programs. The following table lists and briefly describes each of these. Detailed descriptions of each syntax and related options are then provided.
The following table describes command options and the default setting. o1k_audrec Options TABLE 4–2 Options Description and Values Default Device name -D device /dev/o1k0 Encoding format -f format (0=ULAW, 1=ALAW, 2=PCM8, 3=PCM16, 4=G722) SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 39
o1k_audrec Options TABLE 4–2 (continued) Options Description and Values Default Sample rate (8000, 11025, 16000, 22050) -r rate 8000 Channels (1, 2) -c channel Input port (0=LINE, 1=MIC) -p port Input gain (0 .. 1.0) -g gain .125 Monitor gain (0 .. 1.0) -m mgain Audio file string information -I information...
Page 40
/dev/o1k0 Encoding format -f format (0=ULAW, 1=ALAW, 2=PCM8, 3=PCM16, 4=G722) Sample rate (8000, 11025, 16000, 22050) -r rate 8000 Channels (1, 2) -c channel Input port (0=LINE, 1=MIC) -p port SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 41
o1k_audloop Options TABLE 4–4 (continued) Options Description and Values Default Input gain (0 .. 1.0) -g gain .125 Output gain (0 .. 1.0) -v gain Buffer size -b size 1000 The soundtool Program The soundtool program is a GUI tool for recording, playing and modifying u-law audio files (compressed audio files).
Page 42
(such as open/close, read/write, ioctl and fcntl) to operate on Sun standard hardware and audio devices. The source for the soundtool demonstration distributed with SunVideo Plus software is installed in the example subdirectory of O1KHOME (usually /opt/SUNWo1kp/examples/soundtool). SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 43
Using the SunVideo Plus Control Panel The SunVideo Plus control panel, olk_ctl, allows both static and dynamic changes to various audio/video attributes (such as video/audio input selections, audio volume/gain, video brightness, contrast, and so on) for each SunVideo Plus installed in your system.
QCIF-sized images, use -s 4. The following shows the command-line syntax for the xil_compress example: hostname% xil_compress options -o filename The following table describes command options and the default setting SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 45
xil_compress Options TABLE 4–5 Legal Options Description and Values Default Save bitstream in file -o %s NULL Compression type (CellB, JPEG, MPEG1, H261) -C %s CellB Shrink factor -s %d Select input channel -I %d Frames to capture -f %d Frames to skip between capture -i %d Name of device...
Page 46
CellB width and height -s %d %d 320, 240 Playback frame rate (0 = fast as possible) -r %d H261 Options Name of SunVideo Plus device for h/w decompression NULL SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
xil_decompress Options TABLE 4–6 (continued) To decompress a CellB bitstream, type: hostname% xil_decompress -C CellB -s 320 240 -i /tmp/t.clb To decompress a JPEG bitstream, type: hostname% xil_decompress -C Jpeg -i tmp/t.jpeg To decompress an H261 bitstream, type: hostname% xil_decompress -C H261 -i tmp/t.h261 To decompress a H261 bitstream using the second SunVideo Plus card in your system, type: hostname% xil_decompress -C H261 -i tmp/t.h261 -D /dev/o1k1...
Page 48
-D %s Legal Switches Enable grayscale mode Exit on first error Do not display result of capture Video Attributes Brightness none -B %d Contrast none -C %d none -H %d SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 49
xil_display Options TABLE 4–7 (continued) Legal Options Description and Values Default Saturation/gain U component none -U %d Saturation/gain V component none -V %d Colormap version (0=XIL std, 1=XIL gamma corrected) -c %d The colormap version option does nothing if the current display depth is 24 bits. On 8-bit display depths, it affects which colormap is installed for the video window.
Page 50
PAL: 768 Height of capture window -h %d NTSC: 480 PAL: 576 x coordinate of display window (random) -x %d y coordinate of display window (random) -y %d Legal Switches SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 51
xil_video_broadcast Options TABLE 4–8 (continued) Legal Options Description and Values Default Disable preview Enable display of partial CellB frames by receiver Disable transmission Exit on first error Print verbose messages The following shows the command-line syntax for the xil_video_receiver example: hostname% xil_video_receiver options The following table describes command options and the default setting.
Page 52
XIL examples that run on the SunVideo Plus card and use H.261 compression. The following shows the command-line syntax for the xil_video_broadcast example: hostname% xilh_video_broadcast options The following table describes command options and the default setting SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 53
xilh_video_broadcast Options TABLE 4–10 Legal Options Description and Values Default Compression type (CellB, Jpeg, H261, UYVY) -C %s CellB Destination hostname -H %s local subnet Broadcast channel (0-9) -c %d File of destination hostnames -F %s none Name of SunVideo Plus device -D %s /dev/olk0 Select input channel...
Page 54
Options TABLE 4–11 Legal Options Description and Values Default Compression type (CellB, Jpeg, H261, UYVY) -C %s CellB Broadcast channel (0-9) -c %d Frames to broadcast -f %d 18000 SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 55
xilh_video_receiver Options TABLE 4–11 (continued) Legal Options Description and Values Default x coordinate of display window (random) -x %d y coordinate of display window (random) -y %d Legal Switches Enable display of partial CellB frames by receiver Exit on first error Print verbose messages Note - The example program o1k_conf is a point-to-point audio and video...
Page 56
This allows for configuration of audio/video parameters and provides an address book for storing information about users you want to connect. To open the address book, click the Address button. The following figure shows the Address Book. SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 57
Figure 4–4 Address Book A user is added by selecting the New button. The most important information is the User@Host field. This is used to contact another person when placing a conference call. The other information in the Address Book is optional. After filling in the user information, click on the Add button (which is only displayed after the new button is selected).
Page 58
During a conference call, you will have two windows on your display, a Local View and a Far View (the person you are conferencing). The figure below shows these two windows. Figure 4–6 Local View and Far View Windows SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 59
With H.261, a picture-in-a-picture is possible on the Far View window, with your view inlayed in the top-left corner. To reduce CPU use, you can switch your local view to an icon. This is advisable during an H261 conference. When you have completed your conference call, click HangUp. The HangUp button is displayed on the Main Conference Panel after a call is placed.
Page 60
SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 61
CHAPTER XIL Attributes for SunVideo Plus This chapter describes the XIL attributes that are specific to SunVideo Plus. This information assumes that you are familiar with the concepts of video compression and imaging and the related XIL functions that are described in the XIL Programmer’s Guide.
Page 62
SunVideo Plus in a reasonable way to support binary and source compatibility with SunVideo. 4 MPEG_RATE_CONTROL 4 MPEG_FIXED_QUANT 4 MPEG_WEIGHTS 4 FILE DESCRIPTOR 4 FRAME_NUMBER 4 TIMESTAMP The following are SunVideo Plus video attributes: 4 HUE SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
4 H261_PIP 4 CHROMA_GAIN_V 4 CHROMA_GAIN_U 4 BRIGHTNESS 4 CONTRAST 4 H261_BIT_RATE 4 H261_MAX_QUANT 4 H261_IBLOCK_REFRESH 4 H261_FUR The following sections describe the attributes in more detail. Note that some attributes are “set-only” and others are “get-only.” This is noted under the ACCESS heading for each attribute.
Page 64
The value must be in the range between 1 and 10. See the figure below. The value is clipped to provide the number of buffers that fit in the available memory. Figure 5–1 Maximum Number of Buffers SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Access: set/get Type: integerDefault: 2 This attribute returns an integer that specifies the actual number of buffers that can be used to hold compressed frames. The NUM_BUFFERS value is less than or equal to the value of the MAX_BUFFERS attribute. The NUM_BUFFERS attribute returns a valid value after the first capture (or capture/compress) operation has been performed.
Page 66
This attribute sets the desired period in milliseconds before the compressor should update a given H261 macroblock with an intra-encoded block. H261 requires that each macroblock be encoded as an intra-encoded block every 132 frames. If SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 67
compressing at 10 fps, this implies that a given block may not be intra-encoded for up to 13 seconds. On a lossy network, a loss of a frame results visually in distorted blocks in the decompressed image. Waiting for up to 13 seconds for these bad blocks to refresh is probably not acceptable.
Page 68
The previous section explained that the hardware decompression molecule of SunVideo Plus will implicitly create a device and device image if one has not already been created. Thus, if an application performed a decompress molecule and then SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 69
created an MMACo1k device and device image, it would receive the device and image previously created implicitly by the decompress molecule. However, there is a problem in XIL with respect to deleting the device image. For this reason, if both hardware compression and decompression are to occur in an application, then the application is required to explicitly create a device and device image before the first hardware decompress molecule occurs.
Page 70
MMACo1k: could not set video characteristics. The program is not able to MMACo1k-5 set the port characteristics. For a list of other XIL error messages, see Appendix B of the XIL Programmer’s Guide. SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 71
Creating a Sample MMACo1k Device Image Create a device image attached to a SunVideo Plus card, and set the video port to be COMPOSITE VIDEO 2. To do this, type: # XilImage image # XilDevice image where image = xil_create_from_device(state, “MMACo1k”, device); device = xil_device_create(state, “MMACo1k”) xil_device_set_value(device, “DEVICE_NAME”, (void *) “/dev/o1k0”);...
Page 72
Same as xil_broadcast, but adds H261. Same as xil_receive, but adds H261. xilh_receive A GUI point-to-point conference application that uses XIL and o1k_conf libotiaudio. SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A...
Page 73
Glossary For conferencing to be effective, systems must be able to mitigate acoustic echo suppression the impact of echo caused by the loudspeaker audio feeding back into the microphone. The AES algorithm used in SunVideo Plus disables variations caused by double-talk creating consistent echo attenuation.
Page 74
The first MPEG standard, MPEG-1 is geared for CD-ROM and T1 bit-rate transmission. At 1.5 Mbits/second, the algorithm uses both interframe and intraframe coding to achieve quality video at a lower bandwidth. Pulse Code Modulation. See G.711. SunVideo Plus 1.3 User’s Guide ♦ September 1999, Revision A Glossary-62...
Need help?
Do you have a question about the SunVideo Plus 1.3 and is the answer not in the manual?
Questions and answers