The OpenVX Specification
r28647
|
Converts image bit depth.
This kernel converts an image from some source bit-depth to another bit-depth as described by the table below. If the input value is unsigned the shift must be in zeros. If the input value is signed, the shift used must be an arithmetic shift. The columns in the table below are the output types and the rows are the input types. The API version on which conversion is supported is also listed. (An X denotes an invalid operation.)
I/O | U8 | U16 | S16 | U32 | S32 |
---|---|---|---|---|---|
U8 | X | 1.0 | |||
U16 | X | X | |||
S16 | 1.0 | X | X | ||
U32 | X | X | |||
S32 | X | X |
Down-conversions with VX_CONVERT_POLICY_WRAP
follow this equation:
Down-conversions with VX_CONVERT_POLICY_SATURATE
follow this equation:
Up-conversions ignore the policy and perform this operation:
The valid values for 'shift' are as specified below, all other values produce undefined behavior.
Functions | |
vx_node | vxConvertDepthNode (vx_graph graph, vx_image input, vx_image output, vx_enum policy, vx_scalar shift) |
[Graph] Creates a bit-depth conversion node. More... | |
vx_status | vxuConvertDepth (vx_context context, vx_image input, vx_image output, vx_enum policy, vx_int32 shift) |
[Immediate] Converts the input images bit-depth into the output image. More... | |
vx_node vxConvertDepthNode | ( | vx_graph | graph, |
vx_image | input, | ||
vx_image | output, | ||
vx_enum | policy, | ||
vx_scalar | shift | ||
) |
[Graph] Creates a bit-depth conversion node.
[in] | graph | The reference to the graph. |
[in] | input | The input image. |
[out] | output | The output image. |
[in] | policy | A scalar containing a VX_TYPE_ENUM of the vx_convert_policy_e enumeration. |
[in] | shift | A scalar containing a VX_TYPE_INT32 of the shift value. |
vx_node
. 0 | Node could not be created. |
* | Node handle. |
vx_status vxuConvertDepth | ( | vx_context | context, |
vx_image | input, | ||
vx_image | output, | ||
vx_enum | policy, | ||
vx_int32 | shift | ||
) |
[Immediate] Converts the input images bit-depth into the output image.
[in] | context | The reference to the overall context. |
[in] | input | The input image. |
[out] | output | The output image. |
[in] | policy | A vx_convert_policy_e enumeration. |
[in] | shift | The shift value. |
vx_status_e
enumeration. VX_SUCCESS | Success |
* | An error occurred. See vx_status_e .. |