[{"id":21450,"web_url":"https://patchwork.libcamera.org/comment/21450/","msgid":"<163827446075.3059017.10666998244920175226@Monstersaurus>","date":"2021-11-30T12:14:20","subject":"Re: [libcamera-devel] [PATCH 2/2] pipeline: raspberrypi: Choose bit\n\tdepth and packing according to raw stream","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi David,\n\nQuoting David Plowman (2021-11-30 11:22:59)\n> When a raw stream is specified, the bit depth and packing requested\n> should influence our choice of camera mode to match (if possible).\n> \n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> ---\n>  .../pipeline/raspberrypi/raspberrypi.cpp      | 33 ++++++++++---------\n>  1 file changed, 18 insertions(+), 15 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 045725dd..03012e89 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -49,6 +49,8 @@ LOG_DEFINE_CATEGORY(RPI)\n>  \n>  namespace {\n>  \n> +unsigned int DEFAULT_RAW_BIT_DEPTH = 12;\n> +\n>  /* Map of mbus codes to supported sizes reported by the sensor. */\n>  using SensorFormats = std::map<unsigned int, std::vector<Size>>;\n>  \n> @@ -125,15 +127,13 @@ double scoreFormat(double desired, double actual)\n>         return score;\n>  }\n>  \n> -V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size &req)\n> +V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size &req, unsigned int bitDepth)\n>  {\n>         double bestScore = std::numeric_limits<double>::max(), score;\n>         V4L2SubdeviceFormat bestFormat;\n>  \n>  #define PENALTY_AR             1500.0\n> -#define PENALTY_8BIT           2000.0\n> -#define PENALTY_10BIT          1000.0\n> -#define PENALTY_12BIT             0.0\n> +#define PENALTY_BIT_DEPTH      500.0\n>  \n>         /* Calculate the closest/best mode from the user requested size. */\n>         for (const auto &iter : formatsMap) {\n> @@ -152,12 +152,7 @@ V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size &\n>                         score += PENALTY_AR * scoreFormat(reqAr, fmtAr);\n>  \n>                         /* Add any penalties... this is not an exact science! */\n> -                       if (info.bitsPerPixel == 12)\n> -                               score += PENALTY_12BIT;\n> -                       else if (info.bitsPerPixel == 10)\n> -                               score += PENALTY_10BIT;\n> -                       else if (info.bitsPerPixel == 8)\n> -                               score += PENALTY_8BIT;\n> +                       score += abs(info.bitsPerPixel - bitDepth) * PENALTY_BIT_DEPTH;\n>  \n>                         if (score <= bestScore) {\n>                                 bestScore = score;\n> @@ -397,9 +392,14 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()\n>                          * Calculate the best sensor mode we can use based on\n>                          * the user request.\n>                          */\n> -                       V4L2SubdeviceFormat sensorFormat = findBestFormat(data_->sensorFormats_, cfg.size);\n> +                       const PixelFormatInfo &info = PixelFormatInfo::info(cfg.pixelFormat);\n> +                       unsigned int bitDepth = info.isValid() ? info.bitsPerPixel : DEFAULT_RAW_BIT_DEPTH;\n> +                       V4L2SubdeviceFormat sensorFormat = findBestFormat(data_->sensorFormats_, cfg.size, bitDepth);\n> +                       BayerFormat::Packing packing = BayerFormat::Packing::CSI2;\n> +                       if (info.isValid() && !info.packed)\n> +                               packing = BayerFormat::Packing::None;\n>                         V4L2DeviceFormat unicamFormat = toV4L2DeviceFormat(sensorFormat,\n> -                                                                          BayerFormat::Packing::CSI2);\n> +                                                                          packing);\n>                         int ret = data_->unicam_[Unicam::Image].dev()->tryFormat(&unicamFormat);\n>                         if (ret)\n>                                 return Invalid;\n> @@ -533,7 +533,7 @@ CameraConfiguration *PipelineHandlerRPi::generateConfiguration(Camera *camera,\n>                 switch (role) {\n>                 case StreamRole::Raw:\n>                         size = data->sensor_->resolution();\n> -                       sensorFormat = findBestFormat(data->sensorFormats_, size);\n> +                       sensorFormat = findBestFormat(data->sensorFormats_, size, DEFAULT_RAW_BIT_DEPTH);\n>                         pixelFormat = mbusCodeToPixelFormat(sensorFormat.mbus_code,\n>                                                             BayerFormat::Packing::CSI2);\n>                         ASSERT(pixelFormat.isValid());\n> @@ -622,6 +622,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n>         Size maxSize, sensorSize;\n>         unsigned int maxIndex = 0;\n>         bool rawStream = false;\n> +       unsigned int bitDepth = DEFAULT_RAW_BIT_DEPTH;\n>  \n>         /*\n>          * Look for the RAW stream (if given) size as well as the largest\n> @@ -638,7 +639,9 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n>                         sensorSize = cfg.size;\n>                         rawStream = true;\n>                         /* Check if the user has explicitly set an unpacked format. */\n> -                       packing = BayerFormat::fromPixelFormat(cfg.pixelFormat).packing;\n> +                       BayerFormat bayerFormat = BayerFormat::fromPixelFormat(cfg.pixelFormat);\n> +                       packing = bayerFormat.packing;\n> +                       bitDepth = bayerFormat.bitDepth;\n>                 } else {\n>                         if (cfg.size > maxSize) {\n>                                 maxSize = config->at(i).size;\n> @@ -664,7 +667,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n>         }\n>  \n>         /* First calculate the best sensor mode we can use based on the user request. */\n> -       V4L2SubdeviceFormat sensorFormat = findBestFormat(data->sensorFormats_, rawStream ? sensorSize : maxSize);\n> +       V4L2SubdeviceFormat sensorFormat = findBestFormat(data->sensorFormats_, rawStream ? sensorSize : maxSize, bitDepth);\n\nThis all looks like it's the right direction, so\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\nWhat happens if the appliation requests a RAW stream set with a size\nthat is not the full sensor size, but one of the smaller modes that it\ncan produce?\n\nAt the moment, this looks like the conditional above will override the\nrequest for the smaller mode, and force output to the full sensor size?\n\nShould\n  rawStream ? sensorSize : maxSize,\n\nbe considered as well? (In another patch if so is fine).\n\n--\nKieran\n\n\n\n>         ret = data->sensor_->setFormat(&sensorFormat);\n>         if (ret)\n>                 return ret;\n> -- \n> 2.30.2\n>","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 6CCD0BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Nov 2021 12:14:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 28B23605C1;\n\tTue, 30 Nov 2021 13:14:25 +0100 (CET)","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 BA15A60587\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Nov 2021 13:14:23 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6DCE28F0;\n\tTue, 30 Nov 2021 13:14:23 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mkhFIbkJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1638274463;\n\tbh=ys8J52oGqDjyOOdq459mG8wwh0vA0hdUwv7AzfwJHdk=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=mkhFIbkJ7546pyo9ZxZOAAlT7JLKKI5TcvFSkWsWEs2tZ086mnaLi2EyUsiXKC9DJ\n\tNRlcVfE6nBd71ETRzjdrnXiK5L/+SaPwEPqye/dpOXXU0P0Nqa9+IRc8h3IvcNEybk\n\tKB1yHeGnbqQYeO0JQ6Mt3sx5v31Cs7tLwWdobu2g=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20211130112259.18723-3-david.plowman@raspberrypi.com>","References":"<20211130112259.18723-1-david.plowman@raspberrypi.com>\n\t<20211130112259.18723-3-david.plowman@raspberrypi.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 30 Nov 2021 12:14:20 +0000","Message-ID":"<163827446075.3059017.10666998244920175226@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH 2/2] pipeline: raspberrypi: Choose bit\n\tdepth and packing according to raw stream","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":21453,"web_url":"https://patchwork.libcamera.org/comment/21453/","msgid":"<CAHW6GYJe5W8t_+9BMMd7xcf6HxVQtUHBZuLQ76K01Y2ZjSs37w@mail.gmail.com>","date":"2021-11-30T12:32:29","subject":"Re: [libcamera-devel] [PATCH 2/2] pipeline: raspberrypi: Choose bit\n\tdepth and packing according to raw stream","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Kieran\n\nThanks for the review!\n\nOn Tue, 30 Nov 2021 at 12:14, Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> Hi David,\n>\n> Quoting David Plowman (2021-11-30 11:22:59)\n> > When a raw stream is specified, the bit depth and packing requested\n> > should influence our choice of camera mode to match (if possible).\n> >\n> > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> > ---\n> >  .../pipeline/raspberrypi/raspberrypi.cpp      | 33 ++++++++++---------\n> >  1 file changed, 18 insertions(+), 15 deletions(-)\n> >\n> > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > index 045725dd..03012e89 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > @@ -49,6 +49,8 @@ LOG_DEFINE_CATEGORY(RPI)\n> >\n> >  namespace {\n> >\n> > +unsigned int DEFAULT_RAW_BIT_DEPTH = 12;\n> > +\n> >  /* Map of mbus codes to supported sizes reported by the sensor. */\n> >  using SensorFormats = std::map<unsigned int, std::vector<Size>>;\n> >\n> > @@ -125,15 +127,13 @@ double scoreFormat(double desired, double actual)\n> >         return score;\n> >  }\n> >\n> > -V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size &req)\n> > +V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size &req, unsigned int bitDepth)\n> >  {\n> >         double bestScore = std::numeric_limits<double>::max(), score;\n> >         V4L2SubdeviceFormat bestFormat;\n> >\n> >  #define PENALTY_AR             1500.0\n> > -#define PENALTY_8BIT           2000.0\n> > -#define PENALTY_10BIT          1000.0\n> > -#define PENALTY_12BIT             0.0\n> > +#define PENALTY_BIT_DEPTH      500.0\n> >\n> >         /* Calculate the closest/best mode from the user requested size. */\n> >         for (const auto &iter : formatsMap) {\n> > @@ -152,12 +152,7 @@ V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size &\n> >                         score += PENALTY_AR * scoreFormat(reqAr, fmtAr);\n> >\n> >                         /* Add any penalties... this is not an exact science! */\n> > -                       if (info.bitsPerPixel == 12)\n> > -                               score += PENALTY_12BIT;\n> > -                       else if (info.bitsPerPixel == 10)\n> > -                               score += PENALTY_10BIT;\n> > -                       else if (info.bitsPerPixel == 8)\n> > -                               score += PENALTY_8BIT;\n> > +                       score += abs(info.bitsPerPixel - bitDepth) * PENALTY_BIT_DEPTH;\n> >\n> >                         if (score <= bestScore) {\n> >                                 bestScore = score;\n> > @@ -397,9 +392,14 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()\n> >                          * Calculate the best sensor mode we can use based on\n> >                          * the user request.\n> >                          */\n> > -                       V4L2SubdeviceFormat sensorFormat = findBestFormat(data_->sensorFormats_, cfg.size);\n> > +                       const PixelFormatInfo &info = PixelFormatInfo::info(cfg.pixelFormat);\n> > +                       unsigned int bitDepth = info.isValid() ? info.bitsPerPixel : DEFAULT_RAW_BIT_DEPTH;\n> > +                       V4L2SubdeviceFormat sensorFormat = findBestFormat(data_->sensorFormats_, cfg.size, bitDepth);\n> > +                       BayerFormat::Packing packing = BayerFormat::Packing::CSI2;\n> > +                       if (info.isValid() && !info.packed)\n> > +                               packing = BayerFormat::Packing::None;\n> >                         V4L2DeviceFormat unicamFormat = toV4L2DeviceFormat(sensorFormat,\n> > -                                                                          BayerFormat::Packing::CSI2);\n> > +                                                                          packing);\n> >                         int ret = data_->unicam_[Unicam::Image].dev()->tryFormat(&unicamFormat);\n> >                         if (ret)\n> >                                 return Invalid;\n> > @@ -533,7 +533,7 @@ CameraConfiguration *PipelineHandlerRPi::generateConfiguration(Camera *camera,\n> >                 switch (role) {\n> >                 case StreamRole::Raw:\n> >                         size = data->sensor_->resolution();\n> > -                       sensorFormat = findBestFormat(data->sensorFormats_, size);\n> > +                       sensorFormat = findBestFormat(data->sensorFormats_, size, DEFAULT_RAW_BIT_DEPTH);\n> >                         pixelFormat = mbusCodeToPixelFormat(sensorFormat.mbus_code,\n> >                                                             BayerFormat::Packing::CSI2);\n> >                         ASSERT(pixelFormat.isValid());\n> > @@ -622,6 +622,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n> >         Size maxSize, sensorSize;\n> >         unsigned int maxIndex = 0;\n> >         bool rawStream = false;\n> > +       unsigned int bitDepth = DEFAULT_RAW_BIT_DEPTH;\n> >\n> >         /*\n> >          * Look for the RAW stream (if given) size as well as the largest\n> > @@ -638,7 +639,9 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n> >                         sensorSize = cfg.size;\n> >                         rawStream = true;\n> >                         /* Check if the user has explicitly set an unpacked format. */\n> > -                       packing = BayerFormat::fromPixelFormat(cfg.pixelFormat).packing;\n> > +                       BayerFormat bayerFormat = BayerFormat::fromPixelFormat(cfg.pixelFormat);\n> > +                       packing = bayerFormat.packing;\n> > +                       bitDepth = bayerFormat.bitDepth;\n> >                 } else {\n> >                         if (cfg.size > maxSize) {\n> >                                 maxSize = config->at(i).size;\n> > @@ -664,7 +667,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n> >         }\n> >\n> >         /* First calculate the best sensor mode we can use based on the user request. */\n> > -       V4L2SubdeviceFormat sensorFormat = findBestFormat(data->sensorFormats_, rawStream ? sensorSize : maxSize);\n> > +       V4L2SubdeviceFormat sensorFormat = findBestFormat(data->sensorFormats_, rawStream ? sensorSize : maxSize, bitDepth);\n>\n> This all looks like it's the right direction, so\n>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>\n>\n> What happens if the appliation requests a RAW stream set with a size\n> that is not the full sensor size, but one of the smaller modes that it\n> can produce?\n>\n> At the moment, this looks like the conditional above will override the\n> request for the smaller mode, and force output to the full sensor size?\n>\n> Should\n>   rawStream ? sensorSize : maxSize,\n>\n> be considered as well? (In another patch if so is fine).\n>\n> --\n> Kieran\n\nI think this is behaving properly, though perhaps the variable naming\nhere is sub-optimal. \"sensorSize\" is actually the size of the raw\nstream that the application has requested, whereas \"maxSize\" is the\nmaximum size of any output (non-raw) streams. So it's selecting the\nsize passed in by the application as the raw stream, even if smaller\nthan the full sensor resolution.\n\nIn fact it's always been doing this - no change to the behaviour here.\nThis particular patch obviously extends it to pay attention to the\nrequested bit depth and packing as well, which I think was clearly an\nomission previously.\n\nDoes that make sense?\n\nThanks!\n\nDavid\n\n>\n>\n>\n> >         ret = data->sensor_->setFormat(&sensorFormat);\n> >         if (ret)\n> >                 return ret;\n> > --\n> > 2.30.2\n> >","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 C8EC3BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Nov 2021 12:32:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 18EB060716;\n\tTue, 30 Nov 2021 13:32:42 +0100 (CET)","from mail-wr1-x430.google.com (mail-wr1-x430.google.com\n\t[IPv6:2a00:1450:4864:20::430])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 74977605C4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Nov 2021 13:32:40 +0100 (CET)","by mail-wr1-x430.google.com with SMTP id o13so43944301wrs.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Nov 2021 04:32:40 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"gPBvf1/1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=DmckZoe5hlboiQHtHm7+NZgz2obbb26P8aWKh4/KpSg=;\n\tb=gPBvf1/19zOwHaUEY89wfNadsa8G8g3zSnTlGGCbEEu7dxB9ovKQCH8btBbHeXXFdZ\n\tpm0637WI/3FZEqVP0w3/xCw3PSWI7wXbME+6WJKQxMkmEDhNAWNOSFDEP9+GaD4/u9sE\n\trq0fDTxDGQQOK7guVZsnRVSjws4TPr/z3eGCHGOgr/WuymNP4ZiP9X/OD0TQIfeCv9D/\n\tanAHFiDOd9FHe9qIniAfiwxmsAxcDp6n1VVs0HJufQleGLekxAq7u2NW1OKHSjugG/F4\n\tm9XaCyoy3ldNiAxWc9coujOK+VBo2LXPKiu4Q6+OO3lKE9R1tZoTeeeeSyWLBiSNTTWM\n\tNwIQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=DmckZoe5hlboiQHtHm7+NZgz2obbb26P8aWKh4/KpSg=;\n\tb=jYhnir0tPSNdDan2ArWUCReM1fvrta9N4yBEME7puRrLwYCIsumrW7G0Ft++v7cR0s\n\tBKOU0VKTaGKQRPQxyKRFNbhb+FxeF4W6Yq+1qD3bXLp2IG8MapDtCgCxYi6CAeEVdPoq\n\ttKoIIHemmd8+l89IBw+aj4Q1bH3XuoBUWtpgV9EbJ/fJITqEUYKkVDkrqZskwAo7xGUX\n\tiI8c3Jozo04CFXPf6LhYYTyKgim7WooO7jmwSyprPpsy0BSMc02f1E7NU+mL/OCdRJi4\n\tRb1fHMPJtGKHM6mW9RDIteiBVFQ92LGHjk3hElOInHe3XXs3WV5N+LEwdRJhxrmyN9E7\n\tGrJA==","X-Gm-Message-State":"AOAM530HCuvk68BdSJbQvNAmXgOdWDqhO6GG3zXzXfP4/OGtMp6qW5L+\n\toXRMzhCmTf5rQyyRenj418764V5pn3f8SAF9ImK0+w==","X-Google-Smtp-Source":"ABdhPJxneC6CxFNWr+vFM3DplbDhtsmuUznnyb1fsKDWJ6PsEgwYAS7NubukYDyDICFK5nrReH8dbkHJwRYz+STpUMg=","X-Received":"by 2002:adf:e390:: with SMTP id\n\te16mr40024929wrm.494.1638275559978; \n\tTue, 30 Nov 2021 04:32:39 -0800 (PST)","MIME-Version":"1.0","References":"<20211130112259.18723-1-david.plowman@raspberrypi.com>\n\t<20211130112259.18723-3-david.plowman@raspberrypi.com>\n\t<163827446075.3059017.10666998244920175226@Monstersaurus>","In-Reply-To":"<163827446075.3059017.10666998244920175226@Monstersaurus>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Tue, 30 Nov 2021 12:32:29 +0000","Message-ID":"<CAHW6GYJe5W8t_+9BMMd7xcf6HxVQtUHBZuLQ76K01Y2ZjSs37w@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 2/2] pipeline: raspberrypi: Choose bit\n\tdepth and packing according to raw stream","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":21456,"web_url":"https://patchwork.libcamera.org/comment/21456/","msgid":"<163827748273.3059017.7509984823389759297@Monstersaurus>","date":"2021-11-30T13:04:42","subject":"Re: [libcamera-devel] [PATCH 2/2] pipeline: raspberrypi: Choose bit\n\tdepth and packing according to raw stream","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting David Plowman (2021-11-30 12:32:29)\n> Hi Kieran\n> \n> Thanks for the review!\n> \n> On Tue, 30 Nov 2021 at 12:14, Kieran Bingham\n> <kieran.bingham@ideasonboard.com> wrote:\n> >\n> > Hi David,\n> >\n> > Quoting David Plowman (2021-11-30 11:22:59)\n> > > When a raw stream is specified, the bit depth and packing requested\n> > > should influence our choice of camera mode to match (if possible).\n> > >\n> > > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> > > ---\n> > >  .../pipeline/raspberrypi/raspberrypi.cpp      | 33 ++++++++++---------\n> > >  1 file changed, 18 insertions(+), 15 deletions(-)\n> > >\n> > > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > index 045725dd..03012e89 100644\n> > > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > @@ -49,6 +49,8 @@ LOG_DEFINE_CATEGORY(RPI)\n> > >\n> > >  namespace {\n> > >\n> > > +unsigned int DEFAULT_RAW_BIT_DEPTH = 12;\n> > > +\n> > >  /* Map of mbus codes to supported sizes reported by the sensor. */\n> > >  using SensorFormats = std::map<unsigned int, std::vector<Size>>;\n> > >\n> > > @@ -125,15 +127,13 @@ double scoreFormat(double desired, double actual)\n> > >         return score;\n> > >  }\n> > >\n> > > -V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size &req)\n> > > +V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size &req, unsigned int bitDepth)\n> > >  {\n> > >         double bestScore = std::numeric_limits<double>::max(), score;\n> > >         V4L2SubdeviceFormat bestFormat;\n> > >\n> > >  #define PENALTY_AR             1500.0\n> > > -#define PENALTY_8BIT           2000.0\n> > > -#define PENALTY_10BIT          1000.0\n> > > -#define PENALTY_12BIT             0.0\n> > > +#define PENALTY_BIT_DEPTH      500.0\n> > >\n> > >         /* Calculate the closest/best mode from the user requested size. */\n> > >         for (const auto &iter : formatsMap) {\n> > > @@ -152,12 +152,7 @@ V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const Size &\n> > >                         score += PENALTY_AR * scoreFormat(reqAr, fmtAr);\n> > >\n> > >                         /* Add any penalties... this is not an exact science! */\n> > > -                       if (info.bitsPerPixel == 12)\n> > > -                               score += PENALTY_12BIT;\n> > > -                       else if (info.bitsPerPixel == 10)\n> > > -                               score += PENALTY_10BIT;\n> > > -                       else if (info.bitsPerPixel == 8)\n> > > -                               score += PENALTY_8BIT;\n> > > +                       score += abs(info.bitsPerPixel - bitDepth) * PENALTY_BIT_DEPTH;\n> > >\n> > >                         if (score <= bestScore) {\n> > >                                 bestScore = score;\n> > > @@ -397,9 +392,14 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()\n> > >                          * Calculate the best sensor mode we can use based on\n> > >                          * the user request.\n> > >                          */\n> > > -                       V4L2SubdeviceFormat sensorFormat = findBestFormat(data_->sensorFormats_, cfg.size);\n> > > +                       const PixelFormatInfo &info = PixelFormatInfo::info(cfg.pixelFormat);\n> > > +                       unsigned int bitDepth = info.isValid() ? info.bitsPerPixel : DEFAULT_RAW_BIT_DEPTH;\n> > > +                       V4L2SubdeviceFormat sensorFormat = findBestFormat(data_->sensorFormats_, cfg.size, bitDepth);\n> > > +                       BayerFormat::Packing packing = BayerFormat::Packing::CSI2;\n> > > +                       if (info.isValid() && !info.packed)\n> > > +                               packing = BayerFormat::Packing::None;\n> > >                         V4L2DeviceFormat unicamFormat = toV4L2DeviceFormat(sensorFormat,\n> > > -                                                                          BayerFormat::Packing::CSI2);\n> > > +                                                                          packing);\n> > >                         int ret = data_->unicam_[Unicam::Image].dev()->tryFormat(&unicamFormat);\n> > >                         if (ret)\n> > >                                 return Invalid;\n> > > @@ -533,7 +533,7 @@ CameraConfiguration *PipelineHandlerRPi::generateConfiguration(Camera *camera,\n> > >                 switch (role) {\n> > >                 case StreamRole::Raw:\n> > >                         size = data->sensor_->resolution();\n> > > -                       sensorFormat = findBestFormat(data->sensorFormats_, size);\n> > > +                       sensorFormat = findBestFormat(data->sensorFormats_, size, DEFAULT_RAW_BIT_DEPTH);\n> > >                         pixelFormat = mbusCodeToPixelFormat(sensorFormat.mbus_code,\n> > >                                                             BayerFormat::Packing::CSI2);\n> > >                         ASSERT(pixelFormat.isValid());\n> > > @@ -622,6 +622,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n> > >         Size maxSize, sensorSize;\n> > >         unsigned int maxIndex = 0;\n> > >         bool rawStream = false;\n> > > +       unsigned int bitDepth = DEFAULT_RAW_BIT_DEPTH;\n> > >\n> > >         /*\n> > >          * Look for the RAW stream (if given) size as well as the largest\n> > > @@ -638,7 +639,9 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n> > >                         sensorSize = cfg.size;\n> > >                         rawStream = true;\n> > >                         /* Check if the user has explicitly set an unpacked format. */\n> > > -                       packing = BayerFormat::fromPixelFormat(cfg.pixelFormat).packing;\n> > > +                       BayerFormat bayerFormat = BayerFormat::fromPixelFormat(cfg.pixelFormat);\n> > > +                       packing = bayerFormat.packing;\n> > > +                       bitDepth = bayerFormat.bitDepth;\n> > >                 } else {\n> > >                         if (cfg.size > maxSize) {\n> > >                                 maxSize = config->at(i).size;\n> > > @@ -664,7 +667,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n> > >         }\n> > >\n> > >         /* First calculate the best sensor mode we can use based on the user request. */\n> > > -       V4L2SubdeviceFormat sensorFormat = findBestFormat(data->sensorFormats_, rawStream ? sensorSize : maxSize);\n> > > +       V4L2SubdeviceFormat sensorFormat = findBestFormat(data->sensorFormats_, rawStream ? sensorSize : maxSize, bitDepth);\n> >\n> > This all looks like it's the right direction, so\n> >\n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >\n> >\n> > What happens if the appliation requests a RAW stream set with a size\n> > that is not the full sensor size, but one of the smaller modes that it\n> > can produce?\n> >\n> > At the moment, this looks like the conditional above will override the\n> > request for the smaller mode, and force output to the full sensor size?\n> >\n> > Should\n> >   rawStream ? sensorSize : maxSize,\n> >\n> > be considered as well? (In another patch if so is fine).\n> >\n> > --\n> > Kieran\n> \n> I think this is behaving properly, though perhaps the variable naming\n> here is sub-optimal. \"sensorSize\" is actually the size of the raw\n> stream that the application has requested, whereas \"maxSize\" is the\n> maximum size of any output (non-raw) streams. So it's selecting the\n> size passed in by the application as the raw stream, even if smaller\n> than the full sensor resolution.\n> \n> In fact it's always been doing this - no change to the behaviour here.\n> This particular patch obviously extends it to pay attention to the\n> requested bit depth and packing as well, which I think was clearly an\n> omission previously.\n> \n> Does that make sense?\n\nYes, sounds like it's doing the right thing already then! Thanks for the\nupdate.\n\n--\nKieran\n\n\n> \n> Thanks!\n> \n> David\n> \n> >\n> >\n> >\n> > >         ret = data->sensor_->setFormat(&sensorFormat);\n> > >         if (ret)\n> > >                 return ret;\n> > > --\n> > > 2.30.2\n> > >","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 36A37BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Nov 2021 13:04:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7699F6071A;\n\tTue, 30 Nov 2021 14:04:46 +0100 (CET)","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 59435605C4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Nov 2021 14:04:45 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DB7B58F0;\n\tTue, 30 Nov 2021 14:04:44 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"cY1+75Yp\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1638277485;\n\tbh=fhCdbJImfv9VsxA5Tdb6VoEh8Cns6Y0IQ4L548v4Do0=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=cY1+75YpI/PQRKKMihZN1MyjhtEu6cqQiqVFoBgPatgpO/CoOqUOmtY2a9ywYGrpB\n\tgmG484rnUVV+AIRcjKvWsLwviAKKlu4drB1JArIPebH0x83gvehrNziAgxy35VCntR\n\trqFPKX7WMt17b7NLVYq7uLfjGkmCwgpEKlk4DKZg=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<CAHW6GYJe5W8t_+9BMMd7xcf6HxVQtUHBZuLQ76K01Y2ZjSs37w@mail.gmail.com>","References":"<20211130112259.18723-1-david.plowman@raspberrypi.com>\n\t<20211130112259.18723-3-david.plowman@raspberrypi.com>\n\t<163827446075.3059017.10666998244920175226@Monstersaurus>\n\t<CAHW6GYJe5W8t_+9BMMd7xcf6HxVQtUHBZuLQ76K01Y2ZjSs37w@mail.gmail.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Date":"Tue, 30 Nov 2021 13:04:42 +0000","Message-ID":"<163827748273.3059017.7509984823389759297@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH 2/2] pipeline: raspberrypi: Choose bit\n\tdepth and packing according to raw stream","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":21495,"web_url":"https://patchwork.libcamera.org/comment/21495/","msgid":"<CAEmqJPra3h+PaMpkC=5MVTZ69F2VwB6+zDsKqBu-Axv0h=q0iA@mail.gmail.com>","date":"2021-12-01T09:38:17","subject":"Re: [libcamera-devel] [PATCH 2/2] pipeline: raspberrypi: Choose bit\n\tdepth and packing according to raw stream","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi David,\n\nThank you for your patch.\n\nOn Tue, 30 Nov 2021 at 11:23, David Plowman <david.plowman@raspberrypi.com>\nwrote:\n\n> When a raw stream is specified, the bit depth and packing requested\n> should influence our choice of camera mode to match (if possible).\n>\n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> ---\n>  .../pipeline/raspberrypi/raspberrypi.cpp      | 33 ++++++++++---------\n>  1 file changed, 18 insertions(+), 15 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 045725dd..03012e89 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -49,6 +49,8 @@ LOG_DEFINE_CATEGORY(RPI)\n>\n>  namespace {\n>\n> +unsigned int DEFAULT_RAW_BIT_DEPTH = 12;\n> +\n>\n\nPerhaps a const, or constexpr for this one?\nI would switch to camelCase as well.\n\n\n>  /* Map of mbus codes to supported sizes reported by the sensor. */\n>  using SensorFormats = std::map<unsigned int, std::vector<Size>>;\n>\n> @@ -125,15 +127,13 @@ double scoreFormat(double desired, double actual)\n>         return score;\n>  }\n>\n> -V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const\n> Size &req)\n> +V4L2SubdeviceFormat findBestFormat(const SensorFormats &formatsMap, const\n> Size &req, unsigned int bitDepth)\n>  {\n>         double bestScore = std::numeric_limits<double>::max(), score;\n>         V4L2SubdeviceFormat bestFormat;\n>\n>  #define PENALTY_AR             1500.0\n> -#define PENALTY_8BIT           2000.0\n> -#define PENALTY_10BIT          1000.0\n> -#define PENALTY_12BIT             0.0\n> +#define PENALTY_BIT_DEPTH      500.0\n>\n\nShould we just switch to constexpr as well and do away with the #define?\n\n\n>\n>         /* Calculate the closest/best mode from the user requested size. */\n>         for (const auto &iter : formatsMap) {\n> @@ -152,12 +152,7 @@ V4L2SubdeviceFormat findBestFormat(const\n> SensorFormats &formatsMap, const Size &\n>                         score += PENALTY_AR * scoreFormat(reqAr, fmtAr);\n>\n>                         /* Add any penalties... this is not an exact\n> science! */\n> -                       if (info.bitsPerPixel == 12)\n> -                               score += PENALTY_12BIT;\n> -                       else if (info.bitsPerPixel == 10)\n> -                               score += PENALTY_10BIT;\n> -                       else if (info.bitsPerPixel == 8)\n> -                               score += PENALTY_8BIT;\n> +                       score += abs(info.bitsPerPixel - bitDepth) *\n> PENALTY_BIT_DEPTH;\n>\n\nShould we use the scoreFormat() call for this? That way, we can weight the\nscoring to a higher bit depth if an\nexact match is not found.  We may need to reword scoreFormat()\nappropriately.\n\n\n>\n>                         if (score <= bestScore) {\n>                                 bestScore = score;\n> @@ -397,9 +392,14 @@ CameraConfiguration::Status\n> RPiCameraConfiguration::validate()\n>                          * Calculate the best sensor mode we can use based\n> on\n>                          * the user request.\n>                          */\n> -                       V4L2SubdeviceFormat sensorFormat =\n> findBestFormat(data_->sensorFormats_, cfg.size);\n> +                       const PixelFormatInfo &info =\n> PixelFormatInfo::info(cfg.pixelFormat);\n> +                       unsigned int bitDepth = info.isValid() ?\n> info.bitsPerPixel : DEFAULT_RAW_BIT_DEPTH;\n> +                       V4L2SubdeviceFormat sensorFormat =\n> findBestFormat(data_->sensorFormats_, cfg.size, bitDepth);\n> +                       BayerFormat::Packing packing =\n> BayerFormat::Packing::CSI2;\n> +                       if (info.isValid() && !info.packed)\n> +                               packing = BayerFormat::Packing::None;\n>                         V4L2DeviceFormat unicamFormat =\n> toV4L2DeviceFormat(sensorFormat,\n> -\n> BayerFormat::Packing::CSI2);\n> +\n> packing);\n>                         int ret =\n> data_->unicam_[Unicam::Image].dev()->tryFormat(&unicamFormat);\n>                         if (ret)\n>                                 return Invalid;\n> @@ -533,7 +533,7 @@ CameraConfiguration\n> *PipelineHandlerRPi::generateConfiguration(Camera *camera,\n>                 switch (role) {\n>                 case StreamRole::Raw:\n>                         size = data->sensor_->resolution();\n> -                       sensorFormat =\n> findBestFormat(data->sensorFormats_, size);\n> +                       sensorFormat =\n> findBestFormat(data->sensorFormats_, size, DEFAULT_RAW_BIT_DEPTH);\n>                         pixelFormat =\n> mbusCodeToPixelFormat(sensorFormat.mbus_code,\n>\n> BayerFormat::Packing::CSI2);\n>                         ASSERT(pixelFormat.isValid());\n> @@ -622,6 +622,7 @@ int PipelineHandlerRPi::configure(Camera *camera,\n> CameraConfiguration *config)\n>         Size maxSize, sensorSize;\n>         unsigned int maxIndex = 0;\n>         bool rawStream = false;\n> +       unsigned int bitDepth = DEFAULT_RAW_BIT_DEPTH;\n>\n>         /*\n>          * Look for the RAW stream (if given) size as well as the largest\n> @@ -638,7 +639,9 @@ int PipelineHandlerRPi::configure(Camera *camera,\n> CameraConfiguration *config)\n>                         sensorSize = cfg.size;\n>                         rawStream = true;\n>\n> -                       packing =\n> BayerFormat::fromPixelFormat(cfg.pixelFormat).packing;\n> +                       BayerFormat bayerFormat =\n> BayerFormat::fromPixelFormat(cfg.pixelFormat);\n> +                       packing = bayerFormat.packing;\n> +                       bitDepth = bayerFormat.bitDepth;\n>                 } else {\n>                         if (cfg.size > maxSize) {\n>                                 maxSize = config->at(i).size;\n> @@ -664,7 +667,7 @@ int PipelineHandlerRPi::configure(Camera *camera,\n> CameraConfiguration *config)\n>         }\n>\n>         /* First calculate the best sensor mode we can use based on the\n> user request. */\n> -       V4L2SubdeviceFormat sensorFormat =\n> findBestFormat(data->sensorFormats_, rawStream ? sensorSize : maxSize);\n> +       V4L2SubdeviceFormat sensorFormat =\n> findBestFormat(data->sensorFormats_, rawStream ? sensorSize : maxSize,\n> bitDepth);\n>         ret = data->sensor_->setFormat(&sensorFormat);\n>         if (ret)\n>                 return ret;\n>\n\nWith or without the suggestions:\n\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\n\n> --\n> 2.30.2\n>\n>","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 2DBEFBDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  1 Dec 2021 09:38:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8E11D60718;\n\tWed,  1 Dec 2021 10:38:36 +0100 (CET)","from mail-qt1-x836.google.com (mail-qt1-x836.google.com\n\t[IPv6:2607:f8b0:4864:20::836])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C9EAC6011D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  1 Dec 2021 10:38:34 +0100 (CET)","by mail-qt1-x836.google.com with SMTP id v22so23337969qtx.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 01 Dec 2021 01:38:34 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"rgtiTSp/\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=9jKeUZV9K+fzNWiBD0RnyGHDYxo3R7LttYiC+VlZaXg=;\n\tb=rgtiTSp/zuliETUX+NZtEyIvQ7zBS+mwEZ6DTkQLuCwYHURsoX2BHTn+BzLkEf0iR2\n\tMuV3kuh7zWSOBslbBaRpib2h22YWmdAOudMrXFi5I/lc2wdzfqusGsRVSurM4KtM2xez\n\tGSQM038SiBoAhhmKN20cwMMufNGl5glwN6fuAs7h0oQDErLZwKzj6cciunXAUICYoe/X\n\t9XfrRmt6m+Jj/8kyRCl4PWK/r8mcoCDTxonGkbv4r5shwaH9Sk6FLjfDGidxI7NwPS+2\n\t+yi0x8+OAMIepipFQYDkPK26nAAzrOF5Xvr7OeIcpH2gj9baIzw77GBL3/RR1/Pxr4Vc\n\tjjzA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=9jKeUZV9K+fzNWiBD0RnyGHDYxo3R7LttYiC+VlZaXg=;\n\tb=1Srm4oJ0bFtjy3IRMIYUPJP9uEQjPir7utUVdEFS1/9ijZRLRCRiaxc5Aju7rzO2+L\n\t223KWv21SuXGA+cUmjCkTLah4TjHY2vJWC5pTnKlsfroBefMFw420vaiThbDviIWqvRH\n\t8R6isLUiVYxAUSJxgmoFgeqf3wUVDIUR3Fn160uL4ob5QVrS6+LJvxFRqmt25qY2UrIA\n\thvbNjTS0xoxvxE4qXeWaJRFRQX8kSuz1nzSRl28SVope0Nq2Z2XtDFAquLaKE13Y9Gba\n\t8manVR3GCY+j598pTmN/lzD1gBjCtdJfEmVsj998v3C+1DGwC2qDyBn+gF7NpzXH+mr7\n\tqJmA==","X-Gm-Message-State":"AOAM533rQO3lQvIyJdxSgoHsROoKlLV6aZ5lx0QktklQ9iGWHZ3hw2zH\n\t8Gt/9XUfLKV2BpTLKYN9yTxfXzYDt2Mtf51Lqx24cw==","X-Google-Smtp-Source":"ABdhPJyKF9jgCrv2Stwu7w+DSn9XJKKHOdusEFFvhKveTfNtS64Gv4z+l/1Om+rstfjpoAIkusnW92vFnc33BMwp7qo=","X-Received":"by 2002:ac8:7f43:: with SMTP id g3mr5155465qtk.127.1638351513602;\n\tWed, 01 Dec 2021 01:38:33 -0800 (PST)","MIME-Version":"1.0","References":"<20211130112259.18723-1-david.plowman@raspberrypi.com>\n\t<20211130112259.18723-3-david.plowman@raspberrypi.com>","In-Reply-To":"<20211130112259.18723-3-david.plowman@raspberrypi.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Wed, 1 Dec 2021 09:38:17 +0000","Message-ID":"<CAEmqJPra3h+PaMpkC=5MVTZ69F2VwB6+zDsKqBu-Axv0h=q0iA@mail.gmail.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Content-Type":"multipart/alternative; boundary=\"000000000000fc5cd005d2126f3d\"","Subject":"Re: [libcamera-devel] [PATCH 2/2] pipeline: raspberrypi: Choose bit\n\tdepth and packing according to raw stream","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]