This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
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?
Hi,
Which linux kernel version are you using ?
.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? |
Looks like the CCDC doesn't support NV16 format from this error.
I think the problem is in VPFE driver, shoud I modify vpfe_capture.c? and how? |
If your camera is supporting NV16 format you need to add support for it.
Thx,
--Prabhakar Lad
Hi,Prabhakar
Thanks for your quick reply. I‘m using DVSDK 4.02.
The vpfe_capture.c is really complicated. Can you tell me how to support NV16 in VPFE driver? What are the key steps to do that?
Hi,
I‘m using DVSDK 4.02. |
I am not aware of "DVSDK", You can look into the linux source Makefile
and have a look at the version it has? (2.6.32/2.6.37/3.3..)
The vpfe_capture.c is really complicated. Can you tell me how to support NV16 in VPFE driver? What are the key steps to do that? |
If you can tell the linux version it would be helpful for me to support you.
Does your camera a raw bayer or does it give yuv ?
Thx,
--Prabhakar Lad
Hi,
I just find something in dm365_ccdc.c. It seems to be the key point!
I post the code here:
static int ccdc_set_pixel_format(unsigned int pixfmt)//xubing:ccdc_cfg.if_type = VPFE_YCBCR_SYNC_16 here
{
if (ccdc_cfg.if_type == VPFE_RAW_BAYER) {
if (pixfmt == V4L2_PIX_FMT_SBGGR8) {
if ((ccdc_cfg.bayer.config_params.compress.alg !=
CCDC_ALAW) &&
(ccdc_cfg.bayer.config_params.compress.alg !=
CCDC_DPCM)) {
dev_dbg(dev, "Either configure A-Law or"
"DPCM\n");
return -EINVAL;
}
ccdc_cfg.data_pack = CCDC_PACK_8BIT;
} else if (pixfmt == V4L2_PIX_FMT_SBGGR16) {
ccdc_cfg.bayer.config_params.compress.alg =
CCDC_NO_COMPRESSION;
ccdc_cfg.data_pack = CCDC_PACK_16BIT;
} else
return -EINVAL;
ccdc_cfg.bayer.pix_fmt = CCDC_PIXFMT_RAW;
} else {
if (pixfmt == V4L2_PIX_FMT_YUYV)
ccdc_cfg.ycbcr.pix_order = CCDC_PIXORDER_YCBYCR;
else if (pixfmt == V4L2_PIX_FMT_UYVY)
ccdc_cfg.ycbcr.pix_order = CCDC_PIXORDER_CBYCRY;
else
return -EINVAL;
ccdc_cfg.data_pack = CCDC_PACK_8BIT;
}
return 0;
}
According to the code above, YUYV and UYVY is supported. And I tried both of them, but none of them works.
Hi,
Can you test tvp514x on it ? and see every thing is working fine ?
Thx,
--Prabhakar Lad
Hi Xu,
I'm not using DM368EVM. I do not have other decoders except SiI9135. |
AFAIK tvp514x capture should be working. Is the driver for Sil9135 tested ?
I am not aware of Sil9135. Does it give out format YUV format?
Thx,
--Prabhakar Lad
Hi,
I'm writing the driver of SiI9135 myself. And SiI9135 can give out YUV. |
Ok. As you noticed the DM368 supports V4L2_PIX_FMT_UYVY, V4L2_PIX_FMT_YUYV
formats, which you tried setting but that is not working rite? Can you attach the sample
app which you are using to test for capture?
Thx,
--Prabhakar Lad
Hi,
I'm now checking the registers of SiI9135, if the problem still cannot be solved after doing that, I will post code here.