This is demo code for deinterlacing setting. However, it doesn't work
well. Sometimes the rows at the bottom of frame mix up. Specially when the
frame rate is more than 40 fps, it happens frequently. Are there some
limitations or special setting on DM355 for resizer? And I found the setting
of params.ipipeif_param.clk_div affects a lot. What's the rule for the
setting?
Thanks
Bill
params.ipipeif_param.source = SDRAM_YUV;
params.ipipeif_param.hnum = width;
params.ipipeif_param.vnum = height / 2;
params.ipipeif_param.glob_hor_size = width + 8 * 2;
params.ipipeif_param.glob_ver_size = height / 2 + 10 * 2;
params.ipipeif_param.adofs = ((width * 2 * 2 + 31) &
(~31));
params.ipipeif_param.gain = 0x200;
params.ipipeif_param.clk_div = DIVIDE_SIXTH;
params.ipipe_dpaths_fmt = YUV2YUV;
params.ipipe_vst = 0;
params.ipipe_hst = 0;
params.ipipe_vsz = height / 2 - 1;
params.ipipe_hsz = width - 1;
params.rsz_rsc_param[0].rsz_h_dif = (int) 256.0 + 0.5;
params.rsz_rsc_param[0].rsz_v_dif = (int) 256.0 / 2 + 0.5;
params.rsz_rsc_param[0].rsz_o_hsz = width - 1;
params.rsz_rsc_param[0].rsz_o_vsz = height - 1;
params.ext_mem_param[0].rsz_sdr_oft = (width * 2 + 31) & ~31;
params.ext_mem_param[0].rsz_sdr_ptr_e = height;
params.rsz_en[0] = ENABLE;
params.rsz_en[1] = DISABLE;
params.prefilter.pre_en = DISABLE;
params.false_color_suppresion.fcs_en = DISABLE;
params.edge_enhancer.yee_emf = DISABLE;
params.rgb2yuv.yuv_adj_ctr = 0x20;
params.wb.wb2_dgn = 0x200;
params.wb.wb2_wg_r = 0x110;
params.wb.wb2_wg_gr = 0xf0;
params.wb.wb2_wg_gb = 0xf0;
params.wb.wb2_wg_b = 0x130;
hSmooth->bufSize = width * height * 2;
if(ioctl(fd, IPIPE_SET_PARAM, ¶ms) == -1) {
printf("Failed IPIPE_SET_PARAM\n");
return SMOOTH_FAILURE;
}