I using i.MX6DL with ADV7180.
The software platform is "android jb4.3 r1.1.0".
I found the image quality is very best when the video is static image. The show as below.
But if the video is move image. the object edge will have some interlacing artifacts in edge of motion object. The show as below.
For this issue, i adding apply patch at <De-interlace Capture Device>, the image became blur. The show as below.
Is this right? How to improve it?
Can you please tell me what are the exact patches you used?
I using the patch "add-csi-deinterlace-capture.patch.zip" at <De-interlace Capture Device>.
Then modify the struct "mxc_capture_inputs" as below in the mxc_v4l2_capture.c.
static struct v4l2_input mxc_capture_inputs[MXC_V4L2_CAPTURE_NUM_INPUTS] = {
{
.index = 0,
.name = "CSI VDI MEM",
.type = V4L2_INPUT_TYPE_CAMERA,
.audioset = 0,
.tuner = 0,
.std = V4L2_STD_UNKNOWN,
.status = V4L2_IN_ST_NO_POWER,
},
{
.index = 1,
.name = "CSI VDI MEM",
.type = V4L2_INPUT_TYPE_CAMERA,
.audioset = 0,
.tuner = 0,
.std = V4L2_STD_UNKNOWN,
.status = V4L2_IN_ST_NO_POWER,
},
};
Hello Rote,
Here is the answer from our expert, please let me know of any questions you may have:
I found that the original patch was using the wrong protocol definition to set the field,V4L2_FIELD_INTERLACED_BT was used instead of IPU_DEINTERLACE_FIELD_BOTTOM. This causes the field order to be top field first in the deinterlacer. The fix is the patch below. I have included all of my patches to reproduce and fix the problem on our Jelly Bean 4.3.3 1.1.0 GA release.
diff --git a/drivers/media/platform/mxc/capture/ipu_vdi_enc.c b/drivers/media/platform/mxc/capture/ipu_vdi_enc.c
index 96003a2..3aa0c3a 100644
--- a/drivers/media/platform/mxc/capture/ipu_vdi_enc.c
+++ b/drivers/media/platform/mxc/capture/ipu_vdi_enc.c
@@ -256,7 +256,7 @@ static int vdi_enc_setup(cam_data *cam)
enc.mem_prp_vf_mem.in_pixel_fmt = enc.mem_prp_vf_mem.out_pixel_fmt;
enc.mem_prp_vf_mem.motion_sel = MED_MOTION;
- enc.mem_prp_vf_mem.field_fmt = V4L2_FIELD_INTERLACED_BT;
+ enc.mem_prp_vf_mem.field_fmt = IPU_DEINTERLACE_FIELD_BOTTOM;
ipu_csi_enable_mclk_if(cam->ipu, CSI_MCLK_ENC, cam->csi, true, true);
Hello Sergio,
Thanks for your reply. I modify the file "ipu_vdi_enc.c" follow your suggest. But the issue still happen.
Below show my capture image.
1. enc.mem_prp_vf_mem.field_fmt = IPU_DEINTERLACE_FIELD_BOTTOM
2. enc.mem_prp_vf_mem.field_fmt = IPU_DEINTERLACE_FIELD_TOP
3. enc.mem_prp_vf_mem.field_fmt = V4L2_FIELD_INTERLACED_BT
4. enc.mem_prp_vf_mem.field_fmt = V4L2_FIELD_INTERLACED_TB