summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2019-02-13 13:13:33 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2019-02-13 15:50:05 +0000
commit3e354b00b43fc9fe71972ba2adfcc5883b924cad (patch)
tree6c5579d001b7645f0dd527a465fe3efb8cbffca0 /src
parent8a46873e0435971ce1e1f915096684a09fc95d86 (diff)
libcamera: v4l2_device: Use non-interlaced frames
Use V4L2_FIELD_NONE where applicable to disable support for interlaced frames. We are unlikely to support interlaced frames on cameras so hardcode this field type for now. If we decide to support interlacing later it can be revisited. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/v4l2_device.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
index 77866efb..207ba933 100644
--- a/src/libcamera/v4l2_device.cpp
+++ b/src/libcamera/v4l2_device.cpp
@@ -423,6 +423,7 @@ int V4L2Device::setFormatSingleplane(V4L2DeviceFormat *format)
pix->height = format->height;
pix->pixelformat = format->fourcc;
pix->bytesperline = format->planes[0].bpl;
+ pix->field = V4L2_FIELD_NONE;
ret = ioctl(fd_, VIDIOC_S_FMT, &v4l2Format);
if (ret) {
@@ -483,6 +484,7 @@ int V4L2Device::setFormatMultiplane(V4L2DeviceFormat *format)
pix->height = format->height;
pix->pixelformat = format->fourcc;
pix->num_planes = format->planesCount;
+ pix->field = V4L2_FIELD_NONE;
for (unsigned int i = 0; i < pix->num_planes; ++i) {
pix->plane_fmt[i].bytesperline = format->planes[i].bpl;
@@ -679,6 +681,7 @@ int V4L2Device::queueBuffer(Buffer *buffer)
buf.index = buffer->index();
buf.type = bufferType_;
buf.memory = memoryType_;
+ buf.field = V4L2_FIELD_NONE;
if (V4L2_TYPE_IS_MULTIPLANAR(buf.type)) {
buf.length = buffer->planes().size();