O2Video(7)

O2Video - O2 Video System

Showing IRIX 6.5.30 (default release). Unchanged since IRIX 6.5.

NAME
     O2Video - O2 Video System


DESCRIPTION
     O2Video (aka "mvp") is the built in multiport video processor on the O2
     System.  There are two types of Audio/Video interface cards available.
     The first is termed the "Analog A/V" interface and is identified in the
     "hinv" output as "AV1".  The second type is termed the "Digital A/V"
     interface and it's name is "AV2" when examining the "hinv" output.


     The AV1 interface supports Composite and SVideo (Y/C) (both analog), and
     Digital I/O via the Camera/Digital Video port.  The analog I/O jacks are
     for use with standard analog video equipment, supporting both PAL and
     NTSC video formats.  There are a variety of controls available that allow
     the user or programmer to set various parameters used for the decoding
     and encoding of the video signals.

     The digital input is for use with the O2 Digital System Camera, or can be
     connected to an optional digital video input and output adapter to
     interface to standard SMPTE259M serial digital video devices (contact SGI
     Sales for digital video "dongle" information).


     The AV2 interface supports two ITU-601 (CCIR-601) serial digital video
     input connectors and two similiar output connectors, as well as GPI input
     and output and analog (black burst) sync input and loop through.


     O2Video simultaneously supports two input video streams to memory and one
     output video stream from memory which can be seperated into two outputs,
     one carrying pixel information, the other carrying alpha (key)
     information.


     Using O2Video, it is possible to capture live video into the computer's
     memory which can then be displayed in a graphics window on the screen or
     further processed by an application.  It is also possible to generate
     video output from images in memory, which can be displayed on a standard
     video monitor, or recorded to a VTR.  Using the VL programming library
     (see vlintro(3), and mvp(3)), a program can capture video in either the
     RGB or YCrCb color spaces, and either full or reduced size formats, and
     in a format usable for input to the compressor/decompressor, display on
     the graphics screen, or as an input to a graphics processing and/or
     texture operation.


     There is also a screen capture feature for the direct capture of images
     from the graphics screen into memory.

   O2 Media Applications
     A full suite of media applications are packaged with the O2 system to
     take advantage of the resident hardware.  See mediarecorder(1),
     moviemaker(1), and movieplayer(1).  In addition, there are some
     programming examples supplied with source under /usr/share/src/dmedia,
     that highlight some of the features of the O2 Audio, Video, Compression
     and Graphics systems.


   O2Video Control Panel
     The video control program, videopanel(1) allows the user to control the
     inputs, the output, and their timing. Additionally, it allows the user to
     set certain device parameters which are described below. The factory
     defaults for all of these controls are stored in the file
     /usr/lib/dmedia/video/defaults/mvp, which is the file restored when the
     "File>Restore Factory Settings" is selected from the videopanel File
     menu.  When "File>Save Settings" is selected from the videopanel File
     menu, the current settings are saved to the file $HOME/.videopanelrc.
     These settings may be restored by selecting "File>Restore Settings."


     The videopanels are different depending on whether there is an AV1 or an
     AV2 interface card installed (there is also an "audio only" system which
     still contains some video channel features though there are no external
     connectors.  See mvp(3) for more details.


     The Main Level video control panel contains the following controls:


     Default Input
          This selects the default input source for applications.  The choices
          correspond to the connectors on the machine.  In addition, it can
          have an effect on the genlock source (see ""Genlock Source"
          description below).

          The possible selections for default input are "composite", "svideo",
          "digital", "camera", "primary" or "secondary digital video", and
          "output video".

          The Composite input is an RCA-type two wire connector that is
          commonly found on VCRs and cameras.  The SVideo input uses a mini-
          DIN connector that has separate signals for luminance and
          chrominance (sometimes referred to as Y/C). Better VCRs and cameras
          support SVideo which generally results in a superior picture.

          The Camera input selects the O2 Digital System Camera provided with
          the system.

          The Digital input selects the optional serial digital adapter
          (dongle) device, if connected.

          Primary and Secondary Digital Video refer to the top and 2nd from
          top connectors on the AV2 card.

          The Output input selects a loopback connection internal to the video
          subsystem.  Anything that is being output to the video output DMA
          channel will be sent back in via the video input DMA channel.  All
          digital output processing is performed as well as input processing.
          The loopback is routed before encountering any analog circuitry.  To
          loopback the analog signal, an external cable must be used.


     Input Timing
          Each of the video input ports has a menu to select its default
          timing.  The O2 Video System is a 4:3 (Non-square) aspect ratio.
          The "Square" timings enable a non-square to square filter to capture
          the incoming 4:3 aspect pixels and convert them to a 1:1 aspect
          ratio suitable for processing and/or displaying with a 1:1 aspect
          ratio graphics system.  Note that this processing (or more correctly
          "interpolation") adversely affects high frequency video response.


     Output Timing
          The output port has a menu to select its default timing.  The Square
          timings enable a square to non-square filter to send outgoing pixels
          that are of a 1:1 aspect ratio to the correct NTSC or PAL aspect
          ratio of 4:3.


     White Balance
          The white balance button causes the camera to automatically
          configure the red and blue balances to achieve an overall even toned
          image.  For best results, hold up a well lit piece of white paper in
          front of the camera and click on white balance, the camera will then
          calibrate itself.



     Selecting the ``Pro'' menus from the Main Level video control panel
     brings up control panels which control various parts of the O2Video
     system.


   Device Controls
     These controls are used to specify the video clock source which can be
     used to drive the O2 system graphics and audio devices.


     Graphics Genlock (Framelock)
          This controls the genlock signal sent to the graphics subsystem. The
          genlock source can be Video output, SVideo/Composite (analog input),
          Digital Video (digital input), Primary or Secondary Digital Video or
          an external genlock input (available on the AV2 Serial Digital Video
          Interface only).

          Note that the systune variable mvpframelock_enable must be set to 1
          for this control to take effect.  See systune(1M) for more details.


     Audio Genlock
          This controls the genlock signal sent to the audio subsystem. The
          genlock source can be None, SVideo/Composite (analog input), Digital
          Video (digital input), Primary or Secondary Digital Video, or an
          external genlock input (available on the AV2 Serial Digital Video
          Interface only).


   SVideo and Composite Controls
     The analog video input controls are used to configure the two standard
     analog video input ports on O2Video.  The main panel allows setting the
     default input timing for each input port.  The rest of the controls are
     located on the SVideo and Composite control panels and are only
     applicable to systems equipped with the AV1 Audio/Video interface.

     Note that these panels are duplicates of each other since they are
     controlling the same analog decoder, though some controls may be
     applicable to only one of the input sources.


     Auto Gain Control
          This toggle engages an automatic gain control circuit before
          digitization which maximizes dynamic range.  When disabled,
          luminance and chrominance can be manually adjusted by the two Gain
          sliders at the bottom of this panel (AV1 only).


     VTR Mode
          This toggle controls the synchronization of the input video signal.
          When enabled, the O2Video analog port attempts to track the input
          signal continuously.  When disabled, the O2Video analog port matches
          the input signal but does not make continual adjustments.  With
          video sources that fluctuate, the VTR lock usually generates a
          clearer picture (AV1 only).


     Disable Chroma Comb Filter
          This engages a comb filter that removes luminance information from
          the bandpassed chrominance signal before demodulation (AV1 only).


     Prefilter
          The Prefilter engages a high frequency boost that can be used for
          edge enhancement, or to compensate for a soft input image (AV1
          only).

     Filter Bypass
          This toggle can be used to bypass the bandpass filter used to
          separate chrominance from luminance in the decoder.  Ordinarily this
          filter is engaged for composite video inputs and disabled for SVideo
          inputs. It may useful to disengage this filter when receiving a
          monochrome composite signal.


     Aperture
          This adjustment affects the horizontal sharpness of the picture (AV1
          only).



                  Vy(dB) Gain Depending on Aperture Setting
                  fy (MHz)   0     0.25    0.5    1.0
                  --------  ---    ----    ---    ---
                    0        3       3      3      3
                    1        3       3      3      3
                    2        3       3      3      3.5
                    3        2.5     3      3.5    4
                    4        2       3      4      5
                    5        1.5     3      4.5    6
                    6        1       3      4      6
                    7        0       2      4      6
                    8       -1       1      2.5    5



     Bandpass
          This adjustment also affects the sharpness of the picture.  The
          bandpass filter can be programmed to different frequencies even when
          the chroma trap is bypassed (AV1 only).


     Chroma Bandwidth
          This selects one of four low-pass filters in the decoder that
          determines chrominance bandwidth (AV1 only).


     Luma Delay
          This controls the relative alignment of luminance to chrominance in
          the digital stream produced by the decoder in 74ns increments (AV1
          only).


     Brightness
          This controls the amplitude of the luminance signal video signal
          produced by the decoder (AV1 only).

     Contrast
          This controls the dynamic range of the luminace signal produced by
          the video decoder (AV1 only).


     Saturation
          This controls the amplitude or "vividness" of the color information
          produced by the decoder (AV1 only).


     Hue  This adjusts the balance between colors in the signal (AV1 only).




   Camera Controls
     These controls affect the behavior of the O2 Digital System Camera, and
     are only present if there is an O2Camera plugged into the O2 Digital
     Video input connector.


     Note that the driver must be reloaded (see "Reload Driver" below) if the
     camera is plugged in or unplugged for the change to be recognized.


     Auto Gain Control
          This toggle button turns on or off the automatic gain control in the
          camera.  When automatic gain control is on, the camera continually
          adjusts itself to changing lighting conditions in order to produce
          an even level of brightness.  When automatic gain control is off, it
          is up to the user or program to set the proper gain level.  If the
          gain is too low, then the picture will appear dark; when the gain is
          too high it will appear white or washed out.


     Camera LED
          This toggle button turns on or off the LED on the Camera.


     Camera Shutter
          This multiple choice control lets you control the shutter speed of
          the camera.  A faster shutter speed lets in less light and may be
          used when the amount of light is too high to be compensated for by
          the gain control.


     Gain This control is used when the automatic gain has been turned off.
          It allows manual adjustment of the camera exposure.

     Red Balance
          The red balance controls the proportion of red in the image.


     Blue Balance
          The blue balance controls the proportion of blue in the image.


     Red Saturation
          The red saturation value affects the overall red color intensity of
          the image.  When red saturation is set to zero, the image will have
          no red color.


     Blue Saturation
          The blue saturation value affects the overall blue color intensity
          of the image.  When blue saturation is set to zero, the image will
          have no blue color.


     Gamma
          The gamma value affects the brightness of dark areas in the image.
          Increasing the gamma value increases the brighness of dark areas.


   Digital Input Controls
     There are no user controls defined for the Digital Video inputs.




   Output Controls
     These controls affect the behavior of the O2Video video ouptut as well as
     the analog video output.  Note that the analog video controls are only
     present when an AV1 video interface card is installed.


     Standard Blanking
          When set off, Vertical Blanking is defined by first active line.
          When set on, Vertical Blanking is forced according to CCIR-624
          (50Hz) or RS-170A (60Hz).  (AV1 only)


     Output Sync
          This selects one of two sources for output video timing, either
          internal or genlock. Internal timing is locked to a crystal inside
          the system that generates video timing and then applies it to the
          video output.  Internal timing should be used when a video stream is
          to be produced by the system independent of an external reference.
          Genlock should be selected when it is desired that output video
          timing reflect the timing selected by the Genlock source select
          menu. (AV1 or AV2)
     Genlock Source
          This selects the source of the genlock signal when Output Sync is
          set to "genlock".  When SVideo/Composite is selected, the
          horizontal, vertical, and subcarrier timing appearing on the analog
          inputs is applied to the analog video output, with the horizontal
          and vertical timing applied to the digital video output. (AV1 or
          AV2)

          When Digital, Primary, Secondary, or External is selected, that
          source's horizontal and vertical timing is applied to both the
          analog and digital video outputs of the machine (and there is no
          subcarrier timing applied to the analog video).

          Obviously the timing of the genlock source device must match the
          timing selected on the Video Output section of the main video panel.
          Also note that the O2Camera can not be used as a genlock source as
          it does not send standard timing.

          When the MVP driver first loads, unless the PROM variables are set
          (see "PROM" below), it will select the genlock source based on the
          what the default source is.  This is because the O2 Video hardware
          selects the "passthru" (pass through) source via the genlock source.
          Therefore, to enable the quiescent state of passing the input to the
          output, the software needs to adjust the genlock source.  In
          addition, the output timing is set to match the default source
          timing.

          If the "Output Sync" or "Genlock Source" is set by the user (either
          from a program or the videopanel), then the automatic "passthru"
          feature is enabled only for the current timing and genlock source
          (NOT the default source). This keeps the selected genlock source
          from being altered, and the output timing changed.

          To re-enable the automatic "passthru" (and thus "deselecting" the
          genlock source), the "Default Signal" (below) must be set to "image"
          [even if it's already set to "image".]  After this control is set,
          "Genlock Source" is once again tracking the "Default Source" (and
          it's timing), whenever the video output channel is not being used by
          a program.

          Passthru mode can also be enabled with the "Output Enable" control.


     Default Signal
          This selects one of three possible default signals for the video
          outputs of the system when no application is driving the video
          output port.  Either Black, Color Bars, or Image can be presented at
          the video outputs.  Image selects the signal present at the "Default
          Source" input of the video system and is referred to as "Passthru"
          mode.  "Black" sends a valid output signal with luma and chroma set
          to minimum.  (AV1 or AV2)

          The Color Bars signal is a synthetic image contained in the
          programmable memory of the analog video encoder and is sent only to
          the analog video output connectors (composite and svideo).  On the
          digital video outputs, "Black" will be sent when "Color Bars" is
          selected.  (AV1 only)

          Note, in addition, the O2 Digital Camera (version 1) can not be used
          as a default source for "Passthru" mode as it's input timing is not
          standard NTSC or PAL.


     Output Enable
          This controls which data is sent to the O2 output video ports. The
          following selections are provided. Note that these only apply to
          output pixel packings that include the alpha channel.  (AV1 or AV2)

                                    Analog    Digital
                    Selection       Output    Output
                    ---------       -------   --------
                    pixels/pixels   pixels    pixels
                    pixels/alpha    pixels    alpha
                    alpha/pixels    alpha     pixels
                    alpha/alpha     alpha     alpha


     Luminance Range
          Normally the Luminance Gain for White-Black is 92.5 IRE (including
          7.5 IRE Setup of Black) for NTSC timing and 100 IRE for PAL timing.
          This control allows the user to independently change this setting
          irregardless of the timing (AV1 only).


     First Unblanked Line Out
          This controls the position of the first active line in the video
          image. The position of first active line can be advanced to allow
          the passage of software encoded vertical information, or can be
          delayed to defeat the premature introduction of setup in blanking,
          in an NTSC image.  Note that "Standard Blanking" must be off for
          this control to take effect and this control only affects the analog
          video output (AV1 only).


     Cb Gain
          This controls the amplitude of the Cb color signal. This is useful
          when adjusting the color produced by the system when used in
          conjunction with a vectorscope (AV1 only).


     Cr Gain
          This controls the amplitude of the Cr color signal (AV1 only).

     Black Level
          This adjusts the blacklevel offset of the analog video output of the
          system.  The standard setting is for 0 offset in PAL and 7.5 IRE in
          NTSC (AV1 only).


     Chroma Phase
          This adjusts the phase of the encoded color subcarrier (including
          burst) relaitve to H Sync (AV1 only).


     Horizontal Genlock Delay
          This adjusts the horizontal delay between the genlock source and the
          video output and is only used when a genlock signal is used and not
          with the internal timing generator.  When this horizontal delay is
          trimmed out, the AV1 board has a one line delay from input to
          output, while the AV2 board, when genlocked to external sync, has no
          such vertical offset.  The Vertical Genlock Delay control can be
          used to adjust the vertical delay component on the AV1 board.  (AV1
          or AV2)



     Vertical Genlock Delay
          This adjusts the vertical trigger phase delay between the genlock
          source and the video output on the analog video of the AV1 board in
          increments of half lines.  (AV1 only)



PRODUCT SPECIFIC ISSUES
     Automatic Active Input Detection
          The O2Video software automatically probes for the active video
          inputs when it is first started.  The order or precedence in
          selecting the default input is:



          Input signal(s) active:

          Digital SVideo  Composite  Camera  Default Source
          ------  ------  ---------  ------  --------------
           yes      x        x        x        digital
           no       yes      x        x        svideo
           no       no       yes      x        composite
           no       no       no       yes      camera
           no       no       no       no       composite



          This allows you, for example, to use the VCR's power button to
          change the default input between it and the O2 Digital System Camera
          when first starting up the O2 System.


     PROM Selection of Timing, Input, Output and Genlock
          In addition to the active input detection, the MVP can be set up to
          select the timing, input, output and genlock at system power on.
          The following PROM variables are used:

              variable: videotiming
              function: selects default timing
              values:   ntsc, pal

              variable: videoinput (*)
              function: selects default input
              values:   composite, svideo, camera, digital,
                     primary, secondary

              variable: videooutput
              function: selects default output
              values:   black, image, colorbars

              variable: videogenlock (*)
              function: selects output genlock
              values:   analog, digital, internal, external,
                     primary, secondary

              variable: videostatus
              function: returns PROM video status
              values:
               inited: video system initialized.

               illegal_env_var: one or more of the
                     above variables were not set correctly.

               av_error: an error occured accessing
                     the A/V interface.
          The variables are set with the PROM "setenv -p" command:

              setenv -p variable value


          (*) Note that the videoinput and videogenlock args should correspond
          with the type of A/V card installed.  In other words, options
          "composite, svideo, camera and digital" are appropriate for the AV1
          card.  Options "primary, secondary, and external" are appropriate
          for the AV2 card.

          The driver will initialize the AV2 interface card, even though the
          PROM does not yet support this interface.  This means that the AV2
          video interface is not initialized at system power on but when the
          the driver is loaded.  An update to the PROM will be available soon
          after IRIX Release 6.5 is available.
     Input Signal Quality
          Input timing and source may be changed while any video application
          is running but also might cause loss of sync and undesired effects.
          This also applies to restoring the factory settings.

          Some VCR's don't produce stable NTSC or PAL signals when some tape
          transport functions are employed.  For example, switching from PLAY
          to FAST FOWARD often results in a disruption of the video sync and
          may cause O2Video to become confused.  The system software attempts
          to restart the video capture but it may not be able to and will then
          return an error to the application.


     Selecting Default Input Source
          The default Input Source control has no effect until a video path is
          created. It is used as a suggestion for applications such as videoin
          to specify the desired input source.


     Reloading the Video Driver
          At times it's desirable to reinitialize the video system without
          having to reboot, for example if the camera is plugged in while the
          system is up.  To accomplish this, the following steps can be taken:

              $ su
              # ml list

          Find the "Character device driver" with the prefix "mvp".  If this
          is not found, then the driver is either not present on the system,
          or it has been made resident with the lboot options specified in
          /var/sysgen/master.d/mvp.  Otherwise, the "Id:" number is used in
          the following command:

              # killall <video applications>
              # ml unld <id>

          If a message states that the device is busy, then there are still
          video applications active on the system.  Using the ps(1) command
          ("ps -ef") may aid in locating what video processes are still
          active.

          After the driver is unloaded, then the next video command will
          reload (and reinitialize) the O2 Video System.


CAVEATS
     The vlGetFrontierMSC(3dm) manpage has the following statement under the
     CAVEATS section:

          For some VL devices, there is a short initial period (up to ten
          field times) in the lifetime of a transfer during which no frontier
          MSC is available.  This period begins when the application calls
          vlBeginTransfer(3dm) and ends when the device clocks in or out its
          first media stream sample from the application's VLBuffer.  An
          attempt to call vlGetFrontierMSC(3dm) during this period will block
          the application until the end of the period, when a valid frontier
          MSC is available.

     Previous to patch2836 (Irix 6.3) and the Irix6.5 version of the MVP
     driver, an attempt to access an "early" Frontier MSC would return an
     unreliable MSC until the video device had actually transferred at least 2
     fields or a frame.  In patch2836 and Irix 6.5, the driver will now
     correctly wait until the Frontier MSC is "valid".  To enable this new
     behaviour, you must set the systune variable mvpearly_frontiermsc to a
     "0".  [See systune(1M) for more details.]  After this is done, some
     applications may seem to hang, or act strangely if they are not
     programmed correctly.


FILES
     /usr/lib/dmedia/video/mvp.so /usr/lib/dmedia/video/defaults/mvp


SEE ALSO
     mvp(3dm), vlintro(3dm), vlinfo(1), videopanel(1), videoin(1),
     videoout(1), vidtomem(1), memtovid(1), mediarecorder(1), moviemaker(1),
     movieplayer(1), and the Phillips 7111 and 7185 Analog Decoder and Encoder
     reference sheets.