Show a patch.

GET /api/1.1/patches/13733/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 13733,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/13733/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/13733/",
    "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": "<20210907194107.803730-3-jacopo@jmondi.org>",
    "date": "2021-09-07T19:40:52",
    "name": "[libcamera-devel,v2,02/17] libcamera: ipu3: Centralize ImgU sizes definition",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "16fb981bd114b07c3616aa755c2300d6d1bf1e0e",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/13733/mbox/",
    "series": [
        {
            "id": 2492,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2492/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2492",
            "date": "2021-09-07T19:40:50",
            "name": "IPU3 control info update and HAL frame durations",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/2492/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/13733/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/13733/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 8D31CBDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  7 Sep 2021 19:40:31 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9EA2269177;\n\tTue,  7 Sep 2021 21:40:30 +0200 (CEST)",
            "from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[217.70.183.193])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F390F6916F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  7 Sep 2021 21:40:28 +0200 (CEST)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 7E7DF240005;\n\tTue,  7 Sep 2021 19:40:28 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  7 Sep 2021 21:40:52 +0200",
        "Message-Id": "<20210907194107.803730-3-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.32.0",
        "In-Reply-To": "<20210907194107.803730-1-jacopo@jmondi.org>",
        "References": "<20210907194107.803730-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 02/17] libcamera: ipu3: Centralize ImgU\n\tsizes definition",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The definition of several constants that describe the ImgU\ncharacteristics are spread between two files: ipu3.cpp and imgu.cpp.\n\nAs the ipu3.cpp uses definitions from the imgu.cpp one, in order to\nremove the usage of magic numbers, it is required to move the\ndefinitions to a common header file where they are accessible to the\nother .cpp modules.\n\nMove all the definitions of the ImgU sizes and alignment in a dedicated\nnamespace in imgu.h and update their users accordingly.\n\nCosmetic changes, no functional changes intended.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/ipu3/imgu.cpp | 86 +++++++++++-----------------\n src/libcamera/pipeline/ipu3/imgu.h   | 27 +++++++++\n src/libcamera/pipeline/ipu3/ipu3.cpp | 47 +++++++--------\n 3 files changed, 83 insertions(+), 77 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp\nindex 317e482a1498..441ff1b0705c 100644\n--- a/src/libcamera/pipeline/ipu3/imgu.cpp\n+++ b/src/libcamera/pipeline/ipu3/imgu.cpp\n@@ -34,22 +34,6 @@ namespace {\n  * at revision: 243d13446e44 (\"Fix some bug for some resolutions\")\n  */\n \n-static constexpr unsigned int FILTER_W = 4;\n-static constexpr unsigned int FILTER_H = 4;\n-\n-static constexpr unsigned int IF_ALIGN_W = 2;\n-static constexpr unsigned int IF_ALIGN_H = 4;\n-\n-static constexpr unsigned int BDS_ALIGN_W = 2;\n-static constexpr unsigned int BDS_ALIGN_H = 4;\n-\n-static constexpr unsigned int IF_CROP_MAX_W = 40;\n-static constexpr unsigned int IF_CROP_MAX_H = 540;\n-\n-static constexpr float BDS_SF_MAX = 2.5;\n-static constexpr float BDS_SF_MIN = 1.0;\n-static constexpr float BDS_SF_STEP = 0.03125;\n-\n /* BSD scaling factors: min=1, max=2.5, step=1/32 */\n const std::vector<float> bdsScalingFactors = {\n \t1, 1.03125, 1.0625, 1.09375, 1.125, 1.15625, 1.1875, 1.21875, 1.25,\n@@ -124,8 +108,8 @@ bool isSameRatio(const Size &in, const Size &out)\n void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc,\n \t\t\tunsigned int bdsWidth, float bdsSF)\n {\n-\tunsigned int minIFHeight = iif.height - IF_CROP_MAX_H;\n-\tunsigned int minBDSHeight = gdc.height + FILTER_H * 2;\n+\tunsigned int minIFHeight = iif.height - IMGU::IF_CROP_MAX_H;\n+\tunsigned int minBDSHeight = gdc.height + IMGU::FILTER_H * 2;\n \tunsigned int ifHeight;\n \tfloat bdsHeight;\n \n@@ -135,7 +119,7 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n \t\t\t\t    static_cast<float>(gdc.width);\n \t\testIFHeight = std::clamp<float>(estIFHeight, minIFHeight, iif.height);\n \n-\t\tifHeight = utils::alignUp(estIFHeight, IF_ALIGN_H);\n+\t\tifHeight = utils::alignUp(estIFHeight, IMGU::IF_ALIGN_H);\n \t\twhile (ifHeight >= minIFHeight && ifHeight <= iif.height &&\n \t\t       ifHeight / bdsSF >= minBDSHeight) {\n \n@@ -143,17 +127,17 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n \t\t\tif (std::fmod(height, 1.0) == 0) {\n \t\t\t\tunsigned int bdsIntHeight = static_cast<unsigned int>(height);\n \n-\t\t\t\tif (!(bdsIntHeight % BDS_ALIGN_H)) {\n+\t\t\t\tif (!(bdsIntHeight % IMGU::BDS_ALIGN_H)) {\n \t\t\t\t\tfoundIfHeight = ifHeight;\n \t\t\t\t\tbdsHeight = height;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \n-\t\t\tifHeight -= IF_ALIGN_H;\n+\t\t\tifHeight -= IMGU::IF_ALIGN_H;\n \t\t}\n \n-\t\tifHeight = utils::alignUp(estIFHeight, IF_ALIGN_H);\n+\t\tifHeight = utils::alignUp(estIFHeight, IMGU::IF_ALIGN_H);\n \t\twhile (ifHeight >= minIFHeight && ifHeight <= iif.height &&\n \t\t       ifHeight / bdsSF >= minBDSHeight) {\n \n@@ -161,14 +145,14 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n \t\t\tif (std::fmod(height, 1.0) == 0) {\n \t\t\t\tunsigned int bdsIntHeight = static_cast<unsigned int>(height);\n \n-\t\t\t\tif (!(bdsIntHeight % BDS_ALIGN_H)) {\n+\t\t\t\tif (!(bdsIntHeight % IMGU::BDS_ALIGN_H)) {\n \t\t\t\t\tfoundIfHeight = ifHeight;\n \t\t\t\t\tbdsHeight = height;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \n-\t\t\tifHeight += IF_ALIGN_H;\n+\t\t\tifHeight += IMGU::IF_ALIGN_H;\n \t\t}\n \n \t\tif (foundIfHeight) {\n@@ -179,32 +163,32 @@ void calculateBDSHeight(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc\n \t\t\treturn;\n \t\t}\n \t} else {\n-\t\tifHeight = utils::alignUp(iif.height, IF_ALIGN_H);\n+\t\tifHeight = utils::alignUp(iif.height, IMGU::IF_ALIGN_H);\n \t\twhile (ifHeight >= minIFHeight && ifHeight / bdsSF >= minBDSHeight) {\n \n \t\t\tbdsHeight = ifHeight / bdsSF;\n \t\t\tif (std::fmod(ifHeight, 1.0) == 0 && std::fmod(bdsHeight, 1.0) == 0) {\n \t\t\t\tunsigned int bdsIntHeight = static_cast<unsigned int>(bdsHeight);\n \n-\t\t\t\tif (!(ifHeight % IF_ALIGN_H) &&\n-\t\t\t\t    !(bdsIntHeight % BDS_ALIGN_H)) {\n+\t\t\t\tif (!(ifHeight % IMGU::IF_ALIGN_H) &&\n+\t\t\t\t    !(bdsIntHeight % IMGU::BDS_ALIGN_H)) {\n \t\t\t\t\tpipeConfigs.push_back({ bdsSF, { iif.width, ifHeight },\n \t\t\t\t\t\t\t\t{ bdsWidth, bdsIntHeight }, gdc });\n \t\t\t\t}\n \t\t\t}\n \n-\t\t\tifHeight -= IF_ALIGN_H;\n+\t\t\tifHeight -= IMGU::IF_ALIGN_H;\n \t\t}\n \t}\n }\n \n void calculateBDS(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc, float bdsSF)\n {\n-\tunsigned int minBDSWidth = gdc.width + FILTER_W * 2;\n-\tunsigned int minBDSHeight = gdc.height + FILTER_H * 2;\n+\tunsigned int minBDSWidth = gdc.width + IMGU::FILTER_W * 2;\n+\tunsigned int minBDSHeight = gdc.height + IMGU::FILTER_H * 2;\n \n \tfloat sf = bdsSF;\n-\twhile (sf <= BDS_SF_MAX && sf >= BDS_SF_MIN) {\n+\twhile (sf <= IMGU::BDS_SF_MAX && sf >= IMGU::BDS_SF_MIN) {\n \t\tfloat bdsWidth = static_cast<float>(iif.width) / sf;\n \t\tfloat bdsHeight = static_cast<float>(iif.height) / sf;\n \n@@ -212,16 +196,16 @@ void calculateBDS(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc, floa\n \t\t    std::fmod(bdsHeight, 1.0) == 0) {\n \t\t\tunsigned int bdsIntWidth = static_cast<unsigned int>(bdsWidth);\n \t\t\tunsigned int bdsIntHeight = static_cast<unsigned int>(bdsHeight);\n-\t\t\tif (!(bdsIntWidth % BDS_ALIGN_W) && bdsWidth >= minBDSWidth &&\n-\t\t\t    !(bdsIntHeight % BDS_ALIGN_H) && bdsHeight >= minBDSHeight)\n+\t\t\tif (!(bdsIntWidth % IMGU::BDS_ALIGN_W) && bdsWidth >= minBDSWidth &&\n+\t\t\t    !(bdsIntHeight % IMGU::BDS_ALIGN_H) && bdsHeight >= minBDSHeight)\n \t\t\t\tcalculateBDSHeight(pipe, iif, gdc, bdsIntWidth, sf);\n \t\t}\n \n-\t\tsf += BDS_SF_STEP;\n+\t\tsf += IMGU::BDS_SF_STEP;\n \t}\n \n \tsf = bdsSF;\n-\twhile (sf <= BDS_SF_MAX && sf >= BDS_SF_MIN) {\n+\twhile (sf <= IMGU::BDS_SF_MAX && sf >= IMGU::BDS_SF_MIN) {\n \t\tfloat bdsWidth = static_cast<float>(iif.width) / sf;\n \t\tfloat bdsHeight = static_cast<float>(iif.height) / sf;\n \n@@ -229,12 +213,12 @@ void calculateBDS(ImgUDevice::Pipe *pipe, const Size &iif, const Size &gdc, floa\n \t\t    std::fmod(bdsHeight, 1.0) == 0) {\n \t\t\tunsigned int bdsIntWidth = static_cast<unsigned int>(bdsWidth);\n \t\t\tunsigned int bdsIntHeight = static_cast<unsigned int>(bdsHeight);\n-\t\t\tif (!(bdsIntWidth % BDS_ALIGN_W) && bdsWidth >= minBDSWidth &&\n-\t\t\t    !(bdsIntHeight % BDS_ALIGN_H) && bdsHeight >= minBDSHeight)\n+\t\t\tif (!(bdsIntWidth % IMGU::BDS_ALIGN_W) && bdsWidth >= minBDSWidth &&\n+\t\t\t    !(bdsIntHeight % IMGU::BDS_ALIGN_H) && bdsHeight >= minBDSHeight)\n \t\t\t\tcalculateBDSHeight(pipe, iif, gdc, bdsIntWidth, sf);\n \t\t}\n \n-\t\tsf -= BDS_SF_STEP;\n+\t\tsf -= IMGU::BDS_SF_STEP;\n \t}\n }\n \n@@ -412,7 +396,7 @@ ImgUDevice::PipeConfig ImgUDevice::calculatePipeConfig(Pipe *pipe)\n \t * \\todo Filter out all resolutions < IF_CROP_MAX.\n \t * See https://bugs.libcamera.org/show_bug.cgi?id=32\n \t */\n-\tif (in.width < IF_CROP_MAX_W || in.height < IF_CROP_MAX_H) {\n+\tif (in.width < IMGU::IF_CROP_MAX_W || in.height < IMGU::IF_CROP_MAX_H) {\n \t\tLOG(IPU3, Error) << \"Input resolution \" << in.toString()\n \t\t\t\t << \" not supported\";\n \t\treturn {};\n@@ -424,25 +408,25 @@ ImgUDevice::PipeConfig ImgUDevice::calculatePipeConfig(Pipe *pipe)\n \tfloat sf = findScaleFactor(bdsSF, bdsScalingFactors, true);\n \n \t/* Populate the configurations vector by scaling width and height. */\n-\tunsigned int ifWidth = utils::alignUp(in.width, IF_ALIGN_W);\n-\tunsigned int ifHeight = utils::alignUp(in.height, IF_ALIGN_H);\n-\tunsigned int minIfWidth = in.width - IF_CROP_MAX_W;\n-\tunsigned int minIfHeight = in.height - IF_CROP_MAX_H;\n+\tunsigned int ifWidth = utils::alignUp(in.width, IMGU::IF_ALIGN_W);\n+\tunsigned int ifHeight = utils::alignUp(in.height, IMGU::IF_ALIGN_H);\n+\tunsigned int minIfWidth = in.width - IMGU::IF_CROP_MAX_W;\n+\tunsigned int minIfHeight = in.height - IMGU::IF_CROP_MAX_H;\n \twhile (ifWidth >= minIfWidth) {\n \t\twhile (ifHeight >= minIfHeight) {\n \t\t\tSize iif{ ifWidth, ifHeight };\n \t\t\tcalculateBDS(pipe, iif, gdc, sf);\n-\t\t\tifHeight -= IF_ALIGN_H;\n+\t\t\tifHeight -= IMGU::IF_ALIGN_H;\n \t\t}\n \n-\t\tifWidth -= IF_ALIGN_W;\n+\t\tifWidth -= IMGU::IF_ALIGN_W;\n \t}\n \n \t/* Repeat search by scaling width first. */\n-\tifWidth = utils::alignUp(in.width, IF_ALIGN_W);\n-\tifHeight = utils::alignUp(in.height, IF_ALIGN_H);\n-\tminIfWidth = in.width - IF_CROP_MAX_W;\n-\tminIfHeight = in.height - IF_CROP_MAX_H;\n+\tifWidth = utils::alignUp(in.width, IMGU::IF_ALIGN_W);\n+\tifHeight = utils::alignUp(in.height, IMGU::IF_ALIGN_H);\n+\tminIfWidth = in.width - IMGU::IF_CROP_MAX_W;\n+\tminIfHeight = in.height - IMGU::IF_CROP_MAX_H;\n \twhile (ifHeight >= minIfHeight) {\n \t\t/*\n \t\t * \\todo This procedure is probably broken:\n@@ -451,10 +435,10 @@ ImgUDevice::PipeConfig ImgUDevice::calculatePipeConfig(Pipe *pipe)\n \t\twhile (ifWidth >= minIfWidth) {\n \t\t\tSize iif{ ifWidth, ifHeight };\n \t\t\tcalculateBDS(pipe, iif, gdc, sf);\n-\t\t\tifWidth -= IF_ALIGN_W;\n+\t\t\tifWidth -= IMGU::IF_ALIGN_W;\n \t\t}\n \n-\t\tifHeight -= IF_ALIGN_H;\n+\t\tifHeight -= IMGU::IF_ALIGN_H;\n \t}\n \n \tif (pipeConfigs.size() == 0) {\ndiff --git a/src/libcamera/pipeline/ipu3/imgu.h b/src/libcamera/pipeline/ipu3/imgu.h\nindex 9d4915116087..df64cbaba5a7 100644\n--- a/src/libcamera/pipeline/ipu3/imgu.h\n+++ b/src/libcamera/pipeline/ipu3/imgu.h\n@@ -15,6 +15,33 @@\n \n namespace libcamera {\n \n+namespace IMGU {\n+\n+static constexpr unsigned int FILTER_W = 4;\n+static constexpr unsigned int FILTER_H = 4;\n+\n+static constexpr unsigned int IF_ALIGN_W = 2;\n+static constexpr unsigned int IF_ALIGN_H = 4;\n+\n+static constexpr unsigned int IF_CROP_MAX_W = 40;\n+static constexpr unsigned int IF_CROP_MAX_H = 540;\n+\n+static constexpr unsigned int BDS_ALIGN_W = 2;\n+static constexpr unsigned int BDS_ALIGN_H = 4;\n+\n+static constexpr float BDS_SF_MAX = 2.5;\n+static constexpr float BDS_SF_MIN = 1.0;\n+static constexpr float BDS_SF_STEP = 0.03125;\n+\n+static const Size OUTPUT_MIN_SIZE = { 2, 2 };\n+static const Size OUTPUT_MAX_SIZE = { 4480, 34004 };\n+static constexpr unsigned int OUTPUT_WIDTH_ALIGN = 64;\n+static constexpr unsigned int OUTPUT_HEIGHT_ALIGN = 4;\n+static constexpr unsigned int OUTPUT_WIDTH_MARGIN = 64;\n+static constexpr unsigned int OUTPUT_HEIGHT_MARGIN = 32;\n+\n+} /* namespace IMGU */\n+\n class FrameBuffer;\n class MediaDevice;\n class Size;\ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 291338288685..89a05fab69ad 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -41,12 +41,6 @@ LOG_DEFINE_CATEGORY(IPU3)\n \n static constexpr unsigned int IPU3_BUFFER_COUNT = 4;\n static constexpr unsigned int IPU3_MAX_STREAMS = 3;\n-static const Size IMGU_OUTPUT_MIN_SIZE = { 2, 2 };\n-static const Size IMGU_OUTPUT_MAX_SIZE = { 4480, 34004 };\n-static constexpr unsigned int IMGU_OUTPUT_WIDTH_ALIGN = 64;\n-static constexpr unsigned int IMGU_OUTPUT_HEIGHT_ALIGN = 4;\n-static constexpr unsigned int IMGU_OUTPUT_WIDTH_MARGIN = 64;\n-static constexpr unsigned int IMGU_OUTPUT_HEIGHT_MARGIN = 32;\n static constexpr Size IPU3ViewfinderSize(1280, 720);\n \n static const ControlInfoMap::Map IPU3Controls = {\n@@ -287,9 +281,10 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()\n \t * https://bugs.libcamera.org/show_bug.cgi?id=32\n \t */\n \tif (rawSize.isNull())\n-\t\trawSize = maxYuvSize.alignedUpTo(40, 540)\n-\t\t\t\t    .alignedUpTo(IMGU_OUTPUT_WIDTH_MARGIN,\n-\t\t\t\t\t\t IMGU_OUTPUT_HEIGHT_MARGIN)\n+\t\trawSize = maxYuvSize.alignedUpTo(IMGU::IF_CROP_MAX_W,\n+\t\t\t\t\t\t IMGU::IF_CROP_MAX_H)\n+\t\t\t\t    .alignedUpTo(IMGU::OUTPUT_WIDTH_MARGIN,\n+\t\t\t\t\t\t IMGU::OUTPUT_HEIGHT_MARGIN)\n \t\t\t\t    .boundedTo(data_->cio2_.sensor()->resolution());\n \tcio2Configuration_ = data_->cio2_.generateConfiguration(rawSize);\n \tif (!cio2Configuration_.pixelFormat.isValid())\n@@ -345,19 +340,19 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate()\n \t\t\t */\n \t\t\tunsigned int limit;\n \t\t\tlimit = utils::alignDown(cio2Configuration_.size.width - 1,\n-\t\t\t\t\t\t IMGU_OUTPUT_WIDTH_MARGIN);\n+\t\t\t\t\t\t IMGU::OUTPUT_WIDTH_MARGIN);\n \t\t\tcfg->size.width = std::clamp(cfg->size.width,\n-\t\t\t\t\t\t     IMGU_OUTPUT_MIN_SIZE.width,\n+\t\t\t\t\t\t     IMGU::OUTPUT_MIN_SIZE.width,\n \t\t\t\t\t\t     limit);\n \n \t\t\tlimit = utils::alignDown(cio2Configuration_.size.height - 1,\n-\t\t\t\t\t\t IMGU_OUTPUT_HEIGHT_MARGIN);\n+\t\t\t\t\t\t IMGU::OUTPUT_HEIGHT_MARGIN);\n \t\t\tcfg->size.height = std::clamp(cfg->size.height,\n-\t\t\t\t\t\t      IMGU_OUTPUT_MIN_SIZE.height,\n+\t\t\t\t\t\t      IMGU::OUTPUT_MIN_SIZE.height,\n \t\t\t\t\t\t      limit);\n \n-\t\t\tcfg->size.alignDownTo(IMGU_OUTPUT_WIDTH_ALIGN,\n-\t\t\t\t\t      IMGU_OUTPUT_HEIGHT_ALIGN);\n+\t\t\tcfg->size.alignDownTo(IMGU::OUTPUT_WIDTH_ALIGN,\n+\t\t\t\t\t      IMGU::OUTPUT_HEIGHT_ALIGN);\n \n \t\t\tcfg->pixelFormat = formats::NV12;\n \t\t\tcfg->bufferCount = IPU3_BUFFER_COUNT;\n@@ -443,14 +438,14 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera,\n \t\t\t * \\todo Clarify the alignment constraints as explained\n \t\t\t * in validate()\n \t\t\t */\n-\t\t\tsize = sensorResolution.boundedTo(IMGU_OUTPUT_MAX_SIZE);\n+\t\t\tsize = sensorResolution.boundedTo(IMGU::OUTPUT_MAX_SIZE);\n \t\t\tsize.width = utils::alignDown(size.width - 1,\n-\t\t\t\t\t\t      IMGU_OUTPUT_WIDTH_MARGIN);\n+\t\t\t\t\t\t      IMGU::OUTPUT_WIDTH_MARGIN);\n \t\t\tsize.height = utils::alignDown(size.height - 1,\n-\t\t\t\t\t\t       IMGU_OUTPUT_HEIGHT_MARGIN);\n+\t\t\t\t\t\t       IMGU::OUTPUT_HEIGHT_MARGIN);\n \t\t\tpixelFormat = formats::NV12;\n \t\t\tbufferCount = IPU3_BUFFER_COUNT;\n-\t\t\tstreamFormats[pixelFormat] = { { IMGU_OUTPUT_MIN_SIZE, size } };\n+\t\t\tstreamFormats[pixelFormat] = { { IMGU::OUTPUT_MIN_SIZE, size } };\n \n \t\t\tbreak;\n \n@@ -475,11 +470,11 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera,\n \t\t\t * to the ImgU output constraints.\n \t\t\t */\n \t\t\tsize = sensorResolution.boundedTo(IPU3ViewfinderSize)\n-\t\t\t\t\t       .alignedDownTo(IMGU_OUTPUT_WIDTH_ALIGN,\n-\t\t\t\t\t\t\t      IMGU_OUTPUT_HEIGHT_ALIGN);\n+\t\t\t\t\t       .alignedDownTo(IMGU::OUTPUT_WIDTH_ALIGN,\n+\t\t\t\t\t\t\t      IMGU::OUTPUT_HEIGHT_ALIGN);\n \t\t\tpixelFormat = formats::NV12;\n \t\t\tbufferCount = IPU3_BUFFER_COUNT;\n-\t\t\tstreamFormats[pixelFormat] = { { IMGU_OUTPUT_MIN_SIZE, size } };\n+\t\t\tstreamFormats[pixelFormat] = { { IMGU::OUTPUT_MIN_SIZE, size } };\n \n \t\t\tbreak;\n \t\t}\n@@ -1003,8 +998,8 @@ int PipelineHandlerIPU3::initControls(IPU3CameraData *data)\n \t/* The strictly smaller size than the sensor resolution, aligned to margins. */\n \tSize minSize = Size(sensor->resolution().width - 1,\n \t\t\t    sensor->resolution().height - 1)\n-\t\t       .alignedDownTo(IMGU_OUTPUT_WIDTH_MARGIN,\n-\t\t\t\t      IMGU_OUTPUT_HEIGHT_MARGIN);\n+\t\t       .alignedDownTo(IMGU::OUTPUT_WIDTH_MARGIN,\n+\t\t\t\t      IMGU::OUTPUT_HEIGHT_MARGIN);\n \n \t/*\n \t * Either the smallest margin-aligned size larger than the viewfinder\n@@ -1012,8 +1007,8 @@ int PipelineHandlerIPU3::initControls(IPU3CameraData *data)\n \t */\n \tminSize = Size(IPU3ViewfinderSize.width + 1,\n \t\t       IPU3ViewfinderSize.height + 1)\n-\t\t  .alignedUpTo(IMGU_OUTPUT_WIDTH_MARGIN,\n-\t\t\t       IMGU_OUTPUT_HEIGHT_MARGIN)\n+\t\t  .alignedUpTo(IMGU::OUTPUT_WIDTH_MARGIN,\n+\t\t\t       IMGU::OUTPUT_HEIGHT_MARGIN)\n \t\t  .boundedTo(minSize);\n \n \t/*\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "02/17"
    ]
}