Argus_gstvideoencode test wdr dol mode error

Hi All,

I want to use imx482 wdr dol mode, so I configue the device tree and driver.

		mode1 {/*mode IMX482_MODE_1920X1080_CROP_HDR_30FPS*/
			mclk_khz = "27000";
			num_lanes = "4";
			tegra_sinterface = "serial_e";
			phy_mode = "DPHY";
			discontinuous_clk = "no";
			dpcm_enable = "false";
			cil_settletime = "0";

			dynamic_pixel_bit_depth = "12";
			csi_pixel_bit_depth = "12";
			mode_type = "bayer_wdr_pwl";
			pixel_phase = "rggb";

			active_w = "1940";
			active_h = "2260";
			readout_orientation = "0";
			line_length = "4160";
			inherent_gain = "1";
			pix_clk_hz = "480000000";

			gain_factor = "1";
			min_gain_val = "0"; /* 0dB */
			max_gain_val = "240"; /* 12dB */
			step_gain_val = "1"; /* 0.3 */
			default_gain = "0";

			min_hdr_ratio = "4";
			max_hdr_ratio = "4";

			framerate_factor = "1000000";
			min_framerate = "2000000"; /* 2 */
			max_framerate = "30000000"; /* 30 */
			step_framerate = "1";
			default_framerate= "30000000";

			exposure_factor = "1000000";
			min_exp_time = "30"; /* us */
			max_exp_time = "683709"; /* us */
			step_exp_time = "30";
			default_exp_time = "2495";/* us */

			embedded_metadata_height = "1";

			// is_interlaced = "1";
			// interlaced_type = "0";
			
			/* WDR related settings */
			num_of_exposure = "2";
			num_of_ignored_lines = "7";
			num_of_lines_offset_0 = "35";
			num_of_ignored_pixels = "8";
			num_of_left_margin_pixels = "6";
			num_of_right_margin_pixels = "6";
		};

When I use v4l2-ctrl, I get the detail log. debug.log (856.8 KB)

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1940,height=2260,pixelformat=RG12 --set-ctrl=bypass_mode=0,hdr_enable=1,sensor_mode=1 --stream-mmap --stream-count=1 --stream-to=ov1080.raw

root@nx:#
[ 539.485627] [imx482_power_get] entry …
[ 539.485841] reset_gpio=412
[ 539.486101] [imx482_power_on][424] …
[ 539.531159] reg_val0=0xCA
[ 539.531536] reg_val1=0x8
[ 539.531703] [imx482_power_off][440] …
[ 539.542870] [imx482_power_on][424] …
[ 539.589029] [imx482_power_off][440] …
[ 750.073813] [imx482_power_on][424] …
[ 750.136748] [imx482_set_mode][513] … mode=1
[ 750.152605] [imx482_start_streaming][528] …
[ 750.287429] tegra194-vi5 15c10000.vi: corr_err: discarding frame 1, flags: 0, err_data 131072
[ 750.304105] tegra194-vi5 15c10000.vi: corr_err: discarding frame 2, flags: 0, err_data 131072
[ 750.320762] tegra194-vi5 15c10000.vi: corr_err: discarding frame 3, flags: 0, err_data 131072
[ 750.337518] tegra194-vi5 15c10000.vi: corr_err: discarding frame 4, flags: 0, err_data 131072
[ 750.354098] tegra194-vi5 15c10000.vi: corr_err: discarding frame 5, flags: 0, err_data 131072
[ 750.370808] tegra194-vi5 15c10000.vi: corr_err: discarding frame 6, flags: 0, err_data 131072
[ 750.387454] tegra194-vi5 15c10000.vi: corr_err: discarding frame 7, flags: 0, err_data 131072
[ 750.404126] tegra194-vi5 15c10000.vi: corr_err: discarding frame 8, flags: 0, err_data 131072
[ 750.420798] tegra194-vi5 15c10000.vi: corr_err: discarding frame 9, flags: 0, err_data 131072
[ 750.437485] tegra194-vi5 15c10000.vi: corr_err: discarding frame 10, flags: 0, err_data 131072
[ 750.454166] tegra194-vi5 15c10000.vi: corr_err: discarding frame 11, flags: 0, err_data 131072
[ 750.470692] tegra194-vi5 15c10000.vi: corr_err: discarding frame 12, flags: 0, err_data 131072
[ 750.487355] tegra194-vi5 15c10000.vi: corr_err: discarding frame 13, flags: 0, err_data 131072
[ 750.504027] tegra194-vi5 15c10000.vi: corr_err: discarding frame 14, flags: 0, err_data 131072
[ 750.520724] tegra194-vi5 15c10000.vi: corr_err: discarding frame 15, flags: 0, err_data 131072
[ 750.537479] tegra194-vi5 15c10000.vi: corr_err: discarding frame 16, flags: 0, err_data 131072
[ 750.554090] tegra194-vi5 15c10000.vi: corr_err: discarding frame 17, flags: 0, err_data 131072
[ 750.570755] tegra194-vi5 15c10000.vi: corr_err: discarding frame 18, flags: 0, err_data 131072
[ 750.587476] tegra194-vi5 15c10000.vi: corr_err: discarding frame 19, flags: 0, err_data 131072
[ 750.604096] tegra194-vi5 15c10000.vi: corr_err: discarding frame 20, flags: 0, err_data 131072
[ 750.620800] tegra194-vi5 15c10000.vi: corr_err: discarding frame 21, flags: 0, err_data 131072
[ 750.637440] tegra194-vi5 15c10000.vi: corr_err: discarding frame 22, flags: 0, err_data 131072
[ 750.654099] tegra194-vi5 15c10000.vi: corr_err: discarding frame 23, flags: 0, err_data 131072
[ 750.670813] tegra194-vi5 15c10000.vi: corr_err: discarding frame 24, flags: 0, err_data 131072
[ 750.687438] tegra194-vi5 15c10000.vi: corr_err: discarding frame 25, flags: 0, err_data 131072
[ 750.704143] tegra194-vi5 15c10000.vi: corr_err: discarding frame 26, flags: 0, err_data 131072
[ 750.720791] tegra194-vi5 15c10000.vi: corr_err: discarding frame 27, flags: 0, err_data 131072
[ 750.737385] tegra194-vi5 15c10000.vi: corr_err: discarding frame 28, flags: 0, err_data 131072
[ 750.754018] tegra194-vi5 15c10000.vi: corr_err: discarding frame 29, flags: 0, err_data 131072
[ 750.770690] tegra194-vi5 15c10000.vi: corr_err: discarding frame 30, flags: 0, err_data 131072
[ 750.787405] tegra194-vi5 15c10000.vi: corr_err: discarding frame 31, flags: 0, err_data 131072
[ 750.804068] tegra194-vi5 15c10000.vi: corr_err: discarding frame 32, flags: 0, err_data 131072

Becase maybe v4l2 standard controls should be not support to DOL-WDR raw files at current release versions. (How To Get Bayer Raw Data Of WDR DOL mode with 2 Frame Exposure?)
So, I want to use argus_gstvideoencode to test wdr dol mode. But it has following errors.
error:
=== NVIDIA Libargus Camera Service (0.97.3)=== Listening for connections…
[ 85.556592] [imx482_power_on][424] …
[ 85.601753] [imx482_power_off][440] …
=== argus_gstvideoencode[7120]: Connection established (7F829FD1D0)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
[ 104.330613] [imx482_power_on][424] …
[ 104.374769] [imx482_power_off][440] …
[ 104.379546] [imx482_power_on][424] …
[ 104.422717] [imx482_power_off][440] …
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
---- imager: No override file found. ----
[ 104.438112] [imx482_power_on][424] …
[ 104.482437] [imx482_power_off][440] …
[ 104.483906] [imx482_power_on][424] …
[ 104.528394] [imx482_power_off][440] …
[ 104.530274] [imx482_power_on][424] …
[ 104.574689] [imx482_power_off][440] …
LSC: LSC surface is not based on full res!
=== argus_gstvideoencode[7120]: CameraProvider initialized (0x7f7c80fd30)LSC: LSC surface is not based on full res!
[ 104.955007] [imx482_power_on][424] …
[ 104.999389] [imx482_power_off][440] …
(Camera_ISP) Error BadParameter: Linearization curve doesn’t have enough points after (in state_update/blocks/TF.cpp, function update_TF_isp5(), line 356)
(Camera_ISP) Error BadParameter: (propagating from state_update/blocks/TF.cpp, function NvCameraIspUpdateState_TF0_isp5(), line 44)
(Camera_ISP) Error BadParameter: (propagating from state_update/nvcamera_isp_update_state.cpp, function NvCameraIspUpdateInputStateHw(), line 100)
SCF: Error BadParameter: (propagating from src/services/autocontrol/NvCameraIspDriver.cpp, function generate(), line 1161)
SCF: Error BadParameter: (propagating from src/components/ac_stages/AcMergeStage.cpp, function doHandleRequest(), line 84)
SCF: Error BadParameter: (propagating from src/components/stages/OrderedStage.cpp, function doExecute(), line 158)
SCF: Error BadParameter: Sending critical error event (in src/api/Session.cpp, function sendErrorEvent(), line 990)
=== argus_gstvideoencode[7120]: Connection closed (7F829FD1D0)

Please how to fix the error and how to test the WDR DOL mode?

hello tangqc023,

you’re correct that v4l2 standard control did not support raw capture for DOL-WDR images.
you may enable MMAPI, please enable argus_camera application which has mode selection options.
BTW, had you confirm the basic sensor functionality, is your SDR sensor mode works?
thanks

Hello JerryChang,

Yes, My SDR sensor mode works well.
where is argus_camera application, I don’t find it in develop package.

hello tangqc023,

you may install MMAPI to include it.
here’s readme file to include the steps for building samples and Argus application.
for example, /usr/src/jetson_multimedia_api/argus/README.TXT

BTW,
did you purchase your camera sensor through Jetson Camera Partners?
you may also contact with them for further supports.
thanks