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

# Advanced feature concurrences

> Simultaneously run SHDR, EIS, and LDC features on the QCS6490 platform with optimized hardware-accelerated pipelines.

<div style={{display:'flex',gap:'8px',flexWrap:'wrap',marginBottom:'16px'}}>
  <span style={{background:'#ede9fe',color:'#5b21b6',padding:'2px 10px',borderRadius:'999px',fontSize:'12px',fontWeight:600}}>QCS6490</span>
  <span style={{background:'#f0fdf4',color:'#166534',padding:'2px 10px',borderRadius:'999px',fontSize:'12px',fontWeight:600}}>Stable</span>
</div>

<CardGroup cols={3}>
  <Card title="SHDR" icon="layer-group">Staggered HDR</Card>
  <Card title="EIS" icon="bolt">Stabilization</Card>
  <Card title="LDC" icon="camera">Lens Correction</Card>
</CardGroup>

<Note>
  **Platform Scope:**<br />
  This section is only applicable for **QCS6490**.
</Note>

***

## 01 · Concurrency Logic

This section describes the possible concurrency use cases for running SHDR, EIS, and LDC. The following are the combinations available to run SHDR, EIS, and LDC in concurrency:

| **GST command option** | **Description**                                                |
| :--------------------- | :------------------------------------------------------------- |
| `vhdr=2 eis=1`         | SHDR v3 applied on all streams. EIS applied on first stream    |
| `vhdr=2 eis=2`         | SHDR v3 and EIS applied on two streams                         |
| `vhdr=2 ldc=1`         | SHDR v3+ LDC applied on all (1 or 2) streams                   |
| `vhdr=1 ldc=1`         | SHDR v2+ LDC applied on all (1 or 2) streams                   |
| `eis=1 vhdr=2 ldc=1`   | SHDRV3 applied on two streams. EIS+LDC applied on first stream |
| `eis=2 vhdr=2 ldc=1`   | SHDRV3+EIS+LDC applied on two streams                          |

***

## 02 · Verification Setup

Before running any concurrency pipelines, ensure your environment is configured for log collection.

<Steps>
  <Step title="Connect to device">
    Connect to the device console using SSH.
  </Step>

  <Step title="Enable log collection">
    Run the following command on the device to collect the required system and CamX logs:

    ```bash Log Collection theme={null}
    # journalctl -f > /opt/log.txt
    ```
  </Step>
</Steps>

***

## 03 · SHDR v3 and EIS Concurrence

SHDR and EIS concurrency is enabled for SHDR v3 only. This feature uses SHDR v3 sensor mode and does SHDR v3 processing first followed by EIS processing.

<Steps>
  <Step title="Enable Single Stream Concurrence">
    Use the following GStreamer command to enable the SHDR v3+EIS single stream use case:

    ```bash GStreamer (SHDR v3 + EIS) theme={null}
    gst-launch-1.0 -e qtiqmmfsrc name=camsrc eis=1 vhdr=2 ! video/x-raw,format=NV12,\
    width=1920,height=1080,framerate=30/1 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 \
    extra-controls="controls,video_bitrate=6000000,video_bitrate_mode=0;" ! h264parse ! \
    mp4mux ! filesink location=/opt/cam_1080p.mp4
    ```
  </Step>

  <Step title="Verify Single Stream Status">
    Verify the SHDR v3 + EIS single stream use case using the following logs:

    ```text Log Verification theme={null}
    cam-server[882]: [INFO]: RecorderCameraContext : OpenCamera: EIS on single stream is ON..
    cam-server[882]: CamX: [ INFO]882 975 [CHI   ] camxchinodeeisdgv26.cpp:1346 Initialize() m_nodeCaps 131072
    cam-server[882]: CamX: [CORE_CFG]882 1877 [CORE      ] camxpipeline.h:3024 SetPipelineStatus() RealTimeYUVSHDREISIOT_0 status is now PipelineStatus::STREAM_ON
    ```
  </Step>

  <Step title="Enable Dual Stream Concurrence">
    Use the following GStreamer command to enable the SHDR v3 + EIS on two streams use case:

    ```bash GStreamer (Dual Stream) theme={null}
    gst-launch-1.0 -e qtiqmmfsrc name=camsrc eis=2 vhdr=2 video_0::type=preview ! \
    video/x-raw,format= NV12,width=1920,height=1080,framerate=30/1 ! \
    v4l2h264enc capture-io-mode=4 output-io-mode=5 extra-controls="controls,video_bitrate=6000000,\
    video_bitrate_mode=0;" ! h264parse ! mp4mux ! filesink location=/opt/cam_prev.mp4 \
    camsrc. ! video/x-raw,format=NV12,width=1280,height=720,\
    framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 \
    output-io-mode=5 extra-controls="controls,video_bitrate=6000000,video_bitrate_mode=0;" \
    ! h264parse ! mp4mux ! filesink location=/opt/cam_vid.mp4
    ```
  </Step>

  <Step title="Verify Dual Stream Status">
    Verify SHDR v3 + EIS on two streams use case using the following logs:

    ```text Log Verification theme={null}
    cam-server[882]: [INFO]: RecorderCameraContext : OpenCamera: EIS on dual stream is ON..
    cam-server[882]: CamX: [ INFO]882 952 [CHI   ] camxchinodeeisdgv26.cpp:1346 Initialize() m_nodeCaps 131072
    cam-server[882]: CamX: [CORE_CFG]882 2058 [CORE      ] camxpipeline.h:3024 SetPipelineStatus() RealTimeYUVSHDREISIOT_0 status is now PipelineStatus::STREAM_ON
    ```
  </Step>
</Steps>

***

## 04 · SHDR v3 and LDC Concurrence

This feature uses SHDR v3 sensor mode and does SHDR v3 processing followed by LDC processing.

<Steps>
  <Step title="Enable Pipeline">
    Use the following GStreamer command to enable this use case:

    ```bash GStreamer (SHDR v3 + LDC) theme={null}
    gst-launch-1.0 -e qtiqmmfsrc name=camsrc vhdr=2 ldc=1 ! video/x-raw,\
    format=NV12,width=1920,height=1080,framerate=30/1 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 \
    extra-controls="controls,video_bitrate=6000000,video_bitrate_mode=0;" ! h264parse ! mp4mux ! \
    filesink location=/opt/cam_1080p.mp4
    ```
  </Step>

  <Step title="Verify Status">
    Verify this use case is selected using the following logs:

    ```text Log Verification theme={null}
    cam-server[2089]: [INFO]: RecorderCameraContext : OpenCamera: EIS is disabled cam-server[2089]: CamX: [ INFO]2089 2090 [CHI  ]
    camxchinodeeisdgv26.cpp:1346 Initialize() m_nodeCaps 524288
    cam-server[2089]: CamX: [CORE_CFG]2089 2324 [CORE    ] camxpipeline.h:3024 SetPipelineStatus() RealTimeYUVSHDREISIOT_0 status is now PipelineStatus::STREAM_ON
    ```
  </Step>
</Steps>

***

## 05 · SHDR v2 and LDC Concurrence

This feature uses SHDR v2 sensor mode and does SHDR v2 processing followed by LDC processing.

<Steps>
  <Step title="Enable Pipeline">
    Use the following GStreamer command to enable this use case:

    ```bash GStreamer (SHDR v2 + LDC) theme={null}
    gst-launch-1.0 -e qtiqmmfsrc name=camsrc vhdr=1 ldc=1 ! video/x-raw,\
    format=NV12,width=1920,height=1080,framerate=30/1 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 \
    extra-controls="controls,video_bitrate=6000000,video_bitrate_mode=0;" ! h264parse ! mp4mux ! \
    filesink location=/opt/cam_1080p.mp4
    ```
  </Step>

  <Step title="Verify Status">
    Verify this use case is selected using the following logs:

    ```text Log Verification theme={null}
    cam-server[2358]: [INFO]: RecorderCameraContext : OpenCamera: EIS is disabled cam-server[2358]: CamX: [ INFO]2358 2366 [CHI  ]
    camxchinodeeisdgv26.cpp:1346 Initialize() m_nodeCaps 524288
    cam-server[2358]: CamX: [CORE_CFG]2358 2527 [CORE    ] camxpipeline.h:3024 SetPipelineStatus() RealTimeSHDRIOTLDC_0 status is now PipelineStatus::STREAM_ON
    ```
  </Step>
</Steps>

***

## 06 · SHDR v3, EIS, and LDC Concurrence

SHDR, EIS, and LDC concurrency is enabled with SHDR v3. This feature uses SHDR v3 sensor mode and does SHDR v3 processing followed by EIS and LDC processing.

<Steps>
  <Step title="Enable Single Stream Concurrence">
    Use the following GStreamer command to enable the SHDR v3, EIS, and LDC concurrency use case on a single stream:

    ```bash GStreamer (SHDR v3 + EIS + LDC) theme={null}
    gst-launch-1.0 -e qtiqmmfsrc name=camsrc eis=1 vhdr=2 ldc=1 ! video/x-raw,\
    format=NV12,width=1920,height=1080,framerate=30/1 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 \
    extra-controls="controls,video_bitrate=6000000,video_bitrate_mode=0;" ! h264parse ! mp4mux ! \
    filesink location=/opt/cam_1080p.mp4
    ```
  </Step>

  <Step title="Verify Single Stream Status">
    Verify the SHDR v3, EIS, and LDC concurrency on a single stream use case using the following logs:

    ```text Log Verification theme={null}
    cam-server[2555]: [INFO]: RecorderCameraContext : OpenCamera: EIS on single stream is ON..
    cam-server[2555]: CamX: [ INFO]2555 2560 [CHI        ]
    camxchinodeeisdgv26.cpp:1346 Initialize() m_nodeCaps 262144
    cam-server[2555]: CamX: [CORE_CFG]2555 2764 [CORE    ] camxpipeline.h:3024 \
    SetPipelineStatus() RealTimeYUVSHDREISIOT_0 status is now PipelineStatus::STREAM_ON
    ```
  </Step>

  <Step title="Enable Dual Stream Concurrence">
    Use the following GStreamer command to enable the SHDR v3, EIS, and LDC concurrency use case on two streams:

    ```bash GStreamer (Dual Stream) theme={null}
    gst-launch-1.0 -e qtiqmmfsrc name=camsrc eis=2 vhdr=2 ldc=1 video_0::type=preview ! \
    video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! \
    v4l2h264enc capture-io-mode=4 output-io-mode=5 extra-controls="controls,video_bitrate=6000000,\
    video_bitrate_mode=0;" ! h264parse ! mp4mux ! filesink location=/opt/cam_prev.mp4 \
    camsrc. ! video/x-raw,format=NV12,width=1280,height=720,\
    framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 \
    output-io-mode=5 extra-controls="controls,video_bitrate=6000000,video_bitrate_mode=0;" ! \
    h264parse ! mp4mux ! filesink location=/opt/cam_vid.mp4
    ```
  </Step>

  <Step title="Verify Dual Stream Status">
    Verify the SHDR v3, EIS, and LDC concurrency on two streams use case using the following logs:

    ```text Log Verification theme={null}
    cam-server[907]: [INFO]: RecorderCameraContext : OpenCamera: EIS on dual stream is ON..
    cam-server[907]: CamX: [ INFO]907 984 [CHI   ] camxchinodeeisdgv26.cpp:1346 Initialize() m_nodeCaps 262144
    cam-server[907]: CamX: [CORE_CFG]907 1586 [CORE      ] camxpipeline.h:3024 SetPipelineStatus() RealTimeYUVSHDREISIOT_0 status is now PipelineStatus::STREAM_ON
    ```
  </Step>
</Steps>
