[{"id":12758,"web_url":"https://patchwork.libcamera.org/comment/12758/","msgid":"<CAHW6GY+X7816jDKc8W1_zH=+6j1CmLLi+uwqiUp-8ehquj34xg@mail.gmail.com>","date":"2020-09-25T06:36:43","subject":"Re: [libcamera-devel] [PATCH] libcamera: stream: Rename\n\tStillCaptureRaw to Raw","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Niklas\n\nI like this change, am happy to apply it to the RPi pipeline handler,\nand would like to give it my thumbs-up! Just one very small\nquestion...\n\nOn Mon, 21 Sep 2020 at 19:23, Niklas Söderlund\n<niklas.soderlund@ragnatech.se> wrote:\n>\n> With the buffer copy removed from all pipelines for the raw capture\n> rename the StillCaptureRaw to Raw to better represent the role.\n>\n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n>  include/libcamera/stream.h                         | 2 +-\n>  src/android/camera_device.cpp                      | 4 ++--\n>  src/cam/stream_options.cpp                         | 4 ++--\n>  src/libcamera/pipeline/ipu3/ipu3.cpp               | 2 +-\n>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 +-\n>  src/libcamera/stream.cpp                           | 5 ++---\n>  src/qcam/main_window.cpp                           | 2 +-\n>  7 files changed, 10 insertions(+), 11 deletions(-)\n>\n> diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> index f502b35957fc250c..bb47c390f8a12387 100644\n> --- a/include/libcamera/stream.h\n> +++ b/include/libcamera/stream.h\n> @@ -59,8 +59,8 @@ private:\n>  };\n>\n>  enum StreamRole {\n> +       Raw,\n>         StillCapture,\n> -       StillCaptureRaw,\n>         VideoRecording,\n>         Viewfinder,\n>  };\n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index 70d77a17ef43cf48..751699cd21138245 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -313,7 +313,7 @@ std::vector<Size> CameraDevice::getYUVResolutions(CameraConfiguration *cameraCon\n>  std::vector<Size> CameraDevice::getRawResolutions(const libcamera::PixelFormat &pixelFormat)\n>  {\n>         std::unique_ptr<CameraConfiguration> cameraConfig =\n> -               camera_->generateConfiguration({ StillCaptureRaw });\n> +               camera_->generateConfiguration({ StreamRole::Raw });\n>         StreamConfiguration &cfg = cameraConfig->at(0);\n>         const StreamFormats &formats = cfg.formats();\n>         std::vector<Size> supportedResolutions = formats.sizes(pixelFormat);\n> @@ -895,7 +895,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()\n>\n>         /* Report if camera supports RAW. */\n>         std::unique_ptr<CameraConfiguration> cameraConfig =\n> -               camera_->generateConfiguration({ StillCaptureRaw });\n> +               camera_->generateConfiguration({ StreamRole::Raw });\n>         if (cameraConfig && !cameraConfig->empty()) {\n>                 const PixelFormatInfo &info =\n>                         PixelFormatInfo::info(cameraConfig->at(0).pixelFormat);\n> diff --git a/src/cam/stream_options.cpp b/src/cam/stream_options.cpp\n> index 4168e5d2d1deff9b..27cc39122989f256 100644\n> --- a/src/cam/stream_options.cpp\n> +++ b/src/cam/stream_options.cpp\n> @@ -119,8 +119,8 @@ bool StreamKeyValueParser::parseRole(StreamRole *role,\n>         } else if (name == \"still\") {\n>                 *role = StreamRole::StillCapture;\n>                 return true;\n> -       } else if (name == \"stillraw\") {\n> -               *role = StreamRole::StillCaptureRaw;\n> +       } else if (name == \"raw\") {\n> +               *role = StreamRole::Raw;\n>                 return true;\n>         }\n>\n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index 221259c7fe61df03..17ffed2b0e2ff0a6 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -343,7 +343,7 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera,\n>\n>                         break;\n>\n> -               case StreamRole::StillCaptureRaw: {\n> +               case StreamRole::Raw: {\n>                         StreamConfiguration cio2Config =\n>                                 data->cio2_.generateConfiguration(sensorResolution);\n>                         pixelFormat = cio2Config.pixelFormat;\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 50f07182457046ff..fe46dbd386d2a5ea 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -376,7 +376,7 @@ CameraConfiguration *PipelineHandlerRPi::generateConfiguration(Camera *camera,\n>         unsigned int outCount = 0;\n>         for (const StreamRole role : roles) {\n>                 switch (role) {\n> -               case StreamRole::StillCaptureRaw:\n> +               case StreamRole::Raw:\n>                         size = data->sensor_->resolution();\n>                         fmts = data->unicam_[Unicam::Image].dev()->formats();\n>                         sensorFormat = findBestMode(fmts, size);\n> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n> index 4d0ab90d73f96e0f..6d51e5da794f9f87 100644\n> --- a/src/libcamera/stream.cpp\n> +++ b/src/libcamera/stream.cpp\n> @@ -380,12 +380,11 @@ std::string StreamConfiguration::toString() const\n>   * are specified by applications and passed to cameras, that then select the\n>   * most appropriate streams and their default configurations.\n>   *\n> + * \\var Raw\n> + * The stream is intended to capture high-resolution raw images.\n\nI wonder just a little about saying \"high-resolution raw images\". I\ncan use the raw streams to capture lower-resolution binned raw images\ntoo, so perhaps we should reflect that? But other than that, can I add\n\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nThanks!\nDavid\n\n>   * \\var StillCapture\n>   * The stream is intended to capture high-resolution, high-quality still images\n>   * with low frame rate. The captured frames may be exposed with flash.\n> - * \\var StillCaptureRaw\n> - * The stream is intended to capture high-resolution, raw still images with low\n> - * frame rate.\n>   * \\var VideoRecording\n>   * The stream is intended to capture video for the purpose of recording or\n>   * streaming. The video stream may produce a high frame rate and may be\n> diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\n> index 985743f3233405d0..ecb9dd6642400697 100644\n> --- a/src/qcam/main_window.cpp\n> +++ b/src/qcam/main_window.cpp\n> @@ -380,7 +380,7 @@ int MainWindow::startCapture()\n>                 break;\n>         case 2:\n>                 if (roles[0] != StreamRole::Viewfinder ||\n> -                   roles[1] != StreamRole::StillCaptureRaw) {\n> +                   roles[1] != StreamRole::Raw) {\n>                         qWarning() << \"Only viewfinder + raw supported for dual streams\";\n>                         return -EINVAL;\n>                 }\n> --\n> 2.28.0\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 18CD2C3B5C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Sep 2020 06:36:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8166962FF8;\n\tFri, 25 Sep 2020 08:36:58 +0200 (CEST)","from mail-oo1-xc2e.google.com (mail-oo1-xc2e.google.com\n\t[IPv6:2607:f8b0:4864:20::c2e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CCD3E60576\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Sep 2020 08:36:56 +0200 (CEST)","by mail-oo1-xc2e.google.com with SMTP id c4so498442oou.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Sep 2020 23:36:56 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"Bo2j9WjL\"; 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:content-transfer-encoding;\n\tbh=LLgW93del6p2SUJmj4M1RC2JCuLzpzOcZlheqRwV2TQ=;\n\tb=Bo2j9WjLSSTBw9jw9pzb6OBfePbFKvwT7uXlM90tYt20cYgN3WYx3RUCz7aAwkCnEg\n\t8eh/dVxhopyL+xPIagqqQr2OX3FTFRpkz16m672jL696nkhfAzd/Xa+B/Us17eNPcMs3\n\tqFkMZ68thWQQU+J7JIEdVJxAHetQ9JfDCEQGY2fz04pz4tF4n+4iu3ItoLOwV/1W4F+F\n\tzuUDaxZ14qP2GcicT2DDm/bxIFasx9BIa8MJtgczB+NxaJmA4xgj2Lnlf6TuF4YS19Fj\n\tIkNl9Ocs4I4s3U1/fJSjF2JXRT8k1u3KslGSOiLKlZnpC5pYyrgYMDldIrA8eSi5MoCx\n\tj4Cg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc:content-transfer-encoding;\n\tbh=LLgW93del6p2SUJmj4M1RC2JCuLzpzOcZlheqRwV2TQ=;\n\tb=enzvEA2/o2KMMiT/J3Zr771irCXoA7hOWsRzeZV3c38xhikyTQ9NSEDV0fKIoizj9J\n\tdVaClc6621hwYsVqQJfjnO30fRqRlXYw6YNMejptYM7BwW/n0MJV7ExL0P72Da2XtUzJ\n\tx2Z9+cM0qLMottuYyzAOXFpQFanor16hRhvWlxCweSg18nE2DJ6lMoDqjazh6PolhFfX\n\tWvbsfOWrGekn+gow9ue4jSN4cWWQTypQLFp9aaQ8684zGPhFLFAA0NZ58I61TYmEDgp0\n\t1HPrNh6004L7/CdGN/h1U2Pqzpsmcwn8tUbSMF7akKieGiZ7DQlkB+P4epup0BsAf6lv\n\tpIrQ==","X-Gm-Message-State":"AOAM531M8bejgYKSrd5s+y8jI3Y2H88BRMgpJ2yG6+TtwJV2+ybSbv19\n\t0FNhpMhVHSw490Bb3FCyAtGo7G9fH2qDdMYEuamtzfR79Rg=","X-Google-Smtp-Source":"ABdhPJyWM6AiY/zOuj+f3W+/m5SCxD4NArdFV5lHzonujYPYgToe+ZMM5s8D0ks9knPS+L9NMIb0XGVREqPUbz40/j4=","X-Received":"by 2002:a4a:5258:: with SMTP id d85mr1992699oob.72.1601015815489;\n\tThu, 24 Sep 2020 23:36:55 -0700 (PDT)","MIME-Version":"1.0","References":"<20200921182325.2508256-1-niklas.soderlund@ragnatech.se>","In-Reply-To":"<20200921182325.2508256-1-niklas.soderlund@ragnatech.se>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Fri, 25 Sep 2020 07:36:43 +0100","Message-ID":"<CAHW6GY+X7816jDKc8W1_zH=+6j1CmLLi+uwqiUp-8ehquj34xg@mail.gmail.com>","To":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: stream: Rename\n\tStillCaptureRaw to Raw","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@lists.libcamera.org","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12765,"web_url":"https://patchwork.libcamera.org/comment/12765/","msgid":"<20200925104718.GA1757254@oden.dyn.berto.se>","date":"2020-09-25T10:47:18","subject":"Re: [libcamera-devel] [PATCH] libcamera: stream: Rename\n\tStillCaptureRaw to Raw","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi David,\n\nThanks for your feedback.\n\nOn 2020-09-25 07:36:43 +0100, David Plowman wrote:\n> Hi Niklas\n> \n> I like this change, am happy to apply it to the RPi pipeline handler,\n> and would like to give it my thumbs-up! Just one very small\n> question...\n> \n> On Mon, 21 Sep 2020 at 19:23, Niklas Söderlund\n> <niklas.soderlund@ragnatech.se> wrote:\n> >\n> > With the buffer copy removed from all pipelines for the raw capture\n> > rename the StillCaptureRaw to Raw to better represent the role.\n> >\n> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > ---\n> >  include/libcamera/stream.h                         | 2 +-\n> >  src/android/camera_device.cpp                      | 4 ++--\n> >  src/cam/stream_options.cpp                         | 4 ++--\n> >  src/libcamera/pipeline/ipu3/ipu3.cpp               | 2 +-\n> >  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 +-\n> >  src/libcamera/stream.cpp                           | 5 ++---\n> >  src/qcam/main_window.cpp                           | 2 +-\n> >  7 files changed, 10 insertions(+), 11 deletions(-)\n> >\n> > diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> > index f502b35957fc250c..bb47c390f8a12387 100644\n> > --- a/include/libcamera/stream.h\n> > +++ b/include/libcamera/stream.h\n> > @@ -59,8 +59,8 @@ private:\n> >  };\n> >\n> >  enum StreamRole {\n> > +       Raw,\n> >         StillCapture,\n> > -       StillCaptureRaw,\n> >         VideoRecording,\n> >         Viewfinder,\n> >  };\n> > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> > index 70d77a17ef43cf48..751699cd21138245 100644\n> > --- a/src/android/camera_device.cpp\n> > +++ b/src/android/camera_device.cpp\n> > @@ -313,7 +313,7 @@ std::vector<Size> CameraDevice::getYUVResolutions(CameraConfiguration *cameraCon\n> >  std::vector<Size> CameraDevice::getRawResolutions(const libcamera::PixelFormat &pixelFormat)\n> >  {\n> >         std::unique_ptr<CameraConfiguration> cameraConfig =\n> > -               camera_->generateConfiguration({ StillCaptureRaw });\n> > +               camera_->generateConfiguration({ StreamRole::Raw });\n> >         StreamConfiguration &cfg = cameraConfig->at(0);\n> >         const StreamFormats &formats = cfg.formats();\n> >         std::vector<Size> supportedResolutions = formats.sizes(pixelFormat);\n> > @@ -895,7 +895,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()\n> >\n> >         /* Report if camera supports RAW. */\n> >         std::unique_ptr<CameraConfiguration> cameraConfig =\n> > -               camera_->generateConfiguration({ StillCaptureRaw });\n> > +               camera_->generateConfiguration({ StreamRole::Raw });\n> >         if (cameraConfig && !cameraConfig->empty()) {\n> >                 const PixelFormatInfo &info =\n> >                         PixelFormatInfo::info(cameraConfig->at(0).pixelFormat);\n> > diff --git a/src/cam/stream_options.cpp b/src/cam/stream_options.cpp\n> > index 4168e5d2d1deff9b..27cc39122989f256 100644\n> > --- a/src/cam/stream_options.cpp\n> > +++ b/src/cam/stream_options.cpp\n> > @@ -119,8 +119,8 @@ bool StreamKeyValueParser::parseRole(StreamRole *role,\n> >         } else if (name == \"still\") {\n> >                 *role = StreamRole::StillCapture;\n> >                 return true;\n> > -       } else if (name == \"stillraw\") {\n> > -               *role = StreamRole::StillCaptureRaw;\n> > +       } else if (name == \"raw\") {\n> > +               *role = StreamRole::Raw;\n> >                 return true;\n> >         }\n> >\n> > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > index 221259c7fe61df03..17ffed2b0e2ff0a6 100644\n> > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > @@ -343,7 +343,7 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera,\n> >\n> >                         break;\n> >\n> > -               case StreamRole::StillCaptureRaw: {\n> > +               case StreamRole::Raw: {\n> >                         StreamConfiguration cio2Config =\n> >                                 data->cio2_.generateConfiguration(sensorResolution);\n> >                         pixelFormat = cio2Config.pixelFormat;\n> > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > index 50f07182457046ff..fe46dbd386d2a5ea 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > @@ -376,7 +376,7 @@ CameraConfiguration *PipelineHandlerRPi::generateConfiguration(Camera *camera,\n> >         unsigned int outCount = 0;\n> >         for (const StreamRole role : roles) {\n> >                 switch (role) {\n> > -               case StreamRole::StillCaptureRaw:\n> > +               case StreamRole::Raw:\n> >                         size = data->sensor_->resolution();\n> >                         fmts = data->unicam_[Unicam::Image].dev()->formats();\n> >                         sensorFormat = findBestMode(fmts, size);\n> > diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n> > index 4d0ab90d73f96e0f..6d51e5da794f9f87 100644\n> > --- a/src/libcamera/stream.cpp\n> > +++ b/src/libcamera/stream.cpp\n> > @@ -380,12 +380,11 @@ std::string StreamConfiguration::toString() const\n> >   * are specified by applications and passed to cameras, that then select the\n> >   * most appropriate streams and their default configurations.\n> >   *\n> > + * \\var Raw\n> > + * The stream is intended to capture high-resolution raw images.\n> \n> I wonder just a little about saying \"high-resolution raw images\". I\n> can use the raw streams to capture lower-resolution binned raw images\n> too, so perhaps we should reflect that? But other than that, can I add\n\nGood point, how about something like this?\n\n    The stream is intended to capture raw frames from the sensor.\n\n> \n> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> \n> Thanks!\n> David\n> \n> >   * \\var StillCapture\n> >   * The stream is intended to capture high-resolution, high-quality still images\n> >   * with low frame rate. The captured frames may be exposed with flash.\n> > - * \\var StillCaptureRaw\n> > - * The stream is intended to capture high-resolution, raw still images with low\n> > - * frame rate.\n> >   * \\var VideoRecording\n> >   * The stream is intended to capture video for the purpose of recording or\n> >   * streaming. The video stream may produce a high frame rate and may be\n> > diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\n> > index 985743f3233405d0..ecb9dd6642400697 100644\n> > --- a/src/qcam/main_window.cpp\n> > +++ b/src/qcam/main_window.cpp\n> > @@ -380,7 +380,7 @@ int MainWindow::startCapture()\n> >                 break;\n> >         case 2:\n> >                 if (roles[0] != StreamRole::Viewfinder ||\n> > -                   roles[1] != StreamRole::StillCaptureRaw) {\n> > +                   roles[1] != StreamRole::Raw) {\n> >                         qWarning() << \"Only viewfinder + raw supported for dual streams\";\n> >                         return -EINVAL;\n> >                 }\n> > --\n> > 2.28.0\n> >\n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel","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 73B3FC3B5C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Sep 2020 10:47:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DAC1363021;\n\tFri, 25 Sep 2020 12:47:21 +0200 (CEST)","from mail-lj1-x235.google.com (mail-lj1-x235.google.com\n\t[IPv6:2a00:1450:4864:20::235])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3E12762FD8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Sep 2020 12:47:20 +0200 (CEST)","by mail-lj1-x235.google.com with SMTP id c2so2037955ljj.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Sep 2020 03:47:20 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tr13sm1929407lfe.114.2020.09.25.03.47.18\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 25 Sep 2020 03:47:18 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"tzyv13NC\"; dkim-atps=neutral","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\tbh=lPoRbM66xe79+TJpBHXNtQJpFzJeYQnj0mSvnzAi00w=;\n\tb=tzyv13NCdwZB1Stn8SRS98kkzl9dYjeExpNcHx/jSp4BJNAknYXlUhbwsFo55GXhp5\n\tTplquiCGslPi9E64koLdWVUUpnpGpKLWC/dVvykGywumTSU/VbyUyKR5kD+T2SX88siE\n\t28xEpvA/eXX0Ye5GdPzYUNc/zmkjFtnlIHbsNdtpsoSBIEDQDeA4TwVk7PL7ri9+Y4et\n\teQQpeBrgLZmpupHFCcwtNJxpxyvXvMRhxIEYrdP25fi3eJWZu3xvRgEwQeEpKbYO7bIN\n\tHEniePwuu6Ztns0MdGfu9knKP584vqwnvJWybDycSMGHWA+hjpU9d2mvHXXxuNneB2cW\n\tHvXQ==","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;\n\tbh=lPoRbM66xe79+TJpBHXNtQJpFzJeYQnj0mSvnzAi00w=;\n\tb=KVgDTz/U/1CxizUL21Ghkr7hZb980m9ddNVmAyglYzBWTJKpiDOO53HW0cfcaKFYEV\n\txu9j22aeS75gKMkxcF4kVTAT9Y4KwtjzV+LAcKlOwsQfhS5xdILji3Wy5VjEUXiuGkXP\n\tYmB8detLmiwjIMiWjI8sj1Gv8MER9d/tPtVuWnyKqkTFbBOMVagfBmnckH96my72rx9a\n\t6ocjMsUj6WIb5b46nXXlZdPokRZ6K168DMENrVEANlR0D3tz4aNBtsZEVU1h37uRL9kB\n\t5RkxE9gRPJTTDG2X49WwfrVQOOJITi2QykcfiBmnT+Hi3dQQlZHn7qOYAnnZri+PMQXq\n\tKjMA==","X-Gm-Message-State":"AOAM5326RV6MUySz6IaMHMjXs4k61JN78OSfHASnggsdOutS3wp6bC6p\n\t2WQSLD736GFcgp9U264S6AeXfw==","X-Google-Smtp-Source":"ABdhPJztd5mOZeNSq6Za0V/QQLpGg7zl7WtMiNUUcJJ4pNjfQFlTW9b5jNEmaHqghV6A8EvtdYZI1Q==","X-Received":"by 2002:a2e:b386:: with SMTP id f6mr1200067lje.186.1601030839379;\n\tFri, 25 Sep 2020 03:47:19 -0700 (PDT)","Date":"Fri, 25 Sep 2020 12:47:18 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<20200925104718.GA1757254@oden.dyn.berto.se>","References":"<20200921182325.2508256-1-niklas.soderlund@ragnatech.se>\n\t<CAHW6GY+X7816jDKc8W1_zH=+6j1CmLLi+uwqiUp-8ehquj34xg@mail.gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<CAHW6GY+X7816jDKc8W1_zH=+6j1CmLLi+uwqiUp-8ehquj34xg@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: stream: Rename\n\tStillCaptureRaw to Raw","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@lists.libcamera.org","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12844,"web_url":"https://patchwork.libcamera.org/comment/12844/","msgid":"<20200928233336.GF14614@pendragon.ideasonboard.com>","date":"2020-09-28T23:33:36","subject":"Re: [libcamera-devel] [PATCH] libcamera: stream: Rename\n\tStillCaptureRaw to Raw","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nOn Fri, Sep 25, 2020 at 12:47:18PM +0200, Niklas Söderlund wrote:\n> On 2020-09-25 07:36:43 +0100, David Plowman wrote:\n> > Hi Niklas\n> > \n> > I like this change, am happy to apply it to the RPi pipeline handler,\n> > and would like to give it my thumbs-up! Just one very small\n> > question...\n> > \n> > On Mon, 21 Sep 2020 at 19:23, Niklas Söderlund wrote:\n> > >\n> > > With the buffer copy removed from all pipelines for the raw capture\n> > > rename the StillCaptureRaw to Raw to better represent the role.\n> > >\n> > > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > > ---\n> > >  include/libcamera/stream.h                         | 2 +-\n> > >  src/android/camera_device.cpp                      | 4 ++--\n> > >  src/cam/stream_options.cpp                         | 4 ++--\n> > >  src/libcamera/pipeline/ipu3/ipu3.cpp               | 2 +-\n> > >  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 +-\n> > >  src/libcamera/stream.cpp                           | 5 ++---\n> > >  src/qcam/main_window.cpp                           | 2 +-\n> > >  7 files changed, 10 insertions(+), 11 deletions(-)\n> > >\n> > > diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> > > index f502b35957fc250c..bb47c390f8a12387 100644\n> > > --- a/include/libcamera/stream.h\n> > > +++ b/include/libcamera/stream.h\n> > > @@ -59,8 +59,8 @@ private:\n> > >  };\n> > >\n> > >  enum StreamRole {\n> > > +       Raw,\n> > >         StillCapture,\n> > > -       StillCaptureRaw,\n> > >         VideoRecording,\n> > >         Viewfinder,\n> > >  };\n> > > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> > > index 70d77a17ef43cf48..751699cd21138245 100644\n> > > --- a/src/android/camera_device.cpp\n> > > +++ b/src/android/camera_device.cpp\n> > > @@ -313,7 +313,7 @@ std::vector<Size> CameraDevice::getYUVResolutions(CameraConfiguration *cameraCon\n> > >  std::vector<Size> CameraDevice::getRawResolutions(const libcamera::PixelFormat &pixelFormat)\n> > >  {\n> > >         std::unique_ptr<CameraConfiguration> cameraConfig =\n> > > -               camera_->generateConfiguration({ StillCaptureRaw });\n> > > +               camera_->generateConfiguration({ StreamRole::Raw });\n> > >         StreamConfiguration &cfg = cameraConfig->at(0);\n> > >         const StreamFormats &formats = cfg.formats();\n> > >         std::vector<Size> supportedResolutions = formats.sizes(pixelFormat);\n> > > @@ -895,7 +895,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()\n> > >\n> > >         /* Report if camera supports RAW. */\n> > >         std::unique_ptr<CameraConfiguration> cameraConfig =\n> > > -               camera_->generateConfiguration({ StillCaptureRaw });\n> > > +               camera_->generateConfiguration({ StreamRole::Raw });\n> > >         if (cameraConfig && !cameraConfig->empty()) {\n> > >                 const PixelFormatInfo &info =\n> > >                         PixelFormatInfo::info(cameraConfig->at(0).pixelFormat);\n> > > diff --git a/src/cam/stream_options.cpp b/src/cam/stream_options.cpp\n> > > index 4168e5d2d1deff9b..27cc39122989f256 100644\n> > > --- a/src/cam/stream_options.cpp\n> > > +++ b/src/cam/stream_options.cpp\n> > > @@ -119,8 +119,8 @@ bool StreamKeyValueParser::parseRole(StreamRole *role,\n> > >         } else if (name == \"still\") {\n> > >                 *role = StreamRole::StillCapture;\n> > >                 return true;\n> > > -       } else if (name == \"stillraw\") {\n> > > -               *role = StreamRole::StillCaptureRaw;\n> > > +       } else if (name == \"raw\") {\n> > > +               *role = StreamRole::Raw;\n> > >                 return true;\n> > >         }\n> > >\n> > > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > > index 221259c7fe61df03..17ffed2b0e2ff0a6 100644\n> > > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > > @@ -343,7 +343,7 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera,\n> > >\n> > >                         break;\n> > >\n> > > -               case StreamRole::StillCaptureRaw: {\n> > > +               case StreamRole::Raw: {\n> > >                         StreamConfiguration cio2Config =\n> > >                                 data->cio2_.generateConfiguration(sensorResolution);\n> > >                         pixelFormat = cio2Config.pixelFormat;\n> > > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > index 50f07182457046ff..fe46dbd386d2a5ea 100644\n> > > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > @@ -376,7 +376,7 @@ CameraConfiguration *PipelineHandlerRPi::generateConfiguration(Camera *camera,\n> > >         unsigned int outCount = 0;\n> > >         for (const StreamRole role : roles) {\n> > >                 switch (role) {\n> > > -               case StreamRole::StillCaptureRaw:\n> > > +               case StreamRole::Raw:\n> > >                         size = data->sensor_->resolution();\n> > >                         fmts = data->unicam_[Unicam::Image].dev()->formats();\n> > >                         sensorFormat = findBestMode(fmts, size);\n> > > diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n> > > index 4d0ab90d73f96e0f..6d51e5da794f9f87 100644\n> > > --- a/src/libcamera/stream.cpp\n> > > +++ b/src/libcamera/stream.cpp\n> > > @@ -380,12 +380,11 @@ std::string StreamConfiguration::toString() const\n> > >   * are specified by applications and passed to cameras, that then select the\n> > >   * most appropriate streams and their default configurations.\n> > >   *\n> > > + * \\var Raw\n> > > + * The stream is intended to capture high-resolution raw images.\n> > \n> > I wonder just a little about saying \"high-resolution raw images\". I\n> > can use the raw streams to capture lower-resolution binned raw images\n> > too, so perhaps we should reflect that? But other than that, can I add\n> \n> Good point, how about something like this?\n> \n>     The stream is intended to capture raw frames from the sensor.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> > Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nDavid, the Raspeberry Pi camera guide should then be updated. I'm sorry\nfor the inconvenience.\n\n> > >   * \\var StillCapture\n> > >   * The stream is intended to capture high-resolution, high-quality still images\n> > >   * with low frame rate. The captured frames may be exposed with flash.\n> > > - * \\var StillCaptureRaw\n> > > - * The stream is intended to capture high-resolution, raw still images with low\n> > > - * frame rate.\n> > >   * \\var VideoRecording\n> > >   * The stream is intended to capture video for the purpose of recording or\n> > >   * streaming. The video stream may produce a high frame rate and may be\n> > > diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\n> > > index 985743f3233405d0..ecb9dd6642400697 100644\n> > > --- a/src/qcam/main_window.cpp\n> > > +++ b/src/qcam/main_window.cpp\n> > > @@ -380,7 +380,7 @@ int MainWindow::startCapture()\n> > >                 break;\n> > >         case 2:\n> > >                 if (roles[0] != StreamRole::Viewfinder ||\n> > > -                   roles[1] != StreamRole::StillCaptureRaw) {\n> > > +                   roles[1] != StreamRole::Raw) {\n> > >                         qWarning() << \"Only viewfinder + raw supported for dual streams\";\n> > >                         return -EINVAL;\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 1A0D0C3B5C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Sep 2020 23:34:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A450D60BF7;\n\tTue, 29 Sep 2020 01:34:12 +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 16BE160394\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Sep 2020 01:34:12 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 85703A58;\n\tTue, 29 Sep 2020 01:34:11 +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=\"r2yEmuVk\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1601336051;\n\tbh=KcaoljgZsKD/P46fGsIpJEif30T+3gI9CrUWlp1VVHU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=r2yEmuVkyeHOXUd1EOeSokJcrLnvCJfJN2+8VXBXYRZiMai0o/cag9A8wtD/sXUM+\n\tjqMnpb3IUadfihrEV1so98OQg7doqODJyG3VUbTOLMllEBl569MdjTP+XhPv0QNuQ+\n\tJY+m7r4/DgbZr+LhbARY1l/CDZ9nxFftGrQ+lrgs=","Date":"Tue, 29 Sep 2020 02:33:36 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20200928233336.GF14614@pendragon.ideasonboard.com>","References":"<20200921182325.2508256-1-niklas.soderlund@ragnatech.se>\n\t<CAHW6GY+X7816jDKc8W1_zH=+6j1CmLLi+uwqiUp-8ehquj34xg@mail.gmail.com>\n\t<20200925104718.GA1757254@oden.dyn.berto.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200925104718.GA1757254@oden.dyn.berto.se>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: stream: Rename\n\tStillCaptureRaw to Raw","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@lists.libcamera.org","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]