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.

TDA2EXEVM: SWMS create issue.

Part Number: TDA2EXEVM
Other Parts Discussed in Thread: TVP5158

Hi All,

I am using TDA2EXEVM. Linux (A15)+ BIOS(IPU2). sdk version VISION_SDK_02_12_00_00.Below is my usecase flow. I want to display video decoder 4CH output into swms (4Window) format.

UseCase: chains_vipSingleCam_SgxDisplay

Capture -> VPE_dei -> Alg_DmaSwMs -> Display_Video

//Graphics overlay display
GrpxSrc -> Display_Grpx

swms config param:

  useLocalEdma = FALSE;
    algId = ALGORITHM_LINK_IPU_ALG_DMA_SWMS;

    pPrm->baseClassCreate.algId   = algId;
    pPrm->numOutBuf               = 4;
    pPrm->useLocalEdma            = useLocalEdma;
    pPrm->initLayoutParams.numWin = numCh;

    pPrm->maxOutBufWidth     = outWidth;
    pPrm->maxOutBufHeight    = outHeight;

    for(winId=0; winId<pPrm->initLayoutParams.numWin; winId++)
    {
        pWinInfo = &pPrm->initLayoutParams.winInfo[winId];
        pWinInfo->chId = winId;
        pWinInfo->inStartX = 0;
        pWinInfo->inStartY = 0;
        pWinInfo->width    = winWidth;
        pWinInfo->height   = winHeight;

        /*
         *  For 4x4 layout
         */
        switch(winId)
        {
            default:
            case 0:
                pWinInfo->outStartX = 0;
                pWinInfo->outStartY = 0;
                break;
            case 1:
                pWinInfo->outStartX = winWidth;
                pWinInfo->outStartY = 0;
                break;
            case 2:
                pWinInfo->outStartX = 0;
                pWinInfo->outStartY = winHeight;
                break;
            case 3:
                pWinInfo->outStartX = winWidth;
                pWinInfo->outStartY = winHeight;
                break;
        }
    }

    pPrm->initLayoutParams.outBufWidth  = pPrm->maxOutBufWidth;
    pPrm->initLayoutParams.outBufHeight = pPrm->maxOutBufHeight;

After running usecase on target HDMI(1080p) dosn't show mosaic view, single window with blue color showing?? why window not splitting ? did i miss any config?

Regards,

RAJ M

  • Raj,

    When you run use-case type "p" and check which link is dropping frames (or share the output). I believe you may need to add sync link after VPE link.

    For similar use-case you can take reference from "chains_avbRx_Dec_Display" use-case.

  • Hi Prasad,

    This is my log

    Why Channel 2 , 3, 4 Q DQ not happanning?

    [HOST] [IPU2  ]     55.550631 s:  CAPTURE: Create in progress !!!

    [HOST] [IPU2  ]     55.551149 s:  CAPTURE: VIP1 Slice1 PortA capture mode is [ 8-bit] 0 !!!

    [HOST] [IPU2  ]     55.578844 s:  CAPTURE: Create Done !!!

    [HOST] [IPU2  ]     55.579271 s:  VPE: Create in progress !!!

    [HOST] [IPU2  ]     55.744891 s:  VPE: Loading Up-scaling Co-effs

    [HOST] [IPU2  ]     55.745165 s:  VPE: Co-effs Loading ... DONE !!!

    [HOST] [IPU2  ]     55.745379 s:  VPE: Create Done !!!

    [HOST] [IPU2  ]     55.746324 s:  ALGORITHM: Create in progress (algId = 0) !!!

    [HOST] [IPU2  ]     56.796773 s:  UTILS: DMA: Allocated CH (TCC) = 32 (32)

    [HOST] [IPU2  ]     56.796895 s:  UTILS: DMA: 0 of 8: Allocated PaRAM = 32 (0x63304800)

    [HOST] [IPU2  ]     56.797078 s:  UTILS: DMA: 1 of 8: Allocated PaRAM = 65 (0x63304820)

    [HOST] [IPU2  ]     56.797200 s:  UTILS: DMA: 2 of 8: Allocated PaRAM = 66 (0x63304840)

    [HOST] [IPU2  ]     56.797322 s:  UTILS: DMA: 3 of 8: Allocated PaRAM = 67 (0x63304860)

    [HOST] [IPU2  ]     56.797444 s:  UTILS: DMA: 4 of 8: Allocated PaRAM = 68 (0x63304880)

    [HOST] [IPU2  ]     56.797566 s:  UTILS: DMA: 5 of 8: Allocated PaRAM = 69 (0x633048A0)

    [HOST] [IPU2  ]     56.797688 s:  UTILS: DMA: 6 of 8: Allocated PaRAM = 70 (0x633048C0)

    [HOST] [IPU2  ]     56.797810 s:  UTILS: DMA: 7 of 8: Allocated PaRAM = 71 (0x633048E0)

    [HOST] [IPU2  ]     56.798084 s:  ALGORITHM: Create Done (algId = 0) !!!

    [HOST] [IPU2  ]     56.798664 s:  DISPLAY: Create in progress !!!

    [HOST] [IPU2  ]     56.799274 s:  DISPLAY: Create Done !!!

    [HOST] [IPU2  ]     56.799609 s:  GRPXSRC: Create in progress !!!

    [HOST] [IPU2  ]     58.282437 s:  GRPXSRC: Create Done !!!

    [HOST] [IPU2  ]     58.282864 s:  DISPLAY: Create in progress !!!

    [HOST] [IPU2  ]     58.283413 s:  DISPLAY: Create Done !!!

    [HOST] [IPU2  ]     58.283901 s:  *** UTILS: CPU KHz = 20000 Khz ***

    [HOST] [IPU2  ]     58.384157 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023

    [HOST] [IPU2  ]     58.384310 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 262144 B (256 KB), Free size = 252736 B (246 KB)

    [HOST] [IPU2  ]     58.384462 s:  SYSTEM: Heap = SR_OCMC              @ 0x00000000, Total size = 0 B (0 KB), Free size = 0 B (0 KB)

    [HOST] [IPU2  ]     58.384615 s:  SYSTEM: Heap = SR_DDR_CACHED        @ 0x84203000, Total size = 262144000 B (250 MB), Free size = 174190592 B (166 MB)

    [HOST] [IPU2  ]     58.384798 s:  SYSTEM: Heap = SR_DDR_NON_CACHED    @ 0xa0100000, Total size = 1047168 B (0 MB), Free size = 1047168 B (0 MB)

    [HOST] [IPU2  ]     58.385225 s:  DISPLAY: Start in progress !!!

    [HOST] [IPU2  ]     58.385286 s:  DISPLAY: Start Done !!!

    [HOST] [IPU2  ]     58.393460 s:  DISPLAY: Start in progress !!!

    [HOST] [IPU2  ]     58.393552 s:  DISPLAY: Start Done !!!

    [HOST] [IPU2  ]     58.394528 s:  CAPTURE: Start in progress !!!

    [HOST] [IPU2  ]     58.396144 s:  syncType 2,  

    [HOST] [IPU2  ]     58.396785 s:  CAPTURE: Start Done !!!

    [HOST] [HOST  ]     58.416854 s:

    [HOST] [HOST  ]  ====================

    [HOST] [HOST  ]  Chains Run-time Menu

    [HOST] [HOST  ]  ====================

    [HOST] [HOST  ]  

    [HOST] [HOST  ]  0: Stop Chain

    [HOST] [HOST  ]  

    [HOST] [HOST  ]  p: Print Performance Statistics

    [HOST] [HOST  ]  

    [HOST] [HOST  ]  Enter Choice:

    [HOST] [HOST  ]  

    p

    [HOST] [IPU2  ]     63.021106 s:  

    [HOST] [IPU2  ]     63.021228 s:  CPU [IPU2   ] Statistics,

    [HOST] [IPU2  ]     63.021320 s:  *************************

    [HOST] [IPU2  ]     63.021381 s:  

    [HOST] [IPU2  ]     63.021442 s:  LOAD: CPU: 78.7% HWI: 34.5%, SWI:0.7%, Low Power: 19.1%

    [HOST] [IPU2  ]     63.021594 s:  

    [HOST] [IPU2  ]     63.021655 s:  LOAD: TSK: SYNC0               : 0.5%

    [HOST] [IPU2  ]     63.021808 s:  LOAD: TSK: DISPLAY0            : 0.3%

    [HOST] [IPU2  ]     63.021899 s:  LOAD: TSK: ALGORITHM0          : 0.4%

    [HOST] [IPU2  ]     63.022021 s:  LOAD: TSK: VPE0                : 1.6%

    [HOST] [IPU2  ]     63.022143 s:  LOAD: TSK: CAPTURE             : 9.3%

    [HOST] [IPU2  ]     63.023028 s:  LOAD: TSK: GrpxSrc0            : 29.6%

    [HOST] [IPU2  ]     63.023485 s:  LOAD: TSK: STAT_COLL           : 1.2%

    [HOST] [IPU2  ]     63.023699 s:  LOAD: TSK: MISC                : 0.6%

    [HOST] [IPU2  ]     63.023851 s:  

    [HOST] [IPU2  ]     63.024980 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1022

    [HOST] [IPU2  ]     63.025895 s:  

    [HOST] [IPU2  ]     63.025956 s:  SYSTEM: Sempahores Objects,  242 of 1000 free

    [HOST] [IPU2  ]     63.026047 s:  SYSTEM: Task Objects      ,   27 of  100 free

    [HOST] [IPU2  ]     63.026139 s:  SYSTEM: Clock Objects     ,   98 of  100 free

    [HOST] [IPU2  ]     63.026261 s:  SYSTEM: Hwi Objects       ,   94 of  100 free

    [HOST] [IPU2  ]     63.026352 s:  

    [HOST] [IPU2  ]     63.026413 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 262144 B (256 KB), Free size = 252736 B (246 KB)

    [HOST] [IPU2  ]     63.026566 s:  SYSTEM: Heap = SR_OCMC              @ 0x00000000, Total size = 0 B (0 KB), Free size = 0 B (0 KB)

    [HOST] [IPU2  ]     63.026718 s:  SYSTEM: Heap = SR_DDR_CACHED        @ 0x84203000, Total size = 262144000 B (250 MB), Free size = 174190592 B (166 MB)

    [HOST] [IPU2  ]     63.026901 s:  SYSTEM: Heap = SR_DDR_NON_CACHED    @ 0xa0100000, Total size = 1047168 B (0 MB), Free size = 1047168 B (0 MB)

    [HOST] [IPU2  ]     63.027054 s:  

    [HOST] [IPU2  ]     63.027450 s:  

    [HOST] [IPU2  ]     63.027511 s:  Statistics Collector,

    [HOST] [IPU2  ]     63.027572 s:  

    [HOST] [IPU2  ]     63.027603 s:        STATISTIC          Avg Data        Peak Data

    [HOST] [IPU2  ]     63.027877 s:        COLLECTOR          MB/s            MB/s      

    [HOST] [IPU2  ]     63.027999 s:  --------------------------------------------------

    [HOST] [IPU2  ]     63.028060 s:  SCI_EMIF1 RD+WR      |      0.000000      0.000000

    [HOST] [IPU2  ]     63.028213 s:  SCI_EMIF1 RD ONLY    |      0.000000      0.000000

    [HOST] [IPU2  ]     63.028335 s:  SCI_EMIF1 WR ONLY    |      0.000000      0.000000

    [HOST] [IPU2  ]     63.028426 s:  SCI_MA_MPU_P1        |      0.000000      0.000000

    [HOST] [IPU2  ]     63.028518 s:  SCI_MA_MPU_P2        |      0.000000      0.000000

    [HOST] [IPU2  ]     63.028640 s:  SCI_DSS              |      0.000000      0.000000

    [HOST] [IPU2  ]     63.028914 s:  SCI_IPU1             |      0.000000      0.000000

    [HOST] [IPU2  ]     63.029036 s:  SCI_VIP1_P1          |      0.000000      0.000000

    [HOST] [IPU2  ]     63.029128 s:  SCI_VIP1_P2          |      0.000000      0.000000

    [HOST] [IPU2  ]     63.029280 s:  SCI_VPE_P1           |      0.000000      0.000000

    [HOST] [IPU2  ]     63.029372 s:  SCI_VPE_P2           |      0.000000      0.000000

    [HOST] [IPU2  ]     63.029494 s:  SCI_DSP1_MDMA        |      0.000000      0.000000

    [HOST] [IPU2  ]     63.029585 s:  SCI_DSP1_EDMA        |      0.000000      0.000000

    [HOST] [IPU2  ]     63.029677 s:  SCI_EDMA_TC0_RD      |      0.000000      0.000000

    [HOST] [IPU2  ]     63.029799 s:  SCI_EDMA_TC0_WR      |      0.000000      0.000000

    [HOST] [IPU2  ]     63.029890 s:  SCI_EDMA_TC1_RD      |      0.000000      0.000000

    [HOST] [IPU2  ]     63.030012 s:  SCI_EDMA_TC1_WR      |      0.000000      0.000000

    [HOST] [IPU2  ]     63.030104 s:  CAL                  |      0.000000      0.000000

    [HOST] [IPU2  ]     63.030348 s:  SCI_IVA              |      0.000000      0.000000

    [HOST] [IPU2  ]     63.030470 s:  SCI_GPU_P1           |      0.000000      0.000000

    [HOST] [IPU2  ]     63.030561 s:  SCI_GPU_P2           |      0.000000      0.000000

    [HOST] [IPU2  ]     63.030683 s:  SCI_GMAC_SW          |      0.000000      0.000000

    [HOST] [IPU2  ]     63.131184 s:  CAPTURE: VIP1 Slice1 PortA FRAME MODE

    [HOST] [IPU2  ]     63.131336 s:  

    [HOST] [IPU2  ]     63.131367 s:  [ CAPTURE ] Link Statistics,

    [HOST] [IPU2  ]     63.131428 s:  ******************************

    [HOST] [IPU2  ]     63.131489 s:  

    [HOST] [IPU2  ]     63.131550 s:  Elapsed time       = 4723 msec

    [HOST] [IPU2  ]     63.131611 s:  

    [HOST] [IPU2  ]     63.131641 s:  New data Recv      = 7749.94 fps

    [HOST] [IPU2  ]     63.131733 s:  Get Full Buf Cb    =  63.51 fps

    [HOST] [IPU2  ]     63.131824 s:  Put Empty Buf Cb   =  81.30 fps

    [HOST] [IPU2  ]     63.131885 s:  Driver/Notify Cb   = 7714.16 fps

    [HOST] [IPU2  ]     63.131977 s:  

    [HOST] [IPU2  ]     63.132007 s:  Input Statistics,

    [HOST] [IPU2  ]     63.132068 s:  

    [HOST] [IPU2  ]     63.132099 s:  CH | In Recv | In Drop | In User Drop | In Process

    [HOST] [IPU2  ]     63.132221 s:     | FPS     | FPS     | FPS          | FPS        

    [HOST] [IPU2  ]     63.132282 s:  --------------------------------------------------

    [HOST] [IPU2  ]     63.132373 s:   0 |  95.49      0. 0      0. 0          95.49

    [HOST] [IPU2  ]     63.132617 s:  

    [HOST] [IPU2  ]     63.132678 s:  Output Statistics,

    [HOST] [IPU2  ]     63.132739 s:  

    [HOST] [IPU2  ]     63.132770 s:  CH | Out | Out     | Out Drop | Out User Drop

    [HOST] [IPU2  ]     63.132831 s:     | ID  | FPS     | FPS      | FPS          

    [HOST] [IPU2  ]     63.133197 s:  ---------------------------------------------

    [HOST] [IPU2  ]     63.133288 s:   0 |  0     96.12     0. 0      0. 0

    [HOST] [IPU2  ]     63.133532 s:  

    [HOST] [IPU2  ]     63.133593 s:  [VIP1 Slice1 PortA] Statistics

    [HOST] [IPU2  ]     63.133654 s:  ==============================

    [HOST] [IPU2  ]     63.133807 s:  Number of request queued  : 452

    [HOST] [IPU2  ]     63.133868 s:  Number of request dequeued: 383

    [HOST] [IPU2  ]     63.133959 s:  Overflow Count            : 0

    [HOST] [IPU2  ]     63.134020 s:  

    [HOST] [IPU2  ]     63.134051 s:     CH    |     Q      DQ     Total   Top     Bot    Total  Top    Bot   Min/Max     Min/Max   Dropped  Repeat   Fid   Desc

    [HOST] [IPU2  ]     63.134569 s:  (I/S/CH) |   Count   Count  Fields  Fields  Fields   FPS   FPS    FPS    Width       Height   Frames   Frames  Repeat Error

    [HOST] [IPU2  ]     63.136491 s:  ---------------------------------------------------------------------------------------------------------------------------

    [HOST] [IPU2  ]     63.151497 s:   02.0.00 |     456     454    2139    1393     746    451   294   157     1/720       1/240      1685       0    1778     0

    [HOST] [IPU2  ]     63.152382 s:   02.0.01 |       0       0    3972    3970       2    838   838     0     1/720       1/240      3972       0    3968     0

    [HOST] [IPU2  ]     63.153114 s:   02.0.02 |       0       0    3978    3976       2    840   839     0     1/720       1/240      3978       0    3974     0

    [HOST] [IPU2  ]     63.153907 s:   02.0.03 |       0       0    3984    3982       2    841   840     0     1/720       1/240      3984       0    3980     0

    [HOST] [IPU2  ]     63.154181 s:  

    [HOST] [IPU2  ]     63.158665 s:  

    [HOST] [IPU2  ]     63.158756 s:  [ VPE ] Link Statistics,

    [HOST] [IPU2  ]     63.158817 s:  ******************************

    [HOST] [IPU2  ]     63.158878 s:  

    [HOST] [IPU2  ]     63.158909 s:  Elapsed time       = 4743 msec

    [HOST] [IPU2  ]     63.158970 s:  

    [HOST] [IPU2  ]     63.159031 s:  New data Recv      =  63.25 fps

    [HOST] [IPU2  ]     63.159122 s:  Get Full Buf Cb    =  55.45 fps

    [HOST] [IPU2  ]     63.159214 s:  Put Empty Buf Cb   =  33.52 fps

    [HOST] [IPU2  ]     63.159488 s:  Driver/Notify Cb   =  33.52 fps

    [HOST] [IPU2  ]     63.159580 s:  

    [HOST] [IPU2  ]     63.159610 s:  Input Statistics,

    [HOST] [IPU2  ]     63.159671 s:  

    [HOST] [IPU2  ]     63.159702 s:  CH | In Recv | In Drop | In User Drop | In Process

    [HOST] [IPU2  ]     63.159793 s:     | FPS     | FPS     | FPS          | FPS        

    [HOST] [IPU2  ]     63.159854 s:  --------------------------------------------------

    [HOST] [IPU2  ]     63.159946 s:   0 |  95.72     62.19      0. 0          33.52

    [HOST] [IPU2  ]     63.160098 s:  

    [HOST] [IPU2  ]     63.160129 s:  Output Statistics,

    [HOST] [IPU2  ]     63.160220 s:  

    [HOST] [IPU2  ]     63.160251 s:  CH | Out | Out     | Out Drop | Out User Drop

    [HOST] [IPU2  ]     63.160342 s:     | ID  | FPS     | FPS      | FPS          

    [HOST] [IPU2  ]     63.160403 s:  ---------------------------------------------

    [HOST] [IPU2  ]     63.160495 s:   0 |  0     33.52     0. 0      0. 0

    [HOST] [IPU2  ]     63.160647 s:  

    [HOST] [IPU2  ]     63.160678 s:  [ VPE ] LATENCY,

    [HOST] [IPU2  ]     63.160739 s:  ********************

    [HOST] [IPU2  ]     63.160800 s:  Local Link Latency     : Avg =   5304 us, Min =   1555 us, Max =  22113 us,

    [HOST] [IPU2  ]     63.160922 s:  Source to Link Latency : Avg =   9940 us, Min =   1677 us, Max =  23638 us,

    [HOST] [IPU2  ]     63.161044 s:  

    [HOST] [IPU2  ]     63.161379 s:  

    [HOST] [IPU2  ]     63.161410 s:  [ SYNC_LINK_0 ] Link Statistics,

    [HOST] [IPU2  ]     63.161501 s:  ******************************

    [HOST] [IPU2  ]     63.161562 s:  

    [HOST] [IPU2  ]     63.161715 s:  Elapsed time       = 4744 msec

    [HOST] [IPU2  ]     63.161776 s:  

    [HOST] [IPU2  ]     63.161837 s:  New data Recv      =  55.43 fps

    [HOST] [IPU2  ]     63.161898 s:  Get Full Buf Cb    =  33.51 fps

    [HOST] [IPU2  ]     63.162111 s:  Put Empty Buf Cb   =  33.51 fps

    [HOST] [IPU2  ]     63.162203 s:  Driver/Notify Cb   =  21.92 fps

    [HOST] [IPU2  ]     63.162294 s:  

    [HOST] [IPU2  ]     63.162325 s:  Input Statistics,

    [HOST] [IPU2  ]     63.162386 s:  

    [HOST] [IPU2  ]     63.162416 s:  CH | In Recv | In Drop | In User Drop | In Process

    [HOST] [IPU2  ]     63.162508 s:     | FPS     | FPS     | FPS          | FPS        

    [HOST] [IPU2  ]     63.162569 s:  --------------------------------------------------

    [HOST] [IPU2  ]     63.162660 s:   0 |  33.51      0. 0      0. 0          33.51

    [HOST] [IPU2  ]     63.162813 s:  

    [HOST] [IPU2  ]     63.162843 s:  Output Statistics,

    [HOST] [IPU2  ]     63.162904 s:  

    [HOST] [IPU2  ]     63.162935 s:  CH | Out | Out     | Out Drop | Out User Drop

    [HOST] [IPU2  ]     63.163026 s:     | ID  | FPS     | FPS      | FPS          

    [HOST] [IPU2  ]     63.163087 s:  ---------------------------------------------

    [HOST] [IPU2  ]     63.163179 s:   0 |  0     33.51     0. 0      0. 0

    [HOST] [IPU2  ]     63.163331 s:  

    [HOST] [IPU2  ]     63.163362 s:  [ SYNC_LINK_0 ] LATENCY,

    [HOST] [IPU2  ]     63.163423 s:  ********************

    [HOST] [IPU2  ]     63.163484 s:  Local Link Latency     : Avg =    121 us, Min =     30 us, Max =   7137 us,

    [HOST] [IPU2  ]     63.163606 s:  Source to Link Latency : Avg =  10276 us, Min =   1860 us, Max =  23852 us,

    [HOST] [IPU2  ]     63.163728 s:  

    [HOST] [IPU2  ]     63.164338 s:  

    [HOST] [IPU2  ]     63.164399 s:  [ ALG_DMA_SWMS ] Link Statistics,

    [HOST] [IPU2  ]     63.164460 s:  ******************************

    [HOST] [IPU2  ]     63.164551 s:  

    [HOST] [IPU2  ]     63.164582 s:  Elapsed time       = 4746 msec

    [HOST] [IPU2  ]     63.164643 s:  

    [HOST] [IPU2  ]     63.164673 s:  Out Buf Error Count = 7 frames

    [HOST] [IPU2  ]     63.164765 s:  New data Recv      =  33.29 fps

    [HOST] [IPU2  ]     63.164856 s:  

    [HOST] [IPU2  ]     63.164887 s:  Input Statistics,

    [HOST] [IPU2  ]     63.164948 s:  

    [HOST] [IPU2  ]     63.164978 s:  CH | In Recv | In Drop | In User Drop | In Process

    [HOST] [IPU2  ]     63.165283 s:     | FPS     | FPS     | FPS          | FPS        

    [HOST] [IPU2  ]     63.165405 s:  --------------------------------------------------

    [HOST] [IPU2  ]     63.165466 s:   0 |  33.50      1.47      0. 0          32. 2

    [HOST] [IPU2  ]     63.165619 s:  

    [HOST] [IPU2  ]     63.165649 s:  Output Statistics,

    [HOST] [IPU2  ]     63.165710 s:  

    [HOST] [IPU2  ]     63.165741 s:  CH | Out | Out     | Out Drop | Out User Drop

    [HOST] [IPU2  ]     63.165832 s:     | ID  | FPS     | FPS      | FPS          

    [HOST] [IPU2  ]     63.166046 s:  ---------------------------------------------

    [HOST] [IPU2  ]     63.166137 s:   0 |  0     32. 2     1.47      0. 0

    [HOST] [IPU2  ]     63.166687 s:  

    [HOST] [IPU2  ]     63.166748 s:  [ ALG_DMA_SWMS ] LATENCY,

    [HOST] [IPU2  ]     63.166809 s:  ********************

    [HOST] [IPU2  ]     63.166870 s:  

    [HOST] [IPU2  ]     63.167388 s:  

    [HOST] [IPU2  ]     63.167449 s:  [ DISPLAY ] Link Statistics,

    [HOST] [IPU2  ]     63.167510 s:  ******************************

    [HOST] [IPU2  ]     63.186817 s:  

    [HOST] [IPU2  ]     63.186878 s:  Elapsed time       = 4746 msec

    [HOST] [IPU2  ]     63.186939 s:  

    [HOST] [IPU2  ]     63.187000 s:  New data Recv      =  31.81 fps

    [HOST] [IPU2  ]     63.187061 s:  Driver/Notify Cb   =  60.5 fps

    [HOST] [IPU2  ]     63.187153 s:  

    [HOST] [IPU2  ]     63.187214 s:  Input Statistics,

    [HOST] [IPU2  ]     63.187275 s:  

    [HOST] [IPU2  ]     63.187305 s:  CH | In Recv | In Drop | In User Drop | In Process

    [HOST] [IPU2  ]     63.187397 s:     | FPS     | FPS     | FPS          | FPS        

    [HOST] [IPU2  ]     63.187458 s:  --------------------------------------------------

    [HOST] [IPU2  ]     63.187549 s:   0 |  32. 2      0. 0      0. 0          32. 2

    [HOST] [IPU2  ]     63.187702 s:  

    [HOST] [IPU2  ]     63.187763 s:  [ DISPLAY ] LATENCY,

    [HOST] [IPU2  ]     63.187793 s:  ********************

    [HOST] [IPU2  ]     63.187854 s:  Local Link Latency     : Avg =     40 us, Min =      0 us, Max =    244 us,

    [HOST] [IPU2  ]     63.187976 s:  Source to Link Latency : Avg =  12655 us, Min =   2714 us, Max =  28091 us,

    [HOST] [IPU2  ]     63.188098 s:  

    [HOST] [IPU2  ]     63.188159 s:  

    [HOST] [IPU2  ]     63.188251 s:  [ DISPLAY  VID1 ] Additional Statistics,

    [HOST] [IPU2  ]     63.188312 s:  ************************************

    [HOST] [IPU2  ]     63.188373 s:  Driver Queued    =    152 frames

    [HOST] [IPU2  ]     63.188434 s:  Driver De-Queued =    151 frames

    [HOST] [IPU2  ]     63.188525 s:  Driver Displayed =    285 frames

    [HOST] [IPU2  ]     63.188586 s:  Driver Repeated  =    134 frames

    [HOST] [IPU2  ]     63.188678 s:  

    [HOST] [IPU2  ]     63.188708 s:  ##### DSS DISPC Underflow Count  =      0 #####

    [HOST] [IPU2  ]     63.188769 s:  

    [HOST] [IPU2  ]     63.189593 s:  

    [HOST] [IPU2  ]     63.189654 s:  [ DISPLAY ] Link Statistics,

    [HOST] [IPU2  ]     63.189715 s:  ******************************

    [HOST] [IPU2  ]     63.189776 s:  

    [HOST] [IPU2  ]     63.190020 s:  Elapsed time       = 4796 msec

    [HOST] [IPU2  ]     63.190111 s:  

    [HOST] [IPU2  ]     63.190142 s:  Driver/Notify Cb   =  59.84 fps

    [HOST] [IPU2  ]     63.190264 s:  

    [HOST] [IPU2  ]     63.190294 s:  Input Statistics,

    [HOST] [IPU2  ]     63.190355 s:  

    [HOST] [IPU2  ]     63.190386 s:  CH | In Recv | In Drop | In User Drop | In Process

    [HOST] [IPU2  ]     63.190477 s:     | FPS     | FPS     | FPS          | FPS        

    [HOST] [IPU2  ]     63.190569 s:  --------------------------------------------------

    [HOST] [IPU2  ]     63.190630 s:   0 |   0.20      0. 0      0. 0           0.20

    [HOST] [IPU2  ]     63.190813 s:  

    [HOST] [IPU2  ]     63.190843 s:  [ DISPLAY ] LATENCY,

    [HOST] [IPU2  ]     63.190904 s:  ********************

    [HOST] [IPU2  ]     63.190965 s:  Local Link Latency     : Avg =     61 us, Min =     61 us, Max =     61 us,

    [HOST] [IPU2  ]     63.191087 s:  Source to Link Latency : Avg = 110688 us, Min = 110688 us, Max = 110688 us,

    [HOST] [IPU2  ]     63.191301 s:  

    [HOST] [IPU2  ]     63.191362 s:  

    [HOST] [IPU2  ]     63.191423 s:  [ DISPLAY GRPX1 ] Additional Statistics,

    [HOST] [IPU2  ]     63.191484 s:  ************************************

    [HOST] [IPU2  ]     63.191545 s:  Driver Queued    =      1 frames

    [HOST] [IPU2  ]     63.191636 s:  Driver De-Queued =      0 frames

    [HOST] [IPU2  ]     63.191697 s:  Driver Displayed =    287 frames

    [HOST] [IPU2  ]     63.191941 s:  Driver Repeated  =    287 frames

    [HOST] [IPU2  ]     63.192033 s:  

    [HOST] [IPU2  ]     63.192063 s:  ##### DSS DISPC Underflow Count  =      0 #####

    [HOST] [IPU2  ]     63.192155 s:  

    [HOST] [IPU2  ]     63.193100 s:  [CAPTURE] Buffer Q Status,

    [HOST] [IPU2  ]     63.193222 s:  Empty Q : Elements in Q =   0, Write Idx =   0, Read Idx =   0

    [HOST] [IPU2  ]     63.193344 s:  Full  Q : Elements in Q =   0, Write Idx =  74, Read Idx =  74

    [HOST] [IPU2  ]     63.193863 s:  [VPE OUT0] Buffer Q Status,

    [HOST] [IPU2  ]     63.193924 s:  Empty Q : Elements in Q =   0, Write Idx =   0, Read Idx =   0

    [HOST] [IPU2  ]     63.194046 s:  Full  Q : Elements in Q =   0, Write Idx = 159, Read Idx = 159

    [HOST] [IPU2  ]     63.194168 s:  [VPE OUT1] Buffer Q Status,

    [HOST] [IPU2  ]     63.194259 s:  Empty Q : Elements in Q =   0, Write Idx =   0, Read Idx =   0

    [HOST] [IPU2  ]     63.194351 s:  Full  Q : Elements in Q =   0, Write Idx =   0, Read Idx =   0

    [HOST] [HOST  ]     63.200664 s:

    [HOST] [HOST  ]  

    [HOST] [HOST  ]  ====================

    [HOST] [HOST  ]  Chains Run-time Menu

    [HOST] [HOST  ]  ====================

    [HOST] [HOST  ]  

    [HOST] [HOST  ]  0: Stop Chain

    [HOST] [HOST  ]  

    [HOST] [HOST  ]  p: Print Performance Statistics

    [HOST] [HOST  ]  

    [HOST] [HOST  ]  Enter Choice:

    [HOST] [HOST  ]  

    DISPLAY(HDMI)

    Why Mosaic view on only single channel(CH0)??


     

  • Hi,

    Any update??

    Regards,
    RAJ M
  • Hello Raj,

    Can you please send your use-case .txt file? In the statistics I see sync links but not in your earlier .txt file.

    Also are you setting capture parameters correctly? What is "numLvdsCh" set to?

    I would suggest you to use existing use case like lvds_vip_multi_cam_view_sgx_display( hlos\examples\adas\src\usecases) and modify as per your needs.

    Regards,
    Prasad
  • Hi Prasad,

     Can you please send your use-case .txt file? In the statistics I see sync links but not in your earlier .txt file.

    UseCase: chains_vipSingleCam_SgxDisplay

    Capture -> VPE_dei -> Sync -> Alg_DmaSwMs -> Display_Video

    //Graphics overlay display
    GrpxSrc -> Display_Grpx

     I would suggest you to use existing use case like lvds_vip_multi_cam_view_sgx_display( hlos\examples\adas\src\usecases) and modify as per your needs.

    I am using TVP5158 video decoder. Its single cam 4CH capture.

     Also are you setting capture parameters correctly? What is "numLvdsCh" set to?

     pInstPrm->videoIfMode   =  SYSTEM_VIFM_MCH_PIXEL_MUX_ES;//SYSTEM_VIFM_SCH_ES;
                pInstPrm->videoIfWidth  =  SYSTEM_VIFW_8BIT;
                pInstPrm->bufCaptMode   =  SYSTEM_CAPT_BCM_FRM_DROP;
                pInstPrm->numStream     =  1;

                pInprms->width      =   captureInWidth;
                pInprms->height     =   captureInHeight/2;
                pInprms->dataFormat =   SYSTEM_DF_YUV422P;
                pInprms->scanFormat =   SYSTEM_SF_INTERLACED;

               pOutprms->width         =   captureOutWidth;
               pOutprms->height        =   captureOutHeight/2;
               pOutprms->dataFormat    =   SYSTEM_DF_YUV422I_YUYV;
               pOutprms->maxWidth      =   pOutprms->width;
               pOutprms->maxHeight     =   pOutprms->height;

                pPortCfg->syncType                              =  SYSTEM_VIP_SYNC_TYPE_EMB_4X_422_YUV;//SYSTEM_VIP_SYNC_TYPE_EMB_SINGLE_422_YUV;
                pPortCfg->actCropEnable                         =  FALSE;
                pPortCfg->comCfg.expectedNumLines               =  0;
                pPortCfg->comCfg.expectedNumPix                 =  0;
                pPortCfg->comCfg.pixClkEdgePol                  =  SYSTEM_EDGE_POL_FALLING;
                pPortCfg->actCropCfg.cropCfg.cropWidth          =  0;
                pPortCfg->actCropCfg.cropCfg.cropHeight         =  0;

    Regards,

    RAJ M

  • Raj,

    Can you please refer to chains_srvCalibration_Display_tda2x_SetAppPrms function in vision_sdk\examples\tda2xx\src\usecases\iss_mult_capture_srv_calibration use-case.

    Please check for numCh = 4U setting and setDmaSwMsLinkParams function.

  • Hi Prasad,

    vision_sdk/examples/tda2xx/src/usecases/iss_mult_capture_srv_calibration/chains_srvCalibration_Display.c

    pObj->calibrationPrm.numCh = 4U;

    ChainsCommon_MultiCam_SetCapturePrms(

                                   &pUcObj->CapturePrm,

                                   pObj->calibrationPrm.captureOutWidth,

                                   pObj->calibrationPrm.captureOutHeight,

                                   portId,

                                   pObj->calibrationPrm.numCh);

     

    vision_sdk/examples/tda2xx/src/usecases/common/chains_common_vision.c

    Void ChainsCommon_MultiCam_SetCapturePrms(

                           CaptureLink_CreateParams *pPrm,

                           UInt32 captureInWidth,

                           UInt32 captureInHeight,

                           UInt32 portId[],

                           UInt32 numLvdsCh

                           )

    {

    pPrm->numVipInst = numLvdsCh;

    for (i=0; i<SYSTEM_CAPTURE_VIP_INST_MAX; i++)

    {

            pInstPrm = &pPrm->vipInst[i];

            if(BSP_BOARD_MONSTERCAM == Bsp_boardGetId())

            {

               if (i == 0)

               {

                   pInstPrm->vipInstId = SYSTEM_CAPTURE_INST_VIP3_SLICE1_PORTA;

               }

               else if(i == 1)

               {

                   pInstPrm->vipInstId = SYSTEM_CAPTURE_INST_VIP2_SLICE1_PORTA;

               }

               else if(i == 2)

               {

                   pInstPrm->vipInstId = SYSTEM_CAPTURE_INST_VIP3_SLICE2_PORTA;

               }

                   else

                 {

                    pInstPrm->vipInstId = SYSTEM_CAPTURE_INST_VIP1_SLICE2_PORTA;

                   }

           }


    Here numch related to number of vip instance but TVP5158 only one instance for capture..

    Regards,

    RAJ M

  • Hi RAJ,

    These common functions are mainly used for multi channel usecase where multiple VIP ports are used.
    In your case, you have multiple channels are coming from TVP5158 over a single VIP port.
    I would suggest use these functions to initialise common create parameters and then in the usecase, you could explicitly set create parameters to configure specific port in multi channel mode.

    For example,
    You could override the System_VipSyncType sync_type to SYSTEM_VIP_SYNC_TYPE_EMB_4X_422_YUV for 4 channel embedded sync input and so on.

    Please do these changes. mult-ch does not require much configuration, just the sync type and VIP port to be in 8bit mode. This should be sufficient to capture on multi-ch mode.

    Regards,
    Brijesh
  • Hi Brijesh,

    In common file i configure for multi channel as below

    vision_sdk/hlos/examples/common/chains_common.c


    pInstPrm->vipInstId     =   SYSTEM_CAPTURE_INST_VIP1_SLICE2_PORTA;

    pInstPrm->videoIfMode   =  SYSTEM_VIFM_MCH_PIXEL_MUX_ES;
    pInstPrm->videoIfWidth  =  SYSTEM_VIFW_8BIT;
    pInstPrm->bufCaptMode   =  SYSTEM_CAPT_BCM_FRM_DROP;
    pInstPrm->numStream     =  1;

    pInprms->width      =   captureInWidth;
    pInprms->height     =   captureInHeight/2;
    pInprms->dataFormat =   SYSTEM_DF_YUV422P;
    pInprms->scanFormat =   SYSTEM_SF_INTERLACED;

    pOutprms->width         =   captureOutWidth;
    pOutprms->height        =   captureOutHeight/2;
    pOutprms->dataFormat    =   SYSTEM_DF_YUV422I_YUYV;
    pOutprms->maxWidth      =   pOutprms->width;
    pOutprms->maxHeight     =   pOutprms->height;

    pPortCfg->syncType                              =  SYSTEM_VIP_SYNC_TYPE_EMB_4X_422_YUV;
    pPortCfg->actCropEnable                         =  FALSE;
    pPortCfg->comCfg.expectedNumLines               =  0;
    pPortCfg->comCfg.expectedNumPix                 =  0;
    pPortCfg->comCfg.pixClkEdgePol                  =  SYSTEM_EDGE_POL_FALLING;
    pPortCfg->actCropCfg.cropCfg.cropWidth          =  0;
    pPortCfg->actCropCfg.cropCfg.cropHeight         =  0;


    Can you confirm vision_sdk/src/links_ipu/vip_capture/captureLink_drv.c this link could able to demux multi channel. i haven't see chId demux in this link???

     

    Regards,

    RAJ M

  • Hi Raj,

    Link does not do demux'ing. It is VIP/VPDMA, which does demux'ing.
    Link provides the buffer and sends captured buffer to next link.

    Lets first see if VIP is receiving the captured data.
    Can you please share the VIP registers? I want to check if it is configured correctly..

    Regards,
    Brijesh
  • Hi Brijesh,

    I have small clarification on capture link.

    ti_components/drivers/bsp_01_07_01_17/examples/vps/capture/captureVip/src/CaptureVip_main.c

    For all chId alloc and create instance using below loop
    for (chId = 0; chId < pVipCreateArgs->numCh; chId++)

    But in vision_sdk/src/links_ipu/vip_capture/captureLink_drv.c
    I have not seen any such loop for chId.

    Can you clarify vip_capture/captureLink_drv.c can able to do for multichannel data???

    Regards,
    RAJ M
  • Hi Brijesh,

    I am tapping TVP5158 from outside hardware. For single channel

    The width and height is fine.

    [HOST] [IPU2  ]     77.339748 s:  [ CAPTURE ] Link Statistics,

    [HOST] [IPU2  ]     77.339809 s:  ******************************

    [HOST] [IPU2  ]     77.339870 s:

    [HOST] [IPU2  ]     77.339931 s:  Elapsed time       = 4077 msec

    [HOST] [IPU2  ]     77.339992 s:

    [HOST] [IPU2  ]     77.340053 s:  New data Recv      =  59.84 fps

    [HOST] [IPU2  ]     77.340114 s:  Get Full Buf Cb    =  45.37 fps

    [HOST] [IPU2  ]     77.340206 s:  Put Empty Buf Cb   =  44.64 fps

    [HOST] [IPU2  ]     77.340267 s:  Driver/Notify Cb   =  59.84 fps

    [HOST] [IPU2  ]     77.340358 s:

    [HOST] [IPU2  ]     77.340389 s:  Input Statistics,

    [HOST] [IPU2  ]     77.340450 s:

    [HOST] [IPU2  ]     77.340480 s:  CH | In Recv | In Drop | In User Drop | In Process

    [HOST] [IPU2  ]     77.340602 s:     | FPS     | FPS     | FPS          | FPS

    [HOST] [IPU2  ]     77.340694 s:  --------------------------------------------------

    [HOST] [IPU2  ]     77.340755 s:   0 |  44.64      0. 0      0. 0          44.64

    [HOST] [IPU2  ]     77.340907 s:

    [HOST] [IPU2  ]     77.340938 s:  Output Statistics,

    [HOST] [IPU2  ]     77.340999 s:

    [HOST] [IPU2  ]     77.341029 s:  CH | Out | Out     | Out Drop | Out User Drop

    [HOST] [IPU2  ]     77.341121 s:     | ID  | FPS     | FPS      | FPS

    [HOST] [IPU2  ]     77.341182 s:  ---------------------------------------------

    [HOST] [IPU2  ]     77.341273 s:   0 |  0     45.37     0. 0      0. 0

    [HOST] [IPU2  ]     77.341426 s:

    [HOST] [IPU2  ]     77.341487 s:  [VIP1 Slice1 PortA] Statistics

    [HOST] [IPU2  ]     77.341548 s:  ==============================

    [HOST] [IPU2  ]     77.341639 s:  Number of request queued  : 183

    [HOST] [IPU2  ]     77.341700 s:  Number of request dequeued: 185

    [HOST] [IPU2  ]     77.341792 s:  Overflow Count            : 0

    [HOST] [IPU2  ]     77.341853 s:

    [HOST] [IPU2  ]     77.341883 s:     CH    |     Q      DQ     Total   Top     Bot    Total  Top    Bot   Min/Max     Min/Max   Dropped  Repe

    [HOST] [IPU2  ]     77.342036 s:  (I/S/CH) |   Count   Count  Fields  Fields  Fields   FPS   FPS    FPS    Width       Height   Frames   Framr

    [HOST] [IPU2  ]     77.342158 s:  ------------------------------------------------------------------------------------------------------------

    [HOST] [IPU2  ]     77.342493 s:   02.0.00 |     188     185     245     123     122     59    29    29   720/720     240/240        60      0

    [HOST] [IPU2  ]     77.342646 s:

    same setup for multi channel capture width and height is not proper.

    [HOST] [IPU2  ]    434.764137 s:  [ CAPTURE ] Link Statistics,

    [HOST] [IPU2  ]    434.764289 s:  ******************************

    [HOST] [IPU2  ]    434.764472 s:

    [HOST] [IPU2  ]    434.764838 s:  Elapsed time       = 232711 msec

    [HOST] [IPU2  ]    434.765113 s:

    [HOST] [IPU2  ]    434.765143 s:  New data Recv      = 11456.19 fps

    [HOST] [IPU2  ]    434.765387 s:  Get Full Buf Cb    =  76.76 fps

    [HOST] [IPU2  ]    434.765540 s:  Put Empty Buf Cb   = 110.84 fps

    [HOST] [IPU2  ]    434.765692 s:  Driver/Notify Cb   = 11455.44 fps

    [HOST] [IPU2  ]    434.765784 s:

    [HOST] [IPU2  ]    434.765967 s:  Input Statistics,

    [HOST] [IPU2  ]    434.766028 s:

    [HOST] [IPU2  ]    434.766058 s:  CH | In Recv | In Drop | In User Drop | In Process

    [HOST] [IPU2  ]    434.766363 s:     | FPS     | FPS     | FPS          | FPS

    [HOST] [IPU2  ]    434.766455 s:  --------------------------------------------------

    [HOST] [IPU2  ]    434.766821 s:   0 | 191.34      0. 0      0. 0         191.34

    [HOST] [IPU2  ]    434.767034 s:

    [HOST] [IPU2  ]    434.767156 s:  Output Statistics,

    [HOST] [IPU2  ]    434.767339 s:

    [HOST] [IPU2  ]    434.767675 s:  CH | Out | Out     | Out Drop | Out User Drop

    [HOST] [IPU2  ]    434.767980 s:     | ID  | FPS     | FPS      | FPS

    [HOST] [IPU2  ]    434.768346 s:  ---------------------------------------------

    [HOST] [IPU2  ]    434.772585 s:   0 |  0    191.34     0. 0      0. 0

    [HOST] [IPU2  ]    434.773561 s:

    [HOST] [IPU2  ]    434.776337 s:  [VIP1 Slice1 PortA] Statistics

    [HOST] [IPU2  ]    434.777038 s:  ==============================

    [HOST] [IPU2  ]    434.781309 s:  Number of request queued  : 51377

    [HOST] [IPU2  ]    434.781400 s:  Number of request dequeued: 32138

    [HOST] [IPU2  ]    434.781461 s:  Overflow Count            : 0

    [HOST] [IPU2  ]    434.781705 s:

    [HOST] [IPU2  ]    434.783810 s:     CH    |     Q      DQ     Total   Top     Bot    Total  Top    Bot   Min/Max     Min/Max   Dropped  Repe

    [HOST] [IPU2  ]    434.784298 s:  (I/S/CH) |   Count   Count  Fields  Fields  Fields   FPS   FPS    FPS    Width       Height   Frames   Framr

    [HOST] [IPU2  ]    434.784786 s:  ------------------------------------------------------------------------------------------------------------

    [HOST] [IPU2  ]    434.785823 s:   02.0.00 |   51379   51379 3062702 1571677 1491025  11466  5884  5582     1/720       1/58    3011323      0

    [HOST] [IPU2  ]    434.786585 s:   02.0.01 |       0       0       0       0       0      0     0     0     0/0         0/0           0      0

    [HOST] [IPU2  ]    434.787927 s:   02.0.02 |       0       0       0       0       0      0     0     0     0/0         0/0           0      0

    [HOST] [IPU2  ]    434.788598 s:   02.0.03 |       0       0       0       0       0      0     0     0     0/0         0/0           0      0

    Where could be the issue? why channel initial 6 Q not happening for 2,3,4? In the VIP parser register width height 0 for channel 2,3,4. for channel 1 width height not proper?

    Regards,

    RAJ M

  • Hi Raj,

    can you please first check VIP registers and see if VIP is configured correctly and is reporting correct frame size for all channels?

    Rgds,
    Brijesh
  • Hi Brijesh,

    This is my VIP 4CH reg dump

    Read at address 0x48975A00 (0xb6fb0a00): 0x00000002 //sync type 4CH
    Read at address 0x48975A04 (0xb6f82a04): 0xC0000102
    Read at address 0x48975A08 (0xb6fe4a08): 0x00000000
    Read at address 0x48975A0C (0xb6f40a0c): 0x00000000
    Read at address 0x48975A10 (0xb6fa7a10): 0x00000000
    Read at address 0x48975A14 (0xb6f50a14): 0x003FFEDF
    Read at address 0x48975A18 (0xb6faea18): 0x00000000
    Read at address 0x48975A1C (0xb6f21a1c): 0x00000000
    Read at address 0x48975A20 (0xb6feca20): 0xFFFFFFFC
    Read at address 0x48975A24 (0xb6f39a24): 0xFFFFFFFC
    Read at address 0x48975A28 (0xb6fa7a28): 0xFFFFFFFF
    Read at address 0x48975A2C (0xb6fe8a2c): 0xFFFFFFFF
    Read at address 0x48975A30 (0xb6f5ba30): 0x061A0003 //1CH
    Read at address 0x48975A34 (0xb6f54a34): 0x00000000 //2CH
    Read at address 0x48975A38 (0xb6fcea38): 0x00000000 //3CH
    Read at address 0x48975A3C (0xb6fcda3c): 0x00000000 //4CH

    CH 2,3,4 data not receiving the VIP?
    Other than Sync type for 4CH capture did i miss any configuration?

    Regards,
    RAJ M
  • Hi Raj,

    This is exactly i was asking. 

    Looking at VIP register, it looks like it is configured correctly. It just requires number of ports (0x48975A00)  and sync type (0x48975A04). Both of these fields are configured correctly, it is configured to receive on  8bit ports and Sync type is set to embedded sync 4x multiplexed 4:2:2 YUV stream. So it is correct. 

    If you are still receiving only, it means you TVP5158 is not configured correctly.  Can you please check your configuration? 

    In addition, can you try inverting Pixel clock edge polarity by setting bit 10 on 0x48975A04 register?

    Rgds,

    Brijesh

  • Hi Brijesh,

    TDA2EXEVM: Interlaced capture mode in Linux (A15)+ BIOS(IPU2) case.

    I have verified in VIP register its receiving correctly. Now i have doubt on vision_sdk/src/links_ipu/vip_capture/

    Its not alloc buffer for channel 2,3,4? Have tested for multi channel (ex: TVP5158)?

    In ti_components/drivers/bsp_01_07_01_17/examples/vps/capture/captureVip/src/CaptureVip_main.c

    They are alloc buffer for numCh (4).? Is there any patch for links_ipu/vip_capture/ for mutichannel usecase?

    [HOST] [IPU2 ] 472.438235 s: Input Statistics,
    [HOST] [IPU2 ] 472.438296 s:
    [HOST] [IPU2 ] 472.438327 s: CH | In Recv | In Drop | In User Drop | In Process
    [HOST] [IPU2 ] 472.438418 s: | FPS | FPS | FPS | FPS
    [HOST] [IPU2 ] 472.438479 s: --------------------------------------------------
    [HOST] [IPU2 ] 472.438571 s: 0 | 37.50 0. 0 0. 0 37.50
    [HOST] [IPU2 ] 472.438723 s:
    [HOST] [IPU2 ] 472.438784 s: Output Statistics,
    [HOST] [IPU2 ] 472.438845 s:
    [HOST] [IPU2 ] 472.438876 s: CH | Out | Out | Out Drop | Out User Drop
    [HOST] [IPU2 ] 472.438937 s: | ID | FPS | FPS | FPS
    [HOST] [IPU2 ] 472.439028 s: ---------------------------------------------
    [HOST] [IPU2 ] 472.439120 s: 0 | 0 37.50 0. 0 0. 0
    [HOST] [IPU2 ] 472.439272 s:
    [HOST] [IPU2 ] 472.439303 s: [VIP1 Slice0 PortB] Statistics
    [HOST] [IPU2 ] 472.439364 s: ==============================
    [HOST] [IPU2 ] 472.439455 s: Number of request queued : 1978
    [HOST] [IPU2 ] 472.439516 s: Number of request dequeued: 1980
    [HOST] [IPU2 ] 472.439577 s: Overflow Count : 0
    [HOST] [IPU2 ] 472.439669 s:
    [HOST] [IPU2 ] 472.439699 s: CH | Q DQ Total Top Bot Total Top Bot Min/Max Min/Max Dropped Repe
    [HOST] [IPU2 ] 472.439852 s: (I/S/CH) | Count Count Fields Fields Fields FPS FPS FPS Width Height Frames Framr
    [HOST] [IPU2 ] 472.440004 s: ------------------------------------------------------------------------------------------------------------
    [HOST] [IPU2 ] 472.440309 s: 01.0.00 | 1983 1980 2639 1320 1319 49 25 24 720/720 240/240 659 0
    [HOST] [IPU2 ] 472.440614 s: 01.0.01 | 0 0 2639 1320 1319 49 25 24 720/720 240/240 2639 0
    [HOST] [IPU2 ] 472.440950 s: 01.0.02 | 0 0 2639 1320 1319 49 25 24 720/720 240/240 2639 0
    [HOST] [IPU2 ] 472.441255 s: 01.0.03 | 0 0 2639 1320 1319 49 25 24 720/720 240/240 2639



    Regards,

    RAJ M
  • Hi Raj,

    Yes, it looks like all the captured frames are dropped due to non-availability of buffers. 

    Can you please put breakpoint in Fvid2_queue and see if link enqueues buffers for all channels.

    I am not sure if there is any patch/fix to fix this issue. 

    Let me also check the code.

    Regards,

    Brijesh

  • Hi Brijesh,

    Thanks for your reply,

    Can you please put breakpoint in Fvid2_queue and see if link enqueues buffers for all channels.

    I have checked its not alloc buffer for all channel. Fvid2_queue only once.

    Regards,

    RAJ M

  • Hi Brijesh,

    Any update for multi channel queue and dequeue?

    I tried below changes but still no luck for successful Muti channel capture 

    Regards,

    RAJ M

    diff --git a/Source/vision_sdk/src/links_ipu/vip_capture/captureLink_drv.c b/Source/vision_sdk/src/links_ipu/vip_capture/captureLink_drv.c
    index b4aa963..722e20a 100644
    --- a/Source/vision_sdk/src/links_ipu/vip_capture/captureLink_drv.c
    +++ b/Source/vision_sdk/src/links_ipu/vip_capture/captureLink_drv.c
    @@ -127,7 +127,7 @@ Int32 CaptureLink_drvCreateInst(CaptureLink_Obj * pObj, UInt16 instId)
         Vps_VipPortConfig *pVipPortCfg;
         CaptureLink_OutParams *pOutPrm;
         System_LinkChInfo *pQueChInfo;
    -    UInt16 queId, queChId, outId;
    +    UInt16 queId, queChId, outId, chId;
         Int32 status;
         Int32 nRetVal = 0;
         Fvid2_DataFormat dataFormat;
    @@ -143,7 +143,7 @@ Int32 CaptureLink_drvCreateInst(CaptureLink_Obj * pObj, UInt16 instId)
         pVipCreateArgs->videoIfMode  = pInstPrm->videoIfMode;
         pVipCreateArgs->videoIfWidth = pInstPrm->videoIfWidth;
         pVipCreateArgs->bufCaptMode  = pInstPrm->bufCaptMode;
    -    pVipCreateArgs->numCh        = 1;
    +    pVipCreateArgs->numCh        = 2;//4;//1;
         pVipCreateArgs->numStream    = pInstPrm->numStream;
     
         /*
    @@ -430,10 +430,12 @@ Int32 CaptureLink_drvCreateInst(CaptureLink_Obj * pObj, UInt16 instId)
             /*
              * Initialize the channel information for the next link
              */
    +	for (chId = 0; chId < pVipCreateArgs->numCh; chId++)
    +        {
             queId = 0;
             queChId = pObj->info.queInfo[queId].numCh;
     
    -        pQueChInfo = &pObj->info.queInfo[0].chInfo[queChId];
    +        pQueChInfo = &pObj->info.queInfo[queId].chInfo[queChId];
     
             dataFormat = (Fvid2_DataFormat) pOutPrm->dataFormat;
             pQueChInfo->flags = System_Link_Ch_Info_Set_Flag_Data_Format(pQueChInfo->flags,
    @@ -450,15 +452,15 @@ Int32 CaptureLink_drvCreateInst(CaptureLink_Obj * pObj, UInt16 instId)
     
             pQueChInfo->flags = System_Link_Ch_Info_Set_Flag_Scan_Format(pQueChInfo->flags,
                     pInstPrm->inParams.scanFormat);
    -
    -        pVipCreateArgs->chNumMap[outId][0]  =
    -            pObj->info.queInfo[queId].numCh + pObj->fvid2DrvChNumOffset;
    -
    +        
    +	pVipCreateArgs->chNumMap[outId][chId]  =  Vps_captMakeChNum(pInst->instId, outId, chId);
    +            //pObj->info.queInfo[queId].numCh + pObj->fvid2DrvChNumOffset;
    +	
             pObj->info.queInfo[queId].numCh++;
     
             pObj->chToInstMap[queChId] = instId;
    +    	}
         }
    -
         Fvid2CbParams_init(&pInst->cbPrm);
         pInst->cbPrm.appData = pInst;
         pInst->parent = pObj;
    @@ -588,9 +590,13 @@ Int32 CaptureLink_drvCreate(CaptureLink_Obj * pObj,
     
         System_resetLinkMemAllocInfo(&pObj->createArgs.memAllocInfo);
     
    -    status = Utils_bufCreate(&pObj->bufQue, FALSE, FALSE);
    -    UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);
    -    pObj->info.queInfo[queId].numCh = 0;
    +    for (queId = 0; queId < CAPTURE_LINK_MAX_OUT_QUE; queId++)
    +    {
    +	    status = Utils_bufCreate(&pObj->bufQue, FALSE, FALSE);
    +	    UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);
    +
    +	    pObj->info.queInfo[queId].numCh = 0;
    +    }
     
         if (pPrm->numVipInst)
         {
    @@ -707,7 +713,7 @@ Int32 CaptureLink_drvProcessData(CaptureLink_Obj * pObj, UInt32 instId)
     
                     sysBuf = pFrame->appData;
     
    -                UTILS_assert(sysBuf->chNum < CAPTURE_LINK_MAX_CH_PER_OUT_QUE);
    +                //UTILS_assert(sysBuf->chNum < CAPTURE_LINK_MAX_CH_PER_OUT_QUE);
     
                     /* Setting the top or bottom field into payload->flags */
                     ((System_VideoFrameBuffer*) (sysBuf->payload))->flags =
    @@ -816,10 +822,10 @@ Int32 CaptureLink_drvPutEmptyBuffers(CaptureLink_Obj * pObj,
                 UTILS_assert(pFrame != NULL);
     
                 pFrame->perFrameCfg = NULL;
    -            frameList.frames[0] = pFrame;
    +            frameList.frames[idx] = pFrame;
                 frameList.numFrames  = 1;
     
    -            UTILS_assert(pBuf->chNum < CAPTURE_LINK_MAX_CH_PER_OUT_QUE);
    +            //UTILS_assert(pBuf->chNum < CAPTURE_LINK_MAX_CH_PER_OUT_QUE);
     
                 instId = pObj->chToInstMap[pBuf->chNum];
     
    @@ -1164,7 +1170,7 @@ Int32 CaptureLink_drvAllocAndQueueFrames(CaptureLink_Obj * pObj,
                                              CaptureLink_InstObj * pDrvObj)
     {
         Int32 status;
    -    UInt32 idx,streamId, frameId;
    +    UInt32 idx,streamId, frameId, chId;
         Vps_CaptVipOutInfo *pOutInfo;
         FVID2_Frame *frames;
         FVID2_FrameList frameList;
    @@ -1210,13 +1216,16 @@ Int32 CaptureLink_drvAllocAndQueueFrames(CaptureLink_Obj * pObj,
          */
         for (streamId = 0U; streamId < pDrvObj->createArgs.numStream; streamId++)
         {
    +	for (chId = 0U; chId < pDrvObj->createArgs.numCh; chId++)
    +	{
             pOutInfo = &pDrvObj->vipPrms.outStreamInfo[streamId];
     
             /*
              * base index for pDrvObj->frames[], pDrvObj->buffers[] and
              * pDrvObj->videoFrames[];
              */
    -        idx = CAPTURE_LINK_MAX_CH_PER_HANDLE * numFrames * streamId;
    +        idx = (CAPTURE_LINK_MAX_CH_PER_HANDLE * numFrames * streamId) + (numFrames * chId);
    +        //idx = CAPTURE_LINK_MAX_CH_PER_HANDLE * numFrames * streamId;
             if (idx >= CAPTURE_LINK_MAX_FRAMES_PER_HANDLE)
             {
                 Vps_printf(" CAPTURE: ERROR: Array out of bounds detected in"
    @@ -1271,7 +1280,7 @@ Int32 CaptureLink_drvAllocAndQueueFrames(CaptureLink_Obj * pObj,
                 memset(&frames[frameId], 0, sizeof(frames[frameId]));
     
                 frames[frameId].chNum      =
    -                pDrvObj->createArgs.chNumMap[streamId][0];
    +                pDrvObj->createArgs.chNumMap[streamId][chId];
                 frames[frameId].addr[0][0] = pBaseAddr;
                 frames[frameId].addr[0][1] = pBaseAddr + cOffset;
     
    @@ -1303,7 +1312,7 @@ Int32 CaptureLink_drvAllocAndQueueFrames(CaptureLink_Obj * pObj,
                 * shall be checked by another code checker like Klocwork.
                 */
     
    -#ifdef SYSTEM_VERBOSE_PRINTS
    +//#ifdef SYSTEM_VERBOSE_PRINTS
                 {
                     Vps_printf(" CAPTURE: Frame %d: FVID2 CH %d: Link CH %d: 0x%08x, 0x%08x, %d B \n",
                             frameId,
    @@ -1314,7 +1323,7 @@ Int32 CaptureLink_drvAllocAndQueueFrames(CaptureLink_Obj * pObj,
                             frameSize
                             );
                 }
    -#endif
    +//#endif
             }
     
             /*
    @@ -1340,6 +1349,7 @@ Int32 CaptureLink_drvAllocAndQueueFrames(CaptureLink_Obj * pObj,
             UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);
     
         }
    +    }
     
         return SYSTEM_LINK_STATUS_SOK;
     }