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.

Capture and DEI issue in RDK 03.00.00.00

Hi,

   I have developed the following Encoder system using Link API's. 16 channels @ D1, 60fps

                   |+----- DEI_H---+

VCAP ----> NSF ----+             MERGE --> ENC --> IPC_RTOS--> IPC_HLOS --> TS_MUX and stream over UDP.

                   |+----- DEI ----+

I observe a small real time issue with the Capture or the the way DEI drops the frame. My DEI frame rate configuration is below.

        deiPrm[i].inputDeiFrameRate                                = 60;
        deiPrm[i].outputDeiFrameRate                               = 30;

So it must drop every alternative frame. But when I print Capture time in A8 I observe,

Actual Capture time:-

{31689 31721 31753 31785 31817 31833 31865 31897 31929 31961 31993 32025 32041 32073 32105 32137 32169 32201 32217} 

Time Diff:-

{  0    32    32    32    32    16    32    32    32    32    32    32    16   32    32    32    32    32    16

Ideally the DEI should drop every alternative frame and we should get time difference of 32ms between any two frames. But from the above data we could clearly see, every 4 to 6 frames, the DEI drops the other frame and I get the time difference of 16ms at times.

Any idea what is going wrong? How to solve this issue?. Any particular DEI config make it happen?

while TS streaming, this becomes a serious issue, as the DTS goes ahead of PCR.





  • Pls share logs of Vsys_printDetailedStatistics. If you dont use mcfw API you will have to implement equivalent API and share the log. 

  • Hi Badri,

       Thanks for your reply.

    Here is my Use case...

    /*
                          Capture (YUV422I) 16CH D1 60fps
                              |
                              |
                             NSF (YUV420SP)
                              |
                              +------------+
                              |            |
                            DEIH          DEI
                              |            |
                              | +----------+
                              | |
                             MERGE
                               |
                              ENC (H264)
                               |
                               |
                            TS STREAM (UDP)
    */

    Here are the detailed statistics....

    [m3vpss ]  *** Capture Driver Advanced Statistics ***
     [m3vpss ]
     [m3vpss ]  VIP Parser Reset Count : 0
     [m3vpss ]
     [m3vpss ]      |   Total    Even     Odd  Total  Even   Odd  Min /  Max  Min /  Max Dropped Fid Repeat Frame Error Y/C
     [m3vpss ]  CH  |  Fields  Fields  Fields    FPS   FPS   FPS       Width      Height  Fields      Count (Desc Error Y/C)
     [m3vpss ]  ------------------------------------------------------------------------------------------------------------
     [m3vpss ]  000 |     915     458     457     70    35    35  720 /  720  243 /  244       1          1 0/0 (0/0)
     [m3vpss ]  001 |     911     456     455     70    35    35  720 /  720  243 /  244       1          0 0/0 (0/0)
     [m3vpss ]  002 |     911     456     455     70    35    35  720 /  720  243 /  244       1          0 0/0 (0/0)
     [m3vpss ]  003 |     911     456     455     70    35    35  720 /  720  243 /  244       1          0 0/0 (0/0)
     [m3vpss ]  100 |     911     456     455     70    35    35  720 /  720  243 /  244       1          1 0/0 (0/0)
     [m3vpss ]  101 |     911     456     455     70    35    35  720 /  720  243 /  244       1          1 0/0 (0/0)
     [m3vpss ]  102 |     911     456     455     70    35    35  720 /  720  243 /  244       1          1 0/0 (0/0)
     [m3vpss ]  103 |     911     456     455     70    35    35  720 /  720  243 /  244       1          1 0/0 (0/0)
     [m3vpss ]  200 |     911     456     455     70    35    35  720 /  720  243 /  244       1          0 0/0 (0/0)
     [m3vpss ]  201 |     911     456     455     70    35    35  720 /  720  243 /  244       1          0 0/0 (0/0)
     [m3vpss ]  202 |     911     456     455     70    35    35  720 /  720  243 /  244       1          0 0/0 (0/0)
     [m3vpss ]  203 |     911     456     455     70    35    35  720 /  720  243 /  244       1          0 0/0 (0/0)
     [m3vpss ]  300 |     911     456     455     70    35    35  720 /  720  243 /  244       1          1 0/0 (0/0)
     [m3vpss ]  301 |     911     456     455     70    35    35  720 /  720  243 /  244       1          1 0/0 (0/0)
     [m3vpss ]  302 |     911     456     455     70    35    35  720 /  720  243 /  244       1          1 0/0 (0/0)
     [m3vpss ]  303 |     911     456     455     70    35    35  720 /  720  243 /  244       1          1 0/0 (0/0)
     [m3vpss ]
     [m3vpss ]  VIP Capture Port 0 | DescMissMatch1 = 0, DescMissMatch2 = 0 , DescMissMatch3 = 0
     [m3vpss ]  VIP Capture Port 1 | DescMissMatch1 = 0, DescMissMatch2 = 0 , DescMissMatch3 = 0
     [m3vpss ]  VIP Capture Port 2 | DescMissMatch1 = 0, DescMissMatch2 = 0 , DescMissMatch3 = 0
     [m3vpss ]  VIP Capture Port 3 | DescMissMatch1 = 0, DescMissMatch2 = 0 , DescMissMatch3 = 0
     [m3vpss ]
     [m3vpss ]  *** Capture List Manager Advanced Statistics ***
     [m3vpss ]
     [m3vpss ]  List Post Count        : 6747
     [m3vpss ]  List Stall Count       : 0
     [m3vpss ]  List Post Time (ms)    : Max = 0, Min = 0, Avg = 0, Total = 0
     [m3vpss ]  INTC Timeout Count     : (0, 0) (Min timeout value = 949, 974)
     [m3vpss ]  Descriptor miss found count : 0
     [m3vpss ]
     [m3vpss ]
     [m3vpss ]  VIP and VPDMA registers,
     [m3vpss ]  VIP0 : FIQ_STATUS  : 0x4810551c = 0x0000f400
     [m3vpss ]  VIP1 : FIQ_STATUS  : 0x48105a1c = 0x0000fc00
     [m3vpss ]  VPDMA: LIST_BUSY   : 0x4810d00c = 0x00000000
     [m3vpss ]
     [m3vpss ]
     [m3vpss ]  47706: CAPTURE: Fields = 14548 (fps = 1077, CPU Load = 0)
     [m3vpss ]  47706: CAPTURE: Num Resets = 0 (Avg 0 ms per reset)
     [m3vpss ]  47706: SYSTEM  : FREE SPACE : System Heap      = 6160 B, Mbx = 10238 msgs)
     [m3vpss ]  47706: SYSTEM  : FREE SPACE : SR0 Heap         = 11003648 B (10 MB)
     [m3vpss ]  47706: SYSTEM  : FREE SPACE : Frame Buffer     = 31880064 B (30 MB)
     [m3vpss ]  47706: SYSTEM  : FREE SPACE : Bitstream Buffer = 204832640 B (195 MB)
     [m3vpss ]  47707: SYSTEM  : FREE SPACE : Tiler 8-bit      = 134217728 B (128 MB)  - TILER ON
     [m3vpss ]  47707: SYSTEM  : FREE SPACE : Tiler 16-bit     = 134217728 B (128 MB)  - TILER ON
     
     
     [m3vpss ]  *** [NSF0] NSF Statistics ***
     [m3vpss ]
     [m3vpss ]  Elasped Time           : 16 secs
     [m3vpss ]  Total Fields Processed : 16468
     [m3vpss ]  Total Fields FPS       : 1228 FPS
     [m3vpss ]
     [m3vpss ]
     [m3vpss ]  CH  | In Recv In Reject In Process Out User Out Out
     [m3vpss ]  Num | FPS     FPS       FPS        FPS Skip FPS Skip FPS
     [m3vpss ]  ------------------------------------------------
     [m3vpss ]    0 |      64         0         64  64        0        0
     [m3vpss ]    1 |      64         0         64  64        0        0
     [m3vpss ]    2 |      64         0         64  64        0        0
     [m3vpss ]    3 |      64         0         64  64        0        0
     [m3vpss ]    4 |      64         0         64  64        0        0
     [m3vpss ]    5 |      64         0         64  64        0        0
     [m3vpss ]    6 |      64         0         64  64        0        0
     [m3vpss ]    7 |      64         0         64  64        0        0
     [m3vpss ]    8 |      64         0         64  64        0        0
     [m3vpss ]    9 |      64         0         64  64        0        0
     [m3vpss ]   10 |      64         0         64  64        0        0
     [m3vpss ]   11 |      64         0         64  64        0        0
     [m3vpss ]   12 |      64         0         64  64        0        0
     [m3vpss ]   13 |      64         0         64  64        0        0
     [m3vpss ]   14 |      64         0         64  64        0        0
     [m3vpss ]   15 |      64         0         64  64        0        0
     [m3vpss ]
     
     [m3vpss ]  *** [DEI0    ] DEI Statistics ***
     [m3vpss ]
     [m3vpss ]  Elasped Time           : 17 secs
     [m3vpss ]  Total Fields Processed : 4595
     [m3vpss ]  Total Fields FPS       : 722 FPS
     [m3vpss ]
     [m3vpss ]
     [m3vpss ]  CH  | In Recv In Reject In Process Out[0] Out[1] Out[2] Out[3] Out[4] Skip Out[0] Skip Out[1] Skip Out[2] Skip Out[3] Skip
     Out[4] User Out[0] User Out[1] User Out[2] User Out[3] User Out[4] Latency
     [m3vpss ]  Num | FPS     FPS       FPS        FPS    FPS    FPS    FPS    FPS       FPS         FPS         FPS         FPS         F
    PS       Skip FPS    Skip FPS    Skip FPS    Skip FPS    Skip FPS   Min / Max
     [m3vpss ]  --------------------------------------------------------------------------------------------------------------------------
    -----------------------------------------------------------------------------
     [m3vpss ]    0 |      67        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  13 /  31
     [m3vpss ]    1 |      67        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  13 /  29
     [m3vpss ]    2 |      67        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  15 /  29
     [m3vpss ]    3 |      67        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  15 /  30
     [m3vpss ]    4 |      67        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  16 /  30
     [m3vpss ]    5 |      67        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  17 /  30
     [m3vpss ]    6 |      67        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  17 /  30
     [m3vpss ]    7 |      67        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  16 /  30

     [m3vpss ]
     [m3vpss ]  *** [DEI2    ] DEI Statistics ***
     [m3vpss ]
     [m3vpss ]  Elasped Time           : 19 secs
     [m3vpss ]  Total Fields Processed : 5072
     [m3vpss ]  Total Fields FPS       : 785 FPS
     [m3vpss ]
     [m3vpss ]
     [m3vpss ]  CH  | In Recv In Reject In Process Out[0] Out[1] Out[2] Out[3] Out[4] Skip Out[0] Skip Out[1] Skip Out[2] Skip Out[3] Skip
     Out[4] User Out[0] User Out[1] User Out[2] User Out[3] User Out[4] Latency
     [m3vpss ]  Num | FPS     FPS       FPS        FPS    FPS    FPS    FPS    FPS       FPS         FPS         FPS         FPS         F
    PS       Skip FPS    Skip FPS    Skip FPS    Skip FPS    Skip FPS   Min / Max
     [m3vpss ]  --------------------------------------------------------------------------------------------------------------------------
    -----------------------------------------------------------------------------
     [m3vpss ]    0 |      66        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  17 /  34
     [m3vpss ]    1 |      66        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  17 /  34
     [m3vpss ]    2 |      66        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  17 /  34
     [m3vpss ]    3 |      66        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  17 /  34
     [m3vpss ]    4 |      66        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  15 /  34
     [m3vpss ]    5 |      66        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  15 /  34
     [m3vpss ]    6 |      66        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  15 /  34
     [m3vpss ]    7 |      66        33         33      0     33      0      0      0          33           0           0           0
          0           0           0           0           0           0  14 /  34


     [m3video]
     [m3video]  *** ENCODE Statistics ***
     [m3video]
     [m3video]  Elasped Time           : 22 secs
     [m3video]
     [m3video]
     [m3video]  CH  | In Recv In Skip In User  Out Latency
     [m3video]  Num | FPS     FPS     Skip FPS FPS Min / Max
     [m3video]  --------------------------------------------
     [m3video]    0 |      34       0        0  34  19 /  43
     [m3video]    1 |      34       0        0  34  19 /  43
     [m3video]    2 |      34       0        0  34  23 /  43
     [m3video]    3 |      34       0        0  34  23 /  43
     [m3video]    4 |      34       0        0  34  23 /  43
     [m3video]    5 |      34       0        0  34  23 /  43
     [m3video]    6 |      34       0        0  34  23 /  39
     [m3video]    7 |      34       0        0  34  19 /  44
     [m3video]    8 |      34       0        0  34  23 /  44
     [m3video]    9 |      34       0        0  34  27 /  47
     [m3video]   10 |      34       0        0  34  27 /  47
     [m3video]   11 |      34       0        0  34  27 /  47
     [m3video]   12 |      34       0        0  34  19 /  39
     [m3video]   13 |      34       0        0  34  23 /  47
     [m3video]   14 |      34       0        0  34  19 /  47
     [m3video]   15 |      34       0        0  34  19 /  47
     [m3video]
     [m3video] Multi Channel Encode Average Submit Batch Size
     [m3video] Max Submit Batch Size : 24
     [m3video] IVAHD_0 Average Batch Size : 1
     [m3video] IVAHD_0 Max achieved Batch Size : 5
     [m3video] IVAHD_1 Average Batch Size : 1
     [m3video] IVAHD_1 Max achieved Batch Size : 5
     [m3video] IVAHD_2 Average Batch Size : 1
     [m3video] IVAHD_2 Max achieved Batch Size : 3
     [m3video]
     [m3video] Multi Channel Encode Batch break Stats
     [m3video] Total Number of Batches created: 2814
     [m3video] All numbers are based off total number of Batches created
     [m3video]       Batch breaks due to batch sizeexceeding limit: 0 %
     [m3video]       Batch breaks due to ReqObj Que being empty: 100 %
     [m3video]       Batch breaks due to changed resolution class: 0 %
     [m3video]       Batch breaks due to interlace and progressivecontent mix: 0 %
     [m3video]       Batch breaks due to channel repeat: 0 %
     [m3video]       Batch breaks due to different codec: 0 %
     [m3video] Total Number of Batches created: 2756
     [m3video] All numbers are based off total number of Batches created
     [m3video]       Batch breaks due to batch sizeexceeding limit: 0 %
     [m3video]       Batch breaks due to ReqObj Que being empty: 100 %
     [m3video]       Batch breaks due to changed resolution class: 0 %
     [m3video]       Batch breaks due to interlace and progressivecontent mix: 0 %
     [m3video]       Batch breaks due to channel repeat: 0 %
     [m3video]       Batch breaks due to different codec: 0 %
     [m3video] Total Number of Batches created: 1507
     [m3video] All numbers are based off total number of Batches created
     [m3video]       Batch breaks due to batch sizeexceeding limit: 0 %
     [m3video]       Batch breaks due to ReqObj Que being empty: 100 %
     [m3video]       Batch breaks due to changed resolution class: 0 %
     [m3video]       Batch breaks due to interlace and progressivecontent mix: 0 %
     [m3video]       Batch breaks due to channel repeat: 0 %
     [m3video]       Batch breaks due to different codec: 0 %



     [m3video]  *** Encode Statistics ***
     [m3video]   58308: ENC: Rcvd from prev = 13015, Returned to prev = 13010
     [m3video]  ENC Out  BitBuf Q Status
     [m3video] Empty Q 0 -> count 52, wrPtr 11, rdPtr 343
     [m3video] Full Q -> count 0, wrPtr 338, rdPtr 338


     Enter Choice:  [m3video]       60071: HDVICP-ID:0
     [m3video] All percentage figures are based off totalElapsedTime
     [m3video]               totalAcquire2wait :2 %
     [m3video]               totalWait2Isr :39 %
     [m3video]               totalIsr2Done :0 %
     [m3video]               totalWait2Done :39 %
     [m3video]               totalDone2Release :0 %
     [m3video]               totalAcquire2Release :43 %
     [m3video]               totalAcq2acqDelay :56 %
     [m3video]               totalElapsedTime in msec :   25782
     [m3video]               numAccessCnt:   39432
     [m3video]              IVA-FPS :    1577
     [m3video]              Average time spent per frame in microsec:     254
     [m3video]      60072: HDVICP-ID:1
     [m3video] All percentage figures are based off totalElapsedTime
     [m3video]               totalAcquire2wait :1 %
     [m3video]               totalWait2Isr :40 %
     [m3video]               totalIsr2Done :0 %
     [m3video]               totalWait2Done :40 %
     [m3video]               totalDone2Release :0 %
     [m3video]               totalAcquire2Release :43 %
     [m3video]               totalAcq2acqDelay :56 %
     [m3video]               totalElapsedTime in msec :   25783
     [m3video]               numAccessCnt:   38604
     [m3video]              IVA-FPS :    1544
     [m3video]              Average time spent per frame in microsec:     266
     [m3video]      60073: HDVICP-ID:2
     [m3video] All percentage figures are based off totalElapsedTime
     [m3video]               totalAcquire2wait :1 %
     [m3video]               totalWait2Isr :26 %
     [m3video]               totalIsr2Done :0 %
     [m3video]               totalWait2Done :26 %
     [m3video]               totalDone2Release :0 %
     [m3video]               totalAcquire2Release :28 %
     [m3video]               totalAcq2acqDelay :71 %
     [m3video]               totalElapsedTime in msec :   25768
     [m3video]               numAccessCnt:   21072
     [m3video]              IVA-FPS :     842
     [m3video]              Average time spent per frame in microsec:     317

    Expecting your early reply.

    Thanks

  • There is some problem with the clock configuration. Looks like the frequency of M3 is not matching between what is actually set in uboot and what is defined in

    /dvr_rdk/mcfw/interfaces/link_api/system_common.h

    #define SYSTEM_M3VPSS_FREQ (280)
    #define SYSTEM_M3VIDEO_FREQ (280)
    #define SYSTEM_DSP_FREQ (800)

    Pls check your uboot is setting M3 to 280 .Capture FPS is showing up as 70 which is wrong.

  • Thanks Badri,

       Your fast reply helped me to fix the Issue.

    The uboot was setting it to 250MHz and the SYSTEM_M3VPSS_FREQ is set to 280MHz. for the time being I solved the issue by changing the SYSTEM_M3VPSS_FREQ to 250.

    Thanks

    Subash