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.

DM648 video port frame synchronization in raw capture mode

I'm using DM648 video port to capture image in raw mode, and get a problem that if the image data lose some pixels the subsequent captured images would mismatch. 

A way to avoid this situation is  that the video port does frame-synchronization before capturing every frame. 

I try to do "capture channel reset" to achieve each- frame-synchronization, but it doesn't work well.

So, how to do frame synchronization in raw capture mode frame by frame? 

  • In RAW capture mode we can't have frame level syncronization. The VPORT captures the data as long as the CAPEN signal is high.

    So if your external video generator is dropping some pixels for a frame, then there is no way VPORT could detect and sync properly in the next frame.

    And all the subsequent frames will be shifted by that many pixels.

     

    Also they is a restriction that when the counters become zero in RAW mode, the CAPEN signal should be held low for few clock cycles.

    If this is not obeyed, then the VPORT will drop more pixels. So when pixels are dropped as in your case, this condition will occur leading to undesired operation.

     

    So in RAW mode the external vide generator should always send in fixed video frame to the VPORT.

     

  • In DM642 raw capture mode, I use following 4 steps to reset capture channel to archive frame level syncronization:

    a. set VCEN to 0;

    b. set BLKCAP to 1;

    c. set BLKCAP to 0;  

    d. set VCEN to 1;

    And it works well.

    But when I use this method with DM648 raw capture mode, it doesn't work as expected.

    How do they performance so differently? 

      

  • DM642 and DM648 VPORT have the same specification and they should have the same behaviour.

    Can you elaborate more on what you observe?

     

  • Hi,

    well... I think the first thing you should check is why you loose pixels or get too much. If the image is important for you it should be correct. If you have one pixel too much in one line, the image data is shifted by 1 pixel below that (something inacceptable in my application for example...).

    second thing is: if you detect the error outside of an incoming frame, you can reset the VideoPort-Fifo (VC_CTL register, RSTCH), and it should be ok in the next frame. In my app I only trigger single frames, I dont have continous data coming in, so I can check after every frame if the FIFO is ok. Either the semaphore waiting for the EDMA complete ISR runs in timeout (to little data received) or i have VCSTAT.VC_X/YPOS != 0 (too much data received). If you have a continous data stream the situation might be different, but I think the most important question is why the situation occurs and remove the cause for that

    bye,

    Thomas

  • Thank Sivaraj R and Thomas for your reply.

    The sensor has a possibility to lose pixels so that the dm648 vport should have method to overcome it.

    The DM648 vport captures image with 2448x2432@12bit@15fps, and cannot send all the image over net. So it's difficult to check each image's integrality. I'll try to grab the image to elaborate more details.