Platform Notes: SMCC Frame Buffers
只搜尋這本書
以 PDF 格式下載這本書

XIL Acceleration on the Creator Graphics Accelerator

7

This chapter describes the XIL functions that are specific to the Creator and Creator3D Graphics Accelerators.
XIL is Sun's foundation imaging and video library. Several important XIL functions have been accelerated for the Ultra platforms using the UltraSPARC Visual Instruction Set (VIS) and the Creator Graphics Accelerator.

XIL Data Types

XIL supports a very general image structure and not all types of XIL images are accelerated using VIS and Creator. The XIL data types supported in the VIS port are:
  • 1-, 2-, 3-, and 4-banded unsigned byte images
  • 1-, 2-, 3-, and 4-banded signed short images
  • Band-aligned child images
  • All regions of interest
  • XIL_PIXEL_SEQUENTIAL type images

Accelerated Functions

Table 7-1 shows the XIL functions accelerated using VIS. Note that display molecules are defined for one- and three-banded XIL_BYTE images.
Table 7-1
FunctionVIS Acceleration

8-bit....16-bit

Molecules

Display Other

Comments
xil_absolute
1 - 4 bands


xil_affine1 - 4 bands
x

xil_add1 - 4 bands1 - 4 bandsx

xil_add_constant1 - 4 bands1 - 4 bandsx

xil_and1 - 4 bands1 - 4 bandsx

xil_and_constant1 - 4 bands1 - 4 bandsx

xil_band_combine1 - 4 bands1 - 4 bands


xil_blend1 - 4 bands1 - 4 bands


xil_cast
8 . 16
16 . 8

1 - 4 bands
1 - 4 bands

1 - 4 bands
1 - 4 bands



xil_copy1 - 4 bands1 - 4 bandsx

xil_convolve1 - 4 bands1 - 4 bandsx
See Note 1
xil_decompress



See Note 2, 5
xil_get_pixel

x
See Note 4
xil_lookup1 - 4 bands1 - 4 bandsxxSee Note 5
xil_min1 - 4 bands1 - 4 bandsx

xil_max1 - 4 bands1 - 4 bandsx

xil_multiply1 - 4 bands1 - 4 bandsx

xil_multiply_constant1 - 4 bands1 - 4 bandsx

xil_not1 - 4 bands1 - 4 bandsx

xil_or1 - 4 bands1 - 4 bandsx

xil_or_constant1 - 4 bands1 - 4 bandsx

Table 7-1 (Continued)
FunctionVIS Acceleration

8-bit....16-bit

Molecules

Display Other

Comments
xil_rescale1 - 4 bands
xxSee Note 3, 5
xil_rotate1 - 4 bands
x
See Note 6
xil_scale1 - 4 bands1 - 4 bandsxxSee Note 5, 6
xil_set_pixel

x
See Note 4
xil_set_value1 - 4 bands1 - 4 bandsx

xil_subtract1 - 4 bands1 - 4 bandsx

xil_subtract_const1 - 4 bands1 - 4 bandsx

xil_subtract_from_const1 - 4 bands1 - 4 bandsx

xil_tablewarp

x
See Note 4
xil_threshold1 - 4 bands1 - 4 bandsxxSee Note 3, 5
xil_transpose1 - 4 bands1 - 4 bandsx

xil_xor1 - 4 bands1 - 4 bandsx

xil_xor_const1 - 4 bands1 - 4 bandsx

Notes to Table 7-1

  1. xil_convolve is accelerated for 3 . 3, 5 . 5, and 7 . 7 kernels.

  2. xil_decompress is accelerated for the following cases:

  • xil_decompress + color_convert (JPEG compressed image or sequence and MPEG1 compressed sequence)
  • xil_decompress + color_convert + display (JPEG compressed image or sequence and MPEG1 compressed sequence)
  • xil_decompress + color_convert + scale + display (MPEG1 compressed sequence)
This decoder adheres to full-precision 24-bit CCIR 601 YCC to RGB709 color space conversion.
There are a few instances when decompression of streams will not be accelerated:
  • Decompression of JPEG or MPEG1 streams that are not one contigous buffer in memory is not accelerated. For example, streams split up using xil_cis_put_bits_ptr might not be accelerated.
  • If one frame in a stream is not accelerated for some reason (e.g., the decompressor encountered invalid data in the frame), subsequent frames in the stream will not be accelerated.
  • Acceleration is also disabled if one tries to seek backwards or forwards in a stream.
  1. xil_rescale + xil_threshold + xil_threshold + display molecule is accelerated using the Creator depth-cueing hardware. However, some restrictions apply as follows:

  • The first threshold must have a high value of 255. The low and map values must be equal (any number N between 0 and 255.)
  • The second threshold must have a low value of 0. The high and map values must be equal (any number M between 0 and N).
  • The parameters for xil_rescale must be chosen such that y values of the line represented must span the range of values between N and M while the x values are within 0 and 255. See Figure 7-1.
  • The images must be 1-banded XIL_BYTE images.

圖形

Figure 7-1

The following code is an example of a correct call to invoke this molecule:

  float scale[1] = 1.5;  
  float offset[1] = -10;  
  float t1_lo[1] = 255;  
  float t1_hi[1] = 240;  
  float t1_map[1] = 240;  
  float t2_lo[1] = 0;  
  float t2_hi[1] = 15;  
  float t2_map[1] = 15;  
  xil_rescale(src,tmp1,scale,offset);  
  xil_threshold(tmp1,tmp2,t1_lo,t1_hi,t1_map);  
  xil_threshold(tmp2,tmp3,t2_lo,t2_hi,t2_map);  
  xil_display(tmp3,display);  

However, if the same calling sequence is done with scale[1] = .40, the molecule will not be invoked because the line y = 0.40*x -10 only spans the range y = -10 to y = (255*0.40) - 10 = 92 between x = 0 and x = 255. For the molecule to execute, y must span at least the range y = 15 to y = 240 for x between 0 and 255.
  1. xil_get_pixel, xil_set_pixel, and xil_tablewarp are accelerated only as display molecules. For xil_tablewarp, only interpolation = "nearest" is accelerated.

  2. All of the following molecules (other than a single xil function + display) are accelerated:

  • xil_decompress + xil_colorconvert [+ display] (for JPEG)
  • xil_decompress + xil_colorconvert [+ display] (for MPEG1)
· xil_decompress + xil_colorconvert + xil_scale + display
 (for MPEG1)
· xil_threshold + xil_threshold [+ display] + [xil_cast] +
 display

  • xil_scale + xil_lookup + display (the accelerated molecules are for 8- or 16-bit bilinear scale followed by 8-to-8 bit or 16-to-8 bit lookup)
  • xil_scale + xil_lookup + display (the accelerated molecules are 8 or 16-bit bilenear scale followed by 8-to-8 bit or 16-to-8 bit lookup).
  1. There are some restrictions on the acceleration of xil_affine, xil_scale, and xil_rotate: xil_affine and xil_rotate are accelerated only for 1-, 3-, and 4-banded images with "nearest" interpolation, and only for 1- and

3-banded images with "bilinear" and "bicubic" interpolation. The restriction for xil_scale is that in the case of interpolation = "general" the size of the resampling kernels are limited to 8 . 8 for 8-bit images, and 8 . 4 for 16-bit images.