<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 12, 2022 at 5:56 PM Kieran Bingham <<a href="mailto:kieran.bingham@ideasonboard.com">kieran.bingham@ideasonboard.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Quoting Cheng-Hao Yang (2022-10-12 10:42:32)<br>
> Thanks Kieran for your thoughts!<br>
> <br>
> On Wed, Oct 12, 2022 at 5:10 PM Kieran Bingham <<br>
> <a href="mailto:kieran.bingham@ideasonboard.com" target="_blank">kieran.bingham@ideasonboard.com</a>> wrote:<br>
> <br>
> > Quoting Harvey Yang via libcamera-devel (2022-10-12 08:59:24)<br>
> > > This is a POC PATCH of the fake pipeline handler, which should be used<br>
> > > for tests and validating Android adaptor can pass CTS limited mode.<br>
> > ><br>
> ><br>
> > Aha, this is interesting. I've wondered if we should have a virtual/fake<br>
> > camera too, perhaps with our own internal pattern generator.<br>
> ><br>
> ><br>
> This fake pipeline handler actually came from a design in ChromeOS<br>
> that tried to do some tests (CTS for example) without involving the real<br>
> cameras, like green frames or providing frames from a prepared video file.<br>
> <br>
> We also wonder how the fake pipeline handler could help libcamera scale<br>
> and launch on more real devices.<br>
<br>
Is there a reason you couldn't use the VIMC camera?<br>
 (modprobe vimc is perhaps required)<br>
<br>
Though I think I've already seen situations where it would be helpful to<br>
have a fake camera that produces a test pattern, without requiring<br>
kernel drivers...<br>
<br></blockquote><div><br></div><div>That's exactly the point. ChromeOS models have different kernel versions. Tomasz</div><div>told me that vimc only works after a specific linux kernel version (5.10?).</div><div><br></div><div>It'd be preferred if the fake pipeline handler can be used on all ChromeOS models.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> > There's lots that could be mocked up, perhaps even as far down as a Fake<br>
> > CameraSensor, and an IPA to support testing of controls too (or perhaps<br>
> > without an IPA as it could all be internal to the pipeline handler, with<br>
> > no particular imagery).<br>
> ><br>
> ><br>
> Yeah there's a TODO to read a prepared configuration file, which defines<br>
> the<br>
> fake cameras and maybe a prepared video file as well. True that I was not<br>
> sure<br>
> why an IPA is needed. Maybe some controls can be applied on the output<br>
> frames<br>
> (from the video)?<br>
<br>
If there's an internal test pattern generator yes. But I don't think we<br>
should introduce any kind of 'video' decoder.<br>
<br>
> There's a lot of commented code in there from the IPU3, so I suspect<br>
> > that was the source.<br>
> ><br>
> > There's <a href="https://git.libcamera.org/libcamera/vivid.git/log/" rel="noreferrer" target="_blank">https://git.libcamera.org/libcamera/vivid.git/log/</a> which might<br>
> > be a 'smaller' pipeline handler to consider as a fake pipeline handler<br>
> > starting point, or even UVC might be simpler comparable starting point.<br>
> ><br>
> ><br>
> Thanks! Will take a look and update on my next patch.<br>
> <br>
> <br>
> > --<br>
> > Kieran<br>
> ><br>
> ><br>
> ><br>
> > > Signed-off-by: Harvey Yang <<a href="mailto:chenghaoyang@chromium.org" target="_blank">chenghaoyang@chromium.org</a>><br>
> > ><br>
> > > Harvey Yang (1):<br>
> > >   Add fake pipeline handler<br>
> > ><br>
> > >  meson_options.txt                       |   2 +-<br>
> > >  src/android/camera_capabilities.cpp     |   1 +<br>
> > >  src/libcamera/pipeline/fake/fake.cpp    | 518 ++++++++++++++++++++++++<br>
> > >  src/libcamera/pipeline/fake/meson.build |   3 +<br>
> > >  src/libcamera/pipeline_handler.cpp      |   2 +-<br>
> > >  test/camera/camera_reconfigure.cpp      |   2 +-<br>
> > >  6 files changed, 525 insertions(+), 3 deletions(-)<br>
> > >  create mode 100644 src/libcamera/pipeline/fake/fake.cpp<br>
> > >  create mode 100644 src/libcamera/pipeline/fake/meson.build<br>
> > ><br>
> > > --<br>
> > > 2.38.0.rc1.362.ged0d419d3c-goog<br>
> > ><br>
> ><br>
</blockquote></div></div>