The OpenVX Specification  a73e458

Detailed Description

Defines the Delay Object interface.

A Delay is an opaque object that contains a manually-controlled, temporally-delayed list of objects. A Delay cannot be an output of a kernel. Also, aging of a Delay (see vxAgeDelay) cannot be performed during graph execution. Supported delay object types include:

Modules

 Delay Attribute Constants
 The delay attribute list.
 

Typedefs

typedef struct _vx_delay * vx_delay
 The delay object. This is like a ring buffer of objects that is maintained by the OpenVX implementation. More...
 

Functions

vx_status VX_API_CALL vxAgeDelay (vx_delay delay)
 Shifts the internal delay ring by one. More...
 
vx_delay VX_API_CALL vxCreateDelay (vx_context context, vx_reference exemplar, vx_size num_slots)
 Creates a Delay object [R00882]. More...
 
vx_reference VX_API_CALL vxGetReferenceFromDelay (vx_delay delay, vx_int32 index)
 Retrieves a reference to a delay slot object [R00903]. More...
 
vx_status VX_API_CALL vxQueryDelay (vx_delay delay, vx_enum attribute, void *ptr, vx_size size)
 Queries a vx_delay object attribute [R00872]. More...
 
vx_status VX_API_CALL vxReleaseDelay (vx_delay *delay)
 Releases a reference to a delay object [R00878]. The object may not be garbage collected until its total reference count is zero. More...
 

Typedef Documentation

◆ vx_delay

typedef struct _vx_delay* vx_delay

The delay object. This is like a ring buffer of objects that is maintained by the OpenVX implementation.

See also
vxCreateDelay

Definition at line 234 of file vx_types.h.

Function Documentation

◆ vxQueryDelay()

vx_status VX_API_CALL vxQueryDelay ( vx_delay  delay,
vx_enum  attribute,
void *  ptr,
vx_size  size 
)

Queries a vx_delay object attribute [R00872].

Parameters
[in]delayThe reference to a delay object [R00873].
[in]attributeThe attribute to query, use a Delay Attribute Constants value [R00874].
[out]ptrThe location at which to store the resulting value [R00875].
[in]sizeThe size of the container to which ptr points [R00876].
Returns
A The vx_status Constants value.
Return values
VX_SUCCESSNo errors; any other value indicates failure [R00877].
VX_ERROR_INVALID_REFERENCEdelay is not a valid vx_delay reference.

◆ vxReleaseDelay()

vx_status VX_API_CALL vxReleaseDelay ( vx_delay delay)

Releases a reference to a delay object [R00878]. The object may not be garbage collected until its total reference count is zero.

Parameters
[in]delayThe pointer to the delay object reference to release [R00879].
Postcondition
After returning from this function the reference is zeroed [R00880].
Returns
A The vx_status Constants value.
Return values
VX_SUCCESSNo errors; any other value indicates failure [R00881].
VX_ERROR_INVALID_REFERENCEdelay is not a valid vx_delay reference.

◆ vxCreateDelay()

vx_delay VX_API_CALL vxCreateDelay ( vx_context  context,
vx_reference  exemplar,
vx_size  num_slots 
)

Creates a Delay object [R00882].

This function creates a delay object with num_slots slots [R00883]. Each slot contains a clone of the exemplar [R00884]. The clones only inherit the metadata of the exemplar [R00885]. The data content of the exemplar is ignored and the clones have their data is implementation-dependent at delay creation time. The function does not alter the exemplar [R00886]. Also, it doesn't retain or release the reference to the exemplar [R00887].

Note
For the definition of metadata attributes see vxSetMetaFormatAttribute.
Parameters
[in]contextThe reference to the context [R00888].
[in]exemplarThe exemplar object. Supported exemplar object types are:
[in]num_slotsThe number of objects in the delay [R00900].
Returns
A delay reference vx_delay [R00901]. Any possible errors preventing a successful creation should be checked using vxGetStatus [R00902].

◆ vxGetReferenceFromDelay()

vx_reference VX_API_CALL vxGetReferenceFromDelay ( vx_delay  delay,
vx_int32  index 
)

Retrieves a reference to a delay slot object [R00903].

Parameters
[in]delayThe reference to the delay object [R00904].
[in]indexThe index of the delay slot from which to extract the object reference [R00905].
Returns
vx_reference. Any possible errors preventing a successful completion of the function should be checked using vxGetStatus [R00906].
Note
The delay index is in the range \( [-count+1,0] \) [R00907]. 0 is always the current object.
A reference retrieved with this function must not be given to its associated release API (e.g. vxReleaseImage) unless vxRetainReference is used.

◆ vxAgeDelay()

vx_status VX_API_CALL vxAgeDelay ( vx_delay  delay)

Shifts the internal delay ring by one.

This function performs a shift of the internal delay ring by one. This means that, the data originally at index 0 move to index -1 and so forth until index \( -count+1 \) [R00908]. The data originally at index \( -count+1 \) move to index 0 [R00909]. Here \( count \) is the number of slots in delay ring. When a delay is aged, any graph making use of this delay (delay object itself or data objects in delay slots) gets its data automatically updated accordingly [R00910].

Parameters
[in]delay[R00911]
Returns
A The vx_status Constants value.
Return values
VX_SUCCESSDelay was aged; any other value indicates failure [R00912].
VX_ERROR_INVALID_REFERENCEdelay is not a valid vx_delay reference.