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.

1080i59.94 capture drop field in dvrrdk4.1

Hello,

my usercase is just capture link -> display link,when the input source video is 1080i60,the capture and display is work well, the  Capture FPS debug as below:

 [m3vpss ]  CAPTURE : Capture FPS: 60 fps ... in 10.0 secs
 [m3vpss ]  CAPTURE : Capture FPS: 60 fps ... in 10.0 secs
 [m3vpss ]  CAPTURE : Capture FPS: 60 fps ... in 10.0 secs

 but when the input source video is 1080i59,the capture looks like incorrect, some fields dropped,the Capture FPS debug as below:

 [m3vpss ]  CAPTURE : Capture FPS: 56.0 fps ... in 10.0 secs
 [m3vpss ]  CAPTURE : Capture FPS: 58.7 fps ... in 10.0 secs
 [m3vpss ]  CAPTURE : Capture FPS: 59.9 fps ... in 10.0 secs
 [m3vpss ]  CAPTURE : Capture FPS: 57.2 fps ... in 10.0 secs
 [m3vpss ]  CAPTURE : Capture FPS: 57.0 fps ... in 10.0 secs
 [m3vpss ]  CAPTURE : Capture FPS: 59.9 fps ... in 10.0 secs
 [m3vpss ]  CAPTURE : Capture FPS: 58.6 fps ... in 10.0 secs
 [m3vpss ]  CAPTURE : Capture FPS: 55.6 fps ... in 10.0 secs

 The detailed system information as below,the dropped fields counter is 629。 Please tell me how to solve this problem .if you want to more details for my usercase ,just tell me.

[m3vpss ] 
 [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 |   23186   11593   11593     60    30    30 1920 / 1920  540 /  540     629          0 0/0 (0/0)
 [m3vpss ] 
 [m3vpss ]  VIP Capture Port 0 | DescMissMatch1 = 0, DescMissMatch2 = 0 , DescMissMatch3 = 0
 [m3vpss ] 
 [m3vpss ]  *** Capture List Manager Advanced Statistics ***
 [m3vpss ] 
 [m3vpss ]  List Post Count        : 48354
 [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 = 992, 1000)
 [m3vpss ]  Descriptor miss found count : 0
 [m3vpss ] 
 [m3vpss ] 
 [m3vpss ]  VIP and VPDMA registers,
 [m3vpss ]  VIP0 : FIQ_STATUS  : 0x4810551c = 0x00000000
 [m3vpss ]  VIP1 : FIQ_STATUS  : 0x48105a1c = 0x00000000
 [m3vpss ]  VPDMA: LIST_BUSY   : 0x4810d00c = 0x00020000
 [m3vpss ] 
 [m3vpss ] 
 [m3vpss ]  668543: CAPTURE: Fields = 22557 (fps = 58, CPU Load = 0)
 [m3vpss ]  668543: CAPTURE: Num Resets = 0 (Avg 0 ms per reset)
 [m3vpss ]  668543: SYSTEM  : FREE SPACE : System Heap      = 245480 B, Mbx = 10239 msgs)
 [m3vpss ]  668544: SYSTEM  : FREE SPACE : SR0 Heap         = 1528960 B (1 MB)
 [m3vpss ]  668544: SYSTEM  : FREE SPACE : Frame Buffer     = 128111488 B (122 MB)
 [m3vpss ]  668544: SYSTEM  : FREE SPACE : Bitstream Buffer = 94371712 B (89 MB)
 [m3vpss ] TILER_STATS: CNT :8BIT
 [m3vpss ] TILER_STATS: CNT RESOLUTION:    16384 x 3776
 [m3vpss ] TILER_STATS: BUCKET RESOLUTION: 16384 x 3772
 [m3vpss ] TILER_STATS: NUM FREE BUCKETS:  1
 [m3vpss ] TILER_STATS: NUM USED BUCKETS:  0
 [m3vpss ] TILER_STATS: TOTAL FREE AREA:   61800448 (99 %)
 [m3vpss ] TILER_STATS: TOTAL USED AREA:   0 (0 %)
 [m3vpss ] TILER_STATS: CNT :16BIT
 [m3vpss ] TILER_STATS: CNT RESOLUTION:    32768 x 1280
 [m3vpss ] TILER_STATS: BUCKET RESOLUTION: 32768 x 1280
 [m3vpss ] TILER_STATS: NUM FREE BUCKETS:  1
 [m3vpss ] TILER_STATS: NUM USED BUCKETS:  0
 [m3vpss ] TILER_STATS: TOTAL FREE AREA:   41943040 (100 %)
 [m3vpss ] TILER_STATS: TOTAL USED AREA:   0 (0 %)
 [m3vpss ]  668546: SYSTEM  : FREE SPACE : Tiler 8-bit      = 61800448 B (58 MB)  - TILER ON
 [m3vpss ]  668546: SYSTEM  : FREE SPACE : Tiler 16-bit     = 41943040 B (40 MB)  - TILER ON
 [m3vpss ]  668547: DISPLAY: HDDAC(BP0) : 30 fps, Latency (Min / Max) = ( 255 / 0 ), Callback Interval (Min / Max) = ( 33 / 34 ) DropCount:0 DispLatency (Min / Max) = ( 8947 / 0 ) !!!
 [m3vpss ]  668547: DISPLAY DRV: HDDAC(BP0) : Q:[10910] Display:[11548], Repeat:[640], DQ:[10908]
 [m3vpss ]  668547: DISPLAY: UNDERFLOW COUNT: HDMI(BP0) 0, HDDAC(BP0) 35604, DVO2(BP1) 0, SDDAC(SEC1) 35524
 [m3vpss ]  668547: SYSTEM  : FREE SPACE : System Heap      = 245480 B, Mbx = 10239 msgs)
 [m3vpss ]  668547: SYSTEM  : FREE SPACE : SR0 Heap         = 1528960 B (1 MB)
 [m3vpss ]  668547: SYSTEM  : FREE SPACE : Frame Buffer     = 128111488 B (122 MB)
 [m3vpss ]  668547: SYSTEM  : FREE SPACE : Bitstream Buffer = 94371712 B (89 MB)
 [m3vpss ] TILER_STATS: CNT :8BIT
 [m3vpss ] TILER_STATS: CNT RESOLUTION:    16384 x 3776
 [m3vpss ] TILER_STATS: BUCKET RESOLUTION: 16384 x 3772
 [m3vpss ] TILER_STATS: NUM FREE BUCKETS:  1
 [m3vpss ] TILER_STATS: NUM USED BUCKETS:  0
 [m3vpss ] TILER_STATS: TOTAL FREE AREA:   61800448 (99 %)
 [m3vpss ] TILER_STATS: TOTAL USED AREA:   0 (0 %)
 [m3vpss ] TILER_STATS: CNT :16BIT
 [m3vpss ] TILER_STATS: CNT RESOLUTION:    32768 x 1280
 [m3vpss ] TILER_STATS: BUCKET RESOLUTION: 32768 x 1280
 [m3vpss ] TILER_STATS: NUM FREE BUCKETS:  1
 [m3vpss ] TILER_STATS: NUM USED BUCKETS:  0
 [m3vpss ] TILER_STATS: TOTAL FREE AREA:   41943040 (100 %)
 [m3vpss ] TILER_STATS: TOTAL USED AREA:   0 (0 %)
 [m3vpss ]  668549: SYSTEM  : FREE SPACE : Tiler 8-bit      = 61800448 B (58 MB)  - TILER ON
 [m3vpss ]  668549: SYSTEM  : FREE SPACE : Tiler 16-bit     = 41943040 B (40 MB)  - TILER ON

  • What is your display resolution?
    It looks like your display is running slower, since capture drops frames only if it runs out of frames.
    Rgds,Brijesh
  • The display resolution is 1080i60
  • Whether input 1080i60 or 1080i59.94,the output is 1080i60.
  • I fount the capture isn't runs out of frames,it captured unexpert filed,the fid value is wrong.
  • VIP just reports the FID what it gets from outside, so you need to check in your external device why fid is coming out to be wrong.

     

    Rgds,

    Brijesh

  • We use capturemode as embedded sync,don't connect FID Pin,so the FID shoud get by capture,is it right?
    pCaptureInstPrm->videoIfMode = DEVICE_CAPT_VIDEO_IF_MODE_16BIT;
    pCaptureInstPrm->vipInstId = SYSTEM_CAPTURE_INST_VIP0_PORTA;
    pCaptureInstPrm->videoCaptureMode = DEVICE_CAPT_VIDEO_CAPTURE_MODE_SINGLE_CH_NON_MUX_EMBEDDED_SYNC;
  • ok, even in that case, capture driver will drop the field if it gets repeated fid. It means VIP is receiving some errorneous input signal. Could you please check the input signal?
    Rgds,Brijesh
  • How to check the input signal?My input device is Signal generator,and test so many monitor devices are ok.I can't understand why the 1080i50hz and 1080i60hz,the capture link is ok but the 1080i59hz from the same Signal generator is incorrect .
  • what is 59Hz signal? it is not even number, how does signal generator generates such odd fps? what will be field id of every 60th field ie after 59the field??
    Rgds,Brijesh
  • The 1080i59Hz actually means 1080i59.94Hz,Have you never seen this resolution before?it's similar to 1080p59.94hz,they are often used in the radio and television industry.The difference timing between 1080i60Hz and 1080i59.94Hz as below:

    #define VDIS_TIMINGS_1080I_59 "74175,1920/88/148/44,1080/2/15/5,0"
    #define VDIS_TIMINGS_1080I_60 "74250,1920/88/148/44,1080/2/15/5,0"
  • oh ok, you were mentioning 59HZ, so i got confused.

     

    All i can say is, port is receiving streams with many repeated FID and driver drops a frame when there is a FID repeat. you will have to check why FID is getting repeated in your input streams.

     

    Regards,

    Brijesh

  • I debuged the capture driver,find that isn't repeat FID but Frame Drop because of pFrame->channelNum=VPS_CAPT_DROP_FRAME_CH_ID


    [m3vpss ] 391851: CAPT_DRV: Frame Drop (VPDMA CH = 38) !!!
    [m3vpss ] 392251: CAPT_DRV: Frame Drop (VPDMA CH = 38) !!!
    [m3vpss ] 392651: CAPT_DRV: Frame Drop (VPDMA CH = 38) !!!
    [m3vpss ] 393051: CAPT_DRV: Frame Drop (VPDMA CH = 38) !!!
    [m3vpss ] 393419: CAPT_DRV: Frame Drop (VPDMA CH = 38) !!!
    [m3vpss ] 393819: CAPT_DRV: Frame Drop (VPDMA CH = 38) !!!
    [m3vpss ] 394219: CAPT_DRV: Frame Drop (VPDMA CH = 38) !!!
    [m3vpss ] 394587: CAPT_DRV: Frame Drop (VPDMA CH = 38) !!!


    This debug comes from the function " Vps_CaptTskPutCaptField"
    (dvrrdk4.1\ti_tools\hdvpss\dvr_rdk_hdvpss\packages\ti\psp\vps\drivers\capture\src\vpsdrv_captureList.c)


    if (FVID2_SOK == status1 && FVID2_SOK == status2)
    {
    /* Put the Complete frame in the full Queue. */
    if(pFrame->channelNum!=VPS_CAPT_DROP_FRAME_CH_ID)
    {
    pChObj->captureFrameCount ++;

    VpsUtils_quePut(
    &pObj->fullQue[Vps_captGetStreamId(parseDescInfo->lChannel)],
    pFrame,
    BIOS_WAIT_FOREVER);
    }
    else
    {
    // #ifdef VPS_CAPTURE_RT_DEBUG
    #if 1
    Vps_rprintf(" %d: CAPT_DRV: Frame Drop (VPDMA CH = %d) !!!\n",
    Clock_getTicks(),
    parseDescInfo->vChannel
    );
    #endif

    pChObj->droppedFrameCount++;
    }
    }
    else
    {
    if(pFrame->channelNum!=VPS_CAPT_DROP_FRAME_CH_ID)
    {
    /* Luma part of frame not written, put it back to empty queue */
    VpsUtils_quePut(&pChObj->emptyQue, pFrame, BIOS_WAIT_FOREVER);
    }
    }
  • If you see the code, this channel number will be set in channelNum field if driver does not find any buffers in its input queue, it means app is not queueing buffers on time.. So frames are getting dropped.
    Looks like display or some inbetween link is holding up buffers and not releasing. Can you try increasing number of buffers in capture link.
    Regards,Brijesh
  • Hi Brijesh,

         On which part of the code this happens:

    "If you see the code, this channel number will be set in channelNum field if driver does not find any buffers in its input queue, it means app is not queueing buffers on time"

        I've been looking on which section this happens on the vpss driver but I don't see it,

    -David