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.

RTOS/TDA2PXEVM: Vision SDK Duplicating Frame for VPE Mosaic input

Part Number: TDA2PXEVM


Tool/software: TI-RTOS

Hello,

I am having issue with duplicating frames using Dup Link to use as input for Alg_VpeSwMs.

I am trying to explore the capabilities of Alg_VpeSwMs (TI's Mosaic View Algorithm), but current do not have access to a camera.
Thus I am using NullSource to read frames from a file, the use case is as follows:

NullSource (IPU1_0) -> Decode -> VPE -> Dup -> Sync -> Alg_VpeSwMs -> Display

The intention is to test mosaic view with varying number of views (from 1 - 4).
A user input numViews determines the number of outgoing channel for the Dup Link.

When using 1 view (1x1), there is no problem and the chain above works as intended.
But as when I change to 2 views (1x2), the usecase hangs-up.

My guess is that I am configuring Dup -> Sync link incorrectly.

       //Dup -> Sync
       pObj->DupPrm.outQueParams[0].nextLink = pObj->SyncLinkID;
       pObj->DupPrm.outQueParams[1].nextLink = pObj->SyncLinkID;
       pObj->DupPrm.outQueParams[2].nextLink = pObj->SyncLinkID;
       pObj->DupPrm.outQueParams[3].nextLink = pObj->SyncLinkID;
       pObj->SyncPrm.inQueParams.prevLinkId = pObj->DupLinkID;
       pObj->SyncPrm.inQueParams.prevLinkQueId = 0;

       //Sync -> Alg_VpeSwMs
       pObj->SyncPrm.outQueParams.nextLink = pObj->Alg_VpeSwMsLinkID;
       pObj->Alg_VpeSwMsPrm.inQueParams.prevLinkId = pObj->SyncLinkID;
       pObj->Alg_VpeSwMsPrm.inQueParams.prevLinkQueId = 0;

 

Unfortunately I cannot find documentation to guide me to the correct configuration.
May I ask if anyone is familiar on how to make Dup duplicate frame to be fed to Sync and then to Alg_VpeSwMs?

I have attached the usecase code for you reference.

nullSrc_file_dup_mosaic.tar.gz

  • Hi,

    Are you setting numOutQue in the DUP create Parameters? This is also required to be set in order to inform the driver about number of queues..

    Rgds,

    Brijesh

  • Hello Brijesh,

    Yes, the numOutQue create parameter for Dup is being set accordingly in _Create prior to calling _ConnectLinks.

    static Void chains_nullSrc_file_dup_mosaic_SetDupPrms(
            DupLink_CreateParams *pPrm,
            UInt32 numCh)
    {
            pPrm->numOutQue = numCh;
    }

    For purpose of debugging, I commented out the multiple views in Alg_VpeSwMs. This allows me to avoid the hang-up.
    From here I can perform statistics printing which shows the following:

    When numCh=2:

    [IPU1-0]     18.848868 s:                                                                                                                                                                                                                     
    [IPU1-0]     18.848898 s:  [ SYNC_0 ] Link Statistics,                                                                                                                                                                                        
    [IPU1-0]     18.848959 s:  ******************************                                                                                                                                                                                     
    [IPU1-0]     18.849020 s:                                                                                                                                                                                                                     
    [IPU1-0]     18.849081 s:  Elapsed time       = 2902 msec                                                                                                                                                                                     
    [IPU1-0]     18.849203 s:                                                                                                                                                                                                                     
    [IPU1-0]     18.849234 s:  New data Recv      =  31.70 fps                                                                                                                                                                                    
    [IPU1-0]     18.849325 s:  Get Full Buf Cb    =   1.37 fps                                                                                                                                                                                    
    [IPU1-0]     18.849386 s:  Put Empty Buf Cb   =   1.37 fps                                                                                                                                                                                    
    [IPU1-0]     18.849447 s:  Driver/Notify Cb   =  29.97 fps                                                                                                                                                                                    
    [IPU1-0]     18.849539 s:                                                                                                                                                                                                                     
    [IPU1-0]     18.849569 s:  Input Statistics,                                                                                                                                                                                                  
    [IPU1-0]     18.849630 s:                                                                                                                                                                                                                     
    [IPU1-0]     18.849661 s:  CH | In Recv | In Drop | In User Drop | In Process                                                                                                                                                                 
    [IPU1-0]     18.849722 s:     | FPS     | FPS     | FPS          | FPS                                                                                                                                                                        
    [IPU1-0]     18.849813 s:  --------------------------------------------------                                                                                                                                                                 
    [IPU1-0]     18.850057 s:   0 |   1.37      0. 0      0. 0           1.37                                                                                                                                                                     
    [IPU1-0]     18.850179 s:                                                                                                                                                                                                                     
    [IPU1-0]     18.850240 s:  Output Statistics,
    [IPU1-0]     18.850271 s:
    [IPU1-0]     18.850301 s:  CH | Out | Out     | Out Drop | Out User Drop
    [IPU1-0]     18.850393 s:     | ID  | FPS     | FPS      | FPS
    [IPU1-0]     18.850454 s:  ---------------------------------------------
    [IPU1-0]     18.850515 s:   0 |  0      1.37     0. 0      0. 0
    

    Even though Dup link is set to have 2 output channels, Sync is created with only one channel.

  • Hi,

    It looks like you are trying to switch the views runtime. I would suggest to make it working first individually.
    Also please note that runtime changing the number of output queues is not supported.

    Rgds.
    Brijesh
  • Hello Brijesh,

    Thank you for the response. But this is not the case.

    The usecase is supposed to be configured first before starting it.

    The issue also occurs when the default numViews is set to 2 anyway.

  • Hi Norman,

    Strange, the issue should not come, if the numViews are set to 0x2 at create time. could you please recheck if this is the case? 

    Also please check if the sWMS parameters are set correctly, when numViews are 2. Please check if sync link is not dropping frames.. 

    Rgds,

    Brijesh 

  • Also, can you try adding merge link before sync link? this will update channel id for the output channels. lets see if with this change, sync reports correct number of channels..

    Rgds,
    Brijesh
  • Hello Brijesh,

    Thank you for the continuous support on this item.

    Adding Merge link before sync fixed the issue.