[{"id":12871,"web_url":"https://patchwork.libcamera.org/comment/12871/","msgid":"<20200929095439.GT45948@pyrite.rasen.tech>","date":"2020-09-29T09:54:39","subject":"Re: [libcamera-devel] [PATCH v2] libcamera: stream: Rename\n\tStillCaptureRaw to Raw","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Niklas,\n\nOn Tue, Sep 29, 2020 at 07:28:11AM +0200, Niklas Söderlund wrote:\n> With the buffer copy removed from all pipelines for raw capture\n> rename StillCaptureRaw to Raw to better describe the role.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n> * Changes since v1\n> - Update documentation.\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> +\tRaw,\n>  \tStillCapture,\n> -\tStillCaptureRaw,\n>  \tVideoRecording,\n>  \tViewfinder,\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>  \tstd::unique_ptr<CameraConfiguration> cameraConfig =\n> -\t\tcamera_->generateConfiguration({ StillCaptureRaw });\n> +\t\tcamera_->generateConfiguration({ StreamRole::Raw });\n>  \tStreamConfiguration &cfg = cameraConfig->at(0);\n>  \tconst StreamFormats &formats = cfg.formats();\n>  \tstd::vector<Size> supportedResolutions = formats.sizes(pixelFormat);\n> @@ -895,7 +895,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()\n>  \n>  \t/* Report if camera supports RAW. */\n>  \tstd::unique_ptr<CameraConfiguration> cameraConfig =\n> -\t\tcamera_->generateConfiguration({ StillCaptureRaw });\n> +\t\tcamera_->generateConfiguration({ StreamRole::Raw });\n>  \tif (cameraConfig && !cameraConfig->empty()) {\n>  \t\tconst PixelFormatInfo &info =\n>  \t\t\tPixelFormatInfo::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>  \t} else if (name == \"still\") {\n>  \t\t*role = StreamRole::StillCapture;\n>  \t\treturn true;\n> -\t} else if (name == \"stillraw\") {\n> -\t\t*role = StreamRole::StillCaptureRaw;\n> +\t} else if (name == \"raw\") {\n> +\t\t*role = StreamRole::Raw;\n>  \t\treturn true;\n>  \t}\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>  \t\t\tbreak;\n>  \n> -\t\tcase StreamRole::StillCaptureRaw: {\n> +\t\tcase StreamRole::Raw: {\n>  \t\t\tStreamConfiguration cio2Config =\n>  \t\t\t\tdata->cio2_.generateConfiguration(sensorResolution);\n>  \t\t\tpixelFormat = 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>  \tunsigned int outCount = 0;\n>  \tfor (const StreamRole role : roles) {\n>  \t\tswitch (role) {\n> -\t\tcase StreamRole::StillCaptureRaw:\n> +\t\tcase StreamRole::Raw:\n>  \t\t\tsize = data->sensor_->resolution();\n>  \t\t\tfmts = data->unicam_[Unicam::Image].dev()->formats();\n>  \t\t\tsensorFormat = findBestMode(fmts, size);\n> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n> index 4d0ab90d73f96e0f..f7bafcf8fc97405b 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 raw frames from the sensor.\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>  \t\tbreak;\n>  \tcase 2:\n>  \t\tif (roles[0] != StreamRole::Viewfinder ||\n> -\t\t    roles[1] != StreamRole::StillCaptureRaw) {\n> +\t\t    roles[1] != StreamRole::Raw) {\n>  \t\t\tqWarning() << \"Only viewfinder + raw supported for dual streams\";\n>  \t\t\treturn -EINVAL;\n>  \t\t}\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 B5C06C3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 29 Sep 2020 09:54:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4804560BCF;\n\tTue, 29 Sep 2020 11:54:50 +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 76A3960576\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Sep 2020 11:54:48 +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 92DBD9CC;\n\tTue, 29 Sep 2020 11:54:45 +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=\"Yq3qtajC\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1601373286;\n\tbh=dQcP9K3fg1xsMc2gzW+3GOL5jBamYEoA/oRms1U/nXQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Yq3qtajC1IwyLqBK2hTcam/xuJZeRvoiSmr5I9/ouQ7arcw5XBD5LgyKUFrKOjwou\n\tAz8NT4We9HEjRdkXU4lF5qhajLej7oZ2BrAJ0IYMFpzBJdITgIjj6hIy4sjUoDbasZ\n\tpO+Q40WO9cyLkdJUreHXolA3TwcClsDQksqQtvRk=","Date":"Tue, 29 Sep 2020 18:54:39 +0900","From":"paul.elder@ideasonboard.com","To":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20200929095439.GT45948@pyrite.rasen.tech>","References":"<20200929052811.160414-1-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200929052811.160414-1-niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH v2] 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>"}}]