來源於e2e,尚未驗證,備忘在這裏,帖子地址:http://e2e.ti.com/support/embedded/f/354/p/41298/143924.aspx#143924
Here's what I did to modify the linux driver and dmai code to perform deinterlacing in single-shot mode on dm365. Make your own copy of the Resize_config function from the dmai Resize.c code, add a deinterlace flag, and make these changes:
BufferGfx_getDimensions(hSrcBuf, &srcDim);
if (deinterlace) srcDim.height /= 2;
BufferGfx_getDimensions(hDstBuf, &dstDim);
...
/* input params are set at the resizer */
rsz_ss_config.input.image_width = srcDim.width;
rsz_ss_config.input.image_height = srcDim.height;
rsz_ss_config.input.ppln = rsz_ss_config.input.image_width * (deinterlace ? 2 : 1) + 8;
rsz_ss_config.input.lpfr = rsz_ss_config.input.image_height + 10;
rsz_ss_config.input.pix_fmt = pixFormatConversion(BufferGfx_getColorSpace(hSrcBuf));
This effectively halves the height and doubles the pitch of the source image, as illustrated above. Then you need to modify the driver to use the ppln value in calculating the adofs param for the ipipeif. Change the configure_resizer_in_ss_mode() function in drivers/char/dm365_ipipe.c with the following:
ret = rsz_validate_input_image_format(dev,
ss_config->input.pix_fmt,
ss_config->input.ppln - 8,
ss_config->input.image_height,
&line_len);
Note: this is for dvsdk 2.10. It looks like there was a ss_config->input.line_length parameter added in 3.10.