[libcamera-devel,08/20] ipa: rpi: Add PiSP definitions to the Controller hardware description
diff mbox series

Message ID 20231006132000.23504-9-naush@raspberrypi.com
State Superseded
Headers show
Series
  • Raspberry Pi: Preliminary PiSP support
Related show

Commit Message

Naushir Patuck Oct. 6, 2023, 1:19 p.m. UTC
Add an entry to Controller::HardwareConfig describing the PiSP hardware
for the IPA and controller algorithms to use.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
---
 src/ipa/rpi/controller/controller.cpp | 15 +++++++++++++++
 src/ipa/rpi/controller/controller.h   |  1 +
 2 files changed, 16 insertions(+)

Comments

Jacopo Mondi Oct. 12, 2023, 8:30 a.m. UTC | #1
Hi Naush

On Fri, Oct 06, 2023 at 02:19:48PM +0100, Naushir Patuck via libcamera-devel wrote:
> Add an entry to Controller::HardwareConfig describing the PiSP hardware
> for the IPA and controller algorithms to use.
>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Thanks
  j

> ---
>  src/ipa/rpi/controller/controller.cpp | 15 +++++++++++++++
>  src/ipa/rpi/controller/controller.h   |  1 +
>  2 files changed, 16 insertions(+)
>
> diff --git a/src/ipa/rpi/controller/controller.cpp b/src/ipa/rpi/controller/controller.cpp
> index 4b6f82b41916..e62becd87e85 100644
> --- a/src/ipa/rpi/controller/controller.cpp
> +++ b/src/ipa/rpi/controller/controller.cpp
> @@ -31,6 +31,7 @@ static const std::map<std::string, Controller::HardwareConfig> HardwareConfigMap
>  			.agcRegions = { 15 , 1 },
>  			.agcZoneWeights = { 15 , 1 },
>  			.awbRegions = { 16, 12 },
> +			.cacRegions = { 0, 0 },
>  			.focusRegions = { 4, 3 },
>  			.numHistogramBins = 128,
>  			.numGammaPoints = 33,
> @@ -38,6 +39,20 @@ static const std::map<std::string, Controller::HardwareConfig> HardwareConfigMap
>  			.statsInline = false,
>  		}
>  	},
> +	{
> +		"pisp",
> +		{
> +			.agcRegions = { 0, 0 },
> +			.agcZoneWeights = { 15, 15 },
> +			.awbRegions = { 32, 32 },
> +			.cacRegions = { 8, 8 },
> +			.focusRegions = { 8, 8 },
> +			.numHistogramBins = 1024,
> +			.numGammaPoints = 64,
> +			.pipelineWidth = 16,
> +			.statsInline = true,
> +		}
> +	},
>  };
>
>  Controller::Controller()
> diff --git a/src/ipa/rpi/controller/controller.h b/src/ipa/rpi/controller/controller.h
> index a8bc61880ab4..6e5f595284fd 100644
> --- a/src/ipa/rpi/controller/controller.h
> +++ b/src/ipa/rpi/controller/controller.h
> @@ -41,6 +41,7 @@ public:
>  		libcamera::Size agcRegions;
>  		libcamera::Size agcZoneWeights;
>  		libcamera::Size awbRegions;
> +		libcamera::Size cacRegions;
>  		libcamera::Size focusRegions;
>  		unsigned int numHistogramBins;
>  		unsigned int numGammaPoints;
> --
> 2.34.1
>

Patch
diff mbox series

diff --git a/src/ipa/rpi/controller/controller.cpp b/src/ipa/rpi/controller/controller.cpp
index 4b6f82b41916..e62becd87e85 100644
--- a/src/ipa/rpi/controller/controller.cpp
+++ b/src/ipa/rpi/controller/controller.cpp
@@ -31,6 +31,7 @@  static const std::map<std::string, Controller::HardwareConfig> HardwareConfigMap
 			.agcRegions = { 15 , 1 },
 			.agcZoneWeights = { 15 , 1 },
 			.awbRegions = { 16, 12 },
+			.cacRegions = { 0, 0 },
 			.focusRegions = { 4, 3 },
 			.numHistogramBins = 128,
 			.numGammaPoints = 33,
@@ -38,6 +39,20 @@  static const std::map<std::string, Controller::HardwareConfig> HardwareConfigMap
 			.statsInline = false,
 		}
 	},
+	{
+		"pisp",
+		{
+			.agcRegions = { 0, 0 },
+			.agcZoneWeights = { 15, 15 },
+			.awbRegions = { 32, 32 },
+			.cacRegions = { 8, 8 },
+			.focusRegions = { 8, 8 },
+			.numHistogramBins = 1024,
+			.numGammaPoints = 64,
+			.pipelineWidth = 16,
+			.statsInline = true,
+		}
+	},
 };
 
 Controller::Controller()
diff --git a/src/ipa/rpi/controller/controller.h b/src/ipa/rpi/controller/controller.h
index a8bc61880ab4..6e5f595284fd 100644
--- a/src/ipa/rpi/controller/controller.h
+++ b/src/ipa/rpi/controller/controller.h
@@ -41,6 +41,7 @@  public:
 		libcamera::Size agcRegions;
 		libcamera::Size agcZoneWeights;
 		libcamera::Size awbRegions;
+		libcamera::Size cacRegions;
 		libcamera::Size focusRegions;
 		unsigned int numHistogramBins;
 		unsigned int numGammaPoints;