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.

DM368 capture from TVP5158 line-mux mode - missing super-frames?

Other Parts Discussed in Thread: TVP5158

Hi,

We are trying to capture video from TVP5158 with DM368 VPFE. The format is 8-bit BT656 two channels D1 line-muxed at 54 Mhz. The DM368 is working in full capacity 432 Mhz ; DDR 340 Mhz ; VPSS 340 Mhz.

The cameras output PAL signal and super-frames are captured at around 28 FPS by the video capture module at 525 lines mode or 25 FPS at 625 lines mode.

However, in many frames there are "line jumps" where the first line of one or both channels at the beginning of the super-frame does not match the expected continuous number from the previous frame.

These line jumps occur even if we do not encode or do anything in the program other than capturing the video and checking the line numbers in the super-frame.

Here is a typical summary of the last 20 line jumps:

Demux Frame Line Jump CapIndex=603 CapLineIndex=1 Ch=0 From=287 To=254
Demux Frame Line Jump CapIndex=604 CapLineIndex=1 Ch=0 From=146 To=148
Demux Frame Line Jump CapIndex=605 CapLineIndex=1 Ch=0 From=40 To=42
Demux Frame Line Jump CapIndex=608 CapLineIndex=1 Ch=1 From=282 To=284
Demux Frame Line Jump CapIndex=609 CapLineIndex=0 Ch=0 From=242 To=137
Demux Frame Line Jump CapIndex=609 CapLineIndex=1 Ch=1 From=176 To=72
Demux Frame Line Jump CapIndex=611 CapLineIndex=0 Ch=0 From=287 To=31
Demux Frame Line Jump CapIndex=613 CapLineIndex=0 Ch=1 From=272 To=167
Demux Frame Line Jump CapIndex=613 CapLineIndex=1 Ch=0 From=287 To=233
Demux Frame Line Jump CapIndex=614 CapLineIndex=1 Ch=0 From=125 To=127
Demux Frame Line Jump CapIndex=617 CapLineIndex=0 Ch=1 From=261 To=61
Demux Frame Line Jump CapIndex=617 CapLineIndex=1 Ch=0 From=287 To=127
Demux Frame Line Jump CapIndex=618 CapLineIndex=0 Ch=1 From=287 To=156
Demux Frame Line Jump CapIndex=618 CapLineIndex=1 Ch=0 From=20 To=223
Demux Frame Line Jump CapIndex=619 CapLineIndex=1 Ch=0 From=115 To=117
Demux Frame Line Jump CapIndex=620 CapLineIndex=1 Ch=0 From=9 To=11
Demux Frame Line Jump CapIndex=622 CapLineIndex=1 Ch=1 From=250 To=252
Demux Frame Line Jump CapIndex=623 CapLineIndex=1 Ch=1 From=144 To=146
Demux Frame Line Jump CapIndex=627 CapLineIndex=0 Ch=1 From=240 To=135
Demux Frame Line Jump CapIndex=627 CapLineIndex=1 Ch=0 From=287 To=202

Can we fix this problem with configuration of the VPFE? or maybe the TVP?

I already posted this question in the legacy converters forum and Steve Clynes told me that it might be a DM issue. See: http://e2e.ti.com/support/data_converters/videoconverters/f/376/p/340521/1190017.aspx#1190017

Is it possible that the DM's VPFE may be missing super frames because it needs the vertical blanking period to do some processing while the input is ignored? The vertical blanking by itself is useless to me.

Thanks,

Gadi Bergman

  • I found out that the TVP5158's line muxed mode transmits super-frames with 2 lines of vertical blanking, while the IPIPE expects at least 4. Disabling the IPIPE in the VPFE and redirecting the output from the CCDC to the RAM seems to give some promising results.

  • Hi Gadi Bergman,

    We are facing the similar issue, line skip in observed in the super frame capture , our setup environment customized board dm368 and dvsdk 4.02 with 4 xD1 PAL capture.

    Can you please let me know where exactly to disable the IPIPE in the VPFE.

    Thanks in advance.

    Regards,
    Kiran
  • Hi Kiran,

    You have to modify the kernel file: drivers/media/video/davinci/vpfe_capture.c

    I added a variable: use_imp, which should be 0 in the case of TVP5158.

    Modify the function: vpfe_start_capture

    if ( ccdc_dev->hw_ops.enable_out_to_sdram )
    ccdc_dev->hw_ops.enable_out_to_sdram( !vpfe_dev->use_imp );

    if ( vpfe_dev->use_imp )
    imp_hw_if->enable( 1, NULL );

    Modify the function: vpfe_stop_capture

    if ( vpfe_dev->use_imp )
    imp_hw_if->enable(0, NULL);

    Modify the function: vpfe_streamon

    if ( ccdc_dev->hw_ops.configure( vpfe_dev->use_imp ) < 0 )
    {
    v4l2_err( &vpfe_dev->v4l2_dev, "Error in configuring ccdc\n" );
    goto unlock_out;
    }

    if ( !vpfe_dev->use_imp )
    {
    ccdc_dev->hw_ops.setfbaddr( (unsigned long)(addr) );
    goto out;
    }

    Modify function: vpfe_isr - Place a "if (vpfe_dev->use_imp)" over the use of imp_hw_if

    Regards,
    Gadi