[{"id":12648,"web_url":"https://patchwork.libcamera.org/comment/12648/","msgid":"<20200923074744.tlmclzt6gpnypds6@uno.localdomain>","date":"2020-09-23T07:47:44","subject":"Re: [libcamera-devel] [PATCH 2/4] ipa: raspberrypi: Move IPA\n\tparameters to the RPi namespace","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Naush,\n\nOn Tue, Sep 22, 2020 at 10:50:16AM +0100, Naushir Patuck wrote:\n> All IPA related types/params are now moved to the RPi namespace.\n>\n> There are no functional changes in this commit.\n>\n> Signed-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(-)\n>\n> diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\n> index 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__ */\n> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> index 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\nIs the leading :: required by the compiler ? isn't the IPA in the\nlibcamera namespace already ?\n\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}\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 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>\n> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> index 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>\n> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> index 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> --\n> 2.25.1\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 975E7C3B5C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Sep 2020 07:43:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 11CD962FDF;\n\tWed, 23 Sep 2020 09:43:53 +0200 (CEST)","from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6805860363\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Sep 2020 09:43:52 +0200 (CEST)","from uno.localdomain (93-34-118-233.ip49.fastwebnet.it\n\t[93.34.118.233]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id CA57D20000E;\n\tWed, 23 Sep 2020 07:43:51 +0000 (UTC)"],"Date":"Wed, 23 Sep 2020 09:47:44 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<20200923074744.tlmclzt6gpnypds6@uno.localdomain>","References":"<20200922095018.68434-1-naush@raspberrypi.com>\n\t<20200922095018.68434-3-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200922095018.68434-3-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 2/4] ipa: raspberrypi: Move IPA\n\tparameters to 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>","Cc":"libcamera-devel@lists.libcamera.org","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>"}},{"id":12649,"web_url":"https://patchwork.libcamera.org/comment/12649/","msgid":"<20200923075416.7jnqrtd5pj3mfe4j@uno.localdomain>","date":"2020-09-23T07:54:16","subject":"Re: [libcamera-devel] [PATCH 2/4] ipa: raspberrypi: Move IPA\n\tparameters to the RPi namespace","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Jacopo\n\nOn Wed, Sep 23, 2020 at 09:47:44AM +0200, Jacopo Mondi wrote:\n> Hi Naush,\n>\n> On Tue, Sep 22, 2020 at 10:50:16AM +0100, Naushir Patuck wrote:\n> > All IPA related types/params are now moved to the RPi namespace.\n> >\n> > There are no functional changes in this commit.\n> >\n> > Signed-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(-)\n> >\n> > diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\n> > index 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__ */\n> > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> > index 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>\n> Is the leading :: required by the compiler ? isn't the IPA in the\n> libcamera namespace already ?\n\nSee the next patch!\nThe leading :: serves to differentiate the 'RPi' namespace from the\n'libcamera::RPi' one\n\nIf you were to resend, I would rename the ::RPi namespace first, then\nmove the IPA types in the libcamera::RPi one.\n\nAnyway:\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n  j\n\n>\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}\n> > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > index 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> >\n> > diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> > index 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> >\n> > diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> > index 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> > --\n> > 2.25.1\n> >\n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel\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 CD5F2C3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Sep 2020 07:50:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 470AD62FDC;\n\tWed, 23 Sep 2020 09:50:24 +0200 (CEST)","from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E2FE060363\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Sep 2020 09:50:23 +0200 (CEST)","from uno.localdomain (93-34-118-233.ip49.fastwebnet.it\n\t[93.34.118.233]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 65DDA4000E;\n\tWed, 23 Sep 2020 07:50:22 +0000 (UTC)"],"X-Originating-IP":"93.34.118.233","Date":"Wed, 23 Sep 2020 09:54:16 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<20200923075416.7jnqrtd5pj3mfe4j@uno.localdomain>","References":"<20200922095018.68434-1-naush@raspberrypi.com>\n\t<20200922095018.68434-3-naush@raspberrypi.com>\n\t<20200923074744.tlmclzt6gpnypds6@uno.localdomain>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200923074744.tlmclzt6gpnypds6@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH 2/4] ipa: raspberrypi: Move IPA\n\tparameters to 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>","Cc":"libcamera-devel@lists.libcamera.org","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>"}}]