[{"id":813,"web_url":"https://patchwork.libcamera.org/comment/813/","msgid":"<20190213154606.GH5332@pendragon.ideasonboard.com>","date":"2019-02-13T15:46:06","subject":"Re: [libcamera-devel] [PATCH v2 5/8] libcamera: v4l2_device: Use\n\tnon-interlaced frames","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Wed, Feb 13, 2019 at 03:10:24PM +0000, Kieran Bingham wrote:\n> Use V4L2_FIELD_NONE where applicable to disable support for interlaced frames.\n> We are unlikely to support interlaced frames on cameras so hardcode this field\n> type for now. If we decide to support interlacing later it can be revisited.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/libcamera/v4l2_device.cpp | 3 +++\n>  1 file changed, 3 insertions(+)\n> \n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 8c038239cf24..d690be9823f5 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -423,6 +423,7 @@ int V4L2Device::setFormatSingleplane(V4L2DeviceFormat *format)\n>  \tpix->height = format->height;\n>  \tpix->pixelformat = format->fourcc;\n>  \tpix->bytesperline = format->planes[0].bpl;\n> +\tpix->field = V4L2_FIELD_NONE;\n>  \n>  \tret = ioctl(fd_, VIDIOC_S_FMT, &v4l2Format);\n>  \tif (ret) {\n> @@ -483,6 +484,7 @@ int V4L2Device::setFormatMultiplane(V4L2DeviceFormat *format)\n>  \tpix->height = format->height;\n>  \tpix->pixelformat = format->fourcc;\n>  \tpix->num_planes = format->planesCount;\n> +\tpix->field = V4L2_FIELD_NONE;\n>  \n>  \tfor (unsigned int i = 0; i < pix->num_planes; ++i) {\n>  \t\tpix->plane_fmt[i].bytesperline = format->planes[i].bpl;\n> @@ -681,6 +683,7 @@ int V4L2Device::queueBuffer(Buffer *buffer)\n>  \tbuf.index = buffer->index();\n>  \tbuf.type = bufferType_;\n>  \tbuf.memory = memoryType_;\n> +\tbuf.field = V4L2_FIELD_NONE;\n>  \n>  \tif (V4L2_TYPE_IS_MULTIPLANAR(buf.type)) {\n>  \t\tbuf.length = buffer->planes().size();","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CEDC3610AE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Feb 2019 16:46:09 +0100 (CET)","from pendragon.ideasonboard.com\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 420D685;\n\tWed, 13 Feb 2019 16:46:09 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1550072769;\n\tbh=kkdwc3fFItYluC7L9IWty/idI91j/5kQ/S/l86ONkDQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=PTxl3o/XkCpd+zPsGAIYkujvzVrBr2aT4B+5utC0y0Nv5qQGuGZUmYFWUAwQ4DsM9\n\tS+iFAVn+RrLxO/m0FWEOzFkONeVgqcGmK/oTBk4fNn0w5zx4moPy3/6nOPc+e3sH7j\n\tXqhnNNt7N8nmQZ46Vq+m1vzLkWTGSipMasARQfN8=","Date":"Wed, 13 Feb 2019 17:46:06 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20190213154606.GH5332@pendragon.ideasonboard.com>","References":"<20190213151027.6376-1-kieran.bingham@ideasonboard.com>\n\t<20190213151027.6376-6-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190213151027.6376-6-kieran.bingham@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 5/8] libcamera: v4l2_device: Use\n\tnon-interlaced frames","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Wed, 13 Feb 2019 15:46:10 -0000"}},{"id":828,"web_url":"https://patchwork.libcamera.org/comment/828/","msgid":"<20190219115350.GI31263@bigcity.dyn.berto.se>","date":"2019-02-19T11:53:50","subject":"Re: [libcamera-devel] [PATCH v2 5/8] libcamera: v4l2_device: Use\n\tnon-interlaced frames","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Kieran,\n\nThanks for your patch.\n\nOn 2019-02-13 15:10:24 +0000, Kieran Bingham wrote:\n> Use V4L2_FIELD_NONE where applicable to disable support for interlaced frames.\n> We are unlikely to support interlaced frames on cameras so hardcode this field\n> type for now. If we decide to support interlacing later it can be revisited.\n\nI know this have been merged already and I agree with you that for now \nit's OK to hardcode do only use V4L2_FIELD_NONE. I do however think we \nwould need to support interlaced formats in the future. Think embedded \nsystems trying to do something with vision, there interlaced top/bottom \nfields can be useful to reduce latency to detect motion.\n\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  src/libcamera/v4l2_device.cpp | 3 +++\n>  1 file changed, 3 insertions(+)\n> \n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 8c038239cf24..d690be9823f5 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -423,6 +423,7 @@ int V4L2Device::setFormatSingleplane(V4L2DeviceFormat *format)\n>  \tpix->height = format->height;\n>  \tpix->pixelformat = format->fourcc;\n>  \tpix->bytesperline = format->planes[0].bpl;\n> +\tpix->field = V4L2_FIELD_NONE;\n>  \n>  \tret = ioctl(fd_, VIDIOC_S_FMT, &v4l2Format);\n>  \tif (ret) {\n> @@ -483,6 +484,7 @@ int V4L2Device::setFormatMultiplane(V4L2DeviceFormat *format)\n>  \tpix->height = format->height;\n>  \tpix->pixelformat = format->fourcc;\n>  \tpix->num_planes = format->planesCount;\n> +\tpix->field = V4L2_FIELD_NONE;\n>  \n>  \tfor (unsigned int i = 0; i < pix->num_planes; ++i) {\n>  \t\tpix->plane_fmt[i].bytesperline = format->planes[i].bpl;\n> @@ -681,6 +683,7 @@ int V4L2Device::queueBuffer(Buffer *buffer)\n>  \tbuf.index = buffer->index();\n>  \tbuf.type = bufferType_;\n>  \tbuf.memory = memoryType_;\n> +\tbuf.field = V4L2_FIELD_NONE;\n>  \n>  \tif (V4L2_TYPE_IS_MULTIPLANAR(buf.type)) {\n>  \t\tbuf.length = buffer->planes().size();\n> -- \n> 2.19.1\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lj1-x244.google.com (mail-lj1-x244.google.com\n\t[IPv6:2a00:1450:4864:20::244])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AA932600FD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Feb 2019 12:53:53 +0100 (CET)","by mail-lj1-x244.google.com with SMTP id w6so12368829ljd.7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Feb 2019 03:53:53 -0800 (PST)","from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99])\n\tby smtp.gmail.com with ESMTPSA id\n\ty12sm4340160lfh.32.2019.02.19.03.53.51\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tTue, 19 Feb 2019 03:53:51 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=nHEWY+YEN6ilstwM87Mg1G3n1oMoYNSNs/6MoLSFT48=;\n\tb=kBSfIqINF5GkgkpCZ+ALAEksbBp3zlj+6zP+i8W+gS1wqgwo9LG19Y73mdvgFNQlgo\n\t0vv0cvRSD+UuZYgDm+XPFzUgOvk1U69bvNq8ynQ2jkoQYsc3fxQ5KVUEMZ7mqDWkldaw\n\tOSoatk3twJYR53cNF3T/a0nZmdEduWh0dXFWAnKBtZ+jgbhqBTLTPvTfWyTHn3YuGGye\n\tGj1ko7fJB/ds4IDA42ZZkDcdpkoqUab19iU9Se7+UG+QWx3/BNtO7Jozc6B5skvo29hU\n\t7VdQjxrlIhG10saBazG9JUhOXan8kZ1+uVf915Zxrnq33rqmZmw9lCXtEeTNq5RgSwk4\n\tG27w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=nHEWY+YEN6ilstwM87Mg1G3n1oMoYNSNs/6MoLSFT48=;\n\tb=hseVkx/4AUwz7gwW1zWvjrW59GxWhbvp5V0OoFM5PvPgI2G422hzI5feOZPrvvIgzo\n\t4OPdbkDQ3D1hH6V9c5Ohp1EKyGZNpyIzN0soDq7JONczONPsxJZn4yzPb4g0a2zhe7DF\n\tMdR/bwH4E5MZcklYSPT8DovZoeZcr+FXEP9ippSwfTDFa38B5rs8AcjKl6ilUzMxutAU\n\tue/L//xbWat3aptvWq1shaUPWjICYqrbEMT+dqVSCPYtW4RUgwpoitSNLSNxU18pqdQf\n\t0dclZDCCjhAjfVDbwXmK9w9tSTPSyktWlilm5+Wf/CkZ+pDTvcGmBBd6CdDdGpqoXjow\n\tqYEw==","X-Gm-Message-State":"AHQUAuaslQWh1DYSQMk1nrvToMqz/Oq4ArPuDJ2cXq0r+z34vXzlzUWu\n\tKMCscpHzQCsEXG7U1Rb3hU8WEA==","X-Google-Smtp-Source":"AHgI3IY3dYYlZ8sS5IDFThNRM+OtpHVrWEWXuCapfLm/3bwM0pxz9K67H54w9mufynFTiwoDTkjeqA==","X-Received":"by 2002:a2e:87d6:: with SMTP id\n\tv22mr2018007ljj.187.1550577232753; \n\tTue, 19 Feb 2019 03:53:52 -0800 (PST)","Date":"Tue, 19 Feb 2019 12:53:50 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20190219115350.GI31263@bigcity.dyn.berto.se>","References":"<20190213151027.6376-1-kieran.bingham@ideasonboard.com>\n\t<20190213151027.6376-6-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190213151027.6376-6-kieran.bingham@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 5/8] libcamera: v4l2_device: Use\n\tnon-interlaced frames","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 19 Feb 2019 11:53:53 -0000"}}]