From patchwork Thu Sep 28 18:55:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 19093 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 DE173C0F2A for ; Thu, 28 Sep 2023 18:56:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4C04B61DE4; Thu, 28 Sep 2023 20:56:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1695927389; bh=CS13ZG/A3NeJBxBNovsJIgxhrRVTIssgBlTg2CYCquY=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=w8U2g+LuMGCW4NE+vGmZZEk4lcN5cXA0YImIw/YwOS36lzktiP8QkwR/2F44AmOtG by00/QGkLDiSUoCcGbKfjLHhlkiduSSmzilGqBsmgwAipIUIf9INHn+qHZN53+qFDY QnRkTtB2u5Qj4ajJT7npwrcuql/n6mtO9QhbGceHMRJIuW/BOAVefpnfGNprbTsIvu oCeA4WO/sZPjd2gV6i6VMFVxIFQfBZwaMoCrqg2JDtY2UBJbSLJrxhKvb7MjcouhjX YdrSrTsOk7ib6bj2pv+2yqOaSmiofOVI8RVfCZ21GlxX25pEcJ5idYISemZ1R9AaOz fu7cxDWSGsEbg== Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 296D561DE3 for ; Thu, 28 Sep 2023 20:56:27 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="PBRhOtWY"; dkim-atps=neutral Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-31f71b25a99so13154505f8f.2 for ; Thu, 28 Sep 2023 11:56:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695927386; x=1696532186; 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=P8ej+D7geuy1mbQ/FiWNM1dLD5zstyceKvZZG544FNg=; b=PBRhOtWYkSwB/BfMtXtTxWtCI+Z7+tfNzL1DU+aOhSKLtNnYlB8HbzLlc760i+A7gI ML3XLCU1POOUed7KkHXrx+VNS7KJXiezHEoULAMtI1+oGa+ZHYNAsb3zK43DA+qVI0hZ lTHBI0CvdVu0277O4HgRf3FqbaSn1GdEO4pOrBfLeAPqVdY/Da3IQ1XIo0FzGSeTe1Zs gteS7OYdtzMrV0A9Gk/BXrY8JIUYv8OZNoNb9ZhX+j6jOJ36TL3LORAuiE9dCCMrL4Sj q5KGwdLQwjuXMzSHpKiNhfN9ag2Sv1i70WNijtLXqdcCVw6t/qPvWZJt//3vqXCX75vS zdnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695927386; x=1696532186; 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=P8ej+D7geuy1mbQ/FiWNM1dLD5zstyceKvZZG544FNg=; b=OcDOZxw9xqShddeT6JMJoA+AnMpXVo+XEBoEnmxl4IwX0gWjvQQ+DiwFNzbbjm1y97 B93HfYWXR8DUoxazLKutrzvwKAvKFoM74BDiXF9bZdBFqW6v4Qa8TLgU29NkapnqnjWr AMFI6XwgufDpWJdEcp+cElDToFu+OECDd6dIJVQFxzORfrvia2cyLdjLDs9Y8hgfCXM4 aI/x+cY9LauMIFzNsXX55wbHGk1iIRRP4xJVk0aP23z8G8h6QZrjlT/p+7LD24pyQQ5a oeLcqPgp/ZXVeRIMy2YDDmCJbKttep/4cA0hyA3BbTndh5TnjzlDzdC1BcsbkybCej+B jvIQ== X-Gm-Message-State: AOJu0Yzi4zDyzR7yE7iinwLNeDwxqZgu+RVfbk9+jRd6FjtyvR8yhJTo 3XSOUncNlvoUClfeau73eOXnNmMndQJ+mabK68Q= X-Google-Smtp-Source: AGHT+IEz7UXSJiFN7/8LR52EhEPPJOaeZHv+WNQjBYwWtDeYRRAdn1VKPBIqZJcHekMtk9WvhFkdEQ== X-Received: by 2002:a5d:6e53:0:b0:321:5971:23a5 with SMTP id j19-20020a5d6e53000000b00321597123a5mr1894645wrz.20.1695927386582; Thu, 28 Sep 2023 11:56:26 -0700 (PDT) Received: from Lat-5310.. ([87.116.164.210]) by smtp.gmail.com with ESMTPSA id u1-20020adfed41000000b003247d3e5d99sm890842wro.55.2023.09.28.11.56.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 11:56:26 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 28 Sep 2023 21:55:32 +0300 Message-Id: <20230928185537.20178-1-andrey.konovalov@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 0/5] 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 is new in v3. This is a small fix which didn't fit into the other patches (drops unneeded #include). The third 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 ones in my previous patchsets [1] and [2]. But this is still work in progress hence the [RFC] for the last two patches (do not merge them for now). Changes in v3 vs v2: - fixes to the ConverterFactoryBase documentation improved as per the review feedback - added a separate patch which drops unneeded #include in src/libcamera/converter.cpp - SwConverter code simplified as per the review comments, missing #include's added, isp_ is now created once - in the SwConverter constructor 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] v1: https://patchwork.libcamera.org/cover/18924/ [2] v2: https://patchwork.libcamera.org/cover/19060/ Andrey Konovalov (5): libcamera: converter: a few fixes to ConverterFactoryBase documentation libcamera: converter: drop unnecessary #include directive 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 | 100 ++++ .../libcamera/internal/converter/meson.build | 1 + src/libcamera/converter.cpp | 46 +- src/libcamera/converter/converter_softw.cpp | 445 ++++++++++++++++++ src/libcamera/converter/meson.build | 3 +- src/libcamera/pipeline/simple/simple.cpp | 41 +- 7 files changed, 611 insertions(+), 34 deletions(-) create mode 100644 include/libcamera/internal/converter/converter_softw.h create mode 100644 src/libcamera/converter/converter_softw.cpp