I am using DVSDK/PSP linux kernel 2.6.32 on a DM3730. I am trying to do a loopback application using V4L2 to display YUV data captured using the ISP one of the video layers of the DSS. The video size is 828x828. I open /dev/video1 and when I try to change the video format of the DSS layer using VIDIOC_S_FMT ioctrl in the following code and then perform the VIDIOC_G_FMT, the height always comes back as 720. THe DM3730 TRM appears to state that the height of the layer can be 0-2048, so I am unsure why this fails. Does anyone know of a fix for this?
code:
int display_fd0 = open("/dev/video1", O_RDWR);
struct v4l2_format fmt;
fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
if (ioctl(display_fd0, VIDIOC_G_FMT, &fmt) < 0) {
printf ("%s %d: Failed to perform VIDIOC_G_FMT\n", __FILE__, __LINE__);
return -1;
}
fmt.fmt.pix.height = 828;
fmt.fmt.pix.width = 828;
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
if (ioctl(display_fd0, VIDIOC_S_FMT, &fmt) < 0)
{
printf ("%s %d: Failed to perform VIDIOC_S_FMT\n", __FILE__, __LINE__);
return -1;
}
if (ioctl(display_fd0, VIDIOC_G_FMT, &fmt) < 0)
{
printf ("%s %d: Failed to perform VIDIOC_G_FMT\n", __FILE__, __LINE__);
return -1;
}