[{"id":25394,"web_url":"https://patchwork.libcamera.org/comment/25394/","msgid":"<166556583655.3760285.10404804366736524884@Monstersaurus>","date":"2022-10-12T09:10:36","subject":"Re: [libcamera-devel] [PATCH 0/1] Fake Pipeline Handler","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Harvey Yang via libcamera-devel (2022-10-12 08:59:24)\n> This is a POC PATCH of the fake pipeline handler, which should be used\n> for tests and validating Android adaptor can pass CTS limited mode.\n> \n\nAha, this is interesting. I've wondered if we should have a virtual/fake\ncamera too, perhaps with our own internal pattern generator.\n\nThere's lots that could be mocked up, perhaps even as far down as a Fake\nCameraSensor, and an IPA to support testing of controls too (or perhaps\nwithout an IPA as it could all be internal to the pipeline handler, with\nno particular imagery).\n\nThere's a lot of commented code in there from the IPU3, so I suspect\nthat was the source.\n\nThere's https://git.libcamera.org/libcamera/vivid.git/log/ which might\nbe a 'smaller' pipeline handler to consider as a fake pipeline handler\nstarting point, or even UVC might be simpler comparable starting point.\n\n--\nKieran\n\n\n\n> Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>\n> \n> Harvey Yang (1):\n>   Add fake pipeline handler\n> \n>  meson_options.txt                       |   2 +-\n>  src/android/camera_capabilities.cpp     |   1 +\n>  src/libcamera/pipeline/fake/fake.cpp    | 518 ++++++++++++++++++++++++\n>  src/libcamera/pipeline/fake/meson.build |   3 +\n>  src/libcamera/pipeline_handler.cpp      |   2 +-\n>  test/camera/camera_reconfigure.cpp      |   2 +-\n>  6 files changed, 525 insertions(+), 3 deletions(-)\n>  create mode 100644 src/libcamera/pipeline/fake/fake.cpp\n>  create mode 100644 src/libcamera/pipeline/fake/meson.build\n> \n> -- \n> 2.38.0.rc1.362.ged0d419d3c-goog\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 A27DEC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 12 Oct 2022 09:10:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 24DDF62D8C;\n\tWed, 12 Oct 2022 11:10:42 +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 DD198603D4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Oct 2022 11:10:39 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 59E314D3;\n\tWed, 12 Oct 2022 11:10:39 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665565842;\n\tbh=KuxNsdafMmTcoNOO48TReCtqwYVCnEx23ds3ppHqqkI=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=yCVJVdXSsXGmYFm5GdcqECjgyt0kB9gBFsa40uM+dw/V6WCtySgwcHPG6oBtPBCrO\n\tSMYY/BtXBHCrLU+cNCPqfQ8PHlXL3EY94GRGJttNRnd3l2ctNVbwyy43j4LSNpFgu0\n\t5turWMQHtblXg9K+2QjYc5vrI1IBRDCweZYtRx0b6Hdlx91oyOFE41hXXnS6ogUVN1\n\tHO+Vc6Csh1L6C6DchRtSrJ/Gmz3Jm2rMtAeLtqejAPWpdHkDLjgQvf0d980GEQynhf\n\twYTikUsMbeU2nN0exp0THUC4xDedC07LPxV1oFRnYBndKhaGStExC3pDNgyjylstb7\n\tGydh6WU6yTKvg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1665565839;\n\tbh=KuxNsdafMmTcoNOO48TReCtqwYVCnEx23ds3ppHqqkI=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=bVgnkr0PM9Eu01PJT374EtijeL/WwCg1j64O12DtlLH8JXGtwzqQbduB3d/k2mL3k\n\tTEbyLeJnBrgCd8813RkD0OQl/guhvQWBGxOy+uvvPQmY9A0S+Wp3Ivufk8rFsvc6hE\n\tgenxuleBbkmIBMtjGH3E6Q7MmNxT1IWTf+4erv8M="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"bVgnkr0P\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20221012075925.3971538-1-chenghaoyang@google.com>","References":"<20221012075925.3971538-1-chenghaoyang@google.com>","To":"Harvey Yang <chenghaoyang@chromium.org>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Wed, 12 Oct 2022 10:10:36 +0100","Message-ID":"<166556583655.3760285.10404804366736524884@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH 0/1] Fake Pipeline Handler","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Harvey Yang <chenghaoyang@google.com>,\n\tHarvey Yang <chenghaoyang@chromium.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25395,"web_url":"https://patchwork.libcamera.org/comment/25395/","msgid":"<CAEB1ahvS71rSYvdvmCzTUYmF8+ZcFY-33yNOx6eocUbCuG0Emw@mail.gmail.com>","date":"2022-10-12T09:42:32","subject":"Re: [libcamera-devel] [PATCH 0/1] Fake Pipeline Handler","submitter":{"id":117,"url":"https://patchwork.libcamera.org/api/people/117/","name":"Cheng-Hao Yang","email":"chenghaoyang@chromium.org"},"content":"Thanks Kieran for your thoughts!\n\nOn Wed, Oct 12, 2022 at 5:10 PM Kieran Bingham <\nkieran.bingham@ideasonboard.com> wrote:\n\n> Quoting Harvey Yang via libcamera-devel (2022-10-12 08:59:24)\n> > This is a POC PATCH of the fake pipeline handler, which should be used\n> > for tests and validating Android adaptor can pass CTS limited mode.\n> >\n>\n> Aha, this is interesting. I've wondered if we should have a virtual/fake\n> camera too, perhaps with our own internal pattern generator.\n>\n>\nThis fake pipeline handler actually came from a design in ChromeOS\nthat tried to do some tests (CTS for example) without involving the real\ncameras, like green frames or providing frames from a prepared video file.\n\nWe also wonder how the fake pipeline handler could help libcamera scale\nand launch on more real devices.\n\n\n> There's lots that could be mocked up, perhaps even as far down as a Fake\n> CameraSensor, and an IPA to support testing of controls too (or perhaps\n> without an IPA as it could all be internal to the pipeline handler, with\n> no particular imagery).\n>\n>\nYeah there's a TODO to read a prepared configuration file, which defines\nthe\nfake cameras and maybe a prepared video file as well. True that I was not\nsure\nwhy an IPA is needed. Maybe some controls can be applied on the output\nframes\n(from the video)?\n\nThere's a lot of commented code in there from the IPU3, so I suspect\n> that was the source.\n>\n> There's https://git.libcamera.org/libcamera/vivid.git/log/ which might\n> be a 'smaller' pipeline handler to consider as a fake pipeline handler\n> starting point, or even UVC might be simpler comparable starting point.\n>\n>\nThanks! Will take a look and update on my next patch.\n\n\n> --\n> Kieran\n>\n>\n>\n> > Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>\n> >\n> > Harvey Yang (1):\n> >   Add fake pipeline handler\n> >\n> >  meson_options.txt                       |   2 +-\n> >  src/android/camera_capabilities.cpp     |   1 +\n> >  src/libcamera/pipeline/fake/fake.cpp    | 518 ++++++++++++++++++++++++\n> >  src/libcamera/pipeline/fake/meson.build |   3 +\n> >  src/libcamera/pipeline_handler.cpp      |   2 +-\n> >  test/camera/camera_reconfigure.cpp      |   2 +-\n> >  6 files changed, 525 insertions(+), 3 deletions(-)\n> >  create mode 100644 src/libcamera/pipeline/fake/fake.cpp\n> >  create mode 100644 src/libcamera/pipeline/fake/meson.build\n> >\n> > --\n> > 2.38.0.rc1.362.ged0d419d3c-goog\n> >\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 6CF89BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 12 Oct 2022 09:42:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CD34F62D8D;\n\tWed, 12 Oct 2022 11:42:44 +0200 (CEST)","from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com\n\t[IPv6:2a00:1450:4864:20::12c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E8823603D4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Oct 2022 11:42:43 +0200 (CEST)","by mail-lf1-x12c.google.com with SMTP id s20so24919708lfi.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Oct 2022 02:42:43 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665567764;\n\tbh=dINSfYpsLgKCeHQNCJtccVtKXvCn/XWu+EGU7hvU+Xs=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=SZqGaPA1L7IIlUZ5UDMXFFRvN143cyS4D0y07Nac42ilkaI6YsOVFFBM/CLD5fZA6\n\tw1nMh+Iqn5T5PKeVw618DkxCXgMalnLfpj297nO4OT8qpsTiSrqFX5RTt3aPGemcH+\n\tXGwmk0pwpEhJe9jcBEKKddOvSvhRI0OFZKFX/bPjEOstwIisGMc0csTvIR1tUdV4cA\n\tKXJ6n5xWn4YV8U0BYXhyR47OJLiSXVqxCZmuyt/7mtkUxc2pBvNVnY0aMH75N9LfMn\n\tqdGXSD2HNFgRhVsMZu5pjQLPveXBxfSiSG4UUlxn3OA8ZgSYh2Prk0ItzzTnxhUJRa\n\tH3NaNVwrzyWpg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=U32QAGj5p79IVG9451mDypozoFQcOmISQu0WFTwNzP4=;\n\tb=im9jMif26HNxwWvJc/OwKN5E19ucVAqzC6Rykd4+31VnRJXjEnIKPQvxShDk0nP7ck\n\tdPcnGvbj1SNSBs9rW2fm/z952gSxlLwuGB1qmytymGY/Fdq8JyKYGf1ocSY40saZwa8v\n\tINlZ2i0cATN0eVL6Jfct5DddXqZw+K6KQlKaY="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"im9jMif2\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=U32QAGj5p79IVG9451mDypozoFQcOmISQu0WFTwNzP4=;\n\tb=nZjUrUIp3GPDZfiPajDx/3ifSd3JY34cfjQrNl7+upcFVvWzed/1hyDipOD3nHWLqg\n\t3RwhUbqUqEfTypOmzCxDx0TVti/t/PjMBBYnzNCxODCM1liKYZuatTyl1uV8BNNhkyz6\n\trbZ/nWj51Bui/4mtk/ueXtT50Ad9pbm9+ftkRnYx1BzZtruXak2v/QVPWhfMOgEqvIY3\n\tQGx2y86cDvOW5VWgUGhR/w1AtOfhf9b9OS0/rmQFLzrDFfgXXGgjY3fw4eIdpLkWRM2A\n\tylNtJ9pHhXCVaWe7iixSGdQNSrsjUDQYeAyUK9h+WEQ20byRDdhMU827lvKx+WhxIxHQ\n\tXl4A==","X-Gm-Message-State":"ACrzQf0zSoPrP0h3AFtqM8BqatWANrBdYrZ5/mPzeI8v67MbwA2zB/pA\n\tW3VltZ+skXInEPZDj4r+i9lxYhXw+Cia1hLImNidpQ==","X-Google-Smtp-Source":"AMsMyM5GvGydrH39fpU1pyRVSNGy7xtVcUKic13u124qzDOmeY4tprF6NOzCx/G4+ipC49w9Y7Laao0NHTKTuwEiQPE=","X-Received":"by 2002:a05:6512:1096:b0:4a2:f71:60ea with SMTP id\n\tj22-20020a056512109600b004a20f7160eamr11425896lfg.232.1665567763172;\n\tWed, 12 Oct 2022 02:42:43 -0700 (PDT)","MIME-Version":"1.0","References":"<20221012075925.3971538-1-chenghaoyang@google.com>\n\t<166556583655.3760285.10404804366736524884@Monstersaurus>","In-Reply-To":"<166556583655.3760285.10404804366736524884@Monstersaurus>","Date":"Wed, 12 Oct 2022 17:42:32 +0800","Message-ID":"<CAEB1ahvS71rSYvdvmCzTUYmF8+ZcFY-33yNOx6eocUbCuG0Emw@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"000000000000dfaba405ead33617\"","Subject":"Re: [libcamera-devel] [PATCH 0/1] Fake Pipeline Handler","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>","From":"Cheng-Hao Yang via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Cheng-Hao Yang <chenghaoyang@chromium.org>","Cc":"Harvey Yang <chenghaoyang@google.com>,\n\tlibcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25396,"web_url":"https://patchwork.libcamera.org/comment/25396/","msgid":"<166556856196.3760285.6993094692551050842@Monstersaurus>","date":"2022-10-12T09:56:01","subject":"Re: [libcamera-devel] [PATCH 0/1] Fake Pipeline Handler","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Cheng-Hao Yang (2022-10-12 10:42:32)\n> Thanks Kieran for your thoughts!\n> \n> On Wed, Oct 12, 2022 at 5:10 PM Kieran Bingham <\n> kieran.bingham@ideasonboard.com> wrote:\n> \n> > Quoting Harvey Yang via libcamera-devel (2022-10-12 08:59:24)\n> > > This is a POC PATCH of the fake pipeline handler, which should be used\n> > > for tests and validating Android adaptor can pass CTS limited mode.\n> > >\n> >\n> > Aha, this is interesting. I've wondered if we should have a virtual/fake\n> > camera too, perhaps with our own internal pattern generator.\n> >\n> >\n> This fake pipeline handler actually came from a design in ChromeOS\n> that tried to do some tests (CTS for example) without involving the real\n> cameras, like green frames or providing frames from a prepared video file.\n> \n> We also wonder how the fake pipeline handler could help libcamera scale\n> and launch on more real devices.\n\nIs there a reason you couldn't use the VIMC camera?\n (modprobe vimc is perhaps required)\n\nThough I think I've already seen situations where it would be helpful to\nhave a fake camera that produces a test pattern, without requiring\nkernel drivers...\n\n\n> > There's lots that could be mocked up, perhaps even as far down as a Fake\n> > CameraSensor, and an IPA to support testing of controls too (or perhaps\n> > without an IPA as it could all be internal to the pipeline handler, with\n> > no particular imagery).\n> >\n> >\n> Yeah there's a TODO to read a prepared configuration file, which defines\n> the\n> fake cameras and maybe a prepared video file as well. True that I was not\n> sure\n> why an IPA is needed. Maybe some controls can be applied on the output\n> frames\n> (from the video)?\n\nIf there's an internal test pattern generator yes. But I don't think we\nshould introduce any kind of 'video' decoder.\n\n> There's a lot of commented code in there from the IPU3, so I suspect\n> > that was the source.\n> >\n> > There's https://git.libcamera.org/libcamera/vivid.git/log/ which might\n> > be a 'smaller' pipeline handler to consider as a fake pipeline handler\n> > starting point, or even UVC might be simpler comparable starting point.\n> >\n> >\n> Thanks! Will take a look and update on my next patch.\n> \n> \n> > --\n> > Kieran\n> >\n> >\n> >\n> > > Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>\n> > >\n> > > Harvey Yang (1):\n> > >   Add fake pipeline handler\n> > >\n> > >  meson_options.txt                       |   2 +-\n> > >  src/android/camera_capabilities.cpp     |   1 +\n> > >  src/libcamera/pipeline/fake/fake.cpp    | 518 ++++++++++++++++++++++++\n> > >  src/libcamera/pipeline/fake/meson.build |   3 +\n> > >  src/libcamera/pipeline_handler.cpp      |   2 +-\n> > >  test/camera/camera_reconfigure.cpp      |   2 +-\n> > >  6 files changed, 525 insertions(+), 3 deletions(-)\n> > >  create mode 100644 src/libcamera/pipeline/fake/fake.cpp\n> > >  create mode 100644 src/libcamera/pipeline/fake/meson.build\n> > >\n> > > --\n> > > 2.38.0.rc1.362.ged0d419d3c-goog\n> > >\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 D04BAC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 12 Oct 2022 09:56:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 33BAF62D8E;\n\tWed, 12 Oct 2022 11:56:07 +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 0044C603D4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Oct 2022 11:56:05 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 66BB74DB;\n\tWed, 12 Oct 2022 11:56:05 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665568567;\n\tbh=xqK4Wv5fSap0IJp+Ms3i/Zc4t1dfjZ+v3OELPGpwTAg=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=JhDjm5XmnwV9YpToHdvkLsoNz3GNE0HI29IlSZYV+WLiK5qwxQ3I5KBaa2Jg+UDkq\n\tsLgkIl4RfJNcjyaHjiDRvPBvpcJq048WDF/z82e1TZmI3/ao/yEVW8iqVYI/FLqOjN\n\tqGx33gCTxqNQEicKAu7ptNRfkWVE1HSBM1gjp62IrTYE8pd4A2UI3Sc/hi9bMVFUla\n\teNuTVhv2ZaE5LCZAq08vMl3g1WZ6WEttFeQB2MOdUOvXwd+FkUi7E+8zpkadWB7qDI\n\tnAUWMUuom8OXFgZ8OqkGhZ7/3V7Ls04v/Yj6vtlwooyNj7SXCLpsWyWcrqUv1+CZr+\n\tyMgwndRTGRpqA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1665568565;\n\tbh=xqK4Wv5fSap0IJp+Ms3i/Zc4t1dfjZ+v3OELPGpwTAg=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=dvOxAR4hLhPEAck0bAXeYr4/5TwK5hjYl1tQCtY0DBs8QSxjTTbhDvHWvnlrZYh4U\n\tJoSqb7g6UD48yLadKyk0TX7UR4GrBfjEKNAn7fR78aSXiAmFVFadJTYYnrYrIxfc2o\n\t07hOsOnnEiUO3ZSlcFjUv/PdtLsjL1qVGAC8inrM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"dvOxAR4h\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<CAEB1ahvS71rSYvdvmCzTUYmF8+ZcFY-33yNOx6eocUbCuG0Emw@mail.gmail.com>","References":"<20221012075925.3971538-1-chenghaoyang@google.com>\n\t<166556583655.3760285.10404804366736524884@Monstersaurus>\n\t<CAEB1ahvS71rSYvdvmCzTUYmF8+ZcFY-33yNOx6eocUbCuG0Emw@mail.gmail.com>","To":"Cheng-Hao Yang <chenghaoyang@chromium.org>","Date":"Wed, 12 Oct 2022 10:56:01 +0100","Message-ID":"<166556856196.3760285.6993094692551050842@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH 0/1] Fake Pipeline Handler","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Harvey Yang <chenghaoyang@google.com>,\n\tlibcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25399,"web_url":"https://patchwork.libcamera.org/comment/25399/","msgid":"<CAEB1ahtENGSVQ6_Lzo4g2AvPHr53YK-T+Tx6q_hsN0QDvdg-Fw@mail.gmail.com>","date":"2022-10-12T11:24:53","subject":"Re: [libcamera-devel] [PATCH 0/1] Fake Pipeline Handler","submitter":{"id":117,"url":"https://patchwork.libcamera.org/api/people/117/","name":"Cheng-Hao Yang","email":"chenghaoyang@chromium.org"},"content":"On Wed, Oct 12, 2022 at 5:56 PM Kieran Bingham <\nkieran.bingham@ideasonboard.com> wrote:\n\n> Quoting Cheng-Hao Yang (2022-10-12 10:42:32)\n> > Thanks Kieran for your thoughts!\n> >\n> > On Wed, Oct 12, 2022 at 5:10 PM Kieran Bingham <\n> > kieran.bingham@ideasonboard.com> wrote:\n> >\n> > > Quoting Harvey Yang via libcamera-devel (2022-10-12 08:59:24)\n> > > > This is a POC PATCH of the fake pipeline handler, which should be\n> used\n> > > > for tests and validating Android adaptor can pass CTS limited mode.\n> > > >\n> > >\n> > > Aha, this is interesting. I've wondered if we should have a\n> virtual/fake\n> > > camera too, perhaps with our own internal pattern generator.\n> > >\n> > >\n> > This fake pipeline handler actually came from a design in ChromeOS\n> > that tried to do some tests (CTS for example) without involving the real\n> > cameras, like green frames or providing frames from a prepared video\n> file.\n> >\n> > We also wonder how the fake pipeline handler could help libcamera scale\n> > and launch on more real devices.\n>\n> Is there a reason you couldn't use the VIMC camera?\n>  (modprobe vimc is perhaps required)\n>\n> Though I think I've already seen situations where it would be helpful to\n> have a fake camera that produces a test pattern, without requiring\n> kernel drivers...\n>\n>\nThat's exactly the point. ChromeOS models have different kernel versions.\nTomasz\ntold me that vimc only works after a specific linux kernel version (5.10?).\n\nIt'd be preferred if the fake pipeline handler can be used on all ChromeOS\nmodels.\n\n\n>\n> > > There's lots that could be mocked up, perhaps even as far down as a\n> Fake\n> > > CameraSensor, and an IPA to support testing of controls too (or perhaps\n> > > without an IPA as it could all be internal to the pipeline handler,\n> with\n> > > no particular imagery).\n> > >\n> > >\n> > Yeah there's a TODO to read a prepared configuration file, which defines\n> > the\n> > fake cameras and maybe a prepared video file as well. True that I was not\n> > sure\n> > why an IPA is needed. Maybe some controls can be applied on the output\n> > frames\n> > (from the video)?\n>\n> If there's an internal test pattern generator yes. But I don't think we\n> should introduce any kind of 'video' decoder.\n>\n> > There's a lot of commented code in there from the IPU3, so I suspect\n> > > that was the source.\n> > >\n> > > There's https://git.libcamera.org/libcamera/vivid.git/log/ which might\n> > > be a 'smaller' pipeline handler to consider as a fake pipeline handler\n> > > starting point, or even UVC might be simpler comparable starting point.\n> > >\n> > >\n> > Thanks! Will take a look and update on my next patch.\n> >\n> >\n> > > --\n> > > Kieran\n> > >\n> > >\n> > >\n> > > > Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>\n> > > >\n> > > > Harvey Yang (1):\n> > > >   Add fake pipeline handler\n> > > >\n> > > >  meson_options.txt                       |   2 +-\n> > > >  src/android/camera_capabilities.cpp     |   1 +\n> > > >  src/libcamera/pipeline/fake/fake.cpp    | 518\n> ++++++++++++++++++++++++\n> > > >  src/libcamera/pipeline/fake/meson.build |   3 +\n> > > >  src/libcamera/pipeline_handler.cpp      |   2 +-\n> > > >  test/camera/camera_reconfigure.cpp      |   2 +-\n> > > >  6 files changed, 525 insertions(+), 3 deletions(-)\n> > > >  create mode 100644 src/libcamera/pipeline/fake/fake.cpp\n> > > >  create mode 100644 src/libcamera/pipeline/fake/meson.build\n> > > >\n> > > > --\n> > > > 2.38.0.rc1.362.ged0d419d3c-goog\n> > > >\n> > >\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 19275BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 12 Oct 2022 11:25:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3674562D99;\n\tWed, 12 Oct 2022 13:25:06 +0200 (CEST)","from mail-lj1-x234.google.com (mail-lj1-x234.google.com\n\t[IPv6:2a00:1450:4864:20::234])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2F6A0603D7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Oct 2022 13:25:05 +0200 (CEST)","by mail-lj1-x234.google.com with SMTP id r22so18946952ljn.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Oct 2022 04:25:05 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665573906;\n\tbh=ern8y5l1E+GktZyqmyQTtqZA2FVRf+7Lh2L2Y62XVjM=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=OXw/0CyW8ukg6uVYvzj26hm1XChIaSa5qiYtpDJ9X8vGCnDYWX1LOJO8A+iAy/7Mn\n\tqJFBcGDfCXZxtKB4cEpC0SVoMLsq4i3NRLisjleFamJ30xkCrFLGf5scftcQTqRBxJ\n\t3ZdIecmYhQINXZTR3dcdT1E3/l8fa7SGcX34tcqXk+G3HsRPMpTaUIyjkg9I+mkgLv\n\tI4PlC1jSqOYow60sXM8CwsonD4pMvfO8w94GaP+MhT16lXoZ6naw+TWfL2pCmM0j9T\n\tNPoEdJ6SwtO3JmEd82c3FoeT1JCk8AfpD/KrT8Aep2BAgkC3he0+vGq8UiUUvEV18z\n\t+Wo+cp2i4HA9Q==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=1oghn6UfslHZxdU+3hDmDcpVm9J5yhH9qYTz5wbZTPc=;\n\tb=asI/qkVKyc2XQgvbqBWFkiSDNndYfR00B3A/RXsMCPLiw00OZ4MDU0cwhCSc0XEZ1w\n\tSNo3fKrE/udgTaJt15iihgZ7qVpeDAq92f+x/kaXdxm4GHrDW75lwEwpWI/J0NKSqz+8\n\tZDeHX9nMGE/PogczUd8teaL1ub+n/TyM/CNK4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"asI/qkVK\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=1oghn6UfslHZxdU+3hDmDcpVm9J5yhH9qYTz5wbZTPc=;\n\tb=Hz6wAMeZ6Nbw/aVoEQkB1rgIfB7NWpIAJR8HxLKSmWkzKq9BME6pwEDL6xjdRgopNE\n\tuzq+IiGTpnfS71wqzl7+Fcz932lc6SVYRSC1O2A0+q8SAbh5qzR6UGM6Nk+YNa5Cpgnd\n\tmVge+wAwnKZuv3+4rBIe/HSVn7YrG0UNX041v1HzBwBaeVVpOm+ShFHre8efm1um6T5e\n\tMzR11cdxJjKApXm12IQTVFeJCdWZ+KfFHXjui0ZjnYTINKDjQbbu2JHw2BDy/t0RGOwW\n\t1BWWSDryS0NH1PHAxXJRYEuCUOuJlJFbibEJB9LsgGc8TS8pTDC+sN7FINjDAWsPgu8X\n\t45IQ==","X-Gm-Message-State":"ACrzQf2chb1V5Wm3/WCQAaF2oitvJnf3qXR7U8OcVrC6JpnqfNyEDoZ2\n\t19vlU6Wya5vJsPx2ScXXxDSMtrpsIDQxMek7LWDvtQ==","X-Google-Smtp-Source":"AMsMyM6z+MzQcX95WVnvArbGMZjI/CU8mVOCxjtifJWQzpZxXoOhPfBJu8IK87JIhHNI4X7Q4BzQoEfX23GOQjKxbhM=","X-Received":"by 2002:a2e:92c8:0:b0:25d:6ddf:e71d with SMTP id\n\tk8-20020a2e92c8000000b0025d6ddfe71dmr10350727ljh.170.1665573904305;\n\tWed, 12 Oct 2022 04:25:04 -0700 (PDT)","MIME-Version":"1.0","References":"<20221012075925.3971538-1-chenghaoyang@google.com>\n\t<166556583655.3760285.10404804366736524884@Monstersaurus>\n\t<CAEB1ahvS71rSYvdvmCzTUYmF8+ZcFY-33yNOx6eocUbCuG0Emw@mail.gmail.com>\n\t<166556856196.3760285.6993094692551050842@Monstersaurus>","In-Reply-To":"<166556856196.3760285.6993094692551050842@Monstersaurus>","Date":"Wed, 12 Oct 2022 19:24:53 +0800","Message-ID":"<CAEB1ahtENGSVQ6_Lzo4g2AvPHr53YK-T+Tx6q_hsN0QDvdg-Fw@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"000000000000e9e61e05ead4a4f4\"","Subject":"Re: [libcamera-devel] [PATCH 0/1] Fake Pipeline Handler","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>","From":"Cheng-Hao Yang via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Cheng-Hao Yang <chenghaoyang@chromium.org>","Cc":"Harvey Yang <chenghaoyang@google.com>,\n\tlibcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]