From patchwork Fri Aug 30 13:18:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21084 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id C38CDC32C2 for ; Fri, 30 Aug 2024 13:19:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5306A634CB; Fri, 30 Aug 2024 15:19:25 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="G4IW4aqD"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7019B61E4A for ; Fri, 30 Aug 2024 15:19:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PJQRA5gnXHlb90quavd8QuEFBAUcGjg2/CPlNE8X2pQ=; b=G4IW4aqDtNYkkyDpYxjqwtEPQ916WLM+rPFijdxJx8q6wWIuAOuKpj8oxurRo21dZyZYVT dWuP35bRUgafcAKz9gwx6p6V0D3ok4+QzlSMCUzNtKX5f8/i6ypib5L4a5R/9jxEOl8HSV OeTth0yNVbXJyn1OdISL7K+girfrNS8= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-696-pWrFRdMdNHu-isWYHDKLOg-1; Fri, 30 Aug 2024 09:19:18 -0400 X-MC-Unique: pWrFRdMdNHu-isWYHDKLOg-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 05E6C1954B0C for ; Fri, 30 Aug 2024 13:19:18 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 81EDD1955F6B; Fri, 30 Aug 2024 13:19:16 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 01/19] libcamera: ipu3: Remove unused includes Date: Fri, 30 Aug 2024 15:18:38 +0200 Message-ID: <20240830131904.1090330-2-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The includes that are not used can be removed. Signed-off-by: Milan Zamazal --- src/ipa/ipu3/algorithms/af.cpp | 3 --- src/ipa/ipu3/algorithms/agc.cpp | 1 - src/ipa/ipu3/algorithms/blc.cpp | 2 -- src/ipa/ipu3/ipu3.cpp | 5 ----- src/libcamera/pipeline/ipu3/ipu3.cpp | 1 - 5 files changed, 12 deletions(-) diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp index 29eb7355..cf68fb59 100644 --- a/src/ipa/ipu3/algorithms/af.cpp +++ b/src/ipa/ipu3/algorithms/af.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -23,8 +22,6 @@ #include -#include "libipa/histogram.h" - /** * \file af.h */ diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp index 0e0114f6..3378c4fd 100644 --- a/src/ipa/ipu3/algorithms/agc.cpp +++ b/src/ipa/ipu3/algorithms/agc.cpp @@ -9,7 +9,6 @@ #include #include -#include #include #include diff --git a/src/ipa/ipu3/algorithms/blc.cpp b/src/ipa/ipu3/algorithms/blc.cpp index 257f40e2..fa4b9272 100644 --- a/src/ipa/ipu3/algorithms/blc.cpp +++ b/src/ipa/ipu3/algorithms/blc.cpp @@ -7,8 +7,6 @@ #include "blc.h" -#include - /** * \file blc.h * \brief IPU3 Black Level Correction control diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index cdcdf1fb..656c51fc 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -32,12 +32,7 @@ #include "libcamera/internal/mapped_framebuffer.h" #include "libcamera/internal/yaml_parser.h" -#include "algorithms/af.h" #include "algorithms/agc.h" -#include "algorithms/algorithm.h" -#include "algorithms/awb.h" -#include "algorithms/blc.h" -#include "algorithms/tone_mapping.h" #include "libipa/camera_sensor_helper.h" #include "ipa_context.h" diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 2071c338..29172f34 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -6,7 +6,6 @@ */ #include -#include #include #include #include From patchwork Fri Aug 30 13:18:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21085 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id EAFACC324C for ; Fri, 30 Aug 2024 13:19:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DD4966341E; Fri, 30 Aug 2024 15:19:26 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="fbFIo5K9"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F27D56345A for ; Fri, 30 Aug 2024 15:19:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gDHVeNMFKSWnDfjkPStA5LXfRtrx/FL2tfHLlZgv4Do=; b=fbFIo5K9AS40xcakbwK0BF8MczB2V/+2/XQAA//M0dIuuyNy2MpuaFQJrkJVRo1LjK4qYJ TcDWWFh4jvGZumcim1uwPaLmE1BLhZkJ3li9kwliKe3Vz6gWE7m+SgRoui2GuBwScyeck5 PKoVlteM/btMv3mhKcXQeI1Tf4ALEY0= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-135--41ksjKkN7O3OHeWWsttiA-1; Fri, 30 Aug 2024 09:19:20 -0400 X-MC-Unique: -41ksjKkN7O3OHeWWsttiA-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 96F7B1955D48 for ; Fri, 30 Aug 2024 13:19:19 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 41F3719560AA; Fri, 30 Aug 2024 13:19:17 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 02/19] libcamera: ipu3: Replace wrong include Date: Fri, 30 Aug 2024 15:18:39 +0200 Message-ID: <20240830131904.1090330-3-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" v4l2_videodevice.h is not used but logging is imported through it. Remove the unused include and include log.h instead. Signed-off-by: Milan Zamazal --- src/libcamera/pipeline/ipu3/frames.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/ipu3/frames.cpp b/src/libcamera/pipeline/ipu3/frames.cpp index 88eb9d05..bc0526a7 100644 --- a/src/libcamera/pipeline/ipu3/frames.cpp +++ b/src/libcamera/pipeline/ipu3/frames.cpp @@ -7,12 +7,13 @@ #include "frames.h" +#include + #include #include #include "libcamera/internal/framebuffer.h" #include "libcamera/internal/pipeline_handler.h" -#include "libcamera/internal/v4l2_videodevice.h" namespace libcamera { From patchwork Fri Aug 30 13:18:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21086 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id E9246C32D5 for ; Fri, 30 Aug 2024 13:19:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AB314634BA; Fri, 30 Aug 2024 15:19:27 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="VB5wQmgb"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E668961E4A for ; Fri, 30 Aug 2024 15:19:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ywSY6p4fFmH8QIDlsFFlK08JzmSG6iwY6VoDTSN2CvM=; b=VB5wQmgbuuJxWigUiF5Lr4EeQkVaOSvlgJwbhBBkYvo721WaPFNzCcLUr+zp8U1+BSGUCo mcmRQNFKe73jKZxyMUlco/XL94Xr944bchpg0SOtXl6drY0qRR8LLNm8hvPcjm7Ksxwh+R zMysNs7AJY7Cuclu9R9da/XFWBw3QBQ= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-543-aUyxszSeMQancKgJ8uInMQ-1; Fri, 30 Aug 2024 09:19:22 -0400 X-MC-Unique: aUyxszSeMQancKgJ8uInMQ-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5E0D81955D57 for ; Fri, 30 Aug 2024 13:19:21 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0A89F19560AA; Fri, 30 Aug 2024 13:19:19 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 03/19] libcamera: ipu3: Formatting improvements Date: Fri, 30 Aug 2024 15:18:40 +0200 Message-ID: <20240830131904.1090330-4-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The LSP autoformatter doesn't like some of the current formatting, let's make it happy. Signed-off-by: Milan Zamazal --- src/ipa/ipu3/algorithms/agc.cpp | 31 ++++++++++----------- src/ipa/ipu3/algorithms/blc.cpp | 4 +-- src/ipa/ipu3/ipu3.cpp | 11 ++++---- src/libcamera/pipeline/ipu3/ipu3.cpp | 40 +++++++++++++++------------- 4 files changed, 45 insertions(+), 41 deletions(-) diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp index 3378c4fd..548b64a4 100644 --- a/src/ipa/ipu3/algorithms/agc.cpp +++ b/src/ipa/ipu3/algorithms/agc.cpp @@ -14,6 +14,7 @@ #include #include + #include #include "libipa/histogram.h" @@ -136,11 +137,9 @@ Histogram Agc::parseStatistics(const ipu3_uapi_stats_3a *stats, reinterpret_cast( &stats->awb_raw_buffer.meta_data[cellPosition]); - rgbTriples_.push_back({ - cell->R_avg, - (cell->Gr_avg + cell->Gb_avg) / 2, - cell->B_avg - }); + rgbTriples_.push_back({ cell->R_avg, + (cell->Gr_avg + cell->Gb_avg) / 2, + cell->B_avg }); /* * Store the average green value to estimate the @@ -184,9 +183,10 @@ double Agc::estimateLuminance(double gain) const blueSum += std::min(std::get<2>(rgbTriples_[i]) * gain, 255.0); } - double ySum = redSum * rGain_ * 0.299 - + greenSum * gGain_ * 0.587 - + blueSum * bGain_ * 0.114; + double ySum = + redSum * rGain_ * 0.299 + + greenSum * gGain_ * 0.587 + + blueSum * bGain_ * 0.114; return ySum / (bdsGrid_.height * bdsGrid_.width) / 255; } @@ -216,8 +216,8 @@ void Agc::process(IPAContext &context, [[maybe_unused]] const uint32_t frame, * The Agc algorithm needs to know the effective exposure value that was * applied to the sensor when the statistics were collected. */ - utils::Duration exposureTime = context.configuration.sensor.lineDuration - * frameContext.sensor.exposure; + utils::Duration exposureTime = + context.configuration.sensor.lineDuration * frameContext.sensor.exposure; double analogueGain = frameContext.sensor.gain; utils::Duration effectiveExposureValue = exposureTime * analogueGain; @@ -241,12 +241,13 @@ void Agc::process(IPAContext &context, [[maybe_unused]] const uint32_t frame, metadata.set(controls::ExposureTime, exposureTime.get()); /* \todo Use VBlank value calculated from each frame exposure. */ - uint32_t vTotal = context.configuration.sensor.size.height - + context.configuration.sensor.defVBlank; - utils::Duration frameDuration = context.configuration.sensor.lineDuration - * vTotal; + uint32_t vTotal = + context.configuration.sensor.size.height + + context.configuration.sensor.defVBlank; + utils::Duration frameDuration = + context.configuration.sensor.lineDuration * + vTotal; metadata.set(controls::FrameDuration, frameDuration.get()); - } REGISTER_IPA_ALGORITHM(Agc, "Agc") diff --git a/src/ipa/ipu3/algorithms/blc.cpp b/src/ipa/ipu3/algorithms/blc.cpp index fa4b9272..35748fb2 100644 --- a/src/ipa/ipu3/algorithms/blc.cpp +++ b/src/ipa/ipu3/algorithms/blc.cpp @@ -55,8 +55,8 @@ void BlackLevelCorrection::prepare([[maybe_unused]] IPAContext &context, * tuning processes. This is a first rough approximation. */ params->obgrid_param.gr = 64; - params->obgrid_param.r = 64; - params->obgrid_param.b = 64; + params->obgrid_param.r = 64; + params->obgrid_param.b = 64; params->obgrid_param.gb = 64; /* Enable the custom black level correction processing */ diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index 656c51fc..e6b2b5bb 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -24,10 +24,11 @@ #include #include +#include + #include #include #include -#include #include "libcamera/internal/mapped_framebuffer.h" #include "libcamera/internal/yaml_parser.h" @@ -308,8 +309,8 @@ int IPAIPU3::init(const IPASettings &settings, /* Clean context */ context_.configuration = {}; - context_.configuration.sensor.lineDuration = sensorInfo.minLineLength - * 1.0s / sensorInfo.pixelRate; + context_.configuration.sensor.lineDuration = + sensorInfo.minLineLength * 1.0s / sensorInfo.pixelRate; /* Load the tuning data file. */ File file(settings.configurationFile); @@ -472,8 +473,8 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo, context_.frameContexts.clear(); /* Initialise the sensor configuration. */ - context_.configuration.sensor.lineDuration = sensorInfo_.minLineLength - * 1.0s / sensorInfo_.pixelRate; + context_.configuration.sensor.lineDuration = + sensorInfo_.minLineLength * 1.0s / sensorInfo_.pixelRate; context_.configuration.sensor.size = sensorInfo_.outputSize; /* diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 29172f34..6b4fe486 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -18,12 +18,13 @@ #include #include #include -#include -#include #include #include #include +#include +#include + #include "libcamera/internal/camera.h" #include "libcamera/internal/camera_lens.h" #include "libcamera/internal/camera_sensor.h" @@ -417,9 +418,9 @@ PipelineHandlerIPU3::generateConfiguration(Camera *camera, Spanresolution().shrunkBy({ 1, 1 }) - .alignedDownTo(ImgUDevice::kOutputMarginWidth, - ImgUDevice::kOutputMarginHeight); + Size minSize = sensor->resolution() + .shrunkBy({ 1, 1 }) + .alignedDownTo(ImgUDevice::kOutputMarginWidth, + ImgUDevice::kOutputMarginHeight); /* * Either the smallest margin-aligned size larger than the viewfinder * size or the adjusted sensor resolution. */ minSize = kViewfinderSize.grownBy({ 1, 1 }) - .alignedUpTo(ImgUDevice::kOutputMarginWidth, - ImgUDevice::kOutputMarginHeight) - .boundedTo(minSize); + .alignedUpTo(ImgUDevice::kOutputMarginWidth, + ImgUDevice::kOutputMarginHeight) + .boundedTo(minSize); /* * Re-scale in the sensor's native coordinates. Report (0,0) as @@ -1116,19 +1118,19 @@ int PipelineHandlerIPU3::registerCameras() * returned through the ImgU main and secondary outputs. */ data->cio2_.bufferReady().connect(data.get(), - &IPU3CameraData::cio2BufferReady); + &IPU3CameraData::cio2BufferReady); data->cio2_.bufferAvailable.connect( data.get(), &IPU3CameraData::queuePendingRequests); data->imgu_->input_->bufferReady.connect(&data->cio2_, - &CIO2Device::tryReturnBuffer); + &CIO2Device::tryReturnBuffer); data->imgu_->output_->bufferReady.connect(data.get(), - &IPU3CameraData::imguOutputBufferReady); + &IPU3CameraData::imguOutputBufferReady); data->imgu_->viewfinder_->bufferReady.connect(data.get(), - &IPU3CameraData::imguOutputBufferReady); + &IPU3CameraData::imguOutputBufferReady); data->imgu_->param_->bufferReady.connect(data.get(), - &IPU3CameraData::paramBufferReady); + &IPU3CameraData::paramBufferReady); data->imgu_->stat_->bufferReady.connect(data.get(), - &IPU3CameraData::statBufferReady); + &IPU3CameraData::statBufferReady); /* Create and register the Camera instance. */ const std::string &cameraId = cio2->sensor()->id(); From patchwork Fri Aug 30 13:18:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21087 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 8E945C32C2 for ; Fri, 30 Aug 2024 13:19:33 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E9FE7634CC; Fri, 30 Aug 2024 15:19:32 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="i6xrCkSS"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B563E634CB for ; Fri, 30 Aug 2024 15:19:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=97y4j6cbj7MpOmXAsRm2Btt19g0LOOX0e1/7evm3xAU=; b=i6xrCkSSSCWJVTskIHWsNrwyx1dca1oTeEmanFfV2INEB6lvcpRioplJb6y/Fk2iZllSl5 CSQQ/xUX72q3CMUzK81mPi7Lk0oQWf6Odc4SwiiSZV7Al6EMst+V8ZHe0fzq7hE7zV5xv4 Fn2sVB+NB7cYUayZr0WZ3QvR5OnUcGM= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-443-DqaK8vblOhWzCnU21GJ7Ow-1; Fri, 30 Aug 2024 09:19:23 -0400 X-MC-Unique: DqaK8vblOhWzCnU21GJ7Ow-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1AA5C1955F3B for ; Fri, 30 Aug 2024 13:19:23 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D2F7219560AA; Fri, 30 Aug 2024 13:19:21 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 04/19] libcamera: rkisp1: Remove unused includes Date: Fri, 30 Aug 2024 15:18:41 +0200 Message-ID: <20240830131904.1090330-5-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The includes that are not used can be removed. Signed-off-by: Milan Zamazal --- src/ipa/rkisp1/algorithms/agc.h | 1 - src/ipa/rkisp1/algorithms/awb.cpp | 2 -- src/ipa/rkisp1/algorithms/ccm.cpp | 4 ---- src/ipa/rkisp1/algorithms/dpf.cpp | 2 -- src/ipa/rkisp1/rkisp1.cpp | 2 -- src/ipa/rkisp1/utils.h | 1 - src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 -- 7 files changed, 14 deletions(-) diff --git a/src/ipa/rkisp1/algorithms/agc.h b/src/ipa/rkisp1/algorithms/agc.h index d64ff42c..aa86f2c5 100644 --- a/src/ipa/rkisp1/algorithms/agc.h +++ b/src/ipa/rkisp1/algorithms/agc.h @@ -15,7 +15,6 @@ #include #include "libipa/agc_mean_luminance.h" -#include "libipa/histogram.h" #include "algorithm.h" diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp index b40f405f..a5972015 100644 --- a/src/ipa/rkisp1/algorithms/awb.cpp +++ b/src/ipa/rkisp1/algorithms/awb.cpp @@ -8,8 +8,6 @@ #include "awb.h" #include -#include -#include #include diff --git a/src/ipa/rkisp1/algorithms/ccm.cpp b/src/ipa/rkisp1/algorithms/ccm.cpp index ca80112a..47a8b7e5 100644 --- a/src/ipa/rkisp1/algorithms/ccm.cpp +++ b/src/ipa/rkisp1/algorithms/ccm.cpp @@ -7,10 +7,6 @@ #include "ccm.h" -#include -#include -#include -#include #include #include diff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp index 079cc2c3..94080b28 100644 --- a/src/ipa/rkisp1/algorithms/dpf.cpp +++ b/src/ipa/rkisp1/algorithms/dpf.cpp @@ -7,8 +7,6 @@ #include "dpf.h" -#include - #include #include diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 79ae9289..55269579 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -6,8 +6,6 @@ */ #include -#include -#include #include #include diff --git a/src/ipa/rkisp1/utils.h b/src/ipa/rkisp1/utils.h index 450f2244..5f38b50b 100644 --- a/src/ipa/rkisp1/utils.h +++ b/src/ipa/rkisp1/utils.h @@ -8,7 +8,6 @@ #pragma once #include -#include #include namespace libcamera { diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 710d9573..5ff8eb9c 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -6,8 +6,6 @@ */ #include -#include -#include #include #include #include From patchwork Fri Aug 30 13:18:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21088 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 1DEA7C32D6 for ; Fri, 30 Aug 2024 13:19:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 89716634E1; Fri, 30 Aug 2024 15:19:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="fn/AzWuU"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9910A634A6 for ; Fri, 30 Aug 2024 15:19:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pGplRR87kOfW0wQVbOTmZ8UmxjSQD6qIhfe6qeyQVvo=; b=fn/AzWuUpomTChsrKDWDwPa2HiT1hFnHmUjWB5ieI21WVGzmQYQpIlJD1tsucPw+kLHdIX 69i3t/xONOjv2TEcLLXgubqprc5dr67JUav4zUugjYLjfyk49/70FFxMYLRysUGbib9cNf //eHnZmakKzZWQFlCF499U45GsWUyKA= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-22-0Q7l3FMhMwK4g99exlFF8g-1; Fri, 30 Aug 2024 09:19:26 -0400 X-MC-Unique: 0Q7l3FMhMwK4g99exlFF8g-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4CF1D1955BF9 for ; Fri, 30 Aug 2024 13:19:25 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B2C8E19560AA; Fri, 30 Aug 2024 13:19:23 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 05/19] libcamera: rkisp1: Formatting improvements Date: Fri, 30 Aug 2024 15:18:42 +0200 Message-ID: <20240830131904.1090330-6-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The LSP autoformatter doesn't like some of the current formatting, let's make it happy. Signed-off-by: Milan Zamazal --- src/ipa/rkisp1/algorithms/awb.cpp | 18 +++++++++--------- src/ipa/rkisp1/algorithms/dpf.cpp | 4 ++-- src/ipa/rkisp1/rkisp1.cpp | 20 +++++++++++--------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp index a5972015..35435fe2 100644 --- a/src/ipa/rkisp1/algorithms/awb.cpp +++ b/src/ipa/rkisp1/algorithms/awb.cpp @@ -12,6 +12,7 @@ #include #include + #include /** @@ -209,10 +210,9 @@ void Awb::process(IPAContext &context, double blueMean; metadata.set(controls::AwbEnable, frameContext.awb.autoEnabled); - metadata.set(controls::ColourGains, { - static_cast(frameContext.awb.gains.red), - static_cast(frameContext.awb.gains.blue) - }); + metadata.set(controls::ColourGains, + { static_cast(frameContext.awb.gains.red), + static_cast(frameContext.awb.gains.blue) }); if (rgbMode_) { greenMean = awb->awb_mean[0].mean_y_or_g; @@ -305,11 +305,11 @@ void Awb::process(IPAContext &context, activeState.awb.gains.automatic.green = 1.0; LOG(RkISP1Awb, Debug) << std::showpoint - << "Means [" << redMean << ", " << greenMean << ", " << blueMean - << "], gains [" << activeState.awb.gains.automatic.red << ", " - << activeState.awb.gains.automatic.green << ", " - << activeState.awb.gains.automatic.blue << "], temp " - << activeState.awb.temperatureK << "K"; + << "Means [" << redMean << ", " << greenMean << ", " << blueMean + << "], gains [" << activeState.awb.gains.automatic.red << ", " + << activeState.awb.gains.automatic.green << ", " + << activeState.awb.gains.automatic.blue << "], temp " + << activeState.awb.temperatureK << "K"; } REGISTER_IPA_ALGORITHM(Awb, "Awb") diff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp index 94080b28..ef1f25d7 100644 --- a/src/ipa/rkisp1/algorithms/dpf.cpp +++ b/src/ipa/rkisp1/algorithms/dpf.cpp @@ -116,8 +116,8 @@ int Dpf::init([[maybe_unused]] IPAContext &context, } config_.rb_flt.fltsize = values.size() == RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS - ? RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_13x9 - : RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_9x9; + ? RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_13x9 + : RKISP1_CIF_ISP_DPF_RB_FILTERSIZE_9x9; std::copy_n(values.begin(), values.size(), std::begin(config_.rb_flt.spatial_coeff)); diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 55269579..3c13c82e 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -17,10 +17,11 @@ #include #include +#include + #include #include #include -#include #include "libcamera/internal/formats.h" #include "libcamera/internal/mapped_framebuffer.h" @@ -162,8 +163,8 @@ int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision, return -ENODEV; } - context_.configuration.sensor.lineDuration = sensorInfo.minLineLength - * 1.0s / sensorInfo.pixelRate; + context_.configuration.sensor.lineDuration = + sensorInfo.minLineLength * 1.0s / sensorInfo.pixelRate; /* Load the tuning data file. */ File file(settings.configurationFile); @@ -264,12 +265,13 @@ int IPARkISP1::configure(const IPAConfigInfo &ipaConfig, context_.configuration.sensor.maxAnalogueGain = context_.camHelper->gain(maxGain); - context_.configuration.raw = std::any_of(streamConfig.begin(), streamConfig.end(), - [](auto &cfg) -> bool { - PixelFormat pixelFormat{ cfg.second.pixelFormat }; - const PixelFormatInfo &format = PixelFormatInfo::info(pixelFormat); - return format.colourEncoding == PixelFormatInfo::ColourEncodingRAW; - }); + context_.configuration.raw = + std::any_of(streamConfig.begin(), streamConfig.end(), + [](auto &cfg) -> bool { + PixelFormat pixelFormat{ cfg.second.pixelFormat }; + const PixelFormatInfo &format = PixelFormatInfo::info(pixelFormat); + return format.colourEncoding == PixelFormatInfo::ColourEncodingRAW; + }); for (auto const &a : algorithms()) { Algorithm *algo = static_cast(a.get()); From patchwork Fri Aug 30 13:18:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21089 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id EF868C324C for ; Fri, 30 Aug 2024 13:19:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 570CC634CC; Fri, 30 Aug 2024 15:19:37 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="gJFLUgLw"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EFD6B6341E for ; Fri, 30 Aug 2024 15:19:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qA1gJunqwrhQNHv6mgvw3Oqz7n7Qrd+6PlT3tQiaALM=; b=gJFLUgLwthBh2dQuqjlVsvRbZxVPtCeHZUSLYOONV+0fF40RQ3mvozWBl9wH2bPnpDConP DNVdE/5QWekM95BHJ2ei1H8y2Hv2+Q2HgkTLqPIDaLiMc+guTTbtktIjKDBCNwSxafouMp 0Aja5vGnTtBGOB5+YouILsKcebd7K04= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-193-Q1Pqn8VoO5amvFNulFeQYw-1; Fri, 30 Aug 2024 09:19:27 -0400 X-MC-Unique: Q1Pqn8VoO5amvFNulFeQYw-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9183E1954B10 for ; Fri, 30 Aug 2024 13:19:26 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 624B919560AA; Fri, 30 Aug 2024 13:19:25 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 06/19] libcamera: libipa: Remove unused includes Date: Fri, 30 Aug 2024 15:18:43 +0200 Message-ID: <20240830131904.1090330-7-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The includes that are not used can be removed. Signed-off-by: Milan Zamazal --- src/ipa/libipa/histogram.h | 1 - src/ipa/libipa/matrix.h | 1 - src/ipa/libipa/matrix_interpolator.cpp | 7 ------- src/ipa/libipa/matrix_interpolator.h | 2 -- src/ipa/libipa/pwl.cpp | 2 -- src/ipa/libipa/pwl.h | 3 --- src/ipa/libipa/vector.h | 2 -- 7 files changed, 18 deletions(-) diff --git a/src/ipa/libipa/histogram.h b/src/ipa/libipa/histogram.h index 032adca0..6fd64168 100644 --- a/src/ipa/libipa/histogram.h +++ b/src/ipa/libipa/histogram.h @@ -7,7 +7,6 @@ #pragma once -#include #include #include #include diff --git a/src/ipa/libipa/matrix.h b/src/ipa/libipa/matrix.h index 8aa8f343..5471e697 100644 --- a/src/ipa/libipa/matrix.h +++ b/src/ipa/libipa/matrix.h @@ -7,7 +7,6 @@ #pragma once #include -#include #include #include diff --git a/src/ipa/libipa/matrix_interpolator.cpp b/src/ipa/libipa/matrix_interpolator.cpp index 04ca177f..d5188f8a 100644 --- a/src/ipa/libipa/matrix_interpolator.cpp +++ b/src/ipa/libipa/matrix_interpolator.cpp @@ -6,15 +6,8 @@ */ #include "matrix_interpolator.h" -#include -#include - #include -#include "libcamera/internal/yaml_parser.h" - -#include "matrix.h" - /** * \file matrix_interpolator.h * \brief Helper class for interpolating maps of matrices diff --git a/src/ipa/libipa/matrix_interpolator.h b/src/ipa/libipa/matrix_interpolator.h index 087c4fd1..afbce538 100644 --- a/src/ipa/libipa/matrix_interpolator.h +++ b/src/ipa/libipa/matrix_interpolator.h @@ -7,10 +7,8 @@ #pragma once -#include #include #include -#include #include diff --git a/src/ipa/libipa/pwl.cpp b/src/ipa/libipa/pwl.cpp index 9b213754..88fe2022 100644 --- a/src/ipa/libipa/pwl.cpp +++ b/src/ipa/libipa/pwl.cpp @@ -8,10 +8,8 @@ #include "pwl.h" -#include #include #include -#include /** * \file pwl.h diff --git a/src/ipa/libipa/pwl.h b/src/ipa/libipa/pwl.h index b6f93494..d4ec9f4f 100644 --- a/src/ipa/libipa/pwl.h +++ b/src/ipa/libipa/pwl.h @@ -7,14 +7,11 @@ #pragma once #include -#include #include #include #include #include -#include "libcamera/internal/yaml_parser.h" - #include "vector.h" namespace libcamera { diff --git a/src/ipa/libipa/vector.h b/src/ipa/libipa/vector.h index 556e0967..d14ad0de 100644 --- a/src/ipa/libipa/vector.h +++ b/src/ipa/libipa/vector.h @@ -6,10 +6,8 @@ */ #pragma once -#include #include #include -#include #include #include From patchwork Fri Aug 30 13:18:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21090 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 47205C32D5 for ; Fri, 30 Aug 2024 13:19:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B16BC634DD; Fri, 30 Aug 2024 15:19:39 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="SVg90mEO"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3AF5F634A6 for ; Fri, 30 Aug 2024 15:19:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z44xCqW+kfXhJ8SPo2aVACIY1od8zKSLDirWic72JtE=; b=SVg90mEOZH1yI+FlpLf80JElS2W94Lg8I4tYJyuq+Axj6xxPVIppgPHyvu6PB0/6O/H6E0 RLp4kS6lJNs4viMtvuhQms72P6HyWfBDc7UnvexRajJVaJ/AbCpPdDwvNAnl/NtzVdC5vf LqqfGZsVdMER11orFOMrYdT4RQsizpg= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-605-51IeObfBMjO2rUPZwjy3-A-1; Fri, 30 Aug 2024 09:19:29 -0400 X-MC-Unique: 51IeObfBMjO2rUPZwjy3-A-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A679B1955BF9 for ; Fri, 30 Aug 2024 13:19:28 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2ACD719560AA; Fri, 30 Aug 2024 13:19:26 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 07/19] libcamera: uvcvideo: Remove unused includes Date: Fri, 30 Aug 2024 15:18:44 +0200 Message-ID: <20240830131904.1090330-8-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The includes that are not used can be removed. Signed-off-by: Milan Zamazal --- src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp index 8a7409fc..133ff977 100644 --- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp +++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp @@ -7,10 +7,8 @@ #include #include -#include #include #include -#include #include #include From patchwork Fri Aug 30 13:18:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21091 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id D487EC32D7 for ; Fri, 30 Aug 2024 13:19:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C2B7E634E6; Fri, 30 Aug 2024 15:19:40 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="OdbEaVWn"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2376163466 for ; Fri, 30 Aug 2024 15:19:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ddATjyIacXi0OQgfBu2gJ/AX6W6JHuM3ok8JBgs+RR0=; b=OdbEaVWnB4TtzUyZZtUiby+9px2fu8vyrimlhLBSIde5sXwMToOBeM4BYj2Xd2at2pMTsf It9iK/p8E9ONX5xLsidSLnCUDwPSFB/ZyyRmqyF6Oe6cWcCAt+nbPa/JnlyHxte0vx2O53 aSqPmj5RBzaeBt6QLbt0Y6RygqddcvY= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-250-2iqKJ9NzPwCv1D8yiqkIMQ-1; Fri, 30 Aug 2024 09:19:31 -0400 X-MC-Unique: 2iqKJ9NzPwCv1D8yiqkIMQ-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 30A6F1955D4D for ; Fri, 30 Aug 2024 13:19:30 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 04D8C19560AA; Fri, 30 Aug 2024 13:19:28 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 08/19] libcamera: uvcvideo: Formatting improvement Date: Fri, 30 Aug 2024 15:18:45 +0200 Message-ID: <20240830131904.1090330-9-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The LSP autoformatter doesn't like some of the current formatting, let's make it happy. Signed-off-by: Milan Zamazal --- src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp index 133ff977..706457c0 100644 --- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp +++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp @@ -304,8 +304,8 @@ int PipelineHandlerUVC::processControl(ControlList *controls, unsigned int id, case V4L2_CID_EXPOSURE_AUTO: { int32_t ivalue = value.get() - ? V4L2_EXPOSURE_APERTURE_PRIORITY - : V4L2_EXPOSURE_MANUAL; + ? V4L2_EXPOSURE_APERTURE_PRIORITY + : V4L2_EXPOSURE_MANUAL; controls->set(V4L2_CID_EXPOSURE_AUTO, ivalue); break; } From patchwork Fri Aug 30 13:18:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21092 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id F1245C32D8 for ; Fri, 30 Aug 2024 13:19:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4FD2A634E8; Fri, 30 Aug 2024 15:19:44 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="WAXRsYyY"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D036634DE for ; Fri, 30 Aug 2024 15:19:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s6063w1R0fX9t1o4dkx/6Pu0BRIXYFXQ9EyZmMjjVr8=; b=WAXRsYyYKsMUKNcLsXx4FsoXYHtBHgOUWpeFyBoNIsyATM9VrVz+EMriaLuq8CRQsYQKCC rsk3U50kd54dPtW0+si8WY2KVb2fraN9UYnjqjGBrV/B1eTQoOQGi/nb/38h9WnnJ2qQXz AnLv2dQyFL9x+TzatvbE1yd7ia/XZ2g= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-203-HUJHuWOMNwyPJhZwTj5AqA-1; Fri, 30 Aug 2024 09:19:32 -0400 X-MC-Unique: HUJHuWOMNwyPJhZwTj5AqA-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 081DC19560B0 for ; Fri, 30 Aug 2024 13:19:32 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A9A8319560AA; Fri, 30 Aug 2024 13:19:30 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 09/19] libcamera: v4l2: Remove unused includes Date: Fri, 30 Aug 2024 15:18:46 +0200 Message-ID: <20240830131904.1090330-10-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The includes that are not used can be removed. Signed-off-by: Milan Zamazal --- src/libcamera/v4l2_device.cpp | 2 -- src/libcamera/v4l2_subdevice.cpp | 1 - src/libcamera/v4l2_videodevice.cpp | 1 - src/v4l2/v4l2_camera.h | 1 - src/v4l2/v4l2_camera_proxy.cpp | 1 - src/v4l2/v4l2_compat.cpp | 1 - src/v4l2/v4l2_compat_manager.cpp | 1 - 7 files changed, 8 deletions(-) diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp index 4a2048cf..68add4f2 100644 --- a/src/libcamera/v4l2_device.cpp +++ b/src/libcamera/v4l2_device.cpp @@ -8,8 +8,6 @@ #include "libcamera/internal/v4l2_device.h" #include -#include -#include #include #include #include diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp index 82824433..6eaa8f01 100644 --- a/src/libcamera/v4l2_subdevice.cpp +++ b/src/libcamera/v4l2_subdevice.cpp @@ -8,7 +8,6 @@ #include "libcamera/internal/v4l2_subdevice.h" #include -#include #include #include #include diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index 6f32521f..76742e18 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h index 278cc33e..e4e9a626 100644 --- a/src/v4l2/v4l2_camera.h +++ b/src/v4l2/v4l2_camera.h @@ -8,7 +8,6 @@ #pragma once #include -#include #include #include diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp index 3f7c00a2..a020a2b0 100644 --- a/src/v4l2/v4l2_camera_proxy.cpp +++ b/src/v4l2/v4l2_camera_proxy.cpp @@ -8,7 +8,6 @@ #include "v4l2_camera_proxy.h" #include -#include #include #include #include diff --git a/src/v4l2/v4l2_compat.cpp b/src/v4l2/v4l2_compat.cpp index 6c9dca72..ff833f57 100644 --- a/src/v4l2/v4l2_compat.cpp +++ b/src/v4l2/v4l2_compat.cpp @@ -8,7 +8,6 @@ #include "v4l2_compat_manager.h" #include -#include #include #include #include diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp index 6a00afb5..f53fb300 100644 --- a/src/v4l2/v4l2_compat_manager.cpp +++ b/src/v4l2/v4l2_compat_manager.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include From patchwork Fri Aug 30 13:18:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21093 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 6F5BCC32C2 for ; Fri, 30 Aug 2024 13:19:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F018B634E1; Fri, 30 Aug 2024 15:19:48 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="QKhn6Dai"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6BAE5634E2 for ; Fri, 30 Aug 2024 15:19:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M9bfMi4VqzY/pQXJHFXwQBnXfGeaU/HCwM+kT8xn3Z0=; b=QKhn6DaiyxoJ5uk0hQAdigmKFVsVSDYRZctR6I4ENrleKXWXM1rWWNpeU3DT42G5hKAGBR 3WOv7ir/dSe6knABm/38J3dCbBX8KYScEnP5qiF6xaBQFAtB/HJuAPVCCtpzO7LcYRd6+3 MqpcOo4pt7nGyFYdb4hrkOLaBPDzwOQ= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-227-KnKASrOuO2Keikl0MyKqVA-1; Fri, 30 Aug 2024 09:19:34 -0400 X-MC-Unique: KnKASrOuO2Keikl0MyKqVA-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DDC0D1955BF7 for ; Fri, 30 Aug 2024 13:19:33 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7A6FD19560AA; Fri, 30 Aug 2024 13:19:32 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 10/19] libcamera: v4l2: Formatting improvements Date: Fri, 30 Aug 2024 15:18:47 +0200 Message-ID: <20240830131904.1090330-11-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The LSP autoformatter doesn't like some of the current formatting, let's make it happy. Signed-off-by: Milan Zamazal --- src/libcamera/v4l2_device.cpp | 17 ++++++------ src/libcamera/v4l2_subdevice.cpp | 4 +-- src/libcamera/v4l2_videodevice.cpp | 36 ++++++++++++------------- src/v4l2/v4l2_camera_proxy.cpp | 43 ++++++++++++++---------------- src/v4l2/v4l2_compat.cpp | 19 +++++++------ src/v4l2/v4l2_compat_manager.cpp | 4 +-- 6 files changed, 60 insertions(+), 63 deletions(-) diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp index 68add4f2..0da1c5ae 100644 --- a/src/libcamera/v4l2_device.cpp +++ b/src/libcamera/v4l2_device.cpp @@ -424,11 +424,12 @@ int V4L2Device::setFrameStartEnabled(bool enable) if (frameStartEnabled_ == enable) return 0; - struct v4l2_event_subscription event{}; + struct v4l2_event_subscription event { + }; event.type = V4L2_EVENT_FRAME_SYNC; unsigned long request = enable ? VIDIOC_SUBSCRIBE_EVENT - : VIDIOC_UNSUBSCRIBE_EVENT; + : VIDIOC_UNSUBSCRIBE_EVENT; int ret = ioctl(request, &event); if (enable && ret) return ret; @@ -744,7 +745,8 @@ void V4L2Device::updateControls(ControlList *ctrls, */ void V4L2Device::eventAvailable() { - struct v4l2_event event{}; + struct v4l2_event event { + }; int ret = ioctl(VIDIOC_DQEVENT, &event); if (ret < 0) { LOG(V4L2, Error) @@ -766,11 +768,10 @@ void V4L2Device::eventAvailable() static const std::map v4l2ToColorSpace = { { V4L2_COLORSPACE_RAW, ColorSpace::Raw }, - { V4L2_COLORSPACE_SRGB, { - ColorSpace::Primaries::Rec709, - ColorSpace::TransferFunction::Srgb, - ColorSpace::YcbcrEncoding::Rec601, - ColorSpace::Range::Limited } }, + { V4L2_COLORSPACE_SRGB, + { ColorSpace::Primaries::Rec709, + ColorSpace::TransferFunction::Srgb, + ColorSpace::YcbcrEncoding::Rec601, ColorSpace::Range::Limited } }, { V4L2_COLORSPACE_JPEG, ColorSpace::Sycc }, { V4L2_COLORSPACE_SMPTE170M, ColorSpace::Smpte170m }, { V4L2_COLORSPACE_REC709, ColorSpace::Rec709 }, diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp index 6eaa8f01..9f2ec479 100644 --- a/src/libcamera/v4l2_subdevice.cpp +++ b/src/libcamera/v4l2_subdevice.cpp @@ -17,11 +17,11 @@ #include #include -#include - #include #include +#include + #include "libcamera/internal/formats.h" #include "libcamera/internal/media_device.h" #include "libcamera/internal/media_object.h" diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index 76742e18..1e913c88 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -606,13 +606,13 @@ int V4L2VideoDevice::open() if (caps_.isVideoCapture()) { notifierType = EventNotifier::Read; bufferType_ = caps_.isMultiplanar() - ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE - : V4L2_BUF_TYPE_VIDEO_CAPTURE; + ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE + : V4L2_BUF_TYPE_VIDEO_CAPTURE; } else if (caps_.isVideoOutput()) { notifierType = EventNotifier::Write; bufferType_ = caps_.isMultiplanar() - ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE - : V4L2_BUF_TYPE_VIDEO_OUTPUT; + ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE + : V4L2_BUF_TYPE_VIDEO_OUTPUT; } else if (caps_.isMetaCapture()) { notifierType = EventNotifier::Read; bufferType_ = V4L2_BUF_TYPE_META_CAPTURE; @@ -699,14 +699,14 @@ int V4L2VideoDevice::open(SharedFD handle, enum v4l2_buf_type type) case V4L2_BUF_TYPE_VIDEO_OUTPUT: notifierType = EventNotifier::Write; bufferType_ = caps_.isMultiplanar() - ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE - : V4L2_BUF_TYPE_VIDEO_OUTPUT; + ? V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE + : V4L2_BUF_TYPE_VIDEO_OUTPUT; break; case V4L2_BUF_TYPE_VIDEO_CAPTURE: notifierType = EventNotifier::Read; bufferType_ = caps_.isMultiplanar() - ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE - : V4L2_BUF_TYPE_VIDEO_CAPTURE; + ? V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE + : V4L2_BUF_TYPE_VIDEO_CAPTURE; break; default: LOG(V4L2, Error) << "Unsupported buffer type"; @@ -792,7 +792,7 @@ void V4L2VideoDevice::close() std::string V4L2VideoDevice::logPrefix() const { return deviceNode() + "[" + std::to_string(fd()) + - (V4L2_TYPE_IS_OUTPUT(bufferType_) ? ":out]" : ":cap]"); + (V4L2_TYPE_IS_OUTPUT(bufferType_) ? ":out]" : ":cap]"); } /** @@ -1133,7 +1133,7 @@ std::vector V4L2VideoDevice::enumPixelformats(uint32_t code) return {}; } - for (unsigned int index = 0; ; index++) { + for (unsigned int index = 0;; index++) { struct v4l2_fmtdesc pixelformatEnum = {}; pixelformatEnum.index = index; pixelformatEnum.type = bufferType_; @@ -1472,9 +1472,9 @@ std::unique_ptr V4L2VideoDevice::createBuffer(unsigned int index) * account, which is equal to the bytesPerGroup ratio of * the planes. */ - unsigned int stride = format_.planes[0].bpl - * formatInfo_->planes[i].bytesPerGroup - / formatInfo_->planes[0].bytesPerGroup; + unsigned int stride = + format_.planes[0].bpl * formatInfo_->planes[i].bytesPerGroup / + formatInfo_->planes[0].bytesPerGroup; plane.fd = fd; plane.offset = offset; @@ -1827,11 +1827,11 @@ FrameBuffer *V4L2VideoDevice::dequeueBuffer() FrameMetadata &metadata = buffer->_d()->metadata(); metadata.status = buf.flags & V4L2_BUF_FLAG_ERROR - ? FrameMetadata::FrameError - : FrameMetadata::FrameSuccess; + ? FrameMetadata::FrameError + : FrameMetadata::FrameSuccess; metadata.sequence = buf.sequence; - metadata.timestamp = buf.timestamp.tv_sec * 1000000000ULL - + buf.timestamp.tv_usec * 1000ULL; + metadata.timestamp = + buf.timestamp.tv_sec * 1000000000ULL + buf.timestamp.tv_usec * 1000ULL; if (V4L2_TYPE_IS_OUTPUT(buf.type)) return buffer; @@ -1875,7 +1875,7 @@ FrameBuffer *V4L2VideoDevice::dequeueBuffer() * API. */ unsigned int bytesused = multiPlanar ? planes[0].bytesused - : buf.bytesused; + : buf.bytesused; unsigned int remaining = bytesused; for (auto [i, plane] : utils::enumerate(buffer->planes())) { diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp index a020a2b0..56c557b5 100644 --- a/src/v4l2/v4l2_camera_proxy.cpp +++ b/src/v4l2/v4l2_camera_proxy.cpp @@ -179,17 +179,17 @@ void V4L2CameraProxy::setFmtFromConfig(const StreamConfiguration &streamConfig) { const Size &size = streamConfig.size; - v4l2PixFormat_.width = size.width; - v4l2PixFormat_.height = size.height; - v4l2PixFormat_.pixelformat = V4L2PixelFormat::fromPixelFormat(streamConfig.pixelFormat)[0]; - v4l2PixFormat_.field = V4L2_FIELD_NONE; + v4l2PixFormat_.width = size.width; + v4l2PixFormat_.height = size.height; + v4l2PixFormat_.pixelformat = V4L2PixelFormat::fromPixelFormat(streamConfig.pixelFormat)[0]; + v4l2PixFormat_.field = V4L2_FIELD_NONE; v4l2PixFormat_.bytesperline = streamConfig.stride; - v4l2PixFormat_.sizeimage = streamConfig.frameSize; - v4l2PixFormat_.colorspace = V4L2_COLORSPACE_SRGB; - v4l2PixFormat_.priv = V4L2_PIX_FMT_PRIV_MAGIC; - v4l2PixFormat_.ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; + v4l2PixFormat_.sizeimage = streamConfig.frameSize; + v4l2PixFormat_.colorspace = V4L2_COLORSPACE_SRGB; + v4l2PixFormat_.priv = V4L2_PIX_FMT_PRIV_MAGIC; + v4l2PixFormat_.ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; v4l2PixFormat_.quantization = V4L2_QUANTIZATION_DEFAULT; - v4l2PixFormat_.xfer_func = V4L2_XFER_FUNC_DEFAULT; + v4l2PixFormat_.xfer_func = V4L2_XFER_FUNC_DEFAULT; sizeimage_ = streamConfig.frameSize; } @@ -207,11 +207,8 @@ void V4L2CameraProxy::querycap(std::shared_ptr camera) sizeof(capabilities_.bus_info)); /* \todo Put this in a header/config somewhere. */ capabilities_.version = KERNEL_VERSION(5, 2, 0); - capabilities_.device_caps = V4L2_CAP_VIDEO_CAPTURE - | V4L2_CAP_STREAMING - | V4L2_CAP_EXT_PIX_FORMAT; - capabilities_.capabilities = capabilities_.device_caps - | V4L2_CAP_DEVICE_CAPS; + capabilities_.device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING | V4L2_CAP_EXT_PIX_FORMAT; + capabilities_.capabilities = capabilities_.device_caps | V4L2_CAP_DEVICE_CAPS; memset(capabilities_.reserved, 0, sizeof(capabilities_.reserved)); } @@ -330,17 +327,17 @@ int V4L2CameraProxy::tryFormat(struct v4l2_format *arg) return -EINVAL; } - arg->fmt.pix.width = config.size.width; - arg->fmt.pix.height = config.size.height; - arg->fmt.pix.pixelformat = V4L2PixelFormat::fromPixelFormat(config.pixelFormat)[0]; - arg->fmt.pix.field = V4L2_FIELD_NONE; + arg->fmt.pix.width = config.size.width; + arg->fmt.pix.height = config.size.height; + arg->fmt.pix.pixelformat = V4L2PixelFormat::fromPixelFormat(config.pixelFormat)[0]; + arg->fmt.pix.field = V4L2_FIELD_NONE; arg->fmt.pix.bytesperline = config.stride; - arg->fmt.pix.sizeimage = config.frameSize; - arg->fmt.pix.colorspace = V4L2_COLORSPACE_SRGB; - arg->fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC; - arg->fmt.pix.ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; + arg->fmt.pix.sizeimage = config.frameSize; + arg->fmt.pix.colorspace = V4L2_COLORSPACE_SRGB; + arg->fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC; + arg->fmt.pix.ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; arg->fmt.pix.quantization = V4L2_QUANTIZATION_DEFAULT; - arg->fmt.pix.xfer_func = V4L2_XFER_FUNC_DEFAULT; + arg->fmt.pix.xfer_func = V4L2_XFER_FUNC_DEFAULT; return 0; } diff --git a/src/v4l2/v4l2_compat.cpp b/src/v4l2/v4l2_compat.cpp index ff833f57..a18d6cc9 100644 --- a/src/v4l2/v4l2_compat.cpp +++ b/src/v4l2/v4l2_compat.cpp @@ -5,8 +5,6 @@ * V4L2 compatibility layer */ -#include "v4l2_compat_manager.h" - #include #include #include @@ -18,17 +16,19 @@ #include +#include "v4l2_compat_manager.h" + #define LIBCAMERA_PUBLIC __attribute__((visibility("default"))) using namespace libcamera; -#define extract_va_arg(type, arg, last) \ -{ \ - va_list ap; \ - va_start(ap, last); \ - arg = va_arg(ap, type); \ - va_end(ap); \ -} +#define extract_va_arg(type, arg, last) \ + { \ + va_list ap; \ + va_start(ap, last); \ + arg = va_arg(ap, type); \ + va_end(ap); \ + } namespace { @@ -164,5 +164,4 @@ LIBCAMERA_PUBLIC int ioctl(int fd, unsigned long request, ...) return V4L2CompatManager::instance()->ioctl(fd, request, arg); } - } diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp index f53fb300..54aba540 100644 --- a/src/v4l2/v4l2_compat_manager.cpp +++ b/src/v4l2/v4l2_compat_manager.cpp @@ -171,8 +171,8 @@ int V4L2CompatManager::openat(int dirfd, const char *path, int oflag, mode_t mod fops_.close(fd); int efd = eventfd(0, EFD_SEMAPHORE | - ((oflag & O_CLOEXEC) ? EFD_CLOEXEC : 0) | - ((oflag & O_NONBLOCK) ? EFD_NONBLOCK : 0)); + ((oflag & O_CLOEXEC) ? EFD_CLOEXEC : 0) | + ((oflag & O_NONBLOCK) ? EFD_NONBLOCK : 0)); if (efd < 0) return efd; From patchwork Fri Aug 30 13:18:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21094 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 03DBBC324C for ; Fri, 30 Aug 2024 13:19:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6769D634E1; Fri, 30 Aug 2024 15:19:52 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="RrbpzzFj"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 51652634E1 for ; Fri, 30 Aug 2024 15:19:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Oamet7IwBoNlXGKxprtbvcgZm97rhUZjtxLNc/Ss54U=; b=RrbpzzFjvOr7dCcap266IbU84rDC9qKhmkIm5OkdmF9vRogLEB7oNwRy6k8N1GRnJWylgL TIZxta7oaUxhWfFBRunOcJkrjldWXGfktX6YWQqUTvgOJr17uIG5hBpBXoGHEUu7zI4Zhe RC3EZp0i8ie2hf+vlpw7ASecxVgLMG4= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-311-6J7KxMWbPUWn690JVocySw-1; Fri, 30 Aug 2024 09:19:36 -0400 X-MC-Unique: 6J7KxMWbPUWn690JVocySw-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C9A061955BF1 for ; Fri, 30 Aug 2024 13:19:35 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3C53019560AA; Fri, 30 Aug 2024 13:19:33 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 11/19] libcamera: v4l2_subdevice: Formatting improvements Date: Fri, 30 Aug 2024 15:18:48 +0200 Message-ID: <20240830131904.1090330-12-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The LSP autoformatter doesn't like some of the current formatting, let's make it happy. In v4l2_subdevice.cpp, this causes larger changes, extracted to a separate patch. Signed-off-by: Milan Zamazal --- src/libcamera/v4l2_subdevice.cpp | 1306 ++++++++++++++++-------------- 1 file changed, 693 insertions(+), 613 deletions(-) diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp index 9f2ec479..38b448dc 100644 --- a/src/libcamera/v4l2_subdevice.cpp +++ b/src/libcamera/v4l2_subdevice.cpp @@ -90,616 +90,695 @@ namespace { const std::map mediaBusFormatInfo{ /* This table is sorted to match the order in linux/media-bus-format.h */ - { MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE, { - .name = "RGB444_2X8_PADHI_BE", - .code = MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE, { - .name = "RGB444_2X8_PADHI_LE", - .code = MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE, { - .name = "RGB555_2X8_PADHI_BE", - .code = MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE, { - .name = "RGB555_2X8_PADHI_LE", - .code = MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_RGB565_1X16, { - .name = "RGB565_1X16", - .code = MEDIA_BUS_FMT_RGB565_1X16, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_BGR565_2X8_BE, { - .name = "BGR565_2X8_BE", - .code = MEDIA_BUS_FMT_BGR565_2X8_BE, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_BGR565_2X8_LE, { - .name = "BGR565_2X8_LE", - .code = MEDIA_BUS_FMT_BGR565_2X8_LE, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_RGB565_2X8_BE, { - .name = "RGB565_2X8_BE", - .code = MEDIA_BUS_FMT_RGB565_2X8_BE, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_RGB565_2X8_LE, { - .name = "RGB565_2X8_LE", - .code = MEDIA_BUS_FMT_RGB565_2X8_LE, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_RGB666_1X18, { - .name = "RGB666_1X18", - .code = MEDIA_BUS_FMT_RGB666_1X18, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 18, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_BGR888_1X24, { - .name = "BGR888_1X24", - .code = MEDIA_BUS_FMT_BGR888_1X24, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 24, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_RGB888_1X24, { - .name = "RGB888_1X24", - .code = MEDIA_BUS_FMT_RGB888_1X24, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 24, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_RGB888_2X12_BE, { - .name = "RGB888_2X12_BE", - .code = MEDIA_BUS_FMT_RGB888_2X12_BE, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 24, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_RGB888_2X12_LE, { - .name = "RGB888_2X12_LE", - .code = MEDIA_BUS_FMT_RGB888_2X12_LE, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 24, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_ARGB8888_1X32, { - .name = "ARGB8888_1X32", - .code = MEDIA_BUS_FMT_ARGB8888_1X32, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 32, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_Y8_1X8, { - .name = "Y8_1X8", - .code = MEDIA_BUS_FMT_Y8_1X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_UV8_1X8, { - .name = "UV8_1X8", - .code = MEDIA_BUS_FMT_UV8_1X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_UYVY8_1_5X8, { - .name = "UYVY8_1_5X8", - .code = MEDIA_BUS_FMT_UYVY8_1_5X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 12, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_VYUY8_1_5X8, { - .name = "VYUY8_1_5X8", - .code = MEDIA_BUS_FMT_VYUY8_1_5X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 12, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YUYV8_1_5X8, { - .name = "YUYV8_1_5X8", - .code = MEDIA_BUS_FMT_YUYV8_1_5X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 12, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YVYU8_1_5X8, { - .name = "YVYU8_1_5X8", - .code = MEDIA_BUS_FMT_YVYU8_1_5X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 12, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_UYVY8_2X8, { - .name = "UYVY8_2X8", - .code = MEDIA_BUS_FMT_UYVY8_2X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_VYUY8_2X8, { - .name = "VYUY8_2X8", - .code = MEDIA_BUS_FMT_VYUY8_2X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YUYV8_2X8, { - .name = "YUYV8_2X8", - .code = MEDIA_BUS_FMT_YUYV8_2X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YVYU8_2X8, { - .name = "YVYU8_2X8", - .code = MEDIA_BUS_FMT_YVYU8_2X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_Y10_1X10, { - .name = "Y10_1X10", - .code = MEDIA_BUS_FMT_Y10_1X10, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 10, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_UYVY10_2X10, { - .name = "UYVY10_2X10", - .code = MEDIA_BUS_FMT_UYVY10_2X10, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 20, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_VYUY10_2X10, { - .name = "VYUY10_2X10", - .code = MEDIA_BUS_FMT_VYUY10_2X10, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 20, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YUYV10_2X10, { - .name = "YUYV10_2X10", - .code = MEDIA_BUS_FMT_YUYV10_2X10, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 20, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YVYU10_2X10, { - .name = "YVYU10_2X10", - .code = MEDIA_BUS_FMT_YVYU10_2X10, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 20, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_Y12_1X12, { - .name = "Y12_1X12", - .code = MEDIA_BUS_FMT_Y12_1X12, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 12, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_Y16_1X16, { - .name = "Y16_1X16", - .code = MEDIA_BUS_FMT_Y16_1X16, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_UYVY8_1X16, { - .name = "UYVY8_1X16", - .code = MEDIA_BUS_FMT_UYVY8_1X16, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_VYUY8_1X16, { - .name = "VYUY8_1X16", - .code = MEDIA_BUS_FMT_VYUY8_1X16, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YUYV8_1X16, { - .name = "YUYV8_1X16", - .code = MEDIA_BUS_FMT_YUYV8_1X16, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YVYU8_1X16, { - .name = "YVYU8_1X16", - .code = MEDIA_BUS_FMT_YVYU8_1X16, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YDYUYDYV8_1X16, { - .name = "YDYUYDYV8_1X16", - .code = MEDIA_BUS_FMT_YDYUYDYV8_1X16, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_UYVY10_1X20, { - .name = "UYVY10_1X20", - .code = MEDIA_BUS_FMT_UYVY10_1X20, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 20, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_VYUY10_1X20, { - .name = "VYUY10_1X20", - .code = MEDIA_BUS_FMT_VYUY10_1X20, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 20, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YUYV10_1X20, { - .name = "YUYV10_1X20", - .code = MEDIA_BUS_FMT_YUYV10_1X20, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 20, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YVYU10_1X20, { - .name = "YVYU10_1X20", - .code = MEDIA_BUS_FMT_YVYU10_1X20, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 20, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YUV8_1X24, { - .name = "YUV8_1X24", - .code = MEDIA_BUS_FMT_YUV8_1X24, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 24, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YUV10_1X30, { - .name = "YUV10_1X30", - .code = MEDIA_BUS_FMT_YUV10_1X30, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 30, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_AYUV8_1X32, { - .name = "AYUV8_1X32", - .code = MEDIA_BUS_FMT_AYUV8_1X32, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 32, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_UYVY12_2X12, { - .name = "UYVY12_2X12", - .code = MEDIA_BUS_FMT_UYVY12_2X12, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 24, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_VYUY12_2X12, { - .name = "VYUY12_2X12", - .code = MEDIA_BUS_FMT_VYUY12_2X12, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 24, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YUYV12_2X12, { - .name = "YUYV12_2X12", - .code = MEDIA_BUS_FMT_YUYV12_2X12, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 24, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YVYU12_2X12, { - .name = "YVYU12_2X12", - .code = MEDIA_BUS_FMT_YVYU12_2X12, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 24, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_UYVY12_1X24, { - .name = "UYVY12_1X24", - .code = MEDIA_BUS_FMT_UYVY12_1X24, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 24, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_VYUY12_1X24, { - .name = "VYUY12_1X24", - .code = MEDIA_BUS_FMT_VYUY12_1X24, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 24, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YUYV12_1X24, { - .name = "YUYV12_1X24", - .code = MEDIA_BUS_FMT_YUYV12_1X24, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 24, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_YVYU12_1X24, { - .name = "YVYU12_1X24", - .code = MEDIA_BUS_FMT_YVYU12_1X24, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 24, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_SBGGR8_1X8, { - .name = "SBGGR8_1X8", - .code = MEDIA_BUS_FMT_SBGGR8_1X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SGBRG8_1X8, { - .name = "SGBRG8_1X8", - .code = MEDIA_BUS_FMT_SGBRG8_1X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SGRBG8_1X8, { - .name = "SGRBG8_1X8", - .code = MEDIA_BUS_FMT_SGRBG8_1X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SRGGB8_1X8, { - .name = "SRGGB8_1X8", - .code = MEDIA_BUS_FMT_SRGGB8_1X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8, { - .name = "SBGGR10_ALAW8_1X8", - .code = MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8, { - .name = "SGBRG10_ALAW8_1X8", - .code = MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8, { - .name = "SGRBG10_ALAW8_1X8", - .code = MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8, { - .name = "SRGGB10_ALAW8_1X8", - .code = MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8, { - .name = "SBGGR10_DPCM8_1X8", - .code = MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8, { - .name = "SGBRG10_DPCM8_1X8", - .code = MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8, { - .name = "SGRBG10_DPCM8_1X8", - .code = MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8, { - .name = "SRGGB10_DPCM8_1X8", - .code = MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE, { - .name = "SBGGR10_2X8_PADHI_BE", - .code = MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE, { - .name = "SBGGR10_2X8_PADHI_LE", - .code = MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE, { - .name = "SBGGR10_2X8_PADLO_BE", - .code = MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE, { - .name = "SBGGR10_2X8_PADLO_LE", - .code = MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SBGGR10_1X10, { - .name = "SBGGR10_1X10", - .code = MEDIA_BUS_FMT_SBGGR10_1X10, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 10, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SGBRG10_1X10, { - .name = "SGBRG10_1X10", - .code = MEDIA_BUS_FMT_SGBRG10_1X10, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 10, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SGRBG10_1X10, { - .name = "SGRBG10_1X10", - .code = MEDIA_BUS_FMT_SGRBG10_1X10, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 10, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SRGGB10_1X10, { - .name = "SRGGB10_1X10", - .code = MEDIA_BUS_FMT_SRGGB10_1X10, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 10, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SBGGR12_1X12, { - .name = "SBGGR12_1X12", - .code = MEDIA_BUS_FMT_SBGGR12_1X12, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 12, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SGBRG12_1X12, { - .name = "SGBRG12_1X12", - .code = MEDIA_BUS_FMT_SGBRG12_1X12, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 12, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SGRBG12_1X12, { - .name = "SGRBG12_1X12", - .code = MEDIA_BUS_FMT_SGRBG12_1X12, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 12, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SRGGB12_1X12, { - .name = "SRGGB12_1X12", - .code = MEDIA_BUS_FMT_SRGGB12_1X12, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 12, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SBGGR14_1X14, { - .name = "SBGGR14_1X14", - .code = MEDIA_BUS_FMT_SBGGR14_1X14, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 14, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SGBRG14_1X14, { - .name = "SGBRG14_1X14", - .code = MEDIA_BUS_FMT_SGBRG14_1X14, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 14, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SGRBG14_1X14, { - .name = "SGRBG14_1X14", - .code = MEDIA_BUS_FMT_SGRBG14_1X14, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 14, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SRGGB14_1X14, { - .name = "SRGGB14_1X14", - .code = MEDIA_BUS_FMT_SRGGB14_1X14, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 14, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, - { MEDIA_BUS_FMT_SBGGR16_1X16, { - .name = "SBGGR16_1X16", - .code = MEDIA_BUS_FMT_SBGGR16_1X16, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW - } }, - { MEDIA_BUS_FMT_SGBRG16_1X16, { - .name = "SGBRG16_1X16", - .code = MEDIA_BUS_FMT_SGBRG16_1X16, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW - } }, - { MEDIA_BUS_FMT_SGRBG16_1X16, { - .name = "SGRBG16_1X16", - .code = MEDIA_BUS_FMT_SGRBG16_1X16, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW - } }, - { MEDIA_BUS_FMT_SRGGB16_1X16, { - .name = "SRGGB16_1X16", - .code = MEDIA_BUS_FMT_SRGGB16_1X16, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW - } }, + { MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE, + { + .name = "RGB444_2X8_PADHI_BE", + .code = MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE, + { + .name = "RGB444_2X8_PADHI_LE", + .code = MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE, + { + .name = "RGB555_2X8_PADHI_BE", + .code = MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE, + { + .name = "RGB555_2X8_PADHI_LE", + .code = MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_RGB565_1X16, + { + .name = "RGB565_1X16", + .code = MEDIA_BUS_FMT_RGB565_1X16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_BGR565_2X8_BE, + { + .name = "BGR565_2X8_BE", + .code = MEDIA_BUS_FMT_BGR565_2X8_BE, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_BGR565_2X8_LE, + { + .name = "BGR565_2X8_LE", + .code = MEDIA_BUS_FMT_BGR565_2X8_LE, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_RGB565_2X8_BE, + { + .name = "RGB565_2X8_BE", + .code = MEDIA_BUS_FMT_RGB565_2X8_BE, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_RGB565_2X8_LE, + { + .name = "RGB565_2X8_LE", + .code = MEDIA_BUS_FMT_RGB565_2X8_LE, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_RGB666_1X18, + { + .name = "RGB666_1X18", + .code = MEDIA_BUS_FMT_RGB666_1X18, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 18, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_BGR888_1X24, + { + .name = "BGR888_1X24", + .code = MEDIA_BUS_FMT_BGR888_1X24, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 24, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_RGB888_1X24, + { + .name = "RGB888_1X24", + .code = MEDIA_BUS_FMT_RGB888_1X24, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 24, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_RGB888_2X12_BE, + { + .name = "RGB888_2X12_BE", + .code = MEDIA_BUS_FMT_RGB888_2X12_BE, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 24, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_RGB888_2X12_LE, + { + .name = "RGB888_2X12_LE", + .code = MEDIA_BUS_FMT_RGB888_2X12_LE, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 24, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_ARGB8888_1X32, + { + .name = "ARGB8888_1X32", + .code = MEDIA_BUS_FMT_ARGB8888_1X32, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 32, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_Y8_1X8, + { + .name = "Y8_1X8", + .code = MEDIA_BUS_FMT_Y8_1X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_UV8_1X8, + { + .name = "UV8_1X8", + .code = MEDIA_BUS_FMT_UV8_1X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_UYVY8_1_5X8, + { + .name = "UYVY8_1_5X8", + .code = MEDIA_BUS_FMT_UYVY8_1_5X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 12, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_VYUY8_1_5X8, + { + .name = "VYUY8_1_5X8", + .code = MEDIA_BUS_FMT_VYUY8_1_5X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 12, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YUYV8_1_5X8, + { + .name = "YUYV8_1_5X8", + .code = MEDIA_BUS_FMT_YUYV8_1_5X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 12, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YVYU8_1_5X8, + { + .name = "YVYU8_1_5X8", + .code = MEDIA_BUS_FMT_YVYU8_1_5X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 12, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_UYVY8_2X8, + { + .name = "UYVY8_2X8", + .code = MEDIA_BUS_FMT_UYVY8_2X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_VYUY8_2X8, + { + .name = "VYUY8_2X8", + .code = MEDIA_BUS_FMT_VYUY8_2X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YUYV8_2X8, + { + .name = "YUYV8_2X8", + .code = MEDIA_BUS_FMT_YUYV8_2X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YVYU8_2X8, + { + .name = "YVYU8_2X8", + .code = MEDIA_BUS_FMT_YVYU8_2X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_Y10_1X10, + { + .name = "Y10_1X10", + .code = MEDIA_BUS_FMT_Y10_1X10, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 10, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_UYVY10_2X10, + { + .name = "UYVY10_2X10", + .code = MEDIA_BUS_FMT_UYVY10_2X10, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 20, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_VYUY10_2X10, + { + .name = "VYUY10_2X10", + .code = MEDIA_BUS_FMT_VYUY10_2X10, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 20, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YUYV10_2X10, + { + .name = "YUYV10_2X10", + .code = MEDIA_BUS_FMT_YUYV10_2X10, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 20, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YVYU10_2X10, + { + .name = "YVYU10_2X10", + .code = MEDIA_BUS_FMT_YVYU10_2X10, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 20, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_Y12_1X12, + { + .name = "Y12_1X12", + .code = MEDIA_BUS_FMT_Y12_1X12, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 12, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_Y16_1X16, + { + .name = "Y16_1X16", + .code = MEDIA_BUS_FMT_Y16_1X16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_UYVY8_1X16, + { + .name = "UYVY8_1X16", + .code = MEDIA_BUS_FMT_UYVY8_1X16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_VYUY8_1X16, + { + .name = "VYUY8_1X16", + .code = MEDIA_BUS_FMT_VYUY8_1X16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YUYV8_1X16, + { + .name = "YUYV8_1X16", + .code = MEDIA_BUS_FMT_YUYV8_1X16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YVYU8_1X16, + { + .name = "YVYU8_1X16", + .code = MEDIA_BUS_FMT_YVYU8_1X16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YDYUYDYV8_1X16, + { + .name = "YDYUYDYV8_1X16", + .code = MEDIA_BUS_FMT_YDYUYDYV8_1X16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_UYVY10_1X20, + { + .name = "UYVY10_1X20", + .code = MEDIA_BUS_FMT_UYVY10_1X20, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 20, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_VYUY10_1X20, + { + .name = "VYUY10_1X20", + .code = MEDIA_BUS_FMT_VYUY10_1X20, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 20, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YUYV10_1X20, + { + .name = "YUYV10_1X20", + .code = MEDIA_BUS_FMT_YUYV10_1X20, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 20, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YVYU10_1X20, + { + .name = "YVYU10_1X20", + .code = MEDIA_BUS_FMT_YVYU10_1X20, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 20, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YUV8_1X24, + { + .name = "YUV8_1X24", + .code = MEDIA_BUS_FMT_YUV8_1X24, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 24, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YUV10_1X30, + { + .name = "YUV10_1X30", + .code = MEDIA_BUS_FMT_YUV10_1X30, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 30, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_AYUV8_1X32, + { + .name = "AYUV8_1X32", + .code = MEDIA_BUS_FMT_AYUV8_1X32, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 32, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_UYVY12_2X12, + { + .name = "UYVY12_2X12", + .code = MEDIA_BUS_FMT_UYVY12_2X12, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 24, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_VYUY12_2X12, + { + .name = "VYUY12_2X12", + .code = MEDIA_BUS_FMT_VYUY12_2X12, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 24, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YUYV12_2X12, + { + .name = "YUYV12_2X12", + .code = MEDIA_BUS_FMT_YUYV12_2X12, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 24, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YVYU12_2X12, + { + .name = "YVYU12_2X12", + .code = MEDIA_BUS_FMT_YVYU12_2X12, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 24, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_UYVY12_1X24, + { + .name = "UYVY12_1X24", + .code = MEDIA_BUS_FMT_UYVY12_1X24, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 24, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_VYUY12_1X24, + { + .name = "VYUY12_1X24", + .code = MEDIA_BUS_FMT_VYUY12_1X24, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 24, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YUYV12_1X24, + { + .name = "YUYV12_1X24", + .code = MEDIA_BUS_FMT_YUYV12_1X24, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 24, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_YVYU12_1X24, + { + .name = "YVYU12_1X24", + .code = MEDIA_BUS_FMT_YVYU12_1X24, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 24, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_SBGGR8_1X8, + { + .name = "SBGGR8_1X8", + .code = MEDIA_BUS_FMT_SBGGR8_1X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SGBRG8_1X8, + { + .name = "SGBRG8_1X8", + .code = MEDIA_BUS_FMT_SGBRG8_1X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SGRBG8_1X8, + { + .name = "SGRBG8_1X8", + .code = MEDIA_BUS_FMT_SGRBG8_1X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SRGGB8_1X8, + { + .name = "SRGGB8_1X8", + .code = MEDIA_BUS_FMT_SRGGB8_1X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8, + { + .name = "SBGGR10_ALAW8_1X8", + .code = MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8, + { + .name = "SGBRG10_ALAW8_1X8", + .code = MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8, + { + .name = "SGRBG10_ALAW8_1X8", + .code = MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8, + { + .name = "SRGGB10_ALAW8_1X8", + .code = MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8, + { + .name = "SBGGR10_DPCM8_1X8", + .code = MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8, + { + .name = "SGBRG10_DPCM8_1X8", + .code = MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8, + { + .name = "SGRBG10_DPCM8_1X8", + .code = MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8, + { + .name = "SRGGB10_DPCM8_1X8", + .code = MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE, + { + .name = "SBGGR10_2X8_PADHI_BE", + .code = MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE, + { + .name = "SBGGR10_2X8_PADHI_LE", + .code = MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE, + { + .name = "SBGGR10_2X8_PADLO_BE", + .code = MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE, + { + .name = "SBGGR10_2X8_PADLO_LE", + .code = MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SBGGR10_1X10, + { + .name = "SBGGR10_1X10", + .code = MEDIA_BUS_FMT_SBGGR10_1X10, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 10, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SGBRG10_1X10, + { + .name = "SGBRG10_1X10", + .code = MEDIA_BUS_FMT_SGBRG10_1X10, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 10, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SGRBG10_1X10, + { + .name = "SGRBG10_1X10", + .code = MEDIA_BUS_FMT_SGRBG10_1X10, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 10, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SRGGB10_1X10, + { + .name = "SRGGB10_1X10", + .code = MEDIA_BUS_FMT_SRGGB10_1X10, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 10, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SBGGR12_1X12, + { + .name = "SBGGR12_1X12", + .code = MEDIA_BUS_FMT_SBGGR12_1X12, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 12, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SGBRG12_1X12, + { + .name = "SGBRG12_1X12", + .code = MEDIA_BUS_FMT_SGBRG12_1X12, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 12, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SGRBG12_1X12, + { + .name = "SGRBG12_1X12", + .code = MEDIA_BUS_FMT_SGRBG12_1X12, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 12, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SRGGB12_1X12, + { + .name = "SRGGB12_1X12", + .code = MEDIA_BUS_FMT_SRGGB12_1X12, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 12, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SBGGR14_1X14, + { + .name = "SBGGR14_1X14", + .code = MEDIA_BUS_FMT_SBGGR14_1X14, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 14, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SGBRG14_1X14, + { + .name = "SGBRG14_1X14", + .code = MEDIA_BUS_FMT_SGBRG14_1X14, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 14, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SGRBG14_1X14, + { + .name = "SGRBG14_1X14", + .code = MEDIA_BUS_FMT_SGRBG14_1X14, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 14, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SRGGB14_1X14, + { + .name = "SRGGB14_1X14", + .code = MEDIA_BUS_FMT_SRGGB14_1X14, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 14, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, + { MEDIA_BUS_FMT_SBGGR16_1X16, + { .name = "SBGGR16_1X16", + .code = MEDIA_BUS_FMT_SBGGR16_1X16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW } }, + { MEDIA_BUS_FMT_SGBRG16_1X16, + { .name = "SGBRG16_1X16", + .code = MEDIA_BUS_FMT_SGBRG16_1X16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW } }, + { MEDIA_BUS_FMT_SGRBG16_1X16, + { .name = "SGRBG16_1X16", + .code = MEDIA_BUS_FMT_SGRBG16_1X16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW } }, + { MEDIA_BUS_FMT_SRGGB16_1X16, + { .name = "SRGGB16_1X16", + .code = MEDIA_BUS_FMT_SRGGB16_1X16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW } }, /* \todo Clarify colour encoding for HSV formats */ - { MEDIA_BUS_FMT_AHSV8888_1X32, { - .name = "AHSV8888_1X32", - .code = MEDIA_BUS_FMT_AHSV8888_1X32, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 32, - .colourEncoding = PixelFormatInfo::ColourEncodingRGB, - } }, - { MEDIA_BUS_FMT_JPEG_1X8, { - .name = "JPEG_1X8", - .code = MEDIA_BUS_FMT_JPEG_1X8, - .type = MediaBusFormatInfo::Type::Image, - .bitsPerPixel = 8, - .colourEncoding = PixelFormatInfo::ColourEncodingYUV, - } }, - { MEDIA_BUS_FMT_METADATA_FIXED, { - .name = "METADATA_FIXED", - .code = MEDIA_BUS_FMT_METADATA_FIXED, - .type = MediaBusFormatInfo::Type::Metadata, - .bitsPerPixel = 0, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW, - } }, + { MEDIA_BUS_FMT_AHSV8888_1X32, + { + .name = "AHSV8888_1X32", + .code = MEDIA_BUS_FMT_AHSV8888_1X32, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 32, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + } }, + { MEDIA_BUS_FMT_JPEG_1X8, + { + .name = "JPEG_1X8", + .code = MEDIA_BUS_FMT_JPEG_1X8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + } }, + { MEDIA_BUS_FMT_METADATA_FIXED, + { + .name = "METADATA_FIXED", + .code = MEDIA_BUS_FMT_METADATA_FIXED, + .type = MediaBusFormatInfo::Type::Metadata, + .bitsPerPixel = 0, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + } }, }; } /* namespace */ @@ -1037,7 +1116,8 @@ int V4L2Subdevice::open() /* If the subdev supports streams, enable the streams API. */ if (caps_.hasStreams()) { - struct v4l2_subdev_client_capability clientCaps{}; + struct v4l2_subdev_client_capability clientCaps { + }; clientCaps.capabilities = V4L2_SUBDEV_CLIENT_CAP_STREAMS; ret = ioctl(VIDIOC_SUBDEV_S_CLIENT_CAP, &clientCaps); @@ -1376,8 +1456,8 @@ struct v4l2_subdev_routing_legacy { __u32 reserved[6]; }; -#define VIDIOC_SUBDEV_G_ROUTING_LEGACY _IOWR('V', 38, struct v4l2_subdev_routing_legacy) -#define VIDIOC_SUBDEV_S_ROUTING_LEGACY _IOWR('V', 39, struct v4l2_subdev_routing_legacy) +#define VIDIOC_SUBDEV_G_ROUTING_LEGACY _IOWR('V', 38, struct v4l2_subdev_routing_legacy) +#define VIDIOC_SUBDEV_S_ROUTING_LEGACY _IOWR('V', 39, struct v4l2_subdev_routing_legacy) } /* namespace */ @@ -1665,7 +1745,7 @@ std::vector V4L2Subdevice::enumPadCodes(const Stream &stream) std::vector codes; int ret; - for (unsigned int index = 0; ; index++) { + for (unsigned int index = 0;; index++) { struct v4l2_subdev_mbus_code_enum mbusEnum = {}; mbusEnum.pad = stream.pad; mbusEnum.stream = stream.stream; From patchwork Fri Aug 30 13:18:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21095 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 3DD9FC32D6 for ; Fri, 30 Aug 2024 13:19:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 788ED634E4; Fri, 30 Aug 2024 15:19:54 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="R4JjaDBI"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B1FF6634DF for ; Fri, 30 Aug 2024 15:19:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tKYbVOMzgoXLoswz943UkELrb0Mj9eFvRPf5DEuzq6M=; b=R4JjaDBIqn8jmo5m0L6x8gnVvKlp5rNAp/I5pMmWUuikw6ueZXGpvm5DG3HaTpe+C1ryyO GOeKcAAoubuWbG6hzP8MLePyJDQNbU0XIAR7bH+WFDYGfNaFTNR+xgWyhItMLl9B7T22bt fm4RDaxh7O41MlPcC7F1Oclb62niMRc= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-649-LO8gnTEdOheNZ6eEzgQKrg-1; Fri, 30 Aug 2024 09:19:38 -0400 X-MC-Unique: LO8gnTEdOheNZ6eEzgQKrg-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 891131955BED for ; Fri, 30 Aug 2024 13:19:37 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 357C219560AA; Fri, 30 Aug 2024 13:19:35 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 12/19] libcamera: v4l2: Fix indirect include Date: Fri, 30 Aug 2024 15:18:49 +0200 Message-ID: <20240830131904.1090330-13-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Use the direct include of V4L2PixelFormat. Signed-off-by: Milan Zamazal --- src/v4l2/v4l2_camera_proxy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp index 56c557b5..2267b6ee 100644 --- a/src/v4l2/v4l2_camera_proxy.cpp +++ b/src/v4l2/v4l2_camera_proxy.cpp @@ -24,7 +24,7 @@ #include #include -#include "libcamera/internal/formats.h" +#include "libcamera/internal/v4l2_pixelformat.h" #include "v4l2_camera.h" #include "v4l2_camera_file.h" From patchwork Fri Aug 30 13:18:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21096 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 25A62C32D5 for ; Fri, 30 Aug 2024 13:19:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 522BA634E4; Fri, 30 Aug 2024 15:19:57 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="cFNgjP0O"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BEC25634CA for ; Fri, 30 Aug 2024 15:19:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9ZlhuE8PmiAFPObVApeQHDKiur3xFxME9LuNnA5ZZXA=; b=cFNgjP0O7a+3Fph/hwUl86KIUynr2n11t8jTn9ZZ2GaIZmxgkChyBWqTRjYZssAobXCfcj V6v6cOOZkaI/uIoM5dW8+JVrcyfvGYw4eN8GeGewQoesbGLZIddSxUtsg19KV2dMXa4DEu sQ5wNVrhmWBwhpCGkMaeiVCY4i59aCc= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-325-fIvPPDKCN-22sNHRvOfXRA-1; Fri, 30 Aug 2024 09:19:41 -0400 X-MC-Unique: fIvPPDKCN-22sNHRvOfXRA-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7FD281955D58 for ; Fri, 30 Aug 2024 13:19:39 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 20ACB19560AA; Fri, 30 Aug 2024 13:19:37 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 13/19] libcamera: ipa: Remove unused includes Date: Fri, 30 Aug 2024 15:18:50 +0200 Message-ID: <20240830131904.1090330-14-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The includes that are not used can be removed. Signed-off-by: Milan Zamazal --- include/libcamera/ipa/ipa_interface.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h index 7c835e98..2fdc085e 100644 --- a/include/libcamera/ipa/ipa_interface.h +++ b/include/libcamera/ipa/ipa_interface.h @@ -7,11 +7,6 @@ #pragma once -#include -#include -#include -#include - #include #include From patchwork Fri Aug 30 13:18:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21097 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 6536BC32D9 for ; Fri, 30 Aug 2024 13:20:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B874A634E6; Fri, 30 Aug 2024 15:19:59 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="HpdeF4US"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7DFFF634E6 for ; Fri, 30 Aug 2024 15:19:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t0XXIy6FoNHTn2xpxmNvFCoW2WkxlaT9Uzbi7AfrBMM=; b=HpdeF4UStZxzehtzUAL90/MuldMkVNAk5t0HCU2VDeQmBYPDw/twPxK3RPvw9ihrcZN2vg P72u7jCyWzpk4FTZh5NDh7tccA6swZtNw8j3QQaJl9a5OKZD9qNACrF0ZDnNCRluqJ/+vn LBvkko0vIncH03VU0FrvcH46va/e9fA= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-639-VbJUndHWP1qNTT8C7-TOWQ-1; Fri, 30 Aug 2024 09:19:42 -0400 X-MC-Unique: VbJUndHWP1qNTT8C7-TOWQ-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3A7C31955D4E for ; Fri, 30 Aug 2024 13:19:41 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EF97919560AA; Fri, 30 Aug 2024 13:19:39 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 14/19] libcamera: libcamera: Remove unused includes Date: Fri, 30 Aug 2024 15:18:51 +0200 Message-ID: <20240830131904.1090330-15-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The includes that are not used can be removed. Signed-off-by: Milan Zamazal --- src/libcamera/base/event_dispatcher_poll.cpp | 1 - src/libcamera/camera.cpp | 2 -- src/libcamera/controls.cpp | 1 - src/libcamera/converter/converter_v4l2_m2m.cpp | 1 - src/libcamera/formats.cpp | 3 --- src/libcamera/ipa_module.cpp | 1 - src/libcamera/ipa_proxy.cpp | 1 - src/libcamera/orientation.cpp | 1 - src/libcamera/pipeline_handler.cpp | 1 - src/libcamera/process.cpp | 1 - src/libcamera/sensor/camera_sensor.cpp | 2 -- src/libcamera/shared_mem_object.cpp | 1 - src/libcamera/stream.cpp | 2 -- 13 files changed, 18 deletions(-) diff --git a/src/libcamera/base/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp index b737ca7a..86a26f36 100644 --- a/src/libcamera/base/event_dispatcher_poll.cpp +++ b/src/libcamera/base/event_dispatcher_poll.cpp @@ -7,7 +7,6 @@ #include -#include #include #include #include diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 382a68f7..88210ff3 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -9,7 +9,6 @@ #include #include -#include #include #include @@ -21,7 +20,6 @@ #include "libcamera/internal/camera.h" #include "libcamera/internal/camera_controls.h" -#include "libcamera/internal/formats.h" #include "libcamera/internal/pipeline_handler.h" #include "libcamera/internal/request.h" diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp index 11d35321..67400797 100644 --- a/src/libcamera/controls.cpp +++ b/src/libcamera/controls.cpp @@ -7,7 +7,6 @@ #include -#include #include #include #include diff --git a/src/libcamera/converter/converter_v4l2_m2m.cpp b/src/libcamera/converter/converter_v4l2_m2m.cpp index 006ba9f7..e4f656da 100644 --- a/src/libcamera/converter/converter_v4l2_m2m.cpp +++ b/src/libcamera/converter/converter_v4l2_m2m.cpp @@ -8,7 +8,6 @@ #include "libcamera/internal/converter/converter_v4l2_m2m.h" -#include #include #include diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index 1d1d9a30..3ee89590 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -7,9 +7,6 @@ #include "libcamera/internal/formats.h" -#include -#include - #include #include diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp index 0756b691..86d88a86 100644 --- a/src/libcamera/ipa_module.cpp +++ b/src/libcamera/ipa_module.cpp @@ -8,7 +8,6 @@ #include "libcamera/internal/ipa_module.h" #include -#include #include #include #include diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp index 69975d8f..85004737 100644 --- a/src/libcamera/ipa_proxy.cpp +++ b/src/libcamera/ipa_proxy.cpp @@ -7,7 +7,6 @@ #include "libcamera/internal/ipa_proxy.h" -#include #include #include #include diff --git a/src/libcamera/orientation.cpp b/src/libcamera/orientation.cpp index fd191197..bf960249 100644 --- a/src/libcamera/orientation.cpp +++ b/src/libcamera/orientation.cpp @@ -8,7 +8,6 @@ #include #include -#include /** * \file orientation.h diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp index 1fc22d6a..a63d3503 100644 --- a/src/libcamera/pipeline_handler.cpp +++ b/src/libcamera/pipeline_handler.cpp @@ -22,7 +22,6 @@ #include "libcamera/internal/camera.h" #include "libcamera/internal/camera_manager.h" #include "libcamera/internal/device_enumerator.h" -#include "libcamera/internal/framebuffer.h" #include "libcamera/internal/media_device.h" #include "libcamera/internal/request.h" #include "libcamera/internal/tracepoints.h" diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp index 86d27b2d..c0f4d49f 100644 --- a/src/libcamera/process.cpp +++ b/src/libcamera/process.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/src/libcamera/sensor/camera_sensor.cpp b/src/libcamera/sensor/camera_sensor.cpp index c6d7f801..1382081a 100644 --- a/src/libcamera/sensor/camera_sensor.cpp +++ b/src/libcamera/sensor/camera_sensor.cpp @@ -10,7 +10,6 @@ #include #include -#include #include #include #include @@ -24,7 +23,6 @@ #include "libcamera/internal/bayer_format.h" #include "libcamera/internal/camera_lens.h" #include "libcamera/internal/camera_sensor_properties.h" -#include "libcamera/internal/formats.h" #include "libcamera/internal/sysfs.h" /** diff --git a/src/libcamera/shared_mem_object.cpp b/src/libcamera/shared_mem_object.cpp index d4c7991a..65b53919 100644 --- a/src/libcamera/shared_mem_object.cpp +++ b/src/libcamera/shared_mem_object.cpp @@ -10,7 +10,6 @@ #include "libcamera/internal/shared_mem_object.h" -#include #include #include #include diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp index 053cc4b8..e70688f6 100644 --- a/src/libcamera/stream.cpp +++ b/src/libcamera/stream.cpp @@ -9,9 +9,7 @@ #include #include -#include #include -#include #include From patchwork Fri Aug 30 13:18:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21098 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 0C7EDC32D7 for ; Fri, 30 Aug 2024 13:20:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9E30F634E4; Fri, 30 Aug 2024 15:20:01 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="QUon3sLa"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1EFB2634E5 for ; Fri, 30 Aug 2024 15:19:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9Oyw/8rBfaNs5zaslka68TMbcDpibwYzEJO5qbfyD9k=; b=QUon3sLaLgnje3JOKA6S2hYmxpxphtRHU/BPzswWkgcF04NPz9gysjLf8ZcxUmir4uw7gz bmlOD7Ez7ga19Sgn0dg2VgkS7+i7AT80/iyT/YvSKzQupfeQb3qAa+dnnQNz1LA17eEB+7 lgnKfZJAbmjtLB9GuU6V67sw4WoePsg= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-217-UQahPx0EN-CsoVjdClADOw-1; Fri, 30 Aug 2024 09:19:43 -0400 X-MC-Unique: UQahPx0EN-CsoVjdClADOw-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 183651955D5A for ; Fri, 30 Aug 2024 13:19:43 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C8A6C19560AA; Fri, 30 Aug 2024 13:19:41 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 15/19] libcamera: libcamera: Add missing includes Date: Fri, 30 Aug 2024 15:18:52 +0200 Message-ID: <20240830131904.1090330-16-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Let's add direct includes for classes currently included indirectly, through other header files. Signed-off-by: Milan Zamazal --- src/libcamera/formats.cpp | 2 ++ src/libcamera/ipa_data_serializer.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index 3ee89590..dbefb094 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -7,6 +7,8 @@ #include "libcamera/internal/formats.h" +#include + #include #include diff --git a/src/libcamera/ipa_data_serializer.cpp b/src/libcamera/ipa_data_serializer.cpp index 3e9bef08..f6dd7e6f 100644 --- a/src/libcamera/ipa_data_serializer.cpp +++ b/src/libcamera/ipa_data_serializer.cpp @@ -11,6 +11,8 @@ #include +#include "libcamera/internal/byte_stream_buffer.h" + /** * \file ipa_data_serializer.h * \brief IPA Data Serializer From patchwork Fri Aug 30 13:18:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21099 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 71107C32DA for ; Fri, 30 Aug 2024 13:20:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 940DF634F1; Fri, 30 Aug 2024 15:20:02 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="IRz/F0On"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 492BC634E0 for ; Fri, 30 Aug 2024 15:19:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=23M2hfhy+zNZHg/JuWmM6lqOiuQNPh2eIHg+QDYwtBA=; b=IRz/F0OnJfFoTGW8LnAYgM5G4YFBwnce8u102CFK/R9+t3xPzl5HV9D9c87TudqWIhMVmG I5tV+11jokxmewYkgzSv4K0hFmnGb8hu371DnCVpUUWcsEMPTqwDbH0Lz4itwgHGreOc/J DUDMzCIKVd6swlGu1kCC1/22tDUVY3I= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-634-nxML2X06MuipLRrVTRzDIg-1; Fri, 30 Aug 2024 09:19:45 -0400 X-MC-Unique: nxML2X06MuipLRrVTRzDIg-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0E7201955BED for ; Fri, 30 Aug 2024 13:19:45 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 912511955F45; Fri, 30 Aug 2024 13:19:43 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 16/19] libcamera: libcamera: Formatting improvements Date: Fri, 30 Aug 2024 15:18:53 +0200 Message-ID: <20240830131904.1090330-17-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The LSP autoformatter doesn't like some of the current formatting, let's make it happy. Signed-off-by: Milan Zamazal --- src/libcamera/base/event_dispatcher_poll.cpp | 3 +- src/libcamera/camera.cpp | 4 +- src/libcamera/controls.cpp | 31 +++---- src/libcamera/ipa_data_serializer.cpp | 95 ++++++++++---------- src/libcamera/ipa_module.cpp | 15 ++-- src/libcamera/orientation.cpp | 16 ++-- src/libcamera/pipeline_handler.cpp | 5 +- src/libcamera/process.cpp | 7 +- src/libcamera/sensor/camera_sensor.cpp | 6 +- src/libcamera/shared_mem_object.cpp | 4 +- src/libcamera/stream.cpp | 6 +- 11 files changed, 97 insertions(+), 95 deletions(-) diff --git a/src/libcamera/base/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp index 86a26f36..288246ff 100644 --- a/src/libcamera/base/event_dispatcher_poll.cpp +++ b/src/libcamera/base/event_dispatcher_poll.cpp @@ -5,8 +5,6 @@ * Poll-based event dispatcher */ -#include - #include #include #include @@ -15,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 88210ff3..69e54439 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -5,7 +5,7 @@ * Camera device */ -#include +#include "libcamera/internal/camera.h" #include #include @@ -13,12 +13,12 @@ #include #include +#include #include #include #include #include -#include "libcamera/internal/camera.h" #include "libcamera/internal/camera_controls.h" #include "libcamera/internal/pipeline_handler.h" #include "libcamera/internal/request.h" diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp index 67400797..603e2672 100644 --- a/src/libcamera/controls.cpp +++ b/src/libcamera/controls.cpp @@ -5,15 +5,15 @@ * Control handling */ -#include - #include -#include #include +#include #include #include +#include + #include "libcamera/internal/control_validator.h" /** @@ -51,15 +51,15 @@ LOG_DEFINE_CATEGORY(Controls) namespace { static constexpr size_t ControlValueSize[] = { - [ControlTypeNone] = 0, - [ControlTypeBool] = sizeof(bool), - [ControlTypeByte] = sizeof(uint8_t), - [ControlTypeInteger32] = sizeof(int32_t), - [ControlTypeInteger64] = sizeof(int64_t), - [ControlTypeFloat] = sizeof(float), - [ControlTypeString] = sizeof(char), - [ControlTypeRectangle] = sizeof(Rectangle), - [ControlTypeSize] = sizeof(Size), + [ControlTypeNone] = 0, + [ControlTypeBool] = sizeof(bool), + [ControlTypeByte] = sizeof(uint8_t), + [ControlTypeInteger32] = sizeof(int32_t), + [ControlTypeInteger64] = sizeof(int64_t), + [ControlTypeFloat] = sizeof(float), + [ControlTypeString] = sizeof(char), + [ControlTypeRectangle] = sizeof(Rectangle), + [ControlTypeSize] = sizeof(Size), }; } /* namespace */ @@ -186,8 +186,8 @@ Span ControlValue::data() const { std::size_t size = numElements_ * ControlValueSize[type_]; const uint8_t *data = size > sizeof(value_) - ? reinterpret_cast(storage_) - : reinterpret_cast(&value_); + ? reinterpret_cast(storage_) + : reinterpret_cast(&value_); return { data, size }; } @@ -700,7 +700,8 @@ bool ControlInfoMap::validate() * values. */ ControlType rangeType = id->type() == ControlTypeString - ? ControlTypeInteger32 : id->type(); + ? ControlTypeInteger32 + : id->type(); const ControlInfo &info = ctrl.second; if (info.min().type() != rangeType) { diff --git a/src/libcamera/ipa_data_serializer.cpp b/src/libcamera/ipa_data_serializer.cpp index f6dd7e6f..67a5726a 100644 --- a/src/libcamera/ipa_data_serializer.cpp +++ b/src/libcamera/ipa_data_serializer.cpp @@ -188,52 +188,52 @@ namespace { #ifndef __DOXYGEN__ -#define DEFINE_POD_SERIALIZER(type) \ - \ -template<> \ -std::tuple, std::vector> \ -IPADataSerializer::serialize(const type &data, \ - [[maybe_unused]] ControlSerializer *cs) \ -{ \ - std::vector dataVec; \ - dataVec.reserve(sizeof(type)); \ - appendPOD(dataVec, data); \ - \ - return { dataVec, {} }; \ -} \ - \ -template<> \ -type IPADataSerializer::deserialize(std::vector::const_iterator dataBegin, \ - std::vector::const_iterator dataEnd, \ - [[maybe_unused]] ControlSerializer *cs) \ -{ \ - return readPOD(dataBegin, 0, dataEnd); \ -} \ - \ -template<> \ -type IPADataSerializer::deserialize(const std::vector &data, \ - ControlSerializer *cs) \ -{ \ - return deserialize(data.cbegin(), data.end(), cs); \ -} \ - \ -template<> \ -type IPADataSerializer::deserialize(const std::vector &data, \ - [[maybe_unused]] const std::vector &fds, \ - ControlSerializer *cs) \ -{ \ - return deserialize(data.cbegin(), data.end(), cs); \ -} \ - \ -template<> \ -type IPADataSerializer::deserialize(std::vector::const_iterator dataBegin, \ - std::vector::const_iterator dataEnd, \ - [[maybe_unused]] std::vector::const_iterator fdsBegin, \ - [[maybe_unused]] std::vector::const_iterator fdsEnd, \ - ControlSerializer *cs) \ -{ \ - return deserialize(dataBegin, dataEnd, cs); \ -} +#define DEFINE_POD_SERIALIZER(type) \ + \ + template<> \ + std::tuple, std::vector> \ + IPADataSerializer::serialize(const type &data, \ + [[maybe_unused]] ControlSerializer *cs) \ + { \ + std::vector dataVec; \ + dataVec.reserve(sizeof(type)); \ + appendPOD(dataVec, data); \ + \ + return { dataVec, {} }; \ + } \ + \ + template<> \ + type IPADataSerializer::deserialize(std::vector::const_iterator dataBegin, \ + std::vector::const_iterator dataEnd, \ + [[maybe_unused]] ControlSerializer *cs) \ + { \ + return readPOD(dataBegin, 0, dataEnd); \ + } \ + \ + template<> \ + type IPADataSerializer::deserialize(const std::vector &data, \ + ControlSerializer *cs) \ + { \ + return deserialize(data.cbegin(), data.end(), cs); \ + } \ + \ + template<> \ + type IPADataSerializer::deserialize(const std::vector &data, \ + [[maybe_unused]] const std::vector &fds, \ + ControlSerializer *cs) \ + { \ + return deserialize(data.cbegin(), data.end(), cs); \ + } \ + \ + template<> \ + type IPADataSerializer::deserialize(std::vector::const_iterator dataBegin, \ + std::vector::const_iterator dataEnd, \ + [[maybe_unused]] std::vector::const_iterator fdsBegin, \ + [[maybe_unused]] std::vector::const_iterator fdsEnd, \ + ControlSerializer *cs) \ + { \ + return deserialize(dataBegin, dataEnd, cs); \ + } DEFINE_POD_SERIALIZER(bool) DEFINE_POD_SERIALIZER(uint8_t) @@ -539,7 +539,6 @@ IPADataSerializer::serialize(const SharedFD &data, if (data.isValid()) fdVec.push_back(data); - return { dataVec, fdVec }; } @@ -606,7 +605,7 @@ IPADataSerializer::deserialize(std::vector::const_i FrameBuffer::Plane ret; ret.fd = IPADataSerializer::deserialize(dataBegin, dataBegin + 4, - fdsBegin, fdsBegin + 1); + fdsBegin, fdsBegin + 1); ret.offset = readPOD(dataBegin, 4, dataEnd); ret.length = readPOD(dataBegin, 8, dataEnd); diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp index 86d88a86..b8b2eb6c 100644 --- a/src/libcamera/ipa_module.cpp +++ b/src/libcamera/ipa_module.cpp @@ -50,8 +50,8 @@ typename std::remove_extent_t *elfPointer(Span elf, if (size > elf.size() || size < objSize) return nullptr; - return reinterpret_cast *> - (reinterpret_cast(elf.data()) + offset); + return reinterpret_cast *>( + reinterpret_cast(elf.data()) + offset); } template @@ -80,21 +80,22 @@ int elfVerifyIdent(Span elf) int a = 1; unsigned char endianness = *reinterpret_cast(&a) == 1 - ? ELFDATA2LSB : ELFDATA2MSB; + ? ELFDATA2LSB + : ELFDATA2MSB; if (e_ident[EI_DATA] != endianness) return -ENOEXEC; return 0; } -const ElfW(Shdr) *elfSection(Span elf, const ElfW(Ehdr) *eHdr, - ElfW(Half) idx) +const ElfW(Shdr) * elfSection(Span elf, const ElfW(Ehdr) * eHdr, + ElfW(Half) idx) { if (idx >= eHdr->e_shnum) return nullptr; - off_t offset = eHdr->e_shoff + idx * - static_cast(eHdr->e_shentsize); + off_t offset = + eHdr->e_shoff + idx * static_cast(eHdr->e_shentsize); return elfPointer(elf, offset); } diff --git a/src/libcamera/orientation.cpp b/src/libcamera/orientation.cpp index bf960249..80dea459 100644 --- a/src/libcamera/orientation.cpp +++ b/src/libcamera/orientation.cpp @@ -5,10 +5,10 @@ * Image orientation */ -#include - #include +#include + /** * \file orientation.h * \brief Image orientation definition @@ -101,10 +101,14 @@ std::ostream &operator<<(std::ostream &out, const Orientation &orientation) { constexpr std::array orientationNames = { "", /* Orientation starts counting from 1. */ - "Rotate0", "Rotate0Mirror", - "Rotate180", "Rotate180Mirror", - "Rotate90Mirror", "Rotate270", - "Rotate270Mirror", "Rotate90", + "Rotate0", + "Rotate0Mirror", + "Rotate180", + "Rotate180Mirror", + "Rotate90Mirror", + "Rotate270", + "Rotate270Mirror", + "Rotate90", }; out << orientationNames[static_cast(orientation)]; diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp index a63d3503..981c2e64 100644 --- a/src/libcamera/pipeline_handler.cpp +++ b/src/libcamera/pipeline_handler.cpp @@ -577,8 +577,9 @@ std::string PipelineHandler::configurationFile(const std::string &subdir, << confPath << "'"; } else { /* Else look in the system locations. */ - confPath = std::string(LIBCAMERA_DATA_DIR) - + "/pipeline/" + subdir + '/' + name; + confPath = + std::string(LIBCAMERA_DATA_DIR) + + "/pipeline/" + subdir + '/' + name; } ret = stat(confPath.c_str(), &statbuf); diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp index c0f4d49f..68fad327 100644 --- a/src/libcamera/process.cpp +++ b/src/libcamera/process.cpp @@ -75,7 +75,7 @@ void ProcessManager::sighandler() return; } - for (auto it = processes_.begin(); it != processes_.end(); ) { + for (auto it = processes_.begin(); it != processes_.end();) { Process *process = *it; int wstatus; @@ -188,7 +188,6 @@ const struct sigaction &ProcessManager::oldsa() const return oldsa_; } - /** * \class Process * \brief Process object @@ -270,8 +269,8 @@ int Process::start(const std::string &path, unsigned int len = args.size(); argv[0] = path.c_str(); for (unsigned int i = 0; i < len; i++) - argv[i+1] = args[i].c_str(); - argv[len+1] = nullptr; + argv[i + 1] = args[i].c_str(); + argv[len + 1] = nullptr; execv(path.c_str(), (char **)argv); diff --git a/src/libcamera/sensor/camera_sensor.cpp b/src/libcamera/sensor/camera_sensor.cpp index 1382081a..4a990bb9 100644 --- a/src/libcamera/sensor/camera_sensor.cpp +++ b/src/libcamera/sensor/camera_sensor.cpp @@ -6,7 +6,6 @@ */ #include "libcamera/internal/camera_sensor.h" -#include "libcamera/internal/media_device.h" #include #include @@ -14,15 +13,16 @@ #include #include +#include + #include #include #include -#include - #include "libcamera/internal/bayer_format.h" #include "libcamera/internal/camera_lens.h" #include "libcamera/internal/camera_sensor_properties.h" +#include "libcamera/internal/media_device.h" #include "libcamera/internal/sysfs.h" /** diff --git a/src/libcamera/shared_mem_object.cpp b/src/libcamera/shared_mem_object.cpp index 65b53919..d9b61d37 100644 --- a/src/libcamera/shared_mem_object.cpp +++ b/src/libcamera/shared_mem_object.cpp @@ -57,8 +57,8 @@ SharedMem::SharedMem() = default; */ SharedMem::SharedMem(const std::string &name, std::size_t size) { - UniqueFD memfd = MemFd::create(name.c_str(), size, MemFd::Seal::Shrink | - MemFd::Seal::Grow); + UniqueFD memfd = MemFd::create(name.c_str(), size, + MemFd::Seal::Shrink | MemFd::Seal::Grow); if (!memfd.isValid()) return; diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp index e70688f6..00b15608 100644 --- a/src/libcamera/stream.cpp +++ b/src/libcamera/stream.cpp @@ -5,17 +5,15 @@ * Video stream for a Camera */ -#include - #include #include #include -#include - #include #include +#include +#include /** * \file stream.h From patchwork Fri Aug 30 13:18:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21100 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 133AAC32DB for ; Fri, 30 Aug 2024 13:20:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5F4B8634F1; Fri, 30 Aug 2024 15:20:05 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="WPgaKKSO"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7072F634EC for ; Fri, 30 Aug 2024 15:19:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HPfavc/N+GppTSRCZi4fNlfHnYvMC1wzv9skJRWFk7I=; b=WPgaKKSODp/c54i7KgBRKoWTtxEMH9Jhx9FpY/yf5aaiMrynilNDUlU6qvFp/9P2S/sNfN uimADpl5POpO705GnvXajQPMhN3OvXcAkJLFQe6yX4ROamB2lIg16CBUk5agXKLLfa90EG T4DW+FIDG5jbcX/i+Op9WxrAePzcOM0= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-375-doTXt_RzPLygAzbF7E0f-w-1; Fri, 30 Aug 2024 09:19:47 -0400 X-MC-Unique: doTXt_RzPLygAzbF7E0f-w-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 92B871954B1C for ; Fri, 30 Aug 2024 13:19:46 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4945E19560AA; Fri, 30 Aug 2024 13:19:45 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 17/19] libcamera: includes: Add missing includes Date: Fri, 30 Aug 2024 15:18:54 +0200 Message-ID: <20240830131904.1090330-18-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Let's add direct includes for classes currently included indirectly, through other header files. Signed-off-by: Milan Zamazal --- include/libcamera/internal/request.h | 1 + include/libcamera/logging.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/libcamera/internal/request.h b/include/libcamera/internal/request.h index f5d98069..4e7d05b1 100644 --- a/include/libcamera/internal/request.h +++ b/include/libcamera/internal/request.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include diff --git a/include/libcamera/logging.h b/include/libcamera/logging.h index e334d87b..e1c6341c 100644 --- a/include/libcamera/logging.h +++ b/include/libcamera/logging.h @@ -7,6 +7,8 @@ #pragma once +#include + namespace libcamera { enum LoggingTarget { From patchwork Fri Aug 30 13:18:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21101 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 102EAC32D8 for ; Fri, 30 Aug 2024 13:20:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 52077634EC; Fri, 30 Aug 2024 15:20:07 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="HeQ2pV85"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5352F634CA for ; Fri, 30 Aug 2024 15:19:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vSXfMI5XMHAkJFEnEPXS0s5Hnd66WG1oxMV7zMAbFwc=; b=HeQ2pV854a98relfxBn/71GJxWvge9i6+Wum051UPMGavbtjWhTtJVAJOQgizesk+5wVVK X6yTJ5PyQ51lovj8SzUNyzvC5W3jT4AUEoD991Pgf7P/nBIEMjQiegDiGdwxB+bmC/+Eri /fJDy7f9ZalM5jfEx2pdPqzSqRrePNI= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-463-jAX7Ms4COSmvodbFO26vlw-1; Fri, 30 Aug 2024 09:19:49 -0400 X-MC-Unique: jAX7Ms4COSmvodbFO26vlw-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3CD1B1955BF9 for ; Fri, 30 Aug 2024 13:19:48 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0A1D319560AA; Fri, 30 Aug 2024 13:19:46 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 18/19] libcamera: includes: Remove unused includes Date: Fri, 30 Aug 2024 15:18:55 +0200 Message-ID: <20240830131904.1090330-19-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The includes that are not used can be removed. Signed-off-by: Milan Zamazal --- include/libcamera/base/event_dispatcher.h | 2 -- include/libcamera/base/log.h | 1 - include/libcamera/base/memfd.h | 2 -- include/libcamera/base/signal.h | 1 - include/libcamera/base/span.h | 1 - include/libcamera/base/timer.h | 1 - include/libcamera/base/utils.h | 1 - include/libcamera/framebuffer.h | 1 - include/libcamera/internal/camera_manager.h | 1 - include/libcamera/internal/camera_sensor.h | 1 - include/libcamera/internal/device_enumerator_sysfs.h | 1 - include/libcamera/internal/dma_buf_allocator.h | 2 -- include/libcamera/internal/formats.h | 1 - include/libcamera/internal/ipa_data_serializer.h | 4 ---- include/libcamera/internal/ipa_proxy.h | 2 -- include/libcamera/internal/ipc_pipe_unixsocket.h | 1 - include/libcamera/internal/media_device.h | 1 - include/libcamera/internal/pipeline_handler.h | 3 --- include/libcamera/internal/shared_mem_object.h | 1 - include/libcamera/pixel_format.h | 1 - include/libcamera/request.h | 1 - include/libcamera/stream.h | 1 - include/libcamera/transform.h | 2 -- 23 files changed, 33 deletions(-) diff --git a/include/libcamera/base/event_dispatcher.h b/include/libcamera/base/event_dispatcher.h index e9a09c6e..408f8da6 100644 --- a/include/libcamera/base/event_dispatcher.h +++ b/include/libcamera/base/event_dispatcher.h @@ -7,8 +7,6 @@ #pragma once -#include - #include namespace libcamera { diff --git a/include/libcamera/base/log.h b/include/libcamera/base/log.h index df27df03..62093012 100644 --- a/include/libcamera/base/log.h +++ b/include/libcamera/base/log.h @@ -7,7 +7,6 @@ #pragma once -#include #include #include diff --git a/include/libcamera/base/memfd.h b/include/libcamera/base/memfd.h index b0edd2de..705d9929 100644 --- a/include/libcamera/base/memfd.h +++ b/include/libcamera/base/memfd.h @@ -7,8 +7,6 @@ #pragma once -#include - #include #include diff --git a/include/libcamera/base/signal.h b/include/libcamera/base/signal.h index 849fbbda..bbff1495 100644 --- a/include/libcamera/base/signal.h +++ b/include/libcamera/base/signal.h @@ -10,7 +10,6 @@ #include #include #include -#include #include diff --git a/include/libcamera/base/span.h b/include/libcamera/base/span.h index c3e63f69..92cce4f0 100644 --- a/include/libcamera/base/span.h +++ b/include/libcamera/base/span.h @@ -10,7 +10,6 @@ #include #include #include -#include #include namespace libcamera { diff --git a/include/libcamera/base/timer.h b/include/libcamera/base/timer.h index 5ef45959..9646a0fe 100644 --- a/include/libcamera/base/timer.h +++ b/include/libcamera/base/timer.h @@ -8,7 +8,6 @@ #pragma once #include -#include #include diff --git a/include/libcamera/base/utils.h b/include/libcamera/base/utils.h index 734ff81e..98c683a7 100644 --- a/include/libcamera/base/utils.h +++ b/include/libcamera/base/utils.h @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/include/libcamera/framebuffer.h b/include/libcamera/framebuffer.h index 5ae2270b..ff839243 100644 --- a/include/libcamera/framebuffer.h +++ b/include/libcamera/framebuffer.h @@ -7,7 +7,6 @@ #pragma once -#include #include #include #include diff --git a/include/libcamera/internal/camera_manager.h b/include/libcamera/internal/camera_manager.h index e098cb69..0150ca61 100644 --- a/include/libcamera/internal/camera_manager.h +++ b/include/libcamera/internal/camera_manager.h @@ -9,7 +9,6 @@ #include -#include #include #include #include diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h index fc44ab98..a42c15fa 100644 --- a/include/libcamera/internal/camera_sensor.h +++ b/include/libcamera/internal/camera_sensor.h @@ -23,7 +23,6 @@ #include #include "libcamera/internal/bayer_format.h" -#include "libcamera/internal/formats.h" #include "libcamera/internal/v4l2_subdevice.h" namespace libcamera { diff --git a/include/libcamera/internal/device_enumerator_sysfs.h b/include/libcamera/internal/device_enumerator_sysfs.h index a5bfc711..4ccc9845 100644 --- a/include/libcamera/internal/device_enumerator_sysfs.h +++ b/include/libcamera/internal/device_enumerator_sysfs.h @@ -7,7 +7,6 @@ #pragma once -#include #include #include "libcamera/internal/device_enumerator.h" diff --git a/include/libcamera/internal/dma_buf_allocator.h b/include/libcamera/internal/dma_buf_allocator.h index 36ec1696..d2a0a0d1 100644 --- a/include/libcamera/internal/dma_buf_allocator.h +++ b/include/libcamera/internal/dma_buf_allocator.h @@ -7,8 +7,6 @@ #pragma once -#include - #include #include diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h index 71895cd8..6a3e9c16 100644 --- a/include/libcamera/internal/formats.h +++ b/include/libcamera/internal/formats.h @@ -8,7 +8,6 @@ #pragma once #include -#include #include #include diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h index 337c948c..13470a89 100644 --- a/include/libcamera/internal/ipa_data_serializer.h +++ b/include/libcamera/internal/ipa_data_serializer.h @@ -7,8 +7,6 @@ #pragma once -#include -#include #include #include #include @@ -22,8 +20,6 @@ #include #include -#include "libcamera/internal/byte_stream_buffer.h" -#include "libcamera/internal/camera_sensor.h" #include "libcamera/internal/control_serializer.h" namespace libcamera { diff --git a/include/libcamera/internal/ipa_proxy.h b/include/libcamera/internal/ipa_proxy.h index 0f564d99..983bcc5f 100644 --- a/include/libcamera/internal/ipa_proxy.h +++ b/include/libcamera/internal/ipa_proxy.h @@ -7,9 +7,7 @@ #pragma once -#include #include -#include #include diff --git a/include/libcamera/internal/ipc_pipe_unixsocket.h b/include/libcamera/internal/ipc_pipe_unixsocket.h index 4a0f6d57..8c972613 100644 --- a/include/libcamera/internal/ipc_pipe_unixsocket.h +++ b/include/libcamera/internal/ipc_pipe_unixsocket.h @@ -9,7 +9,6 @@ #include #include -#include #include "libcamera/internal/ipc_pipe.h" #include "libcamera/internal/ipc_unixsocket.h" diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h index bf2e475d..e412d3a0 100644 --- a/include/libcamera/internal/media_device.h +++ b/include/libcamera/internal/media_device.h @@ -8,7 +8,6 @@ #pragma once #include -#include #include #include diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h index cad5812f..c37e6d02 100644 --- a/include/libcamera/internal/pipeline_handler.h +++ b/include/libcamera/internal/pipeline_handler.h @@ -9,7 +9,6 @@ #include #include -#include #include #include #include @@ -20,8 +19,6 @@ #include #include -#include "libcamera/internal/ipa_proxy.h" - namespace libcamera { class Camera; diff --git a/include/libcamera/internal/shared_mem_object.h b/include/libcamera/internal/shared_mem_object.h index 2ab0189f..e9f1dacd 100644 --- a/include/libcamera/internal/shared_mem_object.h +++ b/include/libcamera/internal/shared_mem_object.h @@ -8,7 +8,6 @@ */ #pragma once -#include #include #include #include diff --git a/include/libcamera/pixel_format.h b/include/libcamera/pixel_format.h index ea60fe72..1b4d8c7c 100644 --- a/include/libcamera/pixel_format.h +++ b/include/libcamera/pixel_format.h @@ -8,7 +8,6 @@ #pragma once #include -#include #include #include diff --git a/include/libcamera/request.h b/include/libcamera/request.h index 2c78d9bb..e214a9d1 100644 --- a/include/libcamera/request.h +++ b/include/libcamera/request.h @@ -12,7 +12,6 @@ #include #include #include -#include #include #include diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h index d510238a..071b7169 100644 --- a/include/libcamera/stream.h +++ b/include/libcamera/stream.h @@ -8,7 +8,6 @@ #pragma once #include -#include #include #include #include diff --git a/include/libcamera/transform.h b/include/libcamera/transform.h index a88f809e..4517412a 100644 --- a/include/libcamera/transform.h +++ b/include/libcamera/transform.h @@ -7,8 +7,6 @@ #pragma once -#include - namespace libcamera { enum class Orientation; From patchwork Fri Aug 30 13:18:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21102 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 7B9A0C32DC for ; Fri, 30 Aug 2024 13:20:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C826F634E8; Fri, 30 Aug 2024 15:20:08 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="Eicq6ZwD"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 37CE6634EC for ; Fri, 30 Aug 2024 15:19:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725023992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mzDEvzxLzdzULr9Rz+qruecDBpWub0vf7IZevbck83E=; b=Eicq6ZwDxLgq/375AEyU3MvU/3NNlSB01dRxipY4GU67EYvRopTaPTzg1ootjCKFOLWKnk +nQDfxGnXfKGSROmAdx6AtmTmw+PrHWnZr95pdNN8Abt5FTXz5GIBKyUr/EP0uZfBW2uLI NhDNeWnsFamu3MdM3cqCgASgQAUHslo= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-505-ntidmhr8N4yTIaZS8WmTyQ-1; Fri, 30 Aug 2024 09:19:50 -0400 X-MC-Unique: ntidmhr8N4yTIaZS8WmTyQ-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2AC211955F6A for ; Fri, 30 Aug 2024 13:19:50 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.225.65]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A61F719560AE; Fri, 30 Aug 2024 13:19:48 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal Subject: [PATCH 19/19] libcamera: includes: Formatting improvements Date: Fri, 30 Aug 2024 15:18:56 +0200 Message-ID: <20240830131904.1090330-20-mzamazal@redhat.com> In-Reply-To: <20240830131904.1090330-1-mzamazal@redhat.com> References: <20240830131904.1090330-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The LSP autoformatter doesn't like some of the current formatting, let's make it happy. Signed-off-by: Milan Zamazal --- include/libcamera/base/log.h | 22 +++++----- include/libcamera/base/span.h | 40 +++++++++---------- include/libcamera/base/utils.h | 2 +- include/libcamera/internal/camera_manager.h | 4 +- .../libcamera/internal/ipa_data_serializer.h | 7 ++-- 5 files changed, 38 insertions(+), 37 deletions(-) diff --git a/include/libcamera/base/log.h b/include/libcamera/base/log.h index 62093012..38b0ab01 100644 --- a/include/libcamera/base/log.h +++ b/include/libcamera/base/log.h @@ -43,17 +43,17 @@ private: LogSeverity severity_; }; -#define LOG_DECLARE_CATEGORY(name) \ -extern const LogCategory &_LOG_CATEGORY(name)(); - -#define LOG_DEFINE_CATEGORY(name) \ -LOG_DECLARE_CATEGORY(name) \ -const LogCategory &_LOG_CATEGORY(name)() \ -{ \ - /* The instance will be deleted by the Logger destructor. */ \ - static LogCategory *category = LogCategory::create(#name); \ - return *category; \ -} +#define LOG_DECLARE_CATEGORY(name) \ + extern const LogCategory &_LOG_CATEGORY(name)(); + +#define LOG_DEFINE_CATEGORY(name) \ + LOG_DECLARE_CATEGORY(name) \ + const LogCategory &_LOG_CATEGORY(name)() \ + { \ + /* The instance will be deleted by the Logger destructor. */ \ + static LogCategory *category = LogCategory::create(#name); \ + return *category; \ + } class LogMessage { diff --git a/include/libcamera/base/span.h b/include/libcamera/base/span.h index 92cce4f0..86201aa2 100644 --- a/include/libcamera/base/span.h +++ b/include/libcamera/base/span.h @@ -125,7 +125,7 @@ public: constexpr Span(element_type (&arr)[N], std::enable_if_t (*)[], element_type (*)[]>::value && - N == Extent, + N == Extent, std::nullptr_t> = nullptr) noexcept : data_(arr) { @@ -135,7 +135,7 @@ public: constexpr Span(std::array &arr, std::enable_if_t (*)[], element_type (*)[]>::value && - N == Extent, + N == Extent, std::nullptr_t> = nullptr) noexcept : data_(arr.data()) { @@ -145,7 +145,7 @@ public: constexpr Span(const std::array &arr, std::enable_if_t (*)[], element_type (*)[]>::value && - N == Extent, + N == Extent, std::nullptr_t> = nullptr) noexcept : data_(arr.data()) { @@ -154,10 +154,10 @@ public: template explicit constexpr Span(Container &cont, std::enable_if_t::value && - !details::is_array::value && - !std::is_array::value && - std::is_convertible (*)[], - element_type (*)[]>::value, + !details::is_array::value && + !std::is_array::value && + std::is_convertible (*)[], + element_type (*)[]>::value, std::nullptr_t> = nullptr) : data_(utils::data(cont)) { @@ -166,10 +166,10 @@ public: template explicit constexpr Span(const Container &cont, std::enable_if_t::value && - !details::is_array::value && - !std::is_array::value && - std::is_convertible (*)[], - element_type (*)[]>::value, + !details::is_array::value && + !std::is_array::value && + std::is_convertible (*)[], + element_type (*)[]>::value, std::nullptr_t> = nullptr) : data_(utils::data(cont)) { @@ -179,7 +179,7 @@ public: template explicit constexpr Span(const Span &s, std::enable_if_t::value && - N == Extent, + N == Extent, std::nullptr_t> = nullptr) noexcept : data_(s.data()) { @@ -316,10 +316,10 @@ public: template constexpr Span(Container &cont, std::enable_if_t::value && - !details::is_array::value && - !std::is_array::value && - std::is_convertible (*)[], - element_type (*)[]>::value, + !details::is_array::value && + !std::is_array::value && + std::is_convertible (*)[], + element_type (*)[]>::value, std::nullptr_t> = nullptr) : data_(utils::data(cont)), size_(utils::size(cont)) { @@ -328,10 +328,10 @@ public: template constexpr Span(const Container &cont, std::enable_if_t::value && - !details::is_array::value && - !std::is_array::value && - std::is_convertible (*)[], - element_type (*)[]>::value, + !details::is_array::value && + !std::is_array::value && + std::is_convertible (*)[], + element_type (*)[]>::value, std::nullptr_t> = nullptr) : data_(utils::data(cont)), size_(utils::size(cont)) { diff --git a/include/libcamera/base/utils.h b/include/libcamera/base/utils.h index 98c683a7..a9b27d0f 100644 --- a/include/libcamera/base/utils.h +++ b/include/libcamera/base/utils.h @@ -12,8 +12,8 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/include/libcamera/internal/camera_manager.h b/include/libcamera/internal/camera_manager.h index 0150ca61..95ddf4cf 100644 --- a/include/libcamera/internal/camera_manager.h +++ b/include/libcamera/internal/camera_manager.h @@ -7,8 +7,6 @@ #pragma once -#include - #include #include #include @@ -18,6 +16,8 @@ #include #include +#include + #include "libcamera/internal/process.h" namespace libcamera { diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h index 13470a89..66d9a19f 100644 --- a/include/libcamera/internal/ipa_data_serializer.h +++ b/include/libcamera/internal/ipa_data_serializer.h @@ -18,6 +18,7 @@ #include #include #include + #include #include "libcamera/internal/control_serializer.h" @@ -161,7 +162,7 @@ public: std::vector::const_iterator fdIter = fdsBegin; for (uint32_t i = 0; i < vecLen; i++) { uint32_t sizeofData = readPOD(dataIter, 0, dataEnd); - uint32_t sizeofFds = readPOD(dataIter, 4, dataEnd); + uint32_t sizeofFds = readPOD(dataIter, 4, dataEnd); dataIter += 8; ret[i] = IPADataSerializer::deserialize(dataIter, @@ -268,7 +269,7 @@ public: std::vector::const_iterator fdIter = fdsBegin; for (uint32_t i = 0; i < mapLen; i++) { uint32_t sizeofData = readPOD(dataIter, 0, dataEnd); - uint32_t sizeofFds = readPOD(dataIter, 4, dataEnd); + uint32_t sizeofFds = readPOD(dataIter, 4, dataEnd); dataIter += 8; K key = IPADataSerializer::deserialize(dataIter, @@ -280,7 +281,7 @@ public: dataIter += sizeofData; fdIter += sizeofFds; sizeofData = readPOD(dataIter, 0, dataEnd); - sizeofFds = readPOD(dataIter, 4, dataEnd); + sizeofFds = readPOD(dataIter, 4, dataEnd); dataIter += 8; const V value = IPADataSerializer::deserialize(dataIter,