SunVideo Plus for PCI User's Guide

Important Attribute Information


Note -

XIL 1.3 attributes do not support get attribute at this time.


Video Ports, Formats, and Auto Format Detection

The default behavior of the XIL drivers is to auto detect the video format on the selected video port during device image creation. This auto detect sequence can take up to 1.5 seconds to complete. If you know the video format, the video format in the SunVideo Plus control panel can be set from AUTO to the known format (NTSC or PAL). Auto format detection is not performed in this case.

The SunVideo Plus does not currently support having two different video formats (such as NTSC or PAL) on different video ports and switching between them dynamically. When the device image is created in an XIL application, the SunVideo Plus drivers will possibly auto detect the video format on the selected video port. For this reason, it is best to set the desired video port using xil_device_set_value(3) prior to creating the device image if you do have different video formats plugged into the various video input ports. You should also do this if you do not have video plugged into the default video port (port 1).

HW Decompression and CIS Selection

The HW_DECOMPRESS_CIS attribute can be used to selectively set which CIS should use hardware accelerated decompression. An application which is going to be decompressing multiple CIS should set this attribute to -1 before any XIL decompress molecules are performed. This keeps a decompress molecule on a CIS that you do not want to hardware decode from attaching itself to the hardware. Before performing a decompress molecule on the CIS that you do want to use hardware decompression on, set the HW_DECOMPRESS_CIS attribute.

HW Decompression and Creating an XIL Device

When performing hardware based decompression, the SunVideo Plus acts like an XIL compute device in that it is accelerating an XIL molecule. For applications that use decompression only, it is not necessary to create an xil device and device image as described in "Creating a Sample MMACo1k Device Image". The exception to this is when an application wants to set a device specific attribute that affects decompression. There is no method in XIL of setting certain types of attribute on a compute device like the SunVideo Plus, short of opening the device explicitly and then setting the attribute. Thus, to use such attributes, you must create an xil device and image. See "XIL Source Examples" for more information.

If a device and device image are not created directly by an application, the hardware-based SunVideo Plus XIL decompression molecules will do this implicitly. However, the molecules do not currently hunt for a available hardware device to use as an accelerator. They currently attempt to use the first device in a system (/dev/o1k0). Thus, if multiple SunVideo Plus cards are installed in your system, the only current way to use each as a hardware-accelerated decompression device is to explicitly create a device and device image in an application and use a different device name for each device creation. See "XIL Source Examples" for more information.

Using Both HW Compression and HW Decompression

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 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.

The SunVideo Plus Control Panel and XIL Attributes

All of the video related parameters in the SunVideo Plus control panel have XIL attributes that enable an application developer to programmatically change these parameters. These attributes in XIL do not have default values because the default value is the current value set by the control panel. Thus, unless an application explicitly sets a given video attribute, the control panel value is used.

This is a feature of SunVideo Plus. It removes the responsibility of setting video parameters (such as brightness, contrast, and so on) out of an XIL application. Thus, end users can tune these video parameters for their video source once and not have to deal with making the same changes each time they run an XIL application.

Note that the source for both of these XIL attributes and the parameter in the control panel is the same. Therefore, making a change to one of these parameters through an XIL set attribute call will also change the value in the control panel. For example, if an XIL application sets the brightness to a given value and then exits, the next XIL application that is run will use this new brightness setting unless it also sets a new value.