<div dir="ltr"><div dir="ltr">Hi Laurent,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 27, 2021 at 1:14 AM Laurent Pinchart <<a href="mailto:laurent.pinchart@ideasonboard.com">laurent.pinchart@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">Hi Hiro,<br>
<br>
On Thu, May 27, 2021 at 12:20:13AM +0900, Hirokazu Honda wrote:<br>
> On Wed, May 26, 2021 at 11:57 PM Laurent Pinchart wrote:<br>
> > On Wed, May 26, 2021 at 06:36:34PM +0900, Hirokazu Honda wrote:<br>
> >> On Wed, May 26, 2021 at 6:21 PM Umang Jain wrote:<br>
> >>> On 5/26/21 1:35 PM, Jacopo Mondi wrote:<br>
> >>>> On Wed, May 26, 2021 at 12:45:42PM +0530, Umang Jain wrote:<br>
> >>>>> nautilus has two internal cameras, one UVC and one for the IPU3.<br>
> >>>>> However, libcamera assumes all UVC cameras as 'external' hence, mark<br>
> >>>>> the location of UVC camera in HAL configuration as 'external' too.<br>
> >>>>><br>
> >>>>> Note that the presence of UVC camera in camera HAL will complain:<br>
> >>>>><br>
> >>>>>> ERROR HAL camera_device.cpp:701 '\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':<br>
> >>>>>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting<br>
> >>>>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:<br>
> >>>>>    \_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647<br>
> >>>>><br>
> >>>>> This is related to a known issue of UVC cameras on HAL which do not<br>
> >>>>> provide NV12 by default.<br>
> >>>> Does it work without configuration file support ?<br>
> >>><br>
> >>> No, it won't, since it's UVC. And cannot work until there's a<br>
> >>> format-convertor in place that can convert the stream to NV12 provided<br>
> >>> by that camera, I suppose.<br>
> >><br>
> >> It is time that we need a JPEG decoder in a post processing pipeline like a<br>
> >> JPEG encoder.<br>
> ><br>
> > Or a YUYV to NV12 converter, as the camera can also produce YUYV ?<br>
><br>
> I guess the camera is capable to produce YUYV only for lower resolutions<br>
> and produce JPEG for higher resolutions?<br>
<br>
It's up to the camera, but generally speaking, yes, the highest<br>
resolutions and frame rates are only available in MJPEG. Wouldn't a<br>
software decoder likely be too slow in those cases though ?<br>
<br></blockquote><div><br></div><div>Right, on ChromeOS, if an app asks YUV and a camera is capable of producing MJPEG for the resolution, cros camera services requests HAL MJPEG and decodes it to YUV by jpeg decoder (with hw acceleration if there is, without if there isn't). </div><div>So we don't need a JPEG decoder for ChromeOS. I don't know if it's nice to have a jpeg decoder in libcamera for other platforms.</div><div>-Hiro</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> >>>> Also, if we don't mention the UVC camera in the config:<br>
> >>>>><br>
> >>>>>> ERROR HALConfig camera_hal_config.cpp:393 Camera<br>
> >>>>>    '\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647' not described in the HAL<br>
> >>>>>    configuration file<br>
> >>>>>> ERROR HAL camera_device.cpp:701 '\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':<br>
> >>>>>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting<br>
> >>>>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:<br>
> >>>>>    \_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647<br>
> >>>>><br>
> >>>>> Signed-off-by: Umang Jain <<a href="mailto:umang.jain@ideasonboard.com" target="_blank">umang.jain@ideasonboard.com</a>><br>
> >>>>> ---<br>
> >>>>>   src/android/data/nautilus/camera_hal.yaml | 8 ++++++++<br>
> >>>>>   1 file changed, 8 insertions(+)<br>
> >>>>>   create mode 100644 src/android/data/nautilus/camera_hal.yaml<br>
> >>>>><br>
> >>>>> diff --git a/src/android/data/nautilus/camera_hal.yaml b/src/android/data/nautilus/camera_hal.yaml<br>
> >>>>> new file mode 100644<br>
> >>>>> index 00000000..f2d31e1c<br>
> >>>>> --- /dev/null<br>
> >>>>> +++ b/src/android/data/nautilus/camera_hal.yaml<br>
> >>>>> @@ -0,0 +1,8 @@<br>
> >>>>> +cameras:<br>
> >>>>> +  "\\_SB_.PCI0.I2C2.CAM0":<br>
> >>>>> +    location: back<br>
> >>>>> +    rotation: 0<br>
> >>>>> +<br>
> >>>>> +  "\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647":<br>
> >>>>> +    location: external<br>
> >>>>> +    rotation: 0<br>
<br>
-- <br>
Regards,<br>
<br>
Laurent Pinchart<br>
</blockquote></div></div>