The OpenVX Specification  a73e458
Macros and Constants

Detailed Description

Macros and constants not included in other sections.

Defines lists of kernels, vendors, types etc.

Modules

 Context Attribute Constants
 A list of context attributes.
 
 List of allowed directives
 Values given to the vxDirective API to enable/disable platform optimizations and/or features. Directives are not optional and usually are vendor-specific, by defining a vendor range of directives and starting their enumeration from there.
 
 Reference Attribute Constants
 The reference attributes list.
 
 The Kernel Attribute Constants
 The kernel attributes list.
 
 VX_GRAPH_STATE Constants
 The constants describing a graph's state.
 
 VX_GRAPH_ Attributes
 The Attributes that may be queried for a graph.
 
 The VX_TYPE Constants
 The list of defines for all known types in OpenVX.
 
 The vx_status Constants
 The enumeration of all status codes.
 
 Different types of constants
 The set of supported enumerations in OpenVX.
 
 The Conversion Policy Enumeration.
 
 Image Type Constants
 Based on the VX_DF_IMAGE definition.
 
 The Target Enumeration Constants.
 
 Constants for image channels
 The channel enumerations for channel extractions.
 
 Interpolation Constants
 The image reconstruction filters supported by image resampling operations.
 
 Non-linear filter functions
 An enumeration of non-linear filter functions.
 
 Matrix patterns
 An enumeration of matrix patterns. See vxCreateMatrixFromPattern
 
 The Map/Unmap flag
 The Map/Unmap operation enumeration.
 
 The Vendor ID list for OpenVX.
 The Vendor ID of the Implementation. As new vendors submit their implementations, this enumeration will grow.
 

Macros

#define VX_API_CALL
 Defines calling convention for OpenVX API.
 
#define VX_ATTRIBUTE_BASE(vendor, object)   (VX_SHL(vendor, 20) | VX_SHL(object, 8))
 Defines the manner in which to combine the Vendor and Object IDs to get the base value of the enumeration.
 
#define VX_ATTRIBUTE_ENUM(vendor, object, num)   (vx_enum)(VX_ATTRIBUTE_BASE(vendor, object) + (uint32_t)(num))
 Create an attribute enumeration value from vendor, object and number.
 
#define VX_ATTRIBUTE_ID_MASK   (0x000000FF)
 An object's attribute ID is within the range of \( [0,2^{8}-1] \) (inclusive).
 
#define VX_CALLBACK
 Defines calling convention for user callbacks.
 
#define VX_DF_IMAGE(a, b, c, d)   (VX_SHL(a, 0) | VX_SHL(b, 8) | VX_SHL(c, 16) | VX_SHL(d,24))
 Converts a set of four chars into a uint32_t container of a VX_DF_IMAGE code. More...
 
#define VX_ENUM(vendor, id, num)   (vx_enum)(VX_ENUM_BASE(vendor, id) + (uint32_t)(num))
 Create an enumeration value from vendor, id and number.
 
#define VX_ENUM_BASE(vendor, id)   (VX_SHL(vendor, 20) | VX_SHL(id, 12))
 Defines the manner in which to combine the Vendor and Object IDs to get the base value of the enumeration. More...
 
#define VX_ENUM_KERNEL(vendor, lib, num)   (vx_enum)(VX_KERNEL_BASE(vendor, lib) + (uint32_t)(num))
 Create an kernel enumeration value from vendor, id and kernel number.
 
#define VX_ENUM_MASK   (0x00000FFF)
 A generic enumeration list can have values between \( [0,2^{12}-1] \) (inclusive).
 
#define VX_ENUM_TYPE(e)   (((vx_uint32)(e) & VX_ENUM_TYPE_MASK) >> 12)
 A macro to extract the enum type from an enumerated value.
 
#define VX_ENUM_TYPE_MASK   (0x000FF000)
 A type of enumeration. The valid range is between \( [0,2^{8}-1] \) (inclusive).
 
#define VX_FMT_REF   "%p"
 Use to aid in debugging values in OpenVX.
 
#define VX_FMT_SIZE   "%zu"
 Use to aid in debugging values in OpenVX.
 
#define VX_KERNEL_BASE(vendor, lib)   (VX_SHL(vendor, 20) | VX_SHL(lib, 12))
 Defines the manner in which to combine the Vendor and Library IDs to get the base value of the enumeration.
 
#define VX_KERNEL_MASK   (0x00000FFF)
 An individual kernel in a library has its own unique ID within \( [0,2^{12}-1] \) (inclusive).
 
#define VX_LIBRARY(e)   (((vx_uint32)(e) & VX_LIBRARY_MASK) >> 12)
 A macro to extract the kernel library enumeration from a enumerated kernel value.
 
#define VX_LIBRARY_MASK   (0x000FF000)
 A library is a set of vision kernels with its own ID supplied by a vendor. The vendor defines the library ID. The range is \( [0,2^{8}-1] \) inclusive.
 
#define VX_SCALE_UNITY   (1024u)
 Use to indicate the 1:1 ratio in Q22.10 format.
 
#define VX_SHL(A, B)   (((uint32_t)(A)) << ((uint32_t)(B)))
 A rule to assist with MISRA checkers. This makes the RHS of shifts unsigned.
 
#define VX_TYPE(e)   (((vx_uint32)(e) & VX_TYPE_MASK) >> 8)
 A macro to extract the type from an enumerated attribute value.
 
#define VX_TYPE_MASK   (0x000FFF00)
 A type mask removes the scalar/object type from the attribute. It is 3 nibbles in size and is contained between the third and second byte. More...
 
#define VX_VENDOR(e)   (((vx_uint32)(e) & VX_VENDOR_MASK) >> 20)
 A macro to extract the vendor ID from the enumerated value.
 
#define VX_VENDOR_MASK   (0xFFF00000)
 Vendor IDs are 2 nibbles in size and are located in the upper byte of the 4 bytes of an enumeration.
 

Macro Definition Documentation

◆ VX_TYPE_MASK

#define VX_TYPE_MASK   (0x000FFF00)

A type mask removes the scalar/object type from the attribute. It is 3 nibbles in size and is contained between the third and second byte.

See also
The VX_TYPE Constants

Definition at line 462 of file vx_types.h.

◆ VX_DF_IMAGE

#define VX_DF_IMAGE (   a,
  b,
  c,
 
)    (VX_SHL(a, 0) | VX_SHL(b, 8) | VX_SHL(c, 16) | VX_SHL(d,24))

Converts a set of four chars into a uint32_t container of a VX_DF_IMAGE code.

Note
Use a vx_df_image variable to hold the value.

Definition at line 522 of file vx_types.h.

◆ VX_ENUM_BASE

#define VX_ENUM_BASE (   vendor,
  id 
)    (VX_SHL(vendor, 20) | VX_SHL(id, 12))

Defines the manner in which to combine the Vendor and Object IDs to get the base value of the enumeration.

From any enumerated value (with exceptions), the vendor, and enumeration type should be extractable. Those types that are exceptions are The Vendor ID list for OpenVX., The VX_TYPE Constants, Different types of constants, Image Type Constants, and vx_bool.

Definition at line 545 of file vx_types.h.