I have ported SiI9135 to DM368, However, the image I got is like this:
as you can see, it is green an shaking!
I tried to change the parameters in my driver. But it seems VPFE driver do not work well with the parameters I passed to it.
(1) if I define the sii9135_decoder struct like below, then the image I get is just like what you see above.
static struct sii9135_decoder sii9135_dev = {
.streaming = 0,
.fmt_list = sii9135_fmt_list,
.num_fmts = ARRAY_SIZE(sii9135_fmt_list),
.pix = {
.width = HD_720_NUM_ACTIVE_PIXELS,
.height = HD_720_NUM_ACTIVE_LINES,
.pixelformat = V4L2_PIX_FMT_YUYV,
.field = V4L2_FIELD_NONE,
.bytesperline = HD_720_NUM_ACTIVE_PIXELS * 2,
.sizeimage = HD_720_NUM_ACTIVE_PIXELS * 2 * HD_720_NUM_ACTIVE_LINES,
.colorspace = V4L2_COLORSPACE_REC709,//xubing:HD is only supported by BT.709
},
};
(2) if I define the sii9135_decoder struct like below, then I get an error when I run the encode demo.
static struct sii9135_decoder sii9135_dev = {
.streaming = 0,
.fmt_list = sii9135_fmt_list,
.num_fmts = ARRAY_SIZE(sii9135_fmt_list),
.pix = {
.width = HD_720_NUM_ACTIVE_PIXELS,
.height = HD_720_NUM_ACTIVE_LINES,
.pixelformat = V4L2_PIX_FMT_NV16,//this will cause an error: vpfe-capture vpfe-capture: couldn't set pix format in ccdc Error: Failed to create capture device. Is video input connected?
.field = V4L2_FIELD_NONE,
.bytesperline = HD_720_NUM_ACTIVE_PIXELS * 2,
.sizeimage = HD_720_NUM_ACTIVE_PIXELS * 2 * HD_720_NUM_ACTIVE_LINES,
.colorspace = V4L2_COLORSPACE_REC709,//xubing:HD is only supported by BT.709
},
};
I think the problem is in VPFE driver, shoud I modify vpfe_capture.c? and how?