From patchwork Wed Sep 20 15:19:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 19060 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 E2791BE080 for ; Wed, 20 Sep 2023 15:19:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 375FC62944; Wed, 20 Sep 2023 17:19:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1695223184; bh=e4DVxOXFwBymNjLGWLZGMpXJpmhhgtdZ/p8sJ4tw3UI=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=IYNs/iscOzqLO4QR7ABljmQJjo+YeXx6Th4y9WxokhkvdOoSAUpO4YELPMeJY0kmv yIr3ZSVch+xlY/p/LUtM1e8gCRE80WEhuDIt9SO0HATQOoava2CX55ycNHoBlFx+4L R+eb6pBcjuEsvnl4+eV+CsSG2cm9DbPmmTLWCguM7TCwGKOSwB3ORHxhgsqdagrv0o vLvwXVD8ruBn5KXmkY77XUIh9goNusDjucH/lNMbmrLZFfKZTqqQvjDXcqakNxIRGD coSd++UZ0rbDh1h/h121gTH6t+2KZjtSTG02pQU/323N0ORaz5TMcEi5I5uFX26MPr uu5vb1khybjdA== Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4868760388 for ; Wed, 20 Sep 2023 17:19:42 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="sTif/llF"; dkim-atps=neutral Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2b703a0453fso117035071fa.3 for ; Wed, 20 Sep 2023 08:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695223181; x=1695827981; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8IisAVx3QYFs5cFs0v0y2jKgOm9e/luw04KVSIS2e7U=; b=sTif/llFuteg6FAbkxFmnTO4HWcq85qwiqk27r26wB1KHPDDYcMY6042KTMPWb5xM6 S+YJGnHvhp9iY05qMDepjz8sgT9wU+JPA/zsYJWF1Aeapn0gNp0tRHcCq0BpIsQIYbn2 d1tr4EOPgA5snXukcnPynT2shQd58RkcAp+uA1OfrJN+qO4GaV5SfewdQ/gwysoM3EhT PacIcKnm2PKb3b4H+E/KdYq3hQlmyWixK8f42euX4VWpJ731POtmMTYYasCU3JNS349K 54oeOKb50gvT5owyV3CN/9lppjjWprFdpC3V+vb/MbM82+9JoekmlqfRiQN8zuH34YX2 q/vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695223181; x=1695827981; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8IisAVx3QYFs5cFs0v0y2jKgOm9e/luw04KVSIS2e7U=; b=AoG+HyY6o74q54nM9LxRZHfXuTe9iQI14azJ5pOY0qUFfQ5AAOnZEx4icidT2POJAA CnkAsA7swBKh5qMNLi/u6jkH02zTsStBD9Gnx4isq0keJTFJKzTK3AbZ6kz7/10iFAvW S5Qec3Ktd7bks7xjNUTWmRHySvv8/o2i1fmXrxzEizAlgEICMRaxtt9QqdnKzSBXe5Hl MvHpeUtmFkVNN874Mj6Ww1oJgarPThJiRipgYMKm1Dm9EQwkFlOH35A5HJ/IUQoWd0c9 Iulip6wi3keOyCLP2Cx1qeEJlctZhE3z+qrvTyuptlSgZfYljoI7rlGJHnnF0aup/xVf xu2Q== X-Gm-Message-State: AOJu0YzYDAaTLAsz1aSYNNliZFstKUlGTIzsUaF14uv6CxlKlYZyb0w4 mOn4DHeXkX8onwH8bJNnfwqsUz434JkJobUkJJw= X-Google-Smtp-Source: AGHT+IHM5YUDbKjEBKeWEkrpjwVChCy/GG2wddxZ7WtsDfV9TW4BUPwJoCfs78TLfOavyO01lT8X7Q== X-Received: by 2002:a2e:960f:0:b0:2bc:d7cb:8283 with SMTP id v15-20020a2e960f000000b002bcd7cb8283mr2410078ljh.40.1695223181310; Wed, 20 Sep 2023 08:19:41 -0700 (PDT) Received: from Lat-5310.. ([87.116.162.81]) by smtp.gmail.com with ESMTPSA id h24-20020a170906829800b009ae0042e48bsm5376736ejx.5.2023.09.20.08.19.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 08:19:41 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 20 Sep 2023 18:19:17 +0300 Message-Id: <20230920151921.31273-1-andrey.konovalov@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/4] libcamera: converter: generalize Converter to remove MediaDevice dependency 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: , X-Patchwork-Original-From: Andrey Konovalov via libcamera-devel From: Andrey Konovalov Reply-To: Andrey Konovalov Cc: jacopo.mondi@ideasonboard.com, bryan.odonoghue@linaro.org, srinivas.kandagatla@linaro.org Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The first patch in this series is a few fixes to the ConverterFactoryBase documentation. The second patch makes the Converter class more generic by making pointer to MediaDevice an optional argument in the relevant member functions. The last two patches demonstrate a software converter using this generalized version of the Converter class. The raw bayer to RGB software converter implementation is a slightly improved version of the one in my previous patchset [1] (buffers mapping fixed). But this is still work in progress hence the [RFC] for the last two patches. Changes in v2 vs v1: - added a separate patch to fix the ConverterFactoryBase documentation - modified the Converter class to make the '*media' parameter optional instead of splitting out ConverterMD from the Converter. This also makes it possible to use the same ConverterFactory template for converters that rely on MediaDevice, and the software ones. - removed the unnecessary header includes [1] https://patchwork.libcamera.org/cover/18924/ Andrey Konovalov (4): libcamera: converter: a few fixes to ConverterFactoryBase documentation libcamera: converter: make using MediaDevice optional for the Converter libcamera: converter: add software converter libcamera: pipeline: simple: enable software converter for qcom-camss include/libcamera/internal/converter.h | 9 +- .../internal/converter/converter_softw.h | 90 ++++ .../libcamera/internal/converter/meson.build | 1 + src/libcamera/converter.cpp | 66 +-- src/libcamera/converter/converter_softw.cpp | 410 ++++++++++++++++++ src/libcamera/converter/meson.build | 3 +- src/libcamera/pipeline/simple/simple.cpp | 35 +- 7 files changed, 572 insertions(+), 42 deletions(-) create mode 100644 include/libcamera/internal/converter/converter_softw.h create mode 100644 src/libcamera/converter/converter_softw.cpp