Patch Detail
Show a patch.
GET /api/patches/8736/?format=api
{ "id": 8736, "url": "https://patchwork.libcamera.org/api/patches/8736/?format=api", "web_url": "https://patchwork.libcamera.org/patch/8736/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20200709132835.112593-22-paul.elder@ideasonboard.com>", "date": "2020-07-09T13:28:33", "name": "[libcamera-devel,v5,21/23] v4l2: v4l2_camera_proxy: Get stride and frameSize from stream config", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "8648de5e27b6ceea0c8318494487a3050a7997c7", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/8736/mbox/", "series": [ { "id": 1093, "url": "https://patchwork.libcamera.org/api/series/1093/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1093", "date": "2020-07-09T13:28:12", "name": "Clean up formats in v4l2-compat and pipeline handlers", "version": 5, "mbox": "https://patchwork.libcamera.org/series/1093/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/8736/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/8736/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id AA763BD792\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 9 Jul 2020 13:29:43 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 75B3A61221;\n\tThu, 9 Jul 2020 15:29:43 +0200 (CEST)", "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 1A2CB611B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 9 Jul 2020 15:29:42 +0200 (CEST)", "from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 57388525;\n\tThu, 9 Jul 2020 15:29:40 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Cd7hqkGp\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1594301381;\n\tbh=7e6M4KlbB2BYinqhHdcUpbtkt7X6HUVNLkaQlbvcLqA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Cd7hqkGpC5ETw2h63hdvhEZbarDZbvu+rDWXJo0csQW/qlPb2QmVdOdSW/1GUWttz\n\ts+CxmziLWVybs9YM2OOzh6cZ8nn8v/B1XIQU6Oa1PtQtnPB75BcfO9BcAYlmzPYwkI\n\tctHUx/sAzK2a/GltMx/BQzf6e/loyJ9EjRuiby8w=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 9 Jul 2020 22:28:33 +0900", "Message-Id": "<20200709132835.112593-22-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20200709132835.112593-1-paul.elder@ideasonboard.com>", "References": "<20200709132835.112593-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v5 21/23] v4l2: v4l2_camera_proxy: Get\n\tstride and frameSize from stream config", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "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>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The stride and frameSize should be obtained through StreamConfiguration\nrather than PixelFormatInfo, as pipeline handlers might have different\nvalues (eg. for alignment). Get the stride and frameSize values from\nStreamConfiguration instead of from PixelFormatInfo.\n\nThis removes the need for V4L2CameraProxy's calculation helper functions\n(bplMultiplier, imageSize, v4l2ToDrm, drmToV4L2, calculateSizeImage) and\nformats, so remove them.\n\nThis also removes the need for V4L2CameraProxy::calculateSizeImage, so\nremove it,.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\nChanges in v5:\n- fix rebase error\n\nChanges in v4:\n- squashed with \"v4l2: v4l2_camera_proxy: Use libcamera formats\"\n\nNew in v3\n---\n src/v4l2/v4l2_camera_proxy.cpp | 192 ++++++---------------------------\n src/v4l2/v4l2_camera_proxy.h | 8 --\n 2 files changed, 32 insertions(+), 168 deletions(-)", "diff": "diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\nindex c246570..8c55a06 100644\n--- a/src/v4l2/v4l2_camera_proxy.cpp\n+++ b/src/v4l2/v4l2_camera_proxy.cpp\n@@ -20,6 +20,7 @@\n #include <libcamera/formats.h>\n #include <libcamera/object.h>\n \n+#include \"libcamera/internal/formats.h\"\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/utils.h\"\n \n@@ -70,7 +71,6 @@ int V4L2CameraProxy::open(V4L2CameraFile *file)\n \n \tvcam_->getStreamConfig(&streamConfig_);\n \tsetFmtFromConfig(streamConfig_);\n-\tsizeimage_ = calculateSizeImage(streamConfig_);\n \n \tfiles_.insert(file);\n \n@@ -164,33 +164,22 @@ bool V4L2CameraProxy::validateMemoryType(uint32_t memory)\n \n void V4L2CameraProxy::setFmtFromConfig(StreamConfiguration &streamConfig)\n {\n-\tcurV4L2Format_.fmt.pix.width = streamConfig.size.width;\n-\tcurV4L2Format_.fmt.pix.height = streamConfig.size.height;\n-\tcurV4L2Format_.fmt.pix.pixelformat = drmToV4L2(streamConfig.pixelFormat);\n-\tcurV4L2Format_.fmt.pix.field = V4L2_FIELD_NONE;\n-\tcurV4L2Format_.fmt.pix.bytesperline =\n-\t\tbplMultiplier(curV4L2Format_.fmt.pix.pixelformat) *\n-\t\tcurV4L2Format_.fmt.pix.width;\n-\tcurV4L2Format_.fmt.pix.sizeimage =\n-\t\timageSize(curV4L2Format_.fmt.pix.pixelformat,\n-\t\t\t curV4L2Format_.fmt.pix.width,\n-\t\t\t curV4L2Format_.fmt.pix.height);\n-\tcurV4L2Format_.fmt.pix.colorspace = V4L2_COLORSPACE_SRGB;\n-\tcurV4L2Format_.fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC;\n-\tcurV4L2Format_.fmt.pix.ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT;\n+\tconst PixelFormatInfo &info = PixelFormatInfo::info(streamConfig.pixelFormat);\n+\tSize size = streamConfig.size;\n+\n+\tcurV4L2Format_.fmt.pix.width = size.width;\n+\tcurV4L2Format_.fmt.pix.height = size.height;\n+\tcurV4L2Format_.fmt.pix.pixelformat = info.v4l2Format;\n+\tcurV4L2Format_.fmt.pix.field = V4L2_FIELD_NONE;\n+\tcurV4L2Format_.fmt.pix.bytesperline = streamConfig.stride;\n+\tcurV4L2Format_.fmt.pix.sizeimage = streamConfig.frameSize;\n+\tcurV4L2Format_.fmt.pix.colorspace = V4L2_COLORSPACE_SRGB;\n+\tcurV4L2Format_.fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC;\n+\tcurV4L2Format_.fmt.pix.ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT;\n \tcurV4L2Format_.fmt.pix.quantization = V4L2_QUANTIZATION_DEFAULT;\n-\tcurV4L2Format_.fmt.pix.xfer_func = V4L2_XFER_FUNC_DEFAULT;\n-}\n+\tcurV4L2Format_.fmt.pix.xfer_func = V4L2_XFER_FUNC_DEFAULT;\n \n-unsigned int V4L2CameraProxy::calculateSizeImage(StreamConfiguration &streamConfig)\n-{\n-\t/*\n-\t * \\todo Merge this method with setFmtFromConfig (need imageSize to\n-\t * support all libcamera formats first, or filter out MJPEG for now).\n-\t */\n-\treturn imageSize(drmToV4L2(streamConfig.pixelFormat),\n-\t\t\t streamConfig.size.width,\n-\t\t\t streamConfig.size.height);\n+\tsizeimage_ = streamConfig.frameSize;\n }\n \n void V4L2CameraProxy::querycap(std::shared_ptr<Camera> camera)\n@@ -253,12 +242,13 @@ int V4L2CameraProxy::vidioc_enum_framesizes(V4L2CameraFile *file, struct v4l2_fr\n {\n \tLOG(V4L2Compat, Debug) << \"Servicing vidioc_enum_framesizes fd = \" << file->efd();\n \n-\tPixelFormat argFormat = v4l2ToDrm(arg->pixel_format);\n+\tV4L2PixelFormat v4l2Format = V4L2PixelFormat(arg->pixel_format);\n+\tPixelFormat format = PixelFormatInfo::info(v4l2Format).format;\n \t/*\n \t * \\todo This might need to be expanded as few pipeline handlers\n \t * report StreamFormats.\n \t */\n-\tconst std::vector<Size> &frameSizes = streamConfig_.formats().sizes(argFormat);\n+\tconst std::vector<Size> &frameSizes = streamConfig_.formats().sizes(format);\n \n \tif (arg->index >= frameSizes.size())\n \t\treturn -EINVAL;\n@@ -279,12 +269,14 @@ int V4L2CameraProxy::vidioc_enum_fmt(V4L2CameraFile *file, struct v4l2_fmtdesc *\n \t arg->index >= streamConfig_.formats().pixelformats().size())\n \t\treturn -EINVAL;\n \n+\tPixelFormat format = streamConfig_.formats().pixelformats()[arg->index];\n+\n \t/* \\todo Set V4L2_FMT_FLAG_COMPRESSED for compressed formats. */\n \targ->flags = 0;\n \t/* \\todo Add map from format to description. */\n \tutils::strlcpy(reinterpret_cast<char *>(arg->description),\n \t\t \"Video Format Description\", sizeof(arg->description));\n-\targ->pixelformat = drmToV4L2(streamConfig_.formats().pixelformats()[arg->index]);\n+\targ->pixelformat = PixelFormatInfo::info(format).v4l2Format;\n \n \tmemset(arg->reserved, 0, sizeof(arg->reserved));\n \n@@ -306,7 +298,8 @@ int V4L2CameraProxy::vidioc_g_fmt(V4L2CameraFile *file, struct v4l2_format *arg)\n \n void V4L2CameraProxy::tryFormat(struct v4l2_format *arg)\n {\n-\tPixelFormat format = v4l2ToDrm(arg->fmt.pix.pixelformat);\n+\tV4L2PixelFormat v4l2Format = V4L2PixelFormat(arg->fmt.pix.pixelformat);\n+\tPixelFormat format = PixelFormatInfo::info(v4l2Format).format;\n \tconst std::vector<PixelFormat> &formats =\n \t\tstreamConfig_.formats().pixelformats();\n \tif (std::find(formats.begin(), formats.end(), format) == formats.end())\n@@ -317,15 +310,14 @@ void V4L2CameraProxy::tryFormat(struct v4l2_format *arg)\n \tif (std::find(sizes.begin(), sizes.end(), size) == sizes.end())\n \t\tsize = streamConfig_.formats().sizes(format)[0];\n \n+\tconst PixelFormatInfo &formatInfo = PixelFormatInfo::info(format);\n+\n \targ->fmt.pix.width = size.width;\n \targ->fmt.pix.height = size.height;\n-\targ->fmt.pix.pixelformat = drmToV4L2(format);\n+\targ->fmt.pix.pixelformat = formatInfo.v4l2Format;\n \targ->fmt.pix.field = V4L2_FIELD_NONE;\n-\targ->fmt.pix.bytesperline = bplMultiplier(drmToV4L2(format)) *\n-\t\t\t\t arg->fmt.pix.width;\n-\targ->fmt.pix.sizeimage = imageSize(drmToV4L2(format),\n-\t\t\t\t\t arg->fmt.pix.width,\n-\t\t\t\t\t arg->fmt.pix.height);\n+\targ->fmt.pix.bytesperline = formatInfo.stride(size.width, 0);\n+\targ->fmt.pix.sizeimage = formatInfo.frameSize(size);\n \targ->fmt.pix.colorspace = V4L2_COLORSPACE_SRGB;\n \targ->fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC;\n \targ->fmt.pix.ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT;\n@@ -350,18 +342,13 @@ int V4L2CameraProxy::vidioc_s_fmt(V4L2CameraFile *file, struct v4l2_format *arg)\n \ttryFormat(arg);\n \n \tSize size(arg->fmt.pix.width, arg->fmt.pix.height);\n+\tV4L2PixelFormat v4l2Format = V4L2PixelFormat(arg->fmt.pix.pixelformat);\n \tret = vcam_->configure(&streamConfig_, size,\n-\t\t\t v4l2ToDrm(arg->fmt.pix.pixelformat),\n+\t\t\t PixelFormatInfo::info(v4l2Format).format,\n \t\t\t bufferCount_);\n \tif (ret < 0)\n \t\treturn -EINVAL;\n \n-\tunsigned int sizeimage = calculateSizeImage(streamConfig_);\n-\tif (sizeimage == 0)\n-\t\treturn -EINVAL;\n-\n-\tsizeimage_ = sizeimage;\n-\n \tsetFmtFromConfig(streamConfig_);\n \n \treturn 0;\n@@ -495,27 +482,13 @@ int V4L2CameraProxy::vidioc_reqbufs(V4L2CameraFile *file, struct v4l2_requestbuf\n \t\tfreeBuffers();\n \n \tSize size(curV4L2Format_.fmt.pix.width, curV4L2Format_.fmt.pix.height);\n+\tV4L2PixelFormat v4l2Format = V4L2PixelFormat(curV4L2Format_.fmt.pix.pixelformat);\n \tint ret = vcam_->configure(&streamConfig_, size,\n-\t\t\t\t v4l2ToDrm(curV4L2Format_.fmt.pix.pixelformat),\n+\t\t\t\t PixelFormatInfo::info(v4l2Format).format,\n \t\t\t\t arg->count);\n \tif (ret < 0)\n \t\treturn -EINVAL;\n \n-\tsizeimage_ = calculateSizeImage(streamConfig_);\n-\t/*\n-\t * If we return -EINVAL here then the application will think that we\n-\t * don't support streaming mmap. Since we don't support readwrite and\n-\t * userptr either, the application will get confused and think that\n-\t * we don't support anything.\n-\t * On the other hand, if the set format at the time of reqbufs has a\n-\t * zero sizeimage we'll get a floating point exception when we try to\n-\t * stream it.\n-\t */\n-\tif (sizeimage_ == 0)\n-\t\tLOG(V4L2Compat, Warning)\n-\t\t\t<< \"sizeimage of at least one format is zero. \"\n-\t\t\t<< \"Streaming this format will cause a floating point exception.\";\n-\n \tsetFmtFromConfig(streamConfig_);\n \n \targ->count = streamConfig_.bufferCount;\n@@ -835,104 +808,3 @@ void V4L2CameraProxy::release(V4L2CameraFile *file)\n \n \towner_ = nullptr;\n }\n-\n-struct PixelFormatPlaneInfo {\n-\tunsigned int bitsPerPixel;\n-\tunsigned int hSubSampling;\n-\tunsigned int vSubSampling;\n-};\n-\n-struct PixelFormatInfo {\n-\tPixelFormat format;\n-\tuint32_t v4l2Format;\n-\tunsigned int numPlanes;\n-\tstd::array<PixelFormatPlaneInfo, 3> planes;\n-};\n-\n-namespace {\n-\n-static const std::array<PixelFormatInfo, 16> pixelFormatInfo = {{\n-\t/* RGB formats. */\n-\t{ formats::RGB888,\tV4L2_PIX_FMT_BGR24,\t1, {{ { 24, 1, 1 }, { 0, 0, 0 }, { 0, 0, 0 } }} },\n-\t{ formats::BGR888,\tV4L2_PIX_FMT_RGB24,\t1, {{ { 24, 1, 1 }, { 0, 0, 0 }, { 0, 0, 0 } }} },\n-\t{ formats::BGRA8888,\tV4L2_PIX_FMT_ARGB32,\t1, {{ { 32, 1, 1 }, { 0, 0, 0 }, { 0, 0, 0 } }} },\n-\t/* YUV packed formats. */\n-\t{ formats::UYVY,\tV4L2_PIX_FMT_UYVY,\t1, {{ { 16, 1, 1 }, { 0, 0, 0 }, { 0, 0, 0 } }} },\n-\t{ formats::VYUY,\tV4L2_PIX_FMT_VYUY,\t1, {{ { 16, 1, 1 }, { 0, 0, 0 }, { 0, 0, 0 } }} },\n-\t{ formats::YUYV,\tV4L2_PIX_FMT_YUYV,\t1, {{ { 16, 1, 1 }, { 0, 0, 0 }, { 0, 0, 0 } }} },\n-\t{ formats::YVYU,\tV4L2_PIX_FMT_YVYU,\t1, {{ { 16, 1, 1 }, { 0, 0, 0 }, { 0, 0, 0 } }} },\n-\t/* YUY planar formats. */\n-\t{ formats::NV12,\tV4L2_PIX_FMT_NV12,\t2, {{ { 8, 1, 1 }, { 16, 2, 2 }, { 0, 0, 0 } }} },\n-\t{ formats::NV21,\tV4L2_PIX_FMT_NV21,\t2, {{ { 8, 1, 1 }, { 16, 2, 2 }, { 0, 0, 0 } }} },\n-\t{ formats::NV16,\tV4L2_PIX_FMT_NV16,\t2, {{ { 8, 1, 1 }, { 16, 2, 1 }, { 0, 0, 0 } }} },\n-\t{ formats::NV61,\tV4L2_PIX_FMT_NV61,\t2, {{ { 8, 1, 1 }, { 16, 2, 1 }, { 0, 0, 0 } }} },\n-\t{ formats::NV24,\tV4L2_PIX_FMT_NV24,\t2, {{ { 8, 1, 1 }, { 16, 1, 1 }, { 0, 0, 0 } }} },\n-\t{ formats::NV42,\tV4L2_PIX_FMT_NV42,\t2, {{ { 8, 1, 1 }, { 16, 1, 1 }, { 0, 0, 0 } }} },\n-\t{ formats::YUV420,\tV4L2_PIX_FMT_YUV420,\t3, {{ { 8, 1, 1 }, { 8, 2, 2 }, { 8, 2, 2 } }} },\n-\t{ formats::YUV422,\tV4L2_PIX_FMT_YUV422P,\t3, {{ { 8, 1, 1 }, { 8, 2, 1 }, { 8, 2, 1 } }} },\n-\t/* Compressed formats. */\n-\t/*\n-\t * \\todo Get a better image size estimate for MJPEG, via\n-\t * StreamConfiguration, instead of using the worst-case\n-\t * width * height * bpp of uncompressed data.\n-\t */\n-\t{ formats::MJPEG,\tV4L2_PIX_FMT_MJPEG,\t1, {{ { 16, 1, 1 }, { 0, 0, 0 }, { 0, 0, 0 } }} },\n-}};\n-\n-} /* namespace */\n-\n-/* \\todo make libcamera export these */\n-unsigned int V4L2CameraProxy::bplMultiplier(uint32_t format)\n-{\n-\tauto info = std::find_if(pixelFormatInfo.begin(), pixelFormatInfo.end(),\n-\t\t\t\t [format](const PixelFormatInfo &info) {\n-\t\t\t\t\t return info.v4l2Format == format;\n-\t\t\t\t });\n-\tif (info == pixelFormatInfo.end())\n-\t\treturn 0;\n-\n-\treturn info->planes[0].bitsPerPixel / 8;\n-}\n-\n-unsigned int V4L2CameraProxy::imageSize(uint32_t format, unsigned int width,\n-\t\t\t\t\tunsigned int height)\n-{\n-\tauto info = std::find_if(pixelFormatInfo.begin(), pixelFormatInfo.end(),\n-\t\t\t\t [format](const PixelFormatInfo &info) {\n-\t\t\t\t\t return info.v4l2Format == format;\n-\t\t\t\t });\n-\tif (info == pixelFormatInfo.end())\n-\t\treturn 0;\n-\n-\tunsigned int multiplier = 0;\n-\tfor (unsigned int i = 0; i < info->numPlanes; ++i)\n-\t\tmultiplier += info->planes[i].bitsPerPixel\n-\t\t\t / info->planes[i].hSubSampling\n-\t\t\t / info->planes[i].vSubSampling;\n-\n-\treturn width * height * multiplier / 8;\n-}\n-\n-PixelFormat V4L2CameraProxy::v4l2ToDrm(uint32_t format)\n-{\n-\tauto info = std::find_if(pixelFormatInfo.begin(), pixelFormatInfo.end(),\n-\t\t\t\t [format](const PixelFormatInfo &info) {\n-\t\t\t\t\t return info.v4l2Format == format;\n-\t\t\t\t });\n-\tif (info == pixelFormatInfo.end())\n-\t\treturn PixelFormat();\n-\n-\treturn info->format;\n-}\n-\n-uint32_t V4L2CameraProxy::drmToV4L2(const PixelFormat &format)\n-{\n-\tauto info = std::find_if(pixelFormatInfo.begin(), pixelFormatInfo.end(),\n-\t\t\t\t [format](const PixelFormatInfo &info) {\n-\t\t\t\t\t return info.format == format;\n-\t\t\t\t });\n-\tif (info == pixelFormatInfo.end())\n-\t\treturn format;\n-\n-\treturn info->v4l2Format;\n-}\ndiff --git a/src/v4l2/v4l2_camera_proxy.h b/src/v4l2/v4l2_camera_proxy.h\nindex d78a472..e962694 100644\n--- a/src/v4l2/v4l2_camera_proxy.h\n+++ b/src/v4l2/v4l2_camera_proxy.h\n@@ -40,7 +40,6 @@ private:\n \tbool validateBufferType(uint32_t type);\n \tbool validateMemoryType(uint32_t memory);\n \tvoid setFmtFromConfig(StreamConfiguration &streamConfig);\n-\tunsigned int calculateSizeImage(StreamConfiguration &streamConfig);\n \tvoid querycap(std::shared_ptr<Camera> camera);\n \tvoid tryFormat(struct v4l2_format *arg);\n \tenum v4l2_priority maxPriority();\n@@ -69,13 +68,6 @@ private:\n \tint acquire(V4L2CameraFile *file);\n \tvoid release(V4L2CameraFile *file);\n \n-\tstatic unsigned int bplMultiplier(uint32_t format);\n-\tstatic unsigned int imageSize(uint32_t format, unsigned int width,\n-\t\t\t\t unsigned int height);\n-\n-\tstatic PixelFormat v4l2ToDrm(uint32_t format);\n-\tstatic uint32_t drmToV4L2(const PixelFormat &format);\n-\n \tstatic const std::set<unsigned long> supportedIoctls_;\n \n \tunsigned int refcount_;\n", "prefixes": [ "libcamera-devel", "v5", "21/23" ] }