[libcamera-devel,12/15] ipa: raspberrypi: Remove extern "C" declarations
diff mbox series

Message ID 20220725134639.4572-13-naush@raspberrypi.com
State Superseded
Headers show
Series
  • Raspberry Pi IPA code refactor
Related show

Commit Message

Naushir Patuck July 25, 2022, 1:46 p.m. UTC
Since the controller header files are now C++ specific, remove the extern "C"
declarations.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
 src/ipa/raspberrypi/controller/agc_status.h         | 8 --------
 src/ipa/raspberrypi/controller/alsc_status.h        | 8 --------
 src/ipa/raspberrypi/controller/awb_status.h         | 8 --------
 src/ipa/raspberrypi/controller/black_level_status.h | 8 --------
 src/ipa/raspberrypi/controller/camera_mode.h        | 8 --------
 src/ipa/raspberrypi/controller/ccm_status.h         | 8 --------
 src/ipa/raspberrypi/controller/contrast_status.h    | 8 --------
 src/ipa/raspberrypi/controller/denoise_status.h     | 8 --------
 src/ipa/raspberrypi/controller/dpc_status.h         | 8 --------
 src/ipa/raspberrypi/controller/focus_status.h       | 8 --------
 src/ipa/raspberrypi/controller/geq_status.h         | 8 --------
 src/ipa/raspberrypi/controller/lux_status.h         | 8 --------
 src/ipa/raspberrypi/controller/noise_status.h       | 8 --------
 src/ipa/raspberrypi/controller/sharpen_status.h     | 8 --------
 14 files changed, 112 deletions(-)

Comments

Laurent Pinchart July 25, 2022, 8:59 p.m. UTC | #1
Hi Naush,

Thank you for the patch.

On Mon, Jul 25, 2022 at 02:46:36PM +0100, Naushir Patuck via libcamera-devel wrote:
> Since the controller header files are now C++ specific, remove the extern "C"
> declarations.
> 
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/ipa/raspberrypi/controller/agc_status.h         | 8 --------
>  src/ipa/raspberrypi/controller/alsc_status.h        | 8 --------
>  src/ipa/raspberrypi/controller/awb_status.h         | 8 --------
>  src/ipa/raspberrypi/controller/black_level_status.h | 8 --------
>  src/ipa/raspberrypi/controller/camera_mode.h        | 8 --------
>  src/ipa/raspberrypi/controller/ccm_status.h         | 8 --------
>  src/ipa/raspberrypi/controller/contrast_status.h    | 8 --------
>  src/ipa/raspberrypi/controller/denoise_status.h     | 8 --------
>  src/ipa/raspberrypi/controller/dpc_status.h         | 8 --------
>  src/ipa/raspberrypi/controller/focus_status.h       | 8 --------
>  src/ipa/raspberrypi/controller/geq_status.h         | 8 --------
>  src/ipa/raspberrypi/controller/lux_status.h         | 8 --------
>  src/ipa/raspberrypi/controller/noise_status.h       | 8 --------
>  src/ipa/raspberrypi/controller/sharpen_status.h     | 8 --------
>  14 files changed, 112 deletions(-)

[snip]

Patch
diff mbox series

diff --git a/src/ipa/raspberrypi/controller/agc_status.h b/src/ipa/raspberrypi/controller/agc_status.h
index 6723bc9e8200..e9174667476f 100644
--- a/src/ipa/raspberrypi/controller/agc_status.h
+++ b/src/ipa/raspberrypi/controller/agc_status.h
@@ -13,10 +13,6 @@ 
  * "agc.status" metadata.
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*
  * Note: total_exposure_value will be reported as zero until the algorithm has
  * seen statistics and calculated meaningful values. The contents should be
@@ -39,7 +35,3 @@  struct AgcStatus {
 	double digitalGain;
 	int locked;
 };
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/ipa/raspberrypi/controller/alsc_status.h b/src/ipa/raspberrypi/controller/alsc_status.h
index e074f9359faa..d7122f5190ce 100644
--- a/src/ipa/raspberrypi/controller/alsc_status.h
+++ b/src/ipa/raspberrypi/controller/alsc_status.h
@@ -11,10 +11,6 @@ 
  * "alsc.status" metadata.
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define ALSC_CELLS_X 16
 #define ALSC_CELLS_Y 12
 
@@ -23,7 +19,3 @@  struct AlscStatus {
 	double g[ALSC_CELLS_Y][ALSC_CELLS_X];
 	double b[ALSC_CELLS_Y][ALSC_CELLS_X];
 };
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/ipa/raspberrypi/controller/awb_status.h b/src/ipa/raspberrypi/controller/awb_status.h
index 2f6e88ef6e7f..353906f8aefd 100644
--- a/src/ipa/raspberrypi/controller/awb_status.h
+++ b/src/ipa/raspberrypi/controller/awb_status.h
@@ -11,10 +11,6 @@ 
  * under the tag "awb.status".
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct AwbStatus {
 	char mode[32];
 	double temperatureK;
@@ -22,7 +18,3 @@  struct AwbStatus {
 	double gainG;
 	double gainB;
 };
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/ipa/raspberrypi/controller/black_level_status.h b/src/ipa/raspberrypi/controller/black_level_status.h
index ad83ddad5283..94517c7c6cda 100644
--- a/src/ipa/raspberrypi/controller/black_level_status.h
+++ b/src/ipa/raspberrypi/controller/black_level_status.h
@@ -8,16 +8,8 @@ 
 
 /* The "black level" algorithm stores the black levels to use. */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct BlackLevelStatus {
 	uint16_t black_level_r; /* out of 16 bits */
 	uint16_t black_level_g;
 	uint16_t black_level_b;
 };
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/ipa/raspberrypi/controller/camera_mode.h b/src/ipa/raspberrypi/controller/camera_mode.h
index 47a0fea424ca..6e1597d23a28 100644
--- a/src/ipa/raspberrypi/controller/camera_mode.h
+++ b/src/ipa/raspberrypi/controller/camera_mode.h
@@ -16,10 +16,6 @@ 
  * including binning, scaling, cropping etc.
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define CAMERA_MODE_NAME_LEN 32
 
 struct CameraMode {
@@ -46,7 +42,3 @@  struct CameraMode {
 	/* sensitivity of this mode */
 	double sensitivity;
 };
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/ipa/raspberrypi/controller/ccm_status.h b/src/ipa/raspberrypi/controller/ccm_status.h
index 4cdd8bed0311..44471d0ef901 100644
--- a/src/ipa/raspberrypi/controller/ccm_status.h
+++ b/src/ipa/raspberrypi/controller/ccm_status.h
@@ -8,15 +8,7 @@ 
 
 /* The "ccm" algorithm generates an appropriate colour matrix. */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct CcmStatus {
 	double matrix[9];
 	double saturation;
 };
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/ipa/raspberrypi/controller/contrast_status.h b/src/ipa/raspberrypi/controller/contrast_status.h
index 5eb084f78e71..88152575288f 100644
--- a/src/ipa/raspberrypi/controller/contrast_status.h
+++ b/src/ipa/raspberrypi/controller/contrast_status.h
@@ -11,10 +11,6 @@ 
  * of contrast stretching based on the AGC histogram.
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define CONTRAST_NUM_POINTS 33
 
 struct ContrastPoint {
@@ -27,7 +23,3 @@  struct ContrastStatus {
 	double brightness;
 	double contrast;
 };
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/ipa/raspberrypi/controller/denoise_status.h b/src/ipa/raspberrypi/controller/denoise_status.h
index a41e7e89c428..6ac2fb404bb4 100644
--- a/src/ipa/raspberrypi/controller/denoise_status.h
+++ b/src/ipa/raspberrypi/controller/denoise_status.h
@@ -8,17 +8,9 @@ 
 
 /* This stores the parameters required for Denoise. */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct DenoiseStatus {
 	double noise_constant;
 	double noise_slope;
 	double strength;
 	unsigned int mode;
 };
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/ipa/raspberrypi/controller/dpc_status.h b/src/ipa/raspberrypi/controller/dpc_status.h
index c99ad8c500a6..685ffc7b91b5 100644
--- a/src/ipa/raspberrypi/controller/dpc_status.h
+++ b/src/ipa/raspberrypi/controller/dpc_status.h
@@ -8,14 +8,6 @@ 
 
 /* The "DPC" algorithm sets defective pixel correction strength. */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct DpcStatus {
 	int strength; /* 0 = "off", 1 = "normal", 2 = "strong" */
 };
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/ipa/raspberrypi/controller/focus_status.h b/src/ipa/raspberrypi/controller/focus_status.h
index c75795dc0621..f0dbe4e2c4a2 100644
--- a/src/ipa/raspberrypi/controller/focus_status.h
+++ b/src/ipa/raspberrypi/controller/focus_status.h
@@ -14,15 +14,7 @@ 
  * measurements, it's not driving any kind of auto-focus algorithm!
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct FocusStatus {
 	unsigned int num;
 	uint32_t focusMeasures[FOCUS_REGIONS];
 };
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/ipa/raspberrypi/controller/geq_status.h b/src/ipa/raspberrypi/controller/geq_status.h
index 0ebb7ce71d5b..791f34ca2e52 100644
--- a/src/ipa/raspberrypi/controller/geq_status.h
+++ b/src/ipa/raspberrypi/controller/geq_status.h
@@ -8,15 +8,7 @@ 
 
 /* The "GEQ" algorithm calculates the green equalisation thresholds */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct GeqStatus {
 	uint16_t offset;
 	double slope;
 };
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/ipa/raspberrypi/controller/lux_status.h b/src/ipa/raspberrypi/controller/lux_status.h
index c1134bec3694..cd5ed473c10d 100644
--- a/src/ipa/raspberrypi/controller/lux_status.h
+++ b/src/ipa/raspberrypi/controller/lux_status.h
@@ -17,15 +17,7 @@ 
  * (presumably meaningless) value in the image metadata.
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct LuxStatus {
 	double lux;
 	double aperture;
 };
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/ipa/raspberrypi/controller/noise_status.h b/src/ipa/raspberrypi/controller/noise_status.h
index 60b995f4fa4f..67cf63e5f70c 100644
--- a/src/ipa/raspberrypi/controller/noise_status.h
+++ b/src/ipa/raspberrypi/controller/noise_status.h
@@ -8,15 +8,7 @@ 
 
 /* The "noise" algorithm stores an estimate of the noise profile for this image. */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct NoiseStatus {
 	double noise_constant;
 	double noise_slope;
 };
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/ipa/raspberrypi/controller/sharpen_status.h b/src/ipa/raspberrypi/controller/sharpen_status.h
index 5ea21ab23f91..c66eaa73af3b 100644
--- a/src/ipa/raspberrypi/controller/sharpen_status.h
+++ b/src/ipa/raspberrypi/controller/sharpen_status.h
@@ -8,10 +8,6 @@ 
 
 /* The "sharpen" algorithm stores the strength to use. */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct SharpenStatus {
 	/* controls the smallest level of detail (or noise!) that sharpening will pick up */
 	double threshold;
@@ -22,7 +18,3 @@  struct SharpenStatus {
 	/* The sharpening strength requested by the user or application. */
 	double userStrength;
 };
-
-#ifdef __cplusplus
-}
-#endif