|
| 以 PDF 格式下載這本書
XilOp Object
A
- This appendix identifies the source images, destination image, and parameters supported by each XIL atomic function. In addition it explains how to extract the images and parameters. You must know this information anytime you implement XIL atomic functions, such as when you write a compute device handler.
- When writing a molecule, you are responsible for retrieving the appropriate XilOp object from the op list in order to access each XilOp object's parameters. For more information on atomic functions and molecules, see the respective sections:
-
Extracting Images and Parameters
- To extract the images and parameters for an XIL atomic function, use the XilOp member functions described below. For more information on the XilOp class, see Chapter 1, "Overview."
Extracting Source Images
- To get source (src) images use the method,
-
-
XilOp::getSrcImage(unsigned int image_number)
- For example, to get the first source image,
-
-
op->getSrcImage(1)
-
Note - image_number starts at 1, not 0.
Extracting Destination Images
- To get the destination (dst) image use the method,
-
-
XilOp::getDstImage(unsigned int image_number)
- Currently, image_number is always 1.
Extracting Parameters
- To get the function parameters, use the method that supports that parameter type. Each method is shown here.
-
XilOp::getParam(unsigned int param_number, int* param);
XilOp::getParam(unsigned int param_number, long long* param);
XilOp::getParam(unsigned int param_number, float* param);
XilOp::getParam(unsigned int param_number, double* param);
XilOp::getParam(unsigned int param_number, void** param);
XilOp::getParam(unsigned int param_number, XilObject** param);
|
- To use the parameter methods, you are required to obtain the parameters in the same format in which they were stored. You must always retrieve pointers as void**. For example, to get a lookup table for xil_lookup() functionality,
-
XilLookupTable* lut
op->getParam(1, (XilObject**) &lut);
|
Source Images, Destination Image, and Parameters
- The table below alphabetically presents the XIL atomic functions and lists the applicable source images, destination image, parameters supported by each, as well as the parameter type for retrieval.
-
XIL Function | Src
1 | Src
2 | Src
3 |
Dst |
Parameters | getParam()
Type |
| absolute | · |
|
| · |
|
|
| add | · | · |
| · |
|
|
| add_const | · |
|
| · | const_array[nbands] 1 Xil_signed8 -1 to 1 8 Xil_signed16 -255 to 255 16 Xil_signed32 -65535 to 65535 f32 float values passed on
| void* |
| affine | · |
|
| · | float matrix[6[
float xoffset
float yoffset
// General Interpolation Only
XilInterpolationTable horiz_tbl
XilInterpolationTable vert_tbl | void*
float
float
XilObject*
XilObject* |
| and | · | · |
| · |
| and_const | · |
|
| · | const_array[nbands] 1 Xil_unsigned8 0 to 1 8 Xil_unsigned8 0 to 255 16 Xil_unsigned16 0 to 32767
| void* |
| black_generation | · |
|
| · | float black
float undercolor | float
float |
| band_combine | · |
|
| · | XilKernel kernel | XilObject* |
| capture | · |
|
| · | In place operation src == dst
src is the controlling image |
|
|
|
| unsigned int bands_written;
unsigned int offset_band; | unsigned int
unsigned int |
| blend | · | · | · | · | Src3 is the alpha image |
-
XIL Function | Src
1 | Src
2 | Src
3 |
Dst |
Parameters | getParam()
Type |
| color_convert | · |
|
| · | XilColorspace src_colorspace
XilColorspace dst_colorspace | XilObject*
XilObject* |
| color_correct | · |
|
| · | XilColorspaceList list | XilObject* |
| compress | · |
|
| · | Dst is an XilCis
int write_frame |
int |
| cast | · |
|
| · |
| convolve | · |
|
| · | XilKernel kernel
XilEdgeCondition edge_condition | XilObject*
void* |
| copy | · |
|
| · |
| copy_pattern | · |
|
| · |
| copy_with_planemask | · |
|
| · | const_array[nbands] 1 unsigned int 0 to 1 8 unsigned int 0 to 255 16 unsigned int 0 to 32767
| void* |
| decompress | · |
|
| · | src1 is an XilCis
int read_frame |
int |
| dilate | · |
|
| · | XilSel sel | XilObject* |
| divide | · | · |
| · |
| display | · |
|
| · | In place operation src == dst
src is the controlling image |
|
|
|
| unsigned int bands_written;
unsigned int offset_band; | unsigned int
unsigned int |
| divide_by_const | · |
|
| · | float const_array[nbamds] | void* |
| divide_into_const | · |
|
| · | const_array[nbands] 1 unsigned int 0 to 1 8 unsigned int 0 to 255 16 unsigned int 0 to 32767 f32 value passed on
| void* |
| edge_detection | · |
|
| · | XilEdgeDetectionType type | void* |
| erode | · |
|
| · | XilSel sel | XilObject* |
-
XIL Function | Src
1 | Src
2 | Src
3 |
Dst |
Parameters | getParam()
Type |
| error_diffusion | · |
|
| · | XilLookup colormap
XilKernel distribution | XilObject*
XilObject* |
| extrema | · |
|
|
| // reportResults parameters
float max[nbands]
float min[nbands] |
void*
void* |
| fill | · |
|
| · | unsigned int xseed
unsigned int yseed | unsigned int
unsigned int |
|
|
|
| boundary[nbands]
fill[nbands]
1 Xil_unsigned8 0 to 1
8 Xil_unsigned8 (rounded)
16 Xil_unsigned16 (rounded)
f32 Xil_float32 | void*
void* |
| histogram | · |
|
|
| XilHistogram histogram unsigned int skip_x unsigned int skip_y | XilObject* unsigned int unsigned int |
|
|
|
| // reportResults parameters unsigned int data[] | void* |
| lookup | · |
|
| · | XilLookup lut | XilObject* |
| max | · |
|
| · |
| min | · |
|
| · |
| multiply | · | · |
| · |
| multiply_const | · |
|
| · | float const_array[nbands] | void* |
| nearest_color | · |
|
| · | XilLookup cmap | XilObject* |
| not | · |
|
| · |
| or | · | · |
| · |
| or_const | · |
|
| · | const_array[nbands] 1 Xil_unsigned8 0 to 1 8 Xil_unsigned8 0 to 255 16 Xil_unsigned16 0 to 32767
| void* |
-
XIL Function | Src
1 | Src
2 | Src
3 |
Dst |
Parameters | getParam()
Type |
| ordered_dither | · |
|
| · | XilLookup colormap
XilDitherMask dithermask | XilObject*
XilObject* |
| paint | · |
|
| · | float color[nbands] XilKernel brush unsigned int count unsigned int points[count] | void* XilObject* unsigned int void* |
| rescale | · |
|
| · | float scale_array[nbands]
float offset_array[nbands] | void*
void* |
| rotate | · |
|
| · | float angle
float src_xoffset
float src_yoffset | float
float
float |
|
|
|
| // General Interpolation only
XilInterpolationTable horiz
XilInterpolationTable vertical |
XilObject*
XilObject* |
| scale | · |
|
| · | float xfactor
float yfactor | float
float |
|
|
|
| // General Interpolation only
XilInterpolationTable horiz
XilInterpolationTable vertical |
XilObject*
XilObject* |
| set_value |
|
|
| · | const_array[nands]
1 Xil_unsigned8 0 to 1
8 Xil_unsigned8
16 Xil_signed16
f32 Xil_float32 | void* |
-
XIL Function | Src
1 | Src
2 | Src
3 |
Dst |
Parameters | getParam()
Type |
| soft_fill | · |
|
| · | unsigned int xseed
unsigned int yseed | unsigned int
unsigned int |
|
|
|
| foreground[nbands]
1 Xil_unsigned8 0 to 1
8 Xil_unsigned8
16 Xil_signed16
f32 Xil_float32 | void* |
|
|
|
| unsigned int num_bgcolor | unsigned int |
|
|
|
| background[num_bgcolor]
1 Xil_unsigned8 0 to 1
8 Xil_unsigned8
16 Xil_signed16
f32 Xil_float32 | void* |
|
|
|
| fill_color[nbands]
1 Xil_unsigned8 0 to 1
8 Xil_unsigned8
16 Xil_signed16
f32 Xil_float32 | void* |
| squeeze_range | · |
|
|
| // reportResults
int imax
int imin
Xil_unsigned8 result_flags[] |
int
int
void* |
subsample_binary_to_
gray | · |
|
| · | float xfactor
float yfactor | float
float |
| subsample_adaptive | · |
|
| · | float xfactor
float yfactor | float
float |
| subtract | · | · |
| · |
| subtract_from_const | · |
|
| · | const_array[nbands] 1 Xil_signed8 0 to 2 8 Xil_signed16 0 to 510 16 Xil_signed32 -65536 to 65534 f32 values passed on
| void* |
-
XIL Function | Src
1 | Src
2 | Src
3 |
Dst |
Parameters | getParam()
Type |
tablewarp
tablewarp_horizontal
tablewarp_vertical | · | · |
| · | Src2 is the warp_table image
unsigned int src_xoffset |
unsigned int |
|
|
|
| unsigned int src_yoffset unsigned int dst_xoffset unsigned int dst_yoffset unsigned int warp_xoffset unsigned int warp_yoffset XilRoi* src_image_roi | unsigned int unsigned int unsigned int unsigned int unsigned int XilObject* |
|
|
|
| // General interpolation only
XilInterpolationTable horiz
XilInterpolationTable vert table |
XilObject*
XilObject* |
| threshold | · |
|
| · | low[nbands]
high[nbands]
map[nbands]
1 Xil_unsigned8 0 to 1
8 Xil_unsigned8 (values rounded)
16 Xil_signed16 (values rounded)
32 Xil_float32 (values passed on) | void*
void*
void* |
| translate | · |
|
| · | float xoffset
float yoffset | float
float |
|
|
|
| // General interpolation only
XilInterpolationTable horiz
XilInterpolationTable vert |
XilObject*
XilObject* |
| transpose | · |
|
| · | XilFlipType fliptype | void* |
| xor | · | · |
| · |
| xor_const | · |
|
| · | const_array[nbands] 1 Xil_unsigned8 0 to 1 8 Xil_unsigned8 0 to 255 16 Xil_unsigned16 0 to 32767
| void* |
|
|