From patchwork Wed Feb 13 15:10:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 574 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D0DA8610C8 for ; Wed, 13 Feb 2019 16:10:33 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6F97385; Wed, 13 Feb 2019 16:10:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1550070633; bh=dYjG83c6VptCUqY7LhSBvNFMu+c2KNqlfTY7UWDl0ZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jya/kPrL4POq3FyiM4ogNrEvQO2r0kxrB+tbbQK4AGSyWsqJfPF+BvLbTDuj/Me5T /nPW9VkvhglgNQSZhQZAwT/7rrO3vSxKLWjmIVAH3eIvC0VEgzEKqEbQ1mqmLUcB6u giuJoMwoIS1QNPV2d9GP1ecnWif7xaUdqH4DXmGA= From: Kieran Bingham To: LibCamera Devel Date: Wed, 13 Feb 2019 15:10:24 +0000 Message-Id: <20190213151027.6376-6-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190213151027.6376-1-kieran.bingham@ideasonboard.com> References: <20190213151027.6376-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 5/8] libcamera: v4l2_device: Use non-interlaced frames X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 15:10:35 -0000 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. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/libcamera/v4l2_device.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp index 8c038239cf24..d690be9823f5 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; @@ -681,6 +683,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();