USB Camera VfW and Twain Drivers
=======================================
Version 1.70 20th January 1999
=================================
Introduction
=============
This file describes how to install and use the Video for Windows and
Twain drivers for the USB Camera.
The driver is a VfW installable video capture driver which can be used with
standard VfW applications, eg VidCap, to capture video and still image
data.
It is compatible with a wide range of applications which utilise the VfW
interface to access image capture devices. In particular the camera is an
ideal low cost video input device for video telephone applications.
The driver comprises a thin 16bit VfW layer with a 32bit core DLL implementing
the VfW API functions. This DLL communicates with a USB WDM mini-driver
(essentially a DirectShow driver) via a stream class emulator.
Compatibility Status
====================
The driver will run under under Windows 95 (OSR2.1 or later).
The driver will run under under Windows 98.
The driver will not run under Windows 2000 beta2.
The camera has passed USB-IF compliance testing.
Installation
============
Driver installation can be achieved by running an executable or via INF file.
The installation program will check for the correct version of Windows.
-Win95-
The following driver files are installed
VVLUSBWV.INF - INF file for VfW driver
VVLUSB16.DRV - 16bit VfW interface layer
VVLUSB32.DLL - Core VfW driver
VVLSTRM.SYS - Stream class emulator
VVLUSB.SYS - WDM mini-driver
VVLCODEC.DLL - 32bit VfW codec for all driver supported YUV FOURCCs
VVLUSB.DS - 32bit Twain driver
VVLPRIV.DLL - 32bit Private Interface access DLL
TWAIN.DLL - Twain system file
TWAIN_32.DLL - Twain system file
TWUNK_16.DLL - Twain system file
TWUNK_32.DLL - Twain system file
READMEVW.TXT - This README file
The driver can be uninstalled by running the installation program with the
/uninstall command line parameter.
Driver capabilities
===================
- Support for VfW frame and stream capture
- Arbitrary image sizes up to 4CIF with 8 by 4 pixel granularity
- RGB24, RGB16, YV12, I420, UYVY and YUY2 image formats
- Palette support
- A codec for converting the above YUV formats to RGB is also supplied
- USB bandwidth used by camera can be selected via properties dialog box
- Twain32 support
- A Private Interface for non VfW API function calls
Camera Settings Dialog Box
==========================
Brightness
Moving this to the right increases the brightness of the image. Note that
the brightness setting reauires a short time to take effect after the driver
starts.
Contrast
Controls the contrast of the image. Moving to right increases the color
contrast.
Color
Controls the color saturation of the image.
Compression Control
The slider acts as an image quality control. Moving to the right increases
image quality, at the expense of image framerate, while moving to the left
decreases image quality, but give a higher framerate. If your video
conferencing application is slow, try decreasing the image quality (move
the slider to the left).
Optimize for Video Preview
Use this setting if you are looking at local video or want to capture a
video sequence to a file. This setting allows the driver to use a large
proportion of the available frametime to capture the best, and fastest,
video possible.
Optimize for Video Conferencing
Use this setting if you are using the camera with a videoconferencing
application. This compression setting limits the proportion of the
available frametime that the driver will use. Thus allowing the
videoconferencing application time to perform audio and video
compression.
Restore Defaults
This restores factory settings for the controls in the Camera Settings
dialog and the Advanced dialog. Brightness, Contrast, Colour and Compression
Control are all set to their default value of 50. Compression mode is set
to Video Preview. Lighting is set to Automatic, backlit is set off Pan/Tile is
also turned off. The banding filter is enabled for 60Hx Lighting.
Advanced Settings Dialog Box
----------------------------
Lighting
This lets you select for your current lighting condition, and is
particularly useful in low lighting conditions. Note - The setting selected
will affect the maximum framerate available from the camera, as the medium
and low settings slow the camera down to improve sensitivity. There is also
an "Automatic" setting that selects the most appropriate level.
Backlit
This makes the auto exposure controller attempt to correctly expose the
centre portion of the the image, while disregarding bright objects around
the periphery of the scene. It works well for "head and shoulders" type
scenes. Unchecking this box sets the exposure controller use a "flat",
equally weighted, algorithm.
Banding Filter
This removes the horizontal banding that sometimes appears in the scenes
lit by artifical mains lighting. This banding is caused by the mains
lighting flickering on and off at the mains supply frequency. When the
banding filter is selected the "Filter Type", see below, must be set
appropriately.
Filter Type
Set this to match the frequency of the mains supply in your country. This
is 60Hz in the USA, and 50Hz in the UK.
Zoom control
The driver supports a zoom mode. Enabling this feature allows you to pan and
tilt a capture window within the full capture area. The capture area is 352x288.
The driver always starts 'unzoomed'.
Image Format Options
====================
Image Sizes
-----------
24 Bit RGB 16 Bit RGB 8 Bit RGB YUV
704 X 576 Yes - - -
640 x 480 Yes - - -
352 x 288 Yes Yes Yes Yes
320 x 240 Yes Yes Yes Yes
* 176 x 144 Yes Yes Yes Yes
160 x 120 Yes Yes Yes Yes
* default image size for the camera
Image sizes other than those tabulated above may be used. However the
following restrictions apply:
- Maximum image size is 704 x 576.
- Minimum number of columms is 8, and the minimum number of rows is 4.
- Row size must be a factor of 8 and columm size a factor of 4 for image sizes
smaller than CIF. If the image size is larger than CIF in either axis, the
row size must be a factor of 16 and columm size a factor of 8.
Image Formats (aka FourCCs)
---------------------------
The YUV column refers to the various YUV image formats (also known as
four character codes) that the driver supports. These are:
- RGB (24 and 16 bit depth)
- YV12
- I420
- UYVY
- YUY2
Properties Dialog Box
======================
This dialog shows driver version info and useful for customer support.
It also reports the requested the allocated USB bandwith (see section
below on USB transfer modes for more details). Selecting a lower bandwith
setting will lower the framerate, but allow improved operation of other
USB peripherals.
Private Interface
=================
The functionality available through the private interface is designed to
allow application developers to directly control camera features not
supported by VfW, such as those found in the Video Source dialog box.
Contact your supplier for more details.
Twain Driver
============
The dialogue box features a preview window displaying the current camera
image, and has a number of controls for tuning and capturing an image.
- Button to set the image size and format. The display updates to reflect
any new settings. The image is scaled to fit the preview box. This may
result in a distorted image being seen. This is purely a feature of the
preview windows, and the image will appear correctly when it is displayed
by your application.
- Button to set the brightness/contrast/colour and compression controls.
- Button to capture an image from the camera
Note that cameras push button support will capture an image when the
button is pressed.
- Button to freeze the image. A frozen image may be captured any number of
times. The image is frozen automatically when the capture button is
pressed, and the button text changed to "Resume". Pressing it will restart
the video camera display.
Note - Some applications only allow the capture of a single image before
unloading the Twain driver. If this is the case, you won't be able
to capture the same image more than once.
- Button to close the driver.
The dialog box may disappear after the image has been captured. This is
entirely under the control of the application that loaded the driver. If it
does disappear, choose Acquire to capture another image.
Only RGB24 colour is supported. If another format is chosen, the driver
warn the user that the format change has been ignored and resets it to RGB24.
USB Data Transfer Modes
=======================
Isochronous Video Transfer
--------------------------
The USB Camera uses isochronous transactions to transfer video data to the PC.
An isochronous transaction guarantees bandwidth and latency of the transfer and the
recommended transfer mode for streaming multimedia devices (e.g video and audio).
High speed USB has a bandwidth of 12MBit/s or 1.5MByte/s. The USB bus is
framed into 1ms time slots. During each 1ms time slot 1500 bytes can be
transfered. An isochronous device can request a maximum of 1023 bytes for
data transfer per 1ms time slot. If granted (depending on which other
isochronous devices are on the bus) this bandwidth is reserved for the
device within each 1ms time slot. Therefore once the camera has reserved
bandwidth it is guaranteed to have that bandwidth avaiable within each 1ms
time slot even if it does not always use it. Thus if another isochronous
device subsequently requests more bandwidth than remains available on the
bus it will be rejected.
The only problem with this approach is that if you request too much
bandwidth and other isochronous devices are active on the bus then the
camera will be unable to supply video. To counteract this problem the camera
has 4 bandwidth settings: high bandwidth of 960 bytes/ms, medium bandwidth
of 704 bytes/ms, low bandwidth of 448 bytes/ms and zero bandwidth. When no
VfW application is using the camera we sit enumerated at our zero bandwidth
setting. This lets other isochronous devices use the bus. (Note when other
isochronous devices are not 'running' they should also request zero
bandwidth). When a VfW application starts to use the camera we request our
high bandwidth setting. If this is unavailable we try our medium bandwidth
setting and then low bandwidth setting etc. (The starting point for
requesting bandwidth can be modified via the multimedia properties as high,
medium or low).
Bulk Video Transfer
-------------------
The alternative approach to transfering video to the PC is to use Bulk
transfer. Bulk transfer bandwidth is not guaranteed but allows you to
transfer packets of video data of maximum size 64 bytes to the host. If no
other devices are attached to the bus the Host controller can schedule
multiple Bulk transactions per 1ms frame and video data will be transfered
very quickly to the Host. (In fact this can be slightly faster than
isochronous transfer because there is no 1023 bytes out of 1500 bytes
limit). However the danger is that when isochronous devices are attached to
the bus and reserve bandwidth and/or multiple devices are attached then bulk
transactions will be scheduled by the Host Controller only as and when there
is free bus time. If the bus is very busy this results in video data being
trickled through as and when there is time. The resultant latency issues are
significant in video transfer.
Why Graphics Card Drivers Can Upset Isochronous USB Data Transfer
=================================================================
The cause of the problem with USB Isochronous streaming and certain graphics
accelerators is related to the graphics accelerator effectively blocking
access to the PCI Bus. USB Controllers need to be serviced regularly in
order function correctly when in ISO mode. This is because the controller
must issue an 'IN' token in each 1 millisecond USB frame in order to allow
the device to send its data. Shown simply:
|.....Idddddddddddd|...Idddddddddddd..|....Idddddd.......|
where
| delimits the USB frame
. is idle time or other traffic
I is the IN token
d is data sent from the camera
Therefore the above shows 3 USB frames with the camera sending data. The
definition of the iso stream is that the camera may send up to x bytes each
frame where x is determined by the bandwidth allocated. In the above, the
limit is represented by the 12 b's in the first two frames, and the camera
chooses to send less in the last frame. Note that there was still enough
room for it to sends its full quota of data before the end of the frame if
it had chosen to do so.
When access to the PCI bus is blocked by the card, the host issues the
IN token to the controller as normal, however, the token is delayed on the
PCI bus until the accelerator has finished. The alters the picture:
|.....Idddddddddddd|...XXXXXXIdddddddd*
where
X is the delay introduced by the PCI bus
Because the IN token was delayed, the camera started transmitting late.
This means that it was still transmitting data at the end of the frame
(indicated by *). This is a USB bus error condition which causes the device
to be effectively shut down. All further communications with the device are
impossible until it has been unplugged and plugged in again.
If the bandwidth allocated to the device were halved, the same delay would
not cause an error because the camera would have stopped transmitting before
the end of the frame:
|.....Idddddd......|...XXXXXXIdddddd..|....Idddddd.......|
The probability of an error occurring is therefore a function of the
following:
- frequency of accelerator induced delays
- duration of accelerator induced delays
- bandwidth allocated to camera
In our experience, problem graphics accelerators tend to produce long delays
at regular intervals. The consequence of this is that even trivially small
Isochronous transfers are at risk. If we repeat the previous example with a
longer delay, even the low bandwidth transfer will die:
|.....Idddddd......|...XXXXXXXXXXIdddd*
Since each USB frame is 1 millisecond, there are 1000 opportunities for
failure to occur each second... It only takes one delay in the wrong place
at the wrong time to trigger this problem.
The only real solution therefore is to reduce the duration and frequency of
the delays by reducing the graphics acceleration. The delays can usually be
eliminated entirely by disabling graphics acceleration completely. Reducing
the bandwidth used by the peripheral may help, but only if the particular
graphics accelerator in use is causing sufficiently short delays, which is
not normally the case.
Known Problems
==============
Side Effects of Iscochronous Transfer Mode
------------------------------------------
The camera uses the isochronous transfer mode, which guarantees latency and
bandwidth, but not data intergrity (see previous section for more details).
The resulting data corruption can cause frames to be dropped, which results
in occasional pauses in the video.
Some graphics card drivers can interfere with USB traffic by spending too
much time on the the PCI bus. This is a well documented problem that affects
all isochronous USB devices. When the driver encounters the problem, the video
will pause and become completely white. In most cases, you can revover by
closing the application and re-plugging the camera. However the best
workaround is to lower the graphics hardware acceleration setting.
Camera Doesn't Work When Windows Starts With It Plugged In
----------------------------------------------------------
On some PCs, the camera does not work correctly if Windows starts with it
plugged in. You will see a yellow exclamation mark on the camera's entry
in Device Manager when this happens. Re-plugging the camera will clear the
problem.
A driver "patch" is available that prevents this problem - contact your
supplier for details.
Camera Does Not Enumerate When Plugged In
------------------------------------------
Some motherboards (particuarily early Elite models) provide questionable
USB data signals, which may prevent the camera from enumerating and
operating correctly.
A camera test applet is available which can detect this problem.
Changes since version 1.60
==========================
- Fixed bug that caused video to freeze with some "streaming" applications
- Brightness slider produces brighter image in low light
- Slightly faster framerate at CIF resolution
- Zoom, Pan and Tilt is smoother, but now only works up to QCIF
- Fixed bug that caused crash when running Microsoft AVI WHQL software
- Extended Private Interface Support
- Added "colour matrix" support for 6409 sensor
- Changed README and INF filenames from VVLUSB95.xx to VVLUSBVW.xx
Download Driver Pack
After your driver has been downloaded, follow these simple steps to install it.
Expand the archive file (if the download file is in zip or rar format).
If the expanded file has an .exe extension, double click it and follow the installation instructions.
Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.
Find the device and model you want to update in the device list.
Double-click on it to open the Properties dialog box.
From the Properties dialog box, select the Driver tab.
Click the Update Driver button, then follow the instructions.
Very important: You must reboot your system to ensure that any driver updates have taken effect.
For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.