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.

Linux/TDA2EXEVM: TDA2 ISSCAPTURE

Part Number: TDA2EXEVM

Tool/software: Linux

Dear Sir:

  We are using VSDK 03_04_00_00.

  We try to use the CSI2 format to capture from the MIPI interface. When setting the inCsi2DataFormat to SYSTEM_CSI2_YUV422_8B, it is okay. However when trying using the SYSTEM_CSI2_YUV420_8B or SYSTEM_CSI2_YUV420_8B_LEGACY, it fail to create the ISSCAPTURE link. By tracing the code, I see that the underlying link only support SYSTEM_CSI2_YUV422_8B, but not supporting the 420 format. But if tracing the PDK driver, we can see there is no such forbidden case in the PDK.

  Because the heat problem in the CPU, we want to try lower down the CSI2 transmitted data to reduce the heat when 8 channel(4CH in Parallel and 4 CH in CSI-2) are using in our board.

  My question is that: is it possible to use YUV420_8B or 420_8B_LEGACY in the PDK? Because both of these 2 types sending less data through the CSI-2 interface. Dos PDK support it? Or does TI has any plan to support it in ISSCAPTURE link in the future?

Regards,

/ckhsu

  • Hi ckhsu,

    ISS Capture driver supports all formats, but link is limited to few formats. You could easily add support for these formats in the iss capture link. The change required are in this check data format function and buffer allocation function. Can you make the changes and try it out?

    Regards,
    Brijesh
  • Hi Brijesh:
    I see. I paste the places that should be modified in the end of the response, please let me know whether it is correct place or not.
    However from what I understand, the LEGACY YUV420 8 bit frame is send through MIPI as following:
    U1Y1Y2 U3Y3Y4 ...... U637Y637Y638U639Y639Y640 ==> Odd line
    V1Y1Y2 V3Y3Y4 ...... V637Y637Y638V639Y639Y640 ==> Even line
    ......
    In LEGACY YUV 420 8bit the pitch is fixed, it should be okay to add in the ISSCAPTURE link.

    But the YUV 420 8bit data in the MIPI is
    Y1Y2......Y639Y640 ==> Odd lines
    U1Y1V1Y2U3Y3V3Y4......U637Y637V637Y638U639Y639V639Y640==> Even Lines
    And the Odd and Even lines are in different sizes. And how this should be modify in the Link code? Or should this type be ignore in the link? Because This color space is quite different from the original UYVU422 or YUV420SP etc, I don't know how this should be done in described in the QueueInfo and Frames buffer struct.
    Can you give me some hints about this color space?


    I suppose the place to add the code is in this part inside IssCaptureLink_drvCreate.
    //////////////////////////////////////
    for (chIdx = 0U; chIdx < pPrm->numCh; chIdx++)
    {
    pitchMul = getPitchMultiplier(&pPrm->outParams[chIdx],
    pObj->createArgs.videoIfMode,
    pObj->createArgs.videoIfWidth);

    pQueChInfo = &pObj->info.queInfo[0U].chInfo[chIdx];
    pQueChInfo->width = pPrm->outParams[chIdx].width;
    pQueChInfo->height = pPrm->outParams[chIdx].height;
    pQueChInfo->startX = 0;
    pQueChInfo->startY = 0;
    pQueChInfo->pitch[0] =
    SystemUtils_align(pObj->createArgs.outParams[chIdx].maxWidth *
    pitchMul, ISSCAPTURE_LINK_BUF_ALIGNMENT);
    pQueChInfo->pitch[1] = 0;
    pQueChInfo->pitch[2] = 0;
    pQueChInfo->flags = System_Link_Ch_Info_Set_Flag_Data_Format(pQueChInfo->flags,
    pObj->createArgs.outParams[chIdx].dataFormat);
    pQueChInfo->flags = System_Link_Ch_Info_Set_Flag_Scan_Format(pQueChInfo->flags,
    SYSTEM_SF_PROGRESSIVE);
    /* Using complex IO cont flag instead of PHY/PPI, as CAL would require
    an instance of complex io for an instance of PHY */
    UTILS_assert(VPS_ISS_CAL_MAX_CMPLXIO_INST >
    pObj->createArgs.outParams[chIdx].phyInstance);
    }
    /////////////////////////////////////////
    I suppose the Bualloc is in Int32 IssCaptureLink_drvAllocFrames(IssCaptureLink_Obj *pObj)
    And in
    if(System_useLinkMemAllocInfo(
    &pObj->createArgs.memAllocInfo)==FALSE)
    {
    fvid2Frame->addr[0][0] =
    Utils_memAlloc(
    UTILS_HEAPID_DDR_CACHED_SR,
    pObj->outBufSize,
    SYSTEM_BUFFER_ALIGNMENT
    );
    }
    else
    {
    fvid2Frame->addr[0][0] =
    System_allocLinkMemAllocInfo(
    &pObj->createArgs.memAllocInfo,
    pObj->outBufSize,
    SYSTEM_BUFFER_ALIGNMENT
    );
    }
    /////////////////////////////////////////////////////////////

    Regards,
    /ckhsu
  • Hi Brijesh:
    The MIPI 420 information can be found in the MIPI document. And there is a draft documents on net
    electronix.ru/.../index.php
    Please see the page 77 for YUV420 8 bit packet format.

    Regards,
    /ckhsu
  • Hi ckhsu,

    You could change the pitch and set the CSI data type to capture this frame.
    But how do you separate luma and chroma planes. Capture modules will not be able to separate them, they will be interleaved when captured..

    Rgds,
    Brijesh