I have a problem with capturing video with imx6s from PAL bt656 with embeded SAV/EAV codes (thus without external HSYNC and VSYNC). We can capture video stream with mxc_v4l2_capture.out in raw file, but some frаmes have exactly same field, ie it has only odd or even lines new, other lines are the same, as in previous frame. It is very strange behaviour, because frames have different location in memory and thus we have two copies of the same field. We are using the simple chain CSI0->SMFC->IDMAC, so it is strange how the same data can be copied twise.
We are sure, that fields are the same, because noise pattern should be unique in every field.
Is it known problem and what settings or logs should I give to clarify my situation?
Here is our height and width params in mxc_v4l2_capture.c:
.v4l2_id = V4L2_STD_PAL,
.name = "PAL",
.raw_width = 720,
.raw_height = 625,
.active_width = 720,
.active_height = 576,
.active_top = 0,
.active_left = 0,
Here is our CCIR codes:
ipu_csi_write(ipu, csi, 0x40596, CSI_CCIR_CODE_1);
ipu_csi_write(ipu, csi, 0xD07DF, CSI_CCIR_CODE_2);
(we are tried to switch CODE_1 and CODE_2, but without any result, except odd and even lines are switched)
Clock is in interlaced mode: IPU_CSI_CLK_MODE_CCIR656_INTERLACED
Capture input is "CSI MEM" in mxc_v4l2_capture.c
.index = 1,
.name = "CSI MEM",
.type = V4L2_INPUT_TYPE_CAMERA,
.audioset = 0,
.tuner = 0,
.std = V4L2_STD_UNKNOWN,
.status = V4L2_IN_ST_NO_POWER,
Timestamp difference beetween frames is 40 ms with very small deviation (39.9-40.1).
Below is example of field doubling in frame sequence, captured by
./mxc_v4l2_capture.out -iw 720 -ih 576 -ow 720 -oh 576 -t 0 -i 0 -fr 25 -c 75 ./out_buf1.yuv
Between frames 50 and 51 even rows are exactly same. It is clearly seen, that noise pattern on frame 49 and 52 is different from frames 50 and 51. 50 and 51 have same noise pattern on even rows. This situation appears roughly every third frame, but there can be two frames in sequence with doubled field or it can be three normal frames in sequence, than bad frame.