# CHI

Source: [https://docs.qualcomm.com/doc/80-88500-4/topic/126_CHI.html](https://docs.qualcomm.com/doc/80-88500-4/topic/126_CHI.html)

The camera HAL interface (CHI) API aims to separate the Camera2/HAL3 interface for using a camera and supplement it with a fully flexible image processing driver.

The CHI image processing driver is accessible as a stand-alone processing entity, with the ability to consume image data from either a sensor or memory. To allow Qualcomm Spectra to maintain backward compatibility with the existing Camera2/HAL3 interface, a thin HAL3 driver converts HAL3 calls into the appropriate CHI calls. The HAL3 driver works on generating a camera use case that is implemented via the CHI API calls.

This interface allows you to modify the default camera use case implementation. This modification allows you to use a Camera2 or HAL3 application and still have access to the flexibility provided by CHI. These overrides allow you to implement any type of image processing on any available engine, with low latency, and without the need to coordinate synchronization across multiple engines.

The CHI API builds upon the existing flexibility of the Google HAL3 camera interface. HAL3 is designed around explicit per-request control of the camera pipeline which will full processing control, but only at request boundaries. The CHI is intended to give finer grained control, along with access to processing engines within the ISP. This interface allows you to take advantage of the low latency hardware and software paths that Qualcomm supplies on the Snapdragon processor platforms for both camera and generic image processing applications.

The Qualcomm Spectra camera driver has five key customizable components, which enables you to take full advantage of CHI for camera applications:

- The CHI override module supplements the Google HAL3 interface to allow for explicit image processing pipeline generation, explicit engine selection, and multiframe control for any HAL3-compliant camera application.
- The CHI pipeline allows for an arbitrary compute pipeline to be constructed to process images. The pipeline can consist of fixed function ISP (FF-ISP) blocks, provided by Qualcomm, or extended nodes, which are controlled outside of the camera driver stack. For Camera2/HAL3 implementations, an XML helper file specifies the graph, which matches the existing Camera2/HAL3 use cases, calls directly into CHI can programmatically generate pipelines as well.
- The CHI node extensions are a further extension of CHI, which provide convenient hooks to streamline processing on the CPU, GPU (via OpenCL or OpenGL ES), or DSP (via OpenDSP, Qualcomm Computer Vision SDK, or custom programming). Custom nodes can specify the private vendor tags to be used by the application and interact with the CHI FF-ISP nodes or other extended nodes.
- The CHI stats overrides including 3A allow mechanisms to override any of the default stats algorithms without the need for driver changes. External stats algorithms can store private data, which is also accessible by custom nodes.
- The CHI sensor XML allows device manufactures to define parameter-driven drivers for their specific hardware components including the camera module, the image sensor, actuators, EEPROM, and flash components.

- **[CHI architecture model](https://docs.qualcomm.com/doc/80-88500-4/topic/127_CHI_architecture_model.html)**  

The CHI driver provides the default nodes to enable the camera use cases. You can add     functionalities to the existing CHI driver for a unique camera experience. It is a simple yet     powerful interface to seamlessly add image processing functionalities in the camera     pipeline.

**Parent Topic:** [Camera](https://docs.qualcomm.com/doc/80-88500-4/topic/122_Camera.html)

Last Published: Aug 18, 2023

[Previous Topic
ISP tuning process](https://docs.qualcomm.com/bundle/publicresource/80-88500-4/topics/125_ISP_tuning_process.md) [Next Topic
CHI architecture model](https://docs.qualcomm.com/bundle/publicresource/80-88500-4/topics/127_CHI_architecture_model.md)