Common Errors and Problems of Qcom Platform Camera

        This article mainly records some errors and problems encountered in the debugging process, as well as related settings, logs, solutions, etc. If there is an error, please communicate and correct me.

Table of contents

debug frame freeze error

Debug camera App flashback error

Debug cam banding phenomenon

Debug cam AEC algorithm library file

debug cam chromatix 

Debug flash flash - continuous flash

Debug cam distortion coefficient, distortion coefficient (fisheye wide-angle lens)


debug frame freeze error

frame freeze error sof freeze

mm-camera: <MCT   ><ERROR> 94: mct_bus_sof_thread_run: Session 1: Hinting SOF freeze to happen


Debug camera App flashback error

Modify cam vnedor driver

Cam cannot set a single set of max_fps=60 in the vendor driver, otherwise the application will crash.
At least set a set of max_fps=30 parameters for preview.
To verify the 60fps signal, you can switch to the high frame rate mode HFR_60 in the recording mode to verify.

Debug cam banding phenomenon


An incorrect vt clock will also cause banding
to set the recommended rate setting of 4 alne or 2lane recommended by the IC manual

Banding value setting (water ripple related)

CAM_ANTIBANDING_MODE_AUTO_50HZ , 5 : CAM_ANTIBANDING_MODE_AUTO_60HZ
property_get("persist.vendor.camera.set.afd", prop, "5");

path:

hardware\qcom\camera\QCamera2\HAL3\QCamera3HWI.cpp

Code such as:

// Set 50 HZ banding configuration
adb shell setprop persist.vendor.camera.set.afd 4
// Set 60 HZ banding configuration
adb shell setprop persist.vendor.camera.set.afd 5


Debug cam AEC algorithm library file

aec_biz.c 
vendor\qcom\proprietary\mm-camera\mm-camera2\media-controller\modules\stats\q3a\aec

debug cam chromatix 

With a wavelength of around 950 nm, through red and blue light, the combined effect is purple. The current judgment is caused by a violet filter.


debug cam offset offset

Attributes:

offset -- linecount offset, set as recommended by the manual

Code such as:

/* IMX307 CONSTANTS */
#define IMX307_MAX_INTEGRATION_MARGIN   2
.vert_offset = IMX307_MAX_INTEGRATION_MARGIN,

Source of value:

 

 
 Debug cam vt, op, clk configuration and calculation method 

Code such as:

 .vt_pixel_clk = 178000000,  // line_length_pclk * frame_length_lines * max_fps
 .op_pixel_clk = 445500000,  // MIPI CLK * 2 * Lane cout / 10bit

principle:

1. This is the clock of the camera mipi. We configure 254.4MHz here. The unit must pay attention. Once FAE wrote this value by mistake, which caused the power consumption of the camera to increase. After a long time of power consumption testing, it was found that this place was wrong. 2.
The explanation of this is the VFE clock, which means the amount of data processed by the VFE per second (in pixel), which is a unit that indicates the speed of processing data. If it is a full size, then it must be configured larger. If it is a small size, there is no need to configure a large size.
3. This op_pixel_clk will affect power consumption. Note that this configuration cannot be in the same frequency band as the antenna, or the multiple of this frequency cannot fall into the frequency band of the antenna, otherwise it will interfere with the antenna.
4. This clock determines the bandwidth of the data output by the sensor mipi data lane; different

.data_rate = 1296000000ULL * 4 // == line_length_pclk * frame_length_lines * max_fps * 10bit

Debug flash flash - continuous flash

        A camera? That's a design that prevents red-eye in photos.
First understand what is red eye.
        The phenomenon of "red eye" occurs: because the distance between the flash axis of the flash and the optical axis of the lens is too close, the pupils of people will become larger when the external light is very dark. When the flash of the flash shines on the fundus through the pupils, densely The tiny blood vessels in the small blood vessels under the light show bright red reflections, and the natural phenomenon of "red dots" on the eyes is "red eye". The principle of anti-red eye function is aimed at this "red eye" phenomenon, and many digital
cameras  
        also Corresponding "countermeasures" have been made. The function of eliminating "red-eye" in general digital cameras is mainly through the pre-flash of the flash, which causes the pupils to shrink to a certain extent to reduce the reflected red light. Although this method can effectively reduce the "red-eye
       " The phenomenon of "red eye" is actually very limited, and it is not really completely eliminated or avoided from the occurrence of the "red eye" phenomenon. Reasonable avoidance of the "red eye"
        phenomenon is more effective except for pre-flash of the camera flash or making some technical improvements. The method is to use diffuse light, let the flash do a certain degree of refraction (shine toward the ceiling, and then refract on the portrait), or use an external flash to increase the distance between the lens and the flash, which can effectively eliminate red-eye .


Debug cam distortion coefficient, distortion coefficient (fisheye wide-angle lens)

Reference link:
  https://blog.csdn.net/xiong452980729/article/details/49964265

Guess you like

Origin blog.csdn.net/FANG_YISHAO/article/details/118720175