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.

Tearing on my video output

Normal 0 21 false false false DE X-NONE X-NONE MicrosoftInternetExplorer4

Hi all,

I am working on resizing frames with the IPIPE. In my application, frames from the CCDC get stored on SDRAM with a resolution of 768x480 and are resized by IPIPE to 720x480, so that they can be displayed on a typical TFT.

I am getting a lot of tearing on my monitor although I am sure that all buffers are used separately. To separate the buffers I am using

(1) CCDC’s VDINT0 at the last line (480), to pass the buffer to IPIPE
(2) IPIPE’s INT_1_SDR to know when SDRAM writing is finished and to pass the finished buffer to OSD
(3) OSDINT to take the finished IPIPE buffer, or not if there’s not a new finished buffer

CCDC is receiving frames at 60Hz, IPIPE is running at VPSSCLK/2 and OSD transmits frames a little above 60Hz. I measured the processing times per frame and got for
(1) CCDC    16.7 ms
(2) IPIPE    7.7 ms
(3) OSD    16.0 ms

From the standing point that the buffers are separated and IPIPE’s processing time is short enough, I don’t see, where the tearing comes from. I tried to capture the tearing, but so far I was not able to see any tearing on my captured frames.

Do you know what the problem could be?

Best regards
Sebastian

  • Sebastien,

    I know this is likely not too much help, but tearing is always down to buffer management.

    Something is most certainly causing the output to read from the same buffer as the one being processed.

    This could be a problem with either the front end writing to the wrong buffer or the output reading from the wrong buffer.

    Your code must be able to handle the situation where the input frame rate and the output frame rate are different. This will require either the input to re-write over the previous buffer (in the case that the input is faster than the output) or for the display output to re-read the previous output buffer (in the case where the output is faster than the input).

    BR,

    Steve

  • Steve,

    Thank you for your reply.

    I feel a bit sheepish... I did not find the error in my code, but rewriting the buffer management made the tearing to disappear into thin air.

    Sebastian

  • This is good news though :)

    I am glad you have resolved your issue.

    Sometimes we just need to step back and look at things from a clear perspective.

    BR,

    Steve