![]() |
The OpenVX Specification
r28647
|
Defines the Look-Up Table Interface.
A lookup table is an array that simplifies run-time computation by replacing computation with a simpler array indexing operation.
Typedefs | |
| typedef struct _vx_lut * | vx_lut |
| The Look-Up Table (LUT) Object. | |
Enumerations | |
| enum | vx_lut_attribute_e { VX_LUT_ATTRIBUTE_TYPE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_LUT << 8)) + 0x0, VX_LUT_ATTRIBUTE_COUNT = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_LUT << 8)) + 0x1, VX_LUT_ATTRIBUTE_SIZE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_LUT << 8)) + 0x2 } |
| The Look-Up Table (LUT) attribute list. More... | |
Functions | |
| vx_status | vxAccessLUT (vx_lut lut, void **ptr, vx_enum usage) |
| Gets direct access to the LUT table data. More... | |
| vx_status | vxCommitLUT (vx_lut lut, void *ptr) |
| Commits the Lookup Table. More... | |
| vx_lut | vxCreateLUT (vx_context context, vx_enum data_type, vx_size count) |
| Creates LUT object of a given type. More... | |
| vx_status | vxQueryLUT (vx_lut lut, vx_enum attribute, void *ptr, vx_size size) |
| Queries attributes from a LUT. More... | |
| vx_status | vxReleaseLUT (vx_lut *lut) |
| Releases a reference to a LUT object. The object may not be garbage collected until its total reference count is zero. More... | |
| enum vx_lut_attribute_e |
The Look-Up Table (LUT) attribute list.
| Enumerator | |
|---|---|
| VX_LUT_ATTRIBUTE_TYPE |
Indicates the value type of the LUT. Use a |
| VX_LUT_ATTRIBUTE_COUNT |
Indicates the number of elements in the LUT. Use a |
| VX_LUT_ATTRIBUTE_SIZE |
Indicates the total size of the LUT in bytes. Uses a |
Definition at line 808 of file vx_types.h.
| vx_lut vxCreateLUT | ( | vx_context | context, |
| vx_enum | data_type, | ||
| vx_size | count | ||
| ) |
Creates LUT object of a given type.
| [in] | context | The reference to the context. |
| [in] | data_type | The type of data stored in the LUT. |
| [in] | count | The number of entries desired. |
vx_lut Releases a reference to a LUT object. The object may not be garbage collected until its total reference count is zero.
| [in] | lut | The pointer to the LUT to release. |
vx_status_e enumeration. | VX_SUCCESS | No errors. |
| VX_ERROR_INVALID_REFERENCE | If graph is not a vx_graph. |
Queries attributes from a LUT.
| [in] | lut | The LUT to query. |
| [in] | attribute | The attribute to query. Use a vx_lut_attribute_e enumeration. |
| [out] | ptr | The location at which to store the resulting value. |
| [in] | size | The size of the container to which ptr points. |
vx_status_e enumeration. Gets direct access to the LUT table data.
There are several variations of call methodology:
vxCommitLUT. vxQueryLUT with VX_LUT_ATTRIBUTE_SIZE to determine how much memory to allocate for the LUT data.In any case, vxCommitLUT must be called after LUT access is complete.
| [in] | lut | The LUT from which to get the data. |
| [in,out] | ptr | The address of the location to store the pointer to the LUT memory. |
| [in] | usage | This declares the intended usage of the pointer using the * vx_accessor_e enumeration. |
vx_status_e enumeration. vxCommitLUT Commits the Lookup Table.
Commits the data back to the LUT object and decrements the reference count. There are several variations of call methodology:
vxAccessLUT was NULL, it is undefined whether the implementation will unmap or copy and free the memory. | [in] | lut | The LUT to modify. |
| [in] | ptr | The pointer used with vxAccessLUT. This cannot be NULL. |
vx_status_e enumeration. vxAccessLUT.