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.

SCD algorithm in DVRRDK 03.00

Hi TI-friends,

  I ported our motion detection algorithm in DVRRDK_02.80 and it works fine after out long time test. 
Now I try to port it in DVRRDK_03.00. But I always got the following message
 ...
 [c6xdsp ]  12179: SCD   : VA ALG Init Done of Channel - 0!!!
 [c6xdsp ]  12179: SCD   : VA Create Call Status 0x1!!!
 [c6xdsp ]  12179: Assertion @ Line: 267 in links_c6xdsp/alg_link/scd/scdLink_alg.c: libStatus == DMVAL_NO_ERROR : failed !!!
 ...

  I try to disable DMVAL module by seting DMVAL_DETECTMODE_DISABLE. But I still got the same message.

  I check the following error code in ./hdvpss/hdvpss_01_00_01_37_patched/packages/ti/psp/vps/fvid2.h and it just said
    "software failure"

 /**
  *  \name FVID2 Error Codes
  *
  *  Error codes returned by FVID2 APIs
  *
  *  @{
  */

 /** \brief FVID2 API call successful. */
 #define FVID2_SOK                       ((Int32) 0)

 /** \brief FVID2 API call returned with error as failed. Used for generic error.
  *  It may be some hardware failure and/or software failure. */
 #define FVID2_EFAIL                     ((Int32) -1)


  Do you have any idea for this or could you describe more detail about "software failure"?

 

  • After printing more messages, I found the assertion was launchd by following function

            libStatus = DMVAL_create(pDmvaHndl,            // handle
                         pChPrm->detectMode,     // detectMode
                         pChPrm->imgType,        // imgType
                         pChPrm->sensitiveness,    // sensitivity
                         pChPrm->width,        // inputFrmWidth
                         pChPrm->height);        // inputFrmHeight

    And I printed all the necessary variables before the above function and got below

    in normal case (TI algorithm)
     [c6xdsp ]  ############# pDmvaHndl=-1613299812,
     [c6xdsp ]  pChPrm->detectMode=1,
     [c6xdsp ]  pChPrm->imgType=0,
     [c6xdsp ]  pChPrm->sensitiveness=5,
     [c6xdsp ]  pChPrm->width=352,
     [c6xdsp ]  pChPrm->height=240 !!!


    in assertion case
     [c6xdsp ]  ############# pDmvaHndl=-1613300580,
     [c6xdsp ]  pChPrm->detectMode=0,
     [c6xdsp ]  pChPrm->imgType=0,
     [c6xdsp ]  pChPrm->sensitiveness=5,
     [c6xdsp ]  pChPrm->width=352,
     [c6xdsp ]  pChPrm->height=240 !!!
     [c6xdsp ]  26857: SCD   : VA Create Call Status 0x1!!!
     [c6xdsp ]  26857: Assertion @ Line: 274 in links_c6xdsp/alg_link/scd/scdLink_alg.c: libStatus == DMVAL_NO_ERROR : failed !!!


    I try the normal case(TI algorithm) with disable detecMode and got following

     [c6xdsp ]  ############# pDmvaHndl=-1613300580,
     [c6xdsp ]  pChPrm->detectMode=0,
     [c6xdsp ]  pChPrm->imgType=0,
     [c6xdsp ]  pChPrm->sensitiveness=5,
     [c6xdsp ]  pChPrm->width=352,
     [c6xdsp ]  pChPrm->height=240 !!!
     [c6xdsp ]  12160: SCD   : VA Create Call Status 0x1!!!
     [c6xdsp ]  12160: Assertion @ Line: 275 in links_c6xdsp/alg_link/scd/scdLink_alg.c: libStatus == DMVAL_NO_ERROR : failed !!!

    My question is
    1. Could TI-friends tell me why it work fail when I try the detecMode with disable Mode.
    2. Any further idea to solve this?

  • Hi TI-friends,
    My goal is to replace the motion detection with ours. I think we just replace the IALG_Fxns(ex: SCD_TI) with ours
    and it should work (It can work in DVRRDK_02.80 but DVRRDK_03.00 in my side). But acutally it can't work because of
    the assertion in DMVAL module in creation. I think DMVAL module should be independent of SCD module. And in fact it
     looks like something dependent between them. Let me know if my though were wrong. Thanks

    I have tried to mark the DMVAL_ releated function and the preview video is normal. But the process inside SCD
     was hangup in following function
       Utils_queGet(&pObj->processQ, (Ptr*)&pFrame, 1, BIOS_WAIT_FOREVER);
     Any further idea?


  • I found something strange:
      ...
      chPrm->chId               = SCDChannelMonitor[chIdx];
      chPrm->mode               = ALG_LINK_SCD_DETECTMODE_MONITOR_BLOCKS_AND_FRAME;
      chPrm->frmIgnoreLightsON  = FALSE;
      ...

      when I change "chPrm->mode = ALG_LINK_SCD_DETECTMODE_DISABLE"
      the program will hangup

    Does any bodies know the reason?

  • The issue you are facing looks to be due to memory allocation failure on DSP as the DMVA alg requires significantly larger amount of memory. Can  you share details on how you disabled DMVA call. Did you comment out the create call as well ?

  • the parts I comment out are below
    1. AlgLink_ScdVACreate
    2. AlgLink_ScdVADelete
    3. DMVAL_DETECTMODE_XXX related process
    4. DMVAL_setParameter

    After I comment out the DMVAL_ parts, I test our alg for two months and it works fine.
    the only thing I do is to change the frame rate from 2 to 30 as below

        scd_ipcFramesOutVpssPrm.baseCreateParams.outputFrameRate = 2;

        scd_dspAlgPrm.scdCreateParams.inputFrameRate         = 2;

    And then after 2~3 days, it hangup always.

    I ever try with RDK_03.00_ without our implementation, and change something as the above.
    I still got the same hangup result.

    Any idea?

  • Dear,

    when I change the SCD algorithm, I replace the function SCD_xxx with MD_xxx,

    Q1. Should I modify DVRRDK_03.00.00.00\dvr_rdk\mcfw\src_bios6\cfg\ti816x\link_algs.cmd ?

    Q2. If yes, how could I do that?

  • No there is no need to modify link_algs.cmd. If you face any issue with warnign modify

    /dvr_rdk/makerules/rules_c674.mk

    Replace all occurence of

    ALG_LNKCMD = $(dvr_rdk_PATH)/mcfw/src_bios6/cfg/ti816x/link_algs.cmd

    by

    ALG_LNKCMD =

  • Badri Narayanan said:

    The issue you are facing looks to be due to memory allocation failure on DSP as the DMVA alg requires significantly larger amount of memory. Can  you share details on how you disabled DMVA call. Did you comment out the create call as well ?

    Dear Badri,
      I have more question

    Q1. the parts I comment out are below
        a. AlgLink_ScdVACreate
        b. AlgLink_ScdVADelete
        c. DMVAL_DETECTMODE_XXX related process
        d. DMVAL_setParameter

        is it correct?

    Q2. DMVA module could be commented in SCD process, right?

  • Hi,

    As long you are planning to port your own algorithm, you can comment out the functions listed by you. It is correct. DMVAL_xxx related calls are also algorithm calls. If you are not using algorithms provided by TI then please comment them out.

    There are two algorithms that run in SCD links (LMD and VA). I am not sure if you have disabled create and process calls related to both of them. Please take care of them.