> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs-staging.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# QIM SDK Introduction

The Qualcomm® Intelligent Multimedia SDK (QIM SDK) is a hardware-accelerated multimedia and AI framework for building intelligent edge applications on Qualcomm® platforms. It provides reusable pipeline components, optimized plugins, and reference applications for use cases such as smart cameras, robotics, drones, home appliances, AI appliances, and connected devices.

<Frame caption="QIM SDK maps each pipeline stage onto the most suitable hardware block">
  <img src="https://mintcdn.com/qualcomm-staging/blZpKs_b9On5nj-y/archives/2.1/Key-Documents/AI-Developer-Workflow/_images/qimsdk-hw-pipeline.png?fit=max&auto=format&n=blZpKs_b9On5nj-y&q=85&s=782fedbdb56451b430acb3959511f757" alt="QIM SDK hardware-accelerated pipeline across camera ISP, GPU, NPU, video, and display blocks" width="100%" style={{ width: "100%", maxWidth: "900px" }} data-path="archives/2.1/Key-Documents/AI-Developer-Workflow/_images/qimsdk-hw-pipeline.png" />
</Frame>

QIM SDK combines camera capture, media processing, AI preprocessing, AI inference, post-processing, rendering, encoding, and streaming in a single application workflow. You can start with a ready-to-run sample, adapt a reference pipeline, or build a custom application using the programming model that best fits your use case.

<Note>
  This page provides a workflow-level overview for the AI Developer Workflow. For complete SDK reference material, including installation, plugin catalogs, App Builder APIs, sample pipelines, and reference applications, see the [QIM SDK documentation](https://imsdkdocs.qualcomm.com/index).
</Note>

<Tip>
  If you are not ready to write code, first run a prebuilt application. See [Run a Qualcomm IM SDK sample application](../topic/sample-app-evk) to validate a working AI pipeline on your device before you start building.
</Tip>

## Why use QIM SDK?

QIM SDK reduces the effort required to build optimized AI and multimedia applications on Qualcomm platforms. It provides the following benefits:

<CardGroup cols={2}>
  <Card title="Unified multimedia and AI pipeline" icon="arrows-to-circle">
    Run capture, preprocessing, inference, post-processing, rendering, encoding, and streaming in one GStreamer-based workflow instead of stitching together separate applications.
  </Card>

  <Card title="Hardware acceleration by default" icon="rabbit-running">
    Use Qualcomm CPU, GPU, NPU/HTP, camera ISP, video, display, and DSP engines so each pipeline stage runs on the hardware block best suited for that task.
  </Card>

  <Card title="Zero-copy buffer flow" icon="bolt">
    Pass frames between compatible pipeline stages as DMA-buf handles to reduce CPU copies, memory bandwidth, and latency.
  </Card>

  <Card title="GPU-accelerated pre- and post-processing" icon="microchip">
    Run resize, color conversion, tensor layout conversion, and overlay rendering on the Adreno GPU so the CPU remains available for application logic.
  </Card>

  <Card title="Flexible AI runtime support" icon="microchip-ai">
    Choose LiteRT/TFLite, ONNX, Qualcomm AI Engine Direct, or SNPE runtime paths based on model format, performance goals, and deployment requirements.
  </Card>

  <Card title="Qualcomm AI Hub integration" icon="cloud-arrow-down" href="../topic/ai-hub">
    Start with pre-trained and optimized models from Qualcomm AI Hub and integrate them into QIM SDK reference pipelines.
  </Card>
</CardGroup>

## How zero-copy improves performance

Traditional media pipelines often copy frames between stages. These copies increase CPU usage, memory traffic, and end-to-end latency. QIM SDK avoids unnecessary copies by passing frames as shared DMA-buf handles when all plugins in the path support zero-copy operation.

```mermaid theme={null}
%%{init: {"themeVariables": {"fontSize": "13px"}, "flowchart": {"htmlLabels": true, "nodeSpacing": 18, "rankSpacing": 26, "curve": "basis", "padding": 6}}}%%
flowchart TB
    subgraph T["❌ Traditional pipeline — the frame is copied at every stage"]
        direction LR
        T1["Capture<br/><i>buffer 1</i>"] -->|"memcpy"| T2["Preprocess<br/><i>buffer 2</i>"]
        T2 -->|"memcpy"| T3["Inference<br/><i>buffer 3</i>"]
        T3 -->|"memcpy"| T4["Display<br/><i>buffer 4</i>"]
        T4 --- TC["4 buffers · high memory traffic<br/>CPU spent moving data · added latency"]
    end

    subgraph Q["✅ QIM SDK — one buffer, shared by handle"]
        direction LR
        Q1["Capture<br/><i>ISP</i>"] -->|"DMA-buf handle"| Q2["Preprocess<br/><i>GPU</i>"]
        Q2 -->|"DMA-buf handle"| Q3["Inference<br/><i>NPU / HTP</i>"]
        Q3 -->|"DMA-buf handle"| Q4["Display<br/><i>Display</i>"]
        Q4 --- QC["1 shared buffer · low memory traffic<br/>CPU free for application logic · lower latency"]
    end

    T ~~~ Q

    classDef copy fill:#5B6770,stroke:#5B6770,color:#ffffff,stroke-width:2px;
    classDef zc fill:#31017D,stroke:#31017D,color:#ffffff,stroke-width:2px;
    classDef notec fill:#ffffff,stroke:#5B6770,color:#5B6770,stroke-dasharray:4 3;
    classDef notez fill:#ffffff,stroke:#31017D,color:#31017D,stroke-dasharray:4 3;
    class T1,T2,T3,T4 copy;
    class Q1,Q2,Q3,Q4 zc;
    class TC notec;
    class QC notez;
```

* Camera ISP, GPU, NPU/HTP, video, and display blocks can operate on shared buffers without repeated CPU memory copies.
* GStreamer allocation negotiation lets compatible plugins agree on DMA-buf allocation and import behavior.
* The result is lower memory bandwidth, reduced CPU load, and improved latency, especially for high-resolution, multi-stream, and real-time workloads.

<Note>
  Zero-copy works only when **every** plugin in the path supports it. If you add an element that requires CPU-mapped buffers, the pipeline falls back to copying at that point. Consider this when adding custom or third-party elements to an accelerated pipeline.
</Note>

## GPU-accelerated preprocessing and post-processing

AI inference performs best when the NPU/HTP receives correctly formatted tensors without interruption. QIM SDK uses the Adreno GPU for data-shaping and overlay work, reducing CPU load and helping keep the inference path efficient.

```mermaid theme={null}
%%{init: {"themeVariables": {"fontSize": "13px"}, "flowchart": {"htmlLabels": true, "nodeSpacing": 18, "rankSpacing": 26, "curve": "basis", "padding": 6}}}%%
flowchart LR
    F["Video frame<br/><i>NV12 · any resolution</i>"]
    PRE["<b>qtimlvconverter</b><br/><i>GPU</i><br/><br/>Color convert<br/>Resize · tensor layout"]
    INF["<b>Inference</b><br/><i>NPU / HTP</i><br/><br/>Run the model"]
    POST["<b>qtimlpostprocess</b><br/><br/>Decode output tensors<br/>into ML metadata"]
    OVL["<b>qtivoverlay</b><br/><i>GPU</i><br/><br/>Draw boxes · labels<br/>masks on the frame"]
    OUT["Annotated frame<br/><i>display · record · stream</i>"]

    F --> PRE -->|"input tensor"| INF -->|"output tensors"| POST -->|"metadata"| OVL --> OUT

    classDef gpu fill:#31017D,stroke:#31017D,color:#ffffff,stroke-width:2px;
    classDef npu fill:#3253DC,stroke:#3253DC,color:#ffffff,stroke-width:2px;
    classDef io fill:#5B6770,stroke:#5B6770,color:#ffffff,stroke-width:2px;
    class PRE,OVL gpu;
    class INF,POST npu;
    class F,OUT io;
```

* **Preprocessing:** `qtimlvconverter` performs color-space conversion, resizing, and tensor-layout transforms on the GPU to produce the input tensor required by the model.
* **Post-processing:** `qtimlpostprocess` decodes model output tensors into structured ML metadata such as bounding boxes, labels, and masks. `qtivoverlay` then renders that metadata on the frame using the GPU.

## Next steps

<Card title="Application development with QIM SDK" icon="code" href="../topic/imsdk-app-development">
  Continue to the development workflow to review the important QIM SDK components, the application development workflow, and the post-processing modules and supported use cases.
</Card>

## Related information

* [Run inference](../map/use-available-frameworks-and-runtimes) — compare QIM SDK with other runtime and integration paths.
* [Prepare your model](../map/compile-and-optimize-model) — convert, quantize, or fine-tune a model before integrating it.
* [Develop an AI application using QAIRT C++ APIs](../topic/develop-your-own-application-qairt-cpp) — use the lower-level API path when your application is not a multimedia pipeline.
* [QIM SDK documentation](https://imsdkdocs.qualcomm.com/index) — the complete SDK reference.
