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.

TDA2P-ACD: ISP :: 8 channel de-Bayering

Part Number: TDA2P-ACD

Hi.

Because my previous post was marked as 'Resolved'
e2e.ti.com/.../858702
I decided start new topic as 'Related question'.

We have successfully connected 8 cameras to TDA2P-EVM using both CSI2 ports (4 cameras to 'csi2_0' using 4DL mode and 4 cameras to 'csi2_1' using 2DL mode).

Csi-data flow normally and we got 8 live images from 8 cameras, but now We have a problem with 8 channel de-bayering using ISP.
(see attached picture).


Only 4 channel of ISP works. Other 4 cameras data looks like not de-Bayering.

The question is about ISP. Does it support 8 cameras for De-Bayering?

If I compare TDA3_TRM(SPRUIE7D, page 1950) and TDA2P_TRM(SPRUIF0B, page 2234), then I can see:

"Multi-camerause cases: –  Up to 4 simultaneous cameras. ISP is time shared." (both for TDA3 & TDA2P)

but

"ISP supports a pixel throughput of 212.8MPix/s." (TDA3 only)

"ISP Up to 532 MPix/s throughput" (TDA2P only)

Our pixel throughput is about 295MPix/s for 8 cameras. So, TDA3 is not enogh, but TDA2P is OK.

The question is: Does TDA2P ISP supports 8 cameras de-bayering?
TDA2P_TRM say about 4 cameras, but It can be Ctrl-C/Ctrl-V(copy/paste) mistake from TDA3_TRM.

ISP is time shared, so I can suppose that ISP can processing up to 8 cameras.

The second question is about Vision_SDK. ISP-link has define-constant for 4 cameras. Can we legitible replace this constant to 8 and then make re-build?
We already changed this constant to 8 and we can see that data flows from 8 cameras (IssCapture) and ISP accept 8 channels (see attached log). But only first 4 channels (0-3) are de-Bayered, but other 4 channels(4-7) are not.

The last strange situation is that csi2_1 (2DL mode) is coming only 15 fps, but csi2_0 (4DL mode) is 30fps.

Attached log demonstrate this situation. Channels 0-3 are mapped to csi2_1(2DL) mode, but channels 4-7 are mapped to csi2_0(4DL). This way we tested that is not csi port fault. ISP is done de-bayering only for first four channels 0-3 independant of csi port used.

How we can resolve this issue?

LOG FILE ATTACHED HERE

[[View:/cfs-file/__key/communityserver-discussions-components-files/791/TDA2P_2D00_LOG.txt:1230:0]]


regards

  • Hi,

    Please find answers to your questions below,

    1, Yes, ISP can support 8channels/camera, provided that the MP/s requirement is within the ISP processing limit. If you are just running ISP with the opp_norm, it will not be able to process all 8 channels in real time. And this is what i also see in the log. ISP takes around 4.3ms and for 8cameras, it would need almost 35ms.. So it will not run real time.. But having said that, it should still output some valid frames, may not be real time.. 

    2, Which vision sdk release you are using? You would also require to change the number of handles supported in the driver. 

    3, What is the input resolution of the camera? i think this would depend on the fps and resolution of the camera.

    Rgds,

    Brijesh

  • Hi.
    Cameras are 1280x960@30fps.
    Vsdk is latest 3.07
    The 1st thing that we are changed is
    vision_sdk/links_fw/include/link_api/issM2mIspLink.h
    ISSM2MISP_LINK_MAX_CH
    (4U) changed to (8U).
    What the next modifications we need to do?
    You said about handles.
    I can see
    ti_components/drivers/pdk/packages/ti/drv/vps/src/vpslib/isscore/vpscore_m2m.h
    VPSCORE_ISS_M2M_ISP_MAX_HANDLES (8u)
    Which type of handles did you mean?

  • Hi Senchuss,

    ok the changes look correct. 

    Can you try using opp_high? This should increase ISP frequency and so ISP processing time should get reduced. and it should be able to process all 8 channels.. 

    But my problem is not isp. Capture itself is not capturing at 30fps for both the instances. Driver Notify rate is 180, which 120 for one instances and 60 for the other. It seems to be some issue in SERDES or CSI BW. Can you please double check if it is ok?

    Rgds,

    Brijesh

  • Hello Brijesh,

    I work with senchuss. I think we discovered why images are corrupted. It is because of pixel processing contexts. There are only 4 of them on tda2px (according to trm). I saw a post 

    http://e2e.ti.com/support/processors/f/791/p/703535/2593582?tisearch=e2e-sitesearch&keymatch=%2525252522pixel%2525252520processing%2525252522#2593582

    where it is said that solution is in development. Before starting improving the fps we would like to receive correct images and know whether it is even possible. 

  • Hi Andrew,

    oh, i remember it now. 

    We cannot capture more than 4 channels, unless the sensor outputs in linear format for the rest of the channels. Please configure the sensor to output in linear 12bit format, not in 12bit mipi format.

    Rgds,

    Brijesh

  • Hi, Brijesh

    Please confirm if I have understood you correctly. We are using sony imx224 in CSI 4 lane output mode, i guess this is the mipi mode. There is also a RAW12 mode, is this the linear 12bit format you are talking about?

    If it is, then it will take some time to check. We are using ub962 with ub953 serializer which only functions in mipi csi mode. So to actually use linear format we would need different serializers (ub933 compatible)? 

    Is this the correct solution?

  • Hi, Brijesh.

    How about Line-Concatenated Mode?

    For example. The 1st UB962 combine 4 frames from cameras to one big metaframe. The 2nd UB962 combine 4 frames from cameras to another big metaframe.
    In this case I need to de-Bayering only two frames.
    Finally I need to configure EDMA3-controller to split/extract 4 frames from 1st metaframe and extract other 4 frames from 2nd metaframe.
    Is this technique can resolve our problem?

    best regards

  • Hi senchuss,

    Yes, that should possible. we can get complete super frame in the memory using two DMA channels and can then pass through ISP individual camera frames.

    But which modules does merging of 4 frames into one super frame?

    Rgds,

    Brijesh

  • Hello, Brijesh,

    It was already in raw12 mode,

    There were lines in code

    if (SYSTEM_BPP_BITS12_PACKED_MIPI == drvCalCfg->inFmt[strmId].bpp)
    {
    drvCalCfg->isPixProcCfgValid[strmId] = (UInt32)FALSE;

    /* These modules are not required */

    Which say that pixel processing context is disabled with mipi, so I changed bpp to mipi and now, images are looking normal 

    White Balance and AutoExposure now are working strangely. 

    But fps is still 15. The fps from PHY1 is 30 and from PHY2 15 even though they have the same setup, what could be the reason?

    [IPU1-0] 80.543280 s: [ ISSCAPTURE ] Link Statistics,
    [IPU1-0] 80.543341 s: ******************************
    [IPU1-0] 80.543402 s:
    [IPU1-0] 80.543463 s: Elapsed time = 37930 msec
    [IPU1-0] 80.543524 s:
    [IPU1-0] 80.543555 s: Get Full Buf Cb = 179.93 fps
    [IPU1-0] 80.543646 s: Put Empty Buf Cb = 164.88 fps
    [IPU1-0] 80.543707 s: Driver/Notify Cb = 179.91 fps
    [IPU1-0] 80.543768 s:
    [IPU1-0] 80.543829 s: Input Statistics,
    [IPU1-0] 80.543860 s:
    [IPU1-0] 80.544592 s: CH | In Recv | In Drop | In User Drop | In Process
    [IPU1-0] 80.544714 s: | FPS | FPS | FPS | FPS
    [IPU1-0] 80.544775 s: --------------------------------------------------
    [IPU1-0] 80.545141 s: 0 | 30. 0 0. 0 0. 0 30. 0
    [IPU1-0] 80.545293 s: 1 | 30. 0 0. 0 0. 0 30. 0
    [IPU1-0] 80.545415 s: 2 | 30. 0 0. 0 0. 0 30. 0
    [IPU1-0] 80.545537 s: 3 | 30. 0 0. 0 0. 0 30. 0
    [IPU1-0] 80.545659 s: 4 | 14.97 0. 0 0. 0 14.97
    [IPU1-0] 80.545812 s: 5 | 14.97 0. 0 0. 0 14.97
    [IPU1-0] 80.545934 s: 6 | 15. 0 0. 0 0. 0 15. 0
    [IPU1-0] 80.546086 s: 7 | 14.97 0. 0 0. 0 14.97
    [IPU1-0] 80.546208 s:
    [IPU1-0] 80.546239 s: Output Statistics,
    [IPU1-0] 80.546300 s:
    [IPU1-0] 80.546330 s: CH | Out | Out | Out Drop | Out User Drop
    [IPU1-0] 80.546422 s: | ID | FPS | FPS | FPS
    [IPU1-0] 80.546483 s: ---------------------------------------------
    [IPU1-0] 80.546574 s: 0 | 0 30. 0 0. 0 0. 0
    [IPU1-0] 80.546666 s: 1 | 0 30. 0 0. 0 0. 0
    [IPU1-0] 80.547032 s: 2 | 0 30. 0 0. 0 0. 0
    [IPU1-0] 80.547184 s: 3 | 0 30. 0 0. 0 0. 0
    [IPU1-0] 80.547276 s: 4 | 0 14.97 0. 0 0. 0
    [IPU1-0] 80.547398 s: 5 | 0 14.97 0. 0 0. 0
    [IPU1-0] 80.547520 s: 6 | 0 15. 0 0. 0 0. 0
    [IPU1-0] 80.547642 s: 7 | 0 14.97 0. 0 0. 0

    I have tried sbl_qspi_opp_high_a15_0_release.tiimage for high opp mode, but it didn't make any difference.

    Update:

    I figured out the fps issue, it was not connected with vision sdk

    The last remaining issue is with image quality. Oversaturated pixels become purple, because of that I guess aewb algorithm is not working properly.

    Maybe I should adjust something in ISP saturation configuration?

  • Hi Andrew,

    Could you please dump few raw frames from capture on second second PHY and share it? 

    I doubt it is getting captured correctly. 

    Rgds,

    Brijesh