The OpenVX Specification  r31169
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
vx_api.h
1 /*
2  * Copyright (c) 2012-2015 The Khronos Group Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and/or associated documentation files (the
6  * "Materials"), to deal in the Materials without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sublicense, and/or sell copies of the Materials, and to
9  * permit persons to whom the Materials are furnished to do so, subject to
10  * the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included
13  * in all copies or substantial portions of the Materials.
14  *
15  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
22  */
23 
24 #ifndef _OPENVX_API_H_
25 #define _OPENVX_API_H_
26 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /*==============================================================================
37  CONTEXT
38  =============================================================================*/
39 
48 VX_API_ENTRY vx_context VX_API_CALL vxCreateContext();
49 
64 VX_API_ENTRY vx_status VX_API_CALL vxReleaseContext(vx_context *context);
65 
72 VX_API_ENTRY vx_context VX_API_CALL vxGetContext(vx_reference reference);
73 
86 VX_API_ENTRY vx_status VX_API_CALL vxQueryContext(vx_context context, vx_enum attribute, void *ptr, vx_size size);
87 
100 VX_API_ENTRY vx_status VX_API_CALL vxSetContextAttribute(vx_context context, vx_enum attribute, const void *ptr, vx_size size);
101 
112 VX_API_ENTRY vx_status VX_API_CALL vxHint(vx_reference reference, vx_enum hint);
113 
124 VX_API_ENTRY vx_status VX_API_CALL vxDirective(vx_reference reference, vx_enum directive);
125 
144 VX_API_ENTRY vx_status VX_API_CALL vxGetStatus(vx_reference reference);
145 
160 VX_API_ENTRY vx_enum VX_API_CALL vxRegisterUserStruct(vx_context context, vx_size size);
161 
162 /*==============================================================================
163  IMAGE
164  =============================================================================*/
165 
177 VX_API_ENTRY vx_image VX_API_CALL vxCreateImage(vx_context context, vx_uint32 width, vx_uint32 height, vx_df_image color);
178 
190 VX_API_ENTRY vx_image VX_API_CALL vxCreateImageFromROI(vx_image img, const vx_rectangle_t *rect);
191 
219 VX_API_ENTRY vx_image VX_API_CALL vxCreateUniformImage(vx_context context, vx_uint32 width, vx_uint32 height, vx_df_image color, const void *value);
220 
250 VX_API_ENTRY vx_image VX_API_CALL vxCreateVirtualImage(vx_graph graph, vx_uint32 width, vx_uint32 height, vx_df_image color);
251 
269 VX_API_ENTRY vx_image VX_API_CALL vxCreateImageFromHandle(vx_context context, vx_df_image color, vx_imagepatch_addressing_t addrs[], void *ptrs[], vx_enum import_type);
270 
283 VX_API_ENTRY vx_status VX_API_CALL vxQueryImage(vx_image image, vx_enum attribute, void *ptr, vx_size size);
284 
296 VX_API_ENTRY vx_status VX_API_CALL vxSetImageAttribute(vx_image image, vx_enum attribute, const void *ptr, vx_size size);
297 
307 VX_API_ENTRY vx_status VX_API_CALL vxReleaseImage(vx_image *image);
308 
317 VX_API_ENTRY vx_size VX_API_CALL vxComputeImagePatchSize(vx_image image,
318  const vx_rectangle_t *rect,
319  vx_uint32 plane_index);
320 
371 VX_API_ENTRY vx_status VX_API_CALL vxAccessImagePatch(vx_image image,
372  const vx_rectangle_t *rect,
373  vx_uint32 plane_index,
375  void **ptr,
376  vx_enum usage);
377 
403 VX_API_ENTRY vx_status VX_API_CALL vxCommitImagePatch(vx_image image,
404  vx_rectangle_t *rect,
405  vx_uint32 plane_index,
407  const void *ptr);
408 
419 VX_API_ENTRY void * VX_API_CALL vxFormatImagePatchAddress1d(void *ptr, vx_uint32 index, const vx_imagepatch_addressing_t *addr);
420 
432 VX_API_ENTRY void * VX_API_CALL vxFormatImagePatchAddress2d(void *ptr, vx_uint32 x, vx_uint32 y, const vx_imagepatch_addressing_t *addr);
433 
452 VX_API_ENTRY vx_status VX_API_CALL vxGetValidRegionImage(vx_image image, vx_rectangle_t *rect);
453 
454 /*==============================================================================
455  KERNEL
456  =============================================================================*/
457 
477 VX_API_ENTRY vx_status VX_API_CALL vxLoadKernels(vx_context context, const vx_char *module);
478 
575 VX_API_ENTRY vx_kernel VX_API_CALL vxGetKernelByName(vx_context context, const vx_char *name);
576 
588 VX_API_ENTRY vx_kernel VX_API_CALL vxGetKernelByEnum(vx_context context, vx_enum kernel);
589 
603 VX_API_ENTRY vx_status VX_API_CALL vxQueryKernel(vx_kernel kernel, vx_enum attribute, void *ptr, vx_size size);
604 
614 VX_API_ENTRY vx_status VX_API_CALL vxReleaseKernel(vx_kernel *kernel);
615 
635 VX_API_ENTRY vx_kernel VX_API_CALL vxAddKernel(vx_context context,
636  const vx_char name[VX_MAX_KERNEL_NAME],
637  vx_enum enumeration,
638  vx_kernel_f func_ptr,
639  vx_uint32 numParams,
643  vx_kernel_deinitialize_f deinit);
644 
655 VX_API_ENTRY vx_status VX_API_CALL vxFinalizeKernel(vx_kernel kernel);
656 
670 VX_API_ENTRY vx_status VX_API_CALL vxAddParameterToKernel(vx_kernel kernel, vx_uint32 index, vx_enum dir, vx_enum data_type, vx_enum state);
671 
683 VX_API_ENTRY vx_status VX_API_CALL vxRemoveKernel(vx_kernel kernel);
684 
695 VX_API_ENTRY vx_status VX_API_CALL vxSetKernelAttribute(vx_kernel kernel, vx_enum attribute, const void *ptr, vx_size size);
696 
705 VX_API_ENTRY vx_parameter VX_API_CALL vxGetKernelParameterByIndex(vx_kernel kernel, vx_uint32 index);
706 
707 /*==============================================================================
708  GRAPH
709  =============================================================================*/
710 
717 VX_API_ENTRY vx_graph VX_API_CALL vxCreateGraph(vx_context context);
718 
731 VX_API_ENTRY vx_status VX_API_CALL vxReleaseGraph(vx_graph *graph);
732 
756 VX_API_ENTRY vx_status VX_API_CALL vxVerifyGraph(vx_graph graph);
757 
774 VX_API_ENTRY vx_status VX_API_CALL vxProcessGraph(vx_graph graph);
775 
786 VX_API_ENTRY vx_status VX_API_CALL vxScheduleGraph(vx_graph graph);
787 
801 VX_API_ENTRY vx_status VX_API_CALL vxWaitGraph(vx_graph graph);
802 
811 VX_API_ENTRY vx_status VX_API_CALL vxQueryGraph(vx_graph graph, vx_enum attribute, void *ptr, vx_size size);
812 
821 VX_API_ENTRY vx_status VX_API_CALL vxSetGraphAttribute(vx_graph graph, vx_enum attribute, const void *ptr, vx_size size);
822 
833 VX_API_ENTRY vx_status VX_API_CALL vxAddParameterToGraph(vx_graph graph, vx_parameter parameter);
834 
847 VX_API_ENTRY vx_status VX_API_CALL vxSetGraphParameterByIndex(vx_graph graph, vx_uint32 index, vx_reference value);
848 
857 VX_API_ENTRY vx_parameter VX_API_CALL vxGetGraphParameterByIndex(vx_graph graph, vx_uint32 index);
858 
868 VX_API_ENTRY vx_bool VX_API_CALL vxIsGraphVerified(vx_graph graph);
869 
870 /*==============================================================================
871  NODE
872  =============================================================================*/
873 
886 VX_API_ENTRY vx_node VX_API_CALL vxCreateGenericNode(vx_graph graph, vx_kernel kernel);
887 
898 VX_API_ENTRY vx_status VX_API_CALL vxQueryNode(vx_node node, vx_enum attribute, void *ptr, vx_size size);
899 
914 VX_API_ENTRY vx_status VX_API_CALL vxSetNodeAttribute(vx_node node, vx_enum attribute, const void *ptr, vx_size size);
915 
925 VX_API_ENTRY vx_status VX_API_CALL vxReleaseNode(vx_node *node);
926 
935 VX_API_ENTRY vx_status VX_API_CALL vxRemoveNode(vx_node *node);
936 
950 VX_API_ENTRY vx_status VX_API_CALL vxAssignNodeCallback(vx_node node, vx_nodecomplete_f callback);
951 
959 VX_API_ENTRY vx_nodecomplete_f VX_API_CALL vxRetrieveNodeCallback(vx_node node);
960 
961 /*==============================================================================
962  PARAMETER
963  =============================================================================*/
964 
971 VX_API_ENTRY vx_parameter VX_API_CALL vxGetParameterByIndex(vx_node node, vx_uint32 index);
972 
982 VX_API_ENTRY vx_status VX_API_CALL vxReleaseParameter(vx_parameter *param);
983 
992 VX_API_ENTRY vx_status VX_API_CALL vxSetParameterByIndex(vx_node node, vx_uint32 index, vx_reference value);
993 
1002 VX_API_ENTRY vx_status VX_API_CALL vxSetParameterByReference(vx_parameter parameter, vx_reference value);
1003 
1012 VX_API_ENTRY vx_status VX_API_CALL vxQueryParameter(vx_parameter param, vx_enum attribute, void *ptr, vx_size size);
1013 
1014 /*==============================================================================
1015  SCALAR
1016  =============================================================================*/
1017 
1027 VX_API_ENTRY vx_scalar VX_API_CALL vxCreateScalar(vx_context context, vx_enum data_type, const void *ptr);
1028 
1038 VX_API_ENTRY vx_status VX_API_CALL vxReleaseScalar(vx_scalar *scalar);
1039 
1048 VX_API_ENTRY vx_status VX_API_CALL vxQueryScalar(vx_scalar scalar, vx_enum attribute, void *ptr, vx_size size);
1049 
1063 VX_API_ENTRY vx_status VX_API_CALL vxReadScalarValue(vx_scalar ref, void *ptr);
1064 
1078 VX_API_ENTRY vx_status VX_API_CALL vxWriteScalarValue(vx_scalar ref, const void *ptr);
1079 
1080 /*==============================================================================
1081  REFERENCE
1082  =============================================================================*/
1083 
1092 VX_API_ENTRY vx_status VX_API_CALL vxQueryReference(vx_reference ref, vx_enum attribute, void *ptr, vx_size size);
1093 
1094 /*==============================================================================
1095  DELAY
1096  =============================================================================*/
1097 
1106 VX_API_ENTRY vx_status VX_API_CALL vxQueryDelay(vx_delay delay, vx_enum attribute, void *ptr, vx_size size);
1107 
1117 VX_API_ENTRY vx_status VX_API_CALL vxReleaseDelay(vx_delay *delay);
1118 
1132 VX_API_ENTRY vx_delay VX_API_CALL vxCreateDelay(vx_context context,
1133  vx_reference exemplar,
1134  vx_size slots);
1135 
1147 VX_API_ENTRY vx_reference VX_API_CALL vxGetReferenceFromDelay(vx_delay delay, vx_int32 index);
1148 
1159 VX_API_ENTRY vx_status VX_API_CALL vxAgeDelay(vx_delay delay);
1160 
1161 
1162 /*==============================================================================
1163  LOGGING
1164  =============================================================================*/
1165 
1174 VX_API_ENTRY void VX_API_CALL vxAddLogEntry(vx_reference ref, vx_status status, const char *message, ...);
1175 
1183 VX_API_ENTRY void VX_API_CALL vxRegisterLogCallback(vx_context context, vx_log_callback_f callback, vx_bool reentrant);
1184 
1185 /*==============================================================================
1186  LUT
1187  =============================================================================*/
1188 
1200 VX_API_ENTRY vx_lut VX_API_CALL vxCreateLUT(vx_context context, vx_enum data_type, vx_size count);
1201 
1211 VX_API_ENTRY vx_status VX_API_CALL vxReleaseLUT(vx_lut *lut);
1212 
1221 VX_API_ENTRY vx_status VX_API_CALL vxQueryLUT(vx_lut lut, vx_enum attribute, void *ptr, vx_size size);
1222 
1248 VX_API_ENTRY vx_status VX_API_CALL vxAccessLUT(vx_lut lut, void **ptr, vx_enum usage);
1249 
1263 VX_API_ENTRY vx_status VX_API_CALL vxCommitLUT(vx_lut lut, const void *ptr);
1264 
1265 /*==============================================================================
1266  DISTRIBUTION
1267  =============================================================================*/
1268 
1279 VX_API_ENTRY vx_distribution VX_API_CALL vxCreateDistribution(vx_context context, vx_size numBins, vx_int32 offset, vx_uint32 range);
1280 
1290 VX_API_ENTRY vx_status VX_API_CALL vxReleaseDistribution(vx_distribution *distribution);
1291 
1300 VX_API_ENTRY vx_status VX_API_CALL vxQueryDistribution(vx_distribution distribution, vx_enum attribute, void *ptr, vx_size size);
1301 
1317 VX_API_ENTRY vx_status VX_API_CALL vxAccessDistribution(vx_distribution distribution, void **ptr, vx_enum usage);
1318 
1329 VX_API_ENTRY vx_status VX_API_CALL vxCommitDistribution(vx_distribution distribution, const void * ptr);
1330 
1331 /*==============================================================================
1332  THRESHOLD
1333  =============================================================================*/
1334 
1346 VX_API_ENTRY vx_threshold VX_API_CALL vxCreateThreshold(vx_context c, vx_enum thresh_type, vx_enum data_type);
1347 
1357 VX_API_ENTRY vx_status VX_API_CALL vxReleaseThreshold(vx_threshold *thresh);
1358 
1367 VX_API_ENTRY vx_status VX_API_CALL vxSetThresholdAttribute(vx_threshold thresh, vx_enum attribute, const void *ptr, vx_size size);
1368 
1377 VX_API_ENTRY vx_status VX_API_CALL vxQueryThreshold(vx_threshold thresh, vx_enum attribute, void *ptr, vx_size size);
1378 
1379 /*==============================================================================
1380  MATRIX
1381  =============================================================================*/
1382 
1392 VX_API_ENTRY vx_matrix VX_API_CALL vxCreateMatrix(vx_context c, vx_enum data_type, vx_size columns, vx_size rows);
1393 
1403 VX_API_ENTRY vx_status VX_API_CALL vxReleaseMatrix(vx_matrix *mat);
1404 
1413 VX_API_ENTRY vx_status VX_API_CALL vxQueryMatrix(vx_matrix mat, vx_enum attribute, void *ptr, vx_size size);
1414 
1423 VX_API_ENTRY vx_status VX_API_CALL vxReadMatrix(vx_matrix mat, void *array);
1424 
1433 VX_API_ENTRY vx_status VX_API_CALL vxWriteMatrix(vx_matrix mat, const void *array);
1434 
1435 /*==============================================================================
1436  CONVOLUTION
1437  =============================================================================*/
1438 
1451 VX_API_ENTRY vx_convolution VX_API_CALL vxCreateConvolution(vx_context context, vx_size columns, vx_size rows);
1452 
1462 VX_API_ENTRY vx_status VX_API_CALL vxReleaseConvolution(vx_convolution *conv);
1463 
1472 VX_API_ENTRY vx_status VX_API_CALL vxQueryConvolution(vx_convolution conv, vx_enum attribute, void *ptr, vx_size size);
1473 
1482 VX_API_ENTRY vx_status VX_API_CALL vxSetConvolutionAttribute(vx_convolution conv, vx_enum attribute, const void *ptr, vx_size size);
1483 
1492 VX_API_ENTRY vx_status VX_API_CALL vxReadConvolutionCoefficients(vx_convolution conv, vx_int16 *array);
1493 
1502 VX_API_ENTRY vx_status VX_API_CALL vxWriteConvolutionCoefficients(vx_convolution conv, const vx_int16 *array);
1503 
1504 /*==============================================================================
1505  PYRAMID
1506  =============================================================================*/
1507 
1522 VX_API_ENTRY vx_pyramid VX_API_CALL vxCreatePyramid(vx_context context, vx_size levels, vx_float32 scale, vx_uint32 width, vx_uint32 height, vx_df_image format);
1523 
1552 VX_API_ENTRY vx_pyramid VX_API_CALL vxCreateVirtualPyramid(vx_graph graph, vx_size levels, vx_float32 scale, vx_uint32 width, vx_uint32 height, vx_df_image format);
1553 
1554 
1564 VX_API_ENTRY vx_status VX_API_CALL vxReleasePyramid(vx_pyramid *pyr);
1565 
1574 VX_API_ENTRY vx_status VX_API_CALL vxQueryPyramid(vx_pyramid pyr, vx_enum attribute, void *ptr, vx_size size);
1575 
1585 VX_API_ENTRY vx_image VX_API_CALL vxGetPyramidLevel(vx_pyramid pyr, vx_uint32 index);
1586 
1587 /*==============================================================================
1588  REMAP
1589  =============================================================================*/
1590 
1601 VX_API_ENTRY vx_remap VX_API_CALL vxCreateRemap(vx_context context,
1602  vx_uint32 src_width,
1603  vx_uint32 src_height,
1604  vx_uint32 dst_width,
1605  vx_uint32 dst_height);
1606 
1616 VX_API_ENTRY vx_status VX_API_CALL vxReleaseRemap(vx_remap *table);
1617 
1627 VX_API_ENTRY vx_status VX_API_CALL vxSetRemapPoint(vx_remap table,
1628  vx_uint32 dst_x, vx_uint32 dst_y,
1629  vx_float32 src_x, vx_float32 src_y);
1630 
1640 VX_API_ENTRY vx_status VX_API_CALL vxGetRemapPoint(vx_remap table,
1641  vx_uint32 dst_x, vx_uint32 dst_y,
1642  vx_float32 *src_x, vx_float32 *src_y);
1643 
1652 VX_API_ENTRY vx_status VX_API_CALL vxQueryRemap(vx_remap r, vx_enum attribute, void *ptr, vx_size size);
1653 
1654 /*==============================================================================
1655  ARRAY
1656  =============================================================================*/
1657 
1677 VX_API_ENTRY vx_array VX_API_CALL vxCreateArray(vx_context context, vx_enum item_type, vx_size capacity);
1678 
1707 VX_API_ENTRY vx_array VX_API_CALL vxCreateVirtualArray(vx_graph graph, vx_enum item_type, vx_size capacity);
1708 
1719 VX_API_ENTRY vx_status VX_API_CALL vxReleaseArray(vx_array *arr);
1720 
1737 VX_API_ENTRY vx_status VX_API_CALL vxQueryArray(vx_array arr, vx_enum attribute, void *ptr, vx_size size);
1738 
1762 VX_API_ENTRY vx_status VX_API_CALL vxAddArrayItems(vx_array arr, vx_size count, const void *ptr, vx_size stride);
1763 
1777 VX_API_ENTRY vx_status VX_API_CALL vxTruncateArray(vx_array arr, vx_size new_num_items);
1778 
1817 VX_API_ENTRY vx_status VX_API_CALL vxAccessArrayRange(vx_array arr, vx_size start, vx_size end, vx_size *stride, void **ptr, vx_enum usage);
1818 
1837 VX_API_ENTRY vx_status VX_API_CALL vxCommitArrayRange(vx_array arr, vx_size start, vx_size end, const void *ptr);
1838 
1846 #define vxFormatArrayPointer(ptr, index, stride) \
1847  (&(((vx_uint8*)(ptr))[(index) * (stride)]))
1848 
1857 #define vxArrayItem(type, ptr, index, stride) \
1858  (*(type *)(vxFormatArrayPointer((ptr), (index), (stride))))
1859 
1860 /*==============================================================================
1861  META FORMAT
1862  =============================================================================*/
1863 
1894 VX_API_ENTRY vx_status VX_API_CALL vxSetMetaFormatAttribute(vx_meta_format meta, vx_enum attribute, const void *ptr, vx_size size);
1895 
1896 
1897 #ifdef __cplusplus
1898 }
1899 #endif
1900 
1901 #endif
1902 
struct _vx_image * vx_image
An opaque reference to an image.
Definition: vx_types.h:166
vx_status VX_API_CALL vxReleaseArray(vx_array *arr)
Releases a reference of an Array object. The object may not be garbage collected until its total refe...
struct _vx_delay * vx_delay
The delay object. This is like a ring buffer of objects that is maintained by the OpenVX implementati...
Definition: vx_types.h:210
vx_bool
A Boolean value. This allows 0 to be FALSE, as it is in C, and any non-zero to be TRUE...
Definition: vx_types.h:272
void(* vx_log_callback_f)(vx_context context, vx_reference ref, vx_status status, const vx_char string[])
The log callback function.
Definition: vx_types.h:1444
vx_status VX_API_CALL vxGetRemapPoint(vx_remap table, vx_uint32 dst_x, vx_uint32 dst_y, vx_float32 *src_x, vx_float32 *src_y)
Retrieves the source pixel point from a destination pixel.
vx_threshold VX_API_CALL vxCreateThreshold(vx_context c, vx_enum thresh_type, vx_enum data_type)
Creates a reference to a threshold object of a given type.
vx_nodecomplete_f VX_API_CALL vxRetrieveNodeCallback(vx_node node)
Retrieves the current node callback function pointer set on the node.
vx_status VX_API_CALL vxQueryImage(vx_image image, vx_enum attribute, void *ptr, vx_size size)
Retrieves various attributes of an image.
vx_status VX_API_CALL vxAddParameterToGraph(vx_graph graph, vx_parameter parameter)
Adds the given parameter extracted from a vx_node to the graph.
vx_scalar VX_API_CALL vxCreateScalar(vx_context context, vx_enum data_type, const void *ptr)
Creates a reference to a scalar object. Also see Node Parameters.
vx_status VX_API_CALL vxWriteMatrix(vx_matrix mat, const void *array)
Sets the matrix data (copy)
vx_status VX_API_CALL vxSetGraphAttribute(vx_graph graph, vx_enum attribute, const void *ptr, vx_size size)
Allows the set to attributes on the Graph.
vx_status VX_API_CALL vxQueryConvolution(vx_convolution conv, vx_enum attribute, void *ptr, vx_size size)
Queries an attribute on the convolution matrix object.
vx_status(* vx_kernel_f)(vx_node node, const vx_reference *parameters, vx_uint32 num)
The pointer to the Host side kernel.
Definition: vx_types.h:1198
vx_node VX_API_CALL vxCreateGenericNode(vx_graph graph, vx_kernel kernel)
Creates a reference to a node object for a given kernel.
struct _vx_array * vx_array
The Array Object. Array is a strongly-typed container for other data structures.
Definition: vx_types.h:259
vx_kernel VX_API_CALL vxAddKernel(vx_context context, const vx_char name[VX_MAX_KERNEL_NAME], vx_enum enumeration, vx_kernel_f func_ptr, vx_uint32 numParams, vx_kernel_input_validate_f input, vx_kernel_output_validate_f output, vx_kernel_initialize_f init, vx_kernel_deinitialize_f deinit)
Allows users to add custom kernels to the known kernel database in OpenVX at run-time. This would primarily be used by the module function vxPublishKernels.
vx_status VX_API_CALL vxQueryDelay(vx_delay delay, vx_enum attribute, void *ptr, vx_size size)
Queries a vx_delay object attribute.
vx_status VX_API_CALL vxReleaseDistribution(vx_distribution *distribution)
Releases a reference to a distribution object. The object may not be garbage collected until its tota...
vx_kernel VX_API_CALL vxGetKernelByEnum(vx_context context, vx_enum kernel)
Obtains a reference to the kernel using the vx_kernel_e enumeration.
int16_t vx_int16
A 16-bit signed value.
Definition: vx_types.h:95
size_t vx_size
A wrapper of size_t to keep the naming convention uniform.
Definition: vx_types.h:146
vx_status VX_API_CALL vxSetNodeAttribute(vx_node node, vx_enum attribute, const void *ptr, vx_size size)
Allows a user to set attribute of a node before Graph Validation.
vx_parameter VX_API_CALL vxGetGraphParameterByIndex(vx_graph graph, vx_uint32 index)
Retrieves a vx_parameter from a vx_graph.
vx_status VX_API_CALL vxReleaseDelay(vx_delay *delay)
Releases a reference to a delay object. The object may not be garbage collected until its total refer...
vx_pyramid VX_API_CALL vxCreatePyramid(vx_context context, vx_size levels, vx_float32 scale, vx_uint32 width, vx_uint32 height, vx_df_image format)
Creates a reference to a pyramid object of the supplied number of levels.
vx_status VX_API_CALL vxSetImageAttribute(vx_image image, vx_enum attribute, const void *ptr, vx_size size)
Allows setting attributes on the image.
vx_kernel VX_API_CALL vxGetKernelByName(vx_context context, const vx_char *name)
Obtains a reference to a kernel using a string to specify the name.
int32_t vx_enum
Sets the standard enumeration type size to be a fixed quantity.
Definition: vx_types.h:141
struct _vx_threshold * vx_threshold
The Threshold Object. A thresholding object contains the types and limit values of the thresholding r...
Definition: vx_types.h:242
struct _vx_distribution * vx_distribution
The Distribution object. This has a user-defined number of bins over a user-defined range (within a u...
Definition: vx_types.h:223
vx_status VX_API_CALL vxAccessArrayRange(vx_array arr, vx_size start, vx_size end, vx_size *stride, void **ptr, vx_enum usage)
Grants access to a sub-range of an Array. The number of elements in the sub-range is given by (end - ...
vx_reference VX_API_CALL vxGetReferenceFromDelay(vx_delay delay, vx_int32 index)
Retrieves a reference from a delay object.
vx_status VX_API_CALL vxQueryMatrix(vx_matrix mat, vx_enum attribute, void *ptr, vx_size size)
Queries an attribute on the matrix object.
vx_status VX_API_CALL vxQueryGraph(vx_graph graph, vx_enum attribute, void *ptr, vx_size size)
Allows the user to query attributes of the Graph.
vx_status VX_API_CALL vxReleaseScalar(vx_scalar *scalar)
Releases a reference to a scalar object. The object may not be garbage collected until its total refe...
struct _vx_parameter * vx_parameter
An opaque reference to a single parameter.
Definition: vx_types.h:181
int32_t vx_int32
A 32-bit signed value.
Definition: vx_types.h:100
vx_status VX_API_CALL vxReleaseLUT(vx_lut *lut)
Releases a reference to a LUT object. The object may not be garbage collected until its total referen...
The addressing image patch structure is used by the Host only to address pixels in an image patch...
Definition: vx_types.h:1309
vx_status VX_API_CALL vxSetConvolutionAttribute(vx_convolution conv, vx_enum attribute, const void *ptr, vx_size size)
Sets attributes on the convolution object.
vx_status VX_API_CALL vxAccessLUT(vx_lut lut, void **ptr, vx_enum usage)
Grants access to a LUT table and increments the object reference count in case of success...
vx_image VX_API_CALL vxCreateImageFromHandle(vx_context context, vx_df_image color, vx_imagepatch_addressing_t addrs[], void *ptrs[], vx_enum import_type)
Creates a reference to an image object that was externally allocated.
vx_status VX_API_CALL vxQueryReference(vx_reference ref, vx_enum attribute, void *ptr, vx_size size)
Queries any reference type for some basic information (count, type).
vx_status(* vx_kernel_deinitialize_f)(vx_node node, const vx_reference *parameters, vx_uint32 num)
The pointer to the kernel deinitializer. If the host code requires a call to deinitialize data during...
Definition: vx_types.h:1220
vx_status VX_API_CALL vxProcessGraph(vx_graph graph)
This function causes the synchronous processing of a graph. If the graph has not been verified...
vx_size VX_API_CALL vxComputeImagePatchSize(vx_image image, const vx_rectangle_t *rect, vx_uint32 plane_index)
This computes the size needed to retrieve an image patch from an image.
char vx_char
An 8 bit ASCII character.
Definition: vx_types.h:65
vx_bool VX_API_CALL vxIsGraphVerified(vx_graph graph)
Returns a Boolean to indicate the state of graph verification.
float vx_float32
A 32-bit float value.
Definition: vx_types.h:118
vx_status VX_API_CALL vxReleaseContext(vx_context *context)
Releases the OpenVX object context.
vx_status VX_API_CALL vxReadMatrix(vx_matrix mat, void *array)
Gets the matrix data (copy).
vx_pyramid VX_API_CALL vxCreateVirtualPyramid(vx_graph graph, vx_size levels, vx_float32 scale, vx_uint32 width, vx_uint32 height, vx_df_image format)
Creates a reference to a virtual pyramid object of the supplied number of levels. ...
vx_enum vx_status
A formal status type with known fixed size.
Definition: vx_types.h:401
vx_status VX_API_CALL vxQueryRemap(vx_remap r, vx_enum attribute, void *ptr, vx_size size)
Queries attributes from a Remap table.
vx_status VX_API_CALL vxRemoveKernel(vx_kernel kernel)
Removes a non-finalized vx_kernel from the vx_context and releases it. Once a vx_kernel has been fina...
vx_status VX_API_CALL vxQueryScalar(vx_scalar scalar, vx_enum attribute, void *ptr, vx_size size)
Queries attributes from a scalar.
struct _vx_context * vx_context
An opaque reference to the implementation context.
Definition: vx_types.h:202
struct _vx_meta_format * vx_meta_format
This object is used by output validation functions to specify the meta data of the expected output da...
Definition: vx_types.h:289
vx_status VX_API_CALL vxSetKernelAttribute(vx_kernel kernel, vx_enum attribute, const void *ptr, vx_size size)
Sets kernel attributes.
vx_status VX_API_CALL vxQueryThreshold(vx_threshold thresh, vx_enum attribute, void *ptr, vx_size size)
Queries an attribute on the threshold object.
vx_array VX_API_CALL vxCreateVirtualArray(vx_graph graph, vx_enum item_type, vx_size capacity)
Creates an opaque reference to a virtual Array with no direct user access.
vx_status VX_API_CALL vxCommitImagePatch(vx_image image, vx_rectangle_t *rect, vx_uint32 plane_index, vx_imagepatch_addressing_t *addr, const void *ptr)
This allows the User to commit a rectangular patch (subset) of an image from a single plane...
struct _vx_reference * vx_reference
A generic opaque reference to any object within OpenVX.
Definition: vx_types.h:134
vx_parameter VX_API_CALL vxGetKernelParameterByIndex(vx_kernel kernel, vx_uint32 index)
Retrieves a vx_parameter from a vx_kernel.
vx_status VX_API_CALL vxQueryContext(vx_context context, vx_enum attribute, void *ptr, vx_size size)
Queries the context for some specific information.
uint32_t vx_df_image
Used to hold a VX_DF_IMAGE code to describe the pixel format and color space.
Definition: vx_types.h:151
vx_status VX_API_CALL vxQueryDistribution(vx_distribution distribution, vx_enum attribute, void *ptr, vx_size size)
Queries a Distribution object.
vx_convolution VX_API_CALL vxCreateConvolution(vx_context context, vx_size columns, vx_size rows)
Creates a reference to a convolution matrix object.
vx_image VX_API_CALL vxCreateImage(vx_context context, vx_uint32 width, vx_uint32 height, vx_df_image color)
Creates an opaque reference to an image buffer.
vx_status VX_API_CALL vxTruncateArray(vx_array arr, vx_size new_num_items)
Truncates an Array (remove items from the end).
vx_enum VX_API_CALL vxRegisterUserStruct(vx_context context, vx_size size)
Registers user-defined structures to the context.
vx_status VX_API_CALL vxAgeDelay(vx_delay delay)
Ages the internal delay ring by one. This means that once this API is called the reference from index...
vx_image VX_API_CALL vxCreateUniformImage(vx_context context, vx_uint32 width, vx_uint32 height, vx_df_image color, const void *value)
Creates a reference to an image object that has a singular, uniform value in all pixels.
vx_status VX_API_CALL vxWaitGraph(vx_graph graph)
Waits for a specific graph to complete. If the graph has been scheduled multiple times since the last...
vx_status VX_API_CALL vxCommitDistribution(vx_distribution distribution, const void *ptr)
Commits the distribution objec> and decrements the object reference count in case of success...
vx_status VX_API_CALL vxAccessDistribution(vx_distribution distribution, void **ptr, vx_enum usage)
Grants access to a distribution object and increments the object reference count in case of success...
vx_status VX_API_CALL vxReadConvolutionCoefficients(vx_convolution conv, vx_int16 *array)
Gets the convolution data (copy).
vx_status VX_API_CALL vxReleaseGraph(vx_graph *graph)
Releases a reference to a graph. The object may not be garbage collected until its total reference co...
vx_status VX_API_CALL vxHint(vx_reference reference, vx_enum hint)
Provides a generic API to give platform-specific hints to the implementation.
vx_status(* vx_kernel_initialize_f)(vx_node node, const vx_reference *parameters, vx_uint32 num)
The pointer to the kernel initializer. If the host code requires a call to initialize data once all t...
Definition: vx_types.h:1209
struct _vx_pyramid * vx_pyramid
The Image Pyramid object. A set of scaled images.
Definition: vx_types.h:235
vx_status VX_API_CALL vxQueryParameter(vx_parameter param, vx_enum attribute, void *ptr, vx_size size)
Allows the client to query a parameter to determine its meta-information.
vx_status VX_API_CALL vxWriteConvolutionCoefficients(vx_convolution conv, const vx_int16 *array)
Sets the convolution data (copy)
struct _vx_kernel * vx_kernel
An opaque reference to the descriptor of a kernel.
Definition: vx_types.h:174
vx_status VX_API_CALL vxQueryArray(vx_array arr, vx_enum attribute, void *ptr, vx_size size)
Queries the Array for some specific information.
void VX_API_CALL vxAddLogEntry(vx_reference ref, vx_status status, const char *message,...)
Adds a line to the log.
void VX_API_CALL vxRegisterLogCallback(vx_context context, vx_log_callback_f callback, vx_bool reentrant)
Registers a callback facility to the OpenVX implementation to receive error logs. ...
vx_parameter VX_API_CALL vxGetParameterByIndex(vx_node node, vx_uint32 index)
Retrieves a vx_parameter from a vx_node.
vx_status VX_API_CALL vxReleaseRemap(vx_remap *table)
Releases a reference to a remap table object. The object may not be garbage collected until its total...
vx_status VX_API_CALL vxReleaseKernel(vx_kernel *kernel)
Release the reference to the kernel. The object may not be garbage collected until its total referenc...
vx_action(* vx_nodecomplete_f)(vx_node node)
A callback to the client after a particular node has completed.
Definition: vx_types.h:416
The rectangle data structure that is shared with the users.
Definition: vx_types.h:1402
vx_status VX_API_CALL vxAssignNodeCallback(vx_node node, vx_nodecomplete_f callback)
Assigns a callback to a node. If a callback already exists in this node, this function must return an...
vx_status VX_API_CALL vxQueryNode(vx_node node, vx_enum attribute, void *ptr, vx_size size)
Allows a user to query information out of a node.
vx_status VX_API_CALL vxSetParameterByReference(vx_parameter parameter, vx_reference value)
Associates a parameter reference and a data reference with a kernel on a node.
vx_status VX_API_CALL vxWriteScalarValue(vx_scalar ref, const void *ptr)
Sets the scalar value in a reference.
vx_status VX_API_CALL vxReleaseThreshold(vx_threshold *thresh)
Releases a reference to a threshold object. The object may not be garbage collected until its total r...
vx_status VX_API_CALL vxQueryKernel(vx_kernel kernel, vx_enum attribute, void *ptr, vx_size size)
This allows the client to query the kernel to get information about the number of parameters...
vx_distribution VX_API_CALL vxCreateDistribution(vx_context context, vx_size numBins, vx_int32 offset, vx_uint32 range)
Creates a reference to a 1D Distribution of a consecutive interval [offset, offset + range - 1] defin...
vx_status VX_API_CALL vxLoadKernels(vx_context context, const vx_char *module)
Loads one or more kernels into the OpenVX context. This is the interface by which OpenVX is extensibl...
vx_status VX_API_CALL vxFinalizeKernel(vx_kernel kernel)
This API is called after all parameters have been added to the kernel and the kernel is ready to be u...
vx_status VX_API_CALL vxCommitLUT(vx_lut lut, const void *ptr)
Commits the Lookup Table and decrements the object reference count in case of success.
void *VX_API_CALL vxFormatImagePatchAddress1d(void *ptr, vx_uint32 index, const vx_imagepatch_addressing_t *addr)
Accesses a specific indexed pixel in an image patch.
vx_status VX_API_CALL vxSetContextAttribute(vx_context context, vx_enum attribute, const void *ptr, vx_size size)
Sets an attribute on the context.
vx_lut VX_API_CALL vxCreateLUT(vx_context context, vx_enum data_type, vx_size count)
Creates LUT object of a given type.
vx_status VX_API_CALL vxGetValidRegionImage(vx_image image, vx_rectangle_t *rect)
Retrieves the valid region of the image as a rectangle.
vx_delay VX_API_CALL vxCreateDelay(vx_context context, vx_reference exemplar, vx_size slots)
Creates a Delay object.
vx_status VX_API_CALL vxSetRemapPoint(vx_remap table, vx_uint32 dst_x, vx_uint32 dst_y, vx_float32 src_x, vx_float32 src_y)
Assigns a destination pixel mapping to the source pixel.
vx_status VX_API_CALL vxSetThresholdAttribute(vx_threshold thresh, vx_enum attribute, const void *ptr, vx_size size)
Sets attributes on the threshold object.
struct _vx_convolution * vx_convolution
The Convolution Object. A user-defined convolution kernel of MxM elements.
Definition: vx_types.h:248
vx_status VX_API_CALL vxQueryLUT(vx_lut lut, vx_enum attribute, void *ptr, vx_size size)
Queries attributes from a LUT.
#define VX_MAX_KERNEL_NAME
Defines the maximum string length of a kernel name to be added to OpenVX.
Definition: vx.h:40
struct _vx_remap * vx_remap
The remap table Object. A remap table contains per-pixel mapping of output pixels to input pixels...
Definition: vx_types.h:254
uint32_t vx_uint32
A 32-bit unsigned value.
Definition: vx_types.h:80
vx_graph VX_API_CALL vxCreateGraph(vx_context context)
Creates an empty graph.
vx_status VX_API_CALL vxQueryPyramid(vx_pyramid pyr, vx_enum attribute, void *ptr, vx_size size)
Queries an attribute from an image pyramid.
vx_array VX_API_CALL vxCreateArray(vx_context context, vx_enum item_type, vx_size capacity)
Creates a reference to an Array object.
vx_status VX_API_CALL vxCommitArrayRange(vx_array arr, vx_size start, vx_size end, const void *ptr)
Commits data back to the Array object.
vx_status VX_API_CALL vxReadScalarValue(vx_scalar ref, void *ptr)
Gets the scalar value out of a reference.
vx_status VX_API_CALL vxDirective(vx_reference reference, vx_enum directive)
Provides a generic API to give platform-specific directives to the implementations.
vx_status VX_API_CALL vxVerifyGraph(vx_graph graph)
Verifies the state of the graph before it is executed. This is useful to catch programmer errors and ...
vx_status VX_API_CALL vxScheduleGraph(vx_graph graph)
Schedules a graph for future execution.
vx_context VX_API_CALL vxCreateContext()
Creates a vx_context.
vx_status VX_API_CALL vxReleaseParameter(vx_parameter *param)
Releases a reference to a parameter object. The object may not be garbage collected until its total r...
struct _vx_graph * vx_graph
An opaque reference to a graph.
Definition: vx_types.h:195
vx_status VX_API_CALL vxRemoveNode(vx_node *node)
Removes a Node from its parent Graph and releases it.
vx_status VX_API_CALL vxReleaseNode(vx_node *node)
Releases a reference to a Node object. The object may not be garbage collected until its total refere...
vx_status VX_API_CALL vxReleasePyramid(vx_pyramid *pyr)
Releases a reference to a pyramid object. The object may not be garbage collected until its total ref...
vx_image VX_API_CALL vxCreateImageFromROI(vx_image img, const vx_rectangle_t *rect)
Creates an image from another image given a rectangle. This second reference refers to the data in th...
struct _vx_node * vx_node
An opaque reference to a kernel node.
Definition: vx_types.h:188
vx_status VX_API_CALL vxReleaseImage(vx_image *image)
Releases a reference to an image object. The object may not be garbage collected until its total refe...
vx_context VX_API_CALL vxGetContext(vx_reference reference)
Retrieves the context from any reference from within a context.
vx_status VX_API_CALL vxSetParameterByIndex(vx_node node, vx_uint32 index, vx_reference value)
Sets the specified parameter data for a kernel on the node.
vx_image VX_API_CALL vxGetPyramidLevel(vx_pyramid pyr, vx_uint32 index)
Retrieves a level of the pyramid as a vx_image, which can be used elsewhere in OpenVX. A call to vxReleaseImage is necessary to release an image for each call of vxGetPyramidLevel.
vx_remap VX_API_CALL vxCreateRemap(vx_context context, vx_uint32 src_width, vx_uint32 src_height, vx_uint32 dst_width, vx_uint32 dst_height)
Creates a remap table object.
vx_status(* vx_kernel_input_validate_f)(vx_node node, vx_uint32 index)
The user-defined kernel node input parameter validation function.
Definition: vx_types.h:1236
vx_status VX_API_CALL vxAddParameterToKernel(vx_kernel kernel, vx_uint32 index, vx_enum dir, vx_enum data_type, vx_enum state)
Allows users to set the signatures of the custom kernel.
vx_status VX_API_CALL vxSetMetaFormatAttribute(vx_meta_format meta, vx_enum attribute, const void *ptr, vx_size size)
This function allows a user to set the attributes of a vx_meta_format object in a kernel output valid...
vx_image VX_API_CALL vxCreateVirtualImage(vx_graph graph, vx_uint32 width, vx_uint32 height, vx_df_image color)
Creates an opaque reference to an image buffer with no direct user access. This function allows setti...
struct _vx_matrix * vx_matrix
The Matrix Object. An MxN matrix of some unit type.
Definition: vx_types.h:229
vx_status VX_API_CALL vxSetGraphParameterByIndex(vx_graph graph, vx_uint32 index, vx_reference value)
Sets a reference to the parameter on the graph. The implementation must set this parameter on the ori...
void *VX_API_CALL vxFormatImagePatchAddress2d(void *ptr, vx_uint32 x, vx_uint32 y, const vx_imagepatch_addressing_t *addr)
Accesses a specific pixel at a 2d coordinate in an image patch.
struct _vx_scalar * vx_scalar
An opaque reference to a scalar.
Definition: vx_types.h:159
vx_status(* vx_kernel_output_validate_f)(vx_node node, vx_uint32 index, vx_meta_format meta)
The user-defined kernel node output parameter validation function. The function only needs to fill in...
Definition: vx_types.h:1252
vx_status VX_API_CALL vxAccessImagePatch(vx_image image, const vx_rectangle_t *rect, vx_uint32 plane_index, vx_imagepatch_addressing_t *addr, void **ptr, vx_enum usage)
Allows the User to extract a rectangular patch (subset) of an image from a single plane...
vx_status VX_API_CALL vxReleaseMatrix(vx_matrix *mat)
Releases a reference to a matrix object. The object may not be garbage collected until its total refe...
struct _vx_lut * vx_lut
The Look-Up Table (LUT) Object.
Definition: vx_types.h:216
vx_status VX_API_CALL vxGetStatus(vx_reference reference)
Provides a generic API to return status values from Object constructors if they fail.
vx_matrix VX_API_CALL vxCreateMatrix(vx_context c, vx_enum data_type, vx_size columns, vx_size rows)
Creates a reference to a matrix object.
vx_status VX_API_CALL vxReleaseConvolution(vx_convolution *conv)
Releases the reference to a convolution matrix. The object may not be garbage collected until its tot...
vx_status VX_API_CALL vxAddArrayItems(vx_array arr, vx_size count, const void *ptr, vx_size stride)
Adds items to the Array.