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/TDA2PXEVM: TDA2PXEVM

Part Number: TDA2PXEVM

Tool/software: Linux

Hi, 

My usecase is below.

IssCapture -> IssM2mIsp -> Select_Capture -> IssM2mSimcop -> Merge_Simcop -> Dup_Simcop

Select_Capture -> Merge_Simcop
Dup_Simcop -> Sync_Org -> Alg_DmaSwMs -> Display_Org

Dup_Simcop -> Sync_CensusIn -> Dup_CensusIn -> Alg_Census (EVE1) -> Alg_DisparityHamDist (EVE1) -> Merge_StereoOut -> Alg_StereoPostProcess (DSP1) -> Display_Disparity
Dup_CensusIn->Merge_StereoOut
IssM2mIsp -> Alg_IssAewb
GrpxSrc -> Display_Grpx

When "AlgIvision_create" is called in Alg_StereoPostProcess Link, the malloc is run.

The path of the function is vision_sdk/apps/src/rtos/alg_plugins/stereo_postprocessing/stereoPostProcessLink_algPlugin.c.
(line 421: pStereoPostProcessObj->handle = AlgIvision_create(&STEREOVISION_TI_VISION_FXNS, (IALG_Params *)(pAlgCreateParams));)


This malloc function returns address and the fxns->ialg.algAlloc is run.
But, the status value is -1023 after fxns->ialg.algAlloc is run. 
(AlgIvision_create_useLinkMem())

What is problem?

I think that it look like memory of the algorithm is not allocated.

  • Hi Kim,

    AlgAlloc is a callback function, needs to be implemented in the plugin layer. Algorithm calls this callback whenever it needs memory, so this function should be implemented in the plugin and the implementation should allocate the memory as requested by algorithm.
    Can you please check the alloc algo implementation?

    Rgds,
    Brijesh
  • Hi Brijesh,

    But, other algoritms like Alg_Census and Alg_DisparityHamDist run well.
    I thinks these algorithms call AlgAlloc callback, too.

    Rgds,
    Heechang
  • Hi Brijesh,

    I'm sorry.
    I have a mistake.
    I did not add the algorithm to cfg.mk

    Thanks
    Rgds,
    Heechang
  • Hi Brijesh,

    The result is same although I add the algorithm to cfg.mk

    Thanks
    Rgds,
    Heechang
  • Hi Kim,

    ok, i am exactly not sure why it is failing. I see in the other usecases that they call ChainsCommon_Stereo_SetStereoPostProcessPrms to initialize create params of Stereo Post Processing algorithm, Can you check if this is called from your usecase?
    Also iVision_Create is implemented in the alg_plugin\common\alg_ivision.c file. can you step inside this code and check where exactly it fails?

    Rgds,
    Brijesh
  • Hi Brijesh,

    Should I add the Alg plugin to hlos/MAKEFILE_adas.MK?

    Thanks
    Rgds,
    Heechang
  • Hi Brijesh,

    1. Yes, I call the ChainsCommon_Stereo_SetStereoPostProcessPrms() in chains_common_stereo.c

    2.
    when "AlgIvision_create" is called, the malloc is run.
    This malloc function returns address and the fxns->ialg.algAlloc is run.
    But, the status value is -1023 after fxns->ialg.algAlloc is run.
    (The function is AlgIvision_create_useLinkMem())

    Rgds,
    Heechang
  • Hi Kim,

    I dont see 1023 in the list of error codes, i don't have code to check algAlloc callback.
    Let me check the colleague and get back to you.

    Regards,
    Brijesh
  • Hi Brijesh,

    StereoImageDims gStereoImDims;

    gStereoImDims.disparityOutputRoiWidth= stereoOutputWidth; //1920
    gStereoImDims.disparityOutputRoiHeight= stereoOutputHeight; //1080
    gStereoImDims.remapImageWidth= remapWidth; //1920
    gStereoImDims.remapImageHeight= remapHeight; //1080


    I set the parameters as above and the memory error message is shown.
    So, I changed these parameters smller, 640 and 480.
    Then, the alloc error message disappeared.
    But, the screen is green.

    Some limitation is in parameters?

    Regards,
    Heechang
  • Hi Kim,

    It may be, but i am not sure, i am checking with the colleague.

    Regards,
    Brijesh
  • Hi Kim,

    The error corresponds to image width exceeding the maximum allowed. The maximum image width supported is 1440 pixels. Please see header file C:\PROCESSOR_SDK_VISION_03_03_00_00\ti_components\algorithms\REL.200.V.ST.C66X.00.03.00.00\200.V.ST.C66X.00.03.00.00\modules\ti_stereovision\inc\istereovision_ti.h

    In order to handle a larger image width, you can split your screen in 2 halves and call the function two times with different pointers and with stride equal to the overall width.

    For example to process 1920x1080, divide your screen into 2 ROIs of 960x1080 but with stride=1920 .

    regards,

    Victor

    Victor

  • Hi Victor,

    I'm running the usecase iss_mult_capture_isp_simcop_stereo_tda3xx from RTOS to HLOS.

    Select_Capture -> Merge_Simcop
    Dup_Simcop -> Sync_Org -> Alg_DmaSwMs -> Display_Org
    Dup_Simcop -> Sync_CensusIn -> Dup_CensusIn -> Alg_Census (EVE1) -> Alg_DisparityHamDist (EVE1) -> Merge_StereoOut -> Alg_StereoPostProcess(DSP1) -> Display_Disparity
    Dup_CensusIn->Merge_StereoOut
    IssM2mIsp -> Alg_IssAewb
    GrpxSrc -> Display_Grpx


    But, the disparity display result is some strange like only detecting edge.
    Is there related between input resolution and remap resolution?

    My case is input size 1920x1080 and 2 channels.

    Regards,
    Heechang
  • Hi Heechang,

    I am not sure where the problem could be as we never tested for this resolution. Can you share with TI all the files you modified so that we can review the changes ? Thanks.

    regards,

    Victor