This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4AEN-Q1: TDA4EN + 4* OX03F@30fps AE&AWB Converage too slow

Part Number: TDA4AEN-Q1


Tool/software:

Hi TI Expert,

When we were debugging 4 * OX03F +tda4_en, we found that AE convergence was very slow when entering and leaving the tunnel. We simulated that it took 10ms to complete the convergence when the  brightness was switched from 8000lux to 5lux. We tried to modify Adjratio step and skip_ae_frames, and the convergence speed will be about 2s faster than before. But run the single_camera, it take less than 1s. The question video it attatched. Please help me debug and slove the question. Thank you!

Best Regards,

renhui

  • add sdk version : 10.0.2.  and  system chart below:

  • Hi renhul,

    In multi-cam app with IMX390 with SDK release, AE is slowed down to once every 10 frames by default and IMX390 runs at 30fps.
    In single-cam app with IMX390, AE runs at once every 3 frames with 60fps IMX390.

    If you have X3F running at 30fps in both cases, you may get AE to run at the same speed.
    Do you see any different between single-cam and multi-cam with 1 camera?

  • Hi Gang,

    We also found this problem, skip_frames =9 when running multi-cam and skip_frames =0 when running single_came. We tried to modify skip_num_ae_frames =0 in EDGEAI, but the log print was still 9. Therefore, we modified the logic of vx_aewb_target.c. It seems that the period is changed, but the overall convergence speed is faster, but it still fails to meet the requirements. The attatchment is the vx_aewb_target.c after change.  1805.vx_aewb_target.c

    If you have X3F running at 30fps in both cases, you may get AE to run at the same speed.
    Do you see any different between single-cam and multi-cam with 1 camera?

    A :  you mean test both run_single_camera and run_multi_camera use the 1 camera to see the difference?

  • A :  you mean test both run_single_camera and run_multi_camera use the 1 camera to see the difference?

    Yes, I am trying to understand why you see a difference between the two apps.

  • It seems that the period is changed, but the overall convergence speed is faster, but it still fails to meet the requirements.

    You may check if you have this line if set to 1 or not.

    https://git.ti.com/cgit/processor-sdk/imaging/tree/algos/ae/src/TI_aaa_ae.c?h=main#n100

  • Hi Gang,

    Thanks for your advice!

    We test the two apps with the same camera.it seems the converage speed is close,and we set h->frame_num_period = 1,and set the skipAE=0, the converage speed is faster than before,it cost about 4~5 s, but single app take 0.5s. So the different converage speed root cause is the 4-camera is handle one by one,frame by frame?  The multi-app(4 camera) need 4x time to converage?  Is there any other way to optimize this multi_app convergence speed?

  • Hi Gang,

    It seems that it takes about half of the time to adjust the exposure time at the beginning, and then convergence seems to be faster, about 5-6 frames change,what could be the cause?

  • Hi Renhui,

    the converage speed is faster than before,it cost about 4~5 s, but single app take 0.5s.

    Theoretically, with a single camera, both multi-cam and single-cam may get AE to behave the same as there is no resource limit of the R5 core for running 2A.

    You shall be able to see that AE runs every frame in single-cam (for adjusting sensor exposure).
    Do you see that in multi-cam with a single camera?

    If AE is slow, it means that it does not adjust sensor every frame.

  • Hi renhui,

    Is your camera running at 30fps under both single-cam and multi-cam apps?

  • Hi Gang,

    Is your camera running at 30fps under both single-cam and multi-cam apps?

    A: Yes,both is 30fps

    If AE is slow, it means that it does not adjust sensor every frame.

    A: Yeah,We found that after the environment went from light to dark, it took 20 frames to start the first AE modification, and then every 5 frames. But we didn't find thr root cause, Do you have any other methods to optimize?

  • Hi renhui,

    it took 20 frames to start the first AE modification, and then every 5 frames.

    Do you mean AE is not triggered for the first 20 frames and then triggered only once every 5 frames?

    That looks like a s/w issue.

    Can you trace in the code to see why multi-cam app behaves this way?

  • Hi Gang,

    According to your suggestion, we found that our display frame rate is only 15fps, and after improve, the entire convergence process  takes about 3s. May I ask whether 3s is the fastes convergence process in multi-app? Our goal is to achieve 1s, may I ask whether it is possible to achieve this? The attatchment is the latest video,thanks!

  • Hi renhui,

    we found that our display frame rate is only 15fps

    Thanks for the update!

    the entire convergence process  takes about 3s

    That is about 90 frames and slower than I would expect.
    Are you sure if AE is making change frame by frame?

    From the share video, it seems that the 4 cameras might be updating exposure one by one.
    Could you please share a log of AE decisions frame by frame?

  • Multi-app.txtsingle-app.txtHi Gang,

    It seems that the exposure gain is updated every frame, please help to confirm whether the convergence time can continue to shorten. We have also done splicing for the 4 channels at present, and whether this has affected the convergence? Please find the attached log, thank you!

  • Hi renhui,

    converage speed is faster than before,it cost about 4~5 s, but single app take 0.5s

    It seems AE is already running at 30fps for both multi-cam and single-cam in your screen capture.
    Do you still see this 8x difference AE speed difference?

    We have also done splicing for the 4 channels at present, and whether this has affected the convergence?

    What is "splicing for the 4 channels"?

    One test you may try is to let AE to send exposure changes only to 1 of the 4 cameras (no I2C traffic for the other 3).
    Theoretically, AE should behave the same in single-cam and multi-cam.

  • Hi Gang,

    It seems AE is already running at 30fps for both multi-cam and single-cam in your screen capture.
    Do you still see this 8x difference AE speed difference?

    A:It seems that  4x convergence speed.

    What is "splicing for the 4 channels"?

    A: We use app_run_graph_for_one_pipeline function  combine 4 image into one image output.

    One test you may try is to let AE to send exposure changes only to 1 of the 4 cameras (no I2C traffic for the other 3).
    Theoretically, AE should behave the same in single-cam and multi-cam?

    A:We use multi-app light up only 1 camera,the converage speed is close to single-app.

  • Hi renhui,

    A:We use multi-app light up only 1 camera,the converage speed is close to single-app.

    (a) Multi-cam 1-camera AE is as fast as single-cam.
    (b) Multi-cam 4-camera AE is 1/4 as fast as single-cam.

    We see that AE works frame by frame at 30fps in both (a) and (b).
    What difference do you see in the AE output for the common camera?

    It seems impossible unless AE does not get its input updated from VISS or sensor does not receive i2c commands.

  • Hi Gang,

    What difference do you see in the AE output for the common camera?

    A: I see no difference. I think 4 cameras share the same ISP pipeline, so the AE convergence time will be 4x that of a single camera.

  •  I see no difference.

    Then sensor exposure should change at the same speed.
    Please confirm the AE output sequence in both cases.

    I think 4 cameras share the same ISP pipeline, so the AE convergence time will be 4x that of a single camera.

    That should not happen.
    All VISS shall be able to support 4x cameras at 30fps.
    Within 33ms, VISS can finish all 4 camera images and AE shall be able to handle 4 cameras as well and send exposure changes to sensors.