[{"id":29690,"web_url":"https://patchwork.libcamera.org/comment/29690/","msgid":"<46a83102-323e-4bb0-969f-7462de0ee045@gmail.com>","date":"2024-05-31T10:29:29","subject":"Re: [PATCH v3 0/4] libcamera: converter: Replace usage of stream\n\tindex by Stream pointer","submitter":{"id":179,"url":"https://patchwork.libcamera.org/api/people/179/","name":"Andrei Konovalov","email":"andrey.konovalov.ynk@gmail.com"},"content":"On 31.05.2024 08:25, Umang Jain wrote:\n> The converter interface uses the unsigned int output stream index to map\n> to the output frame buffers. This is cumbersome to implement new\n> converters because one has to keep around additional book keeping\n> to track the streams with their correct indexes.\n> \n> The v4l2_converter_m2m and simple pipeline handler are adapt to\n> use the new interface. This work roped in software ISP as well,\n> which also seems to use indexes (although it doesn't implement converter\n> interface) because of a common conversionQueue_ queue used for\n> converter_ and swIsp_.\n> \n> Patch 1/4 and 2/4 drop redundant  validation of outputs std::map<>.\n> \n> Patch 3/4 renames private class V4L2M2MConverter::Stream to\n> V4L2M2Mconverter::V4L2M2MStream\n> \n> Patch 4/4 replaces the stream index usage from converter interface and\n> soft isp.\n> \n> ---\n> Tested with mxc-isi running software isp on i.MX8MP platform\n> ---\n> \n> Changes in v3:\n> - Fix issue while running soft-isp\n\nThank you!\nI can confirm that v2 was indeed broken, and v3 works OK with soft-isp.\n\nTested-by: Andrei Konovalov <andrey.konovalov.ynk@gmail.com> # sm8250 RB5\n\n> - Fix missing Doxygen changes\n> \n> changes in v2:\n> - Split out patches 1/4 and 2/4 to tackle validation/sanity check\n> - Rename V4L2M2MConverter::Stream to V4L2M2Mconverter::V4L2M2MStream\n> \n> Umang Jain (4):\n>    converter: converter_v4l2_m2m: Rectify streams sanity check\n>    libcamera: software_isp: Drop unnecessary sanity check\n>    converter: converter_v4l2_m2m: Rename private Stream class\n>    libcamera: converter: Replace usage of stream index by Stream pointer\n> \n>   include/libcamera/internal/converter.h        |  5 +-\n>   .../internal/converter/converter_v4l2_m2m.h   | 13 ++--\n>   .../internal/software_isp/software_isp.h      |  5 +-\n>   src/libcamera/converter.cpp                   |  6 +-\n>   .../converter/converter_v4l2_m2m.cpp          | 77 ++++++++++---------\n>   src/libcamera/pipeline/simple/simple.cpp      | 14 ++--\n>   src/libcamera/software_isp/software_isp.cpp   | 26 +++----\n>   7 files changed, 72 insertions(+), 74 deletions(-)\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id A3357BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 31 May 2024 10:29:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 68BA0634B6;\n\tFri, 31 May 2024 12:29:34 +0200 (CEST)","from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com\n\t[IPv6:2a00:1450:4864:20::62e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6853E61A46\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 31 May 2024 12:29:32 +0200 (CEST)","by mail-ej1-x62e.google.com with SMTP id\n\ta640c23a62f3a-a6755523803so118724066b.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 31 May 2024 03:29:32 -0700 (PDT)","from [192.168.118.26] ([87.116.167.104])\n\tby smtp.gmail.com with ESMTPSA id\n\ta640c23a62f3a-a67e6f02c6asm71502066b.7.2024.05.31.03.29.30\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tFri, 31 May 2024 03:29:31 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"nPeUF6rF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20230601; t=1717151372; x=1717756172;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:from:content-language\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=ZxVqLXo+tiR0aXNRPshdbMVN38vw7jy+8QMFketU+uA=;\n\tb=nPeUF6rFFuS8UH7KT6crYGwmk7NIH3r9tDQlfh3aE1YiLnMTQOP9e1EWER/Ur2DI9I\n\toWxCPQDLiwNb9GksmPRZq+hNNQOfXoS8cHGMQbRvIg/nY4z5rK/QXz9unO8SHATA6+nZ\n\tsV/UzOMhUdUubhWfq2e+Mgv/KWMp9jqub/VyNDdyqu+dE9NzZk5Fio3lohBnK52WCe4I\n\tPGbdacYGba4lFobiV5J6I9q8VBBo9HcsUS/DHID+THtK7hdmsVtYzHlbQA0fsivPHDqx\n\tTMX86tSYgEj069iYQ/yK4pvCRa3C5gyeAxJJgG66ocdBe9U/7bdfN1Kcp2kHVWpyoRoY\n\tLVXQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1717151372; x=1717756172;\n\th=content-transfer-encoding:in-reply-to:from:content-language\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=ZxVqLXo+tiR0aXNRPshdbMVN38vw7jy+8QMFketU+uA=;\n\tb=JRpxGsTtIb8KJ/PY3SLCY/DWDAIiG+jo4ef4yxDvX5zNZTs56J2R8AGl3db/MdaucC\n\thBs8e2ncXk9z+m5Jkrll0YEN24gaQYRGTEFwCrJa3Vf7k5cOIG9RnpmXyMROFCnqRFuT\n\tfrAh79Jw6sRrkoJ+X3U6meEB4YpBpC2evnhjDZXvn4oKhbMSl9M4B68KVEPhMRLPKTbM\n\tHTJO1Uplb1wdjVoVoFkJR0M/jFlZPqA73HszbCOIe1H+RmT4ifdz+76ekUZJaprAgxNb\n\trYL9+Ql7rScoe72h9r4ALkiiA8g8I7VSQphrnq5cEOSKrwBLp/8KXhUcOmuq87rYqaf+\n\tyKoA==","X-Forwarded-Encrypted":"i=1;\n\tAJvYcCULtP0tr/+jYXK1ACxtjud1MFTNCFsFInoOs2ZGSn8dn6zrKs8WHrPraFlRUcRGXTBXH/AXEtVbHaWjsqqaQDB3NEOv+jWjai007ctR2N4/3XLT4g==","X-Gm-Message-State":"AOJu0YwTXpyxMQs+v3yoZw6ot7T0XZHFC/rhKPH+CARGyeo9LifOorlm\n\tl3Wj7uxmSNvJYShYcV+nHpk0cZ+0jS3SH7JSbrTpbMy7FkZktj/t","X-Google-Smtp-Source":"AGHT+IGyzN2wMPag49FfI+i0lxsvuSeDzG/HOovil3q+a0HuZmSHDyv5WOGZB4Vba3c0IehSdxlX4Q==","X-Received":"by 2002:a17:906:360f:b0:a5a:2d0d:2aef with SMTP id\n\ta640c23a62f3a-a682022ed00mr137895266b.21.1717151371476; \n\tFri, 31 May 2024 03:29:31 -0700 (PDT)","Message-ID":"<46a83102-323e-4bb0-969f-7462de0ee045@gmail.com>","Date":"Fri, 31 May 2024 13:29:29 +0300","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v3 0/4] libcamera: converter: Replace usage of stream\n\tindex by Stream pointer","To":"Umang Jain <umang.jain@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Cc":"Milan Zamazal <mzamazal@redhat.com>,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>","References":"<20240531052505.150921-1-umang.jain@ideasonboard.com>","Content-Language":"en-US","From":"Andrei Konovalov <andrey.konovalov.ynk@gmail.com>","In-Reply-To":"<20240531052505.150921-1-umang.jain@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":29857,"web_url":"https://patchwork.libcamera.org/comment/29857/","msgid":"<42056c8d-cce0-42ee-a4fe-7c6b724e7490@ideasonboard.com>","date":"2024-06-12T05:35:36","subject":"Re: [PATCH v3 0/4] libcamera: converter: Replace usage of stream\n\tindex by Stream pointer","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Andrei\n\nOn 31/05/24 3:59 pm, Andrei Konovalov wrote:\n> On 31.05.2024 08:25, Umang Jain wrote:\n>> The converter interface uses the unsigned int output stream index to map\n>> to the output frame buffers. This is cumbersome to implement new\n>> converters because one has to keep around additional book keeping\n>> to track the streams with their correct indexes.\n>>\n>> The v4l2_converter_m2m and simple pipeline handler are adapt to\n>> use the new interface. This work roped in software ISP as well,\n>> which also seems to use indexes (although it doesn't implement converter\n>> interface) because of a common conversionQueue_ queue used for\n>> converter_ and swIsp_.\n>>\n>> Patch 1/4 and 2/4 drop redundant  validation of outputs std::map<>.\n>>\n>> Patch 3/4 renames private class V4L2M2MConverter::Stream to\n>> V4L2M2Mconverter::V4L2M2MStream\n>>\n>> Patch 4/4 replaces the stream index usage from converter interface and\n>> soft isp.\n>>\n>> ---\n>> Tested with mxc-isi running software isp on i.MX8MP platform\n>> ---\n>>\n>> Changes in v3:\n>> - Fix issue while running soft-isp\n>\n> Thank you!\n> I can confirm that v2 was indeed broken, and v3 works OK with soft-isp.\n>\n> Tested-by: Andrei Konovalov <andrey.konovalov.ynk@gmail.com> # sm8250 RB5\n\nThank you for testing.\n\n>\n>> - Fix missing Doxygen changes\n>>\n>> changes in v2:\n>> - Split out patches 1/4 and 2/4 to tackle validation/sanity check\n>> - Rename V4L2M2MConverter::Stream to V4L2M2Mconverter::V4L2M2MStream\n>>\n>> Umang Jain (4):\n>>    converter: converter_v4l2_m2m: Rectify streams sanity check\n>>    libcamera: software_isp: Drop unnecessary sanity check\n>>    converter: converter_v4l2_m2m: Rename private Stream class\n>>    libcamera: converter: Replace usage of stream index by Stream pointer\n>>\n>>   include/libcamera/internal/converter.h        |  5 +-\n>>   .../internal/converter/converter_v4l2_m2m.h   | 13 ++--\n>>   .../internal/software_isp/software_isp.h      |  5 +-\n>>   src/libcamera/converter.cpp                   |  6 +-\n>>   .../converter/converter_v4l2_m2m.cpp          | 77 ++++++++++---------\n>>   src/libcamera/pipeline/simple/simple.cpp      | 14 ++--\n>>   src/libcamera/software_isp/software_isp.cpp   | 26 +++----\n>>   7 files changed, 72 insertions(+), 74 deletions(-)\n>>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 35D32BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 12 Jun 2024 05:35:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E559065463;\n\tWed, 12 Jun 2024 07:35:40 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D6E116545A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Jun 2024 07:35:38 +0200 (CEST)","from [IPV6:2409:4056:183:2b0:212:ef68:4946:57cf] (unknown\n\t[IPv6:2409:4056:183:2b0:212:ef68:4946:57cf])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 59DE329A;\n\tWed, 12 Jun 2024 07:35:24 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"EmwJBDgr\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718170525;\n\tbh=X6CtJ1s2TqRKKqtyEd20yWgd8FhG/+RnsxAs8zfhl2U=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=EmwJBDgrq3JXEJlQLFd2O9X9ZuM1SzMYnX/Fb1G5AC4BBRCVdiproWrXkEGk5PIGI\n\tVAFklMuOq6ScKybdiKworlddBg776JjTlDevwcYSL3qm1p1Gqg9qrRGkI/wHOc018w\n\tIPB4cO0w/bokLR3SZF+lNMjF25mRXC8JDAikU8Bk=","Message-ID":"<42056c8d-cce0-42ee-a4fe-7c6b724e7490@ideasonboard.com>","Date":"Wed, 12 Jun 2024 11:05:36 +0530","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v3 0/4] libcamera: converter: Replace usage of stream\n\tindex by Stream pointer","Content-Language":"en-US","To":"Andrei Konovalov <andrey.konovalov.ynk@gmail.com>,\n\tlibcamera-devel@lists.libcamera.org","Cc":"Milan Zamazal <mzamazal@redhat.com>,\n\tAndrey Konovalov <andrey.konovalov@linaro.org>","References":"<20240531052505.150921-1-umang.jain@ideasonboard.com>\n\t<46a83102-323e-4bb0-969f-7462de0ee045@gmail.com>","From":"Umang Jain <umang.jain@ideasonboard.com>","In-Reply-To":"<46a83102-323e-4bb0-969f-7462de0ee045@gmail.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]