Thanks igor for your suggestion。
Our product don't use overlay mode, but use output mode,Some as Index of /buildsources/i/imx-test/imx-test-3.0.35-4.0.0 imx-test-3.0.35-4.0.0\test\mxc_v4l2_testmxc_v4l2_output.c
We compile this mxc_v4l2_testmxc_v4l2_output.c soucecode with gcc, but it failed when
1-1. cropcap.type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
if (ioctl(fd_v4l, VIDIOC_CROPCAP, &cropcap) < 0)
{
printf("get crop capability failed\n");
retval = TFAIL;
goto err1;
}
We checked our kernel 3.0.35 mxc_v4l2_capture.c, the cropcap.type = V4L2_BUF_TYPE_VIDEO_OUTPUT is not supported
,So delete it
case VIDIOC_CROPCAP: {
struct v4l2_cropcap *cap = arg;
pr_debug(" case VIDIOC_CROPCAP\n");
if (cap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
cap->type != V4L2_BUF_TYPE_VIDEO_OVERLAY) {
retval = -EINVAL;
break;
}
cap->bounds = cam->crop_bounds;
cap->defrect = cam->crop_defrect;
break;
}
1-2. Also we have deleted this code because our yuv raw file dont have header.
if (g_bmp_header) {
fseek(in, 0x36, SEEK_CUR);
}
1-3. Change the default fmt to UYVY
uint32_t g_in_fmt = V4L2_PIX_FMT_UYVY;
Detailed see the mxc_v4l2_output.c which I will post.
2.Execute command
./mxc_v4l2_output -d /dev/video17 -iw 720 -ih 480 -ow 1280 -oh 720 -ot 0 -ol 0 -l 10000 /udisk1/f3.yuv
find the warning messages "imx-ipuv3 imx-ipuv3.0: IDMAC12's EBA0 is not 8-byte aligned" scroll on serial console frequently, the yuv content screen is splitted in the vertical middle of screen, detailed see attached files show_result1.jpg、show_result2.jpg 。
So How to fix it