i.MX6D using CSI BT656 capture in progressive mode

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

i.MX6D using CSI BT656 capture in progressive mode

跳至解决方案
3,802 次查看
herveschmitt
Contributor II

Hi all,


We have a custom i.MX6Dual board on which we receive 2 BT656 PAL video flows. These flows are decoded by an AVD7280 video decoder chip on each channel which provides either:

  • A BT656 interlaced video flow at 25 fps,
  • Or a BT656 progressive video flow at 50 fps (the progressive conversion being performed by the ADV7280 itself, which is a nice feature but unfortunately available only at 50 fps).

The kernel used is Linux 3.0.35_4.0.0.

Interlaced at 25 fps : OK

We can successfully read the interlaced video flow at 25 fps using either:

mxc_v4l2_tvin -ow 720 -oh 576 -vi 0 -vo 17 -dv   ### CSI0 -> HDMI

mxc_v4l2_tvin -ow 720 -oh 576 -vi 1 -vo 17 -dv   ### CSI1 -> HDMI

  • A gstreamer pipeline streaming to an external host having IP 10.100.57.5 (both instances can run simultaneously in this case):
gst-launch -v --gst-debug=2 -e mfw_v4lsrc device=/dev/video0 fps-n=25 input=1 ! vpuenc codec=avc framerate-nu=25 bitrate=4194304 ! rtph264pay ! udpsink host=10.100.57.5 port=5000 sync=false -v &
gst-launch -v --gst-debug=2 -e mfw_v4lsrc device=/dev/video1 fps-n=25 input=1 ! vpuenc codec=avc framerate-nu=25 bitrate=4194304 ! rtph264pay ! udpsink host=10.100.57.5 port=5002 sync=false -v &

Progressive at 50 fps : KO

When activating the I2P feature (using Analog Devices provided scripts that we assume reliable), we can’t read the video flow anymore using either application.

The main change we have tried is:

diff --git a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c

index d21f847..05fcede 100644

Index: drivers/media/video/mxc/capture/mxc_v4l2_capture.c

===================================================================

--- a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c

+++ b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c

@@ -1343,10 +1343,14 @@ static int mxc_v4l2_s_param(cam_data *cam, struct v4l2_streamparm *parm)

        csi_param.mclk = 0;

        pr_debug("   clock_curr=mclk=%d\n", ifparm.u.bt656.clock_curr);

+#if 0

        if (ifparm.u.bt656.clock_curr == 0)

                csi_param.clk_mode = IPU_CSI_CLK_MODE_CCIR656_INTERLACED;

        else

                csi_param.clk_mode = IPU_CSI_CLK_MODE_GATED_CLK;

+#else

+       csi_param.clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE;

+#endif

        csi_param.pixclk_pol = ifparm.u.bt656.latch_clk_inv;

We have also tried a few other changes in our driver without any success (sensor’s streamcap.timeperframe.denominator set to 50 instead of 25, testing a few bt656 structure member changes or PAL attributes) but nothing works… It always fails in the VIDIOC_DQBUF ioctl, and it looks like the video frames of the capture device are ignored!

Questions


Has anybody successfully read PAL progressive video frames on BT656 at 50 fps?


By checking on i.MX community, we saw Switching CSI into Progressive bt.656 Mode mentioning successful support of the TW9912 (competitor of the ADV7280) but on 2.6.35 and on an unspecified type of CPU.


We also checked Q&A: Is it really possible to implement the BT656 with SAV / EAV and without external HSYNC/VSYN... explaining it doesn’t work on i.MX6Q and our feeling is similar.


Any suggestion?

标签 (4)
标记 (3)
0 项奖励
回复
1 解答
1,418 次查看
karina_valencia
NXP Apps Support
NXP Apps Support

Employee

We don't have any HW like this to test and so, it wasn't tested.

If you're trying to capture progressive images, I'd recommend to use mxc_v4l2_overlay unit test as example code instead of mxc_v4l2_tvin.

The overlay is used to capture and display videos from OVxxxx cameras that send progressive signals and don't use VDI block in IPU.

Rgds

Rogerio

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,418 次查看
XXiao1z
Contributor III

for the two gstreamer pipelines above, what's the command to receive the two streams? I'm trying to test two NTSC interlaced inputs here. Thanks.

0 项奖励
回复
1,419 次查看
karina_valencia
NXP Apps Support
NXP Apps Support

Employee

We don't have any HW like this to test and so, it wasn't tested.

If you're trying to capture progressive images, I'd recommend to use mxc_v4l2_overlay unit test as example code instead of mxc_v4l2_tvin.

The overlay is used to capture and display videos from OVxxxx cameras that send progressive signals and don't use VDI block in IPU.

Rgds

Rogerio

0 项奖励
回复