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.

V4L2 vpfe setup ... how many "extra" pixels are needed?

I'm creating a sensor driver for a new sensor and I need to be able to use it in the same way the the capture_prev_imp_rsz_onthe_fly_bayer example code does.  So I've gotten the V4l2 device open and the format has been negotiated as 720x480 with UYVY (2 bytes per pixel) format.  My question is, how many pixels must I cause to be put out by my sensor per frame in order that I can capture and ultimately display the frames?

The capture_prev_imp_rsz_onthe_fly_bayer program stalls while waiting to dequeue a capture buffer.  I can see that there is pixel traffic coming out of my sensor.  In fact, in playing around with the sensor, from time to time I've had a good-looking video stream coming out.   But I don't believe I've ever seen it working with the sensor setup to deliver 720 pixels per line and 480 lines per frame.   The times I've seen it working it was producing more like 724 or 728 by 490 lines.   I don't want to guess about this so I'm asking for someone to explain the exact expectations of the previewer and resizer and display drivers.

I"m running on a DM365 (Leopard camera board with changed out sensor) and I'm using the DVSDK 3.10

Thnx in advance ....

  • Hi Steve,

    You should always have extra pixels per line and lines per frame from the sensor. Good ball park number is 32-64 pixels more per line and 16 lines more per frame. So for your case, 752x496 should be good sensor configuration. Out of this active data would be 720x480. Ofcourse, the HD and VD width configuration would be separate.

    Regards,

    Anshuman

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

  • Thanks.  That helps as a guideline.  I just have one follow-up question.   If I'm using a width 32 wider than the standard (720 in this case) and a height 16 larger than the standard (480 in this case) then what do I tell the rest of the capture pipeline for the width and height?   I'm presuming that I tell 720x480 but instead provide 756x496 but that means that somewhere the pipeline has to know that the distance from one scan line to the next is 2*756 rather than 2*720.  Where do I tell that information?

     

  • Hi Steve,

    You are right. For the follow-up capture pipeline, you need to tell that the scan line size is 2*756 bytes. For this you should use the "pitch" or "lineOffset" parameter in the rest of the pipeline. "lineOffset" can be set as 756 pixels where as width can still be 720 pixels.

    Regards,

    Anshuman

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