[i.MX8MP] ISP: adding a new Sony 1080p sensor with ClearHDR technology.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[i.MX8MP] ISP: adding a new Sony 1080p sensor with ClearHDR technology.

1,813 Views
artsiomstaliaro
Contributor IV

Hello,

Im using L5.15.71_2.2.0 Yocto package (with isp-imx-4.2.2.16.0).

I need to add a new Sony 1080p sensor with ClearHDR mode.

ClearHDR mode function description:
This function outputs 2 different gain data of same pixel. By combining these images, the image which is like high bit image or HDR image can be gotten. Clear HDR has the following two modes.
The lines for low and high gain line are alternately output after the Embedded data line.

in vvcam module driver there no option directly to enable ClearHDR mode, i see only 3 options:

SENSOR_MODE_LINEAR,
SENSOR_MODE_HDR_STITCH,
SENSOR_MODE_HDR_NATIVE,

I've tried SENSOR_MODE_HDR_NATIVE - but i got a bit shifted picture.

What mode do i need to use?

Tags (2)
0 Kudos
9 Replies

1,785 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @artsiomstaliaro,

I hope you are doing well.

One can refer to 13.1.5.1 High-Dynamic Range (HDR) in i.MX 8M Plus Applications Processor Reference Manual for HDR support.

Please make sure that you have referred to 2.6.3 Native HDR Mode Porting in i.MX 8M Plus Camera and Display Guide

Thanks & Regards,
Dhruvit Vasavada

0 Kudos

1,778 Views
artsiomstaliaro
Contributor IV

Thank you for pointing to the documentation. The documentation mentions only compressed modes for Native HDR, but my sensor doesn't use compressed mode but uses interleaved lines (1st line with High Gain, 2nd line with Low Gain).

artsiomstaliaro_1-1679906906284.png

HG = High gain line, LG = low gain line.

Can you suggest the correct mode?

 

0 Kudos

1,768 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @artsiomstaliaro,

I hope you are doing well.

For Native HDR mode, ISP Pipeline expects compressed HDR data.

Please refer to Figure 13-2. Native HDR and Figure 13-3. DOL-HDR in MX 8M Plus Applications Processor Reference Manual for ISP Support in HDR mode.

vvcam_mode_info_s structure values need to be set based on the camera sensor mode and output format supported.

For Line-interleaved (staggered) HDR mode(uncompressed HDR data) SENSOR_MODE_HDR_STITCH  can be used and need to set .data_compress.enable = 0;

Please refer to 2.6.2.2 Create Sensor V4L2 Driver in VVCAM where vvcam_mode_info_s has values for all the modes and output format supported in pov2775 camera sensor.

Thanks & Regards,
Dhruvit Vasavada

0 Kudos

1,756 Views
artsiomstaliaro
Contributor IV

Hi @Dhruvit ,

thank you for the suggestion. I did a test with 3 HDR modes sensors have:
 - ClearHDR: used SENSOR_MODE_HDR_NATIVE + compress = 0. As a result, I got a shifted video, but it seems only a High Gain frame.

- DOL2-HDR: used SENSOR_MODE_HDR_STITCH + SENSOR_STITCHING_2DOL (also tried with SENSOR_STITCHING_L_AND_S), video does not even starts.

- DOL3-HDR: used SENSOR_MODE_HDR_STITCH + SENSOR_STITCHING_3DOL , video does not even starts.

I'm using ISP version isp-imx-4.2.2.16.0 and in vvcam I found:

vvcam/isp/isp_hdr.c: commented out using "#if 0" settings for HDR stitching and so on.
I feel like there are some limitations with settings in ISP for handling this sensor's HDR formats. 
Maybe I should use new version of Linux Yocto with new version of ISP?

0 Kudos

429 Views
Khai
Contributor I

Hi @artsiomstaliaro ,

Have you got this imx662 sensor work?

I face exactly the same problem as you describe above. I have tried all possible settings in imx8mp ISP and none of them work.

When the ISP is configured to SENSOR_MODE_HDR_STITCH + SENSOR_STITCHING_DUAL_DCG_NOWAIT, or SENSOR_MODE_HDR_STITCH + SENSOR_STITCHING_L_AND_S, I got the camera show at 1fps with the frames roll over the screen. It seems that IMX8MP can not identify frame header code from sensor.

 

0 Kudos

420 Views
artsiomstaliaro
Contributor IV

@Khai yes it works.

Needs to tune frame parameters to fit into ISP requirements.

1,721 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @artsiomstaliaro,

I hope you are doing well.

These modes should be selected based on camera sensor used.

Have you tried with SENSOR_STITCHING_DUAL_DCG mode?

Please refer to 13.1.5.1 High-Dynamic Range (HDR)  in RM for supported modes in i.MX8MP.

Please mention the camera sensor part number.

Maybe I should use new version of Linux Yocto with a new version of ISP?
[Ans]: One can refer to i.MX Linux Release Notes for the latest ISP version and kernel changes as there are changes in the latest version of isp-vvcam

Thanks & Regards,
Dhruvit Vasavada 

0 Kudos

1,658 Views
artsiomstaliaro
Contributor IV
Yes, I've tried SENSOR_STITCHING_DUAL_DCG without luck. Sensor is Sony IMX662
0 Kudos

1,635 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @artsiomstaliaro,

Customers have to set vvcam_mode_info_s based on the output format supported in the custom camera.

One can set the stitching mode from the below table.

Screenshot from 2023-04-17 19-00-53.png

Please make sure that you have configured other settings correctly as shown in 2.6.2.2 Create Sensor V4L2 Driver in VVCAM in i.MX 8M Plus Camera and Display Guide

Please make sure that sensor registers are configured correctly for HDR mode. 

Please refer to /vvcam/v4l2/sensor/ov2775/ov2775_mipi_v3.c in isp-vvcam where settings for ov2775 sensor are given.

Thanks & Regards,
Dhruvit Vasavada

0 Kudos