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.

Found jerky image by AV_SERVER solution

Hi all:

          I have found a jerky image by AV_SERVER solution, I use the OV7740 sensor as input, and I got the jerky image under DDR mode(Single shot mode), here attached the picture for you reference:

             From this image, you will found the top of the image is not correct, when view video stream, you will found the jerky video at the top. Seems the top of the image data is in wrong sequence.

             This issue won't happen under ISIF mode.

             I had tried adding debug code in videoCaptureThr.c to dump the raw data out, but when I try to dump out the raw data, this issue won't happen under DDR mode too. Seem slow down the frame rate will impact this.

              Any comments would be appreciated.

  • Hi Tracy,

    Can you confirm the value of VDINT0 register in your sensor driver configuration? Looks like the interrupt might be coming very close to the actual VD signal and hence the buffer switching might not complete. Can you decrease the value of vdInt in the sensor configuration?

    Also, does this problem come for all resolution and the number of lines at the top showing this problem remain same for all resolutions?

    Regards,

    Anshuman

    PS: Please mark this post as verified, if you think it has answered your question. Thanks.

  • Hi Anshuman :

               Appreciate for you response!

               Here are my comments for you reference:

    Anshuman Saxena said:

    Can you confirm the value of VDINT0 register in your sensor driver configuration? Looks like the interrupt might be coming very close to the actual VD signal and hence the buffer switching might not complete. Can you decrease the value of vdInt in the sensor configuration?

    Tracy>> Now we use 0 as input, we sensor resolution is VGA, could you just give suggest value?

     

    Anshuman Saxena said:

    Also, does this problem come for all resolution and the number of lines at the top showing this problem remain same for all resolutions?

     Tracy>> Yes, this problem come for all resolutions, for VGA it's about 8 pixel, for QVGA it's about 4 pixel.

  • Tracy lee said:

    Tracy>> Now we use 0 as input, we sensor resolution is VGA, could you just give suggest value?

    You might want to set VDINT0 to around 440 pixels if you capture height is around 480.

    Regards,

    Anshuman

    PS: Please mark this post as verified, if you think it has answered your question. Thanks.

  • Hi Anshuman:

              Could you help explain more? I had tryed 479 and it work well, apprecitae for you help!

  • Hi,

    The idea of VDINT0 register configuration is that the VD0 interrupt will come after X number of lines (479 in your case) from actual VD signal. Once the interrupt comes, the buffer switching happens in the ISR and is given to the application layer. The buffer address change for ISIF should happen before the actual VD signal comes.

    When you set it to 0, you were getting a VD Interrupt at the same time as VD signal. You were switching the buffer for ISIF output, but that would not take effect immediately. It will take effect after next VD signal. Meanwhile, although ISIF is still writing to previous address, you have given the buffer to application for encoding or display. This will cause the wrong usage of buffer. ISIF still uses that buffer and display/encoder has started consuming it.

    When you set that register to 479, you have a few lines remaining, before the actual VD signal comes. Your ISR will trigger and update the new output address, which takes effect from next VD signal. The buffer would be released to the application in the ISR. And by the time your display/encoder starts consuming the buffer, capture would get the remaining lines and move to the new buffer for next frame capture.

    So in summary, do not set it to 0 and also, do not set it to a number like 400 or less. If you set it to be too less than the exact number of lines in the frame, your jerkiness would come down towards the lower part of the frame.

    I hope i made myself clear.

    Regards,

    Anshuman

    PS: Please mark this post as verified, if you think it has answered your question. Thanks.

  • Hi Anshuman:

                 Appreciate for you patient!

                 It's helpful to me.