TIOVX User Guide

Detailed Description

Internal APIs for reference operations.

Data Structures

struct  tivx_reference_t
 The most basic type in the OpenVX system. Any type that inherits from tivx_reference_t must have a vx_reference_t as its first member to allow casting to this type. More...
 

Typedefs

typedef vx_status(* tivx_reference_callback_f) (vx_reference ref)
 Callback type used to register different callbacks from object derived from references.
 
typedef vx_status(* VX_API_CALL) (vx_reference *ref)
 Callback type used to register release callbacks from object derived from references.
 
typedef vx_status(* vx_kernel_callback_f) (vx_enum kernel_enum, vx_bool validate_only, const vx_reference input, const vx_reference output)
 Callback type used to validate or implement kernels for operations involving generic references, such as Copy, Select, Swap or Pass. More...
 

Enumerations

enum  tivx_reftype_e
 An internal enum for notating which sort of reference type we need.
 

Functions

vx_status ownReleaseReferenceBufferGeneric (vx_reference *ref)
 Common callback function. More...
 
vx_reference ownCreateReference (vx_context context, vx_enum ref_type, vx_enum reftype, vx_reference scope)
 Create a reference object. More...
 
vx_status ownReleaseReferenceInt (vx_reference *ref, vx_enum ref_type, vx_enum reftype, tivx_reference_callback_f destructor)
 Used to destroy a reference. More...
 
vx_bool ownIsValidSpecificReference (vx_reference ref, vx_enum ref_type)
 Used to validate everything but vx_context, vx_image. More...
 
vx_status ownReferenceLock (vx_reference ref)
 Lock the reference. More...
 
vx_status ownReferenceUnlock (vx_reference ref)
 Unlock the reference. More...
 
vx_uint32 ownIncrementReference (vx_reference ref, vx_enum reftype)
 Increments the ref count. More...
 
vx_uint32 ownDecrementReference (vx_reference ref, vx_enum reftype)
 Decrements the ref count. More...
 
vx_bool ownIsValidType (vx_enum ref_type)
 This returns true if the type is within the definition of types in OpenVX. More...
 
vx_status ownInitReference (vx_reference ref, vx_context context, vx_enum ref_type, vx_reference scope)
 Init a reference object. More...
 
vx_status ownCreateReferenceLock (vx_reference ref)
 Create mutex used for locking context/graph. More...
 
vx_status ownDeleteReferenceLock (vx_reference ref)
 Delete mutex used for locking context/graph. More...
 
vx_bool ownIsValidReference (vx_reference ref)
 Check if reference is valid. More...
 
void ownInitReferenceForDelay (vx_reference ref, vx_delay d, vx_int32 idx)
 Used to initialize any vx_reference as a delay element. More...
 
vx_status ownReferenceAllocMem (vx_reference ref)
 Alloc memory associated with this reference, typically data reference.
 
vx_size ownSizeOfEnumType (vx_enum item_type)
 Get the size of the Type enum.
 
void ownReferenceSetScope (vx_reference ref, vx_reference scope)
 Set scope of a reference.
 
vx_reference ownReferenceGetHandleFromObjDescId (uint16_t obj_desc_id)
 Return reference given a obj desc ID This API must only be called on the host.
 
uint16_t ownReferenceGetObjDescId (vx_reference ref)
 Function to get the descriptor object from the given reference.
 
vx_status ownAllocReferenceBufferGeneric (vx_reference ref)
 There are several reference types that are allocated in the same way This API generalizes this in order to enhance code reuse The API will allocate the data buffer memory associated with the data object and release the associated object descriptor This API must only be called on the host.
 
vx_status ownDestructReferenceGeneric (vx_reference ref)
 There are several reference types that are destructed in the same way This API generalizes this in order to enhance code reuse The API will free the data buffer memory associated with the data object and release the associated object descriptor This API must only be called on the host.
 
vx_status ownCopyReferenceGeneric (vx_reference input, vx_reference output)
 There are several reference types that are copied in the same way This API generalizes this in order to enhance code reuse This API must only be called on the host.
 
vx_status ownSwapReferenceGeneric (vx_reference input, vx_reference output)
 There are several reference types that are swaped in the same way This API generalizes this in order to enhance code reuse This API must only be called on the host.
 
vx_status VX_CALLBACK ownKernelCallbackGeneric (vx_enum kernel_enum, vx_bool validate_only, const vx_reference input, const vx_reference output)
 Object specific function that is called for generic kernel operations such as Copy, move, swap and Select This API must only be called on the host.
 

Typedef Documentation

◆ vx_kernel_callback_f

typedef vx_status(* vx_kernel_callback_f) (vx_enum kernel_enum, vx_bool validate_only, const vx_reference input, const vx_reference output)

Callback type used to validate or implement kernels for operations involving generic references, such as Copy, Select, Swap or Pass.

Parameters
[in]kernel_enumA \ vx_kernel_e which give the name of vision kernel
[in]validate_onlyA vx_bool used to validate if the kernel operation is possible or not
[in]inputThe pointer to a vx_reference for the input used for the kernel operations
[in]outputThe pointer to a vx_reference for the output used for the kernel operations

Definition at line 66 of file vx_reference.h.

Function Documentation

◆ ownReleaseReferenceBufferGeneric()

vx_status ownReleaseReferenceBufferGeneric ( vx_reference ref)

Common callback function.

Parameters
[in]refThe reference to release.
Returns
A vx_status_e enumeration

◆ ownCreateReference()

vx_reference ownCreateReference ( vx_context  context,
vx_enum  ref_type,
vx_enum  reftype,
vx_reference  scope 
)

Create a reference object.

Parameters
[in]contextThe context to which this reference will belong
[in]ref_typeThe vx_type_e type desired.
[in]reftypeThe tivx_reftype_e reference type desired.
[in]scopeThe scope to which this reference belongs.

◆ ownReleaseReferenceInt()

vx_status ownReleaseReferenceInt ( vx_reference ref,
vx_enum  ref_type,
vx_enum  reftype,
tivx_reference_callback_f  destructor 
)

Used to destroy a reference.

Parameters
[in]refThe reference to release.
[in]ref_typeThe vx_type_e to check against.
[in]reftypeThe tivx_reftype_e reference type
[in]destructorThe function to call after the total count has reached zero

◆ ownIsValidSpecificReference()

vx_bool ownIsValidSpecificReference ( vx_reference  ref,
vx_enum  ref_type 
)

Used to validate everything but vx_context, vx_image.

Parameters
[in]refThe reference to validate.
[in]ref_typeThe vx_type_e to check for.

◆ ownReferenceLock()

vx_status ownReferenceLock ( vx_reference  ref)

Lock the reference.

Parameters
[in]refThe reference to lock

◆ ownReferenceUnlock()

vx_status ownReferenceUnlock ( vx_reference  ref)

Unlock the reference.

Parameters
[in]refThe reference to unlock

◆ ownIncrementReference()

vx_uint32 ownIncrementReference ( vx_reference  ref,
vx_enum  reftype 
)

Increments the ref count.

Parameters
[in]refThe reference.
[in]reftypesee tivx_reftype_e

◆ ownDecrementReference()

vx_uint32 ownDecrementReference ( vx_reference  ref,
vx_enum  reftype 
)

Decrements the ref count.

Parameters
[in]refThe reference.
[in]reftypesee tivx_reftype_e

◆ ownIsValidType()

vx_bool ownIsValidType ( vx_enum  ref_type)

This returns true if the type is within the definition of types in OpenVX.

Note
VX_TYPE_INVALID is not valid for determining a type.
Parameters
[in]ref_typeThe vx_type_e value.

◆ ownInitReference()

vx_status ownInitReference ( vx_reference  ref,
vx_context  context,
vx_enum  ref_type,
vx_reference  scope 
)

Init a reference object.

Parameters
[in]refThe reference
[in]contextThe context to which this reference will belong
[in]ref_typeThe vx_type_e type desired.
[in]scopeThe scope to which this reference belongs.

◆ ownCreateReferenceLock()

vx_status ownCreateReferenceLock ( vx_reference  ref)

Create mutex used for locking context/graph.

Parameters
[in]refThe reference

◆ ownDeleteReferenceLock()

vx_status ownDeleteReferenceLock ( vx_reference  ref)

Delete mutex used for locking context/graph.

Parameters
[in]refThe reference

◆ ownIsValidReference()

vx_bool ownIsValidReference ( vx_reference  ref)

Check if reference is valid.

Parameters
[in]refThe reference

◆ ownInitReferenceForDelay()

void ownInitReferenceForDelay ( vx_reference  ref,
vx_delay  d,
vx_int32  idx 
)

Used to initialize any vx_reference as a delay element.

Parameters
[in]refThe pointer to the reference object.
[in]dThe delay to which the object belongs
[in]idxthe index in the delay