Exposure and line_length settings for IMX-678

The doc for line_length is as follows:

Pixel line width horizontal timing size for the sensor mode. Used to calibrate the features in the camera stack. The value must be greater than or equal to active_w.

Unfortunately, the IMX-678 software reference datasheet defines frame line length differently (register is VMAX in MASTER mode) and that value is significantly less than active_w for 4k@30Hz. Is that OK?

Next, the IMX678 has a calculated integration time based on the shutter sweep speed. I have made changes to both the device tree and driver to adhere to formula outlined in the spec.

However, when I am testing it, I am seeing weird behavior between gst/nvarguscamerasrc and the driver. Namely, the value passed to my imx678_set_exposure function:

GST_ARGUS: 3856 x 2180 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 0.000000, max 72.000000; Exposure Range min 21459000, max 16073194000;

No matter what values I put in for exposuretimerange with aelock=True I always see the value passed into the driver as 21459.

Device tree settings are as follows:

max_exp_time "14612"
min_exp_time "6"
default_exp_time "6"
line_length "2250"
step_exp_time "1"
exposure_factor "1"

For example, if I pass exposuretimerange 20000 20000 aelock=True within my record pipeline, my driver sees for an exposure value 3333 when I would expect 20 (I assume it converts ns to us) and then the correct value for the shutter sweep speed is wrong. If put in 14612000 I get a value passed to my function of 13507.

This is on a Jetson Nanon (JP 32.5.1) and one IMX-678 camera.

I noticed that “25” seems to be the floor.

EDIT: Another question I have is the minimum and maximum course integration time is in line units right, not microseconds? (same as version 1.0)

I think this maybe a precision issue with my exposure_factor being 1. Can you confirm?

Also, can you answer the question regarding `minimum/maximum course integration time" - I assume even in version 2 that is in lines not microseconds?

hello alex466,

these should be in micro seconds (us)
and… please try setting exposure_factor = "1000000"; which as same as reference driver.

correct, coarse integration time is the exposure intervals. the unit in lines.

Thank you! That worked!

Follow-up, does line_length have to be greater than active_w because in the spec sheet line_length is not (unless NVIDIA’s definition and the sensor’s manufacturer are different).

As you can see above, in fact, it’s static for all supported frame settings.

It also seems that the lowest exposure time is 25us. Is that hard coded somewhere?

Hi alex466,

Here you can check more information about the line_length:
https://docs.nvidia.com/jetson/archives/r36.2/DeveloperGuide/SD/CameraDevelopment/SensorSoftwareDriverProgramming.html#device-properties
line_length

Pixel line width horizontal timing size for the sensor mode. Used to calibrate the features in the camera stack.
The value must be greater than or equal to active_w

And about the exposure. You can change it in your device-tree and you have to create an exposure control in your driver implementation.

Best,

Best,

Juan Diego Delgado
Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com
Website: www.ridgerun.com

Right, I see that. But the software reference manual clearly shows the pixel line width < active_w for the sensor in all supported modes (see “Operating Modes”) - unless somehow I am not reading it correctly.

Exposure is working now as before it was way off (the numbers being sent to the register made absolutely no sense).

In fact, 1 frame line length or VMAX .

VMAX is defined as:

Sets the number of lines per frame

That I believe is what NVIDIA calls line_length. @JerryChang, is that correct?

I think the doc is wrong. I think it means line_length >= active_h.

hello alex466,

there’re line length and frame height settings from sensor side usually.
line stands for horizontal direction (active_w), and frame for vertical direction (active_h).

Ok. Then that’s HWIDTH which basically the same as active_w. Things appear to be working and we are now passing the conformance tests which is good news (we were failing before).

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.