Patch Detail
Show a patch.
GET /api/1.1/patches/9695/?format=api
{ "id": 9695, "url": "https://patchwork.libcamera.org/api/1.1/patches/9695/?format=api", "web_url": "https://patchwork.libcamera.org/patch/9695/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20200922095018.68434-3-naush@raspberrypi.com>", "date": "2020-09-22T09:50:16", "name": "[libcamera-devel,2/4] ipa: raspberrypi: Move IPA parameters to the RPi namespace", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "d49cca1c9df3b408eddfb589127a3b8244369c12", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/9695/mbox/", "series": [ { "id": 1307, "url": "https://patchwork.libcamera.org/api/1.1/series/1307/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1307", "date": "2020-09-22T09:50:14", "name": "Code tidy-ups", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1307/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/9695/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/9695/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 79556C3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Sep 2020 09:50:36 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3DD9B62FDD;\n\tTue, 22 Sep 2020 11:50:36 +0200 (CEST)", "from mail-wr1-x435.google.com (mail-wr1-x435.google.com\n\t[IPv6:2a00:1450:4864:20::435])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id ADFE362FD6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Sep 2020 11:50:33 +0200 (CEST)", "by mail-wr1-x435.google.com with SMTP id x14so16289428wrl.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Sep 2020 02:50:33 -0700 (PDT)", "from naushir-VirtualBox.pitowers.org\n\t([2a00:1098:3142:14:a00:27ff:fe4d:f6a2])\n\tby smtp.gmail.com with ESMTPSA id\n\th204sm3776187wmf.35.2020.09.22.02.50.31\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 22 Sep 2020 02:50:31 -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=\"goJ6IrYb\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=W3B1SEh6B3BMPJIWyNG83jbhUKHNFkXZCUMYp2s0V4A=;\n\tb=goJ6IrYbLF/80hJLDPQxgVDoW9uv9j6Uv/nJrgn5sdty8eBWPNFmMYq+1RW2lsEcrB\n\tnM0+3vhXBmQvWSVfGeQmaTFcZQfKcxFDlLdElSV1+SgnLtX2Rj2uhzsyHjZ91t2vR6qB\n\tWyd0iL7i26ew3++9EcP1J0K46QJE1NCnkVkBmYxvbrq4iW4g6fuwCCVsLWYeMzCqvKvd\n\tXZN4QNE94ubU2kp9OE4vgIr16qIAejASxCjwExcSbbH6LihcdHQZlKQJE/3/ETjJigf+\n\tqSuzrk3+Q6oh8lU9nqlUpBfijURuFEfrYarL12jqO0AhtzhfH6cXmCFw1/C04bIMGBgD\n\tjLqw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=W3B1SEh6B3BMPJIWyNG83jbhUKHNFkXZCUMYp2s0V4A=;\n\tb=PLy4H3t+dvgqtsFVzbTI0k+Zl1MlzlEbCKaqjBIG57KUVzLMp+cGY6YAdb8OxChb7d\n\t5qekyPvLffhBbFh3DdUWX2pXQpnFK2GvqEvlIx+W3hp+6Mr2rOYCG6a/z+iLXgyxwzl3\n\tJtzqfnELiSUDMo/o0qAum72sX4S9fQeP4Wgdea4ZKFuVtlwwxKpTwHhxEkiozV8bct5E\n\t7DRVNshZty8xSX82fw74IKjLKTDz7dkDp4XmjJDbbLNx9JHR3OdXH+ekd/6r1IEmKXBM\n\tSPoAEFpxtsRTMHyTHn8g3c/lAxeOWMRlfCZXDMwNd2tKv5Wyk7EcjMi4Uo7F3FWFTDbc\n\tRwBA==", "X-Gm-Message-State": "AOAM530cW7Wzh56s5V/8qijB7r9AL5qyWZGXRl+0my7ntXtdhRDKPjeu\n\tjo9U7Y676pXF6oyloTlRF3dFm6PNmTarYA==", "X-Google-Smtp-Source": "ABdhPJyby6ShfvFfSpvGzoWnRQefd/3ioWqS0/skvBShFeULPfWEll0nXSkHTt0YqvzSmAjEKx0mww==", "X-Received": "by 2002:adf:f5c7:: with SMTP id k7mr4526270wrp.246.1600768232552;\n\tTue, 22 Sep 2020 02:50:32 -0700 (PDT)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 22 Sep 2020 10:50:16 +0100", "Message-Id": "<20200922095018.68434-3-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20200922095018.68434-1-naush@raspberrypi.com>", "References": "<20200922095018.68434-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH 2/4] ipa: raspberrypi: Move IPA parameters\n\tto the RPi namespace", "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": "All IPA related types/params are now moved to the RPi namespace.\n\nThere are no functional changes in this commit.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n include/libcamera/ipa/raspberrypi.h | 40 +++++----\n src/ipa/raspberrypi/raspberrypi.cpp | 82 +++++++++----------\n .../pipeline/raspberrypi/raspberrypi.cpp | 40 ++++-----\n .../pipeline/raspberrypi/rpi_stream.cpp | 4 +-\n .../pipeline/raspberrypi/rpi_stream.h | 4 +-\n 5 files changed, 87 insertions(+), 83 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\nindex dd6ebeac..c9d4aa81 100644\n--- a/include/libcamera/ipa/raspberrypi.h\n+++ b/include/libcamera/ipa/raspberrypi.h\n@@ -10,25 +10,29 @@\n #include <libcamera/control_ids.h>\n #include <libcamera/controls.h>\n \n-enum RPiConfigParameters {\n-\tRPI_IPA_CONFIG_LS_TABLE = (1 << 0),\n-\tRPI_IPA_CONFIG_STAGGERED_WRITE = (1 << 1),\n-\tRPI_IPA_CONFIG_SENSOR = (1 << 2),\n-\tRPI_IPA_CONFIG_DROP_FRAMES = (1 << 3),\n+namespace libcamera {\n+\n+namespace RPi {\n+\n+enum ConfigParameters {\n+\tIPA_CONFIG_LS_TABLE = (1 << 0),\n+\tIPA_CONFIG_STAGGERED_WRITE = (1 << 1),\n+\tIPA_CONFIG_SENSOR = (1 << 2),\n+\tIPA_CONFIG_DROP_FRAMES = (1 << 3),\n };\n \n-enum RPiOperations {\n-\tRPI_IPA_ACTION_V4L2_SET_STAGGERED = 1,\n-\tRPI_IPA_ACTION_V4L2_SET_ISP,\n-\tRPI_IPA_ACTION_STATS_METADATA_COMPLETE,\n-\tRPI_IPA_ACTION_RUN_ISP,\n-\tRPI_IPA_ACTION_EMBEDDED_COMPLETE,\n-\tRPI_IPA_EVENT_SIGNAL_STAT_READY,\n-\tRPI_IPA_EVENT_SIGNAL_ISP_PREPARE,\n-\tRPI_IPA_EVENT_QUEUE_REQUEST,\n+enum Operations {\n+\tIPA_ACTION_V4L2_SET_STAGGERED = 1,\n+\tIPA_ACTION_V4L2_SET_ISP,\n+\tIPA_ACTION_STATS_METADATA_COMPLETE,\n+\tIPA_ACTION_RUN_ISP,\n+\tIPA_ACTION_EMBEDDED_COMPLETE,\n+\tIPA_EVENT_SIGNAL_STAT_READY,\n+\tIPA_EVENT_SIGNAL_ISP_PREPARE,\n+\tIPA_EVENT_QUEUE_REQUEST,\n };\n \n-enum RPiBufferMask {\n+enum BufferMask {\n \tID\t\t= 0x00ffff,\n \tSTATS\t\t= 0x010000,\n \tEMBEDDED_DATA\t= 0x020000,\n@@ -39,10 +43,8 @@ enum RPiBufferMask {\n /* Size of the LS grid allocation. */\n #define MAX_LS_GRID_SIZE (32 << 10)\n \n-namespace libcamera {\n-\n /* List of controls handled by the Raspberry Pi IPA */\n-static const ControlInfoMap RPiControls = {\n+static const ControlInfoMap Controls = {\n \t{ &controls::AeEnable, ControlInfo(false, true) },\n \t{ &controls::ExposureTime, ControlInfo(0, 999999) },\n \t{ &controls::AnalogueGain, ControlInfo(1.0f, 32.0f) },\n@@ -60,6 +62,8 @@ static const ControlInfoMap RPiControls = {\n \t{ &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },\n };\n \n+} /* namespace RPi */\n+\n } /* namespace libcamera */\n \n #endif /* __LIBCAMERA_IPA_INTERFACE_RASPBERRYPI_H__ */\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 0555cc4e..28f81824 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -125,10 +125,10 @@ private:\n \tCameraMode lastMode_;\n \n \t/* Raspberry Pi controller specific defines. */\n-\tstd::unique_ptr<RPi::CamHelper> helper_;\n-\tRPi::Controller controller_;\n+\tstd::unique_ptr<::RPi::CamHelper> helper_;\n+\t::RPi::Controller controller_;\n \tbool controllerInit_;\n-\tRPi::Metadata rpiMetadata_;\n+\t::RPi::Metadata rpiMetadata_;\n \n \t/*\n \t * We count frames to decide if the frame must be hidden (e.g. from\n@@ -211,7 +211,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \t */\n \tstd::string cameraName(sensorInfo.model);\n \tif (!helper_) {\n-\t\thelper_ = std::unique_ptr<RPi::CamHelper>(RPi::CamHelper::Create(cameraName));\n+\t\thelper_ = std::unique_ptr<::RPi::CamHelper>(::RPi::CamHelper::Create(cameraName));\n \t\t/*\n \t\t * Pass out the sensor config to the pipeline handler in order\n \t\t * to setup the staggered writer class.\n@@ -224,7 +224,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \t\tresult->data.push_back(exposureDelay);\n \t\tresult->data.push_back(sensorMetadata);\n \n-\t\tresult->operation |= RPI_IPA_CONFIG_STAGGERED_WRITE;\n+\t\tresult->operation |= RPi::IPA_CONFIG_STAGGERED_WRITE;\n \t}\n \n \t/* Re-assemble camera mode using the sensor info. */\n@@ -250,7 +250,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \t}\n \n \tresult->data.push_back(drop_frame);\n-\tresult->operation |= RPI_IPA_CONFIG_DROP_FRAMES;\n+\tresult->operation |= RPi::IPA_CONFIG_DROP_FRAMES;\n \n \tstruct AgcStatus agcStatus;\n \t/* These zero values mean not program anything (unless overwritten). */\n@@ -268,7 +268,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \t\tagcStatus.analogue_gain = DEFAULT_ANALOGUE_GAIN;\n \t}\n \n-\tRPi::Metadata metadata;\n+\t::RPi::Metadata metadata;\n \tcontroller_.SwitchMode(mode_, &metadata);\n \n \t/* SwitchMode may supply updated exposure/gain values to use. */\n@@ -278,13 +278,13 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \t\tapplyAGC(&agcStatus, ctrls);\n \t\tresult->controls.push_back(ctrls);\n \n-\t\tresult->operation |= RPI_IPA_CONFIG_SENSOR;\n+\t\tresult->operation |= RPi::IPA_CONFIG_SENSOR;\n \t}\n \n \tlastMode_ = mode_;\n \n \t/* Store the lens shading table pointer and handle if available. */\n-\tif (ipaConfig.operation & RPI_IPA_CONFIG_LS_TABLE) {\n+\tif (ipaConfig.operation & RPi::IPA_CONFIG_LS_TABLE) {\n \t\t/* Remove any previous table, if there was one. */\n \t\tif (lsTable_) {\n \t\t\tmunmap(lsTable_, MAX_LS_GRID_SIZE);\n@@ -340,7 +340,7 @@ void IPARPi::unmapBuffers(const std::vector<unsigned int> &ids)\n void IPARPi::processEvent(const IPAOperationData &event)\n {\n \tswitch (event.operation) {\n-\tcase RPI_IPA_EVENT_SIGNAL_STAT_READY: {\n+\tcase RPi::IPA_EVENT_SIGNAL_STAT_READY: {\n \t\tunsigned int bufferId = event.data[0];\n \n \t\tif (++check_count_ != frame_count_) /* assert here? */\n@@ -351,14 +351,14 @@ void IPARPi::processEvent(const IPAOperationData &event)\n \t\treportMetadata();\n \n \t\tIPAOperationData op;\n-\t\top.operation = RPI_IPA_ACTION_STATS_METADATA_COMPLETE;\n-\t\top.data = { bufferId & RPiBufferMask::ID };\n+\t\top.operation = RPi::IPA_ACTION_STATS_METADATA_COMPLETE;\n+\t\top.data = { bufferId & RPi::BufferMask::ID };\n \t\top.controls = { libcameraMetadata_ };\n \t\tqueueFrameAction.emit(0, op);\n \t\tbreak;\n \t}\n \n-\tcase RPI_IPA_EVENT_SIGNAL_ISP_PREPARE: {\n+\tcase RPi::IPA_EVENT_SIGNAL_ISP_PREPARE: {\n \t\tunsigned int embeddedbufferId = event.data[0];\n \t\tunsigned int bayerbufferId = event.data[1];\n \n@@ -372,13 +372,13 @@ void IPARPi::processEvent(const IPAOperationData &event)\n \n \t\t/* Ready to push the input buffer into the ISP. */\n \t\tIPAOperationData op;\n-\t\top.operation = RPI_IPA_ACTION_RUN_ISP;\n-\t\top.data = { bayerbufferId & RPiBufferMask::ID };\n+\t\top.operation = RPi::IPA_ACTION_RUN_ISP;\n+\t\top.data = { bayerbufferId & RPi::BufferMask::ID };\n \t\tqueueFrameAction.emit(0, op);\n \t\tbreak;\n \t}\n \n-\tcase RPI_IPA_EVENT_QUEUE_REQUEST: {\n+\tcase RPi::IPA_EVENT_QUEUE_REQUEST: {\n \t\tqueueRequest(event.controls[0]);\n \t\tbreak;\n \t}\n@@ -391,7 +391,7 @@ void IPARPi::processEvent(const IPAOperationData &event)\n \n void IPARPi::reportMetadata()\n {\n-\tstd::unique_lock<RPi::Metadata> lock(rpiMetadata_);\n+\tstd::unique_lock<::RPi::Metadata> lock(rpiMetadata_);\n \n \t/*\n \t * Certain information about the current frame and how it will be\n@@ -496,7 +496,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \n \t\tswitch (ctrl.first) {\n \t\tcase controls::AE_ENABLE: {\n-\t\t\tRPi::Algorithm *agc = controller_.GetAlgorithm(\"agc\");\n+\t\t\t::RPi::Algorithm *agc = controller_.GetAlgorithm(\"agc\");\n \t\t\tASSERT(agc);\n \t\t\tif (ctrl.second.get<bool>() == false)\n \t\t\t\tagc->Pause();\n@@ -508,7 +508,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \t\t}\n \n \t\tcase controls::EXPOSURE_TIME: {\n-\t\t\tRPi::AgcAlgorithm *agc = dynamic_cast<RPi::AgcAlgorithm *>(\n+\t\t\t::RPi::AgcAlgorithm *agc = dynamic_cast<::RPi::AgcAlgorithm *>(\n \t\t\t\tcontroller_.GetAlgorithm(\"agc\"));\n \t\t\tASSERT(agc);\n \t\t\t/* This expects units of micro-seconds. */\n@@ -522,7 +522,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \t\t}\n \n \t\tcase controls::ANALOGUE_GAIN: {\n-\t\t\tRPi::AgcAlgorithm *agc = dynamic_cast<RPi::AgcAlgorithm *>(\n+\t\t\t::RPi::AgcAlgorithm *agc = dynamic_cast<::RPi::AgcAlgorithm *>(\n \t\t\t\tcontroller_.GetAlgorithm(\"agc\"));\n \t\t\tASSERT(agc);\n \t\t\tagc->SetFixedAnalogueGain(ctrl.second.get<float>());\n@@ -536,7 +536,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \t\t}\n \n \t\tcase controls::AE_METERING_MODE: {\n-\t\t\tRPi::AgcAlgorithm *agc = dynamic_cast<RPi::AgcAlgorithm *>(\n+\t\t\t::RPi::AgcAlgorithm *agc = dynamic_cast<::RPi::AgcAlgorithm *>(\n \t\t\t\tcontroller_.GetAlgorithm(\"agc\"));\n \t\t\tASSERT(agc);\n \n@@ -552,7 +552,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \t\t}\n \n \t\tcase controls::AE_CONSTRAINT_MODE: {\n-\t\t\tRPi::AgcAlgorithm *agc = dynamic_cast<RPi::AgcAlgorithm *>(\n+\t\t\t::RPi::AgcAlgorithm *agc = dynamic_cast<::RPi::AgcAlgorithm *>(\n \t\t\t\tcontroller_.GetAlgorithm(\"agc\"));\n \t\t\tASSERT(agc);\n \n@@ -568,7 +568,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \t\t}\n \n \t\tcase controls::AE_EXPOSURE_MODE: {\n-\t\t\tRPi::AgcAlgorithm *agc = dynamic_cast<RPi::AgcAlgorithm *>(\n+\t\t\t::RPi::AgcAlgorithm *agc = dynamic_cast<::RPi::AgcAlgorithm *>(\n \t\t\t\tcontroller_.GetAlgorithm(\"agc\"));\n \t\t\tASSERT(agc);\n \n@@ -584,7 +584,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \t\t}\n \n \t\tcase controls::EXPOSURE_VALUE: {\n-\t\t\tRPi::AgcAlgorithm *agc = dynamic_cast<RPi::AgcAlgorithm *>(\n+\t\t\t::RPi::AgcAlgorithm *agc = dynamic_cast<::RPi::AgcAlgorithm *>(\n \t\t\t\tcontroller_.GetAlgorithm(\"agc\"));\n \t\t\tASSERT(agc);\n \n@@ -600,7 +600,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \t\t}\n \n \t\tcase controls::AWB_ENABLE: {\n-\t\t\tRPi::Algorithm *awb = controller_.GetAlgorithm(\"awb\");\n+\t\t\t::RPi::Algorithm *awb = controller_.GetAlgorithm(\"awb\");\n \t\t\tASSERT(awb);\n \n \t\t\tif (ctrl.second.get<bool>() == false)\n@@ -614,7 +614,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \t\t}\n \n \t\tcase controls::AWB_MODE: {\n-\t\t\tRPi::AwbAlgorithm *awb = dynamic_cast<RPi::AwbAlgorithm *>(\n+\t\t\t::RPi::AwbAlgorithm *awb = dynamic_cast<::RPi::AwbAlgorithm *>(\n \t\t\t\tcontroller_.GetAlgorithm(\"awb\"));\n \t\t\tASSERT(awb);\n \n@@ -631,7 +631,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \n \t\tcase controls::COLOUR_GAINS: {\n \t\t\tauto gains = ctrl.second.get<Span<const float>>();\n-\t\t\tRPi::AwbAlgorithm *awb = dynamic_cast<RPi::AwbAlgorithm *>(\n+\t\t\t::RPi::AwbAlgorithm *awb = dynamic_cast<::RPi::AwbAlgorithm *>(\n \t\t\t\tcontroller_.GetAlgorithm(\"awb\"));\n \t\t\tASSERT(awb);\n \n@@ -644,7 +644,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \t\t}\n \n \t\tcase controls::BRIGHTNESS: {\n-\t\t\tRPi::ContrastAlgorithm *contrast = dynamic_cast<RPi::ContrastAlgorithm *>(\n+\t\t\t::RPi::ContrastAlgorithm *contrast = dynamic_cast<::RPi::ContrastAlgorithm *>(\n \t\t\t\tcontroller_.GetAlgorithm(\"contrast\"));\n \t\t\tASSERT(contrast);\n \n@@ -655,7 +655,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \t\t}\n \n \t\tcase controls::CONTRAST: {\n-\t\t\tRPi::ContrastAlgorithm *contrast = dynamic_cast<RPi::ContrastAlgorithm *>(\n+\t\t\t::RPi::ContrastAlgorithm *contrast = dynamic_cast<::RPi::ContrastAlgorithm *>(\n \t\t\t\tcontroller_.GetAlgorithm(\"contrast\"));\n \t\t\tASSERT(contrast);\n \n@@ -666,7 +666,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \t\t}\n \n \t\tcase controls::SATURATION: {\n-\t\t\tRPi::CcmAlgorithm *ccm = dynamic_cast<RPi::CcmAlgorithm *>(\n+\t\t\t::RPi::CcmAlgorithm *ccm = dynamic_cast<::RPi::CcmAlgorithm *>(\n \t\t\t\tcontroller_.GetAlgorithm(\"ccm\"));\n \t\t\tASSERT(ccm);\n \n@@ -677,7 +677,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \t\t}\n \n \t\tcase controls::SHARPNESS: {\n-\t\t\tRPi::SharpenAlgorithm *sharpen = dynamic_cast<RPi::SharpenAlgorithm *>(\n+\t\t\t::RPi::SharpenAlgorithm *sharpen = dynamic_cast<::RPi::SharpenAlgorithm *>(\n \t\t\t\tcontroller_.GetAlgorithm(\"sharpen\"));\n \t\t\tASSERT(sharpen);\n \n@@ -699,8 +699,8 @@ void IPARPi::queueRequest(const ControlList &controls)\n void IPARPi::returnEmbeddedBuffer(unsigned int bufferId)\n {\n \tIPAOperationData op;\n-\top.operation = RPI_IPA_ACTION_EMBEDDED_COMPLETE;\n-\top.data = { bufferId & RPiBufferMask::ID };\n+\top.operation = RPi::IPA_ACTION_EMBEDDED_COMPLETE;\n+\top.data = { bufferId & RPi::BufferMask::ID };\n \tqueueFrameAction.emit(0, op);\n }\n \n@@ -720,7 +720,7 @@ void IPARPi::prepareISP(unsigned int bufferId)\n \t\tcontroller_.Prepare(&rpiMetadata_);\n \n \t\t/* Lock the metadata buffer to avoid constant locks/unlocks. */\n-\t\tstd::unique_lock<RPi::Metadata> lock(rpiMetadata_);\n+\t\tstd::unique_lock<::RPi::Metadata> lock(rpiMetadata_);\n \n \t\tAwbStatus *awbStatus = rpiMetadata_.GetLocked<AwbStatus>(\"awb.status\");\n \t\tif (awbStatus)\n@@ -764,7 +764,7 @@ void IPARPi::prepareISP(unsigned int bufferId)\n \n \t\tif (!ctrls.empty()) {\n \t\t\tIPAOperationData op;\n-\t\t\top.operation = RPI_IPA_ACTION_V4L2_SET_ISP;\n+\t\t\top.operation = RPi::IPA_ACTION_V4L2_SET_ISP;\n \t\t\top.controls.push_back(ctrls);\n \t\t\tqueueFrameAction.emit(0, op);\n \t\t}\n@@ -781,18 +781,18 @@ bool IPARPi::parseEmbeddedData(unsigned int bufferId, struct DeviceStatus &devic\n \n \tint size = buffers_.find(bufferId)->second.planes()[0].length;\n \thelper_->Parser().SetBufferSize(size);\n-\tRPi::MdParser::Status status = helper_->Parser().Parse(it->second);\n-\tif (status != RPi::MdParser::Status::OK) {\n+\t::RPi::MdParser::Status status = helper_->Parser().Parse(it->second);\n+\tif (status != ::RPi::MdParser::Status::OK) {\n \t\tLOG(IPARPI, Error) << \"Embedded Buffer parsing failed, error \" << status;\n \t} else {\n \t\tuint32_t exposure_lines, gain_code;\n-\t\tif (helper_->Parser().GetExposureLines(exposure_lines) != RPi::MdParser::Status::OK) {\n+\t\tif (helper_->Parser().GetExposureLines(exposure_lines) != ::RPi::MdParser::Status::OK) {\n \t\t\tLOG(IPARPI, Error) << \"Exposure time failed\";\n \t\t\treturn false;\n \t\t}\n \n \t\tdeviceStatus.shutter_speed = helper_->Exposure(exposure_lines);\n-\t\tif (helper_->Parser().GetGainCode(gain_code) != RPi::MdParser::Status::OK) {\n+\t\tif (helper_->Parser().GetGainCode(gain_code) != ::RPi::MdParser::Status::OK) {\n \t\t\tLOG(IPARPI, Error) << \"Gain failed\";\n \t\t\treturn false;\n \t\t}\n@@ -815,7 +815,7 @@ void IPARPi::processStats(unsigned int bufferId)\n \t}\n \n \tbcm2835_isp_stats *stats = static_cast<bcm2835_isp_stats *>(it->second);\n-\tRPi::StatisticsPtr statistics = std::make_shared<bcm2835_isp_stats>(*stats);\n+\t::RPi::StatisticsPtr statistics = std::make_shared<bcm2835_isp_stats>(*stats);\n \tcontroller_.Process(statistics, &rpiMetadata_);\n \n \tstruct AgcStatus agcStatus;\n@@ -824,7 +824,7 @@ void IPARPi::processStats(unsigned int bufferId)\n \t\tapplyAGC(&agcStatus, ctrls);\n \n \t\tIPAOperationData op;\n-\t\top.operation = RPI_IPA_ACTION_V4L2_SET_STAGGERED;\n+\t\top.operation = RPi::IPA_ACTION_V4L2_SET_STAGGERED;\n \t\top.controls.push_back(ctrls);\n \t\tqueueFrameAction.emit(0, op);\n \t}\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 5ed74d51..35dbe0fb 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -837,7 +837,7 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n \t}\n \n \t/* Register the controls that the Raspberry Pi IPA can handle. */\n-\tdata->controlInfo_ = RPiControls;\n+\tdata->controlInfo_ = RPi::Controls;\n \t/* Initialize the camera properties. */\n \tdata->properties_ = data->sensor_->properties();\n \n@@ -925,8 +925,8 @@ int PipelineHandlerRPi::prepareBuffers(Camera *camera)\n \t * Pass the stats and embedded data buffers to the IPA. No other\n \t * buffers need to be passed.\n \t */\n-\tmapBuffers(camera, data->isp_[Isp::Stats].getBuffers(), RPiBufferMask::STATS);\n-\tmapBuffers(camera, data->unicam_[Unicam::Embedded].getBuffers(), RPiBufferMask::EMBEDDED_DATA);\n+\tmapBuffers(camera, data->isp_[Isp::Stats].getBuffers(), RPi::BufferMask::STATS);\n+\tmapBuffers(camera, data->unicam_[Unicam::Embedded].getBuffers(), RPi::BufferMask::EMBEDDED_DATA);\n \n \treturn 0;\n }\n@@ -1017,7 +1017,7 @@ int RPiCameraData::configureIPA()\n \t\t\treturn -ENOMEM;\n \n \t\t/* Allow the IPA to mmap the LS table via the file descriptor. */\n-\t\tipaConfig.operation = RPI_IPA_CONFIG_LS_TABLE;\n+\t\tipaConfig.operation = RPi::IPA_CONFIG_LS_TABLE;\n \t\tipaConfig.data = { static_cast<unsigned int>(lsTable_.fd()) };\n \t}\n \n@@ -1035,7 +1035,7 @@ int RPiCameraData::configureIPA()\n \t\t\t&result);\n \n \tunsigned int resultIdx = 0;\n-\tif (result.operation & RPI_IPA_CONFIG_STAGGERED_WRITE) {\n+\tif (result.operation & RPi::IPA_CONFIG_STAGGERED_WRITE) {\n \t\t/*\n \t\t * Setup our staggered control writer with the sensor default\n \t\t * gain and exposure delays.\n@@ -1048,13 +1048,13 @@ int RPiCameraData::configureIPA()\n \t\t}\n \t}\n \n-\tif (result.operation & RPI_IPA_CONFIG_SENSOR) {\n+\tif (result.operation & RPi::IPA_CONFIG_SENSOR) {\n \t\tconst ControlList &ctrls = result.controls[0];\n \t\tif (!staggeredCtrl_.set(ctrls))\n \t\t\tLOG(RPI, Error) << \"V4L2 staggered set failed\";\n \t}\n \n-\tif (result.operation & RPI_IPA_CONFIG_DROP_FRAMES) {\n+\tif (result.operation & RPi::IPA_CONFIG_DROP_FRAMES) {\n \t\t/* Configure the number of dropped frames required on startup. */\n \t\tdropFrameCount_ = result.data[resultIdx++];\n \t}\n@@ -1070,14 +1070,14 @@ void RPiCameraData::queueFrameAction([[maybe_unused]] unsigned int frame,\n \t * a stopped state.\n \t */\n \tswitch (action.operation) {\n-\tcase RPI_IPA_ACTION_V4L2_SET_STAGGERED: {\n+\tcase RPi::IPA_ACTION_V4L2_SET_STAGGERED: {\n \t\tconst ControlList &controls = action.controls[0];\n \t\tif (!staggeredCtrl_.set(controls))\n \t\t\tLOG(RPI, Error) << \"V4L2 staggered set failed\";\n \t\tgoto done;\n \t}\n \n-\tcase RPI_IPA_ACTION_V4L2_SET_ISP: {\n+\tcase RPi::IPA_ACTION_V4L2_SET_ISP: {\n \t\tControlList controls = action.controls[0];\n \t\tisp_[Isp::Input].dev()->setControls(&controls);\n \t\tgoto done;\n@@ -1092,7 +1092,7 @@ void RPiCameraData::queueFrameAction([[maybe_unused]] unsigned int frame,\n \t * is in a stopped state.\n \t */\n \tswitch (action.operation) {\n-\tcase RPI_IPA_ACTION_STATS_METADATA_COMPLETE: {\n+\tcase RPi::IPA_ACTION_STATS_METADATA_COMPLETE: {\n \t\tunsigned int bufferId = action.data[0];\n \t\tFrameBuffer *buffer = isp_[Isp::Stats].getBuffers().at(bufferId);\n \n@@ -1103,14 +1103,14 @@ void RPiCameraData::queueFrameAction([[maybe_unused]] unsigned int frame,\n \t\tbreak;\n \t}\n \n-\tcase RPI_IPA_ACTION_EMBEDDED_COMPLETE: {\n+\tcase RPi::IPA_ACTION_EMBEDDED_COMPLETE: {\n \t\tunsigned int bufferId = action.data[0];\n \t\tFrameBuffer *buffer = unicam_[Unicam::Embedded].getBuffers().at(bufferId);\n \t\thandleStreamBuffer(buffer, &unicam_[Unicam::Embedded]);\n \t\tbreak;\n \t}\n \n-\tcase RPI_IPA_ACTION_RUN_ISP: {\n+\tcase RPi::IPA_ACTION_RUN_ISP: {\n \t\tunsigned int bufferId = action.data[0];\n \t\tFrameBuffer *buffer = unicam_[Unicam::Image].getBuffers().at(bufferId);\n \n@@ -1228,8 +1228,8 @@ void RPiCameraData::ispOutputDequeue(FrameBuffer *buffer)\n \t */\n \tif (stream == &isp_[Isp::Stats]) {\n \t\tIPAOperationData op;\n-\t\top.operation = RPI_IPA_EVENT_SIGNAL_STAT_READY;\n-\t\top.data = { RPiBufferMask::STATS | static_cast<unsigned int>(index) };\n+\t\top.operation = RPi::IPA_EVENT_SIGNAL_STAT_READY;\n+\t\top.data = { RPi::BufferMask::STATS | static_cast<unsigned int>(index) };\n \t\tipa_->processEvent(op);\n \t} else {\n \t\t/* Any other ISP output can be handed back to the application now. */\n@@ -1334,7 +1334,7 @@ void RPiCameraData::handleExternalBuffer(FrameBuffer *buffer, RPi::Stream *strea\n {\n \tunsigned int id = stream->getBufferId(buffer);\n \n-\tif (!(id & RPiBufferMask::EXTERNAL_BUFFER))\n+\tif (!(id & RPi::BufferMask::EXTERNAL_BUFFER))\n \t\treturn;\n \n \t/* Stop the Stream object from tracking the buffer. */\n@@ -1454,7 +1454,7 @@ void RPiCameraData::tryRunPipeline()\n \t * queue the ISP output buffer listed in the request to start the HW\n \t * pipeline.\n \t */\n-\top.operation = RPI_IPA_EVENT_QUEUE_REQUEST;\n+\top.operation = RPi::IPA_EVENT_QUEUE_REQUEST;\n \top.controls = { request->controls() };\n \tipa_->processEvent(op);\n \n@@ -1468,13 +1468,13 @@ void RPiCameraData::tryRunPipeline()\n \tunsigned int bayerId = unicam_[Unicam::Image].getBufferId(bayerBuffer);\n \tunsigned int embeddedId = unicam_[Unicam::Embedded].getBufferId(embeddedBuffer);\n \n-\tLOG(RPI, Debug) << \"Signalling RPI_IPA_EVENT_SIGNAL_ISP_PREPARE:\"\n+\tLOG(RPI, Debug) << \"Signalling RPi::IPA_EVENT_SIGNAL_ISP_PREPARE:\"\n \t\t\t<< \" Bayer buffer id: \" << bayerId\n \t\t\t<< \" Embedded buffer id: \" << embeddedId;\n \n-\top.operation = RPI_IPA_EVENT_SIGNAL_ISP_PREPARE;\n-\top.data = { RPiBufferMask::EMBEDDED_DATA | embeddedId,\n-\t\t RPiBufferMask::BAYER_DATA | bayerId };\n+\top.operation = RPi::IPA_EVENT_SIGNAL_ISP_PREPARE;\n+\top.data = { RPi::BufferMask::EMBEDDED_DATA | embeddedId,\n+\t\t RPi::BufferMask::BAYER_DATA | bayerId };\n \tipa_->processEvent(op);\n }\n \ndiff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\nindex 3ee859e9..1a42cc17 100644\n--- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n@@ -70,7 +70,7 @@ int Stream::getBufferId(FrameBuffer *buffer) const\n \n void Stream::setExternalBuffer(FrameBuffer *buffer)\n {\n-\tbufferMap_.emplace(RPiBufferMask::EXTERNAL_BUFFER | id_.get(), buffer);\n+\tbufferMap_.emplace(RPi::BufferMask::EXTERNAL_BUFFER | id_.get(), buffer);\n }\n \n void Stream::removeExternalBuffer(FrameBuffer *buffer)\n@@ -78,7 +78,7 @@ void Stream::removeExternalBuffer(FrameBuffer *buffer)\n \tint id = getBufferId(buffer);\n \n \t/* Ensure we have this buffer in the stream, and it is marked external. */\n-\tASSERT(id != -1 && (id & RPiBufferMask::EXTERNAL_BUFFER));\n+\tASSERT(id != -1 && (id & RPi::BufferMask::EXTERNAL_BUFFER));\n \tbufferMap_.erase(id);\n }\n \ndiff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/raspberrypi/rpi_stream.h\nindex cb097e1c..0b502f64 100644\n--- a/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n+++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n@@ -31,13 +31,13 @@ class Stream : public libcamera::Stream\n {\n public:\n \tStream()\n-\t\t: id_(RPiBufferMask::ID)\n+\t\t: id_(RPi::BufferMask::ID)\n \t{\n \t}\n \n \tStream(const char *name, MediaEntity *dev, bool importOnly = false)\n \t\t: external_(false), importOnly_(importOnly), name_(name),\n-\t\t dev_(std::make_unique<V4L2VideoDevice>(dev)), id_(RPiBufferMask::ID)\n+\t\t dev_(std::make_unique<V4L2VideoDevice>(dev)), id_(RPi::BufferMask::ID)\n \t{\n \t}\n \n", "prefixes": [ "libcamera-devel", "2/4" ] }