{"id":16764,"url":"https://patchwork.libcamera.org/api/patches/16764/?format=json","web_url":"https://patchwork.libcamera.org/patch/16764/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220725134639.4572-13-naush@raspberrypi.com>","date":"2022-07-25T13:46:36","name":"[libcamera-devel,12/15] ipa: raspberrypi: Remove extern \"C\" declarations","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"0aa8c6bc66ef20c6583bc8701377af5fdff95f92","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16764/mbox/","series":[{"id":3323,"url":"https://patchwork.libcamera.org/api/series/3323/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3323","date":"2022-07-25T13:46:24","name":"Raspberry Pi IPA code refactor","version":1,"mbox":"https://patchwork.libcamera.org/series/3323/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16764/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16764/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 45598C3275\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 25 Jul 2022 13:47:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0467763334;\n\tMon, 25 Jul 2022 15:47:00 +0200 (CEST)","from mail-wm1-x329.google.com (mail-wm1-x329.google.com\n\t[IPv6:2a00:1450:4864:20::329])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 26D3B6332A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 25 Jul 2022 15:46:54 +0200 (CEST)","by mail-wm1-x329.google.com with SMTP id v5so6858653wmj.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 25 Jul 2022 06:46:54 -0700 (PDT)","from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\ta20-20020a05600c225400b003a32167b8d4sm18054320wmm.13.2022.07.25.06.46.52\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 25 Jul 2022 06:46:52 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658756820;\n\tbh=ICJUk2o2oJnqSilwj0nt1rOSRkrZoOOhrAdqUYXM4Sg=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=sij0oEo+tFg+xBWE10r+EfYuaUYkVzMkqLcjbmhFEEXMK+lav7HyLdNHtFimWFsrK\n\tt/ldK08fVdNyUzlK+xrEBhFMQoA1+4Xjw0lXBZI0xDQ/1jJxx6CdJ1FlXnU5EArc1X\n\tb+BUTTuB0rjDbWUaClt+5mCqIjS/mTWNKx/lOt3S47iN8gmveBNfN3Xr8/rVbH90RL\n\tTrMT84dr28qSrX3O5XDdJ8CxiRf02q16+eeEOt+0xi4E5PyE7S1ktd/yrUopXVeHgu\n\toVbZJGh0L5bllD1J8y3FO7Lz73nX3AKvvrvu8Ade3SS4lHr7xsSdjahLnPT52lF0b4\n\tom2ToAB4JXXbg==","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=0uqRKAosCavxIb8pdLuYhk4+6H7yktRiEYKUOQ5K9HQ=;\n\tb=ooPTWHAoIEluaMy+volm6ZrZzm91+l3hNuLw6QtksbDiChmZ5wsE+se2Kcjzum7diS\n\tyd0/NiwvYeipwOikTtlPK6zdUEQspWRGY5/mFVNb0ks7LSWoxa8C8s31lNwmjVFtfPMn\n\tdwfcDXiYU73ZNj++xMjqR9ZgNxNtR4DxTMElZsFAoy5DGy11nvFLtqx1nnPqr2z+n1ax\n\t9F7ngFEZWi5CWb73bi+SIeD+DHiltlcUGwsVqJYBI38mbllLJQ/yfk01XuawZGxl6qVb\n\tW+oETO7r8w3t88XMpsgClyTsCNTmPg0wrsRyCLh5VeKKG5vG0RzFkl3F6dvCMyMRC1VI\n\tnI/g=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"ooPTWHAo\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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=0uqRKAosCavxIb8pdLuYhk4+6H7yktRiEYKUOQ5K9HQ=;\n\tb=Pk2nScQzSAnJJP2GRIqdz/Z3kiJXE2SxtHIU90w4YZeRJEb5y6Fb6ZVXO3zmieL5t0\n\tu9Plug9vHdScYPJg8KIt/xekpexqy8X9kj3BBHAto1SJWVtFsZdIF7TfKScRrRnelTId\n\t/KW/qppak7J1TLb5l/Clnp/Bd3oiUK88EKomOOpmhQAnrUVPFZjcxPVL0EmD8Muuy6Zt\n\t8KQTYRK/EVj5bNwhlhiwaC7IF9UpbQriVDYxqqnHcQ4WyYtTe0jsrzX+Qxt97hWWJLev\n\tlgkKuxFMQifIahmOVQEFeAOOTw4lB3rocymygJ9rGdnFLxrzSs3TRRqIQ44DikaQjiCF\n\t7NyA==","X-Gm-Message-State":"AJIora/zdhOUY8W/29zdlvLzIEIjx+y62xI+yQCaA8xFgnM8PJLguWMr\n\tqhB9fbD54/CKIrKssaBnfA+S3avWTJCj8g==","X-Google-Smtp-Source":"AGRyM1tgVI2SaVouKr4MAZf3Z7eWgRdUErId785ndtze1JS91bwqtR94OnssaSCvK26KYFeNIYgnYQ==","X-Received":"by 2002:a05:600c:358d:b0:3a3:3819:c07 with SMTP id\n\tp13-20020a05600c358d00b003a338190c07mr14439842wmq.76.1658756812830; \n\tMon, 25 Jul 2022 06:46:52 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 25 Jul 2022 14:46:36 +0100","Message-Id":"<20220725134639.4572-13-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20220725134639.4572-1-naush@raspberrypi.com>","References":"<20220725134639.4572-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 12/15] ipa: raspberrypi: Remove extern \"C\"\n\tdeclarations","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>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Since the controller header files are now C++ specific, remove the extern \"C\"\ndeclarations.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/raspberrypi/controller/agc_status.h         | 8 --------\n src/ipa/raspberrypi/controller/alsc_status.h        | 8 --------\n src/ipa/raspberrypi/controller/awb_status.h         | 8 --------\n src/ipa/raspberrypi/controller/black_level_status.h | 8 --------\n src/ipa/raspberrypi/controller/camera_mode.h        | 8 --------\n src/ipa/raspberrypi/controller/ccm_status.h         | 8 --------\n src/ipa/raspberrypi/controller/contrast_status.h    | 8 --------\n src/ipa/raspberrypi/controller/denoise_status.h     | 8 --------\n src/ipa/raspberrypi/controller/dpc_status.h         | 8 --------\n src/ipa/raspberrypi/controller/focus_status.h       | 8 --------\n src/ipa/raspberrypi/controller/geq_status.h         | 8 --------\n src/ipa/raspberrypi/controller/lux_status.h         | 8 --------\n src/ipa/raspberrypi/controller/noise_status.h       | 8 --------\n src/ipa/raspberrypi/controller/sharpen_status.h     | 8 --------\n 14 files changed, 112 deletions(-)","diff":"diff --git a/src/ipa/raspberrypi/controller/agc_status.h b/src/ipa/raspberrypi/controller/agc_status.h\nindex 6723bc9e8200..e9174667476f 100644\n--- a/src/ipa/raspberrypi/controller/agc_status.h\n+++ b/src/ipa/raspberrypi/controller/agc_status.h\n@@ -13,10 +13,6 @@\n  * \"agc.status\" metadata.\n  */\n \n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif\n-\n /*\n  * Note: total_exposure_value will be reported as zero until the algorithm has\n  * seen statistics and calculated meaningful values. The contents should be\n@@ -39,7 +35,3 @@ struct AgcStatus {\n \tdouble digitalGain;\n \tint locked;\n };\n-\n-#ifdef __cplusplus\n-}\n-#endif\ndiff --git a/src/ipa/raspberrypi/controller/alsc_status.h b/src/ipa/raspberrypi/controller/alsc_status.h\nindex e074f9359faa..d7122f5190ce 100644\n--- a/src/ipa/raspberrypi/controller/alsc_status.h\n+++ b/src/ipa/raspberrypi/controller/alsc_status.h\n@@ -11,10 +11,6 @@\n  * \"alsc.status\" metadata.\n  */\n \n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif\n-\n #define ALSC_CELLS_X 16\n #define ALSC_CELLS_Y 12\n \n@@ -23,7 +19,3 @@ struct AlscStatus {\n \tdouble g[ALSC_CELLS_Y][ALSC_CELLS_X];\n \tdouble b[ALSC_CELLS_Y][ALSC_CELLS_X];\n };\n-\n-#ifdef __cplusplus\n-}\n-#endif\ndiff --git a/src/ipa/raspberrypi/controller/awb_status.h b/src/ipa/raspberrypi/controller/awb_status.h\nindex 2f6e88ef6e7f..353906f8aefd 100644\n--- a/src/ipa/raspberrypi/controller/awb_status.h\n+++ b/src/ipa/raspberrypi/controller/awb_status.h\n@@ -11,10 +11,6 @@\n  * under the tag \"awb.status\".\n  */\n \n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif\n-\n struct AwbStatus {\n \tchar mode[32];\n \tdouble temperatureK;\n@@ -22,7 +18,3 @@ struct AwbStatus {\n \tdouble gainG;\n \tdouble gainB;\n };\n-\n-#ifdef __cplusplus\n-}\n-#endif\ndiff --git a/src/ipa/raspberrypi/controller/black_level_status.h b/src/ipa/raspberrypi/controller/black_level_status.h\nindex ad83ddad5283..94517c7c6cda 100644\n--- a/src/ipa/raspberrypi/controller/black_level_status.h\n+++ b/src/ipa/raspberrypi/controller/black_level_status.h\n@@ -8,16 +8,8 @@\n \n /* The \"black level\" algorithm stores the black levels to use. */\n \n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif\n-\n struct BlackLevelStatus {\n \tuint16_t black_level_r; /* out of 16 bits */\n \tuint16_t black_level_g;\n \tuint16_t black_level_b;\n };\n-\n-#ifdef __cplusplus\n-}\n-#endif\ndiff --git a/src/ipa/raspberrypi/controller/camera_mode.h b/src/ipa/raspberrypi/controller/camera_mode.h\nindex 47a0fea424ca..6e1597d23a28 100644\n--- a/src/ipa/raspberrypi/controller/camera_mode.h\n+++ b/src/ipa/raspberrypi/controller/camera_mode.h\n@@ -16,10 +16,6 @@\n  * including binning, scaling, cropping etc.\n  */\n \n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif\n-\n #define CAMERA_MODE_NAME_LEN 32\n \n struct CameraMode {\n@@ -46,7 +42,3 @@ struct CameraMode {\n \t/* sensitivity of this mode */\n \tdouble sensitivity;\n };\n-\n-#ifdef __cplusplus\n-}\n-#endif\ndiff --git a/src/ipa/raspberrypi/controller/ccm_status.h b/src/ipa/raspberrypi/controller/ccm_status.h\nindex 4cdd8bed0311..44471d0ef901 100644\n--- a/src/ipa/raspberrypi/controller/ccm_status.h\n+++ b/src/ipa/raspberrypi/controller/ccm_status.h\n@@ -8,15 +8,7 @@\n \n /* The \"ccm\" algorithm generates an appropriate colour matrix. */\n \n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif\n-\n struct CcmStatus {\n \tdouble matrix[9];\n \tdouble saturation;\n };\n-\n-#ifdef __cplusplus\n-}\n-#endif\ndiff --git a/src/ipa/raspberrypi/controller/contrast_status.h b/src/ipa/raspberrypi/controller/contrast_status.h\nindex 5eb084f78e71..88152575288f 100644\n--- a/src/ipa/raspberrypi/controller/contrast_status.h\n+++ b/src/ipa/raspberrypi/controller/contrast_status.h\n@@ -11,10 +11,6 @@\n  * of contrast stretching based on the AGC histogram.\n  */\n \n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif\n-\n #define CONTRAST_NUM_POINTS 33\n \n struct ContrastPoint {\n@@ -27,7 +23,3 @@ struct ContrastStatus {\n \tdouble brightness;\n \tdouble contrast;\n };\n-\n-#ifdef __cplusplus\n-}\n-#endif\ndiff --git a/src/ipa/raspberrypi/controller/denoise_status.h b/src/ipa/raspberrypi/controller/denoise_status.h\nindex a41e7e89c428..6ac2fb404bb4 100644\n--- a/src/ipa/raspberrypi/controller/denoise_status.h\n+++ b/src/ipa/raspberrypi/controller/denoise_status.h\n@@ -8,17 +8,9 @@\n \n /* This stores the parameters required for Denoise. */\n \n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif\n-\n struct DenoiseStatus {\n \tdouble noise_constant;\n \tdouble noise_slope;\n \tdouble strength;\n \tunsigned int mode;\n };\n-\n-#ifdef __cplusplus\n-}\n-#endif\ndiff --git a/src/ipa/raspberrypi/controller/dpc_status.h b/src/ipa/raspberrypi/controller/dpc_status.h\nindex c99ad8c500a6..685ffc7b91b5 100644\n--- a/src/ipa/raspberrypi/controller/dpc_status.h\n+++ b/src/ipa/raspberrypi/controller/dpc_status.h\n@@ -8,14 +8,6 @@\n \n /* The \"DPC\" algorithm sets defective pixel correction strength. */\n \n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif\n-\n struct DpcStatus {\n \tint strength; /* 0 = \"off\", 1 = \"normal\", 2 = \"strong\" */\n };\n-\n-#ifdef __cplusplus\n-}\n-#endif\ndiff --git a/src/ipa/raspberrypi/controller/focus_status.h b/src/ipa/raspberrypi/controller/focus_status.h\nindex c75795dc0621..f0dbe4e2c4a2 100644\n--- a/src/ipa/raspberrypi/controller/focus_status.h\n+++ b/src/ipa/raspberrypi/controller/focus_status.h\n@@ -14,15 +14,7 @@\n  * measurements, it's not driving any kind of auto-focus algorithm!\n  */\n \n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif\n-\n struct FocusStatus {\n \tunsigned int num;\n \tuint32_t focusMeasures[FOCUS_REGIONS];\n };\n-\n-#ifdef __cplusplus\n-}\n-#endif\ndiff --git a/src/ipa/raspberrypi/controller/geq_status.h b/src/ipa/raspberrypi/controller/geq_status.h\nindex 0ebb7ce71d5b..791f34ca2e52 100644\n--- a/src/ipa/raspberrypi/controller/geq_status.h\n+++ b/src/ipa/raspberrypi/controller/geq_status.h\n@@ -8,15 +8,7 @@\n \n /* The \"GEQ\" algorithm calculates the green equalisation thresholds */\n \n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif\n-\n struct GeqStatus {\n \tuint16_t offset;\n \tdouble slope;\n };\n-\n-#ifdef __cplusplus\n-}\n-#endif\ndiff --git a/src/ipa/raspberrypi/controller/lux_status.h b/src/ipa/raspberrypi/controller/lux_status.h\nindex c1134bec3694..cd5ed473c10d 100644\n--- a/src/ipa/raspberrypi/controller/lux_status.h\n+++ b/src/ipa/raspberrypi/controller/lux_status.h\n@@ -17,15 +17,7 @@\n  * (presumably meaningless) value in the image metadata.\n  */\n \n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif\n-\n struct LuxStatus {\n \tdouble lux;\n \tdouble aperture;\n };\n-\n-#ifdef __cplusplus\n-}\n-#endif\ndiff --git a/src/ipa/raspberrypi/controller/noise_status.h b/src/ipa/raspberrypi/controller/noise_status.h\nindex 60b995f4fa4f..67cf63e5f70c 100644\n--- a/src/ipa/raspberrypi/controller/noise_status.h\n+++ b/src/ipa/raspberrypi/controller/noise_status.h\n@@ -8,15 +8,7 @@\n \n /* The \"noise\" algorithm stores an estimate of the noise profile for this image. */\n \n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif\n-\n struct NoiseStatus {\n \tdouble noise_constant;\n \tdouble noise_slope;\n };\n-\n-#ifdef __cplusplus\n-}\n-#endif\ndiff --git a/src/ipa/raspberrypi/controller/sharpen_status.h b/src/ipa/raspberrypi/controller/sharpen_status.h\nindex 5ea21ab23f91..c66eaa73af3b 100644\n--- a/src/ipa/raspberrypi/controller/sharpen_status.h\n+++ b/src/ipa/raspberrypi/controller/sharpen_status.h\n@@ -8,10 +8,6 @@\n \n /* The \"sharpen\" algorithm stores the strength to use. */\n \n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif\n-\n struct SharpenStatus {\n \t/* controls the smallest level of detail (or noise!) that sharpening will pick up */\n \tdouble threshold;\n@@ -22,7 +18,3 @@ struct SharpenStatus {\n \t/* The sharpening strength requested by the user or application. */\n \tdouble userStrength;\n };\n-\n-#ifdef __cplusplus\n-}\n-#endif\n","prefixes":["libcamera-devel","12/15"]}