Halide is a programming language designed to make it easier to write high-performance image and array processing code on modern machines.

TODO(minhazav) Add more information.

  • Halide currently targets: diff CPU, diff OS, diff compute APIs like CUDA, OpenCL, OpenGL…
  • Rather than being a standalone programming language, Halide is embedded in C++.

You can read more about it at halide-lang.org

We use Halide heavily, when building performance intensive algorithms for low-end devices (as well as high-end devices) at Google.

Halide example

TBA — blur example

YUV to RGB conversion

I have been exploring performance of different frameworks / technologies for performance of image processing in Android taking the example of YUV Image to Bitmap conversion. Here are some examples of the same using other techniques.

I plan to write a full series article that explains performance of different approaches.

Approach Average Notes
Java 353 ms 11.2x slower
Java multi-threaded 53.8 ms 1.7x slower
RenderScript 31.5 ms fastest among these

Table 1: Performance latency of converting a 8MP (3264x2448) YUV Image to Bitmap on Pixel 4a device.