• 04/03/2020
  • Public Content
Contents

Wrapping System Memory with OpenVX* Image

Consider the general interoperability flow:
  1. Map a resource to the CPU.
  2. Create an OpenVX image wrapping the memory:
    // populate the OpenVX structure specifying the image layout vx_imagepatch_addressing_t frameFormat; //dimension in x, in pixels frameFormat.dim_x =...; //dimension in y, in pixels frameFormat.dim_y = ..; //stride in x, in bytes frameFormat.stride_x = ...; //stride in y, in bytes frameFormat.stride_y = ...; void* frameData = ...; //creating input image, by wrapping the host side pointer vx_image im = vxCreateImageFromHandle( context, VX_DF_IMAGE_RGB, &frameFormat, &frameData, VX_MEMORY_TYPE_HOST);
  3. Use the buffer in the OpenVX.
  4. Upon completion of the OpenVX graphs that use the mapped resource bits, the OpenVX image should be destroyed and then the resource can be safely unmapped, returning data ownership to another API.
NOTE: While used by OpenVX*, the original resource (and its mapped data) cannot be used by application.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804