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);