
412 V Mobile Devices
and from the GPU’s memory. Although the camera input is stored on the GPU,
existing image-processing applications tend to transfer the data to the host device
(the CPU), where they serially process the data and render it to the display using
OpenGL. Clearly this process can cause several inefficient transfers of data back
and forth between the CPU and GPU.
What is required is an approach that avoids any unnecessary memory transfers
between the GPU’s memory and the host’s memory. OpenCL/OpenGL interop-
erability supports this approach. Input from the camera can be acquired in the
form of an OpenGL ES texture using Android’s
SurfaceTexture ...